diff options
28 files changed, 47 insertions, 47 deletions
diff --git a/android_webview/native/android_protocol_handler.cc b/android_webview/native/android_protocol_handler.cc index 1c0c922..ac57ae9 100644 --- a/android_webview/native/android_protocol_handler.cc +++ b/android_webview/native/android_protocol_handler.cc @@ -232,10 +232,10 @@ net::URLRequestJob* AndroidRequestInterceptorBase::MaybeInterceptRequest( AssetFileRequestInterceptor::AssetFileRequestInterceptor() : asset_prefix_(std::string(url::kFileScheme) + - std::string(content::kStandardSchemeSeparator) + + std::string(url::kStandardSchemeSeparator) + android_webview::kAndroidAssetPath), resource_prefix_(std::string(url::kFileScheme) + - std::string(content::kStandardSchemeSeparator) + + std::string(url::kStandardSchemeSeparator) + android_webview::kAndroidResourcePath) { } diff --git a/chrome/browser/autocomplete/autocomplete_input.cc b/chrome/browser/autocomplete/autocomplete_input.cc index f85b5db..36652d4 100644 --- a/chrome/browser/autocomplete/autocomplete_input.cc +++ b/chrome/browser/autocomplete/autocomplete_input.cc @@ -214,7 +214,7 @@ AutocompleteInput::Type AutocompleteInput::Parse( // URL of the form "username:password@foo.com". const base::string16 http_scheme_prefix = base::ASCIIToUTF16(std::string(url::kHttpScheme) + - content::kStandardSchemeSeparator); + url::kStandardSchemeSeparator); url::Parsed http_parts; base::string16 http_scheme; GURL http_canonicalized_url; diff --git a/chrome/browser/autocomplete/builtin_provider.cc b/chrome/browser/autocomplete/builtin_provider.cc index 451d2bc..615211b 100644 --- a/chrome/browser/autocomplete/builtin_provider.cc +++ b/chrome/browser/autocomplete/builtin_provider.cc @@ -71,9 +71,9 @@ void BuiltinProvider::Start(const AutocompleteInput& input, const size_t kAboutSchemeLength = strlen(content::kAboutScheme); const base::string16 kAbout = base::ASCIIToUTF16(content::kAboutScheme) + - base::ASCIIToUTF16(content::kStandardSchemeSeparator); + base::ASCIIToUTF16(url::kStandardSchemeSeparator); const base::string16 kChrome = base::ASCIIToUTF16(content::kChromeUIScheme) + - base::ASCIIToUTF16(content::kStandardSchemeSeparator); + base::ASCIIToUTF16(url::kStandardSchemeSeparator); const int kUrl = ACMatchClassification::URL; const int kMatch = kUrl | ACMatchClassification::MATCH; diff --git a/chrome/browser/autocomplete/builtin_provider_unittest.cc b/chrome/browser/autocomplete/builtin_provider_unittest.cc index d3b002f..e99751e 100644 --- a/chrome/browser/autocomplete/builtin_provider_unittest.cc +++ b/chrome/browser/autocomplete/builtin_provider_unittest.cc @@ -65,7 +65,7 @@ TEST_F(BuiltinProviderTest, TypingScheme) { const base::string16 kSeparator1 = ASCIIToUTF16(":"); const base::string16 kSeparator2 = ASCIIToUTF16(":/"); const base::string16 kSeparator3 = - ASCIIToUTF16(content::kStandardSchemeSeparator); + ASCIIToUTF16(url::kStandardSchemeSeparator); // These default URLs should correspond with those in BuiltinProvider::Start. const GURL kURL1 = GURL(chrome::kChromeUIChromeURLsURL); @@ -112,7 +112,7 @@ TEST_F(BuiltinProviderTest, TypingScheme) { const base::string16 kSeparator1 = ASCIIToUTF16(":"); const base::string16 kSeparator2 = ASCIIToUTF16(":/"); const base::string16 kSeparator3 = - ASCIIToUTF16(content::kStandardSchemeSeparator); + ASCIIToUTF16(url::kStandardSchemeSeparator); // These default URLs should correspond with those in BuiltinProvider::Start. const GURL kURL1 = GURL(chrome::kChromeUIChromeURLsURL); @@ -177,7 +177,7 @@ TEST_F(BuiltinProviderTest, ChromeURLs) { const base::string16 kSeparator1 = ASCIIToUTF16(":"); const base::string16 kSeparator2 = ASCIIToUTF16(":/"); const base::string16 kSeparator3 = - ASCIIToUTF16(content::kStandardSchemeSeparator); + ASCIIToUTF16(url::kStandardSchemeSeparator); // This makes assumptions about the chrome URLs listed by the BuiltinProvider. // Currently they are derived from chrome::kChromeHostURLs[]. @@ -230,7 +230,7 @@ TEST_F(BuiltinProviderTest, AboutBlank) { const base::string16 kAboutBlank = ASCIIToUTF16(content::kAboutBlankURL); const base::string16 kBlank = ASCIIToUTF16("blank"); const base::string16 kSeparator1 = - ASCIIToUTF16(content::kStandardSchemeSeparator); + ASCIIToUTF16(url::kStandardSchemeSeparator); const base::string16 kSeparator2 = ASCIIToUTF16(":///"); const base::string16 kSeparator3 = ASCIIToUTF16(";///"); diff --git a/chrome/browser/browser_about_handler_unittest.cc b/chrome/browser/browser_about_handler_unittest.cc index d21948f..d70ed8f 100644 --- a/chrome/browser/browser_about_handler_unittest.cc +++ b/chrome/browser/browser_about_handler_unittest.cc @@ -18,7 +18,7 @@ typedef testing::Test BrowserAboutHandlerTest; TEST_F(BrowserAboutHandlerTest, WillHandleBrowserAboutURL) { std::string chrome_prefix(content::kChromeUIScheme); - chrome_prefix.append(content::kStandardSchemeSeparator); + chrome_prefix.append(url::kStandardSchemeSeparator); struct AboutURLTestData { GURL test_url; GURL result_url; diff --git a/chrome/browser/browsing_data/cookies_tree_model.cc b/chrome/browser/browsing_data/cookies_tree_model.cc index b6bb571..037c481 100644 --- a/chrome/browser/browsing_data/cookies_tree_model.cc +++ b/chrome/browser/browsing_data/cookies_tree_model.cc @@ -73,7 +73,7 @@ std::string CanonicalizeHost(const GURL& url) { if (url.SchemeIsFile()) { return std::string(url::kFileScheme) + - content::kStandardSchemeSeparator; + url::kStandardSchemeSeparator; } std::string host = url.host(); @@ -559,7 +559,7 @@ CookieTreeNode::DetailedInfo CookieTreeRootNode::GetDetailedInfo() const { // static base::string16 CookieTreeHostNode::TitleForUrl(const GURL& url) { const std::string file_origin_node_name( - std::string(url::kFileScheme) + content::kStandardSchemeSeparator); + std::string(url::kFileScheme) + url::kStandardSchemeSeparator); return base::UTF8ToUTF16(url.SchemeIsFile() ? file_origin_node_name : url.host()); } @@ -583,7 +583,7 @@ CookieTreeHostNode::~CookieTreeHostNode() {} const std::string CookieTreeHostNode::GetHost() const { const std::string file_origin_node_name( - std::string(url::kFileScheme) + content::kStandardSchemeSeparator); + std::string(url::kFileScheme) + url::kStandardSchemeSeparator); return url_.SchemeIsFile() ? file_origin_node_name : url_.host(); } @@ -1089,7 +1089,7 @@ void CookiesTreeModel::PopulateCookieInfoWithFilter( // We treat secure cookies just the same as normal ones. source_string = std::string(url::kHttpScheme) + - content::kStandardSchemeSeparator + domain + "/"; + url::kStandardSchemeSeparator + domain + "/"; } GURL source(source_string); @@ -1236,7 +1236,7 @@ void CookiesTreeModel::PopulateServerBoundCertInfoWithFilter( // Domain Bound Cert. Make a valid URL to satisfy the // CookieTreeRootNode::GetOrCreateHostNode interface. origin = GURL(std::string(url::kHttpsScheme) + - content::kStandardSchemeSeparator + + url::kStandardSchemeSeparator + cert_info->server_identifier() + "/"); } base::string16 title = CookieTreeHostNode::TitleForUrl(origin); diff --git a/chrome/browser/chromeos/extensions/input_view_browsertest.cc b/chrome/browser/chromeos/extensions/input_view_browsertest.cc index 98750f1..dab28dc 100644 --- a/chrome/browser/chromeos/extensions/input_view_browsertest.cc +++ b/chrome/browser/chromeos/extensions/input_view_browsertest.cc @@ -41,7 +41,7 @@ struct InputViewConfig : public VirtualKeyboardBrowserTestConfig { extension_id_ = id; test_dir_ = kInputViewTestDir; url_ = std::string(extensions::kExtensionScheme) + - content::kStandardSchemeSeparator + id + "/inputview.html?id=" + + url::kStandardSchemeSeparator + id + "/inputview.html?id=" + layout; } }; diff --git a/chrome/browser/content_settings/local_shared_objects_container.cc b/chrome/browser/content_settings/local_shared_objects_container.cc index fa48f6f..086ffdc 100644 --- a/chrome/browser/content_settings/local_shared_objects_container.cc +++ b/chrome/browser/content_settings/local_shared_objects_container.cc @@ -100,7 +100,7 @@ size_t LocalSharedObjectsContainer::GetObjectCountForDomain( // SameDomainOrHost method below. It does not matter which scheme is // used as the scheme is ignored by the SameDomainOrHost method. GURL domain_url(std::string(url::kHttpScheme) + - content::kStandardSchemeSeparator + cookie_domain); + url::kStandardSchemeSeparator + cookie_domain); if (SameDomainOrHost(origin, domain_url)) ++count; } diff --git a/chrome/browser/extensions/api/cookies/cookies_helpers.cc b/chrome/browser/extensions/api/cookies/cookies_helpers.cc index 7044bfe..fb7766f 100644 --- a/chrome/browser/extensions/api/cookies/cookies_helpers.cc +++ b/chrome/browser/extensions/api/cookies/cookies_helpers.cc @@ -123,7 +123,7 @@ GURL GetURLFromCanonicalCookie(const net::CanonicalCookie& cookie) { cookie.IsSecure() ? url::kHttpsScheme : url::kHttpScheme; const std::string host = domain_key.find('.') != 0 ? domain_key : domain_key.substr(1); - return GURL(scheme + content::kStandardSchemeSeparator + host + "/"); + return GURL(scheme + url::kStandardSchemeSeparator + host + "/"); } void AppendMatchingCookiesToVector(const net::CookieList& all_cookies, diff --git a/chrome/browser/extensions/extension_crash_recovery_browsertest.cc b/chrome/browser/extensions/extension_crash_recovery_browsertest.cc index 071d612..5082ded 100644 --- a/chrome/browser/extensions/extension_crash_recovery_browsertest.cc +++ b/chrome/browser/extensions/extension_crash_recovery_browsertest.cc @@ -532,7 +532,7 @@ IN_PROC_BROWSER_TEST_F(MAYBE_ExtensionCrashRecoveryTest, chrome::NewTab(browser()); ui_test_utils::NavigateToURL(browser(), GURL(std::string(extensions::kExtensionScheme) + - content::kStandardSchemeSeparator + + url::kStandardSchemeSeparator + first_extension_id_ + "/background.html")); const int tabs_before = tab_strip->count(); diff --git a/chrome/browser/extensions/gtalk_extension_browsertest.cc b/chrome/browser/extensions/gtalk_extension_browsertest.cc index 16837c0..039f002 100644 --- a/chrome/browser/extensions/gtalk_extension_browsertest.cc +++ b/chrome/browser/extensions/gtalk_extension_browsertest.cc @@ -53,7 +53,7 @@ class GtalkExtensionTest : public ExtensionBrowserTest { std::string GetViewerUrl() { return std::string(extensions::kExtensionScheme) + - content::kStandardSchemeSeparator + GetInstalledExtensionId() + + url::kStandardSchemeSeparator + GetInstalledExtensionId() + "/viewer.html"; } diff --git a/chrome/browser/extensions/subscribe_page_action_browsertest.cc b/chrome/browser/extensions/subscribe_page_action_browsertest.cc index f0a6515..7975296 100644 --- a/chrome/browser/extensions/subscribe_page_action_browsertest.cc +++ b/chrome/browser/extensions/subscribe_page_action_browsertest.cc @@ -66,7 +66,7 @@ GURL GetFeedUrl(net::SpawnedTestServer* server, const std::string& feed_page, // We navigate directly to the subscribe page for feeds where the feed // sniffing won't work, in other words, as is the case for malformed feeds. return GURL(std::string(extensions::kExtensionScheme) + - content::kStandardSchemeSeparator + + url::kStandardSchemeSeparator + extension_id + std::string(kSubscribePage) + std::string("?") + feed_url.spec() + std::string("&synchronous")); } else { diff --git a/chrome/browser/extensions/window_open_apitest.cc b/chrome/browser/extensions/window_open_apitest.cc index 5017d16..db6f3fd 100644 --- a/chrome/browser/extensions/window_open_apitest.cc +++ b/chrome/browser/extensions/window_open_apitest.cc @@ -454,7 +454,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, WindowOpenExtension) { test_data_dir_.AppendASCII("uitest").AppendASCII("window_open"))); GURL start_url(std::string(extensions::kExtensionScheme) + - content::kStandardSchemeSeparator + + url::kStandardSchemeSeparator + last_loaded_extension_id() + "/test.html"); ui_test_utils::NavigateToURL(browser(), start_url); WebContents* newtab = NULL; @@ -475,7 +475,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, WindowOpenInvalidExtension) { test_data_dir_.AppendASCII("uitest").AppendASCII("window_open"))); GURL start_url(std::string(extensions::kExtensionScheme) + - content::kStandardSchemeSeparator + + url::kStandardSchemeSeparator + last_loaded_extension_id() + "/test.html"); ui_test_utils::NavigateToURL(browser(), start_url); ASSERT_NO_FATAL_FAILURE( @@ -499,7 +499,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, WindowOpenNoPrivileges) { ASSERT_NO_FATAL_FAILURE( OpenWindow(browser()->tab_strip_model()->GetActiveWebContents(), GURL(std::string(extensions::kExtensionScheme) + - content::kStandardSchemeSeparator + + url::kStandardSchemeSeparator + last_loaded_extension_id() + "/newtab.html"), false, &newtab)); diff --git a/chrome/browser/history/url_database.cc b/chrome/browser/history/url_database.cc index e114afe..d8219d5 100644 --- a/chrome/browser/history/url_database.cc +++ b/chrome/browser/history/url_database.cc @@ -320,7 +320,7 @@ bool URLDatabase::IsTypedHost(const std::string& host) { URLRows dummy; for (size_t i = 0; i < arraysize(schemes); ++i) { std::string scheme_and_host(schemes[i]); - scheme_and_host += content::kStandardSchemeSeparator + host; + scheme_and_host += url::kStandardSchemeSeparator + host; if (AutocompleteForPrefix(scheme_and_host + '/', 1, true, &dummy) || AutocompleteForPrefix(scheme_and_host + ':', 1, true, &dummy)) return true; diff --git a/chrome/browser/policy/policy_browsertest.cc b/chrome/browser/policy/policy_browsertest.cc index 77c50f1..7c4cd29 100644 --- a/chrome/browser/policy/policy_browsertest.cc +++ b/chrome/browser/policy/policy_browsertest.cc @@ -2642,7 +2642,7 @@ IN_PROC_BROWSER_TEST_F(PolicyStatisticsCollectorTest, Startup) { content::RunAllPendingInMessageLoop(); GURL kAboutHistograms = GURL(std::string(content::kAboutScheme) + - std::string(content::kStandardSchemeSeparator) + + std::string(url::kStandardSchemeSeparator) + std::string(content::kChromeUIHistogramHost)); ui_test_utils::NavigateToURL(browser(), kAboutHistograms); content::WebContents* contents = diff --git a/chrome/browser/ui/omnibox/omnibox_edit_model.cc b/chrome/browser/ui/omnibox/omnibox_edit_model.cc index 4a09d7a..bee80a5 100644 --- a/chrome/browser/ui/omnibox/omnibox_edit_model.cc +++ b/chrome/browser/ui/omnibox/omnibox_edit_model.cc @@ -489,7 +489,7 @@ void OmniboxEditModel::AdjustTextForCopy(int sel_min, url->SchemeIs(url::kHttpScheme) && perm_url.host() == url->host()) { *write_url = true; base::string16 http = base::ASCIIToUTF16(url::kHttpScheme) + - base::ASCIIToUTF16(content::kStandardSchemeSeparator); + base::ASCIIToUTF16(url::kStandardSchemeSeparator); if (text->compare(0, http.length(), http) != 0) *text = http + *text; } diff --git a/chrome/common/content_settings_helper.cc b/chrome/common/content_settings_helper.cc index e553eab..7553c10 100644 --- a/chrome/common/content_settings_helper.cc +++ b/chrome/common/content_settings_helper.cc @@ -17,7 +17,7 @@ std::string OriginToString(const GURL& origin) { : std::string()); std::string scheme_component(!origin.SchemeIs(url::kHttpScheme) ? origin.scheme() + - content::kStandardSchemeSeparator + url::kStandardSchemeSeparator : std::string()); return scheme_component + origin.host() + port_component; } diff --git a/chrome/common/content_settings_pattern.cc b/chrome/common/content_settings_pattern.cc index f0b12a0..809bc29 100644 --- a/chrome/common/content_settings_pattern.cc +++ b/chrome/common/content_settings_pattern.cc @@ -182,7 +182,7 @@ bool ContentSettingsPattern::Builder::Canonicalize(PatternParts* parts) { if (parts->scheme == std::string(url::kFileScheme) && !parts->is_path_wildcard) { GURL url(std::string(url::kFileScheme) + - std::string(content::kStandardSchemeSeparator) + parts->path); + std::string(url::kStandardSchemeSeparator) + parts->path); parts->path = url.path(); } diff --git a/chrome/common/content_settings_pattern_parser.cc b/chrome/common/content_settings_pattern_parser.cc index 2ec7ddf..6cfb4bb 100644 --- a/chrome/common/content_settings_pattern_parser.cc +++ b/chrome/common/content_settings_pattern_parser.cc @@ -70,10 +70,10 @@ void PatternParser::Parse(const std::string& pattern_spec, // Test if a scheme pattern is in the spec. current_pos = pattern_spec.find( - std::string(content::kStandardSchemeSeparator), start); + std::string(url::kStandardSchemeSeparator), start); if (current_pos != std::string::npos) { scheme_component = Component(start, current_pos); - start = current_pos + strlen(content::kStandardSchemeSeparator); + start = current_pos + strlen(url::kStandardSchemeSeparator); current_pos = start; } else { current_pos = start; @@ -200,7 +200,7 @@ std::string PatternParser::ToString( std::string str; if (!parts.is_scheme_wildcard) - str += parts.scheme + content::kStandardSchemeSeparator; + str += parts.scheme + url::kStandardSchemeSeparator; if (parts.scheme == url::kFileScheme) { if (parts.is_path_wildcard) diff --git a/chrome/common/net/url_fixer_upper.cc b/chrome/common/net/url_fixer_upper.cc index 80b48c3..d5016cd 100644 --- a/chrome/common/net/url_fixer_upper.cc +++ b/chrome/common/net/url_fixer_upper.cc @@ -460,7 +460,7 @@ std::string SegmentURLInternal(std::string* text, url::Parsed* parts) { // Construct the text to parse by inserting the scheme. std::string inserted_text(scheme); - inserted_text.append(content::kStandardSchemeSeparator); + inserted_text.append(url::kStandardSchemeSeparator); std::string text_to_parse(text->begin(), first_nonwhite); text_to_parse.append(inserted_text); text_to_parse.append(first_nonwhite, text->end()); @@ -545,7 +545,7 @@ GURL URLFixerUpper::FixupURL(const std::string& text, url::Component(0, static_cast<int>(scheme.length())))) { // Replace the about: scheme with the chrome: scheme. std::string url(chrome_url ? content::kChromeUIScheme : scheme); - url.append(content::kStandardSchemeSeparator); + url.append(url::kStandardSchemeSeparator); // We need to check whether the |username| is valid because it is our // responsibility to append the '@' to delineate the user information from @@ -570,7 +570,7 @@ GURL URLFixerUpper::FixupURL(const std::string& text, // In the worst-case, we insert a scheme if the URL lacks one. if (!parts.scheme.is_valid()) { std::string fixed_scheme(scheme); - fixed_scheme.append(content::kStandardSchemeSeparator); + fixed_scheme.append(url::kStandardSchemeSeparator); trimmed.insert(0, fixed_scheme); } diff --git a/content/public/common/url_constants.cc b/content/public/common/url_constants.cc index f364da8..f22be90 100644 --- a/content/public/common/url_constants.cc +++ b/content/public/common/url_constants.cc @@ -46,8 +46,6 @@ const char kChromeUIPpapiFlashHangURL[] = "chrome://ppapiflashhang"; const char kChromeUIServiceWorkerInternalsURL[] = "chrome://serviceworker-internals"; -const char kStandardSchemeSeparator[] = "://"; - // This error URL is loaded in normal web renderer processes, so it should not // have a chrome:// scheme that might let it be confused with a WebUI page. const char kUnreachableWebDataURL[] = "data:text/html,chromewebdata"; diff --git a/content/public/common/url_constants.h b/content/public/common/url_constants.h index a9e01a6..bb6fe97 100644 --- a/content/public/common/url_constants.h +++ b/content/public/common/url_constants.h @@ -53,9 +53,6 @@ CONTENT_EXPORT extern const char kChromeUIPpapiFlashCrashURL[]; CONTENT_EXPORT extern const char kChromeUIPpapiFlashHangURL[]; CONTENT_EXPORT extern const char kChromeUIServiceWorkerInternalsURL[]; -// Used to separate a standard scheme and the hostname: "://". -CONTENT_EXPORT extern const char kStandardSchemeSeparator[]; - // Special URL used to start a navigation to an error page. CONTENT_EXPORT extern const char kUnreachableWebDataURL[]; diff --git a/extensions/browser/extension_error_test_util.cc b/extensions/browser/extension_error_test_util.cc index 68d905d..de00caa 100644 --- a/extensions/browser/extension_error_test_util.cc +++ b/extensions/browser/extension_error_test_util.cc @@ -32,7 +32,7 @@ scoped_ptr<ExtensionError> CreateNewRuntimeError( base::string16 source = base::UTF8ToUTF16(std::string(kExtensionScheme) + - content::kStandardSchemeSeparator + + url::kStandardSchemeSeparator + extension_id); return scoped_ptr<ExtensionError>( diff --git a/extensions/common/csp_validator.cc b/extensions/common/csp_validator.cc index 94f880e..73a508c 100644 --- a/extensions/common/csp_validator.cc +++ b/extensions/common/csp_validator.cc @@ -75,7 +75,7 @@ bool HasOnlySecureTokens(base::StringTokenizer& tokenizer, StartsWithASCII(source, "chrome://", true) || StartsWithASCII(source, std::string(extensions::kExtensionScheme) + - content::kStandardSchemeSeparator, + url::kStandardSchemeSeparator, true) || StartsWithASCII(source, "chrome-extension-resource:", true)) { continue; diff --git a/extensions/common/extension.cc b/extensions/common/extension.cc index ada3b31..917f67d 100644 --- a/extensions/common/extension.cc +++ b/extensions/common/extension.cc @@ -283,7 +283,7 @@ bool Extension::FormatPEMForFileOutput(const std::string& input, // static GURL Extension::GetBaseURLFromExtensionId(const std::string& extension_id) { return GURL(std::string(extensions::kExtensionScheme) + - content::kStandardSchemeSeparator + extension_id + "/"); + url::kStandardSchemeSeparator + extension_id + "/"); } bool Extension::HasAPIPermission(APIPermission::ID permission) const { diff --git a/extensions/common/url_pattern.cc b/extensions/common/url_pattern.cc index 885eab9..c7a3711 100644 --- a/extensions/common/url_pattern.cc +++ b/extensions/common/url_pattern.cc @@ -161,7 +161,7 @@ URLPattern::ParseResult URLPattern::Parse(const std::string& pattern) { } // Parse out the scheme. - size_t scheme_end_pos = pattern.find(content::kStandardSchemeSeparator); + size_t scheme_end_pos = pattern.find(url::kStandardSchemeSeparator); bool has_standard_scheme_separator = true; // Some urls also use ':' alone as the scheme separator. @@ -182,7 +182,7 @@ URLPattern::ParseResult URLPattern::Parse(const std::string& pattern) { // Advance past the scheme separator. scheme_end_pos += - (standard_scheme ? strlen(content::kStandardSchemeSeparator) : 1); + (standard_scheme ? strlen(url::kStandardSchemeSeparator) : 1); if (scheme_end_pos >= pattern.size()) return PARSE_ERROR_EMPTY_HOST; @@ -366,7 +366,7 @@ bool URLPattern::MatchesScheme(const std::string& test) const { bool URLPattern::MatchesHost(const std::string& host) const { std::string test(url::kHttpScheme); - test += content::kStandardSchemeSeparator; + test += url::kStandardSchemeSeparator; test += host; test += "/"; return MatchesHost(GURL(test)); @@ -424,7 +424,7 @@ const std::string& URLPattern::GetAsString() const { bool standard_scheme = IsStandardScheme(scheme_); std::string spec = scheme_ + - (standard_scheme ? content::kStandardSchemeSeparator : ":"); + (standard_scheme ? url::kStandardSchemeSeparator : ":"); if (scheme_ != url::kFileScheme && standard_scheme) { if (match_subdomains_) { diff --git a/url/url_constants.cc b/url/url_constants.cc index ae58a05..7eac658 100644 --- a/url/url_constants.cc +++ b/url/url_constants.cc @@ -18,4 +18,6 @@ const char kMailToScheme[] = "mailto"; const char kWsScheme[] = "ws"; const char kWssScheme[] = "wss"; +const char kStandardSchemeSeparator[] = "://"; + } // namespace url diff --git a/url/url_constants.h b/url/url_constants.h index 07c454c..055208a 100644 --- a/url/url_constants.h +++ b/url/url_constants.h @@ -21,6 +21,9 @@ URL_EXPORT extern const char kMailToScheme[]; URL_EXPORT extern const char kWsScheme[]; URL_EXPORT extern const char kWssScheme[]; +// Used to separate a standard scheme and the hostname: "://". +URL_EXPORT extern const char kStandardSchemeSeparator[]; + } // namespace url #endif // URL_URL_CONSTANTS_H_ |