0

Fix security owners check to be compatible with presubmit --files/--all

The security owners check only issues a blocking error now if there is
a Gerrit issue attached to the change: it is not possible (through the
normal tooling anyway) to directly commit a change without first
uploading it to Gerrit, so no safety is lost there. In addition, the
security owners check now respects Owners-Override as well.

Testing this fix also revealed an issue where the security review
exceptions for Blink metrics enums did not work quite correctly, since
the same directory contained both mojoms that required security review
and mojoms that did not.

To fix this, move all the mojoms that do not require a security review
into their own subdirectory and merge the PRESUBMIT scripts into one,
updating the PRESUBMIT to the latest style.

Moving the enums also required updating numerous paths throughout
Chrome. It also slightly changes the output of the enum validation
script, so regenerate enums.xml to reflect the new paths. This also
updates the shebang line in the enum generation scripts to use
python3 explicitly instead of just python (which is often not present
on gLinux machines, or is mapped to python2).

Bug: 801315
Change-Id: If1809126a0103e295b7c350a8996401c766a2931
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3648594
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Owners-Override: Kentaro Hara <haraken@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1003666}
This commit is contained in:
Daniel Cheng
2022-05-16 09:08:47 +00:00
committed by Chromium LUCI CQ
parent f831099900
commit d8824447b1
138 changed files with 258 additions and 293 deletions
PRESUBMIT.pyPRESUBMIT_test.py
chrome
components
content
third_party/blink
common
public
renderer
bindings
build
core
modules
platform
web_tests
tools

