Chromium Code Reviews| Index: chrome/browser/sync/sync_ui_util.h |
| diff --git a/chrome/browser/sync/sync_ui_util.h b/chrome/browser/sync/sync_ui_util.h |
| index 6055df53ff6427a476e9162cfb42446e98ab811a..baee5530c13d1e7307248c4297757b99e2bede94 100644 |
| --- a/chrome/browser/sync/sync_ui_util.h |
| +++ b/chrome/browser/sync/sync_ui_util.h |
| @@ -29,6 +29,16 @@ enum StatusLabelStyle { |
| WITH_HTML // Label may contain an HTML-formatted link. |
| }; |
| +// Sync errors that should be exposed to the user through the avatar button. |
| +enum SyncErrorType { |
| + NO_ERROR, // No sync error. |
| + MANAGED_USER_UNRECOVERABLE_ERROR, // Unrecoverable error for managed users. |
| + UNRECOVERABLE_ERROR, // Unrecoverable error for regular users. |
| + AUTH_ERROR, // Authentication error. |
| + UPGRADE_CLIENT_ERROR, // Out-of-date client error. |
| + PASSPHRASE_ERROR // Sync passphrase error. |
| +}; |
|
Roger Tawa OOO till Jul 10th
2016/07/27 15:38:02
Maybe make the name of this enum type mention "ava
Jane
2016/07/27 15:51:02
Done.
|
| + |
| // TODO(akalin): audit the use of ProfileSyncService* service below, |
| // and use const ProfileSyncService& service where possible. |
| @@ -50,14 +60,20 @@ MessageType GetStatusLabelsForNewTabPage(Profile* profile, |
| base::string16* status_label, |
| base::string16* link_label); |
| +#if !defined(OS_CHROMEOS) |
| // Gets various labels for the sync global error based on the sync error state. |
| // |menu_item_label|, |bubble_message|, and |bubble_accept_label| must not be |
| // NULL. Note that we don't use SyncGlobalError on Chrome OS. |
| -#if !defined(OS_CHROMEOS) |
| void GetStatusLabelsForSyncGlobalError(const ProfileSyncService* service, |
| base::string16* menu_item_label, |
| base::string16* bubble_message, |
| base::string16* bubble_accept_label); |
| + |
| +// Gets the error message and button label for the sync errors that should be |
| +// exposed to the user through the titlebar avatar button. |
| +SyncErrorType GetMessagesForAvatarSyncError(Profile* profile, |
| + int* content_string_id, |
| + int* button_string_id); |
| #endif |
| MessageType GetStatus(Profile* profile, |