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

Unified Diff: content/child/child_io_surface_manager_mac.h

Issue 1312353002: content: Remove base::WaitableEvent from ChildIOSurfaceManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comments Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/child/child_io_surface_manager_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/child_io_surface_manager_mac.h
diff --git a/content/child/child_io_surface_manager_mac.h b/content/child/child_io_surface_manager_mac.h
index fea9214a69a7f202d0c83ff7fd87901558a11558..bc08f5af58d1095dad57420070765f5fff5bbc6e 100644
--- a/content/child/child_io_surface_manager_mac.h
+++ b/content/child/child_io_surface_manager_mac.h
@@ -8,8 +8,6 @@
#include "base/mac/scoped_mach_port.h"
#include "base/macros.h"
#include "base/memory/singleton.h"
-#include "base/synchronization/waitable_event.h"
-#include "base/threading/platform_thread.h"
#include "content/common/mac/io_surface_manager.h"
#include "content/common/mac/io_surface_manager_token.h"
@@ -31,17 +29,19 @@ class CONTENT_EXPORT ChildIOSurfaceManager : public IOSurfaceManager {
// Set the service Mach port. Ownership of |service_port| is passed to the
// manager.
+ // Note: This can be called on any thread but must happen before the
+ // thread-safe IOSurfaceManager interface is used. It is the responsibility
+ // of users of this class to ensure there are no races.
void set_service_port(mach_port_t service_port) {
service_port_.reset(service_port);
}
// Set the token used when communicating with the Mach service.
+ // Note: This can be called on any thread but must happen before the
+ // thread-safe IOSurfaceManager interface is used. It is the responsibility
+ // of users of this class to ensure there are no races.
void set_token(const IOSurfaceManagerToken& token) {
token_ = token;
-#if !defined(NDEBUG)
- set_token_thread_id_ = base::PlatformThread::CurrentRef();
-#endif
- set_token_event_.Signal();
}
private:
@@ -52,10 +52,6 @@ class CONTENT_EXPORT ChildIOSurfaceManager : public IOSurfaceManager {
base::mac::ScopedMachSendRight service_port_;
IOSurfaceManagerToken token_;
-#if !defined(NDEBUG)
- base::PlatformThreadRef set_token_thread_id_;
-#endif
- base::WaitableEvent set_token_event_;
DISALLOW_COPY_AND_ASSIGN(ChildIOSurfaceManager);
};
« no previous file with comments | « no previous file | content/child/child_io_surface_manager_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698