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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 444113003: Remove dependency of chrome in GuestViewBase. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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/chrome_content_browser_client.cc
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
index a47903cc9db31f220b3bc6e719530e0ef963a1cf..e41afd9f051024f0ceb0274da7154dec7a68e3b6 100644
--- a/chrome/browser/chrome_content_browser_client.cc
+++ b/chrome/browser/chrome_content_browser_client.cc
@@ -82,6 +82,7 @@
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
+#include "chrome/common/content_settings.h"
#include "chrome/common/env_vars.h"
#include "chrome/common/logging_chrome.h"
#include "chrome/common/pepper_permission_util.h"
@@ -816,8 +817,7 @@ void ChromeContentBrowserClient::RenderProcessWillLaunch(
RendererContentSettingRules rules;
if (host->IsIsolatedGuest()) {
#if defined(ENABLE_EXTENSIONS)
- GuestViewBase::GetDefaultContentSettingRules(&rules,
- profile->IsOffTheRecord());
+ GetGuestViewDefaultContentSettingRules(profile->IsOffTheRecord(), &rules);
#else
NOTREACHED();
#endif
@@ -1571,6 +1571,24 @@ void ChromeContentBrowserClient::RequestFileSystemPermissionOnUIThread(
allowed_by_default,
callback);
}
+
+void ChromeContentBrowserClient::GetGuestViewDefaultContentSettingRules(
+ bool incognito,
+ RendererContentSettingRules* rules) {
+ rules->image_rules.push_back(
+ ContentSettingPatternSource(ContentSettingsPattern::Wildcard(),
+ ContentSettingsPattern::Wildcard(),
+ CONTENT_SETTING_ALLOW,
+ std::string(),
+ incognito));
+
+ rules->script_rules.push_back(
+ ContentSettingPatternSource(ContentSettingsPattern::Wildcard(),
+ ContentSettingsPattern::Wildcard(),
+ CONTENT_SETTING_ALLOW,
+ std::string(),
+ incognito));
+}
#endif
void ChromeContentBrowserClient::FileSystemAccessed(

Powered by Google App Engine
This is Rietveld 408576698