Chromium Code Reviews| Index: content/browser/renderer_host/resource_dispatcher_host.cc |
| =================================================================== |
| --- content/browser/renderer_host/resource_dispatcher_host.cc (revision 91583) |
| +++ content/browser/renderer_host/resource_dispatcher_host.cc (working copy) |
| @@ -23,6 +23,7 @@ |
| #include "chrome/browser/download/download_request_limiter.h" |
| #include "chrome/browser/download/download_util.h" |
| #include "chrome/browser/download/save_file_manager.h" |
| +#include "chrome/browser/profiles/profile_io_data.h" |
| #include "chrome/browser/renderer_host/download_resource_handler.h" |
|
jam
2011/07/07 14:31:03
You should be getting a deps failure for this. Pl
Miranda Callahan
2011/07/07 17:35:50
Ah, of course -- fixed, I hope.
|
| #include "chrome/browser/renderer_host/save_file_resource_handler.h" |
| #include "content/browser/appcache/chrome_appcache_service.h" |
| @@ -493,8 +494,12 @@ |
| if (delegate_) { |
| bool sub = request_data.resource_type != ResourceType::MAIN_FRAME; |
| + |
| + ProfileIOData* io_data = reinterpret_cast<ProfileIOData*>( |
| + resource_context.GetUserData(NULL)); |
| handler = delegate_->RequestBeginning( |
| - handler, request, sub, child_id, route_id); |
| + handler, request, io_data->safe_browsing_enabled()->GetValue(), |
| + sub, child_id, route_id); |
| } |
| // Make extra info and read footer (contains request ID). |
| @@ -710,8 +715,14 @@ |
| prompt_for_save_location, |
| save_info)); |
| - if (delegate_) |
| - handler = delegate_->DownloadStarting(handler, child_id, route_id); |
| + if (delegate_) { |
| + ProfileIOData* io_data = reinterpret_cast<ProfileIOData*>( |
| + context.GetUserData(NULL)); |
| + handler = delegate_->DownloadStarting( |
| + handler, |
| + io_data->safe_browsing_enabled()->GetValue(), |
| + child_id, route_id); |
| + } |
| const net::URLRequestContext* request_context = context.request_context(); |