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

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

Issue 2577373002: Refactor ArcBridgeServiceImpl part 2. (Closed)
Patch Set: Rebase Created 3 years, 12 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_impl.cc ('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() = default; 9 FakeArcBridgeService::FakeArcBridgeService() = default;
10 10
11 FakeArcBridgeService::~FakeArcBridgeService() { 11 FakeArcBridgeService::~FakeArcBridgeService() {
12 SetStopped(); 12 SetStopped();
13 } 13 }
14 14
15 void FakeArcBridgeService::RequestStart() { 15 void FakeArcBridgeService::RequestStart() {
16 SetReady(); 16 SetReady();
17 } 17 }
18 18
19 void FakeArcBridgeService::RequestStop() { 19 void FakeArcBridgeService::RequestStop() {
20 SetStopped(); 20 SetStopped();
21 } 21 }
22 22
23 void FakeArcBridgeService::OnShutdown() { 23 void FakeArcBridgeService::OnShutdown() {
24 SetStopped(); 24 SetStopped();
25 } 25 }
26 26
27 void FakeArcBridgeService::SetReady() { 27 void FakeArcBridgeService::SetReady() {
28 if (state() != State::READY) 28 if (state() != State::RUNNING)
29 SetState(State::READY); 29 SetState(State::RUNNING);
30 } 30 }
31 31
32 void FakeArcBridgeService::SetStopped() { 32 void FakeArcBridgeService::SetStopped() {
33 if (state() != State::STOPPED) 33 if (state() != State::STOPPED)
34 SetState(State::STOPPED); 34 SetState(State::STOPPED);
35 } 35 }
36 36
37 } // namespace arc 37 } // namespace arc
OLDNEW
« no previous file with comments | « components/arc/arc_bridge_service_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698