Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(616)

Side by Side Diff: ceee/ie/plugin/bho/window_message_source.cc

Issue 6336010: Add missing base::lock usage. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ceee/ie/broker/broker_rpc_server.cc ('k') | ceee/testing/utils/instance_count_mixin.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // Window message source implementation. 5 // Window message source implementation.
6 #include "ceee/ie/plugin/bho/window_message_source.h" 6 #include "ceee/ie/plugin/bho/window_message_source.h"
7 7
8 #include <algorithm> 8 #include <algorithm>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "ceee/common/window_utils.h" 11 #include "ceee/common/window_utils.h"
12 #include "ceee/common/windows_constants.h" 12 #include "ceee/common/windows_constants.h"
13 #include "ceee/ie/common/ceee_module_util.h" 13 #include "ceee/ie/common/ceee_module_util.h"
14 14
15 WindowMessageSource::MessageSourceMap WindowMessageSource::message_source_map_; 15 WindowMessageSource::MessageSourceMap WindowMessageSource::message_source_map_;
16 Lock WindowMessageSource::lock_; 16 base::Lock WindowMessageSource::lock_;
17 17
18 WindowMessageSource::WindowMessageSource() 18 WindowMessageSource::WindowMessageSource()
19 : create_thread_id_(::GetCurrentThreadId()), 19 : create_thread_id_(::GetCurrentThreadId()),
20 get_message_hook_(NULL), 20 get_message_hook_(NULL),
21 call_wnd_proc_ret_hook_(NULL) { 21 call_wnd_proc_ret_hook_(NULL) {
22 } 22 }
23 23
24 WindowMessageSource::~WindowMessageSource() { 24 WindowMessageSource::~WindowMessageSource() {
25 DCHECK(get_message_hook_ == NULL); 25 DCHECK(get_message_hook_ == NULL);
26 DCHECK(call_wnd_proc_ret_hook_ == NULL); 26 DCHECK(call_wnd_proc_ret_hook_ == NULL);
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 base::AutoLock auto_lock(lock_); 211 base::AutoLock auto_lock(lock_);
212 MessageSourceMap::const_iterator iter = message_source_map_.find(thread_id); 212 MessageSourceMap::const_iterator iter = message_source_map_.find(thread_id);
213 return iter == message_source_map_.end() ? NULL : iter->second; 213 return iter == message_source_map_.end() ? NULL : iter->second;
214 } 214 }
215 215
216 // static 216 // static
217 void WindowMessageSource::RemoveEntryFromMap(DWORD thread_id) { 217 void WindowMessageSource::RemoveEntryFromMap(DWORD thread_id) {
218 base::AutoLock auto_lock(lock_); 218 base::AutoLock auto_lock(lock_);
219 message_source_map_.erase(thread_id); 219 message_source_map_.erase(thread_id);
220 } 220 }
OLDNEW
« no previous file with comments | « ceee/ie/broker/broker_rpc_server.cc ('k') | ceee/testing/utils/instance_count_mixin.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698