Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(175)

Side by Side Diff: chrome/browser/apps/shortcut_manager_factory.h

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_APPS_SHORTCUT_MANAGER_FACTORY_H_ 5 #ifndef CHROME_BROWSER_APPS_SHORTCUT_MANAGER_FACTORY_H_
6 #define CHROME_BROWSER_APPS_SHORTCUT_MANAGER_FACTORY_H_ 6 #define CHROME_BROWSER_APPS_SHORTCUT_MANAGER_FACTORY_H_
7 7
8 #include "components/keyed_service/content/browser_context_keyed_service_factory .h" 8 #include "components/keyed_service/content/browser_context_keyed_service_factory .h"
9 9
10 namespace base {
10 template<typename Type> struct DefaultSingletonTraits; 11 template<typename Type> struct DefaultSingletonTraits;
12 }
11 13
12 class Profile; 14 class Profile;
13 15
14 class AppShortcutManager; 16 class AppShortcutManager;
15 17
16 // Singleton that owns all AppShortcutManagers and associates them with 18 // Singleton that owns all AppShortcutManagers and associates them with
17 // Profiles. Listens for the Profile's destruction notification and cleans up 19 // Profiles. Listens for the Profile's destruction notification and cleans up
18 // the associated AppShortcutManager. 20 // the associated AppShortcutManager.
19 // AppShortcutManagers should not exist in incognito profiles. 21 // AppShortcutManagers should not exist in incognito profiles.
20 class AppShortcutManagerFactory : public BrowserContextKeyedServiceFactory { 22 class AppShortcutManagerFactory : public BrowserContextKeyedServiceFactory {
21 public: 23 public:
22 static AppShortcutManager* GetForProfile(Profile* profile); 24 static AppShortcutManager* GetForProfile(Profile* profile);
23 25
24 static AppShortcutManagerFactory* GetInstance(); 26 static AppShortcutManagerFactory* GetInstance();
25 27
26 private: 28 private:
27 friend struct DefaultSingletonTraits<AppShortcutManagerFactory>; 29 friend struct base::DefaultSingletonTraits<AppShortcutManagerFactory>;
28 30
29 AppShortcutManagerFactory(); 31 AppShortcutManagerFactory();
30 ~AppShortcutManagerFactory() override; 32 ~AppShortcutManagerFactory() override;
31 33
32 // BrowserContextKeyedServiceFactory: 34 // BrowserContextKeyedServiceFactory:
33 KeyedService* BuildServiceInstanceFor( 35 KeyedService* BuildServiceInstanceFor(
34 content::BrowserContext* profile) const override; 36 content::BrowserContext* profile) const override;
35 bool ServiceIsCreatedWithBrowserContext() const override; 37 bool ServiceIsCreatedWithBrowserContext() const override;
36 bool ServiceIsNULLWhileTesting() const override; 38 bool ServiceIsNULLWhileTesting() const override;
37 }; 39 };
38 40
39 #endif // CHROME_BROWSER_APPS_SHORTCUT_MANAGER_FACTORY_H_ 41 #endif // CHROME_BROWSER_APPS_SHORTCUT_MANAGER_FACTORY_H_
OLDNEW
« no previous file with comments | « chrome/browser/apps/per_app_settings_service_factory.cc ('k') | chrome/browser/apps/shortcut_manager_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698