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

Unified Diff: content/browser/service_worker/service_worker_storage.h

Issue 2521793004: service worker: Persist NavigationPreloadState (Closed)
Patch Set: expect_ name Created 4 years, 1 month 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/service_worker/service_worker_storage.h
diff --git a/content/browser/service_worker/service_worker_storage.h b/content/browser/service_worker/service_worker_storage.h
index fcdc0d64670a963eb4fff48417107ac10830e8a0..95c227dda9e5d99b7d67ad7e8082073950ada44b 100644
--- a/content/browser/service_worker/service_worker_storage.h
+++ b/content/browser/service_worker/service_worker_storage.h
@@ -143,6 +143,17 @@ class CONTENT_EXPORT ServiceWorkerStorage
// registration->last_update_check().
void UpdateLastUpdateCheckTime(ServiceWorkerRegistration* registration);
+ // Updates the specified registration's navigation preload state in storage.
+ // The caller is responsible for mutating the live registration's state.
+ void UpdateNavigationPreloadEnabled(int64_t registration_id,
+ const GURL& origin,
+ bool enable,
+ const StatusCallback& callback);
+ void UpdateNavigationPreloadHeader(int64_t registration_id,
+ const GURL& origin,
+ const std::string& value,
+ const StatusCallback& callback);
+
// Deletes the registration data for |registration_id|. If the registration's
// version is live, its script resources will remain available.
// PurgeResources should be called when it's OK to delete them.

Powered by Google App Engine
This is Rietveld 408576698