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

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

Issue 2777063008: Connect BackgroundFetch to the OfflineItemCollection
Patch Set: Added BackgroundFetchClientProxy to proxy calls to and from the Context. 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_registration_id.h
diff --git a/content/browser/background_fetch/background_fetch_registration_id.h b/content/browser/background_fetch/background_fetch_registration_id.h
index 32fb5da8145ae94420d4c4c0c74085ddeeb09f5c..286b7ab948e9acc970a267bdf674b2cada31662c 100644
--- a/content/browser/background_fetch/background_fetch_registration_id.h
+++ b/content/browser/background_fetch/background_fetch_registration_id.h
@@ -39,6 +39,15 @@ class CONTENT_EXPORT BackgroundFetchRegistrationId {
// Returns whether this registration id refers to valid data.
bool is_null() const;
+ // Serialize the registration_id into a string so that it can be sent to
+ // embedders in a neutral format. Syntax is:
+ // service_worker_registration_id:origin:tag
Peter Beverloo 2017/03/31 01:32:23 I personally wouldn't document the syntax of the s
harkness 2017/03/31 10:11:44 OK, I've moved the documentation to the .cc file.
+ std::string Serialize() const;
+
+ // Deserialize the string format of a registration_id.
+ static bool Deserialize(const std::string& serialized_registration_id,
+ BackgroundFetchRegistrationId& out_registration_id);
Peter Beverloo 2017/03/31 01:32:23 micro nit: style guide says static methods should
harkness 2017/03/31 10:11:44 Done.
+
int64_t service_worker_registration_id() const {
return service_worker_registration_id_;
}

Powered by Google App Engine
This is Rietveld 408576698