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

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

Issue 981633002: Created new URLRequestContext for secure proxy check (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed minor bug Created 5 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: components/data_reduction_proxy/core/browser/data_reduction_proxy_service.h
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_service.h b/components/data_reduction_proxy/core/browser/data_reduction_proxy_service.h
index bf44a458b90e79b4e3948663e7f8f9b1269ea819..cd2127e39ca6981e20a96b3826873160bc907c9a 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_service.h
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_service.h
@@ -11,7 +11,6 @@
#include "base/memory/weak_ptr.h"
#include "base/threading/non_thread_safe.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_metrics.h"
-#include "net/url_request/url_fetcher_delegate.h"
class GURL;
class PrefService;
@@ -21,24 +20,14 @@ class SequencedTaskRunner;
class TimeDelta;
}
-namespace net {
-class URLFetcher;
-class URLRequestContextGetter;
-class URLRequestStatus;
-}
-
namespace data_reduction_proxy {
-typedef base::Callback<void(const std::string&, const net::URLRequestStatus&)>
- FetcherResponseCallback;
-
class DataReductionProxySettings;
class DataReductionProxyCompressionStats;
// Contains and initializes all Data Reduction Proxy objects that have a
// lifetime based on the UI thread.
-class DataReductionProxyService : public base::NonThreadSafe,
- public net::URLFetcherDelegate {
+class DataReductionProxyService : public base::NonThreadSafe {
public:
// The caller must ensure that |settings| and |request_context| remain alive
// for the lifetime of the |DataReductionProxyService| instance. This instance
@@ -47,19 +36,12 @@ class DataReductionProxyService : public base::NonThreadSafe,
// DataReductionProxySettings and not vice versa.
DataReductionProxyService(
scoped_ptr<DataReductionProxyCompressionStats> compression_stats,
- DataReductionProxySettings* settings,
- net::URLRequestContextGetter* request_context_getter);
+ DataReductionProxySettings* settings);
- ~DataReductionProxyService() override;
+ ~DataReductionProxyService();
void Shutdown();
- // Requests the given |secure_proxy_check_url|. Upon completion, returns the
- // results to the caller via the |fetcher_callback|. Virtualized for unit
- // testing.
- virtual void SecureProxyCheck(const GURL& secure_proxy_check_url,
- FetcherResponseCallback fetcher_callback);
-
// Constructs compression stats. This should not be called if a valid
// compression stats is passed into the constructor.
void EnableCompressionStatisticsLogging(
@@ -87,22 +69,7 @@ class DataReductionProxyService : public base::NonThreadSafe,
base::WeakPtr<DataReductionProxyService> GetWeakPtr();
- protected:
- // Virtualized for testing. Returns a fetcher to check if it is permitted to
- // use the secure proxy.
- virtual net::URLFetcher* GetURLFetcherForSecureProxyCheck(
- const GURL& secure_proxy_check_url);
-
private:
- // net::URLFetcherDelegate:
- void OnURLFetchComplete(const net::URLFetcher* source) override;
-
- net::URLRequestContextGetter* url_request_context_getter_;
-
- // The URLFetcher being used for the secure proxy check.
- scoped_ptr<net::URLFetcher> fetcher_;
- FetcherResponseCallback fetcher_callback_;
-
// Tracks compression statistics to be displayed to the user.
scoped_ptr<DataReductionProxyCompressionStats> compression_stats_;

Powered by Google App Engine
This is Rietveld 408576698