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

Unified Diff: net/dns/dns_hosts.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, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/cookies/cookie_util.cc ('k') | net/ftp/ftp_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/dns/dns_hosts.cc
diff --git a/net/dns/dns_hosts.cc b/net/dns/dns_hosts.cc
index 66290b461bc080aeaa99091e72afccc7a354fccd..82f4243d3053097a248245d28b4309bf66aae181 100644
--- a/net/dns/dns_hosts.cc
+++ b/net/dns/dns_hosts.cc
@@ -7,8 +7,8 @@
#include "base/file_util.h"
#include "base/logging.h"
#include "base/metrics/histogram.h"
-#include "base/string_tokenizer.h"
#include "base/string_util.h"
+#include "base/strings/string_tokenizer.h"
namespace net {
@@ -16,17 +16,17 @@ void ParseHosts(const std::string& contents, DnsHosts* dns_hosts) {
CHECK(dns_hosts);
DnsHosts& hosts = *dns_hosts;
// Split into lines. Accept CR for Windows.
- StringTokenizer contents_lines(contents, "\n\r");
+ base::StringTokenizer contents_lines(contents, "\n\r");
while (contents_lines.GetNext()) {
// Ignore comments after '#'.
std::string line = contents_lines.token();
- StringTokenizer line_parts(line, "#");
- line_parts.set_options(StringTokenizer::RETURN_DELIMS);
+ base::StringTokenizer line_parts(line, "#");
+ line_parts.set_options(base::StringTokenizer::RETURN_DELIMS);
if (line_parts.GetNext() && !line_parts.token_is_delim()) {
// Split and trim whitespace.
std::string part = line_parts.token();
- StringTokenizer tokens(part, " \t");
+ base::StringTokenizer tokens(part, " \t");
if (tokens.GetNext()) {
IPAddressNumber ip;
« no previous file with comments | « net/cookies/cookie_util.cc ('k') | net/ftp/ftp_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698