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

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

Issue 2194193002: Fix ArcBridgeBootstrap race issues. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 2 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_bridge_service.h ('k') | components/arc/arc_bridge_service_impl.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_bridge_service.h" 5 #include "components/arc/arc_bridge_service.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/feature_list.h" 10 #include "base/feature_list.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 81
82 void ArcBridgeService::SetStopReason(StopReason stop_reason) { 82 void ArcBridgeService::SetStopReason(StopReason stop_reason) {
83 DCHECK(CalledOnValidThread()); 83 DCHECK(CalledOnValidThread());
84 stop_reason_ = stop_reason; 84 stop_reason_ = stop_reason;
85 } 85 }
86 86
87 bool ArcBridgeService::CalledOnValidThread() { 87 bool ArcBridgeService::CalledOnValidThread() {
88 return thread_checker_.CalledOnValidThread(); 88 return thread_checker_.CalledOnValidThread();
89 } 89 }
90 90
91 std::ostream& operator<<(
92 std::ostream& os, ArcBridgeService::StopReason reason) {
93 switch (reason) {
94 #define CASE_IMPL(val) \
95 case ArcBridgeService::StopReason::val: \
96 return os << #val
97
98 CASE_IMPL(SHUTDOWN);
99 CASE_IMPL(GENERIC_BOOT_FAILURE);
100 CASE_IMPL(LOW_DISK_SPACE);
101 CASE_IMPL(CRASH);
102 #undef CASE_IMPL
103 }
104
105 // In case of unexpected value, output the int value.
106 return os << "StopReason(" << static_cast<int>(reason) << ")";
107 }
108
91 } // namespace arc 109 } // namespace arc
OLDNEW
« no previous file with comments | « components/arc/arc_bridge_service.h ('k') | components/arc/arc_bridge_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698