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

Unified Diff: components/arc/test/fake_arc_bridge_service.cc

Issue 1618193003: arc: Pass auth token from Chrome to ARC instance. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update BUILD.gn Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/arc/auth/arc_auth_fetcher.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/arc/test/fake_arc_bridge_service.cc
diff --git a/components/arc/test/fake_arc_bridge_service.cc b/components/arc/test/fake_arc_bridge_service.cc
index b80aee0d0effe56db1855aa0f7d3af130b02f5b0..200d59e60876ada85febc7926f07710850f15951 100644
--- a/components/arc/test/fake_arc_bridge_service.cc
+++ b/components/arc/test/fake_arc_bridge_service.cc
@@ -10,26 +10,28 @@ FakeArcBridgeService::FakeArcBridgeService() {
}
FakeArcBridgeService::~FakeArcBridgeService() {
- if (state() != State::STOPPED) {
- SetState(State::STOPPED);
- }
+ SetStopped();
}
void FakeArcBridgeService::DetectAvailability() {
}
void FakeArcBridgeService::HandleStartup() {
+ SetReady();
}
void FakeArcBridgeService::Shutdown() {
+ SetStopped();
}
void FakeArcBridgeService::SetReady() {
- SetState(State::READY);
+ if (state() != State::READY)
+ SetState(State::READY);
}
void FakeArcBridgeService::SetStopped() {
- SetState(State::STOPPED);
+ if (state() != State::STOPPED)
+ SetState(State::STOPPED);
}
bool FakeArcBridgeService::HasObserver(const Observer* observer) {
« no previous file with comments | « components/arc/auth/arc_auth_fetcher.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698