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

Side by Side Diff: chrome/common/net/url_fixer_upper.h

Issue 105473003: Add explicit base namespace to string16 users. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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/common/multi_process_lock_win.cc ('k') | chrome/common/net/url_fixer_upper.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef CHROME_COMMON_NET_URL_FIXER_UPPER_H_ 5 #ifndef CHROME_COMMON_NET_URL_FIXER_UPPER_H_
6 #define CHROME_COMMON_NET_URL_FIXER_UPPER_H_ 6 #define CHROME_COMMON_NET_URL_FIXER_UPPER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 13 matching lines...) Expand all
24 // options. This is NOT the place for converting between different types of 24 // options. This is NOT the place for converting between different types of
25 // URLs or parsing them, see net_util.h for that. 25 // URLs or parsing them, see net_util.h for that.
26 namespace URLFixerUpper { 26 namespace URLFixerUpper {
27 27
28 // Segments the given text string into parts of a URL. This is most useful 28 // Segments the given text string into parts of a URL. This is most useful
29 // for schemes such as http, https, and ftp where |SegmentURL| will find many 29 // for schemes such as http, https, and ftp where |SegmentURL| will find many
30 // segments. Currently does not segment "file" schemes. 30 // segments. Currently does not segment "file" schemes.
31 // Returns the canonicalized scheme, or the empty string when |text| is only 31 // Returns the canonicalized scheme, or the empty string when |text| is only
32 // whitespace. 32 // whitespace.
33 std::string SegmentURL(const std::string& text, url_parse::Parsed* parts); 33 std::string SegmentURL(const std::string& text, url_parse::Parsed* parts);
34 string16 SegmentURL(const string16& text, url_parse::Parsed* parts); 34 base::string16 SegmentURL(const base::string16& text,
35 url_parse::Parsed* parts);
35 36
36 // Converts |text| to a fixed-up URL and returns it. Attempts to make 37 // Converts |text| to a fixed-up URL and returns it. Attempts to make
37 // some "smart" adjustments to obviously-invalid input where possible. 38 // some "smart" adjustments to obviously-invalid input where possible.
38 // |text| may be an absolute path to a file, which will get converted to a 39 // |text| may be an absolute path to a file, which will get converted to a
39 // "file:" URL. 40 // "file:" URL.
40 // 41 //
41 // The result will be a "more" valid URL than the input. It may still not 42 // The result will be a "more" valid URL than the input. It may still not
42 // be valid, so check the return value's validity or use 43 // be valid, so check the return value's validity or use
43 // possibly_invalid_spec(). 44 // possibly_invalid_spec().
44 // 45 //
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 void OffsetComponent(int offset, url_parse::Component* part); 77 void OffsetComponent(int offset, url_parse::Component* part);
77 78
78 // For paths like ~, we use $HOME for the current user's home 79 // For paths like ~, we use $HOME for the current user's home
79 // directory. For tests, we allow our idea of $HOME to be overriden 80 // directory. For tests, we allow our idea of $HOME to be overriden
80 // by this variable. 81 // by this variable.
81 extern const char* home_directory_override; 82 extern const char* home_directory_override;
82 83
83 } // namespace URLFixerUpper 84 } // namespace URLFixerUpper
84 85
85 #endif // CHROME_COMMON_NET_URL_FIXER_UPPER_H_ 86 #endif // CHROME_COMMON_NET_URL_FIXER_UPPER_H_
OLDNEW
« no previous file with comments | « chrome/common/multi_process_lock_win.cc ('k') | chrome/common/net/url_fixer_upper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698