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

Unified Diff: components/cronet/ios/cronet_environment.mm

Issue 2885543002: Make sure StatisticsRecorder::Initialize() is called at initialization (Closed)
Patch Set: Created 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/cronet/ios/cronet_environment.mm
diff --git a/components/cronet/ios/cronet_environment.mm b/components/cronet/ios/cronet_environment.mm
index 246ead1984b7e2dbbee6840dddea31626063ce89..b9d36033029076f79029ba6e18313fe2a8dae7ba 100644
--- a/components/cronet/ios/cronet_environment.mm
+++ b/components/cronet/ios/cronet_environment.mm
@@ -112,8 +112,8 @@ net::URLRequestContextGetter* CronetEnvironment::GetURLRequestContextGetter()
// static
void CronetEnvironment::Initialize() {
- // DCHECK_EQ([NSThread currentThread], [NSThread mainThread]);
// This method must be called once from the main thread.
+ DCHECK_EQ([NSThread currentThread], [NSThread mainThread]);
if (!g_at_exit_)
g_at_exit_ = new base::AtExitManager;
@@ -350,7 +350,7 @@ std::string CronetEnvironment::user_agent() {
}
std::vector<uint8_t> CronetEnvironment::GetHistogramDeltas() {
- base::StatisticsRecorder::Initialize();
+ DCHECK(base::StatisticsRecorder::IsActive());
std::vector<uint8_t> data;
if (!HistogramManager::GetInstance()->GetDeltas(&data))
return std::vector<uint8_t>();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698