| Index: chrome/browser/chrome_worker_message_filter.cc
|
| diff --git a/chrome/browser/chrome_worker_message_filter.cc b/chrome/browser/chrome_worker_message_filter.cc
|
| index 1b7fa2a74395f56381ecff391bd873b0f26cacd5..4f103cd997019d38a3f28a9e5d5e85f33bc117f9 100644
|
| --- a/chrome/browser/chrome_worker_message_filter.cc
|
| +++ b/chrome/browser/chrome_worker_message_filter.cc
|
| @@ -4,6 +4,7 @@
|
|
|
| #include "chrome/browser/chrome_worker_message_filter.h"
|
|
|
| +#include "chrome/browser/content_settings/cookie_settings.h"
|
| #include "chrome/browser/content_settings/host_content_settings_map.h"
|
| #include "chrome/browser/content_settings/tab_specific_content_settings.h"
|
| #include "chrome/browser/profiles/profile_io_data.h"
|
| @@ -15,7 +16,8 @@ ChromeWorkerMessageFilter::ChromeWorkerMessageFilter(WorkerProcessHost* process)
|
| : process_(process) {
|
| ProfileIOData* io_data = reinterpret_cast<ProfileIOData*>(
|
| process->resource_context()->GetUserData(NULL));
|
| - host_content_settings_map_ = io_data->GetHostContentSettingsMap();
|
| + cookie_settings_ =
|
| + io_data->GetCookieSettings();
|
| }
|
|
|
| ChromeWorkerMessageFilter::~ChromeWorkerMessageFilter() {
|
| @@ -42,10 +44,7 @@ void ChromeWorkerMessageFilter::OnAllowDatabase(int worker_route_id,
|
| const string16& display_name,
|
| unsigned long estimated_size,
|
| bool* result) {
|
| - ContentSetting content_setting =
|
| - host_content_settings_map_->GetCookieContentSetting(url, url, true);
|
| -
|
| - *result = content_setting != CONTENT_SETTING_BLOCK;
|
| + *result = cookie_settings_->IsSettingCookieAllowed(url, url);
|
|
|
| // Record access to database for potential display in UI: Find the worker
|
| // instance and forward the message to all attached documents.
|
| @@ -72,10 +71,7 @@ void ChromeWorkerMessageFilter::OnAllowDatabase(int worker_route_id,
|
| void ChromeWorkerMessageFilter::OnAllowFileSystem(int worker_route_id,
|
| const GURL& url,
|
| bool* result) {
|
| - ContentSetting content_setting =
|
| - host_content_settings_map_->GetCookieContentSetting(url, url, true);
|
| -
|
| - *result = content_setting != CONTENT_SETTING_BLOCK;
|
| + *result = cookie_settings_->IsSettingCookieAllowed(url, url);
|
|
|
| // Record access to file system for potential display in UI: Find the worker
|
| // instance and forward the message to all attached documents.
|
|
|