Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6553)

Unified Diff: chrome/common/extensions/api/downloads.idl

Issue 1706193002: Expose final download URL (actual url after redirects) in the extension API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/api/downloads.idl
diff --git a/chrome/common/extensions/api/downloads.idl b/chrome/common/extensions/api/downloads.idl
index 0381c887f0cdfc65ce7e821dcf600e25a71fdd8a..e715da80d331c65d7a4067aab4459105bd5d8fbb 100644
--- a/chrome/common/extensions/api/downloads.idl
+++ b/chrome/common/extensions/api/downloads.idl
@@ -134,9 +134,14 @@ namespace downloads {
// An identifier that is persistent across browser sessions.
long id;
- // Absolute URL.
+ // The absolute URL that this download initiated from, before any
+ // redirects.
DOMString url;
+ // The absolute URL that this download is being made from, after all
+ // redirects.
+ DOMString finalUrl;
+
// Absolute URL.
DOMString referrer;
@@ -226,9 +231,9 @@ namespace downloads {
[inline_doc] dictionary DownloadQuery {
// This array of search terms limits results to $(ref:DownloadItem) whose
- // <code>filename</code> or <code>url</code> contain all of the search terms
- // that do not begin with a dash '-' and none of the search terms that do
- // begin with a dash.
+ // <code>filename</code> or <code>url</code> or <code>finalUrl</code>
+ // contain all of the search terms that do not begin with a dash '-' and
+ // none of the search terms that do begin with a dash.
DOMString[]? query;
// Limits results to $(ref:DownloadItem) that
@@ -263,6 +268,10 @@ namespace downloads {
// <code>url</code> matches the given regular expression.
DOMString? urlRegex;
+ // Limits results to $(ref:DownloadItem) whose
+ // <code>finalUrl</code> matches the given regular expression.
+ DOMString? finalUrlRegex;
+
// The maximum number of matching $(ref:DownloadItem) returned. Defaults to
// 1000. Set to 0 in order to return all matching $(ref:DownloadItem). See
// $(ref:search) for how to page through results.
@@ -278,9 +287,14 @@ namespace downloads {
// The <code>id</code> of the $(ref:DownloadItem) to query.
long? id;
- // Absolute URL.
+ // The absolute URL that this download initiated from, before any
+ // redirects.
DOMString? url;
+ // The absolute URL that this download is being made from, after all
+ // redirects.
+ DOMString? finalUrl;
+
// Absolute local path.
DOMString? filename;
@@ -346,6 +360,9 @@ namespace downloads {
// The change in <code>url</code>, if any.
StringDelta? url;
+ // The change in <code>finalUrl</code>, if any.
+ StringDelta? finalUrl;
+
// The change in <code>filename</code>, if any.
StringDelta? filename;
« no previous file with comments | « chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698