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

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

Issue 2778793002: Start aligning BackgroundFetchRequestInfo with the passed in request object. (Closed)
Patch Set: 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 57b76beed2902fe22508826499e9e3bfe21488f0..6a65238a472cd61f8dede4b82e68cb9799577745 100644
--- a/content/browser/background_fetch/background_fetch_request_info.h
+++ b/content/browser/background_fetch/background_fetch_request_info.h
@@ -10,6 +10,7 @@
#include "base/files/file_path.h"
#include "content/common/content_export.h"
+#include "content/common/service_worker/service_worker_types.h"
#include "content/public/browser/download_interrupt_reasons.h"
#include "content/public/browser/download_item.h"
#include "url/gurl.h"
@@ -20,15 +21,15 @@ namespace content {
class CONTENT_EXPORT BackgroundFetchRequestInfo {
public:
BackgroundFetchRequestInfo();
- BackgroundFetchRequestInfo(const GURL& url, const std::string& tag);
+ BackgroundFetchRequestInfo(const ServiceWorkerFetchRequest& fetch_request);
// TODO(harkness): Remove copy constructor once the final (non-map-based)
// state management is in place.
BackgroundFetchRequestInfo(const BackgroundFetchRequestInfo& request);
~BackgroundFetchRequestInfo();
const std::string& guid() const { return guid_; }
- const GURL& url() const { return url_; }
- const std::string& tag() const { return tag_; }
+
+ const GURL& GetUrl() const;
Peter Beverloo 2017/03/27 13:40:15 GetURL for consistency with url::Origin (which our
harkness 2017/03/27 16:44:00 Done.
DownloadItem::DownloadState state() const { return state_; }
void set_state(DownloadItem::DownloadState state) { state_ = state; }
@@ -56,9 +57,9 @@ class CONTENT_EXPORT BackgroundFetchRequestInfo {
bool IsComplete() const;
private:
+ ServiceWorkerFetchRequest fetch_request_;
+
std::string guid_;
Peter Beverloo 2017/03/27 13:40:15 do we still need this?
harkness 2017/03/27 16:44:00 This should be replaced by request_index, but I th
- GURL url_;
- std::string tag_;
std::string download_guid_;
// The following members do not need to be persisted, they can be reset after

Powered by Google App Engine
This is Rietveld 408576698