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

Side by Side Diff: chrome/browser/ui/prefs/prefs_tab_helper.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 (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/ui/prefs/prefs_tab_helper.h" 5 #include "chrome/browser/ui/prefs/prefs_tab_helper.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/singleton.h" 10 #include "base/memory/singleton.h"
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 }; 407 };
408 408
409 class PrefWatcherFactory : public BrowserContextKeyedServiceFactory { 409 class PrefWatcherFactory : public BrowserContextKeyedServiceFactory {
410 public: 410 public:
411 static PrefWatcher* GetForProfile(Profile* profile) { 411 static PrefWatcher* GetForProfile(Profile* profile) {
412 return static_cast<PrefWatcher*>( 412 return static_cast<PrefWatcher*>(
413 GetInstance()->GetServiceForBrowserContext(profile, true)); 413 GetInstance()->GetServiceForBrowserContext(profile, true));
414 } 414 }
415 415
416 static PrefWatcherFactory* GetInstance() { 416 static PrefWatcherFactory* GetInstance() {
417 return Singleton<PrefWatcherFactory>::get(); 417 return base::Singleton<PrefWatcherFactory>::get();
418 } 418 }
419 419
420 private: 420 private:
421 friend struct DefaultSingletonTraits<PrefWatcherFactory>; 421 friend struct base::DefaultSingletonTraits<PrefWatcherFactory>;
422 422
423 PrefWatcherFactory() : BrowserContextKeyedServiceFactory( 423 PrefWatcherFactory() : BrowserContextKeyedServiceFactory(
424 "PrefWatcher", 424 "PrefWatcher",
425 BrowserContextDependencyManager::GetInstance()) { 425 BrowserContextDependencyManager::GetInstance()) {
426 } 426 }
427 427
428 ~PrefWatcherFactory() override {} 428 ~PrefWatcherFactory() override {}
429 429
430 // BrowserContextKeyedServiceFactory: 430 // BrowserContextKeyedServiceFactory:
431 KeyedService* BuildServiceInstanceFor( 431 KeyedService* BuildServiceInstanceFor(
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 } 669 }
670 } 670 }
671 671
672 void PrefsTabHelper::OnWebPrefChanged(const std::string& pref_name) { 672 void PrefsTabHelper::OnWebPrefChanged(const std::string& pref_name) {
673 #if !defined(OS_ANDROID) 673 #if !defined(OS_ANDROID)
674 OnFontFamilyPrefChanged(pref_name); 674 OnFontFamilyPrefChanged(pref_name);
675 #endif 675 #endif
676 676
677 web_contents_->GetRenderViewHost()->OnWebkitPreferencesChanged(); 677 web_contents_->GetRenderViewHost()->OnWebkitPreferencesChanged();
678 } 678 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/libgtk2ui/gtk2_event_loop.cc ('k') | chrome/browser/ui/search/new_tab_page_interceptor_service_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698