| Index: chrome/browser/notifications/message_center_settings_controller_unittest.cc
|
| diff --git a/chrome/browser/notifications/message_center_settings_controller_unittest.cc b/chrome/browser/notifications/message_center_settings_controller_unittest.cc
|
| index 1fd13f1710a18b7a7460c747cc08013d72e96ae5..2a671d5a4f80bd86bad59fbb9bbaaa618e5a714f 100644
|
| --- a/chrome/browser/notifications/message_center_settings_controller_unittest.cc
|
| +++ b/chrome/browser/notifications/message_center_settings_controller_unittest.cc
|
| @@ -6,6 +6,7 @@
|
|
|
| #include "base/command_line.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| +#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
|
| #include "chrome/browser/extensions/extension_service.h"
|
| #include "chrome/browser/extensions/test_extension_system.h"
|
| #include "chrome/browser/notifications/desktop_notification_profile_util.h"
|
| @@ -296,8 +297,8 @@ TEST_F(MessageCenterSettingsControllerTest, SetWebPageNotifierEnabled) {
|
| notifier_id, base::string16(), false);
|
|
|
| ContentSetting default_setting =
|
| - profile->GetHostContentSettingsMap()->GetDefaultContentSetting(
|
| - CONTENT_SETTINGS_TYPE_NOTIFICATIONS, NULL);
|
| + HostContentSettingsMapFactory::GetForProfile(profile)
|
| + ->GetDefaultContentSetting(CONTENT_SETTINGS_TYPE_NOTIFICATIONS, NULL);
|
| ASSERT_EQ(CONTENT_SETTING_ASK, default_setting);
|
|
|
| // (1) Enable the permission when the default is to ask (expected to set).
|
| @@ -311,8 +312,9 @@ TEST_F(MessageCenterSettingsControllerTest, SetWebPageNotifierEnabled) {
|
| DesktopNotificationProfileUtil::GetContentSetting(profile, origin));
|
|
|
| // Change the default content setting vaule for notifications to ALLOW.
|
| - profile->GetHostContentSettingsMap()->SetDefaultContentSetting(
|
| - CONTENT_SETTINGS_TYPE_NOTIFICATIONS, CONTENT_SETTING_ALLOW);
|
| + HostContentSettingsMapFactory::GetForProfile(profile)
|
| + ->SetDefaultContentSetting(CONTENT_SETTINGS_TYPE_NOTIFICATIONS,
|
| + CONTENT_SETTING_ALLOW);
|
|
|
| // (3) Disable the permission when the default is allowed (expected to set).
|
| controller()->SetNotifierEnabled(enabled_notifier, false);
|
| @@ -325,8 +327,9 @@ TEST_F(MessageCenterSettingsControllerTest, SetWebPageNotifierEnabled) {
|
| DesktopNotificationProfileUtil::GetContentSetting(profile, origin));
|
|
|
| // Now change the default content setting value to BLOCK.
|
| - profile->GetHostContentSettingsMap()->SetDefaultContentSetting(
|
| - CONTENT_SETTINGS_TYPE_NOTIFICATIONS, CONTENT_SETTING_BLOCK);
|
| + HostContentSettingsMapFactory::GetForProfile(profile)
|
| + ->SetDefaultContentSetting(CONTENT_SETTINGS_TYPE_NOTIFICATIONS,
|
| + CONTENT_SETTING_BLOCK);
|
|
|
| // (5) Enable the permission when the default is blocked (expected to set).
|
| controller()->SetNotifierEnabled(disabled_notifier, true);
|
|
|