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

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: Initial patches. 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..21c73c92ef6a57c5a9e90a6e97c0e84998fbe87d 100644
--- a/chrome/browser/autocomplete/base_search_provider.cc
+++ b/chrome/browser/autocomplete/base_search_provider.cc
@@ -30,6 +30,7 @@
#include "net/base/escape.h"
#include "net/base/net_util.h"
#include "net/base/registry_controlled_domains/registry_controlled_domain.h"
+#include "net/base/url_constants.h"
#include "net/http/http_response_headers.h"
#include "net/url_request/url_fetcher_delegate.h"
#include "url/gurl.h"
@@ -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(net::kHttpsScheme))
return false;
// Don't show zero suggest on the NTP.
@@ -589,10 +590,11 @@ 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() != net::kHttpScheme) &&
+ ((current_page_url.scheme() != net::kHttpsScheme) ||
!net::registry_controlled_domains::SameDomainOrHost(
- current_page_url, suggest_url,
+ current_page_url,
+ suggest_url,
net::registry_controlled_domains::EXCLUDE_PRIVATE_REGISTRIES)))
return false;

Powered by Google App Engine
This is Rietveld 408576698