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

Side by Side Diff: components/arc/test/fake_arc_bridge_service.cc

Issue 1701063003: Refactor ArcBridgeService detection and initialization to a separate class ArcServiceLauncher. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address reviewer feedback Created 4 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/test/fake_arc_bridge_service.h ('k') | no next file » | 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/test/fake_arc_bridge_service.h" 5 #include "components/arc/test/fake_arc_bridge_service.h"
6 6
7 namespace arc { 7 namespace arc {
8 8
9 FakeArcBridgeService::FakeArcBridgeService() { 9 FakeArcBridgeService::FakeArcBridgeService() {
10 } 10 }
11 11
12 FakeArcBridgeService::~FakeArcBridgeService() { 12 FakeArcBridgeService::~FakeArcBridgeService() {
13 SetStopped(); 13 SetStopped();
14 } 14 }
15 15
16 void FakeArcBridgeService::DetectAvailability() { 16 void FakeArcBridgeService::SetDetectedAvailability(bool availability) {
17 SetAvailable(availability);
17 } 18 }
18 19
19 void FakeArcBridgeService::HandleStartup() { 20 void FakeArcBridgeService::HandleStartup() {
20 SetReady(); 21 SetReady();
21 } 22 }
22 23
23 void FakeArcBridgeService::Shutdown() { 24 void FakeArcBridgeService::Shutdown() {
24 SetStopped(); 25 SetStopped();
25 } 26 }
26 27
27 void FakeArcBridgeService::SetReady() { 28 void FakeArcBridgeService::SetReady() {
28 if (state() != State::READY) 29 if (state() != State::READY)
29 SetState(State::READY); 30 SetState(State::READY);
30 } 31 }
31 32
32 void FakeArcBridgeService::SetStopped() { 33 void FakeArcBridgeService::SetStopped() {
33 if (state() != State::STOPPED) 34 if (state() != State::STOPPED)
34 SetState(State::STOPPED); 35 SetState(State::STOPPED);
35 } 36 }
36 37
37 bool FakeArcBridgeService::HasObserver(const Observer* observer) { 38 bool FakeArcBridgeService::HasObserver(const Observer* observer) {
38 return observer_list().HasObserver(observer); 39 return observer_list().HasObserver(observer);
39 } 40 }
40 41
41 } // namespace arc 42 } // namespace arc
OLDNEW
« no previous file with comments | « components/arc/test/fake_arc_bridge_service.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698