diff options
Diffstat (limited to 'ceee')
-rw-r--r-- | ceee/ie/broker/broker_rpc_client.cc | 2 | ||||
-rw-r--r-- | ceee/ie/broker/broker_rpc_server.cc | 4 | ||||
-rw-r--r-- | ceee/ie/broker/executors_manager.cc | 38 | ||||
-rw-r--r-- | ceee/ie/broker/executors_manager.h | 4 | ||||
-rw-r--r-- | ceee/ie/plugin/bho/cookie_accountant.cc | 4 | ||||
-rw-r--r-- | ceee/ie/plugin/bho/cookie_accountant.h | 4 | ||||
-rw-r--r-- | ceee/ie/plugin/bho/window_message_source.cc | 6 | ||||
-rw-r--r-- | ceee/ie/plugin/bho/window_message_source.h | 4 | ||||
-rw-r--r-- | ceee/ie/plugin/scripting/script_host.cc | 14 | ||||
-rw-r--r-- | ceee/ie/plugin/scripting/script_host.h | 4 | ||||
-rw-r--r-- | ceee/testing/utils/instance_count_mixin.cc | 8 | ||||
-rw-r--r-- | ceee/testing/utils/instance_count_mixin.h | 8 |
12 files changed, 50 insertions, 50 deletions
diff --git a/ceee/ie/broker/broker_rpc_client.cc b/ceee/ie/broker/broker_rpc_client.cc index f86bae52..8800ac7 100644 --- a/ceee/ie/broker/broker_rpc_client.cc +++ b/ceee/ie/broker/broker_rpc_client.cc @@ -8,8 +8,8 @@ #include <atlbase.h> -#include "base/lock.h" #include "base/logging.h" +#include "base/synchronization/lock.h" #include "base/tuple.h" #include "base/win/scoped_comptr.h" #include "ceee/common/com_utils.h" diff --git a/ceee/ie/broker/broker_rpc_server.cc b/ceee/ie/broker/broker_rpc_server.cc index 55f9b2d..eb16d6a 100644 --- a/ceee/ie/broker/broker_rpc_server.cc +++ b/ceee/ie/broker/broker_rpc_server.cc @@ -157,7 +157,7 @@ void BrokerRpcServer_SendUmaHistogramTimes(handle_t binding_handle, int sample) { // We can't unfortunately use the HISTOGRAM_*_TIMES here because they use // static variables to save time. - AutoLock lock(g_metrics_lock); + base::AutoLock lock(g_metrics_lock); scoped_refptr<base::Histogram> counter = base::Histogram::FactoryTimeGet(name, base::TimeDelta::FromMilliseconds(1), @@ -175,7 +175,7 @@ void BrokerRpcServer_SendUmaHistogramData(handle_t binding_handle, int bucket_count) { // We can't unfortunately use the HISTOGRAM_*_COUNT here because they use // static variables to save time. - AutoLock lock(g_metrics_lock); + base::AutoLock lock(g_metrics_lock); scoped_refptr<base::Histogram> counter = base::Histogram::FactoryGet(name, min, max, bucket_count, base::Histogram::kUmaTargetedHistogramFlag); diff --git a/ceee/ie/broker/executors_manager.cc b/ceee/ie/broker/executors_manager.cc index 2256dbc..255cef2 100644 --- a/ceee/ie/broker/executors_manager.cc +++ b/ceee/ie/broker/executors_manager.cc @@ -79,7 +79,7 @@ bool ExecutorsManager::IsKnownWindow(HWND window) { } bool ExecutorsManager::IsKnownWindowImpl(HWND window) { - AutoLock lock(lock_); + base::AutoLock lock(lock_); return handle_map_.find(window) != handle_map_.end() || frame_window_families_.find(window) != frame_window_families_.end(); } @@ -92,7 +92,7 @@ HWND ExecutorsManager::FindTabChildImpl(HWND window) { if (!common_api::CommonApiResult::IsIeFrameClass(window)) return NULL; - AutoLock lock(lock_); + base::AutoLock lock(lock_); FrameTabsMap::iterator it = frame_window_families_.find(window); if (it == frame_window_families_.end()) return NULL; @@ -107,7 +107,7 @@ HRESULT ExecutorsManager::RegisterTabExecutor(ThreadId thread_id, // This way we can add a ref to the module for the existence of the map. bool map_was_empty = false; { - AutoLock lock(lock_); + base::AutoLock lock(lock_); map_was_empty = executors_.empty(); if (!map_was_empty && executors_.find(thread_id) != executors_.end()) { return S_OK; @@ -136,7 +136,7 @@ HRESULT ExecutorsManager::RegisterWindowExecutor(ThreadId thread_id, // our map in a thread safe way... CHandle executor_registration_gate; { - AutoLock lock(lock_); + base::AutoLock lock(lock_); if (executors_.find(thread_id) != executors_.end()) { DCHECK(false) << "Unexpected registered thread_id: " << thread_id; return E_UNEXPECTED; @@ -173,7 +173,7 @@ HRESULT ExecutorsManager::RegisterWindowExecutor(ThreadId thread_id, // This way we can add a ref to the module for the existence of the map. bool map_was_empty = false; { - AutoLock lock(lock_); + base::AutoLock lock(lock_); map_was_empty = executors_.empty(); // We should not get here if we already have an executor for that thread. DCHECK(executors_.find(thread_id) == executors_.end()); @@ -206,7 +206,7 @@ HRESULT ExecutorsManager::GetExecutor(ThreadId thread_id, HWND window, // But we must create the executor creator outside of the lock. bool create_executor = false; { - AutoLock lock(lock_); + base::AutoLock lock(lock_); ExecutorsMap::iterator exec_iter = executors_.find(thread_id); if (exec_iter != executors_.end()) { // Found it... We're done... That was quick!!! :-) @@ -266,7 +266,7 @@ HRESULT ExecutorsManager::GetExecutor(ThreadId thread_id, HWND window, reinterpret_cast<CeeeWindowHandle>(window)); if (FAILED(hr)) { // This could happen if the thread we want to hook to died prematurely. - AutoLock lock(lock_); + base::AutoLock lock(lock_); pending_registrations_.erase(thread_id); return hr; } @@ -285,7 +285,7 @@ HRESULT ExecutorsManager::GetExecutor(ThreadId thread_id, HWND window, } // Do our own cleanup and return a reference thread safely... - AutoLock lock(lock_); + base::AutoLock lock(lock_); pending_registrations_.erase(thread_id); ExecutorsMap::iterator iter = executors_.find(thread_id); if (iter == executors_.end()) { @@ -302,7 +302,7 @@ HRESULT ExecutorsManager::RemoveExecutor(ThreadId thread_id) { CComPtr<IUnknown> dead_executor; bool map_is_empty = false; { - AutoLock lock(lock_); + base::AutoLock lock(lock_); ExecutorsMap::iterator iter = executors_.find(thread_id); if (iter == executors_.end()) { return S_FALSE; @@ -348,7 +348,7 @@ void ExecutorsManager::SetTabIdForHandle(int tab_id, HWND handle) { DCHECK(common_api::CommonApiResult::IsIeFrameClass(frame_window)); bool send_on_create = false; { - AutoLock lock(lock_); + base::AutoLock lock(lock_); if (tab_id_map_.end() != tab_id_map_.find(tab_id) || handle_map_.end() != handle_map_.find(handle)) { // Avoid double-setting of tab id -> handle mappings, which could @@ -382,7 +382,7 @@ void ExecutorsManager::SetTabIdForHandle(int tab_id, HWND handle) { void ExecutorsManager::SetTabToolBandIdForHandle(int tool_band_id, HWND handle) { - AutoLock lock(lock_); + base::AutoLock lock(lock_); if (tool_band_id_map_.end() != tool_band_id_map_.find(tool_band_id) || tool_band_handle_map_.end() != tool_band_handle_map_.find(handle)) { // Avoid double-setting of tool band id -> handle mappings, which could @@ -412,7 +412,7 @@ void ExecutorsManager::DeleteTabHandle(HWND handle) { frame_window = NULL; bool send_on_removed = false; - AutoLock lock(lock_); + base::AutoLock lock(lock_); { HandleMap::iterator handle_it = handle_map_.find(handle); // Don't DCHECK, we may be called more than once, but it's fine, @@ -492,7 +492,7 @@ void ExecutorsManager::CleanupMapsForThread(DWORD thread_id) { // of that for us, and 2) we can't call DeleteHandle from within a lock. std::vector<HWND> tab_handles_to_remove; { - AutoLock lock(lock_); + base::AutoLock lock(lock_); HandleMap::iterator handle_it = handle_map_.begin(); for (; handle_it != handle_map_.end(); ++ handle_it) { if (::GetWindowThreadProcessId(handle_it->first, NULL) == thread_id) @@ -507,7 +507,7 @@ void ExecutorsManager::CleanupMapsForThread(DWORD thread_id) { } bool ExecutorsManager::IsTabIdValid(int tab_id) { - AutoLock lock(lock_); + base::AutoLock lock(lock_); TabIdMap::const_iterator it = tab_id_map_.find(tab_id); #ifdef DEBUG return it != tab_id_map_.end() && it->second != INVALID_HANDLE_VALUE; @@ -517,7 +517,7 @@ bool ExecutorsManager::IsTabIdValid(int tab_id) { } HWND ExecutorsManager::GetTabHandleFromId(int tab_id) { - AutoLock lock(lock_); + base::AutoLock lock(lock_); TabIdMap::const_iterator it = tab_id_map_.find(tab_id); DCHECK(it != tab_id_map_.end()); @@ -530,7 +530,7 @@ HWND ExecutorsManager::GetTabHandleFromId(int tab_id) { } bool ExecutorsManager::IsTabHandleValid(HWND tab_handle) { - AutoLock lock(lock_); + base::AutoLock lock(lock_); HandleMap::const_iterator it = handle_map_.find(tab_handle); #ifdef DEBUG return it != handle_map_.end() && it->second != kInvalidChromeSessionId; @@ -540,7 +540,7 @@ bool ExecutorsManager::IsTabHandleValid(HWND tab_handle) { } int ExecutorsManager::GetTabIdFromHandle(HWND tab_handle) { - AutoLock lock(lock_); + base::AutoLock lock(lock_); HandleMap::const_iterator it = handle_map_.find(tab_handle); if (it == handle_map_.end()) return kInvalidChromeSessionId; @@ -549,7 +549,7 @@ int ExecutorsManager::GetTabIdFromHandle(HWND tab_handle) { } HWND ExecutorsManager::GetTabHandleFromToolBandId(int tool_band_id) { - AutoLock lock(lock_); + base::AutoLock lock(lock_); TabIdMap::const_iterator it = tool_band_id_map_.find(tool_band_id); if (it == tool_band_id_map_.end()) @@ -567,7 +567,7 @@ HRESULT ExecutorsManager::GetExecutorCreator( size_t ExecutorsManager::GetThreadHandles( CHandle thread_handles[], ThreadId thread_ids[], size_t num_threads) { - AutoLock lock(lock_); + base::AutoLock lock(lock_); ExecutorsMap::iterator iter = executors_.begin(); size_t index = 0; for (; index < num_threads && iter != executors_.end(); ++index, ++iter) { diff --git a/ceee/ie/broker/executors_manager.h b/ceee/ie/broker/executors_manager.h index 48925d5..a681751 100644 --- a/ceee/ie/broker/executors_manager.h +++ b/ceee/ie/broker/executors_manager.h @@ -14,8 +14,8 @@ #include <map> #include <list> -#include "base/lock.h" #include "base/singleton.h" +#include "base/synchronization/lock.h" #include "base/task.h" #include "ceee/common/window_utils.h" #include "ceee/ie/broker/window_events_funnel.h" @@ -252,7 +252,7 @@ class ExecutorsManager { // To protect the access to the maps (ExecutorsManager::executors_ & // ExecutorsManager::pending_registrations_ & tab_id_map_/handle_map_). - Lock lock_; + base::Lock lock_; // Test seam. WindowEventsFunnel windows_events_funnel_; diff --git a/ceee/ie/plugin/bho/cookie_accountant.cc b/ceee/ie/plugin/bho/cookie_accountant.cc index 1445b97..ad326c9 100644 --- a/ceee/ie/plugin/bho/cookie_accountant.cc +++ b/ceee/ie/plugin/bho/cookie_accountant.cc @@ -235,7 +235,7 @@ void CookieAccountant::ConnectBroker() { void CookieAccountant::Initialize() { { - AutoLock lock(lock_); + base::AutoLock lock(lock_); if (initializing_) return; initializing_ = true; @@ -257,7 +257,7 @@ void CookieAccountant::Initialize() { DCHECK(internet_set_cookie_ex_a_patch_.is_patched() || internet_set_cookie_ex_w_patch_.is_patched()); { - AutoLock lock(lock_); + base::AutoLock lock(lock_); initializing_ = false; } } diff --git a/ceee/ie/plugin/bho/cookie_accountant.h b/ceee/ie/plugin/bho/cookie_accountant.h index 23111de..05bef8b 100644 --- a/ceee/ie/plugin/bho/cookie_accountant.h +++ b/ceee/ie/plugin/bho/cookie_accountant.h @@ -13,8 +13,8 @@ #include <string> #include "app/win/iat_patch_function.h" -#include "base/lock.h" #include "base/singleton.h" +#include "base/synchronization/lock.h" #include "base/time.h" #include "ceee/ie/plugin/bho/cookie_events_funnel.h" #include "net/base/cookie_monster.h" @@ -86,7 +86,7 @@ class CookieAccountant { bool initializing_; // A lock that protects access to the function patches. - Lock lock_; + base::Lock lock_; // Cached singleton instance. Useful for unit testing. static CookieAccountant* singleton_instance_; diff --git a/ceee/ie/plugin/bho/window_message_source.cc b/ceee/ie/plugin/bho/window_message_source.cc index cd462d8..c48ab2f 100644 --- a/ceee/ie/plugin/bho/window_message_source.cc +++ b/ceee/ie/plugin/bho/window_message_source.cc @@ -196,7 +196,7 @@ bool WindowMessageSource::AddEntryToMap(DWORD thread_id, WindowMessageSource* source) { DCHECK(source != NULL); - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); MessageSourceMap::const_iterator iter = message_source_map_.find(thread_id); if (iter != message_source_map_.end()) return false; @@ -208,13 +208,13 @@ bool WindowMessageSource::AddEntryToMap(DWORD thread_id, // static WindowMessageSource* WindowMessageSource::GetEntryFromMap(DWORD thread_id) { - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); MessageSourceMap::const_iterator iter = message_source_map_.find(thread_id); return iter == message_source_map_.end() ? NULL : iter->second; } // static void WindowMessageSource::RemoveEntryFromMap(DWORD thread_id) { - AutoLock auto_lock(lock_); + base::AutoLock auto_lock(lock_); message_source_map_.erase(thread_id); } diff --git a/ceee/ie/plugin/bho/window_message_source.h b/ceee/ie/plugin/bho/window_message_source.h index baceafa..bec48089 100644 --- a/ceee/ie/plugin/bho/window_message_source.h +++ b/ceee/ie/plugin/bho/window_message_source.h @@ -10,7 +10,7 @@ #include <vector> #include "base/basictypes.h" -#include "base/lock.h" +#include "base/synchronization/lock.h" // A WindowMessageSource instance monitors keyboard and mouse messages on the // same thread as the one that creates the instance, and fires events to those @@ -95,7 +95,7 @@ class WindowMessageSource { static MessageSourceMap message_source_map_; // Used to protect access to the message_source_map_. - static Lock lock_; + static base::Lock lock_; DISALLOW_COPY_AND_ASSIGN(WindowMessageSource); }; diff --git a/ceee/ie/plugin/scripting/script_host.cc b/ceee/ie/plugin/scripting/script_host.cc index 15a57eb..d1e74ef 100644 --- a/ceee/ie/plugin/scripting/script_host.cc +++ b/ceee/ie/plugin/scripting/script_host.cc @@ -705,7 +705,7 @@ void ScriptHost::DebugApplication::RegisterDebugApplication() { } void ScriptHost::DebugApplication::Initialize() { - AutoLock lock(lock_); + base::AutoLock lock(lock_); ++initialization_count_; @@ -715,7 +715,7 @@ void ScriptHost::DebugApplication::Initialize() { void ScriptHost::DebugApplication::Initialize( IUnknown* debug_application_provider) { - AutoLock lock(lock_); + base::AutoLock lock(lock_); ++initialization_count_; @@ -742,7 +742,7 @@ void ScriptHost::DebugApplication::Initialize( void ScriptHost::DebugApplication::Initialize( IProcessDebugManager* manager, IDebugApplication* app) { - AutoLock lock(lock_); + base::AutoLock lock(lock_); // This function is exposed for testing only. DCHECK_EQ(0U, initialization_count_); @@ -758,7 +758,7 @@ void ScriptHost::DebugApplication::Initialize( void ScriptHost::DebugApplication::Terminate() { - AutoLock lock(lock_); + base::AutoLock lock(lock_); DCHECK_GT(initialization_count_, (size_t)0); --initialization_count_; @@ -778,7 +778,7 @@ void ScriptHost::DebugApplication::Terminate() { HRESULT ScriptHost::DebugApplication::GetDebugApplication( IDebugApplication** app) { - AutoLock lock(lock_); + base::AutoLock lock(lock_); if (debug_application_ == NULL) return E_NOTIMPL; @@ -788,7 +788,7 @@ HRESULT ScriptHost::DebugApplication::GetDebugApplication( HRESULT ScriptHost::DebugApplication::GetRootApplicationNode( IDebugApplicationNode** debug_app_node) { - AutoLock lock(lock_); + base::AutoLock lock(lock_); if (debug_application_ == NULL) { *debug_app_node = NULL; @@ -801,7 +801,7 @@ HRESULT ScriptHost::DebugApplication::GetRootApplicationNode( HRESULT ScriptHost::DebugApplication::CreateDebugDocumentHelper( const wchar_t* long_name, const wchar_t* code, TEXT_DOC_ATTR attributes, IDebugDocumentHelper** helper) { - AutoLock lock(lock_); + base::AutoLock lock(lock_); if (debug_application_ == NULL) return S_OK; diff --git a/ceee/ie/plugin/scripting/script_host.h b/ceee/ie/plugin/scripting/script_host.h index 553d142..5fe64e1 100644 --- a/ceee/ie/plugin/scripting/script_host.h +++ b/ceee/ie/plugin/scripting/script_host.h @@ -19,8 +19,8 @@ #include <map> #include <string> -#include "base/lock.h" #include "base/logging.h" +#include "base/synchronization/lock.h" #include "third_party/activscp/activdbg.h" #include "ceee/common/initializing_coclass.h" @@ -293,7 +293,7 @@ class ScriptHost::DebugApplication { void RegisterDebugApplication(); // Under lock_. // Protects all members below. - ::Lock lock_; // Our containing class has a Lock method. + base::Lock lock_; // Number of initialization calls. size_t initialization_count_; diff --git a/ceee/testing/utils/instance_count_mixin.cc b/ceee/testing/utils/instance_count_mixin.cc index c6d8bdc..14a0ebb 100644 --- a/ceee/testing/utils/instance_count_mixin.cc +++ b/ceee/testing/utils/instance_count_mixin.cc @@ -17,13 +17,13 @@ namespace testing { Lock InstanceCountMixinBase::lock_; InstanceCountMixinBase::InstanceCountMixinBase() { - AutoLock lock(lock_); + base::AutoLock lock(lock_); instances.insert(this); } InstanceCountMixinBase::~InstanceCountMixinBase() { - AutoLock lock(lock_); + base::AutoLock lock(lock_); EXPECT_EQ(1, instances.erase(this)); } @@ -34,7 +34,7 @@ void InstanceCountMixinBase::GetDescription(std::string* description) const { } void InstanceCountMixinBase::LogLeakedInstances() { - AutoLock lock(lock_); + base::AutoLock lock(lock_); InstanceSet::const_iterator it(instances.begin()); InstanceSet::const_iterator end(instances.end()); @@ -49,7 +49,7 @@ void InstanceCountMixinBase::LogLeakedInstances() { typedef InstanceCountMixinBase::InstanceSet InstanceSet; size_t InstanceCountMixinBase::all_instance_count() { - AutoLock lock(lock_); + base::AutoLock lock(lock_); return instances.size(); } diff --git a/ceee/testing/utils/instance_count_mixin.h b/ceee/testing/utils/instance_count_mixin.h index 11627da..5686885 100644 --- a/ceee/testing/utils/instance_count_mixin.h +++ b/ceee/testing/utils/instance_count_mixin.h @@ -10,7 +10,7 @@ #include <string> #include <set> -#include "base/lock.h" +#include "base/synchronization/lock.h" namespace testing { @@ -47,7 +47,7 @@ class InstanceCountMixinBase { static InstanceSet::const_iterator end(); protected: - static Lock lock_; + static base::Lock lock_; }; // Inherit test classes from this class to get a per-class instance count. @@ -60,11 +60,11 @@ template <class T> class InstanceCountMixin : public InstanceCountMixinBase { public: InstanceCountMixin() { - AutoLock lock(lock_); + base::AutoLock lock(lock_); ++instance_count_; } ~InstanceCountMixin() { - AutoLock lock(lock_); + base::AutoLock lock(lock_); --instance_count_; } |