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

Unified Diff: base/metrics/histogram_base.h

Issue 1445283004: Use subtle::NoBarrier* statements for Histogram flags_ field. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | base/metrics/histogram_base.cc » ('j') | base/metrics/histogram_base.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/histogram_base.h
diff --git a/base/metrics/histogram_base.h b/base/metrics/histogram_base.h
index 669d4bac440bb45f1abf0e1093d09d67bd5ae86e..d246691ca257093851f7dc7c6393d7af51a3285b 100644
--- a/base/metrics/histogram_base.h
+++ b/base/metrics/histogram_base.h
@@ -105,7 +105,7 @@ class BASE_EXPORT HistogramBase {
void CheckName(const StringPiece& name) const;
// Operations with Flags enum.
- int32_t flags() const { return flags_; }
+ int32_t flags() const { return subtle::NoBarrier_Load(&flags_); }
void SetFlags(int32_t flags);
void ClearFlags(int32_t flags);
@@ -189,7 +189,7 @@ class BASE_EXPORT HistogramBase {
private:
const std::string histogram_name_;
- int32_t flags_;
+ AtomicCount flags_;
DISALLOW_COPY_AND_ASSIGN(HistogramBase);
};
« no previous file with comments | « no previous file | base/metrics/histogram_base.cc » ('j') | base/metrics/histogram_base.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698