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 e30ab2b00afeaa41bb1cb8a719e05ce3442656c0..43a435f812eae71b12e749d94f4622d0572cb5b7 100644 |
--- a/chrome/browser/download/download_shelf_context_menu.cc |
+++ b/chrome/browser/download/download_shelf_context_menu.cc |
@@ -81,8 +81,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); |