diff options
author | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-25 15:27:46 +0000 |
---|---|---|
committer | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-25 15:27:46 +0000 |
commit | f8462f50f0e36a949867d04c367fd3c5fe597f74 (patch) | |
tree | 43b953363fe8500696c0b8e6b8e9dbec4af3f6d4 /content | |
parent | 0a009084d930205e5d01bb96a55dea905efe5dc3 (diff) | |
download | chromium_src-f8462f50f0e36a949867d04c367fd3c5fe597f74.zip chromium_src-f8462f50f0e36a949867d04c367fd3c5fe597f74.tar.gz chromium_src-f8462f50f0e36a949867d04c367fd3c5fe597f74.tar.bz2 |
[content shell] ShouldOpenDownload() returns true if the callback will not be invoked
ZOMG... what APIs :(
BUG=none
TEST=DragDownloadFileTest.DragDownloadFileTest_Complete doesn't time out
TBR=marja@chromium.org
Review URL: https://codereview.chromium.org/12586009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@190402 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/shell/shell_download_manager_delegate.cc | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/content/shell/shell_download_manager_delegate.cc b/content/shell/shell_download_manager_delegate.cc index 01a3dd1..5696571 100644 --- a/content/shell/shell_download_manager_delegate.cc +++ b/content/shell/shell_download_manager_delegate.cc @@ -17,7 +17,6 @@ #include "base/command_line.h" #include "base/file_util.h" #include "base/logging.h" -#include "base/message_loop.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" #include "content/public/browser/browser_context.h" @@ -91,11 +90,10 @@ bool ShellDownloadManagerDelegate::DetermineDownloadTarget( bool ShellDownloadManagerDelegate::ShouldOpenDownload( DownloadItem* item, const DownloadOpenDelayedCallback& callback) { - if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) - return false; - WebKitTestController::Get()->OpenURL( - net::FilePathToFileURL(item->GetFullPath())); - MessageLoop::current()->PostTask(FROM_HERE, base::Bind(callback, true)); + if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) { + WebKitTestController::Get()->OpenURL( + net::FilePathToFileURL(item->GetFullPath())); + } return true; } |