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

Unified Diff: chrome/browser/renderer_host/chrome_render_message_filter.cc

Issue 6915017: Chrome side to allow WebKit layer to use WebPermissionClient to check if access to local storage ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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/browser/renderer_host/chrome_render_message_filter.h ('k') | chrome/common/render_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/chrome_render_message_filter.cc
===================================================================
--- chrome/browser/renderer_host/chrome_render_message_filter.cc (revision 83945)
+++ chrome/browser/renderer_host/chrome_render_message_filter.cc (working copy)
@@ -23,6 +23,7 @@
#include "chrome/common/pref_names.h"
#include "chrome/common/render_messages.h"
#include "content/browser/renderer_host/render_process_host.h"
+#include "content/browser/renderer_host/render_view_host_notification_task.h"
#include "content/browser/renderer_host/resource_dispatcher_host.h"
#if defined(USE_TCMALLOC)
@@ -71,9 +72,9 @@
#if defined(USE_TCMALLOC)
IPC_MESSAGE_HANDLER(ViewHostMsg_RendererTcmalloc, OnRendererTcmalloc)
#endif
- IPC_MESSAGE_HANDLER(ViewHostMsg_GetPluginPolicies,
- OnGetPluginPolicies)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_GetPluginPolicies, OnGetPluginPolicies)
IPC_MESSAGE_HANDLER(ViewHostMsg_AllowDatabase, OnAllowDatabase)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_AllowDOMStorage, OnAllowDOMStorage)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
@@ -304,11 +305,24 @@
unsigned long estimated_size,
bool* result) {
GURL url(origin_url);
- ContentSetting content_setting =
- host_content_settings_map_->GetContentSetting(
- url, CONTENT_SETTINGS_TYPE_COOKIES, "");
- DCHECK((content_setting == CONTENT_SETTING_ALLOW) ||
- (content_setting == CONTENT_SETTING_BLOCK) ||
- (content_setting == CONTENT_SETTING_SESSION_ONLY));
- *result = content_setting != CONTENT_SETTING_BLOCK;
+ ContentSetting setting = host_content_settings_map_->GetContentSetting(
+ url, CONTENT_SETTINGS_TYPE_COOKIES, "");
+ DCHECK((setting == CONTENT_SETTING_ALLOW) ||
+ (setting == CONTENT_SETTING_BLOCK) ||
+ (setting == CONTENT_SETTING_SESSION_ONLY));
+ *result = setting != CONTENT_SETTING_BLOCK;
}
+
+void ChromeRenderMessageFilter::OnAllowDOMStorage(int render_view_id,
+ const GURL& url,
+ DOMStorageType type,
+ bool* result) {
+ ContentSetting setting = host_content_settings_map_->GetContentSetting(
+ url, CONTENT_SETTINGS_TYPE_COOKIES, "");
+ *result = setting != CONTENT_SETTING_BLOCK;
+ // If content was blocked, tell the UI to display the blocked content icon.
+ CallRenderViewHostContentSettingsDelegate(
+ render_process_id_, render_view_id,
+ &RenderViewHostDelegate::ContentSettings::OnLocalStorageAccessed,
+ url, type, *result);
+}
« no previous file with comments | « chrome/browser/renderer_host/chrome_render_message_filter.h ('k') | chrome/common/render_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698