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

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

Issue 2678273003: Initial framework setup and skeleton for BackgroundFetchContext (Closed)
Patch Set: Remove observations for service worker context wrapper Created 3 years, 10 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/fetch_request.h
diff --git a/content/browser/background_fetch/fetch_request.h b/content/browser/background_fetch/fetch_request.h
new file mode 100644
index 0000000000000000000000000000000000000000..a822d2d18f53fd15ae3dbd999b85d429a67854bc
--- /dev/null
+++ b/content/browser/background_fetch/fetch_request.h
@@ -0,0 +1,41 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_BROWSER_BACKGROUND_FETCH_FETCH_REQUEST_H_
+#define CONTENT_BROWSER_BACKGROUND_FETCH_FETCH_REQUEST_H_
+
+#include "content/common/content_export.h"
+#include "url/gurl.h"
+#include "url/origin.h"
+
+namespace content {
+
+// Simple class to encapsulate the components of a fetch request.
Peter Beverloo 2017/02/14 15:05:52 Please extend this in the future. "a fetch request
harkness 2017/02/15 13:48:44 Acknowledged.
+class CONTENT_EXPORT FetchRequest {
+ public:
+ FetchRequest();
+ FetchRequest(const url::Origin& origin,
+ const GURL& url,
+ int64_t sw_registration_id,
+ const std::string& tag);
+ FetchRequest(const FetchRequest& request);
+ ~FetchRequest();
+
+ const std::string& guid() const { return guid_; }
+ const url::Origin& origin() const { return origin_; }
+ const GURL& url() const { return url_; }
+ int64_t sw_registration_id() const { return sw_registration_id_; }
+ const std::string& tag() const { return tag_; }
+
+ private:
+ std::string guid_;
+ url::Origin origin_;
+ GURL url_;
+ int64_t sw_registration_id_;
+ std::string tag_;
+};
+
+} // namespace content
+
+#endif // CONTENT_BROWSER_BACKGROUND_FETCH_FETCH_REQUEST_H_

Powered by Google App Engine
This is Rietveld 408576698