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

Unified Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_service.cc

Issue 1143503005: Fix Data Saver test in Cronet (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 7 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
« no previous file with comments | « components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_service.cc
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_service.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_service.cc
index 9f6b4b0e7df8e291b5042d053f73e832073ba816..20faab16bb05400e0715fdfa5350e320edadf578 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_service.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_service.cc
@@ -115,6 +115,10 @@ void DataReductionProxyService::SetProxyPrefs(bool enabled,
bool alternative_enabled,
bool at_startup) {
DCHECK(CalledOnValidThread());
+ if (io_task_runner_->BelongsToCurrentThread()) {
+ io_data_->SetProxyPrefs(enabled, alternative_enabled, at_startup);
+ return;
+ }
io_task_runner_->PostTask(
FROM_HERE,
base::Bind(&DataReductionProxyIOData::SetProxyPrefs,
@@ -123,6 +127,10 @@ void DataReductionProxyService::SetProxyPrefs(bool enabled,
void DataReductionProxyService::RetrieveConfig() {
DCHECK(CalledOnValidThread());
+ if (io_task_runner_->BelongsToCurrentThread()) {
+ io_data_->RetrieveConfig();
+ return;
+ }
io_task_runner_->PostTask(
FROM_HERE,
base::Bind(&DataReductionProxyIOData::RetrieveConfig, io_data_));
« no previous file with comments | « components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698