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

Side by Side Diff: chrome/browser/extensions/shell_window_registry.cc

Issue 15517005: Remove references to Profile from browser_context_keyed_service. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 #include "chrome/browser/browser_process.h" 5 #include "chrome/browser/browser_process.h"
6 #include "chrome/browser/extensions/shell_window_registry.h" 6 #include "chrome/browser/extensions/shell_window_registry.h"
7 #include "chrome/browser/profiles/incognito_helpers.h" 7 #include "chrome/browser/profiles/incognito_helpers.h"
8 #include "chrome/browser/profiles/profile_manager.h" 8 #include "chrome/browser/profiles/profile_manager.h"
9 #include "chrome/browser/ui/extensions/native_app_window.h" 9 #include "chrome/browser/ui/extensions/native_app_window.h"
10 #include "chrome/browser/ui/extensions/shell_window.h" 10 #include "chrome/browser/ui/extensions/shell_window.h"
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 inspected_windows_.erase(key); 223 inspected_windows_.erase(key);
224 } 224 }
225 225
226 /////////////////////////////////////////////////////////////////////////////// 226 ///////////////////////////////////////////////////////////////////////////////
227 // Factory boilerplate 227 // Factory boilerplate
228 228
229 // static 229 // static
230 ShellWindowRegistry* ShellWindowRegistry::Factory::GetForProfile( 230 ShellWindowRegistry* ShellWindowRegistry::Factory::GetForProfile(
231 Profile* profile, bool create) { 231 Profile* profile, bool create) {
232 return static_cast<ShellWindowRegistry*>( 232 return static_cast<ShellWindowRegistry*>(
233 GetInstance()->GetServiceForProfile(profile, create)); 233 GetInstance()->GetServiceForBrowserContext(profile, create));
234 } 234 }
235 235
236 ShellWindowRegistry::Factory* ShellWindowRegistry::Factory::GetInstance() { 236 ShellWindowRegistry::Factory* ShellWindowRegistry::Factory::GetInstance() {
237 return Singleton<ShellWindowRegistry::Factory>::get(); 237 return Singleton<ShellWindowRegistry::Factory>::get();
238 } 238 }
239 239
240 ShellWindowRegistry::Factory::Factory() 240 ShellWindowRegistry::Factory::Factory()
241 : ProfileKeyedServiceFactory("ShellWindowRegistry", 241 : BrowserContextKeyedServiceFactory("ShellWindowRegistry",
242 ProfileDependencyManager::GetInstance()) { 242 BrowserContextDependencyManager::GetInstance()) {
243 } 243 }
244 244
245 ShellWindowRegistry::Factory::~Factory() { 245 ShellWindowRegistry::Factory::~Factory() {
246 } 246 }
247 247
248 ProfileKeyedService* ShellWindowRegistry::Factory::BuildServiceInstanceFor( 248 BrowserContextKeyedService* ShellWindowRegistry::Factory::BuildServiceInstanceFo r(
249 content::BrowserContext* profile) const { 249 content::BrowserContext* profile) const {
250 return new ShellWindowRegistry(static_cast<Profile*>(profile)); 250 return new ShellWindowRegistry(static_cast<Profile*>(profile));
251 } 251 }
252 252
253 bool ShellWindowRegistry::Factory::ServiceIsCreatedWithProfile() const { 253 bool ShellWindowRegistry::Factory::ServiceIsCreatedWithBrowserContext() const {
254 return true; 254 return true;
255 } 255 }
256 256
257 bool ShellWindowRegistry::Factory::ServiceIsNULLWhileTesting() const { 257 bool ShellWindowRegistry::Factory::ServiceIsNULLWhileTesting() const {
258 return false; 258 return false;
259 } 259 }
260 260
261 content::BrowserContext* ShellWindowRegistry::Factory::GetBrowserContextToUse( 261 content::BrowserContext* ShellWindowRegistry::Factory::GetBrowserContextToUse(
262 content::BrowserContext* context) const { 262 content::BrowserContext* context) const {
263 return chrome::GetBrowserContextRedirectedInIncognito(context); 263 return chrome::GetBrowserContextRedirectedInIncognito(context);
264 } 264 }
265 265
266 } // namespace extensions 266 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698