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

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

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 IOS_CHROME_BROWSER_SIGNIN_SIGNIN_MANAGER_FACTORY_H_ 5 #ifndef IOS_CHROME_BROWSER_SIGNIN_SIGNIN_MANAGER_FACTORY_H_
6 #define IOS_CHROME_BROWSER_SIGNIN_SIGNIN_MANAGER_FACTORY_H_ 6 #define IOS_CHROME_BROWSER_SIGNIN_SIGNIN_MANAGER_FACTORY_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/observer_list.h" 10 #include "base/observer_list.h"
11 #include "components/keyed_service/ios/browser_state_keyed_service_factory.h" 11 #include "components/keyed_service/ios/browser_state_keyed_service_factory.h"
12 12
13 namespace base {
13 template <typename T> 14 template <typename T>
14 struct DefaultSingletonTraits; 15 struct DefaultSingletonTraits;
16 } // namespace base
15 17
16 class SigninManagerFactoryObserver; 18 class SigninManagerFactoryObserver;
17 class SigninManager; 19 class SigninManager;
18 class PrefRegistrySimple; 20 class PrefRegistrySimple;
19 21
20 namespace ios { 22 namespace ios {
21 23
22 class ChromeBrowserState; 24 class ChromeBrowserState;
23 25
24 // Singleton that owns all SigninManagers and associates them with browser 26 // Singleton that owns all SigninManagers and associates them with browser
(...skipping 19 matching lines...) Expand all
44 // Methods to register or remove observers of SigninManager creation/shutdown. 46 // Methods to register or remove observers of SigninManager creation/shutdown.
45 void AddObserver(SigninManagerFactoryObserver* observer); 47 void AddObserver(SigninManagerFactoryObserver* observer);
46 void RemoveObserver(SigninManagerFactoryObserver* observer); 48 void RemoveObserver(SigninManagerFactoryObserver* observer);
47 49
48 // Notifies observers of |manager|'s creation. Should be called only by test 50 // Notifies observers of |manager|'s creation. Should be called only by test
49 // SigninManager subclasses whose construction does not occur in 51 // SigninManager subclasses whose construction does not occur in
50 // |BuildServiceInstanceFor()|. 52 // |BuildServiceInstanceFor()|.
51 void NotifyObserversOfSigninManagerCreationForTesting(SigninManager* manager); 53 void NotifyObserversOfSigninManagerCreationForTesting(SigninManager* manager);
52 54
53 private: 55 private:
54 friend struct DefaultSingletonTraits<SigninManagerFactory>; 56 friend struct base::DefaultSingletonTraits<SigninManagerFactory>;
55 57
56 SigninManagerFactory(); 58 SigninManagerFactory();
57 ~SigninManagerFactory() override; 59 ~SigninManagerFactory() override;
58 60
59 // List of observers. Checks that list is empty on destruction. 61 // List of observers. Checks that list is empty on destruction.
60 mutable base::ObserverList<SigninManagerFactoryObserver, true> observer_list_; 62 mutable base::ObserverList<SigninManagerFactoryObserver, true> observer_list_;
61 63
62 // BrowserStateKeyedServiceFactory: 64 // BrowserStateKeyedServiceFactory:
63 scoped_ptr<KeyedService> BuildServiceInstanceFor( 65 scoped_ptr<KeyedService> BuildServiceInstanceFor(
64 web::BrowserState* context) const override; 66 web::BrowserState* context) const override;
65 void BrowserStateShutdown(web::BrowserState* context) override; 67 void BrowserStateShutdown(web::BrowserState* context) override;
66 }; 68 };
67 } 69 }
68 70
69 #endif // IOS_CHROME_BROWSER_SIGNIN_SIGNIN_MANAGER_FACTORY_H_ 71 #endif // IOS_CHROME_BROWSER_SIGNIN_SIGNIN_MANAGER_FACTORY_H_
OLDNEW
« no previous file with comments | « ios/chrome/browser/signin/signin_error_controller_factory.cc ('k') | ios/chrome/browser/signin/signin_manager_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698