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

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

Issue 2056763003: EDK: Change Awakable::Awake()'s context, etc., to be a uint64_t. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: doh Created 4 years, 6 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.h » ('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 <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 MojoMapBufferFlags /*flags*/, 165 MojoMapBufferFlags /*flags*/,
166 std::unique_ptr<platform::PlatformSharedBufferMapping>* /*mapping*/) 166 std::unique_ptr<platform::PlatformSharedBufferMapping>* /*mapping*/)
167 override { 167 override {
168 info_->IncrementMapBufferCallCount(); 168 info_->IncrementMapBufferCallCount();
169 mutex().AssertHeld(); 169 mutex().AssertHeld();
170 return MOJO_RESULT_UNIMPLEMENTED; 170 return MOJO_RESULT_UNIMPLEMENTED;
171 } 171 }
172 172
173 MojoResult AddAwakableImplNoLock(Awakable* awakable, 173 MojoResult AddAwakableImplNoLock(Awakable* awakable,
174 MojoHandleSignals /*signals*/, 174 MojoHandleSignals /*signals*/,
175 uint32_t /*context*/, 175 uint64_t /*context*/,
176 HandleSignalsState* signals_state) override { 176 HandleSignalsState* signals_state) override {
177 info_->IncrementAddAwakableCallCount(); 177 info_->IncrementAddAwakableCallCount();
178 mutex().AssertHeld(); 178 mutex().AssertHeld();
179 if (signals_state) 179 if (signals_state)
180 *signals_state = HandleSignalsState(); 180 *signals_state = HandleSignalsState();
181 if (info_->IsAddAwakableAllowed()) { 181 if (info_->IsAddAwakableAllowed()) {
182 info_->AwakableWasAdded(awakable); 182 info_->AwakableWasAdded(awakable);
183 return MOJO_RESULT_OK; 183 return MOJO_RESULT_OK;
184 } 184 }
185 185
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 } 455 }
456 456
457 void CoreTestBase_MockHandleInfo::AwakableWasAdded(Awakable* awakable) { 457 void CoreTestBase_MockHandleInfo::AwakableWasAdded(Awakable* awakable) {
458 MutexLocker locker(&mutex_); 458 MutexLocker locker(&mutex_);
459 added_awakables_.push_back(awakable); 459 added_awakables_.push_back(awakable);
460 } 460 }
461 461
462 } // namespace test 462 } // namespace test
463 } // namespace system 463 } // namespace system
464 } // namespace mojo 464 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/system/core.cc ('k') | mojo/edk/system/data_pipe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698