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

Unified Diff: chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.cc

Issue 1221663009: Expose API to store and load data usage stats from UI task runner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Breakdown
Patch Set: Add DCHECK Created 5 years, 5 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/net/spdyproxy/data_reduction_proxy_chrome_settings.cc
diff --git a/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.cc b/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.cc
index 0459ded60bc057c0e1af30094916a8f896c44c11..cb74b9976b2777713286e0d85437e6b9fb9e016e 100644
--- a/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.cc
+++ b/chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.cc
@@ -7,6 +7,7 @@
#include <string>
#include "base/base64.h"
+#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/metrics/histogram_macros.h"
#include "base/prefs/pref_service.h"
@@ -23,6 +24,7 @@
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_service.h"
#include "components/data_reduction_proxy/core/browser/data_reduction_proxy_settings.h"
+#include "components/data_reduction_proxy/core/browser/data_store.h"
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_params.h"
#include "components/proxy_config/proxy_prefs.h"
#include "net/base/host_port_pair.h"
@@ -176,7 +178,9 @@ void DataReductionProxyChromeSettings::InitDataReductionProxySettings(
data_reduction_proxy::DataReductionProxyIOData* io_data,
PrefService* profile_prefs,
net::URLRequestContextGetter* request_context_getter,
- const scoped_refptr<base::SingleThreadTaskRunner>& ui_task_runner) {
+ scoped_ptr<data_reduction_proxy::DataStore> store,
+ const scoped_refptr<base::SingleThreadTaskRunner>& ui_task_runner,
+ const scoped_refptr<base::SequencedTaskRunner>& db_task_runner) {
#if defined(OS_ANDROID) || defined(OS_IOS)
// On mobile we write Data Reduction Proxy prefs directly to the pref service.
// On desktop we store Data Reduction Proxy prefs in memory, writing to disk
@@ -188,14 +192,11 @@ void DataReductionProxyChromeSettings::InitDataReductionProxySettings(
base::TimeDelta commit_delay = base::TimeDelta::FromMinutes(60);
#endif
- scoped_ptr<data_reduction_proxy::DataReductionProxyCompressionStats>
- compression_stats = make_scoped_ptr(
- new data_reduction_proxy::DataReductionProxyCompressionStats(
- profile_prefs, ui_task_runner, commit_delay));
scoped_ptr<data_reduction_proxy::DataReductionProxyService> service =
make_scoped_ptr(new data_reduction_proxy::DataReductionProxyService(
- compression_stats.Pass(), this, profile_prefs, request_context_getter,
- io_data->io_task_runner()));
+ this, profile_prefs, request_context_getter, store.Pass(),
+ ui_task_runner, io_data->io_task_runner(), db_task_runner,
+ commit_delay));
data_reduction_proxy::DataReductionProxySettings::
InitDataReductionProxySettings(profile_prefs, io_data, service.Pass());
io_data->SetDataReductionProxyService(
« no previous file with comments | « chrome/browser/net/spdyproxy/data_reduction_proxy_chrome_settings.h ('k') | chrome/browser/profiles/profile_impl_io_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698