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

Side by Side Diff: chrome/browser/extensions/api/developer_private/developer_private_api.cc

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 #include "chrome/browser/extensions/api/developer_private/developer_private_api. h" 5 #include "chrome/browser/extensions/api/developer_private/developer_private_api. h"
6 6
7 #include "apps/app_load_service.h" 7 #include "apps/app_load_service.h"
8 #include "apps/app_restore_service.h" 8 #include "apps/app_restore_service.h"
9 #include "apps/app_window.h" 9 #include "apps/app_window.h"
10 #include "apps/app_window_registry.h" 10 #include "apps/app_window_registry.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 143
144 namespace AllowFileAccess = api::developer_private::AllowFileAccess; 144 namespace AllowFileAccess = api::developer_private::AllowFileAccess;
145 namespace AllowIncognito = api::developer_private::AllowIncognito; 145 namespace AllowIncognito = api::developer_private::AllowIncognito;
146 namespace ChoosePath = api::developer_private::ChoosePath; 146 namespace ChoosePath = api::developer_private::ChoosePath;
147 namespace Enable = api::developer_private::Enable; 147 namespace Enable = api::developer_private::Enable;
148 namespace GetItemsInfo = api::developer_private::GetItemsInfo; 148 namespace GetItemsInfo = api::developer_private::GetItemsInfo;
149 namespace Inspect = api::developer_private::Inspect; 149 namespace Inspect = api::developer_private::Inspect;
150 namespace PackDirectory = api::developer_private::PackDirectory; 150 namespace PackDirectory = api::developer_private::PackDirectory;
151 namespace Reload = api::developer_private::Reload; 151 namespace Reload = api::developer_private::Reload;
152 152
153 static base::LazyInstance<ProfileKeyedAPIFactory<DeveloperPrivateAPI> > 153 static base::LazyInstance<BrowserContextKeyedAPIFactory<DeveloperPrivateAPI> >
154 g_factory = LAZY_INSTANCE_INITIALIZER; 154 g_factory = LAZY_INSTANCE_INITIALIZER;
155 155
156 // static 156 // static
157 ProfileKeyedAPIFactory<DeveloperPrivateAPI>* 157 BrowserContextKeyedAPIFactory<DeveloperPrivateAPI>*
158 DeveloperPrivateAPI::GetFactoryInstance() { 158 DeveloperPrivateAPI::GetFactoryInstance() {
159 return g_factory.Pointer(); 159 return g_factory.Pointer();
160 } 160 }
161 161
162 // static 162 // static
163 DeveloperPrivateAPI* DeveloperPrivateAPI::Get( 163 DeveloperPrivateAPI* DeveloperPrivateAPI::Get(
164 content::BrowserContext* context) { 164 content::BrowserContext* context) {
165 return GetFactoryInstance()->GetForProfile(context); 165 return GetFactoryInstance()->Get(context);
166 } 166 }
167 167
168 DeveloperPrivateAPI::DeveloperPrivateAPI(content::BrowserContext* context) 168 DeveloperPrivateAPI::DeveloperPrivateAPI(content::BrowserContext* context)
169 : profile_(Profile::FromBrowserContext(context)) { 169 : profile_(Profile::FromBrowserContext(context)) {
170 RegisterNotifications(); 170 RegisterNotifications();
171 } 171 }
172 172
173 DeveloperPrivateEventRouter::DeveloperPrivateEventRouter(Profile* profile) 173 DeveloperPrivateEventRouter::DeveloperPrivateEventRouter(Profile* profile)
174 : profile_(profile) { 174 : profile_(profile) {
175 int types[] = { 175 int types[] = {
(...skipping 1179 matching lines...) Expand 10 before | Expand all | Expand 10 after
1355 } 1355 }
1356 1356
1357 error_ui_util::HandleOpenDevTools(dict); 1357 error_ui_util::HandleOpenDevTools(dict);
1358 1358
1359 return true; 1359 return true;
1360 } 1360 }
1361 1361
1362 } // namespace api 1362 } // namespace api
1363 1363
1364 } // namespace extensions 1364 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698