Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / chrome / browser / chromeos / extensions / file_manager / event_router_factory.h
blobe30de225e91ab008944614380ece350d6935cdea
1 // Copyright (c) 2012 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_EXTENSIONS_FILE_MANAGER_EVENT_ROUTER_FACTORY_H_
6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_EVENT_ROUTER_FACTORY_H_
8 #include "base/memory/singleton.h"
9 #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
11 class Profile;
13 namespace file_manager {
15 class EventRouter;
17 class EventRouterFactory : public BrowserContextKeyedServiceFactory {
18 public:
19 // Returns the EventRouter for |profile|, creating it if
20 // it is not yet created.
21 static EventRouter* GetForProfile(Profile* profile);
23 // Returns the EventRouterFactory instance.
24 static EventRouterFactory* GetInstance();
26 protected:
27 // BrowserContextKeyedBaseFactory overrides:
28 content::BrowserContext* GetBrowserContextToUse(
29 content::BrowserContext* context) const override;
30 bool ServiceIsCreatedWithBrowserContext() const override;
31 bool ServiceIsNULLWhileTesting() const override;
33 private:
34 friend struct DefaultSingletonTraits<EventRouterFactory>;
36 EventRouterFactory();
37 ~EventRouterFactory() override;
39 // BrowserContextKeyedServiceFactory:
40 KeyedService* BuildServiceInstanceFor(
41 content::BrowserContext* context) const override;
44 } // namespace file_manager
46 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_EVENT_ROUTER_FACTORY_H_