diff options
author | paul@chromium.org <paul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-19 19:33:15 +0000 |
---|---|---|
committer | paul@chromium.org <paul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-19 19:33:15 +0000 |
commit | b3c6b7f71bb588570107770b42c00480abe221b6 (patch) | |
tree | b8432323e3ccc6b26e69a046d514b490a1090fda /chrome/browser | |
parent | 3a41a4a57beaf79e1c2a00a0738e918b4f138f7a (diff) | |
download | chromium_src-b3c6b7f71bb588570107770b42c00480abe221b6.zip chromium_src-b3c6b7f71bb588570107770b42c00480abe221b6.tar.gz chromium_src-b3c6b7f71bb588570107770b42c00480abe221b6.tar.bz2 |
Enable DownloadRequestManager for Mac.
DownloadRequestManager is the object that manages the number of downloads
that can occur in a given tab. It throttles non-user initiated downloads
to prevent carpet-bombing download attacks.
Enabling this object for Mac fixes the issue where we can only download
one file in a given tab.
BUG=None (mac work).
TEST=Can now download more than one item in a tab.
Review URL: http://codereview.chromium.org/132039
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18840 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/browser_process.cc | 7 | ||||
-rw-r--r-- | chrome/browser/browser_process.h | 2 | ||||
-rw-r--r-- | chrome/browser/tab_contents/tab_contents.cc | 2 |
3 files changed, 2 insertions, 9 deletions
diff --git a/chrome/browser/browser_process.cc b/chrome/browser/browser_process.cc index a646a9e..4500117 100644 --- a/chrome/browser/browser_process.cc +++ b/chrome/browser/browser_process.cc @@ -4,15 +4,12 @@ #include "chrome/browser/browser_process.h" -BrowserProcess* g_browser_process = NULL; - -#if defined(OS_WIN) || defined(OS_LINUX) - #include "chrome/browser/renderer_host/resource_dispatcher_host.h" +BrowserProcess* g_browser_process = NULL; + DownloadRequestManager* BrowserProcess::download_request_manager() { ResourceDispatcherHost* rdh = resource_dispatcher_host(); return rdh ? rdh->download_request_manager() : NULL; } -#endif diff --git a/chrome/browser/browser_process.h b/chrome/browser/browser_process.h index 656b1ff..a329c6c 100644 --- a/chrome/browser/browser_process.h +++ b/chrome/browser/browser_process.h @@ -133,9 +133,7 @@ class BrowserProcess { virtual MemoryModel memory_model() = 0; -#if defined(OS_WIN) || defined(OS_LINUX) DownloadRequestManager* download_request_manager(); -#endif // Returns an event that is signaled when the browser shutdown. virtual base::WaitableEvent* shutdown_event() = 0; diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc index 557d2a6..fe2ce0d 100644 --- a/chrome/browser/tab_contents/tab_contents.cc +++ b/chrome/browser/tab_contents/tab_contents.cc @@ -2188,11 +2188,9 @@ void TabContents::OnDidGetApplicationInfo( void TabContents::OnUserGesture() { // See comment in RenderViewHostDelegate::OnUserGesture as to why we do this. -#if defined(OS_WIN) || defined(OS_LINUX) DownloadRequestManager* drm = g_browser_process->download_request_manager(); if (drm) drm->OnUserGesture(this); -#endif controller_.OnUserGesture(); } |