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

Unified Diff: chrome/browser/extensions/api/downloads/downloads_api.cc

Issue 10559036: Added URLRequestContext to constructor for URLRequest. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Merged with latest version Created 8 years, 6 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/extensions/api/downloads/downloads_api.cc
diff --git a/chrome/browser/extensions/api/downloads/downloads_api.cc b/chrome/browser/extensions/api/downloads/downloads_api.cc
index e114121cccfb0f5166994fa4bb5c173f4e8f92af..ea28deb0d027ea02f13bf8ead0db165a13c52ad8 100644
--- a/chrome/browser/extensions/api/downloads/downloads_api.cc
+++ b/chrome/browser/extensions/api/downloads/downloads_api.cc
@@ -42,6 +42,7 @@
#include "content/public/browser/download_save_info.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
+#include "content/public/browser/resource_context.h"
#include "content/public/browser/resource_dispatcher_host.h"
#include "net/base/load_flags.h"
#include "net/http/http_util.h"
@@ -494,7 +495,10 @@ void DownloadsDownloadFunction::BeginDownloadOnIOThread() {
save_info.suggested_name = iodata_->filename;
save_info.prompt_for_save_location = iodata_->save_as;
- scoped_ptr<net::URLRequest> request(new net::URLRequest(iodata_->url, NULL));
+ scoped_ptr<net::URLRequest> request(new net::URLRequest(
+ iodata_->url,
+ NULL,
+ iodata_->resource_context->GetRequestContext()));
request->set_method(iodata_->method);
if (iodata_->extra_headers != NULL) {
for (size_t index = 0; index < iodata_->extra_headers->GetSize(); ++index) {

Powered by Google App Engine
This is Rietveld 408576698