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

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

Issue 2090763002: AwakableList: For persistent awakables, make Add() call Awake() with reason INITIALIZE. (Closed) Base URL: https://github.com/domokit/mojo.git@work795_wait_set_4.7-x-work794_wait_set_4.6
Patch Set: 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/awakable.h ('k') | mojo/edk/system/awakable_list.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/awakable.h" 5 #include "mojo/edk/system/awakable.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 namespace mojo { 9 namespace mojo {
10 namespace system { 10 namespace system {
11 11
12 // static 12 // static
13 MojoResult Awakable::MojoResultForAwakeReason(AwakeReason reason) { 13 MojoResult Awakable::MojoResultForAwakeReason(AwakeReason reason) {
14 switch (reason) { 14 switch (reason) {
15 case AwakeReason::CANCELLED:
16 return MOJO_RESULT_CANCELLED;
15 case AwakeReason::SATISFIED: 17 case AwakeReason::SATISFIED:
16 return MOJO_RESULT_OK; 18 return MOJO_RESULT_OK;
17 case AwakeReason::UNSATISFIABLE: 19 case AwakeReason::UNSATISFIABLE:
18 return MOJO_RESULT_FAILED_PRECONDITION; 20 return MOJO_RESULT_FAILED_PRECONDITION;
19 case AwakeReason::CANCELLED: 21 case AwakeReason::INITIALIZE:
20 return MOJO_RESULT_CANCELLED; 22 break;
21 case AwakeReason::CHANGED: 23 case AwakeReason::CHANGED:
22 break; 24 break;
23 } 25 }
24 NOTREACHED(); 26 NOTREACHED();
25 return MOJO_RESULT_INTERNAL; 27 return MOJO_RESULT_INTERNAL;
26 } 28 }
27 29
28 } // namespace system 30 } // namespace system
29 } // namespace mojo 31 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/system/awakable.h ('k') | mojo/edk/system/awakable_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698