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

Side by Side Diff: net/tools/dump_cache/url_utilities.cc

Issue 16652007: Use a direct include of strings headers in net/test/, net/third_party/, net/tools/, net/udp/, net/u… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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
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 "net/tools/dump_cache/url_utilities.h" 5 #include "net/tools/dump_cache/url_utilities.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "base/string_util.h" 9 #include "base/strings/string_util.h"
10 10
11 namespace net { 11 namespace net {
12 12
13 std::string UrlUtilities::GetUrlHost(const std::string& url) { 13 std::string UrlUtilities::GetUrlHost(const std::string& url) {
14 size_t b = url.find("//"); 14 size_t b = url.find("//");
15 if (b == std::string::npos) 15 if (b == std::string::npos)
16 b = 0; 16 b = 0;
17 else 17 else
18 b += 2; 18 b += 2;
19 size_t next_slash = url.find_first_of('/', b); 19 size_t next_slash = url.find_first_of('/', b);
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 // Unexpected, % followed by end of string, pass it through. 117 // Unexpected, % followed by end of string, pass it through.
118 if (state == ESCAPE1 || state == ESCAPE2) { 118 if (state == ESCAPE1 || state == ESCAPE2) {
119 unescaped_url.push_back('%'); 119 unescaped_url.push_back('%');
120 unescaped_url.append(escape_text); 120 unescaped_url.append(escape_text);
121 } 121 }
122 return unescaped_url; 122 return unescaped_url;
123 } 123 }
124 124
125 } // namespace net 125 } // namespace net
126 126
OLDNEW
« no previous file with comments | « net/tools/dump_cache/url_to_filename_encoder_unittest.cc ('k') | net/tools/dump_cache/url_utilities_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698