summaryrefslogtreecommitdiffstats
path: root/base/synchronization
diff options
context:
space:
mode:
Diffstat (limited to 'base/synchronization')
-rw-r--r--base/synchronization/waitable_event.h7
-rw-r--r--base/synchronization/waitable_event_watcher_posix.cc7
2 files changed, 11 insertions, 3 deletions
diff --git a/base/synchronization/waitable_event.h b/base/synchronization/waitable_event.h
index 6c91701..018f318 100644
--- a/base/synchronization/waitable_event.h
+++ b/base/synchronization/waitable_event.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -145,7 +145,6 @@ class BASE_EXPORT WaitableEvent {
public RefCountedThreadSafe<WaitableEventKernel> {
public:
WaitableEventKernel(bool manual_reset, bool initially_signaled);
- virtual ~WaitableEventKernel();
bool Dequeue(Waiter* waiter, void* tag);
@@ -153,6 +152,10 @@ class BASE_EXPORT WaitableEvent {
const bool manual_reset_;
bool signaled_;
std::list<Waiter*> waiters_;
+
+ private:
+ friend class RefCountedThreadSafe<WaitableEventKernel>;
+ ~WaitableEventKernel();
};
typedef std::pair<WaitableEvent*, size_t> WaiterAndIndex;
diff --git a/base/synchronization/waitable_event_watcher_posix.cc b/base/synchronization/waitable_event_watcher_posix.cc
index 3b0ba70..5a17999 100644
--- a/base/synchronization/waitable_event_watcher_posix.cc
+++ b/base/synchronization/waitable_event_watcher_posix.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -43,8 +43,13 @@ class Flag : public RefCountedThreadSafe<Flag> {
}
private:
+ friend class RefCountedThreadSafe<Flag>;
+ ~Flag() {}
+
mutable Lock lock_;
bool flag_;
+
+ DISALLOW_COPY_AND_ASSIGN(Flag);
};
// -----------------------------------------------------------------------------