diff options
author | brettw <brettw@chromium.org> | 2015-07-14 22:19:26 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-15 05:20:15 +0000 |
commit | d94a2214777c98910f946b6a15258618215545f4 (patch) | |
tree | d5ae23a49e50d06b187e122578a7856a36adbc2b /extensions/browser/api/vpn_provider | |
parent | 65c576eee7276db9f003a553dd01970778d631ad (diff) | |
download | chromium_src-d94a2214777c98910f946b6a15258618215545f4.zip chromium_src-d94a2214777c98910f946b6a15258618215545f4.tar.gz chromium_src-d94a2214777c98910f946b6a15258618215545f4.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
Committed: https://crrev.com/0eabfa001ba06d3c66992b95b69a988ef0633992
Cr-Commit-Position: refs/heads/master@{#338762}
patch from issue 1223153003 at patchset 160001 (http://crrev.com/1223153003#ps160001)
BUG=
Review URL: https://codereview.chromium.org/1230243005
Cr-Commit-Position: refs/heads/master@{#338819}
Diffstat (limited to 'extensions/browser/api/vpn_provider')
-rw-r--r-- | extensions/browser/api/vpn_provider/vpn_provider_api.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/extensions/browser/api/vpn_provider/vpn_provider_api.cc b/extensions/browser/api/vpn_provider/vpn_provider_api.cc index 069f171..e3b80ae 100644 --- a/extensions/browser/api/vpn_provider/vpn_provider_api.cc +++ b/extensions/browser/api/vpn_provider/vpn_provider_api.cc @@ -112,13 +112,14 @@ void ConvertParameters(const api_vpn::Parameters& parameters, parameter_value->SetStringWithoutPathExpansion( shill::kSubnetPrefixParameterThirdPartyVpn, cidr_parts[1]); + std::string ip_delimiter(1, shill::kIPDelimiter); parameter_value->SetStringWithoutPathExpansion( shill::kExclusionListParameterThirdPartyVpn, - JoinString(parameters.exclusion_list, shill::kIPDelimiter)); + base::JoinString(parameters.exclusion_list, ip_delimiter)); parameter_value->SetStringWithoutPathExpansion( shill::kInclusionListParameterThirdPartyVpn, - JoinString(parameters.inclusion_list, shill::kIPDelimiter)); + base::JoinString(parameters.inclusion_list, ip_delimiter)); if (parameters.mtu) { parameter_value->SetStringWithoutPathExpansion( @@ -131,15 +132,16 @@ void ConvertParameters(const api_vpn::Parameters& parameters, *parameters.broadcast_address); } + std::string non_ip_delimiter(1, shill::kNonIPDelimiter); if (parameters.domain_search) { parameter_value->SetStringWithoutPathExpansion( shill::kDomainSearchParameterThirdPartyVpn, - JoinString(*parameters.domain_search, shill::kNonIPDelimiter)); + base::JoinString(*parameters.domain_search, non_ip_delimiter)); } parameter_value->SetStringWithoutPathExpansion( shill::kDnsServersParameterThirdPartyVpn, - JoinString(parameters.dns_servers, shill::kIPDelimiter)); + base::JoinString(parameters.dns_servers, ip_delimiter)); return; } |