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

Side by Side Diff: components/arc/arc_stop_reason.cc

Issue 2720303002: Do nothing on OnSessionStopped if ARC is being restarted. (Closed)
Patch Set: Address comments. 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
« no previous file with comments | « components/arc/arc_stop_reason.h ('k') | components/arc/test/fake_arc_session.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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_session_observer.h" 5 #include "components/arc/arc_stop_reason.h"
6 6
7 namespace arc { 7 namespace arc {
8 8
9 std::ostream& operator<<(std::ostream& os, 9 std::ostream& operator<<(std::ostream& os, ArcStopReason reason) {
10 ArcSessionObserver::StopReason reason) {
11 switch (reason) { 10 switch (reason) {
12 #define CASE_IMPL(val) \ 11 #define CASE_IMPL(val) \
13 case ArcSessionObserver::StopReason::val: \ 12 case ArcStopReason::val: \
14 return os << #val 13 return os << #val
15 14
16 CASE_IMPL(SHUTDOWN); 15 CASE_IMPL(SHUTDOWN);
17 CASE_IMPL(GENERIC_BOOT_FAILURE); 16 CASE_IMPL(GENERIC_BOOT_FAILURE);
18 CASE_IMPL(LOW_DISK_SPACE); 17 CASE_IMPL(LOW_DISK_SPACE);
19 CASE_IMPL(CRASH); 18 CASE_IMPL(CRASH);
20 #undef CASE_IMPL 19 #undef CASE_IMPL
21 } 20 }
22 21
23 // In case of unexpected value, output the int value. 22 // In case of unexpected value, output the int value.
24 return os << "StopReason(" << static_cast<int>(reason) << ")"; 23 return os << "ArcStopReason(" << static_cast<int>(reason) << ")";
25 } 24 }
26 25
27 } // namespace arc 26 } // namespace arc
OLDNEW
« no previous file with comments | « components/arc/arc_stop_reason.h ('k') | components/arc/test/fake_arc_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698