From 371c9c2ff8436eee21ccd0ccd8eb29c9aad41629 Mon Sep 17 00:00:00 2001 From: "benjhayden@chromium.org" Date: Thu, 7 Feb 2013 18:38:31 +0000 Subject: Reset DownloadRequestLimiter on reload. BUG=171372 Review URL: https://chromiumcodereview.appspot.com/12086027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181336 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/download/download_request_limiter.h | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'chrome/browser/download/download_request_limiter.h') diff --git a/chrome/browser/download/download_request_limiter.h b/chrome/browser/download/download_request_limiter.h index 8f341e7..16ebfaf 100644 --- a/chrome/browser/download/download_request_limiter.h +++ b/chrome/browser/download/download_request_limiter.h @@ -108,6 +108,9 @@ class DownloadRequestLimiter // may result in invoking Remove on DownloadRequestLimiter. virtual void DidGetUserGesture() OVERRIDE; + virtual void AboutToNavigateRenderView( + content::RenderViewHost* render_view_host) OVERRIDE; + // Asks the user if they really want to allow the download. // See description above CanDownloadOnIOThread for details on lifetime of // callback. @@ -188,16 +191,6 @@ class DownloadRequestLimiter ~DownloadRequestLimiter(); - // For unit tests. If non-null this is used instead of creating a dialog. - class TestingDelegate { - public: - virtual bool ShouldAllowDownload() = 0; - - protected: - virtual ~TestingDelegate() {} - }; - static void SetTestingDelegate(TestingDelegate* delegate); - // Gets the download state for the specified controller. If the // TabDownloadState does not exist and |create| is true, one is created. // See TabDownloadState's constructor description for details on the two @@ -241,8 +234,6 @@ class DownloadRequestLimiter typedef std::map StateMap; StateMap state_map_; - static TestingDelegate* delegate_; - DISALLOW_COPY_AND_ASSIGN(DownloadRequestLimiter); }; -- cgit v1.1