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

Side by Side Diff: chrome/browser/policy/policy_browsertest.cc

Issue 2436763004: More graceful shutdown for ArcSession. (Closed)
Patch Set: Add StopArcInstance 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 4172 matching lines...) Expand 10 before | Expand all | Expand 10 after
4183 } 4183 }
4184 4184
4185 void SetUpInProcessBrowserTestFixture() override { 4185 void SetUpInProcessBrowserTestFixture() override {
4186 PolicyTest::SetUpInProcessBrowserTestFixture(); 4186 PolicyTest::SetUpInProcessBrowserTestFixture();
4187 fake_session_manager_client_ = new chromeos::FakeSessionManagerClient; 4187 fake_session_manager_client_ = new chromeos::FakeSessionManagerClient;
4188 fake_session_manager_client_->set_arc_available(true); 4188 fake_session_manager_client_->set_arc_available(true);
4189 chromeos::DBusThreadManager::GetSetterForTesting()->SetSessionManagerClient( 4189 chromeos::DBusThreadManager::GetSetterForTesting()->SetSessionManagerClient(
4190 std::unique_ptr<chromeos::SessionManagerClient>( 4190 std::unique_ptr<chromeos::SessionManagerClient>(
4191 fake_session_manager_client_)); 4191 fake_session_manager_client_));
4192 4192
4193 auto service = base::MakeUnique<arc::ArcBridgeServiceImpl>(); 4193 // Inject FakeArcSession here so blocking task runner is not needed.
4194 auto service = base::MakeUnique<arc::ArcBridgeServiceImpl>(nullptr);
4194 service->SetArcSessionFactoryForTesting( 4195 service->SetArcSessionFactoryForTesting(
4195 base::Bind(arc::FakeArcSession::Create)); 4196 base::Bind(arc::FakeArcSession::Create));
4196 arc::ArcServiceManager::SetArcBridgeServiceForTesting(std::move(service)); 4197 arc::ArcServiceManager::SetArcBridgeServiceForTesting(std::move(service));
4197 } 4198 }
4198 4199
4199 void SetUpCommandLine(base::CommandLine* command_line) override { 4200 void SetUpCommandLine(base::CommandLine* command_line) override {
4200 // ArcAuthService functionality is available only when Arc is enabled. Use 4201 // ArcAuthService functionality is available only when Arc is enabled. Use
4201 // kEnableArc switch that activates it. 4202 // kEnableArc switch that activates it.
4202 command_line->AppendSwitch(chromeos::switches::kEnableArc); 4203 command_line->AppendSwitch(chromeos::switches::kEnableArc);
4203 } 4204 }
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
4489 4490
4490 SetEmptyPolicy(); 4491 SetEmptyPolicy();
4491 // Policy not set. 4492 // Policy not set.
4492 CheckSystemTimezoneAutomaticDetectionPolicyUnset(); 4493 CheckSystemTimezoneAutomaticDetectionPolicyUnset();
4493 EXPECT_TRUE(CheckResolveTimezoneByGeolocation(true, false)); 4494 EXPECT_TRUE(CheckResolveTimezoneByGeolocation(true, false));
4494 EXPECT_TRUE(manager->TimeZoneResolverShouldBeRunningForTests()); 4495 EXPECT_TRUE(manager->TimeZoneResolverShouldBeRunningForTests());
4495 } 4496 }
4496 #endif // defined(OS_CHROMEOS) 4497 #endif // defined(OS_CHROMEOS)
4497 4498
4498 } // namespace policy 4499 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/arc/arc_service_launcher.cc ('k') | components/arc/arc_bridge_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698