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

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

Issue 197413002: Move extensions-related files to using //components/keyed_service. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 9 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 BrowserContextKeyedAPIFactory<ChromeDirectSettingAPI> > g_factory = 76 BrowserContextKeyedAPIFactory<ChromeDirectSettingAPI> > g_factory =
77 LAZY_INSTANCE_INITIALIZER; 77 LAZY_INSTANCE_INITIALIZER;
78 78
79 ChromeDirectSettingAPI::ChromeDirectSettingAPI(content::BrowserContext* context) 79 ChromeDirectSettingAPI::ChromeDirectSettingAPI(content::BrowserContext* context)
80 : profile_(Profile::FromBrowserContext(context)) { 80 : profile_(Profile::FromBrowserContext(context)) {
81 preference_whitelist.Get().RegisterEventListeners(profile_, this); 81 preference_whitelist.Get().RegisterEventListeners(profile_, this);
82 } 82 }
83 83
84 ChromeDirectSettingAPI::~ChromeDirectSettingAPI() {} 84 ChromeDirectSettingAPI::~ChromeDirectSettingAPI() {}
85 85
86 // BrowserContextKeyedService implementation. 86 // KeyedService implementation.
87 void ChromeDirectSettingAPI::Shutdown() {} 87 void ChromeDirectSettingAPI::Shutdown() {}
88 88
89 // BrowserContextKeyedAPI implementation. 89 // BrowserContextKeyedAPI implementation.
90 BrowserContextKeyedAPIFactory<ChromeDirectSettingAPI>* 90 BrowserContextKeyedAPIFactory<ChromeDirectSettingAPI>*
91 ChromeDirectSettingAPI::GetFactoryInstance() { 91 ChromeDirectSettingAPI::GetFactoryInstance() {
92 return g_factory.Pointer(); 92 return g_factory.Pointer();
93 } 93 }
94 94
95 // EventRouter::Observer implementation. 95 // EventRouter::Observer implementation.
96 void ChromeDirectSettingAPI::OnListenerAdded(const EventListenerInfo& details) { 96 void ChromeDirectSettingAPI::OnListenerAdded(const EventListenerInfo& details) {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 scoped_ptr<Event> event(new Event(event_name, args_copy.Pass())); 146 scoped_ptr<Event> event(new Event(event_name, args_copy.Pass()));
147 router->DispatchEventToExtension(extension_id, event.Pass()); 147 router->DispatchEventToExtension(extension_id, event.Pass());
148 } 148 }
149 } 149 }
150 } 150 }
151 } 151 }
152 } 152 }
153 153
154 } // namespace chromedirectsetting 154 } // namespace chromedirectsetting
155 } // namespace extensions 155 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698