From 2fc2651226baac27029e38c9d6ef883fa32084db Mon Sep 17 00:00:00 2001 From: Steve Block Date: Wed, 18 May 2011 13:36:51 +0100 Subject: Merge WebKit at r78450: Initial merge by git. Change-Id: I6d3e5f1f868ec266a0aafdef66182ddc3f265dc1 --- Source/WebKit2/WebProcess/Downloads/Download.cpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'Source/WebKit2/WebProcess/Downloads/Download.cpp') diff --git a/Source/WebKit2/WebProcess/Downloads/Download.cpp b/Source/WebKit2/WebProcess/Downloads/Download.cpp index 3cb5588..1c36df2 100644 --- a/Source/WebKit2/WebProcess/Downloads/Download.cpp +++ b/Source/WebKit2/WebProcess/Downloads/Download.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010 Apple Inc. All rights reserved. + * Copyright (C) 2010, 2011 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -23,6 +23,7 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ +#include "config.h" #include "Download.h" #include "Connection.h" @@ -45,6 +46,9 @@ PassOwnPtr Download::create(uint64_t downloadID, const ResourceRequest Download::Download(uint64_t downloadID, const ResourceRequest& request) : m_downloadID(downloadID) , m_request(request) +#if USE(CFNETWORK) + , m_allowOverwrite(false) +#endif { ASSERT(m_downloadID); } @@ -83,7 +87,7 @@ bool Download::shouldDecodeSourceDataOfMIMEType(const String& mimeType) return result; } -String Download::decideDestinationWithSuggestedFilename(const String& filename, bool& allowOverwrite) +String Download::retrieveDestinationWithSuggestedFilename(const String& filename, bool& allowOverwrite) { String destination; SandboxExtension::Handle sandboxExtensionHandle; @@ -97,6 +101,15 @@ String Download::decideDestinationWithSuggestedFilename(const String& filename, return destination; } +String Download::decideDestinationWithSuggestedFilename(const String& filename, bool& allowOverwrite) +{ + String destination = retrieveDestinationWithSuggestedFilename(filename, allowOverwrite); + + didDecideDestination(destination, allowOverwrite); + + return destination; +} + void Download::didCreateDestination(const String& path) { send(Messages::DownloadProxy::DidCreateDestination(path)); @@ -104,6 +117,8 @@ void Download::didCreateDestination(const String& path) void Download::didFinish() { + platformDidFinish(); + send(Messages::DownloadProxy::DidFinish()); if (m_sandboxExtension) -- cgit v1.1