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

Unified Diff: components/download/public/download_params.h

Issue 2895953004: Add initial Controller to DownloadService (Closed)
Patch Set: Rebased Created 3 years, 7 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 | « components/download/public/clients.h ('k') | components/download/public/download_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/download/public/download_params.h
diff --git a/components/download/public/download_params.h b/components/download/public/download_params.h
index dcf25b41986ac9b8810ab884e7e21a5c742f9e37..e9885e9e61c478a475378aefa8ba92c4b7d2635f 100644
--- a/components/download/public/download_params.h
+++ b/components/download/public/download_params.h
@@ -102,12 +102,25 @@ struct DownloadParams {
// The DownloadService has too many downloads. Backoff and retry.
BACKOFF,
- // Failed to create the download. Invalid input parameters.
- BAD_PARAMETERS,
+ // The DownloadService has no knowledge of the DownloadClient associated
+ // with this request.
+ UNEXPECTED_CLIENT,
+
+ // Failed to create the download. The guid is already in use.
+ UNEXPECTED_GUID,
+
+ // The download was cancelled by the Client while it was being persisted.
+ CLIENT_CANCELLED,
+
+ // The DownloadService was unable to accept and persist this download due to
+ // an internal error like the underlying DB store failing to write to disk.
+ INTERNAL_ERROR,
// TODO(dtrainor): Add more error codes.
};
+ using StartCallback = base::Callback<void(const std::string&, StartResult)>;
+
DownloadParams();
DownloadParams(const DownloadParams& other);
~DownloadParams();
@@ -120,7 +133,7 @@ struct DownloadParams {
// A callback that will be notified if this download has been accepted and
// persisted by the DownloadService.
- base::Callback<void(const DownloadParams&, StartResult)> callback;
+ StartCallback callback;
// The parameters that determine under what device conditions this download
// will occur.
« no previous file with comments | « components/download/public/clients.h ('k') | components/download/public/download_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698