diff options
-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; } |