From 0318f92ba7c54fc5ef6397c6d58250fea95c7196 Mon Sep 17 00:00:00 2001 From: "vitalybuka@chromium.org" Date: Tue, 22 Apr 2014 00:09:23 +0000 Subject: Renamed namespaces in src/url. url_util -> url url_parse -> url url_canon -> url BUG=364747 R=brettw@chromium.org, thestig@chromium.org, willchan@chromium.org Review URL: https://codereview.chromium.org/242463002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@265120 0039d316-1c4b-4281-b951-d872f2087c98 --- url/url_canon_filesystemurl.cc | 46 +++++++++++++++++++----------------------- 1 file changed, 21 insertions(+), 25 deletions(-) (limited to 'url/url_canon_filesystemurl.cc') diff --git a/url/url_canon_filesystemurl.cc b/url/url_canon_filesystemurl.cc index 225e109..f330e22 100644 --- a/url/url_canon_filesystemurl.cc +++ b/url/url_canon_filesystemurl.cc @@ -11,7 +11,7 @@ #include "url/url_util.h" #include "url/url_util_internal.h" -namespace url_canon { +namespace url { namespace { @@ -20,18 +20,18 @@ namespace { template bool DoCanonicalizeFileSystemURL(const CHAR* spec, const URLComponentSource& source, - const url_parse::Parsed& parsed, + const Parsed& parsed, CharsetConverter* charset_converter, CanonOutput* output, - url_parse::Parsed* new_parsed) { + Parsed* new_parsed) { // filesystem only uses {scheme, path, query, ref} -- clear the rest. new_parsed->username.reset(); new_parsed->password.reset(); new_parsed->host.reset(); new_parsed->port.reset(); - const url_parse::Parsed* inner_parsed = parsed.inner_parsed(); - url_parse::Parsed new_inner_parsed; + const Parsed* inner_parsed = parsed.inner_parsed(); + Parsed new_inner_parsed; // Scheme (known, so we don't bother running it through the more // complicated scheme canonicalizer). @@ -43,20 +43,16 @@ bool DoCanonicalizeFileSystemURL(const CHAR* spec, return false; bool success = true; - if (url_util::CompareSchemeComponent(spec, inner_parsed->scheme, - url_util::kFileScheme)) { + if (CompareSchemeComponent(spec, inner_parsed->scheme, kFileScheme)) { new_inner_parsed.scheme.begin = output->length(); output->Append("file://", 7); new_inner_parsed.scheme.len = 4; success &= CanonicalizePath(spec, inner_parsed->path, output, &new_inner_parsed.path); - } else if (url_util::IsStandard(spec, inner_parsed->scheme)) { - success = - url_canon::CanonicalizeStandardURL(spec, - parsed.inner_parsed()->Length(), - *parsed.inner_parsed(), - charset_converter, output, - &new_inner_parsed); + } else if (IsStandard(spec, inner_parsed->scheme)) { + success = CanonicalizeStandardURL(spec, parsed.inner_parsed()->Length(), + *parsed.inner_parsed(), charset_converter, + output, &new_inner_parsed); } else { // TODO(ericu): The URL is wrong, but should we try to output more of what // we were given? Echoing back filesystem:mailto etc. doesn't seem all that @@ -83,10 +79,10 @@ bool DoCanonicalizeFileSystemURL(const CHAR* spec, bool CanonicalizeFileSystemURL(const char* spec, int spec_len, - const url_parse::Parsed& parsed, + const Parsed& parsed, CharsetConverter* charset_converter, CanonOutput* output, - url_parse::Parsed* new_parsed) { + Parsed* new_parsed) { return DoCanonicalizeFileSystemURL( spec, URLComponentSource(spec), parsed, charset_converter, output, new_parsed); @@ -94,40 +90,40 @@ bool CanonicalizeFileSystemURL(const char* spec, bool CanonicalizeFileSystemURL(const base::char16* spec, int spec_len, - const url_parse::Parsed& parsed, + const Parsed& parsed, CharsetConverter* charset_converter, CanonOutput* output, - url_parse::Parsed* new_parsed) { + Parsed* new_parsed) { return DoCanonicalizeFileSystemURL( spec, URLComponentSource(spec), parsed, charset_converter, output, new_parsed); } bool ReplaceFileSystemURL(const char* base, - const url_parse::Parsed& base_parsed, + const Parsed& base_parsed, const Replacements& replacements, CharsetConverter* charset_converter, CanonOutput* output, - url_parse::Parsed* new_parsed) { + Parsed* new_parsed) { URLComponentSource source(base); - url_parse::Parsed parsed(base_parsed); + Parsed parsed(base_parsed); SetupOverrideComponents(base, replacements, &source, &parsed); return DoCanonicalizeFileSystemURL( base, source, parsed, charset_converter, output, new_parsed); } bool ReplaceFileSystemURL(const char* base, - const url_parse::Parsed& base_parsed, + const Parsed& base_parsed, const Replacements& replacements, CharsetConverter* charset_converter, CanonOutput* output, - url_parse::Parsed* new_parsed) { + Parsed* new_parsed) { RawCanonOutput<1024> utf8; URLComponentSource source(base); - url_parse::Parsed parsed(base_parsed); + Parsed parsed(base_parsed); SetupUTF16OverrideComponents(base, replacements, &utf8, &source, &parsed); return DoCanonicalizeFileSystemURL( base, source, parsed, charset_converter, output, new_parsed); } -} // namespace url_canon +} // namespace url -- cgit v1.1