Commit cacf182e authored by Joshua Bell's avatar Joshua Bell Committed by Commit Bot

Apply [SecureContext] to NavigationPreloadManager interface

Now that [SecureContext] works with interfaces, resolve some TODOs and
align the implementation of NavigationPreloadManager with the spec.

Change-Id: I6a8d156182112ee972eb4720e7fa478e784e73bc
Reviewed-on: https://chromium-review.googlesource.com/802620Reviewed-by: default avatarMatt Falkenhagen <falken@chromium.org>
Commit-Queue: Joshua Bell <jsbell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#520982}
parent e001c610
......@@ -2,17 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// TODO(falken): Revise link when this lands in the spec:
// https://github.com/w3c/ServiceWorker/issues/920
// https://w3c.github.io/ServiceWorker/#navigation-preload-manager
[
SecureContext,
Exposed=(Window,Worker)
] interface NavigationPreloadManager {
// TODO(mgiuca): Put SecureContext on the interface, not individual methods.
// Currently prevented due to clash with OriginTrialEnabled. This can be
// resolved either when OriginTrialEnabled is removed, or
// https://crbug.com/695123 is fixed.
[SecureContext, CallWith=ScriptState] Promise<void> enable();
[SecureContext, CallWith=ScriptState] Promise<void> disable();
[SecureContext, CallWith=ScriptState] Promise<void> setHeaderValue(ByteString value);
[SecureContext, CallWith=ScriptState] Promise<NavigationPreloadState> getState();
[CallWith=ScriptState] Promise<void> enable();
[CallWith=ScriptState] Promise<void> disable();
[CallWith=ScriptState] Promise<void> setHeaderValue(ByteString value);
[CallWith=ScriptState] Promise<NavigationPreloadState> getState();
};
......@@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// TODO(falken): Revise link when this lands in the spec:
// https://github.com/w3c/ServiceWorker/issues/920
// https://w3c.github.io/ServiceWorker/#navigation-preload-manager
dictionary NavigationPreloadState {
boolean enabled = false;
ByteString headerValue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment