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 08870694f77241953261ff2eb5381b22f4d63a85..283a8f032a060b86af339c0ee134a3858e2ec1ee 100644 |
--- a/chrome/browser/profiles/profile_impl_io_data.cc |
+++ b/chrome/browser/profiles/profile_impl_io_data.cc |
@@ -62,6 +62,10 @@ |
#include "net/url_request/url_request_job_factory_impl.h" |
#include "storage/browser/quota/special_storage_policy.h" |
+#if defined(OS_ANDROID) |
+#include "components/data_reduction_proxy/content/browser/data_reduction_proxy_ui_service.h" |
+#endif |
+ |
namespace { |
net::BackendType ChooseCacheBackendType() { |
@@ -146,6 +150,10 @@ void ProfileImplIOData::Handle::Init( |
data_reduction_proxy_params, |
scoped_ptr<data_reduction_proxy::DataReductionProxyStatisticsPrefs> |
data_reduction_proxy_statistics_prefs, |
+#if defined(OS_ANDROID) |
+ scoped_ptr<data_reduction_proxy::DataReductionProxyUIService> |
+ data_reduction_proxy_ui_service, |
+#endif |
scoped_ptr<data_reduction_proxy::DataReductionProxyEventStore> |
data_reduction_proxy_event_store) { |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
@@ -187,6 +195,10 @@ void ProfileImplIOData::Handle::Init( |
io_data_->set_data_reduction_proxy_params(data_reduction_proxy_params.Pass()); |
io_data_->set_data_reduction_proxy_statistics_prefs( |
data_reduction_proxy_statistics_prefs.Pass()); |
+#if defined(OS_ANDROID) |
+ io_data_->set_data_reduction_proxy_ui_service( |
+ data_reduction_proxy_ui_service.Pass()); |
+#endif |
io_data_->set_data_reduction_proxy_event_store( |
data_reduction_proxy_event_store.Pass()); |
} |
@@ -473,6 +485,14 @@ void ProfileImplIOData::InitializeInternal( |
.get()))); |
data_reduction_proxy_usage_stats()->set_unavailable_callback( |
data_reduction_proxy_unavailable_callback()); |
+#if defined(OS_ANDROID) |
+ if (data_reduction_proxy_ui_service()) { |
+ data_reduction_proxy_ui_service()->set_proxy_config_getter( |
+ base::Bind(&data_reduction_proxy::DataReductionProxyConfigurator:: |
+ GetProxyConfigOnIOThread, |
+ base::Unretained(data_reduction_proxy_configurator()))); |
+ } |
+#endif |
// TODO(vadimt): Remove ScopedTracker below once crbug.com/436671 is fixed. |
tracked_objects::ScopedTracker tracking_profile3( |