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

Side by Side Diff: mojo/edk/system/core_test_base.cc

Issue 1943123002: Make it possible to write a message pipe endpoint's peer into it. (Closed) Base URL: https://github.com/domokit/mojo.git@master
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 | « no previous file | mojo/edk/system/core_unittest.cc » ('j') | mojo/edk/system/dispatcher.h » ('J')
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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 mutex().AssertHeld(); 184 mutex().AssertHeld();
185 if (signals_state) 185 if (signals_state)
186 *signals_state = HandleSignalsState(); 186 *signals_state = HandleSignalsState();
187 } 187 }
188 188
189 void CancelAllAwakablesNoLock() override { 189 void CancelAllAwakablesNoLock() override {
190 info_->IncrementCancelAllAwakablesCallCount(); 190 info_->IncrementCancelAllAwakablesCallCount();
191 mutex().AssertHeld(); 191 mutex().AssertHeld();
192 } 192 }
193 193
194 RefPtr<Dispatcher> CreateEquivalentDispatcherAndCloseImplNoLock() override { 194 RefPtr<Dispatcher> CreateEquivalentDispatcherAndCloseImplNoLock(
195 MessagePipe* /*message_pipe*/,
196 unsigned /*port*/) override {
197 CancelAllAwakablesNoLock();
195 return Create(info_); 198 return Create(info_);
196 } 199 }
197 200
198 CoreTestBase::MockHandleInfo* const info_; 201 CoreTestBase::MockHandleInfo* const info_;
199 202
200 MOJO_DISALLOW_COPY_AND_ASSIGN(MockDispatcher); 203 MOJO_DISALLOW_COPY_AND_ASSIGN(MockDispatcher);
201 }; 204 };
202 205
203 } // namespace 206 } // namespace
204 207
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 } 428 }
426 429
427 void CoreTestBase_MockHandleInfo::AwakableWasAdded(Awakable* awakable) { 430 void CoreTestBase_MockHandleInfo::AwakableWasAdded(Awakable* awakable) {
428 MutexLocker locker(&mutex_); 431 MutexLocker locker(&mutex_);
429 added_awakables_.push_back(awakable); 432 added_awakables_.push_back(awakable);
430 } 433 }
431 434
432 } // namespace test 435 } // namespace test
433 } // namespace system 436 } // namespace system
434 } // namespace mojo 437 } // namespace mojo
OLDNEW
« no previous file with comments | « no previous file | mojo/edk/system/core_unittest.cc » ('j') | mojo/edk/system/dispatcher.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698