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

Unified Diff: content/browser/service_worker/service_worker_registration.cc

Issue 2433273003: service worker: Plumb NavigationPreloadManager.enable/disable to browser-side (Closed)
Patch Set: comments Created 4 years, 2 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/service_worker/service_worker_registration.cc
diff --git a/content/browser/service_worker/service_worker_registration.cc b/content/browser/service_worker/service_worker_registration.cc
index 9efb7098bc6592fda893208fa8335a0dd7cabfa0..92e3051d758ccc6e7343884db08f8c3920ba3d48 100644
--- a/content/browser/service_worker/service_worker_registration.cc
+++ b/content/browser/service_worker/service_worker_registration.cc
@@ -38,6 +38,7 @@ ServiceWorkerRegistration::ServiceWorkerRegistration(
is_uninstalling_(false),
is_uninstalled_(false),
should_activate_when_ready_(false),
+ is_navigation_preload_enabled_(false),
resources_total_size_bytes_(0),
context_(context),
task_runner_(base::ThreadTaskRunnerHandle::Get()) {
@@ -394,6 +395,11 @@ void ServiceWorkerRegistration::SetTaskRunnerForTest(
task_runner_ = task_runner;
}
+void ServiceWorkerRegistration::EnableNavigationPreload(bool enable) {
+ // TODO(falken): Propagate to current versions and new versions.
+ is_navigation_preload_enabled_ = enable;
+}
+
void ServiceWorkerRegistration::RegisterRegistrationFinishedCallback(
const base::Closure& callback) {
// This should only be called if the registration is in progress.
« no previous file with comments | « content/browser/service_worker/service_worker_registration.h ('k') | content/child/service_worker/service_worker_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698