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

Side by Side Diff: net/proxy/proxy_config.cc

Issue 183853011: Move TrimWhitespace to the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « net/proxy/proxy_bypass_rules.cc ('k') | net/proxy/proxy_config_service_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "net/proxy/proxy_config.h" 5 #include "net/proxy/proxy_config.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/strings/string_tokenizer.h" 9 #include "base/strings/string_tokenizer.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 if (type == TYPE_PROXY_PER_SCHEME) 105 if (type == TYPE_PROXY_PER_SCHEME)
106 continue; // Unexpected. 106 continue; // Unexpected.
107 AddProxyURIListToProxyList(url_scheme, 107 AddProxyURIListToProxyList(url_scheme,
108 &single_proxies, 108 &single_proxies,
109 ProxyServer::SCHEME_HTTP); 109 ProxyServer::SCHEME_HTTP);
110 type = TYPE_SINGLE_PROXY; 110 type = TYPE_SINGLE_PROXY;
111 return; 111 return;
112 } 112 }
113 113
114 // Trim whitespace off the url scheme. 114 // Trim whitespace off the url scheme.
115 TrimWhitespaceASCII(url_scheme, TRIM_ALL, &url_scheme); 115 base::TrimWhitespaceASCII(url_scheme, base::TRIM_ALL, &url_scheme);
116 116
117 // Add it to the per-scheme mappings (if supported scheme). 117 // Add it to the per-scheme mappings (if supported scheme).
118 type = TYPE_PROXY_PER_SCHEME; 118 type = TYPE_PROXY_PER_SCHEME;
119 ProxyList* entry = MapUrlSchemeToProxyListNoFallback(url_scheme); 119 ProxyList* entry = MapUrlSchemeToProxyListNoFallback(url_scheme);
120 ProxyServer::Scheme default_scheme = ProxyServer::SCHEME_HTTP; 120 ProxyServer::Scheme default_scheme = ProxyServer::SCHEME_HTTP;
121 121
122 // socks=XXX is inconsistent with the other formats, since "socks" 122 // socks=XXX is inconsistent with the other formats, since "socks"
123 // is not a URL scheme. Rather this means "for everything else, send 123 // is not a URL scheme. Rather this means "for everything else, send
124 // it to the SOCKS proxy server XXX". 124 // it to the SOCKS proxy server XXX".
125 if (url_scheme == "socks") { 125 if (url_scheme == "socks") {
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 } 268 }
269 } 269 }
270 270
271 // Output the source. 271 // Output the source.
272 dict->SetString("source", ProxyConfigSourceToString(source_)); 272 dict->SetString("source", ProxyConfigSourceToString(source_));
273 273
274 return dict; 274 return dict;
275 } 275 }
276 276
277 } // namespace net 277 } // namespace net
OLDNEW
« no previous file with comments | « net/proxy/proxy_bypass_rules.cc ('k') | net/proxy/proxy_config_service_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698