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

Unified Diff: chrome/test/ppapi/ppapi_browsertest.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
« no previous file with comments | « chrome/test/base/testing_profile.cc ('k') | chrome/test/ppapi/ppapi_interactive_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/ppapi/ppapi_browsertest.cc
diff --git a/chrome/test/ppapi/ppapi_browsertest.cc b/chrome/test/ppapi/ppapi_browsertest.cc
index ad561797dffe08e3b3cb0a1ad4ca436117b305ed..50f0a9eb0a13a7c5a4e01f86cdce19f8819e54bf 100644
--- a/chrome/test/ppapi/ppapi_browsertest.cc
+++ b/chrome/test/ppapi/ppapi_browsertest.cc
@@ -5,6 +5,7 @@
#include "base/path_service.h"
#include "base/test/test_timeouts.h"
#include "build/build_config.h"
+#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
#include "chrome/browser/extensions/extension_browsertest.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
@@ -143,7 +144,7 @@ IN_PROC_BROWSER_TEST_F(PPAPIBrokerInfoBarTest, Accept) {
// It should also set a content settings exception for the site.
GURL url = GetTestFileUrl("Broker_ConnectPermissionGranted");
HostContentSettingsMap* content_settings =
- browser()->profile()->GetHostContentSettingsMap();
+ HostContentSettingsMapFactory::GetForProfile(browser()->profile());
EXPECT_EQ(CONTENT_SETTING_ALLOW,
content_settings->GetContentSetting(
url, url, CONTENT_SETTINGS_TYPE_PPAPI_BROKER, std::string()));
@@ -163,7 +164,7 @@ IN_PROC_BROWSER_TEST_F(PPAPIBrokerInfoBarTest, Deny) {
// It should also set a content settings exception for the site.
GURL url = GetTestFileUrl("Broker_ConnectPermissionDenied");
HostContentSettingsMap* content_settings =
- browser()->profile()->GetHostContentSettingsMap();
+ HostContentSettingsMapFactory::GetForProfile(browser()->profile());
EXPECT_EQ(CONTENT_SETTING_BLOCK,
content_settings->GetContentSetting(
url, url, CONTENT_SETTINGS_TYPE_PPAPI_BROKER, std::string()));
@@ -171,8 +172,9 @@ IN_PROC_BROWSER_TEST_F(PPAPIBrokerInfoBarTest, Deny) {
IN_PROC_BROWSER_TEST_F(PPAPIBrokerInfoBarTest, Blocked) {
// Block access to the PPAPI broker.
- browser()->profile()->GetHostContentSettingsMap()->SetDefaultContentSetting(
- CONTENT_SETTINGS_TYPE_PPAPI_BROKER, CONTENT_SETTING_BLOCK);
+ HostContentSettingsMapFactory::GetForProfile(browser()->profile())
+ ->SetDefaultContentSetting(CONTENT_SETTINGS_TYPE_PPAPI_BROKER,
+ CONTENT_SETTING_BLOCK);
// We shouldn't see an infobar.
InfoBarObserver observer(this);
@@ -183,8 +185,9 @@ IN_PROC_BROWSER_TEST_F(PPAPIBrokerInfoBarTest, Blocked) {
IN_PROC_BROWSER_TEST_F(PPAPIBrokerInfoBarTest, Allowed) {
// Always allow access to the PPAPI broker.
- browser()->profile()->GetHostContentSettingsMap()->SetDefaultContentSetting(
- CONTENT_SETTINGS_TYPE_PPAPI_BROKER, CONTENT_SETTING_ALLOW);
+ HostContentSettingsMapFactory::GetForProfile(browser()->profile())
+ ->SetDefaultContentSetting(CONTENT_SETTINGS_TYPE_PPAPI_BROKER,
+ CONTENT_SETTING_ALLOW);
// We shouldn't see an infobar.
InfoBarObserver observer(this);
« no previous file with comments | « chrome/test/base/testing_profile.cc ('k') | chrome/test/ppapi/ppapi_interactive_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698