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

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

Issue 8060042: Add downloads.onCreated apitest and fix a few bugs (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: " Created 9 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
Index: content/browser/download/download_request_handle.cc
diff --git a/content/browser/download/download_request_handle.cc b/content/browser/download/download_request_handle.cc
index e5d9b60d1cac3937d3252300518fe33f7ec4bf80..3f5d93aae7aecce2c7674d38e94c671d62e322f1 100644
--- a/content/browser/download/download_request_handle.cc
+++ b/content/browser/download/download_request_handle.cc
@@ -61,15 +61,8 @@ TabContents* DownloadRequestHandle::GetTabContents() const {
}
DownloadManager* DownloadRequestHandle::GetDownloadManager() const {
- TabContents* contents = GetTabContents();
- if (!contents)
- return NULL;
-
- content::BrowserContext* browser_context = contents->browser_context();
- if (!browser_context)
- return NULL;
-
- return browser_context->GetDownloadManager();
+ return RenderViewHost::FromID(child_id_, render_view_id_)->process()
+ ->browser_context()->GetDownloadManager();
Randy Smith (Not in Mondays) 2011/10/17 17:39:56 Random thought that you're welcome to bounce as no
benjhayden 2011/10/17 17:54:29 I thought that we decided that that would be break
}
void DownloadRequestHandle::PauseRequest() const {

Powered by Google App Engine
This is Rietveld 408576698