diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-21 04:55:52 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-21 04:55:52 +0000 |
commit | 20305ec6f1acf21392c2f3938a14a96f1e28e76d (patch) | |
tree | 6eff1f7be4bad1a1362d3466f0ac59292dc51acc /webkit/glue/media | |
parent | c6e8346b56ab61b35845aefcf9b241c654fe1253 (diff) | |
download | chromium_src-20305ec6f1acf21392c2f3938a14a96f1e28e76d.zip chromium_src-20305ec6f1acf21392c2f3938a14a96f1e28e76d.tar.gz chromium_src-20305ec6f1acf21392c2f3938a14a96f1e28e76d.tar.bz2 |
Remove obsolete base/lock.h and fix up callers to use the new header file and
the base namespace. Fix several files including lock.h unnecessarily.
BUG=none
TEST=none
Original review=http://codereview.chromium.org/6142009/
Patch by leviw@chromium.org
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72106 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/media')
-rw-r--r-- | webkit/glue/media/buffered_data_source.cc | 14 | ||||
-rw-r--r-- | webkit/glue/media/buffered_data_source.h | 4 | ||||
-rw-r--r-- | webkit/glue/media/buffered_resource_loader.h | 1 | ||||
-rw-r--r-- | webkit/glue/media/simple_data_source.cc | 14 | ||||
-rw-r--r-- | webkit/glue/media/simple_data_source.h | 2 |
5 files changed, 17 insertions, 18 deletions
diff --git a/webkit/glue/media/buffered_data_source.cc b/webkit/glue/media/buffered_data_source.cc index b6efa16..d7a2f47 100644 --- a/webkit/glue/media/buffered_data_source.cc +++ b/webkit/glue/media/buffered_data_source.cc @@ -115,7 +115,7 @@ bool BufferedDataSource::IsUrlSupported(const std::string& url) { void BufferedDataSource::Stop(media::FilterCallback* callback) { { - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); stop_signal_received_ = true; } if (callback) { @@ -166,7 +166,7 @@ void BufferedDataSource::Abort() { // If we are told to abort, immediately return from any pending read // with an error. if (read_callback_.get()) { - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); DoneRead_Locked(net::ERR_FAILED); } @@ -414,7 +414,7 @@ void BufferedDataSource::HttpInitialStartCallback(int error) { // let tasks on render thread to run but make sure they don't call outside // this object when Stop() method is ever called. Locking this method is safe // because |lock_| is only acquired in tasks on render thread. - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); if (stop_signal_received_) return; @@ -465,7 +465,7 @@ void BufferedDataSource::NonHttpInitialStartCallback(int error) { // let tasks on render thread to run but make sure they don't call outside // this object when Stop() method is ever called. Locking this method is safe // because |lock_| is only acquired in tasks on render thread. - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); if (stop_signal_received_) return; @@ -504,7 +504,7 @@ void BufferedDataSource::PartialReadStartCallback(int error) { // let tasks on render thread to run but make sure they don't call outside // this object when Stop() method is ever called. Locking this method is // safe because |lock_| is only acquired in tasks on render thread. - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); if (stop_signal_received_) return; DoneRead_Locked(net::ERR_INVALID_RESPONSE); @@ -534,7 +534,7 @@ void BufferedDataSource::ReadCallback(int error) { // let tasks on render thread to run but make sure they don't call outside // this object when Stop() method is ever called. Locking this method is safe // because |lock_| is only acquired in tasks on render thread. - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); if (stop_signal_received_) return; @@ -570,7 +570,7 @@ void BufferedDataSource::NetworkEventCallback() { // let tasks on render thread to run but make sure they don't call outside // this object when Stop() method is ever called. Locking this method is safe // because |lock_| is only acquired in tasks on render thread. - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); if (stop_signal_received_) return; diff --git a/webkit/glue/media/buffered_data_source.h b/webkit/glue/media/buffered_data_source.h index 1c4e3fa..c40b480 100644 --- a/webkit/glue/media/buffered_data_source.h +++ b/webkit/glue/media/buffered_data_source.h @@ -8,8 +8,8 @@ #include <string> #include "base/callback.h" -#include "base/lock.h" #include "base/scoped_ptr.h" +#include "base/synchronization/lock.h" #include "webkit/glue/media/buffered_resource_loader.h" namespace webkit_glue { @@ -175,7 +175,7 @@ class BufferedDataSource : public WebDataSource { MessageLoop* render_loop_; // Protects |stopped_|. - Lock lock_; + base::Lock lock_; // Stop signal to suppressing activities. This variable is set on the pipeline // thread and read from the render thread. diff --git a/webkit/glue/media/buffered_resource_loader.h b/webkit/glue/media/buffered_resource_loader.h index df57612..80e9632 100644 --- a/webkit/glue/media/buffered_resource_loader.h +++ b/webkit/glue/media/buffered_resource_loader.h @@ -8,7 +8,6 @@ #include <string> #include "base/callback.h" -#include "base/lock.h" #include "base/scoped_ptr.h" #include "base/timer.h" #include "googleurl/src/gurl.h" diff --git a/webkit/glue/media/simple_data_source.cc b/webkit/glue/media/simple_data_source.cc index bc2c20d..f4f92dd 100644 --- a/webkit/glue/media/simple_data_source.cc +++ b/webkit/glue/media/simple_data_source.cc @@ -35,12 +35,12 @@ SimpleDataSource::SimpleDataSource( } SimpleDataSource::~SimpleDataSource() { - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); DCHECK(state_ == UNINITIALIZED || state_ == STOPPED); } void SimpleDataSource::Stop(media::FilterCallback* callback) { - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); state_ = STOPPED; if (callback) { callback->Run(); @@ -54,7 +54,7 @@ void SimpleDataSource::Stop(media::FilterCallback* callback) { void SimpleDataSource::Initialize(const std::string& url, media::FilterCallback* callback) { - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); DCHECK_EQ(state_, UNINITIALIZED); DCHECK(callback); state_ = INITIALIZING; @@ -157,7 +157,7 @@ void SimpleDataSource::didFinishLoading( WebKit::WebURLLoader* loader, double finishTime) { DCHECK(MessageLoop::current() == render_loop_); - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); // It's possible this gets called after Stop(), in which case |host_| is no // longer valid. if (state_ == STOPPED) @@ -179,7 +179,7 @@ void SimpleDataSource::didFail( WebKit::WebURLLoader* loader, const WebKit::WebURLError& error) { DCHECK(MessageLoop::current() == render_loop_); - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); // It's possible this gets called after Stop(), in which case |host_| is no // longer valid. if (state_ == STOPPED) @@ -217,7 +217,7 @@ void SimpleDataSource::SetURL(const GURL& url) { void SimpleDataSource::StartTask() { DCHECK(MessageLoop::current() == render_loop_); - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); // We may have stopped. if (state_ == STOPPED) @@ -253,7 +253,7 @@ void SimpleDataSource::StartTask() { void SimpleDataSource::CancelTask() { DCHECK(MessageLoop::current() == render_loop_); - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); DCHECK_EQ(state_, STOPPED); // Cancel any pending requests. diff --git a/webkit/glue/media/simple_data_source.h b/webkit/glue/media/simple_data_source.h index 2e415f0..10d93ff 100644 --- a/webkit/glue/media/simple_data_source.h +++ b/webkit/glue/media/simple_data_source.h @@ -120,7 +120,7 @@ class SimpleDataSource : public WebDataSource, State state_; // Used for accessing |state_|. - Lock lock_; + base::Lock lock_; // Filter callbacks. scoped_ptr<media::FilterCallback> initialize_callback_; |