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

Side by Side Diff: chrome/browser/sync/sync_global_error.cc

Issue 10192005: Refactor LoginUIService to not rely on WebUI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review feedback. Created 8 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/sync/sync_global_error.h" 5 #include "chrome/browser/sync/sync_global_error.h"
6 6
7 #include "chrome/app/chrome_command_ids.h" 7 #include "chrome/app/chrome_command_ids.h"
8 #include "chrome/browser/sync/profile_sync_service.h" 8 #include "chrome/browser/sync/profile_sync_service.h"
9 #include "chrome/browser/sync/profile_sync_service_observer.h" 9 #include "chrome/browser/sync/profile_sync_service_observer.h"
10 #include "chrome/browser/sync/sync_ui_util.h" 10 #include "chrome/browser/sync/sync_ui_util.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 } 56 }
57 57
58 void SyncGlobalError::ExecuteMenuItem(Browser* browser) { 58 void SyncGlobalError::ExecuteMenuItem(Browser* browser) {
59 #if defined(OS_CHROMEOS) 59 #if defined(OS_CHROMEOS)
60 if (service_->GetAuthError().state() != AuthError::NONE) { 60 if (service_->GetAuthError().state() != AuthError::NONE) {
61 DLOG(INFO) << "Signing out the user to fix a sync error."; 61 DLOG(INFO) << "Signing out the user to fix a sync error.";
62 browser->ExecuteCommand(IDC_EXIT); 62 browser->ExecuteCommand(IDC_EXIT);
63 return; 63 return;
64 } 64 }
65 #endif 65 #endif
66 LoginUIServiceFactory::GetForProfile(service_->profile())->ShowLoginUI(false); 66 LoginUIServiceFactory::GetForProfile(service_->profile())->ShowLoginUI();
67 } 67 }
68 68
69 bool SyncGlobalError::HasBubbleView() { 69 bool SyncGlobalError::HasBubbleView() {
70 return !bubble_message_.empty() && !bubble_accept_label_.empty(); 70 return !bubble_message_.empty() && !bubble_accept_label_.empty();
71 } 71 }
72 72
73 string16 SyncGlobalError::GetBubbleViewTitle() { 73 string16 SyncGlobalError::GetBubbleViewTitle() {
74 return l10n_util::GetStringUTF16(IDS_SYNC_ERROR_BUBBLE_VIEW_TITLE); 74 return l10n_util::GetStringUTF16(IDS_SYNC_ERROR_BUBBLE_VIEW_TITLE);
75 } 75 }
76 76
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 if (profile) { 121 if (profile) {
122 GlobalErrorServiceFactory::GetForProfile( 122 GlobalErrorServiceFactory::GetForProfile(
123 profile)->NotifyErrorsChanged(this); 123 profile)->NotifyErrorsChanged(this);
124 } 124 }
125 } 125 }
126 } 126 }
127 127
128 bool SyncGlobalError::HasCustomizedSyncMenuItem() { 128 bool SyncGlobalError::HasCustomizedSyncMenuItem() {
129 return !menu_label_.empty(); 129 return !menu_label_.empty();
130 } 130 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/app_notify_channel_ui.cc ('k') | chrome/browser/sync/sync_global_error_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698