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

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

Issue 10692021: Remove browser::FindLastActiveWithProfile call in login_ui_service.cc by plumbing the Browser* thro… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 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(); 66 LoginUIServiceFactory::GetForProfile(service_->profile())->ShowLoginUI(
67 browser);
67 } 68 }
68 69
69 bool SyncGlobalError::HasBubbleView() { 70 bool SyncGlobalError::HasBubbleView() {
70 return !bubble_message_.empty() && !bubble_accept_label_.empty(); 71 return !bubble_message_.empty() && !bubble_accept_label_.empty();
71 } 72 }
72 73
73 string16 SyncGlobalError::GetBubbleViewTitle() { 74 string16 SyncGlobalError::GetBubbleViewTitle() {
74 return l10n_util::GetStringUTF16(IDS_SYNC_ERROR_BUBBLE_VIEW_TITLE); 75 return l10n_util::GetStringUTF16(IDS_SYNC_ERROR_BUBBLE_VIEW_TITLE);
75 } 76 }
76 77
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 if (profile) { 122 if (profile) {
122 GlobalErrorServiceFactory::GetForProfile( 123 GlobalErrorServiceFactory::GetForProfile(
123 profile)->NotifyErrorsChanged(this); 124 profile)->NotifyErrorsChanged(this);
124 } 125 }
125 } 126 }
126 } 127 }
127 128
128 bool SyncGlobalError::HasCustomizedSyncMenuItem() { 129 bool SyncGlobalError::HasCustomizedSyncMenuItem() {
129 return !menu_label_.empty(); 130 return !menu_label_.empty();
130 } 131 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/sync/sync_global_error_unittest.cc » ('j') | chrome/browser/ui/webui/signin/login_ui_service.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698