Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_USER_NETWORK_CONFIGURATION_UPDATER_FACTOR Y_H_ | |
| 6 #define CHROME_BROWSER_CHROMEOS_POLICY_USER_NETWORK_CONFIGURATION_UPDATER_FACTOR Y_H_ | |
| 7 | |
| 8 #include "base/basictypes.h" | |
| 9 #include "base/compiler_specific.h" | |
| 10 #include "components/browser_context_keyed_service/browser_context_keyed_service _factory.h" | |
| 11 | |
| 12 template <typename T> | |
| 13 struct DefaultSingletonTraits; | |
| 14 | |
| 15 class Profile; | |
| 16 | |
| 17 namespace policy { | |
| 18 | |
| 19 class UserNetworkConfigurationUpdater; | |
| 20 | |
| 21 // Factory to create UserNetworkConfigurationUpdater. | |
| 22 class UserNetworkConfigurationUpdaterFactory | |
| 23 : public BrowserContextKeyedServiceFactory { | |
| 24 public: | |
| 25 // Returns an existing or creates a new UserNetworkConfigurationUpdater for | |
| 26 // |profile|. Will return NULL if this service isn't allowed for |profile|, | |
| 27 // i.e. for all but the primary user's profile. | |
| 28 static UserNetworkConfigurationUpdater* GetForProfile(Profile* profile); | |
| 29 | |
| 30 static UserNetworkConfigurationUpdaterFactory* GetInstance(); | |
| 31 | |
| 32 private: | |
| 33 friend struct DefaultSingletonTraits<UserNetworkConfigurationUpdaterFactory>; | |
| 34 | |
| 35 UserNetworkConfigurationUpdaterFactory(); | |
| 36 virtual ~UserNetworkConfigurationUpdaterFactory(); | |
| 37 | |
| 38 // BrowserContextKeyedServiceFactory: | |
| 39 virtual content::BrowserContext* GetBrowserContextToUse( | |
| 40 content::BrowserContext* context) const OVERRIDE; | |
| 41 virtual bool ServiceIsCreatedWithBrowserContext() const OVERRIDE; | |
| 42 virtual bool ServiceIsNULLWhileTesting() const OVERRIDE; | |
| 43 virtual BrowserContextKeyedService* BuildServiceInstanceFor( | |
| 44 content::BrowserContext* context) const OVERRIDE; | |
| 45 DISALLOW_COPY_AND_ASSIGN(UserNetworkConfigurationUpdaterFactory); | |
|
Joao da Silva
2013/11/04 10:19:57
A newline before this line makes this more readabl
pneubeck (no reviews)
2013/11/04 14:15:30
Done.
| |
| 46 }; | |
| 47 | |
| 48 } // namespace policy | |
| 49 | |
| 50 #endif // CHROME_BROWSER_CHROMEOS_POLICY_USER_NETWORK_CONFIGURATION_UPDATER_FAC TORY_H_ | |
| OLD | NEW |