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

Unified Diff: media/base/media_log.cc

Issue 9415039: Add base::StaticAtomicSequenceNumber. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Update Created 8 years, 10 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 | « ipc/ipc_sync_message.cc ('k') | printing/print_settings.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/media_log.cc
diff --git a/media/base/media_log.cc b/media/base/media_log.cc
index d77b16ddd459140d7c5c3551a4a4a879a6cdc5de..0920fb4f4983d4511b50d0c32eb47ee0640cd0f5 100644
--- a/media/base/media_log.cc
+++ b/media/base/media_log.cc
@@ -18,8 +18,7 @@ namespace media {
// A count of all MediaLogs created on this render process.
// Used to generate unique ids.
-static base::LazyInstance<base::AtomicSequenceNumber>::Leaky media_log_count =
- LAZY_INSTANCE_INITIALIZER;
+static base::StaticAtomicSequenceNumber media_log_count;
const char* MediaLog::EventTypeToString(MediaLogEvent::Type type) {
switch (type) {
@@ -147,7 +146,7 @@ const char* MediaLog::PipelineStatusToString(PipelineStatus status) {
}
MediaLog::MediaLog() {
- id_ = media_log_count.Get().GetNext();
+ id_ = media_log_count.GetNext();
stats_update_pending_ = false;
}
« no previous file with comments | « ipc/ipc_sync_message.cc ('k') | printing/print_settings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698