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

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

Issue 7068013: Pass frame and toplevel frame security origin for all site data related content settings IPCs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 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
diff --git a/chrome/browser/renderer_host/chrome_render_message_filter.cc b/chrome/browser/renderer_host/chrome_render_message_filter.cc
index 63f19b568ee9bdea720dd211c9516a6e2fd9082c..45226c4aa568bdf37479dada3a57f4aeb3d6c464 100644
--- a/chrome/browser/renderer_host/chrome_render_message_filter.cc
+++ b/chrome/browser/renderer_host/chrome_render_message_filter.cc
@@ -329,6 +329,7 @@ void ChromeRenderMessageFilter::OnGetPluginPolicies(
void ChromeRenderMessageFilter::OnAllowDatabase(int render_view_id,
const GURL& origin_url,
+ const GURL& top_origin_url,
const string16& name,
const string16& display_name,
bool* allowed) {
@@ -348,28 +349,29 @@ void ChromeRenderMessageFilter::OnAllowDatabase(int render_view_id,
}
void ChromeRenderMessageFilter::OnAllowDOMStorage(int render_view_id,
- const GURL& url,
+ const GURL& origin_url,
+ const GURL& top_origin_url,
DOMStorageType type,
bool* allowed) {
ContentSetting setting = host_content_settings_map_->GetContentSetting(
- url, CONTENT_SETTINGS_TYPE_COOKIES, "");
+ origin_url, CONTENT_SETTINGS_TYPE_COOKIES, "");
*allowed = setting != CONTENT_SETTING_BLOCK;
// If content was blocked, tell the UI to display the blocked content icon.
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
NewRunnableFunction(
&TabSpecificContentSettings::DOMStorageAccessed,
- render_process_id_, render_view_id, url, type, !*allowed));
+ render_process_id_, render_view_id, origin_url, type, !*allowed));
}
void ChromeRenderMessageFilter::OnAllowFileSystem(int render_view_id,
- const GURL& url,
+ const GURL& origin_url,
+ const GURL& top_origin_url,
bool* allowed) {
-
// TODO(kinuko): Need to notify the UI thread to indicate that
// there's a blocked content. See the above for inspiration.
ContentSetting setting = host_content_settings_map_->GetContentSetting(
- url, CONTENT_SETTINGS_TYPE_COOKIES, "");
+ origin_url, CONTENT_SETTINGS_TYPE_COOKIES, "");
DCHECK((setting == CONTENT_SETTING_ALLOW) ||
(setting == CONTENT_SETTING_BLOCK) ||
(setting == CONTENT_SETTING_SESSION_ONLY));
@@ -377,25 +379,19 @@ void ChromeRenderMessageFilter::OnAllowFileSystem(int render_view_id,
}
void ChromeRenderMessageFilter::OnAllowIndexedDB(int render_view_id,
- const string16& origin_url,
+ const GURL& origin_url,
+ const GURL& top_origin_url,
const string16& name,
bool* allowed) {
- // TODO(jochen): This doesn't support file:/// urls properly. We probably need
- // to add some toString method to WebSecurityOrigin that doesn't
- // return null for them.
- WebSecurityOrigin origin(
- WebSecurityOrigin::createFromDatabaseIdentifier(origin_url));
- GURL url(origin.toString());
-
ContentSetting setting = host_content_settings_map_->GetContentSetting(
- url, CONTENT_SETTINGS_TYPE_COOKIES, "");
+ origin_url, CONTENT_SETTINGS_TYPE_COOKIES, "");
*allowed = setting != CONTENT_SETTING_BLOCK;
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
NewRunnableFunction(
&TabSpecificContentSettings::IndexedDBAccessed,
- render_process_id_, render_view_id, url, name, !*allowed));
+ render_process_id_, render_view_id, origin_url, name, !*allowed));
}
void ChromeRenderMessageFilter::OnGetPluginContentSetting(
« 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