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

Side by Side Diff: components/arc/arc_session_observer.h

Issue 2720303002: Do nothing on OnSessionStopped if ARC is being restarted. (Closed)
Patch Set: Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef COMPONENTS_ARC_ARC_SESSION_OBSERVER_H_ 5 #ifndef COMPONENTS_ARC_ARC_SESSION_OBSERVER_H_
6 #define COMPONENTS_ARC_ARC_SESSION_OBSERVER_H_ 6 #define COMPONENTS_ARC_ARC_SESSION_OBSERVER_H_
7 7
8 #include <ostream> 8 #include <ostream>
9 9
10 namespace arc { 10 namespace arc {
(...skipping 11 matching lines...) Expand all
22 // failures on bootstrapping IPC channels with Android. 22 // failures on bootstrapping IPC channels with Android.
23 GENERIC_BOOT_FAILURE, 23 GENERIC_BOOT_FAILURE,
24 24
25 // The device is critically low on disk space. 25 // The device is critically low on disk space.
26 LOW_DISK_SPACE, 26 LOW_DISK_SPACE,
27 27
28 // ARC instance has crashed. 28 // ARC instance has crashed.
29 CRASH, 29 CRASH,
30 }; 30 };
31 31
32 virtual ~ArcSessionObserver() = default; 32 virtual ~ArcSessionObserver() = default;
Yusuke Sato 2017/02/28 21:07:17 nit: same
hidehiko 2017/03/01 09:10:05 Done.
33 33
34 // Called when the connection with ARC instance has been established. 34 // Called when the connection with ARC instance has been established.
35 virtual void OnSessionReady() {} 35 virtual void OnSessionReady() {}
36 36
37 // Called when ARC instance is stopped. This is called exactly once 37 // Called when ARC instance is stopped. This is called exactly once
38 // per instance which is Start()ed. 38 // per instance which is Start()ed.
39 virtual void OnSessionStopped(StopReason reason) {} 39 // If ARC instance is being restarted, |restarting| is true. Otherwise false.
40 virtual void OnSessionStopped(StopReason reason, bool restarting) {}
40 }; 41 };
41 42
42 // Defines "<<" operator for LOGging purpose. 43 // Defines "<<" operator for LOGging purpose.
43 std::ostream& operator<<(std::ostream& os, 44 std::ostream& operator<<(std::ostream& os,
44 ArcSessionObserver::StopReason reason); 45 ArcSessionObserver::StopReason reason);
45 46
46 } // namespace arc 47 } // namespace arc
47 48
48 #endif // COMPONENTS_ARC_ARC_SESSION_OBSERVER_H_ 49 #endif // COMPONENTS_ARC_ARC_SESSION_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698