diff options
Diffstat (limited to 'chrome/browser')
28 files changed, 37 insertions, 38 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_input.cc b/chrome/browser/autocomplete/autocomplete_input.cc index e192a89d..c1fdf54 100644 --- a/chrome/browser/autocomplete/autocomplete_input.cc +++ b/chrome/browser/autocomplete/autocomplete_input.cc @@ -173,7 +173,7 @@ AutocompleteInput::Type AutocompleteInput::Parse( // until I run into some cases that really need it. if (parts->scheme.is_nonempty() && !LowerCaseEqualsASCII(parsed_scheme, chrome::kHttpScheme) && - !LowerCaseEqualsASCII(parsed_scheme, chrome::kHttpsScheme)) { + !LowerCaseEqualsASCII(parsed_scheme, content::kHttpsScheme)) { // See if we know how to handle the URL internally. if (ProfileIOData::IsHandledProtocol(UTF16ToASCII(parsed_scheme))) return URL; diff --git a/chrome/browser/autocomplete/autocomplete_match.cc b/chrome/browser/autocomplete/autocomplete_match.cc index ca6cb7d..ae89aa0 100644 --- a/chrome/browser/autocomplete/autocomplete_match.cc +++ b/chrome/browser/autocomplete/autocomplete_match.cc @@ -376,7 +376,7 @@ void AutocompleteMatch::ComputeStrippedDestinationURL(Profile* profile) { } // Replace https protocol with http protocol. - if (stripped_destination_url.SchemeIs(chrome::kHttpsScheme)) { + if (stripped_destination_url.SchemeIs(content::kHttpsScheme)) { replacements.SetScheme( chrome::kHttpScheme, url_parse::Component(0, strlen(chrome::kHttpScheme))); diff --git a/chrome/browser/autocomplete/search_provider.cc b/chrome/browser/autocomplete/search_provider.cc index 05b49e6..38f0b9e 100644 --- a/chrome/browser/autocomplete/search_provider.cc +++ b/chrome/browser/autocomplete/search_provider.cc @@ -731,7 +731,7 @@ bool SearchProvider::IsQuerySuitableForSuggest() const { // our checks below. Other QUERY cases are less likely to be URLs and thus we // assume we're OK. if (!LowerCaseEqualsASCII(input_.scheme(), chrome::kHttpScheme) && - !LowerCaseEqualsASCII(input_.scheme(), chrome::kHttpsScheme) && + !LowerCaseEqualsASCII(input_.scheme(), content::kHttpsScheme) && !LowerCaseEqualsASCII(input_.scheme(), chrome::kFtpScheme)) return (input_.type() == AutocompleteInput::QUERY); @@ -749,7 +749,7 @@ bool SearchProvider::IsQuerySuitableForSuggest() const { // Don't send anything for https except the hostname. Hostnames are OK // because they are visible when the TCP connection is established, but the // specific path may reveal private information. - if (LowerCaseEqualsASCII(input_.scheme(), chrome::kHttpsScheme) && + if (LowerCaseEqualsASCII(input_.scheme(), content::kHttpsScheme) && parts.path.is_nonempty()) return false; diff --git a/chrome/browser/autocomplete/zero_suggest_provider.cc b/chrome/browser/autocomplete/zero_suggest_provider.cc index f19b287..4369aba 100644 --- a/chrome/browser/autocomplete/zero_suggest_provider.cc +++ b/chrome/browser/autocomplete/zero_suggest_provider.cc @@ -390,7 +390,7 @@ void ZeroSuggestProvider::Run() { ReplaceSearchTerms(search_term_args); GURL suggest_url(req_url); // Make sure we are sending the suggest request through HTTPS. - if (!suggest_url.SchemeIs(chrome::kHttpsScheme)) { + if (!suggest_url.SchemeIs(content::kHttpsScheme)) { Stop(true); return; } diff --git a/chrome/browser/browsing_data/browsing_data_helper_unittest.cc b/chrome/browser/browsing_data/browsing_data_helper_unittest.cc index d0fbd04..26f04ae 100644 --- a/chrome/browser/browsing_data/browsing_data_helper_unittest.cc +++ b/chrome/browser/browsing_data/browsing_data_helper_unittest.cc @@ -59,7 +59,7 @@ class BrowsingDataHelperTest : public testing::Test { TEST_F(BrowsingDataHelperTest, WebSafeSchemesAreWebSafe) { EXPECT_TRUE(IsWebScheme(chrome::kHttpScheme)); - EXPECT_TRUE(IsWebScheme(chrome::kHttpsScheme)); + EXPECT_TRUE(IsWebScheme(content::kHttpsScheme)); EXPECT_TRUE(IsWebScheme(chrome::kFtpScheme)); EXPECT_TRUE(IsWebScheme(chrome::kDataScheme)); EXPECT_TRUE(IsWebScheme("feed")); @@ -83,7 +83,7 @@ TEST_F(BrowsingDataHelperTest, ChromeSchemesAreNotWebSafe) { TEST_F(BrowsingDataHelperTest, WebSafeSchemesAreNotExtensions) { EXPECT_FALSE(IsExtensionScheme(chrome::kHttpScheme)); - EXPECT_FALSE(IsExtensionScheme(chrome::kHttpsScheme)); + EXPECT_FALSE(IsExtensionScheme(content::kHttpsScheme)); EXPECT_FALSE(IsExtensionScheme(chrome::kFtpScheme)); EXPECT_FALSE(IsExtensionScheme(chrome::kDataScheme)); EXPECT_FALSE(IsExtensionScheme("feed")); diff --git a/chrome/browser/browsing_data/cookies_tree_model.cc b/chrome/browser/browsing_data/cookies_tree_model.cc index 58abc27..f894e75 100644 --- a/chrome/browser/browsing_data/cookies_tree_model.cc +++ b/chrome/browser/browsing_data/cookies_tree_model.cc @@ -1229,7 +1229,7 @@ void CookiesTreeModel::PopulateServerBoundCertInfoWithFilter( if (!origin.is_valid()) { // Domain Bound Cert. Make a valid URL to satisfy the // CookieTreeRootNode::GetOrCreateHostNode interface. - origin = GURL(std::string(chrome::kHttpsScheme) + + origin = GURL(std::string(content::kHttpsScheme) + content::kStandardSchemeSeparator + cert_info->server_identifier() + "/"); } diff --git a/chrome/browser/extensions/api/content_settings/content_settings_helpers.cc b/chrome/browser/extensions/api/content_settings/content_settings_helpers.cc index 537d08f..133e330 100644 --- a/chrome/browser/extensions/api/content_settings/content_settings_helpers.cc +++ b/chrome/browser/extensions/api/content_settings/content_settings_helpers.cc @@ -45,7 +45,7 @@ COMPILE_ASSERT(arraysize(kContentSettingNames) <= std::string GetDefaultPort(const std::string& scheme) { if (scheme == chrome::kHttpScheme) return "80"; - if (scheme == chrome::kHttpsScheme) + if (scheme == content::kHttpsScheme) return "443"; NOTREACHED(); return std::string(); diff --git a/chrome/browser/extensions/api/cookies/cookies_helpers.cc b/chrome/browser/extensions/api/cookies/cookies_helpers.cc index b68146b..2d3e67e 100644 --- a/chrome/browser/extensions/api/cookies/cookies_helpers.cc +++ b/chrome/browser/extensions/api/cookies/cookies_helpers.cc @@ -119,7 +119,7 @@ void GetCookieListFromStore( GURL GetURLFromCanonicalCookie(const net::CanonicalCookie& cookie) { const std::string& domain_key = cookie.Domain(); const std::string scheme = - cookie.IsSecure() ? chrome::kHttpsScheme : chrome::kHttpScheme; + cookie.IsSecure() ? content::kHttpsScheme : chrome::kHttpScheme; const std::string host = domain_key.find('.') != 0 ? domain_key : domain_key.substr(1); return GURL(scheme + content::kStandardSchemeSeparator + host + "/"); diff --git a/chrome/browser/extensions/api/web_navigation/frame_navigation_state.cc b/chrome/browser/extensions/api/web_navigation/frame_navigation_state.cc index 11092cb..8df798b 100644 --- a/chrome/browser/extensions/api/web_navigation/frame_navigation_state.cc +++ b/chrome/browser/extensions/api/web_navigation/frame_navigation_state.cc @@ -16,7 +16,7 @@ namespace { const char* kValidSchemes[] = { chrome::kChromeUIScheme, chrome::kHttpScheme, - chrome::kHttpsScheme, + content::kHttpsScheme, chrome::kFileScheme, chrome::kFtpScheme, content::kJavaScriptScheme, diff --git a/chrome/browser/extensions/api/web_request/web_request_permissions.cc b/chrome/browser/extensions/api/web_request/web_request_permissions.cc index 480bf84..4bad267 100644 --- a/chrome/browser/extensions/api/web_request/web_request_permissions.cc +++ b/chrome/browser/extensions/api/web_request/web_request_permissions.cc @@ -71,7 +71,7 @@ bool HasWebRequestScheme(const GURL& url) { url.SchemeIs(chrome::kFileSystemScheme) || url.SchemeIs(chrome::kFtpScheme) || url.SchemeIs(chrome::kHttpScheme) || - url.SchemeIs(chrome::kHttpsScheme) || + url.SchemeIs(content::kHttpsScheme) || url.SchemeIs(extensions::kExtensionScheme)); } diff --git a/chrome/browser/history/history_backend.cc b/chrome/browser/history/history_backend.cc index 7cdecc5..e313002 100644 --- a/chrome/browser/history/history_backend.cc +++ b/chrome/browser/history/history_backend.cc @@ -413,7 +413,7 @@ void HistoryBackend::AddPage(const HistoryAddPageArgs& request) { const GURL& origin_url(has_redirects ? request.redirects[0] : request.url); if (origin_url.SchemeIs(chrome::kHttpScheme) || - origin_url.SchemeIs(chrome::kHttpsScheme) || + origin_url.SchemeIs(content::kHttpsScheme) || origin_url.SchemeIs(chrome::kFtpScheme)) { std::string host(origin_url.host()); size_t registry_length = diff --git a/chrome/browser/history/in_memory_url_index.cc b/chrome/browser/history/in_memory_url_index.cc index 9eba62e..d9b17e2 100644 --- a/chrome/browser/history/in_memory_url_index.cc +++ b/chrome/browser/history/in_memory_url_index.cc @@ -44,7 +44,7 @@ void InitializeSchemeWhitelist(std::set<std::string>* whitelist) { whitelist->insert(std::string(chrome::kFileScheme)); whitelist->insert(std::string(chrome::kFtpScheme)); whitelist->insert(std::string(chrome::kHttpScheme)); - whitelist->insert(std::string(chrome::kHttpsScheme)); + whitelist->insert(std::string(content::kHttpsScheme)); whitelist->insert(std::string(content::kMailToScheme)); } diff --git a/chrome/browser/history/url_database.cc b/chrome/browser/history/url_database.cc index 4f5a72d..a2eb07d 100644 --- a/chrome/browser/history/url_database.cc +++ b/chrome/browser/history/url_database.cc @@ -312,7 +312,7 @@ bool URLDatabase::AutocompleteForPrefix(const std::string& prefix, bool URLDatabase::IsTypedHost(const std::string& host) { const char* schemes[] = { chrome::kHttpScheme, - chrome::kHttpsScheme, + content::kHttpsScheme, chrome::kFtpScheme }; URLRows dummy; diff --git a/chrome/browser/history/visit_database.cc b/chrome/browser/history/visit_database.cc index 5e04c02..f758a36 100644 --- a/chrome/browser/history/visit_database.cc +++ b/chrome/browser/history/visit_database.cc @@ -491,7 +491,8 @@ bool VisitDatabase::GetRedirectToVisit(VisitID to_visit, bool VisitDatabase::GetVisibleVisitCountToHost(const GURL& url, int* count, base::Time* first_visit) { - if (!url.SchemeIs(chrome::kHttpScheme) && !url.SchemeIs(chrome::kHttpsScheme)) + if (!url.SchemeIs(chrome::kHttpScheme) && + !url.SchemeIs(content::kHttpsScheme)) return false; // We need to search for URLs with a matching host/port. One way to query for diff --git a/chrome/browser/prerender/prerender_contents.cc b/chrome/browser/prerender/prerender_contents.cc index e049827..e9f38fe 100644 --- a/chrome/browser/prerender/prerender_contents.cc +++ b/chrome/browser/prerender/prerender_contents.cc @@ -505,7 +505,7 @@ void PrerenderContents::DidUpdateFaviconURL( bool PrerenderContents::AddAliasURL(const GURL& url) { const bool http = url.SchemeIs(chrome::kHttpScheme); - const bool https = url.SchemeIs(chrome::kHttpsScheme); + const bool https = url.SchemeIs(content::kHttpsScheme); if (!http && !https) { DCHECK_NE(MATCH_COMPLETE_REPLACEMENT_PENDING, match_complete_status_); Destroy(FINAL_STATUS_UNSUPPORTED_SCHEME); diff --git a/chrome/browser/renderer_host/chrome_render_view_host_observer.cc b/chrome/browser/renderer_host/chrome_render_view_host_observer.cc index cfebd23..7e99d9e 100644 --- a/chrome/browser/renderer_host/chrome_render_view_host_observer.cc +++ b/chrome/browser/renderer_host/chrome_render_view_host_observer.cc @@ -80,7 +80,7 @@ void ChromeRenderViewHostObserver::Navigate(const GURL& url) { if (!predictor_) return; if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kChromeFrame) && - (url.SchemeIs(chrome::kHttpScheme) || url.SchemeIs(chrome::kHttpsScheme))) + (url.SchemeIs(chrome::kHttpScheme) || url.SchemeIs(content::kHttpsScheme))) predictor_->PreconnectUrlAndSubresources(url, GURL()); } diff --git a/chrome/browser/renderer_host/offline_resource_throttle.cc b/chrome/browser/renderer_host/offline_resource_throttle.cc index ceaffca..34f8c42 100644 --- a/chrome/browser/renderer_host/offline_resource_throttle.cc +++ b/chrome/browser/renderer_host/offline_resource_throttle.cc @@ -117,10 +117,9 @@ void OfflineResourceThrottle::OnBlockingPageComplete(bool proceed) { } bool OfflineResourceThrottle::IsRemote(const GURL& url) const { - return !net::IsLocalhost(url.host()) && - (url.SchemeIs(chrome::kFtpScheme) || - url.SchemeIs(chrome::kHttpScheme) || - url.SchemeIs(chrome::kHttpsScheme)); + return !net::IsLocalhost(url.host()) && (url.SchemeIs(chrome::kFtpScheme) || + url.SchemeIs(chrome::kHttpScheme) || + url.SchemeIs(content::kHttpsScheme)); } bool OfflineResourceThrottle::ShouldShowOfflinePage(const GURL& url) const { diff --git a/chrome/browser/safe_browsing/database_manager.cc b/chrome/browser/safe_browsing/database_manager.cc index db0963a..ac606f2 100644 --- a/chrome/browser/safe_browsing/database_manager.cc +++ b/chrome/browser/safe_browsing/database_manager.cc @@ -193,7 +193,7 @@ SafeBrowsingDatabaseManager::~SafeBrowsingDatabaseManager() { bool SafeBrowsingDatabaseManager::CanCheckUrl(const GURL& url) const { return url.SchemeIs(chrome::kFtpScheme) || url.SchemeIs(chrome::kHttpScheme) || - url.SchemeIs(chrome::kHttpsScheme); + url.SchemeIs(content::kHttpsScheme); } bool SafeBrowsingDatabaseManager::CheckDownloadUrl( diff --git a/chrome/browser/search/search.cc b/chrome/browser/search/search.cc index f42fafb..17b7854 100644 --- a/chrome/browser/search/search.cc +++ b/chrome/browser/search/search.cc @@ -140,7 +140,7 @@ bool MatchesOrigin(const GURL& my_url, const GURL& other_url) { return my_url.host() == other_url.host() && my_url.port() == other_url.port() && (my_url.scheme() == other_url.scheme() || - (my_url.SchemeIs(chrome::kHttpsScheme) && + (my_url.SchemeIs(content::kHttpsScheme) && other_url.SchemeIs(chrome::kHttpScheme))); } @@ -430,7 +430,7 @@ GURL GetInstantURL(Profile* profile, int start_margin) { google_util::StartsWithCommandLineGoogleBaseURL(instant_url)) return instant_url; GURL::Replacements replacements; - const std::string secure_scheme(chrome::kHttpsScheme); + const std::string secure_scheme(content::kHttpsScheme); replacements.SetSchemeStr(secure_scheme); return instant_url.ReplaceComponents(replacements); } diff --git a/chrome/browser/search_engines/template_url.cc b/chrome/browser/search_engines/template_url.cc index a0a7c63..5a0c4af 100644 --- a/chrome/browser/search_engines/template_url.cc +++ b/chrome/browser/search_engines/template_url.cc @@ -803,7 +803,7 @@ std::string TemplateURLRef::HandleReplacements( search_terms_args_without_aqs.assisted_query_stats.clear(); GURL base_url(ReplaceSearchTermsUsingTermsData( search_terms_args_without_aqs, search_terms_data, NULL)); - if (base_url.SchemeIs(chrome::kHttpsScheme)) { + if (base_url.SchemeIs(content::kHttpsScheme)) { HandleReplacement( "aqs", search_terms_args.assisted_query_stats, *i, &url); } diff --git a/chrome/browser/search_engines/template_url_parser.cc b/chrome/browser/search_engines/template_url_parser.cc index 64978a7..9fa4c4a 100644 --- a/chrome/browser/search_engines/template_url_parser.cc +++ b/chrome/browser/search_engines/template_url_parser.cc @@ -101,7 +101,7 @@ bool IsHTTPRef(const std::string& url) { return true; GURL gurl(url); return gurl.is_valid() && (gurl.SchemeIs(chrome::kHttpScheme) || - gurl.SchemeIs(chrome::kHttpsScheme)); + gurl.SchemeIs(content::kHttpsScheme)); } } // namespace @@ -259,7 +259,7 @@ void TemplateURLParsingContext::EndElementImpl(void* ctx, const xmlChar* name) { context->derive_image_from_url_ = true; } else if (context->image_is_valid_for_favicon_ && image_url.is_valid() && (image_url.SchemeIs(chrome::kHttpScheme) || - image_url.SchemeIs(chrome::kHttpsScheme))) { + image_url.SchemeIs(content::kHttpsScheme))) { context->data_.favicon_url = image_url; } context->image_is_valid_for_favicon_ = false; diff --git a/chrome/browser/search_engines/template_url_service.cc b/chrome/browser/search_engines/template_url_service.cc index 55df617..a8e7dcf 100644 --- a/chrome/browser/search_engines/template_url_service.cc +++ b/chrome/browser/search_engines/template_url_service.cc @@ -374,7 +374,7 @@ string16 TemplateURLService::CleanUserInputKeyword(const string16& keyword) { if (result.compare(0, scheme_component.end(), ASCIIToUTF16(chrome::kHttpScheme)) && result.compare(0, scheme_component.end(), - ASCIIToUTF16(chrome::kHttpsScheme))) + ASCIIToUTF16(content::kHttpsScheme))) return string16(); // Include trailing ':'. diff --git a/chrome/browser/ui/android/autofill/autofill_dialog_controller_android.cc b/chrome/browser/ui/android/autofill/autofill_dialog_controller_android.cc index 00f5da8..0c4ce46 100644 --- a/chrome/browser/ui/android/autofill/autofill_dialog_controller_android.cc +++ b/chrome/browser/ui/android/autofill/autofill_dialog_controller_android.cc @@ -454,7 +454,7 @@ bool AutofillDialogControllerAndroid::RequestingCreditCardInfo() const { } bool AutofillDialogControllerAndroid::TransmissionWillBeSecure() const { - return source_url_.SchemeIs(chrome::kHttpsScheme); + return source_url_.SchemeIs(content::kHttpsScheme); } void AutofillDialogControllerAndroid::SetAutocheckoutState( diff --git a/chrome/browser/ui/app_list/search/webstore_provider.cc b/chrome/browser/ui/app_list/search/webstore_provider.cc index ec8cdd4..3873a219 100644 --- a/chrome/browser/ui/app_list/search/webstore_provider.cc +++ b/chrome/browser/ui/app_list/search/webstore_provider.cc @@ -73,9 +73,8 @@ bool IsSensitiveInput(const string16& query) { // Don't send anything for https except the hostname. Hostnames are OK // because they are visible when the TCP connection is established, but the // specific path may reveal private information. - if (LowerCaseEqualsASCII(query_as_url.scheme(), chrome::kHttpsScheme) && - !query_as_url.path().empty() && - query_as_url.path() != "/") { + if (LowerCaseEqualsASCII(query_as_url.scheme(), content::kHttpsScheme) && + !query_as_url.path().empty() && query_as_url.path() != "/") { return true; } diff --git a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc index 3fec283..daa407d 100644 --- a/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc +++ b/chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc @@ -2321,7 +2321,7 @@ bool AutofillDialogControllerImpl::RequestingCreditCardInfo() const { } bool AutofillDialogControllerImpl::TransmissionWillBeSecure() const { - return source_url_.SchemeIs(chrome::kHttpsScheme); + return source_url_.SchemeIs(content::kHttpsScheme); } void AutofillDialogControllerImpl::ShowNewCreditCardBubble( diff --git a/chrome/browser/ui/browser_browsertest.cc b/chrome/browser/ui/browser_browsertest.cc index e176b52..d2039b9 100644 --- a/chrome/browser/ui/browser_browsertest.cc +++ b/chrome/browser/ui/browser_browsertest.cc @@ -196,7 +196,7 @@ class TransferHttpsRedirectsContentBrowserClient content::ResourceContext* resource_context, const GURL& current_url, const GURL& new_url) OVERRIDE { - return new_url.SchemeIs(chrome::kHttpsScheme); + return new_url.SchemeIs(content::kHttpsScheme); } }; @@ -871,7 +871,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, CommandCreateAppShortcutHttps) { base::FilePath(kDocRoot)); ASSERT_TRUE(test_server.Start()); GURL https_url(test_server.GetURL("/")); - ASSERT_TRUE(https_url.SchemeIs(chrome::kHttpsScheme)); + ASSERT_TRUE(https_url.SchemeIs(content::kHttpsScheme)); ui_test_utils::NavigateToURL(browser(), https_url); EXPECT_TRUE(command_updater->IsCommandEnabled(IDC_CREATE_SHORTCUTS)); } diff --git a/chrome/browser/web_applications/web_app.cc b/chrome/browser/web_applications/web_app.cc index 8ab546d..10c2c99 100644 --- a/chrome/browser/web_applications/web_app.cc +++ b/chrome/browser/web_applications/web_app.cc @@ -199,7 +199,7 @@ bool IsValidUrl(const GURL& url) { chrome::kFileSystemScheme, chrome::kFtpScheme, chrome::kHttpScheme, - chrome::kHttpsScheme, + content::kHttpsScheme, extensions::kExtensionScheme, }; diff --git a/chrome/browser/web_resource/promo_resource_service_unittest.cc b/chrome/browser/web_resource/promo_resource_service_unittest.cc index 0f0ae62..7ac89cc 100644 --- a/chrome/browser/web_resource/promo_resource_service_unittest.cc +++ b/chrome/browser/web_resource/promo_resource_service_unittest.cc @@ -530,7 +530,7 @@ TEST_F(PromoResourceServiceTest, PromoServerURLTest) { GURL promo_server_url = NotificationPromo::PromoServerURL(); EXPECT_FALSE(promo_server_url.is_empty()); EXPECT_TRUE(promo_server_url.is_valid()); - EXPECT_TRUE(promo_server_url.SchemeIs(chrome::kHttpsScheme)); + EXPECT_TRUE(promo_server_url.SchemeIs(content::kHttpsScheme)); // TODO(achuith): Test this better. } |