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

Side by Side Diff: chrome/browser/signin/signin_manager_factory.h

Issue 898003002: [Cleanup] Const-correct the profile() method for the EasyUnlockService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 10 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
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 #ifndef CHROME_BROWSER_SIGNIN_SIGNIN_MANAGER_FACTORY_H_ 5 #ifndef CHROME_BROWSER_SIGNIN_SIGNIN_MANAGER_FACTORY_H_
6 #define CHROME_BROWSER_SIGNIN_SIGNIN_MANAGER_FACTORY_H_ 6 #define CHROME_BROWSER_SIGNIN_SIGNIN_MANAGER_FACTORY_H_
7 7
8 #include "base/memory/singleton.h" 8 #include "base/memory/singleton.h"
9 #include "base/observer_list.h" 9 #include "base/observer_list.h"
10 #include "components/keyed_service/content/browser_context_keyed_service_factory .h" 10 #include "components/keyed_service/content/browser_context_keyed_service_factory .h"
(...skipping 24 matching lines...) Expand all
35 #if defined(OS_CHROMEOS) 35 #if defined(OS_CHROMEOS)
36 // Returns the instance of SigninManager associated with this profile 36 // Returns the instance of SigninManager associated with this profile
37 // (creating one if none exists). Returns NULL if this profile cannot have a 37 // (creating one if none exists). Returns NULL if this profile cannot have a
38 // SigninManager (for example, if |profile| is incognito). 38 // SigninManager (for example, if |profile| is incognito).
39 static SigninManagerBase* GetForProfile(Profile* profile); 39 static SigninManagerBase* GetForProfile(Profile* profile);
40 40
41 // Returns the instance of SigninManager associated with this profile. Returns 41 // Returns the instance of SigninManager associated with this profile. Returns
42 // null if no SigninManager instance currently exists (will not create a new 42 // null if no SigninManager instance currently exists (will not create a new
43 // instance). 43 // instance).
44 static SigninManagerBase* GetForProfileIfExists(Profile* profile); 44 static SigninManagerBase* GetForProfileIfExists(Profile* profile);
45 static const SigninManagerBase* GetForProfileIfExists(const Profile* profile);
45 #else 46 #else
46 // On non-ChromeOS platforms, the SigninManager the factory creates will be 47 // On non-ChromeOS platforms, the SigninManager the factory creates will be
47 // an instance of the extended SigninManager class. 48 // an instance of the extended SigninManager class.
48 static SigninManager* GetForProfile(Profile* profile); 49 static SigninManager* GetForProfile(Profile* profile);
49 static SigninManager* GetForProfileIfExists(Profile* profile); 50 static SigninManager* GetForProfileIfExists(Profile* profile);
51 static const SigninManager* GetForProfileIfExists(const Profile* profile);
50 #endif 52 #endif
51 53
52 // Returns an instance of the SigninManagerFactory singleton. 54 // Returns an instance of the SigninManagerFactory singleton.
53 static SigninManagerFactory* GetInstance(); 55 static SigninManagerFactory* GetInstance();
54 56
55 // Implementation of BrowserContextKeyedServiceFactory (public so tests 57 // Implementation of BrowserContextKeyedServiceFactory (public so tests
56 // can call it). 58 // can call it).
57 void RegisterProfilePrefs( 59 void RegisterProfilePrefs(
58 user_prefs::PrefRegistrySyncable* registry) override; 60 user_prefs::PrefRegistrySyncable* registry) override;
59 61
(...skipping 19 matching lines...) Expand all
79 // List of observers. Checks that list is empty on destruction. 81 // List of observers. Checks that list is empty on destruction.
80 mutable ObserverList<Observer, true> observer_list_; 82 mutable ObserverList<Observer, true> observer_list_;
81 83
82 // BrowserContextKeyedServiceFactory: 84 // BrowserContextKeyedServiceFactory:
83 KeyedService* BuildServiceInstanceFor( 85 KeyedService* BuildServiceInstanceFor(
84 content::BrowserContext* profile) const override; 86 content::BrowserContext* profile) const override;
85 void BrowserContextShutdown(content::BrowserContext* context) override; 87 void BrowserContextShutdown(content::BrowserContext* context) override;
86 }; 88 };
87 89
88 #endif // CHROME_BROWSER_SIGNIN_SIGNIN_MANAGER_FACTORY_H_ 90 #endif // CHROME_BROWSER_SIGNIN_SIGNIN_MANAGER_FACTORY_H_
OLDNEW
« no previous file with comments | « chrome/browser/signin/screenlock_bridge.cc ('k') | chrome/browser/signin/signin_manager_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698