Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(327)

Side by Side Diff: extensions/browser/api/vpn_provider/vpn_provider_api.cc

Issue 1237873004: Revert of Move JoinString to the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "extensions/browser/api/vpn_provider/vpn_provider_api.h" 5 #include "extensions/browser/api/vpn_provider/vpn_provider_api.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 parameters.address, kCIDRSeperator, base::KEEP_WHITESPACE, 105 parameters.address, kCIDRSeperator, base::KEEP_WHITESPACE,
106 base::SPLIT_WANT_NONEMPTY); 106 base::SPLIT_WANT_NONEMPTY);
107 CHECK_EQ(2u, cidr_parts.size()); 107 CHECK_EQ(2u, cidr_parts.size());
108 108
109 parameter_value->SetStringWithoutPathExpansion( 109 parameter_value->SetStringWithoutPathExpansion(
110 shill::kAddressParameterThirdPartyVpn, cidr_parts[0]); 110 shill::kAddressParameterThirdPartyVpn, cidr_parts[0]);
111 111
112 parameter_value->SetStringWithoutPathExpansion( 112 parameter_value->SetStringWithoutPathExpansion(
113 shill::kSubnetPrefixParameterThirdPartyVpn, cidr_parts[1]); 113 shill::kSubnetPrefixParameterThirdPartyVpn, cidr_parts[1]);
114 114
115 std::string ip_delimiter(1, shill::kIPDelimiter);
116 parameter_value->SetStringWithoutPathExpansion( 115 parameter_value->SetStringWithoutPathExpansion(
117 shill::kExclusionListParameterThirdPartyVpn, 116 shill::kExclusionListParameterThirdPartyVpn,
118 base::JoinString(parameters.exclusion_list, ip_delimiter)); 117 JoinString(parameters.exclusion_list, shill::kIPDelimiter));
119 118
120 parameter_value->SetStringWithoutPathExpansion( 119 parameter_value->SetStringWithoutPathExpansion(
121 shill::kInclusionListParameterThirdPartyVpn, 120 shill::kInclusionListParameterThirdPartyVpn,
122 base::JoinString(parameters.inclusion_list, ip_delimiter)); 121 JoinString(parameters.inclusion_list, shill::kIPDelimiter));
123 122
124 if (parameters.mtu) { 123 if (parameters.mtu) {
125 parameter_value->SetStringWithoutPathExpansion( 124 parameter_value->SetStringWithoutPathExpansion(
126 shill::kMtuParameterThirdPartyVpn, *parameters.mtu); 125 shill::kMtuParameterThirdPartyVpn, *parameters.mtu);
127 } 126 }
128 127
129 if (parameters.broadcast_address) { 128 if (parameters.broadcast_address) {
130 parameter_value->SetStringWithoutPathExpansion( 129 parameter_value->SetStringWithoutPathExpansion(
131 shill::kBroadcastAddressParameterThirdPartyVpn, 130 shill::kBroadcastAddressParameterThirdPartyVpn,
132 *parameters.broadcast_address); 131 *parameters.broadcast_address);
133 } 132 }
134 133
135 std::string non_ip_delimiter(1, shill::kNonIPDelimiter);
136 if (parameters.domain_search) { 134 if (parameters.domain_search) {
137 parameter_value->SetStringWithoutPathExpansion( 135 parameter_value->SetStringWithoutPathExpansion(
138 shill::kDomainSearchParameterThirdPartyVpn, 136 shill::kDomainSearchParameterThirdPartyVpn,
139 base::JoinString(*parameters.domain_search, non_ip_delimiter)); 137 JoinString(*parameters.domain_search, shill::kNonIPDelimiter));
140 } 138 }
141 139
142 parameter_value->SetStringWithoutPathExpansion( 140 parameter_value->SetStringWithoutPathExpansion(
143 shill::kDnsServersParameterThirdPartyVpn, 141 shill::kDnsServersParameterThirdPartyVpn,
144 base::JoinString(parameters.dns_servers, ip_delimiter)); 142 JoinString(parameters.dns_servers, shill::kIPDelimiter));
145 143
146 return; 144 return;
147 } 145 }
148 146
149 } // namespace 147 } // namespace
150 148
151 VpnThreadExtensionFunction::~VpnThreadExtensionFunction() { 149 VpnThreadExtensionFunction::~VpnThreadExtensionFunction() {
152 } 150 }
153 151
154 void VpnThreadExtensionFunction::SignalCallCompletionSuccess() { 152 void VpnThreadExtensionFunction::SignalCallCompletionSuccess() {
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 SignalCallCompletionSuccess, 321 SignalCallCompletionSuccess,
324 this), 322 this),
325 base::Bind(&VpnProviderNotifyConnectionStateChangedFunction:: 323 base::Bind(&VpnProviderNotifyConnectionStateChangedFunction::
326 SignalCallCompletionFailure, 324 SignalCallCompletionFailure,
327 this)); 325 this));
328 326
329 return RespondLater(); 327 return RespondLater();
330 } 328 }
331 329
332 } // namespace extensions 330 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/api/management/management_api.cc ('k') | extensions/browser/content_verifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698