Commit 8ea27747 authored by Rayan Kanso's avatar Rayan Kanso Committed by Commit Bot

[Background Fetch] Measure Background Fetch feature usage

TBR=dgozman@chromium.org

Bug: 780025
Change-Id: I36e85988a6402bee5ca8fead28fddb64081c4133
Reviewed-on: https://chromium-review.googlesource.com/1246062
Commit-Queue: Rayan Kanso <rayankans@chromium.org>
Reviewed-by: default avatarPeter Beverloo <peter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595098}
parent 86b619d1
......@@ -1999,6 +1999,12 @@ enum WebFeature {
kSerialRequestPort = 2546,
kSerialPortOpen = 2547,
kSerialPortClose = 2548,
kBackgroundFetchManagerFetch = 2549,
kBackgroundFetchManagerGet = 2550,
kBackgroundFetchManagerGetIds = 2551,
kBackgroundFetchRegistrationAbort = 2552,
kBackgroundFetchRegistrationMatch = 2553,
kBackgroundFetchRegistrationMatchAll = 2554,
// Add new features immediately above this line. Don't change assigned
// numbers of any item, and don't reuse removed slots.
......
......@@ -8,7 +8,7 @@
Exposed=(Window,Worker),
RuntimeEnabled=BackgroundFetch
] interface BackgroundFetchManager {
[CallWith=ScriptState, RaisesException] Promise<BackgroundFetchRegistration> fetch(DOMString id, (RequestInfo or sequence<RequestInfo>) requests, optional BackgroundFetchOptions options);
[CallWith=ScriptState] Promise<BackgroundFetchRegistration?> get(DOMString id);
[CallWith=ScriptState] Promise<FrozenArray<DOMString>> getIds();
[CallWith=ScriptState, RaisesException, MeasureAs=BackgroundFetchManagerFetch] Promise<BackgroundFetchRegistration> fetch(DOMString id, (RequestInfo or sequence<RequestInfo>) requests, optional BackgroundFetchOptions options);
[CallWith=ScriptState, MeasureAs=BackgroundFetchManagerGet] Promise<BackgroundFetchRegistration?> get(DOMString id);
[CallWith=ScriptState, MeasureAs=BackgroundFetchManagerGetIds] Promise<FrozenArray<DOMString>> getIds();
};
......@@ -35,10 +35,10 @@ enum BackgroundFetchResult { "", "success", "failure" };
attribute EventHandler onprogress;
[CallWith=ScriptState] Promise<boolean> abort();
[CallWith=ScriptState, MeasureAs=BackgroundFetchRegistrationAbort] Promise<boolean> abort();
// TODO(crbug.com/875201): Change to (Window,Worker) once we support
// match() and matchAll() for active fetches.
[CallWith=ScriptState, Exposed=ServiceWorker, RaisesException] Promise<BackgroundFetchRecord> match(RequestInfo request, optional CacheQueryOptions options);
[CallWith=ScriptState, Exposed=ServiceWorker, RaisesException] Promise<sequence<BackgroundFetchRecord>> matchAll(optional RequestInfo request, optional CacheQueryOptions options);
[CallWith=ScriptState, Exposed=ServiceWorker, RaisesException, MeasureAs=BackgroundFetchRegistrationMatch] Promise<BackgroundFetchRecord> match(RequestInfo request, optional CacheQueryOptions options);
[CallWith=ScriptState, Exposed=ServiceWorker, RaisesException, MeasureAs=BackgroundFetchRegistrationMatchAll] Promise<sequence<BackgroundFetchRecord>> matchAll(optional RequestInfo request, optional CacheQueryOptions options);
};
......@@ -20244,6 +20244,12 @@ Called by update_net_error_codes.py.-->
<int value="2546" label="SerialRequestPort"/>
<int value="2547" label="SerialPortOpen"/>
<int value="2548" label="SerialPortClose"/>
<int value="2549" label="BackgroundFetchManagerFetch"/>
<int value="2550" label="BackgroundFetchManagerGet"/>
<int value="2551" label="BackgroundFetchManagerGetIds"/>
<int value="2552" label="BackgroundFetchRegistrationAbort"/>
<int value="2553" label="BackgroundFetchRegistrationMatch"/>
<int value="2554" label="BackgroundFetchRegistrationMatchAll"/>
</enum>
<enum name="FeaturePolicyFeature">
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