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

Unified Diff: chrome/browser/download/save_file_manager.cc

Issue 258008: Move initialization of ChromeURLRequestContexts to the IO thread. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync again, just in case Created 11 years, 2 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
« no previous file with comments | « chrome/browser/download/save_file_manager.h ('k') | chrome/browser/download/save_package.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/save_file_manager.cc
===================================================================
--- chrome/browser/download/save_file_manager.cc (revision 29872)
+++ chrome/browser/download/save_file_manager.cc (working copy)
@@ -15,6 +15,7 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/download/save_file.h"
#include "chrome/browser/download/save_package.h"
+#include "chrome/browser/net/url_request_context_getter.h"
#include "chrome/browser/renderer_host/resource_dispatcher_host.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/tab_contents/tab_util.h"
@@ -153,7 +154,7 @@
int render_view_id,
SaveFileCreateInfo::SaveFileSource save_source,
const FilePath& file_full_path,
- URLRequestContext* request_context,
+ URLRequestContextGetter* request_context_getter,
SavePackage* save_package) {
DCHECK_EQ(MessageLoop::current(), ui_loop_);
if (!io_loop_) {
@@ -173,7 +174,7 @@
referrer,
render_process_host_id,
render_view_id,
- request_context));
+ request_context_getter));
} else {
// We manually start the save job.
SaveFileCreateInfo* info = new SaveFileCreateInfo(file_full_path,
@@ -393,17 +394,19 @@
// Notifications sent from the UI thread and run on the IO thread.
-void SaveFileManager::OnSaveURL(const GURL& url,
- const GURL& referrer,
- int render_process_host_id,
- int render_view_id,
- URLRequestContext* request_context) {
+void SaveFileManager::OnSaveURL(
+ const GURL& url,
+ const GURL& referrer,
+ int render_process_host_id,
+ int render_view_id,
+ URLRequestContextGetter* request_context_getter) {
DCHECK_EQ(MessageLoop::current(), io_loop_);
+ URLRequestContext* context = request_context_getter->GetURLRequestContext();
resource_dispatcher_host_->BeginSaveFile(url,
referrer,
render_process_host_id,
render_view_id,
- request_context);
+ context);
}
void SaveFileManager::OnRequireSaveJobFromOtherSource(
« no previous file with comments | « chrome/browser/download/save_file_manager.h ('k') | chrome/browser/download/save_package.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698