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

Unified Diff: third_party/mojo/src/mojo/edk/system/slave_connection_manager.h

Issue 954643002: Update mojo sdk to rev 3d23dae011859a2aae49f1d1adde705c8e85d819 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use run_renderer_in_process() Created 5 years, 10 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
Index: third_party/mojo/src/mojo/edk/system/slave_connection_manager.h
diff --git a/third_party/mojo/src/mojo/edk/system/slave_connection_manager.h b/third_party/mojo/src/mojo/edk/system/slave_connection_manager.h
index 731d9dbaac81bfb53673d8cb34920276779b923f..c7108548620014ab7284ef2abaf4a56a73a37de2 100644
--- a/third_party/mojo/src/mojo/edk/system/slave_connection_manager.h
+++ b/third_party/mojo/src/mojo/edk/system/slave_connection_manager.h
@@ -5,6 +5,7 @@
#ifndef MOJO_EDK_SYSTEM_SLAVE_CONNECTION_MANAGER_H_
#define MOJO_EDK_SYSTEM_SLAVE_CONNECTION_MANAGER_H_
+#include "base/compiler_specific.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
@@ -31,10 +32,10 @@ namespace system {
// The |ConnectionManager| implementation for slave processes.
//
-// Objects of this class may be created and destroyed on any thread. However,
-// |Init()| and |Shutdown()| must be called on the "delegate thread". Otherwise,
-// its public methods are thread-safe (except that they may not be called from
-// its internal, private thread).
+// This class is thread-safe (except that no public methods may be called from
+// its internal, private thread), with condition that |Init()| be called before
+// anything else and |Shutdown()| be called before destruction (and no other
+// public methods may be called during/after |Shutdown()|).
class MOJO_SYSTEM_IMPL_EXPORT SlaveConnectionManager
: public ConnectionManager,
public RawChannel::Delegate {
@@ -52,10 +53,8 @@ class MOJO_SYSTEM_IMPL_EXPORT SlaveConnectionManager
embedder::SlaveProcessDelegate* slave_process_delegate,
embedder::ScopedPlatformHandle platform_handle);
- // No other methods may be called after this is (or while it is being) called.
- void Shutdown();
-
// |ConnectionManager| methods:
+ void Shutdown() override;
bool AllowConnect(const ConnectionIdentifier& connection_id) override;
bool CancelConnect(const ConnectionIdentifier& connection_id) override;
bool Connect(const ConnectionIdentifier& connection_id,
@@ -81,11 +80,6 @@ class MOJO_SYSTEM_IMPL_EXPORT SlaveConnectionManager
embedder::ScopedPlatformHandleVectorPtr platform_handles) override;
void OnError(Error error) override;
- // Asserts that the current thread is the delegate thread. (This actually
- // checks the current message loop.)
- // TODO(vtl): Probably we should actually check the thread.
- void AssertOnDelegateThread() const;
-
// Asserts that the current thread is *not* |private_thread_| (no-op if
// DCHECKs are not enabled). This should only be called while
// |private_thread_| is alive (i.e., after |Init()| but before |Shutdown()|).

Powered by Google App Engine
This is Rietveld 408576698