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

Side by Side Diff: chrome/browser/importer/firefox_proxy_settings.cc

Issue 12087091: Move string tokenizer to base/strings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sort Created 7 years, 10 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 | « chrome/browser/history/thumbnail_database.cc ('k') | chrome/browser/language_usage_metrics.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/importer/firefox_proxy_settings.h" 5 #include "chrome/browser/importer/firefox_proxy_settings.h"
6 6
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/string_tokenizer.h"
9 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/strings/string_tokenizer.h"
10 #include "base/values.h" 10 #include "base/values.h"
11 #include "chrome/browser/importer/firefox_importer_utils.h" 11 #include "chrome/browser/importer/firefox_importer_utils.h"
12 #include "net/proxy/proxy_config.h" 12 #include "net/proxy/proxy_config.h"
13 13
14 namespace { 14 namespace {
15 15
16 const char* const kNetworkProxyTypeKey = "network.proxy.type"; 16 const char* const kNetworkProxyTypeKey = "network.proxy.type";
17 const char* const kHTTPProxyKey = "network.proxy.http"; 17 const char* const kHTTPProxyKey = "network.proxy.http";
18 const char* const kHTTPProxyPortKey = "network.proxy.http_port"; 18 const char* const kHTTPProxyPortKey = "network.proxy.http_port";
19 const char* const kSSLProxyKey = "network.proxy.ssl"; 19 const char* const kSSLProxyKey = "network.proxy.ssl";
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 LOG(ERROR) << "Failed to retrieve Firefox SOCKS host"; 203 LOG(ERROR) << "Failed to retrieve Firefox SOCKS host";
204 if (!dictionary.GetInteger(kSOCKSHostPortKey, &(settings->socks_port_))) 204 if (!dictionary.GetInteger(kSOCKSHostPortKey, &(settings->socks_port_)))
205 LOG(ERROR) << "Failed to retrieve Firefox SOCKS port"; 205 LOG(ERROR) << "Failed to retrieve Firefox SOCKS port";
206 int socks_version; 206 int socks_version;
207 if (dictionary.GetInteger(kSOCKSVersionKey, &socks_version)) 207 if (dictionary.GetInteger(kSOCKSVersionKey, &socks_version))
208 settings->socks_version_ = IntToSOCKSVersion(socks_version); 208 settings->socks_version_ = IntToSOCKSVersion(socks_version);
209 209
210 std::string proxy_bypass; 210 std::string proxy_bypass;
211 if (dictionary.GetStringASCII(kNoProxyListKey, &proxy_bypass) && 211 if (dictionary.GetStringASCII(kNoProxyListKey, &proxy_bypass) &&
212 !proxy_bypass.empty()) { 212 !proxy_bypass.empty()) {
213 StringTokenizer string_tok(proxy_bypass, ","); 213 base::StringTokenizer string_tok(proxy_bypass, ",");
214 while (string_tok.GetNext()) { 214 while (string_tok.GetNext()) {
215 std::string token = string_tok.token(); 215 std::string token = string_tok.token();
216 TrimWhitespaceASCII(token, TRIM_ALL, &token); 216 TrimWhitespaceASCII(token, TRIM_ALL, &token);
217 if (!token.empty()) 217 if (!token.empty())
218 settings->proxy_bypass_list_.push_back(token); 218 settings->proxy_bypass_list_.push_back(token);
219 } 219 }
220 } 220 }
221 } 221 }
222 return true; 222 return true;
223 } 223 }
OLDNEW
« no previous file with comments | « chrome/browser/history/thumbnail_database.cc ('k') | chrome/browser/language_usage_metrics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698