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

Unified Diff: chrome/browser/chrome_worker_message_filter.cc

Issue 7713034: HostContentSettingsMap refactoring. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 4 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
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..192e5043997295e2c03e95734bce24735d55b9b3 100644
--- a/chrome/browser/chrome_worker_message_filter.cc
+++ b/chrome/browser/chrome_worker_message_filter.cc
@@ -15,7 +15,7 @@ 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_content_settings_ = io_data->GetCookieContentSettings();
}
ChromeWorkerMessageFilter::~ChromeWorkerMessageFilter() {
@@ -42,10 +42,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_content_settings_->Allow(url, url, true);
// Record access to database for potential display in UI: Find the worker
// instance and forward the message to all attached documents.
@@ -72,10 +69,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_content_settings_->Allow(url, url, true);
// Record access to file system for potential display in UI: Find the worker
// instance and forward the message to all attached documents.

Powered by Google App Engine
This is Rietveld 408576698