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

Unified Diff: content/browser/background_fetch/background_fetch_request_info.h

Issue 2753583002: Add the JobComplete callback and error/interrupt information (Closed)
Patch Set: added argument name Created 3 years, 9 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
Index: content/browser/background_fetch/background_fetch_request_info.h
diff --git a/content/browser/background_fetch/background_fetch_request_info.h b/content/browser/background_fetch/background_fetch_request_info.h
index 15ce167856a9ef95202a304376ce3265c754df08..d7e4582a751d6748cb05c3b2b229b2d5cb480495 100644
--- a/content/browser/background_fetch/background_fetch_request_info.h
+++ b/content/browser/background_fetch/background_fetch_request_info.h
@@ -8,6 +8,8 @@
#include <vector>
#include "content/common/content_export.h"
+#include "content/public/browser/download_interrupt_reasons.h"
+#include "content/public/browser/download_item.h"
#include "url/gurl.h"
namespace content {
@@ -26,20 +28,28 @@ class CONTENT_EXPORT BackgroundFetchRequestInfo {
const GURL& url() const { return url_; }
const std::string& tag() const { return tag_; }
- bool complete() const { return complete_; }
- void set_complete(bool complete) { complete_ = complete; }
+ DownloadItem::DownloadState state() const { return state_; }
+ void set_state(DownloadItem::DownloadState state) { state_ = state; }
const std::string& download_guid() const { return download_guid_; }
void set_download_guid(const std::string& download_guid) {
download_guid_ = download_guid;
}
+ DownloadInterruptReason interrupt_reason() const { return interrupt_reason_; }
+ void set_interrupt_reason(DownloadInterruptReason reason) {
+ interrupt_reason_ = reason;
+ }
+
private:
std::string guid_;
GURL url_;
std::string tag_;
- bool complete_ = false;
std::string download_guid_;
+ DownloadItem::DownloadState state_ =
+ DownloadItem::DownloadState::MAX_DOWNLOAD_STATE;
+ DownloadInterruptReason interrupt_reason_ =
+ DownloadInterruptReason::DOWNLOAD_INTERRUPT_REASON_NONE;
};
using BackgroundFetchRequestInfos = std::vector<BackgroundFetchRequestInfo>;

Powered by Google App Engine
This is Rietveld 408576698