| OLD | NEW |
| 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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h" | 209 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h" |
| 210 #include "chromeos/audio/cras_audio_handler.h" | 210 #include "chromeos/audio/cras_audio_handler.h" |
| 211 #include "chromeos/chromeos_switches.h" | 211 #include "chromeos/chromeos_switches.h" |
| 212 #include "chromeos/cryptohome/cryptohome_parameters.h" | 212 #include "chromeos/cryptohome/cryptohome_parameters.h" |
| 213 #include "chromeos/dbus/dbus_thread_manager.h" | 213 #include "chromeos/dbus/dbus_thread_manager.h" |
| 214 #include "chromeos/dbus/fake_session_manager_client.h" | 214 #include "chromeos/dbus/fake_session_manager_client.h" |
| 215 #include "chromeos/dbus/session_manager_client.h" | 215 #include "chromeos/dbus/session_manager_client.h" |
| 216 #include "components/arc/arc_bridge_service.h" | 216 #include "components/arc/arc_bridge_service.h" |
| 217 #include "components/arc/arc_bridge_service_impl.h" | 217 #include "components/arc/arc_bridge_service_impl.h" |
| 218 #include "components/arc/arc_service_manager.h" | 218 #include "components/arc/arc_service_manager.h" |
| 219 #include "components/arc/test/fake_arc_bridge_bootstrap.h" | 219 #include "components/arc/test/fake_arc_session.h" |
| 220 #include "components/signin/core/account_id/account_id.h" | 220 #include "components/signin/core/account_id/account_id.h" |
| 221 #include "components/user_manager/user_manager.h" | 221 #include "components/user_manager/user_manager.h" |
| 222 #include "ui/keyboard/keyboard_util.h" | 222 #include "ui/keyboard/keyboard_util.h" |
| 223 #include "ui/snapshot/screenshot_grabber.h" | 223 #include "ui/snapshot/screenshot_grabber.h" |
| 224 #endif | 224 #endif |
| 225 | 225 |
| 226 #if !defined(OS_MACOSX) | 226 #if !defined(OS_MACOSX) |
| 227 #include "base/compiler_specific.h" | 227 #include "base/compiler_specific.h" |
| 228 #include "chrome/browser/ui/extensions/app_launch_params.h" | 228 #include "chrome/browser/ui/extensions/app_launch_params.h" |
| 229 #include "chrome/browser/ui/extensions/application_launch.h" | 229 #include "chrome/browser/ui/extensions/application_launch.h" |
| (...skipping 3954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 auto service = base::MakeUnique<arc::ArcBridgeServiceImpl>(); |
| 4194 service->SetArcBridgeBootstrapFactoryForTesting( | 4194 service->SetArcSessionFactoryForTesting( |
| 4195 base::Bind(arc::FakeArcBridgeBootstrap::Create)); | 4195 base::Bind(arc::FakeArcSession::Create)); |
| 4196 arc::ArcServiceManager::SetArcBridgeServiceForTesting(std::move(service)); | 4196 arc::ArcServiceManager::SetArcBridgeServiceForTesting(std::move(service)); |
| 4197 } | 4197 } |
| 4198 | 4198 |
| 4199 void SetUpCommandLine(base::CommandLine* command_line) override { | 4199 void SetUpCommandLine(base::CommandLine* command_line) override { |
| 4200 // ArcAuthService functionality is available only when Arc is enabled. Use | 4200 // ArcAuthService functionality is available only when Arc is enabled. Use |
| 4201 // kEnableArc switch that activates it. | 4201 // kEnableArc switch that activates it. |
| 4202 command_line->AppendSwitch(chromeos::switches::kEnableArc); | 4202 command_line->AppendSwitch(chromeos::switches::kEnableArc); |
| 4203 } | 4203 } |
| 4204 | 4204 |
| 4205 void SetArcEnabledByPolicy(bool enabled) { | 4205 void SetArcEnabledByPolicy(bool enabled) { |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4489 | 4489 |
| 4490 SetEmptyPolicy(); | 4490 SetEmptyPolicy(); |
| 4491 // Policy not set. | 4491 // Policy not set. |
| 4492 CheckSystemTimezoneAutomaticDetectionPolicyUnset(); | 4492 CheckSystemTimezoneAutomaticDetectionPolicyUnset(); |
| 4493 EXPECT_TRUE(CheckResolveTimezoneByGeolocation(true, false)); | 4493 EXPECT_TRUE(CheckResolveTimezoneByGeolocation(true, false)); |
| 4494 EXPECT_TRUE(manager->TimeZoneResolverShouldBeRunningForTests()); | 4494 EXPECT_TRUE(manager->TimeZoneResolverShouldBeRunningForTests()); |
| 4495 } | 4495 } |
| 4496 #endif // defined(OS_CHROMEOS) | 4496 #endif // defined(OS_CHROMEOS) |
| 4497 | 4497 |
| 4498 } // namespace policy | 4498 } // namespace policy |
| OLD | NEW |