Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 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_POLICY_CLOUD_POLICY_HEADER_SERVICE_FACTORY_H_ | |
| 6 #define CHROME_BROWSER_POLICY_CLOUD_POLICY_HEADER_SERVICE_FACTORY_H_ | |
| 7 | |
| 8 #include "base/memory/singleton.h" | |
| 9 #include "components/browser_context_keyed_service/browser_context_keyed_service _factory.h" | |
| 10 | |
| 11 class Profile; | |
|
Joao da Silva
2013/12/09 14:46:21
not used
Andrew T Wilson (Slow)
2013/12/10 07:15:56
Done.
| |
| 12 | |
| 13 namespace policy { | |
| 14 | |
| 15 class PolicyHeaderService; | |
| 16 | |
| 17 // Factory for PolicyHeaderService objects. PolicyHeaderService is not actually | |
| 18 // a BrowserContextKeyedService, so this class wraps PolicyHeaderService in | |
| 19 // a BrowserContextKeyedService internally. | |
| 20 class PolicyHeaderServiceFactory : public BrowserContextKeyedServiceFactory { | |
| 21 public: | |
| 22 // Returns the instance of PolicyHeaderService for the passed |context|. | |
| 23 static PolicyHeaderService* GetForBrowserContext( | |
| 24 content::BrowserContext* context); | |
| 25 | |
| 26 // Returns an instance of the PolicyHeaderServiceFactory singleton. | |
| 27 static PolicyHeaderServiceFactory* GetInstance(); | |
| 28 | |
| 29 protected: | |
| 30 // BrowserContextKeyedServiceFactory implementation. | |
| 31 virtual BrowserContextKeyedService* BuildServiceInstanceFor( | |
| 32 content::BrowserContext* profile) const OVERRIDE; | |
| 33 | |
| 34 private: | |
| 35 friend struct DefaultSingletonTraits<PolicyHeaderServiceFactory>; | |
| 36 | |
| 37 PolicyHeaderServiceFactory(); | |
| 38 virtual ~PolicyHeaderServiceFactory(); | |
| 39 | |
| 40 DISALLOW_COPY_AND_ASSIGN(PolicyHeaderServiceFactory); | |
| 41 }; | |
| 42 | |
| 43 } // namespace policy | |
| 44 | |
| 45 #endif // CHROME_BROWSER_POLICY_CLOUD_POLICY_HEADER_SERVICE_FACTORY_H_ | |
| OLD | NEW |