| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/arc/arc_bridge_bootstrap.h" | 5 #include "components/arc/arc_bridge_bootstrap.h" |
| 6 | 6 |
| 7 #include <fcntl.h> | 7 #include <fcntl.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 // READY | 50 // READY |
| 51 // | 51 // |
| 52 // When Stop() is called from any state, either because an operation | 52 // When Stop() is called from any state, either because an operation |
| 53 // resulted in an error or because the user is logging out: | 53 // resulted in an error or because the user is logging out: |
| 54 // | 54 // |
| 55 // (any) | 55 // (any) |
| 56 // Stop() -> | 56 // Stop() -> |
| 57 // STOPPING | 57 // STOPPING |
| 58 // StopInstance() -> | 58 // StopInstance() -> |
| 59 // STOPPED | 59 // STOPPED |
| 60 // |
| 61 // When the instance crashes while it was ready, it will be stopped: |
| 62 // READY -> STOPPING -> STOPPED |
| 63 // and then restarted: |
| 64 // STOPPED -> SOCKET_CREATING -> ... -> READY). |
| 60 enum class State { | 65 enum class State { |
| 61 // ARC is not currently running. | 66 // ARC is not currently running. |
| 62 STOPPED, | 67 STOPPED, |
| 63 | 68 |
| 64 // An UNIX socket is being created. | 69 // An UNIX socket is being created. |
| 65 SOCKET_CREATING, | 70 SOCKET_CREATING, |
| 66 | 71 |
| 67 // The request to start the instance has been sent. | 72 // The request to start the instance has been sent. |
| 68 STARTING, | 73 STARTING, |
| 69 | 74 |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 | 285 |
| 281 ArcBridgeBootstrap::ArcBridgeBootstrap() {} | 286 ArcBridgeBootstrap::ArcBridgeBootstrap() {} |
| 282 ArcBridgeBootstrap::~ArcBridgeBootstrap() {} | 287 ArcBridgeBootstrap::~ArcBridgeBootstrap() {} |
| 283 | 288 |
| 284 // static | 289 // static |
| 285 scoped_ptr<ArcBridgeBootstrap> ArcBridgeBootstrap::Create() { | 290 scoped_ptr<ArcBridgeBootstrap> ArcBridgeBootstrap::Create() { |
| 286 return make_scoped_ptr(new ArcBridgeBootstrapImpl()); | 291 return make_scoped_ptr(new ArcBridgeBootstrapImpl()); |
| 287 } | 292 } |
| 288 | 293 |
| 289 } // namespace arc | 294 } // namespace arc |
| OLD | NEW |