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

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

Issue 2574013003: Refactor ArcSessionRunner part 1. (Closed)
Patch Set: rebase to the split CL Created 4 years 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "components/arc/test/fake_arc_bridge_service.h"
6
7 namespace arc {
8
9 FakeArcBridgeService::FakeArcBridgeService() = default;
10
11 FakeArcBridgeService::~FakeArcBridgeService() {
12 SetStopped();
13 }
14
15 void FakeArcBridgeService::RequestStart() {
16 SetReady();
17 }
18
19 void FakeArcBridgeService::RequestStop() {
20 SetStopped();
21 }
22
23 void FakeArcBridgeService::OnShutdown() {
24 SetStopped();
25 }
26
27 void FakeArcBridgeService::SetReady() {
28 if (state() != State::RUNNING)
29 SetState(State::RUNNING);
30 }
31
32 void FakeArcBridgeService::SetStopped() {
33 if (state() != State::STOPPED)
34 SetState(State::STOPPED);
35 }
36
37 } // namespace arc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698