| Index: mojo/edk/system/awakable.cc
|
| diff --git a/mojo/edk/system/awakable.cc b/mojo/edk/system/awakable.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..f3d233639d96a97b6cac845d27306370400bf7b9
|
| --- /dev/null
|
| +++ b/mojo/edk/system/awakable.cc
|
| @@ -0,0 +1,27 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "mojo/edk/system/awakable.h"
|
| +
|
| +#include "base/logging.h"
|
| +
|
| +namespace mojo {
|
| +namespace system {
|
| +
|
| +// static
|
| +MojoResult Awakable::MojoResultForAwakeReason(AwakeReason reason) {
|
| + switch (reason) {
|
| + case AwakeReason::SATISFIED:
|
| + return MOJO_RESULT_OK;
|
| + case AwakeReason::UNSATISFIABLE:
|
| + return MOJO_RESULT_FAILED_PRECONDITION;
|
| + case AwakeReason::CANCELLED:
|
| + return MOJO_RESULT_CANCELLED;
|
| + }
|
| + NOTREACHED();
|
| + return MOJO_RESULT_INTERNAL;
|
| +}
|
| +
|
| +} // namespace system
|
| +} // namespace mojo
|
|
|