Skip to content

Commit

Permalink
Renamed namespaces of url lib and removed namespace aliases.
Browse files Browse the repository at this point in the history
url_util -> url
url_parse -> url
url_canon -> url

BUG=364747
TBR=estade

Review URL: https://codereview.chromium.org/260903011

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267681 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
vitalybuka@chromium.org committed May 2, 2014
1 parent 37c01b9 commit 47e365d
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,10 @@ bool IsSignInContinueUrl(const GURL& url, size_t* user_index) {

*user_index = 0;
std::string query_str = url.query();
url_parse::Component query(0, query_str.length());
url_parse::Component key, value;
url::Component query(0, query_str.length());
url::Component key, value;
const char kUserIndexKey[] = "authuser";
while (url_parse::ExtractQueryKeyValue(query_str.c_str(), &query, &key,
&value)) {
while (url::ExtractQueryKeyValue(query_str.c_str(), &query, &key, &value)) {
if (key.is_nonempty() &&
query_str.substr(key.begin, key.len) == kUserIndexKey) {
base::StringToSizeT(query_str.substr(value.begin, value.len), user_index);
Expand Down
2 changes: 1 addition & 1 deletion net/base/filename_util_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ TEST(FilenameUtilTest, GenerateFileName) {
},
{ // Now that we use src/url's ExtractFileName, this case falls back to
// the hostname. If this behavior is not desirable, we'd better change
// ExtractFileName (in url_parse).
// ExtractFileName (in url_parse.cc).
__LINE__,
"http://www.google.com/path/",
"",
Expand Down
4 changes: 2 additions & 2 deletions url/gurl_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ std::string TypesTestCase(const char* src) {

} // namespace

// Different types of URLs should be handled differently by url_util, and
// handed off to different canonicalizers.
// Different types of URLs should be handled differently, and handed off to
// different canonicalizers.
TEST(GURLTest, Types) {
// URLs with unknown schemes should be treated as path URLs, even when they
// have things like "://".
Expand Down
2 changes: 1 addition & 1 deletion url/third_party/mozilla/url_parse.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ inline Component MakeRange(int begin, int end) {
// return I_CAN_NOT_FIND_THE_SCHEME_DUDE;
//
// if (IsStandardScheme(url, scheme)) // Not provided by this component
// url_parseParseStandardURL(url, url_len, &parsed);
// ParseStandardURL(url, url_len, &parsed);
// else if (IsFileURL(url, scheme)) // Not provided by this component
// ParseFileURL(url, url_len, &parsed);
// else
Expand Down
7 changes: 0 additions & 7 deletions url/url_export.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,4 @@

#endif // define(COMPONENT_BUILD)

// TODO(vitalybuka, crbug.com/364747) url_util is deprecated, remove after
// fixing depending code.
namespace url {}
namespace url_util = ::url;
namespace url_parse = ::url;
namespace url_canon = ::url;

#endif // URL_URL_EXPORT_H_
4 changes: 2 additions & 2 deletions webkit/common/database/database_identifier.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ DatabaseIdentifier DatabaseIdentifier::CreateFromOrigin(const GURL& origin) {
return UniqueFileIdentifier();

int port = origin.IntPort();
if (port == url_parse::PORT_INVALID)
if (port == url::PORT_INVALID)
return DatabaseIdentifier();

// We encode the default port for the specified scheme as 0. GURL
// canonicalizes this as an unspecified port.
if (port == url_parse::PORT_UNSPECIFIED)
if (port == url::PORT_UNSPECIFIED)
port = 0;

return DatabaseIdentifier(origin.scheme(),
Expand Down

0 comments on commit 47e365d

Please sign in to comment.