@ -4,7 +4,7 @@
"""Top-level presubmit script for Chromium.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
See https://www.chromium.org/developers/how-tos/depottools/presubmit-scripts/
for more details about the presubmit API built into depot_tools.
"""
@ -2768,6 +2768,12 @@ def _ChangeHasSecurityReviewer(input_api, owners_file):
Note: if the presubmit is running for commit rather than for upload, this
only returns True if a security reviewer has also approved the CL.
"""
# Owners-Override should bypass all additional OWNERS enforcement checks.
# A CR+1 vote will still be required to land this change.
if (input_api.change.issue and input_api.gerrit.IsOwnersOverrideApproved(
input_api.change.issue)):
return True
owner_email, reviewers = (
input_api.canned_checks.GetCodereviewOwnerAndReviewers(
input_api,
@ -2843,7 +2849,7 @@ def _FindMissingSecurityOwners(input_api,
def AddPatternToCheck(file, pattern):
owners_file = input_api.os_path.join(
input_api.os_path.dirname(file.AbsoluteLocalPath()), 'OWNERS')
input_api.os_path.dirname(file.LocalPath()), 'OWNERS')
if owners_file not in to_check:
to_check[owners_file] = {}
if pattern not in to_check[owners_file]:
@ -2952,9 +2958,8 @@ def _CheckChangeForIpcSecurityOwners(input_api, output_api):
'third_party/blink/renderer/platform/bindings/*',
'third_party/protobuf/benchmarks/python/*',
'third_party/win_build_output/*',
# Enums used for web metrics, so no security review needed.
'third_party/blink/public/mojom/use_counter/css_property_id.mojom',
'third_party/blink/public/mojom/web_feature/web_feature.mojom',
# Enum-only mojoms used for web metrics, so no security review needed.
'third_party/blink/public/mojom/use_counter/metrics/*',
# These files are just used to communicate between class loaders running
# in the same process.
'weblayer/browser/java/org/chromium/weblayer_private/interfaces/*',
@ -3024,9 +3029,13 @@ def CheckSecurityOwners(input_api, output_api):
missing_reviewer_errors.extend(fuchsia_results.missing_reviewer_errors)
if missing_reviewer_errors:
# Missing reviewers are only a warning at upload time; otherwise, it'd
# be impossible to upload a change.
if input_api.is_committing:
# Missing reviewers are an error unless there's no issue number
# associated with this branch; in that case, the presubmit is being run
# with --all or --files.
#
# Note that upload should never be an error; otherwise, it would be
# impossible to upload changes at all.
if input_api.is_committing and input_api.change.issue:
make_presubmit_message = output_api.PresubmitError
else:
make_presubmit_message = output_api.PresubmitPromptWarning

@ -2292,6 +2292,14 @@ class CorrectProductNameInMessagesTest(unittest.TestCase):
class _SecurityOwnersTestCase(unittest.TestCase):
def _setupFakeChange(self, input_api):
class FakeGerrit(object):
def IsOwnersOverrideApproved(self, issue):
return False
input_api.change.issue = 123
input_api.gerrit = FakeGerrit()
def _injectFakeOwnersClient(self, input_api, owners):
class FakeOwnersClient(object):
def ListOwners(self, f):
@ -2328,6 +2336,7 @@ class IpcSecurityOwnerTest(_SecurityOwnersTestCase):
mock_input_api.files = [
MockAffectedFile(f'services/goat/public/goat.mojom',
['// Scary contents.'])]
self._setupFakeChange(mock_input_api)
self._injectFakeOwnersClient(
mock_input_api,
['apple@chromium.org', 'orange@chromium.org'])
@ -2350,6 +2359,7 @@ class IpcSecurityOwnerTest(_SecurityOwnersTestCase):
mock_input_api.files = [
MockAffectedFile(f'services/goat/public/goat.mojom',
['// Scary contents.'])]
self._setupFakeChange(mock_input_api)
self._injectFakeOwnersClient(
mock_input_api,
['apple@chromium.org', 'orange@chromium.org'])
@ -2372,6 +2382,7 @@ class IpcSecurityOwnerTest(_SecurityOwnersTestCase):
mock_input_api.files = [
MockAffectedFile(f'services/goat/public/goat.mojom',
['// Scary contents.'])]
self._setupFakeChange(mock_input_api)
self._injectFakeOwnersClient(
mock_input_api,
['apple@chromium.org', 'orange@chromium.org'])
@ -2396,6 +2407,7 @@ class IpcSecurityOwnerTest(_SecurityOwnersTestCase):
mock_input_api.files = [
MockAffectedFile(f'services/goat/public/{filename}',
['// Scary contents.'])]
self._setupFakeChange(mock_input_api)
self._injectFakeOwnersClient(
mock_input_api,
['apple@chromium.org', 'orange@chromium.org'])
@ -2421,6 +2433,7 @@ class IpcSecurityOwnerTest(_SecurityOwnersTestCase):
mock_input_api.files = [
MockAffectedFile(f'services/goat/public/{filename}',
['// Scary contents.'])]
self._setupFakeChange(mock_input_api)
self._injectFakeOwnersClient(
mock_input_api,
['apple@chromium.org', 'orange@chromium.org'])
@ -2455,6 +2468,7 @@ class IpcSecurityOwnerTest(_SecurityOwnersTestCase):
'#include "services/goat/public/cpp/manifest.h"',
'const service_manager::Manifest& GetManifest() {}',
])]
self._setupFakeChange(mock_input_api)
self._injectFakeOwnersClient(mock_input_api,
['apple@chromium.org', 'orange@chromium.org'])
self._injectFakeChangeOwnerAndReviewers(
@ -2497,6 +2511,7 @@ class FuchsiaSecurityOwnerTest(_SecurityOwnersTestCase):
[
'library test.fidl'
])]
self._setupFakeChange(mock_input_api)
self._injectFakeOwnersClient(mock_input_api,
['apple@chromium.org', 'orange@chromium.org'])
self._injectFakeChangeOwnerAndReviewers(
@ -2519,6 +2534,7 @@ class FuchsiaSecurityOwnerTest(_SecurityOwnersTestCase):
[
'{ "that is no": "manifest!" }'
])]
self._setupFakeChange(mock_input_api)
self._injectFakeOwnersClient(mock_input_api,
['apple@chromium.org', 'orange@chromium.org'])
self._injectFakeChangeOwnerAndReviewers(
@ -2541,11 +2557,12 @@ class FuchsiaSecurityOwnerTest(_SecurityOwnersTestCase):
[
'{ "that is no": "manifest!" }'
])]
mock_output_api = MockOutputApi()
self._setupFakeChange(mock_input_api)
self._injectFakeOwnersClient(mock_input_api,
['apple@chromium.org', 'orange@chromium.org'])
self._injectFakeChangeOwnerAndReviewers(
mock_input_api, 'owner@chromium.org', ['banana@chromium.org'])
mock_output_api = MockOutputApi()
errors = PRESUBMIT.CheckSecurityOwners(
mock_input_api, mock_output_api)
self.assertEqual(2, len(errors))
@ -2639,6 +2656,7 @@ class SecurityChangeTest(_SecurityOwnersTestCase):
def testChangeOwnersMissing(self):
mock_input_api = MockInputApi()
self._setupFakeChange(mock_input_api)
self._injectFakeOwnersClient(mock_input_api,
['apple@chromium.org', 'orange@chromium.org'])
self._injectFakeChangeOwnerAndReviewers(
@ -2659,6 +2677,7 @@ class SecurityChangeTest(_SecurityOwnersTestCase):
def testChangeOwnersMissingAtCommit(self):
mock_input_api = MockInputApi()
self._setupFakeChange(mock_input_api)
self._injectFakeOwnersClient(mock_input_api,
['apple@chromium.org', 'orange@chromium.org'])
self._injectFakeChangeOwnerAndReviewers(
@ -2694,6 +2713,7 @@ class SecurityChangeTest(_SecurityOwnersTestCase):
def testChangeOwnerIsSecurityOwner(self):
mock_input_api = MockInputApi()
self._setupFakeChange(mock_input_api)
self._injectFakeOwnersClient(mock_input_api,
['apple@chromium.org', 'orange@chromium.org'])
self._injectFakeChangeOwnerAndReviewers(

@ -72,7 +72,7 @@
#include "services/network/public/cpp/features.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-shared.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-shared.h"
using ::testing::IsEmpty;
using ::testing::UnorderedElementsAre;

@ -48,7 +48,7 @@
#include "services/network/public/cpp/url_loader_completion_status.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom.h"
namespace {

@ -18,7 +18,7 @@
#include "content/public/test/web_contents_tester.h"
#include "extensions/buildflags/buildflags.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-blink.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-blink.h"
#include "url/gurl.h"
#if BUILDFLAG(ENABLE_EXTENSIONS)

@ -53,7 +53,7 @@
#include "services/metrics/public/cpp/ukm_builders.h"
#include "services/metrics/public/cpp/ukm_source.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom.h"
#include "ui/gfx/geometry/size.h"
#include "url/gurl.h"
#include "url/url_constants.h"

@ -99,8 +99,8 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/common/user_agent/user_agent_metadata.h"
#include "third_party/blink/public/mojom/use_counter/css_property_id.mojom.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom.h"
#include "third_party/blink/public/mojom/use_counter/metrics/css_property_id.mojom.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom.h"
#include "ui/gfx/geometry/size.h"
#include "url/gurl.h"

@ -21,7 +21,7 @@
#include "net/dns/mock_host_resolver.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom.h"
#if BUILDFLAG(IS_ANDROID)
#include "chrome/test/base/android/android_browser_test.h"

@ -59,7 +59,7 @@
#include "third_party/blink/public/common/privacy_budget/identifiability_study_settings.h"
#include "third_party/blink/public/common/privacy_budget/identifiable_surface.h"
#include "third_party/blink/public/common/privacy_budget/identifiable_token.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-shared.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-shared.h"
#include "url/gurl.h"
class Profile;

@ -232,7 +232,7 @@
#include "third_party/blink/public/mojom/frame/blocked_navigation_types.mojom.h"
#include "third_party/blink/public/mojom/frame/frame.mojom.h"
#include "third_party/blink/public/mojom/frame/fullscreen.mojom.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom.h"
#include "third_party/blink/public/mojom/window_features/window_features.mojom.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/window_open_disposition.h"

@ -17,7 +17,7 @@
#include "content/public/test/browser_test.h"
#include "content/public/test/url_loader_interceptor.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/native_theme/native_theme.h"

@ -18,7 +18,7 @@
#include "content/public/test/test_navigation_observer.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/mojom/manifest/handle_links.mojom.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom.h"
namespace web_app {

@ -36,7 +36,7 @@
#include "content/public/test/test_utils.h"
#include "content/public/test/url_loader_interceptor.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom.h"
using content::RenderFrameHost;
using content::WebContents;

@ -19,7 +19,7 @@
#include "components/services/app_service/public/cpp/protocol_handler_info.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/test_navigation_observer.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom.h"
namespace {

@ -19,7 +19,7 @@
#include "content/public/test/browser_test.h"
#include "content/public/test/test_navigation_observer.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom.h"
namespace web_app {

@ -14,7 +14,7 @@
#include "content/public/common/content_features.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/test_navigation_observer.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom.h"
namespace {

@ -9,7 +9,7 @@
#include <vector>
#include "base/test/metrics/histogram_tester.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom.h"
// Returns a map containing the given `features` as keys, all mapping to zero.
std::map<blink::mojom::WebFeature, int> AllZeroFeatureCounts(

@ -50,7 +50,7 @@
#include "services/metrics/public/cpp/ukm_recorder.h"
#include "third_party/blink/public/mojom/devtools/inspector_issue.mojom-shared.h"
#include "third_party/blink/public/mojom/devtools/inspector_issue.mojom.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom.h"
#include "ui/base/page_transition_types.h"
#include "ui/gfx/geometry/point.h"
#include "ui/gfx/geometry/rect.h"

@ -11,9 +11,9 @@
#include "base/containers/flat_set.h"
#include "components/page_load_metrics/browser/page_load_metrics_observer.h"
#include "third_party/blink/public/mojom/permissions_policy/permissions_policy_feature.mojom.h"
#include "third_party/blink/public/mojom/use_counter/css_property_id.mojom.h"
#include "third_party/blink/public/mojom/use_counter/metrics/css_property_id.mojom.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom.h"
#include "third_party/blink/public/mojom/use_counter/use_counter_feature.mojom-forward.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom.h"
// This class reports several use counters coming from Blink.
// For FencedFrames, it reports the use counters with a "FencedFrames" prefix.

@ -16,7 +16,7 @@
#include "content/public/test/navigation_simulator.h"
#include "content/public/test/test_renderer_host.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom.h"
#include "url/gurl.h"
namespace {

@ -7,7 +7,7 @@ module page_load_metrics.mojom;
import "ui/gfx/geometry/mojom/geometry.mojom";
import "mojo/public/mojom/base/shared_memory.mojom";
import "mojo/public/mojom/base/time.mojom";
import "third_party/blink/public/mojom/web_feature/web_feature.mojom";
import "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom";
import
"third_party/blink/public/mojom/mobile_metrics/mobile_friendliness.mojom";
import "third_party/blink/public/mojom/use_counter/use_counter_feature.mojom";

@ -18,8 +18,8 @@
#include "services/network/public/cpp/url_loader_completion_status.h"
#include "services/network/public/mojom/url_response_head.mojom.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-shared.h"
#include "third_party/blink/public/mojom/use_counter/use_counter_feature.mojom-shared.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-shared.h"
#include "ui/gfx/geometry/rect.h"
namespace page_load_metrics {

@ -11,7 +11,7 @@ import "third_party/blink/public/mojom/service_worker/navigation_preload_state.m
import "third_party/blink/public/mojom/service_worker/service_worker_database.mojom";
import "third_party/blink/public/mojom/service_worker/service_worker_registration_options.mojom";
import "third_party/blink/public/mojom/storage_key/storage_key.mojom";
import "third_party/blink/public/mojom/web_feature/web_feature.mojom";
import "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom";
import "url/mojom/url.mojom";
// Status code of service worker database operations.

@ -24,7 +24,7 @@
#include "third_party/blink/public/common/storage_key/storage_key.h"
#include "third_party/blink/public/mojom/service_worker/navigation_preload_state.mojom.h"
#include "third_party/blink/public/mojom/service_worker/service_worker_registration_options.mojom.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom.h"
#include "url/gurl.h"
#include "url/origin.h"

@ -13,7 +13,7 @@
#include "content/public/common/content_client.h"
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
#include "services/network/public/mojom/http_raw_headers.mojom.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom.h"
namespace content {

@ -29,7 +29,7 @@
#include "services/network/public/cpp/network_switches.h"
#include "services/network/public/mojom/network_context.mojom.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom.h"
#if BUILDFLAG(IS_ANDROID)
#include "base/android/content_uri_utils.h"

@ -30,7 +30,7 @@
#include "services/network/public/cpp/content_security_policy/csp_context.h"
#include "third_party/blink/public/mojom/devtools/console_message.mojom-shared.h"
#include "third_party/blink/public/mojom/devtools/console_message.mojom.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom.h"
namespace content {

@ -14,7 +14,7 @@
#include "services/network/public/mojom/fetch_api.mojom.h"
#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom.h"
#include "third_party/blink/public/mojom/loader/mixed_content.mojom-forward.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom.h"
namespace content {

@ -159,7 +159,7 @@
#include "third_party/blink/public/mojom/navigation/prefetched_signed_exchange_info.mojom.h"
#include "third_party/blink/public/mojom/service_worker/service_worker_provider.mojom.h"
#include "third_party/blink/public/mojom/storage_key/ancestor_chain_bit.mojom.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom.h"
#include "third_party/blink/public/platform/resource_request_blocked_reason.h"
#include "ui/compositor/compositor_lock.h"
#include "url/origin.h"

@ -33,7 +33,7 @@
#include "third_party/blink/public/mojom/service_worker/service_worker_container.mojom.h"
#include "third_party/blink/public/mojom/service_worker/service_worker_container_type.mojom.h"
#include "third_party/blink/public/mojom/service_worker/service_worker_provider.mojom.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom.h"
#include "third_party/blink/public/mojom/webtransport/web_transport_connector.mojom.h"
#include "url/origin.h"

@ -60,7 +60,7 @@
#include "third_party/blink/public/mojom/service_worker/service_worker.mojom.h"
#include "third_party/blink/public/mojom/service_worker/service_worker_client.mojom.h"
#include "third_party/blink/public/mojom/service_worker/service_worker_event_status.mojom.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom.h"
#include "url/gurl.h"
#include "url/origin.h"

@ -17,7 +17,7 @@
#include "content/public/common/referrer.h"
#include "mojo/public/cpp/bindings/message.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom.h"
namespace content {

@ -1,3 +1,3 @@
include_rules = [
"+third_party/blink/public/mojom/web_feature/web_feature.mojom.h",
"+third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom.h",
]

@ -48,7 +48,7 @@
#include "third_party/blink/public/common/messaging/message_port_channel.h"
#include "third_party/blink/public/common/renderer_preferences/renderer_preferences.h"
#include "third_party/blink/public/mojom/renderer_preference_watcher.mojom.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom.h"
#include "third_party/blink/public/mojom/worker/shared_worker_info.mojom.h"
#include "third_party/blink/public/mojom/worker/worker_content_settings_proxy.mojom.h"

@ -54,7 +54,7 @@
#include "third_party/blink/public/common/loader/url_loader_throttle.h"
#include "third_party/blink/public/common/renderer_preferences/renderer_preferences.h"
#include "third_party/blink/public/common/storage_key/storage_key.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom.h"
namespace content {

@ -27,7 +27,7 @@
#include "ppapi/thunk/enter.h"
#include "third_party/blink/public/common/browser_interface_broker_proxy.h"
#include "third_party/blink/public/mojom/filesystem/file_system.mojom.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom.h"
#include "third_party/blink/public/platform/file_path_conversion.h"
#include "third_party/blink/public/platform/web_data.h"
#include "third_party/blink/public/platform/web_http_body.h"

@ -95,7 +95,7 @@
#include "third_party/blink/public/mojom/media/renderer_audio_input_stream_factory.mojom.h"
#include "third_party/blink/public/mojom/navigation/navigation_params.mojom-forward.h"
#include "third_party/blink/public/mojom/service_worker/service_worker_object.mojom.h"
#include "third_party/blink/public/mojom/use_counter/css_property_id.mojom.h"
#include "third_party/blink/public/mojom/use_counter/metrics/css_property_id.mojom.h"
#include "third_party/blink/public/platform/child_url_loader_factory_bundle.h"
#include "third_party/blink/public/platform/web_media_player.h"
#include "third_party/blink/public/platform/websocket_handshake_throttle_provider.h"

@ -31,7 +31,7 @@
#include "third_party/blink/public/mojom/service_worker/service_worker_registration.mojom-forward.h"
#include "third_party/blink/public/mojom/service_worker/service_worker_worker_client_registry.mojom.h"
#include "third_party/blink/public/mojom/timing/worker_timing_container.mojom-forward.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-forward.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-forward.h"
#include "third_party/blink/public/platform/modules/service_worker/web_service_worker_provider_client.h"
#include "third_party/blink/public/platform/modules/service_worker/web_service_worker_provider_context.h"

@ -35,7 +35,7 @@
#include "third_party/blink/public/mojom/service_worker/service_worker_object.mojom.h"
#include "third_party/blink/public/mojom/service_worker/service_worker_registration.mojom.h"
#include "third_party/blink/public/mojom/service_worker/service_worker_registration_options.mojom.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom.h"
#include "third_party/blink/public/platform/modules/service_worker/web_service_worker_provider_client.h"
#include "third_party/blink/public/platform/scheduler/test/renderer_scheduler_test_support.h"

@ -14,7 +14,7 @@
#include "third_party/blink/public/mojom/service_worker/service_worker_error_type.mojom-forward.h"
#include "third_party/blink/public/mojom/service_worker/service_worker_object.mojom-forward.h"
#include "third_party/blink/public/mojom/service_worker/service_worker_registration.mojom-forward.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-forward.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-forward.h"
#include "third_party/blink/public/platform/modules/service_worker/web_service_worker_provider.h"
namespace blink {

@ -16,7 +16,7 @@
#include "third_party/blink/common/privacy_budget/test_ukm_recorder.h"
#include "third_party/blink/public/common/privacy_budget/identifiable_surface.h"
#include "third_party/blink/public/common/privacy_budget/scoped_identifiability_test_sample_collector.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom.h"
namespace blink {

@ -6,8 +6,8 @@
#include "third_party/blink/public/common/user_agent/user_agent_metadata.h"
#include "third_party/blink/public/mojom/permissions_policy/permissions_policy_feature.mojom-shared.h"
#include "third_party/blink/public/mojom/use_counter/css_property_id.mojom-shared.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-shared.h"
#include "third_party/blink/public/mojom/use_counter/metrics/css_property_id.mojom-shared.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-shared.h"
namespace blink {

@ -5,8 +5,8 @@
#include "third_party/blink/common/use_counter/use_counter_feature_mojom_traits.h"
#include "third_party/blink/public/mojom/permissions_policy/permissions_policy_feature.mojom-shared.h"
#include "third_party/blink/public/mojom/use_counter/css_property_id.mojom-shared.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-shared.h"
#include "third_party/blink/public/mojom/use_counter/metrics/css_property_id.mojom-shared.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-shared.h"
namespace mojo {
namespace {

@ -14,7 +14,7 @@
#include "third_party/blink/public/common/privacy_budget/identifiable_sample.h"
#include "third_party/blink/public/common/privacy_budget/identifiable_surface.h"
#include "third_party/blink/public/common/privacy_budget/identifiable_token.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-forward.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-forward.h"
namespace blink {
@ -82,7 +82,7 @@ namespace blink {
//
// 1. A simple web exposed API that's represented using a |WebFeature|
// constant. Values are defined in
// blink/public/mojom/web_feature/web_feature.mojom.
// blink/public/mojom/use_counter/metrics/web_feature.mojom.
//
// identifiable_surface = IdentifiableSurface::FromTypeAndToken(
// IdentifiableSurface::Type::kWebFeature,

@ -10,7 +10,7 @@
#include "third_party/blink/public/common/common_export.h"
#include "third_party/blink/public/common/privacy_budget/identifiability_study_settings_provider.h"
#include "third_party/blink/public/common/privacy_budget/identifiable_surface.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-forward.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-forward.h"
namespace blink {

@ -95,7 +95,7 @@ class IdentifiableSurface {
// IdentifiableSurface = { mojom::WebFeature, kWebFeature }
// Value = IdentifiableToken( $(output of the attribute or method) )
//
// [1]: //blink/public/mojom/web_feature/web_feature.mojom
// [1]: //blink/public/mojom/use_counter/metrics/web_feature.mojom
kWebFeature = 1,
// Reserved 2.

@ -34,7 +34,7 @@
#include "services/network/public/mojom/ip_address_space.mojom-shared.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
#include "third_party/blink/public/common/common_export.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-shared.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-shared.h"
namespace blink {

@ -12,8 +12,8 @@
#include "third_party/blink/public/common/use_counter/use_counter_feature.h"
#include "third_party/blink/public/common/user_agent/user_agent_metadata.h"
#include "third_party/blink/public/mojom/permissions_policy/permissions_policy_feature.mojom-shared.h"
#include "third_party/blink/public/mojom/use_counter/css_property_id.mojom-shared.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-shared.h"
#include "third_party/blink/public/mojom/use_counter/metrics/css_property_id.mojom-shared.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-shared.h"
namespace blink {

@ -1420,8 +1420,8 @@ mojom_component("script_type_mojo_bindings") {
mojom_component("web_feature_mojo_bindings") {
generate_java = true
sources = [
"use_counter/css_property_id.mojom",
"web_feature/web_feature.mojom",
"use_counter/metrics/css_property_id.mojom",
"use_counter/metrics/web_feature.mojom",
]
macro_prefix = "WEB_FEATURE_MOJO_BINDINGS_MOJOM"

@ -64,7 +64,7 @@ import "third_party/blink/public/mojom/scroll/scroll_into_view_params.mojom";
import "third_party/blink/public/mojom/security_context/insecure_request_policy.mojom";
import "third_party/blink/public/mojom/timing/resource_timing.mojom";
import "third_party/blink/public/mojom/tokens/tokens.mojom";
import "third_party/blink/public/mojom/web_feature/web_feature.mojom";
import "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom";
import "ui/base/mojom/window_open_disposition.mojom";
import "ui/events/mojom/scroll_granularity.mojom";
import "ui/gfx/geometry/mojom/geometry.mojom";

@ -13,7 +13,7 @@ import "third_party/blink/public/mojom/service_worker/dispatch_fetch_event_param
import "third_party/blink/public/mojom/service_worker/service_worker_event_status.mojom";
import "third_party/blink/public/mojom/service_worker/service_worker_fetch_response_callback.mojom";
import "third_party/blink/public/mojom/service_worker/service_worker_object.mojom";
import "third_party/blink/public/mojom/web_feature/web_feature.mojom";
import "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom";
// Represents a service worker that is a 'controller'.
// (https://w3c.github.io/ServiceWorker/#navigator-service-worker-controller)

@ -26,7 +26,7 @@ import "third_party/blink/public/mojom/tokens/tokens.mojom";
import "third_party/blink/public/mojom/user_agent/user_agent_metadata.mojom";
import "third_party/blink/public/mojom/worker/worker_content_settings_proxy.mojom";
import "third_party/blink/public/mojom/worker/worker_main_script_load_params.mojom";
import "third_party/blink/public/mojom/web_feature/web_feature.mojom";
import "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom";
import "url/mojom/url.mojom";
// Parameters to launch a service worker. This is passed from the browser to the

@ -13,7 +13,7 @@ import "third_party/blink/public/mojom/service_worker/service_worker_error_type.
import "third_party/blink/public/mojom/service_worker/service_worker_object.mojom";
import "third_party/blink/public/mojom/service_worker/service_worker_registration.mojom";
import "third_party/blink/public/mojom/service_worker/service_worker_registration_options.mojom";
import "third_party/blink/public/mojom/web_feature/web_feature.mojom";
import "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom";
import "url/mojom/url.mojom";
// Used for EnsureControllerServiceWorker() to indicate why a controllee needs

@ -1,7 +1,4 @@
dcheng@chromium.org
# Changes in css_property_id.mojom are always mechanical updates to
# kMaximumCSSSampleId, so no IPC security review is required; all committers can
# approve changes. See also UseCounterHelperTest.MaximumCSSSampleId, which
# verifies the correctness of kMaximumCSSSampleId.
per-file css_property_id.mojom=*
per-file *.mojom=set noparent
per-file *.mojom=file://ipc/SECURITY_OWNERS

@ -1,68 +0,0 @@
# Copyright 2019 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Blink frame presubmit script
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmit API built into gcl.
This script generates enums.xml based on the css_property_id.mojom and verifies
that it is equivalent with the expected file in the patch otherwise warns the
user.
"""
import sys
USE_PYTHON3 = True
def _RunUmaHistogramChecks(input_api, output_api):
original_sys_path = sys.path
try:
sys.path = sys.path + [
input_api.os_path.join(input_api.PresubmitLocalPath(), '..', '..',
'..', '..', '..', 'tools', 'metrics',
'histograms')
]
import update_histogram_enum # pylint: disable=F0401
import update_use_counter_css # pylint: disable=F0401
finally:
sys.path = original_sys_path
source_path = 'third_party/blink/public/mojom/use_counter/'\
'css_property_id.mojom'
if not source_path in [f.LocalPath() for f in input_api.AffectedFiles()]:
return []
# Note: This is similar to update_histogram_enum.CheckPresubmitErrors except
# that we use the logic in update_use_counter_css to produce the enum
# values.
histogram_enum_name = 'MappedCSSProperties'
update_script_name = 'update_use_counter_css.py'
def read_values(source_path, start_marker, end_marker, strip_k_prefix):
return update_use_counter_css.ReadCssProperties(source_path)
error = update_histogram_enum.CheckPresubmitErrors(
histogram_enum_name,
update_script_name,
source_path,
'',
'',
histogram_value_reader=read_values)
if error:
return [output_api.PresubmitPromptWarning(error, items=[source_path])]
return []
def CheckChangeOnUpload(input_api, output_api):
return _RunUmaHistogramChecks(input_api, output_api)
def CheckChangeOnCommit(input_api, output_api):
return _RunUmaHistogramChecks(input_api, output_api)

