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

Unified Diff: components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats.h

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_bypass_stats.h
diff --git a/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats.h b/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats.h
index be08aa55afd7884b196464a220273d8c3e736b22..22674e9f1aa7b29ac26a1b542f5a21c8f03cf9e0 100644
--- a/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats.h
+++ b/components/data_reduction_proxy/core/browser/data_reduction_proxy_bypass_stats.h
@@ -10,6 +10,7 @@
#include "base/callback.h"
#include "base/gtest_prod_util.h"
#include "base/macros.h"
+#include "base/threading/thread_checker.h"
#include "components/data_reduction_proxy/core/common/data_reduction_proxy_headers.h"
#include "net/base/host_port_pair.h"
#include "net/base/network_change_notifier.h"
@@ -55,6 +56,9 @@ class DataReductionProxyBypassStats
~DataReductionProxyBypassStats() override;
+ // Performs initialization on the IO thread.
+ void InitializeOnIOThread();
+
// Callback intended to be called from |DataReductionProxyNetworkDelegate|
// when a request completes. This method is used to gather bypass stats.
void OnUrlRequestCompleted(const net::URLRequest* request,
@@ -154,6 +158,8 @@ class DataReductionProxyBypassStats
// Whether or not the data reduction proxy is unavailable.
bool unavailable_;
+ base::ThreadChecker thread_checker_;
+
DISALLOW_COPY_AND_ASSIGN(DataReductionProxyBypassStats);
};

Powered by Google App Engine
This is Rietveld 408576698