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

Unified Diff: components/arc/arc_bridge_service.cc

Issue 2558313002: Remove explicit singletonness of ArcBridgeService part 5. (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: components/arc/arc_bridge_service.cc
diff --git a/components/arc/arc_bridge_service.cc b/components/arc/arc_bridge_service.cc
index be3e44d1597fd85c2c113e7ec46d2a71556937ad..d8bb59afccdd90eb5ea49bafda93e11c614af318 100644
--- a/components/arc/arc_bridge_service.cc
+++ b/components/arc/arc_bridge_service.cc
@@ -21,9 +21,6 @@ const base::Feature kArcEnabledFeature{"EnableARC",
} // namespace
-// Weak pointer. This class is owned by ArcServiceManager.
-ArcBridgeService* g_arc_bridge_service = nullptr;
-
ArcBridgeService::ArcBridgeService()
: state_(State::STOPPED),
stop_reason_(StopReason::SHUTDOWN),
@@ -35,18 +32,6 @@ ArcBridgeService::~ArcBridgeService() {
}
// static
-ArcBridgeService* ArcBridgeService::Get() {
- if (!g_arc_bridge_service) {
- // ArcBridgeService may be indirectly referenced in unit tests where
- // ArcBridgeService is optional.
- LOG(ERROR) << "ArcBridgeService is not ready.";
- return nullptr;
- }
- DCHECK(g_arc_bridge_service->CalledOnValidThread());
- return g_arc_bridge_service;
-}
-
-// static
bool ArcBridgeService::GetEnabled(const base::CommandLine* command_line) {
return command_line->HasSwitch(chromeos::switches::kEnableArc) ||
(command_line->HasSwitch(chromeos::switches::kArcAvailable) &&

Powered by Google App Engine
This is Rietveld 408576698