summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcommit-queue@webkit.org <commit-queue@webkit.org@bbb929c8-8fbe-4397-9dbb-9b2b20218538>2012-10-01 17:11:11 +0000
committercommit-queue@webkit.org <commit-queue@webkit.org@bbb929c8-8fbe-4397-9dbb-9b2b20218538>2012-10-01 17:11:11 +0000
commite208ea0a05a8f0af04b3f853375e333afaa86355 (patch)
tree00ae48fd9f43ce779c5761ecbf98a57a3456ebec
parentba64aca160d69149da9d46c5c87572d90368de50 (diff)
downloadchromium_src-e208ea0a05a8f0af04b3f853375e333afaa86355.zip
chromium_src-e208ea0a05a8f0af04b3f853375e333afaa86355.tar.gz
chromium_src-e208ea0a05a8f0af04b3f853375e333afaa86355.tar.bz2
[GTK][WK2] Save the download uri as file metadata
https://bugs.webkit.org/show_bug.cgi?id=98043 Patch by Claudio Saavedra <csaavedra@igalia.com> on 2012-10-01 Reviewed by Carlos Garcia Campos. gio/gvfs can store file metadata, let's use this to store the download uri. * WebProcess/Downloads/soup/DownloadSoup.cpp: (WebKit::DownloadClient::didReceiveResponse): Save the download uri as metadata. git-svn-id: svn://svn.chromium.org/blink/trunk@130054 bbb929c8-8fbe-4397-9dbb-9b2b20218538
-rw-r--r--third_party/WebKit/Source/WebKit2/ChangeLog14
-rw-r--r--third_party/WebKit/Source/WebKit2/WebProcess/Downloads/soup/DownloadSoup.cpp4
2 files changed, 18 insertions, 0 deletions
diff --git a/third_party/WebKit/Source/WebKit2/ChangeLog b/third_party/WebKit/Source/WebKit2/ChangeLog
index 06512f6..ac2573b 100644
--- a/third_party/WebKit/Source/WebKit2/ChangeLog
+++ b/third_party/WebKit/Source/WebKit2/ChangeLog
@@ -1,3 +1,17 @@
+2012-10-01 Claudio Saavedra <csaavedra@igalia.com>
+
+ [GTK][WK2] Save the download uri as file metadata
+ https://bugs.webkit.org/show_bug.cgi?id=98043
+
+ Reviewed by Carlos Garcia Campos.
+
+ gio/gvfs can store file metadata, let's use this to
+ store the download uri.
+
+ * WebProcess/Downloads/soup/DownloadSoup.cpp:
+ (WebKit::DownloadClient::didReceiveResponse): Save
+ the download uri as metadata.
+
2012-10-01 Andras Becsi <andras.becsi@digia.com>
[Qt][WK2] Device pixel ratio lost upon relaunch of the web process
diff --git a/third_party/WebKit/Source/WebKit2/WebProcess/Downloads/soup/DownloadSoup.cpp b/third_party/WebKit/Source/WebKit2/WebProcess/Downloads/soup/DownloadSoup.cpp
index 38117eb..477ccc5 100644
--- a/third_party/WebKit/Source/WebKit2/WebProcess/Downloads/soup/DownloadSoup.cpp
+++ b/third_party/WebKit/Source/WebKit2/WebProcess/Downloads/soup/DownloadSoup.cpp
@@ -96,6 +96,10 @@ public:
return;
}
+ GRefPtr<GFileInfo> info = adoptGRef(g_file_info_new());
+ g_file_info_set_attribute_string(info.get(), "metadata::download-uri", response.url().string().utf8().data());
+ g_file_set_attributes_async(file.get(), info.get(), G_FILE_QUERY_INFO_NONE, G_PRIORITY_DEFAULT, 0, 0, 0);
+
m_download->didCreateDestination(destinationURI);
}