diff options
author | brettw <brettw@chromium.org> | 2015-07-21 14:37:38 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-21 21:38:12 +0000 |
commit | c6f82b158f374c172a46326699f03d97777faa8e (patch) | |
tree | c96472fa185ca20b22fad773cd195689e4097894 /chrome/browser/prefs | |
parent | db484c3eff68c46ddf1530dd60441dba4614cb5c (diff) | |
download | chromium_src-c6f82b158f374c172a46326699f03d97777faa8e.zip chromium_src-c6f82b158f374c172a46326699f03d97777faa8e.tar.gz chromium_src-c6f82b158f374c172a46326699f03d97777faa8e.tar.bz2 |
Update SplitString calls in chrome.
In many places that iterated over the results, the code was changed to use a range-based for loop over the result of the SplitStirng call.
Review URL: https://codereview.chromium.org/1240183002
Cr-Commit-Position: refs/heads/master@{#339753}
Diffstat (limited to 'chrome/browser/prefs')
-rw-r--r-- | chrome/browser/prefs/command_line_pref_store.cc | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/chrome/browser/prefs/command_line_pref_store.cc b/chrome/browser/prefs/command_line_pref_store.cc index 80d9375..8e0cab2 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); + } } |