| OLD | NEW |
| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | |
| 9 #include <string> | 8 #include <string> |
| 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "ash/ash_switches.h" | 12 #include "ash/ash_switches.h" |
| 13 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
| 14 #include "base/logging.h" | 14 #include "base/logging.h" |
| 15 #include "base/macros.h" | 15 #include "base/macros.h" |
| 16 #include "base/strings/string_number_conversions.h" | 16 #include "base/strings/string_number_conversions.h" |
| 17 #include "base/strings/string_split.h" | 17 #include "base/strings/string_split.h" |
| 18 #include "base/values.h" | 18 #include "base/values.h" |
| 19 #include "build/build_config.h" | 19 #include "build/build_config.h" |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS); | 187 WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS); |
| 188 } | 188 } |
| 189 } | 189 } |
| 190 | 190 |
| 191 void CommandLinePrefStore::ApplySSLSwitches() { | 191 void CommandLinePrefStore::ApplySSLSwitches() { |
| 192 if (command_line_->HasSwitch(switches::kCipherSuiteBlacklist)) { | 192 if (command_line_->HasSwitch(switches::kCipherSuiteBlacklist)) { |
| 193 scoped_ptr<base::ListValue> list_value(new base::ListValue()); | 193 scoped_ptr<base::ListValue> list_value(new base::ListValue()); |
| 194 list_value->AppendStrings(base::SplitString( | 194 list_value->AppendStrings(base::SplitString( |
| 195 command_line_->GetSwitchValueASCII(switches::kCipherSuiteBlacklist), | 195 command_line_->GetSwitchValueASCII(switches::kCipherSuiteBlacklist), |
| 196 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL)); | 196 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL)); |
| 197 SetValue(ssl_config::prefs::kCipherSuiteBlacklist, list_value.Pass(), | 197 SetValue(ssl_config::prefs::kCipherSuiteBlacklist, std::move(list_value), |
| 198 WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS); | 198 WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS); |
| 199 } | 199 } |
| 200 } | 200 } |
| 201 | 201 |
| 202 void CommandLinePrefStore::ApplyBackgroundModeSwitches() { | 202 void CommandLinePrefStore::ApplyBackgroundModeSwitches() { |
| 203 if (command_line_->HasSwitch(switches::kDisableExtensions)) { | 203 if (command_line_->HasSwitch(switches::kDisableExtensions)) { |
| 204 SetValue(prefs::kBackgroundModeEnabled, | 204 SetValue(prefs::kBackgroundModeEnabled, |
| 205 make_scoped_ptr(new base::FundamentalValue(false)), | 205 make_scoped_ptr(new base::FundamentalValue(false)), |
| 206 WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS); | 206 WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS); |
| 207 } | 207 } |
| 208 } | 208 } |
| OLD | NEW |