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

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

Issue 8697006: DownloadManager intereface refactoring to allow cleaner DownloadItem unit tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Improved isolation of MockDownloadManager. Created 9 years, 1 month 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/download/download_shelf_context_menu.cc
diff --git a/chrome/browser/download/download_shelf_context_menu.cc b/chrome/browser/download/download_shelf_context_menu.cc
index 33be97bde5a2c16ffb56d0943df35447826e05b1..e2c0986c0bae9cfa076c470242cdca81b14c5059 100644
--- a/chrome/browser/download/download_shelf_context_menu.cc
+++ b/chrome/browser/download/download_shelf_context_menu.cc
@@ -63,8 +63,8 @@ void DownloadShelfContextMenu::ExecuteCommand(int command_id) {
download_item_->OpenDownload();
break;
case ALWAYS_OPEN_TYPE: {
- DownloadPrefs* prefs = DownloadPrefs::FromDownloadManager(
- download_item_->GetDownloadManager());
+ DownloadPrefs* prefs = DownloadPrefs::FromBrowserContext(
+ download_item_->BrowserContext());
FilePath path = download_item_->GetUserVerifiedFilePath();
if (!IsCommandIdChecked(ALWAYS_OPEN_TYPE))
prefs->EnableAutoOpenBasedOnExtension(path);

Powered by Google App Engine
This is Rietveld 408576698