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

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

Issue 375413002: Replace chromeos::UserManager::Get() with chromeos::GetUserManager(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test Created 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_error_notifier_ash.h" 5 #include "chrome/browser/sync/sync_error_notifier_ash.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell_delegate.h" 8 #include "ash/shell_delegate.h"
9 #include "ash/system/system_notifier.h" 9 #include "ash/system/system_notifier.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 return; 143 return;
144 144
145 if (!error_controller_->HasError()) { 145 if (!error_controller_->HasError()) {
146 g_browser_process->notification_ui_manager()->CancelById(notification_id_); 146 g_browser_process->notification_ui_manager()->CancelById(notification_id_);
147 return; 147 return;
148 } 148 }
149 149
150 #if defined(OS_CHROMEOS) 150 #if defined(OS_CHROMEOS)
151 if (chromeos::UserManager::IsInitialized()) { 151 if (chromeos::UserManager::IsInitialized()) {
152 chromeos::UserFlow* user_flow = 152 chromeos::UserFlow* user_flow =
153 chromeos::UserManager::Get()->GetCurrentUserFlow(); 153 chromeos::GetUserManager()->GetCurrentUserFlow();
154 154
155 // Check whether Chrome OS user flow allows launching browser. 155 // Check whether Chrome OS user flow allows launching browser.
156 // Example: Supervised user creation flow which handles token invalidation 156 // Example: Supervised user creation flow which handles token invalidation
157 // itself and notifications should be suppressed. http://crbug.com/359045 157 // itself and notifications should be suppressed. http://crbug.com/359045
158 if (!user_flow->ShouldLaunchBrowser()) 158 if (!user_flow->ShouldLaunchBrowser())
159 return; 159 return;
160 } 160 }
161 #endif 161 #endif
162 162
163 // Keep the existing notification if there is one. 163 // Keep the existing notification if there is one.
(...skipping 25 matching lines...) Expand all
189 ui::ResourceBundle::GetSharedInstance().GetImageNamed( 189 ui::ResourceBundle::GetSharedInstance().GetImageNamed(
190 IDR_NOTIFICATION_ALERT), 190 IDR_NOTIFICATION_ALERT),
191 blink::WebTextDirectionDefault, 191 blink::WebTextDirectionDefault,
192 notifier_id, 192 notifier_id,
193 base::string16(), // display_source 193 base::string16(), // display_source
194 base::ASCIIToUTF16(notification_id_), 194 base::ASCIIToUTF16(notification_id_),
195 data, 195 data,
196 delegate); 196 delegate);
197 notification_ui_manager->Add(notification, profile_); 197 notification_ui_manager->Add(notification, profile_);
198 } 198 }
OLDNEW
« no previous file with comments | « chrome/browser/supervised_user/supervised_user_service.cc ('k') | chrome/browser/sync/sync_ui_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698