diff options
author | brettw <brettw@chromium.org> | 2015-08-07 17:28:47 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-08-08 00:29:27 +0000 |
commit | 26dab8f049217794bd73a230ea567021adc09672 (patch) | |
tree | 226dec9ffde922a61c6d05f0d8ee549f0a9dd02d /extensions/common/features | |
parent | dbae293445fa5a6c8ba5cea0c7290f436d1034ab (diff) | |
download | chromium_src-26dab8f049217794bd73a230ea567021adc09672.zip chromium_src-26dab8f049217794bd73a230ea567021adc09672.tar.gz chromium_src-26dab8f049217794bd73a230ea567021adc09672.tar.bz2 |
Update SplitString calls to new form
Uses the new form for most (but not quite all) of the remaining users of the old form.
Reland of https://codereview.chromium.org/1272823003 but with no changes to the way media parses codec lists. The previous landing attempted to simplify some handling but there are layout tests that expect the old behavior, and I'm not qualified to tell if it's OK to change.
TBR=sky
Review URL: https://codereview.chromium.org/1274123003
Cr-Commit-Position: refs/heads/master@{#342489}
Diffstat (limited to 'extensions/common/features')
-rw-r--r-- | extensions/common/features/base_feature_provider.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/extensions/common/features/base_feature_provider.cc b/extensions/common/features/base_feature_provider.cc index 472e1f55..cae08d6 100644 --- a/extensions/common/features/base_feature_provider.cc +++ b/extensions/common/features/base_feature_provider.cc @@ -52,8 +52,8 @@ BaseFeatureProvider::BaseFeatureProvider(const base::DictionaryValue& root, if (iter.value().GetType() == base::Value::TYPE_DICTIONARY) { linked_ptr<SimpleFeature> feature((*factory_)()); - std::vector<std::string> split; - base::SplitString(iter.key(), '.', &split); + std::vector<std::string> split = base::SplitString( + iter.key(), ".", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); // Push parent features on the stack, starting with the current feature. // If one of the features has "noparent" set, stop pushing features on @@ -171,8 +171,8 @@ Feature* BaseFeatureProvider::GetParent(Feature* feature) const { if (feature->no_parent()) return nullptr; - std::vector<std::string> split; - base::SplitString(feature->name(), '.', &split); + std::vector<std::string> split = base::SplitString( + feature->name(), ".", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); if (split.size() < 2) return nullptr; split.pop_back(); |