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

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

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/extension_management.h" 5 #include "chrome/browser/extensions/extension_management.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 return it->second; 459 return it->second;
460 } 460 }
461 461
462 ExtensionManagement* ExtensionManagementFactory::GetForBrowserContext( 462 ExtensionManagement* ExtensionManagementFactory::GetForBrowserContext(
463 content::BrowserContext* context) { 463 content::BrowserContext* context) {
464 return static_cast<ExtensionManagement*>( 464 return static_cast<ExtensionManagement*>(
465 GetInstance()->GetServiceForBrowserContext(context, true)); 465 GetInstance()->GetServiceForBrowserContext(context, true));
466 } 466 }
467 467
468 ExtensionManagementFactory* ExtensionManagementFactory::GetInstance() { 468 ExtensionManagementFactory* ExtensionManagementFactory::GetInstance() {
469 return Singleton<ExtensionManagementFactory>::get(); 469 return base::Singleton<ExtensionManagementFactory>::get();
470 } 470 }
471 471
472 ExtensionManagementFactory::ExtensionManagementFactory() 472 ExtensionManagementFactory::ExtensionManagementFactory()
473 : BrowserContextKeyedServiceFactory( 473 : BrowserContextKeyedServiceFactory(
474 "ExtensionManagement", 474 "ExtensionManagement",
475 BrowserContextDependencyManager::GetInstance()) { 475 BrowserContextDependencyManager::GetInstance()) {
476 } 476 }
477 477
478 ExtensionManagementFactory::~ExtensionManagementFactory() { 478 ExtensionManagementFactory::~ExtensionManagementFactory() {
479 } 479 }
(...skipping 10 matching lines...) Expand all
490 content::BrowserContext* context) const { 490 content::BrowserContext* context) const {
491 return chrome::GetBrowserContextRedirectedInIncognito(context); 491 return chrome::GetBrowserContextRedirectedInIncognito(context);
492 } 492 }
493 493
494 void ExtensionManagementFactory::RegisterProfilePrefs( 494 void ExtensionManagementFactory::RegisterProfilePrefs(
495 user_prefs::PrefRegistrySyncable* user_prefs) { 495 user_prefs::PrefRegistrySyncable* user_prefs) {
496 user_prefs->RegisterDictionaryPref(pref_names::kExtensionManagement); 496 user_prefs->RegisterDictionaryPref(pref_names::kExtensionManagement);
497 } 497 }
498 498
499 } // namespace extensions 499 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_management.h ('k') | chrome/browser/extensions/extension_renderer_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698