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

Side by Side Diff: chrome/browser/extensions/api/preference/chrome_direct_setting_api.cc

Issue 140613002: Cleanup: Replace &LazyInstance::Get() with LazyInstance::Pointer(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/preference/chrome_direct_setting_api.h" 5 #include "chrome/browser/extensions/api/preference/chrome_direct_setting_api.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/containers/hash_tables.h" 8 #include "base/containers/hash_tables.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/prefs/pref_change_registrar.h" 10 #include "base/prefs/pref_change_registrar.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 } 80 }
81 81
82 ChromeDirectSettingAPI::~ChromeDirectSettingAPI() {} 82 ChromeDirectSettingAPI::~ChromeDirectSettingAPI() {}
83 83
84 // BrowserContextKeyedService implementation. 84 // BrowserContextKeyedService implementation.
85 void ChromeDirectSettingAPI::Shutdown() {} 85 void ChromeDirectSettingAPI::Shutdown() {}
86 86
87 // ProfileKeyedAPI implementation. 87 // ProfileKeyedAPI implementation.
88 ProfileKeyedAPIFactory<ChromeDirectSettingAPI>* 88 ProfileKeyedAPIFactory<ChromeDirectSettingAPI>*
89 ChromeDirectSettingAPI::GetFactoryInstance() { 89 ChromeDirectSettingAPI::GetFactoryInstance() {
90 return &g_factory.Get(); 90 return g_factory.Pointer();
91 } 91 }
92 92
93 // EventRouter::Observer implementation. 93 // EventRouter::Observer implementation.
94 void ChromeDirectSettingAPI::OnListenerAdded(const EventListenerInfo& details) { 94 void ChromeDirectSettingAPI::OnListenerAdded(const EventListenerInfo& details) {
95 ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this); 95 ExtensionSystem::Get(profile_)->event_router()->UnregisterObserver(this);
96 registrar_.Init(profile_->GetPrefs()); 96 registrar_.Init(profile_->GetPrefs());
97 preference_whitelist.Get().RegisterPropertyListeners( 97 preference_whitelist.Get().RegisterPropertyListeners(
98 profile_, 98 profile_,
99 &registrar_, 99 &registrar_,
100 base::Bind(&ChromeDirectSettingAPI::OnPrefChanged, 100 base::Bind(&ChromeDirectSettingAPI::OnPrefChanged,
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 router->DispatchEventToExtension(extension_id, event.Pass()); 145 router->DispatchEventToExtension(extension_id, event.Pass());
146 } 146 }
147 } 147 }
148 } 148 }
149 } 149 }
150 } 150 }
151 151
152 } // namespace chromedirectsetting 152 } // namespace chromedirectsetting
153 } // namespace extensions 153 } // namespace extensions
154 154
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/omnibox/omnibox_api.cc ('k') | chrome/browser/extensions/api/preference/preference_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698