profile_error_dialog.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // Copyright (c) 2011 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef CHROME_BROWSER_UI_PROFILE_ERROR_DIALOG_H_
  5. #define CHROME_BROWSER_UI_PROFILE_ERROR_DIALOG_H_
  6. #include <string>
  7. // Be very careful while modifying this enum. Do NOT remove any elements from
  8. // this enum. If you need to add one, add them to the end, right before END.
  9. // END should ALWAYS be the last element in this enum. This is important because
  10. // this enum is used to back a histogram, and these are implicit assumptions
  11. // made in terms of how enumerated histograms are defined.
  12. enum class ProfileErrorType {
  13. HISTORY,
  14. PREFERENCES,
  15. DB_AUTOFILL_WEB_DATA,
  16. DB_TOKEN_WEB_DATA,
  17. DB_WEB_DATA,
  18. DB_KEYWORD_WEB_DATA,
  19. CREATE_FAILURE_SPECIFIED,
  20. CREATE_FAILURE_ALL,
  21. DB_PAYMENT_MANIFEST_WEB_DATA,
  22. DB_ACCOUNT_AUTOFILL_WEB_DATA,
  23. END
  24. };
  25. // Shows an error dialog corresponding to the inability to open some portion of
  26. // the profile.
  27. // The ProfileErrorType |type| needs to correspond to one of the profile error
  28. // types in the enum above. If your use case doesn't fit any of the ones listed
  29. // above, please add your type to the enum and modify the enum definition in
  30. // tools/metrics/histograms/histograms.xml accordingly.
  31. // |message_id| is a string id corresponding to the message to show.
  32. // |diagnostics| contains diagnostic information about the database file that
  33. // might have caused a profile error.
  34. void ShowProfileErrorDialog(ProfileErrorType type,
  35. int message_id,
  36. const std::string& diagnostics);
  37. #endif // CHROME_BROWSER_UI_PROFILE_ERROR_DIALOG_H_