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

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

Issue 1658793002: Update chrome for new prefs location. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 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 <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
11 #include "base/lazy_instance.h" 11 #include "base/lazy_instance.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/prefs/pref_change_registrar.h"
14 #include "base/prefs/pref_service.h"
15 #include "base/strings/stringprintf.h" 13 #include "base/strings/stringprintf.h"
16 #include "chrome/browser/extensions/api/preference/preference_api_constants.h" 14 #include "chrome/browser/extensions/api/preference/preference_api_constants.h"
17 #include "chrome/browser/profiles/profile.h" 15 #include "chrome/browser/profiles/profile.h"
16 #include "components/prefs/pref_change_registrar.h"
17 #include "components/prefs/pref_service.h"
18 #include "extensions/browser/extension_registry.h" 18 #include "extensions/browser/extension_registry.h"
19 19
20 namespace extensions { 20 namespace extensions {
21 namespace chromedirectsetting { 21 namespace chromedirectsetting {
22 22
23 const char kOnPrefChangeFormat[] = 23 const char kOnPrefChangeFormat[] =
24 "types.private.ChromeDirectSetting.%s.onChange"; 24 "types.private.ChromeDirectSetting.%s.onChange";
25 25
26 class PreferenceWhitelist { 26 class PreferenceWhitelist {
27 public: 27 public:
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 scoped_ptr<Event> event( 162 scoped_ptr<Event> event(
163 new Event(histogram_value, event_name, std::move(args_copy))); 163 new Event(histogram_value, event_name, std::move(args_copy)));
164 router->DispatchEventToExtension(extension_id, std::move(event)); 164 router->DispatchEventToExtension(extension_id, std::move(event));
165 } 165 }
166 } 166 }
167 } 167 }
168 } 168 }
169 169
170 } // namespace chromedirectsetting 170 } // namespace chromedirectsetting
171 } // namespace extensions 171 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698