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

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

Issue 1423713009: EDK: Move ref counting classes to mojo/edk/util. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 1 month 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/waiter_test_utils.h ('k') | mojo/edk/util/BUILD.gn » ('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/waiter_test_utils.h" 5 #include "mojo/edk/system/waiter_test_utils.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 using mojo::util::RefPtr;
10
9 namespace mojo { 11 namespace mojo {
10 namespace system { 12 namespace system {
11 namespace test { 13 namespace test {
12 14
13 SimpleWaiterThread::SimpleWaiterThread(MojoResult* result, uint32_t* context) 15 SimpleWaiterThread::SimpleWaiterThread(MojoResult* result, uint32_t* context)
14 : result_(result), context_(context) { 16 : result_(result), context_(context) {
15 waiter_.Init(); 17 waiter_.Init();
16 *result_ = 5420734; // Totally invalid result. 18 *result_ = 5420734; // Totally invalid result.
17 *context_ = 23489023; // "Random". 19 *context_ = 23489023; // "Random".
18 } 20 }
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 return; 64 return;
63 65
64 *did_wait_out_ = true; 66 *did_wait_out_ = true;
65 *result_out_ = waiter_.Wait(deadline_, context_out_); 67 *result_out_ = waiter_.Wait(deadline_, context_out_);
66 dispatcher_->RemoveAwakable(&waiter_, signals_state_out_); 68 dispatcher_->RemoveAwakable(&waiter_, signals_state_out_);
67 } 69 }
68 70
69 } // namespace test 71 } // namespace test
70 } // namespace system 72 } // namespace system
71 } // namespace mojo 73 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/system/waiter_test_utils.h ('k') | mojo/edk/util/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698