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

Unified Diff: chrome/browser/ui/exclusive_access/fullscreen_controller.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/exclusive_access/fullscreen_controller.cc
diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
index 5ab36a952b1f32242e14c131e6a61ccbfae7ed16..3c7018ccf49f8d54c38ee112054071ec6037fc46 100644
--- a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
+++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
@@ -11,6 +11,7 @@
#include "base/thread_task_runner_handle.h"
#include "chrome/browser/app_mode/app_mode_utils.h"
#include "chrome/browser/chrome_notification_types.h"
+#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/exclusive_access/exclusive_access_context.h"
#include "chrome/browser/ui/exclusive_access/exclusive_access_manager.h"
@@ -352,10 +353,9 @@ bool FullscreenController::OnAcceptExclusiveAccessPermission() {
// TODO(estark): Revisit this when crbug.com/455882 is fixed.
if (!requester.SchemeIsFile() && !embedder.SchemeIsFile() &&
primary_pattern.IsValid() && secondary_pattern.IsValid()) {
- HostContentSettingsMap* settings_map = exclusive_access_manager()
- ->context()
- ->GetProfile()
- ->GetHostContentSettingsMap();
+ HostContentSettingsMap* settings_map =
+ HostContentSettingsMapFactory::GetForProfile(
+ exclusive_access_manager()->context()->GetProfile());
settings_map->SetContentSetting(
primary_pattern, secondary_pattern, CONTENT_SETTINGS_TYPE_FULLSCREEN,
std::string(), CONTENT_SETTING_ALLOW);
@@ -528,23 +528,19 @@ ContentSetting FullscreenController::GetFullscreenSetting() const {
// If the permission was granted to the website with no embedder, it should
// always be allowed, even if embedded.
- if (exclusive_access_manager()
- ->context()
- ->GetProfile()
- ->GetHostContentSettingsMap()
- ->GetContentSetting(url, url, CONTENT_SETTINGS_TYPE_FULLSCREEN,
- std::string()) == CONTENT_SETTING_ALLOW) {
+ if (HostContentSettingsMapFactory::GetForProfile(
+ exclusive_access_manager()->context()->GetProfile())
+ ->GetContentSetting(url, url, CONTENT_SETTINGS_TYPE_FULLSCREEN,
+ std::string()) == CONTENT_SETTING_ALLOW) {
return CONTENT_SETTING_ALLOW;
}
// See the comment above the call to |SetContentSetting()| for how the
// requesting and embedding origins interact with each other wrt permissions.
- return exclusive_access_manager()
- ->context()
- ->GetProfile()
- ->GetHostContentSettingsMap()
- ->GetContentSetting(url, GetEmbeddingOrigin(),
- CONTENT_SETTINGS_TYPE_FULLSCREEN, std::string());
+ return HostContentSettingsMapFactory::GetForProfile(
+ exclusive_access_manager()->context()->GetProfile())
+ ->GetContentSetting(url, GetEmbeddingOrigin(),
+ CONTENT_SETTINGS_TYPE_FULLSCREEN, std::string());
}
bool FullscreenController::IsPrivilegedFullscreenForTab() const {

Powered by Google App Engine
This is Rietveld 408576698