@ -1,3 +1,9 @@
# Changes in css_property_id.mojom are always mechanical updates to
# kMaximumCSSSampleId, so no IPC security review is required; all committers can
# approve changes. See also UseCounterHelperTest.MaximumCSSSampleId, which
# verifies the correctness of kMaximumCSSSampleId.
per-file css_property_id.mojom=*
# OWNERS review for adding / removing UseCounters already happens as part of
# reviewing the actual implementation changes (which is often, but not always
# in blink/renderer/core). No additional review (including IPC security review)

@ -0,0 +1,61 @@
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Blink presubmit script for use counter metrics enums.
See https://www.chromium.org/developers/how-tos/depottools/presubmit-scripts/
for more details about the presubmit API built into gcl.
"""
PRESUBMIT_VERSION = '2.0.0'
USE_PYTHON3 = True
def CheckHistograms(input_api, output_api): # pylint: disable=C0103
import sys
original_sys_path = sys.path.copy()
try:
sys.path.append(
input_api.os_path.join(input_api.change.RepositoryRoot(), 'tools',
'metrics', 'histograms'))
import update_histogram_enum # pylint: disable=F0401
import update_use_counter_css # pylint: disable=F0401
finally:
sys.path = original_sys_path
def _CssPropertyValueReader(source_path, start_marker, end_marker,
strip_k_prefix):
return update_use_counter_css.ReadCssProperties(source_path)
_VALIDATE_HISTOGRAM_ARGS = {
'third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom':
{
'update_script_name': 'update_use_counter_feature_enum.py',
'histogram_enum_name': 'FeatureObserver',
'start_marker': '^enum WebFeature {',
'end_marker': '^kNumberOfFeatures',
'strip_k_prefix': True,
},
'third_party/blink/public/mojom/use_counter/metrics/css_property_id.mojom':
{
'update_script_name': 'update_use_counter_css.py',
'histogram_enum_name': 'MappedCSSProperties',
'start_marker': '',
'end_marker': '',
'histogram_value_reader': _CssPropertyValueReader,
},
}
results = []
for f in input_api.AffectedFiles():
if f.LocalPath() not in _VALIDATE_HISTOGRAM_ARGS:
continue
presubmit_error = update_histogram_enum.CheckPresubmitErrors(
source_enum_path=f.LocalPath(),
**_VALIDATE_HISTOGRAM_ARGS[f.LocalPath()])
if presubmit_error:
results.append(
output_api.PresubmitPromptWarning(presubmit_error,
items=[f.LocalPath()]))
return results

@ -1,60 +0,0 @@
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Blink frame presubmit script
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmit API built into gcl.
"""
USE_PYTHON3 = True
def _RunUmaHistogramChecks(input_api, output_api): # pylint: disable=C0103
import sys
original_sys_path = sys.path
try:
sys.path = sys.path + [
input_api.os_path.join(input_api.PresubmitLocalPath(), '..', '..',
'..', '..', '..', 'tools', 'metrics',
'histograms')
]
import update_histogram_enum # pylint: disable=F0401
finally:
sys.path = original_sys_path
for f in input_api.AffectedFiles():
if f.LocalPath().endswith('web_feature.mojom'):
break
else:
return []
source_path = 'third_party/blink/public/mojom/web_feature/web_feature.mojom'
start_marker = '^enum WebFeature {'
end_marker = '^kNumberOfFeatures'
presubmit_error = update_histogram_enum.CheckPresubmitErrors(
histogram_enum_name='FeatureObserver',
update_script_name='update_use_counter_feature_enum.py',
source_enum_path=source_path,
start_marker=start_marker,
end_marker=end_marker,
strip_k_prefix=True)
if presubmit_error:
return [
output_api.PresubmitPromptWarning(
presubmit_error, items=[source_path])
]
return []
def CheckChangeOnUpload(input_api, output_api): # pylint: disable=C0103
results = []
results.extend(_RunUmaHistogramChecks(input_api, output_api))
return results
def CheckChangeOnCommit(input_api, output_api): # pylint: disable=C0103
results = []
results.extend(_RunUmaHistogramChecks(input_api, output_api))
return results

