diff options
author | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-04 19:15:28 +0000 |
---|---|---|
committer | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-04 19:15:28 +0000 |
commit | 60d470a3b90a6b91123b31f5c3de0cfaa668b075 (patch) | |
tree | 11b393933bbcf672f2d15a65bd5ae04208e726a6 /media/base | |
parent | af67f2047292bcc2744d94edf93a00ac46d0a829 (diff) | |
download | chromium_src-60d470a3b90a6b91123b31f5c3de0cfaa668b075.zip chromium_src-60d470a3b90a6b91123b31f5c3de0cfaa668b075.tar.gz chromium_src-60d470a3b90a6b91123b31f5c3de0cfaa668b075.tar.bz2 |
Cleaning up media/base/clock.cc,h
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6624022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76946 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base')
-rw-r--r-- | media/base/clock.cc | 18 | ||||
-rw-r--r-- | media/base/clock.h | 2 |
2 files changed, 10 insertions, 10 deletions
diff --git a/media/base/clock.cc b/media/base/clock.cc index aa0dbfb..61096177 100644 --- a/media/base/clock.cc +++ b/media/base/clock.cc @@ -32,6 +32,15 @@ base::TimeDelta Clock::Pause() { return media_time_; } +void Clock::SetPlaybackRate(float playback_rate) { + if (playing_) { + base::Time time = GetTimeFromProvider(); + media_time_ = ElapsedViaProvidedTime(time); + reference_ = time; + } + playback_rate_ = playback_rate; +} + void Clock::SetTime(const base::TimeDelta& time) { if (time == kNoTimestamp) { NOTREACHED(); @@ -43,15 +52,6 @@ void Clock::SetTime(const base::TimeDelta& time) { media_time_ = time; } -void Clock::SetPlaybackRate(float playback_rate) { - if (playing_) { - base::Time time = GetTimeFromProvider(); - media_time_ = ElapsedViaProvidedTime(time); - reference_ = time; - } - playback_rate_ = playback_rate; -} - base::TimeDelta Clock::Elapsed() const { if (!playing_) { return media_time_; diff --git a/media/base/clock.h b/media/base/clock.h index df94cad..8e046b0 100644 --- a/media/base/clock.h +++ b/media/base/clock.h @@ -5,7 +5,7 @@ #ifndef MEDIA_BASE_CLOCK_H_ #define MEDIA_BASE_CLOCK_H_ -#include "base/gtest_prod_util.h" +#include "base/basictypes.h" #include "base/scoped_ptr.h" #include "base/time.h" |