Index: media/base/wall_clock_time_source.h |
diff --git a/media/base/wall_clock_time_source.h b/media/base/wall_clock_time_source.h |
index 87e28af88469153516858b372bdacd1c8d6d36f4..8057746afce0e836de03302d4b8164671570c438 100644 |
--- a/media/base/wall_clock_time_source.h |
+++ b/media/base/wall_clock_time_source.h |
@@ -6,6 +6,7 @@ |
#define MEDIA_BASE_WALL_CLOCK_TIME_SOURCE_H_ |
#include "base/memory/scoped_ptr.h" |
+#include "base/synchronization/lock.h" |
#include "media/base/media_export.h" |
#include "media/base/time_source.h" |
@@ -32,6 +33,8 @@ class MEDIA_EXPORT WallClockTimeSource : public TimeSource { |
void SetTickClockForTesting(scoped_ptr<base::TickClock> tick_clock); |
private: |
+ base::TimeDelta CurrentMediaTime_Locked(); |
+ |
scoped_ptr<base::TickClock> tick_clock_; |
bool ticking_; |
@@ -42,6 +45,10 @@ class MEDIA_EXPORT WallClockTimeSource : public TimeSource { |
base::TimeDelta base_time_; |
base::TimeTicks reference_wall_ticks_; |
+ // TODO(scherkus): Remove internal locking from this class after access to |
+ // Renderer::CurrentMediaTime() is single threaded http://crbug.com/370634 |
+ base::Lock lock_; |
+ |
DISALLOW_COPY_AND_ASSIGN(WallClockTimeSource); |
}; |