Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6905)

Unified Diff: chrome/browser/sync/sync_ui_util.cc

Issue 8308005: Suppress bubble view for CONNECTION_FAILED error (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/sync/sync_ui_util.cc
diff --git a/chrome/browser/sync/sync_ui_util.cc b/chrome/browser/sync/sync_ui_util.cc
index 79c8fd50f02e7428d5101e057d532fc23fbdb740..9cac85340d6240fe0c0868b8e50fbec3c48e0e97 100644
--- a/chrome/browser/sync/sync_ui_util.cc
+++ b/chrome/browser/sync/sync_ui_util.cc
@@ -340,44 +340,39 @@ MessageType GetStatusLabelsForNewTabPage(ProfileSyncService* service,
service, status_label, link_label);
}
-MessageType GetStatusLabelsForSyncGlobalError(ProfileSyncService* service,
- string16* menu_label,
- string16* bubble_message,
- string16* bubble_accept_label) {
+void GetStatusLabelsForSyncGlobalError(ProfileSyncService* service,
+ string16* menu_label,
+ string16* bubble_message,
+ string16* bubble_accept_label) {
+ DCHECK(menu_label);
+ DCHECK(bubble_message);
+ DCHECK(bubble_accept_label);
+
Andrew T Wilson (Slow) 2011/10/17 04:08:55 Since we aren't returning MessageType any more, I
sail 2011/10/17 15:21:22 Done.
if (!service->HasSyncSetupCompleted())
- return PRE_SYNCED;
+ return;
if (service->IsPassphraseRequired() &&
service->IsPassphraseRequiredForDecryption()) {
// This is not the first machine so ask user to enter passphrase.
- if (menu_label) {
- *menu_label = l10n_util::GetStringUTF16(
- IDS_SYNC_PASSPHRASE_ERROR_WRENCH_MENU_ITEM);
- }
- if (bubble_message) {
- string16 product_name = l10n_util::GetStringUTF16(IDS_PRODUCT_NAME);
- *bubble_message = l10n_util::GetStringFUTF16(
- IDS_SYNC_PASSPHRASE_ERROR_BUBBLE_VIEW_MESSAGE, product_name);
- }
- if (bubble_accept_label) {
- *bubble_accept_label = l10n_util::GetStringUTF16(
- IDS_SYNC_PASSPHRASE_ERROR_BUBBLE_VIEW_ACCEPT);
- }
- return SYNC_ERROR;
+ *menu_label = l10n_util::GetStringUTF16(
+ IDS_SYNC_PASSPHRASE_ERROR_WRENCH_MENU_ITEM);
+ string16 product_name = l10n_util::GetStringUTF16(IDS_PRODUCT_NAME);
+ *bubble_message = l10n_util::GetStringFUTF16(
+ IDS_SYNC_PASSPHRASE_ERROR_BUBBLE_VIEW_MESSAGE, product_name);
+ *bubble_accept_label = l10n_util::GetStringUTF16(
+ IDS_SYNC_PASSPHRASE_ERROR_BUBBLE_VIEW_ACCEPT);
+ return;
}
MessageType status = GetStatus(service);
if (status != SYNC_ERROR)
- return status;
+ return;
const AuthError& auth_error = service->GetAuthError();
if (auth_error.state() != AuthError::NONE) {
GetStatusLabelsForAuthError(auth_error, *service, NULL, NULL,
menu_label, bubble_message, bubble_accept_label);
- return SYNC_ERROR;
}
-
- return SYNCED;
}
MessageType GetStatus(ProfileSyncService* service) {

Powered by Google App Engine
This is Rietveld 408576698