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

Unified Diff: android_webview/browser/aw_browser_context.cc

Issue 893003002: Data Reduction Proxy class ownership updates and Settings cleanup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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: android_webview/browser/aw_browser_context.cc
diff --git a/android_webview/browser/aw_browser_context.cc b/android_webview/browser/aw_browser_context.cc
index f20bd9ce62cf1b5da6b28a95097263d501323401..4134e47c78bb0985cace33e47872abd21753cafb 100644
--- a/android_webview/browser/aw_browser_context.cc
+++ b/android_webview/browser/aw_browser_context.cc
@@ -21,6 +21,7 @@
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_prefs.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.h"
+#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_statistics_prefs.h"
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_params.h"
#include "components/user_prefs/user_prefs.h"
#include "components/visitedlink/browser/visitedlink_master.h"
@@ -159,23 +160,16 @@ void AwBrowserContext::PreMainMessageLoopRun() {
make_scoped_ptr(CreateProxyConfigService()).Pass());
data_reduction_proxy_settings_.reset(
- new data_reduction_proxy::DataReductionProxySettings(
- scoped_ptr<data_reduction_proxy::DataReductionProxyParams>(
- new data_reduction_proxy::DataReductionProxyParams(
- data_reduction_proxy::DataReductionProxyParams::kAllowed))
- .Pass()));
+ new data_reduction_proxy::DataReductionProxySettings());
data_reduction_proxy_io_data_.reset(
new data_reduction_proxy::DataReductionProxyIOData(
data_reduction_proxy::Client::WEBVIEW_ANDROID,
- scoped_ptr<
- data_reduction_proxy::DataReductionProxyStatisticsPrefs>(),
+ data_reduction_proxy::DataReductionProxyParams::kAllowed,
+ scoped_ptr<data_reduction_proxy::DataReductionProxyStatisticsPrefs>(),
data_reduction_proxy_settings_.get(),
url_request_context_getter_->GetNetLog(),
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
- BrowserThread::GetMessageLoopProxyForThread(
- BrowserThread::UI)));
- data_reduction_proxy_settings_->SetProxyConfigurator(
- data_reduction_proxy_io_data_->configurator());
+ BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI)));
visitedlink_master_.reset(
new visitedlink::VisitedLinkMaster(this, this, false));
@@ -278,10 +272,8 @@ void AwBrowserContext::CreateUserPrefServiceIfNecessary() {
if (data_reduction_proxy_settings_) {
data_reduction_proxy_settings_->InitDataReductionProxySettings(
- user_pref_service_.get(),
- GetRequestContext(),
- GetAwURLRequestContext()->GetNetLog(),
- data_reduction_proxy_io_data_->event_store());
+ user_pref_service_.get(), data_reduction_proxy_io_data_.get());
+ data_reduction_proxy_io_data_->Initialize(GetRequestContext());
data_reduction_proxy_settings_->MaybeActivateDataReductionProxy(true);
SetDataReductionProxyEnabled(data_reduction_proxy_enabled_);

Powered by Google App Engine
This is Rietveld 408576698