| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/chrome_worker_message_filter.h" | 5 #include "chrome/browser/chrome_worker_message_filter.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "chrome/browser/content_settings/cookie_settings.h" | 8 #include "chrome/browser/content_settings/cookie_settings.h" |
| 9 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 9 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
| 10 #include "chrome/browser/profiles/profile_io_data.h" | 10 #include "chrome/browser/profiles/profile_io_data.h" |
| 11 #include "content/browser/resource_context.h" | 11 #include "content/browser/resource_context.h" |
| 12 #include "content/browser/worker_host/worker_process_host.h" | 12 #include "content/browser/worker_host/worker_process_host.h" |
| 13 #include "content/common/worker_messages.h" | 13 #include "content/common/worker_messages.h" |
| 14 | 14 |
| 15 using content::BrowserThread; |
| 16 |
| 15 ChromeWorkerMessageFilter::ChromeWorkerMessageFilter(WorkerProcessHost* process) | 17 ChromeWorkerMessageFilter::ChromeWorkerMessageFilter(WorkerProcessHost* process) |
| 16 : process_(process) { | 18 : process_(process) { |
| 17 ProfileIOData* io_data = reinterpret_cast<ProfileIOData*>( | 19 ProfileIOData* io_data = reinterpret_cast<ProfileIOData*>( |
| 18 process->resource_context()->GetUserData(NULL)); | 20 process->resource_context()->GetUserData(NULL)); |
| 19 cookie_settings_ = io_data->GetCookieSettings(); | 21 cookie_settings_ = io_data->GetCookieSettings(); |
| 20 } | 22 } |
| 21 | 23 |
| 22 ChromeWorkerMessageFilter::~ChromeWorkerMessageFilter() { | 24 ChromeWorkerMessageFilter::~ChromeWorkerMessageFilter() { |
| 23 } | 25 } |
| 24 | 26 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 documents.begin(); doc != documents.end(); ++doc) { | 87 documents.begin(); doc != documents.end(); ++doc) { |
| 86 BrowserThread::PostTask( | 88 BrowserThread::PostTask( |
| 87 BrowserThread::UI, FROM_HERE, | 89 BrowserThread::UI, FROM_HERE, |
| 88 base::Bind( | 90 base::Bind( |
| 89 &TabSpecificContentSettings::FileSystemAccessed, | 91 &TabSpecificContentSettings::FileSystemAccessed, |
| 90 doc->render_process_id(), doc->render_view_id(), url, !*result)); | 92 doc->render_process_id(), doc->render_view_id(), url, !*result)); |
| 91 } | 93 } |
| 92 break; | 94 break; |
| 93 } | 95 } |
| 94 } | 96 } |
| OLD | NEW |