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

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: Fix more errors Created 5 years, 4 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 template <typename T> 13 template <typename T>
14 struct DefaultSingletonTraits; 14 struct base::DefaultSingletonTraits;
15 15
16 class SigninManagerFactoryObserver; 16 class SigninManagerFactoryObserver;
17 class SigninManager; 17 class SigninManager;
18 class PrefRegistrySimple; 18 class PrefRegistrySimple;
19 19
20 namespace ios { 20 namespace ios {
21 21
22 class ChromeBrowserState; 22 class ChromeBrowserState;
23 23
24 // Singleton that owns all SigninManagers and associates them with browser 24 // 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. 44 // Methods to register or remove observers of SigninManager creation/shutdown.
45 void AddObserver(SigninManagerFactoryObserver* observer); 45 void AddObserver(SigninManagerFactoryObserver* observer);
46 void RemoveObserver(SigninManagerFactoryObserver* observer); 46 void RemoveObserver(SigninManagerFactoryObserver* observer);
47 47
48 // Notifies observers of |manager|'s creation. Should be called only by test 48 // Notifies observers of |manager|'s creation. Should be called only by test
49 // SigninManager subclasses whose construction does not occur in 49 // SigninManager subclasses whose construction does not occur in
50 // |BuildServiceInstanceFor()|. 50 // |BuildServiceInstanceFor()|.
51 void NotifyObserversOfSigninManagerCreationForTesting(SigninManager* manager); 51 void NotifyObserversOfSigninManagerCreationForTesting(SigninManager* manager);
52 52
53 private: 53 private:
54 friend struct DefaultSingletonTraits<SigninManagerFactory>; 54 friend struct base::DefaultSingletonTraits<SigninManagerFactory>;
55 55
56 SigninManagerFactory(); 56 SigninManagerFactory();
57 ~SigninManagerFactory() override; 57 ~SigninManagerFactory() override;
58 58
59 // List of observers. Checks that list is empty on destruction. 59 // List of observers. Checks that list is empty on destruction.
60 mutable base::ObserverList<SigninManagerFactoryObserver, true> observer_list_; 60 mutable base::ObserverList<SigninManagerFactoryObserver, true> observer_list_;
61 61
62 // BrowserStateKeyedServiceFactory: 62 // BrowserStateKeyedServiceFactory:
63 scoped_ptr<KeyedService> BuildServiceInstanceFor( 63 scoped_ptr<KeyedService> BuildServiceInstanceFor(
64 web::BrowserState* context) const override; 64 web::BrowserState* context) const override;
65 void BrowserStateShutdown(web::BrowserState* context) override; 65 void BrowserStateShutdown(web::BrowserState* context) override;
66 }; 66 };
67 } 67 }
68 68
69 #endif // IOS_CHROME_BROWSER_SIGNIN_SIGNIN_MANAGER_FACTORY_H_ 69 #endif // IOS_CHROME_BROWSER_SIGNIN_SIGNIN_MANAGER_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698