summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-01 18:01:49 +0000
committervitalybuka@chromium.org <vitalybuka@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-01 18:01:49 +0000
commit04307e0c502a22c7c07d8bdfd2a8209de64f197b (patch)
tree47be3bb8174b85f2ae2d21e3bcd89a965c76936e
parentd13e288993386e917a708238f062988fdf2d0ef0 (diff)
downloadchromium_src-04307e0c502a22c7c07d8bdfd2a8209de64f197b.zip
chromium_src-04307e0c502a22c7c07d8bdfd2a8209de64f197b.tar.gz
chromium_src-04307e0c502a22c7c07d8bdfd2a8209de64f197b.tar.bz2
Renamed namespaces of url lib.
url_util -> url url_parse -> url url_canon -> url BUG=364747 TBR=atwilson,battre Review URL: https://codereview.chromium.org/262593002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267579 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--android_webview/lib/main/webview_entry_point.cc4
-rw-r--r--android_webview/renderer/aw_render_view_ext.cc7
-rw-r--r--chrome/common/cloud_print/cloud_print_helpers.h2
-rw-r--r--components/policy/core/browser/url_blacklist_manager.cc18
-rw-r--r--components/policy/core/browser/url_blacklist_manager.h3
-rw-r--r--components/url_matcher/url_matcher.cc8
-rw-r--r--extensions/common/permissions/socket_permission_entry.cc8
-rw-r--r--extensions/common/url_pattern.cc10
-rw-r--r--google_apis/drive/gdata_wapi_url_generator_unittest.cc2
-rw-r--r--ppapi/shared_impl/ppb_url_util_shared.cc5
-rw-r--r--printing/backend/cups_helper.cc2
-rw-r--r--remoting/host/setup/oauth_helper.cc12
-rw-r--r--sync/internal_api/http_bridge.cc3
13 files changed, 41 insertions, 43 deletions
diff --git a/android_webview/lib/main/webview_entry_point.cc b/android_webview/lib/main/webview_entry_point.cc
index 1eefd52..1aa1d27 100644
--- a/android_webview/lib/main/webview_entry_point.cc
+++ b/android_webview/lib/main/webview_entry_point.cc
@@ -49,10 +49,10 @@ JNI_EXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) {
content::SetContentMainDelegate(new android_webview::AwMainDelegate());
- // Initialize url_util here while we are still single-threaded, in case we use
+ // Initialize url lib here while we are still single-threaded, in case we use
// CookieManager before initializing Chromium (which would normally have done
// this). It's safe to call this multiple times.
- url_util::Initialize();
+ url::Initialize();
return JNI_VERSION_1_4;
}
diff --git a/android_webview/renderer/aw_render_view_ext.cc b/android_webview/renderer/aw_render_view_ext.cc
index b12821e..033fce6 100644
--- a/android_webview/renderer/aw_render_view_ext.cc
+++ b/android_webview/renderer/aw_render_view_ext.cc
@@ -69,9 +69,10 @@ bool RemovePrefixAndAssignIfMatches(const base::StringPiece& prefix,
const base::StringPiece spec(url.possibly_invalid_spec());
if (spec.starts_with(prefix)) {
- url_canon::RawCanonOutputW<1024> output;
- url_util::DecodeURLEscapeSequences(spec.data() + prefix.length(),
- spec.length() - prefix.length(), &output);
+ url::RawCanonOutputW<1024> output;
+ url::DecodeURLEscapeSequences(spec.data() + prefix.length(),
+ spec.length() - prefix.length(),
+ &output);
std::string decoded_url = base::UTF16ToUTF8(
base::string16(output.data(), output.length()));
dest->assign(decoded_url.begin(), decoded_url.end());
diff --git a/chrome/common/cloud_print/cloud_print_helpers.h b/chrome/common/cloud_print/cloud_print_helpers.h
index 3aba232..273e6d4 100644
--- a/chrome/common/cloud_print/cloud_print_helpers.h
+++ b/chrome/common/cloud_print/cloud_print_helpers.h
@@ -27,7 +27,7 @@ typedef std::map<std::string, std::string> PrinterTags;
// URL's path does not end with a slash. It is assumed that |path| does not
// begin with a '/'.
// NOTE: Since we ALWAYS want to append here, we simply append the path string
-// instead of calling url_utils::ResolveRelative. The input |url| may or may not
+// instead of calling url::ResolveRelative. The input |url| may or may not
// contain a '/' at the end.
std::string AppendPathToUrl(const GURL& url, const std::string& path);
diff --git a/components/policy/core/browser/url_blacklist_manager.cc b/components/policy/core/browser/url_blacklist_manager.cc
index 1da4adf..0706080 100644
--- a/components/policy/core/browser/url_blacklist_manager.cc
+++ b/components/policy/core/browser/url_blacklist_manager.cc
@@ -57,9 +57,9 @@ void ProcessQueryToConditions(
const std::string& query,
bool allow,
std::set<URLQueryElementMatcherCondition>* query_conditions) {
- url_parse::Component query_left = url_parse::MakeRange(0, query.length());
- url_parse::Component key;
- url_parse::Component value;
+ url::Component query_left = url::MakeRange(0, query.length());
+ url::Component key;
+ url::Component value;
// Depending on the filter type being black-list or white-list, the matcher
// choose any or every match. The idea is a URL should be black-listed if
// there is any occurrence of the key value pair. It should be white-listed
@@ -201,7 +201,7 @@ bool URLBlacklist::FilterToComponents(SegmentURLCallback segment_url,
uint16* port,
std::string* path,
std::string* query) {
- url_parse::Parsed parsed;
+ url::Parsed parsed;
if (segment_url(filter, &parsed) == kFileScheme) {
base::FilePath file_path;
@@ -241,11 +241,11 @@ bool URLBlacklist::FilterToComponents(SegmentURLCallback segment_url,
host->erase(0, 1);
*match_subdomains = false;
} else {
- url_canon::RawCanonOutputT<char> output;
- url_canon::CanonHostInfo host_info;
- url_canon::CanonicalizeHostVerbose(filter.c_str(), parsed.host,
- &output, &host_info);
- if (host_info.family == url_canon::CanonHostInfo::NEUTRAL) {
+ url::RawCanonOutputT<char> output;
+ url::CanonHostInfo host_info;
+ url::CanonicalizeHostVerbose(filter.c_str(), parsed.host, &output,
+ &host_info);
+ if (host_info.family == url::CanonHostInfo::NEUTRAL) {
// We want to match subdomains. Add a dot in front to make sure we only
// match at domain component boundaries.
*host = "." + *host;
diff --git a/components/policy/core/browser/url_blacklist_manager.h b/components/policy/core/browser/url_blacklist_manager.h
index 9052e95..b2bf418 100644
--- a/components/policy/core/browser/url_blacklist_manager.h
+++ b/components/policy/core/browser/url_blacklist_manager.h
@@ -43,8 +43,7 @@ class POLICY_EXPORT URLBlacklist {
public:
// This is meant to be bound to URLFixerUpper::SegmentURL. See that function
// for documentation on the parameters and return value.
- typedef std::string (*SegmentURLCallback)(const std::string&,
- url_parse::Parsed*);
+ typedef std::string (*SegmentURLCallback)(const std::string&, url::Parsed*);
explicit URLBlacklist(SegmentURLCallback segment_url);
virtual ~URLBlacklist();
diff --git a/components/url_matcher/url_matcher.cc b/components/url_matcher/url_matcher.cc
index f40906f..3798f7e 100644
--- a/components/url_matcher/url_matcher.cc
+++ b/components/url_matcher/url_matcher.cc
@@ -386,8 +386,8 @@ std::string URLMatcherConditionFactory::CanonicalizeURLForFullSearches(
// Clear port if it is implicit from scheme.
if (url.has_port()) {
const std::string& port = url.scheme();
- if (url_canon::DefaultPortForScheme(port.c_str(), port.size()) ==
- url.EffectiveIntPort()) {
+ if (url::DefaultPortForScheme(port.c_str(), port.size()) ==
+ url.EffectiveIntPort()) {
replacements.ClearPort();
}
}
@@ -407,8 +407,8 @@ static std::string CanonicalizeURLForRegexSearchesHelper(
// Clear port if it is implicit from scheme.
if (url.has_port()) {
const std::string& port = url.scheme();
- if (url_canon::DefaultPortForScheme(port.c_str(), port.size()) ==
- url.EffectiveIntPort()) {
+ if (url::DefaultPortForScheme(port.c_str(), port.size()) ==
+ url.EffectiveIntPort()) {
replacements.ClearPort();
}
}
diff --git a/extensions/common/permissions/socket_permission_entry.cc b/extensions/common/permissions/socket_permission_entry.cc
index 8c21edc..ddadf22 100644
--- a/extensions/common/permissions/socket_permission_entry.cc
+++ b/extensions/common/permissions/socket_permission_entry.cc
@@ -85,10 +85,10 @@ bool SocketPermissionEntry::Check(
if (!pattern_.host.empty()) {
// Do not wildcard part of IP address.
- url_parse::Component component(0, lhost.length());
- url_canon::RawCanonOutputT<char, 128> ignored_output;
- url_canon::CanonHostInfo host_info;
- url_canon::CanonicalizeIPAddress(
+ url::Component component(0, lhost.length());
+ url::RawCanonOutputT<char, 128> ignored_output;
+ url::CanonHostInfo host_info;
+ url::CanonicalizeIPAddress(
lhost.c_str(), component, &ignored_output, &host_info);
if (host_info.IsIPAddress())
return false;
diff --git a/extensions/common/url_pattern.cc b/extensions/common/url_pattern.cc
index 477d3dd..fc7efbf 100644
--- a/extensions/common/url_pattern.cc
+++ b/extensions/common/url_pattern.cc
@@ -73,8 +73,8 @@ bool IsStandardScheme(const std::string& scheme) {
if (scheme == "*")
return true;
- return url_util::IsStandard(scheme.c_str(),
- url_parse::Component(0, static_cast<int>(scheme.length())));
+ return url::IsStandard(scheme.c_str(),
+ url::Component(0, static_cast<int>(scheme.length())));
}
bool IsValidPortForScheme(const std::string& scheme, const std::string& port) {
@@ -82,12 +82,12 @@ bool IsValidPortForScheme(const std::string& scheme, const std::string& port) {
return true;
// Only accept non-wildcard ports if the scheme uses ports.
- if (url_canon::DefaultPortForScheme(scheme.c_str(), scheme.length()) ==
- url_parse::PORT_UNSPECIFIED) {
+ if (url::DefaultPortForScheme(scheme.c_str(), scheme.length()) ==
+ url::PORT_UNSPECIFIED) {
return false;
}
- int parsed_port = url_parse::PORT_UNSPECIFIED;
+ int parsed_port = url::PORT_UNSPECIFIED;
if (!base::StringToInt(port, &parsed_port))
return false;
return (parsed_port >= 0) && (parsed_port < 65536);
diff --git a/google_apis/drive/gdata_wapi_url_generator_unittest.cc b/google_apis/drive/gdata_wapi_url_generator_unittest.cc
index 7699732..0ac8508 100644
--- a/google_apis/drive/gdata_wapi_url_generator_unittest.cc
+++ b/google_apis/drive/gdata_wapi_url_generator_unittest.cc
@@ -41,7 +41,7 @@ TEST_F(GDataWapiUrlGeneratorTest, GenerateEditUrlWithoutParams) {
}
TEST_F(GDataWapiUrlGeneratorTest, GenerateEditUrlWithEmbedOrigin) {
- url_util::AddStandardScheme("chrome-extension");
+ url::AddStandardScheme("chrome-extension");
EXPECT_EQ(
"https://docs.google.com/feeds/default/private/full/XXX?v=3&alt=json"
diff --git a/ppapi/shared_impl/ppb_url_util_shared.cc b/ppapi/shared_impl/ppb_url_util_shared.cc
index b328059..0e90f2f 100644
--- a/ppapi/shared_impl/ppb_url_util_shared.cc
+++ b/ppapi/shared_impl/ppb_url_util_shared.cc
@@ -14,7 +14,7 @@ namespace ppapi {
namespace {
-void ConvertComponent(const url_parse::Component& input,
+void ConvertComponent(const url::Component& input,
PP_URLComponent_Dev* output) {
output->begin = input.begin;
output->len = input.len;
@@ -26,8 +26,7 @@ void ConvertComponent(const url_parse::Component& input,
//
// Output can be NULL to specify "do nothing." This rule is followed by all the
// url util functions, so we implement it once here.
-void ConvertComponents(const url_parse::Parsed& input,
- PP_URLComponents_Dev* output) {
+void ConvertComponents(const url::Parsed& input, PP_URLComponents_Dev* output) {
if (!output)
return;
diff --git a/printing/backend/cups_helper.cc b/printing/backend/cups_helper.cc
index 9215bb9..296b95e 100644
--- a/printing/backend/cups_helper.cc
+++ b/printing/backend/cups_helper.cc
@@ -314,7 +314,7 @@ HttpConnectionCUPS::HttpConnectionCUPS(const GURL& print_server_url,
return;
int port = print_server_url.IntPort();
- if (port == url_parse::PORT_UNSPECIFIED)
+ if (port == url::PORT_UNSPECIFIED)
port = kDefaultIPPServerPort;
http_ = httpConnectEncrypt(print_server_url.host().c_str(), port, encryption);
diff --git a/remoting/host/setup/oauth_helper.cc b/remoting/host/setup/oauth_helper.cc
index 7746df1..65f06bc 100644
--- a/remoting/host/setup/oauth_helper.cc
+++ b/remoting/host/setup/oauth_helper.cc
@@ -12,7 +12,7 @@
namespace {
std::string GetComponent(const std::string& url,
- const url_parse::Component component) {
+ const url::Component component) {
if (component.len < 0) {
return std::string();
}
@@ -53,9 +53,9 @@ std::string GetOauthStartUrl(const std::string& redirect_url) {
std::string GetOauthCodeInUrl(const std::string& url,
const std::string& redirect_url) {
- url_parse::Parsed url_parsed;
+ url::Parsed url_parsed;
ParseStandardURL(url.c_str(), url.length(), &url_parsed);
- url_parse::Parsed redirect_url_parsed;
+ url::Parsed redirect_url_parsed;
ParseStandardURL(redirect_url.c_str(), redirect_url.length(),
&redirect_url_parsed);
if (GetComponent(url, url_parsed.scheme) !=
@@ -66,9 +66,9 @@ std::string GetOauthCodeInUrl(const std::string& url,
GetComponent(redirect_url, redirect_url_parsed.host)) {
return std::string();
}
- url_parse::Component query = url_parsed.query;
- url_parse::Component key;
- url_parse::Component value;
+ url::Component query = url_parsed.query;
+ url::Component key;
+ url::Component value;
while (ExtractQueryKeyValue(url.c_str(), &query, &key, &value)) {
if (GetComponent(url, key) == "code") {
return GetComponent(url, value);
diff --git a/sync/internal_api/http_bridge.cc b/sync/internal_api/http_bridge.cc
index 59d04fa..fe700f8 100644
--- a/sync/internal_api/http_bridge.cc
+++ b/sync/internal_api/http_bridge.cc
@@ -210,8 +210,7 @@ void HttpBridge::SetURL(const char* url, int port) {
GURL temp(url);
GURL::Replacements replacements;
std::string port_str = base::IntToString(port);
- replacements.SetPort(port_str.c_str(),
- url_parse::Component(0, port_str.length()));
+ replacements.SetPort(port_str.c_str(), url::Component(0, port_str.length()));
url_for_request_ = temp.ReplaceComponents(replacements);
}