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 /chrome/test/automation | |
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 'chrome/test/automation')
-rw-r--r-- | chrome/test/automation/automation_handle_tracker.cc | 8 | ||||
-rw-r--r-- | chrome/test/automation/automation_handle_tracker.h | 4 | ||||
-rw-r--r-- | chrome/test/automation/tab_proxy.cc | 8 | ||||
-rw-r--r-- | chrome/test/automation/tab_proxy.h | 2 |
4 files changed, 11 insertions, 11 deletions
diff --git a/chrome/test/automation/automation_handle_tracker.cc b/chrome/test/automation/automation_handle_tracker.cc index 0ad7592..6f01e7b 100644 --- a/chrome/test/automation/automation_handle_tracker.cc +++ b/chrome/test/automation/automation_handle_tracker.cc @@ -34,12 +34,12 @@ AutomationHandleTracker::~AutomationHandleTracker() { } void AutomationHandleTracker::Add(AutomationResourceProxy* proxy) { - AutoLock lock(map_lock_); + base::AutoLock lock(map_lock_); handle_to_object_.insert(MapEntry(proxy->handle(), proxy)); } void AutomationHandleTracker::Remove(AutomationResourceProxy* proxy) { - AutoLock lock(map_lock_); + base::AutoLock lock(map_lock_); HandleToObjectMap::iterator iter = handle_to_object_.find(proxy->handle()); if (iter != handle_to_object_.end()) { AutomationHandle proxy_handle = proxy->handle(); @@ -51,7 +51,7 @@ void AutomationHandleTracker::Remove(AutomationResourceProxy* proxy) { void AutomationHandleTracker::InvalidateHandle(AutomationHandle handle) { // Called in background thread. - AutoLock lock(map_lock_); + base::AutoLock lock(map_lock_); HandleToObjectMap::iterator iter = handle_to_object_.find(handle); if (iter != handle_to_object_.end()) { scoped_refptr<AutomationResourceProxy> proxy = iter->second; @@ -62,7 +62,7 @@ void AutomationHandleTracker::InvalidateHandle(AutomationHandle handle) { AutomationResourceProxy* AutomationHandleTracker::GetResource( AutomationHandle handle) { - AutoLock lock(map_lock_); + base::AutoLock lock(map_lock_); HandleToObjectMap::iterator iter = handle_to_object_.find(handle); if (iter == handle_to_object_.end()) return NULL; diff --git a/chrome/test/automation/automation_handle_tracker.h b/chrome/test/automation/automation_handle_tracker.h index bfa319a..9558af2 100644 --- a/chrome/test/automation/automation_handle_tracker.h +++ b/chrome/test/automation/automation_handle_tracker.h @@ -12,8 +12,8 @@ #include <map> #include "base/basictypes.h" -#include "base/lock.h" #include "base/ref_counted.h" +#include "base/synchronization/lock.h" #include "ipc/ipc_channel.h" // This represents a value that the app's AutomationProvider returns @@ -106,7 +106,7 @@ class AutomationHandleTracker { HandleToObjectMap handle_to_object_; - Lock map_lock_; + base::Lock map_lock_; IPC::Channel* channel_; DISALLOW_COPY_AND_ASSIGN(AutomationHandleTracker); }; diff --git a/chrome/test/automation/tab_proxy.cc b/chrome/test/automation/tab_proxy.cc index 646e7a8..f7908c4 100644 --- a/chrome/test/automation/tab_proxy.cc +++ b/chrome/test/automation/tab_proxy.cc @@ -789,25 +789,25 @@ void TabProxy::JavaScriptStressTestControl(int cmd, int param) { } void TabProxy::AddObserver(TabProxyDelegate* observer) { - AutoLock lock(list_lock_); + base::AutoLock lock(list_lock_); observers_list_.AddObserver(observer); } void TabProxy::RemoveObserver(TabProxyDelegate* observer) { - AutoLock lock(list_lock_); + base::AutoLock lock(list_lock_); observers_list_.RemoveObserver(observer); } // Called on Channel background thread, if TabMessages filter is installed. bool TabProxy::OnMessageReceived(const IPC::Message& message) { - AutoLock lock(list_lock_); + base::AutoLock lock(list_lock_); FOR_EACH_OBSERVER(TabProxyDelegate, observers_list_, OnMessageReceived(this, message)); return true; } void TabProxy::OnChannelError() { - AutoLock lock(list_lock_); + base::AutoLock lock(list_lock_); FOR_EACH_OBSERVER(TabProxyDelegate, observers_list_, OnChannelError(this)); } diff --git a/chrome/test/automation/tab_proxy.h b/chrome/test/automation/tab_proxy.h index f8aaf6f..aabc2a6 100644 --- a/chrome/test/automation/tab_proxy.h +++ b/chrome/test/automation/tab_proxy.h @@ -432,7 +432,7 @@ class TabProxy : public AutomationResourceProxy, void LastObjectRemoved(); private: - Lock list_lock_; // Protects the observers_list_. + base::Lock list_lock_; // Protects the observers_list_. ObserverList<TabProxyDelegate> observers_list_; DISALLOW_COPY_AND_ASSIGN(TabProxy); }; |