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

Side by Side Diff: chrome/browser/extensions/api/managed_mode_private/managed_mode_private_api.h

Issue 15517005: Remove references to Profile from browser_context_keyed_service. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase & style Created 7 years, 7 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 // Defines the Chrome Extensions Managed Mode API relevant classes to realize 5 // Defines the Chrome Extensions Managed Mode API relevant classes to realize
6 // the API as specified in the extension API JSON. 6 // the API as specified in the extension API JSON.
7 7
8 #ifndef CHROME_BROWSER_EXTENSIONS_API_MANAGED_MODE_PRIVATE_MANAGED_MODE_PRIVATE_ API_H_ 8 #ifndef CHROME_BROWSER_EXTENSIONS_API_MANAGED_MODE_PRIVATE_MANAGED_MODE_PRIVATE_ API_H_
9 #define CHROME_BROWSER_EXTENSIONS_API_MANAGED_MODE_PRIVATE_MANAGED_MODE_PRIVATE_ API_H_ 9 #define CHROME_BROWSER_EXTENSIONS_API_MANAGED_MODE_PRIVATE_MANAGED_MODE_PRIVATE_ API_H_
10 10
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 // ExtensionFunction: 83 // ExtensionFunction:
84 virtual bool RunImpl() OVERRIDE; 84 virtual bool RunImpl() OVERRIDE;
85 }; 85 };
86 86
87 class ManagedModeAPI : public ProfileKeyedAPI, 87 class ManagedModeAPI : public ProfileKeyedAPI,
88 public extensions::EventRouter::Observer { 88 public extensions::EventRouter::Observer {
89 public: 89 public:
90 explicit ManagedModeAPI(Profile* profile); 90 explicit ManagedModeAPI(Profile* profile);
91 virtual ~ManagedModeAPI(); 91 virtual ~ManagedModeAPI();
92 92
93 // ProfileKeyedService implementation. 93 // BrowserContextKeyedService implementation.
94 virtual void Shutdown() OVERRIDE; 94 virtual void Shutdown() OVERRIDE;
95 95
96 // ProfileKeyedAPIFactory implementation. 96 // ProfileKeyedAPIFactory implementation.
97 static ProfileKeyedAPIFactory<ManagedModeAPI>* GetFactoryInstance(); 97 static ProfileKeyedAPIFactory<ManagedModeAPI>* GetFactoryInstance();
98 98
99 // EventRouter::Observer implementation. 99 // EventRouter::Observer implementation.
100 virtual void OnListenerAdded(const extensions::EventListenerInfo& details) 100 virtual void OnListenerAdded(const extensions::EventListenerInfo& details)
101 OVERRIDE; 101 OVERRIDE;
102 102
103 private: 103 private:
104 friend class ProfileKeyedAPIFactory<ManagedModeAPI>; 104 friend class ProfileKeyedAPIFactory<ManagedModeAPI>;
105 105
106 Profile* profile_; 106 Profile* profile_;
107 107
108 // ProfileKeyedAPI implementation. 108 // ProfileKeyedAPI implementation.
109 static const char* service_name() { 109 static const char* service_name() {
110 return "ManagedModeAPI"; 110 return "ManagedModeAPI";
111 } 111 }
112 static const bool kServiceIsNULLWhileTesting = true; 112 static const bool kServiceIsNULLWhileTesting = true;
113 113
114 // Created lazily upon OnListenerAdded. 114 // Created lazily upon OnListenerAdded.
115 scoped_ptr<ManagedModeEventRouter> managed_mode_event_router_; 115 scoped_ptr<ManagedModeEventRouter> managed_mode_event_router_;
116 116
117 DISALLOW_COPY_AND_ASSIGN(ManagedModeAPI); 117 DISALLOW_COPY_AND_ASSIGN(ManagedModeAPI);
118 }; 118 };
119 119
120 } // namespace extensions 120 } // namespace extensions
121 121
122 #endif // CHROME_BROWSER_EXTENSIONS_API_MANAGED_MODE_PRIVATE_MANAGED_MODE_PRIVA TE_API_H_ 122 #endif // CHROME_BROWSER_EXTENSIONS_API_MANAGED_MODE_PRIVATE_MANAGED_MODE_PRIVA TE_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698