Chromium Code Reviews| 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_; |
| } |