From 146185df383870a8b4dba30061aa6a1118c58239 Mon Sep 17 00:00:00 2001 From: "willchan@chromium.org" Date: Sun, 21 Nov 2010 17:16:00 +0000 Subject: Fix ThreadChecker to use Locks and not use scoped_ptr. It needs to synchronize its checks, since in order to assert correctly, it needs to make sure the thread id is synchronized on all threads. It doesn't need scoped_ptr. It was trying to use NULL to catch invalid thread ids. 0 is already assumed to be invalid (see base::Thread's use). Eliminating scoped_ptr fixes a valgrind/heapcheck issue where they don't follow LazyInstance objects' member pointers. So they think the ThreadChecker's member variable is leaked, even though the global object still has a pointer to it. Removing the scoped_ptr.h caused a bunch of other lame files to fail to compile. I had to fix those places. #include what you use please :( TBR=levin (I want to green the memory bots) BUG=none TEST=none Review URL: http://codereview.chromium.org/5180006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66915 0039d316-1c4b-4281-b951-d872f2087c98 --- remoting/host/capturer_linux.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'remoting/host/capturer_linux.h') diff --git a/remoting/host/capturer_linux.h b/remoting/host/capturer_linux.h index 6f854fc..8e8fcb3 100644 --- a/remoting/host/capturer_linux.h +++ b/remoting/host/capturer_linux.h @@ -5,6 +5,8 @@ #ifndef REMOTING_HOST_CAPTURER_LINUX_H_ #define REMOTING_HOST_CAPTURER_LINUX_H_ +#include "base/basictypes.h" +#include "base/scoped_ptr.h" #include "remoting/host/capturer.h" namespace remoting { -- cgit v1.1