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

Side by Side Diff: chrome/browser/prefs/chrome_command_line_pref_store.cc

Issue 2623023002: Remove //chrome as an embedder of blimp. (Closed)
Patch Set: One more rebase for good measure Created 3 years, 11 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 | « chrome/browser/android/tab_android.cc ('k') | chrome/chrome_repack_locales.gni » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/prefs/chrome_command_line_pref_store.h" 5 #include "chrome/browser/prefs/chrome_command_line_pref_store.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 14 matching lines...) Expand all
25 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_switc hes.h" 25 #include "components/data_reduction_proxy/core/common/data_reduction_proxy_switc hes.h"
26 #include "components/proxy_config/proxy_config_dictionary.h" 26 #include "components/proxy_config/proxy_config_dictionary.h"
27 #include "components/proxy_config/proxy_config_pref_names.h" 27 #include "components/proxy_config/proxy_config_pref_names.h"
28 #include "components/ssl_config/ssl_config_prefs.h" 28 #include "components/ssl_config/ssl_config_prefs.h"
29 #include "components/ssl_config/ssl_config_switches.h" 29 #include "components/ssl_config/ssl_config_switches.h"
30 #include "components/sync/base/pref_names.h" 30 #include "components/sync/base/pref_names.h"
31 #include "content/public/common/content_switches.h" 31 #include "content/public/common/content_switches.h"
32 #include "ui/base/ui_base_switches.h" 32 #include "ui/base/ui_base_switches.h"
33 #include "ui/display/display_switches.h" 33 #include "ui/display/display_switches.h"
34 34
35 #if defined(OS_ANDROID)
36 #include "chrome/browser/android/preferences/command_line_pref_store_android.h"
37 #endif
38
39 #if defined(OS_CHROMEOS) 35 #if defined(OS_CHROMEOS)
40 #include "chromeos/chromeos_switches.h" 36 #include "chromeos/chromeos_switches.h"
41 #endif 37 #endif
42 38
43 const CommandLinePrefStore::SwitchToPreferenceMapEntry 39 const CommandLinePrefStore::SwitchToPreferenceMapEntry
44 ChromeCommandLinePrefStore::string_switch_map_[] = { 40 ChromeCommandLinePrefStore::string_switch_map_[] = {
45 { switches::kLang, prefs::kApplicationLocale }, 41 { switches::kLang, prefs::kApplicationLocale },
46 { data_reduction_proxy::switches::kDataReductionProxy, 42 { data_reduction_proxy::switches::kDataReductionProxy,
47 data_reduction_proxy::prefs::kDataReductionProxy }, 43 data_reduction_proxy::prefs::kDataReductionProxy },
48 { switches::kAuthServerWhitelist, prefs::kAuthServerWhitelist }, 44 { switches::kAuthServerWhitelist, prefs::kAuthServerWhitelist },
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 } 112 }
117 return true; 113 return true;
118 } 114 }
119 115
120 void ChromeCommandLinePrefStore::ApplySimpleSwitches() { 116 void ChromeCommandLinePrefStore::ApplySimpleSwitches() {
121 // Look for each switch we know about and set its preference accordingly. 117 // Look for each switch we know about and set its preference accordingly.
122 ApplyStringSwitches(string_switch_map_, arraysize(string_switch_map_)); 118 ApplyStringSwitches(string_switch_map_, arraysize(string_switch_map_));
123 ApplyPathSwitches(path_switch_map_, arraysize(path_switch_map_)); 119 ApplyPathSwitches(path_switch_map_, arraysize(path_switch_map_));
124 ApplyIntegerSwitches(integer_switch_map_, arraysize(integer_switch_map_)); 120 ApplyIntegerSwitches(integer_switch_map_, arraysize(integer_switch_map_));
125 ApplyBooleanSwitches(boolean_switch_map_, arraysize(boolean_switch_map_)); 121 ApplyBooleanSwitches(boolean_switch_map_, arraysize(boolean_switch_map_));
126 #if defined(OS_ANDROID)
127 ::android::ApplyBlimpSwitches(this);
128 #endif
129 } 122 }
130 123
131 void ChromeCommandLinePrefStore::ApplyProxyMode() { 124 void ChromeCommandLinePrefStore::ApplyProxyMode() {
132 if (command_line()->HasSwitch(switches::kNoProxyServer)) { 125 if (command_line()->HasSwitch(switches::kNoProxyServer)) {
133 SetValue(proxy_config::prefs::kProxy, 126 SetValue(proxy_config::prefs::kProxy,
134 base::WrapUnique(ProxyConfigDictionary::CreateDirect()), 127 base::WrapUnique(ProxyConfigDictionary::CreateDirect()),
135 WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS); 128 WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
136 } else if (command_line()->HasSwitch(switches::kProxyPacUrl)) { 129 } else if (command_line()->HasSwitch(switches::kProxyPacUrl)) {
137 std::string pac_script_url = 130 std::string pac_script_url =
138 command_line()->GetSwitchValueASCII(switches::kProxyPacUrl); 131 command_line()->GetSwitchValueASCII(switches::kProxyPacUrl);
(...skipping 28 matching lines...) Expand all
167 } 160 }
168 } 161 }
169 162
170 void ChromeCommandLinePrefStore::ApplyBackgroundModeSwitches() { 163 void ChromeCommandLinePrefStore::ApplyBackgroundModeSwitches() {
171 if (command_line()->HasSwitch(switches::kDisableExtensions)) { 164 if (command_line()->HasSwitch(switches::kDisableExtensions)) {
172 SetValue(prefs::kBackgroundModeEnabled, 165 SetValue(prefs::kBackgroundModeEnabled,
173 base::MakeUnique<base::FundamentalValue>(false), 166 base::MakeUnique<base::FundamentalValue>(false),
174 WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS); 167 WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
175 } 168 }
176 } 169 }
OLDNEW
« no previous file with comments | « chrome/browser/android/tab_android.cc ('k') | chrome/chrome_repack_locales.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698