1 // Copyright 2014 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 #ifndef CHROME_BROWSER_EXTENSIONS_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_FACTORY_CHROMEOS_H_ 5 #define CHROME_BROWSER_EXTENSIONS_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_FACTORY_CHROMEOS_H_ 6 7 #include "base/memory/singleton.h" 8 #include "components/keyed_service/content/browser_context_keyed_service_factory.h" 9 10 namespace context { 11 class BrowserContext; 12 } 13 14 namespace extensions { 15 16 class NetworkingPrivateChromeOS; 17 18 class NetworkingPrivateChromeOSFactory 19 : public BrowserContextKeyedServiceFactory { 20 public: 21 static NetworkingPrivateChromeOS* GetForBrowserContext( 22 content::BrowserContext* browser_context); 23 static NetworkingPrivateChromeOSFactory* GetInstance(); 24 25 private: 26 friend struct DefaultSingletonTraits<NetworkingPrivateChromeOSFactory>; 27 28 NetworkingPrivateChromeOSFactory(); 29 virtual ~NetworkingPrivateChromeOSFactory(); 30 31 // BrowserContextKeyedServiceFactory: 32 virtual KeyedService* BuildServiceInstanceFor( 33 content::BrowserContext* browser_context) const OVERRIDE; 34 virtual content::BrowserContext* GetBrowserContextToUse( 35 content::BrowserContext* context) const OVERRIDE; 36 virtual bool ServiceIsCreatedWithBrowserContext() const OVERRIDE; 37 virtual bool ServiceIsNULLWhileTesting() const OVERRIDE; 38 39 DISALLOW_COPY_AND_ASSIGN(NetworkingPrivateChromeOSFactory); 40 }; 41 42 } // namespace extensions 43 44 #endif // CHROME_BROWSER_EXTENSIONS_API_NETWORKING_PRIVATE_NETWORKING_PRIVATE_FACTORY_CHROMEOS_H_ 45