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

Unified Diff: components/arc/arc_bridge_service_impl.h

Issue 1548833002: arc-bridge: Restart ARC instance on crash (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@master
Patch Set: Addressed more feedback Created 4 years, 11 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
« no previous file with comments | « components/arc/arc_bridge_service.cc ('k') | components/arc/arc_bridge_service_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/arc/arc_bridge_service_impl.h
diff --git a/components/arc/arc_bridge_service_impl.h b/components/arc/arc_bridge_service_impl.h
index d0de3e3a6343a2d56ea6409fdce7b75f335947ca..ea90b0872762f8dc56ae63988e0391b2a719f2c7 100644
--- a/components/arc/arc_bridge_service_impl.h
+++ b/components/arc/arc_bridge_service_impl.h
@@ -37,9 +37,7 @@ class ArcBridgeServiceImpl : public ArcBridgeService,
private:
friend class ArcBridgeTest;
- FRIEND_TEST_ALL_PREFIXES(ArcBridgeTest, Basic);
- FRIEND_TEST_ALL_PREFIXES(ArcBridgeTest, Prerequisites);
- FRIEND_TEST_ALL_PREFIXES(ArcBridgeTest, ShutdownMidStartup);
+ FRIEND_TEST_ALL_PREFIXES(ArcBridgeTest, Restart);
// If all pre-requisites are true (ARC is available, it has been enabled, and
// the session has started), and ARC is stopped, start ARC. If ARC is running
@@ -56,6 +54,10 @@ class ArcBridgeServiceImpl : public ArcBridgeService,
// DBus callbacks.
void OnArcAvailable(bool available);
+ // Called when the bridge channel is closed. This typically only happens when
+ // the ARC instance crashes. This is not called during shutdown.
+ void OnChannelClosed();
+
scoped_ptr<ArcBridgeBootstrap> bootstrap_;
// Mojo endpoints.
@@ -65,6 +67,10 @@ class ArcBridgeServiceImpl : public ArcBridgeService,
// If the user's session has started.
bool session_started_;
+ // If the instance had already been started but the connection to it was
+ // lost. This should make the instance restart.
+ bool reconnect_ = false;
+
// WeakPtrFactory to use callbacks.
base::WeakPtrFactory<ArcBridgeServiceImpl> weak_factory_;
« no previous file with comments | « components/arc/arc_bridge_service.cc ('k') | components/arc/arc_bridge_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698