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

Unified Diff: chrome/browser/extensions/api/downloads/downloads_api.h

Issue 134373003: Return error to chrome.downloads.removeFile (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 11 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 | « no previous file | chrome/browser/extensions/api/downloads/downloads_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/downloads/downloads_api.h
diff --git a/chrome/browser/extensions/api/downloads/downloads_api.h b/chrome/browser/extensions/api/downloads/downloads_api.h
index e6bb1379861ceb4775546f45e7e4e39c0f9ad925..b2eec8083d71dc366875161d5d439cb88022b23e 100644
--- a/chrome/browser/extensions/api/downloads/downloads_api.h
+++ b/chrome/browser/extensions/api/downloads/downloads_api.h
@@ -41,6 +41,7 @@ namespace download_extension_errors {
// Errors that can be returned through chrome.runtime.lastError.message.
extern const char kEmptyFile[];
extern const char kFileAlreadyDeleted[];
+extern const char kFileNotRemoved[];
extern const char kIconNotFound[];
extern const char kInvalidDangerType[];
extern const char kInvalidFilename[];
@@ -169,8 +170,7 @@ class DownloadsEraseFunction : public ChromeSyncExtensionFunction {
DISALLOW_COPY_AND_ASSIGN(DownloadsEraseFunction);
};
-class DownloadsRemoveFileFunction : public ChromeAsyncExtensionFunction,
- public content::DownloadItem::Observer {
+class DownloadsRemoveFileFunction : public ChromeAsyncExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("downloads.removeFile", DOWNLOADS_REMOVEFILE)
DownloadsRemoveFileFunction();
@@ -180,10 +180,7 @@ class DownloadsRemoveFileFunction : public ChromeAsyncExtensionFunction,
virtual ~DownloadsRemoveFileFunction();
private:
- virtual void OnDownloadUpdated(content::DownloadItem* item) OVERRIDE;
- virtual void OnDownloadDestroyed(content::DownloadItem* item) OVERRIDE;
-
- content::DownloadItem* item_;
+ void Done(bool success);
DISALLOW_COPY_AND_ASSIGN(DownloadsRemoveFileFunction);
};
« no previous file with comments | « no previous file | chrome/browser/extensions/api/downloads/downloads_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698