summaryrefslogtreecommitdiffstats
path: root/components/arc/arc_service_manager.cc
diff options
context:
space:
mode:
authornya <nya@chromium.org>2016-03-23 03:12:33 -0700
committerCommit bot <commit-bot@chromium.org>2016-03-23 10:13:46 +0000
commit1b5973d3a7a70a3446502035ef5431c7fda56518 (patch)
tree71ffc3e755a02b918d1d0382c96a04a88e1d7356 /components/arc/arc_service_manager.cc
parent26d91d2108a891ad9e0cfed8d15fbb312381fda1 (diff)
downloadchromium_src-1b5973d3a7a70a3446502035ef5431c7fda56518.zip
chromium_src-1b5973d3a7a70a3446502035ef5431c7fda56518.tar.gz
chromium_src-1b5973d3a7a70a3446502035ef5431c7fda56518.tar.bz2
Revert of Add ArcEnabled policy implementation
Reason for revert: This change broke --disable-arc-opt-in-verification used for autotests. > Add ArcEnabled policy implementation > > Hide "ARC OptIn" control from Chrome:Settings for enterprise users, > map ArcEnabled policy to ArcEnabled pref. > > BUG=582440 > > Review URL: https://codereview.chromium.org/1684063002 > > Cr-Commit-Position: refs/heads/master@{#382266} TBR=pbond@chromium.org,bartfab@chromium.org,jochen@chromium.org,dbeam@chromium.org,tnagel@chromium.org,hidehiko@chromium.org,hashimoto@chromium.org BUG=582440 Review URL: https://codereview.chromium.org/1825143003 Cr-Commit-Position: refs/heads/master@{#382819}
Diffstat (limited to 'components/arc/arc_service_manager.cc')
-rw-r--r--components/arc/arc_service_manager.cc27
1 files changed, 3 insertions, 24 deletions
diff --git a/components/arc/arc_service_manager.cc b/components/arc/arc_service_manager.cc
index bc54994..10388a2 100644
--- a/components/arc/arc_service_manager.cc
+++ b/components/arc/arc_service_manager.cc
@@ -24,23 +24,14 @@ namespace {
// Weak pointer. This class is owned by ChromeBrowserMainPartsChromeos.
ArcServiceManager* g_arc_service_manager = nullptr;
-// This pointer is owned by ArcServiceManager.
-ArcBridgeService* g_arc_bridge_service_for_testing = nullptr;
-
} // namespace
-ArcServiceManager::ArcServiceManager() {
+ArcServiceManager::ArcServiceManager()
+ : arc_bridge_service_(
+ new ArcBridgeServiceImpl(ArcBridgeBootstrap::Create())) {
DCHECK(!g_arc_service_manager);
g_arc_service_manager = this;
- if (g_arc_bridge_service_for_testing) {
- arc_bridge_service_.reset(g_arc_bridge_service_for_testing);
- g_arc_bridge_service_for_testing = nullptr;
- } else {
- arc_bridge_service_.reset(new ArcBridgeServiceImpl(
- ArcBridgeBootstrap::Create()));
- }
-
AddService(make_scoped_ptr(new ArcClipboardBridge(arc_bridge_service())));
AddService(
make_scoped_ptr(new ArcCrashCollectorBridge(arc_bridge_service())));
@@ -55,9 +46,6 @@ ArcServiceManager::~ArcServiceManager() {
DCHECK(thread_checker_.CalledOnValidThread());
DCHECK(g_arc_service_manager == this);
g_arc_service_manager = nullptr;
- if (g_arc_bridge_service_for_testing) {
- delete g_arc_bridge_service_for_testing;
- }
}
// static
@@ -86,13 +74,4 @@ void ArcServiceManager::OnPrimaryUserProfilePrepared(
new ArcNotificationManager(arc_bridge_service(), account_id)));
}
-//static
-void ArcServiceManager::SetArcBridgeServiceForTesting(
- scoped_ptr<ArcBridgeService> arc_bridge_service) {
- if (g_arc_bridge_service_for_testing) {
- delete g_arc_bridge_service_for_testing;
- }
- g_arc_bridge_service_for_testing = arc_bridge_service.release();
-}
-
} // namespace arc