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

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: Fix more errors Created 5 years, 4 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 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 }; 420 };
421 421
422 class PrefWatcherFactory : public BrowserContextKeyedServiceFactory { 422 class PrefWatcherFactory : public BrowserContextKeyedServiceFactory {
423 public: 423 public:
424 static PrefWatcher* GetForProfile(Profile* profile) { 424 static PrefWatcher* GetForProfile(Profile* profile) {
425 return static_cast<PrefWatcher*>( 425 return static_cast<PrefWatcher*>(
426 GetInstance()->GetServiceForBrowserContext(profile, true)); 426 GetInstance()->GetServiceForBrowserContext(profile, true));
427 } 427 }
428 428
429 static PrefWatcherFactory* GetInstance() { 429 static PrefWatcherFactory* GetInstance() {
430 return Singleton<PrefWatcherFactory>::get(); 430 return base::Singleton<PrefWatcherFactory>::get();
431 } 431 }
432 432
433 private: 433 private:
434 friend struct DefaultSingletonTraits<PrefWatcherFactory>; 434 friend struct base::DefaultSingletonTraits<PrefWatcherFactory>;
435 435
436 PrefWatcherFactory() : BrowserContextKeyedServiceFactory( 436 PrefWatcherFactory() : BrowserContextKeyedServiceFactory(
437 "PrefWatcher", 437 "PrefWatcher",
438 BrowserContextDependencyManager::GetInstance()) { 438 BrowserContextDependencyManager::GetInstance()) {
439 } 439 }
440 440
441 ~PrefWatcherFactory() override {} 441 ~PrefWatcherFactory() override {}
442 442
443 // BrowserContextKeyedServiceFactory: 443 // BrowserContextKeyedServiceFactory:
444 KeyedService* BuildServiceInstanceFor( 444 KeyedService* BuildServiceInstanceFor(
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 } 684 }
685 } 685 }
686 686
687 void PrefsTabHelper::OnWebPrefChanged(const std::string& pref_name) { 687 void PrefsTabHelper::OnWebPrefChanged(const std::string& pref_name) {
688 #if !defined(OS_ANDROID) 688 #if !defined(OS_ANDROID)
689 OnFontFamilyPrefChanged(pref_name); 689 OnFontFamilyPrefChanged(pref_name);
690 #endif 690 #endif
691 691
692 web_contents_->GetRenderViewHost()->OnWebkitPreferencesChanged(); 692 web_contents_->GetRenderViewHost()->OnWebkitPreferencesChanged();
693 } 693 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698