diff options
author | fischman@chromium.org <fischman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-18 03:29:37 +0000 |
---|---|---|
committer | fischman@chromium.org <fischman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-18 03:29:37 +0000 |
commit | eb5d608b4b2a345da0ae80097ecfc7e522301590 (patch) | |
tree | 4471d19b8dbc00ca48944381910955d4cd22eed3 /media/base/media_log.cc | |
parent | 47c7ec8be8c6829d7973568fe453f46046c2e818 (diff) | |
download | chromium_src-eb5d608b4b2a345da0ae80097ecfc7e522301590.zip chromium_src-eb5d608b4b2a345da0ae80097ecfc7e522301590.tar.gz chromium_src-eb5d608b4b2a345da0ae80097ecfc7e522301590.tar.bz2 |
buffers.cc: replaced global TimeDelta constants with fully-inlined functions.
media_log.cc: replaced global AtomicSequenceNumber with LazyInstance.
BUG=94925
TEST=none
Review URL: http://codereview.chromium.org/9225001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118026 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base/media_log.cc')
-rw-r--r-- | media/base/media_log.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/media/base/media_log.cc b/media/base/media_log.cc index 2312942..a9fabe2 100644 --- a/media/base/media_log.cc +++ b/media/base/media_log.cc @@ -8,6 +8,7 @@ #include "base/atomic_sequence_num.h" #include "base/bind.h" +#include "base/lazy_instance.h" #include "base/logging.h" #include "base/memory/scoped_ptr.h" #include "base/values.h" @@ -16,7 +17,8 @@ namespace media { // A count of all MediaLogs created on this render process. // Used to generate unique ids. -static base::AtomicSequenceNumber media_log_count(base::LINKER_INITIALIZED); +static base::LazyInstance<base::AtomicSequenceNumber> media_log_count = + LAZY_INSTANCE_INITIALIZER; const char* MediaLog::EventTypeToString(MediaLogEvent::Type type) { switch (type) { @@ -144,7 +146,7 @@ const char* MediaLog::PipelineStatusToString(PipelineStatus status) { } MediaLog::MediaLog() { - id_ = media_log_count.GetNext(); + id_ = media_log_count.Get().GetNext(); stats_update_pending_ = false; } |