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

Unified Diff: components/cronet/histogram_manager.cc

Issue 1882563004: [Cronet] Make HistogramManager public APIs thread-safe. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « components/cronet/histogram_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/cronet/histogram_manager.cc
diff --git a/components/cronet/histogram_manager.cc b/components/cronet/histogram_manager.cc
index 4ec3adffb30b5cf39c9b07f8d0e8aeace32d04ef..3ab21cf45466468d063e5c335c8bb5c453984c99 100644
--- a/components/cronet/histogram_manager.cc
+++ b/components/cronet/histogram_manager.cc
@@ -53,6 +53,7 @@ void HistogramManager::InconsistencyDetectedInLoggedCount(int amount) {
}
bool HistogramManager::GetDeltas(std::vector<uint8_t>* data) {
+ base::AutoLock lock(lock_);
bcwhite 2016/04/13 14:12:52 It doesn't make sense to make multiple, parallel c
pauljensen 2016/04/13 14:29:45 It may not make sense to do this, but we shouldn't
bcwhite 2016/04/13 14:42:18 If this method were to be called while some "futur
// Clear the protobuf between calls.
uma_proto_.Clear();
// "false" to StatisticsRecorder::begin() indicates to *not* include
« no previous file with comments | « components/cronet/histogram_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698