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

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: Remove IOS checks 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 #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID)
84 {switches::kUseSystemDefaultPrinter,
85 prefs::kPrintPreviewUseSystemDefaultPrinter, true},
86 #endif
83 }; 87 };
84 88
85 const CommandLinePrefStore::SwitchToPreferenceMapEntry 89 const CommandLinePrefStore::SwitchToPreferenceMapEntry
86 ChromeCommandLinePrefStore::integer_switch_map_[] = { 90 ChromeCommandLinePrefStore::integer_switch_map_[] = {
87 { switches::kDiskCacheSize, prefs::kDiskCacheSize }, 91 { switches::kDiskCacheSize, prefs::kDiskCacheSize },
88 { switches::kMediaCacheSize, prefs::kMediaCacheSize }, 92 { switches::kMediaCacheSize, prefs::kMediaCacheSize },
89 }; 93 };
90 94
91 ChromeCommandLinePrefStore::ChromeCommandLinePrefStore( 95 ChromeCommandLinePrefStore::ChromeCommandLinePrefStore(
92 const base::CommandLine* command_line) 96 const base::CommandLine* command_line)
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 } 162 }
159 } 163 }
160 164
161 void ChromeCommandLinePrefStore::ApplyBackgroundModeSwitches() { 165 void ChromeCommandLinePrefStore::ApplyBackgroundModeSwitches() {
162 if (command_line()->HasSwitch(switches::kDisableExtensions)) { 166 if (command_line()->HasSwitch(switches::kDisableExtensions)) {
163 SetValue(prefs::kBackgroundModeEnabled, 167 SetValue(prefs::kBackgroundModeEnabled,
164 base::MakeUnique<base::Value>(false), 168 base::MakeUnique<base::Value>(false),
165 WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS); 169 WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
166 } 170 }
167 } 171 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698