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/browser/updater | |
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/browser/updater')
-rw-r--r-- | extensions/browser/updater/extension_downloader.cc | 4 | ||||
-rw-r--r-- | extensions/browser/updater/manifest_fetch_data.cc | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/extensions/browser/updater/extension_downloader.cc b/extensions/browser/updater/extension_downloader.cc index a038ebb..d1d6468 100644 --- a/extensions/browser/updater/extension_downloader.cc +++ b/extensions/browser/updater/extension_downloader.cc @@ -136,7 +136,7 @@ bool IncrementAuthUserIndex(GURL* url) { return false; new_query_parts.push_back( base::StringPrintf("%s=%d", kAuthUserQueryKey, user_index + 1)); - std::string new_query_string = JoinString(new_query_parts, '&'); + std::string new_query_string = base::JoinString(new_query_parts, "&"); url::Component new_query(0, new_query_string.size()); url::Replacements<char> replacements; replacements.SetQuery(new_query_string.c_str(), new_query); @@ -469,7 +469,7 @@ void ExtensionDownloader::CreateManifestFetcher() { std::vector<std::string> id_vector( manifests_queue_.active_request()->extension_ids().begin(), manifests_queue_.active_request()->extension_ids().end()); - std::string id_list = JoinString(id_vector, ','); + std::string id_list = base::JoinString(id_vector, ","); VLOG(2) << "Fetching " << manifests_queue_.active_request()->full_url() << " for " << id_list; } diff --git a/extensions/browser/updater/manifest_fetch_data.cc b/extensions/browser/updater/manifest_fetch_data.cc index 6511a1e..f72f32e 100644 --- a/extensions/browser/updater/manifest_fetch_data.cc +++ b/extensions/browser/updater/manifest_fetch_data.cc @@ -143,7 +143,8 @@ bool ManifestFetchData::AddExtension(const std::string& id, } std::string extra = full_url_.has_query() ? "&" : "?"; - extra += "x=" + net::EscapeQueryParamValue(JoinString(parts, '&'), true); + extra += + "x=" + net::EscapeQueryParamValue(base::JoinString(parts, "&"), true); // Check against our max url size, exempting the first extension added. int new_size = full_url_.possibly_invalid_spec().size() + extra.size(); |