@ -5,7 +5,7 @@
module blink.mojom;
import "third_party/blink/public/mojom/worker/shared_worker_creation_context_type.mojom";
import "third_party/blink/public/mojom/web_feature/web_feature.mojom";
import "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom";
// An interface used by clients (e.g., the renderer where "new SharedWorker()"
// was invoked) to observe events from a shared worker.

@ -4,7 +4,7 @@
module blink.mojom;
import "third_party/blink/public/mojom/web_feature/web_feature.mojom";
import "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom";
import "third_party/blink/public/mojom/devtools/devtools_agent.mojom";
// Each shared worker has a corresponding host. The host controls the lifetime

@ -32,7 +32,7 @@
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_MODULES_SERVICE_WORKER_WEB_SERVICE_WORKER_PROVIDER_CLIENT_H_
#include "third_party/blink/public/common/messaging/transferable_message.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-shared.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-shared.h"
#include "third_party/blink/public/platform/modules/service_worker/web_service_worker_object_info.h"
#include "third_party/blink/public/platform/web_common.h"
#include "third_party/blink/public/platform/web_vector.h"

@ -36,7 +36,7 @@
#include "third_party/blink/public/mojom/devtools/console_message.mojom-shared.h"
#include "third_party/blink/public/mojom/devtools/devtools_agent.mojom-shared.h"
#include "third_party/blink/public/mojom/service_worker/service_worker_event_status.mojom-shared.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-shared.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-shared.h"
#include "third_party/blink/public/platform/cross_variant_mojo_util.h"
#include "third_party/blink/public/platform/modules/service_worker/web_service_worker_fetch_context.h"
#include "third_party/blink/public/platform/web_url.h"

