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

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

Issue 10908088: Cleanup: Constify some ProfileKeyedBaseFactory methods and all overrides. Remove ProfileKeyedBaseFa… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase, remove a few more lines of code Created 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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_EXTENSIONS_API_COMMANDS_COMMAND_SERVICE_FACTORY_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_COMMANDS_COMMAND_SERVICE_FACTORY_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_COMMANDS_COMMAND_SERVICE_FACTORY_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_COMMANDS_COMMAND_SERVICE_FACTORY_H_
7 7
8 #include "base/memory/singleton.h" 8 #include "base/memory/singleton.h"
9 #include "chrome/browser/profiles/profile_keyed_service_factory.h" 9 #include "chrome/browser/profiles/profile_keyed_service_factory.h"
10 10
11 namespace extensions { 11 namespace extensions {
12 class CommandService; 12 class CommandService;
13 } 13 }
14 14
15 namespace extensions { 15 namespace extensions {
16 16
17 // Singleton that associate CommandService objects with Profiles. 17 // Singleton that associate CommandService objects with Profiles.
18 class CommandServiceFactory : public ProfileKeyedServiceFactory { 18 class CommandServiceFactory : public ProfileKeyedServiceFactory {
19 public: 19 public:
20 static CommandService* GetForProfile(Profile* profile); 20 static CommandService* GetForProfile(Profile* profile);
21 21
22 static CommandServiceFactory* GetInstance(); 22 static CommandServiceFactory* GetInstance();
23 23
24 // Overridden from ProfileKeyedBaseFactory: 24 // Overridden from ProfileKeyedBaseFactory:
25 virtual bool ServiceIsCreatedWithProfile() OVERRIDE; 25 virtual bool ServiceIsCreatedWithProfile() const OVERRIDE;
26 26
27 private: 27 private:
28 friend struct DefaultSingletonTraits<CommandServiceFactory>; 28 friend struct DefaultSingletonTraits<CommandServiceFactory>;
29 29
30 CommandServiceFactory(); 30 CommandServiceFactory();
31 virtual ~CommandServiceFactory(); 31 virtual ~CommandServiceFactory();
32 32
33 // ProfileKeyedServiceFactory: 33 // ProfileKeyedServiceFactory:
34 virtual ProfileKeyedService* BuildServiceInstanceFor( 34 virtual ProfileKeyedService* BuildServiceInstanceFor(
35 Profile* profile) const OVERRIDE; 35 Profile* profile) const OVERRIDE;
36 virtual bool ServiceRedirectedInIncognito() OVERRIDE; 36 virtual bool ServiceRedirectedInIncognito() const OVERRIDE;
37 37
38 DISALLOW_COPY_AND_ASSIGN(CommandServiceFactory); 38 DISALLOW_COPY_AND_ASSIGN(CommandServiceFactory);
39 }; 39 };
40 40
41 } // namespace extensions 41 } // namespace extensions
42 42
43 #endif // CHROME_BROWSER_EXTENSIONS_API_COMMANDS_COMMAND_SERVICE_FACTORY_H_ 43 #endif // CHROME_BROWSER_EXTENSIONS_API_COMMANDS_COMMAND_SERVICE_FACTORY_H_
OLDNEW
« no previous file with comments | « chrome/browser/download/download_service_factory.cc ('k') | chrome/browser/extensions/api/commands/command_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698