diff options
author | ckocagil@chromium.org <ckocagil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-18 12:41:45 +0000 |
---|---|---|
committer | ckocagil@chromium.org <ckocagil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-18 12:41:45 +0000 |
commit | 0a561a418c3ef90d703fd5bc7c4b6e766d3bc976 (patch) | |
tree | bddb3c354abc766096afdc2bc76d770dabfafc6f /chrome/renderer/content_settings_observer.cc | |
parent | 0f5597c47a37fff6b690f17ab7e6668d414ebfa2 (diff) | |
download | chromium_src-0a561a418c3ef90d703fd5bc7c4b6e766d3bc976.zip chromium_src-0a561a418c3ef90d703fd5bc7c4b6e766d3bc976.tar.gz chromium_src-0a561a418c3ef90d703fd5bc7c4b6e766d3bc976.tar.bz2 |
Whitelist Instant processes for content settings.
This patch only grants JS and Image permissions to Instant processes.
BUG=225758
TEST=InstantTest.ContentSettingsWhitelist
Review URL: https://chromiumcodereview.appspot.com/13516002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194900 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/content_settings_observer.cc')
-rw-r--r-- | chrome/renderer/content_settings_observer.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/chrome/renderer/content_settings_observer.cc b/chrome/renderer/content_settings_observer.cc index 9c38acc..c648736 100644 --- a/chrome/renderer/content_settings_observer.cc +++ b/chrome/renderer/content_settings_observer.cc @@ -4,6 +4,8 @@ #include "chrome/renderer/content_settings_observer.h" +#include "base/command_line.h" +#include "chrome/common/chrome_switches.h" #include "chrome/common/render_messages.h" #include "chrome/common/url_constants.h" #include "content/public/renderer/document_state.h" @@ -318,6 +320,10 @@ void ContentSettingsObserver::ClearBlockedContentSettings() { } bool ContentSettingsObserver::IsWhitelistedForContentSettings(WebFrame* frame) { + // Whitelist Instant processes. + if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kInstantProcess)) + return true; + // Whitelist ftp directory listings, as they require JavaScript to function // properly. webkit_glue::WebURLResponseExtraDataImpl* extra_data = |