@ -37,7 +37,7 @@
#include "third_party/blink/public/mojom/permissions_policy/permissions_policy.mojom-shared.h"
#include "third_party/blink/public/mojom/portal/portal.mojom-shared.h"
#include "third_party/blink/public/mojom/selection_menu/selection_menu_behavior.mojom-shared.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-shared.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-shared.h"
#include "third_party/blink/public/platform/cross_variant_mojo_util.h"
#include "third_party/blink/public/platform/task_type.h"
#include "third_party/blink/public/platform/web_common.h"

@ -32,7 +32,7 @@
#include <tuple>
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-blink.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-blink.h"
#include "third_party/blink/renderer/bindings/core/v8/binding_security.h"
#include "third_party/blink/renderer/bindings/core/v8/script_evaluation_result.h"
#include "third_party/blink/renderer/bindings/core/v8/script_value.h"

@ -5,7 +5,7 @@
#include "third_party/blink/renderer/bindings/core/v8/serialization/v8_script_value_serializer.h"
#include "base/auto_reset.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-blink.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-blink.h"
#include "third_party/blink/public/platform/web_blob_info.h"
#include "third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h"
#include "third_party/blink/renderer/bindings/core/v8/to_v8_for_core.h"

@ -6,7 +6,7 @@
#include "third_party/blink/renderer/core/css/{{file_basename}}.h"
#include <string.h>
#include "third_party/blink/public/mojom/use_counter/css_property_id.mojom-blink.h"
#include "third_party/blink/public/mojom/use_counter/metrics/css_property_id.mojom-blink.h"
#include "third_party/blink/renderer/core/css/hash_tools.h"
#include "third_party/blink/renderer/platform/wtf/text/ascii_ctype.h"
#include "third_party/blink/renderer/platform/wtf/text/atomic_string.h"

