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

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

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.cc
diff --git a/content/browser/background_fetch/fetch_request.cc b/content/browser/background_fetch/fetch_request.cc
new file mode 100644
index 0000000000000000000000000000000000000000..4c5d617e59a5242031c7978089d2af4efd315e79
--- /dev/null
+++ b/content/browser/background_fetch/fetch_request.cc
@@ -0,0 +1,34 @@
+// 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.
+
+#include "content/browser/background_fetch/fetch_request.h"
+
+#include <string>
+
+#include "base/guid.h"
+#include "content/public/browser/download_item.h"
+
+namespace content {
+
+FetchRequest::FetchRequest() = default;
Peter Beverloo 2017/02/14 15:05:52 You need to initialize sw_registration_id_ here an
harkness 2017/02/15 13:48:44 I gave it a default value.
+
+FetchRequest::FetchRequest(const url::Origin& origin,
+ const GURL& url,
+ int64_t sw_registration_id,
Peter Beverloo 2017/02/14 15:05:52 note: try to avoid acronyms (sw -> service_worker_
harkness 2017/02/15 13:48:44 Done.
+ const std::string& tag)
+ : guid_(base::GenerateGUID()),
+ origin_(origin),
+ url_(url),
+ sw_registration_id_(sw_registration_id),
+ tag_(tag) {}
+
+FetchRequest::FetchRequest(const FetchRequest& request)
+ : guid_(request.guid_),
+ origin_(request.origin_),
+ url_(request.url_),
+ tag_(request.tag_) {}
+
+FetchRequest::~FetchRequest() = default;
+
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698