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

Unified Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_service.cc

Issue 961983002: Rename probe/canary usages to secure proxy check. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix comment Created 5 years, 10 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: components/data_reduction_proxy/core/browser/data_reduction_proxy_service.cc
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_service.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_service.cc
index 61137219b9edc523253a5e6ff4b7b0e6687f251b..947f4514a86d17fe364419789e05fe43f949c5d4 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_service.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_service.cc
@@ -57,10 +57,10 @@ void DataReductionProxyService::OnURLFetchComplete(
fetcher_callback_.Run(response, status);
}
-net::URLFetcher* DataReductionProxyService::GetURLFetcherForProbe(
- const GURL& probe_url) {
- net::URLFetcher* fetcher =
- net::URLFetcher::Create(probe_url, net::URLFetcher::GET, this);
+net::URLFetcher* DataReductionProxyService::GetURLFetcherForSecureProxyCheck(
+ const GURL& secure_proxy_check_url) {
+ net::URLFetcher* fetcher = net::URLFetcher::Create(
+ secure_proxy_check_url, net::URLFetcher::GET, this);
fetcher->SetLoadFlags(net::LOAD_DISABLE_CACHE | net::LOAD_BYPASS_PROXY);
DCHECK(url_request_context_getter_);
fetcher->SetRequestContext(url_request_context_getter_);
@@ -68,17 +68,20 @@ net::URLFetcher* DataReductionProxyService::GetURLFetcherForProbe(
static const int kMaxRetries = 5;
fetcher->SetMaxRetriesOn5xx(kMaxRetries);
fetcher->SetAutomaticallyRetryOnNetworkChanges(kMaxRetries);
- // The probe should not be redirected. Since the probe will inevitably fail if
- // it gets redirected somewhere else (e.g. by a captive portal), short circuit
- // that by giving up on the probe if it gets redirected.
+ // The secure proxy check should not be redirected. Since the secure proxy
+ // check will inevitably fail if it gets redirected somewhere else (e.g. by a
+ // captive portal), short circuit that by giving up on the secure proxy check
+ // if it gets redirected.
fetcher->SetStopOnRedirect(true);
return fetcher;
}
-void DataReductionProxyService::CheckProbeURL(
- const GURL& probe_url, FetcherResponseCallback fetcher_callback) {
+void DataReductionProxyService::SecureProxyCheck(
+ const GURL& secure_proxy_check_url,
+ FetcherResponseCallback fetcher_callback) {
DCHECK(CalledOnValidThread());
- net::URLFetcher* fetcher = GetURLFetcherForProbe(probe_url);
+ net::URLFetcher* fetcher =
+ GetURLFetcherForSecureProxyCheck(secure_proxy_check_url);
if (!fetcher)
return;
fetcher_.reset(fetcher);

Powered by Google App Engine
This is Rietveld 408576698