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

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

Issue 11886079: Revert 177136 due to memory error on Mac ASAN (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 11 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
« no previous file with comments | « chrome/browser/sync/sync_global_error.h ('k') | chrome/browser/sync/sync_global_error_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/sync_global_error.cc
===================================================================
--- chrome/browser/sync/sync_global_error.cc (revision 177205)
+++ chrome/browser/sync/sync_global_error.cc (working copy)
@@ -21,6 +21,8 @@
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
+typedef GoogleServiceAuthError AuthError;
+
SyncGlobalError::SyncGlobalError(ProfileSyncService* service,
SigninManager* signin)
: service_(service),
@@ -49,7 +51,7 @@
}
int SyncGlobalError::MenuItemCommandID() {
- return IDC_SHOW_SIGNIN_ERROR;
+ return IDC_SHOW_SYNC_ERROR;
}
string16 SyncGlobalError::MenuItemLabel() {
@@ -57,6 +59,14 @@
}
void SyncGlobalError::ExecuteMenuItem(Browser* browser) {
+#if defined(OS_CHROMEOS)
+ if (service_->GetAuthError().state() != AuthError::NONE) {
+ DLOG(INFO) << "Signing out the user to fix a sync error.";
+ // TODO(beng): seems like this could just call browser::AttemptUserExit().
+ chrome::ExecuteCommand(browser, IDC_EXIT);
+ return;
+ }
+#endif
LoginUIService* login_ui = LoginUIServiceFactory::GetForProfile(
service_->profile());
if (login_ui->current_login_ui()) {
@@ -125,3 +135,7 @@
}
}
}
+
+bool SyncGlobalError::HasCustomizedSyncMenuItem() {
+ return !menu_label_.empty();
+}
« no previous file with comments | « chrome/browser/sync/sync_global_error.h ('k') | chrome/browser/sync/sync_global_error_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698