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

Unified Diff: third_party/WebKit/Source/modules/background_fetch/BackgroundFetchRegistration.cpp

Issue 2762573003: Implement BackgroundFetchManager.fetch() and struct traits (Closed)
Patch Set: Add a missing file 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: third_party/WebKit/Source/modules/background_fetch/BackgroundFetchRegistration.cpp
diff --git a/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchRegistration.cpp b/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchRegistration.cpp
index b5ed2d0963c5fe4398dcb62928ec19d45d3caae8..0cacfa61863c80bed90dd379f67cd3095381ffc0 100644
--- a/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchRegistration.cpp
+++ b/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchRegistration.cpp
@@ -11,19 +11,22 @@
namespace blink {
BackgroundFetchRegistration::BackgroundFetchRegistration(
- ServiceWorkerRegistration* registration,
String tag,
HeapVector<IconDefinition> icons,
long long totalDownloadSize,
String title)
- : m_registration(registration),
- m_tag(tag),
+ : m_tag(tag),
m_icons(icons),
m_totalDownloadSize(totalDownloadSize),
m_title(title) {}
BackgroundFetchRegistration::~BackgroundFetchRegistration() = default;
+void BackgroundFetchRegistration::setServiceWorkerRegistration(
+ ServiceWorkerRegistration* registration) {
+ m_registration = registration;
+}
+
String BackgroundFetchRegistration::tag() const {
return m_tag;
}
@@ -41,6 +44,7 @@ String BackgroundFetchRegistration::title() const {
}
void BackgroundFetchRegistration::abort() {
+ DCHECK(m_registration);
BackgroundFetchBridge::from(m_registration)->abort(m_tag);
}

Powered by Google App Engine
This is Rietveld 408576698