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

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

Issue 1162293005: Settings: Add initial implementation of Appearance page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review fixes. Created 5 years, 6 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 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 "base/prefs/pref_service.h" 5 #include "base/prefs/pref_service.h"
6 #include "chrome/browser/browser_process.h" 6 #include "chrome/browser/browser_process.h"
7 #include "chrome/browser/extensions/api/settings_private/prefs_util.h" 7 #include "chrome/browser/extensions/api/settings_private/prefs_util.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/common/pref_names.h" 9 #include "chrome/common/pref_names.h"
10 10
11 namespace extensions { 11 namespace extensions {
12 12
13 namespace settings_private = api::settings_private; 13 namespace settings_private = api::settings_private;
14 14
15 namespace prefs_util { 15 namespace prefs_util {
16 16
17 const TypedPrefMap& GetWhitelistedKeys() { 17 const TypedPrefMap& GetWhitelistedKeys() {
18 static TypedPrefMap* s_whitelist = nullptr; 18 static TypedPrefMap* s_whitelist = nullptr;
19 if (s_whitelist) 19 if (s_whitelist)
20 return *s_whitelist; 20 return *s_whitelist;
21 s_whitelist = new TypedPrefMap(); 21 s_whitelist = new TypedPrefMap();
22 (*s_whitelist)["browser.show_home_button"] =
23 settings_private::PrefType::PREF_TYPE_BOOLEAN;
24 (*s_whitelist)["bookmark_bar.show_on_all_tabs"] =
25 settings_private::PrefType::PREF_TYPE_BOOLEAN;
22 (*s_whitelist)["download.default_directory"] = 26 (*s_whitelist)["download.default_directory"] =
23 settings_private::PrefType::PREF_TYPE_STRING; 27 settings_private::PrefType::PREF_TYPE_STRING;
24 (*s_whitelist)["download.prompt_for_download"] = 28 (*s_whitelist)["download.prompt_for_download"] =
25 settings_private::PrefType::PREF_TYPE_BOOLEAN; 29 settings_private::PrefType::PREF_TYPE_BOOLEAN;
26 (*s_whitelist)["homepage"] = settings_private::PrefType::PREF_TYPE_URL; 30 (*s_whitelist)["homepage"] = settings_private::PrefType::PREF_TYPE_URL;
27 31
28 #if defined(OS_CHROMEOS) 32 #if defined(OS_CHROMEOS)
29 (*s_whitelist)["settings.accessibility"] = 33 (*s_whitelist)["settings.accessibility"] =
30 settings_private::PrefType::PREF_TYPE_BOOLEAN; 34 settings_private::PrefType::PREF_TYPE_BOOLEAN;
31 (*s_whitelist)["settings.a11y.autoclick"] = 35 (*s_whitelist)["settings.a11y.autoclick"] =
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 166
163 if (g_browser_process->local_state()->FindPreference(pref_name)) 167 if (g_browser_process->local_state()->FindPreference(pref_name))
164 return g_browser_process->local_state(); 168 return g_browser_process->local_state();
165 169
166 return user_prefs; 170 return user_prefs;
167 } 171 }
168 172
169 } // namespace prefs_util 173 } // namespace prefs_util
170 174
171 } // namespace extensions 175 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/app/settings_strings.grdp ('k') | chrome/browser/resources/settings/appearance_page/appearance_page.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698