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

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

Issue 1776373002: [Extensions] Remove unused parts of the preferencesPrivate API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Really clean up prefs Created 4 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/preferences_private/preferences_private_api.h » ('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 <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"
(...skipping 13 matching lines...) Expand all
24 "types.private.ChromeDirectSetting.%s.onChange"; 24 "types.private.ChromeDirectSetting.%s.onChange";
25 25
26 class PreferenceWhitelist { 26 class PreferenceWhitelist {
27 public: 27 public:
28 PreferenceWhitelist() { 28 PreferenceWhitelist() {
29 // Note: DO NOT add any setting here that does not have a UI element in 29 // Note: DO NOT add any setting here that does not have a UI element in
30 // chrome://settings unless you write a component extension that is always 30 // chrome://settings unless you write a component extension that is always
31 // installed. Otherwise, users may install your extension, the extension may 31 // installed. Otherwise, users may install your extension, the extension may
32 // toggle settings, and after the extension has been disabled/uninstalled 32 // toggle settings, and after the extension has been disabled/uninstalled
33 // the toggled setting remains in place. See http://crbug.com/164227#c157 . 33 // the toggled setting remains in place. See http://crbug.com/164227#c157 .
34 whitelist_.insert("googlegeolocationaccess.enabled");
35 // The following settings need to be checked and probably removed. See 34 // The following settings need to be checked and probably removed. See
36 // http://crbug.com/164227#c157 . 35 // http://crbug.com/164227#c157 .
37 whitelist_.insert("easy_unlock.proximity_required"); 36 whitelist_.insert("easy_unlock.proximity_required");
38 } 37 }
39 38
40 ~PreferenceWhitelist() {} 39 ~PreferenceWhitelist() {}
41 40
42 bool IsPreferenceOnWhitelist(const std::string& pref_key){ 41 bool IsPreferenceOnWhitelist(const std::string& pref_key){
43 return whitelist_.find(pref_key) != whitelist_.end(); 42 return whitelist_.find(pref_key) != whitelist_.end();
44 } 43 }
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 scoped_ptr<Event> event( 160 scoped_ptr<Event> event(
162 new Event(histogram_value, event_name, std::move(args_copy))); 161 new Event(histogram_value, event_name, std::move(args_copy)));
163 router->DispatchEventToExtension(extension_id, std::move(event)); 162 router->DispatchEventToExtension(extension_id, std::move(event));
164 } 163 }
165 } 164 }
166 } 165 }
167 } 166 }
168 167
169 } // namespace chromedirectsetting 168 } // namespace chromedirectsetting
170 } // namespace extensions 169 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/preferences_private/preferences_private_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698