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

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

Issue 2546023002: Initialize data reduction proxy bypass stats on IO thread (Closed)
Patch Set: More Created 4 years 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: components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc b/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc
index e64f585a05e3bb82922aba0f53f6a277832f82ba..70eb6211200b9e48c3c9d1fdc0b4a08abb4b7adc 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_io_data.cc
@@ -167,6 +167,9 @@ DataReductionProxyIOData::DataReductionProxyIOData(
}
DataReductionProxyIOData::~DataReductionProxyIOData() {
+ // Guaranteed to be destroyed on IO thread if the IO thread is still
+ // available at the time of destruction. If the IO thread is unavailable,
+ // then the destruction will happen on the UI thread.
}
void DataReductionProxyIOData::ShutdownOnUIThread() {
@@ -194,6 +197,7 @@ void DataReductionProxyIOData::SetDataReductionProxyService(
void DataReductionProxyIOData::InitializeOnIOThread() {
DCHECK(io_task_runner_->BelongsToCurrentThread());
config_->InitializeOnIOThread(basic_url_request_context_getter_.get());
+ bypass_stats_->InitializeOnIOThread();
proxy_delegate_->InitializeOnIOThread();
if (config_client_.get())
config_client_->InitializeOnIOThread(url_request_context_getter_);

Powered by Google App Engine
This is Rietveld 408576698