| Index: components/data_reduction_proxy/core/browser/data_reduction_proxy_usage_stats.cc
|
| diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_usage_stats.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_usage_stats.cc
|
| index a755e6de5983cddc1b8b5933a903a769ef98e271..ba594651c98d88da2d149fb38126cf8676d2ab86 100644
|
| --- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_usage_stats.cc
|
| +++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_usage_stats.cc
|
| @@ -6,10 +6,10 @@
|
|
|
| #include "base/bind.h"
|
| #include "base/callback.h"
|
| -#include "base/message_loop/message_loop_proxy.h"
|
| #include "base/metrics/histogram.h"
|
| #include "base/metrics/sparse_histogram.h"
|
| #include "base/prefs/pref_member.h"
|
| +#include "base/single_thread_task_runner.h"
|
| #include "components/data_reduction_proxy/core/common/data_reduction_proxy_headers.h"
|
| #include "components/data_reduction_proxy/core/common/data_reduction_proxy_params.h"
|
| #include "net/base/load_flags.h"
|
| @@ -102,11 +102,11 @@ void DataReductionProxyUsageStats::DetectAndRecordMissingViaHeaderResponseCode(
|
|
|
| DataReductionProxyUsageStats::DataReductionProxyUsageStats(
|
| DataReductionProxyParams* params,
|
| - const scoped_refptr<MessageLoopProxy>& ui_thread_proxy)
|
| + const scoped_refptr<base::SingleThreadTaskRunner>& ui_task_runner)
|
| : data_reduction_proxy_params_(params),
|
| last_bypass_type_(BYPASS_EVENT_TYPE_MAX),
|
| triggering_request_(true),
|
| - ui_thread_proxy_(ui_thread_proxy),
|
| + ui_task_runner_(ui_task_runner),
|
| successful_requests_through_proxy_count_(0),
|
| proxy_net_errors_count_(0),
|
| unavailable_(false) {
|
| @@ -174,7 +174,7 @@ void DataReductionProxyUsageStats::NotifyUnavailabilityIfChanged() {
|
| successful_requests_through_proxy_count_ <=
|
| kMaxSuccessfulRequestsWhenUnavailable);
|
| if (prev_unavailable != unavailable_) {
|
| - ui_thread_proxy_->PostTask(FROM_HERE, base::Bind(
|
| + ui_task_runner_->PostTask(FROM_HERE, base::Bind(
|
| &DataReductionProxyUsageStats::NotifyUnavailabilityOnUIThread,
|
| base::Unretained(this),
|
| unavailable_));
|
| @@ -183,7 +183,7 @@ void DataReductionProxyUsageStats::NotifyUnavailabilityIfChanged() {
|
|
|
| void DataReductionProxyUsageStats::NotifyUnavailabilityOnUIThread(
|
| bool unavailable) {
|
| - DCHECK(ui_thread_proxy_->BelongsToCurrentThread());
|
| + DCHECK(ui_task_runner_->BelongsToCurrentThread());
|
| if (!unavailable_callback_.is_null())
|
| unavailable_callback_.Run(unavailable);
|
| }
|
|
|