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

Side by Side Diff: chrome/browser/chromeos/accessibility/magnification_manager.cc

Issue 53383002: ChromeOS: Remove ProfileHelper::IsSigninProfile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix TestingProfile. Created 7 years, 1 month 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/chromeos/accessibility/magnification_manager.h" 5 #include "chrome/browser/chromeos/accessibility/magnification_manager.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "ash/magnifier/magnification_controller.h" 9 #include "ash/magnifier/magnification_controller.h"
10 #include "ash/magnifier/partial_magnification_controller.h" 10 #include "ash/magnifier/partial_magnification_controller.h"
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 } 195 }
196 196
197 // content::NotificationObserver implementation: 197 // content::NotificationObserver implementation:
198 virtual void Observe(int type, 198 virtual void Observe(int type,
199 const content::NotificationSource& source, 199 const content::NotificationSource& source,
200 const content::NotificationDetails& details) OVERRIDE { 200 const content::NotificationDetails& details) OVERRIDE {
201 switch (type) { 201 switch (type) {
202 case chrome::NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE: { 202 case chrome::NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE: {
203 // Update |profile_| when entering the login screen. 203 // Update |profile_| when entering the login screen.
204 Profile* profile = ProfileManager::GetDefaultProfile(); 204 Profile* profile = ProfileManager::GetDefaultProfile();
205 if (ProfileHelper::IsSigninProfile(profile)) 205 if (profile->IsLoginProfile())
206 SetProfile(profile); 206 SetProfile(profile);
207 break; 207 break;
208 } 208 }
209 case chrome::NOTIFICATION_SESSION_STARTED: 209 case chrome::NOTIFICATION_SESSION_STARTED:
210 // Update |profile_| when entering a session. 210 // Update |profile_| when entering a session.
211 SetProfile(ProfileManager::GetDefaultProfile()); 211 SetProfile(ProfileManager::GetDefaultProfile());
212 break; 212 break;
213 case chrome::NOTIFICATION_PROFILE_DESTROYED: { 213 case chrome::NOTIFICATION_PROFILE_DESTROYED: {
214 // Update |profile_| when exiting a session or shutting down. 214 // Update |profile_| when exiting a session or shutting down.
215 Profile* profile = content::Source<Profile>(source).ptr(); 215 Profile* profile = content::Source<Profile>(source).ptr();
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 delete g_magnification_manager; 247 delete g_magnification_manager;
248 g_magnification_manager = NULL; 248 g_magnification_manager = NULL;
249 } 249 }
250 250
251 // static 251 // static
252 MagnificationManager* MagnificationManager::Get() { 252 MagnificationManager* MagnificationManager::Get() {
253 return g_magnification_manager; 253 return g_magnification_manager;
254 } 254 }
255 255
256 } // namespace chromeos 256 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/accessibility/accessibility_manager.cc ('k') | chrome/browser/chromeos/login/user_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698