Commit a07ecf06 authored by Peter Beverloo's avatar Peter Beverloo Committed by Commit Bot

Add a use counter for notification show triggers

Change-Id: Ibd1f7b117e6b466deebad5795548b4a67958ec89
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1784609
Commit-Queue: Peter Beverloo <peter@chromium.org>
Commit-Queue: Rayan Kanso <rayankans@chromium.org>
Auto-Submit: Peter Beverloo <peter@chromium.org>
Reviewed-by: default avatarRayan Kanso <rayankans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#693209}
parent 7e3886d7
...@@ -2397,6 +2397,7 @@ enum WebFeature { ...@@ -2397,6 +2397,7 @@ enum WebFeature {
kFetchCacheReload = 3014, kFetchCacheReload = 3014,
kV8Window_ChooseFileSystemEntries_Method = 3015, kV8Window_ChooseFileSystemEntries_Method = 3015,
kV8FileSystemDirectoryHandle_GetSystemDirectory_Method = 3016, kV8FileSystemDirectoryHandle_GetSystemDirectory_Method = 3016,
kNotificationShowTrigger = 3017,
// Add new features immediately above this line. Don't change assigned // Add new features immediately above this line. Don't change assigned
// numbers of any item, and don't reuse removed slots. // numbers of any item, and don't reuse removed slots.
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include "third_party/blink/renderer/modules/notifications/timestamp_trigger.h" #include "third_party/blink/renderer/modules/notifications/timestamp_trigger.h"
#include "third_party/blink/renderer/modules/vibration/vibration_controller.h" #include "third_party/blink/renderer/modules/vibration/vibration_controller.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h" #include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/instrumentation/use_counter.h"
#include "third_party/blink/renderer/platform/wtf/std_lib_extras.h" #include "third_party/blink/renderer/platform/wtf/std_lib_extras.h"
#include "third_party/blink/renderer/platform/wtf/text/string_view.h" #include "third_party/blink/renderer/platform/wtf/text/string_view.h"
...@@ -142,6 +143,8 @@ mojom::blink::NotificationDataPtr CreateNotificationData( ...@@ -142,6 +143,8 @@ mojom::blink::NotificationDataPtr CreateNotificationData(
notification_data->actions = std::move(actions); notification_data->actions = std::move(actions);
if (options->hasShowTrigger()) { if (options->hasShowTrigger()) {
UseCounter::Count(context, WebFeature::kNotificationShowTrigger);
auto* timestamp_trigger = options->showTrigger(); auto* timestamp_trigger = options->showTrigger();
auto timestamp = base::Time::FromJsTime(timestamp_trigger->timestamp()); auto timestamp = base::Time::FromJsTime(timestamp_trigger->timestamp());
......
...@@ -24559,6 +24559,7 @@ Called by update_net_error_codes.py.--> ...@@ -24559,6 +24559,7 @@ Called by update_net_error_codes.py.-->
<int value="3015" label="V8Window_ChooseFileSystemEntries_Method"/> <int value="3015" label="V8Window_ChooseFileSystemEntries_Method"/>
<int value="3016" <int value="3016"
label="V8FileSystemDirectoryHandle_GetSystemDirectory_Method"/> label="V8FileSystemDirectoryHandle_GetSystemDirectory_Method"/>
<int value="3017" label="NotificationShowTrigger"/>
</enum> </enum>
<enum name="FeaturePolicyAllowlistType"> <enum name="FeaturePolicyAllowlistType">
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