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

Side by Side Diff: mojo/edk/system/core_test_base.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, 7 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 unified diff | Download patch
« no previous file with comments | « mojo/edk/system/core.cc ('k') | mojo/edk/system/data_pipe_impl_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "mojo/edk/system/core_test_base.h" 5 #include "mojo/edk/system/core_test_base.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "mojo/edk/embedder/simple_platform_support.h" 10 #include "mojo/edk/embedder/simple_platform_support.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 } 47 }
48 48
49 ~MockDispatcher() override { info_->IncrementDtorCallCount(); } 49 ~MockDispatcher() override { info_->IncrementDtorCallCount(); }
50 50
51 // |Dispatcher| protected methods: 51 // |Dispatcher| protected methods:
52 void CloseImplNoLock() override { 52 void CloseImplNoLock() override {
53 info_->IncrementCloseCallCount(); 53 info_->IncrementCloseCallCount();
54 mutex().AssertHeld(); 54 mutex().AssertHeld();
55 } 55 }
56 56
57 MojoResult WriteMessageImplNoLock( 57 MojoResult WriteMessageImplNoLock(UserPointer<const void> bytes,
58 UserPointer<const void> bytes, 58 uint32_t num_bytes,
59 uint32_t num_bytes, 59 std::vector<HandleTransport>* transports,
60 std::vector<DispatcherTransport>* transports, 60 MojoWriteMessageFlags /*flags*/) override {
61 MojoWriteMessageFlags /*flags*/) override {
62 info_->IncrementWriteMessageCallCount(); 61 info_->IncrementWriteMessageCallCount();
63 mutex().AssertHeld(); 62 mutex().AssertHeld();
64 63
65 if (num_bytes > GetConfiguration().max_message_num_bytes) 64 if (num_bytes > GetConfiguration().max_message_num_bytes)
66 return MOJO_RESULT_RESOURCE_EXHAUSTED; 65 return MOJO_RESULT_RESOURCE_EXHAUSTED;
67 66
68 if (transports) 67 if (transports)
69 return MOJO_RESULT_UNIMPLEMENTED; 68 return MOJO_RESULT_UNIMPLEMENTED;
70 69
71 return MOJO_RESULT_OK; 70 return MOJO_RESULT_OK;
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 } 427 }
429 428
430 void CoreTestBase_MockHandleInfo::AwakableWasAdded(Awakable* awakable) { 429 void CoreTestBase_MockHandleInfo::AwakableWasAdded(Awakable* awakable) {
431 MutexLocker locker(&mutex_); 430 MutexLocker locker(&mutex_);
432 added_awakables_.push_back(awakable); 431 added_awakables_.push_back(awakable);
433 } 432 }
434 433
435 } // namespace test 434 } // namespace test
436 } // namespace system 435 } // namespace system
437 } // namespace mojo 436 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/system/core.cc ('k') | mojo/edk/system/data_pipe_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698