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

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

Issue 684223003: Data Reduction Proxy Interstitials (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing comments Created 6 years 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 8b3943958d0f4b30f2a011e7f4998dee43722a5d..212e825a7e1e4a6717c120effab6cc31b2b44517 100644
--- a/chrome/browser/profiles/profile_impl_io_data.cc
+++ b/chrome/browser/profiles/profile_impl_io_data.cc
@@ -61,6 +61,10 @@
#include "net/url_request/url_request_job_factory_impl.h"
#include "storage/browser/quota/special_storage_policy.h"
+#if defined(OS_ANDROID)
bengr 2014/12/17 00:30:19 Include unconditionally.
megjablon 2014/12/23 02:18:03 We decided not to have a base class as discussed o
+#include "components/data_reduction_proxy/content/browser/data_reduction_proxy_ui_service.h"
+#endif
+
namespace {
net::BackendType ChooseCacheBackendType() {
@@ -144,6 +148,10 @@ void ProfileImplIOData::Handle::Init(
data_reduction_proxy_params,
scoped_ptr<data_reduction_proxy::DataReductionProxyStatisticsPrefs>
data_reduction_proxy_statistics_prefs,
+#if defined(OS_ANDROID)
bengr 2014/12/17 00:30:19 Remove #if defined
megjablon 2014/12/23 02:18:03 We decided not to have a base class as discussed o
+ 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));
@@ -185,6 +193,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)
bengr 2014/12/17 00:30:19 Remove #if defined
megjablon 2014/12/23 02:18:03 We decided not to have a base class as discussed o
+ 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());
}
@@ -456,6 +468,14 @@ void ProfileImplIOData::InitializeInternal(
.get())));
data_reduction_proxy_usage_stats()->set_unavailable_callback(
data_reduction_proxy_unavailable_callback());
+#if defined(OS_ANDROID)
bengr 2014/12/17 00:30:19 Remove #if defined
megjablon 2014/12/23 02:18:03 We decided not to have a base class as discussed o
+ if (data_reduction_proxy_ui_service()) {
+ data_reduction_proxy_ui_service()->set_proxy_config_getter(
+ base::Bind(
+ &DataReductionProxyChromeConfigurator::GetProxyConfigOnIOThread,
+ base::Unretained(data_reduction_proxy_chrome_configurator())));
+ }
+#endif
scoped_ptr<data_reduction_proxy::DataReductionProxyNetworkDelegate>
data_reduction_proxy_network_delegate(

Powered by Google App Engine
This is Rietveld 408576698