| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "mojo/edk/system/awakable.h" |
| 6 |
| 7 #include "base/logging.h" |
| 8 |
| 9 namespace mojo { |
| 10 namespace system { |
| 11 |
| 12 // static |
| 13 MojoResult Awakable::MojoResultForAwakeReason(AwakeReason reason) { |
| 14 switch (reason) { |
| 15 case AwakeReason::SATISFIED: |
| 16 return MOJO_RESULT_OK; |
| 17 case AwakeReason::UNSATISFIABLE: |
| 18 return MOJO_RESULT_FAILED_PRECONDITION; |
| 19 case AwakeReason::CANCELLED: |
| 20 return MOJO_RESULT_CANCELLED; |
| 21 } |
| 22 NOTREACHED(); |
| 23 return MOJO_RESULT_INTERNAL; |
| 24 } |
| 25 |
| 26 } // namespace system |
| 27 } // namespace mojo |
| OLD | NEW |