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

Unified Diff: chrome/browser/profiles/profile_impl_io_data.cc

Issue 449973002: Use data reduction proxy when managed proxy config returns direct (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@no-uma-in-proxy-service
Patch Set: Addressed comment and nit Created 6 years, 4 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/profiles/profile_impl_io_data.cc
diff --git a/chrome/browser/profiles/profile_impl_io_data.cc b/chrome/browser/profiles/profile_impl_io_data.cc
index 1c49b319401cd8cfc93508229b8a679235edf610..a53d1950f4bff03f229fc008d314d3fa9ce342ea 100644
--- a/chrome/browser/profiles/profile_impl_io_data.cc
+++ b/chrome/browser/profiles/profile_impl_io_data.cc
@@ -26,6 +26,7 @@
#include "chrome/browser/net/cookie_store_util.h"
#include "chrome/browser/net/http_server_properties_manager_factory.h"
#include "chrome/browser/net/predictor.h"
+#include "chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_configurator.h"
#include "chrome/browser/net/sqlite_channel_id_store.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_constants.h"
@@ -153,6 +154,8 @@ void ProfileImplIOData::Handle::Init(
scoped_ptr<domain_reliability::DomainReliabilityMonitor>
domain_reliability_monitor,
const base::Callback<void(bool)>& data_reduction_proxy_unavailable,
+ scoped_ptr<DataReductionProxyChromeConfigurator>
+ data_reduction_proxy_chrome_configurator,
scoped_ptr<data_reduction_proxy::DataReductionProxyParams>
data_reduction_proxy_params) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -188,6 +191,8 @@ void ProfileImplIOData::Handle::Init(
#if defined(SPDY_PROXY_AUTH_ORIGIN)
io_data_->data_reduction_proxy_unavailable_callback_ =
data_reduction_proxy_unavailable;
+ io_data_->data_reduction_proxy_chrome_configurator_ =
+ data_reduction_proxy_chrome_configurator.Pass();
io_data_->data_reduction_proxy_params_ =
data_reduction_proxy_params.Pass();
#endif // defined(SPDY_PROXY_AUTH_ORIGIN)
@@ -435,6 +440,10 @@ void ProfileImplIOData::InitializeInternal(
data_reduction_proxy_auth_request_handler_.get());
network_delegate()->set_on_resolve_proxy_handler(
base::Bind(data_reduction_proxy::OnResolveProxyHandler));
+ network_delegate()->set_proxy_config_getter(
+ base::Bind(
+ &DataReductionProxyChromeConfigurator::GetProxyConfigOnIO,
+ base::Unretained(data_reduction_proxy_chrome_configurator_.get())));
#endif // defined(SPDY_PROXY_AUTH_ORIGIN)
network_delegate()->set_predictor(predictor_.get());

Powered by Google App Engine
This is Rietveld 408576698