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

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

Issue 11640007: Make the UI an observer of downloads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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/chrome_download_manager_delegate.cc
diff --git a/chrome/browser/download/chrome_download_manager_delegate.cc b/chrome/browser/download/chrome_download_manager_delegate.cc
index dec52fc3853fec32e1b7fbfd15e1308c8bfdaf1a..6fd5bdb8c8e222c34e4fb5f6cbe45b824203db92 100644
--- a/chrome/browser/download/chrome_download_manager_delegate.cc
+++ b/chrome/browser/download/chrome_download_manager_delegate.cc
@@ -36,7 +36,6 @@
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
-#include "chrome/browser/ui/browser_tabstrip.h"
#include "chrome/browser/ui/host_desktop.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/extensions/feature_switch.h"
@@ -56,7 +55,6 @@
#if !defined(OS_ANDROID)
#include "chrome/browser/ui/browser.h"
-#include "chrome/browser/ui/browser_finder.h"
#endif
#if defined(OS_CHROMEOS)
@@ -258,21 +256,6 @@ FilePath ChromeDownloadManagerDelegate::GetIntermediatePath(
return dir.Append(file_name);
}
-WebContents* ChromeDownloadManagerDelegate::
- GetAlternativeWebContentsToNotifyForDownload() {
-#if defined(OS_ANDROID)
- // Android does not implement BrowserList or any other way to get an
- // alternate web contents.
- return NULL;
-#else
- // Start the download in the last active browser. This is not ideal but better
- // than fully hiding the download from the user.
- Browser* last_active = chrome::FindLastActiveWithProfile(profile_,
- chrome::GetActiveDesktop());
- return last_active ? chrome::GetActiveWebContents(last_active) : NULL;
-#endif
-}
-
bool ChromeDownloadManagerDelegate::ShouldOpenFileBasedOnExtension(
const FilePath& path) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));

Powered by Google App Engine
This is Rietveld 408576698