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.
5 #ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_SERVICE_FACTORY_H_
6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_SERVICE_FACTORY_H_
12 #include "base/memory/singleton.h"
13 #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
14 #include "content/public/browser/browser_context.h"
17 namespace file_system_provider
{
21 // Creates services per profile.
22 class ServiceFactory
: public BrowserContextKeyedServiceFactory
{
24 static Service
* Get(content::BrowserContext
* context
);
25 static ServiceFactory
* GetInstance();
28 friend struct DefaultSingletonTraits
<ServiceFactory
>;
31 virtual ~ServiceFactory();
33 // BrowserContextKeyedServiceFactory overrides:
34 virtual KeyedService
* BuildServiceInstanceFor(
35 content::BrowserContext
* profile
) const OVERRIDE
;
36 virtual bool ServiceIsCreatedWithBrowserContext() const OVERRIDE
;
38 DISALLOW_COPY_AND_ASSIGN(ServiceFactory
);
41 } // namespace file_system_provider
42 } // namespace chromeos
44 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_SERVICE_FACTORY_H_