@ -5,7 +5,7 @@
#define THIRD_PARTY_BLINK_RENDERER_CORE_CSS_CSS_PROPERTY_NAMES_H_
#include <stddef.h>
#include "third_party/blink/public/mojom/use_counter/css_property_id.mojom-blink-forward.h"
#include "third_party/blink/public/mojom/use_counter/metrics/css_property_id.mojom-blink-forward.h"
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
#include "third_party/blink/renderer/platform/wtf/hash_functions.h"

@ -30,7 +30,7 @@
#include "third_party/blink/renderer/core/css/resolver/style_resolver.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-blink.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-blink.h"
#include "third_party/blink/renderer/core/animation/css/compositor_keyframe_value_factory.h"
#include "third_party/blink/renderer/core/animation/css/css_animations.h"
#include "third_party/blink/renderer/core/animation/document_animations.h"

@ -22,7 +22,7 @@
#include "third_party/blink/renderer/core/css/resolver/style_resolver_state.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-blink.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-blink.h"
#include "third_party/blink/renderer/core/animation/css/css_animations.h"
#include "third_party/blink/renderer/core/css/css_light_dark_value_pair.h"
#include "third_party/blink/renderer/core/css/css_property_value_set.h"

@ -4,7 +4,7 @@
#include "third_party/blink/renderer/core/display_lock/display_lock_utilities.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-blink.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-blink.h"
#include "third_party/blink/renderer/core/display_lock/display_lock_context.h"
#include "third_party/blink/renderer/core/display_lock/display_lock_document_state.h"
#include "third_party/blink/renderer/core/dom/element.h"

