diff options
author | brettw <brettw@chromium.org> | 2015-07-14 15:42:19 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-14 22:43:54 +0000 |
commit | 0eabfa001ba06d3c66992b95b69a988ef0633992 (patch) | |
tree | a62a2b2c2e828f99ac192c41048e247fb0aa32da /extensions/common/features | |
parent | 28c7c11feb94dc2593e5a4bf2b7aeb9d15bd0e49 (diff) | |
download | chromium_src-0eabfa001ba06d3c66992b95b69a988ef0633992.zip chromium_src-0eabfa001ba06d3c66992b95b69a988ef0633992.tar.gz chromium_src-0eabfa001ba06d3c66992b95b69a988ef0633992.tar.bz2 |
Move JoinString to the base namespace.
Change "Separator" from string to StringPIece (most are constants). Remove char versions for symmetry with SplitString.
Update callers who pass empty separators to use a base::StringPiece()
Change chromecast/base/metrics/cast_metrics_helper.cc to not use JoinString at all and just append to the output (code is simpler and faster).
TBR=zelidrag@chromium.org for chromeos
Review URL: https://codereview.chromium.org/1223153003
Cr-Commit-Position: refs/heads/master@{#338762}
Diffstat (limited to 'extensions/common/features')
-rw-r--r-- | extensions/common/features/base_feature_provider.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/extensions/common/features/base_feature_provider.cc b/extensions/common/features/base_feature_provider.cc index 9d24d84..472e1f55 100644 --- a/extensions/common/features/base_feature_provider.cc +++ b/extensions/common/features/base_feature_provider.cc @@ -62,7 +62,7 @@ BaseFeatureProvider::BaseFeatureProvider(const base::DictionaryValue& root, std::stack<std::pair<std::string, const base::DictionaryValue*> > parse_stack; while (!split.empty()) { - std::string parent_name = JoinString(split, '.'); + std::string parent_name = base::JoinString(split, "."); split.pop_back(); if (root.HasKey(parent_name)) { const base::DictionaryValue* parent = nullptr; @@ -176,7 +176,7 @@ Feature* BaseFeatureProvider::GetParent(Feature* feature) const { if (split.size() < 2) return nullptr; split.pop_back(); - return GetFeature(JoinString(split, '.')); + return GetFeature(base::JoinString(split, ".")); } // Children of a given API are named starting with parent.name()+".", which |