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

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: Fix Android clang build Created 7 years, 10 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/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 f22aa6f303413f17f1dccb3e5b6fcab9c93335fb..a0f863aba4815205177678461f4caf5d79a00bc9 100644
--- a/chrome/browser/download/chrome_download_manager_delegate.cc
+++ b/chrome/browser/download/chrome_download_manager_delegate.cc
@@ -39,7 +39,6 @@
#include "chrome/browser/prefs/pref_registry_syncable.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
-#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/host_desktop.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/chrome_notification_types.h"
@@ -55,11 +54,6 @@
#include "net/base/net_util.h"
#include "ui/base/l10n/l10n_util.h"
-#if !defined(OS_ANDROID)
-#include "chrome/browser/ui/browser.h"
-#include "chrome/browser/ui/browser_finder.h"
-#endif
-
#if defined(OS_CHROMEOS)
#include "chrome/browser/chromeos/drive/drive_download_handler.h"
#include "chrome/browser/chromeos/drive/drive_file_system_util.h"
@@ -262,22 +256,6 @@ void ChromeDownloadManagerDelegate::ChooseDownloadPath(
file_selected_callback);
}
-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 ? last_active->tab_strip_model()->GetActiveWebContents()
- : NULL;
-#endif
-}
-
bool ChromeDownloadManagerDelegate::ShouldOpenFileBasedOnExtension(
const base::FilePath& path) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
« no previous file with comments | « chrome/browser/download/chrome_download_manager_delegate.h ('k') | chrome/browser/download/download_item_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698