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

Unified Diff: mojo/edk/system/dispatcher.cc

Issue 1947733002: EDK: Rename DispatcherTransport to HandleTransport. (Closed) Base URL: https://github.com/domokit/mojo.git@work790_edk_handle_11-x-work788_edk_handle_10
Patch Set: Created 4 years, 8 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 | « mojo/edk/system/dispatcher.h ('k') | mojo/edk/system/handle_table.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/dispatcher.cc
diff --git a/mojo/edk/system/dispatcher.cc b/mojo/edk/system/dispatcher.cc
index 8f6580102f9c507aae7f2eb6a7ebc89d0bdd7e39..1bfc40fa54469a8182d24fa8bf5d9e7067fe2a67 100644
--- a/mojo/edk/system/dispatcher.cc
+++ b/mojo/edk/system/dispatcher.cc
@@ -25,7 +25,7 @@ namespace system {
namespace test {
// TODO(vtl): Maybe this should be defined in a test-only file instead.
-DispatcherTransport HandleTryStartTransport(const Handle& handle) {
+HandleTransport HandleTryStartTransport(const Handle& handle) {
return Dispatcher::HandleTableAccess::TryStartTransport(handle);
}
@@ -34,19 +34,19 @@ DispatcherTransport HandleTryStartTransport(const Handle& handle) {
// TODO(vtl): The thread-safety analyzer isn't smart enough to deal with the
// fact that we give up if |TryLock()| fails.
// static
-DispatcherTransport Dispatcher::HandleTableAccess::TryStartTransport(
+HandleTransport Dispatcher::HandleTableAccess::TryStartTransport(
const Handle& handle) MOJO_NO_THREAD_SAFETY_ANALYSIS {
DCHECK(handle.dispatcher);
if (!handle.dispatcher->mutex_.TryLock())
- return DispatcherTransport();
+ return HandleTransport();
// We shouldn't race with things that close dispatchers, since closing can
// only take place either under |handle_table_mutex_| or when the handle is
// marked as busy.
DCHECK(!handle.dispatcher->is_closed_);
- return DispatcherTransport(handle);
+ return HandleTransport(handle);
}
// static
@@ -108,11 +108,10 @@ MojoResult Dispatcher::Close() {
return MOJO_RESULT_OK;
}
-MojoResult Dispatcher::WriteMessage(
- UserPointer<const void> bytes,
- uint32_t num_bytes,
- std::vector<DispatcherTransport>* transports,
- MojoWriteMessageFlags flags) {
+MojoResult Dispatcher::WriteMessage(UserPointer<const void> bytes,
+ uint32_t num_bytes,
+ std::vector<HandleTransport>* transports,
+ MojoWriteMessageFlags flags) {
DCHECK(!transports ||
(transports->size() > 0 &&
transports->size() < GetConfiguration().max_message_num_handles));
@@ -324,7 +323,7 @@ void Dispatcher::CloseImplNoLock() {
MojoResult Dispatcher::WriteMessageImplNoLock(
UserPointer<const void> /*bytes*/,
uint32_t /*num_bytes*/,
- std::vector<DispatcherTransport>* /*transports*/,
+ std::vector<HandleTransport>* /*transports*/,
MojoWriteMessageFlags /*flags*/) {
mutex_.AssertHeld();
DCHECK(!is_closed_);
« no previous file with comments | « mojo/edk/system/dispatcher.h ('k') | mojo/edk/system/handle_table.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698