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

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

Issue 2425753002: Rename ArcBridgeBootstrap to ArcSession. (Closed)
Patch Set: Address comment. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/arc/test/fake_arc_bridge_bootstrap.h ('k') | components/arc/test/fake_arc_session.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/arc/test/fake_arc_bridge_bootstrap.cc
diff --git a/components/arc/test/fake_arc_bridge_bootstrap.cc b/components/arc/test/fake_arc_bridge_bootstrap.cc
deleted file mode 100644
index 28b04a02fe878fa40991528f7d2ae78a389983a9..0000000000000000000000000000000000000000
--- a/components/arc/test/fake_arc_bridge_bootstrap.cc
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright 2016 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "components/arc/test/fake_arc_bridge_bootstrap.h"
-
-#include <memory>
-
-#include "base/logging.h"
-#include "base/memory/ptr_util.h"
-
-namespace arc {
-
-FakeArcBridgeBootstrap::FakeArcBridgeBootstrap() = default;
-
-FakeArcBridgeBootstrap::~FakeArcBridgeBootstrap() = default;
-
-void FakeArcBridgeBootstrap::Start() {
- if (boot_failure_emulation_enabled_) {
- for (auto& observer : observer_list_)
- observer.OnStopped(boot_failure_reason_);
- } else if (!boot_suspended_) {
- for (auto& observer : observer_list_)
- observer.OnReady();
- }
-}
-
-void FakeArcBridgeBootstrap::Stop() {
- StopWithReason(ArcBridgeService::StopReason::SHUTDOWN);
-}
-
-void FakeArcBridgeBootstrap::StopWithReason(
- ArcBridgeService::StopReason reason) {
- for (auto& observer : observer_list_)
- observer.OnStopped(reason);
-}
-
-void FakeArcBridgeBootstrap::EnableBootFailureEmulation(
- ArcBridgeService::StopReason reason) {
- DCHECK(!boot_failure_emulation_enabled_);
- DCHECK(!boot_suspended_);
-
- boot_failure_emulation_enabled_ = true;
- boot_failure_reason_ = reason;
-}
-
-void FakeArcBridgeBootstrap::SuspendBoot() {
- DCHECK(!boot_failure_emulation_enabled_);
- DCHECK(!boot_suspended_);
-
- boot_suspended_ = true;
-}
-
-// static
-std::unique_ptr<ArcBridgeBootstrap> FakeArcBridgeBootstrap::Create() {
- return base::MakeUnique<FakeArcBridgeBootstrap>();
-}
-
-} // namespace arc
« no previous file with comments | « components/arc/test/fake_arc_bridge_bootstrap.h ('k') | components/arc/test/fake_arc_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698