OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/power/power_prefs.h" | 5 #include "chrome/browser/chromeos/power/power_prefs.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/files/file_path.h" | 11 #include "base/files/file_path.h" |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "base/prefs/pref_service.h" | |
15 #include "chrome/browser/chrome_notification_types.h" | 14 #include "chrome/browser/chrome_notification_types.h" |
16 #include "chrome/browser/chromeos/login/users/fake_chrome_user_manager.h" | 15 #include "chrome/browser/chromeos/login/users/fake_chrome_user_manager.h" |
17 #include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h" | 16 #include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h" |
18 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 17 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
19 #include "chrome/browser/extensions/extension_special_storage_policy.h" | 18 #include "chrome/browser/extensions/extension_special_storage_policy.h" |
20 #include "chrome/browser/prefs/browser_prefs.h" | 19 #include "chrome/browser/prefs/browser_prefs.h" |
21 #include "chrome/browser/profiles/profile.h" | 20 #include "chrome/browser/profiles/profile.h" |
22 #include "chrome/browser/profiles/profile_manager.h" | 21 #include "chrome/browser/profiles/profile_manager.h" |
23 #include "chrome/common/chrome_constants.h" | 22 #include "chrome/common/chrome_constants.h" |
24 #include "chrome/common/pref_names.h" | 23 #include "chrome/common/pref_names.h" |
25 #include "chrome/test/base/testing_browser_process.h" | 24 #include "chrome/test/base/testing_browser_process.h" |
26 #include "chrome/test/base/testing_profile.h" | 25 #include "chrome/test/base/testing_profile.h" |
27 #include "chrome/test/base/testing_profile_manager.h" | 26 #include "chrome/test/base/testing_profile_manager.h" |
28 #include "chromeos/dbus/fake_power_manager_client.h" | 27 #include "chromeos/dbus/fake_power_manager_client.h" |
29 #include "chromeos/dbus/power_manager/policy.pb.h" | 28 #include "chromeos/dbus/power_manager/policy.pb.h" |
30 #include "chromeos/dbus/power_policy_controller.h" | 29 #include "chromeos/dbus/power_policy_controller.h" |
31 #include "components/pref_registry/pref_registry_syncable.h" | 30 #include "components/pref_registry/pref_registry_syncable.h" |
| 31 #include "components/prefs/pref_service.h" |
32 #include "components/syncable_prefs/pref_service_syncable.h" | 32 #include "components/syncable_prefs/pref_service_syncable.h" |
33 #include "components/syncable_prefs/testing_pref_service_syncable.h" | 33 #include "components/syncable_prefs/testing_pref_service_syncable.h" |
34 #include "content/public/browser/notification_details.h" | 34 #include "content/public/browser/notification_details.h" |
35 #include "content/public/browser/notification_service.h" | 35 #include "content/public/browser/notification_service.h" |
36 #include "content/public/browser/notification_source.h" | 36 #include "content/public/browser/notification_source.h" |
37 #include "content/public/test/test_browser_thread_bundle.h" | 37 #include "content/public/test/test_browser_thread_bundle.h" |
38 #include "testing/gtest/include/gtest/gtest.h" | 38 #include "testing/gtest/include/gtest/gtest.h" |
39 | 39 |
40 namespace chromeos { | 40 namespace chromeos { |
41 | 41 |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 content::Source<Profile>(user_profile), | 299 content::Source<Profile>(user_profile), |
300 content::NotificationService::NoDetails()); | 300 content::NotificationService::NoDetails()); |
301 | 301 |
302 // The user profile's prefs should still be used. | 302 // The user profile's prefs should still be used. |
303 EXPECT_FALSE(GetProfile()); | 303 EXPECT_FALSE(GetProfile()); |
304 EXPECT_EQ(GetExpectedPowerPolicyForProfile(user_profile, UNLOCKED), | 304 EXPECT_EQ(GetExpectedPowerPolicyForProfile(user_profile, UNLOCKED), |
305 GetCurrentPowerPolicy()); | 305 GetCurrentPowerPolicy()); |
306 } | 306 } |
307 | 307 |
308 } // namespace chromeos | 308 } // namespace chromeos |
OLD | NEW |