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

Unified Diff: content/browser/download/download_manager_impl.cc

Issue 10870060: Removed calls to URLRequest::URLRequest in favor of URLRequestContext::CreateRequest (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged Created 8 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: content/browser/download/download_manager_impl.cc
diff --git a/content/browser/download/download_manager_impl.cc b/content/browser/download/download_manager_impl.cc
index 8f2b1755bf318c26319cdaea66aa6487d1681ed1..5b0319afd2ef8447ca6af4fb5ab80aaac2393c21 100644
--- a/content/browser/download/download_manager_impl.cc
+++ b/content/browser/download/download_manager_impl.cc
@@ -41,6 +41,7 @@
#include "content/public/browser/web_contents_delegate.h"
#include "net/base/load_flags.h"
#include "net/base/upload_data.h"
+#include "net/url_request/url_request_context.h"
#include "webkit/glue/webkit_glue.h"
using content::BrowserThread;
@@ -79,10 +80,9 @@ void BeginDownload(content::DownloadUrlParameters* params) {
// ResourceDispatcherHost{Base} is-not-a URLRequest::Delegate, and
// DownloadUrlParameters can-not include resource_dispatcher_host_impl.h, so
// we must down cast. RDHI is the only subclass of RDH as of 2012 May 4.
- scoped_ptr<net::URLRequest> request(new net::URLRequest(
- params->url(),
- NULL,
- params->resource_context()->GetRequestContext()));
+ scoped_ptr<net::URLRequest> request(
+ params->resource_context()->GetRequestContext()->CreateRequest(
+ params->url(), NULL));
request->set_referrer(params->referrer().url.spec());
webkit_glue::ConfigureURLRequestForReferrerPolicy(
request.get(), params->referrer().policy);
« no previous file with comments | « content/browser/debugger/devtools_http_handler_impl.cc ('k') | content/browser/renderer_host/render_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698