Changeset 86164 in webkit
- Timestamp:
- May 10, 2011, 10:26:25 AM (14 years ago)
- Location:
- trunk/Source
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r86163 r86164 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-10 Eric Carlson <eric.carlson@apple.com> 2 20 -
trunk/Source/WebCore/platform/network/chromium/ResourceResponse.cpp
r86017 r86164 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 44 return data; 45 45 } … … 57 57 m_remoteIPAddress = data->m_remoteIPAddress; 58 58 m_remotePort = data->m_remotePort; 59 m_downloadFilePath = data->m_downloadFilePath;59 // Bug https://bugs.webkit.org/show_bug.cgi?id=60397 this doesn't support m_downloadedFile. 60 60 } 61 61 -
trunk/Source/WebCore/platform/network/chromium/ResourceResponse.h
r86017 r86164 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
r86159 r86164 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-10 Mikhail Naganov <mnaganov@chromium.org> 2 17 -
trunk/Source/WebKit/chromium/src/WebURLResponse.cpp
r86017 r86164 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.