Chromium Code Reviews| Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_config.cc |
| diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_config.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_config.cc |
| index bb7ab76752ea742954fdee844800ce89c489f917..6337f9b51e40115cf404931d0aeec6cb8af492e7 100644 |
| --- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_config.cc |
| +++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_config.cc |
| @@ -84,10 +84,16 @@ void DataReductionProxyConfig::SetProxyPrefs(bool enabled, |
| bool alternative_enabled, |
| bool at_startup) { |
| DCHECK(thread_checker_.CalledOnValidThread()); |
| + |
| + if (io_task_runner_->BelongsToCurrentThread()) { |
| + SetProxyConfigOnIOThread(enabled, alternative_enabled, at_startup); |
| + return; |
| + } |
|
mmenke
2015/04/01 16:48:53
Why do we need to do this stuff synchronously, her
bengr
2015/04/24 02:30:43
Done.
|
| io_task_runner_->PostTask( |
| - FROM_HERE, base::Bind(&DataReductionProxyConfig::SetProxyConfigOnIOThread, |
| - base::Unretained(this), enabled, |
| - alternative_enabled, at_startup)); |
| + FROM_HERE, base::Bind( |
| + &DataReductionProxyConfig::SetProxyConfigOnIOThread, |
| + base::Unretained(this), enabled, |
| + alternative_enabled, at_startup)); |
| } |
| bool DataReductionProxyConfig::WasDataReductionProxyUsed( |