diff options
Diffstat (limited to 'webkit')
-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 | ||||
-rw-r--r-- | webkit/glue/webkitclient_impl.cc | 8 | ||||
-rw-r--r-- | webkit/glue/webmediaplayer_impl.cc | 4 | ||||
-rw-r--r-- | webkit/glue/webmediaplayer_impl.h | 4 | ||||
-rw-r--r-- | webkit/plugins/npapi/plugin_list.cc | 48 | ||||
-rw-r--r-- | webkit/plugins/npapi/plugin_list.h | 4 | ||||
-rw-r--r-- | webkit/tools/test_shell/simple_database_system.cc | 4 | ||||
-rw-r--r-- | webkit/tools/test_shell/simple_database_system.h | 4 |
12 files changed, 55 insertions, 56 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_; diff --git a/webkit/glue/webkitclient_impl.cc b/webkit/glue/webkitclient_impl.cc index b4da504..c93fdfd 100644 --- a/webkit/glue/webkitclient_impl.cc +++ b/webkit/glue/webkitclient_impl.cc @@ -13,7 +13,6 @@ #include <vector> #include "base/debug/trace_event.h" -#include "base/lock.h" #include "base/message_loop.h" #include "base/metrics/stats_counters.h" #include "base/metrics/histogram.h" @@ -22,6 +21,7 @@ #include "base/singleton.h" #include "base/string_number_conversions.h" #include "base/string_util.h" +#include "base/synchronization/lock.h" #include "base/time.h" #include "base/utf_string_conversions.h" #include "grit/webkit_resources.h" @@ -78,7 +78,7 @@ class MemoryUsageCache { // Returns true if the cached value is fresh. // Returns false if the cached value is stale, or if |cached_value| is NULL. bool IsCachedValueValid(size_t* cached_value) { - AutoLock scoped_lock(lock_); + base::AutoLock scoped_lock(lock_); if (!cached_value) return false; if (base::Time::Now() - last_updated_time_ > cache_valid_time_) @@ -89,7 +89,7 @@ class MemoryUsageCache { // Setter for |memory_value_|, refreshes |last_updated_time_|. void SetMemoryValue(const size_t value) { - AutoLock scoped_lock(lock_); + base::AutoLock scoped_lock(lock_); memory_value_ = value; last_updated_time_ = base::Time::Now(); } @@ -104,7 +104,7 @@ class MemoryUsageCache { // The last time the cached value was updated. base::Time last_updated_time_; - Lock lock_; + base::Lock lock_; }; } // anonymous namespace diff --git a/webkit/glue/webmediaplayer_impl.cc b/webkit/glue/webmediaplayer_impl.cc index b97eb8d..b9df79d 100644 --- a/webkit/glue/webmediaplayer_impl.cc +++ b/webkit/glue/webmediaplayer_impl.cc @@ -80,7 +80,7 @@ WebMediaPlayerImpl::Proxy::~Proxy() { } void WebMediaPlayerImpl::Proxy::Repaint() { - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); if (outstanding_repaints_ < kMaxOutstandingRepaints) { ++outstanding_repaints_; @@ -164,7 +164,7 @@ void WebMediaPlayerImpl::Proxy::NetworkEventCallback() { void WebMediaPlayerImpl::Proxy::RepaintTask() { DCHECK(MessageLoop::current() == render_loop_); { - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); --outstanding_repaints_; DCHECK_GE(outstanding_repaints_, 0); } diff --git a/webkit/glue/webmediaplayer_impl.h b/webkit/glue/webmediaplayer_impl.h index 33cc7b2..d388aef 100644 --- a/webkit/glue/webmediaplayer_impl.h +++ b/webkit/glue/webmediaplayer_impl.h @@ -53,11 +53,11 @@ #ifndef WEBKIT_GLUE_WEBMEDIAPLAYER_IMPL_H_ #define WEBKIT_GLUE_WEBMEDIAPLAYER_IMPL_H_ -#include "base/lock.h" #include "base/message_loop.h" #include "base/ref_counted.h" #include "base/scoped_ptr.h" #include "base/threading/thread.h" +#include "base/synchronization/lock.h" #include "base/synchronization/waitable_event.h" #include "gfx/rect.h" #include "gfx/size.h" @@ -149,7 +149,7 @@ class WebMediaPlayerImpl : public WebKit::WebMediaPlayer, scoped_refptr<WebDataSource> data_source_; scoped_refptr<WebVideoRenderer> video_renderer_; - Lock lock_; + base::Lock lock_; int outstanding_repaints_; }; diff --git a/webkit/plugins/npapi/plugin_list.cc b/webkit/plugins/npapi/plugin_list.cc index b2e236a..96912d9 100644 --- a/webkit/plugins/npapi/plugin_list.cc +++ b/webkit/plugins/npapi/plugin_list.cc @@ -182,25 +182,25 @@ bool PluginList::DebugPluginLoading() { } bool PluginList::PluginsLoaded() { - AutoLock lock(lock_); + base::AutoLock lock(lock_); return plugins_loaded_; } void PluginList::RefreshPlugins() { - AutoLock lock(lock_); + base::AutoLock lock(lock_); plugins_need_refresh_ = true; } void PluginList::AddExtraPluginPath(const FilePath& plugin_path) { // Chrome OS only loads plugins from /opt/google/chrome/plugins. #if !defined(OS_CHROMEOS) - AutoLock lock(lock_); + base::AutoLock lock(lock_); extra_plugin_paths_.push_back(plugin_path); #endif } void PluginList::RemoveExtraPluginPath(const FilePath& plugin_path) { - AutoLock lock(lock_); + base::AutoLock lock(lock_); std::vector<FilePath>::iterator it = std::find(extra_plugin_paths_.begin(), extra_plugin_paths_.end(), plugin_path); @@ -211,7 +211,7 @@ void PluginList::RemoveExtraPluginPath(const FilePath& plugin_path) { void PluginList::AddExtraPluginDir(const FilePath& plugin_dir) { // Chrome OS only loads plugins from /opt/google/chrome/plugins. #if !defined(OS_CHROMEOS) - AutoLock lock(lock_); + base::AutoLock lock(lock_); extra_plugin_dirs_.push_back(plugin_dir); #endif } @@ -220,7 +220,7 @@ void PluginList::RegisterInternalPlugin(const WebPluginInfo& info) { PluginEntryPoints entry_points = {0}; InternalPlugin plugin = { info, entry_points }; - AutoLock lock(lock_); + base::AutoLock lock(lock_); internal_plugins_.push_back(plugin); } @@ -242,12 +242,12 @@ void PluginList::RegisterInternalPlugin(const FilePath& filename, plugin.entry_points = entry_points; - AutoLock lock(lock_); + base::AutoLock lock(lock_); internal_plugins_.push_back(plugin); } void PluginList::UnregisterInternalPlugin(const FilePath& path) { - AutoLock lock(lock_); + base::AutoLock lock(lock_); for (size_t i = 0; i < internal_plugins_.size(); i++) { if (internal_plugins_[i].info.path == path) { internal_plugins_.erase(internal_plugins_.begin() + i); @@ -261,7 +261,7 @@ bool PluginList::ReadPluginInfo(const FilePath& filename, WebPluginInfo* info, const PluginEntryPoints** entry_points) { { - AutoLock lock(lock_); + base::AutoLock lock(lock_); for (size_t i = 0; i < internal_plugins_.size(); ++i) { if (filename == internal_plugins_[i].info.path) { *entry_points = &internal_plugins_[i].entry_points; @@ -331,7 +331,7 @@ PluginList::PluginList() } bool PluginList::ShouldDisableGroup(const string16& group_name) { - AutoLock lock(lock_); + base::AutoLock lock(lock_); if (PluginGroup::IsPluginNameDisabledByPolicy(group_name)) { disabled_groups_.insert(group_name); return true; @@ -346,7 +346,7 @@ void PluginList::LoadPlugins(bool refresh) { std::vector<FilePath> extra_plugin_dirs; std::vector<InternalPlugin> internal_plugins; { - AutoLock lock(lock_); + base::AutoLock lock(lock_); if (plugins_loaded_ && !refresh && !plugins_need_refresh_) return; @@ -414,13 +414,13 @@ void PluginList::LoadPlugins(bool refresh) { group->DisableOutdatedPlugins(); } if (!group->Enabled()) { - AutoLock lock(lock_); + base::AutoLock lock(lock_); disabled_groups_.insert(group_name); } } // Only update the data now since loading plugins can take a while. - AutoLock lock(lock_); + base::AutoLock lock(lock_); plugins_ = new_plugins; plugins_loaded_ = true; @@ -463,7 +463,7 @@ void PluginList::LoadPlugin(const FilePath& path, plugin_info.enabled = true; } - AutoLock lock(lock_); + base::AutoLock lock(lock_); plugins->push_back(plugin_info); AddToPluginGroups(plugin_info); } @@ -508,7 +508,7 @@ bool PluginList::SupportsExtension(const WebPluginInfo& info, void PluginList::GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) { LoadPlugins(refresh); - AutoLock lock(lock_); + base::AutoLock lock(lock_); *plugins = plugins_; } @@ -517,7 +517,7 @@ void PluginList::GetEnabledPlugins(bool refresh, LoadPlugins(refresh); plugins->clear(); - AutoLock lock(lock_); + base::AutoLock lock(lock_); for (std::vector<WebPluginInfo>::const_iterator it = plugins_.begin(); it != plugins_.end(); ++it) { @@ -536,7 +536,7 @@ void PluginList::GetPluginInfoArray( DCHECK(info); LoadPlugins(false); - AutoLock lock(lock_); + base::AutoLock lock(lock_); info->clear(); if (actual_mime_types) actual_mime_types->clear(); @@ -636,7 +636,7 @@ bool PluginList::GetPluginInfo(const GURL& url, bool PluginList::GetPluginInfoByPath(const FilePath& plugin_path, WebPluginInfo* info) { LoadPlugins(false); - AutoLock lock(lock_); + base::AutoLock lock(lock_); for (size_t i = 0; i < plugins_.size(); ++i) { if (plugins_[i].path == plugin_path) { *info = plugins_[i]; @@ -662,7 +662,7 @@ void PluginList::GetPluginGroups( const PluginGroup* PluginList::GetPluginGroup( const WebPluginInfo& web_plugin_info) { - AutoLock lock(lock_); + base::AutoLock lock(lock_); return AddToPluginGroups(web_plugin_info); } @@ -676,13 +676,13 @@ string16 PluginList::GetPluginGroupName(std::string identifier) { std::string PluginList::GetPluginGroupIdentifier( const WebPluginInfo& web_plugin_info) { - AutoLock lock(lock_); + base::AutoLock lock(lock_); PluginGroup* group = AddToPluginGroups(web_plugin_info); return group->identifier(); } void PluginList::AddHardcodedPluginGroups() { - AutoLock lock(lock_); + base::AutoLock lock(lock_); const PluginGroupDefinition* definitions = GetPluginGroupDefinitions(); for (size_t i = 0; i < GetPluginGroupDefinitionsSize(); ++i) { PluginGroup* definition_group = PluginGroup::FromPluginGroupDefinition( @@ -720,7 +720,7 @@ PluginGroup* PluginList::AddToPluginGroups( } bool PluginList::EnablePlugin(const FilePath& filename) { - AutoLock lock(lock_); + base::AutoLock lock(lock_); bool did_enable = false; @@ -745,7 +745,7 @@ bool PluginList::EnablePlugin(const FilePath& filename) { } bool PluginList::DisablePlugin(const FilePath& filename) { - AutoLock lock(lock_); + base::AutoLock lock(lock_); bool did_disable = false; @@ -771,7 +771,7 @@ bool PluginList::DisablePlugin(const FilePath& filename) { bool PluginList::EnableGroup(bool enable, const string16& group_name) { bool did_change = false; { - AutoLock lock(lock_); + base::AutoLock lock(lock_); std::set<string16>::iterator entry = disabled_groups_.find(group_name); if (enable) { diff --git a/webkit/plugins/npapi/plugin_list.h b/webkit/plugins/npapi/plugin_list.h index bf9865e..f0c269b 100644 --- a/webkit/plugins/npapi/plugin_list.h +++ b/webkit/plugins/npapi/plugin_list.h @@ -12,7 +12,7 @@ #include "base/basictypes.h" #include "base/file_path.h" #include "base/linked_ptr.h" -#include "base/lock.h" +#include "base/synchronization/lock.h" #include "third_party/npapi/bindings/nphostapi.h" #include "webkit/plugins/npapi/plugin_group.h" #include "webkit/plugins/npapi/webplugininfo.h" @@ -329,7 +329,7 @@ class PluginList { // Need synchronization for the above members since this object can be // accessed on multiple threads. - Lock lock_; + base::Lock lock_; friend struct base::DefaultLazyInstanceTraits<PluginList>; diff --git a/webkit/tools/test_shell/simple_database_system.cc b/webkit/tools/test_shell/simple_database_system.cc index d407359..dc80f69 100644 --- a/webkit/tools/test_shell/simple_database_system.cc +++ b/webkit/tools/test_shell/simple_database_system.cc @@ -175,7 +175,7 @@ void SimpleDatabaseSystem::SetFullFilePathsForVfsFile( FilePath file_name = DatabaseUtil::GetFullFilePathForVfsFile(db_tracker_, vfs_file_name); - AutoLock file_names_auto_lock(file_names_lock_); + base::AutoLock file_names_auto_lock(file_names_lock_); file_names_[vfs_file_name] = file_name; file_names_[vfs_file_name + ASCIIToUTF16("-journal")] = FilePath::FromWStringHack(file_name.ToWStringHack() + @@ -187,7 +187,7 @@ FilePath SimpleDatabaseSystem::GetFullFilePathForVfsFile( if (vfs_file_name.empty()) // temp file, used for vacuuming return FilePath(); - AutoLock file_names_auto_lock(file_names_lock_); + base::AutoLock file_names_auto_lock(file_names_lock_); DCHECK(file_names_.find(vfs_file_name) != file_names_.end()); return file_names_[vfs_file_name]; } diff --git a/webkit/tools/test_shell/simple_database_system.h b/webkit/tools/test_shell/simple_database_system.h index 74214e8..7efe072 100644 --- a/webkit/tools/test_shell/simple_database_system.h +++ b/webkit/tools/test_shell/simple_database_system.h @@ -7,11 +7,11 @@ #include "base/file_path.h" #include "base/hash_tables.h" -#include "base/lock.h" #include "base/platform_file.h" #include "base/ref_counted.h" #include "base/scoped_temp_dir.h" #include "base/string16.h" +#include "base/synchronization/lock.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDatabaseObserver.h" #include "webkit/database/database_connections.h" #include "webkit/database/database_tracker.h" @@ -75,7 +75,7 @@ class SimpleDatabaseSystem : public webkit_database::DatabaseTracker::Observer, scoped_refptr<webkit_database::DatabaseTracker> db_tracker_; - Lock file_names_lock_; + base::Lock file_names_lock_; base::hash_map<string16, FilePath> file_names_; webkit_database::DatabaseConnections database_connections_; |