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

Side by Side Diff: chrome/browser/extensions/api/settings_private/prefs_util.cc

Issue 1372053002: Flesh out the location-page class to make it more general. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address feedback from Michael Created 5 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/settings_private/prefs_util.h" 5 #include "chrome/browser/extensions/api/settings_private/prefs_util.h"
6 6
7 #include "base/prefs/pref_service.h" 7 #include "base/prefs/pref_service.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/extensions/chrome_extension_function.h" 9 #include "chrome/browser/extensions/chrome_extension_function.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 (*s_whitelist)["browser.clear_data.passwords"] = 103 (*s_whitelist)["browser.clear_data.passwords"] =
104 settings_private::PrefType::PREF_TYPE_BOOLEAN; 104 settings_private::PrefType::PREF_TYPE_BOOLEAN;
105 (*s_whitelist)["browser.clear_data.form_data"] = 105 (*s_whitelist)["browser.clear_data.form_data"] =
106 settings_private::PrefType::PREF_TYPE_BOOLEAN; 106 settings_private::PrefType::PREF_TYPE_BOOLEAN;
107 (*s_whitelist)["browser.clear_data.hosted_apps_data"] = 107 (*s_whitelist)["browser.clear_data.hosted_apps_data"] =
108 settings_private::PrefType::PREF_TYPE_BOOLEAN; 108 settings_private::PrefType::PREF_TYPE_BOOLEAN;
109 (*s_whitelist)["browser.clear_data.content_licenses"] = 109 (*s_whitelist)["browser.clear_data.content_licenses"] =
110 settings_private::PrefType::PREF_TYPE_BOOLEAN; 110 settings_private::PrefType::PREF_TYPE_BOOLEAN;
111 (*s_whitelist)["browser.clear_data.time_period"] = 111 (*s_whitelist)["browser.clear_data.time_period"] =
112 settings_private::PrefType::PREF_TYPE_NUMBER; 112 settings_private::PrefType::PREF_TYPE_NUMBER;
113 (*s_whitelist)["translate.enabled"] = 113 (*s_whitelist)["profile.default_content_setting_values.cookies"] =
114 settings_private::PrefType::PREF_TYPE_BOOLEAN; 114 settings_private::PrefType::PREF_TYPE_NUMBER;
115 (*s_whitelist)["translate_blocked_languages"] = 115 (*s_whitelist)["profile.default_content_setting_values.fullscreen"] =
116 settings_private::PrefType::PREF_TYPE_LIST; 116 settings_private::PrefType::PREF_TYPE_NUMBER;
117 (*s_whitelist)["profile.default_content_setting_values.geolocation"] =
118 settings_private::PrefType::PREF_TYPE_NUMBER;
119 (*s_whitelist)["profile.default_content_setting_values.javascript"] =
120 settings_private::PrefType::PREF_TYPE_NUMBER;
121 (*s_whitelist)["profile.default_content_setting_values.media_stream_camera"] =
122 settings_private::PrefType::PREF_TYPE_NUMBER;
123 (*s_whitelist)["profile.default_content_setting_values.media_stream_mic"] =
124 settings_private::PrefType::PREF_TYPE_NUMBER;
125 (*s_whitelist)["profile.default_content_setting_values.notifications"] =
126 settings_private::PrefType::PREF_TYPE_NUMBER;
127 (*s_whitelist)["profile.default_content_setting_values.popups"] =
128 settings_private::PrefType::PREF_TYPE_NUMBER;
129 (*s_whitelist)["profile.content_settings.exceptions.cookies"] =
130 settings_private::PrefType::PREF_TYPE_DICTIONARY;
131 (*s_whitelist)["profile.content_settings.exceptions.fullscreen"] =
132 settings_private::PrefType::PREF_TYPE_DICTIONARY;
133 (*s_whitelist)["profile.content_settings.exceptions.geolocation"] =
134 settings_private::PrefType::PREF_TYPE_DICTIONARY;
135 (*s_whitelist)["profile.content_settings.exceptions.javascript"] =
136 settings_private::PrefType::PREF_TYPE_DICTIONARY;
137 (*s_whitelist)["profile.content_settings.exceptions.media_stream_camera"] =
138 settings_private::PrefType::PREF_TYPE_DICTIONARY;
139 (*s_whitelist)["profile.content_settings.exceptions.media_stream_mic"] =
140 settings_private::PrefType::PREF_TYPE_DICTIONARY;
141 (*s_whitelist)["profile.content_settings.exceptions.notifications"] =
142 settings_private::PrefType::PREF_TYPE_DICTIONARY;
143 (*s_whitelist)["profile.content_settings.exceptions.popups"] =
144 settings_private::PrefType::PREF_TYPE_DICTIONARY;
117 145
118 #if defined(OS_CHROMEOS) 146 #if defined(OS_CHROMEOS)
119 (*s_whitelist)["cros.accounts.allowBWSI"] = 147 (*s_whitelist)["cros.accounts.allowBWSI"] =
120 settings_private::PrefType::PREF_TYPE_BOOLEAN; 148 settings_private::PrefType::PREF_TYPE_BOOLEAN;
121 (*s_whitelist)["cros.accounts.supervisedUsersEnabled"] = 149 (*s_whitelist)["cros.accounts.supervisedUsersEnabled"] =
122 settings_private::PrefType::PREF_TYPE_BOOLEAN; 150 settings_private::PrefType::PREF_TYPE_BOOLEAN;
123 (*s_whitelist)["cros.accounts.showUserNamesOnSignIn"] = 151 (*s_whitelist)["cros.accounts.showUserNamesOnSignIn"] =
124 settings_private::PrefType::PREF_TYPE_BOOLEAN; 152 settings_private::PrefType::PREF_TYPE_BOOLEAN;
125 (*s_whitelist)["cros.accounts.allowGuest"] = 153 (*s_whitelist)["cros.accounts.allowGuest"] =
126 settings_private::PrefType::PREF_TYPE_BOOLEAN; 154 settings_private::PrefType::PREF_TYPE_BOOLEAN;
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 528
501 bool PrefsUtil::IsCrosSetting(const std::string& pref_name) { 529 bool PrefsUtil::IsCrosSetting(const std::string& pref_name) {
502 #if defined(OS_CHROMEOS) 530 #if defined(OS_CHROMEOS)
503 return CrosSettings::Get()->IsCrosSettings(pref_name); 531 return CrosSettings::Get()->IsCrosSettings(pref_name);
504 #else 532 #else
505 return false; 533 return false;
506 #endif 534 #endif
507 } 535 }
508 536
509 } // namespace extensions 537 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698