OLD | NEW |
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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 "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" | 5 #include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
11 #include "chrome/browser/chromeos/ownership/fake_owner_settings_service.h" | 11 #include "chrome/browser/chromeos/ownership/fake_owner_settings_service.h" |
12 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h" | 12 #include "chrome/browser/chromeos/ownership/owner_settings_service_chromeos.h" |
13 #include "chrome/browser/chromeos/policy/proto/chrome_device_policy.pb.h" | 13 #include "chrome/browser/chromeos/policy/proto/chrome_device_policy.pb.h" |
14 #include "chrome/browser/chromeos/settings/cros_settings.h" | 14 #include "chrome/browser/chromeos/settings/cros_settings.h" |
15 #include "chrome/browser/chromeos/settings/device_settings_cache.h" | 15 #include "chrome/browser/chromeos/settings/device_settings_cache.h" |
16 #include "chrome/browser/chromeos/settings/device_settings_service.h" | 16 #include "chrome/browser/chromeos/settings/device_settings_service.h" |
17 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
18 #include "components/ownership/mock_owner_key_util.h" | 18 #include "components/ownership/mock_owner_key_util.h" |
19 #include "policy/proto/device_management_backend.pb.h" | 19 #include "components/policy/proto/device_management_backend.pb.h" |
20 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
21 | 21 |
22 namespace chromeos { | 22 namespace chromeos { |
23 | 23 |
24 ScopedCrosSettingsTestHelper::ScopedCrosSettingsTestHelper() { | 24 ScopedCrosSettingsTestHelper::ScopedCrosSettingsTestHelper() { |
25 Initialize(true); | 25 Initialize(true); |
26 } | 26 } |
27 | 27 |
28 ScopedCrosSettingsTestHelper::ScopedCrosSettingsTestHelper( | 28 ScopedCrosSettingsTestHelper::ScopedCrosSettingsTestHelper( |
29 bool create_settings_service) { | 29 bool create_settings_service) { |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 | 124 |
125 void ScopedCrosSettingsTestHelper::Initialize(bool create_settings_service) { | 125 void ScopedCrosSettingsTestHelper::Initialize(bool create_settings_service) { |
126 if (create_settings_service) { | 126 if (create_settings_service) { |
127 CHECK(!DeviceSettingsService::IsInitialized()); | 127 CHECK(!DeviceSettingsService::IsInitialized()); |
128 test_device_settings_service_.reset(new ScopedTestDeviceSettingsService()); | 128 test_device_settings_service_.reset(new ScopedTestDeviceSettingsService()); |
129 test_cros_settings_.reset(new ScopedTestCrosSettings()); | 129 test_cros_settings_.reset(new ScopedTestCrosSettings()); |
130 } | 130 } |
131 } | 131 } |
132 | 132 |
133 } // namespace chromeos | 133 } // namespace chromeos |
OLD | NEW |