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

Unified Diff: chrome/browser/tab_contents/render_view_context_menu.cc

Issue 10535026: Move creation and ownership of DownloadManager from the embedder to content. This matches all the o… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix cros compile 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/tab_contents/render_view_context_menu.cc
===================================================================
--- chrome/browser/tab_contents/render_view_context_menu.cc (revision 140592)
+++ chrome/browser/tab_contents/render_view_context_menu.cc (working copy)
@@ -93,6 +93,7 @@
using WebKit::WebPluginAction;
using WebKit::WebString;
using WebKit::WebURL;
+using content::BrowserContext;
using content::ChildProcessSecurityPolicy;
using content::DownloadManager;
using content::DownloadUrlParameters;
@@ -1520,8 +1521,7 @@
const GURL& url = params_.link_url;
content::DownloadSaveInfo save_info;
save_info.prompt_for_save_location = true;
- DownloadManager* dlm =
- DownloadServiceFactory::GetForProfile(profile_)->GetDownloadManager();
+ DownloadManager* dlm = BrowserContext::GetDownloadManager(profile_);
scoped_ptr<DownloadUrlParameters> dl_params(
DownloadUrlParameters::FromWebContents(
source_web_contents_, url, save_info));
@@ -1548,8 +1548,7 @@
if (entry)
post_id = entry->GetPostID();
}
- DownloadManager* dlm =
- DownloadServiceFactory::GetForProfile(profile_)->GetDownloadManager();
+ DownloadManager* dlm = BrowserContext::GetDownloadManager(profile_);
scoped_ptr<DownloadUrlParameters> dl_params(
DownloadUrlParameters::FromWebContents(
source_web_contents_, url, save_info));

Powered by Google App Engine
This is Rietveld 408576698