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

Unified Diff: components/arc/arc_bridge_service_impl.cc

Issue 2133653002: arc: Notify ARC instance failures via callbacks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address lhchavez's comments + improve unit test. Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: components/arc/arc_bridge_service_impl.cc
diff --git a/components/arc/arc_bridge_service_impl.cc b/components/arc/arc_bridge_service_impl.cc
index a5c49456f4e0c3c40b13e3b1f6f86628fa3974aa..52c9284268c238a17a9e61e4c5cad96526f4d96e 100644
--- a/components/arc/arc_bridge_service_impl.cc
+++ b/components/arc/arc_bridge_service_impl.cc
@@ -78,6 +78,7 @@ void ArcBridgeServiceImpl::PrerequisitesChanged() {
if (!available() || !session_started_)
return;
VLOG(0) << "Prerequisites met, starting ARC";
+ SetStopReason(StopReason::SHUTDOWN);
SetState(State::CONNECTING);
bootstrap_->Start();
} else {
@@ -136,8 +137,9 @@ void ArcBridgeServiceImpl::OnConnectionEstablished(
SetState(State::READY);
}
-void ArcBridgeServiceImpl::OnStopped() {
+void ArcBridgeServiceImpl::OnStopped(StopReason stop_reason) {
DCHECK(CalledOnValidThread());
+ SetStopReason(stop_reason);
SetState(State::STOPPED);
VLOG(0) << "ARC stopped";
if (reconnect_) {

Powered by Google App Engine
This is Rietveld 408576698