| Index: content/browser/service_worker/service_worker_database.cc
|
| diff --git a/content/browser/service_worker/service_worker_database.cc b/content/browser/service_worker/service_worker_database.cc
|
| index 9f1bc46069a7bd360b55c7390bd5a971127f5610..a1b48dfb33dbab5f52586dac83caf55c825c146b 100644
|
| --- a/content/browser/service_worker/service_worker_database.cc
|
| +++ b/content/browser/service_worker/service_worker_database.cc
|
| @@ -277,11 +277,11 @@ const char* ServiceWorkerDatabase::StatusToString(
|
|
|
| ServiceWorkerDatabase::RegistrationData::RegistrationData()
|
| : registration_id(kInvalidServiceWorkerRegistrationId),
|
| + update_via_cache(blink::WebServiceWorkerUpdateViaCache::kImports),
|
| version_id(kInvalidServiceWorkerVersionId),
|
| is_active(false),
|
| has_fetch_handler(false),
|
| - resources_total_size_bytes(0) {
|
| -}
|
| + resources_total_size_bytes(0) {}
|
|
|
| ServiceWorkerDatabase::RegistrationData::RegistrationData(
|
| const RegistrationData& other) = default;
|
| @@ -1403,6 +1403,10 @@ ServiceWorkerDatabase::Status ServiceWorkerDatabase::ParseRegistrationData(
|
| for (uint32_t feature : data.used_features())
|
| out->used_features.insert(feature);
|
|
|
| + if (data.has_update_via_cache())
|
| + out->update_via_cache = static_cast<blink::WebServiceWorkerUpdateViaCache>(
|
| + data.update_via_cache());
|
| +
|
| return ServiceWorkerDatabase::STATUS_OK;
|
| }
|
|
|
| @@ -1452,6 +1456,9 @@ void ServiceWorkerDatabase::WriteRegistrationDataInBatch(
|
| for (uint32_t feature : registration.used_features)
|
| data.add_used_features(feature);
|
|
|
| + data.set_update_via_cache(
|
| + static_cast<uint32_t>(registration.update_via_cache));
|
| +
|
| std::string value;
|
| bool success = data.SerializeToString(&value);
|
| DCHECK(success);
|
|
|