| Index: chrome/renderer/content_settings_observer.cc
|
| diff --git a/chrome/renderer/content_settings_observer.cc b/chrome/renderer/content_settings_observer.cc
|
| index 1e00b6cb13b413fc408f4680a4760943f5e11a2a..2acdd7300a03795e9645dc03b55850b6a6016cf9 100644
|
| --- a/chrome/renderer/content_settings_observer.cc
|
| +++ b/chrome/renderer/content_settings_observer.cc
|
| @@ -258,10 +258,10 @@ void ContentSettingsObserver::DidCommitProvisionalLoad(
|
|
|
| if (!is_same_page_navigation) {
|
| // Clear "block" flags for the new page. This needs to happen before any of
|
| - // |allowScript()|, |allowScriptFromSource()|, |allowImage()|, or
|
| - // |allowPlugins()| is called for the new page so that these functions can
|
| - // correctly detect that a piece of content flipped from "not blocked" to
|
| - // "blocked".
|
| + // |allowScript()|, |allowScriptFromSource()|, |allowImage()|,
|
| + // |allowPlugins()|, or |allowKeygen()| is called for the new page so that
|
| + // these functions can correctly detect that a piece of content flipped from
|
| + // "not blocked" to "blocked".
|
| ClearBlockedContentSettings();
|
| temporarily_allowed_plugins_.clear();
|
| }
|
| @@ -349,6 +349,23 @@ bool ContentSettingsObserver::allowIndexedDB(const WebString& name,
|
| return result;
|
| }
|
|
|
| +bool ContentSettingsObserver::allowKeygen() {
|
| + if (is_interstitial_page_)
|
| + return true;
|
| +
|
| + WebFrame* frame = render_frame()->GetWebFrame();
|
| + std::map<WebFrame*, bool>::const_iterator it =
|
| + cached_keygen_permissions_.find(frame);
|
| + if (it != cached_keygen_permissions_.end())
|
| + return it->second;
|
| +
|
| + bool allow = false;
|
| + Send(new ChromeViewHostMsg_AllowKeygen(
|
| + routing_id(), GURL(frame->securityOrigin().toString()), &allow));
|
| + cached_keygen_permissions_[frame] = allow;
|
| + return allow;
|
| +}
|
| +
|
| bool ContentSettingsObserver::allowPlugins(bool enabled_per_settings) {
|
| return enabled_per_settings;
|
| }
|
| @@ -593,6 +610,10 @@ bool ContentSettingsObserver::allowRunningInsecureContent(
|
| return true;
|
| }
|
|
|
| +void ContentSettingsObserver::didNotAllowKeygen() {
|
| + DidBlockContentType(CONTENT_SETTINGS_TYPE_KEYGEN);
|
| +}
|
| +
|
| void ContentSettingsObserver::didNotAllowPlugins() {
|
| DidBlockContentType(CONTENT_SETTINGS_TYPE_PLUGINS);
|
| }
|
| @@ -654,6 +675,7 @@ void ContentSettingsObserver::ClearBlockedContentSettings() {
|
| content_blocked_.clear();
|
| cached_storage_permissions_.clear();
|
| cached_script_permissions_.clear();
|
| + cached_keygen_permissions_.clear();
|
| }
|
|
|
| bool ContentSettingsObserver::IsPlatformApp() {
|
|
|