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

Unified Diff: components/arc/arc_session.cc

Issue 2720303002: Do nothing on OnSessionStopped if ARC is being restarted. (Closed)
Patch Set: Created 3 years, 10 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_session.cc
diff --git a/components/arc/arc_session.cc b/components/arc/arc_session.cc
index c063a64574273278a690b13e2d8c49e40426f0a0..4d277d276ece39a3993895c207032511bf2aff2c 100644
--- a/components/arc/arc_session.cc
+++ b/components/arc/arc_session.cc
@@ -600,8 +600,10 @@ void ArcSessionImpl::OnStopped(ArcSessionObserver::StopReason reason) {
VLOG(2) << "ARC session is stopped.";
arc_bridge_host_.reset();
state_ = State::STOPPED;
- for (auto& observer : observer_list_)
- observer.OnSessionStopped(reason);
+ for (auto& observer : observer_list_) {
+ // ArcSessionImpl won't restart by itself.
+ observer.OnSessionStopped(reason, false /* restarting */);
hidehiko 2017/02/28 16:33:48 Note: Alternative approach would be splitting ArcS
Yusuke Sato 2017/02/28 21:07:17 I'd actually prefer to split the interface. * ASM
Yusuke Sato 2017/02/28 23:13:53 Sorry there was a typo. I mean, I'd like AS and AS
hidehiko 2017/03/01 09:10:05 So, done. Split the observer into two: ArcSession:
+ }
}
void ArcSessionImpl::OnShutdown() {

Powered by Google App Engine
This is Rietveld 408576698