summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download/download_request_limiter.h
diff options
context:
space:
mode:
authorbenjhayden@chromium.org <benjhayden@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-07 18:38:31 +0000
committerbenjhayden@chromium.org <benjhayden@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-07 18:38:31 +0000
commit371c9c2ff8436eee21ccd0ccd8eb29c9aad41629 (patch)
tree6ecbfd88d84dcf5042989fb749cc124fd4ccc148 /chrome/browser/download/download_request_limiter.h
parentacf2b98f67d22c8833a2817a5c4ba10b4cea48fd (diff)
downloadchromium_src-371c9c2ff8436eee21ccd0ccd8eb29c9aad41629.zip
chromium_src-371c9c2ff8436eee21ccd0ccd8eb29c9aad41629.tar.gz
chromium_src-371c9c2ff8436eee21ccd0ccd8eb29c9aad41629.tar.bz2
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
Diffstat (limited to 'chrome/browser/download/download_request_limiter.h')
-rw-r--r--chrome/browser/download/download_request_limiter.h15
1 files changed, 3 insertions, 12 deletions
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<content::WebContents*, TabDownloadState*> StateMap;
StateMap state_map_;
- static TestingDelegate* delegate_;
-
DISALLOW_COPY_AND_ASSIGN(DownloadRequestLimiter);
};