summaryrefslogtreecommitdiffstats
path: root/url/url_canon_filesystemurl.cc
diff options
context:
space:
mode:
authorvitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-22 00:09:23 +0000
committervitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-22 00:09:23 +0000
commit0318f92ba7c54fc5ef6397c6d58250fea95c7196 (patch)
tree5bcef0db3fb7334c5a4fd6d25444a2b86c17ec5e /url/url_canon_filesystemurl.cc
parent7b691d3fee8d10f130007016caefa0c6c6cd0681 (diff)
downloadchromium_src-0318f92ba7c54fc5ef6397c6d58250fea95c7196.zip
chromium_src-0318f92ba7c54fc5ef6397c6d58250fea95c7196.tar.gz
chromium_src-0318f92ba7c54fc5ef6397c6d58250fea95c7196.tar.bz2
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
Diffstat (limited to 'url/url_canon_filesystemurl.cc')
-rw-r--r--url/url_canon_filesystemurl.cc46
1 files changed, 21 insertions, 25 deletions
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<typename CHAR, typename UCHAR>
bool DoCanonicalizeFileSystemURL(const CHAR* spec,
const URLComponentSource<CHAR>& 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<char, unsigned char>(
spec, URLComponentSource<char>(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<base::char16, base::char16>(
spec, URLComponentSource<base::char16>(spec), parsed, charset_converter,
output, new_parsed);
}
bool ReplaceFileSystemURL(const char* base,
- const url_parse::Parsed& base_parsed,
+ const Parsed& base_parsed,
const Replacements<char>& replacements,
CharsetConverter* charset_converter,
CanonOutput* output,
- url_parse::Parsed* new_parsed) {
+ Parsed* new_parsed) {
URLComponentSource<char> source(base);
- url_parse::Parsed parsed(base_parsed);
+ Parsed parsed(base_parsed);
SetupOverrideComponents(base, replacements, &source, &parsed);
return DoCanonicalizeFileSystemURL<char, unsigned char>(
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<base::char16>& replacements,
CharsetConverter* charset_converter,
CanonOutput* output,
- url_parse::Parsed* new_parsed) {
+ Parsed* new_parsed) {
RawCanonOutput<1024> utf8;
URLComponentSource<char> source(base);
- url_parse::Parsed parsed(base_parsed);
+ Parsed parsed(base_parsed);
SetupUTF16OverrideComponents(base, replacements, &utf8, &source, &parsed);
return DoCanonicalizeFileSystemURL<char, unsigned char>(
base, source, parsed, charset_converter, output, new_parsed);
}
-} // namespace url_canon
+} // namespace url