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

Unified Diff: chrome/browser/ui/content_settings/content_setting_bubble_model_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/ui/content_settings/content_setting_bubble_model_unittest.cc
diff --git a/chrome/browser/ui/content_settings/content_setting_bubble_model_unittest.cc b/chrome/browser/ui/content_settings/content_setting_bubble_model_unittest.cc
index 5f960b48060a62f5d235ce1c6a7824876883fc70..3f0b76b23108d819ca81e51d1685445f04ab2be6 100644
--- a/chrome/browser/ui/content_settings/content_setting_bubble_model_unittest.cc
+++ b/chrome/browser/ui/content_settings/content_setting_bubble_model_unittest.cc
@@ -6,6 +6,7 @@
#include "base/command_line.h"
#include "base/prefs/pref_service.h"
#include "base/strings/utf_string_conversions.h"
+#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
#include "chrome/browser/content_settings/tab_specific_content_settings.h"
#include "chrome/browser/custom_handlers/protocol_handler_registry.h"
#include "chrome/browser/infobars/infobar_service.h"
@@ -180,7 +181,7 @@ TEST_F(ContentSettingBubbleModelTest, BlockedMediastreamMicAndCamera) {
GURL url = web_contents()->GetURL();
HostContentSettingsMap* host_content_settings_map =
- profile()->GetHostContentSettingsMap();
+ HostContentSettingsMapFactory::GetForProfile(profile());
ContentSettingsPattern primary_pattern =
ContentSettingsPattern::FromURL(url);
ContentSetting setting = CONTENT_SETTING_BLOCK;
@@ -271,7 +272,7 @@ TEST_F(ContentSettingBubbleModelTest, MediastreamContentBubble) {
GURL url = web_contents()->GetURL();
HostContentSettingsMap* host_content_settings_map =
- profile()->GetHostContentSettingsMap();
+ HostContentSettingsMapFactory::GetForProfile(profile());
ContentSettingsPattern primary_pattern =
ContentSettingsPattern::FromURL(url);
ContentSetting setting = CONTENT_SETTING_BLOCK;
@@ -822,7 +823,7 @@ TEST_F(ContentSettingBubbleModelTest, Geolocation) {
// Add it to the content map, should now have a clear link.
HostContentSettingsMap* setting_map =
- profile()->GetHostContentSettingsMap();
+ HostContentSettingsMapFactory::GetForProfile(profile());
setting_map->SetContentSetting(
ContentSettingsPattern::FromURLNoWildcard(frame1_url),
ContentSettingsPattern::FromURLNoWildcard(page_url),
@@ -832,8 +833,8 @@ TEST_F(ContentSettingBubbleModelTest, Geolocation) {
CheckGeolocationBubble(1, true, false);
// Change the default to allow: no message needed.
- profile()->GetHostContentSettingsMap()->SetDefaultContentSetting(
- CONTENT_SETTINGS_TYPE_GEOLOCATION, CONTENT_SETTING_ALLOW);
+ setting_map->SetDefaultContentSetting(CONTENT_SETTINGS_TYPE_GEOLOCATION,
+ CONTENT_SETTING_ALLOW);
CheckGeolocationBubble(1, false, false);
// Second frame denied, but not stored in the content map: requires reload.
@@ -841,8 +842,8 @@ TEST_F(ContentSettingBubbleModelTest, Geolocation) {
CheckGeolocationBubble(2, false, true);
// Change the default to block: offer a clear link for the persisted frame 1.
- profile()->GetHostContentSettingsMap()->SetDefaultContentSetting(
- CONTENT_SETTINGS_TYPE_GEOLOCATION, CONTENT_SETTING_BLOCK);
+ setting_map->SetDefaultContentSetting(CONTENT_SETTINGS_TYPE_GEOLOCATION,
+ CONTENT_SETTING_BLOCK);
CheckGeolocationBubble(2, true, false);
}

Powered by Google App Engine
This is Rietveld 408576698