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

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

Issue 26972003: Added a policy_switches.cc file in the policy component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 2 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 | Annotate | Revision Log
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/command_line_pref_store.h" 5 #include "chrome/browser/prefs/command_line_pref_store.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/strings/string_number_conversions.h" 11 #include "base/strings/string_number_conversions.h"
12 #include "base/strings/string_split.h" 12 #include "base/strings/string_split.h"
13 #include "base/values.h" 13 #include "base/values.h"
14 #include "chrome/browser/prefs/proxy_config_dictionary.h" 14 #include "chrome/browser/prefs/proxy_config_dictionary.h"
15 #include "chrome/common/chrome_switches.h" 15 #include "chrome/common/chrome_switches.h"
16 #include "chrome/common/pref_names.h" 16 #include "chrome/common/pref_names.h"
17 #include "ui/base/ui_base_switches.h" 17 #include "ui/base/ui_base_switches.h"
18 18
19 #if defined(ENABLE_CONFIGURATION_POLICY)
20 #include "components/policy/core/common/policy_switches.h"
21 #endif
22
19 #if defined(OS_CHROMEOS) 23 #if defined(OS_CHROMEOS)
20 #include "chromeos/chromeos_switches.h" 24 #include "chromeos/chromeos_switches.h"
21 #endif 25 #endif
22 26
23 const CommandLinePrefStore::StringSwitchToPreferenceMapEntry 27 const CommandLinePrefStore::StringSwitchToPreferenceMapEntry
24 CommandLinePrefStore::string_switch_map_[] = { 28 CommandLinePrefStore::string_switch_map_[] = {
25 { switches::kLang, prefs::kApplicationLocale }, 29 { switches::kLang, prefs::kApplicationLocale },
26 { switches::kAuthSchemes, prefs::kAuthSchemes }, 30 { switches::kAuthSchemes, prefs::kAuthSchemes },
27 { switches::kAuthServerWhitelist, prefs::kAuthServerWhitelist }, 31 { switches::kAuthServerWhitelist, prefs::kAuthServerWhitelist },
28 { switches::kAuthNegotiateDelegateWhitelist, 32 { switches::kAuthNegotiateDelegateWhitelist,
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 #if defined(GOOGLE_CHROME_BUILD) 67 #if defined(GOOGLE_CHROME_BUILD)
64 { switches::kDisablePrintPreview, prefs::kPrintPreviewDisabled, true }, 68 { switches::kDisablePrintPreview, prefs::kPrintPreviewDisabled, true },
65 #else 69 #else
66 { switches::kEnablePrintPreview, prefs::kPrintPreviewDisabled, false }, 70 { switches::kEnablePrintPreview, prefs::kPrintPreviewDisabled, false },
67 #endif 71 #endif
68 #if defined(OS_CHROMEOS) 72 #if defined(OS_CHROMEOS)
69 { chromeos::switches::kDisableDrive, prefs::kDisableDrive, true }, 73 { chromeos::switches::kDisableDrive, prefs::kDisableDrive, true },
70 { chromeos::switches::kEnableTouchpadThreeFingerClick, 74 { chromeos::switches::kEnableTouchpadThreeFingerClick,
71 prefs::kEnableTouchpadThreeFingerClick, true }, 75 prefs::kEnableTouchpadThreeFingerClick, true },
72 #endif 76 #endif
73 { switches::kDisableCloudPolicyOnSignin, 77 #if defined(ENABLE_CONFIGURATION_POLICY)
78 { policy::switches::kDisableCloudPolicyOnSignin,
74 prefs::kDisableCloudPolicyOnSignin, true }, 79 prefs::kDisableCloudPolicyOnSignin, true },
80 #endif
75 { switches::kDisableAsyncDns, prefs::kBuiltInDnsClientEnabled, false }, 81 { switches::kDisableAsyncDns, prefs::kBuiltInDnsClientEnabled, false },
76 { switches::kEnableAsyncDns, prefs::kBuiltInDnsClientEnabled, true }, 82 { switches::kEnableAsyncDns, prefs::kBuiltInDnsClientEnabled, true },
77 }; 83 };
78 84
79 const CommandLinePrefStore::IntegerSwitchToPreferenceMapEntry 85 const CommandLinePrefStore::IntegerSwitchToPreferenceMapEntry
80 CommandLinePrefStore::integer_switch_map_[] = { 86 CommandLinePrefStore::integer_switch_map_[] = {
81 { switches::kDiskCacheSize, prefs::kDiskCacheSize }, 87 { switches::kDiskCacheSize, prefs::kDiskCacheSize },
82 { switches::kMediaCacheSize, prefs::kMediaCacheSize }, 88 { switches::kMediaCacheSize, prefs::kMediaCacheSize },
83 }; 89 };
84 90
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 } 185 }
180 } 186 }
181 187
182 void CommandLinePrefStore::ApplyBackgroundModeSwitches() { 188 void CommandLinePrefStore::ApplyBackgroundModeSwitches() {
183 if (command_line_->HasSwitch(switches::kDisableBackgroundMode) || 189 if (command_line_->HasSwitch(switches::kDisableBackgroundMode) ||
184 command_line_->HasSwitch(switches::kDisableExtensions)) { 190 command_line_->HasSwitch(switches::kDisableExtensions)) {
185 Value* value = Value::CreateBooleanValue(false); 191 Value* value = Value::CreateBooleanValue(false);
186 SetValue(prefs::kBackgroundModeEnabled, value); 192 SetValue(prefs::kBackgroundModeEnabled, value);
187 } 193 }
188 } 194 }
OLDNEW
« no previous file with comments | « chrome/browser/policy/cloud/user_policy_signin_service_android.cc ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698