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

Side by Side Diff: chrome/browser/extensions/extension_web_ui_override_registrar.h

Issue 178193030: Rename ProfileKeyedAPI to BrowserContextKeyedAPI and GetProfile to Get. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 6 years, 9 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_EXTENSION_WEB_UI_OVERRIDE_REGISTRAR_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_WEB_UI_OVERRIDE_REGISTRAR_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_WEB_UI_OVERRIDE_REGISTRAR_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_WEB_UI_OVERRIDE_REGISTRAR_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "chrome/browser/extensions/api/profile_keyed_api_factory.h"
10 #include "content/public/browser/notification_observer.h" 9 #include "content/public/browser/notification_observer.h"
11 #include "content/public/browser/notification_registrar.h" 10 #include "content/public/browser/notification_registrar.h"
11 #include "extensions/browser/browser_context_keyed_api_factory.h"
12 12
13 class Profile; 13 class Profile;
14 14
15 namespace content { 15 namespace content {
16 class BrowserContext; 16 class BrowserContext;
17 } 17 }
18 18
19 namespace extensions { 19 namespace extensions {
20 20
21 class ExtensionWebUIOverrideRegistrar : public ProfileKeyedAPI, 21 class ExtensionWebUIOverrideRegistrar : public BrowserContextKeyedAPI,
22 public content::NotificationObserver { 22 public content::NotificationObserver {
23 public: 23 public:
24 explicit ExtensionWebUIOverrideRegistrar(content::BrowserContext* context); 24 explicit ExtensionWebUIOverrideRegistrar(content::BrowserContext* context);
25 virtual ~ExtensionWebUIOverrideRegistrar(); 25 virtual ~ExtensionWebUIOverrideRegistrar();
26 26
27 // ProfileKeyedAPI implementation. 27 // BrowserContextKeyedAPI implementation.
28 static ProfileKeyedAPIFactory<ExtensionWebUIOverrideRegistrar>* 28 static BrowserContextKeyedAPIFactory<ExtensionWebUIOverrideRegistrar>*
29 GetFactoryInstance(); 29 GetFactoryInstance();
30 30
31 // content::NotificationObserver implementation. 31 // content::NotificationObserver implementation.
32 virtual void Observe(int type, 32 virtual void Observe(int type,
33 const content::NotificationSource& source, 33 const content::NotificationSource& source,
34 const content::NotificationDetails& details) OVERRIDE; 34 const content::NotificationDetails& details) OVERRIDE;
35 35
36 private: 36 private:
37 friend class ProfileKeyedAPIFactory<ExtensionWebUIOverrideRegistrar>; 37 friend class BrowserContextKeyedAPIFactory<ExtensionWebUIOverrideRegistrar>;
38 38
39 // ProfileKeyedAPI implementation. 39 // BrowserContextKeyedAPI implementation.
40 static const char* service_name() { 40 static const char* service_name() {
41 return "ExtensionWebUIOverrideRegistrar"; 41 return "ExtensionWebUIOverrideRegistrar";
42 } 42 }
43 43
44 Profile* const profile_; 44 Profile* const profile_;
45 content::NotificationRegistrar registrar_; 45 content::NotificationRegistrar registrar_;
46 46
47 DISALLOW_COPY_AND_ASSIGN(ExtensionWebUIOverrideRegistrar); 47 DISALLOW_COPY_AND_ASSIGN(ExtensionWebUIOverrideRegistrar);
48 }; 48 };
49 49
50 } // namespace extensions 50 } // namespace extensions
51 51
52 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WEB_UI_OVERRIDE_REGISTRAR_H_ 52 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WEB_UI_OVERRIDE_REGISTRAR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698