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

Unified Diff: chrome/browser/prefs/command_line_pref_store.cc

Issue 1240183002: Update SplitString calls in chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/prefs/command_line_pref_store.cc
diff --git a/chrome/browser/prefs/command_line_pref_store.cc b/chrome/browser/prefs/command_line_pref_store.cc
index 80d9375dce4a2cf812b6ad3260226485a89ed33a..8e0cab281d6734a78b56128766766bd8764ec14c 100644
--- a/chrome/browser/prefs/command_line_pref_store.cc
+++ b/chrome/browser/prefs/command_line_pref_store.cc
@@ -176,23 +176,19 @@ void CommandLinePrefStore::ApplyProxyMode() {
void CommandLinePrefStore::ApplySSLSwitches() {
if (command_line_->HasSwitch(switches::kCipherSuiteBlacklist)) {
- std::string cipher_suites =
- command_line_->GetSwitchValueASCII(switches::kCipherSuiteBlacklist);
- std::vector<std::string> cipher_strings;
- base::SplitString(cipher_suites, ',', &cipher_strings);
scoped_ptr<base::ListValue> list_value(new base::ListValue());
- for (std::vector<std::string>::const_iterator it = cipher_strings.begin();
- it != cipher_strings.end(); ++it) {
- list_value->AppendString(*it);
- }
+ list_value->AppendStrings(base::SplitString(
+ command_line_->GetSwitchValueASCII(switches::kCipherSuiteBlacklist),
+ ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL));
SetValue(prefs::kCipherSuiteBlacklist, list_value.Pass(),
WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
}
}
void CommandLinePrefStore::ApplyBackgroundModeSwitches() {
- if (command_line_->HasSwitch(switches::kDisableExtensions))
+ if (command_line_->HasSwitch(switches::kDisableExtensions)) {
SetValue(prefs::kBackgroundModeEnabled,
make_scoped_ptr(new base::FundamentalValue(false)),
WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS);
+ }
}

Powered by Google App Engine
This is Rietveld 408576698