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

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

Issue 6995013: More progress towards removing content settings code from the content layer. We can't use Cookie... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: review comments and sync Created 9 years, 7 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/download_manager.h ('k') | chrome/browser/download/download_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_manager.cc
===================================================================
--- chrome/browser/download/download_manager.cc (revision 84789)
+++ chrome/browser/download/download_manager.cc (working copy)
@@ -27,7 +27,6 @@
#include "chrome/browser/download/download_util.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/history/download_create_info.h"
-#include "chrome/browser/net/chrome_url_request_context.h"
#include "chrome/browser/platform_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/tab_contents/tab_util.h"
@@ -130,8 +129,6 @@
download_history_.reset();
download_prefs_.reset();
- request_context_getter_ = NULL;
-
shutdown_needed_ = false;
}
@@ -224,7 +221,6 @@
shutdown_needed_ = true;
profile_ = profile;
- request_context_getter_ = profile_->GetRequestContext();
download_history_.reset(new DownloadHistory(profile));
download_history_->Load(
NewCallback(this, &DownloadManager::OnQueryDownloadEntriesComplete));
@@ -904,6 +900,8 @@
const DownloadSaveInfo& save_info,
TabContents* tab_contents) {
DCHECK(tab_contents);
+ // We send a pointer to content::ResourceContext, instead of the usual
+ // reference, so that a copy of the object isn't made.
BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
NewRunnableFunction(&download_util::DownloadUrl,
url,
@@ -913,7 +911,7 @@
g_browser_process->resource_dispatcher_host(),
tab_contents->GetRenderProcessHost()->id(),
tab_contents->render_view_host()->routing_id(),
- request_context_getter_));
+ &tab_contents->profile()->GetResourceContext()));
}
void DownloadManager::AddObserver(Observer* observer) {
« no previous file with comments | « chrome/browser/download/download_manager.h ('k') | chrome/browser/download/download_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698