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

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

Issue 691393002: [Smart Lock] Expose the easy_unlock.proximity_required pref via the chrome.preferencesPrivate API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@smart-lock-settings-pref
Patch Set: Update whitelist Created 6 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/resources/easy_unlock/manifest.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 11 matching lines...) Expand all
22 "types.private.ChromeDirectSetting.%s.onChange"; 22 "types.private.ChromeDirectSetting.%s.onChange";
23 23
24 class PreferenceWhitelist { 24 class PreferenceWhitelist {
25 public: 25 public:
26 PreferenceWhitelist() { 26 PreferenceWhitelist() {
27 whitelist_.insert("googlegeolocationaccess.enabled"); 27 whitelist_.insert("googlegeolocationaccess.enabled");
28 whitelist_.insert("spdy_proxy.enabled"); 28 whitelist_.insert("spdy_proxy.enabled");
29 whitelist_.insert("data_reduction.daily_original_length"); 29 whitelist_.insert("data_reduction.daily_original_length");
30 whitelist_.insert("data_reduction.daily_received_length"); 30 whitelist_.insert("data_reduction.daily_received_length");
31 whitelist_.insert("data_reduction.update_daily_lengths"); 31 whitelist_.insert("data_reduction.update_daily_lengths");
32 whitelist_.insert("easy_unlock.proximity_required");
32 } 33 }
33 34
34 ~PreferenceWhitelist() {} 35 ~PreferenceWhitelist() {}
35 36
36 bool IsPreferenceOnWhitelist(const std::string& pref_key){ 37 bool IsPreferenceOnWhitelist(const std::string& pref_key){
37 return whitelist_.find(pref_key) != whitelist_.end(); 38 return whitelist_.find(pref_key) != whitelist_.end();
38 } 39 }
39 40
40 void RegisterEventListeners( 41 void RegisterEventListeners(
41 Profile* profile, 42 Profile* profile,
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 scoped_ptr<base::ListValue> args_copy(args.DeepCopy()); 147 scoped_ptr<base::ListValue> args_copy(args.DeepCopy());
147 scoped_ptr<Event> event(new Event(event_name, args_copy.Pass())); 148 scoped_ptr<Event> event(new Event(event_name, args_copy.Pass()));
148 router->DispatchEventToExtension(extension_id, event.Pass()); 149 router->DispatchEventToExtension(extension_id, event.Pass());
149 } 150 }
150 } 151 }
151 } 152 }
152 } 153 }
153 154
154 } // namespace chromedirectsetting 155 } // namespace chromedirectsetting
155 } // namespace extensions 156 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/easy_unlock/manifest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698