| 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 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/prefs/pref_service.h" | 12 #include "base/prefs/pref_service.h" |
| 13 #include "chrome/browser/chrome_notification_types.h" | 13 #include "chrome/browser/chrome_notification_types.h" |
| 14 #include "chrome/browser/extensions/extension_special_storage_policy.h" | 14 #include "chrome/browser/extensions/extension_special_storage_policy.h" |
| 15 #include "chrome/browser/prefs/browser_prefs.h" | 15 #include "chrome/browser/prefs/browser_prefs.h" |
| 16 #include "chrome/browser/prefs/pref_service_syncable.h" | 16 #include "chrome/browser/prefs/pref_service_syncable.h" |
| 17 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
| 18 #include "chrome/browser/profiles/profile_manager.h" | 18 #include "chrome/browser/profiles/profile_manager.h" |
| 19 #include "chrome/common/chrome_constants.h" | 19 #include "chrome/common/chrome_constants.h" |
| 20 #include "chrome/common/pref_names.h" | 20 #include "chrome/common/pref_names.h" |
| 21 #include "chrome/test/base/testing_browser_process.h" | 21 #include "chrome/test/base/testing_browser_process.h" |
| 22 #include "chrome/test/base/testing_pref_service_syncable.h" | 22 #include "chrome/test/base/testing_pref_service_syncable.h" |
| 23 #include "chrome/test/base/testing_profile.h" | 23 #include "chrome/test/base/testing_profile.h" |
| 24 #include "chrome/test/base/testing_profile_manager.h" | 24 #include "chrome/test/base/testing_profile_manager.h" |
| 25 #include "chromeos/chromeos_switches.h" | 25 #include "chromeos/chromeos_switches.h" |
| 26 #include "chromeos/dbus/fake_dbus_thread_manager.h" | 26 #include "chromeos/dbus/fake_dbus_thread_manager.h" |
| 27 #include "chromeos/dbus/fake_power_manager_client.h" | 27 #include "chromeos/dbus/fake_power_manager_client.h" |
| 28 #include "chromeos/dbus/power_manager/policy.pb.h" | 28 #include "chromeos/dbus/power_manager/policy.pb.h" |
| 29 #include "chromeos/dbus/power_policy_controller.h" | 29 #include "chromeos/dbus/power_policy_controller.h" |
| 30 #include "components/user_prefs/pref_registry_syncable.h" | 30 #include "components/pref_registry/pref_registry_syncable.h" |
| 31 #include "content/public/browser/notification_details.h" | 31 #include "content/public/browser/notification_details.h" |
| 32 #include "content/public/browser/notification_service.h" | 32 #include "content/public/browser/notification_service.h" |
| 33 #include "content/public/browser/notification_source.h" | 33 #include "content/public/browser/notification_source.h" |
| 34 #include "testing/gtest/include/gtest/gtest.h" | 34 #include "testing/gtest/include/gtest/gtest.h" |
| 35 | 35 |
| 36 namespace chromeos { | 36 namespace chromeos { |
| 37 | 37 |
| 38 class PowerPrefsTest : public testing::Test { | 38 class PowerPrefsTest : public testing::Test { |
| 39 protected: | 39 protected: |
| 40 PowerPrefsTest(); | 40 PowerPrefsTest(); |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 content::Source<Profile>(user_profile), | 259 content::Source<Profile>(user_profile), |
| 260 content::NotificationService::NoDetails()); | 260 content::NotificationService::NoDetails()); |
| 261 | 261 |
| 262 // The user profile's prefs should still be used. | 262 // The user profile's prefs should still be used. |
| 263 EXPECT_FALSE(GetProfile()); | 263 EXPECT_FALSE(GetProfile()); |
| 264 EXPECT_EQ(GetExpectedPowerPolicyForProfile(user_profile), | 264 EXPECT_EQ(GetExpectedPowerPolicyForProfile(user_profile), |
| 265 GetCurrentPowerPolicy()); | 265 GetCurrentPowerPolicy()); |
| 266 } | 266 } |
| 267 | 267 |
| 268 } // namespace chromeos | 268 } // namespace chromeos |
| OLD | NEW |