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

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

Issue 2885363003: Add policy to use system default printer (Closed)
Patch Set: Fix test Created 3 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 (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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 {switches::kDisablePrintPreview, prefs::kPrintPreviewDisabled, true}, 73 {switches::kDisablePrintPreview, prefs::kPrintPreviewDisabled, true},
74 #if defined(OS_CHROMEOS) 74 #if defined(OS_CHROMEOS)
75 {chromeos::switches::kEnableTouchpadThreeFingerClick, 75 {chromeos::switches::kEnableTouchpadThreeFingerClick,
76 prefs::kEnableTouchpadThreeFingerClick, true}, 76 prefs::kEnableTouchpadThreeFingerClick, true},
77 {switches::kEnableUnifiedDesktop, 77 {switches::kEnableUnifiedDesktop,
78 prefs::kUnifiedDesktopEnabledByDefault, true}, 78 prefs::kUnifiedDesktopEnabledByDefault, true},
79 #endif 79 #endif
80 {switches::kUnsafePacUrl, prefs::kPacHttpsUrlStrippingEnabled, false}, 80 {switches::kUnsafePacUrl, prefs::kPacHttpsUrlStrippingEnabled, false},
81 {switches::kEnableLocalSyncBackend, 81 {switches::kEnableLocalSyncBackend,
82 syncer::prefs::kEnableLocalSyncBackend, true}, 82 syncer::prefs::kEnableLocalSyncBackend, true},
83 {switches::kUseSystemDefaultPrinter,
skau 2017/06/15 19:41:31 Can we exclude this from ChromeOS? It'll have the
rbpotter 2017/06/16 02:21:45 Done.
84 prefs::kUseSystemDefaultPrinterAsDefault, true},
83 }; 85 };
84 86
85 const CommandLinePrefStore::SwitchToPreferenceMapEntry 87 const CommandLinePrefStore::SwitchToPreferenceMapEntry
86 ChromeCommandLinePrefStore::integer_switch_map_[] = { 88 ChromeCommandLinePrefStore::integer_switch_map_[] = {
87 { switches::kDiskCacheSize, prefs::kDiskCacheSize }, 89 { switches::kDiskCacheSize, prefs::kDiskCacheSize },
88 { switches::kMediaCacheSize, prefs::kMediaCacheSize }, 90 { switches::kMediaCacheSize, prefs::kMediaCacheSize },
89 }; 91 };
90 92
91 ChromeCommandLinePrefStore::ChromeCommandLinePrefStore( 93 ChromeCommandLinePrefStore::ChromeCommandLinePrefStore(
92 const base::CommandLine* command_line) 94 const base::CommandLine* command_line)
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 } 160 }
159 } 161 }
160 162
161 void ChromeCommandLinePrefStore::ApplyBackgroundModeSwitches() { 163 void ChromeCommandLinePrefStore::ApplyBackgroundModeSwitches() {
162 if (command_line()->HasSwitch(switches::kDisableExtensions)) { 164 if (command_line()->HasSwitch(switches::kDisableExtensions)) {
163 SetValue(prefs::kBackgroundModeEnabled, 165 SetValue(prefs::kBackgroundModeEnabled,
164 base::MakeUnique<base::Value>(false), 166 base::MakeUnique<base::Value>(false),
165 WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS); 167 WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
166 } 168 }
167 } 169 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698