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

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: Rebase Created 6 years, 2 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 fb22c3c34299d8f1b98dd4b5709c3378ce1f9664..3800cb5cbecd80eaadb9cb12f3565ff02b23745c 100644
--- a/chrome/browser/profiles/profile_impl_io_data.cc
+++ b/chrome/browser/profiles/profile_impl_io_data.cc
@@ -34,6 +34,7 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
+#include "components/data_reduction_proxy/content/data_reduction_proxy_ui_service.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_auth_request_handler.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_protocol.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_statistics_prefs.h"
@@ -139,7 +140,9 @@ void ProfileImplIOData::Handle::Init(
scoped_ptr<data_reduction_proxy::DataReductionProxyParams>
data_reduction_proxy_params,
scoped_ptr<data_reduction_proxy::DataReductionProxyStatisticsPrefs>
- data_reduction_proxy_statistics_prefs) {
+ data_reduction_proxy_statistics_prefs,
+ scoped_ptr<data_reduction_proxy::DataReductionProxyUIService>
bengr 2014/10/31 17:06:47 Hmm. This UI service won't be available on iOS. I'
+ data_reduction_proxy_ui_service) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(!io_data_->lazy_params_);
DCHECK(predictor);
@@ -179,6 +182,8 @@ 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());
+ io_data_->set_data_reduction_proxy_ui_service(
bengr 2014/10/31 17:06:47 Now would be a good time to write a DataReductionP
megjablon 2014/12/11 23:32:04 Done.
+ data_reduction_proxy_ui_service.Pass());
}
content::ResourceContext*
@@ -439,6 +444,12 @@ void ProfileImplIOData::InitializeInternal(
.get())));
data_reduction_proxy_usage_stats()->set_unavailable_callback(
data_reduction_proxy_unavailable_callback());
+#if defined(OS_ANDROID)
bengr 2014/10/31 17:06:47 Can you do this if the ui_service() is not NULL in
megjablon 2014/12/11 23:32:04 Done.
+ data_reduction_proxy_ui_service()->set_proxy_config_getter(
+ base::Bind(
+ &DataReductionProxyChromeConfigurator::GetProxyConfigOnIO,
+ base::Unretained(data_reduction_proxy_chrome_configurator())));
+#endif
network_delegate()->set_data_reduction_proxy_enabled_pref(
&data_reduction_proxy_enabled_);

Powered by Google App Engine
This is Rietveld 408576698