Chromium Code Reviews| Index: chrome/browser/content_settings/tab_specific_content_settings.cc |
| diff --git a/chrome/browser/content_settings/tab_specific_content_settings.cc b/chrome/browser/content_settings/tab_specific_content_settings.cc |
| index e54d95839627cde3a55f39cf2f47d1da1211353b..1ca618283dda212622c9b7f5b7abe5ab110a7c4e 100644 |
| --- a/chrome/browser/content_settings/tab_specific_content_settings.cc |
| +++ b/chrome/browser/content_settings/tab_specific_content_settings.cc |
| @@ -19,6 +19,7 @@ |
| #include "chrome/browser/chrome_notification_types.h" |
| #include "chrome/browser/content_settings/content_settings_details.h" |
| #include "chrome/browser/content_settings/content_settings_utils.h" |
| +#include "chrome/browser/content_settings/cookie_settings.h" |
| #include "chrome/browser/content_settings/host_content_settings_map.h" |
| #include "chrome/browser/prerender/prerender_manager.h" |
| #include "chrome/browser/profiles/profile.h" |
| @@ -343,6 +344,26 @@ void TabSpecificContentSettings::OnContentAllowed(ContentSettingsType type) { |
| } |
| } |
| +void TabSpecificContentSettings::OnRequestFileSystemAccess( |
| + const IPC::Message& message) { |
| + int request_id; |
| + GURL origin_url; |
| + GURL top_origin_url; |
| + if (!ChromeViewHostMsg_RequestFileSystemAccess::Read( |
| + &message, &request_id, &origin_url, &top_origin_url)) |
| + return; |
| + |
| + Profile* profile = |
| + Profile::FromBrowserContext(web_contents()->GetBrowserContext()); |
| + scoped_refptr<CookieSettings> cookie_settings( |
| + CookieSettings::Factory::GetForProfile(profile)); |
| + bool allowed = |
| + cookie_settings->IsSettingCookieAllowed(origin_url, top_origin_url); |
| + OnFileSystemAccessed(origin_url, !allowed); |
| + Send(new ChromeViewMsg_RequestFileSystemAccessResponse( |
| + message.routing_id(), request_id, allowed)); |
| +} |
| + |
| void TabSpecificContentSettings::OnCookiesRead( |
| const GURL& url, |
| const GURL& frame_url, |
| @@ -640,6 +661,8 @@ bool TabSpecificContentSettings::OnMessageReceived( |
| bool handled = true; |
| IPC_BEGIN_MESSAGE_MAP(TabSpecificContentSettings, message) |
| IPC_MESSAGE_HANDLER(ChromeViewHostMsg_ContentBlocked, OnContentBlocked) |
| + IPC_MESSAGE_HANDLER_GENERIC(ChromeViewHostMsg_RequestFileSystemAccess, |
|
jochen (gone - plz use gerrit)
2014/03/10 15:31:30
this should be handled in chrome_render_message_fi
|
| + OnRequestFileSystemAccess(message)) |
| IPC_MESSAGE_UNHANDLED(handled = false) |
| IPC_END_MESSAGE_MAP() |
| return handled; |