@ -4,7 +4,7 @@
#include "third_party/blink/renderer/core/events/pointer_event.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-blink.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-blink.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_pointer_event_init.h"
#include "third_party/blink/renderer/core/dom/element.h"
#include "third_party/blink/renderer/core/dom/events/event_dispatcher.h"

@ -34,7 +34,7 @@
#include "third_party/blink/public/mojom/permissions_policy/permissions_policy.mojom-blink.h"
#include "third_party/blink/public/mojom/permissions_policy/policy_value.mojom-blink.h"
#include "third_party/blink/public/mojom/security_context/insecure_request_policy.mojom-blink.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-shared.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-shared.h"
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/platform/weborigin/scheme_registry.h"

@ -32,7 +32,7 @@
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "third_party/blink/public/common/blob/blob_utils.h"
#include "third_party/blink/public/mojom/blob/blob_registry.mojom-blink.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-blink.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-blink.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/core/fileapi/url_registry.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"

@ -10,7 +10,7 @@
#include "third_party/blink/public/common/messaging/message_port_channel.h"
#include "third_party/blink/public/common/tokens/tokens.h"
#include "third_party/blink/public/mojom/messaging/delegated_capability.mojom-blink.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-blink-forward.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-blink-forward.h"
#include "third_party/blink/renderer/bindings/core/v8/serialization/transferables.h"
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/core/dom/events/event_target.h"

@ -25,7 +25,7 @@
#include "third_party/blink/renderer/core/frame/history.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-shared.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-shared.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/core/frame/history_util.h"

@ -58,7 +58,7 @@
#include "third_party/blink/public/mojom/loader/pause_subresource_loading_handle.mojom-blink-forward.h"
#include "third_party/blink/public/mojom/navigation/renderer_eviction_reason.mojom-blink-forward.h"
#include "third_party/blink/public/mojom/reporting/reporting.mojom-blink-forward.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-blink-forward.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-blink-forward.h"
#include "third_party/blink/public/platform/task_type.h"
#include "third_party/blink/public/web/web_script_execution_callback.h"
#include "third_party/blink/renderer/core/core_export.h"

@ -5,9 +5,9 @@
#include "third_party/blink/renderer/core/frame/navigator_device_memory.h"
#include "third_party/blink/public/common/device_memory/approximated_device_memory.h"
#include "third_party/blink/public/common/privacy_budget/identifiability_metrics.h"
#include "third_party/blink/public/common/privacy_budget/identifiability_metric_builder.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-shared.h"
#include "third_party/blink/public/common/privacy_budget/identifiability_metrics.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-shared.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"

@ -11,7 +11,7 @@
#include "third_party/blink/public/common/privacy_budget/identifiable_surface.h"
#include "third_party/blink/public/common/privacy_budget/identifiable_token.h"
#include "third_party/blink/public/common/privacy_budget/identifiable_token_builder.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-blink.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-blink.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_ua_data_values.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"

@ -4,7 +4,7 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/scheme_registry.h"
#include "third_party/blink/public/mojom/use_counter/css_property_id.mojom-blink.h"
#include "third_party/blink/public/mojom/use_counter/metrics/css_property_id.mojom-blink.h"
#include "third_party/blink/renderer/core/css/css_property_names.h"
#include "third_party/blink/renderer/core/css/properties/css_property.h"
#include "third_party/blink/renderer/core/dom/shadow_root.h"

