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

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

Issue 6973035: Move download stuff to download tab helper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Oops, forgot to add tab watcher as delegate with CF. Created 9 years, 7 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/download_request_limiter.cc
diff --git a/chrome/browser/download/download_request_limiter.cc b/chrome/browser/download/download_request_limiter.cc
index 579c172c490d53ab5ac4f69b881b4964f6d28af1..b39e1f630ca7ee6f4ebd9279ee090de9e2b837f6 100644
--- a/chrome/browser/download/download_request_limiter.cc
+++ b/chrome/browser/download/download_request_limiter.cc
@@ -12,6 +12,8 @@
#include "content/browser/tab_contents/navigation_entry.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_delegate.h"
+#include "chrome/browser/ui/download/download_tab_helper.h"
+#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "content/common/notification_source.h"
// TabDownloadState ------------------------------------------------------------
@@ -256,7 +258,9 @@ void DownloadRequestLimiter::CanDownloadImpl(
// FYI: Chrome Frame overrides CanDownload in ExternalTabContainer in order
// to cancel the download operation in chrome and let the host browser
// take care of it.
- if (!originating_tab->CanDownload(request_id)) {
+ TabContentsWrapper* wrapper =
+ TabContentsWrapper::GetCurrentWrapperForContents(originating_tab);
+ if (!wrapper->download_tab_helper()->CanDownload(request_id)) {
ScheduleNotification(callback, false);
return;
}
« no previous file with comments | « chrome/browser/download/download_manager.cc ('k') | chrome/browser/download/download_request_limiter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698