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

Side by Side Diff: chrome/browser/extensions/api/commands/command_service_factory.h

Issue 11820041: Remove profile-keyed factory boilerplates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 7 years, 11 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
(Empty)
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.
4
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_COMMANDS_COMMAND_SERVICE_FACTORY_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_COMMANDS_COMMAND_SERVICE_FACTORY_H_
7
8 #include "base/memory/singleton.h"
9 #include "chrome/browser/profiles/profile_keyed_service_factory.h"
10
11 namespace extensions {
12 class CommandService;
13 }
14
15 namespace extensions {
16
17 // Singleton that associate CommandService objects with Profiles.
18 class CommandServiceFactory : public ProfileKeyedServiceFactory {
19 public:
20 static CommandService* GetForProfile(Profile* profile);
21
22 static CommandServiceFactory* GetInstance();
23
24 // Overridden from ProfileKeyedBaseFactory:
25 virtual bool ServiceIsCreatedWithProfile() const OVERRIDE;
26
27 private:
28 friend struct DefaultSingletonTraits<CommandServiceFactory>;
29
30 CommandServiceFactory();
31 virtual ~CommandServiceFactory();
32
33 // ProfileKeyedServiceFactory:
34 virtual ProfileKeyedService* BuildServiceInstanceFor(
35 Profile* profile) const OVERRIDE;
36 virtual bool ServiceRedirectedInIncognito() const OVERRIDE;
37
38 DISALLOW_COPY_AND_ASSIGN(CommandServiceFactory);
39 };
40
41 } // namespace extensions
42
43 #endif // CHROME_BROWSER_EXTENSIONS_API_COMMANDS_COMMAND_SERVICE_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698