Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(624)

Unified Diff: chrome/browser/autocomplete/base_search_provider.cc

Issue 254763005: Move some content url constants to /url. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update url/BUILD.gn and address some style nits. Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/autocomplete/base_search_provider.cc
diff --git a/chrome/browser/autocomplete/base_search_provider.cc b/chrome/browser/autocomplete/base_search_provider.cc
index 7db7eb6a93a723009290f5ca476f91e24b436a0f..5d5cc601722c665633be6918b294436e8356f1cd 100644
--- a/chrome/browser/autocomplete/base_search_provider.cc
+++ b/chrome/browser/autocomplete/base_search_provider.cc
@@ -33,6 +33,7 @@
#include "net/http/http_response_headers.h"
#include "net/url_request/url_fetcher_delegate.h"
#include "url/gurl.h"
+#include "url/url_constants.h"
namespace {
@@ -542,7 +543,7 @@ bool BaseSearchProvider::ZeroSuggestEnabled(
// Make sure we are sending the suggest request through HTTPS to prevent
// exposing the current page URL or personalized results without encryption.
- if (!suggest_url.SchemeIs(content::kHttpsScheme))
+ if (!suggest_url.SchemeIs(url::kHttpsScheme))
return false;
// Don't show zero suggest on the NTP.
@@ -589,8 +590,8 @@ bool BaseSearchProvider::CanSendURL(
// Only allow HTTP URLs or HTTPS URLs for the same domain as the search
// provider.
- if ((current_page_url.scheme() != content::kHttpScheme) &&
- ((current_page_url.scheme() != content::kHttpsScheme) ||
+ if ((current_page_url.scheme() != url::kHttpScheme) &&
+ ((current_page_url.scheme() != url::kHttpsScheme) ||
!net::registry_controlled_domains::SameDomainOrHost(
current_page_url, suggest_url,
net::registry_controlled_domains::EXCLUDE_PRIVATE_REGISTRIES)))

Powered by Google App Engine
This is Rietveld 408576698