summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorpaul@chromium.org <paul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-19 19:33:15 +0000
committerpaul@chromium.org <paul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-19 19:33:15 +0000
commitb3c6b7f71bb588570107770b42c00480abe221b6 (patch)
treeb8432323e3ccc6b26e69a046d514b490a1090fda /chrome
parent3a41a4a57beaf79e1c2a00a0738e918b4f138f7a (diff)
downloadchromium_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')
-rw-r--r--chrome/browser/browser_process.cc7
-rw-r--r--chrome/browser/browser_process.h2
-rw-r--r--chrome/browser/tab_contents/tab_contents.cc2
-rw-r--r--chrome/common/temp_scaffolding_stubs.cc2
4 files changed, 3 insertions, 10 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();
}
diff --git a/chrome/common/temp_scaffolding_stubs.cc b/chrome/common/temp_scaffolding_stubs.cc
index 5aa41e5..a435d03 100644
--- a/chrome/common/temp_scaffolding_stubs.cc
+++ b/chrome/common/temp_scaffolding_stubs.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "temp_scaffolding_stubs.h"
+#include "chrome/common/temp_scaffolding_stubs.h"
#include "build/build_config.h"