A few minor changes to the chrome.downloads extension API
Reviewers:
jhawkins: webui
Done:
asanka: */download/*
jam: content/public/*
asargent: */extensions/*
Replaced the "Invalid operation" error message with more specific and helpful messages
Add DownloadItem.referrer
Add DownloadItem.estimatedEndTime
Add DownloadItem.canResume
Change DownloadQuery.limit to default to 1000
Change 'conflict_action' to 'conflictAction'.
Change DownloadQuery.orderBy and DownloadQuery.query to arrays of strings
Remove DownloadItem.dangerAccepted in favor of DownloadItem.danger == 'accepted'
Add showDefaultFolder().
Disallow access to packaged_apps.
download() now updates the Download.Sources histogram. http://crbug.com/240322
Document using startedAfter and limit to page through search() results.
DownloadItem.error is now a string enum instead of mysterious numbers.
Add downloads.removeFile(id) and DownloadItem::DeleteFile() so that the file may be deleted separately from the history entry.
Calling open() for dangerous downloads has always been guaranteed to return kInvalidOperation because unaccepted dangerous downloads cannot transition to state='complete', and open() returns kInvalidOperation for incomplete items.
We can wait until after launch to figure out whether there needs to be some mechanism to allow extensions to override the request header blacklist. This seems like an edge case for which we may never receive feature requests.
Staged docs preview: http://basho.cam.corp.google.com:8000/extensions/downloads.html#type-DownloadItem
BUG=240322
[email protected], [email protected], [email protected]
Review URL: https://codereview.chromium.org/16924017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214133 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/extensions/extension_function_histogram_value.h b/chrome/browser/extensions/extension_function_histogram_value.h
index 1723089..d3a6e2e3 100644
--- a/chrome/browser/extensions/extension_function_histogram_value.h
+++ b/chrome/browser/extensions/extension_function_histogram_value.h
@@ -578,6 +578,8 @@
SYSTEM_STORAGE_REMOVEAVAILABLECAPACITYWATCH,
SYSTEM_STORAGE_GETALLAVAILABLECAPACITYWATCHES,
SYSTEM_STORAGE_REMOVEALLAVAILABLECAPACITYWATCHES,
+ DOWNLOADS_REMOVEFILE,
+ DOWNLOADS_SHOWDEFAULTFOLDER,
ENUM_BOUNDARY // Last entry: Add new entries above.
};