Commit 2b7f6b1a authored by Kunihiko Sakamoto's avatar Kunihiko Sakamoto Committed by Commit Bot

Link rel=modulepreload: Add UseCounter

Bug: 740886
Change-Id: I946c3b33aef3a1bb49ffa3e73bf1c040cbc309c0
Reviewed-on: https://chromium-review.googlesource.com/771373
Commit-Queue: Kunihiko Sakamoto <ksakamoto@chromium.org>
Reviewed-by: default avatarKouhei Ueno <kouhei@chromium.org>
Cr-Commit-Position: refs/heads/master@{#517020}
parent 602b9632
...@@ -407,7 +407,7 @@ static void ModulePreloadIfNeeded(const LinkRelAttribute& rel_attribute, ...@@ -407,7 +407,7 @@ static void ModulePreloadIfNeeded(const LinkRelAttribute& rel_attribute,
if (!document.Loader() || !rel_attribute.IsModulePreload()) if (!document.Loader() || !rel_attribute.IsModulePreload())
return; return;
// TODO(ksakamoto): add UseCounter UseCounter::Count(document, WebFeature::kLinkRelModulePreload);
// Step 1. "If the href attribute's value is the empty string, then return." // Step 1. "If the href attribute's value is the empty string, then return."
// [spec text] // [spec text]
......
...@@ -1759,6 +1759,7 @@ enum WebFeature { ...@@ -1759,6 +1759,7 @@ enum WebFeature {
kDocumentPageShowFired = 2229, kDocumentPageShowFired = 2229,
kReplaceCharsetInXHR = 2230, kReplaceCharsetInXHR = 2230,
kRespondToSameOriginRequestWithCrossOriginResponse = 2231, kRespondToSameOriginRequestWithCrossOriginResponse = 2231,
kLinkRelModulePreload = 2232,
// 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.
......
...@@ -16962,6 +16962,7 @@ Called by update_net_error_codes.py.--> ...@@ -16962,6 +16962,7 @@ Called by update_net_error_codes.py.-->
<int value="2229" label="DocumentPageShowFired"/> <int value="2229" label="DocumentPageShowFired"/>
<int value="2230" label="ReplaceCharsetInXHR"/> <int value="2230" label="ReplaceCharsetInXHR"/>
<int value="2231" label="RespondToSameOriginRequestWithCrossOriginResponse"/> <int value="2231" label="RespondToSameOriginRequestWithCrossOriginResponse"/>
<int value="2232" label="LinkRelModulePreload"/>
</enum> </enum>
<enum name="FeedbackSource"> <enum name="FeedbackSource">
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