@ -9,7 +9,7 @@
// is heavy on the compiler. Those who do not need the definition, but could do
// with just a forward-declaration, should include WebFeatureForward.h instead.
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-blink.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-blink.h"
namespace blink {
using WebFeature = mojom::WebFeature;

@ -9,7 +9,7 @@
#include "third_party/blink/public/common/fenced_frame/fenced_frame_utils.h"
#include "third_party/blink/public/common/frame/fenced_frame_sandbox_flags.h"
#include "third_party/blink/public/mojom/devtools/console_message.mojom-blink.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-blink.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-blink.h"
#include "third_party/blink/renderer/core/css/style_change_reason.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/dom/shadow_root.h"

@ -6,7 +6,7 @@
#include <utility>
#include "third_party/blink/public/mojom/loader/referrer.mojom-blink.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-blink.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-blink.h"
#include "third_party/blink/renderer/bindings/core/v8/js_event_handler_for_content_attribute.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h"

@ -35,7 +35,7 @@
#include "third_party/blink/public/common/input/web_input_event.h"
#include "third_party/blink/public/common/input/web_mouse_wheel_event.h"
#include "third_party/blink/public/mojom/frame/user_activation_notification_type.mojom-blink.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-blink.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-blink.h"
#include "third_party/blink/public/platform/task_type.h"
#include "third_party/blink/renderer/core/clipboard/data_transfer.h"
#include "third_party/blink/renderer/core/dom/document.h"

@ -9,7 +9,7 @@
#include "base/numerics/clamped_math.h"
#include "base/time/time.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-blink.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-blink.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_intersection_observer_callback.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_intersection_observer_delegate.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_intersection_observer_init.h"

@ -29,7 +29,7 @@
#include <memory>
#include <utility>
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-blink.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-blink.h"
#include "third_party/blink/renderer/core/frame/local_frame_view.h"
#include "third_party/blink/renderer/core/layout/grid_layout_utils.h"
#include "third_party/blink/renderer/core/layout/layout_state.h"

@ -4,7 +4,7 @@
#include "third_party/blink/renderer/core/layout/svg/transform_helper.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-blink.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-blink.h"
#include "third_party/blink/renderer/core/layout/layout_object.h"
#include "third_party/blink/renderer/core/style/computed_style.h"
#include "third_party/blink/renderer/core/svg/svg_element.h"

@ -4,7 +4,7 @@
#include "third_party/blink/renderer/core/loader/web_bundle/script_web_bundle.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-blink.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-blink.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/core/html/cross_origin_attribute.h"

@ -22,7 +22,7 @@
#include "third_party/blink/renderer/core/paint/theme_painter.h"
#include "build/build_config.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-shared.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-shared.h"
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/renderer/core/dom/shadow_root.h"
#include "third_party/blink/renderer/core/frame/local_frame_view.h"

@ -27,7 +27,7 @@
#include "third_party/abseil-cpp/absl/types/optional.h"
#include "third_party/blink/public/mojom/script/script_type.mojom-shared.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-blink.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-blink.h"
#include "third_party/blink/renderer/bindings/core/v8/script_controller.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.h"
#include "third_party/blink/renderer/core/dom/document.h"

@ -5,7 +5,7 @@
#include "third_party/blink/renderer/core/script/value_wrapper_synthetic_module_script.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-blink.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-blink.h"
#include "third_party/blink/public/platform/web_vector.h"
#include "third_party/blink/renderer/bindings/core/v8/to_v8_traits.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.h"

@ -4,7 +4,7 @@
#include "third_party/blink/renderer/core/trustedtypes/trusted_type_policy_factory.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-blink.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-blink.h"
#include "third_party/blink/renderer/bindings/core/v8/script_value.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_trusted_html.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_trusted_script.h"

@ -35,7 +35,7 @@
#include "services/metrics/public/cpp/mojo_ukm_recorder.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-blink.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-blink.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-blink.h"
#include "third_party/blink/renderer/bindings/core/v8/source_location.h"
#include "third_party/blink/renderer/bindings/core/v8/worker_or_worklet_script_controller.h"
#include "third_party/blink/renderer/core/event_target_names.h"

@ -13,7 +13,7 @@
#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-blink.h"
#include "third_party/blink/public/mojom/loader/content_security_notifier.mojom-blink.h"
#include "third_party/blink/public/mojom/security_context/insecure_request_policy.mojom-blink.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-blink.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-blink.h"
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/public/platform/task_type.h"
#include "third_party/blink/public/platform/web_content_security_policy_struct.h"

@ -7,7 +7,7 @@
#include "base/task/single_thread_task_runner.h"
#include "services/network/public/mojom/fetch_api.mojom-blink.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-blink.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-blink.h"
#include "third_party/blink/public/platform/task_type.h"
#include "third_party/blink/public/platform/web_url_request.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h"

@ -4,7 +4,7 @@
#include "third_party/blink/renderer/modules/accessibility/ax_sparse_attribute_setter.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-blink.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-blink.h"
#include "third_party/blink/renderer/core/dom/qualified_name.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/modules/accessibility/ax_object_cache_impl.h"

@ -11,7 +11,7 @@
#include "third_party/blink/public/common/privacy_budget/identifiability_metric_builder.h"
#include "third_party/blink/public/common/privacy_budget/identifiable_surface.h"
#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-blink.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-blink.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-blink.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_union_request_usvstring.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_cache_query_options.h"

@ -4,7 +4,7 @@
#include "third_party/blink/renderer/modules/breakout_box/media_stream_track_generator.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-blink.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-blink.h"
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_media_stream_track_generator_init.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"

@ -4,7 +4,7 @@
#include "third_party/blink/renderer/modules/breakout_box/media_stream_track_processor.h"
#include "third_party/blink/public/mojom/web_feature/web_feature.mojom-blink.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-blink.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_media_stream_track_processor_init.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/core/streams/readable_stream.h"

Some files were not shown because too many files have changed in this diff Show More