Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4089)

Unified Diff: chrome/browser/notifications/message_center_settings_controller_unittest.cc

Issue 1312453005: Removed Profile::GetHostContentSettingsMap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed patch conflict Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698