Revert of Add button to add new FSP services to Files app. (patchset #8 id:140001...
[chromium-blink-merge.git] / chrome / browser / chromeos / policy / user_network_configuration_updater_factory.h
blob13866a842f8f1c132a6c14e7bb433a6a5ea4f31e
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.
5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_USER_NETWORK_CONFIGURATION_UPDATER_FACTORY_H_
6 #define CHROME_BROWSER_CHROMEOS_POLICY_USER_NETWORK_CONFIGURATION_UPDATER_FACTORY_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
12 template <typename T>
13 struct DefaultSingletonTraits;
15 class Profile;
17 namespace policy {
19 class UserNetworkConfigurationUpdater;
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);
30 static UserNetworkConfigurationUpdaterFactory* GetInstance();
32 private:
33 friend struct DefaultSingletonTraits<UserNetworkConfigurationUpdaterFactory>;
35 UserNetworkConfigurationUpdaterFactory();
36 ~UserNetworkConfigurationUpdaterFactory() override;
38 // BrowserContextKeyedServiceFactory:
39 content::BrowserContext* GetBrowserContextToUse(
40 content::BrowserContext* context) const override;
41 bool ServiceIsCreatedWithBrowserContext() const override;
42 bool ServiceIsNULLWhileTesting() const override;
43 KeyedService* BuildServiceInstanceFor(
44 content::BrowserContext* context) const override;
46 DISALLOW_COPY_AND_ASSIGN(UserNetworkConfigurationUpdaterFactory);
49 } // namespace policy
51 #endif // CHROME_BROWSER_CHROMEOS_POLICY_USER_NETWORK_CONFIGURATION_UPDATER_FACTORY_H_