Changeset 85974 in webkit
- Timestamp:
- May 6, 2011 1:52:53 PM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r85973 r85974 1 2011-05-06 Brett Wilson <brettw@chromium.org> 2 3 Reviewed by Adam Barth. 4 5 Use a File object to store the downloaded file reference rather than 6 just the path. This keeps the file and permissions in scope (using the 7 already-existing blob system) so the browser won't delete the file 8 when the load is complete. Instead, the file will be cleaned up when 9 the request objects are deleted. 10 https://bugs.webkit.org/show_bug.cgi?id=60281 11 12 * platform/network/chromium/ResourceResponse.cpp: 13 (WebCore::ResourceResponse::doPlatformCopyData): 14 (WebCore::ResourceResponse::doPlatformAdopt): 15 * platform/network/chromium/ResourceResponse.h: 16 (WebCore::ResourceResponse::downloadedFile): 17 (WebCore::ResourceResponse::setDownloadedFile): 18 1 19 2011-05-06 Alexis Menard <alexis.menard@openbossa.org> 2 20 -
trunk/Source/WebCore/platform/network/chromium/ResourceResponse.cpp
r80361 r85974 41 41 data->m_remoteIPAddress = m_remoteIPAddress; 42 42 data->m_remotePort = m_remotePort; 43 data->m_downloadFilePath = m_downloadFilePath; 43 // Bug https://bugs.webkit.org/show_bug.cgi?id=60397 this doesn't support m_downloadedFile. 44 ASSERT(!m_downloadedFile); 44 45 return data; 45 46 } … … 57 58 m_remoteIPAddress = data->m_remoteIPAddress; 58 59 m_remotePort = data->m_remotePort; 59 m_downloadFilePath = data->m_downloadFilePath;60 // Bug https://bugs.webkit.org/show_bug.cgi?id=60397 this doesn't support m_downloadedFile. 60 61 } 61 62 -
trunk/Source/WebCore/platform/network/chromium/ResourceResponse.h
r80361 r85974 28 28 #define ResourceResponse_h 29 29 30 #include "File.h" 30 31 #include "NotImplemented.h" 31 32 #include "ResourceResponseBase.h" … … 100 101 void setRemotePort(unsigned short value) { m_remotePort = value; } 101 102 102 const String& downloadFilePath() const { return m_downloadFilePath; }103 void setDownload FilePath(const String& downloadFilePath) { m_downloadFilePath = downloadFilePath; }103 const File* downloadedFile() const { return m_downloadedFile.get(); } 104 void setDownloadedFile(PassRefPtr<File> downloadedFile) { m_downloadedFile = downloadedFile; } 104 105 105 106 private: … … 153 154 unsigned short m_remotePort; 154 155 155 // The path to the downloadedfile.156 String m_downloadFilePath;156 // The downloaded file if the load streamed to a file. 157 RefPtr<File> m_downloadedFile; 157 158 }; 158 159 -
trunk/Source/WebKit/chromium/ChangeLog
r85966 r85974 1 2011-05-06 Brett Wilson <brettw@chromium.org> 2 3 Reviewed by Adam Barth. 4 5 Use a File object to store the downloaded file reference rather than 6 just the path. This keeps the file and permissions in scope (using the 7 already-existing blob system) so the browser won't delete the file 8 when the load is complete. Instead, the file will be cleaned up when 9 the request objects are deleted. 10 https://bugs.webkit.org/show_bug.cgi?id=60281 11 12 * src/WebURLResponse.cpp: 13 (WebKit::WebURLResponse::downloadFilePath): 14 (WebKit::WebURLResponse::setDownloadFilePath): 15 1 16 2011-05-06 John Abd-El-Malek <jam@chromium.org> 2 17 -
trunk/Source/WebKit/chromium/src/WebURLResponse.cpp
r80361 r85974 366 366 WebString WebURLResponse::downloadFilePath() const 367 367 { 368 return m_private->m_resourceResponse->downloadFilePath(); 368 const File* downloadedFile = m_private->m_resourceResponse->downloadedFile(); 369 if (downloadedFile) 370 return downloadedFile->path(); 371 return WebString(); 369 372 } 370 373 371 374 void WebURLResponse::setDownloadFilePath(const WebString& downloadFilePath) 372 375 { 373 m_private->m_resourceResponse->setDownload FilePath(downloadFilePath.utf8().data());376 m_private->m_resourceResponse->setDownloadedFile(File::create(downloadFilePath)); 374 377 } 375 378
Note: See TracChangeset
for help on using the changeset viewer.