diff --git a/BUILD.gn b/BUILD.gn index ccf7c5e5..480e574c 100644 --- a/BUILD.gn +++ b/BUILD.gn
@@ -1536,7 +1536,7 @@ data = [ "//third_party/blink/web_tests/FlagSpecificConfig", "//third_party/blink/web_tests/WebGPUExpectations", - "//third_party/blink/web_tests/external/wpt/webgpu/", + "//third_party/blink/web_tests/wpt_internal/", "//third_party/webgpu-cts/scripts/", ] }
diff --git a/DEPS b/DEPS index a9cc3f4..076f2ab 100644 --- a/DEPS +++ b/DEPS
@@ -280,11 +280,11 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling Skia # and whatever else without interference from each other. - 'skia_revision': '530759a6af1f89aa57ad4d22ab75ecaf2a069f75', + 'skia_revision': 'bdd0205ae470610e70420e545fe952cdbae7ab48', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling V8 # and whatever else without interference from each other. - 'v8_revision': '98eebd6178b516440aba5dda369d15fa4442dff2', + 'v8_revision': '858f681e0d0324372ade44a4b88254632f1b6f7b', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling ANGLE # and whatever else without interference from each other. @@ -307,7 +307,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling Fuchsia sdk # and whatever else without interference from each other. - 'fuchsia_version': 'version:8.20220623.1.1', + 'fuchsia_version': 'version:8.20220623.3.1', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling google-toolbox-for-mac # and whatever else without interference from each other. @@ -351,7 +351,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling catapult # and whatever else without interference from each other. - 'catapult_revision': 'd44f2956da22a8e0a2a55da3c00476889dea1868', + 'catapult_revision': '3236751e83850cf192b0d6017a0ba34542653592', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling libFuzzer # and whatever else without interference from each other. @@ -359,7 +359,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling devtools-frontend # and whatever else without interference from each other. - 'devtools_frontend_revision': 'c0d96d6aa7cc0dfc7d62221b7824705c90c69b83', + 'devtools_frontend_revision': '69ed2407734d98fdbaaabaac91fb679ca73bd88c', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling libprotobuf-mutator # and whatever else without interference from each other. @@ -760,7 +760,7 @@ }, 'src/ios/third_party/earl_grey2/src': { - 'url': Var('chromium_git') + '/external/github.com/google/EarlGrey.git' + '@' + '74d850b12a67049346a92073b7cb95a6293ceb50', + 'url': Var('chromium_git') + '/external/github.com/google/EarlGrey.git' + '@' + 'dbe7b8f25d65fd3f7d5c669d9164eb445da0543d', 'condition': 'checkout_ios', }, @@ -929,7 +929,7 @@ 'packages': [ { 'package': 'chromium/third_party/androidx', - 'version': 'ffRu7ou3A-tWC0cp9INlqplJN090p9v3saKCut6KJZ8C', + 'version': '4P3G5yy2a9JRgJERG8h3ApAoreMO-OjDG4RMhEcnZDYC', }, ], 'condition': 'checkout_android', @@ -980,6 +980,17 @@ 'dep_type': 'cipd', }, + 'src/third_party/android_lint': { + 'packages': [ + { + 'package': 'chromium/third_party/android_lint', + 'version': 'f5g1G8eyExIUPHk4lH3xx_xV4pza9WSBaITgmLPgF2cC', + }, + ], + 'condition': 'checkout_android', + 'dep_type': 'cipd', + }, + 'src/third_party/android_sdk/androidx_browser/src': { 'url': Var('chromium_git') + '/external/gob/android/platform/frameworks/support/browser.git' + '@' + '65086eb5e52c16778fa7b4f157156d17b176fcb3', 'condition': 'checkout_android', @@ -1145,7 +1156,7 @@ }, 'src/third_party/depot_tools': - Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + '1d5d7803fa53fb3a86684d45fa968ea05330dbf1', + Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + 'd9a9c40738a9408a305a591a270e93db31ebcf82', 'src/third_party/devtools-frontend/src': Var('chromium_git') + '/devtools/devtools-frontend' + '@' + Var('devtools_frontend_revision'), @@ -1542,7 +1553,7 @@ }, 'src/third_party/perfetto': - Var('android_git') + '/platform/external/perfetto.git' + '@' + 'd3300e34ed8ad844a4f18a9067cac38b0d950dbc', + Var('android_git') + '/platform/external/perfetto.git' + '@' + '2d2d50afec5365cdb39f1e9af40ab8fdde5387d8', 'src/third_party/perl': { 'url': Var('chromium_git') + '/chromium/deps/perl.git' + '@' + '6f3e5028eb65d0b4c5fdd792106ac4c84eee1eb3', @@ -1712,7 +1723,7 @@ Var('chromium_git') + '/external/github.com/gpuweb/cts.git' + '@' + 'cef4c767813032183d4554d3ba2dc6f1999988b9', 'src/third_party/webrtc': - Var('webrtc_git') + '/src.git' + '@' + 'da843fee1a420542d579f6aa2910ccb7c2f2ccb6', + Var('webrtc_git') + '/src.git' + '@' + '5dc460fca5987fd33bb5d8b145e65a8d8e43974f', 'src/third_party/libgifcodec': Var('skia_git') + '/libgifcodec' + '@'+ Var('libgifcodec_revision'), @@ -1785,7 +1796,7 @@ Var('chromium_git') + '/v8/v8.git' + '@' + Var('v8_revision'), 'src-internal': { - 'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@9568d0745e60c99787ea5b35ad249b65ad3b9e22', + 'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@52f7a151aba85a8ec25e7146c7ce4de090da6a34', 'condition': 'checkout_src_internal', },
diff --git a/ash/BUILD.gn b/ash/BUILD.gn index 1fde6869..b34f3dfd 100644 --- a/ash/BUILD.gn +++ b/ash/BUILD.gn
@@ -2220,6 +2220,7 @@ "//cc/debug", "//cc/paint:paint", "//chromeos/ash/components/assistant:buildflags", + "//chromeos/ash/components/dbus/audio", "//chromeos/ash/components/dbus/hammerd", "//chromeos/ash/components/dbus/rgbkbd", "//chromeos/ash/components/dbus/rmad", @@ -2237,7 +2238,6 @@ "//chromeos/components/webauthn", "//chromeos/crosapi/cpp", "//chromeos/dbus", - "//chromeos/dbus/audio", "//chromeos/dbus/constants", "//chromeos/dbus/hermes", "//chromeos/dbus/human_presence", @@ -3022,6 +3022,7 @@ "//cc:test_support", "//chromeos:test_support", "//chromeos/ash/components/assistant:buildflags", + "//chromeos/ash/components/dbus/audio", "//chromeos/ash/components/dbus/hammerd", "//chromeos/ash/components/dbus/rgbkbd", "//chromeos/ash/components/dbus/services:test_support", @@ -3037,7 +3038,6 @@ "//chromeos/constants", "//chromeos/crosapi/cpp", "//chromeos/dbus:test_support", - "//chromeos/dbus/audio", "//chromeos/dbus/hermes", "//chromeos/dbus/human_presence", "//chromeos/dbus/human_presence:hps_proto", @@ -3170,8 +3170,8 @@ test("ash_pixeltests") { sources = [ - "test/ash_pixel_diff_test_base.cc", - "test/ash_pixel_diff_test_base.h", + "test/ash_pixel_diff_test_helper.cc", + "test/ash_pixel_diff_test_helper.h", "test/demo_ash_pixel_diff_test.cc", ] @@ -3355,6 +3355,8 @@ "test/ash_test_helper.h", "test/ash_test_suite.cc", "test/ash_test_suite.h", + "test/ash_test_ui_stabilizer.cc", + "test/ash_test_ui_stabilizer.h", "test/ash_test_util.cc", "test/ash_test_util.h", "test/ash_test_views_delegate.cc", @@ -3456,13 +3458,13 @@ "//base:i18n", "//base/test:test_support", "//cc:test_support", + "//chromeos/ash/components/dbus/audio", "//chromeos/ash/components/dbus/rgbkbd", "//chromeos/ash/components/dbus/system_clock", "//chromeos/ash/components/network:test_support", "//chromeos/ash/services/assistant:test_support", "//chromeos/ash/services/assistant/public/cpp", "//chromeos/dbus:test_support", - "//chromeos/dbus/audio", "//chromeos/dbus/power", "//chromeos/dbus/power:power_manager_proto", "//chromeos/login/login_state",
diff --git a/ash/accelerators/accelerator_controller_impl.cc b/ash/accelerators/accelerator_controller_impl.cc index 30e48a38..02af42b 100644 --- a/ash/accelerators/accelerator_controller_impl.cc +++ b/ash/accelerators/accelerator_controller_impl.cc
@@ -689,13 +689,21 @@ capture_mode_controller->Start(entry_type); } -void HandleTakeWindowScreenshot() { +void MaybeHandleTakeWindowScreenshot() { + // If a capture mode session is already running, this shortcut will be treated + // as a no-op. + if (CaptureModeController::Get()->IsActive()) + return; base::RecordAction(UserMetricsAction("Accel_Take_Window_Screenshot")); EnterImageCaptureMode(CaptureModeSource::kWindow, CaptureModeEntryType::kAccelTakeWindowScreenshot); } -void HandleTakePartialScreenshot() { +void MaybeHandleTakePartialScreenshot() { + // If a capture mode session is already running, this shortcut will be treated + // as a no-op. + if (CaptureModeController::Get()->IsActive()) + return; base::RecordAction(UserMetricsAction("Accel_Take_Partial_Screenshot")); EnterImageCaptureMode(CaptureModeSource::kRegion, CaptureModeEntryType::kAccelTakePartialScreenshot); @@ -884,9 +892,9 @@ } } - const WMEvent event(action == WINDOW_CYCLE_SNAP_LEFT - ? WM_EVENT_CYCLE_SNAP_PRIMARY - : WM_EVENT_CYCLE_SNAP_SECONDARY); + const WindowSnapWMEvent event(action == WINDOW_CYCLE_SNAP_LEFT + ? WM_EVENT_CYCLE_SNAP_PRIMARY + : WM_EVENT_CYCLE_SNAP_SECONDARY); aura::Window* active_window = window_util::GetActiveWindow(); DCHECK(active_window); @@ -2342,13 +2350,13 @@ HandleCycleUser(CycleUserDirection::PREVIOUS); break; case TAKE_PARTIAL_SCREENSHOT: - HandleTakePartialScreenshot(); + MaybeHandleTakePartialScreenshot(); break; case TAKE_SCREENSHOT: HandleTakeScreenshot(accelerator.key_code()); break; case TAKE_WINDOW_SCREENSHOT: - HandleTakeWindowScreenshot(); + MaybeHandleTakeWindowScreenshot(); break; case TOGGLE_APP_LIST: HandleToggleAppList(accelerator, kSearchKey);
diff --git a/ash/accelerators/accelerator_controller_unittest.cc b/ash/accelerators/accelerator_controller_unittest.cc index 0a0ca28..3a884ba 100644 --- a/ash/accelerators/accelerator_controller_unittest.cc +++ b/ash/accelerators/accelerator_controller_unittest.cc
@@ -2688,6 +2688,40 @@ } } +// Tests that the shortcuts for starting another screen capture session will be +// treated as no-op if a capture session is already running. +TEST_F(AccessibilityAcceleratorTester, + DisableScreenCaptureAcceleratorsIfSessionIsActive) { + auto* controller = CaptureModeController::Get(); + EXPECT_FALSE(controller->IsActive()); + + // Start a window capture session. + EXPECT_TRUE(ProcessInController(ui::Accelerator( + ui::VKEY_MEDIA_LAUNCH_APP1, ui::EF_ALT_DOWN | ui::EF_CONTROL_DOWN))); + EXPECT_TRUE(controller->IsActive()); + EXPECT_EQ(CaptureModeSource::kWindow, controller->source()); + + // Accelerators for partial screenshot will be a no-op if a + // session is already running. + EXPECT_TRUE(ProcessInController(ui::Accelerator( + ui::VKEY_MEDIA_LAUNCH_APP1, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN))); + EXPECT_EQ(CaptureModeSource::kWindow, controller->source()); + + controller->Stop(); + + // Start a partial screenshot capture session. + EXPECT_TRUE(ProcessInController(ui::Accelerator( + ui::VKEY_MEDIA_LAUNCH_APP1, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN))); + EXPECT_TRUE(controller->IsActive()); + EXPECT_EQ(CaptureModeSource::kRegion, controller->source()); + + // Accelerators for window screenshot will be a no-op if a + // session is already running. + EXPECT_TRUE(ProcessInController(ui::Accelerator( + ui::VKEY_MEDIA_LAUNCH_APP1, ui::EF_ALT_DOWN | ui::EF_CONTROL_DOWN))); + EXPECT_EQ(CaptureModeSource::kRegion, controller->source()); +} + struct MediaSessionAcceleratorTestConfig { // Runs the test with the media session service enabled. bool service_enabled;
diff --git a/ash/ambient/ui/media_string_view.cc b/ash/ambient/ui/media_string_view.cc index 9033cd8c..c122a66 100644 --- a/ash/ambient/ui/media_string_view.cc +++ b/ash/ambient/ui/media_string_view.cc
@@ -132,7 +132,19 @@ views::View::OnThemeChanged(); media_text_->SetShadows(ambient::util::GetTextShadowValues( GetColorProvider(), settings_.text_shadow_elevation)); + + const bool dark_mode_enabled = AshColorProvider::Get()->IsDarkModeEnabled(); + DCHECK(icon_); + icon_->SetImage(gfx::CreateVectorIcon(kMusicNoteIcon, kMusicNoteIconSizeDip, + dark_mode_enabled + ? settings_.icon_dark_mode_color + : settings_.icon_light_mode_color)); + DCHECK(media_text_); + media_text_->SetEnabledColor(dark_mode_enabled + ? settings_.text_dark_mode_color + : settings_.text_light_mode_color); } + void MediaStringView::OnViewBoundsChanged(views::View* observed_view) { UpdateMaskLayer(); } @@ -198,18 +210,6 @@ ScheduleScrolling(/*is_initial=*/false); } -void MediaStringView::OnColorModeChanged(bool dark_mode_enabled) { - DCHECK(icon_); - icon_->SetImage(gfx::CreateVectorIcon(kMusicNoteIcon, kMusicNoteIconSizeDip, - dark_mode_enabled - ? settings_.icon_dark_mode_color - : settings_.icon_light_mode_color)); - DCHECK(media_text_); - media_text_->SetEnabledColor(dark_mode_enabled - ? settings_.text_dark_mode_color - : settings_.text_light_mode_color); -} - void MediaStringView::InitLayout() { // This view will be drawn on its own layer instead of the layer of // |PhotoView| which has a solid black background. @@ -262,10 +262,6 @@ media_text_->SetBorder(views::CreateEmptyBorder( gfx::Insets::TLBR(-shadow_insets.bottom(), 0, -shadow_insets.top(), 0))); - color_provider_observer_.Observe(AshColorProvider::Get()); - // Call OnColorModeChanged() directly to capture the initial dark-mode value. - OnColorModeChanged(AshColorProvider::Get()->IsDarkModeEnabled()); - BindMediaControllerObserver(); }
diff --git a/ash/ambient/ui/media_string_view.h b/ash/ambient/ui/media_string_view.h index bb19431..5c4b5e7 100644 --- a/ash/ambient/ui/media_string_view.h +++ b/ash/ambient/ui/media_string_view.h
@@ -7,8 +7,6 @@ #include <memory> -#include "ash/public/cpp/style/color_mode_observer.h" -#include "ash/style/ash_color_provider.h" #include "base/scoped_observation.h" #include "mojo/public/cpp/bindings/receiver.h" #include "mojo/public/cpp/bindings/remote.h" @@ -35,8 +33,7 @@ class MediaStringView : public views::View, public views::ViewObserver, public media_session::mojom::MediaControllerObserver, - public ui::ImplicitAnimationObserver, - public ColorModeObserver { + public ui::ImplicitAnimationObserver { public: struct Settings { SkColor icon_light_mode_color; @@ -75,9 +72,6 @@ // ui::ImplicitAnimationObserver: void OnImplicitAnimationsCompleted() override; - // ColorModeObserver: - void OnColorModeChanged(bool dark_mode_enabled) override; - private: friend class AmbientAshTestBase; @@ -121,9 +115,6 @@ base::ScopedObservation<views::View, views::ViewObserver> observed_view_{ this}; - base::ScopedObservation<AshColorProvider, ColorModeObserver> - color_provider_observer_{this}; - base::WeakPtrFactory<MediaStringView> weak_factory_{this}; };
diff --git a/ash/assistant/ui/main_stage/suggestion_container_view.cc b/ash/assistant/ui/main_stage/suggestion_container_view.cc index 997b146..1c2da6a 100644 --- a/ash/assistant/ui/main_stage/suggestion_container_view.cc +++ b/ash/assistant/ui/main_stage/suggestion_container_view.cc
@@ -72,6 +72,7 @@ layer()->GetAnimator(), CreateAnimateInAnimation(), observer, base::BindRepeating<void(const std::string&, int)>( base::UmaHistogramPercentage, kAssistantSuggestionChipHistogram)); + ElementAnimator::view()->SetVisible(true); } void AnimateOut(ui::CallbackLayerAnimationObserver* observer) override { @@ -79,6 +80,7 @@ layer()->GetAnimator(), CreateAnimateOutAnimation(), observer, base::BindRepeating<void(const std::string&, int)>( base::UmaHistogramPercentage, kAssistantSuggestionChipHistogram)); + ElementAnimator::view()->SetVisible(false); } void FadeOut(ui::CallbackLayerAnimationObserver* observer) override {
diff --git a/ash/components/arc/arc_features.cc b/ash/components/arc/arc_features.cc index 8d1c7b7..d7e303e 100644 --- a/ash/components/arc/arc_features.cc +++ b/ash/components/arc/arc_features.cc
@@ -225,7 +225,7 @@ // Controls experimental key GMS Core and related services protection against to // be killed by low memory killer in ARCVM. const base::Feature kVmGmsCoreLowMemoryKillerProtection{ - "ArcVmGmsCoreLowMemoryKillerProtection", base::FEATURE_DISABLED_BY_DEFAULT}; + "ArcVmGmsCoreLowMemoryKillerProtection", base::FEATURE_ENABLED_BY_DEFAULT}; // Controls experimental key to enable pre-ANR handling for BroadcastQueue in // ARCVM.
diff --git a/ash/components/arc/disk_quota/arc_disk_quota_bridge.cc b/ash/components/arc/disk_quota/arc_disk_quota_bridge.cc index 820cbd4..f9c086dd 100644 --- a/ash/components/arc/disk_quota/arc_disk_quota_bridge.cc +++ b/ash/components/arc/disk_quota/arc_disk_quota_bridge.cc
@@ -107,7 +107,7 @@ } void ArcDiskQuotaBridge::IsQuotaSupported(IsQuotaSupportedCallback callback) { - chromeos::ArcQuotaClient::Get()->GetArcDiskFeatures( + ash::ArcQuotaClient::Get()->GetArcDiskFeatures( user_data_auth::GetArcDiskFeaturesRequest(), base::BindOnce( [](IsQuotaSupportedCallback callback, @@ -128,7 +128,7 @@ GetCurrentSpaceForUidCallback callback) { user_data_auth::GetCurrentSpaceForArcUidRequest request; request.set_uid(uid); - chromeos::ArcQuotaClient::Get()->GetCurrentSpaceForArcUid( + ash::ArcQuotaClient::Get()->GetCurrentSpaceForArcUid( request, base::BindOnce( [](GetCurrentSpaceForUidCallback callback, int uid, @@ -152,7 +152,7 @@ GetCurrentSpaceForGidCallback callback) { user_data_auth::GetCurrentSpaceForArcGidRequest request; request.set_gid(gid); - chromeos::ArcQuotaClient::Get()->GetCurrentSpaceForArcGid( + ash::ArcQuotaClient::Get()->GetCurrentSpaceForArcGid( request, base::BindOnce( [](GetCurrentSpaceForGidCallback callback, int gid, @@ -176,7 +176,7 @@ GetCurrentSpaceForProjectIdCallback callback) { user_data_auth::GetCurrentSpaceForArcProjectIdRequest request; request.set_project_id(project_id); - chromeos::ArcQuotaClient::Get()->GetCurrentSpaceForArcProjectId( + ash::ArcQuotaClient::Get()->GetCurrentSpaceForArcProjectId( request, base::BindOnce( [](GetCurrentSpaceForProjectIdCallback callback, int project_id, @@ -214,7 +214,7 @@ request.set_child_path(child_path.value()); *request.mutable_account_id() = cryptohome::CreateAccountIdentifierFromAccountId(account_id_); - chromeos::ArcQuotaClient::Get()->SetProjectId( + ash::ArcQuotaClient::Get()->SetProjectId( request, base::BindOnce( [](SetProjectIdCallback callback, const int project_id,
diff --git a/ash/components/arc/session/arc_vm_client_adapter_unittest.cc b/ash/components/arc/session/arc_vm_client_adapter_unittest.cc index fc59755..0eb67ff 100644 --- a/ash/components/arc/session/arc_vm_client_adapter_unittest.cc +++ b/ash/components/arc/session/arc_vm_client_adapter_unittest.cc
@@ -1877,6 +1877,14 @@ req.params(), "androidboot.arc_enable_gmscore_lmk_protection=1")); } +TEST_F(ArcVmClientAdapterTest, GmsCoreLowMemoryKillerProtection_Default) { + StartMiniArc(); + + auto req = GetTestConciergeClient()->start_arc_vm_request(); + EXPECT_TRUE(base::Contains( + req.params(), "androidboot.arc_enable_gmscore_lmk_protection=1")); +} + TEST_F(ArcVmClientAdapterTest, BroadcastPreANRDefault) { StartMiniArc(); auto request = GetTestConciergeClient()->start_arc_vm_request();
diff --git a/ash/components/audio/BUILD.gn b/ash/components/audio/BUILD.gn index 4733eb2..f9deca2 100644 --- a/ash/components/audio/BUILD.gn +++ b/ash/components/audio/BUILD.gn
@@ -13,7 +13,7 @@ "//ash/components/audio/public/mojom", "//ash/constants", "//base", - "//chromeos/dbus/audio", + "//chromeos/ash/components/dbus/audio", "//components/prefs", "//device/bluetooth", "//media/base:video_facing", @@ -47,7 +47,7 @@ "//ash/components/audio/public/mojom", "//ash/constants", "//base/test:test_support", - "//chromeos/dbus/audio", + "//chromeos/ash/components/dbus/audio", "//components/prefs:test_support", "//device/bluetooth", "//media/base:video_facing",
diff --git a/ash/components/audio/DEPS b/ash/components/audio/DEPS index bf6385b..3106f1c 100644 --- a/ash/components/audio/DEPS +++ b/ash/components/audio/DEPS
@@ -3,7 +3,7 @@ include_rules = [ "+ash/constants", "+base", - "+chromeos/dbus", + "+chromeos/ash/components/dbus", "+components/prefs", "+device/bluetooth", "+media",
diff --git a/ash/components/audio/audio_device.cc b/ash/components/audio/audio_device.cc index cc5417c..d2b5674 100644 --- a/ash/components/audio/audio_device.cc +++ b/ash/components/audio/audio_device.cc
@@ -137,7 +137,7 @@ AudioDevice::AudioDevice() = default; -AudioDevice::AudioDevice(const chromeos::AudioNode& node) { +AudioDevice::AudioDevice(const AudioNode& node) { is_input = node.is_input; id = node.id; stable_device_id_version = node.StableDeviceIdVersion();
diff --git a/ash/components/audio/audio_device.h b/ash/components/audio/audio_device.h index 4dee485..c9e4aeb 100644 --- a/ash/components/audio/audio_device.h +++ b/ash/components/audio/audio_device.h
@@ -12,7 +12,7 @@ #include <vector> #include "base/component_export.h" -#include "chromeos/dbus/audio/audio_node.h" +#include "chromeos/ash/components/dbus/audio/audio_node.h" namespace ash { @@ -39,7 +39,7 @@ struct COMPONENT_EXPORT(ASH_COMPONENTS_AUDIO) AudioDevice { AudioDevice(); - explicit AudioDevice(const chromeos::AudioNode& node); + explicit AudioDevice(const AudioNode& node); AudioDevice(const AudioDevice& other); AudioDevice& operator=(const AudioDevice& other); std::string ToString() const;
diff --git a/ash/components/audio/audio_devices_pref_handler_impl_unittest.cc b/ash/components/audio/audio_devices_pref_handler_impl_unittest.cc index 0aafb634..8a96747 100644 --- a/ash/components/audio/audio_devices_pref_handler_impl_unittest.cc +++ b/ash/components/audio/audio_devices_pref_handler_impl_unittest.cc
@@ -12,7 +12,7 @@ #include "ash/components/audio/audio_devices_pref_handler.h" #include "ash/constants/ash_pref_names.h" #include "base/memory/ref_counted.h" -#include "chromeos/dbus/audio/audio_node.h" +#include "chromeos/ash/components/dbus/audio/audio_node.h" #include "components/prefs/scoped_user_pref_update.h" #include "components/prefs/testing_pref_service.h" #include "testing/gtest/include/gtest/gtest.h" @@ -81,7 +81,7 @@ const uint32_t kOutputAudioEffect = 0; AudioDevice CreateAudioDevice(const AudioNodeInfo& info, int version) { - return AudioDevice(chromeos::AudioNode( + return AudioDevice(AudioNode( info.is_input, info.id, version == 2, info.id /* stable_device_id_v1 */, version == 1 ? 0 : info.id ^ 0xFF /* stable_device_id_v2 */, info.device_name, info.type, info.name, false, 0,
diff --git a/ash/components/audio/cras_audio_handler.cc b/ash/components/audio/cras_audio_handler.cc index 08cf1874..07ff012 100644 --- a/ash/components/audio/cras_audio_handler.cc +++ b/ash/components/audio/cras_audio_handler.cc
@@ -30,9 +30,6 @@ namespace ash { namespace { -using ::chromeos::AudioNode; -using ::chromeos::AudioNodeList; -using ::chromeos::CrasAudioClient; using ::std::max; using ::std::min;
diff --git a/ash/components/audio/cras_audio_handler.h b/ash/components/audio/cras_audio_handler.h index c879353..982ece30 100644 --- a/ash/components/audio/cras_audio_handler.h +++ b/ash/components/audio/cras_audio_handler.h
@@ -21,9 +21,9 @@ #include "base/memory/weak_ptr.h" #include "base/observer_list.h" #include "base/timer/timer.h" -#include "chromeos/dbus/audio/audio_node.h" -#include "chromeos/dbus/audio/cras_audio_client.h" -#include "chromeos/dbus/audio/volume_state.h" +#include "chromeos/ash/components/dbus/audio/audio_node.h" +#include "chromeos/ash/components/dbus/audio/cras_audio_client.h" +#include "chromeos/ash/components/dbus/audio/volume_state.h" #include "media/base/video_facing.h" #include "mojo/public/cpp/bindings/pending_remote.h" #include "mojo/public/cpp/bindings/remote.h" @@ -52,7 +52,7 @@ // This class is not thread safe. The public functions should be called on // browser main thread. class COMPONENT_EXPORT(ASH_COMPONENTS_AUDIO) CrasAudioHandler - : public chromeos::CrasAudioClient::Observer, + : public CrasAudioClient::Observer, public ui::MicrophoneMuteSwitchMonitor::Observer, public AudioPrefObserver, public media::VideoCaptureObserver, @@ -432,7 +432,7 @@ private: friend class CrasAudioHandlerTest; - // chromeos::CrasAudioClient::Observer overrides. + // CrasAudioClient::Observer overrides. void AudioClientRestarted() override; void NodesChanged() override; void ActiveOutputNodeChanged(uint64_t node_id) override; @@ -481,8 +481,7 @@ // Sets up the additional active audio node's state. void SetupAdditionalActiveAudioNodeState(uint64_t node_id); - AudioDevice ConvertAudioNodeWithModifiedPriority( - const chromeos::AudioNode& node); + AudioDevice ConvertAudioNodeWithModifiedPriority(const AudioNode& node); const AudioDevice* GetDeviceFromStableDeviceId( uint64_t stable_device_id) const; @@ -525,7 +524,7 @@ // Updates the current audio nodes list and switches the active device // if needed. - void UpdateDevicesAndSwitchActive(const chromeos::AudioNodeList& nodes); + void UpdateDevicesAndSwitchActive(const AudioNodeList& nodes); // Returns true if the current active device is changed to // |new_active_device|. @@ -537,14 +536,14 @@ // *|device_removed| indicates if any devices have been removed. // *|active_device_removed| indicates if the current active device has been // removed. - bool HasDeviceChange(const chromeos::AudioNodeList& new_nodes, + bool HasDeviceChange(const AudioNodeList& new_nodes, bool is_input, AudioDevicePriorityQueue* new_discovered, bool* device_removed, bool* active_device_removed); // Handles dbus callback for GetNodes. - void HandleGetNodes(absl::optional<chromeos::AudioNodeList> node_list); + void HandleGetNodes(absl::optional<AudioNodeList> node_list); void HandleGetNumActiveOutputStreams( absl::optional<int> num_active_output_streams);
diff --git a/ash/components/audio/cras_audio_handler_unittest.cc b/ash/components/audio/cras_audio_handler_unittest.cc index 0724fe7a..adc9ca5 100644 --- a/ash/components/audio/cras_audio_handler_unittest.cc +++ b/ash/components/audio/cras_audio_handler_unittest.cc
@@ -19,8 +19,8 @@ #include "base/test/task_environment.h" #include "base/threading/thread_task_runner_handle.h" #include "base/values.h" -#include "chromeos/dbus/audio/audio_node.h" -#include "chromeos/dbus/audio/fake_cras_audio_client.h" +#include "chromeos/ash/components/dbus/audio/audio_node.h" +#include "chromeos/ash/components/dbus/audio/fake_cras_audio_client.h" #include "media/base/video_facing.h" #include "mojo/public/cpp/bindings/pending_receiver.h" #include "mojo/public/cpp/bindings/receiver_set.h" @@ -31,11 +31,6 @@ namespace ash { namespace { -using ::chromeos::AudioNode; -using ::chromeos::AudioNodeList; -using ::chromeos::CrasAudioClient; -using ::chromeos::FakeCrasAudioClient; - class FakeMediaControllerManager : public media_session::mojom::MediaControllerManagerInterceptorForTesting { public:
diff --git a/ash/components/login/auth/auth_performer_unittest.cc b/ash/components/login/auth/auth_performer_unittest.cc index a2915642..70c9b91 100644 --- a/ash/components/login/auth/auth_performer_unittest.cc +++ b/ash/components/login/auth/auth_performer_unittest.cc
@@ -76,7 +76,7 @@ protected: base::test::SingleThreadTaskEnvironment task_environment_; - ::testing::StrictMock<chromeos::MockUserDataAuthClient> mock_client_; + ::testing::StrictMock<MockUserDataAuthClient> mock_client_; std::unique_ptr<UserContext> context_; };
diff --git a/ash/components/login/auth/extended_authenticator_impl.cc b/ash/components/login/auth/extended_authenticator_impl.cc index 3b0848f..f10f840 100644 --- a/ash/components/login/auth/extended_authenticator_impl.cc +++ b/ash/components/login/auth/extended_authenticator_impl.cc
@@ -172,7 +172,7 @@ cryptohome_parameter_utils::CreateAuthorizationKeyDefFromUserContext( user_context)); request.set_unlock_webauthn_secret(unlock_webauthn_secret); - chromeos::UserDataAuthClient::Get()->CheckKey( + UserDataAuthClient::Get()->CheckKey( request, base::BindOnce(&ExtendedAuthenticatorImpl::OnOperationComplete< ::user_data_auth::CheckKeyReply>, this, "Cryptohome-CheckKeyEx-End", user_context,
diff --git a/ash/components/tpm/tpm_token_info_getter_unittest.cc b/ash/components/tpm/tpm_token_info_getter_unittest.cc index 41cee555..95be0fc 100644 --- a/ash/components/tpm/tpm_token_info_getter_unittest.cc +++ b/ash/components/tpm/tpm_token_info_getter_unittest.cc
@@ -75,7 +75,7 @@ // Implementation of CryptohomePkcs11Client used in these tests. // TestCryptohomePkcs11Client overrides all CryptohomePkcs11Client methods used // in TPMTokenInfoGetter tests. -class TestCryptohomePkcs11Client : public chromeos::FakeCryptohomePkcs11Client { +class TestCryptohomePkcs11Client : public FakeCryptohomePkcs11Client { public: // |account_id|: The user associated with the TPMTokenInfoGetter that will be // using the TestCryptohomePkcs11Client. Should be empty for system token.
diff --git a/ash/constants/ash_features.cc b/ash/constants/ash_features.cc index 98e91f12..8c35a28 100644 --- a/ash/constants/ash_features.cc +++ b/ash/constants/ash_features.cc
@@ -1283,7 +1283,7 @@ base::FEATURE_ENABLED_BY_DEFAULT}; const base::Feature kRgbKeyboard = {"RgbKeyboard", - base::FEATURE_DISABLED_BY_DEFAULT}; + base::FEATURE_ENABLED_BY_DEFAULT}; // Enables the system tray to show more information in larger screen. const base::Feature kScalableStatusArea{"ScalableStatusArea",
diff --git a/ash/in_session_auth/authentication_dialog_unittest.cc b/ash/in_session_auth/authentication_dialog_unittest.cc index 2a7b04f..5825f73 100644 --- a/ash/in_session_auth/authentication_dialog_unittest.cc +++ b/ash/in_session_auth/authentication_dialog_unittest.cc
@@ -36,7 +36,7 @@ public: void SetUp() override { AshTestBase::SetUp(); - chromeos::UserDataAuthClient::InitializeFake(); + UserDataAuthClient::InitializeFake(); auth_token_provider_ = std::make_unique<MockInSessionAuthTokenProvider>(); }
diff --git a/ash/projector/projector_controller_unittest.cc b/ash/projector/projector_controller_unittest.cc index 1ff0ce8b..d91fdf6 100644 --- a/ash/projector/projector_controller_unittest.cc +++ b/ash/projector/projector_controller_unittest.cc
@@ -34,8 +34,8 @@ #include "base/test/scoped_feature_list.h" #include "base/time/time.h" #include "base/values.h" -#include "chromeos/dbus/audio/audio_node.h" -#include "chromeos/dbus/audio/fake_cras_audio_client.h" +#include "chromeos/ash/components/dbus/audio/audio_node.h" +#include "chromeos/ash/components/dbus/audio/fake_cras_audio_client.h" #include "media/mojo/mojom/speech_recognition_result.h" #include "media/mojo/mojom/speech_recognition_service.mojom.h" #include "testing/gtest/include/gtest/gtest.h" @@ -197,13 +197,13 @@ const AudioNodeInfo kInternalMic[] = { {true, 55555, "Fake Mic", "INTERNAL_MIC", "Internal Mic"}}; - const chromeos::AudioNode audio_node = chromeos::AudioNode( + const AudioNode audio_node = AudioNode( kInternalMic->is_input, kInternalMic->id, /*has_v2_stable_device_id=*/false, kInternalMic->id, /*stable_device_id_v2=*/0, kInternalMic->device_name, kInternalMic->type, kInternalMic->name, /*active=*/false, /*plugged_time=*/0, /*max_supported_channels=*/1, /*audio_effect=*/1); - chromeos::FakeCrasAudioClient::Get()->SetAudioNodesForTesting({audio_node}); + FakeCrasAudioClient::Get()->SetAudioNodesForTesting({audio_node}); CrasAudioHandler::Get()->SetActiveInputNodes({kInternalMic->id}); EXPECT_CALL(mock_client_,
diff --git a/ash/public/cpp/desk_template.cc b/ash/public/cpp/desk_template.cc index b83210f..175f5f9 100644 --- a/ash/public/cpp/desk_template.cc +++ b/ash/public/cpp/desk_template.cc
@@ -136,6 +136,9 @@ case DeskTemplateType::kSaveAndRecall: result += "save and recall\n"; break; + case DeskTemplateType::kUnknown: + result += "unknown\n"; + break; } return result; }
diff --git a/ash/public/cpp/desk_template.h b/ash/public/cpp/desk_template.h index 1f45000..f9e34ef 100644 --- a/ash/public/cpp/desk_template.h +++ b/ash/public/cpp/desk_template.h
@@ -36,6 +36,10 @@ // Desk saved for Save & Recall. kSaveAndRecall, + + // Unknown desk type. This desk is probably created by a later version and + // should be ignored. + kUnknown, }; // Class to represent a desk template. It can be used to create a desk with
diff --git a/ash/public/cpp/style/color_mode_observer.h b/ash/public/cpp/style/color_mode_observer.h index a31688ab..f7e039dc 100644 --- a/ash/public/cpp/style/color_mode_observer.h +++ b/ash/public/cpp/style/color_mode_observer.h
@@ -10,14 +10,16 @@ namespace ash { +// Class to observe the current color mode, which can be changed through the +// "Dark theme" feature pod button inside quick settings, personalization hub +// etc. Note, please override views::View::OnThemeChanged() function to update +// colors on color mode changes directly instead of overriding +// OnColorModeChanged() here if possible. class ASH_PUBLIC_EXPORT ColorModeObserver : public base::CheckedObserver { public: // Called when the color mode changes. virtual void OnColorModeChanged(bool dark_mode_enabled) {} - // Called when the themed state of the color mode is changed. - virtual void OnColorModeThemed(bool is_themed) {} - protected: ~ColorModeObserver() override = default; };
diff --git a/ash/rgb_keyboard/rgb_keyboard_util.h b/ash/rgb_keyboard/rgb_keyboard_util.h index 3e0561d..f1029a9 100644 --- a/ash/rgb_keyboard/rgb_keyboard_util.h +++ b/ash/rgb_keyboard/rgb_keyboard_util.h
@@ -10,7 +10,8 @@ namespace ash { -inline constexpr SkColor kDefaultColor = SK_ColorWHITE; +inline constexpr SkColor kDefaultColor = + SkColorSetRGB(/*r=*/255, /*g=*/255, /*b=*/210); // Util method to convert the |BacklightColor| enum to a predefined SkColor // which will be set by rgb keyboard manager to change the color of the keyboard
diff --git a/ash/system/accessibility/dictation_bubble_controller.h b/ash/system/accessibility/dictation_bubble_controller.h index 68648e2..bf8d1666 100644 --- a/ash/system/accessibility/dictation_bubble_controller.h +++ b/ash/system/accessibility/dictation_bubble_controller.h
@@ -56,7 +56,6 @@ // ColorModeObserver: void OnColorModeChanged(bool dark_mode_enabled) override; - void OnColorModeThemed(bool is_themed) override {} private: friend class DictationBubbleControllerTest;
diff --git a/ash/system/audio/unified_audio_detailed_view_controller_unittest.cc b/ash/system/audio/unified_audio_detailed_view_controller_unittest.cc index 21cd8dc..b73adce 100644 --- a/ash/system/audio/unified_audio_detailed_view_controller_unittest.cc +++ b/ash/system/audio/unified_audio_detailed_view_controller_unittest.cc
@@ -19,8 +19,8 @@ #include "base/bind.h" #include "base/memory/scoped_refptr.h" #include "base/test/scoped_feature_list.h" -#include "chromeos/dbus/audio/cras_audio_client.h" -#include "chromeos/dbus/audio/fake_cras_audio_client.h" +#include "chromeos/ash/components/dbus/audio/cras_audio_client.h" +#include "chromeos/ash/components/dbus/audio/fake_cras_audio_client.h" #include "components/live_caption/pref_names.h" #include "components/soda/soda_installer_impl_chromeos.h" #include "media/base/media_switches.h" @@ -32,9 +32,6 @@ #include "ui/views/test/button_test_api.h" #include "ui/views/widget/widget.h" -using chromeos::AudioNode; -using chromeos::AudioNodeList; - namespace ash { namespace { @@ -169,8 +166,8 @@ } protected: - chromeos::FakeCrasAudioClient* fake_cras_audio_client() { - return chromeos::FakeCrasAudioClient::Get(); + FakeCrasAudioClient* fake_cras_audio_client() { + return FakeCrasAudioClient::Get(); } AudioDetailedView* audio_detailed_view() {
diff --git a/ash/system/message_center/notification_grouping_controller.cc b/ash/system/message_center/notification_grouping_controller.cc index b88d9446..ddc2134 100644 --- a/ash/system/message_center/notification_grouping_controller.cc +++ b/ash/system/message_center/notification_grouping_controller.cc
@@ -389,7 +389,8 @@ if (parent_view) { parent_view->AddGroupNotification(*notification); - message_center->ResetPopupTimer(parent_id); + if (message_center->FindPopupNotificationById(parent_id)) + message_center->ResetPopupTimer(parent_id); } else { message_center->ResetSinglePopup(parent_id); }
diff --git a/ash/system/message_center/notification_grouping_controller_unittest.cc b/ash/system/message_center/notification_grouping_controller_unittest.cc index 749d80f5..465bf17 100644 --- a/ash/system/message_center/notification_grouping_controller_unittest.cc +++ b/ash/system/message_center/notification_grouping_controller_unittest.cc
@@ -223,4 +223,25 @@ EXPECT_EQ(1u, message_center->GetPopupNotifications().size()); } +// Create a group notification while the message center bubble is +// is shown. +TEST_F(NotificationGroupingControllerTest, + NotificationsGroupingMessageCenterBubbleShown) { + GetPrimaryUnifiedSystemTray()->ShowBubble(); + + auto* message_center = MessageCenter::Get(); + std::string id0, id1, id2; + const GURL url(u"http://test-url.com/"); + + id0 = AddNotificationWithOriginUrl(url); + id1 = AddNotificationWithOriginUrl(url); + id2 = AddNotificationWithOriginUrl(url); + + EXPECT_TRUE(message_center->FindNotificationById(id0)->group_child()); + EXPECT_TRUE(message_center->FindNotificationById(id1)->group_child()); + + std::string id_parent = id0 + kIdSuffixForGroupContainerNotification; + EXPECT_TRUE(message_center->FindNotificationById(id_parent)->group_parent()); +} + } // namespace ash
diff --git a/ash/system/microphone_mute/microphone_mute_notification_controller_unittest.cc b/ash/system/microphone_mute/microphone_mute_notification_controller_unittest.cc index d3f75a1..aba8ab3 100644 --- a/ash/system/microphone_mute/microphone_mute_notification_controller_unittest.cc +++ b/ash/system/microphone_mute/microphone_mute_notification_controller_unittest.cc
@@ -12,7 +12,7 @@ #include "base/check.h" #include "base/strings/utf_string_conversions.h" #include "base/test/scoped_feature_list.h" -#include "chromeos/dbus/audio/fake_cras_audio_client.h" +#include "chromeos/ash/components/dbus/audio/fake_cras_audio_client.h" #include "third_party/abseil-cpp/absl/types/optional.h" #include "ui/message_center/message_center.h" #include "ui/message_center/public/cpp/notification.h" @@ -101,7 +101,7 @@ void UnMuteMicrophone() { CrasAudioHandler::Get()->SetInputMute(false); } void SetNumberOfActiveInputStreams(int number_of_active_input_streams) { - chromeos::FakeCrasAudioClient::Get()->SetActiveInputStreamsWithPermission( + FakeCrasAudioClient::Get()->SetActiveInputStreamsWithPermission( {{"CRAS_CLIENT_TYPE_CHROME", number_of_active_input_streams}}); }
diff --git a/ash/test/ash_pixel_diff_test_base.cc b/ash/test/ash_pixel_diff_test_base.cc deleted file mode 100644 index fa22e51..0000000 --- a/ash/test/ash_pixel_diff_test_base.cc +++ /dev/null
@@ -1,146 +0,0 @@ -// Copyright 2022 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. - -#include "ash/test/ash_pixel_diff_test_base.h" - -#include "ash/constants/ash_features.h" -#include "ash/shell.h" -#include "ash/style/ash_color_provider.h" -#include "ash/system/power/power_status.h" -#include "ash/wallpaper/wallpaper_controller_impl.h" -#include "base/command_line.h" -#include "base/time/time_override.h" -#include "chromeos/dbus/power/fake_power_manager_client.h" -#include "chromeos/dbus/power_manager/power_supply_properties.pb.h" -#include "ui/compositor/compositor_switches.h" -#include "ui/display/display.h" - -namespace ash { - -namespace { - -// The fake user account. -constexpr char kUser[] = "user1@test.com"; - -// The fake file ids for wallpaper setting. -constexpr char kFakeFileId[] = "file-hash"; -constexpr char kWallpaperFileName[] = "test-file"; - -constexpr SkColor kWallPaperColor = SK_ColorMAGENTA; - -constexpr char kLocale[] = "en_US"; -constexpr char kTimeZone[] = "America/Chicago"; - -// The string that represents the current time. -constexpr char kFakeNowTimeString[] = "Sun, 6 May 2018 14:30:00 CDT"; - -// Creates a pure color image of the specified size. -gfx::ImageSkia CreateImage(int width, int height, SkColor color) { - SkBitmap bitmap; - bitmap.allocN32Pixels(width, height); - bitmap.eraseColor(color); - gfx::ImageSkia image = gfx::ImageSkia::CreateFrom1xBitmap(bitmap); - return image; -} - -// TimeOverrideHelper ---------------------------------------------------------- - -struct TimeOverrideHelper { - static base::Time TimeNow() { return current_time; } - - // Used as the current time in ash pixel diff tests. - static base::Time current_time; -}; - -base::Time TimeOverrideHelper::current_time; - -} // namespace - -AshPixelDiffTestBase::AshPixelDiffTestBase( - std::unique_ptr<base::test::TaskEnvironment> task_environment) - : AshTestBase(std::move(task_environment)), - kAccountId_(AccountId::FromUserEmailGaiaId(kUser, "test-hash")), - scoped_locale_(kLocale), - time_zone_(kTimeZone) {} - -AshPixelDiffTestBase::~AshPixelDiffTestBase() = default; - -bool AshPixelDiffTestBase::ComparePrimaryFullScreen( - const std::string& screenshot_name) { - aura::Window* primary_root_window = Shell::Get()->GetPrimaryRootWindow(); - return pixel_diff_.CompareNativeWindowScreenshot( - screenshot_name, primary_root_window, - gfx::Rect(primary_root_window->bounds().size())); -} - -void AshPixelDiffTestBase::SetUp() { - // In ash_pixeltests, we want to take screenshots then compare them with the - // benchmark images. Therefore, enable pixel output in tests. - base::CommandLine::ForCurrentProcess()->AppendSwitch( - switches::kEnablePixelOutputInTests); - - // Override the current time before setting up `AshTestBase` so that the views - // relying on the current time, like the tray time view, show as expected. - OverrideTime(); - - // Do not start the user session in `AshTestBase::SetUp()`. Instead, perform - // user login with `kAccountId_`. - set_start_session(false); - - AshTestBase::SetUp(); - - SimulateUserLogin(kAccountId_); - - // If the dark/light mode feature is enabled, ensure to use the dark mode. - if (features::IsDarkLightModeEnabled()) { - auto* color_provider = AshColorProvider::Get(); - if (!color_provider->IsDarkModeEnabled()) - color_provider->ToggleColorMode(); - } - - // Set variable UI components in explicit ways to stabilize screenshots. - SetWallPaper(); - SetBatteryState(); -} - -void AshPixelDiffTestBase::SetWallPaper() { - ASSERT_TRUE(user_data_dir_.CreateUniqueTempDir()); - ASSERT_TRUE(online_wallpaper_dir_.CreateUniqueTempDir()); - ASSERT_TRUE(custom_wallpaper_dir_.CreateUniqueTempDir()); - - auto* controller = Shell::Get()->wallpaper_controller(); - controller->Init(user_data_dir_.GetPath(), online_wallpaper_dir_.GetPath(), - custom_wallpaper_dir_.GetPath(), - /*policy_wallpaper=*/base::FilePath()); - controller->set_wallpaper_reload_no_delay_for_test(); - controller->SetClient(&client_); - client_.set_fake_files_id_for_account_id(kAccountId_, kFakeFileId); - - const gfx::Size display_size = GetPrimaryDisplay().size(); - gfx::ImageSkia wallpaper_image = - CreateImage(display_size.width(), display_size.height(), kWallPaperColor); - controller->SetCustomWallpaper(kAccountId_, kWallpaperFileName, - WALLPAPER_LAYOUT_STRETCH, wallpaper_image, - /*preview_mode=*/false); -} - -void AshPixelDiffTestBase::OverrideTime() { - ASSERT_TRUE(base::Time::FromString(kFakeNowTimeString, - &TimeOverrideHelper::current_time)); - time_override_ = std::make_unique<base::subtle::ScopedTimeClockOverrides>( - &TimeOverrideHelper::TimeNow, /*time_ticks_override=*/nullptr, - /*thread_ticks_override=*/nullptr); -} - -void AshPixelDiffTestBase::SetBatteryState() { - power_manager::PowerSupplyProperties proto; - proto.set_external_power( - power_manager::PowerSupplyProperties_ExternalPower_DISCONNECTED); - proto.set_battery_state( - power_manager::PowerSupplyProperties_BatteryState_DISCHARGING); - proto.set_battery_percent(50.0); - chromeos::FakePowerManagerClient::Get()->UpdatePowerProperties(proto); -} - -} // namespace ash
diff --git a/ash/test/ash_pixel_diff_test_base.h b/ash/test/ash_pixel_diff_test_base.h deleted file mode 100644 index fecf66c..0000000 --- a/ash/test/ash_pixel_diff_test_base.h +++ /dev/null
@@ -1,84 +0,0 @@ -// Copyright 2022 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. - -#ifndef ASH_TEST_ASH_PIXEL_DIFF_TEST_BASE_H_ -#define ASH_TEST_ASH_PIXEL_DIFF_TEST_BASE_H_ - -#include "ash/test/ash_test_base.h" -#include "ash/wallpaper/test_wallpaper_controller_client.h" -#include "base/files/scoped_temp_dir.h" -#include "base/test/icu_test_util.h" -#include "ui/views/test/view_skia_gold_pixel_diff.h" - -namespace ash { - -// The base class for ash pixel diff tests. This class provides helper functions -// to take screenshots and perform image comparison via the Skia Gold. This -// class also excludes the interference from variable UI components such as the -// time view by setting variables with pre-defined constants. -class AshPixelDiffTestBase : public AshTestBase { - public: - // Constructs an AshTestBase with |traits| being forwarded to its - // TaskEnvironment. MainThreadType always defaults to UI and must not be - // specified. - template <typename... TaskEnvironmentTraits> - NOINLINE explicit AshPixelDiffTestBase(TaskEnvironmentTraits&&... traits) - : AshPixelDiffTestBase(std::make_unique<base::test::TaskEnvironment>( - base::test::TaskEnvironment::MainThreadType::UI, - std::forward<TaskEnvironmentTraits>(traits)...)) {} - - // Alternatively a subclass may pass a TaskEnvironment directly. - explicit AshPixelDiffTestBase( - std::unique_ptr<base::test::TaskEnvironment> task_environment); - - AshPixelDiffTestBase(const AshPixelDiffTestBase&) = delete; - AshPixelDiffTestBase& operator=(const AshPixelDiffTestBase&) = delete; - ~AshPixelDiffTestBase() override; - - // Takes a screenshot of the primary fullscreen then uploads it to the Skia - // Gold to perform pixel comparison. Returns the comparison result. - bool ComparePrimaryFullScreen(const std::string& screenshot_name); - - // AshTestBase: - void SetUp() override; - - views::ViewSkiaGoldPixelDiff* pixel_diff() { return &pixel_diff_; } - - private: - // Sets a pure color wallpaper. - void SetWallPaper(); - - // Overrides the current time. - void OverrideTime(); - - // Sets the battery state. It ensures that the tray battery icon does not - // change during pixel tests. - void SetBatteryState(); - - const AccountId kAccountId_; - - // Used for setting the locale and the time zone. - const base::test::ScopedRestoreICUDefaultLocale scoped_locale_; - const base::test::ScopedRestoreDefaultTimezone time_zone_; - - // The temporary data directories for wallpaper setting. - base::ScopedTempDir user_data_dir_; - base::ScopedTempDir online_wallpaper_dir_; - base::ScopedTempDir custom_wallpaper_dir_; - - TestWallpaperControllerClient client_; - - // Overrides the current time. - std::unique_ptr<base::subtle::ScopedTimeClockOverrides> time_override_; - - // Used to take screenshots and upload images to the Skia Gold server to - // perform pixel comparison. - // NOTE: the user of `ViewSkiaGoldPixelDiff` has the duty to initialize - // `pixel_diff` before performing any pixel comparison. - views::ViewSkiaGoldPixelDiff pixel_diff_; -}; - -} // namespace ash - -#endif // ASH_TEST_ASH_PIXEL_DIFF_TEST_BASE_H_
diff --git a/ash/test/ash_pixel_diff_test_helper.cc b/ash/test/ash_pixel_diff_test_helper.cc new file mode 100644 index 0000000..f35e78f8 --- /dev/null +++ b/ash/test/ash_pixel_diff_test_helper.cc
@@ -0,0 +1,29 @@ +// Copyright 2022 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. + +#include "ash/test/ash_pixel_diff_test_helper.h" + +#include "ash/shell.h" + +namespace ash { + +AshPixelDiffTestHelper::AshPixelDiffTestHelper() = default; + +AshPixelDiffTestHelper::~AshPixelDiffTestHelper() = default; + +bool AshPixelDiffTestHelper::ComparePrimaryFullScreen( + const std::string& screenshot_name) { + aura::Window* primary_root_window = Shell::Get()->GetPrimaryRootWindow(); + return pixel_diff_.CompareNativeWindowScreenshot( + screenshot_name, primary_root_window, + gfx::Rect(primary_root_window->bounds().size())); +} + +void AshPixelDiffTestHelper::InitSkiaGoldPixelDiff( + const std::string& screenshot_prefix, + const std::string& corpus) { + pixel_diff_.Init(screenshot_prefix, corpus); +} + +} // namespace ash
diff --git a/ash/test/ash_pixel_diff_test_helper.h b/ash/test/ash_pixel_diff_test_helper.h new file mode 100644 index 0000000..1be439e --- /dev/null +++ b/ash/test/ash_pixel_diff_test_helper.h
@@ -0,0 +1,40 @@ +// Copyright 2022 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. + +#ifndef ASH_TEST_ASH_PIXEL_DIFF_TEST_HELPER_H_ +#define ASH_TEST_ASH_PIXEL_DIFF_TEST_HELPER_H_ + +#include "ui/views/test/view_skia_gold_pixel_diff.h" + +namespace ash { + +// A helper class that provides utility functions for performing pixel diff +// tests via the Skia Gold. +class AshPixelDiffTestHelper { + public: + AshPixelDiffTestHelper(); + AshPixelDiffTestHelper(const AshPixelDiffTestHelper&) = delete; + AshPixelDiffTestHelper& operator=(const AshPixelDiffTestHelper&) = delete; + ~AshPixelDiffTestHelper(); + + // Takes a screenshot of the primary fullscreen then uploads it to the Skia + // Gold to perform pixel comparison. Returns the comparison result. + bool ComparePrimaryFullScreen(const std::string& screenshot_name); + + // Initializes the underlying utility class for Skia Gold pixel tests. + // NOTE: this function has to be called before any pixel comparison. + void InitSkiaGoldPixelDiff(const std::string& screenshot_prefix, + const std::string& corpus = std::string()); + + private: + // Used to take screenshots and upload images to the Skia Gold server to + // perform pixel comparison. + // NOTE: the user of `ViewSkiaGoldPixelDiff` has the duty to initialize + // `pixel_diff` before performing any pixel comparison. + views::ViewSkiaGoldPixelDiff pixel_diff_; +}; + +} // namespace ash + +#endif // ASH_TEST_ASH_PIXEL_DIFF_TEST_HELPER_H_
diff --git a/ash/test/ash_test_base.cc b/ash/test/ash_test_base.cc index a0814d8d..de98a34c 100644 --- a/ash/test/ash_test_base.cc +++ b/ash/test/ash_test_base.cc
@@ -27,6 +27,7 @@ #include "ash/shell.h" #include "ash/system/status_area_widget.h" #include "ash/test/ash_test_helper.h" +#include "ash/test/ash_test_ui_stabilizer.h" #include "ash/test/test_widget_builder.h" #include "ash/test/test_window_builder.h" #include "ash/test_shell_delegate.h" @@ -51,6 +52,7 @@ #include "ui/aura/window_delegate.h" #include "ui/aura/window_tree_host.h" #include "ui/base/ime/init/input_method_initializer.h" +#include "ui/compositor/compositor_switches.h" #include "ui/display/display.h" #include "ui/display/screen.h" #include "ui/display/test/display_manager_test_api.h" @@ -70,6 +72,8 @@ namespace ash { namespace { +// AshEventGeneratorDelegate --------------------------------------------------- + class AshEventGeneratorDelegate : public aura::test::EventGeneratorDelegateAura { public: @@ -98,7 +102,7 @@ } // namespace -///////////////////////////////////////////////////////////////////////////// +// AshTestBase ----------------------------------------------------------------- AshTestBase::AshTestBase( std::unique_ptr<base::test::TaskEnvironment> task_environment) @@ -118,6 +122,12 @@ } void AshTestBase::SetUp(std::unique_ptr<TestShellDelegate> delegate) { + // In pixel tests, override the current time before setting up system UI + // components so that the components relying on the time, like the time view, + // show as expected. + if (ui_stabilizer_) + ui_stabilizer_->OverrideTime(); + // At this point, the task APIs should already be provided by // |task_environment_|. CHECK(base::ThreadTaskRunnerHandle::IsSet()); @@ -131,6 +141,11 @@ params.local_state = local_state(); ash_test_helper_ = std::make_unique<AshTestHelper>(); ash_test_helper_->SetUp(std::move(params)); + + if (ui_stabilizer_) { + SimulateUserLogin(ui_stabilizer_->account_id()); + ui_stabilizer_->StabilizeUi(GetPrimaryDisplay().size()); + } } void AshTestBase::TearDown() { @@ -310,6 +325,24 @@ gfx::Rect()); } +void AshTestBase::PrepareForPixelDiffTest() { + // In pixel tests, we want to take screenshots then compare them with the + // benchmark images. Therefore, enable pixel output in tests. + base::CommandLine::ForCurrentProcess()->AppendSwitch( + switches::kEnablePixelOutputInTests); + + // Expect this function to be called before setup. Because the code that + // stabilizes the system UI for pixel tests should be executed during setup. + CHECK(!setup_called_); + + CHECK(!ui_stabilizer_); + ui_stabilizer_ = std::make_unique<AshTestUiStabilizer>(); + + // In pixel tests, a fake user account is used to set the wallpaper. + // Therefore, do not start the session as default. + start_session_ = false; +} + void AshTestBase::SetUserPref(const std::string& user_email, const std::string& path, const base::Value& value) {
diff --git a/ash/test/ash_test_base.h b/ash/test/ash_test_base.h index d6dbc22..90bbbfa 100644 --- a/ash/test/ash_test_base.h +++ b/ash/test/ash_test_base.h
@@ -69,6 +69,7 @@ class AmbientAshTestHelper; class AppListTestHelper; class AshTestHelper; +class AshTestUiStabilizer; class Shelf; class TestAppListClient; class TestShellDelegate; @@ -183,6 +184,10 @@ // Attach |window| to the current shell's root window. void ParentWindowInPrimaryRootWindow(aura::Window* window); + // Prepares for the pixel diff test. NOTE: this function should be called + // before `SetUp()`. + void PrepareForPixelDiffTest(); + // Returns the EventGenerator that uses screen coordinates and works // across multiple displays. It creates a new generator if it // hasn't been created yet. @@ -339,6 +344,9 @@ std::unique_ptr<AshTestHelper> ash_test_helper_; std::unique_ptr<ui::test::EventGenerator> event_generator_; + + // Used only for pixel tests. Set by `PrepareForPixelDiffTest()`. + std::unique_ptr<AshTestUiStabilizer> ui_stabilizer_; }; class NoSessionAshTestBase : public AshTestBase {
diff --git a/ash/test/ash_test_helper.cc b/ash/test/ash_test_helper.cc index 66bca5e..f014b3c 100644 --- a/ash/test/ash_test_helper.cc +++ b/ash/test/ash_test_helper.cc
@@ -38,8 +38,8 @@ #include "base/run_loop.h" #include "base/system/sys_info.h" #include "base/system/system_monitor.h" +#include "chromeos/ash/components/dbus/audio/cras_audio_client.h" #include "chromeos/ash/components/dbus/rgbkbd/rgbkbd_client.h" -#include "chromeos/dbus/audio/cras_audio_client.h" #include "chromeos/dbus/power/power_policy_controller.h" #include "chromeos/login/login_state/login_state.h" #include "device/bluetooth/bluetooth_adapter_factory.h" @@ -114,7 +114,7 @@ display::ResetDisplayIdForTest(); display::SetInternalDisplayIds({}); - chromeos::CrasAudioClient::InitializeFake(); + CrasAudioClient::InitializeFake(); // Create CrasAudioHandler for testing since g_browser_process is not // created in AshTestBase tests. CrasAudioHandler::InitializeForTesting(); @@ -165,7 +165,7 @@ chromeos::LoginState::Shutdown(); CrasAudioHandler::Shutdown(); - chromeos::CrasAudioClient::Shutdown(); + CrasAudioClient::Shutdown(); // The PowerPolicyController holds a pointer to the PowerManagementClient, so // shut the controller down first.
diff --git a/ash/test/ash_test_ui_stabilizer.cc b/ash/test/ash_test_ui_stabilizer.cc new file mode 100644 index 0000000..4ec713f --- /dev/null +++ b/ash/test/ash_test_ui_stabilizer.cc
@@ -0,0 +1,123 @@ +// Copyright (c) 2022 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. + +#include "ash/test/ash_test_ui_stabilizer.h" + +#include "ash/constants/ash_features.h" +#include "ash/shell.h" +#include "ash/style/ash_color_provider.h" +#include "ash/wallpaper/wallpaper_controller_impl.h" +#include "base/time/time_override.h" +#include "chromeos/dbus/power/fake_power_manager_client.h" +#include "chromeos/dbus/power_manager/power_supply_properties.pb.h" +#include "third_party/googletest/src/googletest/include/gtest/gtest.h" +#include "ui/gfx/image/image_skia.h" + +namespace ash { + +namespace { + +// The fake user account only used for pixel tests. +constexpr char kUserForPixelTest[] = "user1@test.com"; + +// The fake file ids for wallpaper setting in pixel tests. +constexpr char kFakeFileId[] = "file-hash"; +constexpr char kWallpaperFileName[] = "test-file"; + +// The color of the default wallpaper in pixel tests. +constexpr SkColor kWallPaperColor = SK_ColorMAGENTA; + +// The string that represents the current time. Used in pixel tests. +constexpr char kFakeNowTimeString[] = "Sun, 6 May 2018 14:30:00 CDT"; + +// Specify the locale and the time zone used in pixel tests. +constexpr char kLocale[] = "en_US"; +constexpr char kTimeZone[] = "America/Chicago"; + +// Creates a pure color image of the specified size. +gfx::ImageSkia CreateImage(const gfx::Size& image_size, SkColor color) { + SkBitmap bitmap; + bitmap.allocN32Pixels(image_size.width(), image_size.height()); + bitmap.eraseColor(color); + gfx::ImageSkia image = gfx::ImageSkia::CreateFrom1xBitmap(bitmap); + return image; +} + +// TimeOverrideHelper ---------------------------------------------------------- + +struct TimeOverrideHelper { + static base::Time TimeNow() { return current_time; } + + // Used as the current time in ash pixel diff tests. + static base::Time current_time; +}; + +base::Time TimeOverrideHelper::current_time; + +} // namespace + +AshTestUiStabilizer::AshTestUiStabilizer() + : scoped_locale_(base::test::ScopedRestoreICUDefaultLocale(kLocale)), + time_zone_(base::test::ScopedRestoreDefaultTimezone(kTimeZone)), + account_id_( + AccountId::FromUserEmailGaiaId(kUserForPixelTest, "test-hash")) {} + +AshTestUiStabilizer::~AshTestUiStabilizer() = default; + +void AshTestUiStabilizer::StabilizeUi(const gfx::Size& wallpaper_size) { + MaybeSetDarkMode(); + SetWallPaper(wallpaper_size); + SetBatteryState(); +} + +// Overrides the current time. It ensures that `Time::Now()` is constant. +void AshTestUiStabilizer::OverrideTime() { + ASSERT_TRUE(base::Time::FromString(kFakeNowTimeString, + &TimeOverrideHelper::current_time)); + time_override_ = std::make_unique<base::subtle::ScopedTimeClockOverrides>( + &TimeOverrideHelper::TimeNow, /*time_ticks_override=*/nullptr, + /*thread_ticks_override=*/nullptr); +} + +void AshTestUiStabilizer::MaybeSetDarkMode() { + // If the dark/light mode feature is not enabled, the dark mode is used as + // default so return early. + if (!features::IsDarkLightModeEnabled()) + return; + + auto* color_provider = AshColorProvider::Get(); + if (!color_provider->IsDarkModeEnabled()) + color_provider->ToggleColorMode(); +} + +void AshTestUiStabilizer::SetWallPaper(const gfx::Size& wallpaper_size) { + ASSERT_TRUE(user_data_dir_.CreateUniqueTempDir()); + ASSERT_TRUE(online_wallpaper_dir_.CreateUniqueTempDir()); + ASSERT_TRUE(custom_wallpaper_dir_.CreateUniqueTempDir()); + + auto* controller = Shell::Get()->wallpaper_controller(); + controller->Init(user_data_dir_.GetPath(), online_wallpaper_dir_.GetPath(), + custom_wallpaper_dir_.GetPath(), + /*device_policy_wallpaper=*/base::FilePath()); + controller->set_wallpaper_reload_no_delay_for_test(); + controller->SetClient(&client_); + client_.set_fake_files_id_for_account_id(account_id_, kFakeFileId); + + gfx::ImageSkia wallpaper_image = CreateImage(wallpaper_size, kWallPaperColor); + controller->SetCustomWallpaper(account_id_, kWallpaperFileName, + WALLPAPER_LAYOUT_STRETCH, wallpaper_image, + /*preview_mode=*/false); +} + +void AshTestUiStabilizer::SetBatteryState() { + power_manager::PowerSupplyProperties proto; + proto.set_external_power( + power_manager::PowerSupplyProperties_ExternalPower_DISCONNECTED); + proto.set_battery_state( + power_manager::PowerSupplyProperties_BatteryState_DISCHARGING); + proto.set_battery_percent(50.0); + chromeos::FakePowerManagerClient::Get()->UpdatePowerProperties(proto); +} + +} // namespace ash
diff --git a/ash/test/ash_test_ui_stabilizer.h b/ash/test/ash_test_ui_stabilizer.h new file mode 100644 index 0000000..8461ef3 --- /dev/null +++ b/ash/test/ash_test_ui_stabilizer.h
@@ -0,0 +1,70 @@ +// Copyright (c) 2022 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. + +#ifndef ASH_TEST_ASH_TEST_UI_STABILIZER_H_ +#define ASH_TEST_ASH_TEST_UI_STABILIZER_H_ + +#include "ash/wallpaper/test_wallpaper_controller_client.h" +#include "base/files/scoped_temp_dir.h" +#include "base/test/icu_test_util.h" + +namespace base::subtle { +class ScopedTimeClockOverrides; +} // namespace base::subtle + +namespace gfx { +class Size; +} // namespace gfx + +namespace ash { + +// A test helper class that sets up the system UI for pixel tests. +class AshTestUiStabilizer { + public: + AshTestUiStabilizer(); + AshTestUiStabilizer(const AshTestUiStabilizer&) = delete; + AshTestUiStabilizer& operator=(const AshTestUiStabilizer&) = delete; + ~AshTestUiStabilizer(); + + // Makes the variable UI components (such as the battery view and wallpaper) + // constant to avoid flakiness in pixel tests. + void StabilizeUi(const gfx::Size& wallpaper_size); + + // Overrides the current time. It ensures that `Time::Now()` is constant. + void OverrideTime(); + + const AccountId& account_id() const { return account_id_; } + + private: + // Ensures that the system UI is under the dark mode if the dark/light feature + // is enabled. + void MaybeSetDarkMode(); + + // Sets a pure color wallpaper. + void SetWallPaper(const gfx::Size& wallpaper_size); + + // Sets the battery state. It ensures that the tray battery icon does not + // change during pixel tests. + void SetBatteryState(); + + // Used for setting the locale and the time zone. + const base::test::ScopedRestoreICUDefaultLocale scoped_locale_; + const base::test::ScopedRestoreDefaultTimezone time_zone_; + + // Overrides the current time. + std::unique_ptr<base::subtle::ScopedTimeClockOverrides> time_override_; + + const AccountId account_id_; + + // The temporary data directories for wallpaper setting. + base::ScopedTempDir user_data_dir_; + base::ScopedTempDir online_wallpaper_dir_; + base::ScopedTempDir custom_wallpaper_dir_; + + TestWallpaperControllerClient client_; +}; + +} // namespace ash + +#endif // ASH_TEST_ASH_TEST_UI_STABILIZER_H_
diff --git a/ash/test/demo_ash_pixel_diff_test.cc b/ash/test/demo_ash_pixel_diff_test.cc index 3e9aae42..024dbca 100644 --- a/ash/test/demo_ash_pixel_diff_test.cc +++ b/ash/test/demo_ash_pixel_diff_test.cc
@@ -2,27 +2,32 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ash/test/ash_pixel_diff_test_base.h" +#include "ash/test/ash_pixel_diff_test_helper.h" + +#include "ash/test/ash_test_base.h" namespace ash { -class DemoAshPixelDiffTest : public AshPixelDiffTestBase { +class DemoAshPixelDiffTest : public AshTestBase { public: - DemoAshPixelDiffTest() = default; + DemoAshPixelDiffTest() { PrepareForPixelDiffTest(); } DemoAshPixelDiffTest(const DemoAshPixelDiffTest&) = delete; DemoAshPixelDiffTest& operator=(const DemoAshPixelDiffTest&) = delete; ~DemoAshPixelDiffTest() override = default; - // AshPixelDiffTestBase: + // AshTestBase: void SetUp() override { - AshPixelDiffTestBase::SetUp(); - pixel_diff()->Init(/*screenshot_prefix=*/"ash_demo_test"); + AshTestBase::SetUp(); + pixel_test_helper_.InitSkiaGoldPixelDiff( + /*screenshot_prefix=*/"ash_demo_test"); } + + AshPixelDiffTestHelper pixel_test_helper_; }; // Verifies the primary display UI right after the ash pixel test sets up. TEST_F(DemoAshPixelDiffTest, VerifyDefaultPrimaryDisplay) { - EXPECT_TRUE(ComparePrimaryFullScreen("primary_display")); + EXPECT_TRUE(pixel_test_helper_.ComparePrimaryFullScreen("primary_display")); } } // namespace ash
diff --git a/ash/webui/os_feedback_ui/mojom/os_feedback_ui.mojom b/ash/webui/os_feedback_ui/mojom/os_feedback_ui.mojom index c1faf303..fc91610b 100644 --- a/ash/webui/os_feedback_ui/mojom/os_feedback_ui.mojom +++ b/ash/webui/os_feedback_ui/mojom/os_feedback_ui.mojom
@@ -74,6 +74,13 @@ string? email; // The URL of the page that this issue was being experienced on. url.mojom.Url? page_url; + // Extra diagnostics information provided by source CrOS application by + // setting the extra_diagnostics query parameter when opening the CrOS + // Feedback app. Content of extra_diagnostics is added to + // a collection of key-value pairs, and eventually is serialized to a text + // file, zipped, and then attached to the report. + // Example value: "Failed to connect to wifi network.". + string? extra_diagnostics; }; // Status of the sending of a feedback report.
diff --git a/ash/webui/os_feedback_ui/os_feedback_ui.cc b/ash/webui/os_feedback_ui/os_feedback_ui.cc index 8cdd54a..c41e93a 100644 --- a/ash/webui/os_feedback_ui/os_feedback_ui.cc +++ b/ash/webui/os_feedback_ui/os_feedback_ui.cc
@@ -77,6 +77,7 @@ IDS_FEEDBACK_TOOL_INCLUDE_SYSTEM_INFO_AND_METRICS_CHECKBOX_LABEL}, {"anonymousUser", IDS_FEEDBACK_TOOL_ANONYMOUS_EMAIL_OPTION}, {"thankYouNoteOffline", IDS_FEEDBACK_TOOL_THANK_YOU_NOTE_OFFLINE}, + {"thankYouNoteOnline", IDS_FEEDBACK_TOOL_THANK_YOU_NOTE_ONLINE}, }; source->AddLocalizedStrings(kLocalizedStrings);
diff --git a/ash/webui/os_feedback_ui/resources/confirmation_page.js b/ash/webui/os_feedback_ui/resources/confirmation_page.js index 7104688..2c2d799 100644 --- a/ash/webui/os_feedback_ui/resources/confirmation_page.js +++ b/ash/webui/os_feedback_ui/resources/confirmation_page.js
@@ -86,9 +86,7 @@ if (this.isOffline_()) { return this.i18n('thankYouNoteOffline'); } - return 'Your feedback helps improve ChromeOS and will be reviewed by ' + - 'our team. Because of the large number of reports, we won\’t be able ' + - ' to send a reply.'; + return this.i18n('thankYouNoteOnline'); } /**
diff --git a/ash/webui/os_feedback_ui/resources/feedback_flow.js b/ash/webui/os_feedback_ui/resources/feedback_flow.js index e694510..94e89cc41 100644 --- a/ash/webui/os_feedback_ui/resources/feedback_flow.js +++ b/ash/webui/os_feedback_ui/resources/feedback_flow.js
@@ -25,6 +25,15 @@ }; /** + * Enum for reserved query parameters used by feedback source to provide + * addition context to final report. + * @enum {string} + */ +export const AdditionalContextQueryParam = { + EXTRA_DIAGNOSTICS: 'extra_diagnostics', +}; + +/** * @fileoverview * 'feedback-flow' manages the navigation among the steps to be taken. */ @@ -84,6 +93,7 @@ this.feedbackServiceProvider_.getFeedbackContext().then((response) => { this.feedbackContext_ = response.feedbackContext; + this.setAdditionalContextFromQueryParams_(); }); } @@ -106,6 +116,19 @@ } /** + * Sets additional context passed from RequestFeedbackFlow as part of the URL. + * See `AdditionalContextQueryParam` for valid query parameters. + * @private + */ + setAdditionalContextFromQueryParams_() { + const params = new URLSearchParams(window.location.search); + const extraDiagnostics = + params.get(AdditionalContextQueryParam.EXTRA_DIAGNOSTICS); + this.feedbackContext_.extraDiagnostics = + extraDiagnostics ? decodeURIComponent(extraDiagnostics) : ''; + } + + /** * @param {!Event} event * @protected */
diff --git a/ash/webui/os_feedback_ui/resources/share_data_page.js b/ash/webui/os_feedback_ui/resources/share_data_page.js index 1d3cd5a..5f3d077 100644 --- a/ash/webui/os_feedback_ui/resources/share_data_page.js +++ b/ash/webui/os_feedback_ui/resources/share_data_page.js
@@ -190,6 +190,12 @@ }; } + if (this.feedbackContext.extraDiagnostics && + this.getElement_('#sysInfoCheckbox').checked) { + report.feedbackContext.extraDiagnostics = + this.feedbackContext.extraDiagnostics; + } + return report; }
diff --git a/ash/wm/base_state.cc b/ash/wm/base_state.cc index d0766a4e..d5e0465 100644 --- a/ash/wm/base_state.cc +++ b/ash/wm/base_state.cc
@@ -14,6 +14,7 @@ #include "ash/wm/splitview/split_view_utils.h" #include "ash/wm/tablet_mode/tablet_mode_controller.h" #include "ash/wm/window_positioning_utils.h" +#include "ash/wm/window_state.h" #include "ash/wm/wm_event.h" #include "chromeos/ui/base/window_state_type.h" #include "ui/aura/client/aura_constants.h" @@ -209,6 +210,14 @@ gfx::Rect BaseState::GetSnappedWindowBoundsInParent( aura::Window* window, const WindowStateType state_type) { + return BaseState::GetSnappedWindowBoundsInParent(window, state_type, + kDefaultSnapRatio); +} + +gfx::Rect BaseState::GetSnappedWindowBoundsInParent( + aura::Window* window, + const WindowStateType state_type, + float snap_ratio) { gfx::Rect bounds_in_parent; if (ShouldAllowSplitView()) { bounds_in_parent = @@ -216,13 +225,15 @@ (state_type == WindowStateType::kPrimarySnapped) ? SplitViewController::LEFT : SplitViewController::RIGHT, - window); + window, snap_ratio); } else { - bounds_in_parent = (state_type == WindowStateType::kPrimarySnapped) - ? GetDefaultSnappedWindowBoundsInParent( - window, SnapViewType::kPrimary) - : GetDefaultSnappedWindowBoundsInParent( - window, SnapViewType::kSecondary); + // Use `window_positioning_utils` to calculate the snapped window bounds. + bounds_in_parent = ash::GetSnappedWindowBoundsInParent( + window, + state_type == WindowStateType::kPrimarySnapped + ? SnapViewType::kPrimary + : SnapViewType::kSecondary, + snap_ratio); } return bounds_in_parent; }
diff --git a/ash/wm/base_state.h b/ash/wm/base_state.h index 5cbfab2..79eb819 100644 --- a/ash/wm/base_state.h +++ b/ash/wm/base_state.h
@@ -63,6 +63,14 @@ aura::Window* window, const chromeos::WindowStateType state_type); + // Returns the window bounds for snapped window state for given `snap_ratio`. + // Note that even when `snap_ratio` is provided, it might get ignored to meet + // the window's minimum size requirement. + gfx::Rect GetSnappedWindowBoundsInParent( + aura::Window* window, + const chromeos::WindowStateType state_type, + float snap_ratio); + // Prepares for the window snap event. Check if the window can be snapped in // split screen and if so, SplitViewController will start observe this window. // This needs to be done before the window's state and bounds change to its
diff --git a/ash/wm/default_state.cc b/ash/wm/default_state.cc index 81cfe85..a774e38 100644 --- a/ash/wm/default_state.cc +++ b/ash/wm/default_state.cc
@@ -40,6 +40,19 @@ namespace ash { namespace { +float GetFloatValueForSnapRatio(WindowSnapWMEvent::SnapRatio snap_ratio) { + switch (snap_ratio) { + case WindowSnapWMEvent::SnapRatio::kOneThirdSnapRatio: + return kOneThirdPositionRatio; + case WindowSnapWMEvent::SnapRatio::kDefaultSnapRatio: + return kDefaultPositionRatio; + case WindowSnapWMEvent::SnapRatio::kTwoThirdSnapRatio: + return kTwoThirdPositionRatio; + default: + return kDefaultPositionRatio; + } +} + using ::chromeos::WindowStateType; // This specifies how much percent (30%) of a window rect @@ -359,10 +372,14 @@ HandleWindowSnapping(window_state, type); if (next_state_type == current_state_type && window_state->IsSnapped()) { - gfx::Rect snapped_bounds = GetSnappedWindowBoundsInParent( - window_state->window(), event->type() == WM_EVENT_SNAP_PRIMARY - ? WindowStateType::kPrimarySnapped - : WindowStateType::kSecondarySnapped); + float snap_ratio = GetFloatValueForSnapRatio( + static_cast<const WindowSnapWMEvent*>(event)->snap_ratio()); + gfx::Rect snapped_bounds = + GetSnappedWindowBoundsInParent(window_state->window(), + event->type() == WM_EVENT_SNAP_PRIMARY + ? WindowStateType::kPrimarySnapped + : WindowStateType::kSecondarySnapped, + snap_ratio); window_state->SetBoundsDirectAnimated(snapped_bounds); return; } @@ -375,9 +392,15 @@ } window_state->RecordAndResetWindowSnapActionSource(current_state_type, next_state_type); + + EnterToNextState( + window_state, next_state_type, + absl::make_optional( + static_cast<const WindowSnapWMEvent*>(event)->snap_ratio())); + return; } - EnterToNextState(window_state, next_state_type); + EnterToNextState(window_state, next_state_type, absl::nullopt); } // static @@ -425,8 +448,10 @@ } } -void DefaultState::EnterToNextState(WindowState* window_state, - WindowStateType next_state_type) { +void DefaultState::EnterToNextState( + WindowState* window_state, + WindowStateType next_state_type, + absl::optional<WindowSnapWMEvent::SnapRatio> snap_ratio) { // Do nothing if we're already in the same state. if (state_type_ == next_state_type) return; @@ -477,7 +502,11 @@ if (window_state->IsMaximizedOrFullscreenOrPinned()) MoveToDisplayForRestore(window_state); - UpdateBoundsFromState(window_state, previous_state_type); + UpdateBoundsFromState( + window_state, previous_state_type, + snap_ratio.has_value() + ? absl::make_optional(GetFloatValueForSnapRatio(snap_ratio.value())) + : absl::nullopt); UpdateMinimizedState(window_state, previous_state_type); // Normal state should have no restore bounds unless it's @@ -520,7 +549,9 @@ window_state->SetRestoreBoundsInParent(stored_bounds_); } - UpdateBoundsFromState(window_state, state_in_previous_mode->GetType()); + // When reentering a state, use the saved `snap_ratio_`. + UpdateBoundsFromState(window_state, state_in_previous_mode->GetType(), + window_state->snap_ratio()); UpdateMinimizedState(window_state, state_in_previous_mode->GetType()); // Then restore the restore bounds to their previous value. @@ -533,14 +564,20 @@ } void DefaultState::UpdateBoundsFromState(WindowState* window_state, - WindowStateType previous_state_type) { + WindowStateType previous_state_type, + absl::optional<float> snap_ratio) { aura::Window* window = window_state->window(); gfx::Rect bounds_in_parent; + switch (state_type_) { + // TODO(crbug.com/1335500): Refactor snap state type handling. Since only + // snap state types define `snap_ratio`, it makes sense to handle them + // separately. case WindowStateType::kPrimarySnapped: case WindowStateType::kSecondarySnapped: - bounds_in_parent = - GetSnappedWindowBoundsInParent(window_state->window(), state_type_); + DCHECK(snap_ratio.has_value()); + bounds_in_parent = GetSnappedWindowBoundsInParent( + window_state->window(), state_type_, snap_ratio.value()); base::UmaHistogramEnumeration( kSnapWindowDeviceOrientationHistogramName, chromeos::IsDisplayLayoutHorizontal(
diff --git a/ash/wm/default_state.h b/ash/wm/default_state.h index 03dbc4e..9e89f28 100644 --- a/ash/wm/default_state.h +++ b/ash/wm/default_state.h
@@ -50,9 +50,12 @@ const SetBoundsWMEvent* bounds_event); // Enters next state. This is used when the state moves from one to another - // within the same desktop mode. - void EnterToNextState(WindowState* window_state, - chromeos::WindowStateType next_state_type); + // within the same desktop mode. Uses `snap_ratio` for the next state type if + // provided. + void EnterToNextState( + WindowState* window_state, + chromeos::WindowStateType next_state_type, + absl::optional<WindowSnapWMEvent::SnapRatio> snap_ratio); // Reenters the current state. This is called when migrating from // previous desktop mode, and the window's state needs to re-construct the @@ -60,9 +63,11 @@ void ReenterToCurrentState(WindowState* window_state, WindowState::State* state_in_previous_mode); - // Animates to new window bounds based on the current and previous state type. + // Animates to new window bounds, using `snap_ratio` if provided, based on the + // current and previous state type. void UpdateBoundsFromState(WindowState* window_state, - chromeos::WindowStateType old_state_type); + chromeos::WindowStateType old_state_type, + absl::optional<float> snap_ratio); // Updates the window bounds for display bounds, or display work area bounds // changes.
diff --git a/ash/wm/desks/templates/saved_desk_library_view.cc b/ash/wm/desks/templates/saved_desk_library_view.cc index e2f2e62..9fafafd 100644 --- a/ash/wm/desks/templates/saved_desk_library_view.cc +++ b/ash/wm/desks/templates/saved_desk_library_view.cc
@@ -21,6 +21,7 @@ #include "ash/wm/desks/templates/saved_desk_util.h" #include "ash/wm/overview/overview_controller.h" #include "ash/wm/overview/rounded_label.h" +#include "base/notreached.h" #include "ui/aura/window.h" #include "ui/aura/window_targeter.h" #include "ui/base/l10n/l10n_util.h" @@ -83,6 +84,9 @@ case DeskTemplateType::kSaveAndRecall: grouped.save_and_recall.push_back(saved_desk); break; + case DeskTemplateType::kUnknown: + NOTREACHED(); + break; } }
diff --git a/ash/wm/float/float_controller.cc b/ash/wm/float/float_controller.cc index 3480dc5b..63a5ce1 100644 --- a/ash/wm/float/float_controller.cc +++ b/ash/wm/float/float_controller.cc
@@ -128,10 +128,15 @@ } void FloatController::Float(aura::Window* window) { + if (window == float_window_) + return; + + // TODO(shidi): temporary remove the DCHECK, will implement proper trigger on + // crbug/1339095. + // Only one floating window is allowed, reset previously floated window. ResetFloatedWindow(); DCHECK(!float_window_); - DCHECK(window->GetProperty(chromeos::kWindowToggleFloatKey)); float_window_ = window; float_window_observation_.Observe(float_window_); aura::Window* float_container = @@ -145,7 +150,8 @@ } void FloatController::Unfloat(aura::Window* window) { - DCHECK(!window->GetProperty(chromeos::kWindowToggleFloatKey)); + if (window != float_window_) + return; // Re-parent window to active desk container. desks_util::GetActiveDeskContainerForRoot(float_window_->GetRootWindow()) ->AddChild(float_window_); @@ -158,6 +164,7 @@ } void FloatController::ResetFloatedWindow() { + // TODO(shidi): Remove `kWindowToggleFloatKey` and implement event trigger. if (float_window_) float_window_->SetProperty(chromeos::kWindowToggleFloatKey, false); }
diff --git a/ash/wm/splitview/split_view_controller.cc b/ash/wm/splitview/split_view_controller.cc index 53afaa0..c1f18c4 100644 --- a/ash/wm/splitview/split_view_controller.cc +++ b/ash/wm/splitview/split_view_controller.cc
@@ -88,11 +88,6 @@ // always be moved to these three positions. constexpr float kFixedPositionRatios[] = {0.f, 0.5f, 1.0f}; -// Two optional position ratios of the divider. Whether the divider can be moved -// to these two positions depends on the minimum size of the snapped windows. -constexpr float kOneThirdPositionRatio = 0.33f; -constexpr float kTwoThirdPositionRatio = 0.67f; - // The black scrim starts to fade in when the divider is moved past the two // optional positions (kOneThirdPositionRatio, kTwoThirdPositionRatio) and // reaches to its maximum opacity (kBlackScrimOpacity) after moving @@ -1038,16 +1033,25 @@ gfx::Rect SplitViewController::GetSnappedWindowBoundsInParent( SnapPosition snap_position, - aura::Window* window_for_minimum_size) { - gfx::Rect bounds = - GetSnappedWindowBoundsInScreen(snap_position, window_for_minimum_size); + aura::Window* window_for_minimum_size, + float snap_ratio) { + gfx::Rect bounds = GetSnappedWindowBoundsInScreen( + snap_position, window_for_minimum_size, snap_ratio); wm::ConvertRectFromScreen(root_window_, &bounds); return bounds; } -gfx::Rect SplitViewController::GetSnappedWindowBoundsInScreen( +gfx::Rect SplitViewController::GetSnappedWindowBoundsInParent( SnapPosition snap_position, aura::Window* window_for_minimum_size) { + return GetSnappedWindowBoundsInParent(snap_position, window_for_minimum_size, + kDefaultSnapRatio); +} + +gfx::Rect SplitViewController::GetSnappedWindowBoundsInScreen( + SnapPosition snap_position, + aura::Window* window_for_minimum_size, + float snap_ratio) { const gfx::Rect work_area_bounds_in_screen = screen_util::GetDisplayWorkAreaBoundsInScreenForActiveDeskContainer( root_window_); @@ -1069,8 +1073,8 @@ // mode to `GetSnappedWindowBounds()` in window_positioning_utils.cc. const bool in_tablet = Shell::Get()->tablet_mode_controller()->InTabletMode(); const int work_area_size = GetDividerEndPosition(); - int divider_position = - divider_position_ < 0 ? GetDefaultDividerPosition() : divider_position_; + int divider_position = divider_position_ < 0 ? GetDividerPosition(snap_ratio) + : divider_position_; // Edit `divider_position` if window restore is currently restoring a snapped // window; take into account the snap percentage saved by the window. Only do @@ -1153,15 +1157,26 @@ return snapped_window_bounds_in_screen; } +gfx::Rect SplitViewController::GetSnappedWindowBoundsInScreen( + SnapPosition snap_position, + aura::Window* window_for_minimum_size) { + return GetSnappedWindowBoundsInScreen(snap_position, window_for_minimum_size, + kDefaultSnapRatio); +} + bool SplitViewController::ShouldUseWindowBoundsDuringFastResize() { return is_resizing_ && tablet_resize_mode_ == TabletResizeMode::kFast; } int SplitViewController::GetDefaultDividerPosition() const { - int default_divider_position = GetDividerEndPosition() / 2; + return GetDividerPosition(kDefaultPositionRatio); +} + +int SplitViewController::GetDividerPosition(float snap_ratio) const { + int next_divider_position = GetDividerEndPosition() * snap_ratio; if (split_view_type_ == SplitViewType::kTabletType) - default_divider_position -= kSplitviewDividerShortSideLength / 2; - return default_divider_position; + next_divider_position -= kSplitviewDividerShortSideLength / 2; + return next_divider_position; } bool SplitViewController::IsDividerAnimating() const {
diff --git a/ash/wm/splitview/split_view_controller.h b/ash/wm/splitview/split_view_controller.h index b449ba0c..7d144b2 100644 --- a/ash/wm/splitview/split_view_controller.h +++ b/ash/wm/splitview/split_view_controller.h
@@ -213,12 +213,30 @@ // |left_window_|. All the other window will open on the right side. aura::Window* GetDefaultSnappedWindow(); - // Gets snapped bounds based on |snap_position| and |divider_position_|, - // adjusted to accommodate the minimum size of |window_for_minimum_size| if - // |window_for_minimum_size| is not null. + // Gets snapped bounds based on |snap_position|, the side of the screen to + // snap to, and |snap_ratio|, the ratio of the screen that the snapped window + // will occupy, adjusted to accommodate the minimum size of + // |window_for_minimum_size| if |window_for_minimum_size| is not null. + gfx::Rect GetSnappedWindowBoundsInParent( + SnapPosition snap_position, + aura::Window* window_for_minimum_size, + float snap_ratio); + + // Gets snapped bounds based on |snap_position|, |divider_position_|, and + // |kDefaultSnapRatio|, adjusted to accommodate the minimum size of + // |window_for_minimum_size| if |window_for_minimum_size| is not null. gfx::Rect GetSnappedWindowBoundsInParent( SnapPosition snap_position, aura::Window* window_for_minimum_size); + + // Gets snapped bounds in screen coordinates based on |snap_position| and + // |snap_ratio|. + gfx::Rect GetSnappedWindowBoundsInScreen( + SnapPosition snap_position, + aura::Window* window_for_minimum_size, + float snap_ratio); + + // Gets snapped bounds in screen coordinates for |kDefaultSnapRatio|. gfx::Rect GetSnappedWindowBoundsInScreen( SnapPosition snap_position, aura::Window* window_for_minimum_size); @@ -231,6 +249,11 @@ // Gets the default value of |divider_position_|. int GetDefaultDividerPosition() const; + // Calculates the new divider position to move |divider_position_| to, such + // that the primary window will occupy |snap_ratio| of the screen, and the + // secondary window will occupy the rest. + int GetDividerPosition(float snap_ratio) const; + // Returns true during the divider snap animation. bool IsDividerAnimating() const;
diff --git a/ash/wm/window_positioning_utils.cc b/ash/wm/window_positioning_utils.cc index 481d3c9..ccb8b38 100644 --- a/ash/wm/window_positioning_utils.cc +++ b/ash/wm/window_positioning_utils.cc
@@ -108,12 +108,18 @@ kMinimumOnScreenArea, bounds); } -gfx::Rect GetDefaultSnappedWindowBoundsInParent(aura::Window* window, - SnapViewType type) { +gfx::Rect GetSnappedWindowBoundsInParent(aura::Window* window, + SnapViewType type, + float snap_ratio) { return GetSnappedWindowBounds( screen_util::GetDisplayWorkAreaBoundsInParent(window), display::Screen::GetScreen()->GetDisplayNearestWindow(window), window, - type, kDefaultSnapRatio); + type, snap_ratio); +} + +gfx::Rect GetDefaultSnappedWindowBoundsInParent(aura::Window* window, + SnapViewType type) { + return GetSnappedWindowBoundsInParent(window, type, kDefaultPositionRatio); } gfx::Rect GetSnappedWindowBounds(const gfx::Rect& work_area,
diff --git a/ash/wm/window_positioning_utils.h b/ash/wm/window_positioning_utils.h index 171127b..5ddb491 100644 --- a/ash/wm/window_positioning_utils.h +++ b/ash/wm/window_positioning_utils.h
@@ -55,8 +55,14 @@ const gfx::Rect& visible_area, gfx::Rect* bounds); -// Returns the bounds of a snapped window for a given snap |type| in clamshell -// mode, with default snapped ratio |kDefaultSnapRatio|, in parent coordinates. +// Returns the bounds of a snapped window for a given snap |type| and +// |snap_ratio| in clamshell mode. +ASH_EXPORT gfx::Rect GetSnappedWindowBoundsInParent(aura::Window* window, + SnapViewType type, + float snap_ratio); + +// Returns the bounds of a snapped window with default snapped ratio +// |kDefaultSnapRatio|, in parent coordinates. ASH_EXPORT gfx::Rect GetDefaultSnappedWindowBoundsInParent(aura::Window* window, SnapViewType type);
diff --git a/ash/wm/window_state.h b/ash/wm/window_state.h index 11ff045..e4b4b1a2 100644 --- a/ash/wm/window_state.h +++ b/ash/wm/window_state.h
@@ -43,6 +43,11 @@ class WindowStateObserver; class WMEvent; +// TODO(crbug.com/1323394): Consider moving to a WindowState constants file. +constexpr float kOneThirdPositionRatio = 0.33f; +constexpr float kDefaultPositionRatio = 0.5f; +constexpr float kTwoThirdPositionRatio = 0.67f; + // WindowState manages and defines ash specific window state and // behavior. Ash specific per-window state (such as ones that controls // window manager behavior) and ash specific window behavior (such as
diff --git a/ash/wm/wm_event.cc b/ash/wm/wm_event.cc index 1fb408f7..c86a02e 100644 --- a/ash/wm/wm_event.cc +++ b/ash/wm/wm_event.cc
@@ -85,6 +85,19 @@ return false; } +bool WMEvent::IsSnapEvent() const { + switch (type_) { + case WM_EVENT_SNAP_PRIMARY: + case WM_EVENT_SNAP_SECONDARY: + case WM_EVENT_CYCLE_SNAP_PRIMARY: + case WM_EVENT_CYCLE_SNAP_SECONDARY: + return true; + default: + break; + } + return false; +} + const DisplayMetricsChangedWMEvent* WMEvent::AsDisplayMetricsChangedWMEvent() const { DCHECK_EQ(type(), WM_EVENT_DISPLAY_BOUNDS_CHANGED); @@ -108,6 +121,18 @@ SetBoundsWMEvent::~SetBoundsWMEvent() = default; +WindowSnapWMEvent::WindowSnapWMEvent(WMEventType type) : WMEvent(type) { + DCHECK(IsSnapEvent()); +} + +WindowSnapWMEvent::WindowSnapWMEvent(WMEventType type, + WindowSnapWMEvent::SnapRatio snap_ratio) + : WMEvent(type), snap_ratio_(snap_ratio) { + DCHECK(IsSnapEvent()); +} + +WindowSnapWMEvent::~WindowSnapWMEvent() = default; + DisplayMetricsChangedWMEvent::DisplayMetricsChangedWMEvent(int changed_metrics) : WMEvent(WM_EVENT_DISPLAY_BOUNDS_CHANGED), changed_metrics_(changed_metrics) {}
diff --git a/ash/wm/wm_event.h b/ash/wm/wm_event.h index 7f77c4f5..335bc87 100644 --- a/ash/wm/wm_event.h +++ b/ash/wm/wm_event.h
@@ -155,6 +155,9 @@ // e.g. WM_EVENT_MAXIMIZED. bool IsTransitionEvent() const; + // True if the event is a window snap event. + bool IsSnapEvent() const; + // Utility methods to downcast to specific WMEvent types. const DisplayMetricsChangedWMEvent* AsDisplayMetricsChangedWMEvent() const; @@ -191,6 +194,29 @@ const base::TimeDelta duration_; }; +// An WMEvent to snap a window. +class WindowSnapWMEvent : public WMEvent { + public: + enum class SnapRatio { + kOneThirdSnapRatio, + kDefaultSnapRatio, + kTwoThirdSnapRatio + }; + + explicit WindowSnapWMEvent(WMEventType type); + WindowSnapWMEvent(WMEventType type, SnapRatio snap_ratio); + + WindowSnapWMEvent(const WindowSnapWMEvent&) = delete; + WindowSnapWMEvent& operator=(const WindowSnapWMEvent&) = delete; + + ~WindowSnapWMEvent() override; + + SnapRatio snap_ratio() const { return snap_ratio_; } + + private: + const SnapRatio snap_ratio_ = SnapRatio::kDefaultSnapRatio; +}; + // A WMEvent sent when display metrics have changed. // TODO(oshima): Consolidate with WM_EVENT_WORKAREA_BOUNDS_CHANGED. class ASH_EXPORT DisplayMetricsChangedWMEvent : public WMEvent {
diff --git a/base/allocator/partition_allocator/partition_alloc_base/time/time_win.cc b/base/allocator/partition_allocator/partition_alloc_base/time/time_win.cc index 7deae93..e36aeb6 100644 --- a/base/allocator/partition_allocator/partition_alloc_base/time/time_win.cc +++ b/base/allocator/partition_allocator/partition_alloc_base/time/time_win.cc
@@ -327,7 +327,7 @@ // "rollover" counter. union LastTimeAndRolloversState { // The state as a single 32-bit opaque value. - std::atomic<int32_t> as_opaque_32{0}; + std::atomic<int32_t> as_opaque_32; // The state as usable values. struct {
diff --git a/base/bind_internal.h b/base/bind_internal.h index fe0ab2d..a8ea7d7 100644 --- a/base/bind_internal.h +++ b/base/bind_internal.h
@@ -14,6 +14,7 @@ #include <utility> #include "base/allocator/buildflags.h" +#include "base/allocator/partition_allocator/partition_alloc_config.h" #include "base/callback_internal.h" #include "base/check.h" #include "base/compiler_specific.h" @@ -94,9 +95,22 @@ T* get() const { return ptr_; } private: +#if defined(PA_USE_MTE_CHECKED_PTR_WITH_64_BITS_POINTERS) + // When `MTECheckedPtr` is enabled as the backing implementation of + // `raw_ptr`, there are too many different types that immediately + // cause Chrome to crash. Some of these are inutterable as forward + // declarations in `raw_ptr.h` (necessary to mark it as not + // `IsSupportedType`) - in particular, nested classes + // (`Foo::UnsupportedFoo`) cannot be marked as unsupported. + // + // As a compromise, we decay the wrapper to use `T*` only (rather + // than `raw_ptr`) when `raw_ptr` is `MTECheckedPtr`. + using ImplType = T*; +#else using ImplType = std::conditional_t<raw_ptr_traits::IsSupportedType<T>::value, raw_ptr<T, DanglingUntriaged>, T*>; +#endif // defined(PA_USE_MTE_CHECKED_PTR_WITH_64_BITS_POINTERS) ImplType ptr_; }; @@ -115,9 +129,14 @@ T& get() const { return *ptr_; } private: +#if defined(PA_USE_MTE_CHECKED_PTR_WITH_64_BITS_POINTERS) + // As above. + using ImplType = T*; +#else using ImplType = std::conditional_t<raw_ptr_traits::IsSupportedType<T>::value, raw_ptr<T, DanglingUntriaged>, T*>; +#endif // defined(PA_USE_MTE_CHECKED_PTR_WITH_64_BITS_POINTERS) ImplType const ptr_; };
diff --git a/build/android/gyp/lint.py b/build/android/gyp/lint.py index 4bbaeb6e..2a83270 100755 --- a/build/android/gyp/lint.py +++ b/build/android/gyp/lint.py
@@ -186,40 +186,8 @@ root, encoding='utf-8')).toprettyxml(indent=' ').encode('utf-8')) -def _SimplifyBaselineFile(baseline): - with open(baseline) as f: - doc = ElementTree.parse(f) - - root = doc.getroot() - assert root.tag == 'issues' - - for issue_node in root.findall('issue'): - # Removing the baseline file is the best way to get lint to regenerate it, - # yet a LintError is added about the missing baseline file. Remove it here. - if (issue_node.get('id') == 'LintError' - and 'lint-baseline.xml' in issue_node.get('message', '')): - root.remove(issue_node) - continue - for location_node in issue_node.findall('location'): - # Trim file path so that files in src as well as the output directory do - # not have prefixes. Thus the baseline files work on bots and locally. - # Example: $HOME/path/to/out/Dir/../../file/in/checkout - # => file/in/checkout - file_path = location_node.get('file') - if file_path: - parent_dir_idx = file_path.rfind('../') - if parent_dir_idx != -1: - location_node.attrib['file'] = file_path[parent_dir_idx + 3:] - # Line and column numbers are not used by lint. Removing to reduce churn. - location_node.attrib.pop('line', None) - location_node.attrib.pop('column', None) - - with build_utils.AtomicOutput(baseline) as f: - doc.write(f, encoding='utf-8', xml_declaration=True) - - def _RunLint(create_cache, - lint_binary_path, + lint_jar_path, backported_methods_path, config_path, manifest_path, @@ -247,8 +215,29 @@ shutil.rmtree(cache_dir, ignore_errors=True) os.makedirs(cache_dir) - cmd = [ - lint_binary_path, + if baseline and not os.path.exists(baseline): + # Generating new baselines is only done locally, and requires more memory to + # avoid OOMs. + lint_xmx = '4G' + else: + lint_xmx = '2G' + + # All paths in lint are based off of relative paths from root with root as the + # prefix. Path variable substitution is based off of prefix matching so custom + # path variables need to match exactly in order to show up in baseline files. + # e.g. lint_path=path/to/output/dir/../../file/in/src + root_path = os.getcwd() # This is usually the output directory. + pathvar_src = os.path.join( + root_path, os.path.relpath(build_utils.DIR_SOURCE_ROOT, start=root_path)) + + cmd = build_utils.JavaCmd(xmx=lint_xmx) + [ + '-cp', + lint_jar_path, + 'com.android.tools.lint.Main', + '--sdk-home', + android_sdk_root, + '--path-variables', + f'SRC={pathvar_src}', # Uncomment to easily remove fixed lint errors. This is not turned on by # default due to: https://crbug.com/1256477#c5 #'--remove-fixed', @@ -340,21 +329,8 @@ logging.info('Preparing environment variables') env = os.environ.copy() - # It is important that lint uses the checked-in JDK11 as it is almost 50% - # faster than JDK8. - env['JAVA_HOME'] = build_utils.JAVA_HOME # This is necessary so that lint errors print stack traces in stdout. env['LINT_PRINT_STACKTRACE'] = 'true' - if baseline and not os.path.exists(baseline): - # Generating new baselines is only done locally, and requires more memory to - # avoid OOMs. - env['LINT_OPTS'] = '-Xmx4g' - generating_new_baseline = True - else: - # The default set in the wrapper script is 1g, but it seems not enough :( - env['LINT_OPTS'] = '-Xmx2g' - generating_new_baseline = False - # This filter is necessary for JDK11. stderr_filter = build_utils.FilterReflectiveAccessJavaWarnings stdout_filter = lambda x: build_utils.FilterLines(x, 'No issues found') @@ -371,9 +347,6 @@ stderr_filter=stderr_filter, fail_on_output=warnings_as_errors)) finally: - if generating_new_baseline: - _SimplifyBaselineFile(baseline) - # When not treating warnings as errors, display the extra footer. is_debug = os.environ.get('LINT_DEBUG', '0') != '0' @@ -406,9 +379,9 @@ parser.add_argument('--use-build-server', action='store_true', help='Always use the build server.') - parser.add_argument('--lint-binary-path', + parser.add_argument('--lint-jar-path', required=True, - help='Path to lint executable.') + help='Path to the lint jar.') parser.add_argument('--backported-methods', help='Path to backported methods file created by R8.') parser.add_argument('--cache-dir', @@ -507,7 +480,7 @@ depfile_deps = [p for p in possible_depfile_deps if p] _RunLint(args.create_cache, - args.lint_binary_path, + args.lint_jar_path, args.backported_methods, args.config_path, args.manifest_path,
diff --git a/build/android/test_runner.py b/build/android/test_runner.py index 4f98699c..ed7c295 100755 --- a/build/android/test_runner.py +++ b/build/android/test_runner.py
@@ -181,6 +181,10 @@ action='store_true', help='Whether to archive test output locally and generate ' 'a local results detail page.') + parser.add_argument('--wrapper-script-args', + help='A string of args that were passed to the wrapper ' + 'script. This should probably not be edited by a ' + 'user as it is passed by the wrapper itself.') class FastLocalDevAction(argparse.Action): def __call__(self, parser, namespace, values, option_string=None): @@ -1061,8 +1065,10 @@ annotation=getattr(args, 'annotations', None), flakiness_server=getattr(args, 'flakiness_dashboard_server', None)) + if iteration_results.GetNotPass(): - _LogRerunStatement(iteration_results.GetNotPass()) + _LogRerunStatement(iteration_results.GetNotPass(), + args.wrapper_script_args) if args.break_on_failure and not iteration_results.DidRunPass(): break @@ -1130,7 +1136,7 @@ else constants.ERROR_EXIT_CODE) -def _LogRerunStatement(failed_tests): +def _LogRerunStatement(failed_tests, wrapper_arg_str): """Logs a message that can rerun the failed tests. Logs a copy/pasteable message that filters tests so just the failing tests @@ -1138,6 +1144,8 @@ Args: failed_tests: A set of test results that did not pass. + wrapper_arg_str: A string of args that were passed to the called wrapper + script. """ rerun_arg_list = [] try: @@ -1150,9 +1158,11 @@ test_filter_file = os.path.join(os.path.relpath(constants.GetOutDirectory()), _RERUN_FAILED_TESTS_FILE) + arg_list = shlex.split( + wrapper_arg_str.strip('\'')) if wrapper_arg_str else sys.argv index = 0 - while index < len(sys.argv): - arg = sys.argv[index] + while index < len(arg_list): + arg = arg_list[index] # Skip adding the filter=<file> and/or the filter arg as we're replacing # it with the new filter arg. # This covers --test-filter=, --test-launcher-filter-file=, --gtest-filter=,
diff --git a/build/config/android/config.gni b/build/config/android/config.gni index 2465131..fb856a3 100644 --- a/build/config/android/config.gni +++ b/build/config/android/config.gni
@@ -124,7 +124,7 @@ # Purposefully repeated so that downstream can change # default_android_sdk_root without changing lint version. default_lint_android_sdk_root = public_android_sdk_root - default_lint_android_sdk_version = 31 + default_lint_android_sdk_version = 32 } if (!defined(default_extras_android_sdk_root)) {
diff --git a/build/config/android/internal_rules.gni b/build/config/android/internal_rules.gni index d726e32..895066f 100644 --- a/build/config/android/internal_rules.gni +++ b/build/config/android/internal_rules.gni
@@ -91,6 +91,7 @@ _desugar_jdk_libs_configuration_jar = "//third_party/android_deps/libs/com_android_tools_desugar_jdk_libs_configuration/desugar_jdk_libs_configuration-1.1.5.jar" _robolectric_jar_path = "//third_party/robolectric/lib/android-all-12-robolectric-7732740.jar" +_lint_jar_path = "//third_party/android_lint/lint.jar" # Put the bug number in the target name so that false-positives have a hint in # the error message about why non-existent dependencies are there. @@ -757,6 +758,7 @@ _test_type, "--output-directory", "@WrappedPath(.)", + "--wrapper-script-args", ] if (_runtime_deps) { @@ -1027,7 +1029,6 @@ _min_sdk_version = default_min_sdk_version } - _lint_binary_path = "$lint_android_sdk_root/cmdline-tools/latest/bin/lint" _cache_dir = "$root_build_dir/android_lint_cache" # Save generated xml files in a consistent location for debugging. @@ -1037,7 +1038,7 @@ script = "//build/android/gyp/lint.py" depfile = "$target_gen_dir/$target_name.d" inputs = [ - _lint_binary_path, + _lint_jar_path, _backported_methods, ] @@ -1046,8 +1047,8 @@ get_label_info(":${target_name}", "label_no_toolchain"), "--depfile", rebase_path(depfile, root_build_dir), - "--lint-binary-path", - rebase_path(_lint_binary_path, root_build_dir), + "--lint-jar-path", + rebase_path(_lint_jar_path, root_build_dir), "--cache-dir", rebase_path(_cache_dir, root_build_dir), "--lint-gen-dir",
diff --git a/build/fuchsia/test/.coveragerc b/build/fuchsia/test/.coveragerc new file mode 100644 index 0000000..815fd4b --- /dev/null +++ b/build/fuchsia/test/.coveragerc
@@ -0,0 +1,8 @@ +# .coveragerc to control coverage.py + +[report] +# Regexes for lines to exclude from consideration +exclude_lines = + # Don't complain if non-runnable code isn't run: + if __name__ == .__main__.: +
diff --git a/build/fuchsia/test/PRESUBMIT.py b/build/fuchsia/test/PRESUBMIT.py index 5e3cc9f..4f761c0 100644 --- a/build/fuchsia/test/PRESUBMIT.py +++ b/build/fuchsia/test/PRESUBMIT.py
@@ -12,29 +12,20 @@ # pylint: disable=invalid-name,missing-function-docstring def CommonChecks(input_api, output_api): - presubmit_dir = input_api.PresubmitLocalPath() - - def J(*dirs): - """Returns a path relative to presubmit directory.""" - - return input_api.os_path.join(presubmit_dir, *dirs) - tests = [] - unit_tests = [ - J('publish_package_unittests.py'), - ] - tests.extend( input_api.canned_checks.GetPylint(input_api, output_api, pylintrc='pylintrc', version='2.7')) - tests.extend( - input_api.canned_checks.GetUnitTests(input_api, - output_api, - unit_tests=unit_tests, - run_on_python2=False, - run_on_python3=True)) + + # coveragetest.py is responsible for running unit tests in this directory + tests.append( + input_api.Command( + name='coveragetest', + cmd=[input_api.python3_executable, 'coveragetest.py'], + kwargs={}, + message=output_api.PresubmitError)) return input_api.RunTests(tests)
diff --git a/build/fuchsia/test/coveragetest.py b/build/fuchsia/test/coveragetest.py new file mode 100755 index 0000000..1ee3eaad --- /dev/null +++ b/build/fuchsia/test/coveragetest.py
@@ -0,0 +1,39 @@ +#!/usr/bin/env vpython3 +# 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. +"""Ensure files in the directory are thoroughly tested.""" + +import io +import sys +import unittest + +import coverage # pylint: disable=import-error + + +def main(): + """Gather coverage data, ensure included files are 100% covered.""" + cov = coverage.coverage(data_file=None, + include='publish_package.py', + config_file=True) + cov.start() + # pylint: disable=import-outside-toplevel + # import tests after coverage start to also cover definition lines. + import publish_package_unittests + # pylint: enable=import-outside-toplevel + suite = unittest.TestLoader().loadTestsFromModule( + publish_package_unittests) + if not unittest.TextTestRunner().run(suite).wasSuccessful(): + return 1 + cov.stop() + outf = io.StringIO() + percentage = cov.report(file=outf, show_missing=True) + if int(percentage) != 100: + print(outf.getvalue()) + print('FATAL: Insufficient coverage (%.f%%)' % int(percentage)) + return 1 + return 0 + + +if __name__ == '__main__': + sys.exit(main())
diff --git a/build/fuchsia/test/publish_package.py b/build/fuchsia/test/publish_package.py index a29457b..18cfe17a 100755 --- a/build/fuchsia/test/publish_package.py +++ b/build/fuchsia/test/publish_package.py
@@ -50,6 +50,10 @@ parser = argparse.ArgumentParser() register_package_args(parser) args = parser.parse_args() + if not args.repo: + raise ValueError('Must specify directory to publish packages.') + if not args.packages: + raise ValueError('Must specify packages to publish.') publish_packages(args.packages, args.repo)
diff --git a/build/fuchsia/test/publish_package_unittests.py b/build/fuchsia/test/publish_package_unittests.py index 606f360..f95c86fd 100755 --- a/build/fuchsia/test/publish_package_unittests.py +++ b/build/fuchsia/test/publish_package_unittests.py
@@ -12,6 +12,9 @@ import publish_package +_PACKAGES = ['test_package'] +_REPO = 'test_repo' + class PublishPackageTest(unittest.TestCase): """Unittests for publish_package.py.""" @@ -24,18 +27,20 @@ def test_new_repo(self) -> None: """Test setting |new_repo| to True in |publish_packages|.""" - publish_package.publish_packages(['test_package'], 'test_repo', True) + publish_package.publish_packages(_PACKAGES, _REPO, True) self.assertEqual(self._subprocess_mock.call_count, 2) first_call = self._subprocess_mock.call_args_list[0] - self.assertEqual('newrepo', first_call[0][0][1]) + self.assertEqual(['newrepo', '-repo', _REPO], first_call[0][0][1:]) + second_call = self._subprocess_mock.call_args_list[1] + self.assertEqual(['publish', '-a', '-r', _REPO, '-f', _PACKAGES[0]], + second_call[0][0][1:]) def test_no_new_repo(self) -> None: """Test setting |new_repo| to False in |publish_packages|.""" publish_package.publish_packages(['test_package'], 'test_repo', False) self.assertEqual(self._subprocess_mock.call_count, 1) - first_call = self._subprocess_mock.call_args_list[0] - self.assertEqual('publish', first_call[0][0][1]) + def test_allow_temp_repo(self) -> None: """Test setting |allow_temp_repo| to True in |register_package_args|.""" @@ -56,6 +61,31 @@ parser.parse_args(['--no-repo-init']) self.assertRegex(mock_stderr.getvalue(), 'unrecognized arguments') + def test_main_no_repo_flag(self) -> None: + """Tests that not specifying packages raise a ValueError.""" + + with mock.patch('sys.argv', ['publish_package.py', '--repo', _REPO]): + with self.assertRaises(ValueError): + publish_package.main() + + def test_main_no_packages_flag(self) -> None: + """Tests that not specifying directory raise a ValueError.""" + + with mock.patch('sys.argv', + ['publish_package.py', '--packages', _PACKAGES[0]]): + with self.assertRaises(ValueError): + publish_package.main() + + def test_main(self) -> None: + """Tests that not specifying directory raise a ValueError.""" + + with mock.patch('sys.argv', [ + 'publish_package.py', '--packages', _PACKAGES[0], '--repo', + _REPO + ]): + publish_package.main() + self.assertEqual(self._subprocess_mock.call_count, 1) + if __name__ == '__main__': unittest.main()
diff --git a/build/fuchsia/test_runner.py b/build/fuchsia/test_runner.py index 02332e57..f307e987 100755 --- a/build/fuchsia/test_runner.py +++ b/build/fuchsia/test_runner.py
@@ -232,9 +232,6 @@ help='Directory to place code coverage information. ' 'Only relevant when --code-coverage set to true. ' 'Defaults to current directory.') - test_args.add_argument('--child-arg', - action='append', - help='Arguments for the test process.') test_args.add_argument('--gtest_also_run_disabled_tests', default=False, action='store_true', @@ -319,8 +316,6 @@ if args.gtest_also_run_disabled_tests: child_args.append('--gtest_also_run_disabled_tests') - if args.child_arg: - child_args.extend(args.child_arg) if args.child_args: child_args.extend(args.child_args)
diff --git a/build/util/generate_wrapper.py b/build/util/generate_wrapper.py index ce264ef..cbdcd6b 100755 --- a/build/util/generate_wrapper.py +++ b/build/util/generate_wrapper.py
@@ -43,6 +43,7 @@ PY_TEMPLATE = textwrap.dedent("""\ import os import re + import shlex import subprocess import sys @@ -104,6 +105,13 @@ outdir = os.environ['ISOLATED_OUTDIR'] return outdir, remaining_args + def InsertWrapperScriptArgs(args): + i = 0 + while i < len(args): + if args[i] == '--wrapper-script-args': + args.insert(i + 1, "'%s'" % shlex.join(s for s in sys.argv)) + break + i += 1 def FilterIsolatedOutdirBasedArgs(outdir, args): rargs = [] @@ -142,6 +150,7 @@ executable_path = ExpandWrappedPath('{executable_path}') outdir, remaining_args = FindIsolatedOutdir(raw_args) args = {executable_args} + InsertWrapperScriptArgs(args) args = FilterIsolatedOutdirBasedArgs(outdir, args) executable_args = ExpandWrappedPaths(args) cmd = [executable_path] + args + remaining_args
diff --git a/chrome/VERSION b/chrome/VERSION index c1703d8..e336694 100644 --- a/chrome/VERSION +++ b/chrome/VERSION
@@ -1,4 +1,4 @@ MAJOR=105 MINOR=0 -BUILD=5139 +BUILD=5140 PATCH=0
diff --git a/chrome/android/expectations/lint-baseline.xml b/chrome/android/expectations/lint-baseline.xml index f168afd..3a06cc8 100644 --- a/chrome/android/expectations/lint-baseline.xml +++ b/chrome/android/expectations/lint-baseline.xml
@@ -1,3568 +1,9678 @@ -<?xml version='1.0' encoding='utf-8'?> -<issues format="6" by="lint 7.1.0" type="baseline" client="" dependencies="true" name="" variant="all" version="7.1.0"> +<?xml version="1.0" encoding="UTF-8"?> +<issues format="6" by="lint 7.4.0-alpha05" type="baseline" client="" dependencies="true" name="" variant="all" version="7.4.0-alpha05"> - <issue id="ReferenceType" message="Unexpected resource reference type; expected value of type `@macro/`" errorLine1=" <macro name="default_text_color_link">@color/default_text_color_link_baseline</macro>" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/styles/android/java/res/values/semantic_colors_dynamic.xml" /> + <issue + id="LintError" + message="../../chrome/android/expectations/lint-baseline.xml (relative to /usr/local/google/home/wnwen/z1/src/out/Debug) does not exist" + errorLine1=" <baseline file="../../chrome/android/expectations/lint-baseline.xml"/>" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="project.xml" + line="5" + column="3"/> </issue> - <issue id="ResourceType" message="Expected resource of type color" errorLine1=" StatusIconResource statusIcon = icon == 0 ? null : new StatusIconResource(icon, tint);" errorLine2=" ~~~~"> - <location file="chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/status/StatusMediator.java" /> + <issue + id="ResourceType" + message="Expected resource of type styleable" + errorLine1=" TypedArray attrs = mContext.getTheme().obtainStyledAttributes(popupLayoutAttrs);" + errorLine2=" ~~~~~~~~~~~~~~~~"> + <location + file="$SRC/content/public/android/java/src/org/chromium/content/browser/selection/LegacyPastePopupMenu.java" + line="52" + column="71"/> </issue> - <issue id="BlockedPrivateApi" message="Reflective access to getViolationClass is forbidden when targeting API 31 and above" errorLine1=" violationInfoClass.getDeclaredMethod("getViolationClass");" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/strictmode/android/java/src/org/chromium/components/strictmode/ReflectiveThreadStrictModeInterceptor.java" /> + <issue + id="ResourceType" + message="Expected resource of type styleable" + errorLine1=" R.style.SelectPopupDialog, SELECT_DIALOG_ATTRS);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/content/public/android/java/src/org/chromium/content/browser/input/SelectPopupDialog.java" + line="115" + column="44"/> </issue> - <issue id="DiscouragedPrivateApi" message="Reflective access to sPackageManager, which is not part of the public SDK and therefore likely to change in future Android releases" errorLine1=" Field packageManagerField = activityThreadClass.getDeclaredField("sPackageManager");" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/embedder_support/android/java/src/org/chromium/components/embedder_support/application/FontPreloadingWorkaround.java" /> + <issue + id="ResourceType" + message="Expected resource of type color" + errorLine1=" StatusIconResource statusIcon = icon == 0 ? null : new StatusIconResource(icon, tint);" + errorLine2=" ~~~~"> + <location + file="$SRC/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/status/StatusMediator.java" + line="523" + column="89"/> </issue> - <issue id="DiscouragedPrivateApi" message="Reflective access to violationsBeingTimed, which is not part of the public SDK and therefore likely to change in future Android releases" errorLine1=" Field violationTimingField = StrictMode.class.getDeclaredField("violationsBeingTimed");" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/strictmode/android/java/src/org/chromium/components/strictmode/ReflectiveThreadStrictModeInterceptor.java" /> + <issue + id="ResourceType" + message="Expected resource of type styleable" + errorLine1=" TypedArray ta = context.obtainStyledAttributes(getThemeOverlayStyleResourceId(), attrs);" + errorLine2=" ~~~~~"> + <location + file="$SRC/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabUiThemeProvider.java" + line="532" + column="90"/> </issue> - <issue id="DiscouragedPrivateApi" message="Reflective access to mask, which is not part of the public SDK and therefore likely to change in future Android releases" errorLine1=" field = StrictMode.ThreadPolicy.class.getDeclaredField("mask");" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="weblayer/browser/java/org/chromium/weblayer_private/interfaces/StrictModeWorkaround.java" /> + <issue + id="BlockedPrivateApi" + message="Reflective access to getViolationClass is forbidden when targeting API 32 and above" + errorLine1=" violationInfoClass.getDeclaredMethod("getViolationClass");" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/strictmode/android/java/src/org/chromium/components/strictmode/ReflectiveThreadStrictModeInterceptor.java" + line="122" + column="25"/> </issue> - <issue id="NewApi" message="Call requires API level 24 (current min is 23): `isCleartextTrafficPermitted`" errorLine1=" return NetworkSecurityPolicyProxy.getInstance().isCleartextTrafficPermitted(host);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="net/android/java/src/org/chromium/net/AndroidNetworkLibrary.java" /> + <issue + id="DiscouragedPrivateApi" + message="Reflective access to sPackageManager, which is not part of the public SDK and therefore likely to change in future Android releases" + errorLine1=" Field packageManagerField = activityThreadClass.getDeclaredField("sPackageManager");" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/embedder_support/android/java/src/org/chromium/components/embedder_support/application/FontPreloadingWorkaround.java" + line="68" + column="41"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 23): `getChannelIdForOrigin`" errorLine1=" SiteChannelsManager.getInstance().getChannelIdForOrigin(mOrigin.toString());" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/browser/android/webapps/launchpad/java/src/org/chromium/chrome/browser/webapps/launchpad/AppManagementMenuPermissionsMediator.java" /> + <issue + id="DiscouragedPrivateApi" + message="Reflective access to violationsBeingTimed, which is not part of the public SDK and therefore likely to change in future Android releases" + errorLine1=" Field violationTimingField = StrictMode.class.getDeclaredField("violationsBeingTimed");" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/strictmode/android/java/src/org/chromium/components/strictmode/ReflectiveThreadStrictModeInterceptor.java" + line="104" + column="38"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 23): `getInstance`" errorLine1=" SiteChannelsManager.getInstance().getChannelIdForOrigin(mOrigin.toString());" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/android/webapps/launchpad/java/src/org/chromium/chrome/browser/webapps/launchpad/AppManagementMenuPermissionsMediator.java" /> + <issue + id="DiscouragedPrivateApi" + message="Reflective access to mask, which is not part of the public SDK and therefore likely to change in future Android releases" + errorLine1=" field = StrictMode.ThreadPolicy.class.getDeclaredField("mask");" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/weblayer/browser/java/org/chromium/weblayer_private/interfaces/StrictModeWorkaround.java" + line="32" + column="21"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 23): `shouldQueryAutofillSuggestion`" errorLine1=" if (mAutofillMenuItemTitle != 0 && mAutofillProvider.shouldQueryAutofillSuggestion()) {" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/android_autofill/browser/java/src/org/chromium/components/autofill/AutofillActionModeCallback.java" /> + <issue + id="InternalInsetResource" + message="Using internal inset dimension resource `status_bar_height` is not supported" + errorLine1=" resources.getIdentifier("status_bar_height", "dimen", "android");" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/password_manager/AccountChooserDialog.java" + line="247" + column="17"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 23): `queryAutofillSuggestion`" errorLine1=" mAutofillProvider.queryAutofillSuggestion();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/android_autofill/browser/java/src/org/chromium/components/autofill/AutofillActionModeCallback.java" /> + <issue + id="InternalInsetResource" + message="Using internal inset dimension resource `status_bar_height` is not supported" + errorLine1=" mContext.getResources().getIdentifier("status_bar_height", "dimen", "android");" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/content/public/android/java/src/org/chromium/content/browser/selection/LegacyPastePopupMenu.java" + line="64" + column="17"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `addDirectAction`" errorLine1=" reporter.addDirectAction(ONBOARDING_ACTION)" errorLine2=" ~~~~~~~~~~~~~~~"> - <location file="chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" /> + <issue + id="InternalInsetResource" + message="Using internal inset dimension resource `status_bar_height` is not supported" + errorLine1=" mActivity.getResources().getIdentifier("status_bar_height", "dimen", "android");" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/customtabs/PartialCustomTabHeightStrategy.java" + line="752" + column="17"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `withParameter`" errorLine1=" .withParameter(ACTION_NAME, Type.STRING, /* required= */ false)" errorLine2=" ~~~~~~~~~~~~~"> - <location file="chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" /> + <issue + id="InternalInsetResource" + message="Using internal inset dimension resource `status_bar_height` is not supported" + errorLine1=" int statusBarId = resources.getIdentifier("status_bar_height", "dimen", "android");" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/tab/TabUtils.java" + line="75" + column="27"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `withParameter`" errorLine1=" .withParameter(ACTION_NAME, Type.STRING, /* required= */ false)" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" /> + <issue + id="NewApi" + message="Call requires API level 24 (current min is 23): `isCleartextTrafficPermitted`" + errorLine1=" return NetworkSecurityPolicyProxy.getInstance().isCleartextTrafficPermitted(host);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/net/android/java/src/org/chromium/net/AndroidNetworkLibrary.java" + line="382" + column="61"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `withParameter`" errorLine1=" .withParameter(EXPERIMENT_IDS, Type.STRING, /* required= */ false)" errorLine2=" ~~~~~~~~~~~~~"> - <location file="chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" /> + <issue + id="NewApi" + message="Call requires API level 26 (current min is 23): `getChannelIdForOrigin`" + errorLine1=" SiteChannelsManager.getInstance().getChannelIdForOrigin(mOrigin.toString());" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/android/webapps/launchpad/java/src/org/chromium/chrome/browser/webapps/launchpad/AppManagementMenuPermissionsMediator.java" + line="107" + column="51"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `withParameter`" errorLine1=" .withParameter(EXPERIMENT_IDS, Type.STRING, /* required= */ false)" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" /> + <issue + id="NewApi" + message="Call requires API level 26 (current min is 23): `getInstance`" + errorLine1=" SiteChannelsManager.getInstance().getChannelIdForOrigin(mOrigin.toString());" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/android/webapps/launchpad/java/src/org/chromium/chrome/browser/webapps/launchpad/AppManagementMenuPermissionsMediator.java" + line="107" + column="37"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `withResult`" errorLine1=" .withResult(AA_ACTION_RESULT, Type.BOOLEAN);" errorLine2=" ~~~~~~~~~~"> - <location file="chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" /> + <issue + id="NewApi" + message="Call requires API level 26 (current min is 23): `shouldQueryAutofillSuggestion`" + errorLine1=" if (mAutofillMenuItemTitle != 0 && mAutofillProvider.shouldQueryAutofillSuggestion()) {" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/android_autofill/browser/java/src/org/chromium/components/autofill/AutofillActionModeCallback.java" + line="39" + column="62"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `withResult`" errorLine1=" .withResult(AA_ACTION_RESULT, Type.BOOLEAN);" errorLine2=" ~~~~~~~~~~~~"> - <location file="chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" /> + <issue + id="NewApi" + message="Call requires API level 26 (current min is 23): `queryAutofillSuggestion`" + errorLine1=" mAutofillProvider.queryAutofillSuggestion();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/android_autofill/browser/java/src/org/chromium/components/autofill/AutofillActionModeCallback.java" + line="51" + column="31"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `addDirectAction`" errorLine1=" reporter.addDirectAction(ONBOARDING_AND_START_ACTION)" errorLine2=" ~~~~~~~~~~~~~~~"> - <location file="chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `addDirectAction`" + errorLine1=" reporter.addDirectAction(ONBOARDING_ACTION)" + errorLine2=" ~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" + line="78" + column="22"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `withParameter`" errorLine1=" .withParameter(ACTION_NAME, Type.STRING, /* required= */ true)" errorLine2=" ~~~~~~~~~~~~~"> - <location file="chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `withParameter`" + errorLine1=" .withParameter(ACTION_NAME, Type.STRING, /* required= */ false)" + errorLine2=" ~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" + line="79" + column="22"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `withParameter`" errorLine1=" .withParameter(ACTION_NAME, Type.STRING, /* required= */ true)" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `withParameter`" + errorLine1=" .withParameter(EXPERIMENT_IDS, Type.STRING, /* required= */ false)" + errorLine2=" ~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" + line="80" + column="22"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `withParameter`" errorLine1=" .withParameter(USER_NAME, Type.STRING, /* required= */ false)" errorLine2=" ~~~~~~~~~~~~~"> - <location file="chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `withResult`" + errorLine1=" .withResult(AA_ACTION_RESULT, Type.BOOLEAN);" + errorLine2=" ~~~~~~~~~~"> + <location + file="$SRC/chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" + line="81" + column="22"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `withParameter`" errorLine1=" .withParameter(USER_NAME, Type.STRING, /* required= */ false)" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `addDirectAction`" + errorLine1=" reporter.addDirectAction(ONBOARDING_AND_START_ACTION)" + errorLine2=" ~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" + line="82" + column="22"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `withParameter`" errorLine1=" .withParameter(EXPERIMENT_IDS, Type.STRING, /* required= */ false)" errorLine2=" ~~~~~~~~~~~~~"> - <location file="chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `withParameter`" + errorLine1=" .withParameter(ACTION_NAME, Type.STRING, /* required= */ true)" + errorLine2=" ~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" + line="83" + column="22"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `withParameter`" errorLine1=" .withParameter(EXPERIMENT_IDS, Type.STRING, /* required= */ false)" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `withParameter`" + errorLine1=" .withParameter(USER_NAME, Type.STRING, /* required= */ false)" + errorLine2=" ~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" + line="84" + column="22"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `withParameter`" errorLine1=" .withParameter(SHOW_ERROR_ON_FAILURE, Type.BOOLEAN, /* required= */ false)" errorLine2=" ~~~~~~~~~~~~~"> - <location file="chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `withParameter`" + errorLine1=" .withParameter(EXPERIMENT_IDS, Type.STRING, /* required= */ false)" + errorLine2=" ~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" + line="85" + column="22"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `withParameter`" errorLine1=" .withParameter(SHOW_ERROR_ON_FAILURE, Type.BOOLEAN, /* required= */ false)" errorLine2=" ~~~~~~~~~~~~"> - <location file="chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `withParameter`" + errorLine1=" .withParameter(SHOW_ERROR_ON_FAILURE, Type.BOOLEAN, /* required= */ false)" + errorLine2=" ~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" + line="86" + column="22"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `withResult`" errorLine1=" .withResult(AA_ACTION_RESULT, Type.BOOLEAN);" errorLine2=" ~~~~~~~~~~"> - <location file="chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `withResult`" + errorLine1=" .withResult(AA_ACTION_RESULT, Type.BOOLEAN);" + errorLine2=" ~~~~~~~~~~"> + <location + file="$SRC/chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" + line="87" + column="22"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `withResult`" errorLine1=" .withResult(AA_ACTION_RESULT, Type.BOOLEAN);" errorLine2=" ~~~~~~~~~~~~"> - <location file="chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `addDirectAction`" + errorLine1=" reporter.addDirectAction(FETCH_WEBSITE_ACTIONS)" + errorLine2=" ~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" + line="93" + column="22"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `addDirectAction`" errorLine1=" reporter.addDirectAction(FETCH_WEBSITE_ACTIONS)" errorLine2=" ~~~~~~~~~~~~~~~"> - <location file="chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `withParameter`" + errorLine1=" .withParameter(USER_NAME, Type.STRING, /* required= */ false)" + errorLine2=" ~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" + line="94" + column="22"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `withParameter`" errorLine1=" .withParameter(USER_NAME, Type.STRING, /* required= */ false)" errorLine2=" ~~~~~~~~~~~~~"> - <location file="chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `withParameter`" + errorLine1=" .withParameter(EXPERIMENT_IDS, Type.STRING, /* required= */ false)" + errorLine2=" ~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" + line="95" + column="22"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `withParameter`" errorLine1=" .withParameter(USER_NAME, Type.STRING, /* required= */ false)" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `withResult`" + errorLine1=" .withResult(FETCH_WEBSITE_ACTIONS_RESULT, Type.BOOLEAN);" + errorLine2=" ~~~~~~~~~~"> + <location + file="$SRC/chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" + line="96" + column="22"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `withParameter`" errorLine1=" .withParameter(EXPERIMENT_IDS, Type.STRING, /* required= */ false)" errorLine2=" ~~~~~~~~~~~~~"> - <location file="chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `addDirectAction`" + errorLine1=" Definition definition = reporter.addDirectAction(name)" + errorLine2=" ~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" + line="102" + column="54"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `withParameter`" errorLine1=" .withParameter(EXPERIMENT_IDS, Type.STRING, /* required= */ false)" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `withParameter`" + errorLine1=" .withParameter(EXPERIMENT_IDS, Type.STRING," + errorLine2=" ~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" + line="103" + column="54"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `withResult`" errorLine1=" .withResult(FETCH_WEBSITE_ACTIONS_RESULT, Type.BOOLEAN);" errorLine2=" ~~~~~~~~~~"> - <location file="chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `withResult`" + errorLine1=" .withResult(AA_ACTION_RESULT, Type.BOOLEAN);" + errorLine2=" ~~~~~~~~~~"> + <location + file="$SRC/chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" + line="105" + column="54"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `withResult`" errorLine1=" .withResult(FETCH_WEBSITE_ACTIONS_RESULT, Type.BOOLEAN);" errorLine2=" ~~~~~~~~~~~~"> - <location file="chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `withParameter`" + errorLine1=" definition.withParameter(required, Type.STRING, /* required= */ true);" + errorLine2=" ~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" + line="110" + column="36"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `addDirectAction`" errorLine1=" Definition definition = reporter.addDirectAction(name)" errorLine2=" ~~~~~~~~~~~~~~~"> - <location file="chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `withParameter`" + errorLine1=" definition.withParameter(optional, Type.STRING, /* required= */ false);" + errorLine2=" ~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" + line="113" + column="36"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `withParameter`" errorLine1=" .withParameter(EXPERIMENT_IDS, Type.STRING," errorLine2=" ~~~~~~~~~~~~~"> - <location file="chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" /> + <issue + id="NewApi" + message="Call requires API level 24 (current min is 23): `hasScreenLockConfigured`" + errorLine1=" if (mMode == Mode.SERVER_LINK || hasScreenLockConfigured(getContext())) {" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/features/cablev2_authenticator/java/src/org/chromium/chrome/browser/webauth/authenticator/CableAuthenticatorUI.java" + line="267" + column="54"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `withParameter`" errorLine1=" .withParameter(EXPERIMENT_IDS, Type.STRING," errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" /> + <issue + id="NewApi" + message="Call requires API level 24 (current min is 23): `hasScreenLockConfigured`" + errorLine1=" if (event == Event.RESUMED && hasScreenLockConfigured(getContext())) {" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/features/cablev2_authenticator/java/src/org/chromium/chrome/browser/webauth/authenticator/CableAuthenticatorUI.java" + line="275" + column="51"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `withResult`" errorLine1=" .withResult(AA_ACTION_RESULT, Type.BOOLEAN);" errorLine2=" ~~~~~~~~~~"> - <location file="chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" /> + <issue + id="NewApi" + message="Call requires API level 26 (current min is 23): `deleteLegacyChannels`" + errorLine1=" mChannelsInitializer.deleteLegacyChannels();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/channels/ChannelsUpdater.java" + line="73" + column="34"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `withResult`" errorLine1=" .withResult(AA_ACTION_RESULT, Type.BOOLEAN);" errorLine2=" ~~~~~~~~~~~~"> - <location file="chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" /> + <issue + id="NewApi" + message="Call requires API level 26 (current min is 23): `initializeStartupChannels`" + errorLine1=" mChannelsInitializer.initializeStartupChannels();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/channels/ChannelsUpdater.java" + line="74" + column="34"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `withParameter`" errorLine1=" definition.withParameter(required, Type.STRING, /* required= */ true);" errorLine2=" ~~~~~~~~~~~~~"> - <location file="chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" /> + <issue + id="NewApi" + message="Call requires API level 26 (current min is 23): `updateLocale`" + errorLine1=" mChannelsInitializer.updateLocale(ContextUtils.getApplicationContext().getResources());" + errorLine2=" ~~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/channels/ChannelsUpdater.java" + line="83" + column="34"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `withParameter`" errorLine1=" definition.withParameter(required, Type.STRING, /* required= */ true);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" /> + <issue + id="NewApi" + message="Call requires API level 26 (current min is 23): `onFrameworkExitedPictureInPicture`" + errorLine1=" mPictureInPictureController.onFrameworkExitedPictureInPicture();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java" + line="1156" + column="41"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `withParameter`" errorLine1=" definition.withParameter(optional, Type.STRING, /* required= */ false);" errorLine2=" ~~~~~~~~~~~~~"> - <location file="chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" /> + <issue + id="NewApi" + message="Call requires API level 26 (current min is 23): `PictureInPictureController`" + errorLine1=" mPictureInPictureController = new PictureInPictureController(" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java" + line="1165" + column="43"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `withParameter`" errorLine1=" definition.withParameter(optional, Type.STRING, /* required= */ false);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/features/autofill_assistant/public/java/src/org/chromium/chrome/browser/autofill_assistant/AutofillAssistantDirectActionHandler.java" /> + <issue + id="NewApi" + message="Call requires API level 26 (current min is 23): `attemptPictureInPicture`" + errorLine1=" mPictureInPictureController.attemptPictureInPicture();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java" + line="1180" + column="37"/> </issue> - <issue id="NewApi" message="Call requires API level 24 (current min is 23): `hasScreenLockConfigured`" errorLine1=" if (mMode == Mode.SERVER_LINK || hasScreenLockConfigured(getContext())) {" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/features/cablev2_authenticator/java/src/org/chromium/chrome/browser/webauth/authenticator/CableAuthenticatorUI.java" /> + <issue + id="NewApi" + message="Call requires API level 26 (current min is 23): `onFrameworkExitedPictureInPicture`" + errorLine1=" mPictureInPictureController.onFrameworkExitedPictureInPicture();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java" + line="1255" + column="41"/> </issue> - <issue id="NewApi" message="Call requires API level 24 (current min is 23): `hasScreenLockConfigured`" errorLine1=" if (event == Event.RESUMED && hasScreenLockConfigured(getContext())) {" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/features/cablev2_authenticator/java/src/org/chromium/chrome/browser/webauth/authenticator/CableAuthenticatorUI.java" /> + <issue + id="NewApi" + message="Call requires API level 26 (current min is 23): `getInstance`" + errorLine1=" return SiteChannelsManager.getInstance();" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/dependency_injection/ChromeAppModule.java" + line="76" + column="36"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 23): `deleteLegacyChannels`" errorLine1=" mChannelsInitializer.deleteLegacyChannels();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/channels/ChannelsUpdater.java" /> + <issue + id="NewApi" + message="Call requires API level 24 (current min is 23): `GCMBackgroundTask`" + errorLine1=" return new GCMBackgroundTask();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/background_task_scheduler/ChromeBackgroundTaskFactory.java" + line="60" + column="24"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 23): `initializeStartupChannels`" errorLine1=" mChannelsInitializer.initializeStartupChannels();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/channels/ChannelsUpdater.java" /> + <issue + id="NewApi" + message="Call requires API level 26 (current min is 23): `getChannelIdForOrigin`" + errorLine1=" return SiteChannelsManager.getInstance().getChannelIdForOrigin(origin);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/site_settings/ChromeSiteSettingsDelegate.java" + line="127" + column="50"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 23): `updateLocale`" errorLine1=" mChannelsInitializer.updateLocale(ContextUtils.getApplicationContext().getResources());" errorLine2=" ~~~~~~~~~~~~"> - <location file="chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/channels/ChannelsUpdater.java" /> + <issue + id="NewApi" + message="Call requires API level 26 (current min is 23): `getInstance`" + errorLine1=" return SiteChannelsManager.getInstance().getChannelIdForOrigin(origin);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/site_settings/ChromeSiteSettingsDelegate.java" + line="127" + column="36"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 23): `onFrameworkExitedPictureInPicture`" errorLine1=" mPictureInPictureController.onFrameworkExitedPictureInPicture();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java" /> + <issue + id="NewApi" + message="Call requires API level 24 (current min is 23): `create`" + errorLine1=" mMultiInstanceManager = MultiInstanceManager.create(this, getTabModelOrchestratorSupplier()," + errorLine2=" ~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java" + line="458" + column="54"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 23): `PictureInPictureController`" errorLine1=" mPictureInPictureController = new PictureInPictureController(" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java" /> + <issue + id="NewApi" + message="Call requires API level 25 (current min is 23): `reportNewTabShortcutUsed`" + errorLine1=" reportNewTabShortcutUsed(false);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java" + line="1511" + column="25"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 23): `attemptPictureInPicture`" errorLine1=" mPictureInPictureController.attemptPictureInPicture();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java" /> + <issue + id="NewApi" + message="Call requires API level 25 (current min is 23): `reportNewTabShortcutUsed`" + errorLine1=" reportNewTabShortcutUsed(true);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java" + line="1551" + column="29"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 23): `onFrameworkExitedPictureInPicture`" errorLine1=" mPictureInPictureController.onFrameworkExitedPictureInPicture();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java" /> + <issue + id="NewApi" + message="Call requires API level 24 (current min is 23): `isTabModelMergingEnabled`" + errorLine1=" mMultiInstanceManager != null && mMultiInstanceManager.isTabModelMergingEnabled();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java" + line="1813" + column="72"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 23): `getInstance`" errorLine1=" return SiteChannelsManager.getInstance();" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/dependency_injection/ChromeAppModule.java" /> + <issue + id="NewApi" + message="Call requires API level 24 (current min is 23): `initialize`" + errorLine1=" mMultiInstanceManager.initialize(assignedIndex, getTaskId());" + errorLine2=" ~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java" + line="1842" + column="35"/> </issue> - <issue id="NewApi" message="Call requires API level 24 (current min is 23): `GCMBackgroundTask`" errorLine1=" return new GCMBackgroundTask();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/background_task_scheduler/ChromeBackgroundTaskFactory.java" /> + <issue + id="NewApi" + message="Call requires API level 24 (current min is 23): `allocInstanceId`" + errorLine1=" mWindowId = mMultiInstanceManager.allocInstanceId(windowId, getTaskId(), preferNew);" + errorLine2=" ~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java" + line="2006" + column="47"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 24): `create`" errorLine1=" PredefinedChannel.create(ChannelId.BROWSER," errorLine2=" ~~~~~~"> - <location file="chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/channels/ChromeChannelDefinitions.java" /> + <issue + id="NewApi" + message="Call requires API level 24 (current min is 23): `isStartedUpCorrectly`" + errorLine1=" && !mMultiInstanceManager.isStartedUpCorrectly(getTaskId())) {" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java" + line="2015" + column="43"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 24): `create`" errorLine1=" PredefinedChannel.create(ChannelId.DOWNLOADS," errorLine2=" ~~~~~~"> - <location file="chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/channels/ChromeChannelDefinitions.java" /> + <issue + id="NewApi" + message="Call requires API level 25 (current min is 23): `reportNewTabShortcutUsed`" + errorLine1=" reportNewTabShortcutUsed(false);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java" + line="2046" + column="13"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 24): `create`" errorLine1=" PredefinedChannel.create(ChannelId.INCOGNITO," errorLine2=" ~~~~~~"> - <location file="chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/channels/ChromeChannelDefinitions.java" /> + <issue + id="NewApi" + message="Call requires API level 25 (current min is 23): `reportNewTabShortcutUsed`" + errorLine1=" reportNewTabShortcutUsed(true);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java" + line="2060" + column="17"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 24): `create`" errorLine1=" PredefinedChannel.create(ChannelId.MEDIA_PLAYBACK," errorLine2=" ~~~~~~"> - <location file="chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/channels/ChromeChannelDefinitions.java" /> + <issue + id="NewApi" + message="Call requires API level 24 (current min is 23): `createShortcutGroup`" + errorLine1=" data.addAll(KeyboardShortcuts.createShortcutGroup(this));" + errorLine2=" ~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java" + line="2692" + column="39"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 24): `create`" errorLine1=" PredefinedChannel.create(ChannelId.WEBRTC_CAM_AND_MIC," errorLine2=" ~~~~~~"> - <location file="chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/channels/ChromeChannelDefinitions.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `clearAllContentCaptureData`" + errorLine1=" contentCaptureController.clearAllContentCaptureData();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/content_capture/ContentCaptureHistoryDeletionObserver.java" + line="30" + column="38"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 24): `create`" errorLine1=" PredefinedChannel.create(ChannelId.SCREEN_CAPTURE," errorLine2=" ~~~~~~"> - <location file="chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/channels/ChromeChannelDefinitions.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `clearContentCaptureDataForURLs`" + errorLine1=" contentCaptureController.clearContentCaptureDataForURLs(deletedURLs);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/content_capture/ContentCaptureHistoryDeletionObserver.java" + line="35" + column="46"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 24): `create`" errorLine1=" PredefinedChannel.create(ChannelId.SHARING," errorLine2=" ~~~~~~"> - <location file="chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/channels/ChromeChannelDefinitions.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `notifyViewAppeared`" + errorLine1=" return notifyViewAppeared(parentPlatformSessionData, data);" + errorLine2=" ~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/ContentCapturedTask.java" + line="23" + column="16"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 24): `create`" errorLine1=" PredefinedChannel.create(ChannelId.SITES, R.string.notification_category_sites," errorLine2=" ~~~~~~"> - <location file="chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/channels/ChromeChannelDefinitions.java" /> + <issue + id="NewApi" + message="Extending NotificationTask requires API level 29 (current min is 23): `NotificationTask`" + errorLine1="class ContentRemovedTask extends NotificationTask {" + errorLine2=" ~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/ContentRemovedTask.java" + line="12" + column="34"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 24): `create`" errorLine1=" PredefinedChannel.create(ChannelId.CONTENT_SUGGESTIONS," errorLine2=" ~~~~~~"> - <location file="chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/channels/ChromeChannelDefinitions.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `NotificationTask`" + errorLine1=" super(session, platformSession);" + errorLine2=" ~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/ContentRemovedTask.java" + line="17" + column="9"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 24): `create`" errorLine1=" PredefinedChannel.create(ChannelId.WEBAPP_ACTIONS," errorLine2=" ~~~~~~"> - <location file="chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/channels/ChromeChannelDefinitions.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `log`" + errorLine1=" log("ContentRemovedTask.removeContent");" + errorLine2=" ~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/ContentRemovedTask.java" + line="27" + column="9"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 24): `create`" errorLine1=" PredefinedChannel.create(ChannelId.VR, R.string.notification_category_vr," errorLine2=" ~~~~~~"> - <location file="chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/channels/ChromeChannelDefinitions.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `buildCurrentSession`" + errorLine1=" PlatformSessionData platformSessionData = buildCurrentSession();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/ContentRemovedTask.java" + line="28" + column="51"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 24): `create`" errorLine1=" PredefinedChannel.create(ChannelId.UPDATES," errorLine2=" ~~~~~~"> - <location file="chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/channels/ChromeChannelDefinitions.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `getInstance`" + errorLine1=" PlatformAPIWrapper.getInstance().notifyViewsDisappeared(" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/ContentRemovedTask.java" + line="30" + column="28"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 24): `createBadged`" errorLine1=" PredefinedChannel.createBadged(ChannelId.COMPLETED_DOWNLOADS," errorLine2=" ~~~~~~~~~~~~"> - <location file="chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/channels/ChromeChannelDefinitions.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `notifyViewsDisappeared`" + errorLine1=" PlatformAPIWrapper.getInstance().notifyViewsDisappeared(" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/ContentRemovedTask.java" + line="30" + column="42"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 24): `createBadged`" errorLine1=" PredefinedChannel.createBadged(ChannelId.ANNOUNCEMENT," errorLine2=" ~~~~~~~~~~~~"> - <location file="chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/channels/ChromeChannelDefinitions.java" /> + <issue + id="NewApi" + message="Field requires API level 29 (current min is 23): `contentCaptureSession`" + errorLine1=" platformSessionData.contentCaptureSession," + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/ContentRemovedTask.java" + line="31" + column="37"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 24): `createSilenced`" errorLine1=" PredefinedChannel.createSilenced(ChannelId.WEBAPPS," errorLine2=" ~~~~~~~~~~~~~~"> - <location file="chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/channels/ChromeChannelDefinitions.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `getRootPlatformSessionData`" + errorLine1=" mPlatformSession.getRootPlatformSessionData().autofillId, mRemovedIds);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/ContentRemovedTask.java" + line="32" + column="34"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 24): `create`" errorLine1=" PredefinedChannel.create(ChannelId.WEBAPPS_QUIET," errorLine2=" ~~~~~~"> - <location file="chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/channels/ChromeChannelDefinitions.java" /> + <issue + id="NewApi" + message="Field requires API level 29 (current min is 23): `autofillId`" + errorLine1=" mPlatformSession.getRootPlatformSessionData().autofillId, mRemovedIds);" + errorLine2=" ~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/ContentRemovedTask.java" + line="32" + column="63"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 24): `create`" errorLine1=" PredefinedChannel.create(ChannelId.PRICE_DROP," errorLine2=" ~~~~~~"> - <location file="chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/channels/ChromeChannelDefinitions.java" /> + <issue + id="NewApi" + message="Field requires API level 29 (current min is 23): `mPlatformSession`" + errorLine1=" mPlatformSession.getRootPlatformSessionData().autofillId, mRemovedIds);" + errorLine2=" ~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/ContentRemovedTask.java" + line="32" + column="17"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 24): `create`" errorLine1=" PredefinedChannel.create(ChannelId.SECURITY_KEY," errorLine2=" ~~~~~~"> - <location file="chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/channels/ChromeChannelDefinitions.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `getInstance`" + errorLine1=" AutofillId autofillId = PlatformAPIWrapper.getInstance().newAutofillId(" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/ContentUpdateTask.java" + line="28" + column="52"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 24): `create`" errorLine1=" PredefinedChannel.create(ChannelId.CHROME_TIPS," errorLine2=" ~~~~~~"> - <location file="chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/channels/ChromeChannelDefinitions.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `newAutofillId`" + errorLine1=" AutofillId autofillId = PlatformAPIWrapper.getInstance().newAutofillId(" + errorLine2=" ~~~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/ContentUpdateTask.java" + line="28" + column="66"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 24): `create`" errorLine1=" PredefinedChannel.create(ChannelId.BLUETOOTH," errorLine2=" ~~~~~~"> - <location file="chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/channels/ChromeChannelDefinitions.java" /> + <issue + id="NewApi" + message="Field requires API level 29 (current min is 23): `contentCaptureSession`" + errorLine1=" parentPlatformSessionData.contentCaptureSession," + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/ContentUpdateTask.java" + line="29" + column="43"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 24): `create`" errorLine1=" PredefinedChannel.create(ChannelId.USB, R.string.notification_category_usb," errorLine2=" ~~~~~~"> - <location file="chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/channels/ChromeChannelDefinitions.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `getRootPlatformSessionData`" + errorLine1=" mPlatformSession.getRootPlatformSessionData().autofillId, data.getId());" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/ContentUpdateTask.java" + line="30" + column="34"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 23): `getChannelIdForOrigin`" errorLine1=" return SiteChannelsManager.getInstance().getChannelIdForOrigin(origin);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/site_settings/ChromeSiteSettingsDelegate.java" /> + <issue + id="NewApi" + message="Field requires API level 29 (current min is 23): `autofillId`" + errorLine1=" mPlatformSession.getRootPlatformSessionData().autofillId, data.getId());" + errorLine2=" ~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/ContentUpdateTask.java" + line="30" + column="63"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 23): `getInstance`" errorLine1=" return SiteChannelsManager.getInstance().getChannelIdForOrigin(origin);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/site_settings/ChromeSiteSettingsDelegate.java" /> + <issue + id="NewApi" + message="Field requires API level 29 (current min is 23): `mPlatformSession`" + errorLine1=" mPlatformSession.getRootPlatformSessionData().autofillId, data.getId());" + errorLine2=" ~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/ContentUpdateTask.java" + line="30" + column="17"/> </issue> - <issue id="NewApi" message="Call requires API level 24 (current min is 23): `create`" errorLine1=" mMultiInstanceManager = MultiInstanceManager.create(this, getTabModelOrchestratorSupplier()," errorLine2=" ~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `getInstance`" + errorLine1=" PlatformAPIWrapper.getInstance().notifyViewTextChanged(" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/ContentUpdateTask.java" + line="31" + column="28"/> </issue> - <issue id="NewApi" message="Call requires API level 25 (current min is 23): `reportNewTabShortcutUsed`" errorLine1=" reportNewTabShortcutUsed(false);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `notifyViewTextChanged`" + errorLine1=" PlatformAPIWrapper.getInstance().notifyViewTextChanged(" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/ContentUpdateTask.java" + line="31" + column="42"/> </issue> - <issue id="NewApi" message="Call requires API level 25 (current min is 23): `reportNewTabShortcutUsed`" errorLine1=" reportNewTabShortcutUsed(true);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java" /> + <issue + id="NewApi" + message="Field requires API level 29 (current min is 23): `contentCaptureSession`" + errorLine1=" parentPlatformSessionData.contentCaptureSession, autofillId, data.getValue());" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/ContentUpdateTask.java" + line="32" + column="43"/> </issue> - <issue id="NewApi" message="Call requires API level 24 (current min is 23): `isTabModelMergingEnabled`" errorLine1=" mMultiInstanceManager != null && mMultiInstanceManager.isTabModelMergingEnabled();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java" /> + <issue + id="NewApi" + message="Call requires API level 30 (current min is 23): `collectAndWriteAnrs`" + errorLine1=" List<Pair<File, String>> anrFiles = AnrCollector.collectAndWriteAnrs(anrDir);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/minidump_uploader/android/java/src/org/chromium/components/minidump_uploader/CrashFileManager.java" + line="366" + column="62"/> </issue> - <issue id="NewApi" message="Call requires API level 24 (current min is 23): `initialize`" errorLine1=" mMultiInstanceManager.initialize(assignedIndex, getTaskId());" errorLine2=" ~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `getDownloadUriForFileName`" + errorLine1=" return getDownloadUriForFileName(fileName) != null;" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/download/internal/common/android/java/src/org/chromium/components/download/DownloadCollectionBridge.java" + line="244" + column="16"/> </issue> - <issue id="NewApi" message="Call requires API level 24 (current min is 23): `allocInstanceId`" errorLine1=" mWindowId = mMultiInstanceManager.allocInstanceId(windowId, getTaskId(), preferNew);" errorLine2=" ~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `createPendingParams`" + errorLine1=" createPendingParams(fileName, mimeType, originalUrl, referrer);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/download/internal/common/android/java/src/org/chromium/components/download/DownloadCollectionBridge.java" + line="345" + column="17"/> </issue> - <issue id="NewApi" message="Call requires API level 24 (current min is 23): `isStartedUpCorrectly`" errorLine1=" && !mMultiInstanceManager.isStartedUpCorrectly(getTaskId())) {" errorLine2=" ~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `getDownloadUriForFileName`" + errorLine1=" Uri uri = DownloadCollectionBridge.getDownloadUriForFileName(file.getName());" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/download/DuplicateDownloadClickableSpan.java" + line="56" + column="52"/> </issue> - <issue id="NewApi" message="Call requires API level 25 (current min is 23): `reportNewTabShortcutUsed`" errorLine1=" reportNewTabShortcutUsed(false);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java" /> + <issue + id="NewApi" + message="Extending NotificationTask requires API level 29 (current min is 23): `NotificationTask`" + errorLine1="public class FaviconUpdateTask extends NotificationTask {" + errorLine2=" ~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/FaviconUpdateTask.java" + line="12" + column="40"/> </issue> - <issue id="NewApi" message="Call requires API level 25 (current min is 23): `reportNewTabShortcutUsed`" errorLine1=" reportNewTabShortcutUsed(true);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `NotificationTask`" + errorLine1=" super(session, platformSession);" + errorLine2=" ~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/FaviconUpdateTask.java" + line="14" + column="9"/> </issue> - <issue id="NewApi" message="Call requires API level 24 (current min is 23): `createShortcutGroup`" errorLine1=" data.addAll(KeyboardShortcuts.createShortcutGroup(this));" errorLine2=" ~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `log`" + errorLine1=" log("FaviconUpdateTask.updateFavicon");" + errorLine2=" ~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/FaviconUpdateTask.java" + line="23" + column="9"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `clearAllContentCaptureData`" errorLine1=" contentCaptureController.clearAllContentCaptureData();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/content_capture/ContentCaptureHistoryDeletionObserver.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `buildCurrentSession`" + errorLine1=" PlatformSessionData parentPlatformSessionData = buildCurrentSession();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/FaviconUpdateTask.java" + line="24" + column="57"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `clearContentCaptureDataForURLs`" errorLine1=" contentCaptureController.clearContentCaptureDataForURLs(deletedURLs);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/content_capture/ContentCaptureHistoryDeletionObserver.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `getInstance`" + errorLine1=" PlatformAPIWrapper.getInstance().notifyFaviconUpdated(" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/FaviconUpdateTask.java" + line="26" + column="28"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `notifyViewAppeared`" errorLine1=" return notifyViewAppeared(parentPlatformSessionData, data);" errorLine2=" ~~~~~~~~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/ContentCapturedTask.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `notifyFaviconUpdated`" + errorLine1=" PlatformAPIWrapper.getInstance().notifyFaviconUpdated(" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/FaviconUpdateTask.java" + line="26" + column="42"/> </issue> - <issue id="NewApi" message="Extending NotificationTask requires API level 29 (current min is 23): `NotificationTask`" errorLine1="class ContentRemovedTask extends NotificationTask {" errorLine2=" ~~~~~~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/ContentRemovedTask.java" /> + <issue + id="NewApi" + message="Field requires API level 29 (current min is 23): `contentCaptureSession`" + errorLine1=" parentPlatformSessionData.contentCaptureSession, mSession.get(0).getFavicon());" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/FaviconUpdateTask.java" + line="27" + column="43"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `NotificationTask`" errorLine1=" super(session, platformSession);" errorLine2=" ~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/ContentRemovedTask.java" /> + <issue + id="NewApi" + message="Field requires API level 29 (current min is 23): `mSession`" + errorLine1=" parentPlatformSessionData.contentCaptureSession, mSession.get(0).getFavicon());" + errorLine2=" ~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/FaviconUpdateTask.java" + line="27" + column="66"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `log`" errorLine1=" log("ContentRemovedTask.removeContent");" errorLine2=" ~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/ContentRemovedTask.java" /> + <issue + id="NewApi" + message="Call requires API level 24 (current min is 23): `getLocale`" + errorLine1=" return getLocale(ContextUtils.getApplicationContext()).toLanguageTag();" + errorLine2=" ~~~~~~~~~"> + <location + file="$SRC/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/FeedServiceBridge.java" + line="95" + column="16"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `buildCurrentSession`" errorLine1=" PlatformSessionData platformSessionData = buildCurrentSession();" errorLine2=" ~~~~~~~~~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/ContentRemovedTask.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `addDirectAction`" + errorLine1=" reporter.addDirectAction(ACTION_ID).withParameter(" + errorLine2=" ~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/directactions/FindInPageDirectActionHandler.java" + line="35" + column="22"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `getInstance`" errorLine1=" PlatformAPIWrapper.getInstance().notifyViewsDisappeared(" errorLine2=" ~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/ContentRemovedTask.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `withParameter`" + errorLine1=" reporter.addDirectAction(ACTION_ID).withParameter(" + errorLine2=" ~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/directactions/FindInPageDirectActionHandler.java" + line="35" + column="49"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `notifyViewsDisappeared`" errorLine1=" PlatformAPIWrapper.getInstance().notifyViewsDisappeared(" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/ContentRemovedTask.java" /> + <issue + id="NewApi" + message="Call requires API level 26 (current min is 23): `setPasteAsPlainTextMenuItemTitle`" + errorLine1=" SelectionPopupControllerImpl.setPasteAsPlainTextMenuItemTitle(menu);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/content/public/android/java/src/org/chromium/content/browser/selection/FloatingPastePopupMenu.java" + line="96" + column="42"/> </issue> - <issue id="NewApi" message="Field requires API level 29 (current min is 23): `contentCaptureSession`" errorLine1=" platformSessionData.contentCaptureSession," errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/ContentRemovedTask.java" /> + <issue + id="NewApi" + message="Field requires API level 26 (current min is 23): `CREATOR`" + errorLine1=" _arg0 = data.createTypedArrayList(org.chromium.components.autofill_public.ViewType.CREATOR);" + errorLine2=" ~~~~~~~"> + <location + file="gen/chrome/android/monochrome_public_bundle__lint/SRCJARS/gen/components/android_autofill/browser/autofill_aidl/org/chromium/components/autofill_public/IViewTypeCallback.java" + line="72" + column="94"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `getRootPlatformSessionData`" errorLine1=" mPlatformSession.getRootPlatformSessionData().autofillId, mRemovedIds);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/ContentRemovedTask.java" /> + <issue + id="NewApi" + message="Call requires API level 24 (current min is 23): `isUserVerifyingPlatformAuthenticatorAvailable`" + errorLine1=" mAuthenticator.isUserVerifyingPlatformAuthenticatorAvailable((isUVPAA) -> {" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/webauthn/android/java/src/org/chromium/components/webauthn/InternalAuthenticator.java" + line="116" + column="24"/> </issue> - <issue id="NewApi" message="Field requires API level 29 (current min is 23): `autofillId`" errorLine1=" mPlatformSession.getRootPlatformSessionData().autofillId, mRemovedIds);" errorLine2=" ~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/ContentRemovedTask.java" /> + <issue + id="NewApi" + message="Call requires API level 26 (current min is 23): `onLocaleChanged`" + errorLine1=" WebLayerNotificationChannels.onLocaleChanged();" + errorLine2=" ~~~~~~~~~~~~~~~"> + <location + file="$SRC/weblayer/browser/java/org/chromium/weblayer_private/LocaleChangedBroadcastReceiver.java" + line="35" + column="38"/> </issue> - <issue id="NewApi" message="Field requires API level 29 (current min is 23): `mPlatformSession`" errorLine1=" mPlatformSession.getRootPlatformSessionData().autofillId, mRemovedIds);" errorLine2=" ~~~~~~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/ContentRemovedTask.java" /> + <issue + id="NewApi" + message="Call requires API level 24 (current min is 23): `addMetadataToFormat`" + errorLine1=" hdrMetadata.addMetadataToFormat(format);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/media/base/android/java/src/org/chromium/media/MediaFormatBuilder.java" + line="22" + column="25"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `getInstance`" errorLine1=" AutofillId autofillId = PlatformAPIWrapper.getInstance().newAutofillId(" errorLine2=" ~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/ContentUpdateTask.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `addDirectAction`" + errorLine1=" reporter.addDirectAction(entry.getKey());" + errorLine2=" ~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/directactions/MenuDirectActionHandler.java" + line="103" + column="26"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `newAutofillId`" errorLine1=" AutofillId autofillId = PlatformAPIWrapper.getInstance().newAutofillId(" errorLine2=" ~~~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/ContentUpdateTask.java" /> + <issue + id="NewApi" + message="Call requires API level 30 (current min is 23): `getExitReason`" + errorLine1=" int reason = ProcessExitReasonFromSystem.getExitReason(previousPid);" + errorLine2=" ~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/crash/MinidumpUploadServiceImpl.java" + line="166" + column="54"/> </issue> - <issue id="NewApi" message="Field requires API level 29 (current min is 23): `contentCaptureSession`" errorLine1=" parentPlatformSessionData.contentCaptureSession," errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/ContentUpdateTask.java" /> + <issue + id="NewApi" + message="Extending MultiInstanceManager requires API level 24 (current min is 23): `MultiInstanceManager`" + errorLine1="class MultiInstanceManagerApi31 extends MultiInstanceManager implements ActivityStateListener {" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" + line="57" + column="41"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `getRootPlatformSessionData`" errorLine1=" mPlatformSession.getRootPlatformSessionData().autofillId, data.getId());" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/ContentUpdateTask.java" /> + <issue + id="NewApi" + message="Call requires API level 24 (current min is 23): `MultiInstanceManager`" + errorLine1=" super(activity, tabModelOrchestratorSupplier, multiWindowModeStateDispatcher," + errorLine2=" ~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" + line="90" + column="9"/> </issue> - <issue id="NewApi" message="Field requires API level 29 (current min is 23): `autofillId`" errorLine1=" mPlatformSession.getRootPlatformSessionData().autofillId, data.getId());" errorLine2=" ~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/ContentUpdateTask.java" /> + <issue + id="NewApi" + message="Field requires API level 24 (current min is 23): `mActivity`" + errorLine1=" InstanceSwitcherCoordinator.showDialog(mActivity, mModalDialogManagerSupplier.get()," + errorLine2=" ~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" + line="101" + column="52"/> </issue> - <issue id="NewApi" message="Field requires API level 29 (current min is 23): `mPlatformSession`" errorLine1=" mPlatformSession.getRootPlatformSessionData().autofillId, data.getId());" errorLine2=" ~~~~~~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/ContentUpdateTask.java" /> + <issue + id="NewApi" + message="Call requires API level 24 (current min is 23): `handleMenuOrKeyboardAction`" + errorLine1=" return super.handleMenuOrKeyboardAction(id, fromMenu);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" + line="114" + column="22"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `getInstance`" errorLine1=" PlatformAPIWrapper.getInstance().notifyViewTextChanged(" errorLine2=" ~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/ContentUpdateTask.java" /> + <issue + id="NewApi" + message="Field requires API level 24 (current min is 23): `mActivity`" + errorLine1=" TargetSelectorCoordinator.showDialog(mActivity, mModalDialogManagerSupplier.get()," + errorLine2=" ~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" + line="119" + column="46"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `notifyViewTextChanged`" errorLine1=" PlatformAPIWrapper.getInstance().notifyViewTextChanged(" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/ContentUpdateTask.java" /> + <issue + id="NewApi" + message="Call requires API level 24 (current min is 23): `onMultiInstanceModeStarted`" + errorLine1=" onMultiInstanceModeStarted();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" + line="129" + column="13"/> </issue> - <issue id="NewApi" message="Field requires API level 29 (current min is 23): `contentCaptureSession`" errorLine1=" parentPlatformSessionData.contentCaptureSession, autofillId, data.getValue());" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/ContentUpdateTask.java" /> + <issue + id="NewApi" + message="Field requires API level 24 (current min is 23): `mActivity`" + errorLine1=" mActivity, info.instanceId, /*preferNew=*/false, /*openAdjacently=*/true);" + errorLine2=" ~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" + line="131" + column="21"/> </issue> - <issue id="NewApi" message="Call requires API level 30 (current min is 23): `collectAndWriteAnrs`" errorLine1=" List<Pair<File, String>> anrFiles = AnrCollector.collectAndWriteAnrs(anrDir);" errorLine2=" ~~~~~~~~~~~~~~~~~~~"> - <location file="components/minidump_uploader/android/java/src/org/chromium/components/minidump_uploader/CrashFileManager.java" /> + <issue + id="NewApi" + message="Field requires API level 24 (current min is 23): `mActivity`" + errorLine1=" ReparentingTask.from(tab).begin(mActivity, intent," + errorLine2=" ~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" + line="132" + column="45"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `getDownloadUriForFileName`" errorLine1=" return getDownloadUriForFileName(fileName) != null;" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/download/internal/common/android/java/src/org/chromium/components/download/DownloadCollectionBridge.java" /> + <issue + id="NewApi" + message="Field requires API level 24 (current min is 23): `mMultiWindowModeStateDispatcher`" + errorLine1=" mMultiWindowModeStateDispatcher.getOpenInOtherWindowActivityOptions(), null);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" + line="133" + column="21"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `createPendingParams`" errorLine1=" createPendingParams(fileName, mimeType, originalUrl, referrer);" errorLine2=" ~~~~~~~~~~~~~~~~~~~"> - <location file="components/download/internal/common/android/java/src/org/chromium/components/download/DownloadCollectionBridge.java" /> + <issue + id="NewApi" + message="Call requires API level 24 (current min is 23): `setOpenInOtherWindowIntentExtras`" + errorLine1=" MultiWindowUtils.setOpenInOtherWindowIntentExtras(" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" + line="142" + column="26"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `getDownloadUriForFileName`" errorLine1=" Uri uri = DownloadCollectionBridge.getDownloadUriForFileName(file.getName());" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/download/DuplicateDownloadClickableSpan.java" /> + <issue + id="NewApi" + message="Field requires API level 24 (current min is 23): `mActivity`" + errorLine1=" intent, mActivity, targetActivity.getClass());" + errorLine2=" ~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" + line="143" + column="25"/> </issue> - <issue id="NewApi" message="Extending NotificationTask requires API level 29 (current min is 23): `NotificationTask`" errorLine1="public class FaviconUpdateTask extends NotificationTask {" errorLine2=" ~~~~~~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/FaviconUpdateTask.java" /> + <issue + id="NewApi" + message="Call requires API level 24 (current min is 23): `onMultiInstanceModeStarted`" + errorLine1=" onMultiInstanceModeStarted();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" + line="144" + column="9"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `NotificationTask`" errorLine1=" super(session, platformSession);" errorLine2=" ~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/FaviconUpdateTask.java" /> + <issue + id="NewApi" + message="Field requires API level 24 (current min is 23): `mActivity`" + errorLine1=" ReparentingTask.from(tab).setupIntent(mActivity, intent, null);" + errorLine2=" ~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" + line="147" + column="47"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `log`" errorLine1=" log("FaviconUpdateTask.updateFavicon");" errorLine2=" ~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/FaviconUpdateTask.java" /> + <issue + id="NewApi" + message="Field requires API level 24 (current min is 23): `mActivity`" + errorLine1=" Intent intent = new Intent(mActivity, ChromeTabbedActivity.class);" + errorLine2=" ~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" + line="155" + column="36"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `buildCurrentSession`" errorLine1=" PlatformSessionData parentPlatformSessionData = buildCurrentSession();" errorLine2=" ~~~~~~~~~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/FaviconUpdateTask.java" /> + <issue + id="NewApi" + message="Call requires API level 24 (current min is 23): `onMultiInstanceModeStarted`" + errorLine1=" onMultiInstanceModeStarted();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" + line="156" + column="9"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `getInstance`" errorLine1=" PlatformAPIWrapper.getInstance().notifyFaviconUpdated(" errorLine2=" ~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/FaviconUpdateTask.java" /> + <issue + id="NewApi" + message="Call requires API level 24 (current min is 23): `setOpenInOtherWindowIntentExtras`" + errorLine1=" MultiWindowUtils.setOpenInOtherWindowIntentExtras(" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" + line="157" + column="26"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `notifyFaviconUpdated`" errorLine1=" PlatformAPIWrapper.getInstance().notifyFaviconUpdated(" errorLine2=" ~~~~~~~~~~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/FaviconUpdateTask.java" /> + <issue + id="NewApi" + message="Field requires API level 24 (current min is 23): `mActivity`" + errorLine1=" intent, mActivity, ChromeTabbedActivity.class);" + errorLine2=" ~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" + line="158" + column="25"/> </issue> - <issue id="NewApi" message="Field requires API level 29 (current min is 23): `contentCaptureSession`" errorLine1=" parentPlatformSessionData.contentCaptureSession, mSession.get(0).getFavicon());" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/FaviconUpdateTask.java" /> + <issue + id="NewApi" + message="Field requires API level 24 (current min is 23): `mMultiWindowModeStateDispatcher`" + errorLine1=" if (mMultiWindowModeStateDispatcher.canEnterMultiWindowMode()" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" + line="163" + column="13"/> </issue> - <issue id="NewApi" message="Field requires API level 29 (current min is 23): `mSession`" errorLine1=" parentPlatformSessionData.contentCaptureSession, mSession.get(0).getFavicon());" errorLine2=" ~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/FaviconUpdateTask.java" /> + <issue + id="NewApi" + message="Field requires API level 24 (current min is 23): `mMultiWindowModeStateDispatcher`" + errorLine1=" || mMultiWindowModeStateDispatcher.isInMultiWindowMode()" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" + line="164" + column="20"/> </issue> - <issue id="NewApi" message="Call requires API level 24 (current min is 23): `getLocale`" errorLine1=" return getLocale(ContextUtils.getApplicationContext()).toLanguageTag();" errorLine2=" ~~~~~~~~~"> - <location file="chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/FeedServiceBridge.java" /> + <issue + id="NewApi" + message="Field requires API level 24 (current min is 23): `mMultiWindowModeStateDispatcher`" + errorLine1=" || mMultiWindowModeStateDispatcher.isInMultiDisplayMode()) {" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" + line="165" + column="20"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `addDirectAction`" errorLine1=" reporter.addDirectAction(ACTION_ID).withParameter(" errorLine2=" ~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/directactions/FindInPageDirectActionHandler.java" /> + <issue + id="NewApi" + message="Field requires API level 24 (current min is 23): `mMultiWindowModeStateDispatcher`" + errorLine1=" Bundle bundle = mMultiWindowModeStateDispatcher.getOpenInOtherWindowActivityOptions();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" + line="167" + column="29"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `withParameter`" errorLine1=" reporter.addDirectAction(ACTION_ID).withParameter(" errorLine2=" ~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/directactions/FindInPageDirectActionHandler.java" /> + <issue + id="NewApi" + message="Field requires API level 24 (current min is 23): `mActivity`" + errorLine1=" mActivity.startActivity(intent, bundle);" + errorLine2=" ~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" + line="168" + column="13"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `withParameter`" errorLine1=" ARGUMENT_NAME, Type.STRING, /* required = */ true);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/directactions/FindInPageDirectActionHandler.java" /> + <issue + id="NewApi" + message="Field requires API level 24 (current min is 23): `mActivity`" + errorLine1=" mActivity.startActivity(intent);" + errorLine2=" ~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" + line="170" + column="13"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 23): `setPasteAsPlainTextMenuItemTitle`" errorLine1=" SelectionPopupControllerImpl.setPasteAsPlainTextMenuItemTitle(menu);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="content/public/android/java/src/org/chromium/content/browser/selection/FloatingPastePopupMenu.java" /> + <issue + id="NewApi" + message="Field requires API level 24 (current min is 23): `mActivity`" + errorLine1=" if (a == mActivity) {" + errorLine2=" ~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" + line="189" + column="26"/> </issue> - <issue id="NewApi" message="Field requires API level 26 (current min is 23): `CREATOR`" errorLine1=" _arg0 = data.createTypedArrayList(org.chromium.components.autofill_public.ViewType.CREATOR);" errorLine2=" ~~~~~~~"> - <location file="gen/chrome/android/monochrome_public_bundle__lint/SRCJARS/gen/components/android_autofill/browser/autofill_aidl/org/chromium/components/autofill_public/IViewTypeCallback.java" /> + <issue + id="NewApi" + message="Field requires API level 24 (current min is 23): `mActivity`" + errorLine1=" assert activity != mActivity;" + errorLine2=" ~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" + line="211" + column="28"/> </issue> - <issue id="NewApi" message="Call requires API level 24 (current min is 23): `isUserVerifyingPlatformAuthenticatorAvailable`" errorLine1=" mAuthenticator.isUserVerifyingPlatformAuthenticatorAvailable((isUVPAA) -> {" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/webauthn/android/java/src/org/chromium/components/webauthn/InternalAuthenticator.java" /> + <issue + id="NewApi" + message="Field requires API level 24 (current min is 23): `mActivity`" + errorLine1=" (ActivityManager) mActivity.getSystemService(Context.ACTIVITY_SERVICE);" + errorLine2=" ~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" + line="265" + column="35"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 23): `onLocaleChanged`" errorLine1=" WebLayerNotificationChannels.onLocaleChanged();" errorLine2=" ~~~~~~~~~~~~~~~"> - <location file="weblayer/browser/java/org/chromium/weblayer_private/LocaleChangedBroadcastReceiver.java" /> + <issue + id="NewApi" + message="Field requires API level 24 (current min is 23): `mActivity`" + errorLine1=" ApplicationStatus.registerStateListenerForActivity(this, mActivity);" + errorLine2=" ~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" + line="274" + column="66"/> </issue> - <issue id="NewApi" message="Call requires API level 24 (current min is 23): `addMetadataToFormat`" errorLine1=" hdrMetadata.addMetadataToFormat(format);" errorLine2=" ~~~~~~~~~~~~~~~~~~~"> - <location file="media/base/android/java/src/org/chromium/media/MediaFormatBuilder.java" /> + <issue + id="NewApi" + message="Field requires API level 24 (current min is 23): `mTabModelOrchestratorSupplier`" + errorLine1=" TabModelSelector selector = mTabModelOrchestratorSupplier.get().getTabModelSelector();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" + line="279" + column="37"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `addDirectAction`" errorLine1=" reporter.addDirectAction(entry.getKey());" errorLine2=" ~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/directactions/MenuDirectActionHandler.java" /> + <issue + id="NewApi" + message="Field requires API level 24 (current min is 23): `mActivity`" + errorLine1=" (ActivityManager) mActivity.getSystemService(Context.ACTIVITY_SERVICE);" + errorLine2=" ~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" + line="364" + column="35"/> </issue> - <issue id="NewApi" message="Call requires API level 30 (current min is 23): `getExitReason`" errorLine1=" int reason = ProcessExitReasonFromSystem.getExitReason(previousPid);" errorLine2=" ~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/crash/MinidumpUploadServiceImpl.java" /> + <issue + id="NewApi" + message="Call requires API level 24 (current min is 23): `onMultiInstanceModeStarted`" + errorLine1=" onMultiInstanceModeStarted();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" + line="528" + column="9"/> </issue> - <issue id="NewApi" message="Extending MultiInstanceManager requires API level 24 (current min is 23): `MultiInstanceManager`" errorLine1="class MultiInstanceManagerApi31 extends MultiInstanceManager implements ActivityStateListener {" errorLine2=" ~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" /> + <issue + id="NewApi" + message="Field requires API level 24 (current min is 23): `mActivity`" + errorLine1=" mActivity, instanceId, /*preferNew=*/false, openAdjacently);" + errorLine2=" ~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" + line="532" + column="17"/> </issue> - <issue id="NewApi" message="Call requires API level 24 (current min is 23): `MultiInstanceManager`" errorLine1=" super(activity, tabModelOrchestratorSupplier, multiWindowModeStateDispatcher," errorLine2=" ~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" /> + <issue + id="NewApi" + message="Field requires API level 24 (current min is 23): `mActivity`" + errorLine1=" mActivity.startActivity(" + errorLine2=" ~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" + line="534" + column="13"/> </issue> - <issue id="NewApi" message="Field requires API level 24 (current min is 23): `mActivity`" errorLine1=" InstanceSwitcherCoordinator.showDialog(mActivity, mModalDialogManagerSupplier.get()," errorLine2=" ~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" /> + <issue + id="NewApi" + message="Field requires API level 24 (current min is 23): `mMultiWindowModeStateDispatcher`" + errorLine1=" intent, mMultiWindowModeStateDispatcher.getOpenInOtherWindowActivityOptions());" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" + line="535" + column="29"/> </issue> - <issue id="NewApi" message="Call requires API level 24 (current min is 23): `handleMenuOrKeyboardAction`" errorLine1=" return super.handleMenuOrKeyboardAction(id, fromMenu);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" /> + <issue + id="NewApi" + message="Field requires API level 24 (current min is 23): `mActivity`" + errorLine1=" mActivity.startActivity(intent);" + errorLine2=" ~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" + line="537" + column="13"/> </issue> - <issue id="NewApi" message="Field requires API level 24 (current min is 23): `mActivity`" errorLine1=" TargetSelectorCoordinator.showDialog(mActivity, mModalDialogManagerSupplier.get()," errorLine2=" ~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" /> + <issue + id="NewApi" + message="Field requires API level 24 (current min is 23): `mTabModelOrchestratorSupplier`" + errorLine1=" mTabModelOrchestratorSupplier.get().cleanupInstance(instanceId);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" + line="559" + column="9"/> </issue> - <issue id="NewApi" message="Call requires API level 24 (current min is 23): `onMultiInstanceModeStarted`" errorLine1=" onMultiInstanceModeStarted();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" /> + <issue + id="NewApi" + message="Field requires API level 24 (current min is 23): `mActivity`" + errorLine1=" ActivityManager am = (ActivityManager) mActivity.getSystemService(Context.ACTIVITY_SERVICE);" + errorLine2=" ~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" + line="565" + column="48"/> </issue> - <issue id="NewApi" message="Field requires API level 24 (current min is 23): `mActivity`" errorLine1=" mActivity, info.instanceId, /*preferNew=*/false, /*openAdjacently=*/true);" errorLine2=" ~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" /> + <issue + id="NewApi" + message="Field requires API level 24 (current min is 23): `mTabModelOrchestratorSupplier`" + errorLine1=" return mTabModelOrchestratorSupplier.get()" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" + line="570" + column="16"/> </issue> - <issue id="NewApi" message="Field requires API level 24 (current min is 23): `mActivity`" errorLine1=" ReparentingTask.from(tab).begin(mActivity, intent," errorLine2=" ~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" /> + <issue + id="NewApi" + message="Call requires API level 24 (current min is 23): `onDestroy`" + errorLine1=" super.onDestroy();" + errorLine2=" ~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" + line="585" + column="15"/> </issue> - <issue id="NewApi" message="Field requires API level 24 (current min is 23): `mMultiWindowModeStateDispatcher`" errorLine1=" mMultiWindowModeStateDispatcher.getOpenInOtherWindowActivityOptions(), null);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" /> + <issue + id="NewApi" + message="Call requires API level 24 (current min is 23): `onResumeWithNative`" + errorLine1=" super.onResumeWithNative();" + errorLine2=" ~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" + line="600" + column="15"/> </issue> - <issue id="NewApi" message="Call requires API level 24 (current min is 23): `setOpenInOtherWindowIntentExtras`" errorLine1=" MultiWindowUtils.setOpenInOtherWindowIntentExtras(" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" /> + <issue + id="NewApi" + message="Call requires API level 24 (current min is 23): `setOpenInOtherWindowIntentExtras`" + errorLine1=" MultiWindowUtils.setOpenInOtherWindowIntentExtras(intent, mActivity, targetActivity);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiWindowModeStateDispatcherImpl.java" + line="90" + column="26"/> </issue> - <issue id="NewApi" message="Field requires API level 24 (current min is 23): `mActivity`" errorLine1=" intent, mActivity, targetActivity.getClass());" errorLine2=" ~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" /> + <issue + id="NewApi" + message="Call requires API level 26 (current min is 23): `isValidSiteChannelId`" + errorLine1=" if (channelId == null || !SiteChannelsManager.isValidSiteChannelId(channelId)) {" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationPlatformBridge.java" + line="417" + column="55"/> </issue> - <issue id="NewApi" message="Call requires API level 24 (current min is 23): `onMultiInstanceModeStarted`" errorLine1=" onMultiInstanceModeStarted();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" /> + <issue + id="NewApi" + message="Call requires API level 26 (current min is 23): `toSiteOrigin`" + errorLine1=" return SiteChannelsManager.toSiteOrigin(channelId);" + errorLine2=" ~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationPlatformBridge.java" + line="420" + column="36"/> </issue> - <issue id="NewApi" message="Field requires API level 24 (current min is 23): `mActivity`" errorLine1=" ReparentingTask.from(tab).setupIntent(mActivity, intent, null);" errorLine2=" ~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" /> + <issue + id="NewApi" + message="Call requires API level 28 (current min is 23): `getBitmapFromIcon`" + errorLine1=" return getBitmapFromIcon(notification.getLargeIcon());" + errorLine2=" ~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/usage_stats/NotificationSuspender.java" + line="146" + column="16"/> </issue> - <issue id="NewApi" message="Field requires API level 24 (current min is 23): `mActivity`" errorLine1=" Intent intent = new Intent(mActivity, ChromeTabbedActivity.class);" errorLine2=" ~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" /> + <issue + id="NewApi" + message="Call requires API level 28 (current min is 23): `getBitmapFromIcon`" + errorLine1=" return getBitmapFromIcon(notification.getSmallIcon());" + errorLine2=" ~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/usage_stats/NotificationSuspender.java" + line="151" + column="16"/> </issue> - <issue id="NewApi" message="Call requires API level 24 (current min is 23): `onMultiInstanceModeStarted`" errorLine1=" onMultiInstanceModeStarted();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" /> + <issue + id="NewApi" + message="Call requires API level 26 (current min is 23): `ChannelsInitializer`" + errorLine1=" ChannelsInitializer channelsInitializer = new ChannelsInitializer(notificationManagerProxy," + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/NotificationWrapperBuilderFactory.java" + line="46" + column="51"/> </issue> - <issue id="NewApi" message="Call requires API level 24 (current min is 23): `setOpenInOtherWindowIntentExtras`" errorLine1=" MultiWindowUtils.setOpenInOtherWindowIntentExtras(" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" /> + <issue + id="NewApi" + message="Call requires API level 26 (current min is 23): `getInstance`" + errorLine1=" ChromeChannelDefinitions.getInstance(), context.getResources());" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/NotificationWrapperBuilderFactory.java" + line="47" + column="42"/> </issue> - <issue id="NewApi" message="Field requires API level 24 (current min is 23): `mActivity`" errorLine1=" intent, mActivity, ChromeTabbedActivity.class);" errorLine2=" ~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" /> + <issue + id="NewApi" + message="Call requires API level 30 (current min is 23): `getMaximumWindowMetricsBounds`" + errorLine1=" Rect rect = ApiHelperForR.getMaximumWindowMetricsBounds(windowManager);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/ui/android/java/src/org/chromium/ui/display/PhysicalDisplayAndroid.java" + line="166" + column="35"/> </issue> - <issue id="NewApi" message="Field requires API level 24 (current min is 23): `mMultiWindowModeStateDispatcher`" errorLine1=" if (mMultiWindowModeStateDispatcher.canEnterMultiWindowMode()" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" /> + <issue + id="NewApi" + message="Call requires API level 30 (current min is 23): `getDisplay`" + errorLine1=" updateCommon(size, displayMetrics.density, ApiHelperForR.getDisplay(mWindowContext));" + errorLine2=" ~~~~~~~~~~"> + <location + file="$SRC/ui/android/java/src/org/chromium/ui/display/PhysicalDisplayAndroid.java" + line="169" + column="66"/> </issue> - <issue id="NewApi" message="Field requires API level 24 (current min is 23): `mMultiWindowModeStateDispatcher`" errorLine1=" || mMultiWindowModeStateDispatcher.isInMultiWindowMode()" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" /> + <issue + id="NewApi" + message="Call requires API level 31 (current min is 26): `setAutoEnterEnabled`" + errorLine1=" ApiHelperForS.setAutoEnterEnabled(builder, true);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/media/PictureInPictureController.java" + line="426" + column="27"/> </issue> - <issue id="NewApi" message="Field requires API level 24 (current min is 23): `mMultiWindowModeStateDispatcher`" errorLine1=" || mMultiWindowModeStateDispatcher.isInMultiDisplayMode()) {" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" /> + <issue + id="NewApi" + message="Call requires API level 31 (current min is 26): `setAutoEnterEnabled`" + errorLine1=" ApiHelperForS.setAutoEnterEnabled(builder, false);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/media/PictureInPictureController.java" + line="428" + column="27"/> </issue> - <issue id="NewApi" message="Field requires API level 24 (current min is 23): `mMultiWindowModeStateDispatcher`" errorLine1=" Bundle bundle = mMultiWindowModeStateDispatcher.getOpenInOtherWindowActivityOptions();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" /> + <issue + id="NewApi" + message="Call requires API level 26 (current min is 23): `createNotificationChannel`" + errorLine1=" mNotificationManager.createNotificationChannel();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/PriceMessageService.java" + line="242" + column="38"/> </issue> - <issue id="NewApi" message="Field requires API level 24 (current min is 23): `mActivity`" errorLine1=" mActivity.startActivity(intent, bundle);" errorLine2=" ~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" /> + <issue + id="NewApi" + message="Extending NotificationTask requires API level 29 (current min is 23): `NotificationTask`" + errorLine1="abstract class ProcessContentCaptureDataTask extends NotificationTask {" + errorLine2=" ~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/ProcessContentCaptureDataTask.java" + line="16" + column="54"/> </issue> - <issue id="NewApi" message="Field requires API level 24 (current min is 23): `mActivity`" errorLine1=" mActivity.startActivity(intent);" errorLine2=" ~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `NotificationTask`" + errorLine1=" super(session, platformSession);" + errorLine2=" ~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/ProcessContentCaptureDataTask.java" + line="25" + column="9"/> </issue> - <issue id="NewApi" message="Field requires API level 24 (current min is 23): `mActivity`" errorLine1=" if (a == mActivity) {" errorLine2=" ~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `log`" + errorLine1=" log("ProcessContentTaskBase.processContent");" + errorLine2=" ~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/ProcessContentCaptureDataTask.java" + line="35" + column="9"/> </issue> - <issue id="NewApi" message="Field requires API level 24 (current min is 23): `mActivity`" errorLine1=" assert activity != mActivity;" errorLine2=" ~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `buildCurrentSession`" + errorLine1=" PlatformSessionData platformSessionData = buildCurrentSession();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/ProcessContentCaptureDataTask.java" + line="36" + column="51"/> </issue> - <issue id="NewApi" message="Field requires API level 24 (current min is 23): `mActivity`" errorLine1=" (ActivityManager) mActivity.getSystemService(Context.ACTIVITY_SERVICE);" errorLine2=" ~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `createOrGetSession`" + errorLine1=" createOrGetSession(parentPlatformSessionData, data);" + errorLine2=" ~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/ProcessContentCaptureDataTask.java" + line="45" + column="17"/> </issue> - <issue id="NewApi" message="Field requires API level 24 (current min is 23): `mActivity`" errorLine1=" ApplicationStatus.registerStateListenerForActivity(this, mActivity);" errorLine2=" ~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `PlatformSessionData`" + errorLine1=" PlatformSessionData platformSessionData = new PlatformSessionData(" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/ProcessContentCaptureDataTask.java" + line="64" + column="55"/> </issue> - <issue id="NewApi" message="Field requires API level 24 (current min is 23): `mTabModelOrchestratorSupplier`" errorLine1=" TabModelSelector selector = mTabModelOrchestratorSupplier.get().getTabModelSelector();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" /> + <issue + id="NewApi" + message="Field requires API level 29 (current min is 23): `contentCaptureSession`" + errorLine1=" parentPlatformSessionData.contentCaptureSession, autofillId);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/ProcessContentCaptureDataTask.java" + line="65" + column="47"/> </issue> - <issue id="NewApi" message="Field requires API level 24 (current min is 23): `mActivity`" errorLine1=" (ActivityManager) mActivity.getSystemService(Context.ACTIVITY_SERVICE);" errorLine2=" ~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" /> + <issue + id="NewApi" + message="Call requires API level 30 (current min is 23): `getExitReason`" + errorLine1=" recordAsEnumHistogram(umaName, getExitReason(pid));" + errorLine2=" ~~~~~~~~~~~~~"> + <location + file="$SRC/components/crash/android/java/src/org/chromium/components/crash/browser/ProcessExitReasonFromSystem.java" + line="80" + column="40"/> </issue> - <issue id="NewApi" message="Call requires API level 24 (current min is 23): `onMultiInstanceModeStarted`" errorLine1=" onMultiInstanceModeStarted();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `getInstance`" + errorLine1=" () -> PlatformContentCaptureController.getInstance()));" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessInitializationHandler.java" + line="285" + column="56"/> </issue> - <issue id="NewApi" message="Field requires API level 24 (current min is 23): `mActivity`" errorLine1=" mActivity, instanceId, /*preferNew=*/false, openAdjacently);" errorLine2=" ~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" /> + <issue + id="NewApi" + message="Call requires API level 24 (current min is 23): `logEGLShaderCacheSizeHistogram`" + errorLine1=" ProcessInitializationHandler::logEGLShaderCacheSizeHistogram);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/init/ProcessInitializationHandler.java" + line="428" + column="17"/> </issue> - <issue id="NewApi" message="Field requires API level 24 (current min is 23): `mActivity`" errorLine1=" mActivity.startActivity(" errorLine2=" ~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `getInstance`" + errorLine1=" PlatformContentCaptureController.getInstance();" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/weblayer/browser/java/org/chromium/weblayer_private/ProfileImpl.java" + line="279" + column="50"/> </issue> - <issue id="NewApi" message="Field requires API level 24 (current min is 23): `mMultiWindowModeStateDispatcher`" errorLine1=" intent, mMultiWindowModeStateDispatcher.getOpenInOtherWindowActivityOptions());" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `clearAllContentCaptureData`" + errorLine1=" controller.clearAllContentCaptureData();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/weblayer/browser/java/org/chromium/weblayer_private/ProfileImpl.java" + line="283" + column="32"/> </issue> - <issue id="NewApi" message="Field requires API level 24 (current min is 23): `mActivity`" errorLine1=" mActivity.startActivity(intent);" errorLine2=" ~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `onPerformDirectAction`" + errorLine1=" mDirectActionInitializer.onPerformDirectAction(" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordinator.java" + line="999" + column="34"/> </issue> - <issue id="NewApi" message="Field requires API level 24 (current min is 23): `mTabModelOrchestratorSupplier`" errorLine1=" mTabModelOrchestratorSupplier.get().cleanupInstance(instanceId);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `onGetDirectActions`" + errorLine1=" mDirectActionInitializer.onGetDirectActions(cancellationSignal, callback);" + errorLine2=" ~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordinator.java" + line="1014" + column="34"/> </issue> - <issue id="NewApi" message="Field requires API level 24 (current min is 23): `mActivity`" errorLine1=" ActivityManager am = (ActivityManager) mActivity.getSystemService(Context.ACTIVITY_SERVICE);" errorLine2=" ~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `DirectActionInitializer`" + errorLine1=" mDirectActionInitializer = new DirectActionInitializer(mActivity, mActivityType," + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordinator.java" + line="1396" + column="36"/> </issue> - <issue id="NewApi" message="Field requires API level 24 (current min is 23): `mTabModelOrchestratorSupplier`" errorLine1=" return mTabModelOrchestratorSupplier.get()" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" /> + <issue + id="NewApi" + message="Call requires API level 28 (current min is 23): `onSelectionModified`" + errorLine1=" mSmartSelectionEventProcessor.onSelectionModified(" + errorLine2=" ~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/content/public/android/java/src/org/chromium/content/browser/selection/SelectionPopupControllerImpl.java" + line="432" + column="55"/> </issue> - <issue id="NewApi" message="Call requires API level 24 (current min is 23): `onDestroy`" errorLine1=" super.onDestroy();" errorLine2=" ~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" /> + <issue + id="NewApi" + message="Call requires API level 28 (current min is 23): `onSelectionAction`" + errorLine1=" mSmartSelectionEventProcessor.onSelectionAction(mLastSelectedText," + errorLine2=" ~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/content/public/android/java/src/org/chromium/content/browser/selection/SelectionPopupControllerImpl.java" + line="436" + column="55"/> </issue> - <issue id="NewApi" message="Call requires API level 24 (current min is 23): `onResumeWithNative`" errorLine1=" super.onResumeWithNative();" errorLine2=" ~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31.java" /> + <issue + id="NewApi" + message="Call requires API level 28 (current min is 23): `onSelectionStarted`" + errorLine1=" mSmartSelectionEventProcessor.onSelectionStarted(" + errorLine2=" ~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/content/public/android/java/src/org/chromium/content/browser/selection/SelectionPopupControllerImpl.java" + line="443" + column="55"/> </issue> - <issue id="NewApi" message="Call requires API level 24 (current min is 23): `setOpenInOtherWindowIntentExtras`" errorLine1=" MultiWindowUtils.setOpenInOtherWindowIntentExtras(intent, mActivity, targetActivity);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiWindowModeStateDispatcherImpl.java" /> + <issue + id="NewApi" + message="Call requires API level 26 (current min is 23): `setPasteAsPlainTextMenuItemTitle`" + errorLine1=" setPasteAsPlainTextMenuItemTitle(menu);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/content/public/android/java/src/org/chromium/content/browser/selection/SelectionPopupControllerImpl.java" + line="807" + column="9"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 23): `isValidSiteChannelId`" errorLine1=" if (channelId == null || !SiteChannelsManager.isValidSiteChannelId(channelId)) {" errorLine2=" ~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationPlatformBridge.java" /> + <issue + id="NewApi" + message="Call requires API level 28 (current min is 23): `onSelectionAction`" + errorLine1=" mSmartSelectionEventProcessor.onSelectionAction(mLastSelectedText, mLastSelectionOffset," + errorLine2=" ~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/content/public/android/java/src/org/chromium/content/browser/selection/SelectionPopupControllerImpl.java" + line="937" + column="43"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 23): `toSiteOrigin`" errorLine1=" return SiteChannelsManager.toSiteOrigin(channelId);" errorLine2=" ~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationPlatformBridge.java" /> + <issue + id="NewApi" + message="Call requires API level 28 (current min is 23): `onSelectionAction`" + errorLine1=" mSmartSelectionEventProcessor.onSelectionAction(mLastSelectedText," + errorLine2=" ~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/content/public/android/java/src/org/chromium/content/browser/selection/SelectionPopupControllerImpl.java" + line="1464" + column="47"/> </issue> - <issue id="NewApi" message="Call requires API level 28 (current min is 23): `getBitmapFromIcon`" errorLine1=" return getBitmapFromIcon(notification.getLargeIcon());" errorLine2=" ~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/usage_stats/NotificationSuspender.java" /> + <issue + id="NewApi" + message="Call requires API level 28 (current min is 23): `onSelectionModified`" + errorLine1=" mSmartSelectionEventProcessor.onSelectionModified(" + errorLine2=" ~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/content/public/android/java/src/org/chromium/content/browser/selection/SelectionPopupControllerImpl.java" + line="1611" + column="47"/> </issue> - <issue id="NewApi" message="Call requires API level 28 (current min is 23): `getBitmapFromIcon`" errorLine1=" return getBitmapFromIcon(notification.getSmallIcon());" errorLine2=" ~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/usage_stats/NotificationSuspender.java" /> + <issue + id="NewApi" + message="Extending NotificationTask requires API level 29 (current min is 23): `NotificationTask`" + errorLine1="class SessionRemovedTask extends NotificationTask {" + errorLine2=" ~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/SessionRemovedTask.java" + line="12" + column="34"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 23): `ChannelsInitializer`" errorLine1=" ChannelsInitializer channelsInitializer = new ChannelsInitializer(notificationManagerProxy," errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/NotificationWrapperBuilderFactory.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `NotificationTask`" + errorLine1=" super(session, platformSession);" + errorLine2=" ~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/SessionRemovedTask.java" + line="14" + column="9"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 23): `getInstance`" errorLine1=" ChromeChannelDefinitions.getInstance(), context.getResources());" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/NotificationWrapperBuilderFactory.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `log`" + errorLine1=" log("SessionRemovedTask.removeSession");" + errorLine2=" ~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/SessionRemovedTask.java" + line="23" + column="9"/> </issue> - <issue id="NewApi" message="Call requires API level 30 (current min is 23): `getMaximumWindowMetricsBounds`" errorLine1=" Rect rect = ApiHelperForR.getMaximumWindowMetricsBounds(windowManager);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="ui/android/java/src/org/chromium/ui/display/PhysicalDisplayAndroid.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `getFrameIdToPlatformSessionData`" + errorLine1=" mPlatformSession.getFrameIdToPlatformSessionData().remove(mSession.get(0).getId());" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/SessionRemovedTask.java" + line="25" + column="34"/> </issue> - <issue id="NewApi" message="Call requires API level 30 (current min is 23): `getDisplay`" errorLine1=" updateCommon(size, displayMetrics.density, ApiHelperForR.getDisplay(mWindowContext));" errorLine2=" ~~~~~~~~~~"> - <location file="ui/android/java/src/org/chromium/ui/display/PhysicalDisplayAndroid.java" /> + <issue + id="NewApi" + message="Field requires API level 29 (current min is 23): `mPlatformSession`" + errorLine1=" mPlatformSession.getFrameIdToPlatformSessionData().remove(mSession.get(0).getId());" + errorLine2=" ~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/SessionRemovedTask.java" + line="25" + column="17"/> </issue> - <issue id="NewApi" message="Call requires API level 31 (current min is 26): `setAutoEnterEnabled`" errorLine1=" ApiHelperForS.setAutoEnterEnabled(builder, true);" errorLine2=" ~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/media/PictureInPictureController.java" /> + <issue + id="NewApi" + message="Field requires API level 29 (current min is 23): `mSession`" + errorLine1=" mPlatformSession.getFrameIdToPlatformSessionData().remove(mSession.get(0).getId());" + errorLine2=" ~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/SessionRemovedTask.java" + line="25" + column="75"/> </issue> - <issue id="NewApi" message="Call requires API level 31 (current min is 26): `setAutoEnterEnabled`" errorLine1=" ApiHelperForS.setAutoEnterEnabled(builder, false);" errorLine2=" ~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/media/PictureInPictureController.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `destroyContentCaptureSession`" + errorLine1=" PlatformAPIWrapper.getInstance().destroyContentCaptureSession(" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/SessionRemovedTask.java" + line="27" + column="42"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 23): `createNotificationChannel`" errorLine1=" mNotificationManager.createNotificationChannel();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/PriceMessageService.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `getInstance`" + errorLine1=" PlatformAPIWrapper.getInstance().destroyContentCaptureSession(" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/SessionRemovedTask.java" + line="27" + column="28"/> </issue> - <issue id="NewApi" message="Extending NotificationTask requires API level 29 (current min is 23): `NotificationTask`" errorLine1="abstract class ProcessContentCaptureDataTask extends NotificationTask {" errorLine2=" ~~~~~~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/ProcessContentCaptureDataTask.java" /> + <issue + id="NewApi" + message="Field requires API level 29 (current min is 23): `contentCaptureSession`" + errorLine1=" removedPlatformSessionData.contentCaptureSession);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/SessionRemovedTask.java" + line="28" + column="44"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `NotificationTask`" errorLine1=" super(session, platformSession);" errorLine2=" ~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/ProcessContentCaptureDataTask.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `getRootPlatformSessionData`" + errorLine1=" mPlatformSession.getRootPlatformSessionData();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/SessionRemovedTask.java" + line="30" + column="34"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `log`" errorLine1=" log("ProcessContentTaskBase.processContent");" errorLine2=" ~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/ProcessContentCaptureDataTask.java" /> + <issue + id="NewApi" + message="Field requires API level 29 (current min is 23): `mPlatformSession`" + errorLine1=" mPlatformSession.getRootPlatformSessionData();" + errorLine2=" ~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/SessionRemovedTask.java" + line="30" + column="17"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `buildCurrentSession`" errorLine1=" PlatformSessionData platformSessionData = buildCurrentSession();" errorLine2=" ~~~~~~~~~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/ProcessContentCaptureDataTask.java" /> + <issue + id="NewApi" + message="Field requires API level 29 (current min is 23): `mSession`" + errorLine1=" if (mSession.size() > 2) {" + errorLine2=" ~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/SessionRemovedTask.java" + line="34" + column="13"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `createOrGetSession`" errorLine1=" createOrGetSession(parentPlatformSessionData, data);" errorLine2=" ~~~~~~~~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/ProcessContentCaptureDataTask.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `getFrameIdToPlatformSessionData`" + errorLine1=" mPlatformSession.getFrameIdToPlatformSessionData().get(mSession.get(1).getId());" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/SessionRemovedTask.java" + line="36" + column="38"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `PlatformSessionData`" errorLine1=" PlatformSessionData platformSessionData = new PlatformSessionData(" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/ProcessContentCaptureDataTask.java" /> + <issue + id="NewApi" + message="Field requires API level 29 (current min is 23): `mPlatformSession`" + errorLine1=" mPlatformSession.getFrameIdToPlatformSessionData().get(mSession.get(1).getId());" + errorLine2=" ~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/SessionRemovedTask.java" + line="36" + column="21"/> </issue> - <issue id="NewApi" message="Field requires API level 29 (current min is 23): `contentCaptureSession`" errorLine1=" parentPlatformSessionData.contentCaptureSession, autofillId);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/ProcessContentCaptureDataTask.java" /> + <issue + id="NewApi" + message="Field requires API level 29 (current min is 23): `mSession`" + errorLine1=" mPlatformSession.getFrameIdToPlatformSessionData().get(mSession.get(1).getId());" + errorLine2=" ~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/SessionRemovedTask.java" + line="36" + column="76"/> </issue> - <issue id="NewApi" message="Call requires API level 30 (current min is 23): `getExitReason`" errorLine1=" recordAsEnumHistogram(umaName, getExitReason(pid));" errorLine2=" ~~~~~~~~~~~~~"> - <location file="components/crash/android/java/src/org/chromium/components/crash/browser/ProcessExitReasonFromSystem.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `getInstance`" + errorLine1=" PlatformAPIWrapper.getInstance().notifyViewDisappeared(" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/SessionRemovedTask.java" + line="39" + column="28"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `getInstance`" errorLine1=" () -> PlatformContentCaptureController.getInstance()));" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/init/ProcessInitializationHandler.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `notifyViewDisappeared`" + errorLine1=" PlatformAPIWrapper.getInstance().notifyViewDisappeared(" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/SessionRemovedTask.java" + line="39" + column="42"/> </issue> - <issue id="NewApi" message="Call requires API level 24 (current min is 23): `logEGLShaderCacheSizeHistogram`" errorLine1=" ProcessInitializationHandler::logEGLShaderCacheSizeHistogram);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/init/ProcessInitializationHandler.java" /> + <issue + id="NewApi" + message="Field requires API level 29 (current min is 23): `contentCaptureSession`" + errorLine1=" parentPlatformSessionData.contentCaptureSession," + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/SessionRemovedTask.java" + line="40" + column="43"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `getInstance`" errorLine1=" PlatformContentCaptureController.getInstance();" errorLine2=" ~~~~~~~~~~~"> - <location file="weblayer/browser/java/org/chromium/weblayer_private/ProfileImpl.java" /> + <issue + id="NewApi" + message="Field requires API level 29 (current min is 23): `autofillId`" + errorLine1=" removedPlatformSessionData.autofillId);" + errorLine2=" ~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/SessionRemovedTask.java" + line="41" + column="44"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `clearAllContentCaptureData`" errorLine1=" controller.clearAllContentCaptureData();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="weblayer/browser/java/org/chromium/weblayer_private/ProfileImpl.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `addDirectAction`" + errorLine1=" if (isAvailable()) reporter.addDirectAction(mActionId);" + errorLine2=" ~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/directactions/SimpleDirectActionHandler.java" + line="24" + column="37"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `onPerformDirectAction`" errorLine1=" mDirectActionInitializer.onPerformDirectAction(" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordinator.java" /> + <issue + id="NewApi" + message="Call requires API level 26 (current min is 23): `setTextClassifier`" + errorLine1=" mProvider.setTextClassifier(textClassifier);" + errorLine2=" ~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/content/public/android/java/src/org/chromium/content/browser/selection/SmartSelectionClient.java" + line="127" + column="19"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `onGetDirectActions`" errorLine1=" mDirectActionInitializer.onGetDirectActions(cancellationSignal, callback);" errorLine2=" ~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordinator.java" /> + <issue + id="NewApi" + message="Call requires API level 26 (current min is 23): `getTextClassifier`" + errorLine1=" return mProvider.getTextClassifier();" + errorLine2=" ~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/content/public/android/java/src/org/chromium/content/browser/selection/SmartSelectionClient.java" + line="132" + column="26"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `DirectActionInitializer`" errorLine1=" mDirectActionInitializer = new DirectActionInitializer(mActivity, mActivityType," errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordinator.java" /> + <issue + id="NewApi" + message="Call requires API level 26 (current min is 23): `sendSmartSelectionRequest`" + errorLine1=" sendSmartSelectionRequest(RequestType.SUGGEST_AND_CLASSIFY, text, start, end);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/content/public/android/java/src/org/chromium/content/browser/selection/SmartSelectionProvider.java" + line="82" + column="9"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `DirectActionInitializer`" errorLine1=" mDirectActionInitializer = new DirectActionInitializer(mActivity, mActivityType," errorLine2=" ~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/ui/RootUiCoordinator.java" /> + <issue + id="NewApi" + message="Call requires API level 26 (current min is 23): `sendSmartSelectionRequest`" + errorLine1=" sendSmartSelectionRequest(RequestType.CLASSIFY, text, start, end);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/content/public/android/java/src/org/chromium/content/browser/selection/SmartSelectionProvider.java" + line="86" + column="9"/> </issue> - <issue id="NewApi" message="Call requires API level 28 (current min is 23): `onSelectionModified`" errorLine1=" mSmartSelectionEventProcessor.onSelectionModified(" errorLine2=" ~~~~~~~~~~~~~~~~~~~"> - <location file="content/public/android/java/src/org/chromium/content/browser/selection/SelectionPopupControllerImpl.java" /> + <issue + id="NewApi" + message="Call requires API level 24 (current min is 23): `setOpenInOtherWindowIntentExtras`" + errorLine1=" MultiWindowUtils.setOpenInOtherWindowIntentExtras(intent, activity, targetActivity);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/document/TabDelegate.java" + line="108" + column="26"/> </issue> - <issue id="NewApi" message="Call requires API level 28 (current min is 23): `onSelectionAction`" errorLine1=" mSmartSelectionEventProcessor.onSelectionAction(mLastSelectedText," errorLine2=" ~~~~~~~~~~~~~~~~~"> - <location file="content/public/android/java/src/org/chromium/content/browser/selection/SelectionPopupControllerImpl.java" /> + <issue + id="NewApi" + message="Call requires API level 24 (current min is 23): `onMultiInstanceModeStarted`" + errorLine1=" MultiInstanceManager.onMultiInstanceModeStarted();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/document/TabDelegate.java" + line="111" + column="30"/> </issue> - <issue id="NewApi" message="Call requires API level 28 (current min is 23): `onSelectionStarted`" errorLine1=" mSmartSelectionEventProcessor.onSelectionStarted(" errorLine2=" ~~~~~~~~~~~~~~~~~~"> - <location file="content/public/android/java/src/org/chromium/content/browser/selection/SelectionPopupControllerImpl.java" /> + <issue + id="NewApi" + message="Call requires API level 26 (current min is 23): `onProvideAutoFillVirtualStructure`" + errorLine1=" mAutofillProvider.onProvideAutoFillVirtualStructure(structure, flags);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/weblayer/browser/java/org/chromium/weblayer_private/TabImpl.java" + line="423" + column="27"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 23): `setPasteAsPlainTextMenuItemTitle`" errorLine1=" setPasteAsPlainTextMenuItemTitle(menu);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="content/public/android/java/src/org/chromium/content/browser/selection/SelectionPopupControllerImpl.java" /> + <issue + id="NewApi" + message="Call requires API level 26 (current min is 23): `autofill`" + errorLine1=" mAutofillProvider.autofill(values);" + errorLine2=" ~~~~~~~~"> + <location + file="$SRC/weblayer/browser/java/org/chromium/weblayer_private/TabImpl.java" + line="428" + column="27"/> </issue> - <issue id="NewApi" message="Call requires API level 28 (current min is 23): `onSelectionAction`" errorLine1=" mSmartSelectionEventProcessor.onSelectionAction(mLastSelectedText, mLastSelectionOffset," errorLine2=" ~~~~~~~~~~~~~~~~~"> - <location file="content/public/android/java/src/org/chromium/content/browser/selection/SelectionPopupControllerImpl.java" /> + <issue + id="NewApi" + message="Call requires API level 26 (current min is 23): `hidePopup`" + errorLine1=" mAutofillProvider.hidePopup();" + errorLine2=" ~~~~~~~~~"> + <location + file="$SRC/weblayer/browser/java/org/chromium/weblayer_private/TabImpl.java" + line="470" + column="31"/> </issue> - <issue id="NewApi" message="Call requires API level 28 (current min is 23): `onSelectionAction`" errorLine1=" mSmartSelectionEventProcessor.onSelectionAction(mLastSelectedText," errorLine2=" ~~~~~~~~~~~~~~~~~"> - <location file="content/public/android/java/src/org/chromium/content/browser/selection/SelectionPopupControllerImpl.java" /> + <issue + id="NewApi" + message="Call requires API level 26 (current min is 23): `destroy`" + errorLine1=" mAutofillProvider.destroy();" + errorLine2=" ~~~~~~~"> + <location + file="$SRC/weblayer/browser/java/org/chromium/weblayer_private/TabImpl.java" + line="1065" + column="31"/> </issue> - <issue id="NewApi" message="Call requires API level 28 (current min is 23): `onSelectionModified`" errorLine1=" mSmartSelectionEventProcessor.onSelectionModified(" errorLine2=" ~~~~~~~~~~~~~~~~~~~"> - <location file="content/public/android/java/src/org/chromium/content/browser/selection/SelectionPopupControllerImpl.java" /> + <issue + id="NewApi" + message="Call requires API level 24 (current min is 23): `mergedOnStartup`" + errorLine1=" MultiInstanceManager.mergedOnStartup();" + errorLine2=" ~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/app/tabmodel/TabbedModeTabModelOrchestrator.java" + line="48" + column="34"/> </issue> - <issue id="NewApi" message="Extending NotificationTask requires API level 29 (current min is 23): `NotificationTask`" errorLine1="class SessionRemovedTask extends NotificationTask {" errorLine2=" ~~~~~~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/SessionRemovedTask.java" /> + <issue + id="NewApi" + message="Call requires API level 24 (current min is 23): `shouldMergeOnStartup`" + errorLine1=" if (MultiInstanceManager.shouldMergeOnStartup(activity)) {" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/app/tabmodel/TabbedModeTabModelOrchestrator.java" + line="98" + column="34"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `NotificationTask`" errorLine1=" super(session, platformSession);" errorLine2=" ~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/SessionRemovedTask.java" /> + <issue + id="NewApi" + message="Call requires API level 27 (current min is 23): `setNavigationBarScrimFraction`" + errorLine1=" controller.setNavigationBarScrimFraction(scrimFraction);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java" + line="578" + column="36"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `log`" errorLine1=" log("SessionRemovedTask.removeSession");" errorLine2=" ~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/SessionRemovedTask.java" /> + <issue + id="NewApi" + message="Call requires API level 27 (current min is 23): `destroy`" + errorLine1=" if (mNavigationBarColorController != null) mNavigationBarColorController.destroy();" + errorLine2=" ~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedSystemUiCoordinator.java" + line="55" + column="82"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `getFrameIdToPlatformSessionData`" errorLine1=" mPlatformSession.getFrameIdToPlatformSessionData().remove(mSession.get(0).getId());" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/SessionRemovedTask.java" /> + <issue + id="NewApi" + message="Extending NotificationTask requires API level 29 (current min is 23): `NotificationTask`" + errorLine1="public class TitleUpdateTask extends NotificationTask {" + errorLine2=" ~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/TitleUpdateTask.java" + line="14" + column="38"/> </issue> - <issue id="NewApi" message="Field requires API level 29 (current min is 23): `mPlatformSession`" errorLine1=" mPlatformSession.getFrameIdToPlatformSessionData().remove(mSession.get(0).getId());" errorLine2=" ~~~~~~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/SessionRemovedTask.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `NotificationTask`" + errorLine1=" super(null, platformSession);" + errorLine2=" ~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/TitleUpdateTask.java" + line="17" + column="9"/> </issue> - <issue id="NewApi" message="Field requires API level 29 (current min is 23): `mSession`" errorLine1=" mPlatformSession.getFrameIdToPlatformSessionData().remove(mSession.get(0).getId());" errorLine2=" ~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/SessionRemovedTask.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `log`" + errorLine1=" log("TitleUpdateTask.updateTitle");" + errorLine2=" ~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/TitleUpdateTask.java" + line="27" + column="9"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `destroyContentCaptureSession`" errorLine1=" PlatformAPIWrapper.getInstance().destroyContentCaptureSession(" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/SessionRemovedTask.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `buildCurrentSession`" + errorLine1=" PlatformSessionData parentPlatformSessionData = buildCurrentSession();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/TitleUpdateTask.java" + line="30" + column="57"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `getInstance`" errorLine1=" PlatformAPIWrapper.getInstance().destroyContentCaptureSession(" errorLine2=" ~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/SessionRemovedTask.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `getInstance`" + errorLine1=" AutofillId autofillId = PlatformAPIWrapper.getInstance().newAutofillId(" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/TitleUpdateTask.java" + line="31" + column="52"/> </issue> - <issue id="NewApi" message="Field requires API level 29 (current min is 23): `contentCaptureSession`" errorLine1=" removedPlatformSessionData.contentCaptureSession);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/SessionRemovedTask.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `newAutofillId`" + errorLine1=" AutofillId autofillId = PlatformAPIWrapper.getInstance().newAutofillId(" + errorLine2=" ~~~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/TitleUpdateTask.java" + line="31" + column="66"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `getRootPlatformSessionData`" errorLine1=" mPlatformSession.getRootPlatformSessionData();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/SessionRemovedTask.java" /> + <issue + id="NewApi" + message="Field requires API level 29 (current min is 23): `contentCaptureSession`" + errorLine1=" parentPlatformSessionData.contentCaptureSession," + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/TitleUpdateTask.java" + line="32" + column="43"/> </issue> - <issue id="NewApi" message="Field requires API level 29 (current min is 23): `mPlatformSession`" errorLine1=" mPlatformSession.getRootPlatformSessionData();" errorLine2=" ~~~~~~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/SessionRemovedTask.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `getRootPlatformSessionData`" + errorLine1=" mPlatformSession.getRootPlatformSessionData().autofillId, mMainFrame.getId());" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/TitleUpdateTask.java" + line="33" + column="34"/> </issue> - <issue id="NewApi" message="Field requires API level 29 (current min is 23): `mSession`" errorLine1=" if (mSession.size() > 2) {" errorLine2=" ~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/SessionRemovedTask.java" /> + <issue + id="NewApi" + message="Field requires API level 29 (current min is 23): `autofillId`" + errorLine1=" mPlatformSession.getRootPlatformSessionData().autofillId, mMainFrame.getId());" + errorLine2=" ~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/TitleUpdateTask.java" + line="33" + column="63"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `getFrameIdToPlatformSessionData`" errorLine1=" mPlatformSession.getFrameIdToPlatformSessionData().get(mSession.get(1).getId());" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/SessionRemovedTask.java" /> + <issue + id="NewApi" + message="Field requires API level 29 (current min is 23): `mPlatformSession`" + errorLine1=" mPlatformSession.getRootPlatformSessionData().autofillId, mMainFrame.getId());" + errorLine2=" ~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/TitleUpdateTask.java" + line="33" + column="17"/> </issue> - <issue id="NewApi" message="Field requires API level 29 (current min is 23): `mPlatformSession`" errorLine1=" mPlatformSession.getFrameIdToPlatformSessionData().get(mSession.get(1).getId());" errorLine2=" ~~~~~~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/SessionRemovedTask.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `getInstance`" + errorLine1=" PlatformAPIWrapper.getInstance().notifyViewTextChanged(" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/TitleUpdateTask.java" + line="34" + column="28"/> </issue> - <issue id="NewApi" message="Field requires API level 29 (current min is 23): `mSession`" errorLine1=" mPlatformSession.getFrameIdToPlatformSessionData().get(mSession.get(1).getId());" errorLine2=" ~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/SessionRemovedTask.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `notifyViewTextChanged`" + errorLine1=" PlatformAPIWrapper.getInstance().notifyViewTextChanged(" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/TitleUpdateTask.java" + line="34" + column="42"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `getInstance`" errorLine1=" PlatformAPIWrapper.getInstance().notifyViewDisappeared(" errorLine2=" ~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/SessionRemovedTask.java" /> + <issue + id="NewApi" + message="Field requires API level 29 (current min is 23): `contentCaptureSession`" + errorLine1=" parentPlatformSessionData.contentCaptureSession, autofillId, mMainFrame.getText());" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/content_capture/android/java/src/org/chromium/components/content_capture/TitleUpdateTask.java" + line="35" + column="43"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `notifyViewDisappeared`" errorLine1=" PlatformAPIWrapper.getInstance().notifyViewDisappeared(" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/SessionRemovedTask.java" /> + <issue + id="NewApi" + message="Extending ZygotePreload requires API level 29 (current min is 23): `ZygotePreload`" + errorLine1="public class TrichromeZygotePreload extends ZygotePreload {" + errorLine2=" ~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/app/TrichromeZygotePreload.java" + line="16" + column="45"/> </issue> - <issue id="NewApi" message="Field requires API level 29 (current min is 23): `contentCaptureSession`" errorLine1=" parentPlatformSessionData.contentCaptureSession," errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/SessionRemovedTask.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `doPreloadCommon`" + errorLine1=" doPreloadCommon(appInfo);" + errorLine2=" ~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/app/TrichromeZygotePreload.java" + line="24" + column="9"/> </issue> - <issue id="NewApi" message="Field requires API level 29 (current min is 23): `autofillId`" errorLine1=" removedPlatformSessionData.autofillId);" errorLine2=" ~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/SessionRemovedTask.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `currentStatus`" + errorLine1=" || mReader.currentStatus() == ImageReaderStatus.RUNNING));" + errorLine2=" ~~~~~~~~~~~~~"> + <location + file="$SRC/ui/android/java/src/org/chromium/ui/resources/dynamics/ViewResourceAdapter.java" + line="449" + column="44"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `addDirectAction`" errorLine1=" if (isAvailable()) reporter.addDirectAction(mActionId);" errorLine2=" ~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/directactions/SimpleDirectActionHandler.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `AcceleratedImageReader`" + errorLine1=" mReader = new AcceleratedImageReader(scaledWidth, scaledHeight);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/ui/android/java/src/org/chromium/ui/resources/dynamics/ViewResourceAdapter.java" + line="472" + column="31"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 23): `setTextClassifier`" errorLine1=" mProvider.setTextClassifier(textClassifier);" errorLine2=" ~~~~~~~~~~~~~~~~~"> - <location file="content/public/android/java/src/org/chromium/content/browser/selection/SmartSelectionClient.java" /> + <issue + id="NewApi" + message="Call requires API level 29 (current min is 23): `onLayoutChange`" + errorLine1=" mReader.onLayoutChange(scaledWidth, scaledHeight);" + errorLine2=" ~~~~~~~~~~~~~~"> + <location + file="$SRC/ui/android/java/src/org/chromium/ui/resources/dynamics/ViewResourceAdapter.java" + line="474" + column="29"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 23): `getTextClassifier`" errorLine1=" return mProvider.getTextClassifier();" errorLine2=" ~~~~~~~~~~~~~~~~~"> - <location file="content/public/android/java/src/org/chromium/content/browser/selection/SmartSelectionClient.java" /> + <issue + id="NewApi" + message="Call requires API level 24 (current min is 23): `setVrModeEnabled`" + errorLine1=" ApiHelperForN.setVrModeEnabled(activity, enabled," + errorLine2=" ~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/features/vr/java/src/org/chromium/chrome/browser/vr/VrDelegateFallback.java" + line="240" + column="27"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 23): `sendSmartSelectionRequest`" errorLine1=" sendSmartSelectionRequest(RequestType.SUGGEST_AND_CLASSIFY, text, start, end);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="content/public/android/java/src/org/chromium/content/browser/selection/SmartSelectionProvider.java" /> + <issue + id="NewApi" + message="Call requires API level 24 (current min is 23): `initializeNative`" + errorLine1=" mVrShell.initializeNative(mRequestedWebVr, VrModuleProvider.getDelegate().bootsToVr());" + errorLine2=" ~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/features/vr/java/src/org/chromium/chrome/browser/vr/VrShellDelegate.java" + line="934" + column="18"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 23): `sendSmartSelectionRequest`" errorLine1=" sendSmartSelectionRequest(RequestType.CLASSIFY, text, start, end);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="content/public/android/java/src/org/chromium/content/browser/selection/SmartSelectionProvider.java" /> + <issue + id="NewApi" + message="Call requires API level 26 (current min is 23): `updateChannelsIfNecessary`" + errorLine1=" WebLayerNotificationChannels.updateChannelsIfNecessary();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/weblayer/browser/java/org/chromium/weblayer_private/WebLayerImpl.java" + line="333" + column="38"/> </issue> - <issue id="NewApi" message="Call requires API level 24 (current min is 23): `setOpenInOtherWindowIntentExtras`" errorLine1=" MultiWindowUtils.setOpenInOtherWindowIntentExtras(intent, activity, targetActivity);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/tabmodel/document/TabDelegate.java" /> + <issue + id="NewApi" + message="Call requires API level 26 (current min is 23): `getSplitNames`" + errorLine1=" String[] splitNames = ApiHelperForO.getSplitNames(appInfo);" + errorLine2=" ~~~~~~~~~~~~~"> + <location + file="$SRC/weblayer/browser/java/org/chromium/weblayer_private/WebLayerImpl.java" + line="987" + column="49"/> </issue> - <issue id="NewApi" message="Call requires API level 24 (current min is 23): `onMultiInstanceModeStarted`" errorLine1=" MultiInstanceManager.onMultiInstanceModeStarted();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/tabmodel/document/TabDelegate.java" /> + <issue + id="NewApi" + message="Call requires API level 26 (current min is 23): `ChannelsInitializer`" + errorLine1=" new ChannelsInitializer(new NotificationManagerProxyImpl(appContext)," + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/weblayer/browser/java/org/chromium/weblayer_private/WebLayerNotificationWrapperBuilder.java" + line="32" + column="17"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 23): `onProvideAutoFillVirtualStructure`" errorLine1=" mAutofillProvider.onProvideAutoFillVirtualStructure(structure, flags);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="weblayer/browser/java/org/chromium/weblayer_private/TabImpl.java" /> + <issue + id="NewApi" + message="Call requires API level 26 (current min is 23): `getInstance`" + errorLine1=" WebLayerNotificationChannels.getInstance(), appContext.getResources());" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/weblayer/browser/java/org/chromium/weblayer_private/WebLayerNotificationWrapperBuilder.java" + line="33" + column="54"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 23): `autofill`" errorLine1=" mAutofillProvider.autofill(values);" errorLine2=" ~~~~~~~~"> - <location file="weblayer/browser/java/org/chromium/weblayer_private/TabImpl.java" /> + <issue + id="NewApi" + message="Call requires API level 26 (current min is 23): `addShortcutWithShortcutManager`" + errorLine1=" addShortcutWithShortcutManager(id, title, icon, isIconAdaptive, shortcutIntent);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/webapps/browser/android/java/src/org/chromium/components/webapps/WebappsUtils.java" + line="70" + column="13"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 23): `hidePopup`" errorLine1=" mAutofillProvider.hidePopup();" errorLine2=" ~~~~~~~~~"> - <location file="weblayer/browser/java/org/chromium/weblayer_private/TabImpl.java" /> + <issue + id="SuspiciousIndentation" + message="Suspicious indentation: This is indented but is not nested under the previous expression (`if (!LibraryLoader.g`...)" + errorLine1=" RecordHistogram.recordEnumeratedHistogram(" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationUmaHelper.java" + line="113" + column="13"/> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationUmaHelper.java" + line="112" + column="9" + message="Previous statement here"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 23): `destroy`" errorLine1=" mAutofillProvider.destroy();" errorLine2=" ~~~~~~~"> - <location file="weblayer/browser/java/org/chromium/weblayer_private/TabImpl.java" /> + <issue + id="WrongConstant" + message="Must be one of: AdaptiveToolbarButtonVariant.UNKNOWN, AdaptiveToolbarButtonVariant.NONE, AdaptiveToolbarButtonVariant.NEW_TAB, AdaptiveToolbarButtonVariant.SHARE, AdaptiveToolbarButtonVariant.VOICE, AdaptiveToolbarButtonVariant.AUTO, AdaptiveToolbarButtonVariant.PRICE_TRACKING" + errorLine1=" && variant < AdaptiveToolbarButtonVariant.NUM_ENTRIES" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveToolbarButtonController.java" + line="115" + column="59"/> </issue> - <issue id="NewApi" message="Call requires API level 24 (current min is 23): `mergedOnStartup`" errorLine1=" MultiInstanceManager.mergedOnStartup();" errorLine2=" ~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/app/tabmodel/TabbedModeTabModelOrchestrator.java" /> + <issue + id="WrongConstant" + message="Must be one of: AdaptiveToolbarButtonVariant.UNKNOWN, AdaptiveToolbarButtonVariant.NONE, AdaptiveToolbarButtonVariant.NEW_TAB, AdaptiveToolbarButtonVariant.SHARE, AdaptiveToolbarButtonVariant.VOICE, AdaptiveToolbarButtonVariant.AUTO, AdaptiveToolbarButtonVariant.PRICE_TRACKING" + errorLine1=" AdaptiveToolbarButtonVariant.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveToolbarButtonController.java" + line="176" + column="50"/> </issue> - <issue id="NewApi" message="Call requires API level 24 (current min is 23): `shouldMergeOnStartup`" errorLine1=" if (MultiInstanceManager.shouldMergeOnStartup(activity)) {" errorLine2=" ~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/app/tabmodel/TabbedModeTabModelOrchestrator.java" /> + <issue + id="WrongConstant" + message="Must be one of: AdaptiveToolbarButtonVariant.UNKNOWN, AdaptiveToolbarButtonVariant.NONE, AdaptiveToolbarButtonVariant.NEW_TAB, AdaptiveToolbarButtonVariant.SHARE, AdaptiveToolbarButtonVariant.VOICE, AdaptiveToolbarButtonVariant.AUTO, AdaptiveToolbarButtonVariant.PRICE_TRACKING" + errorLine1=" buttonVariant, AdaptiveToolbarButtonVariant.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveToolbarButtonController.java" + line="204" + column="65"/> </issue> - <issue id="NewApi" message="Call requires API level 27 (current min is 23): `setNavigationBarScrimFraction`" errorLine1=" controller.setNavigationBarScrimFraction(scrimFraction);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedRootUiCoordinator.java" /> + <issue + id="WrongConstant" + message="Must be one of: AdaptiveToolbarRadioButtonState.UNKNOWN, AdaptiveToolbarRadioButtonState.AUTO_WITH_NEW_TAB, AdaptiveToolbarRadioButtonState.AUTO_WITH_SHARE, AdaptiveToolbarRadioButtonState.AUTO_WITH_VOICE, AdaptiveToolbarRadioButtonState.NEW_TAB, AdaptiveToolbarRadioButtonState.SHARE, AdaptiveToolbarRadioButtonState.VOICE" + errorLine1=" AdaptiveToolbarRadioButtonState.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveToolbarStats.java" + line="50" + column="53"/> </issue> - <issue id="NewApi" message="Call requires API level 27 (current min is 23): `destroy`" errorLine1=" if (mNavigationBarColorController != null) mNavigationBarColorController.destroy();" errorLine2=" ~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/tabbed_mode/TabbedSystemUiCoordinator.java" /> + <issue + id="WrongConstant" + message="Must be one of: AdaptiveToolbarButtonVariant.UNKNOWN, AdaptiveToolbarButtonVariant.NONE, AdaptiveToolbarButtonVariant.NEW_TAB, AdaptiveToolbarButtonVariant.SHARE, AdaptiveToolbarButtonVariant.VOICE, AdaptiveToolbarButtonVariant.AUTO, AdaptiveToolbarButtonVariant.PRICE_TRACKING" + errorLine1=" AdaptiveToolbarButtonVariant.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveToolbarStats.java" + line="73" + column="50"/> </issue> - <issue id="NewApi" message="Extending NotificationTask requires API level 29 (current min is 23): `NotificationTask`" errorLine1="public class TitleUpdateTask extends NotificationTask {" errorLine2=" ~~~~~~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/TitleUpdateTask.java" /> + <issue + id="WrongConstant" + message="Must be one of: SettingsNavigationSource.OTHER, SettingsNavigationSource.TWA_CLEAR_DATA_DIALOG, SettingsNavigationSource.TWA_MANAGE_SPACE_ACTIVITY" + errorLine1=" SettingsNavigationSource.EXTRA_KEY, SettingsNavigationSource.OTHER);" + errorLine2=" ~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/AllSiteSettings.java" + line="281" + column="46"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `NotificationTask`" errorLine1=" super(null, platformSession);" errorLine2=" ~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/TitleUpdateTask.java" /> + <issue + id="WrongConstant" + message="Must be one of: SettingsNavigationSource.OTHER, SettingsNavigationSource.TWA_CLEAR_DATA_DIALOG, SettingsNavigationSource.TWA_MANAGE_SPACE_ACTIVITY" + errorLine1=" website.getExtras().putInt(SettingsNavigationSource.EXTRA_KEY, navigationSource);" + errorLine2=" ~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/AllSiteSettings.java" + line="282" + column="65"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `log`" errorLine1=" log("TitleUpdateTask.updateTitle");" errorLine2=" ~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/TitleUpdateTask.java" /> + <issue + id="WrongConstant" + message="Must be one of: FetchFontResult.SUCCESS, FetchFontResult.FAILED_UNEXPECTED_NAME, FetchFontResult.FAILED_STATUS_CODE, FetchFontResult.FAILED_NON_UNIQUE_RESULT, FetchFontResult.FAILED_RESULT_CODE, FetchFontResult.FAILED_FILE_OPEN, FetchFontResult.FAILED_EXCEPTION, FetchFontResult.FAILED_AVOID_RETRY, FetchFontResult.SUCCESS_CACHED" + errorLine1=" FETCH_FONT_RESULT_HISTOGRAM, result, FetchFontResult.COUNT);" + errorLine2=" ~~~~~"> + <location + file="$SRC/content/public/android/java/src/org/chromium/content/browser/font/AndroidFontLookupImpl.java" + line="368" + column="70"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `buildCurrentSession`" errorLine1=" PlatformSessionData parentPlatformSessionData = buildCurrentSession();" errorLine2=" ~~~~~~~~~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/TitleUpdateTask.java" /> + <issue + id="WrongConstant" + message="Must be one of: FetchFontName.GOOGLE_SANS_REGULAR, FetchFontName.GOOGLE_SANS_MEDIUM, FetchFontName.GOOGLE_SANS_BOLD, FetchFontName.NOTO_COLOR_EMOJI_COMPAT" + errorLine1=" result = FetchFontName.OTHER;" + errorLine2=" ~~~~~"> + <location + file="$SRC/content/public/android/java/src/org/chromium/content/browser/font/AndroidFontLookupImpl.java" + line="388" + column="40"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `getInstance`" errorLine1=" AutofillId autofillId = PlatformAPIWrapper.getInstance().newAutofillId(" errorLine2=" ~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/TitleUpdateTask.java" /> + <issue + id="WrongConstant" + message="Must be one of: FetchFontName.GOOGLE_SANS_REGULAR, FetchFontName.GOOGLE_SANS_MEDIUM, FetchFontName.GOOGLE_SANS_BOLD, FetchFontName.NOTO_COLOR_EMOJI_COMPAT" + errorLine1=" FETCH_FONT_NAME_HISTOGRAM, result, FetchFontName.COUNT);" + errorLine2=" ~~~~~~"> + <location + file="$SRC/content/public/android/java/src/org/chromium/content/browser/font/AndroidFontLookupImpl.java" + line="391" + column="44"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `newAutofillId`" errorLine1=" AutofillId autofillId = PlatformAPIWrapper.getInstance().newAutofillId(" errorLine2=" ~~~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/TitleUpdateTask.java" /> + <issue + id="WrongConstant" + message="Must be one of: FetchFontName.GOOGLE_SANS_REGULAR, FetchFontName.GOOGLE_SANS_MEDIUM, FetchFontName.GOOGLE_SANS_BOLD, FetchFontName.NOTO_COLOR_EMOJI_COMPAT" + errorLine1=" FETCH_FONT_NAME_HISTOGRAM, result, FetchFontName.COUNT);" + errorLine2=" ~~~~~"> + <location + file="$SRC/content/public/android/java/src/org/chromium/content/browser/font/AndroidFontLookupImpl.java" + line="391" + column="66"/> </issue> - <issue id="NewApi" message="Field requires API level 29 (current min is 23): `contentCaptureSession`" errorLine1=" parentPlatformSessionData.contentCaptureSession," errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/TitleUpdateTask.java" /> + <issue + id="WrongConstant" + message="Must be one of: CacheHit.WITH_ENTITY, CacheHit.WITHOUT_ENTITY, CacheHit.MISS" + errorLine1=" "CopylessPaste.CacheHit", CacheHit.WITH_ENTITY, CacheHit.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/AppIndexingUtil.java" + line="101" + column="82"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `getRootPlatformSessionData`" errorLine1=" mPlatformSession.getRootPlatformSessionData().autofillId, mMainFrame.getId());" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/TitleUpdateTask.java" /> + <issue + id="WrongConstant" + message="Must be one of: CacheHit.WITH_ENTITY, CacheHit.WITHOUT_ENTITY, CacheHit.MISS" + errorLine1=" "CopylessPaste.CacheHit", CacheHit.WITHOUT_ENTITY, CacheHit.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/AppIndexingUtil.java" + line="106" + column="81"/> </issue> - <issue id="NewApi" message="Field requires API level 29 (current min is 23): `autofillId`" errorLine1=" mPlatformSession.getRootPlatformSessionData().autofillId, mMainFrame.getId());" errorLine2=" ~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/TitleUpdateTask.java" /> + <issue + id="WrongConstant" + message="Must be one of: CacheHit.WITH_ENTITY, CacheHit.WITHOUT_ENTITY, CacheHit.MISS" + errorLine1=" "CopylessPaste.CacheHit", CacheHit.MISS, CacheHit.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/AppIndexingUtil.java" + line="110" + column="71"/> </issue> - <issue id="NewApi" message="Field requires API level 29 (current min is 23): `mPlatformSession`" errorLine1=" mPlatformSession.getRootPlatformSessionData().autofillId, mMainFrame.getId());" errorLine2=" ~~~~~~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/TitleUpdateTask.java" /> + <issue + id="WrongConstant" + message="Must be one of: ActionType.DISMISSED_CANCEL_BUTTON, ActionType.DISMISSED_SYSTEM_BACK, ActionType.OK_CHANGE_LANGUAGE, ActionType.OK_SAME_LANGUAGE, ActionType.OTHER" + errorLine1=" "LanguageSettings.AppLanguagePrompt.Action", actionType, ActionType.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/AppLanguagePromoDialog.java" + line="589" + column="85"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `getInstance`" errorLine1=" PlatformAPIWrapper.getInstance().notifyViewTextChanged(" errorLine2=" ~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/TitleUpdateTask.java" /> + <issue + id="WrongConstant" + message="Must be one of: BlockDrawForInitialTabAccuracy.BLOCKED_CORRECTLY, BlockDrawForInitialTabAccuracy.BLOCKED_BUT_SHOULD_NOT_HAVE, BlockDrawForInitialTabAccuracy.DID_NOT_BLOCK_BUT_SHOULD_HAVE, BlockDrawForInitialTabAccuracy.CORRECTLY_DID_NOT_BLOCK" + errorLine1=" BlockDrawForInitialTabAccuracy.COUNT);" + errorLine2=" ~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/ui/AppLaunchDrawBlocker.java" + line="277" + column="48"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `notifyViewTextChanged`" errorLine1=" PlatformAPIWrapper.getInstance().notifyViewTextChanged(" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/TitleUpdateTask.java" /> + <issue + id="WrongConstant" + message="Must be one of: AppMenuHighlightItem.UNKNOWN, AppMenuHighlightItem.DOWNLOADS, AppMenuHighlightItem.BOOKMARKS, AppMenuHighlightItem.TRANSLATE, AppMenuHighlightItem.ADD_TO_HOMESCREEN, AppMenuHighlightItem.DOWNLOAD_THIS_PAGE, AppMenuHighlightItem.BOOKMARK_THIS_PAGE, AppMenuHighlightItem.DATA_REDUCTION_FOOTER" + errorLine1=" getUmaEnumForMenuItem(menuItemId), AppMenuHighlightItem.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java" + line="1004" + column="73"/> </issue> - <issue id="NewApi" message="Field requires API level 29 (current min is 23): `contentCaptureSession`" errorLine1=" parentPlatformSessionData.contentCaptureSession, autofillId, mMainFrame.getText());" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/content_capture/android/java/src/org/chromium/components/content_capture/TitleUpdateTask.java" /> + <issue + id="WrongConstant" + message="Must be one of: AppMenuHighlightItem.UNKNOWN, AppMenuHighlightItem.DOWNLOADS, AppMenuHighlightItem.BOOKMARKS, AppMenuHighlightItem.TRANSLATE, AppMenuHighlightItem.ADD_TO_HOMESCREEN, AppMenuHighlightItem.DOWNLOAD_THIS_PAGE, AppMenuHighlightItem.BOOKMARK_THIS_PAGE, AppMenuHighlightItem.DATA_REDUCTION_FOOTER" + errorLine1=" getUmaEnumForMenuItem(menuItemId), AppMenuHighlightItem.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java" + line="1010" + column="73"/> </issue> - <issue id="NewApi" message="Extending ZygotePreload requires API level 29 (current min is 23): `ZygotePreload`" errorLine1="public class TrichromeZygotePreload extends ZygotePreload {" errorLine2=" ~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/app/TrichromeZygotePreload.java" /> + <issue + id="WrongConstant" + message="Must be one of: ConsentOutcome.ACCEPTED_VIA_UI, ConsentOutcome.ACCEPTED_VIA_SETTINGS, ConsentOutcome.REJECTED_VIA_UI, ConsentOutcome.REJECTED_VIA_SETTINGS, ConsentOutcome.REJECTED_VIA_DISMISS, ConsentOutcome.CANCELED_VIA_UI, ConsentOutcome.MAX_VALUE" + errorLine1=" ConsentOutcome.NON_USER_CANCEL, ConsentOutcome.MAX_VALUE);" + errorLine2=" ~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/voice/AssistantVoiceSearchConsentController.java" + line="214" + column="32"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `doPreloadCommon`" errorLine1=" doPreloadCommon(appInfo);" errorLine2=" ~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/app/TrichromeZygotePreload.java" /> + <issue + id="WrongConstant" + message="Must be one of: EligibilityFailureReason.AGSA_CANT_HANDLE_INTENT, EligibilityFailureReason.AGSA_VERSION_BELOW_MINIMUM, EligibilityFailureReason.CHROME_NOT_GOOGLE_SIGNED, EligibilityFailureReason.AGSA_NOT_GOOGLE_SIGNED, EligibilityFailureReason.NON_GOOGLE_SEARCH_ENGINE, EligibilityFailureReason.NO_CHROME_ACCOUNT, EligibilityFailureReason.LOW_END_DEVICE, EligibilityFailureReason.MULTIPLE_ACCOUNTS_ON_DEVICE, EligibilityFailureReason.AGSA_NOT_INSTALLED" + errorLine1=" EligibilityFailureReason.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/voice/AssistantVoiceSearchService.java" + line="399" + column="46"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `currentStatus`" errorLine1=" || mReader.currentStatus() == ImageReaderStatus.RUNNING));" errorLine2=" ~~~~~~~~~~~~~"> - <location file="ui/android/java/src/org/chromium/ui/resources/dynamics/ViewResourceAdapter.java" /> + <issue + id="WrongConstant" + message="Must be one of: Status.PENDING, Status.RUNNING, Status.FINISHED" + errorLine1=" GET_STATUS_UMA_HISTOGRAM, status, Status.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/base/android/java/src/org/chromium/base/task/AsyncTask.java" + line="314" + column="62"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `AcceleratedImageReader`" errorLine1=" mReader = new AcceleratedImageReader(scaledWidth, scaledHeight);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="ui/android/java/src/org/chromium/ui/resources/dynamics/ViewResourceAdapter.java" /> + <issue + id="WrongConstant" + message="Must be one of: Status.PENDING, Status.RUNNING, Status.FINISHED" + errorLine1=" GET_STATUS_UMA_HISTOGRAM, status, Status.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/base/android/java/src/org/chromium/base/task/AsyncTask.java" + line="352" + column="62"/> </issue> - <issue id="NewApi" message="Call requires API level 29 (current min is 23): `onLayoutChange`" errorLine1=" mReader.onLayoutChange(scaledWidth, scaledHeight);" errorLine2=" ~~~~~~~~~~~~~~"> - <location file="ui/android/java/src/org/chromium/ui/resources/dynamics/ViewResourceAdapter.java" /> + <issue + id="WrongConstant" + message="Must be one of: AutoDarkSettingsChangeSource.THEME_SETTINGS, AutoDarkSettingsChangeSource.SITE_SETTINGS_GLOBAL, AutoDarkSettingsChangeSource.APP_MENU, AutoDarkSettingsChangeSource.SITE_SETTINGS_EXCEPTION_LIST" + errorLine1=" histogram, source, AutoDarkSettingsChangeSource.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/AutoDarkMetrics.java" + line="51" + column="65"/> </issue> - <issue id="NewApi" message="Call requires API level 24 (current min is 23): `setVrModeEnabled`" errorLine1=" ApiHelperForN.setVrModeEnabled(activity, enabled," errorLine2=" ~~~~~~~~~~~~~~~~"> - <location file="chrome/android/features/vr/java/src/org/chromium/chrome/browser/vr/VrDelegateFallback.java" /> + <issue + id="WrongConstant" + message="Must be one of: NotificationAction.SHOWN, NotificationAction.COMPLETE, NotificationAction.CANCEL_PRESSED, NotificationAction.DISMISSED" + errorLine1=" intent, EXTRA_ACTION, NotificationAction.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/AutoFetchNotifier.java" + line="100" + column="62"/> </issue> - <issue id="NewApi" message="Call requires API level 24 (current min is 23): `initializeNative`" errorLine1=" mVrShell.initializeNative(mRequestedWebVr, VrModuleProvider.getDelegate().bootsToVr());" errorLine2=" ~~~~~~~~~~~~~~~~"> - <location file="chrome/android/features/vr/java/src/org/chromium/chrome/browser/vr/VrShellDelegate.java" /> + <issue + id="WrongConstant" + message="Must be one of: ActionType.UNKNOWN, ActionType.DOWNLOAD_PAUSE, ActionType.DOWNLOAD_RESUME, ActionType.DOWNLOAD_CANCEL, ActionType.DOWNLOAD_PAGE_PAUSE, ActionType.DOWNLOAD_PAGE_RESUME, ActionType.DOWNLOAD_PAGE_CANCEL, ActionType.CONTENT_SUGGESTION_SETTINGS, ActionType.WEB_APP_ACTION_SHARE, ActionType.WEB_APP_ACTION_OPEN_IN_CHROME, ActionType.OFFLINE_CONTENT_SUGGESTION_SETTINGS, ActionType.SHARING_TRY_AGAIN, ActionType.SETTINGS, ActionType.ANNOUNCEMENT_ACK, ActionType.ANNOUNCEMENT_OPEN, ActionType.PRICE_DROP_VISIT_SITE, ActionType.PRICE_DROP_TURN_OFF_ALERT" + errorLine1=" NotificationUmaTracker.ActionType.AUTO_FETCH_CANCEL)" + errorLine2=" ~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/AutoFetchNotifier.java" + line="174" + column="67"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 23): `updateChannelsIfNecessary`" errorLine1=" WebLayerNotificationChannels.updateChannelsIfNecessary();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="weblayer/browser/java/org/chromium/weblayer_private/WebLayerImpl.java" /> + <issue + id="WrongConstant" + message="Must be one of: NotificationAction.SHOWN, NotificationAction.COMPLETE, NotificationAction.CANCEL_PRESSED, NotificationAction.DISMISSED" + errorLine1=" NotificationAction.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/AutoFetchNotifier.java" + line="206" + column="36"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 23): `getSplitNames`" errorLine1=" String[] splitNames = ApiHelperForO.getSplitNames(appInfo);" errorLine2=" ~~~~~~~~~~~~~"> - <location file="weblayer/browser/java/org/chromium/weblayer_private/WebLayerImpl.java" /> + <issue + id="WrongConstant" + message="Must be one of: NotificationAction.SHOWN, NotificationAction.COMPLETE, NotificationAction.CANCEL_PRESSED, NotificationAction.DISMISSED" + errorLine1=" if (currentAction == NotificationAction.NUM_ENTRIES) {" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/AutoFetchNotifier.java" + line="207" + column="49"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 24): `create`" errorLine1=" PredefinedChannel.create(ChannelId.ACTIVE_DOWNLOADS," errorLine2=" ~~~~~~"> - <location file="weblayer/browser/java/org/chromium/weblayer_private/WebLayerNotificationChannels.java" /> + <issue + id="WrongConstant" + message="Must be one of: NotificationAction.SHOWN, NotificationAction.COMPLETE, NotificationAction.CANCEL_PRESSED, NotificationAction.DISMISSED" + errorLine1=" NotificationAction.NUM_ENTRIES)" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/AutoFetchNotifier.java" + line="223" + column="43"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 24): `create`" errorLine1=" PredefinedChannel.create(ChannelId.COMPLETED_DOWNLOADS," errorLine2=" ~~~~~~"> - <location file="weblayer/browser/java/org/chromium/weblayer_private/WebLayerNotificationChannels.java" /> + <issue + id="WrongConstant" + message="Must be one of: NotificationAction.SHOWN, NotificationAction.COMPLETE, NotificationAction.CANCEL_PRESSED, NotificationAction.DISMISSED" + errorLine1=" != NotificationAction.NUM_ENTRIES;" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/AutoFetchNotifier.java" + line="224" + column="39"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 24): `create`" errorLine1=" PredefinedChannel.create(ChannelId.MEDIA_PLAYBACK," errorLine2=" ~~~~~~"> - <location file="weblayer/browser/java/org/chromium/weblayer_private/WebLayerNotificationChannels.java" /> + <issue + id="WrongConstant" + message="Must be one of: NotificationAction.SHOWN, NotificationAction.COMPLETE, NotificationAction.CANCEL_PRESSED, NotificationAction.DISMISSED" + errorLine1=" intent, EXTRA_ACTION, NotificationAction.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/AutoFetchNotifier.java" + line="236" + column="62"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 24): `create`" errorLine1=" PredefinedChannel.create(ChannelId.WEBRTC_CAM_AND_MIC," errorLine2=" ~~~~~~"> - <location file="weblayer/browser/java/org/chromium/weblayer_private/WebLayerNotificationChannels.java" /> + <issue + id="WrongConstant" + message="Must be one of: NotificationAction.SHOWN, NotificationAction.COMPLETE, NotificationAction.CANCEL_PRESSED, NotificationAction.DISMISSED" + errorLine1=" if (action != NotificationAction.TAPPED && action != NotificationAction.DISMISSED) {" + errorLine2=" ~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/AutoFetchNotifier.java" + line="237" + column="46"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 23): `ChannelsInitializer`" errorLine1=" new ChannelsInitializer(new NotificationManagerProxyImpl(appContext)," errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="weblayer/browser/java/org/chromium/weblayer_private/WebLayerNotificationWrapperBuilder.java" /> + <issue + id="WrongConstant" + message="Must be one of: NotificationAction.SHOWN, NotificationAction.COMPLETE, NotificationAction.CANCEL_PRESSED, NotificationAction.DISMISSED" + errorLine1=" if (action != NotificationAction.TAPPED) {" + errorLine2=" ~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/AutoFetchNotifier.java" + line="242" + column="46"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 23): `getInstance`" errorLine1=" WebLayerNotificationChannels.getInstance(), appContext.getResources());" errorLine2=" ~~~~~~~~~~~"> - <location file="weblayer/browser/java/org/chromium/weblayer_private/WebLayerNotificationWrapperBuilder.java" /> + <issue + id="WrongConstant" + message="Must be one of: TabOpenType.OPEN_NEW_TAB, TabOpenType.REUSE_URL_MATCHING_TAB_ELSE_NEW_TAB, TabOpenType.REUSE_APP_ID_MATCHING_TAB_ELSE_NEW_TAB, TabOpenType.CLOBBER_CURRENT_TAB, TabOpenType.BRING_TAB_TO_FRONT, TabOpenType.OPEN_NEW_INCOGNITO_TAB, TabOpenType.REUSE_TAB_MATCHING_ID_ELSE_NEW_TAB" + errorLine1=" clickIntent.putExtra(TabOpenType.REUSE_TAB_ORIGINAL_URL_STRING, originalUrl);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/AutoFetchNotifier.java" + line="290" + column="42"/> </issue> - <issue id="NewApi" message="Call requires API level 26 (current min is 23): `addShortcutWithShortcutManager`" errorLine1=" addShortcutWithShortcutManager(id, title, icon, isIconAdaptive, shortcutIntent);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/webapps/browser/android/java/src/org/chromium/components/webapps/WebappsUtils.java" /> + <issue + id="WrongConstant" + message="Must be one of: TabOpenType.OPEN_NEW_TAB, TabOpenType.REUSE_URL_MATCHING_TAB_ELSE_NEW_TAB, TabOpenType.REUSE_APP_ID_MATCHING_TAB_ELSE_NEW_TAB, TabOpenType.CLOBBER_CURRENT_TAB, TabOpenType.BRING_TAB_TO_FRONT, TabOpenType.OPEN_NEW_INCOGNITO_TAB, TabOpenType.REUSE_TAB_MATCHING_ID_ELSE_NEW_TAB" + errorLine1=" clickIntent.putExtra(TabOpenType.REUSE_TAB_MATCHING_ID_STRING, tabId);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/AutoFetchNotifier.java" + line="292" + column="42"/> </issue> - <issue id="WrongConstant" message="Must be one of: AdaptiveToolbarButtonVariant.UNKNOWN, AdaptiveToolbarButtonVariant.NONE, AdaptiveToolbarButtonVariant.NEW_TAB, AdaptiveToolbarButtonVariant.SHARE, AdaptiveToolbarButtonVariant.VOICE, AdaptiveToolbarButtonVariant.AUTO, AdaptiveToolbarButtonVariant.PRICE_TRACKING" errorLine1=" && variant < AdaptiveToolbarButtonVariant.NUM_ENTRIES" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveToolbarButtonController.java" /> + <issue + id="WrongConstant" + message="Must be one of: NotificationAction.SHOWN, NotificationAction.COMPLETE, NotificationAction.CANCEL_PRESSED, NotificationAction.DISMISSED" + errorLine1=" clickIntent.putExtra(EXTRA_ACTION, NotificationAction.TAPPED);" + errorLine2=" ~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/AutoFetchNotifier.java" + line="294" + column="63"/> </issue> - <issue id="WrongConstant" message="Must be one of: AdaptiveToolbarButtonVariant.UNKNOWN, AdaptiveToolbarButtonVariant.NONE, AdaptiveToolbarButtonVariant.NEW_TAB, AdaptiveToolbarButtonVariant.SHARE, AdaptiveToolbarButtonVariant.VOICE, AdaptiveToolbarButtonVariant.AUTO, AdaptiveToolbarButtonVariant.PRICE_TRACKING" errorLine1=" AdaptiveToolbarButtonVariant.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveToolbarButtonController.java" /> + <issue + id="WrongConstant" + message="Must be one of: NotificationAction.SHOWN, NotificationAction.COMPLETE, NotificationAction.CANCEL_PRESSED, NotificationAction.DISMISSED" + errorLine1=" NotificationAction.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/AutoFetchNotifier.java" + line="347" + column="36"/> </issue> - <issue id="WrongConstant" message="Must be one of: AdaptiveToolbarButtonVariant.UNKNOWN, AdaptiveToolbarButtonVariant.NONE, AdaptiveToolbarButtonVariant.NEW_TAB, AdaptiveToolbarButtonVariant.SHARE, AdaptiveToolbarButtonVariant.VOICE, AdaptiveToolbarButtonVariant.AUTO, AdaptiveToolbarButtonVariant.PRICE_TRACKING" errorLine1=" buttonVariant, AdaptiveToolbarButtonVariant.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveToolbarButtonController.java" /> + <issue + id="WrongConstant" + message="Must be one of: NotificationAction.SHOWN, NotificationAction.COMPLETE, NotificationAction.CANCEL_PRESSED, NotificationAction.DISMISSED" + errorLine1=" NotificationAction.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/AutoFetchNotifier.java" + line="353" + column="36"/> </issue> - <issue id="WrongConstant" message="Must be one of: AdaptiveToolbarRadioButtonState.UNKNOWN, AdaptiveToolbarRadioButtonState.AUTO_WITH_NEW_TAB, AdaptiveToolbarRadioButtonState.AUTO_WITH_SHARE, AdaptiveToolbarRadioButtonState.AUTO_WITH_VOICE, AdaptiveToolbarRadioButtonState.NEW_TAB, AdaptiveToolbarRadioButtonState.SHARE, AdaptiveToolbarRadioButtonState.VOICE" errorLine1=" AdaptiveToolbarRadioButtonState.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveToolbarStats.java" /> + <issue + id="WrongConstant" + message="Must be one of: OmniboxSuggestionUiType.DEFAULT, OmniboxSuggestionUiType.EDIT_URL_SUGGESTION, OmniboxSuggestionUiType.ANSWER_SUGGESTION, OmniboxSuggestionUiType.ENTITY_SUGGESTION, OmniboxSuggestionUiType.TAIL_SUGGESTION, OmniboxSuggestionUiType.CLIPBOARD_SUGGESTION, OmniboxSuggestionUiType.TILE_SUGGESTION, OmniboxSuggestionUiType.TILE_NAVSUGGEST, OmniboxSuggestionUiType.PEDAL_SUGGESTION" + errorLine1=" OmniboxSuggestionUiType.HEADER," + errorLine2=" ~~~~~~"> + <location + file="$SRC/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/AutocompleteCoordinator.java" + line="201" + column="49"/> </issue> - <issue id="WrongConstant" message="Must be one of: AdaptiveToolbarButtonVariant.UNKNOWN, AdaptiveToolbarButtonVariant.NONE, AdaptiveToolbarButtonVariant.NEW_TAB, AdaptiveToolbarButtonVariant.SHARE, AdaptiveToolbarButtonVariant.VOICE, AdaptiveToolbarButtonVariant.AUTO, AdaptiveToolbarButtonVariant.PRICE_TRACKING" errorLine1=" AdaptiveToolbarButtonVariant.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveToolbarStats.java" /> + <issue + id="WrongConstant" + message="Must be one of: TransmissionResult.SUCCESS, TransmissionResult.MALFORMED_PROTOBUF, TransmissionResult.REMOTE_EXCEPTION" + errorLine1=" TransmissionResult.COUNT);" + errorLine2=" ~~~~~"> + <location + file="$SRC/android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java" + line="403" + column="36"/> </issue> - <issue id="WrongConstant" message="Must be one of: SettingsNavigationSource.OTHER, SettingsNavigationSource.TWA_CLEAR_DATA_DIALOG, SettingsNavigationSource.TWA_MANAGE_SPACE_ACTIVITY" errorLine1=" SettingsNavigationSource.EXTRA_KEY, SettingsNavigationSource.OTHER);" errorLine2=" ~~~~~~~~~"> - <location file="components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/AllSiteSettings.java" /> + <issue + id="WrongConstant" + message="Must be one of: UrlScheme.EMPTY, UrlScheme.UNKNOWN_SCHEME, UrlScheme.HTTP_SCHEME, UrlScheme.HTTPS_SCHEME, UrlScheme.FILE_SCHEME, UrlScheme.FTP_SCHEME, UrlScheme.DATA_SCHEME, UrlScheme.JAVASCRIPT_SCHEME, UrlScheme.ABOUT_SCHEME, UrlScheme.CHROME_SCHEME, UrlScheme.BLOB_SCHEME, UrlScheme.CONTENT_SCHEME, UrlScheme.INTENT_SCHEME, UrlScheme.FILE_ANDROID_ASSET_SCHEME" + errorLine1=" LOAD_URL_SCHEME_HISTOGRAM_NAME, value, UrlScheme.COUNT);" + errorLine2=" ~~~~~"> + <location + file="$SRC/android_webview/java/src/org/chromium/android_webview/AwContents.java" + line="2056" + column="66"/> </issue> - <issue id="WrongConstant" message="Must be one of: SettingsNavigationSource.OTHER, SettingsNavigationSource.TWA_CLEAR_DATA_DIALOG, SettingsNavigationSource.TWA_MANAGE_SPACE_ACTIVITY" errorLine1=" website.getExtras().putInt(SettingsNavigationSource.EXTRA_KEY, navigationSource);" errorLine2=" ~~~~~~~~~"> - <location file="components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/AllSiteSettings.java" /> + <issue + id="WrongConstant" + message="Must be one of: WebViewCallbackType.ON_RECEIVED_LOGIN_REQUEST, WebViewCallbackType.ON_RECEIVED_CLIENT_CERT_REQUEST, WebViewCallbackType.ON_RECEIVED_HTTP_AUTH_REQUEST, WebViewCallbackType.ON_DOWNLOAD_START, WebViewCallbackType.ON_PAGE_STARTED, WebViewCallbackType.ON_PAGE_FINISHED, WebViewCallbackType.ON_LOAD_RESOURCE, WebViewCallbackType.ON_PAGE_COMMIT_VISIBLE, WebViewCallbackType.SHOULD_OVERRIDE_URL_LOADING" + errorLine1=" "Android.WebView.Callback.Counts", result, WebViewCallbackType.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/android_webview/java/src/org/chromium/android_webview/AwHistogramRecorder.java" + line="47" + column="80"/> </issue> - <issue id="WrongConstant" message="Must be one of: FetchFontResult.SUCCESS, FetchFontResult.FAILED_UNEXPECTED_NAME, FetchFontResult.FAILED_STATUS_CODE, FetchFontResult.FAILED_NON_UNIQUE_RESULT, FetchFontResult.FAILED_RESULT_CODE, FetchFontResult.FAILED_FILE_OPEN, FetchFontResult.FAILED_EXCEPTION, FetchFontResult.FAILED_AVOID_RETRY, FetchFontResult.SUCCESS_CACHED" errorLine1=" FETCH_FONT_RESULT_HISTOGRAM, result, FetchFontResult.COUNT);" errorLine2=" ~~~~~"> - <location file="content/public/android/java/src/org/chromium/content/browser/font/AndroidFontLookupImpl.java" /> + <issue + id="WrongConstant" + message="Must be one of: AppOptIn.NO_PREFERENCE, AppOptIn.OPT_IN, AppOptIn.OPT_OUT" + errorLine1=" "SafeBrowsing.WebView.AppOptIn", value, AppOptIn.COUNT);" + errorLine2=" ~~~~~"> + <location + file="$SRC/android_webview/java/src/org/chromium/android_webview/safe_browsing/AwSafeBrowsingConfigHelper.java" + line="49" + column="66"/> </issue> - <issue id="WrongConstant" message="Must be one of: FetchFontName.GOOGLE_SANS_REGULAR, FetchFontName.GOOGLE_SANS_MEDIUM, FetchFontName.GOOGLE_SANS_BOLD, FetchFontName.NOTO_COLOR_EMOJI_COMPAT" errorLine1=" result = FetchFontName.OTHER;" errorLine2=" ~~~~~"> - <location file="content/public/android/java/src/org/chromium/content/browser/font/AndroidFontLookupImpl.java" /> + <issue + id="WrongConstant" + message="Must be one of: ViewType.INVALID, ViewType.PERSONALIZED_SIGNIN_PROMO, ViewType.PERSONALIZED_SYNC_PROMO, ViewType.SYNC_PROMO, ViewType.FOLDER, ViewType.BOOKMARK, ViewType.DIVIDER, ViewType.SECTION_HEADER, ViewType.SHOPPING_POWER_BOOKMARK, ViewType.TAG_CHIP_LIST" + errorLine1=" case ViewType.SHOPPING_FILTER:" + errorLine2=" ~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkItemsAdapter.java" + line="269" + column="27"/> </issue> - <issue id="WrongConstant" message="Must be one of: FetchFontName.GOOGLE_SANS_REGULAR, FetchFontName.GOOGLE_SANS_MEDIUM, FetchFontName.GOOGLE_SANS_BOLD, FetchFontName.NOTO_COLOR_EMOJI_COMPAT" errorLine1=" FETCH_FONT_NAME_HISTOGRAM, result, FetchFontName.COUNT);" errorLine2=" ~~~~~~"> - <location file="content/public/android/java/src/org/chromium/content/browser/font/AndroidFontLookupImpl.java" /> + <issue + id="WrongConstant" + message="Must be one of: ViewType.INVALID, ViewType.PERSONALIZED_SIGNIN_PROMO, ViewType.PERSONALIZED_SYNC_PROMO, ViewType.SYNC_PROMO, ViewType.FOLDER, ViewType.BOOKMARK, ViewType.DIVIDER, ViewType.SECTION_HEADER, ViewType.SHOPPING_POWER_BOOKMARK, ViewType.TAG_CHIP_LIST" + errorLine1=" } else if (holder.getItemViewType() == ViewType.SHOPPING_FILTER) {" + errorLine2=" ~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkItemsAdapter.java" + line="311" + column="57"/> </issue> - <issue id="WrongConstant" message="Must be one of: FetchFontName.GOOGLE_SANS_REGULAR, FetchFontName.GOOGLE_SANS_MEDIUM, FetchFontName.GOOGLE_SANS_BOLD, FetchFontName.NOTO_COLOR_EMOJI_COMPAT" errorLine1=" FETCH_FONT_NAME_HISTOGRAM, result, FetchFontName.COUNT);" errorLine2=" ~~~~~"> - <location file="content/public/android/java/src/org/chromium/content/browser/font/AndroidFontLookupImpl.java" /> + <issue + id="WrongConstant" + message="Must be one of: ViewType.INVALID, ViewType.PERSONALIZED_SIGNIN_PROMO, ViewType.PERSONALIZED_SYNC_PROMO, ViewType.SYNC_PROMO, ViewType.FOLDER, ViewType.BOOKMARK, ViewType.DIVIDER, ViewType.SECTION_HEADER, ViewType.SHOPPING_POWER_BOOKMARK, ViewType.TAG_CHIP_LIST" + errorLine1=" ViewType.SHOPPING_FILTER, /*bookmarkItem=*/null, /*sectionHeaderData=*/null);" + errorLine2=" ~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkListEntry.java" + line="113" + column="26"/> </issue> - <issue id="WrongConstant" message="Must be one of: CacheHit.WITH_ENTITY, CacheHit.WITHOUT_ENTITY, CacheHit.MISS" errorLine1=" "CopylessPaste.CacheHit", CacheHit.WITH_ENTITY, CacheHit.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/AppIndexingUtil.java" /> + <issue + id="WrongConstant" + message="Must be one of: CustomTabsUiType.DEFAULT, CustomTabsUiType.MEDIA_VIEWER, CustomTabsUiType.INFO_PAGE, CustomTabsUiType.READER_MODE, CustomTabsUiType.MINIMAL_UI_WEBAPP, CustomTabsUiType.OFFLINE_PAGE" + errorLine1=" intent.putExtra(CustomTabIntentDataProvider.EXTRA_UI_TYPE, CustomTabsUiType.READ_LATER);" + errorLine2=" ~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkUtils.java" + line="593" + column="85"/> </issue> - <issue id="WrongConstant" message="Must be one of: CacheHit.WITH_ENTITY, CacheHit.WITHOUT_ENTITY, CacheHit.MISS" errorLine1=" "CopylessPaste.CacheHit", CacheHit.WITHOUT_ENTITY, CacheHit.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/AppIndexingUtil.java" /> + <issue + id="WrongConstant" + message="Must be one of: Behavior.UNKNOWN, Behavior.NOT_ENGAGED_BELOW_THRESHOLD, Behavior.ENGAGED_WITH_SAFE_VALUES, Behavior.ENGAGED_IGNORING_OUTDATED_SAFE_VALUES, Behavior.ENGAGED_WITHOUT_SAFE_VALUES" + errorLine1=" "Variations.SafeModeCachedFlags.Engaged", behavior, Behavior.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFlagsSafeMode.java" + line="90" + column="86"/> </issue> - <issue id="WrongConstant" message="Must be one of: CacheHit.WITH_ENTITY, CacheHit.WITHOUT_ENTITY, CacheHit.MISS" errorLine1=" "CopylessPaste.CacheHit", CacheHit.MISS, CacheHit.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/AppIndexingUtil.java" /> + <issue + id="WrongConstant" + message="Must be one of: Behavior.UNKNOWN, Behavior.NOT_ENGAGED_BELOW_THRESHOLD, Behavior.ENGAGED_WITH_SAFE_VALUES, Behavior.ENGAGED_IGNORING_OUTDATED_SAFE_VALUES, Behavior.ENGAGED_WITHOUT_SAFE_VALUES" + errorLine1=" Behavior.NOT_ENGAGED_BELOW_THRESHOLD, Behavior.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFlagsSafeMode.java" + line="94" + column="72"/> </issue> - <issue id="WrongConstant" message="Must be one of: ActionType.DISMISSED_CANCEL_BUTTON, ActionType.DISMISSED_SYSTEM_BACK, ActionType.OK_CHANGE_LANGUAGE, ActionType.OK_SAME_LANGUAGE, ActionType.OTHER" errorLine1=" "LanguageSettings.AppLanguagePrompt.Action", actionType, ActionType.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/AppLanguagePromoDialog.java" /> + <issue + id="WrongConstant" + message="Must be one of: Behavior.UNKNOWN, Behavior.NOT_ENGAGED_BELOW_THRESHOLD, Behavior.ENGAGED_WITH_SAFE_VALUES, Behavior.ENGAGED_IGNORING_OUTDATED_SAFE_VALUES, Behavior.ENGAGED_WITHOUT_SAFE_VALUES" + errorLine1=" "Variations.SafeModeCachedFlags.WillCache", mBehavior.get(), Behavior.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFlagsSafeMode.java" + line="117" + column="87"/> </issue> - <issue id="WrongConstant" message="Must be one of: BlockDrawForInitialTabAccuracy.BLOCKED_CORRECTLY, BlockDrawForInitialTabAccuracy.BLOCKED_BUT_SHOULD_NOT_HAVE, BlockDrawForInitialTabAccuracy.DID_NOT_BLOCK_BUT_SHOULD_HAVE, BlockDrawForInitialTabAccuracy.CORRECTLY_DID_NOT_BLOCK" errorLine1=" BlockDrawForInitialTabAccuracy.COUNT);" errorLine2=" ~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/ui/AppLaunchDrawBlocker.java" /> + <issue + id="WrongConstant" + message="Must be one of: Behavior.UNKNOWN, Behavior.NOT_ENGAGED_BELOW_THRESHOLD, Behavior.ENGAGED_WITH_SAFE_VALUES, Behavior.ENGAGED_IGNORING_OUTDATED_SAFE_VALUES, Behavior.ENGAGED_WITHOUT_SAFE_VALUES" + errorLine1=" "Variations.SafeModeCachedFlags.Pause", mBehavior.get(), Behavior.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFlagsSafeMode.java" + line="136" + column="83"/> </issue> - <issue id="WrongConstant" message="Must be one of: AppMenuHighlightItem.UNKNOWN, AppMenuHighlightItem.DOWNLOADS, AppMenuHighlightItem.BOOKMARKS, AppMenuHighlightItem.TRANSLATE, AppMenuHighlightItem.ADD_TO_HOMESCREEN, AppMenuHighlightItem.DOWNLOAD_THIS_PAGE, AppMenuHighlightItem.BOOKMARK_THIS_PAGE, AppMenuHighlightItem.DATA_REDUCTION_FOOTER" errorLine1=" getUmaEnumForMenuItem(menuItemId), AppMenuHighlightItem.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java" /> + <issue + id="WrongConstant" + message="Must be one of: Behavior.UNKNOWN, Behavior.NOT_ENGAGED_BELOW_THRESHOLD, Behavior.ENGAGED_WITH_SAFE_VALUES, Behavior.ENGAGED_IGNORING_OUTDATED_SAFE_VALUES, Behavior.ENGAGED_WITHOUT_SAFE_VALUES" + errorLine1=" mBehavior.get(), Behavior.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFlagsSafeMode.java" + line="183" + column="51"/> </issue> - <issue id="WrongConstant" message="Must be one of: AppMenuHighlightItem.UNKNOWN, AppMenuHighlightItem.DOWNLOADS, AppMenuHighlightItem.BOOKMARKS, AppMenuHighlightItem.TRANSLATE, AppMenuHighlightItem.ADD_TO_HOMESCREEN, AppMenuHighlightItem.DOWNLOAD_THIS_PAGE, AppMenuHighlightItem.BOOKMARK_THIS_PAGE, AppMenuHighlightItem.DATA_REDUCTION_FOOTER" errorLine1=" getUmaEnumForMenuItem(menuItemId), AppMenuHighlightItem.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/app/appmenu/AppMenuPropertiesDelegateImpl.java" /> + <issue + id="WrongConstant" + message="Must be one of: ViewCompat.IMPORTANT_FOR_ACCESSIBILITY_AUTO, ViewCompat.IMPORTANT_FOR_ACCESSIBILITY_YES, ViewCompat.IMPORTANT_FOR_ACCESSIBILITY_NO, ViewCompat.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS" + errorLine1=" contentsShowing ? View.IMPORTANT_FOR_ACCESSIBILITY_AUTO" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/autofill/CardUnmaskPrompt.java" + line="530" + column="35"/> </issue> - <issue id="WrongConstant" message="Must be one of: ConsentOutcome.ACCEPTED_VIA_UI, ConsentOutcome.ACCEPTED_VIA_SETTINGS, ConsentOutcome.REJECTED_VIA_UI, ConsentOutcome.REJECTED_VIA_SETTINGS, ConsentOutcome.REJECTED_VIA_DISMISS, ConsentOutcome.CANCELED_VIA_UI, ConsentOutcome.MAX_VALUE" errorLine1=" ConsentOutcome.NON_USER_CANCEL, ConsentOutcome.MAX_VALUE);" errorLine2=" ~~~~~~~~~~~~~~~"> - <location file="chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/voice/AssistantVoiceSearchConsentController.java" /> + <issue + id="WrongConstant" + message="Must be one of: ViewCompat.IMPORTANT_FOR_ACCESSIBILITY_AUTO, ViewCompat.IMPORTANT_FOR_ACCESSIBILITY_YES, ViewCompat.IMPORTANT_FOR_ACCESSIBILITY_NO, ViewCompat.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS" + errorLine1=" : View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/autofill/CardUnmaskPrompt.java" + line="531" + column="35"/> </issue> - <issue id="WrongConstant" message="Must be one of: EligibilityFailureReason.AGSA_CANT_HANDLE_INTENT, EligibilityFailureReason.AGSA_VERSION_BELOW_MINIMUM, EligibilityFailureReason.CHROME_NOT_GOOGLE_SIGNED, EligibilityFailureReason.AGSA_NOT_GOOGLE_SIGNED, EligibilityFailureReason.NON_GOOGLE_SEARCH_ENGINE, EligibilityFailureReason.NO_CHROME_ACCOUNT, EligibilityFailureReason.LOW_END_DEVICE, EligibilityFailureReason.MULTIPLE_ACCOUNTS_ON_DEVICE, EligibilityFailureReason.AGSA_NOT_INSTALLED" errorLine1=" EligibilityFailureReason.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/voice/AssistantVoiceSearchService.java" /> + <issue + id="WrongConstant" + message="Must be one of: ZygoteChildState.FAILED_TO_CREATE_BUNDLE, ZygoteChildState.FIRST_USABLE_ZYGOTE, ZygoteChildState.ZYGOTE_RESTARTED, ZygoteChildState.ZYGOTE_SEEN" + errorLine1=" "ChromiumAndroidLinker.ChildProcessZygoteState", state, ZygoteChildState.COUNT);" + errorLine2=" ~~~~~"> + <location + file="$SRC/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncherHelperImpl.java" + line="245" + column="90"/> </issue> - <issue id="WrongConstant" message="Must be one of: Status.PENDING, Status.RUNNING, Status.FINISHED" errorLine1=" GET_STATUS_UMA_HISTOGRAM, status, Status.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="base/android/java/src/org/chromium/base/task/AsyncTask.java" /> + <issue + id="WrongConstant" + message="Must be one of: RestoreStatus.NO_RESTORE, RestoreStatus.RESTORE_COMPLETED, RestoreStatus.RESTORE_AFTER_FIRST_RUN, RestoreStatus.BROWSER_STARTUP_FAILED, RestoreStatus.NOT_SIGNED_IN, RestoreStatus.RESTORE_STATUS_RECORDED" + errorLine1=" HISTOGRAM_ANDROID_RESTORE_RESULT, restoreStatus, RestoreStatus.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/ChromeBackupAgentImpl.java" + line="459" + column="84"/> </issue> - <issue id="WrongConstant" message="Must be one of: Status.PENDING, Status.RUNNING, Status.FINISHED" errorLine1=" GET_STATUS_UMA_HISTOGRAM, status, Status.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="base/android/java/src/org/chromium/base/task/AsyncTask.java" /> + <issue + id="WrongConstant" + message="Must be one of: ChannelId.BROWSER, ChannelId.DOWNLOADS, ChannelId.INCOGNITO, ChannelId.MEDIA_PLAYBACK, ChannelId.SCREEN_CAPTURE, ChannelId.CONTENT_SUGGESTIONS, ChannelId.WEBAPP_ACTIONS, ChannelId.SITES, ChannelId.SHARING, ChannelId.UPDATES, ChannelId.COMPLETED_DOWNLOADS, ChannelId.PERMISSION_REQUESTS, ChannelId.PERMISSION_REQUESTS_HIGH, ChannelId.ANNOUNCEMENT, ChannelId.WEBAPPS, ChannelId.WEBAPPS_QUIET, ChannelId.PRICE_DROP, ChannelId.SECURITY_KEY, ChannelId.CHROME_TIPS, ChannelId.BLUETOOTH, ChannelId.USB" + errorLine1=" map.put(ChannelId.WEBRTC_CAM_AND_MIC," + errorLine2=" ~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/channels/ChromeChannelDefinitions.java" + line="159" + column="31"/> </issue> - <issue id="WrongConstant" message="Must be one of: AutoDarkSettingsChangeSource.THEME_SETTINGS, AutoDarkSettingsChangeSource.SITE_SETTINGS_GLOBAL, AutoDarkSettingsChangeSource.APP_MENU, AutoDarkSettingsChangeSource.SITE_SETTINGS_EXCEPTION_LIST" errorLine1=" histogram, source, AutoDarkSettingsChangeSource.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/AutoDarkMetrics.java" /> + <issue + id="WrongConstant" + message="Must be one of: ChannelId.BROWSER, ChannelId.DOWNLOADS, ChannelId.INCOGNITO, ChannelId.MEDIA_PLAYBACK, ChannelId.SCREEN_CAPTURE, ChannelId.CONTENT_SUGGESTIONS, ChannelId.WEBAPP_ACTIONS, ChannelId.SITES, ChannelId.SHARING, ChannelId.UPDATES, ChannelId.COMPLETED_DOWNLOADS, ChannelId.PERMISSION_REQUESTS, ChannelId.PERMISSION_REQUESTS_HIGH, ChannelId.ANNOUNCEMENT, ChannelId.WEBAPPS, ChannelId.WEBAPPS_QUIET, ChannelId.PRICE_DROP, ChannelId.SECURITY_KEY, ChannelId.CHROME_TIPS, ChannelId.BLUETOOTH, ChannelId.USB" + errorLine1=" PredefinedChannel.create(ChannelId.WEBRTC_CAM_AND_MIC," + errorLine2=" ~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/channels/ChromeChannelDefinitions.java" + line="160" + column="56"/> </issue> - <issue id="WrongConstant" message="Must be one of: NotificationAction.SHOWN, NotificationAction.COMPLETE, NotificationAction.CANCEL_PRESSED, NotificationAction.DISMISSED" errorLine1=" intent, EXTRA_ACTION, NotificationAction.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/offlinepages/AutoFetchNotifier.java" /> + <issue + id="WrongConstant" + message="Must be one of: ChannelId.BROWSER, ChannelId.DOWNLOADS, ChannelId.INCOGNITO, ChannelId.MEDIA_PLAYBACK, ChannelId.SCREEN_CAPTURE, ChannelId.CONTENT_SUGGESTIONS, ChannelId.WEBAPP_ACTIONS, ChannelId.SITES, ChannelId.SHARING, ChannelId.UPDATES, ChannelId.COMPLETED_DOWNLOADS, ChannelId.PERMISSION_REQUESTS, ChannelId.PERMISSION_REQUESTS_HIGH, ChannelId.ANNOUNCEMENT, ChannelId.WEBAPPS, ChannelId.WEBAPPS_QUIET, ChannelId.PRICE_DROP, ChannelId.SECURITY_KEY, ChannelId.CHROME_TIPS, ChannelId.BLUETOOTH, ChannelId.USB" + errorLine1=" map.put(ChannelId.VR," + errorLine2=" ~~"> + <location + file="$SRC/chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/channels/ChromeChannelDefinitions.java" + line="200" + column="31"/> </issue> - <issue id="WrongConstant" message="Must be one of: ActionType.UNKNOWN, ActionType.DOWNLOAD_PAUSE, ActionType.DOWNLOAD_RESUME, ActionType.DOWNLOAD_CANCEL, ActionType.DOWNLOAD_PAGE_PAUSE, ActionType.DOWNLOAD_PAGE_RESUME, ActionType.DOWNLOAD_PAGE_CANCEL, ActionType.CONTENT_SUGGESTION_SETTINGS, ActionType.WEB_APP_ACTION_SHARE, ActionType.WEB_APP_ACTION_OPEN_IN_CHROME, ActionType.OFFLINE_CONTENT_SUGGESTION_SETTINGS, ActionType.SHARING_TRY_AGAIN, ActionType.SETTINGS, ActionType.ANNOUNCEMENT_ACK, ActionType.ANNOUNCEMENT_OPEN, ActionType.PRICE_DROP_VISIT_SITE, ActionType.PRICE_DROP_TURN_OFF_ALERT" errorLine1=" NotificationUmaTracker.ActionType.AUTO_FETCH_CANCEL)" errorLine2=" ~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/offlinepages/AutoFetchNotifier.java" /> + <issue + id="WrongConstant" + message="Must be one of: ChannelId.BROWSER, ChannelId.DOWNLOADS, ChannelId.INCOGNITO, ChannelId.MEDIA_PLAYBACK, ChannelId.SCREEN_CAPTURE, ChannelId.CONTENT_SUGGESTIONS, ChannelId.WEBAPP_ACTIONS, ChannelId.SITES, ChannelId.SHARING, ChannelId.UPDATES, ChannelId.COMPLETED_DOWNLOADS, ChannelId.PERMISSION_REQUESTS, ChannelId.PERMISSION_REQUESTS_HIGH, ChannelId.ANNOUNCEMENT, ChannelId.WEBAPPS, ChannelId.WEBAPPS_QUIET, ChannelId.PRICE_DROP, ChannelId.SECURITY_KEY, ChannelId.CHROME_TIPS, ChannelId.BLUETOOTH, ChannelId.USB" + errorLine1=" PredefinedChannel.create(ChannelId.VR, R.string.notification_category_vr," + errorLine2=" ~~"> + <location + file="$SRC/chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/channels/ChromeChannelDefinitions.java" + line="201" + column="56"/> </issue> - <issue id="WrongConstant" message="Must be one of: NotificationAction.SHOWN, NotificationAction.COMPLETE, NotificationAction.CANCEL_PRESSED, NotificationAction.DISMISSED" errorLine1=" NotificationAction.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/offlinepages/AutoFetchNotifier.java" /> + <issue + id="WrongConstant" + message="Must be one of: Item.OPEN_IN_NEW_CHROME_TAB, Item.OPEN_IN_CHROME_INCOGNITO_TAB, Item.OPEN_IN_BROWSER_ID, Item.OPEN_IN_NEW_TAB, Item.OPEN_IN_INCOGNITO_TAB, Item.OPEN_IN_OTHER_WINDOW, Item.OPEN_IN_NEW_WINDOW, Item.OPEN_IN_EPHEMERAL_TAB, Item.COPY_LINK_ADDRESS, Item.COPY_LINK_TEXT, Item.SAVE_LINK_AS, Item.SHARE_LINK, Item.DIRECT_SHARE_LINK, Item.READ_LATER, Item.LOAD_ORIGINAL_IMAGE, Item.SAVE_IMAGE, Item.OPEN_IMAGE, Item.OPEN_IMAGE_IN_NEW_TAB, Item.OPEN_IMAGE_IN_EPHEMERAL_TAB, Item.COPY_IMAGE, Item.SEARCH_BY_IMAGE, Item.SEARCH_WITH_GOOGLE_LENS, Item.SHOP_IMAGE_WITH_GOOGLE_LENS, Item.SHARE_IMAGE, Item.DIRECT_SHARE_IMAGE, Item.CALL, Item.SEND_MESSAGE, Item.ADD_TO_CONTACTS, Item.COPY, Item.SAVE_VIDEO, Item.OPEN_IN_CHROME, Item.OPEN_IN_NEW_TAB_IN_GROUP, Item.SHARE_HIGHLIGHT, Item.REMOVE_HIGHLIGHT, Item.LEARN_MORE" + errorLine1=" assert MENU_IDS.length == Item.NUM_ENTRIES;" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuItem.java" + line="182" + column="40"/> </issue> - <issue id="WrongConstant" message="Must be one of: NotificationAction.SHOWN, NotificationAction.COMPLETE, NotificationAction.CANCEL_PRESSED, NotificationAction.DISMISSED" errorLine1=" if (currentAction == NotificationAction.NUM_ENTRIES) {" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/offlinepages/AutoFetchNotifier.java" /> + <issue + id="WrongConstant" + message="Must be one of: Item.OPEN_IN_NEW_CHROME_TAB, Item.OPEN_IN_CHROME_INCOGNITO_TAB, Item.OPEN_IN_BROWSER_ID, Item.OPEN_IN_NEW_TAB, Item.OPEN_IN_INCOGNITO_TAB, Item.OPEN_IN_OTHER_WINDOW, Item.OPEN_IN_NEW_WINDOW, Item.OPEN_IN_EPHEMERAL_TAB, Item.COPY_LINK_ADDRESS, Item.COPY_LINK_TEXT, Item.SAVE_LINK_AS, Item.SHARE_LINK, Item.DIRECT_SHARE_LINK, Item.READ_LATER, Item.LOAD_ORIGINAL_IMAGE, Item.SAVE_IMAGE, Item.OPEN_IMAGE, Item.OPEN_IMAGE_IN_NEW_TAB, Item.OPEN_IMAGE_IN_EPHEMERAL_TAB, Item.COPY_IMAGE, Item.SEARCH_BY_IMAGE, Item.SEARCH_WITH_GOOGLE_LENS, Item.SHOP_IMAGE_WITH_GOOGLE_LENS, Item.SHARE_IMAGE, Item.DIRECT_SHARE_IMAGE, Item.CALL, Item.SEND_MESSAGE, Item.ADD_TO_CONTACTS, Item.COPY, Item.SAVE_VIDEO, Item.OPEN_IN_CHROME, Item.OPEN_IN_NEW_TAB_IN_GROUP, Item.SHARE_HIGHLIGHT, Item.REMOVE_HIGHLIGHT, Item.LEARN_MORE" + errorLine1=" assert STRING_IDS.length == Item.NUM_ENTRIES;" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuItem.java" + line="193" + column="42"/> </issue> - <issue id="WrongConstant" message="Must be one of: NotificationAction.SHOWN, NotificationAction.COMPLETE, NotificationAction.CANCEL_PRESSED, NotificationAction.DISMISSED" errorLine1=" NotificationAction.NUM_ENTRIES)" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/offlinepages/AutoFetchNotifier.java" /> + <issue + id="WrongConstant" + message="Must be one of: Action.OPEN_IN_NEW_TAB, Action.OPEN_IN_INCOGNITO_TAB, Action.COPY_LINK_ADDRESS, Action.COPY_EMAIL_ADDRESS, Action.COPY_LINK_TEXT, Action.SAVE_LINK, Action.SAVE_IMAGE, Action.OPEN_IMAGE, Action.OPEN_IMAGE_IN_NEW_TAB, Action.SEARCH_BY_IMAGE, Action.LOAD_ORIGINAL_IMAGE, Action.SAVE_VIDEO, Action.SHARE_IMAGE, Action.OPEN_IN_OTHER_WINDOW, Action.OPEN_IN_NEW_WINDOW, Action.SEND_EMAIL, Action.ADD_TO_CONTACTS, Action.CALL, Action.SEND_TEXT_MESSAGE, Action.COPY_PHONE_NUMBER, Action.OPEN_IN_NEW_CHROME_TAB, Action.OPEN_IN_CHROME_INCOGNITO_TAB, Action.OPEN_IN_BROWSER, Action.OPEN_IN_CHROME, Action.SHARE_LINK, Action.OPEN_IN_EPHEMERAL_TAB, Action.OPEN_IMAGE_IN_EPHEMERAL_TAB, Action.DIRECT_SHARE_LINK, Action.DIRECT_SHARE_IMAGE, Action.SEARCH_WITH_GOOGLE_LENS, Action.COPY_IMAGE, Action.SHOP_IMAGE_WITH_GOOGLE_LENS, Action.READ_LATER, Action.SHOP_WITH_GOOGLE_LENS_CHIP, Action.TRANSLATE_WITH_GOOGLE_LENS_CHIP, Action.SHARE_HIGHLIGHT, Action.REMOVE_HIGHLIGHT, Action.LEARN_MORE, Action.OPEN_IN_NEW_TAB_IN_GROUP" + errorLine1=" RecordHistogram.recordEnumeratedHistogram(histogramName, action, Action.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java" + line="259" + column="85"/> </issue> - <issue id="WrongConstant" message="Must be one of: NotificationAction.SHOWN, NotificationAction.COMPLETE, NotificationAction.CANCEL_PRESSED, NotificationAction.DISMISSED" errorLine1=" != NotificationAction.NUM_ENTRIES;" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/offlinepages/AutoFetchNotifier.java" /> + <issue + id="WrongConstant" + message="Must be one of: Action.OPEN_IN_NEW_TAB, Action.OPEN_IN_INCOGNITO_TAB, Action.COPY_LINK_ADDRESS, Action.COPY_EMAIL_ADDRESS, Action.COPY_LINK_TEXT, Action.SAVE_LINK, Action.SAVE_IMAGE, Action.OPEN_IMAGE, Action.OPEN_IMAGE_IN_NEW_TAB, Action.SEARCH_BY_IMAGE, Action.LOAD_ORIGINAL_IMAGE, Action.SAVE_VIDEO, Action.SHARE_IMAGE, Action.OPEN_IN_OTHER_WINDOW, Action.OPEN_IN_NEW_WINDOW, Action.SEND_EMAIL, Action.ADD_TO_CONTACTS, Action.CALL, Action.SEND_TEXT_MESSAGE, Action.COPY_PHONE_NUMBER, Action.OPEN_IN_NEW_CHROME_TAB, Action.OPEN_IN_CHROME_INCOGNITO_TAB, Action.OPEN_IN_BROWSER, Action.OPEN_IN_CHROME, Action.SHARE_LINK, Action.OPEN_IN_EPHEMERAL_TAB, Action.OPEN_IMAGE_IN_EPHEMERAL_TAB, Action.DIRECT_SHARE_LINK, Action.DIRECT_SHARE_IMAGE, Action.SEARCH_WITH_GOOGLE_LENS, Action.COPY_IMAGE, Action.SHOP_IMAGE_WITH_GOOGLE_LENS, Action.READ_LATER, Action.SHOP_WITH_GOOGLE_LENS_CHIP, Action.TRANSLATE_WITH_GOOGLE_LENS_CHIP, Action.SHARE_HIGHLIGHT, Action.REMOVE_HIGHLIGHT, Action.LEARN_MORE, Action.OPEN_IN_NEW_TAB_IN_GROUP" + errorLine1=" histogramName + ".PerformanceClassFast", action, Action.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java" + line="275" + column="81"/> </issue> - <issue id="WrongConstant" message="Must be one of: NotificationAction.SHOWN, NotificationAction.COMPLETE, NotificationAction.CANCEL_PRESSED, NotificationAction.DISMISSED" errorLine1=" intent, EXTRA_ACTION, NotificationAction.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/offlinepages/AutoFetchNotifier.java" /> + <issue + id="WrongConstant" + message="Must be one of: SelectedNewTabCreationEnum.OPEN_IN_NEW_TAB_FIRST_SELECTED_OPEN_IN_NEW_TAB, SelectedNewTabCreationEnum.OPEN_IN_NEW_TAB_FIRST_SELECTED_OPEN_IN_NEW_TAB_IN_GROUP, SelectedNewTabCreationEnum.OPEN_IN_NEW_TAB_IN_GROUP_FIRST_SELECTED_OPEN_IN_NEW_TAB, SelectedNewTabCreationEnum.OPEN_IN_NEW_TAB_IN_GROUP_FIRST_SELECTED_OPEN_IN_NEW_TAB_IN_GROUP" + errorLine1=" selectedNewTabCreationEnum, SelectedNewTabCreationEnum.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java" + line="304" + column="76"/> </issue> - <issue id="WrongConstant" message="Must be one of: NotificationAction.SHOWN, NotificationAction.COMPLETE, NotificationAction.CANCEL_PRESSED, NotificationAction.DISMISSED" errorLine1=" if (action != NotificationAction.TAPPED && action != NotificationAction.DISMISSED) {" errorLine2=" ~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/offlinepages/AutoFetchNotifier.java" /> + <issue + id="WrongConstant" + message="Must be one of: TypeSaveImage.LOADED, TypeSaveImage.NOT_DOWNLOADABLE, TypeSaveImage.DISABLED_AND_IS_NOT_IMAGE_PARAM, TypeSaveImage.DISABLED_AND_IS_IMAGE_PARAM, TypeSaveImage.SHOWN" + errorLine1=" "MobileDownload.ContextMenu.SaveImage", type, TypeSaveImage.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java" + line="313" + column="81"/> </issue> - <issue id="WrongConstant" message="Must be one of: NotificationAction.SHOWN, NotificationAction.COMPLETE, NotificationAction.CANCEL_PRESSED, NotificationAction.DISMISSED" errorLine1=" if (action != NotificationAction.TAPPED) {" errorLine2=" ~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/offlinepages/AutoFetchNotifier.java" /> + <issue + id="WrongConstant" + message="Must be one of: UiAvailableTypes.TOP_AVAILABLE, UiAvailableTypes.ONLY_DEFAULT_AVAILABLE, UiAvailableTypes.NONE_AVAILABLE, UiAvailableTypes.OVERRIDDEN" + errorLine1=" availableStatus, UiAvailableTypes.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/ChromeLocalizationUtils.java" + line="133" + column="51"/> </issue> - <issue id="WrongConstant" message="Must be one of: TabOpenType.OPEN_NEW_TAB, TabOpenType.REUSE_URL_MATCHING_TAB_ELSE_NEW_TAB, TabOpenType.REUSE_APP_ID_MATCHING_TAB_ELSE_NEW_TAB, TabOpenType.CLOBBER_CURRENT_TAB, TabOpenType.BRING_TAB_TO_FRONT, TabOpenType.OPEN_NEW_INCOGNITO_TAB, TabOpenType.REUSE_TAB_MATCHING_ID_ELSE_NEW_TAB" errorLine1=" clickIntent.putExtra(TabOpenType.REUSE_TAB_ORIGINAL_URL_STRING, originalUrl);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/offlinepages/AutoFetchNotifier.java" /> + <issue + id="WrongConstant" + message="Must be one of: UiCorrectTypes.CORRECT, UiCorrectTypes.INCORRECT, UiCorrectTypes.NOT_AVAILABLE, UiCorrectTypes.ONLY_JAVA_CORRECT" + errorLine1=" "LanguageUsage.UI.Android.Correctness", correctStatus, UiCorrectTypes.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/ChromeLocalizationUtils.java" + line="140" + column="87"/> </issue> - <issue id="WrongConstant" message="Must be one of: TabOpenType.OPEN_NEW_TAB, TabOpenType.REUSE_URL_MATCHING_TAB_ELSE_NEW_TAB, TabOpenType.REUSE_APP_ID_MATCHING_TAB_ELSE_NEW_TAB, TabOpenType.CLOBBER_CURRENT_TAB, TabOpenType.BRING_TAB_TO_FRONT, TabOpenType.OPEN_NEW_INCOGNITO_TAB, TabOpenType.REUSE_TAB_MATCHING_ID_ELSE_NEW_TAB" errorLine1=" clickIntent.putExtra(TabOpenType.REUSE_TAB_MATCHING_ID_STRING, tabId);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/offlinepages/AutoFetchNotifier.java" /> + <issue + id="WrongConstant" + message="Must be one of: UiCorrectTypes.CORRECT, UiCorrectTypes.INCORRECT, UiCorrectTypes.NOT_AVAILABLE, UiCorrectTypes.ONLY_JAVA_CORRECT" + errorLine1=" UiCorrectTypes.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/ChromeLocalizationUtils.java" + line="147" + column="36"/> </issue> - <issue id="WrongConstant" message="Must be one of: NotificationAction.SHOWN, NotificationAction.COMPLETE, NotificationAction.CANCEL_PRESSED, NotificationAction.DISMISSED" errorLine1=" clickIntent.putExtra(EXTRA_ACTION, NotificationAction.TAPPED);" errorLine2=" ~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/offlinepages/AutoFetchNotifier.java" /> + <issue + id="WrongConstant" + message="Must be one of: UiCorrectTypes.CORRECT, UiCorrectTypes.INCORRECT, UiCorrectTypes.NOT_AVAILABLE, UiCorrectTypes.ONLY_JAVA_CORRECT" + errorLine1=" UiCorrectTypes.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/ChromeLocalizationUtils.java" + line="154" + column="36"/> </issue> - <issue id="WrongConstant" message="Must be one of: NotificationAction.SHOWN, NotificationAction.COMPLETE, NotificationAction.CANCEL_PRESSED, NotificationAction.DISMISSED" errorLine1=" NotificationAction.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/offlinepages/AutoFetchNotifier.java" /> + <issue + id="WrongConstant" + message="Must be one of: LocaleUpdateStatus.NO_CHANGE, LocaleUpdateStatus.OVERRIDDEN_TOP_CHANGED, LocaleUpdateStatus.OVERRIDDEN_OTHERS_CHANGED, LocaleUpdateStatus.NO_OVERRIDE_TOP_CHANGED, LocaleUpdateStatus.NO_OVERRIDE_OTHERS_CHANGED, LocaleUpdateStatus.FIRST_RUN" + errorLine1=" "LanguageUsage.UI.Android.IsLocaleUpdated", status, LocaleUpdateStatus.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/ChromeLocalizationUtils.java" + line="262" + column="88"/> </issue> - <issue id="WrongConstant" message="Must be one of: NotificationAction.SHOWN, NotificationAction.COMPLETE, NotificationAction.CANCEL_PRESSED, NotificationAction.DISMISSED" errorLine1=" NotificationAction.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/offlinepages/AutoFetchNotifier.java" /> + <issue + id="WrongConstant" + message="Must be one of: FilteringResult.SURVEY_INFOBAR_ALREADY_DISPLAYED, FilteringResult.FORCE_SURVEY_ON_COMMAND_PRESENT, FilteringResult.USER_ALREADY_SAMPLED_TODAY, FilteringResult.MAX_NUMBER_MISSING, FilteringResult.ROLLED_NON_ZERO_NUMBER, FilteringResult.USER_SELECTED_FOR_SURVEY, FilteringResult.FIRST_TIME_USER" + errorLine1=" "Android.Survey.SurveyFilteringResults", value, FilteringResult.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/survey/ChromeSurveyController.java" + line="646" + column="81"/> </issue> - <issue id="WrongConstant" message="Must be one of: OmniboxSuggestionUiType.DEFAULT, OmniboxSuggestionUiType.EDIT_URL_SUGGESTION, OmniboxSuggestionUiType.ANSWER_SUGGESTION, OmniboxSuggestionUiType.ENTITY_SUGGESTION, OmniboxSuggestionUiType.TAIL_SUGGESTION, OmniboxSuggestionUiType.CLIPBOARD_SUGGESTION, OmniboxSuggestionUiType.TILE_SUGGESTION, OmniboxSuggestionUiType.TILE_NAVSUGGEST, OmniboxSuggestionUiType.PEDAL_SUGGESTION" errorLine1=" OmniboxSuggestionUiType.HEADER," errorLine2=" ~~~~~~"> - <location file="chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/AutocompleteCoordinator.java" /> + <issue + id="WrongConstant" + message="Must be one of: InfoBarClosingState.ACCEPTED_SURVEY, InfoBarClosingState.CLOSE_BUTTON, InfoBarClosingState.VISIBLE_INDIRECT, InfoBarClosingState.HIDDEN_INDIRECT, InfoBarClosingState.UNKNOWN" + errorLine1=" "Android.Survey.InfoBarClosingState", value, InfoBarClosingState.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/survey/ChromeSurveyController.java" + line="651" + column="82"/> </issue> - <issue id="WrongConstant" message="Must be one of: TransmissionResult.SUCCESS, TransmissionResult.MALFORMED_PROTOBUF, TransmissionResult.REMOTE_EXCEPTION" errorLine1=" TransmissionResult.COUNT);" errorLine2=" ~~~~~"> - <location file="android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java" /> + <issue + id="WrongConstant" + message="Must be one of: PageTransition.FIRST, PageTransition.LINK, PageTransition.TYPED, PageTransition.AUTO_BOOKMARK, PageTransition.AUTO_SUBFRAME, PageTransition.MANUAL_SUBFRAME, PageTransition.GENERATED, PageTransition.AUTO_TOPLEVEL, PageTransition.FORM_SUBMIT, PageTransition.RELOAD, PageTransition.KEYWORD, PageTransition.KEYWORD_GENERATED, PageTransition.LAST_CORE, PageTransition.CORE_MASK, PageTransition.BLOCKED, PageTransition.FORWARD_BACK, PageTransition.FROM_ADDRESS_BAR, PageTransition.HOME_PAGE, PageTransition.FROM_API, PageTransition.CHAIN_START, PageTransition.CHAIN_END, PageTransition.CLIENT_REDIRECT, PageTransition.SERVER_REDIRECT, PageTransition.IS_REDIRECT_MASK, PageTransition.QUALIFIER_MASK" + errorLine1=" getTransitionType(type, intent, loadUrlParams.getTransitionType()));" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/ChromeTabCreator.java" + line="153" + column="53"/> </issue> - <issue id="WrongConstant" message="Must be one of: UrlScheme.EMPTY, UrlScheme.UNKNOWN_SCHEME, UrlScheme.HTTP_SCHEME, UrlScheme.HTTPS_SCHEME, UrlScheme.FILE_SCHEME, UrlScheme.FTP_SCHEME, UrlScheme.DATA_SCHEME, UrlScheme.JAVASCRIPT_SCHEME, UrlScheme.ABOUT_SCHEME, UrlScheme.CHROME_SCHEME, UrlScheme.BLOB_SCHEME, UrlScheme.CONTENT_SCHEME, UrlScheme.INTENT_SCHEME, UrlScheme.FILE_ANDROID_ASSET_SCHEME" errorLine1=" LOAD_URL_SCHEME_HISTOGRAM_NAME, value, UrlScheme.COUNT);" errorLine2=" ~~~~~"> - <location file="android_webview/java/src/org/chromium/android_webview/AwContents.java" /> + <issue + id="WrongConstant" + message="Must be one of: ExternalAppId.OTHER, ExternalAppId.GMAIL, ExternalAppId.FACEBOOK, ExternalAppId.PLUS, ExternalAppId.TWITTER, ExternalAppId.CHROME, ExternalAppId.HANGOUTS, ExternalAppId.MESSENGER, ExternalAppId.NEWS, ExternalAppId.LINE, ExternalAppId.WHATSAPP, ExternalAppId.GSA, ExternalAppId.WEBAPK, ExternalAppId.YAHOO_MAIL, ExternalAppId.VIBER, ExternalAppId.YOUTUBE" + errorLine1=" IntentHandler.ExternalAppId.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java" + line="532" + column="53"/> </issue> - <issue id="WrongConstant" message="Must be one of: WebViewCallbackType.ON_RECEIVED_LOGIN_REQUEST, WebViewCallbackType.ON_RECEIVED_CLIENT_CERT_REQUEST, WebViewCallbackType.ON_RECEIVED_HTTP_AUTH_REQUEST, WebViewCallbackType.ON_DOWNLOAD_START, WebViewCallbackType.ON_PAGE_STARTED, WebViewCallbackType.ON_PAGE_FINISHED, WebViewCallbackType.ON_LOAD_RESOURCE, WebViewCallbackType.ON_PAGE_COMMIT_VISIBLE, WebViewCallbackType.SHOULD_OVERRIDE_URL_LOADING" errorLine1=" "Android.WebView.Callback.Counts", result, WebViewCallbackType.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="android_webview/java/src/org/chromium/android_webview/AwHistogramRecorder.java" /> + <issue + id="WrongConstant" + message="Must be one of: TabOpenType.OPEN_NEW_TAB, TabOpenType.REUSE_URL_MATCHING_TAB_ELSE_NEW_TAB, TabOpenType.REUSE_APP_ID_MATCHING_TAB_ELSE_NEW_TAB, TabOpenType.CLOBBER_CURRENT_TAB, TabOpenType.BRING_TAB_TO_FRONT, TabOpenType.OPEN_NEW_INCOGNITO_TAB, TabOpenType.REUSE_TAB_MATCHING_ID_ELSE_NEW_TAB" + errorLine1=" intent, TabOpenType.REUSE_TAB_MATCHING_ID_STRING, Tab.INVALID_TAB_ID);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java" + line="1487" + column="49"/> </issue> - <issue id="WrongConstant" message="Must be one of: AppOptIn.NO_PREFERENCE, AppOptIn.OPT_IN, AppOptIn.OPT_OUT" errorLine1=" "SafeBrowsing.WebView.AppOptIn", value, AppOptIn.COUNT);" errorLine2=" ~~~~~"> - <location file="android_webview/java/src/org/chromium/android_webview/safe_browsing/AwSafeBrowsingConfigHelper.java" /> + <issue + id="WrongConstant" + message="Must be one of: TabOpenType.OPEN_NEW_TAB, TabOpenType.REUSE_URL_MATCHING_TAB_ELSE_NEW_TAB, TabOpenType.REUSE_APP_ID_MATCHING_TAB_ELSE_NEW_TAB, TabOpenType.CLOBBER_CURRENT_TAB, TabOpenType.BRING_TAB_TO_FRONT, TabOpenType.OPEN_NEW_INCOGNITO_TAB, TabOpenType.REUSE_TAB_MATCHING_ID_ELSE_NEW_TAB" + errorLine1=" intent, TabOpenType.REUSE_TAB_ORIGINAL_URL_STRING))) {" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java" + line="1496" + column="65"/> </issue> - <issue id="WrongConstant" message="Must be one of: ViewType.INVALID, ViewType.PERSONALIZED_SIGNIN_PROMO, ViewType.PERSONALIZED_SYNC_PROMO, ViewType.SYNC_PROMO, ViewType.FOLDER, ViewType.BOOKMARK, ViewType.DIVIDER, ViewType.SECTION_HEADER, ViewType.SHOPPING_POWER_BOOKMARK, ViewType.TAG_CHIP_LIST" errorLine1=" case ViewType.SHOPPING_FILTER:" errorLine2=" ~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkItemsAdapter.java" /> + <issue + id="WrongConstant" + message="Must be one of: DialogOption.CLEAR_HISTORY, DialogOption.CLEAR_COOKIES_AND_SITE_DATA, DialogOption.CLEAR_CACHE, DialogOption.CLEAR_PASSWORDS, DialogOption.CLEAR_FORM_DATA, DialogOption.CLEAR_SITE_SETTINGS" + errorLine1=" for (@DialogOption int i = DialogOption.CLEAR_HISTORY; i < DialogOption.NUM_ENTRIES; i++) {" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/browsing_data/ClearBrowsingDataFragment.java" + line="227" + column="81"/> </issue> - <issue id="WrongConstant" message="Must be one of: ViewType.INVALID, ViewType.PERSONALIZED_SIGNIN_PROMO, ViewType.PERSONALIZED_SYNC_PROMO, ViewType.SYNC_PROMO, ViewType.FOLDER, ViewType.BOOKMARK, ViewType.DIVIDER, ViewType.SECTION_HEADER, ViewType.SHOPPING_POWER_BOOKMARK, ViewType.TAG_CHIP_LIST" errorLine1=" } else if (holder.getItemViewType() == ViewType.SHOPPING_FILTER) {" errorLine2=" ~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkItemsAdapter.java" /> + <issue + id="WrongConstant" + message="Must be one of: MyActivityNavigation.TOP_LEVEL, MyActivityNavigation.SEARCH_HISTORY" + errorLine1=" MyActivityNavigation.SEARCH_HISTORY, MyActivityNavigation.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/browsing_data/ClearBrowsingDataFragmentBasic.java" + line="249" + column="83"/> </issue> - <issue id="WrongConstant" message="Must be one of: ViewType.INVALID, ViewType.PERSONALIZED_SIGNIN_PROMO, ViewType.PERSONALIZED_SYNC_PROMO, ViewType.SYNC_PROMO, ViewType.FOLDER, ViewType.BOOKMARK, ViewType.DIVIDER, ViewType.SECTION_HEADER, ViewType.SHOPPING_POWER_BOOKMARK, ViewType.TAG_CHIP_LIST" errorLine1=" ViewType.SHOPPING_FILTER, /*bookmarkItem=*/null, /*sectionHeaderData=*/null);" errorLine2=" ~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkListEntry.java" /> + <issue + id="WrongConstant" + message="Must be one of: MyActivityNavigation.TOP_LEVEL, MyActivityNavigation.SEARCH_HISTORY" + errorLine1=" MyActivityNavigation.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/browsing_data/ClearBrowsingDataFragmentBasic.java" + line="254" + column="46"/> </issue> - <issue id="WrongConstant" message="Must be one of: CustomTabsUiType.DEFAULT, CustomTabsUiType.MEDIA_VIEWER, CustomTabsUiType.INFO_PAGE, CustomTabsUiType.READER_MODE, CustomTabsUiType.MINIMAL_UI_WEBAPP, CustomTabsUiType.OFFLINE_PAGE" errorLine1=" intent.putExtra(CustomTabIntentDataProvider.EXTRA_UI_TYPE, CustomTabsUiType.READ_LATER);" errorLine2=" ~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkUtils.java" /> + <issue + id="WrongConstant" + message="Must be one of: PredictionStatus.NONE, PredictionStatus.GOOD, PredictionStatus.BAD" + errorLine1=" "CustomTabs.PredictionStatus", outcome, PredictionStatus.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/customtabs/ClientManager.java" + line="419" + column="74"/> </issue> - <issue id="WrongConstant" message="Must be one of: Behavior.UNKNOWN, Behavior.NOT_ENGAGED_BELOW_THRESHOLD, Behavior.ENGAGED_WITH_SAFE_VALUES, Behavior.ENGAGED_IGNORING_OUTDATED_SAFE_VALUES, Behavior.ENGAGED_WITHOUT_SAFE_VALUES" errorLine1=" "Variations.SafeModeCachedFlags.Engaged", behavior, Behavior.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFlagsSafeMode.java" /> + <issue + id="WrongConstant" + message="Must be one of: CalledWarmup.NO_SESSION_NO_WARMUP, CalledWarmup.NO_SESSION_WARMUP, CalledWarmup.SESSION_NO_WARMUP_ALREADY_CALLED, CalledWarmup.SESSION_NO_WARMUP_NOT_CALLED, CalledWarmup.SESSION_WARMUP" + errorLine1=" getWarmupState(session), CalledWarmup.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/customtabs/ClientManager.java" + line="430" + column="55"/> </issue> - <issue id="WrongConstant" message="Must be one of: Behavior.UNKNOWN, Behavior.NOT_ENGAGED_BELOW_THRESHOLD, Behavior.ENGAGED_WITH_SAFE_VALUES, Behavior.ENGAGED_IGNORING_OUTDATED_SAFE_VALUES, Behavior.ENGAGED_WITHOUT_SAFE_VALUES" errorLine1=" Behavior.NOT_ENGAGED_BELOW_THRESHOLD, Behavior.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFlagsSafeMode.java" /> + <issue + id="WrongConstant" + message="Must be one of: MayLaunchUrlType.NO_MAY_LAUNCH_URL, MayLaunchUrlType.LOW_CONFIDENCE, MayLaunchUrlType.HIGH_CONFIDENCE, MayLaunchUrlType.BOTH" + errorLine1=" "CustomTabs.MayLaunchUrlType", value, MayLaunchUrlType.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/customtabs/ClientManager.java" + line="438" + column="72"/> </issue> - <issue id="WrongConstant" message="Must be one of: Behavior.UNKNOWN, Behavior.NOT_ENGAGED_BELOW_THRESHOLD, Behavior.ENGAGED_WITH_SAFE_VALUES, Behavior.ENGAGED_IGNORING_OUTDATED_SAFE_VALUES, Behavior.ENGAGED_WITHOUT_SAFE_VALUES" errorLine1=" "Variations.SafeModeCachedFlags.WillCache", mBehavior.get(), Behavior.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFlagsSafeMode.java" /> + <issue + id="WrongConstant" + message="Must be one of: ViewCompat.LAYOUT_DIRECTION_LTR, ViewCompat.LAYOUT_DIRECTION_RTL" + errorLine1=" if (ViewCompat.getLayoutDirection(this) == LAYOUT_DIRECTION_LTR) {" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/ClipDrawableProgressBar.java" + line="135" + column="52"/> </issue> - <issue id="WrongConstant" message="Must be one of: Behavior.UNKNOWN, Behavior.NOT_ENGAGED_BELOW_THRESHOLD, Behavior.ENGAGED_WITH_SAFE_VALUES, Behavior.ENGAGED_IGNORING_OUTDATED_SAFE_VALUES, Behavior.ENGAGED_WITHOUT_SAFE_VALUES" errorLine1=" "Variations.SafeModeCachedFlags.Pause", mBehavior.get(), Behavior.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFlagsSafeMode.java" /> + <issue + id="WrongConstant" + message="Must be one of: AnimationStatus.SELECTED_CARD_ZOOM_IN, AnimationStatus.SELECTED_CARD_ZOOM_OUT, AnimationStatus.HOVERED_CARD_ZOOM_IN, AnimationStatus.HOVERED_CARD_ZOOM_OUT, AnimationStatus.CARD_RESTORE" + errorLine1=" assert status < AnimationStatus.NUM_ENTRIES;" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/ClosableTabGridView.java" + line="78" + column="41"/> </issue> - <issue id="WrongConstant" message="Must be one of: Behavior.UNKNOWN, Behavior.NOT_ENGAGED_BELOW_THRESHOLD, Behavior.ENGAGED_WITH_SAFE_VALUES, Behavior.ENGAGED_IGNORING_OUTDATED_SAFE_VALUES, Behavior.ENGAGED_WITHOUT_SAFE_VALUES" errorLine1=" mBehavior.get(), Behavior.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFlagsSafeMode.java" /> + <issue + id="WrongConstant" + message="Must be one of: GetFilesResultCode.SUCCESS, GetFilesResultCode.FAILED_NOT_INSTALLED, GetFilesResultCode.FAILED_NO_VERSIONS, GetFilesResultCode.FAILED_NO_FDS, GetFilesResultCode.FAILED_OPENING_FDS, GetFilesResultCode.FAILED_COMPONENT_UPDATER_SAFEMODE_ENABLED" + errorLine1=" HISTOGRAM_GET_FILES_RESULT, result, GetFilesResultCode.COUNT);" + errorLine2=" ~~~~~"> + <location + file="$SRC/android_webview/nonembedded/java/src/org/chromium/android_webview/services/ComponentsProviderService.java" + line="327" + column="72"/> </issue> - <issue id="WrongConstant" message="Must be one of: ViewCompat.IMPORTANT_FOR_ACCESSIBILITY_AUTO, ViewCompat.IMPORTANT_FOR_ACCESSIBILITY_YES, ViewCompat.IMPORTANT_FOR_ACCESSIBILITY_NO, ViewCompat.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS" errorLine1=" contentsShowing ? View.IMPORTANT_FOR_ACCESSIBILITY_AUTO" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/autofill/CardUnmaskPrompt.java" /> + <issue + id="WrongConstant" + message="Must be one of: UserStatus.NON_USER, UserStatus.TAB_STRIP_NOT_SHOWN, UserStatus.TAB_STRIP_SHOWN, UserStatus.TAB_STRIP_SHOWN_AND_DISMISSED, UserStatus.TAB_STRIP_PERMANENTLY_HIDDEN" + errorLine1=" UMA_USER_STATUS_RESULT, userStatus, UserStatus.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/tasks/ConditionalTabStripUtils.java" + line="166" + column="64"/> </issue> - <issue id="WrongConstant" message="Must be one of: ViewCompat.IMPORTANT_FOR_ACCESSIBILITY_AUTO, ViewCompat.IMPORTANT_FOR_ACCESSIBILITY_YES, ViewCompat.IMPORTANT_FOR_ACCESSIBILITY_NO, ViewCompat.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS" errorLine1=" : View.IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/autofill/CardUnmaskPrompt.java" /> + <issue + id="WrongConstant" + message="Must be one of: ProbeResult.NO_INTERNET, ProbeResult.SERVER_ERROR, ProbeResult.NOT_VALIDATED, ProbeResult.VALIDATED_WITH_NO_CONTENT, ProbeResult.VALIDATED_WITH_OK_BUT_ZERO_CONTENT_LENGTH, ProbeResult.VALIDATED_WITH_OK_BUT_NO_CONTENT_LENGTH" + errorLine1=" result, ProbeResult.RESULT_COUNT);" + errorLine2=" ~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/net/connectivitydetector/ConnectivityDetector.java" + line="337" + column="57"/> </issue> - <issue id="WrongConstant" message="Must be one of: ZygoteChildState.FAILED_TO_CREATE_BUNDLE, ZygoteChildState.FIRST_USABLE_ZYGOTE, ZygoteChildState.ZYGOTE_RESTARTED, ZygoteChildState.ZYGOTE_SEEN" errorLine1=" "ChromiumAndroidLinker.ChildProcessZygoteState", state, ZygoteChildState.COUNT);" errorLine2=" ~~~~~"> - <location file="content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncherHelperImpl.java" /> + <issue + id="WrongConstant" + message="Must be one of: ProbeResult.NO_INTERNET, ProbeResult.SERVER_ERROR, ProbeResult.NOT_VALIDATED, ProbeResult.VALIDATED_WITH_NO_CONTENT, ProbeResult.VALIDATED_WITH_OK_BUT_ZERO_CONTENT_LENGTH, ProbeResult.VALIDATED_WITH_OK_BUT_NO_CONTENT_LENGTH" + errorLine1=" result, ProbeResult.RESULT_COUNT);" + errorLine2=" ~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/net/connectivitydetector/ConnectivityDetector.java" + line="341" + column="57"/> </issue> - <issue id="WrongConstant" message="Must be one of: RestoreStatus.NO_RESTORE, RestoreStatus.RESTORE_COMPLETED, RestoreStatus.RESTORE_AFTER_FIRST_RUN, RestoreStatus.BROWSER_STARTUP_FAILED, RestoreStatus.NOT_SIGNED_IN, RestoreStatus.RESTORE_STATUS_RECORDED" errorLine1=" HISTOGRAM_ANDROID_RESTORE_RESULT, restoreStatus, RestoreStatus.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/ChromeBackupAgentImpl.java" /> + <issue + id="WrongConstant" + message="Must be one of: ConnectionState.NONE, ConnectionState.DISCONNECTED, ConnectionState.NO_INTERNET, ConnectionState.CAPTIVE_PORTAL, ConnectionState.VALIDATED" + errorLine1=" mConnectionState, ConnectionState.RESULT_COUNT);" + errorLine2=" ~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/net/connectivitydetector/ConnectivityDetector.java" + line="350" + column="67"/> </issue> - <issue id="WrongConstant" message="Must be one of: ChannelId.BROWSER, ChannelId.DOWNLOADS, ChannelId.INCOGNITO, ChannelId.MEDIA_PLAYBACK, ChannelId.SCREEN_CAPTURE, ChannelId.CONTENT_SUGGESTIONS, ChannelId.WEBAPP_ACTIONS, ChannelId.SITES, ChannelId.SHARING, ChannelId.UPDATES, ChannelId.COMPLETED_DOWNLOADS, ChannelId.PERMISSION_REQUESTS, ChannelId.PERMISSION_REQUESTS_HIGH, ChannelId.ANNOUNCEMENT, ChannelId.WEBAPPS, ChannelId.WEBAPPS_QUIET, ChannelId.PRICE_DROP, ChannelId.SECURITY_KEY, ChannelId.CHROME_TIPS, ChannelId.BLUETOOTH, ChannelId.USB" errorLine1=" map.put(ChannelId.WEBRTC_CAM_AND_MIC," errorLine2=" ~~~~~~~~~~~~~~~~~~"> - <location file="chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/channels/ChromeChannelDefinitions.java" /> + <issue + id="WrongConstant" + message="Must be one of: Type.CHROME_HTTP, Type.CHROME_HTTPS, Type.SYSTEM_HTTP, Type.SYSTEM_HTTPS" + errorLine1=" for (@Type int t = Type.CHROME_HTTP; t < Type.NUM_ENTRIES; t++) {" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/feedback/ConnectivityTask.java" + line="288" + column="55"/> </issue> - <issue id="WrongConstant" message="Must be one of: ChannelId.BROWSER, ChannelId.DOWNLOADS, ChannelId.INCOGNITO, ChannelId.MEDIA_PLAYBACK, ChannelId.SCREEN_CAPTURE, ChannelId.CONTENT_SUGGESTIONS, ChannelId.WEBAPP_ACTIONS, ChannelId.SITES, ChannelId.SHARING, ChannelId.UPDATES, ChannelId.COMPLETED_DOWNLOADS, ChannelId.PERMISSION_REQUESTS, ChannelId.PERMISSION_REQUESTS_HIGH, ChannelId.ANNOUNCEMENT, ChannelId.WEBAPPS, ChannelId.WEBAPPS_QUIET, ChannelId.PRICE_DROP, ChannelId.SECURITY_KEY, ChannelId.CHROME_TIPS, ChannelId.BLUETOOTH, ChannelId.USB" errorLine1=" PredefinedChannel.create(ChannelId.WEBRTC_CAM_AND_MIC," errorLine2=" ~~~~~~~~~~~~~~~~~~"> - <location file="chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/channels/ChromeChannelDefinitions.java" /> + <issue + id="WrongConstant" + message="Must be one of: Type.CHROME_HTTP, Type.CHROME_HTTPS, Type.SYSTEM_HTTP, Type.SYSTEM_HTTPS" + errorLine1=" return mResult.size() == Type.NUM_ENTRIES;" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/feedback/ConnectivityTask.java" + line="299" + column="39"/> </issue> - <issue id="WrongConstant" message="Must be one of: ChannelId.BROWSER, ChannelId.DOWNLOADS, ChannelId.INCOGNITO, ChannelId.MEDIA_PLAYBACK, ChannelId.SCREEN_CAPTURE, ChannelId.CONTENT_SUGGESTIONS, ChannelId.WEBAPP_ACTIONS, ChannelId.SITES, ChannelId.SHARING, ChannelId.UPDATES, ChannelId.COMPLETED_DOWNLOADS, ChannelId.PERMISSION_REQUESTS, ChannelId.PERMISSION_REQUESTS_HIGH, ChannelId.ANNOUNCEMENT, ChannelId.WEBAPPS, ChannelId.WEBAPPS_QUIET, ChannelId.PRICE_DROP, ChannelId.SECURITY_KEY, ChannelId.CHROME_TIPS, ChannelId.BLUETOOTH, ChannelId.USB" errorLine1=" map.put(ChannelId.VR," errorLine2=" ~~"> - <location file="chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/channels/ChromeChannelDefinitions.java" /> + <issue + id="WrongConstant" + message="Must be one of: Type.CHROME_HTTP, Type.CHROME_HTTPS, Type.SYSTEM_HTTP, Type.SYSTEM_HTTPS" + errorLine1=" for (@Type int type = Type.CHROME_HTTP; type < Type.NUM_ENTRIES; type++) {" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/feedback/ConnectivityTask.java" + line="313" + column="61"/> </issue> - <issue id="WrongConstant" message="Must be one of: ChannelId.BROWSER, ChannelId.DOWNLOADS, ChannelId.INCOGNITO, ChannelId.MEDIA_PLAYBACK, ChannelId.SCREEN_CAPTURE, ChannelId.CONTENT_SUGGESTIONS, ChannelId.WEBAPP_ACTIONS, ChannelId.SITES, ChannelId.SHARING, ChannelId.UPDATES, ChannelId.COMPLETED_DOWNLOADS, ChannelId.PERMISSION_REQUESTS, ChannelId.PERMISSION_REQUESTS_HIGH, ChannelId.ANNOUNCEMENT, ChannelId.WEBAPPS, ChannelId.WEBAPPS_QUIET, ChannelId.PRICE_DROP, ChannelId.SECURITY_KEY, ChannelId.CHROME_TIPS, ChannelId.BLUETOOTH, ChannelId.USB" errorLine1=" PredefinedChannel.create(ChannelId.VR, R.string.notification_category_vr," errorLine2=" ~~"> - <location file="chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/channels/ChromeChannelDefinitions.java" /> + <issue + id="WrongConstant" + message="Must be one of: ChipEvent.SHOWN, ChipEvent.CLICKED, ChipEvent.DISMISSED" + errorLine1=" "ContextMenu.LensChip.Event", chipEvent, ChipEvent.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuChipController.java" + line="51" + column="68"/> </issue> - <issue id="WrongConstant" message="Must be one of: Item.OPEN_IN_NEW_CHROME_TAB, Item.OPEN_IN_CHROME_INCOGNITO_TAB, Item.OPEN_IN_BROWSER_ID, Item.OPEN_IN_NEW_TAB, Item.OPEN_IN_INCOGNITO_TAB, Item.OPEN_IN_OTHER_WINDOW, Item.OPEN_IN_NEW_WINDOW, Item.OPEN_IN_EPHEMERAL_TAB, Item.COPY_LINK_ADDRESS, Item.COPY_LINK_TEXT, Item.SAVE_LINK_AS, Item.SHARE_LINK, Item.DIRECT_SHARE_LINK, Item.READ_LATER, Item.LOAD_ORIGINAL_IMAGE, Item.SAVE_IMAGE, Item.OPEN_IMAGE, Item.OPEN_IMAGE_IN_NEW_TAB, Item.OPEN_IMAGE_IN_EPHEMERAL_TAB, Item.COPY_IMAGE, Item.SEARCH_BY_IMAGE, Item.SEARCH_WITH_GOOGLE_LENS, Item.SHOP_IMAGE_WITH_GOOGLE_LENS, Item.SHARE_IMAGE, Item.DIRECT_SHARE_IMAGE, Item.CALL, Item.SEND_MESSAGE, Item.ADD_TO_CONTACTS, Item.COPY, Item.SAVE_VIDEO, Item.OPEN_IN_CHROME, Item.OPEN_IN_NEW_TAB_IN_GROUP, Item.SHARE_HIGHLIGHT, Item.REMOVE_HIGHLIGHT, Item.LEARN_MORE" errorLine1=" assert MENU_IDS.length == Item.NUM_ENTRIES;" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuItem.java" /> + <issue + id="WrongConstant" + message="Must be one of: ContextMenuItemId.SEARCH, ContextMenuItemId.OPEN_IN_NEW_TAB, ContextMenuItemId.OPEN_IN_NEW_TAB_IN_GROUP, ContextMenuItemId.OPEN_IN_INCOGNITO_TAB, ContextMenuItemId.OPEN_IN_NEW_WINDOW, ContextMenuItemId.SAVE_FOR_OFFLINE, ContextMenuItemId.ADD_TO_MY_APPS, ContextMenuItemId.REMOVE" + errorLine1=" for (@ContextMenuItemId int itemId = 0; itemId < ContextMenuItemId.NUM_ENTRIES; itemId++) {" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/native_page/ContextMenuManager.java" + line="158" + column="76"/> </issue> - <issue id="WrongConstant" message="Must be one of: Item.OPEN_IN_NEW_CHROME_TAB, Item.OPEN_IN_CHROME_INCOGNITO_TAB, Item.OPEN_IN_BROWSER_ID, Item.OPEN_IN_NEW_TAB, Item.OPEN_IN_INCOGNITO_TAB, Item.OPEN_IN_OTHER_WINDOW, Item.OPEN_IN_NEW_WINDOW, Item.OPEN_IN_EPHEMERAL_TAB, Item.COPY_LINK_ADDRESS, Item.COPY_LINK_TEXT, Item.SAVE_LINK_AS, Item.SHARE_LINK, Item.DIRECT_SHARE_LINK, Item.READ_LATER, Item.LOAD_ORIGINAL_IMAGE, Item.SAVE_IMAGE, Item.OPEN_IMAGE, Item.OPEN_IMAGE_IN_NEW_TAB, Item.OPEN_IMAGE_IN_EPHEMERAL_TAB, Item.COPY_IMAGE, Item.SEARCH_BY_IMAGE, Item.SEARCH_WITH_GOOGLE_LENS, Item.SHOP_IMAGE_WITH_GOOGLE_LENS, Item.SHARE_IMAGE, Item.DIRECT_SHARE_IMAGE, Item.CALL, Item.SEND_MESSAGE, Item.ADD_TO_CONTACTS, Item.COPY, Item.SAVE_VIDEO, Item.OPEN_IN_CHROME, Item.OPEN_IN_NEW_TAB_IN_GROUP, Item.SHARE_HIGHLIGHT, Item.REMOVE_HIGHLIGHT, Item.LEARN_MORE" errorLine1=" assert STRING_IDS.length == Item.NUM_ENTRIES;" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuItem.java" /> + <issue + id="WrongConstant" + message="Must be one of: ContextualSearchSwitch.IS_TRANSLATION_DISABLED, ContextualSearchSwitch.IS_ONLINE_DETECTION_DISABLED, ContextualSearchSwitch.IS_SEARCH_TERM_RESOLUTION_DISABLED, ContextualSearchSwitch.IS_MANDATORY_PROMO_ENABLED, ContextualSearchSwitch.IS_ENGLISH_TARGET_TRANSLATION_ENABLED, ContextualSearchSwitch.IS_BAR_OVERLAP_COLLECTION_ENABLED, ContextualSearchSwitch.IS_BAR_OVERLAP_SUPPRESSION_ENABLED, ContextualSearchSwitch.IS_WORD_EDGE_SUPPRESSION_ENABLED, ContextualSearchSwitch.IS_SHORT_WORD_SUPPRESSION_ENABLED, ContextualSearchSwitch.IS_NOT_LONG_WORD_SUPPRESSION_ENABLED, ContextualSearchSwitch.IS_NOT_AN_ENTITY_SUPPRESSION_ENABLED, ContextualSearchSwitch.IS_ENGAGEMENT_SUPPRESSION_ENABLED, ContextualSearchSwitch.IS_SHORT_TEXT_RUN_SUPPRESSION_ENABLED, ContextualSearchSwitch.IS_SMALL_TEXT_SUPPRESSION_ENABLED, ContextualSearchSwitch.IS_AMP_AS_SEPARATE_TAB_DISABLED, ContextualSearchSwitch.IS_SEND_HOME_COUNTRY_DISABLED, ContextualSearchSwitch.IS_PAGE_CONTENT_NOTIFICATION_DISABLED, ContextualSearchSwitch.IS_UKM_RANKER_LOGGING_DISABLED, ContextualSearchSwitch.IS_CONTEXTUAL_SEARCH_ML_TAP_SUPPRESSION_ENABLED, ContextualSearchSwitch.IS_CONTEXTUAL_SEARCH_TAP_DISABLE_OVERRIDE_ENABLED, ContextualSearchSwitch.IS_SEND_BASE_PAGE_URL_DISABLED" + errorLine1=" private static Boolean[] sSwitches = new Boolean[ContextualSearchSwitch.NUM_ENTRIES];" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchFieldTrial.java" + line="46" + column="77"/> </issue> - <issue id="WrongConstant" message="Must be one of: Action.OPEN_IN_NEW_TAB, Action.OPEN_IN_INCOGNITO_TAB, Action.COPY_LINK_ADDRESS, Action.COPY_EMAIL_ADDRESS, Action.COPY_LINK_TEXT, Action.SAVE_LINK, Action.SAVE_IMAGE, Action.OPEN_IMAGE, Action.OPEN_IMAGE_IN_NEW_TAB, Action.SEARCH_BY_IMAGE, Action.LOAD_ORIGINAL_IMAGE, Action.SAVE_VIDEO, Action.SHARE_IMAGE, Action.OPEN_IN_OTHER_WINDOW, Action.OPEN_IN_NEW_WINDOW, Action.SEND_EMAIL, Action.ADD_TO_CONTACTS, Action.CALL, Action.SEND_TEXT_MESSAGE, Action.COPY_PHONE_NUMBER, Action.OPEN_IN_NEW_CHROME_TAB, Action.OPEN_IN_CHROME_INCOGNITO_TAB, Action.OPEN_IN_BROWSER, Action.OPEN_IN_CHROME, Action.SHARE_LINK, Action.OPEN_IN_EPHEMERAL_TAB, Action.OPEN_IMAGE_IN_EPHEMERAL_TAB, Action.DIRECT_SHARE_LINK, Action.DIRECT_SHARE_IMAGE, Action.SEARCH_WITH_GOOGLE_LENS, Action.COPY_IMAGE, Action.SHOP_IMAGE_WITH_GOOGLE_LENS, Action.READ_LATER, Action.SHOP_WITH_GOOGLE_LENS_CHIP, Action.TRANSLATE_WITH_GOOGLE_LENS_CHIP, Action.SHARE_HIGHLIGHT, Action.REMOVE_HIGHLIGHT, Action.LEARN_MORE, Action.OPEN_IN_NEW_TAB_IN_GROUP" errorLine1=" RecordHistogram.recordEnumeratedHistogram(histogramName, action, Action.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java" /> + <issue + id="WrongConstant" + message="Must be one of: ContextualSearchSwitch.IS_TRANSLATION_DISABLED, ContextualSearchSwitch.IS_ONLINE_DETECTION_DISABLED, ContextualSearchSwitch.IS_SEARCH_TERM_RESOLUTION_DISABLED, ContextualSearchSwitch.IS_MANDATORY_PROMO_ENABLED, ContextualSearchSwitch.IS_ENGLISH_TARGET_TRANSLATION_ENABLED, ContextualSearchSwitch.IS_BAR_OVERLAP_COLLECTION_ENABLED, ContextualSearchSwitch.IS_BAR_OVERLAP_SUPPRESSION_ENABLED, ContextualSearchSwitch.IS_WORD_EDGE_SUPPRESSION_ENABLED, ContextualSearchSwitch.IS_SHORT_WORD_SUPPRESSION_ENABLED, ContextualSearchSwitch.IS_NOT_LONG_WORD_SUPPRESSION_ENABLED, ContextualSearchSwitch.IS_NOT_AN_ENTITY_SUPPRESSION_ENABLED, ContextualSearchSwitch.IS_ENGAGEMENT_SUPPRESSION_ENABLED, ContextualSearchSwitch.IS_SHORT_TEXT_RUN_SUPPRESSION_ENABLED, ContextualSearchSwitch.IS_SMALL_TEXT_SUPPRESSION_ENABLED, ContextualSearchSwitch.IS_AMP_AS_SEPARATE_TAB_DISABLED, ContextualSearchSwitch.IS_SEND_HOME_COUNTRY_DISABLED, ContextualSearchSwitch.IS_PAGE_CONTENT_NOTIFICATION_DISABLED, ContextualSearchSwitch.IS_UKM_RANKER_LOGGING_DISABLED, ContextualSearchSwitch.IS_CONTEXTUAL_SEARCH_ML_TAP_SUPPRESSION_ENABLED, ContextualSearchSwitch.IS_CONTEXTUAL_SEARCH_TAP_DISABLE_OVERRIDE_ENABLED, ContextualSearchSwitch.IS_SEND_BASE_PAGE_URL_DISABLED" + errorLine1=" assert ContextualSearchSwitchNames.length == ContextualSearchSwitch.NUM_ENTRIES;" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchFieldTrial.java" + line="220" + column="77"/> </issue> - <issue id="WrongConstant" message="Must be one of: Action.OPEN_IN_NEW_TAB, Action.OPEN_IN_INCOGNITO_TAB, Action.COPY_LINK_ADDRESS, Action.COPY_EMAIL_ADDRESS, Action.COPY_LINK_TEXT, Action.SAVE_LINK, Action.SAVE_IMAGE, Action.OPEN_IMAGE, Action.OPEN_IMAGE_IN_NEW_TAB, Action.SEARCH_BY_IMAGE, Action.LOAD_ORIGINAL_IMAGE, Action.SAVE_VIDEO, Action.SHARE_IMAGE, Action.OPEN_IN_OTHER_WINDOW, Action.OPEN_IN_NEW_WINDOW, Action.SEND_EMAIL, Action.ADD_TO_CONTACTS, Action.CALL, Action.SEND_TEXT_MESSAGE, Action.COPY_PHONE_NUMBER, Action.OPEN_IN_NEW_CHROME_TAB, Action.OPEN_IN_CHROME_INCOGNITO_TAB, Action.OPEN_IN_BROWSER, Action.OPEN_IN_CHROME, Action.SHARE_LINK, Action.OPEN_IN_EPHEMERAL_TAB, Action.OPEN_IMAGE_IN_EPHEMERAL_TAB, Action.DIRECT_SHARE_LINK, Action.DIRECT_SHARE_IMAGE, Action.SEARCH_WITH_GOOGLE_LENS, Action.COPY_IMAGE, Action.SHOP_IMAGE_WITH_GOOGLE_LENS, Action.READ_LATER, Action.SHOP_WITH_GOOGLE_LENS_CHIP, Action.TRANSLATE_WITH_GOOGLE_LENS_CHIP, Action.SHARE_HIGHLIGHT, Action.REMOVE_HIGHLIGHT, Action.LEARN_MORE, Action.OPEN_IN_NEW_TAB_IN_GROUP" errorLine1=" histogramName + ".PerformanceClassFast", action, Action.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java" /> + <issue + id="WrongConstant" + message="Must be one of: ContextualSearchPreference.UNINITIALIZED, ContextualSearchPreference.ENABLED, ContextualSearchPreference.DISABLED" + errorLine1=" getPreferenceValue(), ContextualSearchPreference.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchUma.java" + line="148" + column="66"/> </issue> - <issue id="WrongConstant" message="Must be one of: SelectedNewTabCreationEnum.OPEN_IN_NEW_TAB_FIRST_SELECTED_OPEN_IN_NEW_TAB, SelectedNewTabCreationEnum.OPEN_IN_NEW_TAB_FIRST_SELECTED_OPEN_IN_NEW_TAB_IN_GROUP, SelectedNewTabCreationEnum.OPEN_IN_NEW_TAB_IN_GROUP_FIRST_SELECTED_OPEN_IN_NEW_TAB, SelectedNewTabCreationEnum.OPEN_IN_NEW_TAB_IN_GROUP_FIRST_SELECTED_OPEN_IN_NEW_TAB_IN_GROUP" errorLine1=" selectedNewTabCreationEnum, SelectedNewTabCreationEnum.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java" /> + <issue + id="WrongConstant" + message="Must be one of: ContextualSearchPreference.UNINITIALIZED, ContextualSearchPreference.ENABLED, ContextualSearchPreference.DISABLED" + errorLine1=" ContextualSearchPreference.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchUma.java" + line="168" + column="44"/> </issue> - <issue id="WrongConstant" message="Must be one of: TypeSaveImage.LOADED, TypeSaveImage.NOT_DOWNLOADABLE, TypeSaveImage.DISABLED_AND_IS_NOT_IMAGE_PARAM, TypeSaveImage.DISABLED_AND_IS_IMAGE_PARAM, TypeSaveImage.SHOWN" errorLine1=" "MobileDownload.ContextMenu.SaveImage", type, TypeSaveImage.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ChromeContextMenuPopulator.java" /> + <issue + id="WrongConstant" + message="Must be one of: Results.SEEN, Results.NOT_SEEN" + errorLine1=" wasPanelSeen ? Results.SEEN : Results.NOT_SEEN, Results.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchUma.java" + line="232" + column="73"/> </issue> - <issue id="WrongConstant" message="Must be one of: UiAvailableTypes.TOP_AVAILABLE, UiAvailableTypes.ONLY_DEFAULT_AVAILABLE, UiAvailableTypes.NONE_AVAILABLE, UiAvailableTypes.OVERRIDDEN" errorLine1=" availableStatus, UiAvailableTypes.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/ChromeLocalizationUtils.java" /> + <issue + id="WrongConstant" + message="Must be one of: QuickActionResolve.FAILED, QuickActionResolve.SINGLE, QuickActionResolve.MULTIPLE" + errorLine1=" code, QuickActionResolve.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchUma.java" + line="488" + column="42"/> </issue> - <issue id="WrongConstant" message="Must be one of: UiCorrectTypes.CORRECT, UiCorrectTypes.INCORRECT, UiCorrectTypes.NOT_AVAILABLE, UiCorrectTypes.ONLY_JAVA_CORRECT" errorLine1=" "LanguageUsage.UI.Android.Correctness", correctStatus, UiCorrectTypes.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/ChromeLocalizationUtils.java" /> + <issue + id="WrongConstant" + message="Must be one of: Results.SEEN, Results.NOT_SEEN" + errorLine1=" wasSeen ? Results.SEEN : Results.NOT_SEEN, Results.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchUma.java" + line="513" + column="68"/> </issue> - <issue id="WrongConstant" message="Must be one of: UiCorrectTypes.CORRECT, UiCorrectTypes.INCORRECT, UiCorrectTypes.NOT_AVAILABLE, UiCorrectTypes.ONLY_JAVA_CORRECT" errorLine1=" UiCorrectTypes.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/ChromeLocalizationUtils.java" /> + <issue + id="WrongConstant" + message="Must be one of: CardTag.CT_NONE, CardTag.CT_OTHER, CardTag.CT_HAS_ENTITY, CardTag.CT_BUSINESS, CardTag.CT_PRODUCT, CardTag.CT_CONTACT, CardTag.CT_EMAIL, CardTag.CT_LOCATION, CardTag.CT_URL, CardTag.CT_DEFINITION, CardTag.CT_TRANSLATE, CardTag.CT_CONTEXTUAL_DEFINITION" + errorLine1=" "Search.ContextualSearch.CardTagSeen", cardTagEnum, CardTag.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchUma.java" + line="538" + column="81"/> </issue> - <issue id="WrongConstant" message="Must be one of: UiCorrectTypes.CORRECT, UiCorrectTypes.INCORRECT, UiCorrectTypes.NOT_AVAILABLE, UiCorrectTypes.ONLY_JAVA_CORRECT" errorLine1=" UiCorrectTypes.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/ChromeLocalizationUtils.java" /> + <issue + id="WrongConstant" + message="Must be one of: CardTag.CT_NONE, CardTag.CT_OTHER, CardTag.CT_HAS_ENTITY, CardTag.CT_BUSINESS, CardTag.CT_PRODUCT, CardTag.CT_CONTACT, CardTag.CT_EMAIL, CardTag.CT_LOCATION, CardTag.CT_URL, CardTag.CT_DEFINITION, CardTag.CT_TRANSLATE, CardTag.CT_CONTEXTUAL_DEFINITION" + errorLine1=" "Search.ContextualSearch.CardTag", cardTagEnum, CardTag.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchUma.java" + line="541" + column="73"/> </issue> - <issue id="WrongConstant" message="Must be one of: LocaleUpdateStatus.NO_CHANGE, LocaleUpdateStatus.OVERRIDDEN_TOP_CHANGED, LocaleUpdateStatus.OVERRIDDEN_OTHERS_CHANGED, LocaleUpdateStatus.NO_OVERRIDE_TOP_CHANGED, LocaleUpdateStatus.NO_OVERRIDE_OTHERS_CHANGED, LocaleUpdateStatus.FIRST_RUN" errorLine1=" "LanguageUsage.UI.Android.IsLocaleUpdated", status, LocaleUpdateStatus.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/ChromeLocalizationUtils.java" /> + <issue + id="WrongConstant" + message="Must be one of: ResultsByGesture.SEEN_FROM_TAP, ResultsByGesture.NOT_SEEN_FROM_TAP, ResultsByGesture.SEEN_FROM_LONG_PRESS, ResultsByGesture.NOT_SEEN_FROM_LONG_PRESS" + errorLine1=" getPanelSeenByGestureStateCode(wasPanelSeen, wasTap), ResultsByGesture.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchUma.java" + line="607" + column="88"/> </issue> - <issue id="WrongConstant" message="Must be one of: FilteringResult.SURVEY_INFOBAR_ALREADY_DISPLAYED, FilteringResult.FORCE_SURVEY_ON_COMMAND_PRESENT, FilteringResult.USER_ALREADY_SAMPLED_TODAY, FilteringResult.MAX_NUMBER_MISSING, FilteringResult.ROLLED_NON_ZERO_NUMBER, FilteringResult.USER_SELECTED_FOR_SURVEY, FilteringResult.FIRST_TIME_USER" errorLine1=" "Android.Survey.SurveyFilteringResults", value, FilteringResult.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/survey/ChromeSurveyController.java" /> + <issue + id="WrongConstant" + message="Must be one of: CrashKeyIndex.LOADED_DYNAMIC_MODULE, CrashKeyIndex.ACTIVE_DYNAMIC_MODULE, CrashKeyIndex.APPLICATION_STATUS, CrashKeyIndex.INSTALLED_MODULES, CrashKeyIndex.EMULATED_MODULES, CrashKeyIndex.DYNAMIC_MODULE_DEX_NAME, CrashKeyIndex.PARTNER_CUSTOMIZATION_CONFIG" + errorLine1=" assert CrashKeyIndex.NUM_ENTRIES == KEYS.length;" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/components/crash/android/java/src/org/chromium/components/crash/CrashKeys.java" + line="38" + column="30"/> </issue> - <issue id="WrongConstant" message="Must be one of: InfoBarClosingState.ACCEPTED_SURVEY, InfoBarClosingState.CLOSE_BUTTON, InfoBarClosingState.VISIBLE_INDIRECT, InfoBarClosingState.HIDDEN_INDIRECT, InfoBarClosingState.UNKNOWN" errorLine1=" "Android.Survey.InfoBarClosingState", value, InfoBarClosingState.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/survey/ChromeSurveyController.java" /> + <issue + id="WrongConstant" + message="Must be one of: CollectionState.ENABLED_BY_COMMANDLINE, CollectionState.ENABLED_BY_FLAG_UI, CollectionState.ENABLED_BY_USER_CONSENT, CollectionState.DISABLED_BY_USER_CONSENT, CollectionState.DISABLED_BY_USER_CONSENT_CANNOT_FIND_SETTINGS, CollectionState.DISABLED_CANNOT_USE_GMS" + errorLine1=" "Android.WebView.DevUi.CrashList.CollectionState", state, CollectionState.COUNT);" + errorLine2=" ~~~~~"> + <location + file="$SRC/android_webview/nonembedded/java/src/org/chromium/android_webview/devui/CrashesListFragment.java" + line="106" + column="91"/> </issue> - <issue id="WrongConstant" message="Must be one of: PageTransition.FIRST, PageTransition.LINK, PageTransition.TYPED, PageTransition.AUTO_BOOKMARK, PageTransition.AUTO_SUBFRAME, PageTransition.MANUAL_SUBFRAME, PageTransition.GENERATED, PageTransition.AUTO_TOPLEVEL, PageTransition.FORM_SUBMIT, PageTransition.RELOAD, PageTransition.KEYWORD, PageTransition.KEYWORD_GENERATED, PageTransition.LAST_CORE, PageTransition.CORE_MASK, PageTransition.BLOCKED, PageTransition.FORWARD_BACK, PageTransition.FROM_ADDRESS_BAR, PageTransition.HOME_PAGE, PageTransition.FROM_API, PageTransition.CHAIN_START, PageTransition.CHAIN_END, PageTransition.CLIENT_REDIRECT, PageTransition.SERVER_REDIRECT, PageTransition.IS_REDIRECT_MASK, PageTransition.QUALIFIER_MASK" errorLine1=" getTransitionType(type, intent, loadUrlParams.getTransitionType()));" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/tabmodel/ChromeTabCreator.java" /> + <issue + id="WrongConstant" + message="Must be one of: CrashInteraction.FORCE_UPLOAD_BUTTON, CrashInteraction.FORCE_UPLOAD_NO_DIALOG, CrashInteraction.FORCE_UPLOAD_DIALOG_METERED_NETWORK, CrashInteraction.FORCE_UPLOAD_DIALOG_CANCEL, CrashInteraction.FILE_BUG_REPORT_BUTTON, CrashInteraction.FILE_BUG_REPORT_DIALOG_PROCEED, CrashInteraction.FILE_BUG_REPORT_DIALOG_DISMISS, CrashInteraction.HIDE_CRASH_BUTTON" + errorLine1=" "Android.WebView.DevUi.CrashList.CrashInteraction", action, CrashInteraction.COUNT);" + errorLine2=" ~~~~~"> + <location + file="$SRC/android_webview/nonembedded/java/src/org/chromium/android_webview/devui/CrashesListFragment.java" + line="130" + column="94"/> </issue> - <issue id="WrongConstant" message="Must be one of: ExternalAppId.OTHER, ExternalAppId.GMAIL, ExternalAppId.FACEBOOK, ExternalAppId.PLUS, ExternalAppId.TWITTER, ExternalAppId.CHROME, ExternalAppId.HANGOUTS, ExternalAppId.MESSENGER, ExternalAppId.NEWS, ExternalAppId.LINE, ExternalAppId.WHATSAPP, ExternalAppId.GSA, ExternalAppId.WEBAPK, ExternalAppId.YAHOO_MAIL, ExternalAppId.VIBER, ExternalAppId.YOUTUBE" errorLine1=" IntentHandler.ExternalAppId.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java" /> + <issue + id="WrongConstant" + message="Must be one of: ConnectionStatus.DISCONNECTED, ConnectionStatus.DISCONNECTED_KEEP_ALIVE, ConnectionStatus.CONNECTED, ConnectionStatus.CONNECTED_KEEP_ALIVE" + errorLine1=" status, ConnectionStatus.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivityClientConnectionKeeper.java" + line="101" + column="46"/> </issue> - <issue id="WrongConstant" message="Must be one of: TabOpenType.OPEN_NEW_TAB, TabOpenType.REUSE_URL_MATCHING_TAB_ELSE_NEW_TAB, TabOpenType.REUSE_APP_ID_MATCHING_TAB_ELSE_NEW_TAB, TabOpenType.CLOBBER_CURRENT_TAB, TabOpenType.BRING_TAB_TO_FRONT, TabOpenType.OPEN_NEW_INCOGNITO_TAB, TabOpenType.REUSE_TAB_MATCHING_ID_ELSE_NEW_TAB" errorLine1=" intent, TabOpenType.REUSE_TAB_MATCHING_ID_STRING, Tab.INVALID_TAB_ID);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java" /> + <issue + id="WrongConstant" + message="Must be one of: ConnectionStatus.DISCONNECTED, ConnectionStatus.DISCONNECTED_KEEP_ALIVE, ConnectionStatus.CONNECTED, ConnectionStatus.CONNECTED_KEEP_ALIVE" + errorLine1=" status, ConnectionStatus.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivityClientConnectionKeeper.java" + line="104" + column="46"/> </issue> - <issue id="WrongConstant" message="Must be one of: TabOpenType.OPEN_NEW_TAB, TabOpenType.REUSE_URL_MATCHING_TAB_ELSE_NEW_TAB, TabOpenType.REUSE_APP_ID_MATCHING_TAB_ELSE_NEW_TAB, TabOpenType.CLOBBER_CURRENT_TAB, TabOpenType.BRING_TAB_TO_FRONT, TabOpenType.OPEN_NEW_INCOGNITO_TAB, TabOpenType.REUSE_TAB_MATCHING_ID_ELSE_NEW_TAB" errorLine1=" intent, TabOpenType.REUSE_TAB_ORIGINAL_URL_STRING))) {" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java" /> + <issue + id="WrongConstant" + message="Must be one of: IncognitoCCTCallerId.OTHER_APPS, IncognitoCCTCallerId.GOOGLE_APPS, IncognitoCCTCallerId.OTHER_CHROME_FEATURES, IncognitoCCTCallerId.READER_MODE, IncognitoCCTCallerId.READ_LATER" + errorLine1=" incognitoCCTCallerId, IntentHandler.IncognitoCCTCallerId.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivityLifecycleUmaTracker.java" + line="48" + column="74"/> </issue> - <issue id="WrongConstant" message="Must be one of: DialogOption.CLEAR_HISTORY, DialogOption.CLEAR_COOKIES_AND_SITE_DATA, DialogOption.CLEAR_CACHE, DialogOption.CLEAR_PASSWORDS, DialogOption.CLEAR_FORM_DATA, DialogOption.CLEAR_SITE_SETTINGS" errorLine1=" for (@DialogOption int i = DialogOption.CLEAR_HISTORY; i < DialogOption.NUM_ENTRIES; i++) {" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/browsing_data/ClearBrowsingDataFragment.java" /> + <issue + id="WrongConstant" + message="Must be one of: ExternalAppId.OTHER, ExternalAppId.GMAIL, ExternalAppId.FACEBOOK, ExternalAppId.PLUS, ExternalAppId.TWITTER, ExternalAppId.CHROME, ExternalAppId.HANGOUTS, ExternalAppId.MESSENGER, ExternalAppId.NEWS, ExternalAppId.LINE, ExternalAppId.WHATSAPP, ExternalAppId.GSA, ExternalAppId.WEBAPK, ExternalAppId.YAHOO_MAIL, ExternalAppId.VIBER, ExternalAppId.YOUTUBE" + errorLine1=" externalId, IntentHandler.ExternalAppId.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivityLifecycleUmaTracker.java" + line="57" + column="65"/> </issue> - <issue id="WrongConstant" message="Must be one of: MyActivityNavigation.TOP_LEVEL, MyActivityNavigation.SEARCH_HISTORY" errorLine1=" MyActivityNavigation.SEARCH_HISTORY, MyActivityNavigation.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/browsing_data/ClearBrowsingDataFragmentBasic.java" /> + <issue + id="WrongConstant" + message="Must be one of: ExternalAppId.OTHER, ExternalAppId.GMAIL, ExternalAppId.FACEBOOK, ExternalAppId.PLUS, ExternalAppId.TWITTER, ExternalAppId.CHROME, ExternalAppId.HANGOUTS, ExternalAppId.MESSENGER, ExternalAppId.NEWS, ExternalAppId.LINE, ExternalAppId.WHATSAPP, ExternalAppId.GSA, ExternalAppId.WEBAPK, ExternalAppId.YAHOO_MAIL, ExternalAppId.VIBER, ExternalAppId.YOUTUBE" + errorLine1=" externalId, IntentHandler.ExternalAppId.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivityLifecycleUmaTracker.java" + line="64" + column="65"/> </issue> - <issue id="WrongConstant" message="Must be one of: MyActivityNavigation.TOP_LEVEL, MyActivityNavigation.SEARCH_HISTORY" errorLine1=" MyActivityNavigation.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/browsing_data/ClearBrowsingDataFragmentBasic.java" /> + <issue + id="WrongConstant" + message="Must be one of: ExternalAppId.OTHER, ExternalAppId.GMAIL, ExternalAppId.FACEBOOK, ExternalAppId.PLUS, ExternalAppId.TWITTER, ExternalAppId.CHROME, ExternalAppId.HANGOUTS, ExternalAppId.MESSENGER, ExternalAppId.NEWS, ExternalAppId.LINE, ExternalAppId.WHATSAPP, ExternalAppId.GSA, ExternalAppId.WEBAPK, ExternalAppId.YAHOO_MAIL, ExternalAppId.VIBER, ExternalAppId.YOUTUBE" + errorLine1=" "CustomTabs.ClientAppId", externalId, IntentHandler.ExternalAppId.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivityLifecycleUmaTracker.java" + line="85" + column="87"/> </issue> - <issue id="WrongConstant" message="Must be one of: PredictionStatus.NONE, PredictionStatus.GOOD, PredictionStatus.BAD" errorLine1=" "CustomTabs.PredictionStatus", outcome, PredictionStatus.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/customtabs/ClientManager.java" /> + <issue + id="WrongConstant" + message="Must be one of: WebContentsState.NO_WEBCONTENTS, WebContentsState.PRERENDERED_WEBCONTENTS, WebContentsState.SPARE_WEBCONTENTS, WebContentsState.TRANSFERRED_WEBCONTENTS" + errorLine1=" WebContentsState.PRERENDERED_WEBCONTENTS, WebContentsState.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/customtabs/content/CustomTabActivityTabController.java" + line="337" + column="76"/> </issue> - <issue id="WrongConstant" message="Must be one of: CalledWarmup.NO_SESSION_NO_WARMUP, CalledWarmup.NO_SESSION_WARMUP, CalledWarmup.SESSION_NO_WARMUP_ALREADY_CALLED, CalledWarmup.SESSION_NO_WARMUP_NOT_CALLED, CalledWarmup.SESSION_WARMUP" errorLine1=" getWarmupState(session), CalledWarmup.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/customtabs/ClientManager.java" /> + <issue + id="WrongConstant" + message="Must be one of: WebContentsState.NO_WEBCONTENTS, WebContentsState.PRERENDERED_WEBCONTENTS, WebContentsState.SPARE_WEBCONTENTS, WebContentsState.TRANSFERRED_WEBCONTENTS" + errorLine1=" webContentsStateOnLaunch, WebContentsState.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/customtabs/content/CustomTabActivityTabController.java" + line="363" + column="60"/> </issue> - <issue id="WrongConstant" message="Must be one of: MayLaunchUrlType.NO_MAY_LAUNCH_URL, MayLaunchUrlType.LOW_CONFIDENCE, MayLaunchUrlType.HIGH_CONFIDENCE, MayLaunchUrlType.BOTH" errorLine1=" "CustomTabs.MayLaunchUrlType", value, MayLaunchUrlType.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/customtabs/ClientManager.java" /> + <issue + id="WrongConstant" + message="Must be one of: ParallelRequestStatus.NO_REQUEST, ParallelRequestStatus.SUCCESS, ParallelRequestStatus.FAILURE_NOT_INITIALIZED, ParallelRequestStatus.FAILURE_NOT_AUTHORIZED, ParallelRequestStatus.FAILURE_INVALID_URL, ParallelRequestStatus.FAILURE_INVALID_REFERRER, ParallelRequestStatus.FAILURE_INVALID_REFERRER_FOR_SESSION" + errorLine1=" ParallelRequestStatus.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java" + line="899" + column="39"/> </issue> - <issue id="WrongConstant" message="Must be one of: ViewCompat.LAYOUT_DIRECTION_LTR, ViewCompat.LAYOUT_DIRECTION_RTL" errorLine1=" if (ViewCompat.getLayoutDirection(this) == LAYOUT_DIRECTION_LTR) {" errorLine2=" ~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/ClipDrawableProgressBar.java" /> + <issue + id="WrongConstant" + message="Must be one of: CloseCause.USER_ACTION_CHROME, CloseCause.USER_ACTION_ANDROID, CloseCause.AUTOCLOSE" + errorLine1=" "CustomTabs.CloseCause", mCloseCause, CloseCause.COUNT);" + errorLine2=" ~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsOpenTimeRecorder.java" + line="77" + column="66"/> </issue> - <issue id="WrongConstant" message="Must be one of: AnimationStatus.SELECTED_CARD_ZOOM_IN, AnimationStatus.SELECTED_CARD_ZOOM_OUT, AnimationStatus.HOVERED_CARD_ZOOM_IN, AnimationStatus.HOVERED_CARD_ZOOM_OUT, AnimationStatus.CARD_RESTORE" errorLine1=" assert status < AnimationStatus.NUM_ENTRIES;" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/ClosableTabGridView.java" /> + <issue + id="WrongConstant" + message="Must be one of: DangerousDownloadDialogEvent.DANGEROUS_DOWNLOAD_DIALOG_SHOW, DangerousDownloadDialogEvent.DANGEROUS_DOWNLOAD_DIALOG_CONFIRM, DangerousDownloadDialogEvent.DANGEROUS_DOWNLOAD_DIALOG_CANCEL, DangerousDownloadDialogEvent.DANGEROUS_DOWNLOAD_DIALOG_DISMISS" + errorLine1=" "Download.DangerousDialog.Events", event, DangerousDownloadDialogEvent.COUNT);" + errorLine2=" ~~~~~"> + <location + file="$SRC/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DangerousDownloadDialog.java" + line="131" + column="88"/> </issue> - <issue id="WrongConstant" message="Must be one of: GetFilesResultCode.SUCCESS, GetFilesResultCode.FAILED_NOT_INSTALLED, GetFilesResultCode.FAILED_NO_VERSIONS, GetFilesResultCode.FAILED_NO_FDS, GetFilesResultCode.FAILED_OPENING_FDS, GetFilesResultCode.FAILED_COMPONENT_UPDATER_SAFEMODE_ENABLED" errorLine1=" HISTOGRAM_GET_FILES_RESULT, result, GetFilesResultCode.COUNT);" errorLine2=" ~~~~~"> - <location file="android_webview/nonembedded/java/src/org/chromium/android_webview/services/ComponentsProviderService.java" /> + <issue + id="WrongConstant" + message="Must be one of: MobileDefaultBrowserState.NO_DEFAULT, MobileDefaultBrowserState.CHROME_SYSTEM_DEFAULT, MobileDefaultBrowserState.CHROME_INSTALLED_DEFAULT, MobileDefaultBrowserState.OTHER_SYSTEM_DEFAULT, MobileDefaultBrowserState.OTHER_INSTALLED_DEFAULT" + errorLine1=" getDefaultBrowserUmaState(info), MobileDefaultBrowserState.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/DefaultBrowserInfo.java" + line="197" + column="88"/> </issue> - <issue id="WrongConstant" message="Must be one of: UserStatus.NON_USER, UserStatus.TAB_STRIP_NOT_SHOWN, UserStatus.TAB_STRIP_SHOWN, UserStatus.TAB_STRIP_SHOWN_AND_DISMISSED, UserStatus.TAB_STRIP_PERMANENTLY_HIDDEN" errorLine1=" UMA_USER_STATUS_RESULT, userStatus, UserStatus.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/tasks/ConditionalTabStripUtils.java" /> + <issue + id="WrongConstant" + message="Must be one of: DirectActionId.GO_BACK, DirectActionId.RELOAD, DirectActionId.GO_FORWARD, DirectActionId.BOOKMARK_THIS_PAGE, DirectActionId.DOWNLOADS, DirectActionId.PREFERENCES, DirectActionId.OPEN_HISTORY, DirectActionId.HELP, DirectActionId.NEW_TAB, DirectActionId.CLOSE_TAB, DirectActionId.CLOSE_ALL_TABS, DirectActionId.FIND_IN_PAGE, DirectActionId.NUM_ENTRIES" + errorLine1=" record(DirectActionId.UNKNOWN);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/directactions/DirectActionUsageHistogram.java" + line="81" + column="16"/> </issue> - <issue id="WrongConstant" message="Must be one of: ProbeResult.NO_INTERNET, ProbeResult.SERVER_ERROR, ProbeResult.NOT_VALIDATED, ProbeResult.VALIDATED_WITH_NO_CONTENT, ProbeResult.VALIDATED_WITH_OK_BUT_ZERO_CONTENT_LENGTH, ProbeResult.VALIDATED_WITH_OK_BUT_NO_CONTENT_LENGTH" errorLine1=" result, ProbeResult.RESULT_COUNT);" errorLine2=" ~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/net/connectivitydetector/ConnectivityDetector.java" /> + <issue + id="WrongConstant" + message="Must be one of: DirectActionId.GO_BACK, DirectActionId.RELOAD, DirectActionId.GO_FORWARD, DirectActionId.BOOKMARK_THIS_PAGE, DirectActionId.DOWNLOADS, DirectActionId.PREFERENCES, DirectActionId.OPEN_HISTORY, DirectActionId.HELP, DirectActionId.NEW_TAB, DirectActionId.CLOSE_TAB, DirectActionId.CLOSE_ALL_TABS, DirectActionId.FIND_IN_PAGE, DirectActionId.NUM_ENTRIES" + errorLine1=" record(DirectActionId.UNKNOWN);" + errorLine2=" ~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/directactions/DirectActionUsageHistogram.java" + line="81" + column="31"/> </issue> - <issue id="WrongConstant" message="Must be one of: ProbeResult.NO_INTERNET, ProbeResult.SERVER_ERROR, ProbeResult.NOT_VALIDATED, ProbeResult.VALIDATED_WITH_NO_CONTENT, ProbeResult.VALIDATED_WITH_OK_BUT_ZERO_CONTENT_LENGTH, ProbeResult.VALIDATED_WITH_OK_BUT_NO_CONTENT_LENGTH" errorLine1=" result, ProbeResult.RESULT_COUNT);" errorLine2=" ~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/net/connectivitydetector/ConnectivityDetector.java" /> + <issue + id="WrongConstant" + message="Must be one of: DirectActionId.GO_BACK, DirectActionId.RELOAD, DirectActionId.GO_FORWARD, DirectActionId.BOOKMARK_THIS_PAGE, DirectActionId.DOWNLOADS, DirectActionId.PREFERENCES, DirectActionId.OPEN_HISTORY, DirectActionId.HELP, DirectActionId.NEW_TAB, DirectActionId.CLOSE_TAB, DirectActionId.CLOSE_ALL_TABS, DirectActionId.FIND_IN_PAGE, DirectActionId.NUM_ENTRIES" + errorLine1=" if (histogramId == null) histogramId = DirectActionId.OTHER;" + errorLine2=" ~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/directactions/DirectActionUsageHistogram.java" + line="92" + column="63"/> </issue> - <issue id="WrongConstant" message="Must be one of: ConnectionState.NONE, ConnectionState.DISCONNECTED, ConnectionState.NO_INTERNET, ConnectionState.CAPTIVE_PORTAL, ConnectionState.VALIDATED" errorLine1=" mConnectionState, ConnectionState.RESULT_COUNT);" errorLine2=" ~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/net/connectivitydetector/ConnectivityDetector.java" /> + <issue + id="WrongConstant" + message="Must be one of: DirectActionId.GO_BACK, DirectActionId.RELOAD, DirectActionId.GO_FORWARD, DirectActionId.BOOKMARK_THIS_PAGE, DirectActionId.DOWNLOADS, DirectActionId.PREFERENCES, DirectActionId.OPEN_HISTORY, DirectActionId.HELP, DirectActionId.NEW_TAB, DirectActionId.CLOSE_TAB, DirectActionId.CLOSE_ALL_TABS, DirectActionId.FIND_IN_PAGE, DirectActionId.NUM_ENTRIES" + errorLine1=" record(histogramId);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/directactions/DirectActionUsageHistogram.java" + line="94" + column="16"/> </issue> - <issue id="WrongConstant" message="Must be one of: Type.CHROME_HTTP, Type.CHROME_HTTPS, Type.SYSTEM_HTTP, Type.SYSTEM_HTTPS" errorLine1=" for (@Type int t = Type.CHROME_HTTP; t < Type.NUM_ENTRIES; t++) {" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/feedback/ConnectivityTask.java" /> + <issue + id="WrongConstant" + message="Must be one of: DirectActionId.GO_BACK, DirectActionId.RELOAD, DirectActionId.GO_FORWARD, DirectActionId.BOOKMARK_THIS_PAGE, DirectActionId.DOWNLOADS, DirectActionId.PREFERENCES, DirectActionId.OPEN_HISTORY, DirectActionId.HELP, DirectActionId.NEW_TAB, DirectActionId.CLOSE_TAB, DirectActionId.CLOSE_ALL_TABS, DirectActionId.FIND_IN_PAGE, DirectActionId.NUM_ENTRIES" + errorLine1=" record(histogramId);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/directactions/DirectActionUsageHistogram.java" + line="94" + column="16"/> </issue> - <issue id="WrongConstant" message="Must be one of: Type.CHROME_HTTP, Type.CHROME_HTTPS, Type.SYSTEM_HTTP, Type.SYSTEM_HTTPS" errorLine1=" return mResult.size() == Type.NUM_ENTRIES;" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/feedback/ConnectivityTask.java" /> + <issue + id="WrongConstant" + message="Must be one of: ActionType.UNKNOWN, ActionType.DOWNLOAD_PAUSE, ActionType.DOWNLOAD_RESUME, ActionType.DOWNLOAD_CANCEL, ActionType.DOWNLOAD_PAGE_PAUSE, ActionType.DOWNLOAD_PAGE_RESUME, ActionType.DOWNLOAD_PAGE_CANCEL, ActionType.CONTENT_SUGGESTION_SETTINGS, ActionType.WEB_APP_ACTION_SHARE, ActionType.WEB_APP_ACTION_OPEN_IN_CHROME, ActionType.OFFLINE_CONTENT_SUGGESTION_SETTINGS, ActionType.SHARING_TRY_AGAIN, ActionType.SETTINGS, ActionType.ANNOUNCEMENT_ACK, ActionType.ANNOUNCEMENT_OPEN, ActionType.PRICE_DROP_VISIT_SITE, ActionType.PRICE_DROP_TURN_OFF_ALERT" + errorLine1=" NotificationUmaTracker.ActionType.TWA_NOTIFICATION_ACCEPTANCE)" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/browserservices/ui/view/DisclosureNotification.java" + line="130" + column="59"/> </issue> - <issue id="WrongConstant" message="Must be one of: Type.CHROME_HTTP, Type.CHROME_HTTPS, Type.SYSTEM_HTTP, Type.SYSTEM_HTTPS" errorLine1=" for (@Type int type = Type.CHROME_HTTP; type < Type.NUM_ENTRIES; type++) {" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/feedback/ConnectivityTask.java" /> + <issue + id="WrongConstant" + message="Must be one of: DownloadLocationDirectoryType.DEFAULT, DownloadLocationDirectoryType.ADDITIONAL, DownloadLocationDirectoryType.ERROR" + errorLine1=" DirectoryOption.DownloadLocationDirectoryType.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/DownloadDirectoryProvider.java" + line="357" + column="63"/> </issue> - <issue id="WrongConstant" message="Must be one of: ChipEvent.SHOWN, ChipEvent.CLICKED, ChipEvent.DISMISSED" errorLine1=" "ContextMenu.LensChip.Event", chipEvent, ChipEvent.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuChipController.java" /> + <issue + id="WrongConstant" + message="Must be one of: DownloadLaterDialogChoice.DOWNLOAD_NOW, DownloadLaterDialogChoice.ON_WIFI, DownloadLaterDialogChoice.DOWNLOAD_LATER, DownloadLaterDialogChoice.CANCELLED" + errorLine1=" "Download.Later.UI.DialogChoice.Main", choice, DownloadLaterDialogChoice.COUNT);" + errorLine2=" ~~~~~"> + <location + file="$SRC/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/DownloadLaterMetrics.java" + line="66" + column="90"/> </issue> - <issue id="WrongConstant" message="Must be one of: ContextMenuItemId.SEARCH, ContextMenuItemId.OPEN_IN_NEW_TAB, ContextMenuItemId.OPEN_IN_NEW_TAB_IN_GROUP, ContextMenuItemId.OPEN_IN_INCOGNITO_TAB, ContextMenuItemId.OPEN_IN_NEW_WINDOW, ContextMenuItemId.SAVE_FOR_OFFLINE, ContextMenuItemId.ADD_TO_MY_APPS, ContextMenuItemId.REMOVE" errorLine1=" for (@ContextMenuItemId int itemId = 0; itemId < ContextMenuItemId.NUM_ENTRIES; itemId++) {" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/native_page/ContextMenuManager.java" /> + <issue + id="WrongConstant" + message="Must be one of: DownloadLaterDialogChoice.DOWNLOAD_NOW, DownloadLaterDialogChoice.ON_WIFI, DownloadLaterDialogChoice.DOWNLOAD_LATER, DownloadLaterDialogChoice.CANCELLED" + errorLine1=" choice, DownloadLaterDialogChoice.COUNT);" + errorLine2=" ~~~~~"> + <location + file="$SRC/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/DownloadLaterMetrics.java" + line="87" + column="51"/> </issue> - <issue id="WrongConstant" message="Must be one of: ContextualSearchSwitch.IS_TRANSLATION_DISABLED, ContextualSearchSwitch.IS_ONLINE_DETECTION_DISABLED, ContextualSearchSwitch.IS_SEARCH_TERM_RESOLUTION_DISABLED, ContextualSearchSwitch.IS_MANDATORY_PROMO_ENABLED, ContextualSearchSwitch.IS_ENGLISH_TARGET_TRANSLATION_ENABLED, ContextualSearchSwitch.IS_BAR_OVERLAP_COLLECTION_ENABLED, ContextualSearchSwitch.IS_BAR_OVERLAP_SUPPRESSION_ENABLED, ContextualSearchSwitch.IS_WORD_EDGE_SUPPRESSION_ENABLED, ContextualSearchSwitch.IS_SHORT_WORD_SUPPRESSION_ENABLED, ContextualSearchSwitch.IS_NOT_LONG_WORD_SUPPRESSION_ENABLED, ContextualSearchSwitch.IS_NOT_AN_ENTITY_SUPPRESSION_ENABLED, ContextualSearchSwitch.IS_ENGAGEMENT_SUPPRESSION_ENABLED, ContextualSearchSwitch.IS_SHORT_TEXT_RUN_SUPPRESSION_ENABLED, ContextualSearchSwitch.IS_SMALL_TEXT_SUPPRESSION_ENABLED, ContextualSearchSwitch.IS_AMP_AS_SEPARATE_TAB_DISABLED, ContextualSearchSwitch.IS_SEND_HOME_COUNTRY_DISABLED, ContextualSearchSwitch.IS_PAGE_CONTENT_NOTIFICATION_DISABLED, ContextualSearchSwitch.IS_UKM_RANKER_LOGGING_DISABLED, ContextualSearchSwitch.IS_CONTEXTUAL_SEARCH_ML_TAP_SUPPRESSION_ENABLED, ContextualSearchSwitch.IS_CONTEXTUAL_SEARCH_TAP_DISABLE_OVERRIDE_ENABLED, ContextualSearchSwitch.IS_SEND_BASE_PAGE_URL_DISABLED" errorLine1=" private static Boolean[] sSwitches = new Boolean[ContextualSearchSwitch.NUM_ENTRIES];" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchFieldTrial.java" /> + <issue + id="WrongConstant" + message="Must be one of: DownloadLaterDialogChoice.DOWNLOAD_NOW, DownloadLaterDialogChoice.ON_WIFI, DownloadLaterDialogChoice.DOWNLOAD_LATER, DownloadLaterDialogChoice.CANCELLED" + errorLine1=" "Download.Later.UI.DialogChoice.Infobar", choice, DownloadLaterDialogChoice.COUNT);" + errorLine2=" ~~~~~"> + <location + file="$SRC/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/DownloadLaterMetrics.java" + line="97" + column="93"/> </issue> - <issue id="WrongConstant" message="Must be one of: ContextualSearchSwitch.IS_TRANSLATION_DISABLED, ContextualSearchSwitch.IS_ONLINE_DETECTION_DISABLED, ContextualSearchSwitch.IS_SEARCH_TERM_RESOLUTION_DISABLED, ContextualSearchSwitch.IS_MANDATORY_PROMO_ENABLED, ContextualSearchSwitch.IS_ENGLISH_TARGET_TRANSLATION_ENABLED, ContextualSearchSwitch.IS_BAR_OVERLAP_COLLECTION_ENABLED, ContextualSearchSwitch.IS_BAR_OVERLAP_SUPPRESSION_ENABLED, ContextualSearchSwitch.IS_WORD_EDGE_SUPPRESSION_ENABLED, ContextualSearchSwitch.IS_SHORT_WORD_SUPPRESSION_ENABLED, ContextualSearchSwitch.IS_NOT_LONG_WORD_SUPPRESSION_ENABLED, ContextualSearchSwitch.IS_NOT_AN_ENTITY_SUPPRESSION_ENABLED, ContextualSearchSwitch.IS_ENGAGEMENT_SUPPRESSION_ENABLED, ContextualSearchSwitch.IS_SHORT_TEXT_RUN_SUPPRESSION_ENABLED, ContextualSearchSwitch.IS_SMALL_TEXT_SUPPRESSION_ENABLED, ContextualSearchSwitch.IS_AMP_AS_SEPARATE_TAB_DISABLED, ContextualSearchSwitch.IS_SEND_HOME_COUNTRY_DISABLED, ContextualSearchSwitch.IS_PAGE_CONTENT_NOTIFICATION_DISABLED, ContextualSearchSwitch.IS_UKM_RANKER_LOGGING_DISABLED, ContextualSearchSwitch.IS_CONTEXTUAL_SEARCH_ML_TAP_SUPPRESSION_ENABLED, ContextualSearchSwitch.IS_CONTEXTUAL_SEARCH_TAP_DISABLE_OVERRIDE_ENABLED, ContextualSearchSwitch.IS_SEND_BASE_PAGE_URL_DISABLED" errorLine1=" assert ContextualSearchSwitchNames.length == ContextualSearchSwitch.NUM_ENTRIES;" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchFieldTrial.java" /> + <issue + id="WrongConstant" + message="Must be one of: DownloadLaterUiEvent.DOWNLOAD_LATER_DIALOG_SHOW, DownloadLaterUiEvent.DOWNLOAD_LATER_DIALOG_COMPLETE, DownloadLaterUiEvent.DOWNLOAD_LATER_DIALOG_CANCEL, DownloadLaterUiEvent.DATE_TIME_PICKER_SHOW, DownloadLaterUiEvent.DATE_TIME_PICKER_COMPLETE, DownloadLaterUiEvent.DATE_TIME_PICKER_CANCEL, DownloadLaterUiEvent.DOWNLOAD_HOME_CHANGE_SCHEDULE_CLICKED, DownloadLaterUiEvent.DOWNLOAD_HOME_CHANGE_SCHEDULE_COMPLETE, DownloadLaterUiEvent.DOWNLOAD_HOME_CHANGE_SCHEDULE_CANCEL, DownloadLaterUiEvent.DOWNLOAD_INFOBAR_CHANGE_SCHEDULE_CLICKED, DownloadLaterUiEvent.DOWNLOAD_INFOBAR_CHANGE_SCHEDULE_COMPLETE, DownloadLaterUiEvent.DOWNLOAD_INFOBAR_CHANGE_SCHEDULE_CANCEL, DownloadLaterUiEvent.DOWNLOAD_LATER_DIALOG_EDIT_CLICKED" + errorLine1=" "Download.Later.UI.Events", event, DownloadLaterUiEvent.COUNT);" + errorLine2=" ~~~~~"> + <location + file="$SRC/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/DownloadLaterMetrics.java" + line="107" + column="73"/> </issue> - <issue id="WrongConstant" message="Must be one of: ContextualSearchPreference.UNINITIALIZED, ContextualSearchPreference.ENABLED, ContextualSearchPreference.DISABLED" errorLine1=" getPreferenceValue(), ContextualSearchPreference.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchUma.java" /> + <issue + id="WrongConstant" + message="Must be one of: DownloadLocationDirectoryType.DEFAULT, DownloadLocationDirectoryType.ADDITIONAL, DownloadLocationDirectoryType.ERROR" + errorLine1=" directoryOption.type, DirectoryOption.DownloadLocationDirectoryType.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationDialogCoordinator.java" + line="280" + column="85"/> </issue> - <issue id="WrongConstant" message="Must be one of: ContextualSearchPreference.UNINITIALIZED, ContextualSearchPreference.ENABLED, ContextualSearchPreference.DISABLED" errorLine1=" ContextualSearchPreference.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchUma.java" /> + <issue + id="WrongConstant" + message="Must be one of: DownloadLocationSuggestionEvent.LOCATION_SUGGESTION_SHOWN, DownloadLocationSuggestionEvent.NOT_ENOUGH_SPACE_SHOWN" + errorLine1=" DownloadLocationSuggestionEvent.COUNT);" + errorLine2=" ~~~~~"> + <location + file="$SRC/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/DownloadLocationDialogMetrics.java" + line="50" + column="49"/> </issue> - <issue id="WrongConstant" message="Must be one of: Results.SEEN, Results.NOT_SEEN" errorLine1=" wasPanelSeen ? Results.SEEN : Results.NOT_SEEN, Results.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchUma.java" /> + <issue + id="WrongConstant" + message="Must be one of: DownloadLocationDirectoryType.DEFAULT, DownloadLocationDirectoryType.ADDITIONAL, DownloadLocationDirectoryType.ERROR" + errorLine1=" option.type, DirectoryOption.DownloadLocationDirectoryType.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/settings/DownloadLocationPreferenceAdapter.java" + line="106" + column="76"/> </issue> - <issue id="WrongConstant" message="Must be one of: QuickActionResolve.FAILED, QuickActionResolve.SINGLE, QuickActionResolve.MULTIPLE" errorLine1=" code, QuickActionResolve.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchUma.java" /> + <issue + id="WrongConstant" + message="Must be one of: DownloadState.IN_PROGRESS, DownloadState.COMPLETE, DownloadState.CANCELLED, DownloadState.INTERRUPTED, DownloadState.MAX_DOWNLOAD_STATE" + errorLine1=" int state = downloadItem.getDownloadInfo().state();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java" + line="1419" + column="21"/> </issue> - <issue id="WrongConstant" message="Must be one of: Results.SEEN, Results.NOT_SEEN" errorLine1=" wasSeen ? Results.SEEN : Results.NOT_SEEN, Results.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchUma.java" /> + <issue + id="WrongConstant" + message="Must be one of: DownloadState.IN_PROGRESS, DownloadState.COMPLETE, DownloadState.CANCELLED, DownloadState.INTERRUPTED, DownloadState.MAX_DOWNLOAD_STATE" + errorLine1=" return (state == DownloadState.INTERRUPTED && !downloadItem.getDownloadInfo().isResumable())" + errorLine2=" ~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java" + line="1420" + column="17"/> </issue> - <issue id="WrongConstant" message="Must be one of: CardTag.CT_NONE, CardTag.CT_OTHER, CardTag.CT_HAS_ENTITY, CardTag.CT_BUSINESS, CardTag.CT_PRODUCT, CardTag.CT_CONTACT, CardTag.CT_EMAIL, CardTag.CT_LOCATION, CardTag.CT_URL, CardTag.CT_DEFINITION, CardTag.CT_TRANSLATE, CardTag.CT_CONTEXTUAL_DEFINITION" errorLine1=" "Search.ContextualSearch.CardTagSeen", cardTagEnum, CardTag.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchUma.java" /> + <issue + id="WrongConstant" + message="Must be one of: DownloadState.IN_PROGRESS, DownloadState.COMPLETE, DownloadState.CANCELLED, DownloadState.INTERRUPTED, DownloadState.MAX_DOWNLOAD_STATE" + errorLine1=" || state == DownloadState.CANCELLED;" + errorLine2=" ~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java" + line="1421" + column="20"/> </issue> - <issue id="WrongConstant" message="Must be one of: CardTag.CT_NONE, CardTag.CT_OTHER, CardTag.CT_HAS_ENTITY, CardTag.CT_BUSINESS, CardTag.CT_PRODUCT, CardTag.CT_CONTACT, CardTag.CT_EMAIL, CardTag.CT_LOCATION, CardTag.CT_URL, CardTag.CT_DEFINITION, CardTag.CT_TRANSLATE, CardTag.CT_CONTEXTUAL_DEFINITION" errorLine1=" "Search.ContextualSearch.CardTag", cardTagEnum, CardTag.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchUma.java" /> + <issue + id="WrongConstant" + message="Must be one of: DownloadLocationDirectoryType.DEFAULT, DownloadLocationDirectoryType.ADDITIONAL, DownloadLocationDirectoryType.ERROR" + errorLine1=" DirectoryOption.DownloadLocationDirectoryType.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadMetrics.java" + line="106" + column="83"/> </issue> - <issue id="WrongConstant" message="Must be one of: ResultsByGesture.SEEN_FROM_TAP, ResultsByGesture.NOT_SEEN_FROM_TAP, ResultsByGesture.SEEN_FROM_LONG_PRESS, ResultsByGesture.NOT_SEEN_FROM_LONG_PRESS" errorLine1=" getPanelSeenByGestureStateCode(wasPanelSeen, wasTap), ResultsByGesture.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchUma.java" /> + <issue + id="WrongConstant" + message="Must be one of: ServiceStopped.STOPPED, ServiceStopped.DESTROYED, ServiceStopped.TASK_REMOVED, ServiceStopped.LOW_MEMORY, ServiceStopped.START_STICKY" + errorLine1=" ServiceStopped.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationUmaHelper.java" + line="115" + column="36"/> </issue> - <issue id="WrongConstant" message="Must be one of: CrashKeyIndex.LOADED_DYNAMIC_MODULE, CrashKeyIndex.ACTIVE_DYNAMIC_MODULE, CrashKeyIndex.APPLICATION_STATUS, CrashKeyIndex.INSTALLED_MODULES, CrashKeyIndex.EMULATED_MODULES, CrashKeyIndex.DYNAMIC_MODULE_DEX_NAME, CrashKeyIndex.PARTNER_CUSTOMIZATION_CONFIG" errorLine1=" assert CrashKeyIndex.NUM_ENTRIES == KEYS.length;" errorLine2=" ~~~~~~~~~~~"> - <location file="components/crash/android/java/src/org/chromium/components/crash/CrashKeys.java" /> + <issue + id="WrongConstant" + message="Must be one of: ForegroundLifecycle.START, ForegroundLifecycle.UPDATE, ForegroundLifecycle.STOP" + errorLine1=" ForegroundLifecycle.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationUmaHelper.java" + line="127" + column="37"/> </issue> - <issue id="WrongConstant" message="Must be one of: CollectionState.ENABLED_BY_COMMANDLINE, CollectionState.ENABLED_BY_FLAG_UI, CollectionState.ENABLED_BY_USER_CONSENT, CollectionState.DISABLED_BY_USER_CONSENT, CollectionState.DISABLED_BY_USER_CONSENT_CANNOT_FIND_SETTINGS, CollectionState.DISABLED_CANNOT_USE_GMS" errorLine1=" "Android.WebView.DevUi.CrashList.CollectionState", state, CollectionState.COUNT);" errorLine2=" ~~~~~"> - <location file="android_webview/nonembedded/java/src/org/chromium/android_webview/devui/CrashesListFragment.java" /> + <issue + id="WrongConstant" + message="Must be one of: StateAtCancel.DOWNLOADING, StateAtCancel.PAUSED, StateAtCancel.PENDING_NETWORK, StateAtCancel.PENDING_ANOTHER_DOWNLOAD" + errorLine1=" StateAtCancel.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationUmaHelper.java" + line="141" + column="35"/> </issue> - <issue id="WrongConstant" message="Must be one of: CrashInteraction.FORCE_UPLOAD_BUTTON, CrashInteraction.FORCE_UPLOAD_NO_DIALOG, CrashInteraction.FORCE_UPLOAD_DIALOG_METERED_NETWORK, CrashInteraction.FORCE_UPLOAD_DIALOG_CANCEL, CrashInteraction.FILE_BUG_REPORT_BUTTON, CrashInteraction.FILE_BUG_REPORT_DIALOG_PROCEED, CrashInteraction.FILE_BUG_REPORT_DIALOG_DISMISS, CrashInteraction.HIDE_CRASH_BUTTON" errorLine1=" "Android.WebView.DevUi.CrashList.CrashInteraction", action, CrashInteraction.COUNT);" errorLine2=" ~~~~~"> - <location file="android_webview/nonembedded/java/src/org/chromium/android_webview/devui/CrashesListFragment.java" /> + <issue + id="WrongConstant" + message="Must be one of: StateAtCancel.DOWNLOADING, StateAtCancel.PAUSED, StateAtCancel.PENDING_NETWORK, StateAtCancel.PENDING_ANOTHER_DOWNLOAD" + errorLine1=" StateAtCancel.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationUmaHelper.java" + line="145" + column="35"/> </issue> - <issue id="WrongConstant" message="Must be one of: ConnectionStatus.DISCONNECTED, ConnectionStatus.DISCONNECTED_KEEP_ALIVE, ConnectionStatus.CONNECTED, ConnectionStatus.CONNECTED_KEEP_ALIVE" errorLine1=" status, ConnectionStatus.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivityClientConnectionKeeper.java" /> + <issue + id="WrongConstant" + message="Must be one of: UmaDownloadResumption.MANUAL_PAUSE, UmaDownloadResumption.BROWSER_KILLED, UmaDownloadResumption.CLICKED, UmaDownloadResumption.FAILED, UmaDownloadResumption.AUTO_STARTED, UmaDownloadResumption.BROWSER_RUNNING, UmaDownloadResumption.BROWSER_NOT_RUNNING" + errorLine1=" "MobileDownload.DownloadResumption", type, UmaDownloadResumption.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationUmaHelper.java" + line="155" + column="82"/> </issue> - <issue id="WrongConstant" message="Must be one of: ConnectionStatus.DISCONNECTED, ConnectionStatus.DISCONNECTED_KEEP_ALIVE, ConnectionStatus.CONNECTED, ConnectionStatus.CONNECTED_KEEP_ALIVE" errorLine1=" status, ConnectionStatus.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivityClientConnectionKeeper.java" /> + <issue + id="WrongConstant" + message="Must be one of: OmniboxSuggestionUiType.DEFAULT, OmniboxSuggestionUiType.EDIT_URL_SUGGESTION, OmniboxSuggestionUiType.ANSWER_SUGGESTION, OmniboxSuggestionUiType.ENTITY_SUGGESTION, OmniboxSuggestionUiType.TAIL_SUGGESTION, OmniboxSuggestionUiType.CLIPBOARD_SUGGESTION, OmniboxSuggestionUiType.TILE_SUGGESTION, OmniboxSuggestionUiType.TILE_NAVSUGGEST, OmniboxSuggestionUiType.PEDAL_SUGGESTION" + errorLine1=" return (info.type == OmniboxSuggestionUiType.HEADER && info.groupId == groupId);" + errorLine2=" ~~~~~~"> + <location + file="$SRC/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/DropdownItemViewInfoListManager.java" + line="98" + column="54"/> </issue> - <issue id="WrongConstant" message="Must be one of: IncognitoCCTCallerId.OTHER_APPS, IncognitoCCTCallerId.GOOGLE_APPS, IncognitoCCTCallerId.OTHER_CHROME_FEATURES, IncognitoCCTCallerId.READER_MODE, IncognitoCCTCallerId.READ_LATER" errorLine1=" incognitoCCTCallerId, IntentHandler.IncognitoCCTCallerId.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivityLifecycleUmaTracker.java" /> + <issue + id="WrongConstant" + message="Must be one of: DuplicateDownloadDialogEvent.DUPLICATE_DOWNLOAD_DIALOG_SHOW, DuplicateDownloadDialogEvent.DUPLICATE_DOWNLOAD_DIALOG_CONFIRM, DuplicateDownloadDialogEvent.DUPLICATE_DOWNLOAD_DIALOG_CANCEL, DuplicateDownloadDialogEvent.DUPLICATE_DOWNLOAD_DIALOG_LINK_CLICKED, DuplicateDownloadDialogEvent.DUPLICATE_DOWNLOAD_DIALOG_DISMISS" + errorLine1=" event, DuplicateDownloadDialogEvent.COUNT);" + errorLine2=" ~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/download/DuplicateDownloadDialog.java" + line="188" + column="53"/> </issue> - <issue id="WrongConstant" message="Must be one of: ExternalAppId.OTHER, ExternalAppId.GMAIL, ExternalAppId.FACEBOOK, ExternalAppId.PLUS, ExternalAppId.TWITTER, ExternalAppId.CHROME, ExternalAppId.HANGOUTS, ExternalAppId.MESSENGER, ExternalAppId.NEWS, ExternalAppId.LINE, ExternalAppId.WHATSAPP, ExternalAppId.GSA, ExternalAppId.WEBAPK, ExternalAppId.YAHOO_MAIL, ExternalAppId.VIBER, ExternalAppId.YOUTUBE" errorLine1=" externalId, IntentHandler.ExternalAppId.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivityLifecycleUmaTracker.java" /> + <issue + id="WrongConstant" + message="Must be one of: ExploreSitesCatalogUpdateRequestSource.NEW_TAB_PAGE, ExploreSitesCatalogUpdateRequestSource.EXPLORE_SITES_PAGE, ExploreSitesCatalogUpdateRequestSource.BACKGROUND" + errorLine1=" ExploreSitesCatalogUpdateRequestSource.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/explore_sites/ExploreSitesBackgroundTask.java" + line="74" + column="56"/> </issue> - <issue id="WrongConstant" message="Must be one of: ExternalAppId.OTHER, ExternalAppId.GMAIL, ExternalAppId.FACEBOOK, ExternalAppId.PLUS, ExternalAppId.TWITTER, ExternalAppId.CHROME, ExternalAppId.HANGOUTS, ExternalAppId.MESSENGER, ExternalAppId.NEWS, ExternalAppId.LINE, ExternalAppId.WHATSAPP, ExternalAppId.GSA, ExternalAppId.WEBAPK, ExternalAppId.YAHOO_MAIL, ExternalAppId.VIBER, ExternalAppId.YOUTUBE" errorLine1=" externalId, IntentHandler.ExternalAppId.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivityLifecycleUmaTracker.java" /> + <issue + id="WrongConstant" + message="Must be one of: CategoryType.MORE_BUTTON, CategoryType.DEFAULT, CategoryType.SOCIAL, CategoryType.ENTERTAINMENT, CategoryType.SPORT, CategoryType.NEWS, CategoryType.SHOPPING, CategoryType.REFERENCE, CategoryType.BANKING, CategoryType.GOVERNMENT, CategoryType.TRAVEL, CategoryType.EDUCATION, CategoryType.JOBS, CategoryType.APPS_GAMES, CategoryType.FAVORITE, CategoryType.GOOGLE, CategoryType.FOOD, CategoryType.HEALTH, CategoryType.BOOKS, CategoryType.TECHNOLOGY, CategoryType.SCIENCE" + errorLine1=" ExploreSitesCategory.CategoryType.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/explore_sites/ExploreSitesCategoryCardView.java" + line="293" + column="51"/> </issue> - <issue id="WrongConstant" message="Must be one of: ExternalAppId.OTHER, ExternalAppId.GMAIL, ExternalAppId.FACEBOOK, ExternalAppId.PLUS, ExternalAppId.TWITTER, ExternalAppId.CHROME, ExternalAppId.HANGOUTS, ExternalAppId.MESSENGER, ExternalAppId.NEWS, ExternalAppId.LINE, ExternalAppId.WHATSAPP, ExternalAppId.GSA, ExternalAppId.WEBAPK, ExternalAppId.YAHOO_MAIL, ExternalAppId.VIBER, ExternalAppId.YOUTUBE" errorLine1=" "CustomTabs.ClientAppId", externalId, IntentHandler.ExternalAppId.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabActivityLifecycleUmaTracker.java" /> + <issue + id="WrongConstant" + message="Must be one of: AiaIntent.FALLBACK_USED, AiaIntent.SERP, AiaIntent.OTHER" + errorLine1=" AiaIntent.FALLBACK_USED, AiaIntent.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/components/external_intents/android/java/src/org/chromium/components/external_intents/ExternalNavigationHandler.java" + line="428" + column="56"/> </issue> - <issue id="WrongConstant" message="Must be one of: WebContentsState.NO_WEBCONTENTS, WebContentsState.PRERENDERED_WEBCONTENTS, WebContentsState.SPARE_WEBCONTENTS, WebContentsState.TRANSFERRED_WEBCONTENTS" errorLine1=" WebContentsState.PRERENDERED_WEBCONTENTS, WebContentsState.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/customtabs/content/CustomTabActivityTabController.java" /> + <issue + id="WrongConstant" + message="Must be one of: AiaIntent.FALLBACK_USED, AiaIntent.SERP, AiaIntent.OTHER" + errorLine1=" AiaIntent.OTHER, AiaIntent.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/components/external_intents/android/java/src/org/chromium/components/external_intents/ExternalNavigationHandler.java" + line="1086" + column="44"/> </issue> - <issue id="WrongConstant" message="Must be one of: WebContentsState.NO_WEBCONTENTS, WebContentsState.PRERENDERED_WEBCONTENTS, WebContentsState.SPARE_WEBCONTENTS, WebContentsState.TRANSFERRED_WEBCONTENTS" errorLine1=" webContentsStateOnLaunch, WebContentsState.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/customtabs/content/CustomTabActivityTabController.java" /> + <issue + id="WrongConstant" + message="Must be one of: AiaIntent.FALLBACK_USED, AiaIntent.SERP, AiaIntent.OTHER" + errorLine1=" AiaIntent.SERP, AiaIntent.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/components/external_intents/android/java/src/org/chromium/components/external_intents/ExternalNavigationHandler.java" + line="1118" + column="47"/> </issue> - <issue id="WrongConstant" message="Must be one of: ParallelRequestStatus.NO_REQUEST, ParallelRequestStatus.SUCCESS, ParallelRequestStatus.FAILURE_NOT_INITIALIZED, ParallelRequestStatus.FAILURE_NOT_AUTHORIZED, ParallelRequestStatus.FAILURE_INVALID_URL, ParallelRequestStatus.FAILURE_INVALID_REFERRER, ParallelRequestStatus.FAILURE_INVALID_REFERRER_FOR_SESSION" errorLine1=" ParallelRequestStatus.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnection.java" /> + <issue + id="WrongConstant" + message="Must be one of: StreamTabId.DEFAULT, StreamTabId.FOR_YOU, StreamTabId.FOLLOWING" + errorLine1=" if (mTabToStreamMap.size() <= tabId) tabId = 0;" + errorLine2=" ~"> + <location + file="$SRC/chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/FeedSurfaceMediator.java" + line="372" + column="54"/> </issue> - <issue id="WrongConstant" message="Must be one of: CloseCause.USER_ACTION_CHROME, CloseCause.USER_ACTION_ANDROID, CloseCause.AUTOCLOSE" errorLine1=" "CustomTabs.CloseCause", mCloseCause, CloseCause.COUNT);" errorLine2=" ~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsOpenTimeRecorder.java" /> + <issue + id="WrongConstant" + message="Must be one of: StreamTabId.DEFAULT, StreamTabId.FOR_YOU, StreamTabId.FOLLOWING" + errorLine1=" mSectionHeaderModel.set(SectionHeaderListProperties.CURRENT_TAB_INDEX_KEY, tabId);" + errorLine2=" ~~~~~"> + <location + file="$SRC/chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/FeedSurfaceMediator.java" + line="373" + column="84"/> </issue> - <issue id="WrongConstant" message="Must be one of: DangerousDownloadDialogEvent.DANGEROUS_DOWNLOAD_DIALOG_SHOW, DangerousDownloadDialogEvent.DANGEROUS_DOWNLOAD_DIALOG_CONFIRM, DangerousDownloadDialogEvent.DANGEROUS_DOWNLOAD_DIALOG_CANCEL, DangerousDownloadDialogEvent.DANGEROUS_DOWNLOAD_DIALOG_DISMISS" errorLine1=" "Download.DangerousDialog.Events", event, DangerousDownloadDialogEvent.COUNT);" errorLine2=" ~~~~~"> - <location file="chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DangerousDownloadDialog.java" /> + <issue + id="WrongConstant" + message="Must be one of: StorageRequestType.SAVE, StorageRequestType.RESTORE, StorageRequestType.DELETE" + errorLine1=" storageRequest.getStorageRequestType(), StorageRequestType.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/tab/java/src/org/chromium/chrome/browser/tab/state/FilePersistedTabDataStorage.java" + line="557" + column="80"/> </issue> - <issue id="WrongConstant" message="Must be one of: MobileDefaultBrowserState.NO_DEFAULT, MobileDefaultBrowserState.CHROME_SYSTEM_DEFAULT, MobileDefaultBrowserState.CHROME_INSTALLED_DEFAULT, MobileDefaultBrowserState.OTHER_SYSTEM_DEFAULT, MobileDefaultBrowserState.OTHER_INSTALLED_DEFAULT" errorLine1=" getDefaultBrowserUmaState(info), MobileDefaultBrowserState.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/DefaultBrowserInfo.java" /> + <issue + id="WrongConstant" + message="Must be one of: Type.ALL, Type.PAGE, Type.VIDEO, Type.AUDIO, Type.IMAGE, Type.DOCUMENT, Type.OTHER" + errorLine1=" "Android.DownloadManager.Filter", selectedTab, DownloadFilter.Type.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/download/internal/android/java/src/org/chromium/chrome/browser/download/home/metrics/FilterChangeLogger.java" + line="24" + column="84"/> </issue> - <issue id="WrongConstant" message="Must be one of: DirectActionId.GO_BACK, DirectActionId.RELOAD, DirectActionId.GO_FORWARD, DirectActionId.BOOKMARK_THIS_PAGE, DirectActionId.DOWNLOADS, DirectActionId.PREFERENCES, DirectActionId.OPEN_HISTORY, DirectActionId.HELP, DirectActionId.NEW_TAB, DirectActionId.CLOSE_TAB, DirectActionId.CLOSE_ALL_TABS, DirectActionId.FIND_IN_PAGE, DirectActionId.NUM_ENTRIES" errorLine1=" record(DirectActionId.UNKNOWN);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/directactions/DirectActionUsageHistogram.java" /> + <issue + id="WrongConstant" + message="Must be one of: FilterType.NONE, FilterType.SITES, FilterType.VIDEOS, FilterType.MUSIC, FilterType.IMAGES, FilterType.DOCUMENT, FilterType.OTHER, FilterType.PREFETCHED" + errorLine1=" if (filter < 0 || filter >= FilterType.NUM_ENTRIES) filter = FilterType.NONE;" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/download/internal/android/java/src/org/chromium/chrome/browser/download/home/filter/Filters.java" + line="104" + column="52"/> </issue> - <issue id="WrongConstant" message="Must be one of: DirectActionId.GO_BACK, DirectActionId.RELOAD, DirectActionId.GO_FORWARD, DirectActionId.BOOKMARK_THIS_PAGE, DirectActionId.DOWNLOADS, DirectActionId.PREFERENCES, DirectActionId.OPEN_HISTORY, DirectActionId.HELP, DirectActionId.NEW_TAB, DirectActionId.CLOSE_TAB, DirectActionId.CLOSE_ALL_TABS, DirectActionId.FIND_IN_PAGE, DirectActionId.NUM_ENTRIES" errorLine1=" record(DirectActionId.UNKNOWN);" errorLine2=" ~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/directactions/DirectActionUsageHistogram.java" /> + <issue + id="WrongConstant" + message="Must be one of: LayoutType.WARNING_MESSAGE, LayoutType.TOGGLEABLE_FLAG" + errorLine1=" return LayoutType.COUNT;" + errorLine2=" ~~~~~"> + <location + file="$SRC/android_webview/nonembedded/java/src/org/chromium/android_webview/devui/FlagsFragment.java" + line="507" + column="31"/> </issue> - <issue id="WrongConstant" message="Must be one of: DirectActionId.GO_BACK, DirectActionId.RELOAD, DirectActionId.GO_FORWARD, DirectActionId.BOOKMARK_THIS_PAGE, DirectActionId.DOWNLOADS, DirectActionId.PREFERENCES, DirectActionId.OPEN_HISTORY, DirectActionId.HELP, DirectActionId.NEW_TAB, DirectActionId.CLOSE_TAB, DirectActionId.CLOSE_ALL_TABS, DirectActionId.FIND_IN_PAGE, DirectActionId.NUM_ENTRIES" errorLine1=" if (histogramId == null) histogramId = DirectActionId.OTHER;" errorLine2=" ~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/directactions/DirectActionUsageHistogram.java" /> + <issue + id="WrongConstant" + message="Must be one of: WebPushDeviceState.NOT_IDLE_NOT_HIGH_PRIORITY, WebPushDeviceState.NOT_IDLE_HIGH_PRIORITY, WebPushDeviceState.IDLE_NOT_HIGH_PRIORITY, WebPushDeviceState.IDLE_HIGH_PRIORITY" + errorLine1=" "GCM.WebPushReceived.DeviceState", state, WebPushDeviceState.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/services/gcm/GcmUma.java" + line="63" + column="78"/> </issue> - <issue id="WrongConstant" message="Must be one of: DirectActionId.GO_BACK, DirectActionId.RELOAD, DirectActionId.GO_FORWARD, DirectActionId.BOOKMARK_THIS_PAGE, DirectActionId.DOWNLOADS, DirectActionId.PREFERENCES, DirectActionId.OPEN_HISTORY, DirectActionId.HELP, DirectActionId.NEW_TAB, DirectActionId.CLOSE_TAB, DirectActionId.CLOSE_ALL_TABS, DirectActionId.FIND_IN_PAGE, DirectActionId.NUM_ENTRIES" errorLine1=" record(histogramId);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/directactions/DirectActionUsageHistogram.java" /> + <issue + id="WrongConstant" + message="Must be one of: UmaPermission.UNKNOWN, UmaPermission.HIGH_ACCURACY_APP_YES_DOMAIN_YES_LOCATION, UmaPermission.HIGH_ACCURACY_APP_YES_DOMAIN_YES_NO_LOCATION, UmaPermission.HIGH_ACCURACY_APP_YES_DOMAIN_PROMPT_LOCATION, UmaPermission.HIGH_ACCURACY_APP_YES_DOMAIN_PROMPT_NO_LOCATION, UmaPermission.HIGH_ACCURACY_APP_YES_DOMAIN_BLOCKED, UmaPermission.HIGH_ACCURACY_APP_PROMPT_DOMAIN_YES, UmaPermission.HIGH_ACCURACY_APP_PROMPT_DOMAIN_PROMPT, UmaPermission.HIGH_ACCURACY_APP_PROMPT_DOMAIN_BLOCKED, UmaPermission.HIGH_ACCURACY_APP_BLOCKED_DOMAIN_YES, UmaPermission.HIGH_ACCURACY_APP_BLOCKED_DOMAIN_PROMPT, UmaPermission.HIGH_ACCURACY_APP_BLOCKED_DOMAIN_BLOCKED, UmaPermission.BATTERY_SAVING_APP_YES_DOMAIN_YES_LOCATION, UmaPermission.BATTERY_SAVING_APP_YES_DOMAIN_YES_NO_LOCATION, UmaPermission.BATTERY_SAVING_APP_YES_DOMAIN_PROMPT_LOCATION, UmaPermission.BATTERY_SAVING_APP_YES_DOMAIN_PROMPT_NO_LOCATION, UmaPermission.BATTERY_SAVING_APP_YES_DOMAIN_BLOCKED, UmaPermission.BATTERY_SAVING_APP_PROMPT_DOMAIN_YES, UmaPermission.BATTERY_SAVING_APP_PROMPT_DOMAIN_PROMPT, UmaPermission.BATTERY_SAVING_APP_PROMPT_DOMAIN_BLOCKED, UmaPermission.BATTERY_SAVING_APP_BLOCKED_DOMAIN_YES, UmaPermission.BATTERY_SAVING_APP_BLOCKED_DOMAIN_PROMPT, UmaPermission.BATTERY_SAVING_APP_BLOCKED_DOMAIN_BLOCKED, UmaPermission.GPS_ONLY_APP_YES_DOMAIN_YES_LOCATION, UmaPermission.GPS_ONLY_APP_YES_DOMAIN_YES_NO_LOCATION, UmaPermission.GPS_ONLY_APP_YES_DOMAIN_PROMPT_LOCATION, UmaPermission.GPS_ONLY_APP_YES_DOMAIN_PROMPT_NO_LOCATION, UmaPermission.GPS_ONLY_APP_YES_DOMAIN_BLOCKED, UmaPermission.GPS_ONLY_APP_PROMPT_DOMAIN_YES, UmaPermission.GPS_ONLY_APP_PROMPT_DOMAIN_PROMPT, UmaPermission.GPS_ONLY_APP_PROMPT_DOMAIN_BLOCKED, UmaPermission.GPS_ONLY_APP_BLOCKED_DOMAIN_YES, UmaPermission.GPS_ONLY_APP_BLOCKED_DOMAIN_PROMPT, UmaPermission.GPS_ONLY_APP_BLOCKED_DOMAIN_BLOCKED, UmaPermission.LOCATION_OFF_APP_YES_DOMAIN_YES, UmaPermission.LOCATION_OFF_APP_YES_DOMAIN_PROMPT, UmaPermission.LOCATION_OFF_APP_YES_DOMAIN_BLOCKED, UmaPermission.LOCATION_OFF_APP_PROMPT_DOMAIN_YES, UmaPermission.LOCATION_OFF_APP_PROMPT_DOMAIN_PROMPT, UmaPermission.LOCATION_OFF_APP_PROMPT_DOMAIN_BLOCKED, UmaPermission.LOCATION_OFF_APP_BLOCKED_DOMAIN_YES, UmaPermission.LOCATION_OFF_APP_BLOCKED_DOMAIN_PROMPT, UmaPermission.LOCATION_OFF_APP_BLOCKED_DOMAIN_BLOCKED, UmaPermission.UNSUITABLE_URL, UmaPermission.NOT_HTTPS" + errorLine1=" "Geolocation.Header.PermissionState", result, UmaPermission.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/geo/GeolocationHeader.java" + line="718" + column="77"/> </issue> - <issue id="WrongConstant" message="Must be one of: DirectActionId.GO_BACK, DirectActionId.RELOAD, DirectActionId.GO_FORWARD, DirectActionId.BOOKMARK_THIS_PAGE, DirectActionId.DOWNLOADS, DirectActionId.PREFERENCES, DirectActionId.OPEN_HISTORY, DirectActionId.HELP, DirectActionId.NEW_TAB, DirectActionId.CLOSE_TAB, DirectActionId.CLOSE_ALL_TABS, DirectActionId.FIND_IN_PAGE, DirectActionId.NUM_ENTRIES" errorLine1=" record(histogramId);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/directactions/DirectActionUsageHistogram.java" /> + <issue + id="WrongConstant" + message="Must be one of: GestureNavigationDirection.BACK, GestureNavigationDirection.FORWARD" + errorLine1=" GestureNavigationDirection.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/gesturenav/GestureNavMetrics.java" + line="52" + column="44"/> </issue> - <issue id="WrongConstant" message="Must be one of: ActionType.UNKNOWN, ActionType.DOWNLOAD_PAUSE, ActionType.DOWNLOAD_RESUME, ActionType.DOWNLOAD_CANCEL, ActionType.DOWNLOAD_PAGE_PAUSE, ActionType.DOWNLOAD_PAGE_RESUME, ActionType.DOWNLOAD_PAGE_CANCEL, ActionType.CONTENT_SUGGESTION_SETTINGS, ActionType.WEB_APP_ACTION_SHARE, ActionType.WEB_APP_ACTION_OPEN_IN_CHROME, ActionType.OFFLINE_CONTENT_SUGGESTION_SETTINGS, ActionType.SHARING_TRY_AGAIN, ActionType.SETTINGS, ActionType.ANNOUNCEMENT_ACK, ActionType.ANNOUNCEMENT_OPEN, ActionType.PRICE_DROP_VISIT_SITE, ActionType.PRICE_DROP_TURN_OFF_ALERT" errorLine1=" NotificationUmaTracker.ActionType.TWA_NOTIFICATION_ACCEPTANCE)" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/browserservices/ui/view/DisclosureNotification.java" /> + <issue + id="WrongConstant" + message="Must be one of: OverrideLanguageStatus.DIFFERENT, OverrideLanguageStatus.SAME_BASE, OverrideLanguageStatus.EXACT_MATCH, OverrideLanguageStatus.NO_OVERRIDE" + errorLine1=" IS_SYSTEM_LANGUAGE_HISTOGRAM, status, OverrideLanguageStatus.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/GlobalAppLocaleController.java" + line="154" + column="78"/> </issue> - <issue id="WrongConstant" message="Must be one of: DownloadLocationDirectoryType.DEFAULT, DownloadLocationDirectoryType.ADDITIONAL, DownloadLocationDirectoryType.ERROR" errorLine1=" DirectoryOption.DownloadLocationDirectoryType.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/DownloadDirectoryProvider.java" /> + <issue + id="WrongConstant" + message="Must be one of: WebView.RENDERER_PRIORITY_WAIVED, WebView.RENDERER_PRIORITY_BOUND, WebView.RENDERER_PRIORITY_IMPORTANT" + errorLine1=" return detail.rendererPriority();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/android_webview/glue/java/src/com/android/webview/chromium/GlueApiHelperForO.java" + line="45" + column="24"/> </issue> - <issue id="WrongConstant" message="Must be one of: DownloadLaterDialogChoice.DOWNLOAD_NOW, DownloadLaterDialogChoice.ON_WIFI, DownloadLaterDialogChoice.DOWNLOAD_LATER, DownloadLaterDialogChoice.CANCELLED" errorLine1=" "Download.Later.UI.DialogChoice.Main", choice, DownloadLaterDialogChoice.COUNT);" errorLine2=" ~~~~~"> - <location file="chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/DownloadLaterMetrics.java" /> + <issue + id="WrongConstant" + message="Must be one of: OmniboxSuggestionUiType.DEFAULT, OmniboxSuggestionUiType.EDIT_URL_SUGGESTION, OmniboxSuggestionUiType.ANSWER_SUGGESTION, OmniboxSuggestionUiType.ENTITY_SUGGESTION, OmniboxSuggestionUiType.TAIL_SUGGESTION, OmniboxSuggestionUiType.CLIPBOARD_SUGGESTION, OmniboxSuggestionUiType.TILE_SUGGESTION, OmniboxSuggestionUiType.TILE_NAVSUGGEST, OmniboxSuggestionUiType.PEDAL_SUGGESTION" + errorLine1=" return OmniboxSuggestionUiType.HEADER;" + errorLine2=" ~~~~~~"> + <location + file="$SRC/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/header/HeaderProcessor.java" + line="36" + column="40"/> </issue> - <issue id="WrongConstant" message="Must be one of: DownloadLaterDialogChoice.DOWNLOAD_NOW, DownloadLaterDialogChoice.ON_WIFI, DownloadLaterDialogChoice.DOWNLOAD_LATER, DownloadLaterDialogChoice.CANCELLED" errorLine1=" choice, DownloadLaterDialogChoice.COUNT);" errorLine2=" ~~~~~"> - <location file="chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/DownloadLaterMetrics.java" /> + <issue + id="WrongConstant" + message="Must be one of: HomepageLocationType.POLICY_NTP, HomepageLocationType.POLICY_OTHER, HomepageLocationType.PARTNER_PROVIDED_NTP, HomepageLocationType.PARTNER_PROVIDED_OTHER, HomepageLocationType.USER_CUSTOMIZED_NTP, HomepageLocationType.USER_CUSTOMIZED_OTHER, HomepageLocationType.DEFAULT_NTP" + errorLine1=" homepageLocationType, HomepageLocationType.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/homepage/HomepageManager.java" + line="308" + column="60"/> </issue> - <issue id="WrongConstant" message="Must be one of: DownloadLaterDialogChoice.DOWNLOAD_NOW, DownloadLaterDialogChoice.ON_WIFI, DownloadLaterDialogChoice.DOWNLOAD_LATER, DownloadLaterDialogChoice.CANCELLED" errorLine1=" "Download.Later.UI.DialogChoice.Infobar", choice, DownloadLaterDialogChoice.COUNT);" errorLine2=" ~~~~~"> - <location file="chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/DownloadLaterMetrics.java" /> + <issue + id="WrongConstant" + message="Must be one of: IdentityDiscState.NONE, IdentityDiscState.SMALL, IdentityDiscState.LARGE" + errorLine1=" private ProfileDataCache mProfileDataCache[] = new ProfileDataCache[IdentityDiscState.MAX];" + errorLine2=" ~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/identity_disc/IdentityDiscController.java" + line="81" + column="91"/> </issue> - <issue id="WrongConstant" message="Must be one of: DownloadLaterUiEvent.DOWNLOAD_LATER_DIALOG_SHOW, DownloadLaterUiEvent.DOWNLOAD_LATER_DIALOG_COMPLETE, DownloadLaterUiEvent.DOWNLOAD_LATER_DIALOG_CANCEL, DownloadLaterUiEvent.DATE_TIME_PICKER_SHOW, DownloadLaterUiEvent.DATE_TIME_PICKER_COMPLETE, DownloadLaterUiEvent.DATE_TIME_PICKER_CANCEL, DownloadLaterUiEvent.DOWNLOAD_HOME_CHANGE_SCHEDULE_CLICKED, DownloadLaterUiEvent.DOWNLOAD_HOME_CHANGE_SCHEDULE_COMPLETE, DownloadLaterUiEvent.DOWNLOAD_HOME_CHANGE_SCHEDULE_CANCEL, DownloadLaterUiEvent.DOWNLOAD_INFOBAR_CHANGE_SCHEDULE_CLICKED, DownloadLaterUiEvent.DOWNLOAD_INFOBAR_CHANGE_SCHEDULE_COMPLETE, DownloadLaterUiEvent.DOWNLOAD_INFOBAR_CHANGE_SCHEDULE_CANCEL, DownloadLaterUiEvent.DOWNLOAD_LATER_DIALOG_EDIT_CLICKED" errorLine1=" "Download.Later.UI.Events", event, DownloadLaterUiEvent.COUNT);" errorLine2=" ~~~~~"> - <location file="chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/DownloadLaterMetrics.java" /> + <issue + id="WrongConstant" + message="Must be one of: IdentityDiscState.NONE, IdentityDiscState.SMALL, IdentityDiscState.LARGE" + errorLine1=" for (int i = 0; i < IdentityDiscState.MAX; i++) {" + errorLine2=" ~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/identity_disc/IdentityDiscController.java" + line="221" + column="47"/> </issue> - <issue id="WrongConstant" message="Must be one of: DownloadLocationDirectoryType.DEFAULT, DownloadLocationDirectoryType.ADDITIONAL, DownloadLocationDirectoryType.ERROR" errorLine1=" directoryOption.type, DirectoryOption.DownloadLocationDirectoryType.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/DownloadLocationDialogCoordinator.java" /> + <issue + id="WrongConstant" + message="Must be one of: IdentityDiscState.NONE, IdentityDiscState.SMALL, IdentityDiscState.LARGE" + errorLine1=" for (int i = 0; i < IdentityDiscState.MAX; i++) {" + errorLine2=" ~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/identity_disc/IdentityDiscController.java" + line="287" + column="47"/> </issue> - <issue id="WrongConstant" message="Must be one of: DownloadLocationSuggestionEvent.LOCATION_SUGGESTION_SHOWN, DownloadLocationSuggestionEvent.NOT_ENOUGH_SPACE_SHOWN" errorLine1=" DownloadLocationSuggestionEvent.COUNT);" errorLine2=" ~~~~~"> - <location file="chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/DownloadLocationDialogMetrics.java" /> + <issue + id="WrongConstant" + message="Must be one of: ImageDescriptionsDialogAction.ENABLED, ImageDescriptionsDialogAction.ENABLED_ONLY_ON_WIFI, ImageDescriptionsDialogAction.JUST_ONCE, ImageDescriptionsDialogAction.JUST_ONCE_DONT_ASK_AGAIN, ImageDescriptionsDialogAction.CANCEL" + errorLine1=" action, ImageDescriptionsDialogAction.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/image_descriptions/android/java/src/org/chromium/chrome/browser/image_descriptions/ImageDescriptionsDialog.java" + line="274" + column="55"/> </issue> - <issue id="WrongConstant" message="Must be one of: DownloadLocationDirectoryType.DEFAULT, DownloadLocationDirectoryType.ADDITIONAL, DownloadLocationDirectoryType.ERROR" errorLine1=" option.type, DirectoryOption.DownloadLocationDirectoryType.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/settings/DownloadLocationPreferenceAdapter.java" /> + <issue + id="WrongConstant" + message="Must be one of: IncognitoCCTCallerId.OTHER_APPS, IncognitoCCTCallerId.GOOGLE_APPS, IncognitoCCTCallerId.OTHER_CHROME_FEATURES, IncognitoCCTCallerId.READER_MODE, IncognitoCCTCallerId.READ_LATER" + errorLine1=" && incognitoCCTChromeClientId < IntentHandler.IncognitoCCTCallerId.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/customtabs/IncognitoCustomTabIntentDataProvider.java" + line="179" + column="88"/> </issue> - <issue id="WrongConstant" message="Must be one of: DownloadState.IN_PROGRESS, DownloadState.COMPLETE, DownloadState.CANCELLED, DownloadState.INTERRUPTED, DownloadState.MAX_DOWNLOAD_STATE" errorLine1=" int state = downloadItem.getDownloadInfo().state();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java" /> + <issue + id="WrongConstant" + message="Must be one of: ExternalAppId.OTHER, ExternalAppId.GMAIL, ExternalAppId.FACEBOOK, ExternalAppId.PLUS, ExternalAppId.TWITTER, ExternalAppId.CHROME, ExternalAppId.HANGOUTS, ExternalAppId.MESSENGER, ExternalAppId.NEWS, ExternalAppId.LINE, ExternalAppId.WHATSAPP, ExternalAppId.GSA, ExternalAppId.WEBAPK, ExternalAppId.YAHOO_MAIL, ExternalAppId.VIBER, ExternalAppId.YOUTUBE" + errorLine1=" "MobileIntent.PageLoadDueToExternalApp", externalId, ExternalAppId.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.java" + line="486" + column="84"/> </issue> - <issue id="WrongConstant" message="Must be one of: DownloadState.IN_PROGRESS, DownloadState.COMPLETE, DownloadState.CANCELLED, DownloadState.INTERRUPTED, DownloadState.MAX_DOWNLOAD_STATE" errorLine1=" return (state == DownloadState.INTERRUPTED && !downloadItem.getDownloadInfo().isResumable())" errorLine2=" ~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java" /> + <issue + id="WrongConstant" + message="Must be one of: TabOpenType.OPEN_NEW_TAB, TabOpenType.REUSE_URL_MATCHING_TAB_ELSE_NEW_TAB, TabOpenType.REUSE_APP_ID_MATCHING_TAB_ELSE_NEW_TAB, TabOpenType.CLOBBER_CURRENT_TAB, TabOpenType.BRING_TAB_TO_FRONT, TabOpenType.OPEN_NEW_INCOGNITO_TAB, TabOpenType.REUSE_TAB_MATCHING_ID_ELSE_NEW_TAB" + errorLine1=" intent, TabOpenType.REUSE_TAB_MATCHING_ID_STRING, Tab.INVALID_TAB_ID);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.java" + line="1105" + column="37"/> </issue> - <issue id="WrongConstant" message="Must be one of: DownloadState.IN_PROGRESS, DownloadState.COMPLETE, DownloadState.CANCELLED, DownloadState.INTERRUPTED, DownloadState.MAX_DOWNLOAD_STATE" errorLine1=" || state == DownloadState.CANCELLED;" errorLine2=" ~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/download/DownloadManagerService.java" /> + <issue + id="WrongConstant" + message="Must be one of: ULPInitiationStatus.SUCCESS, ULPInitiationStatus.NOT_SUPPORTED, ULPInitiationStatus.TIMED_OUT, ULPInitiationStatus.FAILURE" + errorLine1=" INITIATION_STATUS_HISTOGRAM, initStatus, ULPInitiationStatus.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/components/language/android/java/src/org/chromium/components/language/LanguageProfileMetricsLogger.java" + line="46" + column="78"/> </issue> - <issue id="WrongConstant" message="Must be one of: DownloadLocationDirectoryType.DEFAULT, DownloadLocationDirectoryType.ADDITIONAL, DownloadLocationDirectoryType.ERROR" errorLine1=" DirectoryOption.DownloadLocationDirectoryType.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/download/DownloadMetrics.java" /> + <issue + id="WrongConstant" + message="Must be one of: ULPInitiationStatus.SUCCESS, ULPInitiationStatus.NOT_SUPPORTED, ULPInitiationStatus.TIMED_OUT, ULPInitiationStatus.FAILURE" + errorLine1=" initStatus, ULPInitiationStatus.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/components/language/android/java/src/org/chromium/components/language/LanguageProfileMetricsLogger.java" + line="49" + column="53"/> </issue> - <issue id="WrongConstant" message="Must be one of: ServiceStopped.STOPPED, ServiceStopped.DESTROYED, ServiceStopped.TASK_REMOVED, ServiceStopped.LOW_MEMORY, ServiceStopped.START_STICKY" errorLine1=" ServiceStopped.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationUmaHelper.java" /> + <issue + id="WrongConstant" + message="Must be one of: ULPInitiationStatus.SUCCESS, ULPInitiationStatus.NOT_SUPPORTED, ULPInitiationStatus.TIMED_OUT, ULPInitiationStatus.FAILURE" + errorLine1=" initStatus, ULPInitiationStatus.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/components/language/android/java/src/org/chromium/components/language/LanguageProfileMetricsLogger.java" + line="52" + column="53"/> </issue> - <issue id="WrongConstant" message="Must be one of: ForegroundLifecycle.START, ForegroundLifecycle.UPDATE, ForegroundLifecycle.STOP" errorLine1=" ForegroundLifecycle.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationUmaHelper.java" /> + <issue + id="WrongConstant" + message="Must be one of: LanguageSplitInstallStatus.SUCCESS, LanguageSplitInstallStatus.ALREADY_INSTALLED, LanguageSplitInstallStatus.CANCELED, LanguageSplitInstallStatus.DOWNLOADED, LanguageSplitInstallStatus.FAILED, LanguageSplitInstallStatus.UNEXPECTED_STATUS" + errorLine1=" enumCode, LanguageSplitInstallStatus.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/LanguageSplitInstaller.java" + line="197" + column="54"/> </issue> - <issue id="WrongConstant" message="Must be one of: StateAtCancel.DOWNLOADING, StateAtCancel.PAUSED, StateAtCancel.PENDING_NETWORK, StateAtCancel.PENDING_ANOTHER_DOWNLOAD" errorLine1=" StateAtCancel.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationUmaHelper.java" /> + <issue + id="WrongConstant" + message="Must be one of: LanguageSettingsPageType.PAGE_MAIN, LanguageSettingsPageType.CONTENT_LANGUAGE_ADD_LANGUAGE, LanguageSettingsPageType.CHANGE_CHROME_LANGUAGE, LanguageSettingsPageType.ADVANCED_LANGUAGE_SETTINGS, LanguageSettingsPageType.CHANGE_TARGET_LANGUAGE, LanguageSettingsPageType.LANGUAGE_OVERFLOW_MENU_OPENED, LanguageSettingsPageType.VIEW_NEVER_TRANSLATE_LANGUAGES, LanguageSettingsPageType.NEVER_TRANSLATE_ADD_LANGUAGE, LanguageSettingsPageType.VIEW_ALWAYS_TRANSLATE_LANGUAGES, LanguageSettingsPageType.ALWAYS_TRANSLATE_ADD_LANGUAGE, LanguageSettingsPageType.VIEW_NEVER_TRANSLATE_SITES" + errorLine1=" "LanguageSettings.PageImpression", pageType, LanguageSettingsPageType.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/LanguagesManager.java" + line="398" + column="87"/> </issue> - <issue id="WrongConstant" message="Must be one of: StateAtCancel.DOWNLOADING, StateAtCancel.PAUSED, StateAtCancel.PENDING_NETWORK, StateAtCancel.PENDING_ANOTHER_DOWNLOAD" errorLine1=" StateAtCancel.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationUmaHelper.java" /> + <issue + id="WrongConstant" + message="Must be one of: LanguageSettingsActionType.LANGUAGE_ADDED, LanguageSettingsActionType.LANGUAGE_REMOVED, LanguageSettingsActionType.DISABLE_TRANSLATE_GLOBALLY, LanguageSettingsActionType.ENABLE_TRANSLATE_GLOBALLY, LanguageSettingsActionType.DISABLE_TRANSLATE_FOR_SINGLE_LANGUAGE, LanguageSettingsActionType.ENABLE_TRANSLATE_FOR_SINGLE_LANGUAGE, LanguageSettingsActionType.LANGUAGE_LIST_REORDERED, LanguageSettingsActionType.CHANGE_CHROME_LANGUAGE, LanguageSettingsActionType.CHANGE_TARGET_LANGUAGE, LanguageSettingsActionType.REMOVE_FROM_NEVER_TRANSLATE, LanguageSettingsActionType.ADD_TO_NEVER_TRANSLATE, LanguageSettingsActionType.REMOVE_FROM_ALWAYS_TRANSLATE, LanguageSettingsActionType.ADD_TO_ALWAYS_TRANSLATE, LanguageSettingsActionType.REMOVE_SITE_FROM_NEVER_TRANSLATE, LanguageSettingsActionType.RESTART_CHROME" + errorLine1=" "LanguageSettings.Actions", actionType, LanguageSettingsActionType.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/LanguagesManager.java" + line="406" + column="84"/> </issue> - <issue id="WrongConstant" message="Must be one of: UmaDownloadResumption.MANUAL_PAUSE, UmaDownloadResumption.BROWSER_KILLED, UmaDownloadResumption.CLICKED, UmaDownloadResumption.FAILED, UmaDownloadResumption.AUTO_STARTED, UmaDownloadResumption.BROWSER_RUNNING, UmaDownloadResumption.BROWSER_NOT_RUNNING" errorLine1=" "MobileDownload.DownloadResumption", type, UmaDownloadResumption.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationUmaHelper.java" /> + <issue + id="WrongConstant" + message="Must be one of: LaunchCause.OTHER, LaunchCause.CUSTOM_TAB, LaunchCause.TWA, LaunchCause.RECENTS, LaunchCause.RECENTS_OR_BACK, LaunchCause.FOREGROUND_WHEN_LOCKED, LaunchCause.MAIN_LAUNCHER_ICON, LaunchCause.MAIN_LAUNCHER_ICON_SHORTCUT, LaunchCause.HOME_SCREEN_WIDGET, LaunchCause.OPEN_IN_BROWSER_FROM_MENU, LaunchCause.EXTERNAL_SEARCH_ACTION_INTENT, LaunchCause.NOTIFICATION, LaunchCause.EXTERNAL_VIEW_INTENT, LaunchCause.OTHER_CHROME, LaunchCause.WEBAPK_CHROME_DISTRIBUTOR, LaunchCause.WEBAPK_OTHER_DISTRIBUTOR, LaunchCause.HOME_SCREEN_SHORTCUT" + errorLine1=" LAUNCH_CAUSE_HISTOGRAM, cause, LaunchCause.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/app/metrics/LaunchCauseMetrics.java" + line="198" + column="64"/> </issue> - <issue id="WrongConstant" message="Must be one of: OmniboxSuggestionUiType.DEFAULT, OmniboxSuggestionUiType.EDIT_URL_SUGGESTION, OmniboxSuggestionUiType.ANSWER_SUGGESTION, OmniboxSuggestionUiType.ENTITY_SUGGESTION, OmniboxSuggestionUiType.TAIL_SUGGESTION, OmniboxSuggestionUiType.CLIPBOARD_SUGGESTION, OmniboxSuggestionUiType.TILE_SUGGESTION, OmniboxSuggestionUiType.TILE_NAVSUGGEST, OmniboxSuggestionUiType.PEDAL_SUGGESTION" errorLine1=" return (info.type == OmniboxSuggestionUiType.HEADER && info.groupId == groupId);" errorLine2=" ~~~~~~"> - <location file="chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/DropdownItemViewInfoListManager.java" /> + <issue + id="WrongConstant" + message="Must be one of: LaunchCause.OTHER, LaunchCause.CUSTOM_TAB, LaunchCause.TWA, LaunchCause.RECENTS, LaunchCause.RECENTS_OR_BACK, LaunchCause.FOREGROUND_WHEN_LOCKED, LaunchCause.MAIN_LAUNCHER_ICON, LaunchCause.MAIN_LAUNCHER_ICON_SHORTCUT, LaunchCause.HOME_SCREEN_WIDGET, LaunchCause.OPEN_IN_BROWSER_FROM_MENU, LaunchCause.EXTERNAL_SEARCH_ACTION_INTENT, LaunchCause.NOTIFICATION, LaunchCause.EXTERNAL_VIEW_INTENT, LaunchCause.OTHER_CHROME, LaunchCause.WEBAPK_CHROME_DISTRIBUTOR, LaunchCause.WEBAPK_OTHER_DISTRIBUTOR, LaunchCause.HOME_SCREEN_SHORTCUT" + errorLine1=" LAUNCH_CAUSE_HISTOGRAM, cause, LaunchCause.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/app/metrics/LaunchCauseMetrics.java" + line="207" + column="68"/> </issue> - <issue id="WrongConstant" message="Must be one of: DuplicateDownloadDialogEvent.DUPLICATE_DOWNLOAD_DIALOG_SHOW, DuplicateDownloadDialogEvent.DUPLICATE_DOWNLOAD_DIALOG_CONFIRM, DuplicateDownloadDialogEvent.DUPLICATE_DOWNLOAD_DIALOG_CANCEL, DuplicateDownloadDialogEvent.DUPLICATE_DOWNLOAD_DIALOG_LINK_CLICKED, DuplicateDownloadDialogEvent.DUPLICATE_DOWNLOAD_DIALOG_DISMISS" errorLine1=" event, DuplicateDownloadDialogEvent.COUNT);" errorLine2=" ~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/download/DuplicateDownloadDialog.java" /> + <issue + id="WrongConstant" + message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" + errorLine1=" mScrollDirection = ScrollDirection.UNKNOWN;" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerChrome.java" + line="373" + column="32"/> </issue> - <issue id="WrongConstant" message="Must be one of: ExploreSitesCatalogUpdateRequestSource.NEW_TAB_PAGE, ExploreSitesCatalogUpdateRequestSource.EXPLORE_SITES_PAGE, ExploreSitesCatalogUpdateRequestSource.BACKGROUND" errorLine1=" ExploreSitesCatalogUpdateRequestSource.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/explore_sites/ExploreSitesBackgroundTask.java" /> + <issue + id="WrongConstant" + message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" + errorLine1=" mScrollDirection = ScrollDirection.UNKNOWN;" + errorLine2=" ~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerChrome.java" + line="373" + column="48"/> </issue> - <issue id="WrongConstant" message="Must be one of: CategoryType.MORE_BUTTON, CategoryType.DEFAULT, CategoryType.SOCIAL, CategoryType.ENTERTAINMENT, CategoryType.SPORT, CategoryType.NEWS, CategoryType.SHOPPING, CategoryType.REFERENCE, CategoryType.BANKING, CategoryType.GOVERNMENT, CategoryType.TRAVEL, CategoryType.EDUCATION, CategoryType.JOBS, CategoryType.APPS_GAMES, CategoryType.FAVORITE, CategoryType.GOOGLE, CategoryType.FOOD, CategoryType.HEALTH, CategoryType.BOOKS, CategoryType.TECHNOLOGY, CategoryType.SCIENCE" errorLine1=" ExploreSitesCategory.CategoryType.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/explore_sites/ExploreSitesCategoryCardView.java" /> + <issue + id="WrongConstant" + message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" + errorLine1=" if (mScrollDirection != ScrollDirection.UNKNOWN) {" + errorLine2=" ~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerChrome.java" + line="388" + column="53"/> </issue> - <issue id="WrongConstant" message="Must be one of: AiaIntent.FALLBACK_USED, AiaIntent.SERP, AiaIntent.OTHER" errorLine1=" AiaIntent.FALLBACK_USED, AiaIntent.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="components/external_intents/android/java/src/org/chromium/components/external_intents/ExternalNavigationHandler.java" /> + <issue + id="WrongConstant" + message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" + errorLine1=" if (mScrollDirection == ScrollDirection.UNKNOWN) return;" + errorLine2=" ~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerChrome.java" + line="394" + column="53"/> </issue> - <issue id="WrongConstant" message="Must be one of: AiaIntent.FALLBACK_USED, AiaIntent.SERP, AiaIntent.OTHER" errorLine1=" AiaIntent.OTHER, AiaIntent.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="components/external_intents/android/java/src/org/chromium/components/external_intents/ExternalNavigationHandler.java" /> + <issue + id="WrongConstant" + message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" + errorLine1=" int direction = ScrollDirection.UNKNOWN;" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerChrome.java" + line="435" + column="29"/> </issue> - <issue id="WrongConstant" message="Must be one of: AiaIntent.FALLBACK_USED, AiaIntent.SERP, AiaIntent.OTHER" errorLine1=" AiaIntent.SERP, AiaIntent.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="components/external_intents/android/java/src/org/chromium/components/external_intents/ExternalNavigationHandler.java" /> + <issue + id="WrongConstant" + message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" + errorLine1=" int direction = ScrollDirection.UNKNOWN;" + errorLine2=" ~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerChrome.java" + line="435" + column="45"/> </issue> - <issue id="WrongConstant" message="Must be one of: StreamTabId.DEFAULT, StreamTabId.FOR_YOU, StreamTabId.FOLLOWING" errorLine1=" mSectionHeaderModel.set(SectionHeaderListProperties.CURRENT_TAB_INDEX_KEY, tabId);" errorLine2=" ~~~~~"> - <location file="chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/FeedSurfaceMediator.java" /> + <issue + id="WrongConstant" + message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" + errorLine1=" direction = ScrollDirection.LEFT;" + errorLine2=" ~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerChrome.java" + line="441" + column="17"/> </issue> - <issue id="WrongConstant" message="Must be one of: StorageRequestType.SAVE, StorageRequestType.RESTORE, StorageRequestType.DELETE" errorLine1=" storageRequest.getStorageRequestType(), StorageRequestType.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/tab/java/src/org/chromium/chrome/browser/tab/state/FilePersistedTabDataStorage.java" /> + <issue + id="WrongConstant" + message="Must be one of: LensSupportStatus.LENS_SEARCH_SUPPORTED, LensSupportStatus.NON_GOOGLE_SEARCH_ENGINE, LensSupportStatus.ACTIVITY_NOT_ACCESSIBLE, LensSupportStatus.OUT_OF_DATE, LensSupportStatus.SEARCH_BY_IMAGE_UNAVAILABLE, LensSupportStatus.LEGACY_OS, LensSupportStatus.INVALID_PACKAGE, LensSupportStatus.LENS_SHOP_SUPPORTED, LensSupportStatus.LENS_SHOP_AND_SEARCH_SUPPORTED, LensSupportStatus.CAMERA_NOT_AVAILABLE, LensSupportStatus.DISABLED_ON_LOW_END_DEVICE, LensSupportStatus.AGSA_VERSION_NOT_SUPPORTED, LensSupportStatus.DISABLED_ON_INCOGNITO, LensSupportStatus.DISABLED_ON_TABLET, LensSupportStatus.DISABLED_FOR_ENTERPRISE_USER" + errorLine1=" histogramName, reason, LensSupportStatus.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/lens/java/src/org/chromium/chrome/browser/lens/LensMetrics.java" + line="55" + column="58"/> </issue> - <issue id="WrongConstant" message="Must be one of: Type.ALL, Type.PAGE, Type.VIDEO, Type.AUDIO, Type.IMAGE, Type.DOCUMENT, Type.OTHER" errorLine1=" "Android.DownloadManager.Filter", selectedTab, DownloadFilter.Type.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/download/internal/android/java/src/org/chromium/chrome/browser/download/home/metrics/FilterChangeLogger.java" /> + <issue + id="WrongConstant" + message="Must be one of: ShareDestination.FIRST_PARTY, ShareDestination.THIRD_PARTY" + errorLine1=" ShareDestination.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/content_creation/reactions/internal/android/java/src/org/chromium/chrome/browser/content_creation/reactions/LightweightReactionsMetrics.java" + line="160" + column="34"/> </issue> - <issue id="WrongConstant" message="Must be one of: FilterType.NONE, FilterType.SITES, FilterType.VIDEOS, FilterType.MUSIC, FilterType.IMAGES, FilterType.DOCUMENT, FilterType.OTHER, FilterType.PREFETCHED" errorLine1=" if (filter < 0 || filter >= FilterType.NUM_ENTRIES) filter = FilterType.NONE;" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/download/internal/android/java/src/org/chromium/chrome/browser/download/home/filter/Filters.java" /> + <issue + id="WrongConstant" + message="Must be one of: DeviceOrientation.LANDSCAPE, DeviceOrientation.PORTRAIT" + errorLine1=" DeviceOrientation.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/content_creation/reactions/internal/android/java/src/org/chromium/chrome/browser/content_creation/reactions/LightweightReactionsMetrics.java" + line="234" + column="35"/> </issue> - <issue id="WrongConstant" message="Must be one of: LayoutType.WARNING_MESSAGE, LayoutType.TOGGLEABLE_FLAG" errorLine1=" return LayoutType.COUNT;" errorLine2=" ~~~~~"> - <location file="android_webview/nonembedded/java/src/org/chromium/android_webview/devui/FlagsFragment.java" /> + <issue + id="WrongConstant" + message="Must be one of: LightweightReactionsFunnel.DIALOG_OPENED, LightweightReactionsFunnel.EDITING_DONE, LightweightReactionsFunnel.GIF_GENERATED, LightweightReactionsFunnel.GIF_SHARED" + errorLine1=" assert funnelState < LightweightReactionsFunnel.NUM_ENTRIES;" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/content_creation/reactions/internal/android/java/src/org/chromium/chrome/browser/content_creation/reactions/LightweightReactionsMetrics.java" + line="274" + column="57"/> </issue> - <issue id="WrongConstant" message="Must be one of: WebPushDeviceState.NOT_IDLE_NOT_HIGH_PRIORITY, WebPushDeviceState.NOT_IDLE_HIGH_PRIORITY, WebPushDeviceState.IDLE_NOT_HIGH_PRIORITY, WebPushDeviceState.IDLE_HIGH_PRIORITY" errorLine1=" "GCM.WebPushReceived.DeviceState", state, WebPushDeviceState.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/services/gcm/GcmUma.java" /> + <issue + id="WrongConstant" + message="Must be one of: LightweightReactionsFunnel.DIALOG_OPENED, LightweightReactionsFunnel.EDITING_DONE, LightweightReactionsFunnel.GIF_GENERATED, LightweightReactionsFunnel.GIF_SHARED" + errorLine1=" "LightweightReactions.Funnel", funnelState, LightweightReactionsFunnel.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/content_creation/reactions/internal/android/java/src/org/chromium/chrome/browser/content_creation/reactions/LightweightReactionsMetrics.java" + line="278" + column="88"/> </issue> - <issue id="WrongConstant" message="Must be one of: UmaPermission.UNKNOWN, UmaPermission.HIGH_ACCURACY_APP_YES_DOMAIN_YES_LOCATION, UmaPermission.HIGH_ACCURACY_APP_YES_DOMAIN_YES_NO_LOCATION, UmaPermission.HIGH_ACCURACY_APP_YES_DOMAIN_PROMPT_LOCATION, UmaPermission.HIGH_ACCURACY_APP_YES_DOMAIN_PROMPT_NO_LOCATION, UmaPermission.HIGH_ACCURACY_APP_YES_DOMAIN_BLOCKED, UmaPermission.HIGH_ACCURACY_APP_PROMPT_DOMAIN_YES, UmaPermission.HIGH_ACCURACY_APP_PROMPT_DOMAIN_PROMPT, UmaPermission.HIGH_ACCURACY_APP_PROMPT_DOMAIN_BLOCKED, UmaPermission.HIGH_ACCURACY_APP_BLOCKED_DOMAIN_YES, UmaPermission.HIGH_ACCURACY_APP_BLOCKED_DOMAIN_PROMPT, UmaPermission.HIGH_ACCURACY_APP_BLOCKED_DOMAIN_BLOCKED, UmaPermission.BATTERY_SAVING_APP_YES_DOMAIN_YES_LOCATION, UmaPermission.BATTERY_SAVING_APP_YES_DOMAIN_YES_NO_LOCATION, UmaPermission.BATTERY_SAVING_APP_YES_DOMAIN_PROMPT_LOCATION, UmaPermission.BATTERY_SAVING_APP_YES_DOMAIN_PROMPT_NO_LOCATION, UmaPermission.BATTERY_SAVING_APP_YES_DOMAIN_BLOCKED, UmaPermission.BATTERY_SAVING_APP_PROMPT_DOMAIN_YES, UmaPermission.BATTERY_SAVING_APP_PROMPT_DOMAIN_PROMPT, UmaPermission.BATTERY_SAVING_APP_PROMPT_DOMAIN_BLOCKED, UmaPermission.BATTERY_SAVING_APP_BLOCKED_DOMAIN_YES, UmaPermission.BATTERY_SAVING_APP_BLOCKED_DOMAIN_PROMPT, UmaPermission.BATTERY_SAVING_APP_BLOCKED_DOMAIN_BLOCKED, UmaPermission.GPS_ONLY_APP_YES_DOMAIN_YES_LOCATION, UmaPermission.GPS_ONLY_APP_YES_DOMAIN_YES_NO_LOCATION, UmaPermission.GPS_ONLY_APP_YES_DOMAIN_PROMPT_LOCATION, UmaPermission.GPS_ONLY_APP_YES_DOMAIN_PROMPT_NO_LOCATION, UmaPermission.GPS_ONLY_APP_YES_DOMAIN_BLOCKED, UmaPermission.GPS_ONLY_APP_PROMPT_DOMAIN_YES, UmaPermission.GPS_ONLY_APP_PROMPT_DOMAIN_PROMPT, UmaPermission.GPS_ONLY_APP_PROMPT_DOMAIN_BLOCKED, UmaPermission.GPS_ONLY_APP_BLOCKED_DOMAIN_YES, UmaPermission.GPS_ONLY_APP_BLOCKED_DOMAIN_PROMPT, UmaPermission.GPS_ONLY_APP_BLOCKED_DOMAIN_BLOCKED, UmaPermission.LOCATION_OFF_APP_YES_DOMAIN_YES, UmaPermission.LOCATION_OFF_APP_YES_DOMAIN_PROMPT, UmaPermission.LOCATION_OFF_APP_YES_DOMAIN_BLOCKED, UmaPermission.LOCATION_OFF_APP_PROMPT_DOMAIN_YES, UmaPermission.LOCATION_OFF_APP_PROMPT_DOMAIN_PROMPT, UmaPermission.LOCATION_OFF_APP_PROMPT_DOMAIN_BLOCKED, UmaPermission.LOCATION_OFF_APP_BLOCKED_DOMAIN_YES, UmaPermission.LOCATION_OFF_APP_BLOCKED_DOMAIN_PROMPT, UmaPermission.LOCATION_OFF_APP_BLOCKED_DOMAIN_BLOCKED, UmaPermission.UNSUITABLE_URL, UmaPermission.NOT_HTTPS" errorLine1=" "Geolocation.Header.PermissionState", result, UmaPermission.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/geo/GeolocationHeader.java" /> + <issue + id="WrongConstant" + message="Must be one of: OmniboxFocusReason.OMNIBOX_TAP, OmniboxFocusReason.OMNIBOX_LONG_PRESS, OmniboxFocusReason.FAKE_BOX_TAP, OmniboxFocusReason.FAKE_BOX_LONG_PRESS, OmniboxFocusReason.ACCELERATOR_TAP, OmniboxFocusReason.TAB_SWITCHER_OMNIBOX_TAP, OmniboxFocusReason.TASKS_SURFACE_FAKE_BOX_TAP, OmniboxFocusReason.TASKS_SURFACE_FAKE_BOX_LONG_PRESS, OmniboxFocusReason.DEFAULT_WITH_HARDWARE_KEYBOARD, OmniboxFocusReason.SEARCH_QUERY, OmniboxFocusReason.LAUNCH_NEW_INCOGNITO_TAB, OmniboxFocusReason.MENU_OR_KEYBOARD_ACTION, OmniboxFocusReason.UNFOCUS, OmniboxFocusReason.QUERY_TILES_NTP_TAP" + errorLine1=" "Android.OmniboxFocusReason", reason, OmniboxFocusReason.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarMediator.java" + line="999" + column="74"/> </issue> - <issue id="WrongConstant" message="Must be one of: GestureNavigationDirection.BACK, GestureNavigationDirection.FORWARD" errorLine1=" GestureNavigationDirection.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/gesturenav/GestureNavMetrics.java" /> + <issue + id="WrongConstant" + message="Must be one of: LongScreenshotsEvent.DIALOG_OPEN, LongScreenshotsEvent.DIALOG_CANCEL, LongScreenshotsEvent.DIALOG_OK, LongScreenshotsEvent.GENERATOR_CAPTURE_GENERATION_ERROR, LongScreenshotsEvent.GENERATOR_CAPTURE_INSUFFICIENT_MEMORY, LongScreenshotsEvent.GENERATOR_COMPOSITOR_CAPTURE_COMPLETE, LongScreenshotsEvent.GENERATOR_COMPOSITOR_MEMORY_PRESSURE, LongScreenshotsEvent.GENERATOR_COMPOSITOR_GENERATION_ERROR" + errorLine1=" "Sharing.LongScreenshots.Event", action, LongScreenshotsEvent.COUNT);" + errorLine2=" ~~~~~"> + <location + file="$SRC/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/long_screenshots/LongScreenshotsMetrics.java" + line="80" + column="79"/> </issue> - <issue id="WrongConstant" message="Must be one of: OverrideLanguageStatus.DIFFERENT, OverrideLanguageStatus.SAME_BASE, OverrideLanguageStatus.EXACT_MATCH, OverrideLanguageStatus.NO_OVERRIDE" errorLine1=" IS_SYSTEM_LANGUAGE_HISTOGRAM, status, OverrideLanguageStatus.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/GlobalAppLocaleController.java" /> + <issue + id="WrongConstant" + message="Must be one of: BitmapGenerationStatus.UNKNOWN, BitmapGenerationStatus.OK, BitmapGenerationStatus.DIRECTORY_CREATION_FAILED, BitmapGenerationStatus.CAPTURE_FAILED, BitmapGenerationStatus.PROTO_SERIALIZATION_FAILED, BitmapGenerationStatus.WEB_CONTENTS_GONE, BitmapGenerationStatus.NATIVE_SERVICE_UNINITIALIZED, BitmapGenerationStatus.LOW_MEMORY_DETECTED, BitmapGenerationStatus.PROTO_DESERIALIZATION_FAILED, BitmapGenerationStatus.NATIVE_SERVICE_NOT_INITIALIZED" + errorLine1=" status, BitmapGenerationStatus.COUNT);" + errorLine2=" ~~~~~"> + <location + file="$SRC/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/long_screenshots/LongScreenshotsMetrics.java" + line="89" + column="48"/> </issue> - <issue id="WrongConstant" message="Must be one of: WebView.RENDERER_PRIORITY_WAIVED, WebView.RENDERER_PRIORITY_BOUND, WebView.RENDERER_PRIORITY_IMPORTANT" errorLine1=" return detail.rendererPriority();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="android_webview/glue/java/src/com/android/webview/chromium/GlueApiHelperForO.java" /> + <issue + id="WrongConstant" + message="Must be one of: MenuChoice.SWITCH_PROVIDER, MenuChoice.REPORT_BUG, MenuChoice.CHECK_UPDATES, MenuChoice.CRASHES_REFRESH, MenuChoice.ABOUT_DEVTOOLS, MenuChoice.COMPONENTS_UI, MenuChoice.COMPONENTS_UPDATE" + errorLine1=" "Android.WebView.DevUi.MenuSelection", selectedMenuItem, MenuChoice.COUNT);" + errorLine2=" ~~~~~"> + <location + file="$SRC/android_webview/nonembedded/java/src/org/chromium/android_webview/devui/MainActivity.java" + line="80" + column="85"/> </issue> - <issue id="WrongConstant" message="Must be one of: OmniboxSuggestionUiType.DEFAULT, OmniboxSuggestionUiType.EDIT_URL_SUGGESTION, OmniboxSuggestionUiType.ANSWER_SUGGESTION, OmniboxSuggestionUiType.ENTITY_SUGGESTION, OmniboxSuggestionUiType.TAIL_SUGGESTION, OmniboxSuggestionUiType.CLIPBOARD_SUGGESTION, OmniboxSuggestionUiType.TILE_SUGGESTION, OmniboxSuggestionUiType.TILE_NAVSUGGEST, OmniboxSuggestionUiType.PEDAL_SUGGESTION" errorLine1=" return OmniboxSuggestionUiType.HEADER;" errorLine2=" ~~~~~~"> - <location file="chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/header/HeaderProcessor.java" /> + <issue + id="WrongConstant" + message="Must be one of: FragmentNavigation.HOME_FRAGMENT, FragmentNavigation.CRASHES_LIST_FRAGMENT, FragmentNavigation.FLAGS_FRAGMENT, FragmentNavigation.COMPONENTS_LIST_FRAGMENT" + errorLine1=" FragmentNavigation.COUNT);" + errorLine2=" ~~~~~"> + <location + file="$SRC/android_webview/nonembedded/java/src/org/chromium/android_webview/devui/MainActivity.java" + line="136" + column="36"/> </issue> - <issue id="WrongConstant" message="Must be one of: HomepageLocationType.POLICY_NTP, HomepageLocationType.POLICY_OTHER, HomepageLocationType.PARTNER_PROVIDED_NTP, HomepageLocationType.PARTNER_PROVIDED_OTHER, HomepageLocationType.USER_CUSTOMIZED_NTP, HomepageLocationType.USER_CUSTOMIZED_OTHER, HomepageLocationType.DEFAULT_NTP" errorLine1=" homepageLocationType, HomepageLocationType.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/homepage/HomepageManager.java" /> + <issue + id="WrongConstant" + message="Must be one of: StateProperty.BAR, StateProperty.VISIBLE_SHEET, StateProperty.HIDDEN_SHEET" + errorLine1=" return (state & StateProperty.FLOATING) != 0;" + errorLine2=" ~~~~~~~~"> + <location + file="$SRC/chrome/android/features/keyboard_accessory/internal/java/src/org/chromium/chrome/browser/keyboard_accessory/ManualFillingMediator.java" + line="728" + column="39"/> </issue> - <issue id="WrongConstant" message="Must be one of: IdentityDiscState.NONE, IdentityDiscState.SMALL, IdentityDiscState.LARGE" errorLine1=" private ProfileDataCache mProfileDataCache[] = new ProfileDataCache[IdentityDiscState.MAX];" errorLine2=" ~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/identity_disc/IdentityDiscController.java" /> + <issue + id="WrongConstant" + message="Must be one of: StateProperty.BAR, StateProperty.VISIBLE_SHEET, StateProperty.HIDDEN_SHEET" + errorLine1=" int FLOATING_BAR = BAR | HIDDEN_SHEET | FLOATING; // == 13" + errorLine2=" ~~~~~~~~"> + <location + file="$SRC/chrome/android/features/keyboard_accessory/internal/java/src/org/chromium/chrome/browser/keyboard_accessory/ManualFillingProperties.java" + line="68" + column="49"/> </issue> - <issue id="WrongConstant" message="Must be one of: IdentityDiscState.NONE, IdentityDiscState.SMALL, IdentityDiscState.LARGE" errorLine1=" for (int i = 0; i < IdentityDiscState.MAX; i++) {" errorLine2=" ~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/identity_disc/IdentityDiscController.java" /> + <issue + id="WrongConstant" + message="Must be one of: StateProperty.BAR, StateProperty.VISIBLE_SHEET, StateProperty.HIDDEN_SHEET" + errorLine1=" int FLOATING_SHEET = BAR | VISIBLE_SHEET | FLOATING; // == 11" + errorLine2=" ~~~~~~~~"> + <location + file="$SRC/chrome/android/features/keyboard_accessory/internal/java/src/org/chromium/chrome/browser/keyboard_accessory/ManualFillingProperties.java" + line="69" + column="52"/> </issue> - <issue id="WrongConstant" message="Must be one of: IdentityDiscState.NONE, IdentityDiscState.SMALL, IdentityDiscState.LARGE" errorLine1=" for (int i = 0; i < IdentityDiscState.MAX; i++) {" errorLine2=" ~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/identity_disc/IdentityDiscController.java" /> + <issue + id="WrongConstant" + message="Must be one of: ViewCompat.LAYOUT_DIRECTION_LTR, ViewCompat.LAYOUT_DIRECTION_RTL" + errorLine1=" if (ViewCompat.getLayoutDirection(this) == View.LAYOUT_DIRECTION_RTL) {" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/MaterialProgressBar.java" + line="232" + column="52"/> </issue> - <issue id="WrongConstant" message="Must be one of: ImageDescriptionsDialogAction.ENABLED, ImageDescriptionsDialogAction.ENABLED_ONLY_ON_WIFI, ImageDescriptionsDialogAction.JUST_ONCE, ImageDescriptionsDialogAction.JUST_ONCE_DONT_ASK_AGAIN, ImageDescriptionsDialogAction.CANCEL" errorLine1=" action, ImageDescriptionsDialogAction.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/image_descriptions/android/java/src/org/chromium/chrome/browser/image_descriptions/ImageDescriptionsDialog.java" /> + <issue + id="WrongConstant" + message="Must be one of: ChannelId.BROWSER, ChannelId.DOWNLOADS, ChannelId.INCOGNITO, ChannelId.MEDIA_PLAYBACK, ChannelId.SCREEN_CAPTURE, ChannelId.CONTENT_SUGGESTIONS, ChannelId.WEBAPP_ACTIONS, ChannelId.SITES, ChannelId.SHARING, ChannelId.UPDATES, ChannelId.COMPLETED_DOWNLOADS, ChannelId.PERMISSION_REQUESTS, ChannelId.PERMISSION_REQUESTS_HIGH, ChannelId.ANNOUNCEMENT, ChannelId.WEBAPPS, ChannelId.WEBAPPS_QUIET, ChannelId.PRICE_DROP, ChannelId.SECURITY_KEY, ChannelId.CHROME_TIPS, ChannelId.BLUETOOTH, ChannelId.USB" + errorLine1=" : ChromeChannelDefinitions.ChannelId.WEBRTC_CAM_AND_MIC;" + errorLine2=" ~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/media/MediaCaptureNotificationServiceImpl.java" + line="180" + column="54"/> </issue> - <issue id="WrongConstant" message="Must be one of: IncognitoCCTCallerId.OTHER_APPS, IncognitoCCTCallerId.GOOGLE_APPS, IncognitoCCTCallerId.OTHER_CHROME_FEATURES, IncognitoCCTCallerId.READER_MODE, IncognitoCCTCallerId.READ_LATER" errorLine1=" && incognitoCCTChromeClientId < IntentHandler.IncognitoCCTCallerId.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/customtabs/IncognitoCustomTabIntentDataProvider.java" /> + <issue + id="WrongConstant" + message="Must be one of: HWEncoder.QcomVp8, HWEncoder.QcomH264, HWEncoder.ExynosVp8, HWEncoder.ExynosVp9, HWEncoder.ExynosH264, HWEncoder.MediatekH264, HWEncoder.HisiH264, HWEncoder.SpreadtrumH264" + errorLine1=" for (@HWEncoder int codecProperties = 0; codecProperties < HWEncoder.NUM_ENTRIES;" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/media/base/android/java/src/org/chromium/media/MediaCodecUtil.java" + line="630" + column="82"/> </issue> - <issue id="WrongConstant" message="Must be one of: ExternalAppId.OTHER, ExternalAppId.GMAIL, ExternalAppId.FACEBOOK, ExternalAppId.PLUS, ExternalAppId.TWITTER, ExternalAppId.CHROME, ExternalAppId.HANGOUTS, ExternalAppId.MESSENGER, ExternalAppId.NEWS, ExternalAppId.LINE, ExternalAppId.WHATSAPP, ExternalAppId.GSA, ExternalAppId.WEBAPK, ExternalAppId.YAHOO_MAIL, ExternalAppId.VIBER, ExternalAppId.YOUTUBE" errorLine1=" "MobileIntent.PageLoadDueToExternalApp", externalId, ExternalAppId.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.java" /> + <issue + id="WrongConstant" + message="Must be one of: MediaType.AUDIO, MediaType.IMAGE, MediaType.VIDEO" + errorLine1=" "MediaLauncherActivity.MediaType", mediaType, MediaType.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/media/MediaLauncherActivity.java" + line="54" + column="73"/> </issue> - <issue id="WrongConstant" message="Must be one of: TabOpenType.OPEN_NEW_TAB, TabOpenType.REUSE_URL_MATCHING_TAB_ELSE_NEW_TAB, TabOpenType.REUSE_APP_ID_MATCHING_TAB_ELSE_NEW_TAB, TabOpenType.CLOBBER_CURRENT_TAB, TabOpenType.BRING_TAB_TO_FRONT, TabOpenType.OPEN_NEW_INCOGNITO_TAB, TabOpenType.REUSE_TAB_MATCHING_ID_ELSE_NEW_TAB" errorLine1=" intent, TabOpenType.REUSE_TAB_MATCHING_ID_STRING, Tab.INVALID_TAB_ID);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/IntentHandler.java" /> + <issue + id="WrongConstant" + message="Must be one of: MediaType.AUDIO, MediaType.IMAGE, MediaType.VIDEO" + errorLine1=" if (mediaType == MediaType.UNKNOWN) {" + errorLine2=" ~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/media/MediaLauncherActivity.java" + line="56" + column="36"/> </issue> - <issue id="WrongConstant" message="Must be one of: ULPInitiationStatus.SUCCESS, ULPInitiationStatus.NOT_SUPPORTED, ULPInitiationStatus.TIMED_OUT, ULPInitiationStatus.FAILURE" errorLine1=" INITIATION_STATUS_HISTOGRAM, initStatus, ULPInitiationStatus.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="components/language/android/java/src/org/chromium/components/language/LanguageProfileMetricsLogger.java" /> + <issue + id="WrongConstant" + message="Must be one of: Source.INVALID, Source.MEDIA, Source.PRESENTATION, Source.MEDIA_FLING" + errorLine1=" if (source == Source.INVALID || source >= Source.NUM_ENTRIES) return;" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/media/android/java/src/org/chromium/components/browser_ui/media/MediaNotificationUma.java" + line="43" + column="58"/> </issue> - <issue id="WrongConstant" message="Must be one of: ULPInitiationStatus.SUCCESS, ULPInitiationStatus.NOT_SUPPORTED, ULPInitiationStatus.TIMED_OUT, ULPInitiationStatus.FAILURE" errorLine1=" initStatus, ULPInitiationStatus.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="components/language/android/java/src/org/chromium/components/language/LanguageProfileMetricsLogger.java" /> + <issue + id="WrongConstant" + message="Must be one of: Source.INVALID, Source.MEDIA, Source.PRESENTATION, Source.MEDIA_FLING" + errorLine1=" "Media.Notification.Click", source, Source.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/media/android/java/src/org/chromium/components/browser_ui/media/MediaNotificationUma.java" + line="45" + column="60"/> </issue> - <issue id="WrongConstant" message="Must be one of: ULPInitiationStatus.SUCCESS, ULPInitiationStatus.NOT_SUPPORTED, ULPInitiationStatus.TIMED_OUT, ULPInitiationStatus.FAILURE" errorLine1=" initStatus, ULPInitiationStatus.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="components/language/android/java/src/org/chromium/components/language/LanguageProfileMetricsLogger.java" /> - </issue> - - <issue id="WrongConstant" message="Must be one of: LanguageSplitInstallStatus.SUCCESS, LanguageSplitInstallStatus.ALREADY_INSTALLED, LanguageSplitInstallStatus.CANCELED, LanguageSplitInstallStatus.DOWNLOADED, LanguageSplitInstallStatus.FAILED, LanguageSplitInstallStatus.UNEXPECTED_STATUS" errorLine1=" enumCode, LanguageSplitInstallStatus.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/LanguageSplitInstaller.java" /> - </issue> - - <issue id="WrongConstant" message="Must be one of: LanguageSettingsPageType.PAGE_MAIN, LanguageSettingsPageType.CONTENT_LANGUAGE_ADD_LANGUAGE, LanguageSettingsPageType.CHANGE_CHROME_LANGUAGE, LanguageSettingsPageType.ADVANCED_LANGUAGE_SETTINGS, LanguageSettingsPageType.CHANGE_TARGET_LANGUAGE, LanguageSettingsPageType.LANGUAGE_OVERFLOW_MENU_OPENED, LanguageSettingsPageType.VIEW_NEVER_TRANSLATE_LANGUAGES, LanguageSettingsPageType.NEVER_TRANSLATE_ADD_LANGUAGE, LanguageSettingsPageType.VIEW_ALWAYS_TRANSLATE_LANGUAGES, LanguageSettingsPageType.ALWAYS_TRANSLATE_ADD_LANGUAGE, LanguageSettingsPageType.VIEW_NEVER_TRANSLATE_SITES" errorLine1=" "LanguageSettings.PageImpression", pageType, LanguageSettingsPageType.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/LanguagesManager.java" /> - </issue> - - <issue id="WrongConstant" message="Must be one of: LanguageSettingsActionType.LANGUAGE_ADDED, LanguageSettingsActionType.LANGUAGE_REMOVED, LanguageSettingsActionType.DISABLE_TRANSLATE_GLOBALLY, LanguageSettingsActionType.ENABLE_TRANSLATE_GLOBALLY, LanguageSettingsActionType.DISABLE_TRANSLATE_FOR_SINGLE_LANGUAGE, LanguageSettingsActionType.ENABLE_TRANSLATE_FOR_SINGLE_LANGUAGE, LanguageSettingsActionType.LANGUAGE_LIST_REORDERED, LanguageSettingsActionType.CHANGE_CHROME_LANGUAGE, LanguageSettingsActionType.CHANGE_TARGET_LANGUAGE, LanguageSettingsActionType.REMOVE_FROM_NEVER_TRANSLATE, LanguageSettingsActionType.ADD_TO_NEVER_TRANSLATE, LanguageSettingsActionType.REMOVE_FROM_ALWAYS_TRANSLATE, LanguageSettingsActionType.ADD_TO_ALWAYS_TRANSLATE, LanguageSettingsActionType.REMOVE_SITE_FROM_NEVER_TRANSLATE, LanguageSettingsActionType.RESTART_CHROME" errorLine1=" "LanguageSettings.Actions", actionType, LanguageSettingsActionType.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/LanguagesManager.java" /> - </issue> - - <issue id="WrongConstant" message="Must be one of: LaunchCause.OTHER, LaunchCause.CUSTOM_TAB, LaunchCause.TWA, LaunchCause.RECENTS, LaunchCause.RECENTS_OR_BACK, LaunchCause.FOREGROUND_WHEN_LOCKED, LaunchCause.MAIN_LAUNCHER_ICON, LaunchCause.MAIN_LAUNCHER_ICON_SHORTCUT, LaunchCause.HOME_SCREEN_WIDGET, LaunchCause.OPEN_IN_BROWSER_FROM_MENU, LaunchCause.EXTERNAL_SEARCH_ACTION_INTENT, LaunchCause.NOTIFICATION, LaunchCause.EXTERNAL_VIEW_INTENT, LaunchCause.OTHER_CHROME, LaunchCause.WEBAPK_CHROME_DISTRIBUTOR, LaunchCause.WEBAPK_OTHER_DISTRIBUTOR, LaunchCause.HOME_SCREEN_SHORTCUT" errorLine1=" LAUNCH_CAUSE_HISTOGRAM, cause, LaunchCause.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/app/metrics/LaunchCauseMetrics.java" /> - </issue> - - <issue id="WrongConstant" message="Must be one of: LaunchCause.OTHER, LaunchCause.CUSTOM_TAB, LaunchCause.TWA, LaunchCause.RECENTS, LaunchCause.RECENTS_OR_BACK, LaunchCause.FOREGROUND_WHEN_LOCKED, LaunchCause.MAIN_LAUNCHER_ICON, LaunchCause.MAIN_LAUNCHER_ICON_SHORTCUT, LaunchCause.HOME_SCREEN_WIDGET, LaunchCause.OPEN_IN_BROWSER_FROM_MENU, LaunchCause.EXTERNAL_SEARCH_ACTION_INTENT, LaunchCause.NOTIFICATION, LaunchCause.EXTERNAL_VIEW_INTENT, LaunchCause.OTHER_CHROME, LaunchCause.WEBAPK_CHROME_DISTRIBUTOR, LaunchCause.WEBAPK_OTHER_DISTRIBUTOR, LaunchCause.HOME_SCREEN_SHORTCUT" errorLine1=" LAUNCH_CAUSE_HISTOGRAM, cause, LaunchCause.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/app/metrics/LaunchCauseMetrics.java" /> - </issue> - - <issue id="WrongConstant" message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" errorLine1=" mScrollDirection = ScrollDirection.UNKNOWN;" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerChrome.java" /> - </issue> - - <issue id="WrongConstant" message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" errorLine1=" mScrollDirection = ScrollDirection.UNKNOWN;" errorLine2=" ~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerChrome.java" /> - </issue> - - <issue id="WrongConstant" message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" errorLine1=" if (mScrollDirection != ScrollDirection.UNKNOWN) {" errorLine2=" ~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerChrome.java" /> - </issue> - - <issue id="WrongConstant" message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" errorLine1=" if (mScrollDirection == ScrollDirection.UNKNOWN) return;" errorLine2=" ~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerChrome.java" /> - </issue> - - <issue id="WrongConstant" message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" errorLine1=" int direction = ScrollDirection.UNKNOWN;" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerChrome.java" /> - </issue> - - <issue id="WrongConstant" message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" errorLine1=" int direction = ScrollDirection.UNKNOWN;" errorLine2=" ~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerChrome.java" /> - </issue> - - <issue id="WrongConstant" message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" errorLine1=" direction = ScrollDirection.LEFT;" errorLine2=" ~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerChrome.java" /> + <issue + id="WrongConstant" + message="Must be one of: CastNotificationControls.RESUME, CastNotificationControls.PAUSE, CastNotificationControls.STOP" + errorLine1=" action, CastNotificationControls.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/components/media_router/browser/android/java/src/org/chromium/components/media_router/MediaRouteUmaRecorder.java" + line="67" + column="50"/> </issue> - <issue id="WrongConstant" message="Must be one of: LensSupportStatus.LENS_SEARCH_SUPPORTED, LensSupportStatus.NON_GOOGLE_SEARCH_ENGINE, LensSupportStatus.ACTIVITY_NOT_ACCESSIBLE, LensSupportStatus.OUT_OF_DATE, LensSupportStatus.SEARCH_BY_IMAGE_UNAVAILABLE, LensSupportStatus.LEGACY_OS, LensSupportStatus.INVALID_PACKAGE, LensSupportStatus.LENS_SHOP_SUPPORTED, LensSupportStatus.LENS_SHOP_AND_SEARCH_SUPPORTED, LensSupportStatus.CAMERA_NOT_AVAILABLE, LensSupportStatus.DISABLED_ON_LOW_END_DEVICE, LensSupportStatus.AGSA_VERSION_NOT_SUPPORTED, LensSupportStatus.DISABLED_ON_INCOGNITO, LensSupportStatus.DISABLED_ON_TABLET, LensSupportStatus.DISABLED_FOR_ENTERPRISE_USER" errorLine1=" histogramName, reason, LensSupportStatus.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/lens/java/src/org/chromium/chrome/browser/lens/LensMetrics.java" /> + <issue + id="WrongConstant" + message="Must be one of: FullScreenControls.RESUME, FullScreenControls.PAUSE, FullScreenControls.SEEK" + errorLine1=" action, FullScreenControls.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/components/media_router/browser/android/java/src/org/chromium/components/media_router/MediaRouteUmaRecorder.java" + line="77" + column="44"/> </issue> - <issue id="WrongConstant" message="Must be one of: ShareDestination.FIRST_PARTY, ShareDestination.THIRD_PARTY" errorLine1=" ShareDestination.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/content_creation/reactions/internal/android/java/src/org/chromium/chrome/browser/content_creation/reactions/LightweightReactionsMetrics.java" /> + <issue + id="WrongConstant" + message="Must be one of: MediaSessionActionSource.MEDIA_NOTIFICATION, MediaSessionActionSource.MEDIA_SESSION, MediaSessionActionSource.HEADSET_UNPLUG" + errorLine1=" "Media.Session.Play", action, MediaSessionActionSource.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/media/android/java/src/org/chromium/components/browser_ui/media/MediaSessionUma.java" + line="32" + column="76"/> </issue> - <issue id="WrongConstant" message="Must be one of: DeviceOrientation.LANDSCAPE, DeviceOrientation.PORTRAIT" errorLine1=" DeviceOrientation.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/content_creation/reactions/internal/android/java/src/org/chromium/chrome/browser/content_creation/reactions/LightweightReactionsMetrics.java" /> + <issue + id="WrongConstant" + message="Must be one of: MediaSessionActionSource.MEDIA_NOTIFICATION, MediaSessionActionSource.MEDIA_SESSION, MediaSessionActionSource.HEADSET_UNPLUG" + errorLine1=" "Media.Session.Pause", action, MediaSessionActionSource.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/media/android/java/src/org/chromium/components/browser_ui/media/MediaSessionUma.java" + line="39" + column="77"/> </issue> - <issue id="WrongConstant" message="Must be one of: LightweightReactionsFunnel.DIALOG_OPENED, LightweightReactionsFunnel.EDITING_DONE, LightweightReactionsFunnel.GIF_GENERATED, LightweightReactionsFunnel.GIF_SHARED" errorLine1=" assert funnelState < LightweightReactionsFunnel.NUM_ENTRIES;" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/content_creation/reactions/internal/android/java/src/org/chromium/chrome/browser/content_creation/reactions/LightweightReactionsMetrics.java" /> + <issue + id="WrongConstant" + message="Must be one of: MediaSessionActionSource.MEDIA_NOTIFICATION, MediaSessionActionSource.MEDIA_SESSION, MediaSessionActionSource.HEADSET_UNPLUG" + errorLine1=" "Media.Session.Stop", action, MediaSessionActionSource.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/media/android/java/src/org/chromium/components/browser_ui/media/MediaSessionUma.java" + line="46" + column="76"/> </issue> - <issue id="WrongConstant" message="Must be one of: LightweightReactionsFunnel.DIALOG_OPENED, LightweightReactionsFunnel.EDITING_DONE, LightweightReactionsFunnel.GIF_GENERATED, LightweightReactionsFunnel.GIF_SHARED" errorLine1=" "LightweightReactions.Funnel", funnelState, LightweightReactionsFunnel.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/content_creation/reactions/internal/android/java/src/org/chromium/chrome/browser/content_creation/reactions/LightweightReactionsMetrics.java" /> + <issue + id="WrongConstant" + message="Must be one of: MediaType.AUDIO, MediaType.IMAGE, MediaType.VIDEO" + errorLine1=" if (TextUtils.isEmpty(mimeType)) return MediaLauncherActivity.MediaType.UNKNOWN;" + errorLine2=" ~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/media/MediaViewerUtils.java" + line="170" + column="81"/> </issue> - <issue id="WrongConstant" message="Must be one of: OmniboxFocusReason.OMNIBOX_TAP, OmniboxFocusReason.OMNIBOX_LONG_PRESS, OmniboxFocusReason.FAKE_BOX_TAP, OmniboxFocusReason.FAKE_BOX_LONG_PRESS, OmniboxFocusReason.ACCELERATOR_TAP, OmniboxFocusReason.TAB_SWITCHER_OMNIBOX_TAP, OmniboxFocusReason.TASKS_SURFACE_FAKE_BOX_TAP, OmniboxFocusReason.TASKS_SURFACE_FAKE_BOX_LONG_PRESS, OmniboxFocusReason.DEFAULT_WITH_HARDWARE_KEYBOARD, OmniboxFocusReason.SEARCH_QUERY, OmniboxFocusReason.LAUNCH_NEW_INCOGNITO_TAB, OmniboxFocusReason.MENU_OR_KEYBOARD_ACTION, OmniboxFocusReason.UNFOCUS, OmniboxFocusReason.QUERY_TILES_NTP_TAP" errorLine1=" "Android.OmniboxFocusReason", reason, OmniboxFocusReason.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/LocationBarMediator.java" /> + <issue + id="WrongConstant" + message="Must be one of: MediaType.AUDIO, MediaType.IMAGE, MediaType.VIDEO" + errorLine1=" if (pieces.length != 2) return MediaLauncherActivity.MediaType.UNKNOWN;" + errorLine2=" ~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/media/MediaViewerUtils.java" + line="173" + column="72"/> </issue> - <issue id="WrongConstant" message="Must be one of: LongScreenshotsEvent.DIALOG_OPEN, LongScreenshotsEvent.DIALOG_CANCEL, LongScreenshotsEvent.DIALOG_OK, LongScreenshotsEvent.GENERATOR_CAPTURE_GENERATION_ERROR, LongScreenshotsEvent.GENERATOR_CAPTURE_INSUFFICIENT_MEMORY, LongScreenshotsEvent.GENERATOR_COMPOSITOR_CAPTURE_COMPLETE, LongScreenshotsEvent.GENERATOR_COMPOSITOR_MEMORY_PRESSURE, LongScreenshotsEvent.GENERATOR_COMPOSITOR_GENERATION_ERROR" errorLine1=" "Sharing.LongScreenshots.Event", action, LongScreenshotsEvent.COUNT);" errorLine2=" ~~~~~"> - <location file="chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/long_screenshots/LongScreenshotsMetrics.java" /> + <issue + id="WrongConstant" + message="Must be one of: MediaType.AUDIO, MediaType.IMAGE, MediaType.VIDEO" + errorLine1=" return MediaLauncherActivity.MediaType.UNKNOWN;" + errorLine2=" ~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/media/MediaViewerUtils.java" + line="183" + column="56"/> </issue> - <issue id="WrongConstant" message="Must be one of: BitmapGenerationStatus.UNKNOWN, BitmapGenerationStatus.OK, BitmapGenerationStatus.DIRECTORY_CREATION_FAILED, BitmapGenerationStatus.CAPTURE_FAILED, BitmapGenerationStatus.PROTO_SERIALIZATION_FAILED, BitmapGenerationStatus.WEB_CONTENTS_GONE, BitmapGenerationStatus.NATIVE_SERVICE_UNINITIALIZED, BitmapGenerationStatus.LOW_MEMORY_DETECTED, BitmapGenerationStatus.PROTO_DESERIALIZATION_FAILED, BitmapGenerationStatus.NATIVE_SERVICE_NOT_INITIALIZED" errorLine1=" status, BitmapGenerationStatus.COUNT);" errorLine2=" ~~~~~"> - <location file="chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/long_screenshots/LongScreenshotsMetrics.java" /> + <issue + id="WrongConstant" + message="Must be one of: Notification.UNKNOWN_TRIM_LEVEL, Notification.TRIM_MEMORY_COMPLETE, Notification.TRIM_MEMORY_MODERATE, Notification.TRIM_MEMORY_BACKGROUND, Notification.TRIM_MEMORY_UI_HIDDEN, Notification.TRIM_MEMORY_RUNNING_CRITICAL, Notification.TRIM_MEMORY_RUNNING_LOW, Notification.TRIM_MEMORY_RUNNING_MODERATE, Notification.ON_LOW_MEMORY" + errorLine1=" mHistogramName, notification, Notification.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/base/android/java/src/org/chromium/base/memory/MemoryPressureUma.java" + line="110" + column="60"/> </issue> - <issue id="WrongConstant" message="Must be one of: MenuChoice.SWITCH_PROVIDER, MenuChoice.REPORT_BUG, MenuChoice.CHECK_UPDATES, MenuChoice.CRASHES_REFRESH, MenuChoice.ABOUT_DEVTOOLS, MenuChoice.COMPONENTS_UI, MenuChoice.COMPONENTS_UPDATE" errorLine1=" "Android.WebView.DevUi.MenuSelection", selectedMenuItem, MenuChoice.COUNT);" errorLine2=" ~~~~~"> - <location file="android_webview/nonembedded/java/src/org/chromium/android_webview/devui/MainActivity.java" /> + <issue + id="WrongConstant" + message="Must be one of: MessageClearReason.UNKNOWN, MessageClearReason.NAVIGATE_TO_SAME_DOMAIN, MessageClearReason.NAVIGATE_TO_DIFFERENT_DOMAIN, MessageClearReason.MESSAGE_CONTEXT_NO_LONGER_VALID, MessageClearReason.SWITCH_TO_DIFFERENT_WEBCONTENTS" + errorLine1=" "MerchantTrust.Message.ClearReason", clearReason, MessageClearReason.MAX_VALUE + 1);" + errorLine2=" ~~~~~~~~~"> + <location + file="$SRC/chrome/browser/commerce/merchant_viewer/android/java/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustMetrics.java" + line="106" + column="86"/> </issue> - <issue id="WrongConstant" message="Must be one of: FragmentNavigation.HOME_FRAGMENT, FragmentNavigation.CRASHES_LIST_FRAGMENT, FragmentNavigation.FLAGS_FRAGMENT, FragmentNavigation.COMPONENTS_LIST_FRAGMENT" errorLine1=" FragmentNavigation.COUNT);" errorLine2=" ~~~~~"> - <location file="android_webview/nonembedded/java/src/org/chromium/android_webview/devui/MainActivity.java" /> + <issue + id="WrongConstant" + message="Must be one of: BottomSheetOpenedSource.UNKNOWN, BottomSheetOpenedSource.FROM_MESSAGE, BottomSheetOpenedSource.FROM_PAGE_INFO" + errorLine1=" BottomSheetOpenedSource.MAX_VALUE + 1);" + errorLine2=" ~~~~~~~~~"> + <location + file="$SRC/chrome/browser/commerce/merchant_viewer/android/java/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustMetrics.java" + line="290" + column="41"/> </issue> - <issue id="WrongConstant" message="Must be one of: StateProperty.BAR, StateProperty.VISIBLE_SHEET, StateProperty.HIDDEN_SHEET" errorLine1=" return (state & StateProperty.FLOATING) != 0;" errorLine2=" ~~~~~~~~"> - <location file="chrome/android/features/keyboard_accessory/internal/java/src/org/chromium/chrome/browser/keyboard_accessory/ManualFillingMediator.java" /> + <issue + id="WrongConstant" + message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" + errorLine1=" return direction != ScrollDirection.UNKNOWN && mCurrentState == State.IDLE;" + errorLine2=" ~~~~~~~"> + <location + file="$SRC/components/messages/android/internal/java/src/org/chromium/components/messages/MessageBannerMediator.java" + line="237" + column="45"/> </issue> - <issue id="WrongConstant" message="Must be one of: StateProperty.BAR, StateProperty.VISIBLE_SHEET, StateProperty.HIDDEN_SHEET" errorLine1=" int FLOATING_BAR = BAR | HIDDEN_SHEET | FLOATING; // == 13" errorLine2=" ~~~~~~~~"> - <location file="chrome/android/features/keyboard_accessory/internal/java/src/org/chromium/chrome/browser/keyboard_accessory/ManualFillingProperties.java" /> + <issue + id="WrongConstant" + message="Must be one of: MessageDisableReason.UNKNOWN, MessageDisableReason.MESSAGE_ACCEPTED, MessageDisableReason.MESSAGE_DISMISSED, MessageDisableReason.MESSAGE_IGNORED" + errorLine1=" MessageDisableReason.MAX_VALUE + 1);" + errorLine2=" ~~~~~~~~~"> + <location + file="$SRC/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/MessageService.java" + line="145" + column="38"/> </issue> - <issue id="WrongConstant" message="Must be one of: StateProperty.BAR, StateProperty.VISIBLE_SHEET, StateProperty.HIDDEN_SHEET" errorLine1=" int FLOATING_SHEET = BAR | VISIBLE_SHEET | FLOATING; // == 11" errorLine2=" ~~~~~~~~"> - <location file="chrome/android/features/keyboard_accessory/internal/java/src/org/chromium/chrome/browser/keyboard_accessory/ManualFillingProperties.java" /> + <issue + id="WrongConstant" + message="Must be one of: ParsingLogResult.SUCCESS, ParsingLogResult.MALFORMED_PROTOBUF, ParsingLogResult.IO_EXCEPTION" + errorLine1=" .setMax(ParsingLogResult.COUNT)" + errorLine2=" ~~~~~"> + <location + file="$SRC/android_webview/nonembedded/java/src/org/chromium/android_webview/services/MetricsBridgeService.java" + line="83" + column="50"/> </issue> - <issue id="WrongConstant" message="Must be one of: ViewCompat.LAYOUT_DIRECTION_LTR, ViewCompat.LAYOUT_DIRECTION_RTL" errorLine1=" if (ViewCompat.getLayoutDirection(this) == View.LAYOUT_DIRECTION_RTL) {" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/MaterialProgressBar.java" /> + <issue + id="WrongConstant" + message="Must be one of: ParsingLogResult.SUCCESS, ParsingLogResult.MALFORMED_PROTOBUF, ParsingLogResult.IO_EXCEPTION" + errorLine1=" .setNumBuckets(ParsingLogResult.COUNT + 1)" + errorLine2=" ~~~~~"> + <location + file="$SRC/android_webview/nonembedded/java/src/org/chromium/android_webview/services/MetricsBridgeService.java" + line="84" + column="57"/> </issue> - <issue id="WrongConstant" message="Must be one of: ChannelId.BROWSER, ChannelId.DOWNLOADS, ChannelId.INCOGNITO, ChannelId.MEDIA_PLAYBACK, ChannelId.SCREEN_CAPTURE, ChannelId.CONTENT_SUGGESTIONS, ChannelId.WEBAPP_ACTIONS, ChannelId.SITES, ChannelId.SHARING, ChannelId.UPDATES, ChannelId.COMPLETED_DOWNLOADS, ChannelId.PERMISSION_REQUESTS, ChannelId.PERMISSION_REQUESTS_HIGH, ChannelId.ANNOUNCEMENT, ChannelId.WEBAPPS, ChannelId.WEBAPPS_QUIET, ChannelId.PRICE_DROP, ChannelId.SECURITY_KEY, ChannelId.CHROME_TIPS, ChannelId.BLUETOOTH, ChannelId.USB" errorLine1=" : ChromeChannelDefinitions.ChannelId.WEBRTC_CAM_AND_MIC;" errorLine2=" ~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/media/MediaCaptureNotificationServiceImpl.java" /> + <issue + id="WrongConstant" + message="Must be one of: RetrieveMetricsTaskStatus.EXECUTION_EXCEPTION, RetrieveMetricsTaskStatus.INTERRUPTED_EXCEPTION" + errorLine1=" .setMax(RetrieveMetricsTaskStatus.COUNT)" + errorLine2=" ~~~~~"> + <location + file="$SRC/android_webview/nonembedded/java/src/org/chromium/android_webview/services/MetricsBridgeService.java" + line="120" + column="59"/> </issue> - <issue id="WrongConstant" message="Must be one of: HWEncoder.QcomVp8, HWEncoder.QcomH264, HWEncoder.ExynosVp8, HWEncoder.ExynosVp9, HWEncoder.ExynosH264, HWEncoder.MediatekH264, HWEncoder.HisiH264, HWEncoder.SpreadtrumH264" errorLine1=" for (@HWEncoder int codecProperties = 0; codecProperties < HWEncoder.NUM_ENTRIES;" errorLine2=" ~~~~~~~~~~~"> - <location file="media/base/android/java/src/org/chromium/media/MediaCodecUtil.java" /> + <issue + id="WrongConstant" + message="Must be one of: ParsingLogResult.SUCCESS, ParsingLogResult.MALFORMED_PROTOBUF, ParsingLogResult.IO_EXCEPTION" + errorLine1=" .setNumBuckets(ParsingLogResult.COUNT + 1)" + errorLine2=" ~~~~~"> + <location + file="$SRC/android_webview/nonembedded/java/src/org/chromium/android_webview/services/MetricsBridgeService.java" + line="121" + column="57"/> </issue> - <issue id="WrongConstant" message="Must be one of: MediaType.AUDIO, MediaType.IMAGE, MediaType.VIDEO" errorLine1=" "MediaLauncherActivity.MediaType", mediaType, MediaType.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/media/MediaLauncherActivity.java" /> + <issue + id="WrongConstant" + message="Must be one of: RetrieveMetricsTaskStatus.EXECUTION_EXCEPTION, RetrieveMetricsTaskStatus.INTERRUPTED_EXCEPTION" + errorLine1=" list.add(logRetrieveMetricsTaskStatus(RetrieveMetricsTaskStatus.SUCCESS));" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/android_webview/nonembedded/java/src/org/chromium/android_webview/services/MetricsBridgeService.java" + line="203" + column="55"/> </issue> - <issue id="WrongConstant" message="Must be one of: MediaType.AUDIO, MediaType.IMAGE, MediaType.VIDEO" errorLine1=" if (mediaType == MediaType.UNKNOWN) {" errorLine2=" ~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/media/MediaLauncherActivity.java" /> + <issue + id="WrongConstant" + message="Must be one of: RetrieveMetricsTaskStatus.EXECUTION_EXCEPTION, RetrieveMetricsTaskStatus.INTERRUPTED_EXCEPTION" + errorLine1=" list.add(logRetrieveMetricsTaskStatus(RetrieveMetricsTaskStatus.SUCCESS));" + errorLine2=" ~~~~~~~"> + <location + file="$SRC/android_webview/nonembedded/java/src/org/chromium/android_webview/services/MetricsBridgeService.java" + line="203" + column="81"/> </issue> - <issue id="WrongConstant" message="Must be one of: Source.INVALID, Source.MEDIA, Source.PRESENTATION, Source.MEDIA_FLING" errorLine1=" if (source == Source.INVALID || source >= Source.NUM_ENTRIES) return;" errorLine2=" ~~~~~~~~~~~"> - <location file="components/browser_ui/media/android/java/src/org/chromium/components/browser_ui/media/MediaNotificationUma.java" /> + <issue + id="WrongConstant" + message="Must be one of: MixedContentDownloadDialogEvent.SHOW, MixedContentDownloadDialogEvent.CONFIRM, MixedContentDownloadDialogEvent.CANCEL, MixedContentDownloadDialogEvent.DISMISS" + errorLine1=" "Download.MixedContentDialog.Events", event, MixedContentDownloadDialogEvent.COUNT);" + errorLine2=" ~~~~~"> + <location + file="$SRC/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/MixedContentDownloadDialog.java" + line="121" + column="94"/> </issue> - <issue id="WrongConstant" message="Must be one of: Source.INVALID, Source.MEDIA, Source.PRESENTATION, Source.MEDIA_FLING" errorLine1=" "Media.Notification.Click", source, Source.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="components/browser_ui/media/android/java/src/org/chromium/components/browser_ui/media/MediaNotificationUma.java" /> + <issue + id="WrongConstant" + message="Must be one of: SecurityFilteredTouchResult.BLOCKED, SecurityFilteredTouchResult.HANDLED" + errorLine1=" SecurityFilteredTouchResult.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/modaldialog/android/java/src/org/chromium/components/browser_ui/modaldialog/ModalDialogView.java" + line="245" + column="57"/> </issue> - <issue id="WrongConstant" message="Must be one of: CastNotificationControls.RESUME, CastNotificationControls.PAUSE, CastNotificationControls.STOP" errorLine1=" action, CastNotificationControls.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="components/media_router/browser/android/java/src/org/chromium/components/media_router/MediaRouteUmaRecorder.java" /> + <issue + id="WrongConstant" + message="Must be one of: ContentSuggestionsDisplayStatus.VISIBLE, ContentSuggestionsDisplayStatus.COLLAPSED, ContentSuggestionsDisplayStatus.DISABLED_BY_POLICY, ContentSuggestionsDisplayStatus.DISABLED" + errorLine1=" status, ContentSuggestionsDisplayStatus.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageUma.java" + line="296" + column="57"/> </issue> - <issue id="WrongConstant" message="Must be one of: FullScreenControls.RESUME, FullScreenControls.PAUSE, FullScreenControls.SEEK" errorLine1=" action, FullScreenControls.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="components/media_router/browser/android/java/src/org/chromium/components/media_router/MediaRouteUmaRecorder.java" /> + <issue + id="WrongConstant" + message="Must be one of: NightModeEnabledReason.USER_PREFERENCE, NightModeEnabledReason.POWER_SAVE_MODE, NightModeEnabledReason.OTHER" + errorLine1=" NightModeEnabledReason.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/ui/android/night_mode/java/src/org/chromium/chrome/browser/night_mode/NightModeMetrics.java" + line="67" + column="40"/> </issue> - <issue id="WrongConstant" message="Must be one of: MediaSessionActionSource.MEDIA_NOTIFICATION, MediaSessionActionSource.MEDIA_SESSION, MediaSessionActionSource.HEADSET_UNPLUG" errorLine1=" "Media.Session.Play", action, MediaSessionActionSource.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="components/browser_ui/media/android/java/src/org/chromium/components/browser_ui/media/MediaSessionUma.java" /> + <issue + id="WrongConstant" + message="Must be one of: ThemeType.SYSTEM_DEFAULT, ThemeType.LIGHT, ThemeType.DARK" + errorLine1=" "Android.DarkTheme.Preference.State", theme, ThemeType.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/ui/android/night_mode/java/src/org/chromium/chrome/browser/night_mode/NightModeMetrics.java" + line="86" + column="72"/> </issue> - <issue id="WrongConstant" message="Must be one of: MediaSessionActionSource.MEDIA_NOTIFICATION, MediaSessionActionSource.MEDIA_SESSION, MediaSessionActionSource.HEADSET_UNPLUG" errorLine1=" "Media.Session.Pause", action, MediaSessionActionSource.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="components/browser_ui/media/android/java/src/org/chromium/components/browser_ui/media/MediaSessionUma.java" /> + <issue + id="WrongConstant" + message="Must be one of: ThemeSettingsEntry.SETTINGS, ThemeSettingsEntry.AUTO_DARK_MODE_MESSAGE" + errorLine1=" "Android.DarkTheme.ThemeSettingsEntry", entry, ThemeSettingsEntry.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/ui/android/night_mode/java/src/org/chromium/chrome/browser/night_mode/NightModeMetrics.java" + line="116" + column="83"/> </issue> - <issue id="WrongConstant" message="Must be one of: MediaSessionActionSource.MEDIA_NOTIFICATION, MediaSessionActionSource.MEDIA_SESSION, MediaSessionActionSource.HEADSET_UNPLUG" errorLine1=" "Media.Session.Stop", action, MediaSessionActionSource.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="components/browser_ui/media/android/java/src/org/chromium/components/browser_ui/media/MediaSessionUma.java" /> + <issue + id="WrongConstant" + message="Must be one of: NoteShareDestination.FIRST_PARTY, NoteShareDestination.THIRD_PARTY" + errorLine1=" NoteShareDestination.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/content_creation/notes/internal/android/java/src/org/chromium/chrome/browser/content_creation/notes/NoteCreationMetrics.java" + line="119" + column="38"/> </issue> - <issue id="WrongConstant" message="Must be one of: MediaType.AUDIO, MediaType.IMAGE, MediaType.VIDEO" errorLine1=" if (TextUtils.isEmpty(mimeType)) return MediaLauncherActivity.MediaType.UNKNOWN;" errorLine2=" ~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/media/MediaViewerUtils.java" /> + <issue + id="WrongConstant" + message="Must be one of: NoteCreationFunnel.NOTE_CREATION_SELECTED, NoteCreationFunnel.TEMPLATE_SELECTED, NoteCreationFunnel.NOTE_SHARED" + errorLine1=" assert funnelState < NoteCreationFunnel.NUM_ENTRIES;" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/content_creation/notes/internal/android/java/src/org/chromium/chrome/browser/content_creation/notes/NoteCreationMetrics.java" + line="159" + column="49"/> </issue> - <issue id="WrongConstant" message="Must be one of: MediaType.AUDIO, MediaType.IMAGE, MediaType.VIDEO" errorLine1=" if (pieces.length != 2) return MediaLauncherActivity.MediaType.UNKNOWN;" errorLine2=" ~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/media/MediaViewerUtils.java" /> + <issue + id="WrongConstant" + message="Must be one of: NoteCreationFunnel.NOTE_CREATION_SELECTED, NoteCreationFunnel.TEMPLATE_SELECTED, NoteCreationFunnel.NOTE_SHARED" + errorLine1=" "NoteCreation.Funnel", funnelState, NoteCreationFunnel.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/content_creation/notes/internal/android/java/src/org/chromium/chrome/browser/content_creation/notes/NoteCreationMetrics.java" + line="163" + column="72"/> </issue> - <issue id="WrongConstant" message="Must be one of: MediaType.AUDIO, MediaType.IMAGE, MediaType.VIDEO" errorLine1=" return MediaLauncherActivity.MediaType.UNKNOWN;" errorLine2=" ~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/media/MediaViewerUtils.java" /> + <issue + id="WrongConstant" + message="Must be one or more of: PendingIntent.FLAG_ONE_SHOT, PendingIntent.FLAG_NO_CREATE, PendingIntent.FLAG_CANCEL_CURRENT, PendingIntent.FLAG_UPDATE_CURRENT, PendingIntent.FLAG_IMMUTABLE, PendingIntent.FLAG_MUTABLE, Intent.FILL_IN_ACTION, Intent.FILL_IN_DATA, Intent.FILL_IN_CATEGORIES, Intent.FILL_IN_COMPONENT, Intent.FILL_IN_PACKAGE, Intent.FILL_IN_SOURCE_BOUNDS, Intent.FILL_IN_SELECTOR, Intent.FILL_IN_CLIP_DATA" + errorLine1=" ? PendingIntent.getBroadcast(applicationContext, requestCode, intent, flags)" + errorLine2=" ~~~~~"> + <location + file="$SRC/chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/NotificationIntentInterceptor.java" + line="169" + column="87"/> </issue> - <issue id="WrongConstant" message="Must be one of: Notification.UNKNOWN_TRIM_LEVEL, Notification.TRIM_MEMORY_COMPLETE, Notification.TRIM_MEMORY_MODERATE, Notification.TRIM_MEMORY_BACKGROUND, Notification.TRIM_MEMORY_UI_HIDDEN, Notification.TRIM_MEMORY_RUNNING_CRITICAL, Notification.TRIM_MEMORY_RUNNING_LOW, Notification.TRIM_MEMORY_RUNNING_MODERATE, Notification.ON_LOW_MEMORY" errorLine1=" mHistogramName, notification, Notification.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="base/android/java/src/org/chromium/base/memory/MemoryPressureUma.java" /> + <issue + id="WrongConstant" + message="Must be one or more of: PendingIntent.FLAG_ONE_SHOT, PendingIntent.FLAG_NO_CREATE, PendingIntent.FLAG_CANCEL_CURRENT, PendingIntent.FLAG_UPDATE_CURRENT, PendingIntent.FLAG_IMMUTABLE, PendingIntent.FLAG_MUTABLE, Intent.FILL_IN_ACTION, Intent.FILL_IN_DATA, Intent.FILL_IN_CATEGORIES, Intent.FILL_IN_COMPONENT, Intent.FILL_IN_PACKAGE, Intent.FILL_IN_SOURCE_BOUNDS, Intent.FILL_IN_SELECTOR, Intent.FILL_IN_CLIP_DATA" + errorLine1=" : PendingIntent.getActivity(applicationContext, requestCode, intent, flags);" + errorLine2=" ~~~~~"> + <location + file="$SRC/chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/NotificationIntentInterceptor.java" + line="170" + column="86"/> </issue> - <issue id="WrongConstant" message="Must be one of: MessageClearReason.UNKNOWN, MessageClearReason.NAVIGATE_TO_SAME_DOMAIN, MessageClearReason.NAVIGATE_TO_DIFFERENT_DOMAIN, MessageClearReason.MESSAGE_CONTEXT_NO_LONGER_VALID, MessageClearReason.SWITCH_TO_DIFFERENT_WEBCONTENTS" errorLine1=" "MerchantTrust.Message.ClearReason", clearReason, MessageClearReason.MAX_VALUE + 1);" errorLine2=" ~~~~~~~~~"> - <location file="chrome/browser/commerce/merchant_viewer/android/java/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustMetrics.java" /> + <issue + id="WrongConstant" + message="Must be one of: SystemNotificationType.UNKNOWN, SystemNotificationType.DOWNLOAD_FILES, SystemNotificationType.DOWNLOAD_PAGES, SystemNotificationType.CLOSE_INCOGNITO, SystemNotificationType.CONTENT_SUGGESTION, SystemNotificationType.MEDIA_CAPTURE, SystemNotificationType.PHYSICAL_WEB, SystemNotificationType.MEDIA, SystemNotificationType.SITES, SystemNotificationType.SYNC, SystemNotificationType.WEBAPK, SystemNotificationType.BROWSER_ACTIONS, SystemNotificationType.WEBAPP_ACTIONS, SystemNotificationType.OFFLINE_CONTENT_SUGGESTION, SystemNotificationType.TRUSTED_WEB_ACTIVITY_SITES, SystemNotificationType.OFFLINE_PAGES, SystemNotificationType.SEND_TAB_TO_SELF, SystemNotificationType.UPDATES, SystemNotificationType.CLICK_TO_CALL, SystemNotificationType.SHARED_CLIPBOARD, SystemNotificationType.SMS_FETCHER, SystemNotificationType.PERMISSION_REQUESTS, SystemNotificationType.PERMISSION_REQUESTS_HIGH, SystemNotificationType.ANNOUNCEMENT, SystemNotificationType.SHARE_SAVE_IMAGE, SystemNotificationType.TWA_DISCLOSURE_INITIAL, SystemNotificationType.TWA_DISCLOSURE_SUBSEQUENT, SystemNotificationType.CHROME_REENGAGEMENT_1, SystemNotificationType.CHROME_REENGAGEMENT_2, SystemNotificationType.CHROME_REENGAGEMENT_3, SystemNotificationType.PRICE_DROP_ALERTS, SystemNotificationType.WEBAPK_INSTALL_IN_PROGRESS, SystemNotificationType.WEBAPK_INSTALL_COMPLETE, SystemNotificationType.PRICE_DROP_ALERTS_CHROME_MANAGED, SystemNotificationType.PRICE_DROP_ALERTS_USER_MANAGED, SystemNotificationType.CHROME_TIPS, SystemNotificationType.BLUETOOTH, SystemNotificationType.USB" + errorLine1=" SystemNotificationType.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/NotificationUmaTracker.java" + line="277" + column="40"/> </issue> - <issue id="WrongConstant" message="Must be one of: BottomSheetOpenedSource.UNKNOWN, BottomSheetOpenedSource.FROM_MESSAGE, BottomSheetOpenedSource.FROM_PAGE_INFO" errorLine1=" BottomSheetOpenedSource.MAX_VALUE + 1);" errorLine2=" ~~~~~~~~~"> - <location file="chrome/browser/commerce/merchant_viewer/android/java/src/org/chromium/chrome/browser/merchant_viewer/MerchantTrustMetrics.java" /> + <issue + id="WrongConstant" + message="Must be one of: SystemNotificationType.UNKNOWN, SystemNotificationType.DOWNLOAD_FILES, SystemNotificationType.DOWNLOAD_PAGES, SystemNotificationType.CLOSE_INCOGNITO, SystemNotificationType.CONTENT_SUGGESTION, SystemNotificationType.MEDIA_CAPTURE, SystemNotificationType.PHYSICAL_WEB, SystemNotificationType.MEDIA, SystemNotificationType.SITES, SystemNotificationType.SYNC, SystemNotificationType.WEBAPK, SystemNotificationType.BROWSER_ACTIONS, SystemNotificationType.WEBAPP_ACTIONS, SystemNotificationType.OFFLINE_CONTENT_SUGGESTION, SystemNotificationType.TRUSTED_WEB_ACTIVITY_SITES, SystemNotificationType.OFFLINE_PAGES, SystemNotificationType.SEND_TAB_TO_SELF, SystemNotificationType.UPDATES, SystemNotificationType.CLICK_TO_CALL, SystemNotificationType.SHARED_CLIPBOARD, SystemNotificationType.SMS_FETCHER, SystemNotificationType.PERMISSION_REQUESTS, SystemNotificationType.PERMISSION_REQUESTS_HIGH, SystemNotificationType.ANNOUNCEMENT, SystemNotificationType.SHARE_SAVE_IMAGE, SystemNotificationType.TWA_DISCLOSURE_INITIAL, SystemNotificationType.TWA_DISCLOSURE_SUBSEQUENT, SystemNotificationType.CHROME_REENGAGEMENT_1, SystemNotificationType.CHROME_REENGAGEMENT_2, SystemNotificationType.CHROME_REENGAGEMENT_3, SystemNotificationType.PRICE_DROP_ALERTS, SystemNotificationType.WEBAPK_INSTALL_IN_PROGRESS, SystemNotificationType.WEBAPK_INSTALL_COMPLETE, SystemNotificationType.PRICE_DROP_ALERTS_CHROME_MANAGED, SystemNotificationType.PRICE_DROP_ALERTS_USER_MANAGED, SystemNotificationType.CHROME_TIPS, SystemNotificationType.BLUETOOTH, SystemNotificationType.USB" + errorLine1=" "Mobile.SystemNotification.Dismiss", type, SystemNotificationType.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/NotificationUmaTracker.java" + line="324" + column="83"/> </issue> - <issue id="WrongConstant" message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" errorLine1=" return direction != ScrollDirection.UNKNOWN && mCurrentState == State.IDLE;" errorLine2=" ~~~~~~~"> - <location file="components/messages/android/internal/java/src/org/chromium/components/messages/MessageBannerMediator.java" /> + <issue + id="WrongConstant" + message="Must be one of: ActionType.UNKNOWN, ActionType.DOWNLOAD_PAUSE, ActionType.DOWNLOAD_RESUME, ActionType.DOWNLOAD_CANCEL, ActionType.DOWNLOAD_PAGE_PAUSE, ActionType.DOWNLOAD_PAGE_RESUME, ActionType.DOWNLOAD_PAGE_CANCEL, ActionType.CONTENT_SUGGESTION_SETTINGS, ActionType.WEB_APP_ACTION_SHARE, ActionType.WEB_APP_ACTION_OPEN_IN_CHROME, ActionType.OFFLINE_CONTENT_SUGGESTION_SETTINGS, ActionType.SHARING_TRY_AGAIN, ActionType.SETTINGS, ActionType.ANNOUNCEMENT_ACK, ActionType.ANNOUNCEMENT_OPEN, ActionType.PRICE_DROP_VISIT_SITE, ActionType.PRICE_DROP_TURN_OFF_ALERT" + errorLine1=" "Mobile.SystemNotification.Action.Click", actionType, ActionType.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/NotificationUmaTracker.java" + line="368" + column="82"/> </issue> - <issue id="WrongConstant" message="Must be one of: MessageDisableReason.UNKNOWN, MessageDisableReason.MESSAGE_ACCEPTED, MessageDisableReason.MESSAGE_DISMISSED, MessageDisableReason.MESSAGE_IGNORED" errorLine1=" MessageDisableReason.MAX_VALUE + 1);" errorLine2=" ~~~~~~~~~"> - <location file="chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/MessageService.java" /> + <issue + id="WrongConstant" + message="Must be one of: SystemNotificationType.UNKNOWN, SystemNotificationType.DOWNLOAD_FILES, SystemNotificationType.DOWNLOAD_PAGES, SystemNotificationType.CLOSE_INCOGNITO, SystemNotificationType.CONTENT_SUGGESTION, SystemNotificationType.MEDIA_CAPTURE, SystemNotificationType.PHYSICAL_WEB, SystemNotificationType.MEDIA, SystemNotificationType.SITES, SystemNotificationType.SYNC, SystemNotificationType.WEBAPK, SystemNotificationType.BROWSER_ACTIONS, SystemNotificationType.WEBAPP_ACTIONS, SystemNotificationType.OFFLINE_CONTENT_SUGGESTION, SystemNotificationType.TRUSTED_WEB_ACTIVITY_SITES, SystemNotificationType.OFFLINE_PAGES, SystemNotificationType.SEND_TAB_TO_SELF, SystemNotificationType.UPDATES, SystemNotificationType.CLICK_TO_CALL, SystemNotificationType.SHARED_CLIPBOARD, SystemNotificationType.SMS_FETCHER, SystemNotificationType.PERMISSION_REQUESTS, SystemNotificationType.PERMISSION_REQUESTS_HIGH, SystemNotificationType.ANNOUNCEMENT, SystemNotificationType.SHARE_SAVE_IMAGE, SystemNotificationType.TWA_DISCLOSURE_INITIAL, SystemNotificationType.TWA_DISCLOSURE_SUBSEQUENT, SystemNotificationType.CHROME_REENGAGEMENT_1, SystemNotificationType.CHROME_REENGAGEMENT_2, SystemNotificationType.CHROME_REENGAGEMENT_3, SystemNotificationType.PRICE_DROP_ALERTS, SystemNotificationType.WEBAPK_INSTALL_IN_PROGRESS, SystemNotificationType.WEBAPK_INSTALL_COMPLETE, SystemNotificationType.PRICE_DROP_ALERTS_CHROME_MANAGED, SystemNotificationType.PRICE_DROP_ALERTS_USER_MANAGED, SystemNotificationType.CHROME_TIPS, SystemNotificationType.BLUETOOTH, SystemNotificationType.USB" + errorLine1=" RecordHistogram.recordEnumeratedHistogram(name, type, SystemNotificationType.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/NotificationUmaTracker.java" + line="504" + column="86"/> </issue> - <issue id="WrongConstant" message="Must be one of: ParsingLogResult.SUCCESS, ParsingLogResult.MALFORMED_PROTOBUF, ParsingLogResult.IO_EXCEPTION" errorLine1=" .setMax(ParsingLogResult.COUNT)" errorLine2=" ~~~~~"> - <location file="android_webview/nonembedded/java/src/org/chromium/android_webview/services/MetricsBridgeService.java" /> + <issue + id="WrongConstant" + message="Must be one of: UmaEnum.CAN_ANIMATE_NATIVE_CONTROLS, UmaEnum.CAN_ANIMATE_NATIVE_CONTROLS_OMNIBOX_FOCUSED, UmaEnum.CANNOT_ANIMATE_NATIVE_CONTROLS, UmaEnum.CANNOT_ANIMATE_NATIVE_CONTROLS_OMNIBOX_FOCUSED" + errorLine1=" surfaceState, UmaEnum.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/indicator/OfflineIndicatorControllerV2.java" + line="268" + column="39"/> </issue> - <issue id="WrongConstant" message="Must be one of: ParsingLogResult.SUCCESS, ParsingLogResult.MALFORMED_PROTOBUF, ParsingLogResult.IO_EXCEPTION" errorLine1=" .setNumBuckets(ParsingLogResult.COUNT + 1)" errorLine2=" ~~~~~"> - <location file="android_webview/nonembedded/java/src/org/chromium/android_webview/services/MetricsBridgeService.java" /> + <issue + id="WrongConstant" + message="Must be one of: FilterType.NONE, FilterType.SITES, FilterType.VIDEOS, FilterType.MUSIC, FilterType.IMAGES, FilterType.DOCUMENT, FilterType.OTHER, FilterType.PREFETCHED" + errorLine1=" for (int i = 0; i < Filters.FilterType.NUM_ENTRIES; i++) {" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/download/internal/android/java/src/org/chromium/chrome/browser/download/home/metrics/OfflineItemStartupLogger.java" + line="62" + column="48"/> </issue> - <issue id="WrongConstant" message="Must be one of: RetrieveMetricsTaskStatus.EXECUTION_EXCEPTION, RetrieveMetricsTaskStatus.INTERRUPTED_EXCEPTION" errorLine1=" .setMax(RetrieveMetricsTaskStatus.COUNT)" errorLine2=" ~~~~~"> - <location file="android_webview/nonembedded/java/src/org/chromium/android_webview/services/MetricsBridgeService.java" /> + <issue + id="WrongConstant" + message="Must be one of: TabRestoreType.WHILE_ONLINE, TabRestoreType.WHILE_ONLINE_CANT_SAVE_FOR_OFFLINE_USAGE, TabRestoreType.WHILE_ONLINE_TO_OFFLINE_PAGE, TabRestoreType.WHILE_ONLINE_TO_OFFLINE_PAGE_FROM_LAST_N, TabRestoreType.WHILE_OFFLINE, TabRestoreType.WHILE_OFFLINE_CANT_SAVE_FOR_OFFLINE_USAGE, TabRestoreType.WHILE_OFFLINE_TO_OFFLINE_PAGE, TabRestoreType.WHILE_OFFLINE_TO_OFFLINE_PAGE_FROM_LAST_N, TabRestoreType.FAILED, TabRestoreType.CRASHED" + errorLine1=" "OfflinePages.TabRestore", tabRestoreType, TabRestoreType.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/OfflinePageUtils.java" + line="949" + column="75"/> </issue> - <issue id="WrongConstant" message="Must be one of: ParsingLogResult.SUCCESS, ParsingLogResult.MALFORMED_PROTOBUF, ParsingLogResult.IO_EXCEPTION" errorLine1=" .setNumBuckets(ParsingLogResult.COUNT + 1)" errorLine2=" ~~~~~"> - <location file="android_webview/nonembedded/java/src/org/chromium/android_webview/services/MetricsBridgeService.java" /> + <issue + id="WrongConstant" + message="Must be one of: ReadCacheResult.UNKNOWN, ReadCacheResult.SUCCESS, ReadCacheResult.INVALID_PROTO_ERROR, ReadCacheResult.BASE64_ERROR" + errorLine1=" ReadCacheResult.SUCCESS, ReadCacheResult.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/optimization_guide/android/java/src/org/chromium/chrome/browser/optimization_guide/OptimizationGuidePushNotificationManager.java" + line="141" + column="66"/> </issue> - <issue id="WrongConstant" message="Must be one of: RetrieveMetricsTaskStatus.EXECUTION_EXCEPTION, RetrieveMetricsTaskStatus.INTERRUPTED_EXCEPTION" errorLine1=" list.add(logRetrieveMetricsTaskStatus(RetrieveMetricsTaskStatus.SUCCESS));" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="android_webview/nonembedded/java/src/org/chromium/android_webview/services/MetricsBridgeService.java" /> + <issue + id="WrongConstant" + message="Must be one of: ReadCacheResult.UNKNOWN, ReadCacheResult.SUCCESS, ReadCacheResult.INVALID_PROTO_ERROR, ReadCacheResult.BASE64_ERROR" + errorLine1=" ReadCacheResult.INVALID_PROTO_ERROR, ReadCacheResult.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/optimization_guide/android/java/src/org/chromium/chrome/browser/optimization_guide/OptimizationGuidePushNotificationManager.java" + line="144" + column="78"/> </issue> - <issue id="WrongConstant" message="Must be one of: RetrieveMetricsTaskStatus.EXECUTION_EXCEPTION, RetrieveMetricsTaskStatus.INTERRUPTED_EXCEPTION" errorLine1=" list.add(logRetrieveMetricsTaskStatus(RetrieveMetricsTaskStatus.SUCCESS));" errorLine2=" ~~~~~~~"> - <location file="android_webview/nonembedded/java/src/org/chromium/android_webview/services/MetricsBridgeService.java" /> + <issue + id="WrongConstant" + message="Must be one of: ReadCacheResult.UNKNOWN, ReadCacheResult.SUCCESS, ReadCacheResult.INVALID_PROTO_ERROR, ReadCacheResult.BASE64_ERROR" + errorLine1=" ReadCacheResult.BASE64_ERROR, ReadCacheResult.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/optimization_guide/android/java/src/org/chromium/chrome/browser/optimization_guide/OptimizationGuidePushNotificationManager.java" + line="148" + column="71"/> </issue> - <issue id="WrongConstant" message="Must be one of: MixedContentDownloadDialogEvent.SHOW, MixedContentDownloadDialogEvent.CONFIRM, MixedContentDownloadDialogEvent.CANCEL, MixedContentDownloadDialogEvent.DISMISS" errorLine1=" "Download.MixedContentDialog.Events", event, MixedContentDownloadDialogEvent.COUNT);" errorLine2=" ~~~~~"> - <location file="chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/dialogs/MixedContentDownloadDialog.java" /> + <issue + id="WrongConstant" + message="Must be one of: VerificationResult.ONLINE_SUCCESS, VerificationResult.ONLINE_FAILURE, VerificationResult.OFFLINE_SUCCESS, VerificationResult.OFFLINE_FAILURE, VerificationResult.HTTPS_FAILURE, VerificationResult.REQUEST_FAILURE, VerificationResult.CACHED_SUCCESS" + errorLine1=" "BrowserServices.VerificationResult", result, VerificationResult.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/android/browserservices/metrics/java/src/org/chromium/chrome/browser/browserservices/metrics/OriginVerifierMetricsRecorder.java" + line="38" + column="82"/> </issue> - <issue id="WrongConstant" message="Must be one of: SecurityFilteredTouchResult.BLOCKED, SecurityFilteredTouchResult.HANDLED" errorLine1=" SecurityFilteredTouchResult.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="components/browser_ui/modaldialog/android/java/src/org/chromium/components/browser_ui/modaldialog/ModalDialogView.java" /> + <issue + id="WrongConstant" + message="Must be one of: PanelState.UNDEFINED, PanelState.CLOSED, PanelState.PEEKED, PanelState.EXPANDED, PanelState.MAXIMIZED" + errorLine1=" for (@PanelState int state = PanelState.UNDEFINED; state < PanelState.NUM_ENTRIES;" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelBase.java" + line="754" + column="79"/> </issue> - <issue id="WrongConstant" message="Must be one of: ContentSuggestionsDisplayStatus.VISIBLE, ContentSuggestionsDisplayStatus.COLLAPSED, ContentSuggestionsDisplayStatus.DISABLED_BY_POLICY, ContentSuggestionsDisplayStatus.DISABLED" errorLine1=" status, ContentSuggestionsDisplayStatus.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPageUma.java" /> + <issue + id="WrongConstant" + message="Must be one of: PanelState.UNDEFINED, PanelState.CLOSED, PanelState.PEEKED, PanelState.EXPANDED, PanelState.MAXIMIZED" + errorLine1=" for (@PanelState int state = PanelState.UNDEFINED; state < PanelState.NUM_ENTRIES;" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelBase.java" + line="870" + column="79"/> </issue> - <issue id="WrongConstant" message="Must be one of: NightModeEnabledReason.USER_PREFERENCE, NightModeEnabledReason.POWER_SAVE_MODE, NightModeEnabledReason.OTHER" errorLine1=" NightModeEnabledReason.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/ui/android/night_mode/java/src/org/chromium/chrome/browser/night_mode/NightModeMetrics.java" /> + <issue + id="WrongConstant" + message="Must be one of: DiscoverabilityAction.PERMISSION_ICON_SHOWN, DiscoverabilityAction.PAGE_INFO_OPENED, DiscoverabilityAction.PERMISSIONS_OPENED, DiscoverabilityAction.PERMISSION_CHANGED, DiscoverabilityAction.STORE_ICON_SHOWN, DiscoverabilityAction.PAGE_INFO_OPENED_FROM_STORE_ICON, DiscoverabilityAction.STORE_INFO_OPENED" + errorLine1=" DiscoverabilityAction.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/components/page_info/android/java/src/org/chromium/components/page_info/PageInfoDiscoverabilityMetrics.java" + line="48" + column="39"/> </issue> - <issue id="WrongConstant" message="Must be one of: ThemeType.SYSTEM_DEFAULT, ThemeType.LIGHT, ThemeType.DARK" errorLine1=" "Android.DarkTheme.Preference.State", theme, ThemeType.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/ui/android/night_mode/java/src/org/chromium/chrome/browser/night_mode/NightModeMetrics.java" /> + <issue + id="WrongConstant" + message="Must be one of: PasswordCheckUserAction.START_CHECK_AUTOMATICALLY, PasswordCheckUserAction.START_CHECK_MANUALLY, PasswordCheckUserAction.CANCEL_CHECK, PasswordCheckUserAction.CHANGE_PASSWORD, PasswordCheckUserAction.CHANGE_PASSWORD_AUTOMATICALLY, PasswordCheckUserAction.CHANGE_PASSWORD_MANUALLY, PasswordCheckUserAction.VIEW_PASSWORD_CLICK, PasswordCheckUserAction.VIEWED_PASSWORD, PasswordCheckUserAction.COPIED_PASSWORD, PasswordCheckUserAction.EDIT_PASSWORD_CLICK, PasswordCheckUserAction.EDITED_PASSWORD, PasswordCheckUserAction.DELETE_PASSWORD_CLICK, PasswordCheckUserAction.DELETED_PASSWORD" + errorLine1=" userAction, PasswordCheckUserAction.COUNT);" + errorLine2=" ~~~~~"> + <location + file="$SRC/chrome/browser/password_check/android/java/src/org/chromium/chrome/browser/password_check/PasswordCheckMetricsRecorder.java" + line="27" + column="53"/> </issue> - <issue id="WrongConstant" message="Must be one of: ThemeSettingsEntry.SETTINGS, ThemeSettingsEntry.AUTO_DARK_MODE_MESSAGE" errorLine1=" "Android.DarkTheme.ThemeSettingsEntry", entry, ThemeSettingsEntry.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/ui/android/night_mode/java/src/org/chromium/chrome/browser/night_mode/NightModeMetrics.java" /> + <issue + id="WrongConstant" + message="Must be one of: PasswordCheckResolutionAction.OPENED_SITE, PasswordCheckResolutionAction.STARTED_SCRIPT, PasswordCheckResolutionAction.DELETED_PASSWORD, PasswordCheckResolutionAction.EDITED_PASSWORD, PasswordCheckResolutionAction.DID_NOTHING" + errorLine1=" PasswordCheckResolutionAction.COUNT);" + errorLine2=" ~~~~~"> + <location + file="$SRC/chrome/browser/password_check/android/java/src/org/chromium/chrome/browser/password_check/PasswordCheckMetricsRecorder.java" + line="45" + column="51"/> </issue> - <issue id="WrongConstant" message="Must be one of: NoteShareDestination.FIRST_PARTY, NoteShareDestination.THIRD_PARTY" errorLine1=" NoteShareDestination.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/content_creation/notes/internal/android/java/src/org/chromium/chrome/browser/content_creation/notes/NoteCreationMetrics.java" /> + <issue + id="WrongConstant" + message="Must be one of: PasswordCheckResolutionAction.OPENED_SITE, PasswordCheckResolutionAction.STARTED_SCRIPT, PasswordCheckResolutionAction.DELETED_PASSWORD, PasswordCheckResolutionAction.EDITED_PASSWORD, PasswordCheckResolutionAction.DID_NOTHING" + errorLine1=" PasswordCheckResolutionAction.COUNT);" + errorLine2=" ~~~~~"> + <location + file="$SRC/chrome/browser/password_check/android/java/src/org/chromium/chrome/browser/password_check/PasswordCheckMetricsRecorder.java" + line="50" + column="51"/> </issue> - <issue id="WrongConstant" message="Must be one of: NoteCreationFunnel.NOTE_CREATION_SELECTED, NoteCreationFunnel.TEMPLATE_SELECTED, NoteCreationFunnel.NOTE_SHARED" errorLine1=" assert funnelState < NoteCreationFunnel.NUM_ENTRIES;" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/content_creation/notes/internal/android/java/src/org/chromium/chrome/browser/content_creation/notes/NoteCreationMetrics.java" /> + <issue + id="WrongConstant" + message="Must be one of: PasswordCheckResolutionAction.OPENED_SITE, PasswordCheckResolutionAction.STARTED_SCRIPT, PasswordCheckResolutionAction.DELETED_PASSWORD, PasswordCheckResolutionAction.EDITED_PASSWORD, PasswordCheckResolutionAction.DID_NOTHING" + errorLine1=" PasswordCheckResolutionAction.COUNT);" + errorLine2=" ~~~~~"> + <location + file="$SRC/chrome/browser/password_check/android/java/src/org/chromium/chrome/browser/password_check/PasswordCheckMetricsRecorder.java" + line="54" + column="51"/> </issue> - <issue id="WrongConstant" message="Must be one of: NoteCreationFunnel.NOTE_CREATION_SELECTED, NoteCreationFunnel.TEMPLATE_SELECTED, NoteCreationFunnel.NOTE_SHARED" errorLine1=" "NoteCreation.Funnel", funnelState, NoteCreationFunnel.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/content_creation/notes/internal/android/java/src/org/chromium/chrome/browser/content_creation/notes/NoteCreationMetrics.java" /> + <issue + id="WrongConstant" + message="Must be one of: PhotoCapabilityBool.SUPPORTS_TORCH, PhotoCapabilityBool.TORCH, PhotoCapabilityBool.RED_EYE_REDUCTION" + errorLine1=" if (boolCapability.length != PhotoCapabilityBool.NUM_ENTRIES" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/media/capture/video/android/java/src/org/chromium/media/PhotoCapabilities.java" + line="26" + column="58"/> </issue> - <issue id="WrongConstant" message="Must be one or more of: PendingIntent.FLAG_ONE_SHOT, PendingIntent.FLAG_NO_CREATE, PendingIntent.FLAG_CANCEL_CURRENT, PendingIntent.FLAG_UPDATE_CURRENT, PendingIntent.FLAG_IMMUTABLE, PendingIntent.FLAG_MUTABLE, Intent.FILL_IN_ACTION, Intent.FILL_IN_DATA, Intent.FILL_IN_CATEGORIES, Intent.FILL_IN_COMPONENT, Intent.FILL_IN_PACKAGE, Intent.FILL_IN_SOURCE_BOUNDS, Intent.FILL_IN_SELECTOR, Intent.FILL_IN_CLIP_DATA" errorLine1=" ? PendingIntent.getBroadcast(applicationContext, requestCode, intent, flags)" errorLine2=" ~~~~~"> - <location file="chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/NotificationIntentInterceptor.java" /> + <issue + id="WrongConstant" + message="Must be one of: PhotoCapabilityDouble.MIN_ZOOM, PhotoCapabilityDouble.MAX_ZOOM, PhotoCapabilityDouble.CURRENT_ZOOM, PhotoCapabilityDouble.STEP_ZOOM, PhotoCapabilityDouble.MIN_FOCUS_DISTANCE, PhotoCapabilityDouble.MAX_FOCUS_DISTANCE, PhotoCapabilityDouble.CURRENT_FOCUS_DISTANCE, PhotoCapabilityDouble.STEP_FOCUS_DISTANCE, PhotoCapabilityDouble.MIN_EXPOSURE_COMPENSATION, PhotoCapabilityDouble.MAX_EXPOSURE_COMPENSATION, PhotoCapabilityDouble.CURRENT_EXPOSURE_COMPENSATION, PhotoCapabilityDouble.STEP_EXPOSURE_COMPENSATION, PhotoCapabilityDouble.MIN_EXPOSURE_TIME, PhotoCapabilityDouble.MAX_EXPOSURE_TIME, PhotoCapabilityDouble.CURRENT_EXPOSURE_TIME, PhotoCapabilityDouble.STEP_EXPOSURE_TIME" + errorLine1=" || doubleCapability.length != PhotoCapabilityDouble.NUM_ENTRIES" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/media/capture/video/android/java/src/org/chromium/media/PhotoCapabilities.java" + line="27" + column="69"/> </issue> - <issue id="WrongConstant" message="Must be one or more of: PendingIntent.FLAG_ONE_SHOT, PendingIntent.FLAG_NO_CREATE, PendingIntent.FLAG_CANCEL_CURRENT, PendingIntent.FLAG_UPDATE_CURRENT, PendingIntent.FLAG_IMMUTABLE, PendingIntent.FLAG_MUTABLE, Intent.FILL_IN_ACTION, Intent.FILL_IN_DATA, Intent.FILL_IN_CATEGORIES, Intent.FILL_IN_COMPONENT, Intent.FILL_IN_PACKAGE, Intent.FILL_IN_SOURCE_BOUNDS, Intent.FILL_IN_SELECTOR, Intent.FILL_IN_CLIP_DATA" errorLine1=" : PendingIntent.getActivity(applicationContext, requestCode, intent, flags);" errorLine2=" ~~~~~"> - <location file="chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/NotificationIntentInterceptor.java" /> + <issue + id="WrongConstant" + message="Must be one of: PhotoCapabilityInt.MIN_ISO, PhotoCapabilityInt.MAX_ISO, PhotoCapabilityInt.CURRENT_ISO, PhotoCapabilityInt.STEP_ISO, PhotoCapabilityInt.MIN_HEIGHT, PhotoCapabilityInt.MAX_HEIGHT, PhotoCapabilityInt.CURRENT_HEIGHT, PhotoCapabilityInt.STEP_HEIGHT, PhotoCapabilityInt.MIN_WIDTH, PhotoCapabilityInt.MAX_WIDTH, PhotoCapabilityInt.CURRENT_WIDTH, PhotoCapabilityInt.STEP_WIDTH, PhotoCapabilityInt.MIN_COLOR_TEMPERATURE, PhotoCapabilityInt.MAX_COLOR_TEMPERATURE, PhotoCapabilityInt.CURRENT_COLOR_TEMPERATURE, PhotoCapabilityInt.STEP_COLOR_TEMPERATURE" + errorLine1=" || intCapability.length != PhotoCapabilityInt.NUM_ENTRIES" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/media/capture/video/android/java/src/org/chromium/media/PhotoCapabilities.java" + line="28" + column="63"/> </issue> - <issue id="WrongConstant" message="Must be one of: SystemNotificationType.UNKNOWN, SystemNotificationType.DOWNLOAD_FILES, SystemNotificationType.DOWNLOAD_PAGES, SystemNotificationType.CLOSE_INCOGNITO, SystemNotificationType.CONTENT_SUGGESTION, SystemNotificationType.MEDIA_CAPTURE, SystemNotificationType.PHYSICAL_WEB, SystemNotificationType.MEDIA, SystemNotificationType.SITES, SystemNotificationType.SYNC, SystemNotificationType.WEBAPK, SystemNotificationType.BROWSER_ACTIONS, SystemNotificationType.WEBAPP_ACTIONS, SystemNotificationType.OFFLINE_CONTENT_SUGGESTION, SystemNotificationType.TRUSTED_WEB_ACTIVITY_SITES, SystemNotificationType.OFFLINE_PAGES, SystemNotificationType.SEND_TAB_TO_SELF, SystemNotificationType.UPDATES, SystemNotificationType.CLICK_TO_CALL, SystemNotificationType.SHARED_CLIPBOARD, SystemNotificationType.SMS_FETCHER, SystemNotificationType.PERMISSION_REQUESTS, SystemNotificationType.PERMISSION_REQUESTS_HIGH, SystemNotificationType.ANNOUNCEMENT, SystemNotificationType.SHARE_SAVE_IMAGE, SystemNotificationType.TWA_DISCLOSURE_INITIAL, SystemNotificationType.TWA_DISCLOSURE_SUBSEQUENT, SystemNotificationType.CHROME_REENGAGEMENT_1, SystemNotificationType.CHROME_REENGAGEMENT_2, SystemNotificationType.CHROME_REENGAGEMENT_3, SystemNotificationType.PRICE_DROP_ALERTS, SystemNotificationType.WEBAPK_INSTALL_IN_PROGRESS, SystemNotificationType.WEBAPK_INSTALL_COMPLETE, SystemNotificationType.PRICE_DROP_ALERTS_CHROME_MANAGED, SystemNotificationType.PRICE_DROP_ALERTS_USER_MANAGED, SystemNotificationType.CHROME_TIPS, SystemNotificationType.BLUETOOTH, SystemNotificationType.USB" errorLine1=" SystemNotificationType.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/NotificationUmaTracker.java" /> + <issue + id="WrongConstant" + message="Must be one of: MeteringModeType.FOCUS, MeteringModeType.EXPOSURE, MeteringModeType.WHITE_BALANCE" + errorLine1=" || meteringMode.length != MeteringModeType.NUM_ENTRIES" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/media/capture/video/android/java/src/org/chromium/media/PhotoCapabilities.java" + line="29" + column="60"/> </issue> - <issue id="WrongConstant" message="Must be one of: SystemNotificationType.UNKNOWN, SystemNotificationType.DOWNLOAD_FILES, SystemNotificationType.DOWNLOAD_PAGES, SystemNotificationType.CLOSE_INCOGNITO, SystemNotificationType.CONTENT_SUGGESTION, SystemNotificationType.MEDIA_CAPTURE, SystemNotificationType.PHYSICAL_WEB, SystemNotificationType.MEDIA, SystemNotificationType.SITES, SystemNotificationType.SYNC, SystemNotificationType.WEBAPK, SystemNotificationType.BROWSER_ACTIONS, SystemNotificationType.WEBAPP_ACTIONS, SystemNotificationType.OFFLINE_CONTENT_SUGGESTION, SystemNotificationType.TRUSTED_WEB_ACTIVITY_SITES, SystemNotificationType.OFFLINE_PAGES, SystemNotificationType.SEND_TAB_TO_SELF, SystemNotificationType.UPDATES, SystemNotificationType.CLICK_TO_CALL, SystemNotificationType.SHARED_CLIPBOARD, SystemNotificationType.SMS_FETCHER, SystemNotificationType.PERMISSION_REQUESTS, SystemNotificationType.PERMISSION_REQUESTS_HIGH, SystemNotificationType.ANNOUNCEMENT, SystemNotificationType.SHARE_SAVE_IMAGE, SystemNotificationType.TWA_DISCLOSURE_INITIAL, SystemNotificationType.TWA_DISCLOSURE_SUBSEQUENT, SystemNotificationType.CHROME_REENGAGEMENT_1, SystemNotificationType.CHROME_REENGAGEMENT_2, SystemNotificationType.CHROME_REENGAGEMENT_3, SystemNotificationType.PRICE_DROP_ALERTS, SystemNotificationType.WEBAPK_INSTALL_IN_PROGRESS, SystemNotificationType.WEBAPK_INSTALL_COMPLETE, SystemNotificationType.PRICE_DROP_ALERTS_CHROME_MANAGED, SystemNotificationType.PRICE_DROP_ALERTS_USER_MANAGED, SystemNotificationType.CHROME_TIPS, SystemNotificationType.BLUETOOTH, SystemNotificationType.USB" errorLine1=" "Mobile.SystemNotification.Dismiss", type, SystemNotificationType.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/NotificationUmaTracker.java" /> + <issue + id="WrongConstant" + message="Must be one of: MeteringModeType.FOCUS, MeteringModeType.EXPOSURE, MeteringModeType.WHITE_BALANCE" + errorLine1=" || meteringModeArray.length != MeteringModeType.NUM_ENTRIES) {" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/media/capture/video/android/java/src/org/chromium/media/PhotoCapabilities.java" + line="30" + column="65"/> </issue> - <issue id="WrongConstant" message="Must be one of: ActionType.UNKNOWN, ActionType.DOWNLOAD_PAUSE, ActionType.DOWNLOAD_RESUME, ActionType.DOWNLOAD_CANCEL, ActionType.DOWNLOAD_PAGE_PAUSE, ActionType.DOWNLOAD_PAGE_RESUME, ActionType.DOWNLOAD_PAGE_CANCEL, ActionType.CONTENT_SUGGESTION_SETTINGS, ActionType.WEB_APP_ACTION_SHARE, ActionType.WEB_APP_ACTION_OPEN_IN_CHROME, ActionType.OFFLINE_CONTENT_SUGGESTION_SETTINGS, ActionType.SHARING_TRY_AGAIN, ActionType.SETTINGS, ActionType.ANNOUNCEMENT_ACK, ActionType.ANNOUNCEMENT_OPEN, ActionType.PRICE_DROP_VISIT_SITE, ActionType.PRICE_DROP_TURN_OFF_ALERT" errorLine1=" "Mobile.SystemNotification.Action.Click", actionType, ActionType.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/NotificationUmaTracker.java" /> + <issue + id="WrongConstant" + message="Must be one of: AndroidFillLightMode.NOT_SET, AndroidFillLightMode.OFF, AndroidFillLightMode.AUTO, AndroidFillLightMode.FLASH" + errorLine1=" || fillLightModeArray[i] >= AndroidFillLightMode.NUM_ENTRIES) {" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/media/capture/video/android/java/src/org/chromium/media/PhotoCapabilities.java" + line="36" + column="74"/> </issue> - <issue id="WrongConstant" message="Must be one of: SystemNotificationType.UNKNOWN, SystemNotificationType.DOWNLOAD_FILES, SystemNotificationType.DOWNLOAD_PAGES, SystemNotificationType.CLOSE_INCOGNITO, SystemNotificationType.CONTENT_SUGGESTION, SystemNotificationType.MEDIA_CAPTURE, SystemNotificationType.PHYSICAL_WEB, SystemNotificationType.MEDIA, SystemNotificationType.SITES, SystemNotificationType.SYNC, SystemNotificationType.WEBAPK, SystemNotificationType.BROWSER_ACTIONS, SystemNotificationType.WEBAPP_ACTIONS, SystemNotificationType.OFFLINE_CONTENT_SUGGESTION, SystemNotificationType.TRUSTED_WEB_ACTIVITY_SITES, SystemNotificationType.OFFLINE_PAGES, SystemNotificationType.SEND_TAB_TO_SELF, SystemNotificationType.UPDATES, SystemNotificationType.CLICK_TO_CALL, SystemNotificationType.SHARED_CLIPBOARD, SystemNotificationType.SMS_FETCHER, SystemNotificationType.PERMISSION_REQUESTS, SystemNotificationType.PERMISSION_REQUESTS_HIGH, SystemNotificationType.ANNOUNCEMENT, SystemNotificationType.SHARE_SAVE_IMAGE, SystemNotificationType.TWA_DISCLOSURE_INITIAL, SystemNotificationType.TWA_DISCLOSURE_SUBSEQUENT, SystemNotificationType.CHROME_REENGAGEMENT_1, SystemNotificationType.CHROME_REENGAGEMENT_2, SystemNotificationType.CHROME_REENGAGEMENT_3, SystemNotificationType.PRICE_DROP_ALERTS, SystemNotificationType.WEBAPK_INSTALL_IN_PROGRESS, SystemNotificationType.WEBAPK_INSTALL_COMPLETE, SystemNotificationType.PRICE_DROP_ALERTS_CHROME_MANAGED, SystemNotificationType.PRICE_DROP_ALERTS_USER_MANAGED, SystemNotificationType.CHROME_TIPS, SystemNotificationType.BLUETOOTH, SystemNotificationType.USB" errorLine1=" RecordHistogram.recordEnumeratedHistogram(name, type, SystemNotificationType.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/notifications/android/java/src/org/chromium/chrome/browser/notifications/NotificationUmaTracker.java" /> + <issue + id="WrongConstant" + message="Must be one of: AndroidMeteringMode.NOT_SET, AndroidMeteringMode.NONE, AndroidMeteringMode.FIXED, AndroidMeteringMode.SINGLE_SHOT, AndroidMeteringMode.CONTINUOUS" + errorLine1=" if (meteringMode[i] < 0 || meteringMode[i] >= AndroidMeteringMode.NUM_ENTRIES) {" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/media/capture/video/android/java/src/org/chromium/media/PhotoCapabilities.java" + line="42" + column="79"/> </issue> - <issue id="WrongConstant" message="Must be one of: UmaEnum.CAN_ANIMATE_NATIVE_CONTROLS, UmaEnum.CAN_ANIMATE_NATIVE_CONTROLS_OMNIBOX_FOCUSED, UmaEnum.CANNOT_ANIMATE_NATIVE_CONTROLS, UmaEnum.CANNOT_ANIMATE_NATIVE_CONTROLS_OMNIBOX_FOCUSED" errorLine1=" surfaceState, UmaEnum.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/offlinepages/indicator/OfflineIndicatorControllerV2.java" /> + <issue + id="WrongConstant" + message="Must be one of: AndroidMeteringMode.NOT_SET, AndroidMeteringMode.NONE, AndroidMeteringMode.FIXED, AndroidMeteringMode.SINGLE_SHOT, AndroidMeteringMode.CONTINUOUS" + errorLine1=" || meteringModeArray[i][j] >= AndroidMeteringMode.NUM_ENTRIES) {" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/media/capture/video/android/java/src/org/chromium/media/PhotoCapabilities.java" + line="50" + column="75"/> </issue> - <issue id="WrongConstant" message="Must be one of: FilterType.NONE, FilterType.SITES, FilterType.VIDEOS, FilterType.MUSIC, FilterType.IMAGES, FilterType.DOCUMENT, FilterType.OTHER, FilterType.PREFETCHED" errorLine1=" for (int i = 0; i < Filters.FilterType.NUM_ENTRIES; i++) {" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/download/internal/android/java/src/org/chromium/chrome/browser/download/home/metrics/OfflineItemStartupLogger.java" /> + <issue + id="WrongConstant" + message="Must be one of: MeteringModeType.FOCUS, MeteringModeType.EXPOSURE, MeteringModeType.WHITE_BALANCE" + errorLine1=" mMeteringModeArray = new int[MeteringModeType.NUM_ENTRIES][];" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/media/capture/video/android/java/src/org/chromium/media/PhotoCapabilities.java" + line="61" + column="55"/> </issue> - <issue id="WrongConstant" message="Must be one of: TabRestoreType.WHILE_ONLINE, TabRestoreType.WHILE_ONLINE_CANT_SAVE_FOR_OFFLINE_USAGE, TabRestoreType.WHILE_ONLINE_TO_OFFLINE_PAGE, TabRestoreType.WHILE_ONLINE_TO_OFFLINE_PAGE_FROM_LAST_N, TabRestoreType.WHILE_OFFLINE, TabRestoreType.WHILE_OFFLINE_CANT_SAVE_FOR_OFFLINE_USAGE, TabRestoreType.WHILE_OFFLINE_TO_OFFLINE_PAGE, TabRestoreType.WHILE_OFFLINE_TO_OFFLINE_PAGE_FROM_LAST_N, TabRestoreType.FAILED, TabRestoreType.CRASHED" errorLine1=" "OfflinePages.TabRestore", tabRestoreType, TabRestoreType.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/offlinepages/OfflinePageUtils.java" /> + <issue + id="WrongConstant" + message="Must be one of: PhotoCapabilityBool.SUPPORTS_TORCH, PhotoCapabilityBool.TORCH, PhotoCapabilityBool.RED_EYE_REDUCTION" + errorLine1=" if (capability < 0 || capability >= PhotoCapabilityBool.NUM_ENTRIES) {" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/media/capture/video/android/java/src/org/chromium/media/PhotoCapabilities.java" + line="70" + column="65"/> </issue> - <issue id="WrongConstant" message="Must be one of: ReadCacheResult.UNKNOWN, ReadCacheResult.SUCCESS, ReadCacheResult.INVALID_PROTO_ERROR, ReadCacheResult.BASE64_ERROR" errorLine1=" ReadCacheResult.SUCCESS, ReadCacheResult.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/optimization_guide/android/java/src/org/chromium/chrome/browser/optimization_guide/OptimizationGuidePushNotificationManager.java" /> + <issue + id="WrongConstant" + message="Must be one of: PhotoCapabilityDouble.MIN_ZOOM, PhotoCapabilityDouble.MAX_ZOOM, PhotoCapabilityDouble.CURRENT_ZOOM, PhotoCapabilityDouble.STEP_ZOOM, PhotoCapabilityDouble.MIN_FOCUS_DISTANCE, PhotoCapabilityDouble.MAX_FOCUS_DISTANCE, PhotoCapabilityDouble.CURRENT_FOCUS_DISTANCE, PhotoCapabilityDouble.STEP_FOCUS_DISTANCE, PhotoCapabilityDouble.MIN_EXPOSURE_COMPENSATION, PhotoCapabilityDouble.MAX_EXPOSURE_COMPENSATION, PhotoCapabilityDouble.CURRENT_EXPOSURE_COMPENSATION, PhotoCapabilityDouble.STEP_EXPOSURE_COMPENSATION, PhotoCapabilityDouble.MIN_EXPOSURE_TIME, PhotoCapabilityDouble.MAX_EXPOSURE_TIME, PhotoCapabilityDouble.CURRENT_EXPOSURE_TIME, PhotoCapabilityDouble.STEP_EXPOSURE_TIME" + errorLine1=" if (capability < 0 || capability >= PhotoCapabilityDouble.NUM_ENTRIES) {" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/media/capture/video/android/java/src/org/chromium/media/PhotoCapabilities.java" + line="78" + column="67"/> </issue> - <issue id="WrongConstant" message="Must be one of: ReadCacheResult.UNKNOWN, ReadCacheResult.SUCCESS, ReadCacheResult.INVALID_PROTO_ERROR, ReadCacheResult.BASE64_ERROR" errorLine1=" ReadCacheResult.INVALID_PROTO_ERROR, ReadCacheResult.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/optimization_guide/android/java/src/org/chromium/chrome/browser/optimization_guide/OptimizationGuidePushNotificationManager.java" /> + <issue + id="WrongConstant" + message="Must be one of: PhotoCapabilityInt.MIN_ISO, PhotoCapabilityInt.MAX_ISO, PhotoCapabilityInt.CURRENT_ISO, PhotoCapabilityInt.STEP_ISO, PhotoCapabilityInt.MIN_HEIGHT, PhotoCapabilityInt.MAX_HEIGHT, PhotoCapabilityInt.CURRENT_HEIGHT, PhotoCapabilityInt.STEP_HEIGHT, PhotoCapabilityInt.MIN_WIDTH, PhotoCapabilityInt.MAX_WIDTH, PhotoCapabilityInt.CURRENT_WIDTH, PhotoCapabilityInt.STEP_WIDTH, PhotoCapabilityInt.MIN_COLOR_TEMPERATURE, PhotoCapabilityInt.MAX_COLOR_TEMPERATURE, PhotoCapabilityInt.CURRENT_COLOR_TEMPERATURE, PhotoCapabilityInt.STEP_COLOR_TEMPERATURE" + errorLine1=" if (capability < 0 || capability >= PhotoCapabilityInt.NUM_ENTRIES) {" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/media/capture/video/android/java/src/org/chromium/media/PhotoCapabilities.java" + line="86" + column="64"/> </issue> - <issue id="WrongConstant" message="Must be one of: ReadCacheResult.UNKNOWN, ReadCacheResult.SUCCESS, ReadCacheResult.INVALID_PROTO_ERROR, ReadCacheResult.BASE64_ERROR" errorLine1=" ReadCacheResult.BASE64_ERROR, ReadCacheResult.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/optimization_guide/android/java/src/org/chromium/chrome/browser/optimization_guide/OptimizationGuidePushNotificationManager.java" /> + <issue + id="WrongConstant" + message="Must be one of: MeteringModeType.FOCUS, MeteringModeType.EXPOSURE, MeteringModeType.WHITE_BALANCE" + errorLine1=" if (type < 0 || type >= MeteringModeType.NUM_ENTRIES) {" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/media/capture/video/android/java/src/org/chromium/media/PhotoCapabilities.java" + line="100" + column="50"/> </issue> - <issue id="WrongConstant" message="Must be one of: VerificationResult.ONLINE_SUCCESS, VerificationResult.ONLINE_FAILURE, VerificationResult.OFFLINE_SUCCESS, VerificationResult.OFFLINE_FAILURE, VerificationResult.HTTPS_FAILURE, VerificationResult.REQUEST_FAILURE, VerificationResult.CACHED_SUCCESS" errorLine1=" "BrowserServices.VerificationResult", result, VerificationResult.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/android/browserservices/metrics/java/src/org/chromium/chrome/browser/browserservices/metrics/OriginVerifierMetricsRecorder.java" /> + <issue + id="WrongConstant" + message="Must be one of: MeteringModeType.FOCUS, MeteringModeType.EXPOSURE, MeteringModeType.WHITE_BALANCE" + errorLine1=" if (type < 0 || type >= MeteringModeType.NUM_ENTRIES) {" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/media/capture/video/android/java/src/org/chromium/media/PhotoCapabilities.java" + line="108" + column="50"/> </issue> - <issue id="WrongConstant" message="Must be one of: PanelState.UNDEFINED, PanelState.CLOSED, PanelState.PEEKED, PanelState.EXPANDED, PanelState.MAXIMIZED" errorLine1=" for (@PanelState int state = PanelState.UNDEFINED; state < PanelState.NUM_ENTRIES;" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelBase.java" /> + <issue + id="WrongConstant" + message="Must be one of: PhotoCapabilityBool.SUPPORTS_TORCH, PhotoCapabilityBool.TORCH, PhotoCapabilityBool.RED_EYE_REDUCTION" + errorLine1=" public boolean mBoolCapability[] = new boolean[PhotoCapabilityBool.NUM_ENTRIES];" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/media/capture/video/android/java/src/org/chromium/media/PhotoCapabilities.java" + line="116" + column="76"/> </issue> - <issue id="WrongConstant" message="Must be one of: PanelState.UNDEFINED, PanelState.CLOSED, PanelState.PEEKED, PanelState.EXPANDED, PanelState.MAXIMIZED" errorLine1=" for (@PanelState int state = PanelState.UNDEFINED; state < PanelState.NUM_ENTRIES;" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelBase.java" /> + <issue + id="WrongConstant" + message="Must be one of: PhotoCapabilityDouble.MIN_ZOOM, PhotoCapabilityDouble.MAX_ZOOM, PhotoCapabilityDouble.CURRENT_ZOOM, PhotoCapabilityDouble.STEP_ZOOM, PhotoCapabilityDouble.MIN_FOCUS_DISTANCE, PhotoCapabilityDouble.MAX_FOCUS_DISTANCE, PhotoCapabilityDouble.CURRENT_FOCUS_DISTANCE, PhotoCapabilityDouble.STEP_FOCUS_DISTANCE, PhotoCapabilityDouble.MIN_EXPOSURE_COMPENSATION, PhotoCapabilityDouble.MAX_EXPOSURE_COMPENSATION, PhotoCapabilityDouble.CURRENT_EXPOSURE_COMPENSATION, PhotoCapabilityDouble.STEP_EXPOSURE_COMPENSATION, PhotoCapabilityDouble.MIN_EXPOSURE_TIME, PhotoCapabilityDouble.MAX_EXPOSURE_TIME, PhotoCapabilityDouble.CURRENT_EXPOSURE_TIME, PhotoCapabilityDouble.STEP_EXPOSURE_TIME" + errorLine1=" public double mDoubleCapability[] = new double[PhotoCapabilityDouble.NUM_ENTRIES];" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/media/capture/video/android/java/src/org/chromium/media/PhotoCapabilities.java" + line="117" + column="78"/> </issue> - <issue id="WrongConstant" message="Must be one of: DiscoverabilityAction.PERMISSION_ICON_SHOWN, DiscoverabilityAction.PAGE_INFO_OPENED, DiscoverabilityAction.PERMISSIONS_OPENED, DiscoverabilityAction.PERMISSION_CHANGED, DiscoverabilityAction.STORE_ICON_SHOWN, DiscoverabilityAction.PAGE_INFO_OPENED_FROM_STORE_ICON, DiscoverabilityAction.STORE_INFO_OPENED" errorLine1=" DiscoverabilityAction.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="components/page_info/android/java/src/org/chromium/components/page_info/PageInfoDiscoverabilityMetrics.java" /> + <issue + id="WrongConstant" + message="Must be one of: PhotoCapabilityInt.MIN_ISO, PhotoCapabilityInt.MAX_ISO, PhotoCapabilityInt.CURRENT_ISO, PhotoCapabilityInt.STEP_ISO, PhotoCapabilityInt.MIN_HEIGHT, PhotoCapabilityInt.MAX_HEIGHT, PhotoCapabilityInt.CURRENT_HEIGHT, PhotoCapabilityInt.STEP_HEIGHT, PhotoCapabilityInt.MIN_WIDTH, PhotoCapabilityInt.MAX_WIDTH, PhotoCapabilityInt.CURRENT_WIDTH, PhotoCapabilityInt.STEP_WIDTH, PhotoCapabilityInt.MIN_COLOR_TEMPERATURE, PhotoCapabilityInt.MAX_COLOR_TEMPERATURE, PhotoCapabilityInt.CURRENT_COLOR_TEMPERATURE, PhotoCapabilityInt.STEP_COLOR_TEMPERATURE" + errorLine1=" public int mIntCapability[] = new int[PhotoCapabilityInt.NUM_ENTRIES];" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/media/capture/video/android/java/src/org/chromium/media/PhotoCapabilities.java" + line="118" + column="66"/> </issue> - <issue id="WrongConstant" message="Must be one of: PasswordCheckUserAction.START_CHECK_AUTOMATICALLY, PasswordCheckUserAction.START_CHECK_MANUALLY, PasswordCheckUserAction.CANCEL_CHECK, PasswordCheckUserAction.CHANGE_PASSWORD, PasswordCheckUserAction.CHANGE_PASSWORD_AUTOMATICALLY, PasswordCheckUserAction.CHANGE_PASSWORD_MANUALLY, PasswordCheckUserAction.VIEW_PASSWORD_CLICK, PasswordCheckUserAction.VIEWED_PASSWORD, PasswordCheckUserAction.COPIED_PASSWORD, PasswordCheckUserAction.EDIT_PASSWORD_CLICK, PasswordCheckUserAction.EDITED_PASSWORD, PasswordCheckUserAction.DELETE_PASSWORD_CLICK, PasswordCheckUserAction.DELETED_PASSWORD" errorLine1=" userAction, PasswordCheckUserAction.COUNT);" errorLine2=" ~~~~~"> - <location file="chrome/browser/password_check/android/java/src/org/chromium/chrome/browser/password_check/PasswordCheckMetricsRecorder.java" /> + <issue + id="WrongConstant" + message="Must be one of: MeteringModeType.FOCUS, MeteringModeType.EXPOSURE, MeteringModeType.WHITE_BALANCE" + errorLine1=" public int mMeteringMode[] = new int[MeteringModeType.NUM_ENTRIES];" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/media/capture/video/android/java/src/org/chromium/media/PhotoCapabilities.java" + line="120" + column="63"/> </issue> - <issue id="WrongConstant" message="Must be one of: PasswordCheckResolutionAction.OPENED_SITE, PasswordCheckResolutionAction.STARTED_SCRIPT, PasswordCheckResolutionAction.DELETED_PASSWORD, PasswordCheckResolutionAction.EDITED_PASSWORD, PasswordCheckResolutionAction.DID_NOTHING" errorLine1=" PasswordCheckResolutionAction.COUNT);" errorLine2=" ~~~~~"> - <location file="chrome/browser/password_check/android/java/src/org/chromium/chrome/browser/password_check/PasswordCheckMetricsRecorder.java" /> + <issue + id="WrongConstant" + message="Must be one of: MeteringModeType.FOCUS, MeteringModeType.EXPOSURE, MeteringModeType.WHITE_BALANCE" + errorLine1=" public int mMeteringModeArray[][] = new int[MeteringModeType.NUM_ENTRIES][];" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/media/capture/video/android/java/src/org/chromium/media/PhotoCapabilities.java" + line="121" + column="70"/> </issue> - <issue id="WrongConstant" message="Must be one of: PasswordCheckResolutionAction.OPENED_SITE, PasswordCheckResolutionAction.STARTED_SCRIPT, PasswordCheckResolutionAction.DELETED_PASSWORD, PasswordCheckResolutionAction.EDITED_PASSWORD, PasswordCheckResolutionAction.DID_NOTHING" errorLine1=" PasswordCheckResolutionAction.COUNT);" errorLine2=" ~~~~~"> - <location file="chrome/browser/password_check/android/java/src/org/chromium/chrome/browser/password_check/PasswordCheckMetricsRecorder.java" /> + <issue + id="WrongConstant" + message="Must be one of: PriceTrackingState.PRICE_TRACKING_SHOWN, PriceTrackingState.PRICE_TRACKING_ENABLED, PriceTrackingState.PRICE_TRACKING_DISABLED" + errorLine1=" PriceTrackingState.COUNT);" + errorLine2=" ~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/PowerBookmarkMetrics.java" + line="29" + column="36"/> </issue> - <issue id="WrongConstant" message="Must be one of: PasswordCheckResolutionAction.OPENED_SITE, PasswordCheckResolutionAction.STARTED_SCRIPT, PasswordCheckResolutionAction.DELETED_PASSWORD, PasswordCheckResolutionAction.EDITED_PASSWORD, PasswordCheckResolutionAction.DID_NOTHING" errorLine1=" PasswordCheckResolutionAction.COUNT);" errorLine2=" ~~~~~"> - <location file="chrome/browser/password_check/android/java/src/org/chromium/chrome/browser/password_check/PasswordCheckMetricsRecorder.java" /> + <issue + id="WrongConstant" + message="Must be one of: PriceTrackingState.PRICE_TRACKING_SHOWN, PriceTrackingState.PRICE_TRACKING_ENABLED, PriceTrackingState.PRICE_TRACKING_DISABLED" + errorLine1=" PriceTrackingState.COUNT);" + errorLine2=" ~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/PowerBookmarkMetrics.java" + line="37" + column="36"/> </issue> - <issue id="WrongConstant" message="Must be one of: PhotoCapabilityBool.SUPPORTS_TORCH, PhotoCapabilityBool.TORCH, PhotoCapabilityBool.RED_EYE_REDUCTION" errorLine1=" if (boolCapability.length != PhotoCapabilityBool.NUM_ENTRIES" errorLine2=" ~~~~~~~~~~~"> - <location file="media/capture/video/android/java/src/org/chromium/media/PhotoCapabilities.java" /> + <issue + id="WrongConstant" + message="Must be one of: PrivacySandboxReferrer.PRIVACY_SETTINGS, PrivacySandboxReferrer.COOKIES_SNACKBAR, PrivacySandboxReferrer.PRIVACY_SANDBOX_NOTICE" + errorLine1=" mPrivacySandboxReferrer, PrivacySandboxReferrer.COUNT);" + errorLine2=" ~~~~~"> + <location + file="$SRC/chrome/browser/privacy_sandbox/android/java/src/org/chromium/chrome/browser/privacy_sandbox/PrivacySandboxSettingsFragment.java" + line="186" + column="65"/> </issue> - <issue id="WrongConstant" message="Must be one of: PhotoCapabilityDouble.MIN_ZOOM, PhotoCapabilityDouble.MAX_ZOOM, PhotoCapabilityDouble.CURRENT_ZOOM, PhotoCapabilityDouble.STEP_ZOOM, PhotoCapabilityDouble.MIN_FOCUS_DISTANCE, PhotoCapabilityDouble.MAX_FOCUS_DISTANCE, PhotoCapabilityDouble.CURRENT_FOCUS_DISTANCE, PhotoCapabilityDouble.STEP_FOCUS_DISTANCE, PhotoCapabilityDouble.MIN_EXPOSURE_COMPENSATION, PhotoCapabilityDouble.MAX_EXPOSURE_COMPENSATION, PhotoCapabilityDouble.CURRENT_EXPOSURE_COMPENSATION, PhotoCapabilityDouble.STEP_EXPOSURE_COMPENSATION, PhotoCapabilityDouble.MIN_EXPOSURE_TIME, PhotoCapabilityDouble.MAX_EXPOSURE_TIME, PhotoCapabilityDouble.CURRENT_EXPOSURE_TIME, PhotoCapabilityDouble.STEP_EXPOSURE_TIME" errorLine1=" || doubleCapability.length != PhotoCapabilityDouble.NUM_ENTRIES" errorLine2=" ~~~~~~~~~~~"> - <location file="media/capture/video/android/java/src/org/chromium/media/PhotoCapabilities.java" /> + <issue + id="WrongConstant" + message="Must be one of: PrivacySandboxReferrer.PRIVACY_SETTINGS, PrivacySandboxReferrer.COOKIES_SNACKBAR, PrivacySandboxReferrer.PRIVACY_SANDBOX_NOTICE" + errorLine1=" referrer, PrivacySandboxReferrer.COUNT);" + errorLine2=" ~~~~~"> + <location + file="$SRC/chrome/browser/privacy_sandbox/android/java/src/org/chromium/chrome/browser/privacy_sandbox/PrivacySandboxSettingsFragmentV3.java" + line="111" + column="50"/> </issue> - <issue id="WrongConstant" message="Must be one of: PhotoCapabilityInt.MIN_ISO, PhotoCapabilityInt.MAX_ISO, PhotoCapabilityInt.CURRENT_ISO, PhotoCapabilityInt.STEP_ISO, PhotoCapabilityInt.MIN_HEIGHT, PhotoCapabilityInt.MAX_HEIGHT, PhotoCapabilityInt.CURRENT_HEIGHT, PhotoCapabilityInt.STEP_HEIGHT, PhotoCapabilityInt.MIN_WIDTH, PhotoCapabilityInt.MAX_WIDTH, PhotoCapabilityInt.CURRENT_WIDTH, PhotoCapabilityInt.STEP_WIDTH, PhotoCapabilityInt.MIN_COLOR_TEMPERATURE, PhotoCapabilityInt.MAX_COLOR_TEMPERATURE, PhotoCapabilityInt.CURRENT_COLOR_TEMPERATURE, PhotoCapabilityInt.STEP_COLOR_TEMPERATURE" errorLine1=" || intCapability.length != PhotoCapabilityInt.NUM_ENTRIES" errorLine2=" ~~~~~~~~~~~"> - <location file="media/capture/video/android/java/src/org/chromium/media/PhotoCapabilities.java" /> + <issue + id="WrongConstant" + message="Must be one of: ExitReason.REASON_ANR, ExitReason.REASON_CRASH, ExitReason.REASON_CRASH_NATIVE, ExitReason.REASON_DEPENDENCY_DIED, ExitReason.REASON_EXCESSIVE_RESOURCE_USAGE, ExitReason.REASON_EXIT_SELF, ExitReason.REASON_INITIALIZATION_FAILURE, ExitReason.REASON_LOW_MEMORY, ExitReason.REASON_OTHER, ExitReason.REASON_PERMISSION_CHANGE, ExitReason.REASON_SIGNALED, ExitReason.REASON_UNKNOWN, ExitReason.REASON_USER_REQUESTED, ExitReason.REASON_USER_STOPPED" + errorLine1=" RecordHistogram.recordEnumeratedHistogram(umaName, reason, ExitReason.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/components/crash/android/java/src/org/chromium/components/crash/browser/ProcessExitReasonFromSystem.java" + line="137" + column="79"/> </issue> - <issue id="WrongConstant" message="Must be one of: MeteringModeType.FOCUS, MeteringModeType.EXPOSURE, MeteringModeType.WHITE_BALANCE" errorLine1=" || meteringMode.length != MeteringModeType.NUM_ENTRIES" errorLine2=" ~~~~~~~~~~~"> - <location file="media/capture/video/android/java/src/org/chromium/media/PhotoCapabilities.java" /> + <issue + id="WrongConstant" + message="Must be one of: ShowQueryTilesSegmentationResultComparison.UNINITIALIZED, ShowQueryTilesSegmentationResultComparison.SEGMENTATION_ENABLED_LOGIC_ENABLED, ShowQueryTilesSegmentationResultComparison.SEGMENTATION_ENABLED_LOGIC_DISABLED, ShowQueryTilesSegmentationResultComparison.SEGMENTATION_DISABLED_LOGIC_ENABLED, ShowQueryTilesSegmentationResultComparison.SEGMENTATION_DISABLED_LOGIC_DISABLED" + errorLine1=" ShowQueryTilesSegmentationResultComparison.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/query_tiles/QueryTileUtils.java" + line="202" + column="60"/> </issue> - <issue id="WrongConstant" message="Must be one of: MeteringModeType.FOCUS, MeteringModeType.EXPOSURE, MeteringModeType.WHITE_BALANCE" errorLine1=" || meteringModeArray.length != MeteringModeType.NUM_ENTRIES) {" errorLine2=" ~~~~~~~~~~~"> - <location file="media/capture/video/android/java/src/org/chromium/media/PhotoCapabilities.java" /> + <issue + id="WrongConstant" + message="Must be one of: ShowQueryTilesSegmentationResult.UNINITIALIZED, ShowQueryTilesSegmentationResult.DONT_SHOW, ShowQueryTilesSegmentationResult.SHOW" + errorLine1=" ShowQueryTilesSegmentationResult.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/query_tiles/QueryTileUtils.java" + line="216" + column="50"/> </issue> - <issue id="WrongConstant" message="Must be one of: AndroidFillLightMode.NOT_SET, AndroidFillLightMode.OFF, AndroidFillLightMode.AUTO, AndroidFillLightMode.FLASH" errorLine1=" || fillLightModeArray[i] >= AndroidFillLightMode.NUM_ENTRIES) {" errorLine2=" ~~~~~~~~~~~"> - <location file="media/capture/video/android/java/src/org/chromium/media/PhotoCapabilities.java" /> + <issue + id="WrongConstant" + message="Must be one of: ShowQueryTilesSegmentationResult.UNINITIALIZED, ShowQueryTilesSegmentationResult.DONT_SHOW, ShowQueryTilesSegmentationResult.SHOW" + errorLine1=" return segmentationResult;" + errorLine2=" ~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/query_tiles/QueryTileUtils.java" + line="255" + column="16"/> </issue> - <issue id="WrongConstant" message="Must be one of: AndroidMeteringMode.NOT_SET, AndroidMeteringMode.NONE, AndroidMeteringMode.FIXED, AndroidMeteringMode.SINGLE_SHOT, AndroidMeteringMode.CONTINUOUS" errorLine1=" if (meteringMode[i] < 0 || meteringMode[i] >= AndroidMeteringMode.NUM_ENTRIES) {" errorLine2=" ~~~~~~~~~~~"> - <location file="media/capture/video/android/java/src/org/chromium/media/PhotoCapabilities.java" /> + <issue + id="WrongConstant" + message="Must be one of: ShowQueryTilesSegmentationResult.UNINITIALIZED, ShowQueryTilesSegmentationResult.DONT_SHOW, ShowQueryTilesSegmentationResult.SHOW" + errorLine1=" return segmentationResult;" + errorLine2=" ~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/query_tiles/QueryTileUtils.java" + line="255" + column="16"/> </issue> - <issue id="WrongConstant" message="Must be one of: AndroidMeteringMode.NOT_SET, AndroidMeteringMode.NONE, AndroidMeteringMode.FIXED, AndroidMeteringMode.SINGLE_SHOT, AndroidMeteringMode.CONTINUOUS" errorLine1=" || meteringModeArray[i][j] >= AndroidMeteringMode.NUM_ENTRIES) {" errorLine2=" ~~~~~~~~~~~"> - <location file="media/capture/video/android/java/src/org/chromium/media/PhotoCapabilities.java" /> + <issue + id="WrongConstant" + message="Must be one of: ThemeType.SYSTEM_DEFAULT, ThemeType.LIGHT, ThemeType.DARK" + errorLine1=" mButtons = new ArrayList<>(Collections.nCopies(ThemeType.NUM_ENTRIES, null));" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/ui/android/night_mode/java/src/org/chromium/chrome/browser/night_mode/settings/RadioButtonGroupThemePreference.java" + line="54" + column="66"/> </issue> - <issue id="WrongConstant" message="Must be one of: MeteringModeType.FOCUS, MeteringModeType.EXPOSURE, MeteringModeType.WHITE_BALANCE" errorLine1=" mMeteringModeArray = new int[MeteringModeType.NUM_ENTRIES][];" errorLine2=" ~~~~~~~~~~~"> - <location file="media/capture/video/android/java/src/org/chromium/media/PhotoCapabilities.java" /> + <issue + id="WrongConstant" + message="Must be one of: ThemeType.SYSTEM_DEFAULT, ThemeType.LIGHT, ThemeType.DARK" + errorLine1=" assert ThemeType.NUM_ENTRIES == 3;" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/ui/android/night_mode/java/src/org/chromium/chrome/browser/night_mode/settings/RadioButtonGroupThemePreference.java" + line="81" + column="26"/> </issue> - <issue id="WrongConstant" message="Must be one of: PhotoCapabilityBool.SUPPORTS_TORCH, PhotoCapabilityBool.TORCH, PhotoCapabilityBool.RED_EYE_REDUCTION" errorLine1=" if (capability < 0 || capability >= PhotoCapabilityBool.NUM_ENTRIES) {" errorLine2=" ~~~~~~~~~~~"> - <location file="media/capture/video/android/java/src/org/chromium/media/PhotoCapabilities.java" /> + <issue + id="WrongConstant" + message="Must be one of: ThemeType.SYSTEM_DEFAULT, ThemeType.LIGHT, ThemeType.DARK" + errorLine1=" for (int i = 0; i < ThemeType.NUM_ENTRIES; i++) {" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/ui/android/night_mode/java/src/org/chromium/chrome/browser/night_mode/settings/RadioButtonGroupThemePreference.java" + line="114" + column="39"/> </issue> - <issue id="WrongConstant" message="Must be one of: PhotoCapabilityDouble.MIN_ZOOM, PhotoCapabilityDouble.MAX_ZOOM, PhotoCapabilityDouble.CURRENT_ZOOM, PhotoCapabilityDouble.STEP_ZOOM, PhotoCapabilityDouble.MIN_FOCUS_DISTANCE, PhotoCapabilityDouble.MAX_FOCUS_DISTANCE, PhotoCapabilityDouble.CURRENT_FOCUS_DISTANCE, PhotoCapabilityDouble.STEP_FOCUS_DISTANCE, PhotoCapabilityDouble.MIN_EXPOSURE_COMPENSATION, PhotoCapabilityDouble.MAX_EXPOSURE_COMPENSATION, PhotoCapabilityDouble.CURRENT_EXPOSURE_COMPENSATION, PhotoCapabilityDouble.STEP_EXPOSURE_COMPENSATION, PhotoCapabilityDouble.MIN_EXPOSURE_TIME, PhotoCapabilityDouble.MAX_EXPOSURE_TIME, PhotoCapabilityDouble.CURRENT_EXPOSURE_TIME, PhotoCapabilityDouble.STEP_EXPOSURE_TIME" errorLine1=" if (capability < 0 || capability >= PhotoCapabilityDouble.NUM_ENTRIES) {" errorLine2=" ~~~~~~~~~~~"> - <location file="media/capture/video/android/java/src/org/chromium/media/PhotoCapabilities.java" /> + <issue + id="WrongConstant" + message="Must be one of: ThemeType.SYSTEM_DEFAULT, ThemeType.LIGHT, ThemeType.DARK" + errorLine1=" assert mSetting >= 0 && mSetting < ThemeType.NUM_ENTRIES : "No matching setting found.";" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/ui/android/night_mode/java/src/org/chromium/chrome/browser/night_mode/settings/RadioButtonGroupThemePreference.java" + line="121" + column="54"/> </issue> - <issue id="WrongConstant" message="Must be one of: PhotoCapabilityInt.MIN_ISO, PhotoCapabilityInt.MAX_ISO, PhotoCapabilityInt.CURRENT_ISO, PhotoCapabilityInt.STEP_ISO, PhotoCapabilityInt.MIN_HEIGHT, PhotoCapabilityInt.MAX_HEIGHT, PhotoCapabilityInt.CURRENT_HEIGHT, PhotoCapabilityInt.STEP_HEIGHT, PhotoCapabilityInt.MIN_WIDTH, PhotoCapabilityInt.MAX_WIDTH, PhotoCapabilityInt.CURRENT_WIDTH, PhotoCapabilityInt.STEP_WIDTH, PhotoCapabilityInt.MIN_COLOR_TEMPERATURE, PhotoCapabilityInt.MAX_COLOR_TEMPERATURE, PhotoCapabilityInt.CURRENT_COLOR_TEMPERATURE, PhotoCapabilityInt.STEP_COLOR_TEMPERATURE" errorLine1=" if (capability < 0 || capability >= PhotoCapabilityInt.NUM_ENTRIES) {" errorLine2=" ~~~~~~~~~~~"> - <location file="media/capture/video/android/java/src/org/chromium/media/PhotoCapabilities.java" /> + <issue + id="WrongConstant" + message="Must be one of: VideoPreviewsType.NEVER, VideoPreviewsType.WIFI, VideoPreviewsType.WIFI_AND_MOBILE_DATA" + errorLine1=" mButtons = new ArrayList<>(Collections.nCopies(VideoPreviewsType.NUM_ENTRIES, null));" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/settings/RadioButtonGroupVideoPreviewsPreference.java" + line="38" + column="74"/> </issue> - <issue id="WrongConstant" message="Must be one of: MeteringModeType.FOCUS, MeteringModeType.EXPOSURE, MeteringModeType.WHITE_BALANCE" errorLine1=" if (type < 0 || type >= MeteringModeType.NUM_ENTRIES) {" errorLine2=" ~~~~~~~~~~~"> - <location file="media/capture/video/android/java/src/org/chromium/media/PhotoCapabilities.java" /> + <issue + id="WrongConstant" + message="Must be one of: VideoPreviewsType.NEVER, VideoPreviewsType.WIFI, VideoPreviewsType.WIFI_AND_MOBILE_DATA" + errorLine1=" assert VideoPreviewsType.NUM_ENTRIES == 3;" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/settings/RadioButtonGroupVideoPreviewsPreference.java" + line="49" + column="34"/> </issue> - <issue id="WrongConstant" message="Must be one of: MeteringModeType.FOCUS, MeteringModeType.EXPOSURE, MeteringModeType.WHITE_BALANCE" errorLine1=" if (type < 0 || type >= MeteringModeType.NUM_ENTRIES) {" errorLine2=" ~~~~~~~~~~~"> - <location file="media/capture/video/android/java/src/org/chromium/media/PhotoCapabilities.java" /> + <issue + id="WrongConstant" + message="Must be one of: VideoPreviewsType.NEVER, VideoPreviewsType.WIFI, VideoPreviewsType.WIFI_AND_MOBILE_DATA" + errorLine1=" for (int i = 0; i < VideoPreviewsType.NUM_ENTRIES; i++) {" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/settings/RadioButtonGroupVideoPreviewsPreference.java" + line="70" + column="47"/> </issue> - <issue id="WrongConstant" message="Must be one of: PhotoCapabilityBool.SUPPORTS_TORCH, PhotoCapabilityBool.TORCH, PhotoCapabilityBool.RED_EYE_REDUCTION" errorLine1=" public boolean mBoolCapability[] = new boolean[PhotoCapabilityBool.NUM_ENTRIES];" errorLine2=" ~~~~~~~~~~~"> - <location file="media/capture/video/android/java/src/org/chromium/media/PhotoCapabilities.java" /> + <issue + id="WrongConstant" + message="Must be one of: VideoPreviewsType.NEVER, VideoPreviewsType.WIFI, VideoPreviewsType.WIFI_AND_MOBILE_DATA" + errorLine1=" && mSetting < VideoPreviewsType.NUM_ENTRIES : "No matching setting found.";" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/settings/RadioButtonGroupVideoPreviewsPreference.java" + line="77" + column="49"/> </issue> - <issue id="WrongConstant" message="Must be one of: PhotoCapabilityDouble.MIN_ZOOM, PhotoCapabilityDouble.MAX_ZOOM, PhotoCapabilityDouble.CURRENT_ZOOM, PhotoCapabilityDouble.STEP_ZOOM, PhotoCapabilityDouble.MIN_FOCUS_DISTANCE, PhotoCapabilityDouble.MAX_FOCUS_DISTANCE, PhotoCapabilityDouble.CURRENT_FOCUS_DISTANCE, PhotoCapabilityDouble.STEP_FOCUS_DISTANCE, PhotoCapabilityDouble.MIN_EXPOSURE_COMPENSATION, PhotoCapabilityDouble.MAX_EXPOSURE_COMPENSATION, PhotoCapabilityDouble.CURRENT_EXPOSURE_COMPENSATION, PhotoCapabilityDouble.STEP_EXPOSURE_COMPENSATION, PhotoCapabilityDouble.MIN_EXPOSURE_TIME, PhotoCapabilityDouble.MAX_EXPOSURE_TIME, PhotoCapabilityDouble.CURRENT_EXPOSURE_TIME, PhotoCapabilityDouble.STEP_EXPOSURE_TIME" errorLine1=" public double mDoubleCapability[] = new double[PhotoCapabilityDouble.NUM_ENTRIES];" errorLine2=" ~~~~~~~~~~~"> - <location file="media/capture/video/android/java/src/org/chromium/media/PhotoCapabilities.java" /> + <issue + id="WrongConstant" + message="Must be one of: VideoPreviewsType.NEVER, VideoPreviewsType.WIFI, VideoPreviewsType.WIFI_AND_MOBILE_DATA" + errorLine1=" "FeedVideoPreviewsPreferenceUserActions", mSetting, VideoPreviewsType.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/settings/RadioButtonGroupVideoPreviewsPreference.java" + line="80" + column="87"/> </issue> - <issue id="WrongConstant" message="Must be one of: PhotoCapabilityInt.MIN_ISO, PhotoCapabilityInt.MAX_ISO, PhotoCapabilityInt.CURRENT_ISO, PhotoCapabilityInt.STEP_ISO, PhotoCapabilityInt.MIN_HEIGHT, PhotoCapabilityInt.MAX_HEIGHT, PhotoCapabilityInt.CURRENT_HEIGHT, PhotoCapabilityInt.STEP_HEIGHT, PhotoCapabilityInt.MIN_WIDTH, PhotoCapabilityInt.MAX_WIDTH, PhotoCapabilityInt.CURRENT_WIDTH, PhotoCapabilityInt.STEP_WIDTH, PhotoCapabilityInt.MIN_COLOR_TEMPERATURE, PhotoCapabilityInt.MAX_COLOR_TEMPERATURE, PhotoCapabilityInt.CURRENT_COLOR_TEMPERATURE, PhotoCapabilityInt.STEP_COLOR_TEMPERATURE" errorLine1=" public int mIntCapability[] = new int[PhotoCapabilityInt.NUM_ENTRIES];" errorLine2=" ~~~~~~~~~~~"> - <location file="media/capture/video/android/java/src/org/chromium/media/PhotoCapabilities.java" /> + <issue + id="WrongConstant" + message="Must be one of: FaviconLocality.LOCAL, FaviconLocality.FOREIGN" + errorLine1=" new ArrayMap<>(FaviconLocality.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsRowAdapter.java" + line="127" + column="44"/> </issue> - <issue id="WrongConstant" message="Must be one of: MeteringModeType.FOCUS, MeteringModeType.EXPOSURE, MeteringModeType.WHITE_BALANCE" errorLine1=" public int mMeteringMode[] = new int[MeteringModeType.NUM_ENTRIES];" errorLine2=" ~~~~~~~~~~~"> - <location file="media/capture/video/android/java/src/org/chromium/media/PhotoCapabilities.java" /> + <issue + id="WrongConstant" + message="Must be one of: OtherSessionsActions.MENU_INITIALIZED, OtherSessionsActions.LINK_CLICKED, OtherSessionsActions.COLLAPSE_SESSION, OtherSessionsActions.EXPAND_SESSION, OtherSessionsActions.OPEN_ALL, OtherSessionsActions.HAS_FOREIGN_DATA, OtherSessionsActions.HIDE_FOR_NOW" + errorLine1=" OtherSessionsActions.COLLAPSE_SESSION, OtherSessionsActions.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsRowAdapter.java" + line="332" + column="85"/> </issue> - <issue id="WrongConstant" message="Must be one of: MeteringModeType.FOCUS, MeteringModeType.EXPOSURE, MeteringModeType.WHITE_BALANCE" errorLine1=" public int mMeteringModeArray[][] = new int[MeteringModeType.NUM_ENTRIES][];" errorLine2=" ~~~~~~~~~~~"> - <location file="media/capture/video/android/java/src/org/chromium/media/PhotoCapabilities.java" /> + <issue + id="WrongConstant" + message="Must be one of: OtherSessionsActions.MENU_INITIALIZED, OtherSessionsActions.LINK_CLICKED, OtherSessionsActions.COLLAPSE_SESSION, OtherSessionsActions.EXPAND_SESSION, OtherSessionsActions.OPEN_ALL, OtherSessionsActions.HAS_FOREIGN_DATA, OtherSessionsActions.HIDE_FOR_NOW" + errorLine1=" OtherSessionsActions.EXPAND_SESSION, OtherSessionsActions.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsRowAdapter.java" + line="335" + column="83"/> </issue> - <issue id="WrongConstant" message="Must be one of: PriceTrackingState.PRICE_TRACKING_SHOWN, PriceTrackingState.PRICE_TRACKING_ENABLED, PriceTrackingState.PRICE_TRACKING_DISABLED" errorLine1=" PriceTrackingState.COUNT);" errorLine2=" ~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/bookmarks/PowerBookmarkMetrics.java" /> + <issue + id="WrongConstant" + message="Must be one of: OtherSessionsActions.MENU_INITIALIZED, OtherSessionsActions.LINK_CLICKED, OtherSessionsActions.COLLAPSE_SESSION, OtherSessionsActions.EXPAND_SESSION, OtherSessionsActions.OPEN_ALL, OtherSessionsActions.HAS_FOREIGN_DATA, OtherSessionsActions.HIDE_FOR_NOW" + errorLine1=" OtherSessionsActions.LINK_CLICKED, OtherSessionsActions.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsRowAdapter.java" + line="348" + column="77"/> </issue> - <issue id="WrongConstant" message="Must be one of: PriceTrackingState.PRICE_TRACKING_SHOWN, PriceTrackingState.PRICE_TRACKING_ENABLED, PriceTrackingState.PRICE_TRACKING_DISABLED" errorLine1=" PriceTrackingState.COUNT);" errorLine2=" ~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/bookmarks/PowerBookmarkMetrics.java" /> + <issue + id="WrongConstant" + message="Must be one of: OtherSessionsActions.MENU_INITIALIZED, OtherSessionsActions.LINK_CLICKED, OtherSessionsActions.COLLAPSE_SESSION, OtherSessionsActions.EXPAND_SESSION, OtherSessionsActions.OPEN_ALL, OtherSessionsActions.HAS_FOREIGN_DATA, OtherSessionsActions.HIDE_FOR_NOW" + errorLine1=" OtherSessionsActions.OPEN_ALL, OtherSessionsActions.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsRowAdapter.java" + line="359" + column="77"/> </issue> - <issue id="WrongConstant" message="Must be one of: PrivacySandboxReferrer.PRIVACY_SETTINGS, PrivacySandboxReferrer.COOKIES_SNACKBAR, PrivacySandboxReferrer.PRIVACY_SANDBOX_NOTICE" errorLine1=" mPrivacySandboxReferrer, PrivacySandboxReferrer.COUNT);" errorLine2=" ~~~~~"> - <location file="chrome/browser/privacy_sandbox/android/java/src/org/chromium/chrome/browser/privacy_sandbox/PrivacySandboxSettingsFragment.java" /> + <issue + id="WrongConstant" + message="Must be one of: OtherSessionsActions.MENU_INITIALIZED, OtherSessionsActions.LINK_CLICKED, OtherSessionsActions.COLLAPSE_SESSION, OtherSessionsActions.EXPAND_SESSION, OtherSessionsActions.OPEN_ALL, OtherSessionsActions.HAS_FOREIGN_DATA, OtherSessionsActions.HIDE_FOR_NOW" + errorLine1=" OtherSessionsActions.HIDE_FOR_NOW, OtherSessionsActions.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsRowAdapter.java" + line="365" + column="81"/> </issue> - <issue id="WrongConstant" message="Must be one of: PrivacySandboxReferrer.PRIVACY_SETTINGS, PrivacySandboxReferrer.COOKIES_SNACKBAR, PrivacySandboxReferrer.PRIVACY_SANDBOX_NOTICE" errorLine1=" referrer, PrivacySandboxReferrer.COUNT);" errorLine2=" ~~~~~"> - <location file="chrome/browser/privacy_sandbox/android/java/src/org/chromium/chrome/browser/privacy_sandbox/PrivacySandboxSettingsFragmentV3.java" /> + <issue + id="WrongConstant" + message="Must be one of: OtherSessionsActions.MENU_INITIALIZED, OtherSessionsActions.LINK_CLICKED, OtherSessionsActions.COLLAPSE_SESSION, OtherSessionsActions.EXPAND_SESSION, OtherSessionsActions.OPEN_ALL, OtherSessionsActions.HAS_FOREIGN_DATA, OtherSessionsActions.HIDE_FOR_NOW" + errorLine1=" OtherSessionsActions.MENU_INITIALIZED, OtherSessionsActions.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsRowAdapter.java" + line="767" + column="77"/> </issue> - <issue id="WrongConstant" message="Must be one of: ExitReason.REASON_ANR, ExitReason.REASON_CRASH, ExitReason.REASON_CRASH_NATIVE, ExitReason.REASON_DEPENDENCY_DIED, ExitReason.REASON_EXCESSIVE_RESOURCE_USAGE, ExitReason.REASON_EXIT_SELF, ExitReason.REASON_INITIALIZATION_FAILURE, ExitReason.REASON_LOW_MEMORY, ExitReason.REASON_OTHER, ExitReason.REASON_PERMISSION_CHANGE, ExitReason.REASON_SIGNALED, ExitReason.REASON_UNKNOWN, ExitReason.REASON_USER_REQUESTED, ExitReason.REASON_USER_STOPPED" errorLine1=" RecordHistogram.recordEnumeratedHistogram(umaName, reason, ExitReason.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="components/crash/android/java/src/org/chromium/components/crash/browser/ProcessExitReasonFromSystem.java" /> + <issue + id="WrongConstant" + message="Must be one of: GroupType.CONTENT, GroupType.VISIBLE_SEPARATOR, GroupType.INVISIBLE_SEPARATOR" + errorLine1=" return GroupType.NUM_ENTRIES;" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsRowAdapter.java" + line="891" + column="26"/> </issue> - <issue id="WrongConstant" message="Must be one of: ShowQueryTilesSegmentationResultComparison.UNINITIALIZED, ShowQueryTilesSegmentationResultComparison.SEGMENTATION_ENABLED_LOGIC_ENABLED, ShowQueryTilesSegmentationResultComparison.SEGMENTATION_ENABLED_LOGIC_DISABLED, ShowQueryTilesSegmentationResultComparison.SEGMENTATION_DISABLED_LOGIC_ENABLED, ShowQueryTilesSegmentationResultComparison.SEGMENTATION_DISABLED_LOGIC_DISABLED" errorLine1=" ShowQueryTilesSegmentationResultComparison.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/query_tiles/QueryTileUtils.java" /> + <issue + id="WrongConstant" + message="Must be one of: OtherSessionsActions.MENU_INITIALIZED, OtherSessionsActions.LINK_CLICKED, OtherSessionsActions.COLLAPSE_SESSION, OtherSessionsActions.EXPAND_SESSION, OtherSessionsActions.OPEN_ALL, OtherSessionsActions.HAS_FOREIGN_DATA, OtherSessionsActions.HIDE_FOR_NOW" + errorLine1=" OtherSessionsActions.HAS_FOREIGN_DATA, OtherSessionsActions.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsRowAdapter.java" + line="913" + column="85"/> </issue> - <issue id="WrongConstant" message="Must be one of: ShowQueryTilesSegmentationResult.UNINITIALIZED, ShowQueryTilesSegmentationResult.DONT_SHOW, ShowQueryTilesSegmentationResult.SHOW" errorLine1=" ShowQueryTilesSegmentationResult.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/query_tiles/QueryTileUtils.java" /> + <issue + id="WrongConstant" + message="Must be one of: ChildType.NONE, ChildType.DEFAULT_CONTENT, ChildType.PERSONALIZED_SIGNIN_PROMO, ChildType.PERSONALIZED_SYNC_PROMO, ChildType.SYNC_PROMO" + errorLine1=" return ChildType.NUM_ENTRIES;" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsRowAdapter.java" + line="953" + column="26"/> </issue> - <issue id="WrongConstant" message="Must be one of: ShowQueryTilesSegmentationResult.UNINITIALIZED, ShowQueryTilesSegmentationResult.DONT_SHOW, ShowQueryTilesSegmentationResult.SHOW" errorLine1=" return segmentationResult;" errorLine2=" ~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/query_tiles/QueryTileUtils.java" /> + <issue + id="WrongConstant" + message="Must be one of: Permissions.SEND_NOTHING, Permissions.SEND_URL, Permissions.SEND_CONTENT, Permissions.SEND_URL_AND_CONTENT" + errorLine1=" permissionsEnum, Permissions.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/RelatedSearchesUma.java" + line="72" + column="46"/> </issue> - <issue id="WrongConstant" message="Must be one of: ShowQueryTilesSegmentationResult.UNINITIALIZED, ShowQueryTilesSegmentationResult.DONT_SHOW, ShowQueryTilesSegmentationResult.SHOW" errorLine1=" return segmentationResult;" errorLine2=" ~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/query_tiles/QueryTileUtils.java" /> + <issue + id="WrongConstant" + message="Must be one of: Permissions.SEND_NOTHING, Permissions.SEND_URL, Permissions.SEND_CONTENT, Permissions.SEND_URL_AND_CONTENT" + errorLine1=" scrollAndClickStatus, Permissions.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/RelatedSearchesUma.java" + line="170" + column="51"/> </issue> - <issue id="WrongConstant" message="Must be one of: ThemeType.SYSTEM_DEFAULT, ThemeType.LIGHT, ThemeType.DARK" errorLine1=" mButtons = new ArrayList<>(Collections.nCopies(ThemeType.NUM_ENTRIES, null));" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/ui/android/night_mode/java/src/org/chromium/chrome/browser/night_mode/settings/RadioButtonGroupThemePreference.java" /> + <issue + id="WrongConstant" + message="Must be one of: PageTransition.FIRST, PageTransition.LINK, PageTransition.TYPED, PageTransition.AUTO_BOOKMARK, PageTransition.AUTO_SUBFRAME, PageTransition.MANUAL_SUBFRAME, PageTransition.GENERATED, PageTransition.AUTO_TOPLEVEL, PageTransition.FORM_SUBMIT, PageTransition.RELOAD, PageTransition.KEYWORD, PageTransition.KEYWORD_GENERATED, PageTransition.LAST_CORE, PageTransition.CORE_MASK, PageTransition.BLOCKED, PageTransition.FORWARD_BACK, PageTransition.FROM_ADDRESS_BAR, PageTransition.HOME_PAGE, PageTransition.FROM_API, PageTransition.CHAIN_START, PageTransition.CHAIN_END, PageTransition.CLIENT_REDIRECT, PageTransition.SERVER_REDIRECT, PageTransition.IS_REDIRECT_MASK, PageTransition.QUALIFIER_MASK" + errorLine1=" false, url, params.getTransitionType());" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/tasks/ReturnToChromeUtil.java" + line="354" + column="33"/> </issue> - <issue id="WrongConstant" message="Must be one of: ThemeType.SYSTEM_DEFAULT, ThemeType.LIGHT, ThemeType.DARK" errorLine1=" assert ThemeType.NUM_ENTRIES == 3;" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/ui/android/night_mode/java/src/org/chromium/chrome/browser/night_mode/settings/RadioButtonGroupThemePreference.java" /> + <issue + id="WrongConstant" + message="Must be one of: ShowChromeStartSegmentationResult.UNINITIALIZED, ShowChromeStartSegmentationResult.DONT_SHOW, ShowChromeStartSegmentationResult.SHOW" + errorLine1=" ShowChromeStartSegmentationResult.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/tasks/ReturnToChromeUtil.java" + line="751" + column="51"/> </issue> - <issue id="WrongConstant" message="Must be one of: ThemeType.SYSTEM_DEFAULT, ThemeType.LIGHT, ThemeType.DARK" errorLine1=" for (int i = 0; i < ThemeType.NUM_ENTRIES; i++) {" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/ui/android/night_mode/java/src/org/chromium/chrome/browser/night_mode/settings/RadioButtonGroupThemePreference.java" /> + <issue + id="WrongConstant" + message="Must be one of: ShowChromeStartSegmentationResultComparison.UNINITIALIZED, ShowChromeStartSegmentationResultComparison.SEGMENTATION_ENABLED_LOGIC_ENABLED, ShowChromeStartSegmentationResultComparison.SEGMENTATION_ENABLED_LOGIC_DISABLED, ShowChromeStartSegmentationResultComparison.SEGMENTATION_DISABLED_LOGIC_ENABLED, ShowChromeStartSegmentationResultComparison.SEGMENTATION_DISABLED_LOGIC_DISABLED" + errorLine1=" ShowChromeStartSegmentationResultComparison.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/tasks/ReturnToChromeUtil.java" + line="811" + column="61"/> </issue> - <issue id="WrongConstant" message="Must be one of: ThemeType.SYSTEM_DEFAULT, ThemeType.LIGHT, ThemeType.DARK" errorLine1=" assert mSetting >= 0 && mSetting < ThemeType.NUM_ENTRIES : "No matching setting found.";" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/ui/android/night_mode/java/src/org/chromium/chrome/browser/night_mode/settings/RadioButtonGroupThemePreference.java" /> + <issue + id="WrongConstant" + message="Must be one of: NoArgOperation.NONE, NoArgOperation.SHARE, NoArgOperation.SAVE, NoArgOperation.DELETE" + errorLine1=" } else if (NoArgOperation.INSTALL == operation) {" + errorLine2=" ~~~~~~~"> + <location + file="$SRC/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/screenshot/ScreenshotShareSheetMediator.java" + line="91" + column="35"/> </issue> - <issue id="WrongConstant" message="Must be one of: VideoPreviewsType.NEVER, VideoPreviewsType.WIFI, VideoPreviewsType.WIFI_AND_MOBILE_DATA" errorLine1=" mButtons = new ArrayList<>(Collections.nCopies(VideoPreviewsType.NUM_ENTRIES, null));" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/settings/RadioButtonGroupVideoPreviewsPreference.java" /> + <issue + id="WrongConstant" + message="Must be one of: ScreenshotShareSheetAction.EDIT, ScreenshotShareSheetAction.SHARE, ScreenshotShareSheetAction.SAVE, ScreenshotShareSheetAction.DELETE" + errorLine1=" "Sharing.ScreenshotFallback.Action", action, ScreenshotShareSheetAction.COUNT);" + errorLine2=" ~~~~~"> + <location + file="$SRC/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/screenshot/ScreenshotShareSheetMetrics.java" + line="41" + column="89"/> </issue> - <issue id="WrongConstant" message="Must be one of: VideoPreviewsType.NEVER, VideoPreviewsType.WIFI, VideoPreviewsType.WIFI_AND_MOBILE_DATA" errorLine1=" assert VideoPreviewsType.NUM_ENTRIES == 3;" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/settings/RadioButtonGroupVideoPreviewsPreference.java" /> + <issue + id="WrongConstant" + message="Must be one of: NoArgOperation.NONE, NoArgOperation.SHARE, NoArgOperation.SAVE, NoArgOperation.DELETE" + errorLine1=" setNoArgOperationListener(NoArgOperation.INSTALL, R.id.edit, noArgOperationCallback);" + errorLine2=" ~~~~~~~"> + <location + file="$SRC/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/screenshot/ScreenshotShareSheetView.java" + line="39" + column="50"/> </issue> - <issue id="WrongConstant" message="Must be one of: VideoPreviewsType.NEVER, VideoPreviewsType.WIFI, VideoPreviewsType.WIFI_AND_MOBILE_DATA" errorLine1=" for (int i = 0; i < VideoPreviewsType.NUM_ENTRIES; i++) {" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/settings/RadioButtonGroupVideoPreviewsPreference.java" /> + <issue + id="WrongConstant" + message="Must be one of: BitmapGeneratorStatus.CAPTURE_COMPLETE, BitmapGeneratorStatus.INSUFFICIENT_MEMORY, BitmapGeneratorStatus.GENERATION_ERROR" + errorLine1=" "Sharing.ScrollCapture.BitmapGeneratorStatus", status, BitmapGeneratorStatus.COUNT);" + errorLine2=" ~~~~~"> + <location + file="$SRC/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/scroll_capture/ScrollCaptureCallbackDelegate.java" + line="210" + column="94"/> </issue> - <issue id="WrongConstant" message="Must be one of: VideoPreviewsType.NEVER, VideoPreviewsType.WIFI, VideoPreviewsType.WIFI_AND_MOBILE_DATA" errorLine1=" && mSetting < VideoPreviewsType.NUM_ENTRIES : "No matching setting found.";" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/settings/RadioButtonGroupVideoPreviewsPreference.java" /> + <issue + id="WrongConstant" + message="Must be one of: Events.SNACKBAR_SHOWN, Events.PROMPT_FOLLOWED, Events.SEARCH_ENGINE_CHANGED" + errorLine1=" "Android.SearchEngineChoice.Events", event, Events.MAX);" + errorLine2=" ~~~"> + <location + file="$SRC/chrome/browser/search_engines/android/java/src/org/chromium/chrome/browser/search_engines/SearchEngineChoiceMetrics.java" + line="64" + column="68"/> </issue> - <issue id="WrongConstant" message="Must be one of: VideoPreviewsType.NEVER, VideoPreviewsType.WIFI, VideoPreviewsType.WIFI_AND_MOBILE_DATA" errorLine1=" "FeedVideoPreviewsPreferenceUserActions", mSetting, VideoPreviewsType.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/settings/RadioButtonGroupVideoPreviewsPreference.java" /> + <issue + id="WrongConstant" + message="Must be one of: EventsV2.CHOICE_REQUEST_RECEIVED, EventsV2.CHOICE_SKIPPED, EventsV2.CHOICE_REQUEST_NO_DATA, EventsV2.CHOICE_REQUEST_VALID, EventsV2.CHOICE_REQUEST_METADATA_NULL, EventsV2.CHOICE_REQUEST_PARSE_FAILED, EventsV2.PREVIOUS_CHOICE_REQUEST_FAILED, EventsV2.CHOICE_REQUEST_SUCCESS" + errorLine1=" "Android.SearchEngineChoice.EventsV2", event, EventsV2.MAX);" + errorLine2=" ~~~"> + <location + file="$SRC/chrome/browser/search_engines/android/java/src/org/chromium/chrome/browser/search_engines/SearchEngineChoiceMetrics.java" + line="74" + column="72"/> </issue> - <issue id="WrongConstant" message="Must be one of: FaviconLocality.LOCAL, FaviconLocality.FOREIGN" errorLine1=" new ArrayMap<>(FaviconLocality.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsRowAdapter.java" /> + <issue + id="WrongConstant" + message="Must be one of: Events.FETCH_NON_GOOGLE_LOGO_REQUEST, Events.FETCH_FAILED_NULL_URL, Events.FETCH_FAILED_FAVICON_HELPER_ERROR, Events.FETCH_FAILED_RETURNED_BITMAP_NULL, Events.FETCH_SUCCESS_CACHE_HIT, Events.FETCH_SUCCESS" + errorLine1=" "AndroidSearchEngineLogo.Events", event, Events.MAX);" + errorLine2=" ~~~"> + <location + file="$SRC/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/SearchEngineLogoUtils.java" + line="333" + column="65"/> </issue> - <issue id="WrongConstant" message="Must be one of: OtherSessionsActions.MENU_INITIALIZED, OtherSessionsActions.LINK_CLICKED, OtherSessionsActions.COLLAPSE_SESSION, OtherSessionsActions.EXPAND_SESSION, OtherSessionsActions.OPEN_ALL, OtherSessionsActions.HAS_FOREIGN_DATA, OtherSessionsActions.HIDE_FOR_NOW" errorLine1=" OtherSessionsActions.COLLAPSE_SESSION, OtherSessionsActions.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsRowAdapter.java" /> + <issue + id="WrongConstant" + message="Must be one of: FileSelectedAction.MEDIA_PICKER_IMAGE_BY_MIME_TYPE, FileSelectedAction.MEDIA_PICKER_VIDEO_BY_MIME_TYPE, FileSelectedAction.MEDIA_PICKER_OTHER_BY_MIME_TYPE, FileSelectedAction.MEDIA_PICKER_IMAGE_BY_EXTENSION, FileSelectedAction.MEDIA_PICKER_VIDEO_BY_EXTENSION, FileSelectedAction.MEDIA_PICKER_OTHER_BY_EXTENSION, FileSelectedAction.MEDIA_PICKER_UNKNOWN_TYPE, FileSelectedAction.EXTERNAL_PICKER_IMAGE_BY_MIME_TYPE, FileSelectedAction.EXTERNAL_PICKER_VIDEO_BY_MIME_TYPE, FileSelectedAction.EXTERNAL_PICKER_OTHER_BY_MIME_TYPE, FileSelectedAction.EXTERNAL_PICKER_IMAGE_BY_EXTENSION, FileSelectedAction.EXTERNAL_PICKER_VIDEO_BY_EXTENSION, FileSelectedAction.EXTERNAL_PICKER_OTHER_BY_EXTENSION, FileSelectedAction.EXTERNAL_PICKER_UNKNOWN_TYPE" + errorLine1=" "Android.SelectFileDialogContentSelected", action, FileSelectedAction.COUNT);" + errorLine2=" ~~~~~"> + <location + file="$SRC/ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java" + line="1202" + column="87"/> </issue> - <issue id="WrongConstant" message="Must be one of: OtherSessionsActions.MENU_INITIALIZED, OtherSessionsActions.LINK_CLICKED, OtherSessionsActions.COLLAPSE_SESSION, OtherSessionsActions.EXPAND_SESSION, OtherSessionsActions.OPEN_ALL, OtherSessionsActions.HAS_FOREIGN_DATA, OtherSessionsActions.HIDE_FOR_NOW" errorLine1=" OtherSessionsActions.EXPAND_SESSION, OtherSessionsActions.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsRowAdapter.java" /> + <issue + id="WrongConstant" + message="Must be one of: ServicificationStartup.CHROME_COLD, ServicificationStartup.CHROME_HALF_WARM, ServicificationStartup.MINIMAL_BROWSER_COLD, ServicificationStartup.MINIMAL_BROWSER_WARM" + errorLine1=" private int[] mPendingCommits = new int[ServicificationStartup.NUM_ENTRIES];" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/content/public/android/java/src/org/chromium/content/browser/ServicificationStartupUma.java" + line="38" + column="68"/> </issue> - <issue id="WrongConstant" message="Must be one of: OtherSessionsActions.MENU_INITIALIZED, OtherSessionsActions.LINK_CLICKED, OtherSessionsActions.COLLAPSE_SESSION, OtherSessionsActions.EXPAND_SESSION, OtherSessionsActions.OPEN_ALL, OtherSessionsActions.HAS_FOREIGN_DATA, OtherSessionsActions.HIDE_FOR_NOW" errorLine1=" OtherSessionsActions.LINK_CLICKED, OtherSessionsActions.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsRowAdapter.java" /> + <issue + id="WrongConstant" + message="Must be one of: ServicificationStartup.CHROME_COLD, ServicificationStartup.CHROME_HALF_WARM, ServicificationStartup.MINIMAL_BROWSER_COLD, ServicificationStartup.MINIMAL_BROWSER_WARM" + errorLine1=" for (int i = 0; i < ServicificationStartup.NUM_ENTRIES; i++) {" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/content/public/android/java/src/org/chromium/content/browser/ServicificationStartupUma.java" + line="95" + column="52"/> </issue> - <issue id="WrongConstant" message="Must be one of: OtherSessionsActions.MENU_INITIALIZED, OtherSessionsActions.LINK_CLICKED, OtherSessionsActions.COLLAPSE_SESSION, OtherSessionsActions.EXPAND_SESSION, OtherSessionsActions.OPEN_ALL, OtherSessionsActions.HAS_FOREIGN_DATA, OtherSessionsActions.HIDE_FOR_NOW" errorLine1=" OtherSessionsActions.OPEN_ALL, OtherSessionsActions.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsRowAdapter.java" /> + <issue + id="WrongConstant" + message="Must be one of: ServicificationStartup.CHROME_COLD, ServicificationStartup.CHROME_HALF_WARM, ServicificationStartup.MINIMAL_BROWSER_COLD, ServicificationStartup.MINIMAL_BROWSER_WARM" + errorLine1=" "Servicification.Startup2", startupMode, ServicificationStartup.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/content/public/android/java/src/org/chromium/content/browser/ServicificationStartupUma.java" + line="111" + column="81"/> </issue> - <issue id="WrongConstant" message="Must be one of: OtherSessionsActions.MENU_INITIALIZED, OtherSessionsActions.LINK_CLICKED, OtherSessionsActions.COLLAPSE_SESSION, OtherSessionsActions.EXPAND_SESSION, OtherSessionsActions.OPEN_ALL, OtherSessionsActions.HAS_FOREIGN_DATA, OtherSessionsActions.HIDE_FOR_NOW" errorLine1=" OtherSessionsActions.HIDE_FOR_NOW, OtherSessionsActions.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsRowAdapter.java" /> + <issue + id="WrongConstant" + message="Must be one of: ShareSourceAndroid.ANDROID_SHARE_SHEET, ShareSourceAndroid.CHROME_SHARE_SHEET, ShareSourceAndroid.DIRECT_SHARE" + errorLine1=" ANY_SHARE_HISTOGRAM_NAME, source, ShareSourceAndroid.COUNT);" + errorLine2=" ~~~~~"> + <location + file="$SRC/components/browser_ui/share/android/java/src/org/chromium/components/browser_ui/share/ShareHelper.java" + line="447" + column="70"/> </issue> - <issue id="WrongConstant" message="Must be one of: OtherSessionsActions.MENU_INITIALIZED, OtherSessionsActions.LINK_CLICKED, OtherSessionsActions.COLLAPSE_SESSION, OtherSessionsActions.EXPAND_SESSION, OtherSessionsActions.OPEN_ALL, OtherSessionsActions.HAS_FOREIGN_DATA, OtherSessionsActions.HIDE_FOR_NOW" errorLine1=" OtherSessionsActions.MENU_INITIALIZED, OtherSessionsActions.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsRowAdapter.java" /> + <issue + id="WrongConstant" + message="Must be one of: ActionType.UNKNOWN, ActionType.DOWNLOAD_PAUSE, ActionType.DOWNLOAD_RESUME, ActionType.DOWNLOAD_CANCEL, ActionType.DOWNLOAD_PAGE_PAUSE, ActionType.DOWNLOAD_PAGE_RESUME, ActionType.DOWNLOAD_PAGE_CANCEL, ActionType.CONTENT_SUGGESTION_SETTINGS, ActionType.WEB_APP_ACTION_SHARE, ActionType.WEB_APP_ACTION_OPEN_IN_CHROME, ActionType.OFFLINE_CONTENT_SUGGESTION_SETTINGS, ActionType.SHARING_TRY_AGAIN, ActionType.SETTINGS, ActionType.ANNOUNCEMENT_ACK, ActionType.ANNOUNCEMENT_OPEN, ActionType.PRICE_DROP_VISIT_SITE, ActionType.PRICE_DROP_TURN_OFF_ALERT" + errorLine1=" confirmIntent, NotificationUmaTracker.ActionType.SHARING_CONFIRM);" + errorLine2=" ~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/sharing/SharingNotificationUtil.java" + line="86" + column="70"/> </issue> - <issue id="WrongConstant" message="Must be one of: GroupType.CONTENT, GroupType.VISIBLE_SEPARATOR, GroupType.INVISIBLE_SEPARATOR" errorLine1=" return GroupType.NUM_ENTRIES;" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsRowAdapter.java" /> + <issue + id="WrongConstant" + message="Must be one of: ActionType.UNKNOWN, ActionType.DOWNLOAD_PAUSE, ActionType.DOWNLOAD_RESUME, ActionType.DOWNLOAD_CANCEL, ActionType.DOWNLOAD_PAGE_PAUSE, ActionType.DOWNLOAD_PAGE_RESUME, ActionType.DOWNLOAD_PAGE_CANCEL, ActionType.CONTENT_SUGGESTION_SETTINGS, ActionType.WEB_APP_ACTION_SHARE, ActionType.WEB_APP_ACTION_OPEN_IN_CHROME, ActionType.OFFLINE_CONTENT_SUGGESTION_SETTINGS, ActionType.SHARING_TRY_AGAIN, ActionType.SETTINGS, ActionType.ANNOUNCEMENT_ACK, ActionType.ANNOUNCEMENT_OPEN, ActionType.PRICE_DROP_VISIT_SITE, ActionType.PRICE_DROP_TURN_OFF_ALERT" + errorLine1=" cancelIntent, NotificationUmaTracker.ActionType.SHARING_CANCEL);" + errorLine2=" ~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/sharing/SharingNotificationUtil.java" + line="90" + column="69"/> </issue> - <issue id="WrongConstant" message="Must be one of: OtherSessionsActions.MENU_INITIALIZED, OtherSessionsActions.LINK_CLICKED, OtherSessionsActions.COLLAPSE_SESSION, OtherSessionsActions.EXPAND_SESSION, OtherSessionsActions.OPEN_ALL, OtherSessionsActions.HAS_FOREIGN_DATA, OtherSessionsActions.HIDE_FOR_NOW" errorLine1=" OtherSessionsActions.HAS_FOREIGN_DATA, OtherSessionsActions.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsRowAdapter.java" /> + <issue + id="WrongConstant" + message="Must be one of: FoundBuyableProductAnnotation.NOT_FOUND, FoundBuyableProductAnnotation.FOUND, FoundBuyableProductAnnotation.FOUND_WITH_PRICE_UPDATE" + errorLine1=" foundBuyableProductAnnotation, FoundBuyableProductAnnotation.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/tab/java/src/org/chromium/chrome/browser/tab/state/ShoppingPersistedTabData.java" + line="668" + column="78"/> </issue> - <issue id="WrongConstant" message="Must be one of: ChildType.NONE, ChildType.DEFAULT_CONTENT, ChildType.PERSONALIZED_SIGNIN_PROMO, ChildType.PERSONALIZED_SYNC_PROMO, ChildType.SYNC_PROMO" errorLine1=" return ChildType.NUM_ENTRIES;" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/ntp/RecentTabsRowAdapter.java" /> + <issue + id="WrongConstant" + message="Must be one of: FoundBuyableProduct.NOT_FOUND, FoundBuyableProduct.FOUND, FoundBuyableProduct.FOUND_WITH_PRICE_UPDATE" + errorLine1=" FoundBuyableProduct.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/tab/java/src/org/chromium/chrome/browser/tab/state/ShoppingPersistedTabData.java" + line="710" + column="37"/> </issue> - <issue id="WrongConstant" message="Must be one of: Permissions.SEND_NOTHING, Permissions.SEND_URL, Permissions.SEND_CONTENT, Permissions.SEND_URL_AND_CONTENT" errorLine1=" permissionsEnum, Permissions.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/RelatedSearchesUma.java" /> + <issue + id="WrongConstant" + message="Must be one of: Type.ALL_SITES, Type.ADS, Type.AUGMENTED_REALITY, Type.AUTOMATIC_DOWNLOADS, Type.BACKGROUND_SYNC, Type.BLUETOOTH, Type.BLUETOOTH_SCANNING, Type.CAMERA, Type.CLIPBOARD, Type.COOKIES, Type.IDLE_DETECTION, Type.DEVICE_LOCATION, Type.JAVASCRIPT, Type.MICROPHONE, Type.NFC, Type.NOTIFICATIONS, Type.POPUPS, Type.PROTECTED_MEDIA, Type.SENSORS, Type.SOUND, Type.USB, Type.VIRTUAL_REALITY, Type.USE_STORAGE, Type.AUTO_DARK_WEB_CONTENT, Type.REQUEST_DESKTOP_SITE, Type.FEDERATED_IDENTITY_API" + errorLine1=" for (@SiteSettingsCategory.Type int i = 0; i < SiteSettingsCategory.Type.NUM_ENTRIES; i++) {" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java" + line="213" + column="82"/> </issue> - <issue id="WrongConstant" message="Must be one of: Permissions.SEND_NOTHING, Permissions.SEND_URL, Permissions.SEND_CONTENT, Permissions.SEND_URL_AND_CONTENT" errorLine1=" scrollAndClickStatus, Permissions.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/contextualsearch/RelatedSearchesUma.java" /> + <issue + id="WrongConstant" + message="Must be one of: SettingsNavigationSource.OTHER, SettingsNavigationSource.TWA_CLEAR_DATA_DIALOG, SettingsNavigationSource.TWA_MANAGE_SPACE_ACTIVITY" + errorLine1=" SettingsNavigationSource.EXTRA_KEY, SettingsNavigationSource.OTHER);" + errorLine2=" ~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java" + line="434" + column="50"/> </issue> - <issue id="WrongConstant" message="Must be one of: PageTransition.FIRST, PageTransition.LINK, PageTransition.TYPED, PageTransition.AUTO_BOOKMARK, PageTransition.AUTO_SUBFRAME, PageTransition.MANUAL_SUBFRAME, PageTransition.GENERATED, PageTransition.AUTO_TOPLEVEL, PageTransition.FORM_SUBMIT, PageTransition.RELOAD, PageTransition.KEYWORD, PageTransition.KEYWORD_GENERATED, PageTransition.LAST_CORE, PageTransition.CORE_MASK, PageTransition.BLOCKED, PageTransition.FORWARD_BACK, PageTransition.FROM_ADDRESS_BAR, PageTransition.HOME_PAGE, PageTransition.FROM_API, PageTransition.CHAIN_START, PageTransition.CHAIN_END, PageTransition.CLIENT_REDIRECT, PageTransition.SERVER_REDIRECT, PageTransition.IS_REDIRECT_MASK, PageTransition.QUALIFIER_MASK" errorLine1=" false, url, params.getTransitionType());" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/tasks/ReturnToChromeUtil.java" /> + <issue + id="WrongConstant" + message="Must be one of: SettingsNavigationSource.OTHER, SettingsNavigationSource.TWA_CLEAR_DATA_DIALOG, SettingsNavigationSource.TWA_MANAGE_SPACE_ACTIVITY" + errorLine1=" SettingsNavigationSource.EXTRA_KEY, navigationSource);" + errorLine2=" ~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java" + line="436" + column="50"/> </issue> - <issue id="WrongConstant" message="Must be one of: ShowChromeStartSegmentationResult.UNINITIALIZED, ShowChromeStartSegmentationResult.DONT_SHOW, ShowChromeStartSegmentationResult.SHOW" errorLine1=" ShowChromeStartSegmentationResult.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/tasks/ReturnToChromeUtil.java" /> + <issue + id="WrongConstant" + message="Must be one of: Type.ALL_SITES, Type.ADS, Type.AUGMENTED_REALITY, Type.AUTOMATIC_DOWNLOADS, Type.BACKGROUND_SYNC, Type.BLUETOOTH, Type.BLUETOOTH_SCANNING, Type.CAMERA, Type.CLIPBOARD, Type.COOKIES, Type.IDLE_DETECTION, Type.DEVICE_LOCATION, Type.JAVASCRIPT, Type.MICROPHONE, Type.NFC, Type.NOTIFICATIONS, Type.POPUPS, Type.PROTECTED_MEDIA, Type.SENSORS, Type.SOUND, Type.USB, Type.VIRTUAL_REALITY, Type.USE_STORAGE, Type.AUTO_DARK_WEB_CONTENT, Type.REQUEST_DESKTOP_SITE, Type.FEDERATED_IDENTITY_API" + errorLine1=" type < SiteSettingsCategory.Type.NUM_ENTRIES; type++) {" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java" + line="469" + column="54"/> </issue> - <issue id="WrongConstant" message="Must be one of: ShowChromeStartSegmentationResultComparison.UNINITIALIZED, ShowChromeStartSegmentationResultComparison.SEGMENTATION_ENABLED_LOGIC_ENABLED, ShowChromeStartSegmentationResultComparison.SEGMENTATION_ENABLED_LOGIC_DISABLED, ShowChromeStartSegmentationResultComparison.SEGMENTATION_DISABLED_LOGIC_ENABLED, ShowChromeStartSegmentationResultComparison.SEGMENTATION_DISABLED_LOGIC_DISABLED" errorLine1=" ShowChromeStartSegmentationResultComparison.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/tasks/ReturnToChromeUtil.java" /> + <issue + id="WrongConstant" + message="Must be one of: SiteLayout.MOBILE, SiteLayout.DESKTOP" + errorLine1=" "Android.RequestDesktopSite.Changed", layout, SiteLayout.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java" + line="1161" + column="74"/> </issue> - <issue id="WrongConstant" message="Must be one of: NoArgOperation.NONE, NoArgOperation.SHARE, NoArgOperation.SAVE, NoArgOperation.DELETE" errorLine1=" } else if (NoArgOperation.INSTALL == operation) {" errorLine2=" ~~~~~~~"> - <location file="chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/screenshot/ScreenshotShareSheetMediator.java" /> + <issue + id="WrongConstant" + message="Must be one of: SettingsNavigationSource.OTHER, SettingsNavigationSource.TWA_CLEAR_DATA_DIALOG, SettingsNavigationSource.TWA_MANAGE_SPACE_ACTIVITY" + errorLine1=" SettingsNavigationSource.EXTRA_KEY, SettingsNavigationSource.OTHER);" + errorLine2=" ~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleWebsiteSettings.java" + line="1159" + column="42"/> </issue> - <issue id="WrongConstant" message="Must be one of: ScreenshotShareSheetAction.EDIT, ScreenshotShareSheetAction.SHARE, ScreenshotShareSheetAction.SAVE, ScreenshotShareSheetAction.DELETE" errorLine1=" "Sharing.ScreenshotFallback.Action", action, ScreenshotShareSheetAction.COUNT);" errorLine2=" ~~~~~"> - <location file="chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/screenshot/ScreenshotShareSheetMetrics.java" /> + <issue + id="WrongConstant" + message="Must be one of: SettingsNavigationSource.OTHER, SettingsNavigationSource.TWA_CLEAR_DATA_DIALOG, SettingsNavigationSource.TWA_MANAGE_SPACE_ACTIVITY" + errorLine1=" navigationSource, SettingsNavigationSource.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleWebsiteSettings.java" + line="1161" + column="60"/> </issue> - <issue id="WrongConstant" message="Must be one of: NoArgOperation.NONE, NoArgOperation.SHARE, NoArgOperation.SAVE, NoArgOperation.DELETE" errorLine1=" setNoArgOperationListener(NoArgOperation.INSTALL, R.id.edit, noArgOperationCallback);" errorLine2=" ~~~~~~~"> - <location file="chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/screenshot/ScreenshotShareSheetView.java" /> + <issue + id="WrongConstant" + message="Must be one of: Type.ALL_SITES, Type.ADS, Type.AUGMENTED_REALITY, Type.AUTOMATIC_DOWNLOADS, Type.BACKGROUND_SYNC, Type.BLUETOOTH, Type.BLUETOOTH_SCANNING, Type.CAMERA, Type.CLIPBOARD, Type.COOKIES, Type.IDLE_DETECTION, Type.DEVICE_LOCATION, Type.JAVASCRIPT, Type.MICROPHONE, Type.NFC, Type.NOTIFICATIONS, Type.POPUPS, Type.PROTECTED_MEDIA, Type.SENSORS, Type.SOUND, Type.USB, Type.VIRTUAL_REALITY, Type.USE_STORAGE, Type.AUTO_DARK_WEB_CONTENT, Type.REQUEST_DESKTOP_SITE, Type.FEDERATED_IDENTITY_API" + errorLine1=" for (@SiteSettingsCategory.Type int type = 0; type < SiteSettingsCategory.Type.NUM_ENTRIES;" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettings.java" + line="52" + column="88"/> </issue> - <issue id="WrongConstant" message="Must be one of: BitmapGeneratorStatus.CAPTURE_COMPLETE, BitmapGeneratorStatus.INSUFFICIENT_MEMORY, BitmapGeneratorStatus.GENERATION_ERROR" errorLine1=" "Sharing.ScrollCapture.BitmapGeneratorStatus", status, BitmapGeneratorStatus.COUNT);" errorLine2=" ~~~~~"> - <location file="chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/scroll_capture/ScrollCaptureCallbackDelegate.java" /> + <issue + id="WrongConstant" + message="Must be one of: Type.ALL_SITES, Type.ADS, Type.AUGMENTED_REALITY, Type.AUTOMATIC_DOWNLOADS, Type.BACKGROUND_SYNC, Type.BLUETOOTH, Type.BLUETOOTH_SCANNING, Type.CAMERA, Type.CLIPBOARD, Type.COOKIES, Type.IDLE_DETECTION, Type.DEVICE_LOCATION, Type.JAVASCRIPT, Type.MICROPHONE, Type.NFC, Type.NOTIFICATIONS, Type.POPUPS, Type.PROTECTED_MEDIA, Type.SENSORS, Type.SOUND, Type.USB, Type.VIRTUAL_REALITY, Type.USE_STORAGE, Type.AUTO_DARK_WEB_CONTENT, Type.REQUEST_DESKTOP_SITE, Type.FEDERATED_IDENTITY_API" + errorLine1=" for (@Type int prefCategory = 0; prefCategory < Type.NUM_ENTRIES; prefCategory++) {" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettings.java" + line="65" + column="62"/> </issue> - <issue id="WrongConstant" message="Must be one of: Events.SNACKBAR_SHOWN, Events.PROMPT_FOLLOWED, Events.SEARCH_ENGINE_CHANGED" errorLine1=" "Android.SearchEngineChoice.Events", event, Events.MAX);" errorLine2=" ~~~"> - <location file="chrome/browser/search_engines/android/java/src/org/chromium/chrome/browser/search_engines/SearchEngineChoiceMetrics.java" /> + <issue + id="WrongConstant" + message="Must be one of: Type.ALL_SITES, Type.ADS, Type.AUGMENTED_REALITY, Type.AUTOMATIC_DOWNLOADS, Type.BACKGROUND_SYNC, Type.BLUETOOTH, Type.BLUETOOTH_SCANNING, Type.CAMERA, Type.CLIPBOARD, Type.COOKIES, Type.IDLE_DETECTION, Type.DEVICE_LOCATION, Type.JAVASCRIPT, Type.MICROPHONE, Type.NFC, Type.NOTIFICATIONS, Type.POPUPS, Type.PROTECTED_MEDIA, Type.SENSORS, Type.SOUND, Type.USB, Type.VIRTUAL_REALITY, Type.USE_STORAGE, Type.AUTO_DARK_WEB_CONTENT, Type.REQUEST_DESKTOP_SITE, Type.FEDERATED_IDENTITY_API" + errorLine1=" for (@Type int i = Type.ALL_SITES; i < Type.NUM_ENTRIES; i++) {" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsCategory.java" + line="132" + column="53"/> </issue> - <issue id="WrongConstant" message="Must be one of: EventsV2.CHOICE_REQUEST_RECEIVED, EventsV2.CHOICE_SKIPPED, EventsV2.CHOICE_REQUEST_NO_DATA, EventsV2.CHOICE_REQUEST_VALID, EventsV2.CHOICE_REQUEST_METADATA_NULL, EventsV2.CHOICE_REQUEST_PARSE_FAILED, EventsV2.PREVIOUS_CHOICE_REQUEST_FAILED, EventsV2.CHOICE_REQUEST_SUCCESS" errorLine1=" "Android.SearchEngineChoice.EventsV2", event, EventsV2.MAX);" errorLine2=" ~~~"> - <location file="chrome/browser/search_engines/android/java/src/org/chromium/chrome/browser/search_engines/SearchEngineChoiceMetrics.java" /> + <issue + id="WrongConstant" + message="Must be one of: Type.ALL_SITES, Type.ADS, Type.AUGMENTED_REALITY, Type.AUTOMATIC_DOWNLOADS, Type.BACKGROUND_SYNC, Type.BLUETOOTH, Type.BLUETOOTH_SCANNING, Type.CAMERA, Type.CLIPBOARD, Type.COOKIES, Type.IDLE_DETECTION, Type.DEVICE_LOCATION, Type.JAVASCRIPT, Type.MICROPHONE, Type.NFC, Type.NOTIFICATIONS, Type.POPUPS, Type.PROTECTED_MEDIA, Type.SENSORS, Type.SOUND, Type.USB, Type.VIRTUAL_REALITY, Type.USE_STORAGE, Type.AUTO_DARK_WEB_CONTENT, Type.REQUEST_DESKTOP_SITE, Type.FEDERATED_IDENTITY_API" + errorLine1=" for (@Type int i = Type.ALL_SITES; i < Type.NUM_ENTRIES; i++) {" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsCategory.java" + line="143" + column="53"/> </issue> - <issue id="WrongConstant" message="Must be one of: Events.FETCH_NON_GOOGLE_LOGO_REQUEST, Events.FETCH_FAILED_NULL_URL, Events.FETCH_FAILED_FAVICON_HELPER_ERROR, Events.FETCH_FAILED_RETURNED_BITMAP_NULL, Events.FETCH_SUCCESS_CACHE_HIT, Events.FETCH_SUCCESS" errorLine1=" "AndroidSearchEngineLogo.Events", event, Events.MAX);" errorLine2=" ~~~"> - <location file="chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/SearchEngineLogoUtils.java" /> + <issue + id="WrongConstant" + message="Must be one of: UserChoice.USE_SOGOU, UserChoice.KEEP_GOOGLE, UserChoice.SETTINGS, UserChoice.BACK_KEY" + errorLine1=" "SpecialLocale.PromotionDialog", mChoice, UserChoice.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/search_engines/android/java/src/org/chromium/chrome/browser/search_engines/SogouPromoDialog.java" + line="139" + column="70"/> </issue> - <issue id="WrongConstant" message="Must be one of: FileSelectedAction.MEDIA_PICKER_IMAGE_BY_MIME_TYPE, FileSelectedAction.MEDIA_PICKER_VIDEO_BY_MIME_TYPE, FileSelectedAction.MEDIA_PICKER_OTHER_BY_MIME_TYPE, FileSelectedAction.MEDIA_PICKER_IMAGE_BY_EXTENSION, FileSelectedAction.MEDIA_PICKER_VIDEO_BY_EXTENSION, FileSelectedAction.MEDIA_PICKER_OTHER_BY_EXTENSION, FileSelectedAction.MEDIA_PICKER_UNKNOWN_TYPE, FileSelectedAction.EXTERNAL_PICKER_IMAGE_BY_MIME_TYPE, FileSelectedAction.EXTERNAL_PICKER_VIDEO_BY_MIME_TYPE, FileSelectedAction.EXTERNAL_PICKER_OTHER_BY_MIME_TYPE, FileSelectedAction.EXTERNAL_PICKER_IMAGE_BY_EXTENSION, FileSelectedAction.EXTERNAL_PICKER_VIDEO_BY_EXTENSION, FileSelectedAction.EXTERNAL_PICKER_OTHER_BY_EXTENSION, FileSelectedAction.EXTERNAL_PICKER_UNKNOWN_TYPE" errorLine1=" "Android.SelectFileDialogContentSelected", action, FileSelectedAction.COUNT);" errorLine2=" ~~~~~"> - <location file="ui/android/java/src/org/chromium/ui/base/SelectFileDialog.java" /> + <issue + id="WrongConstant" + message="Must be one of: ExitCause.PULL_TO_REFRESH, ExitCause.SNACK_BAR_ACTION, ExitCause.COMPOSITOR_FAILURE, ExitCause.TAB_FINISHED_LOADING, ExitCause.LINK_CLICKED, ExitCause.NAVIGATION_STARTED, ExitCause.TAB_DESTROYED, ExitCause.TAB_HIDDEN, ExitCause.OFFLINE_AVAILABLE, ExitCause.ACCESSIBILITY_NOT_SUPPORTED" + errorLine1=" "Browser.PaintPreview.TabbedPlayer.ExitCause", exitCause, ExitCause.COUNT);" + errorLine2=" ~~~~~"> + <location + file="$SRC/chrome/browser/paint_preview/android/java/src/org/chromium/chrome/browser/paint_preview/StartupPaintPreviewMetrics.java" + line="131" + column="85"/> </issue> - <issue id="WrongConstant" message="Must be one of: ServicificationStartup.CHROME_COLD, ServicificationStartup.CHROME_HALF_WARM, ServicificationStartup.MINIMAL_BROWSER_COLD, ServicificationStartup.MINIMAL_BROWSER_WARM" errorLine1=" private int[] mPendingCommits = new int[ServicificationStartup.NUM_ENTRIES];" errorLine2=" ~~~~~~~~~~~"> - <location file="content/public/android/java/src/org/chromium/content/browser/ServicificationStartupUma.java" /> + <issue + id="WrongConstant" + message="Must be one of: ApiCall.ADD_WEB_MESSAGE_LISTENER, ApiCall.CLEAR_PROXY_OVERRIDE, ApiCall.GET_PROXY_CONTROLLER, ApiCall.GET_SAFE_BROWSING_PRIVACY_POLICY_URL, ApiCall.GET_SERVICE_WORKER_CONTROLLER, ApiCall.GET_SERVICE_WORKER_WEB_SETTINGS, ApiCall.GET_TRACING_CONTROLLER, ApiCall.GET_WEBCHROME_CLIENT, ApiCall.GET_WEBVIEW_CLIENT, ApiCall.GET_WEBVIEW_RENDERER, ApiCall.GET_WEBVIEW_RENDERER_CLIENT, ApiCall.INIT_SAFE_BROWSING, ApiCall.INSERT_VISUAL_STATE_CALLBACK, ApiCall.IS_MULTI_PROCESS_ENABLED, ApiCall.JS_REPLY_POST_MESSAGE, ApiCall.POST_MESSAGE_TO_MAIN_FRAME, ApiCall.REMOVE_WEB_MESSAGE_LISTENER, ApiCall.SERVICE_WORKER_SETTINGS_GET_ALLOW_CONTENT_ACCESS, ApiCall.SERVICE_WORKER_SETTINGS_GET_ALLOW_FILE_ACCESS, ApiCall.SERVICE_WORKER_SETTINGS_GET_BLOCK_NETWORK_LOADS, ApiCall.SERVICE_WORKER_SETTINGS_GET_CACHE_MODE, ApiCall.SERVICE_WORKER_SETTINGS_SET_ALLOW_CONTENT_ACCESS, ApiCall.SERVICE_WORKER_SETTINGS_SET_ALLOW_FILE_ACCESS, ApiCall.SERVICE_WORKER_SETTINGS_SET_BLOCK_NETWORK_LOADS, ApiCall.SERVICE_WORKER_SETTINGS_SET_CACHE_MODE, ApiCall.SET_PROXY_OVERRIDE, ApiCall.SET_SAFE_BROWSING_ALLOWLIST_DEPRECATED_NAME, ApiCall.SET_SERVICE_WORKER_CLIENT, ApiCall.SET_WEBVIEW_RENDERER_CLIENT, ApiCall.TRACING_CONTROLLER_IS_TRACING, ApiCall.TRACING_CONTROLLER_START, ApiCall.TRACING_CONTROLLER_STOP, ApiCall.WEB_MESSAGE_GET_DATA, ApiCall.WEB_MESSAGE_GET_PORTS, ApiCall.WEB_MESSAGE_PORT_CLOSE, ApiCall.WEB_MESSAGE_PORT_POST_MESSAGE, ApiCall.WEB_MESSAGE_PORT_SET_CALLBACK, ApiCall.WEB_MESSAGE_PORT_SET_CALLBACK_WITH_HANDLER, ApiCall.WEB_RESOURCE_REQUEST_IS_REDIRECT, ApiCall.WEB_SETTINGS_GET_DISABLED_ACTION_MODE_MENU_ITEMS, ApiCall.WEB_SETTINGS_GET_FORCE_DARK, ApiCall.WEB_SETTINGS_GET_FORCE_DARK_BEHAVIOR, ApiCall.WEB_SETTINGS_GET_OFFSCREEN_PRE_RASTER, ApiCall.WEB_SETTINGS_GET_SAFE_BROWSING_ENABLED, ApiCall.WEB_SETTINGS_GET_WILL_SUPPRESS_ERROR_PAGE, ApiCall.WEB_SETTINGS_SET_DISABLED_ACTION_MODE_MENU_ITEMS, ApiCall.WEB_SETTINGS_SET_FORCE_DARK, ApiCall.WEB_SETTINGS_SET_FORCE_DARK_BEHAVIOR, ApiCall.WEB_SETTINGS_SET_OFFSCREEN_PRE_RASTER, ApiCall.WEB_SETTINGS_SET_SAFE_BROWSING_ENABLED, ApiCall.WEB_SETTINGS_SET_WILL_SUPPRESS_ERROR_PAGE, ApiCall.WEBVIEW_RENDERER_TERMINATE, ApiCall.ADD_DOCUMENT_START_SCRIPT, ApiCall.REMOVE_DOCUMENT_START_SCRIPT, ApiCall.SET_SAFE_BROWSING_ALLOWLIST, ApiCall.SET_PROXY_OVERRIDE_REVERSE_BYPASS, ApiCall.WEB_SETTINGS_SET_REQUESTED_WITH_HEADER_MODE, ApiCall.WEB_SETTINGS_GET_REQUESTED_WITH_HEADER_MODE, ApiCall.SERVICE_WORKER_SETTINGS_SET_REQUESTED_WITH_HEADER_MODE, ApiCall.SERVICE_WORKER_SETTINGS_GET_REQUESTED_WITH_HEADER_MODE, ApiCall.GET_VARIATIONS_HEADER" + errorLine1=" "Android.WebView.AndroidX.ApiCall", apiCall, ApiCall.COUNT);" + errorLine2=" ~~~~~"> + <location + file="$SRC/android_webview/support_library/java/src/org/chromium/support_lib_glue/SupportLibWebViewChromiumFactory.java" + line="230" + column="70"/> </issue> - <issue id="WrongConstant" message="Must be one of: ServicificationStartup.CHROME_COLD, ServicificationStartup.CHROME_HALF_WARM, ServicificationStartup.MINIMAL_BROWSER_COLD, ServicificationStartup.MINIMAL_BROWSER_WARM" errorLine1=" for (int i = 0; i < ServicificationStartup.NUM_ENTRIES; i++) {" errorLine2=" ~~~~~~~~~~~"> - <location file="content/public/android/java/src/org/chromium/content/browser/ServicificationStartupUma.java" /> + <issue + id="WrongConstant" + message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" + errorLine1=" private int mDirection = ScrollDirection.UNKNOWN;" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/gesture/SwipeGestureListener.java" + line="111" + column="30"/> </issue> - <issue id="WrongConstant" message="Must be one of: ServicificationStartup.CHROME_COLD, ServicificationStartup.CHROME_HALF_WARM, ServicificationStartup.MINIMAL_BROWSER_COLD, ServicificationStartup.MINIMAL_BROWSER_WARM" errorLine1=" "Servicification.Startup2", startupMode, ServicificationStartup.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="content/public/android/java/src/org/chromium/content/browser/ServicificationStartupUma.java" /> + <issue + id="WrongConstant" + message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" + errorLine1=" private int mDirection = ScrollDirection.UNKNOWN;" + errorLine2=" ~~~~~~~"> + <location + file="$SRC/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/gesture/SwipeGestureListener.java" + line="111" + column="46"/> </issue> - <issue id="WrongConstant" message="Must be one of: ShareSourceAndroid.ANDROID_SHARE_SHEET, ShareSourceAndroid.CHROME_SHARE_SHEET, ShareSourceAndroid.DIRECT_SHARE" errorLine1=" ANY_SHARE_HISTOGRAM_NAME, source, ShareSourceAndroid.COUNT);" errorLine2=" ~~~~~"> - <location file="components/browser_ui/share/android/java/src/org/chromium/components/browser_ui/share/ShareHelper.java" /> + <issue + id="WrongConstant" + message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" + errorLine1=" && mDirection != ScrollDirection.UNKNOWN) {" + errorLine2=" ~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/gesture/SwipeGestureListener.java" + line="160" + column="24"/> </issue> - <issue id="WrongConstant" message="Must be one of: ActionType.UNKNOWN, ActionType.DOWNLOAD_PAUSE, ActionType.DOWNLOAD_RESUME, ActionType.DOWNLOAD_CANCEL, ActionType.DOWNLOAD_PAGE_PAUSE, ActionType.DOWNLOAD_PAGE_RESUME, ActionType.DOWNLOAD_PAGE_CANCEL, ActionType.CONTENT_SUGGESTION_SETTINGS, ActionType.WEB_APP_ACTION_SHARE, ActionType.WEB_APP_ACTION_OPEN_IN_CHROME, ActionType.OFFLINE_CONTENT_SUGGESTION_SETTINGS, ActionType.SHARING_TRY_AGAIN, ActionType.SETTINGS, ActionType.ANNOUNCEMENT_ACK, ActionType.ANNOUNCEMENT_OPEN, ActionType.PRICE_DROP_VISIT_SITE, ActionType.PRICE_DROP_TURN_OFF_ALERT" errorLine1=" confirmIntent, NotificationUmaTracker.ActionType.SHARING_CONFIRM);" errorLine2=" ~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/sharing/SharingNotificationUtil.java" /> + <issue + id="WrongConstant" + message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" + errorLine1=" && mDirection != ScrollDirection.UNKNOWN) {" + errorLine2=" ~~~~~~~"> + <location + file="$SRC/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/gesture/SwipeGestureListener.java" + line="160" + column="54"/> </issue> - <issue id="WrongConstant" message="Must be one of: ActionType.UNKNOWN, ActionType.DOWNLOAD_PAUSE, ActionType.DOWNLOAD_RESUME, ActionType.DOWNLOAD_CANCEL, ActionType.DOWNLOAD_PAGE_PAUSE, ActionType.DOWNLOAD_PAGE_RESUME, ActionType.DOWNLOAD_PAGE_CANCEL, ActionType.CONTENT_SUGGESTION_SETTINGS, ActionType.WEB_APP_ACTION_SHARE, ActionType.WEB_APP_ACTION_OPEN_IN_CHROME, ActionType.OFFLINE_CONTENT_SUGGESTION_SETTINGS, ActionType.SHARING_TRY_AGAIN, ActionType.SETTINGS, ActionType.ANNOUNCEMENT_ACK, ActionType.ANNOUNCEMENT_OPEN, ActionType.PRICE_DROP_VISIT_SITE, ActionType.PRICE_DROP_TURN_OFF_ALERT" errorLine1=" cancelIntent, NotificationUmaTracker.ActionType.SHARING_CANCEL);" errorLine2=" ~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/sharing/SharingNotificationUtil.java" /> + <issue + id="WrongConstant" + message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" + errorLine1=" mDirection = ScrollDirection.UNKNOWN;" + errorLine2=" ~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/gesture/SwipeGestureListener.java" + line="162" + column="17"/> </issue> - <issue id="WrongConstant" message="Must be one of: FoundBuyableProductAnnotation.NOT_FOUND, FoundBuyableProductAnnotation.FOUND, FoundBuyableProductAnnotation.FOUND_WITH_PRICE_UPDATE" errorLine1=" foundBuyableProductAnnotation, FoundBuyableProductAnnotation.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/tab/java/src/org/chromium/chrome/browser/tab/state/ShoppingPersistedTabData.java" /> + <issue + id="WrongConstant" + message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" + errorLine1=" mDirection = ScrollDirection.UNKNOWN;" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/gesture/SwipeGestureListener.java" + line="162" + column="30"/> </issue> - <issue id="WrongConstant" message="Must be one of: FoundBuyableProduct.NOT_FOUND, FoundBuyableProduct.FOUND, FoundBuyableProduct.FOUND_WITH_PRICE_UPDATE" errorLine1=" FoundBuyableProduct.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/tab/java/src/org/chromium/chrome/browser/tab/state/ShoppingPersistedTabData.java" /> + <issue + id="WrongConstant" + message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" + errorLine1=" mDirection = ScrollDirection.UNKNOWN;" + errorLine2=" ~~~~~~~"> + <location + file="$SRC/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/gesture/SwipeGestureListener.java" + line="162" + column="46"/> </issue> - <issue id="WrongConstant" message="Must be one of: Type.ALL_SITES, Type.ADS, Type.AUGMENTED_REALITY, Type.AUTOMATIC_DOWNLOADS, Type.BACKGROUND_SYNC, Type.BLUETOOTH, Type.BLUETOOTH_SCANNING, Type.CAMERA, Type.CLIPBOARD, Type.COOKIES, Type.IDLE_DETECTION, Type.DEVICE_LOCATION, Type.JAVASCRIPT, Type.MICROPHONE, Type.NFC, Type.NOTIFICATIONS, Type.POPUPS, Type.PROTECTED_MEDIA, Type.SENSORS, Type.SOUND, Type.USB, Type.VIRTUAL_REALITY, Type.USE_STORAGE, Type.AUTO_DARK_WEB_CONTENT, Type.REQUEST_DESKTOP_SITE, Type.FEDERATED_IDENTITY_API" errorLine1=" for (@SiteSettingsCategory.Type int i = 0; i < SiteSettingsCategory.Type.NUM_ENTRIES; i++) {" errorLine2=" ~~~~~~~~~~~"> - <location file="components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java" /> + <issue + id="WrongConstant" + message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" + errorLine1=" if (mDirection == ScrollDirection.UNKNOWN && shouldRecognizeSwipe(e1, e2)) {" + errorLine2=" ~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/gesture/SwipeGestureListener.java" + line="193" + column="13"/> </issue> - <issue id="WrongConstant" message="Must be one of: SettingsNavigationSource.OTHER, SettingsNavigationSource.TWA_CLEAR_DATA_DIALOG, SettingsNavigationSource.TWA_MANAGE_SPACE_ACTIVITY" errorLine1=" SettingsNavigationSource.EXTRA_KEY, SettingsNavigationSource.OTHER);" errorLine2=" ~~~~~~~~~"> - <location file="components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java" /> + <issue + id="WrongConstant" + message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" + errorLine1=" if (mDirection == ScrollDirection.UNKNOWN && shouldRecognizeSwipe(e1, e2)) {" + errorLine2=" ~~~~~~~"> + <location + file="$SRC/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/gesture/SwipeGestureListener.java" + line="193" + column="43"/> </issue> - <issue id="WrongConstant" message="Must be one of: SettingsNavigationSource.OTHER, SettingsNavigationSource.TWA_CLEAR_DATA_DIALOG, SettingsNavigationSource.TWA_MANAGE_SPACE_ACTIVITY" errorLine1=" SettingsNavigationSource.EXTRA_KEY, navigationSource);" errorLine2=" ~~~~~~~~~"> - <location file="components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java" /> + <issue + id="WrongConstant" + message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" + errorLine1=" int direction = ScrollDirection.UNKNOWN;" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/gesture/SwipeGestureListener.java" + line="198" + column="29"/> </issue> - <issue id="WrongConstant" message="Must be one of: Type.ALL_SITES, Type.ADS, Type.AUGMENTED_REALITY, Type.AUTOMATIC_DOWNLOADS, Type.BACKGROUND_SYNC, Type.BLUETOOTH, Type.BLUETOOTH_SCANNING, Type.CAMERA, Type.CLIPBOARD, Type.COOKIES, Type.IDLE_DETECTION, Type.DEVICE_LOCATION, Type.JAVASCRIPT, Type.MICROPHONE, Type.NFC, Type.NOTIFICATIONS, Type.POPUPS, Type.PROTECTED_MEDIA, Type.SENSORS, Type.SOUND, Type.USB, Type.VIRTUAL_REALITY, Type.USE_STORAGE, Type.AUTO_DARK_WEB_CONTENT, Type.REQUEST_DESKTOP_SITE, Type.FEDERATED_IDENTITY_API" errorLine1=" type < SiteSettingsCategory.Type.NUM_ENTRIES; type++) {" errorLine2=" ~~~~~~~~~~~"> - <location file="components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java" /> + <issue + id="WrongConstant" + message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" + errorLine1=" int direction = ScrollDirection.UNKNOWN;" + errorLine2=" ~~~~~~~"> + <location + file="$SRC/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/gesture/SwipeGestureListener.java" + line="198" + column="45"/> </issue> - <issue id="WrongConstant" message="Must be one of: SiteLayout.MOBILE, SiteLayout.DESKTOP" errorLine1=" "Android.RequestDesktopSite.Changed", layout, SiteLayout.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleCategorySettings.java" /> + <issue + id="WrongConstant" + message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" + errorLine1=" direction = tx > 0.f ? ScrollDirection.RIGHT : ScrollDirection.LEFT;" + errorLine2=" ~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/gesture/SwipeGestureListener.java" + line="205" + column="17"/> </issue> - <issue id="WrongConstant" message="Must be one of: SettingsNavigationSource.OTHER, SettingsNavigationSource.TWA_CLEAR_DATA_DIALOG, SettingsNavigationSource.TWA_MANAGE_SPACE_ACTIVITY" errorLine1=" SettingsNavigationSource.EXTRA_KEY, SettingsNavigationSource.OTHER);" errorLine2=" ~~~~~~~~~"> - <location file="components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleWebsiteSettings.java" /> + <issue + id="WrongConstant" + message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" + errorLine1=" if (direction != ScrollDirection.UNKNOWN && mHandler.isSwipeEnabled(direction)) {" + errorLine2=" ~~~~~~~"> + <location + file="$SRC/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/gesture/SwipeGestureListener.java" + line="210" + column="46"/> </issue> - <issue id="WrongConstant" message="Must be one of: SettingsNavigationSource.OTHER, SettingsNavigationSource.TWA_CLEAR_DATA_DIALOG, SettingsNavigationSource.TWA_MANAGE_SPACE_ACTIVITY" errorLine1=" navigationSource, SettingsNavigationSource.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SingleWebsiteSettings.java" /> + <issue + id="WrongConstant" + message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" + errorLine1=" mDirection = direction;" + errorLine2=" ~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/gesture/SwipeGestureListener.java" + line="211" + column="17"/> </issue> - <issue id="WrongConstant" message="Must be one of: Type.ALL_SITES, Type.ADS, Type.AUGMENTED_REALITY, Type.AUTOMATIC_DOWNLOADS, Type.BACKGROUND_SYNC, Type.BLUETOOTH, Type.BLUETOOTH_SCANNING, Type.CAMERA, Type.CLIPBOARD, Type.COOKIES, Type.IDLE_DETECTION, Type.DEVICE_LOCATION, Type.JAVASCRIPT, Type.MICROPHONE, Type.NFC, Type.NOTIFICATIONS, Type.POPUPS, Type.PROTECTED_MEDIA, Type.SENSORS, Type.SOUND, Type.USB, Type.VIRTUAL_REALITY, Type.USE_STORAGE, Type.AUTO_DARK_WEB_CONTENT, Type.REQUEST_DESKTOP_SITE, Type.FEDERATED_IDENTITY_API" errorLine1=" for (@SiteSettingsCategory.Type int type = 0; type < SiteSettingsCategory.Type.NUM_ENTRIES;" errorLine2=" ~~~~~~~~~~~"> - <location file="components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettings.java" /> + <issue + id="WrongConstant" + message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" + errorLine1=" if (mDirection != ScrollDirection.UNKNOWN) {" + errorLine2=" ~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/gesture/SwipeGestureListener.java" + line="217" + column="13"/> </issue> - <issue id="WrongConstant" message="Must be one of: Type.ALL_SITES, Type.ADS, Type.AUGMENTED_REALITY, Type.AUTOMATIC_DOWNLOADS, Type.BACKGROUND_SYNC, Type.BLUETOOTH, Type.BLUETOOTH_SCANNING, Type.CAMERA, Type.CLIPBOARD, Type.COOKIES, Type.IDLE_DETECTION, Type.DEVICE_LOCATION, Type.JAVASCRIPT, Type.MICROPHONE, Type.NFC, Type.NOTIFICATIONS, Type.POPUPS, Type.PROTECTED_MEDIA, Type.SENSORS, Type.SOUND, Type.USB, Type.VIRTUAL_REALITY, Type.USE_STORAGE, Type.AUTO_DARK_WEB_CONTENT, Type.REQUEST_DESKTOP_SITE, Type.FEDERATED_IDENTITY_API" errorLine1=" for (@Type int prefCategory = 0; prefCategory < Type.NUM_ENTRIES; prefCategory++) {" errorLine2=" ~~~~~~~~~~~"> - <location file="components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettings.java" /> + <issue + id="WrongConstant" + message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" + errorLine1=" if (mDirection != ScrollDirection.UNKNOWN) {" + errorLine2=" ~~~~~~~"> + <location + file="$SRC/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/gesture/SwipeGestureListener.java" + line="217" + column="43"/> </issue> - <issue id="WrongConstant" message="Must be one of: Type.ALL_SITES, Type.ADS, Type.AUGMENTED_REALITY, Type.AUTOMATIC_DOWNLOADS, Type.BACKGROUND_SYNC, Type.BLUETOOTH, Type.BLUETOOTH_SCANNING, Type.CAMERA, Type.CLIPBOARD, Type.COOKIES, Type.IDLE_DETECTION, Type.DEVICE_LOCATION, Type.JAVASCRIPT, Type.MICROPHONE, Type.NFC, Type.NOTIFICATIONS, Type.POPUPS, Type.PROTECTED_MEDIA, Type.SENSORS, Type.SOUND, Type.USB, Type.VIRTUAL_REALITY, Type.USE_STORAGE, Type.AUTO_DARK_WEB_CONTENT, Type.REQUEST_DESKTOP_SITE, Type.FEDERATED_IDENTITY_API" errorLine1=" for (@Type int i = Type.ALL_SITES; i < Type.NUM_ENTRIES; i++) {" errorLine2=" ~~~~~~~~~~~"> - <location file="components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsCategory.java" /> + <issue + id="WrongConstant" + message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" + errorLine1=" if (mDirection != ScrollDirection.UNKNOWN) {" + errorLine2=" ~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/gesture/SwipeGestureListener.java" + line="230" + column="13"/> </issue> - <issue id="WrongConstant" message="Must be one of: Type.ALL_SITES, Type.ADS, Type.AUGMENTED_REALITY, Type.AUTOMATIC_DOWNLOADS, Type.BACKGROUND_SYNC, Type.BLUETOOTH, Type.BLUETOOTH_SCANNING, Type.CAMERA, Type.CLIPBOARD, Type.COOKIES, Type.IDLE_DETECTION, Type.DEVICE_LOCATION, Type.JAVASCRIPT, Type.MICROPHONE, Type.NFC, Type.NOTIFICATIONS, Type.POPUPS, Type.PROTECTED_MEDIA, Type.SENSORS, Type.SOUND, Type.USB, Type.VIRTUAL_REALITY, Type.USE_STORAGE, Type.AUTO_DARK_WEB_CONTENT, Type.REQUEST_DESKTOP_SITE, Type.FEDERATED_IDENTITY_API" errorLine1=" for (@Type int i = Type.ALL_SITES; i < Type.NUM_ENTRIES; i++) {" errorLine2=" ~~~~~~~~~~~"> - <location file="components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/SiteSettingsCategory.java" /> + <issue + id="WrongConstant" + message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" + errorLine1=" if (mDirection != ScrollDirection.UNKNOWN) {" + errorLine2=" ~~~~~~~"> + <location + file="$SRC/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/gesture/SwipeGestureListener.java" + line="230" + column="43"/> </issue> - <issue id="WrongConstant" message="Must be one of: UserChoice.USE_SOGOU, UserChoice.KEEP_GOOGLE, UserChoice.SETTINGS, UserChoice.BACK_KEY" errorLine1=" "SpecialLocale.PromotionDialog", mChoice, UserChoice.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/search_engines/android/java/src/org/chromium/chrome/browser/search_engines/SogouPromoDialog.java" /> + <issue + id="WrongConstant" + message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" + errorLine1=" mHandler.onFling(mDirection, e2, e2.getRawX() - mMotionStartPoint.x," + errorLine2=" ~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/gesture/SwipeGestureListener.java" + line="231" + column="30"/> </issue> - <issue id="WrongConstant" message="Must be one of: ExitCause.PULL_TO_REFRESH, ExitCause.SNACK_BAR_ACTION, ExitCause.COMPOSITOR_FAILURE, ExitCause.TAB_FINISHED_LOADING, ExitCause.LINK_CLICKED, ExitCause.NAVIGATION_STARTED, ExitCause.TAB_DESTROYED, ExitCause.TAB_HIDDEN, ExitCause.OFFLINE_AVAILABLE, ExitCause.ACCESSIBILITY_NOT_SUPPORTED" errorLine1=" "Browser.PaintPreview.TabbedPlayer.ExitCause", exitCause, ExitCause.COUNT);" errorLine2=" ~~~~~"> - <location file="chrome/browser/paint_preview/android/java/src/org/chromium/chrome/browser/paint_preview/StartupPaintPreviewMetrics.java" /> + <issue + id="WrongConstant" + message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" + errorLine1=" mHandler.onFling(mDirection, e2, e2.getRawX() - mMotionStartPoint.x," + errorLine2=" ~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/gesture/SwipeGestureListener.java" + line="231" + column="30"/> </issue> - <issue id="WrongConstant" message="Must be one of: ApiCall.ADD_WEB_MESSAGE_LISTENER, ApiCall.CLEAR_PROXY_OVERRIDE, ApiCall.GET_PROXY_CONTROLLER, ApiCall.GET_SAFE_BROWSING_PRIVACY_POLICY_URL, ApiCall.GET_SERVICE_WORKER_CONTROLLER, ApiCall.GET_SERVICE_WORKER_WEB_SETTINGS, ApiCall.GET_TRACING_CONTROLLER, ApiCall.GET_WEBCHROME_CLIENT, ApiCall.GET_WEBVIEW_CLIENT, ApiCall.GET_WEBVIEW_RENDERER, ApiCall.GET_WEBVIEW_RENDERER_CLIENT, ApiCall.INIT_SAFE_BROWSING, ApiCall.INSERT_VISUAL_STATE_CALLBACK, ApiCall.IS_MULTI_PROCESS_ENABLED, ApiCall.JS_REPLY_POST_MESSAGE, ApiCall.POST_MESSAGE_TO_MAIN_FRAME, ApiCall.REMOVE_WEB_MESSAGE_LISTENER, ApiCall.SERVICE_WORKER_SETTINGS_GET_ALLOW_CONTENT_ACCESS, ApiCall.SERVICE_WORKER_SETTINGS_GET_ALLOW_FILE_ACCESS, ApiCall.SERVICE_WORKER_SETTINGS_GET_BLOCK_NETWORK_LOADS, ApiCall.SERVICE_WORKER_SETTINGS_GET_CACHE_MODE, ApiCall.SERVICE_WORKER_SETTINGS_SET_ALLOW_CONTENT_ACCESS, ApiCall.SERVICE_WORKER_SETTINGS_SET_ALLOW_FILE_ACCESS, ApiCall.SERVICE_WORKER_SETTINGS_SET_BLOCK_NETWORK_LOADS, ApiCall.SERVICE_WORKER_SETTINGS_SET_CACHE_MODE, ApiCall.SET_PROXY_OVERRIDE, ApiCall.SET_SAFE_BROWSING_ALLOWLIST_DEPRECATED_NAME, ApiCall.SET_SERVICE_WORKER_CLIENT, ApiCall.SET_WEBVIEW_RENDERER_CLIENT, ApiCall.TRACING_CONTROLLER_IS_TRACING, ApiCall.TRACING_CONTROLLER_START, ApiCall.TRACING_CONTROLLER_STOP, ApiCall.WEB_MESSAGE_GET_DATA, ApiCall.WEB_MESSAGE_GET_PORTS, ApiCall.WEB_MESSAGE_PORT_CLOSE, ApiCall.WEB_MESSAGE_PORT_POST_MESSAGE, ApiCall.WEB_MESSAGE_PORT_SET_CALLBACK, ApiCall.WEB_MESSAGE_PORT_SET_CALLBACK_WITH_HANDLER, ApiCall.WEB_RESOURCE_REQUEST_IS_REDIRECT, ApiCall.WEB_SETTINGS_GET_DISABLED_ACTION_MODE_MENU_ITEMS, ApiCall.WEB_SETTINGS_GET_FORCE_DARK, ApiCall.WEB_SETTINGS_GET_FORCE_DARK_BEHAVIOR, ApiCall.WEB_SETTINGS_GET_OFFSCREEN_PRE_RASTER, ApiCall.WEB_SETTINGS_GET_SAFE_BROWSING_ENABLED, ApiCall.WEB_SETTINGS_GET_WILL_SUPPRESS_ERROR_PAGE, ApiCall.WEB_SETTINGS_SET_DISABLED_ACTION_MODE_MENU_ITEMS, ApiCall.WEB_SETTINGS_SET_FORCE_DARK, ApiCall.WEB_SETTINGS_SET_FORCE_DARK_BEHAVIOR, ApiCall.WEB_SETTINGS_SET_OFFSCREEN_PRE_RASTER, ApiCall.WEB_SETTINGS_SET_SAFE_BROWSING_ENABLED, ApiCall.WEB_SETTINGS_SET_WILL_SUPPRESS_ERROR_PAGE, ApiCall.WEBVIEW_RENDERER_TERMINATE, ApiCall.ADD_DOCUMENT_START_SCRIPT, ApiCall.REMOVE_DOCUMENT_START_SCRIPT, ApiCall.SET_SAFE_BROWSING_ALLOWLIST, ApiCall.SET_PROXY_OVERRIDE_REVERSE_BYPASS, ApiCall.WEB_SETTINGS_SET_REQUESTED_WITH_HEADER_MODE, ApiCall.WEB_SETTINGS_GET_REQUESTED_WITH_HEADER_MODE, ApiCall.SERVICE_WORKER_SETTINGS_SET_REQUESTED_WITH_HEADER_MODE, ApiCall.SERVICE_WORKER_SETTINGS_GET_REQUESTED_WITH_HEADER_MODE, ApiCall.GET_VARIATIONS_HEADER" errorLine1=" "Android.WebView.AndroidX.ApiCall", apiCall, ApiCall.COUNT);" errorLine2=" ~~~~~"> - <location file="android_webview/support_library/java/src/org/chromium/support_lib_glue/SupportLibWebViewChromiumFactory.java" /> + <issue + id="WrongConstant" + message="Must be one of: State.NONE, State.INVALID_GAIA_CREDENTIALS, State.USER_NOT_SIGNED_UP, State.CONNECTION_FAILED, State.SERVICE_UNAVAILABLE, State.REQUEST_CANCELED, State.UNEXPECTED_SERVICE_RESPONSE, State.SERVICE_ERROR" + errorLine1=" if (authErrorCode < 0 || authErrorCode >= GoogleServiceAuthError.State.NUM_ENTRIES) {" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/sync/android/java/src/org/chromium/chrome/browser/sync/SyncServiceImpl.java" + line="97" + column="80"/> </issue> - <issue id="WrongConstant" message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" errorLine1=" private int mDirection = ScrollDirection.UNKNOWN;" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/gesture/SwipeGestureListener.java" /> + <issue + id="WrongConstant" + message="Must be one of: ThumbnailFetchingResult.GOT_JPEG, ThumbnailFetchingResult.GOT_ETC1, ThumbnailFetchingResult.GOT_NOTHING, ThumbnailFetchingResult.GOT_DIFFERENT_ASPECT_RATIO_JPEG" + errorLine1=" UMA_THUMBNAIL_FETCHING_RESULT, result, ThumbnailFetchingResult.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/content/TabContentManager.java" + line="497" + column="80"/> </issue> - <issue id="WrongConstant" message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" errorLine1=" private int mDirection = ScrollDirection.UNKNOWN;" errorLine2=" ~~~~~~~"> - <location file="components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/gesture/SwipeGestureListener.java" /> + <issue + id="WrongConstant" + message="Must be one of: ReasonToShow.TAB_SWITCHED, ReasonToShow.NEW_TAB, ReasonToShow.LONG_PRESS" + errorLine1=" ConditionalTabStripUtils.ReasonToShow.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiMediator.java" + line="598" + column="59"/> </issue> - <issue id="WrongConstant" message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" errorLine1=" && mDirection != ScrollDirection.UNKNOWN) {" errorLine2=" ~~~~~~~~~~"> - <location file="components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/gesture/SwipeGestureListener.java" /> + <issue + id="WrongConstant" + message="Must be one of: BringToFrontSource.ACTIVATE_TAB, BringToFrontSource.NOTIFICATION, BringToFrontSource.SEARCH_ACTIVITY" + errorLine1=" return IntentHandler.BringToFrontSource.INVALID;" + errorLine2=" ~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/app/metrics/TabbedActivityLaunchCauseMetrics.java" + line="143" + column="53"/> </issue> - <issue id="WrongConstant" message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" errorLine1=" && mDirection != ScrollDirection.UNKNOWN) {" errorLine2=" ~~~~~~~"> - <location file="components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/gesture/SwipeGestureListener.java" /> + <issue + id="WrongConstant" + message="Must be one of: BringToFrontSource.ACTIVATE_TAB, BringToFrontSource.NOTIFICATION, BringToFrontSource.SEARCH_ACTIVITY" + errorLine1=" IntentHandler.BringToFrontSource.INVALID);" + errorLine2=" ~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/app/metrics/TabbedActivityLaunchCauseMetrics.java" + line="146" + column="50"/> </issue> - <issue id="WrongConstant" message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" errorLine1=" mDirection = ScrollDirection.UNKNOWN;" errorLine2=" ~~~~~~~~~~"> - <location file="components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/gesture/SwipeGestureListener.java" /> + <issue + id="WrongConstant" + message="Must be one of: TranslateAssistContentResult.FEATURE_DISABLED, TranslateAssistContentResult.TAB_WAS_NULL, TranslateAssistContentResult.INCOGNITO_TAB, TranslateAssistContentResult.OVERVIEW_MODE, TranslateAssistContentResult.CANNOT_TRANSLATE_TAB, TranslateAssistContentResult.MISSING_ORIGINAL_LANGUAGE, TranslateAssistContentResult.MISSING_CURRENT_LANGUAGE, TranslateAssistContentResult.JSON_EXCEPTION, TranslateAssistContentResult.TRANSLATABLE_PAGE, TranslateAssistContentResult.TRANSLATED_PAGE" + errorLine1=" TranslateAssistContentResult.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/translate/TranslateAssistContent.java" + line="68" + column="46"/> </issue> - <issue id="WrongConstant" message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" errorLine1=" mDirection = ScrollDirection.UNKNOWN;" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/gesture/SwipeGestureListener.java" /> + <issue + id="WrongConstant" + message="Must be one of: TranslateTabIntentResult.FEATURE_DISABLED, TranslateTabIntentResult.MISSING_AUTH_TOKEN, TranslateTabIntentResult.TAB_WAS_NULL, TranslateTabIntentResult.INCOGNITO_TAB, TranslateTabIntentResult.EXPECTED_URL_MISMATCH, TranslateTabIntentResult.CANNOT_TRANSLATE_TAB, TranslateTabIntentResult.SUCCESS" + errorLine1=" "Translate.TranslateTabIntentResult", result, TranslateTabIntentResult.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/translate/TranslateIntentHandler.java" + line="82" + column="88"/> </issue> - <issue id="WrongConstant" message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" errorLine1=" mDirection = ScrollDirection.UNKNOWN;" errorLine2=" ~~~~~~~"> - <location file="components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/gesture/SwipeGestureListener.java" /> + <issue + id="WrongConstant" + message="Must be one of: Type.NEVER_LANGUAGE, Type.NEVER_DOMAIN, Type.ALWAYS_LANGUAGE" + errorLine1=" assert Type.NUM_ENTRIES == 3;" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/components/translate/content/android/java/src/org/chromium/components/translate/TranslateOptions.java" + line="105" + column="21"/> </issue> - <issue id="WrongConstant" message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" errorLine1=" if (mDirection == ScrollDirection.UNKNOWN && shouldRecognizeSwipe(e1, e2)) {" errorLine2=" ~~~~~~~~~~"> - <location file="components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/gesture/SwipeGestureListener.java" /> + <issue + id="WrongConstant" + message="Must be one of: Type.NEVER_LANGUAGE, Type.NEVER_DOMAIN, Type.ALWAYS_LANGUAGE" + errorLine1=" mOptions = new boolean[Type.NUM_ENTRIES];" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/components/translate/content/android/java/src/org/chromium/components/translate/TranslateOptions.java" + line="106" + column="37"/> </issue> - <issue id="WrongConstant" message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" errorLine1=" if (mDirection == ScrollDirection.UNKNOWN && shouldRecognizeSwipe(e1, e2)) {" errorLine2=" ~~~~~~~"> - <location file="components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/gesture/SwipeGestureListener.java" /> + <issue + id="WrongConstant" + message="Must be one of: SettingsNavigationSource.OTHER, SettingsNavigationSource.TWA_CLEAR_DATA_DIALOG, SettingsNavigationSource.TWA_MANAGE_SPACE_ACTIVITY" + errorLine1=" extras.putInt(SettingsNavigationSource.EXTRA_KEY," + errorLine2=" ~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/browserservices/TrustedWebActivitySettingsLauncher.java" + line="108" + column="48"/> </issue> - <issue id="WrongConstant" message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" errorLine1=" int direction = ScrollDirection.UNKNOWN;" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/gesture/SwipeGestureListener.java" /> + <issue + id="WrongConstant" + message="Must be one of: SettingsNavigationSource.OTHER, SettingsNavigationSource.TWA_CLEAR_DATA_DIALOG, SettingsNavigationSource.TWA_MANAGE_SPACE_ACTIVITY" + errorLine1=" args.putInt(SettingsNavigationSource.EXTRA_KEY, navigationSource);" + errorLine2=" ~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/browserservices/TrustedWebActivitySettingsLauncher.java" + line="121" + column="46"/> </issue> - <issue id="WrongConstant" message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" errorLine1=" int direction = ScrollDirection.UNKNOWN;" errorLine2=" ~~~~~~~"> - <location file="components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/gesture/SwipeGestureListener.java" /> + <issue + id="WrongConstant" + message="Must be one of: DelegatedNotificationSmallIconFallback.NO_FALLBACK, DelegatedNotificationSmallIconFallback.FALLBACK_ICON_NOT_PROVIDED, DelegatedNotificationSmallIconFallback.FALLBACK_FOR_STATUS_BAR, DelegatedNotificationSmallIconFallback.FALLBACK_FOR_STATUS_BAR_AND_CONTENT" + errorLine1=" DelegatedNotificationSmallIconFallback.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/android/browserservices/metrics/java/src/org/chromium/chrome/browser/browserservices/metrics/TrustedWebActivityUmaRecorder.java" + line="159" + column="56"/> </issue> - <issue id="WrongConstant" message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" errorLine1=" direction = tx > 0.f ? ScrollDirection.RIGHT : ScrollDirection.LEFT;" errorLine2=" ~~~~~~~~~"> - <location file="components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/gesture/SwipeGestureListener.java" /> + <issue + id="WrongConstant" + message="Must be one of: ShareRequestMethod.GET, ShareRequestMethod.POST" + errorLine1=" "TrustedWebActivity.ShareTargetRequest", method, ShareRequestMethod.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/android/browserservices/metrics/java/src/org/chromium/chrome/browser/browserservices/metrics/TrustedWebActivityUmaRecorder.java" + line="181" + column="85"/> </issue> - <issue id="WrongConstant" message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" errorLine1=" if (direction != ScrollDirection.UNKNOWN && mHandler.isSwipeEnabled(direction)) {" errorLine2=" ~~~~~~~"> - <location file="components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/gesture/SwipeGestureListener.java" /> + <issue + id="WrongConstant" + message="Must be one of: PermissionChanged.NULL_TO_TRUE, PermissionChanged.NULL_TO_FALSE, PermissionChanged.TRUE_TO_FALSE, PermissionChanged.FALSE_TO_TRUE" + errorLine1=" PermissionChanged.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/android/browserservices/metrics/java/src/org/chromium/chrome/browser/browserservices/metrics/TrustedWebActivityUmaRecorder.java" + line="218" + column="39"/> </issue> - <issue id="WrongConstant" message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" errorLine1=" mDirection = direction;" errorLine2=" ~~~~~~~~~~"> - <location file="components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/gesture/SwipeGestureListener.java" /> + <issue + id="WrongConstant" + message="Must be one of: AudioPermissionState.GRANTED, AudioPermissionState.DENIED_CAN_ASK_AGAIN, AudioPermissionState.DENIED_CANNOT_ASK_AGAIN" + errorLine1=" AudioPermissionState.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/metrics/UmaSessionStats.java" + line="148" + column="38"/> </issue> - <issue id="WrongConstant" message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" errorLine1=" if (mDirection != ScrollDirection.UNKNOWN) {" errorLine2=" ~~~~~~~~~~"> - <location file="components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/gesture/SwipeGestureListener.java" /> + <issue + id="WrongConstant" + message="Must be one of: ViewAction.OPEN, ViewAction.RESUME, ViewAction.PAUSE, ViewAction.CANCEL, ViewAction.MENU_SHARE, ViewAction.MENU_DELETE, ViewAction.RETRY, ViewAction.MENU_RENAME, ViewAction.MENU_CHANGE" + errorLine1=" "Android.DownloadManager.List.View.Action", action, ViewAction.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/download/internal/android/java/src/org/chromium/chrome/browser/download/home/metrics/UmaUtils.java" + line="119" + column="80"/> </issue> - <issue id="WrongConstant" message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" errorLine1=" if (mDirection != ScrollDirection.UNKNOWN) {" errorLine2=" ~~~~~~~"> - <location file="components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/gesture/SwipeGestureListener.java" /> + <issue + id="WrongConstant" + message="Must be one of: MenuAction.CLOSE, MenuAction.MULTI_DELETE, MenuAction.MULTI_SHARE, MenuAction.SHOW_INFO, MenuAction.HIDE_INFO, MenuAction.SEARCH, MenuAction.SETTINGS" + errorLine1=" "Android.DownloadManager.Menu.Action", action, MenuAction.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/download/internal/android/java/src/org/chromium/chrome/browser/download/home/metrics/UmaUtils.java" + line="152" + column="75"/> </issue> - <issue id="WrongConstant" message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" errorLine1=" if (mDirection != ScrollDirection.UNKNOWN) {" errorLine2=" ~~~~~~~~~~"> - <location file="components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/gesture/SwipeGestureListener.java" /> + <issue + id="WrongConstant" + message="Must be one of: FilterType.NONE, FilterType.SITES, FilterType.VIDEOS, FilterType.MUSIC, FilterType.IMAGES, FilterType.DOCUMENT, FilterType.OTHER, FilterType.PREFETCHED" + errorLine1=" filterType, Filters.FilterType.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/download/internal/android/java/src/org/chromium/chrome/browser/download/home/metrics/UmaUtils.java" + line="189" + column="52"/> </issue> - <issue id="WrongConstant" message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" errorLine1=" if (mDirection != ScrollDirection.UNKNOWN) {" errorLine2=" ~~~~~~~"> - <location file="components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/gesture/SwipeGestureListener.java" /> + <issue + id="WrongConstant" + message="Must be one of: RenameDialogAction.RENAME_DIALOG_CONFIRM, RenameDialogAction.RENAME_DIALOG_CANCEL, RenameDialogAction.RENAME_DIALOG_OTHER, RenameDialogAction.RENAME_EXTENSION_DIALOG_CONFIRM, RenameDialogAction.RENAME_EXTENSION_DIALOG_CANCEL, RenameDialogAction.RENAME_EXTENSION_DIALOG_OTHER" + errorLine1=" "Android.Download.Rename.Dialog.Action", action, RenameDialogAction.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/download/internal/android/java/src/org/chromium/chrome/browser/download/home/metrics/UmaUtils.java" + line="248" + column="85"/> </issue> - <issue id="WrongConstant" message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" errorLine1=" mHandler.onFling(mDirection, e2, e2.getRawX() - mMotionStartPoint.x," errorLine2=" ~~~~~~~~~~"> - <location file="components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/gesture/SwipeGestureListener.java" /> + <issue + id="WrongConstant" + message="Must be one of: UpdateState.NONE, UpdateState.UPDATE_AVAILABLE, UpdateState.UNSUPPORTED_OS_VERSION" + errorLine1=" "GoogleUpdate.StartUp.State", mStatus.updateState, UpdateState.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateStatusProvider.java" + line="224" + column="84"/> </issue> - <issue id="WrongConstant" message="Must be one of: ScrollDirection.LEFT, ScrollDirection.RIGHT, ScrollDirection.UP, ScrollDirection.DOWN" errorLine1=" mHandler.onFling(mDirection, e2, e2.getRawX() - mMotionStartPoint.x," errorLine2=" ~~~~~~~~~~"> - <location file="components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/gesture/SwipeGestureListener.java" /> + <issue + id="WrongConstant" + message="Must be one of: ImageFormat.UNKNOWN, ImageFormat.RGB_565, ImageFormat.YV12, ImageFormat.Y8, ImageFormat.NV16, ImageFormat.NV21, ImageFormat.YUY2, ImageFormat.JPEG, ImageFormat.DEPTH_JPEG, ImageFormat.YUV_420_888, ImageFormat.YUV_422_888, ImageFormat.YUV_444_888, ImageFormat.FLEX_RGB_888, ImageFormat.FLEX_RGBA_8888, ImageFormat.RAW_SENSOR, ImageFormat.RAW_PRIVATE, ImageFormat.RAW10, ImageFormat.RAW12, ImageFormat.DEPTH16, ImageFormat.DEPTH_POINT_CLOUD, ImageFormat.PRIVATE, ImageFormat.HEIC" + errorLine1=" mCaptureFormat.getHeight(), mCaptureFormat.getPixelFormat(), 2 /* maxImages */);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/media/capture/video/android/java/src/org/chromium/media/VideoCaptureCamera2.java" + line="1074" + column="49"/> </issue> - <issue id="WrongConstant" message="Must be one of: State.NONE, State.INVALID_GAIA_CREDENTIALS, State.USER_NOT_SIGNED_UP, State.CONNECTION_FAILED, State.SERVICE_UNAVAILABLE, State.REQUEST_CANCELED, State.UNEXPECTED_SERVICE_RESPONSE, State.SERVICE_ERROR" errorLine1=" if (authErrorCode < 0 || authErrorCode >= GoogleServiceAuthError.State.NUM_ENTRIES) {" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/sync/android/java/src/org/chromium/chrome/browser/sync/SyncServiceImpl.java" /> + <issue + id="WrongConstant" + message="Must be one of: UserAction.CHANGE_LANGUAGE, UserAction.WATCH_NEXT_VIDEO, UserAction.TRY_NOW, UserAction.SHARE, UserAction.CLOSE, UserAction.BACK_PRESS_WHEN_SHOWING_VIDEO_PLAYER, UserAction.OPEN_SHARED_VIDEO, UserAction.INVALID_SHARE_URL, UserAction.IPH_NTP_SHOWN, UserAction.IPH_NTP_CLICKED, UserAction.IPH_NTP_DISMISSED, UserAction.PLAYED_FROM_RECAP" + errorLine1=" UserAction.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/video_tutorials/android/java/src/org/chromium/chrome/browser/video_tutorials/metrics/VideoTutorialMetrics.java" + line="74" + column="28"/> </issue> - <issue id="WrongConstant" message="Must be one of: ThumbnailFetchingResult.GOT_JPEG, ThumbnailFetchingResult.GOT_ETC1, ThumbnailFetchingResult.GOT_NOTHING, ThumbnailFetchingResult.GOT_DIFFERENT_ASPECT_RATIO_JPEG" errorLine1=" UMA_THUMBNAIL_FETCHING_RESULT, result, ThumbnailFetchingResult.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/content/TabContentManager.java" /> + <issue + id="WrongConstant" + message="Must be one of: WatchState.STARTED, WatchState.COMPLETED, WatchState.PAUSED, WatchState.RESUMED, WatchState.WATCHED" + errorLine1=" WatchState.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/video_tutorials/android/java/src/org/chromium/chrome/browser/video_tutorials/metrics/VideoTutorialMetrics.java" + line="86" + column="28"/> </issue> - <issue id="WrongConstant" message="Must be one of: ReasonToShow.TAB_SWITCHED, ReasonToShow.NEW_TAB, ReasonToShow.LONG_PRESS" errorLine1=" ConditionalTabStripUtils.ReasonToShow.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGroupUiMediator.java" /> + <issue + id="WrongConstant" + message="Must be one of: LanguagePickerAction.BACK_PRESS, LanguagePickerAction.CLOSE, LanguagePickerAction.WATCH" + errorLine1=" "VideoTutorials.LanguagePicker.Action", action, LanguagePickerAction.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/video_tutorials/android/java/src/org/chromium/chrome/browser/video_tutorials/metrics/VideoTutorialMetrics.java" + line="92" + column="86"/> </issue> - <issue id="WrongConstant" message="Must be one of: BringToFrontSource.ACTIVATE_TAB, BringToFrontSource.NOTIFICATION, BringToFrontSource.SEARCH_ACTIVITY" errorLine1=" return IntentHandler.BringToFrontSource.INVALID;" errorLine2=" ~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/app/metrics/TabbedActivityLaunchCauseMetrics.java" /> + <issue + id="WrongConstant" + message="Must be one of: VoiceInteractionSource.OMNIBOX, VoiceInteractionSource.NTP, VoiceInteractionSource.SEARCH_WIDGET, VoiceInteractionSource.TASKS_SURFACE, VoiceInteractionSource.TOOLBAR" + errorLine1=" "VoiceInteraction.StartEventSource", source, VoiceInteractionSource.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/voice/VoiceRecognitionHandler.java" + line="1085" + column="85"/> </issue> - <issue id="WrongConstant" message="Must be one of: BringToFrontSource.ACTIVATE_TAB, BringToFrontSource.NOTIFICATION, BringToFrontSource.SEARCH_ACTIVITY" errorLine1=" IntentHandler.BringToFrontSource.INVALID);" errorLine2=" ~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/app/metrics/TabbedActivityLaunchCauseMetrics.java" /> + <issue + id="WrongConstant" + message="Must be one of: VoiceIntentTarget.SYSTEM, VoiceIntentTarget.ASSISTANT" + errorLine1=" "VoiceInteraction.StartEventTarget", target, VoiceIntentTarget.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/voice/VoiceRecognitionHandler.java" + line="1087" + column="80"/> </issue> - <issue id="WrongConstant" message="Must be one of: TranslateAssistContentResult.FEATURE_DISABLED, TranslateAssistContentResult.TAB_WAS_NULL, TranslateAssistContentResult.INCOGNITO_TAB, TranslateAssistContentResult.OVERVIEW_MODE, TranslateAssistContentResult.CANNOT_TRANSLATE_TAB, TranslateAssistContentResult.MISSING_ORIGINAL_LANGUAGE, TranslateAssistContentResult.MISSING_CURRENT_LANGUAGE, TranslateAssistContentResult.JSON_EXCEPTION, TranslateAssistContentResult.TRANSLATABLE_PAGE, TranslateAssistContentResult.TRANSLATED_PAGE" errorLine1=" TranslateAssistContentResult.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/translate/TranslateAssistContent.java" /> + <issue + id="WrongConstant" + message="Must be one of: VoiceInteractionSource.OMNIBOX, VoiceInteractionSource.NTP, VoiceInteractionSource.SEARCH_WIDGET, VoiceInteractionSource.TASKS_SURFACE, VoiceInteractionSource.TOOLBAR" + errorLine1=" "VoiceInteraction.FinishEventSource", source, VoiceInteractionSource.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/voice/VoiceRecognitionHandler.java" + line="1101" + column="86"/> </issue> - <issue id="WrongConstant" message="Must be one of: TranslateTabIntentResult.FEATURE_DISABLED, TranslateTabIntentResult.MISSING_AUTH_TOKEN, TranslateTabIntentResult.TAB_WAS_NULL, TranslateTabIntentResult.INCOGNITO_TAB, TranslateTabIntentResult.EXPECTED_URL_MISMATCH, TranslateTabIntentResult.CANNOT_TRANSLATE_TAB, TranslateTabIntentResult.SUCCESS" errorLine1=" "Translate.TranslateTabIntentResult", result, TranslateTabIntentResult.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/translate/TranslateIntentHandler.java" /> + <issue + id="WrongConstant" + message="Must be one of: VoiceIntentTarget.SYSTEM, VoiceIntentTarget.ASSISTANT" + errorLine1=" "VoiceInteraction.FinishEventTarget", target, VoiceIntentTarget.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/voice/VoiceRecognitionHandler.java" + line="1103" + column="81"/> </issue> - <issue id="WrongConstant" message="Must be one of: Type.NEVER_LANGUAGE, Type.NEVER_DOMAIN, Type.ALWAYS_LANGUAGE" errorLine1=" assert Type.NUM_ENTRIES == 3;" errorLine2=" ~~~~~~~~~~~"> - <location file="components/translate/content/android/java/src/org/chromium/components/translate/TranslateOptions.java" /> + <issue + id="WrongConstant" + message="Must be one of: VoiceInteractionSource.OMNIBOX, VoiceInteractionSource.NTP, VoiceInteractionSource.SEARCH_WIDGET, VoiceInteractionSource.TASKS_SURFACE, VoiceInteractionSource.TOOLBAR" + errorLine1=" VoiceInteractionSource.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/voice/VoiceRecognitionHandler.java" + line="1117" + column="40"/> </issue> - <issue id="WrongConstant" message="Must be one of: Type.NEVER_LANGUAGE, Type.NEVER_DOMAIN, Type.ALWAYS_LANGUAGE" errorLine1=" mOptions = new boolean[Type.NUM_ENTRIES];" errorLine2=" ~~~~~~~~~~~"> - <location file="components/translate/content/android/java/src/org/chromium/components/translate/TranslateOptions.java" /> + <issue + id="WrongConstant" + message="Must be one of: VoiceIntentTarget.SYSTEM, VoiceIntentTarget.ASSISTANT" + errorLine1=" "VoiceInteraction.DismissedEventTarget", target, VoiceIntentTarget.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/voice/VoiceRecognitionHandler.java" + line="1119" + column="84"/> </issue> - <issue id="WrongConstant" message="Must be one of: SettingsNavigationSource.OTHER, SettingsNavigationSource.TWA_CLEAR_DATA_DIALOG, SettingsNavigationSource.TWA_MANAGE_SPACE_ACTIVITY" errorLine1=" extras.putInt(SettingsNavigationSource.EXTRA_KEY," errorLine2=" ~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/browserservices/TrustedWebActivitySettingsLauncher.java" /> + <issue + id="WrongConstant" + message="Must be one of: VoiceInteractionSource.OMNIBOX, VoiceInteractionSource.NTP, VoiceInteractionSource.SEARCH_WIDGET, VoiceInteractionSource.TASKS_SURFACE, VoiceInteractionSource.TOOLBAR" + errorLine1=" "VoiceInteraction.FailureEventSource", source, VoiceInteractionSource.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/voice/VoiceRecognitionHandler.java" + line="1133" + column="87"/> </issue> - <issue id="WrongConstant" message="Must be one of: SettingsNavigationSource.OTHER, SettingsNavigationSource.TWA_CLEAR_DATA_DIALOG, SettingsNavigationSource.TWA_MANAGE_SPACE_ACTIVITY" errorLine1=" args.putInt(SettingsNavigationSource.EXTRA_KEY, navigationSource);" errorLine2=" ~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/browserservices/TrustedWebActivitySettingsLauncher.java" /> + <issue + id="WrongConstant" + message="Must be one of: VoiceIntentTarget.SYSTEM, VoiceIntentTarget.ASSISTANT" + errorLine1=" "VoiceInteraction.FailureEventTarget", target, VoiceIntentTarget.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/voice/VoiceRecognitionHandler.java" + line="1135" + column="82"/> </issue> - <issue id="WrongConstant" message="Must be one of: DelegatedNotificationSmallIconFallback.NO_FALLBACK, DelegatedNotificationSmallIconFallback.FALLBACK_ICON_NOT_PROVIDED, DelegatedNotificationSmallIconFallback.FALLBACK_FOR_STATUS_BAR, DelegatedNotificationSmallIconFallback.FALLBACK_FOR_STATUS_BAR_AND_CONTENT" errorLine1=" DelegatedNotificationSmallIconFallback.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/android/browserservices/metrics/java/src/org/chromium/chrome/browser/browserservices/metrics/TrustedWebActivityUmaRecorder.java" /> + <issue + id="WrongConstant" + message="Must be one of: VoiceInteractionSource.OMNIBOX, VoiceInteractionSource.NTP, VoiceInteractionSource.SEARCH_WIDGET, VoiceInteractionSource.TASKS_SURFACE, VoiceInteractionSource.TOOLBAR" + errorLine1=" VoiceInteractionSource.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/voice/VoiceRecognitionHandler.java" + line="1149" + column="40"/> </issue> - <issue id="WrongConstant" message="Must be one of: ShareRequestMethod.GET, ShareRequestMethod.POST" errorLine1=" "TrustedWebActivity.ShareTargetRequest", method, ShareRequestMethod.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/android/browserservices/metrics/java/src/org/chromium/chrome/browser/browserservices/metrics/TrustedWebActivityUmaRecorder.java" /> + <issue + id="WrongConstant" + message="Must be one of: VoiceIntentTarget.SYSTEM, VoiceIntentTarget.ASSISTANT" + errorLine1=" "VoiceInteraction.UnexpectedResultTarget", target, VoiceIntentTarget.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/voice/VoiceRecognitionHandler.java" + line="1151" + column="86"/> </issue> - <issue id="WrongConstant" message="Must be one of: PermissionChanged.NULL_TO_TRUE, PermissionChanged.NULL_TO_FALSE, PermissionChanged.TRUE_TO_FALSE, PermissionChanged.FALSE_TO_TRUE" errorLine1=" PermissionChanged.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/android/browserservices/metrics/java/src/org/chromium/chrome/browser/browserservices/metrics/TrustedWebActivityUmaRecorder.java" /> + <issue + id="WrongConstant" + message="Must be one of: AssistantActionPerformed.UNKNOWN, AssistantActionPerformed.TRANSCRIPTION, AssistantActionPerformed.TRANSLATE, AssistantActionPerformed.READOUT" + errorLine1=" AssistantActionPerformed.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/voice/VoiceRecognitionHandler.java" + line="1166" + column="46"/> </issue> - <issue id="WrongConstant" message="Must be one of: AudioPermissionState.GRANTED, AudioPermissionState.DENIED_CAN_ASK_AGAIN, AudioPermissionState.DENIED_CANNOT_ASK_AGAIN" errorLine1=" AudioPermissionState.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/metrics/UmaSessionStats.java" /> + <issue + id="WrongConstant" + message="Must be one of: AudioPermissionState.GRANTED, AudioPermissionState.DENIED_CAN_ASK_AGAIN, AudioPermissionState.DENIED_CANNOT_ASK_AGAIN" + errorLine1=" permissionsState, AudioPermissionState.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/voice/VoiceRecognitionHandler.java" + line="1257" + column="56"/> </issue> - <issue id="WrongConstant" message="Must be one of: ViewAction.OPEN, ViewAction.RESUME, ViewAction.PAUSE, ViewAction.CANCEL, ViewAction.MENU_SHARE, ViewAction.MENU_DELETE, ViewAction.RETRY, ViewAction.MENU_RENAME, ViewAction.MENU_CHANGE" errorLine1=" "Android.DownloadManager.List.View.Action", action, ViewAction.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/download/internal/android/java/src/org/chromium/chrome/browser/download/home/metrics/UmaUtils.java" /> + <issue + id="WrongConstant" + message="Must be one of: ChannelId.BROWSER, ChannelId.DOWNLOADS, ChannelId.INCOGNITO, ChannelId.MEDIA_PLAYBACK, ChannelId.SCREEN_CAPTURE, ChannelId.CONTENT_SUGGESTIONS, ChannelId.WEBAPP_ACTIONS, ChannelId.SITES, ChannelId.SHARING, ChannelId.UPDATES, ChannelId.COMPLETED_DOWNLOADS, ChannelId.PERMISSION_REQUESTS, ChannelId.PERMISSION_REQUESTS_HIGH, ChannelId.ANNOUNCEMENT, ChannelId.WEBAPPS, ChannelId.WEBAPPS_QUIET, ChannelId.PRICE_DROP, ChannelId.SECURITY_KEY, ChannelId.CHROME_TIPS, ChannelId.BLUETOOTH, ChannelId.USB" + errorLine1=" .createNotificationWrapperBuilder(ChromeChannelDefinitions.ChannelId.VR)" + errorLine2=" ~~"> + <location + file="$SRC/chrome/android/features/vr/java/src/org/chromium/chrome/browser/vr/VrFallbackUtils.java" + line="33" + column="98"/> </issue> - <issue id="WrongConstant" message="Must be one of: MenuAction.CLOSE, MenuAction.MULTI_DELETE, MenuAction.MULTI_SHARE, MenuAction.SHOW_INFO, MenuAction.HIDE_INFO, MenuAction.SEARCH, MenuAction.SETTINGS" errorLine1=" "Android.DownloadManager.Menu.Action", action, MenuAction.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/download/internal/android/java/src/org/chromium/chrome/browser/download/home/metrics/UmaUtils.java" /> + <issue + id="WrongConstant" + message="Must be one of: WebContentsStatus.CREATED, WebContentsStatus.USED, WebContentsStatus.KILLED, WebContentsStatus.DESTROYED, WebContentsStatus.STOLEN" + errorLine1=" WEBCONTENTS_STATUS_HISTOGRAM, status, WebContentsStatus.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/WarmupManager.java" + line="383" + column="73"/> </issue> - <issue id="WrongConstant" message="Must be one of: FilterType.NONE, FilterType.SITES, FilterType.VIDEOS, FilterType.MUSIC, FilterType.IMAGES, FilterType.DOCUMENT, FilterType.OTHER, FilterType.PREFETCHED" errorLine1=" filterType, Filters.FilterType.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/download/internal/android/java/src/org/chromium/chrome/browser/download/home/metrics/UmaUtils.java" /> + <issue + id="WrongConstant" + message="Must be one of: UpdateRequestSent.WHILE_WEBAPK_CLOSED" + errorLine1=" HISTOGRAM_UPDATE_REQUEST_SENT, type, UpdateRequestSent.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/android/browserservices/metrics/java/src/org/chromium/chrome/browser/browserservices/metrics/WebApkUmaRecorder.java" + line="116" + column="72"/> </issue> - <issue id="WrongConstant" message="Must be one of: RenameDialogAction.RENAME_DIALOG_CONFIRM, RenameDialogAction.RENAME_DIALOG_CANCEL, RenameDialogAction.RENAME_DIALOG_OTHER, RenameDialogAction.RENAME_EXTENSION_DIALOG_CONFIRM, RenameDialogAction.RENAME_EXTENSION_DIALOG_CANCEL, RenameDialogAction.RENAME_EXTENSION_DIALOG_OTHER" errorLine1=" "Android.Download.Rename.Dialog.Action", action, RenameDialogAction.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/download/internal/android/java/src/org/chromium/chrome/browser/download/home/metrics/UmaUtils.java" /> + <issue + id="WrongConstant" + message="Must be one of: UpdateRequestQueued.ONCE, UpdateRequestQueued.TWICE, UpdateRequestQueued.THREE_TIMES" + errorLine1=" HISTOGRAM_UPDATE_REQUEST_QUEUED, times, UpdateRequestQueued.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/android/browserservices/metrics/java/src/org/chromium/chrome/browser/browserservices/metrics/WebApkUmaRecorder.java" + line="126" + column="77"/> </issue> - <issue id="WrongConstant" message="Must be one of: UpdateState.NONE, UpdateState.UPDATE_AVAILABLE, UpdateState.UNSUPPORTED_OS_VERSION" errorLine1=" "GoogleUpdate.StartUp.State", mStatus.updateState, UpdateState.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateStatusProvider.java" /> + <issue + id="WrongConstant" + message="Must be one of: GooglePlayInstallResult.SUCCESS, GooglePlayInstallResult.FAILED_NO_DELEGATE, GooglePlayInstallResult.FAILED_TO_CONNECT_TO_SERVICE, GooglePlayInstallResult.FAILED_CALLER_VERIFICATION_FAILURE, GooglePlayInstallResult.FAILED_POLICY_VIOLATION, GooglePlayInstallResult.FAILED_API_DISABLED, GooglePlayInstallResult.FAILED_REQUEST_FAILED, GooglePlayInstallResult.FAILED_DOWNLOAD_CANCELLED, GooglePlayInstallResult.FAILED_DOWNLOAD_ERROR, GooglePlayInstallResult.FAILED_INSTALL_ERROR, GooglePlayInstallResult.FAILED_INSTALL_TIMEOUT, GooglePlayInstallResult.REQUEST_FAILED_POLICY_DISABLED, GooglePlayInstallResult.REQUEST_FAILED_UNKNOWN_ACCOUNT, GooglePlayInstallResult.REQUEST_FAILED_NETWORK_ERROR, GooglePlayInstallResult.REQUSET_FAILED_RESOLVE_ERROR, GooglePlayInstallResult.REQUEST_FAILED_NOT_GOOGLE_SIGNED" + errorLine1=" GooglePlayInstallResult.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/android/browserservices/metrics/java/src/org/chromium/chrome/browser/browserservices/metrics/WebApkUmaRecorder.java" + line="168" + column="41"/> </issue> - <issue id="WrongConstant" message="Must be one of: ImageFormat.UNKNOWN, ImageFormat.RGB_565, ImageFormat.YV12, ImageFormat.Y8, ImageFormat.NV16, ImageFormat.NV21, ImageFormat.YUY2, ImageFormat.JPEG, ImageFormat.DEPTH_JPEG, ImageFormat.YUV_420_888, ImageFormat.YUV_422_888, ImageFormat.YUV_444_888, ImageFormat.FLEX_RGB_888, ImageFormat.FLEX_RGBA_8888, ImageFormat.RAW_SENSOR, ImageFormat.RAW_PRIVATE, ImageFormat.RAW10, ImageFormat.RAW12, ImageFormat.DEPTH16, ImageFormat.DEPTH_POINT_CLOUD, ImageFormat.PRIVATE, ImageFormat.HEIC" errorLine1=" mCaptureFormat.getHeight(), mCaptureFormat.getPixelFormat(), 2 /* maxImages */);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="media/capture/video/android/java/src/org/chromium/media/VideoCaptureCamera2.java" /> + <issue + id="WrongConstant" + message="Must be one of: GooglePlayInstallResult.SUCCESS, GooglePlayInstallResult.FAILED_NO_DELEGATE, GooglePlayInstallResult.FAILED_TO_CONNECT_TO_SERVICE, GooglePlayInstallResult.FAILED_CALLER_VERIFICATION_FAILURE, GooglePlayInstallResult.FAILED_POLICY_VIOLATION, GooglePlayInstallResult.FAILED_API_DISABLED, GooglePlayInstallResult.FAILED_REQUEST_FAILED, GooglePlayInstallResult.FAILED_DOWNLOAD_CANCELLED, GooglePlayInstallResult.FAILED_DOWNLOAD_ERROR, GooglePlayInstallResult.FAILED_INSTALL_ERROR, GooglePlayInstallResult.FAILED_INSTALL_TIMEOUT, GooglePlayInstallResult.REQUEST_FAILED_POLICY_DISABLED, GooglePlayInstallResult.REQUEST_FAILED_UNKNOWN_ACCOUNT, GooglePlayInstallResult.REQUEST_FAILED_NETWORK_ERROR, GooglePlayInstallResult.REQUSET_FAILED_RESOLVE_ERROR, GooglePlayInstallResult.REQUEST_FAILED_NOT_GOOGLE_SIGNED" + errorLine1=" GooglePlayInstallResult.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/android/browserservices/metrics/java/src/org/chromium/chrome/browser/browserservices/metrics/WebApkUmaRecorder.java" + line="185" + column="41"/> </issue> - <issue id="WrongConstant" message="Must be one of: UserAction.CHANGE_LANGUAGE, UserAction.WATCH_NEXT_VIDEO, UserAction.TRY_NOW, UserAction.SHARE, UserAction.CLOSE, UserAction.BACK_PRESS_WHEN_SHOWING_VIDEO_PLAYER, UserAction.OPEN_SHARED_VIDEO, UserAction.INVALID_SHARE_URL, UserAction.IPH_NTP_SHOWN, UserAction.IPH_NTP_CLICKED, UserAction.IPH_NTP_DISMISSED, UserAction.PLAYED_FROM_RECAP" errorLine1=" UserAction.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/video_tutorials/android/java/src/org/chromium/chrome/browser/video_tutorials/metrics/VideoTutorialMetrics.java" /> + <issue + id="WrongConstant" + message="Must be one of: ThemeSettingsEntry.SETTINGS, ThemeSettingsEntry.AUTO_DARK_MODE_MESSAGE" + errorLine1=" ThemeSettingsEntry.AUTO_DARK_MODE_DIALOG);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/ui/android/night_mode/java/src/org/chromium/chrome/browser/night_mode/WebContentsDarkModeMessageController.java" + line="323" + column="36"/> </issue> - <issue id="WrongConstant" message="Must be one of: WatchState.STARTED, WatchState.COMPLETED, WatchState.PAUSED, WatchState.RESUMED, WatchState.WATCHED" errorLine1=" WatchState.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/video_tutorials/android/java/src/org/chromium/chrome/browser/video_tutorials/metrics/VideoTutorialMetrics.java" /> + <issue + id="WrongConstant" + message="Must be one of: InfobarAction.SHOWN, InfobarAction.KEYBOARD_DISMISSED" + errorLine1=" "Blink.Sms.Receive.Infobar", action, InfobarAction.NUM_ENTRIES);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/sms/android/java/src/org/chromium/components/browser_ui/sms/WebOTPServiceUma.java" + line="30" + column="68"/> </issue> - <issue id="WrongConstant" message="Must be one of: LanguagePickerAction.BACK_PRESS, LanguagePickerAction.CLOSE, LanguagePickerAction.WATCH" errorLine1=" "VideoTutorials.LanguagePicker.Action", action, LanguagePickerAction.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/video_tutorials/android/java/src/org/chromium/chrome/browser/video_tutorials/metrics/VideoTutorialMetrics.java" /> + <issue + id="WrongConstant" + message="Must be one of: ApiCall.ADD_JAVASCRIPT_INTERFACE, ApiCall.AUTOFILL, ApiCall.CAN_GO_BACK, ApiCall.CAN_GO_BACK_OR_FORWARD, ApiCall.CAN_GO_FORWARD, ApiCall.CAN_ZOOM_IN, ApiCall.CAN_ZOOM_OUT, ApiCall.CAPTURE_PICTURE, ApiCall.CLEAR_CACHE, ApiCall.CLEAR_FORM_DATA, ApiCall.CLEAR_HISTORY, ApiCall.CLEAR_MATCHES, ApiCall.CLEAR_SSL_PREFERENCES, ApiCall.CLEAR_VIEW, ApiCall.COPY_BACK_FORWARD_LIST, ApiCall.CREATE_PRINT_DOCUMENT_ADAPTER, ApiCall.CREATE_WEBMESSAGE_CHANNEL, ApiCall.DOCUMENT_HAS_IMAGES, ApiCall.DOES_SUPPORT_FULLSCREEN, ApiCall.EVALUATE_JAVASCRIPT, ApiCall.EXTRACT_SMART_CLIP_DATA, ApiCall.FIND_NEXT, ApiCall.GET_CERTIFICATE, ApiCall.GET_CONTENT_HEIGHT, ApiCall.GET_CONTENT_WIDTH, ApiCall.GET_FAVICON, ApiCall.GET_HIT_TEST_RESULT, ApiCall.GET_HTTP_AUTH_USERNAME_PASSWORD, ApiCall.GET_ORIGINAL_URL, ApiCall.GET_PROGRESS, ApiCall.GET_SCALE, ApiCall.GET_SETTINGS, ApiCall.GET_TEXT_CLASSIFIER, ApiCall.GET_TITLE, ApiCall.GET_URL, ApiCall.GET_WEBCHROME_CLIENT, ApiCall.GET_WEBVIEW_CLIENT, ApiCall.GO_BACK, ApiCall.GO_BACK_OR_FORWARD, ApiCall.GO_FORWARD, ApiCall.INSERT_VISUAL_STATE_CALLBACK, ApiCall.INVOKE_ZOOM_PICKER, ApiCall.IS_PAUSED, ApiCall.IS_PRIVATE_BROWSING_ENABLED, ApiCall.LOAD_DATA, ApiCall.LOAD_DATA_WITH_BASE_URL, ApiCall.NOTIFY_FIND_DIALOG_DISMISSED, ApiCall.ON_PAUSE, ApiCall.ON_PROVIDE_AUTOFILL_VIRTUAL_STRUCTURE, ApiCall.ON_RESUME, ApiCall.OVERLAY_HORIZONTAL_SCROLLBAR, ApiCall.OVERLAY_VERTICAL_SCROLLBAR, ApiCall.PAGE_DOWN, ApiCall.PAGE_UP, ApiCall.PAUSE_TIMERS, ApiCall.POST_MESSAGE_TO_MAIN_FRAME, ApiCall.POST_URL, ApiCall.RELOAD, ApiCall.REMOVE_JAVASCRIPT_INTERFACE, ApiCall.REQUEST_FOCUS_NODE_HREF, ApiCall.REQUEST_IMAGE_REF, ApiCall.RESTORE_STATE, ApiCall.RESUME_TIMERS, ApiCall.SAVE_STATE, ApiCall.SET_DOWNLOAD_LISTENER, ApiCall.SET_FIND_LISTENER, ApiCall.SET_HORIZONTAL_SCROLLBAR_OVERLAY, ApiCall.SET_HTTP_AUTH_USERNAME_PASSWORD, ApiCall.SET_INITIAL_SCALE, ApiCall.SET_NETWORK_AVAILABLE, ApiCall.SET_PICTURE_LISTENER, ApiCall.SET_SMART_CLIP_RESULT_HANDLER, ApiCall.SET_TEXT_CLASSIFIER, ApiCall.SET_VERTICAL_SCROLLBAR_OVERLAY, ApiCall.SET_WEBCHROME_CLIENT, ApiCall.SET_WEBVIEW_CLIENT, ApiCall.SHOW_FIND_DIALOG, ApiCall.STOP_LOADING" + errorLine1=" RecordHistogram.recordEnumeratedHistogram("Android.WebView.ApiCall", sample, ApiCall.COUNT);" + errorLine2=" ~~~~~"> + <location + file="$SRC/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java" + line="243" + column="94"/> </issue> - <issue id="WrongConstant" message="Must be one of: VoiceInteractionSource.OMNIBOX, VoiceInteractionSource.NTP, VoiceInteractionSource.SEARCH_WIDGET, VoiceInteractionSource.TASKS_SURFACE, VoiceInteractionSource.TOOLBAR" errorLine1=" "VoiceInteraction.StartEventSource", source, VoiceInteractionSource.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/voice/VoiceRecognitionHandler.java" /> + <issue + id="WrongConstant" + message="Must be one of: SafeModeExecutionResult.SUCCESS, SafeModeExecutionResult.UNKNOWN_ERROR, SafeModeExecutionResult.ACTION_FAILED" + errorLine1=" "Android.WebView.SafeMode.ExecutionResult", result, SafeModeExecutionResult.COUNT);" + errorLine2=" ~~~~~"> + <location + file="$SRC/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java" + line="537" + column="93"/> </issue> - <issue id="WrongConstant" message="Must be one of: VoiceIntentTarget.SYSTEM, VoiceIntentTarget.ASSISTANT" errorLine1=" "VoiceInteraction.StartEventTarget", target, VoiceIntentTarget.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/voice/VoiceRecognitionHandler.java" /> + <issue + id="UseSwitchCompatOrMaterialCode" + message="Use `SwitchCompat` from AppCompat or `SwitchMaterial` from Material library" + errorLine1=" final Switch umaSwitch = mView.findViewById(R.id.fre_uma_dialog_switch);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/fre/FreUMADialogCoordinator.java" + line="56" + column="9"/> </issue> - <issue id="WrongConstant" message="Must be one of: VoiceInteractionSource.OMNIBOX, VoiceInteractionSource.NTP, VoiceInteractionSource.SEARCH_WIDGET, VoiceInteractionSource.TASKS_SURFACE, VoiceInteractionSource.TOOLBAR" errorLine1=" "VoiceInteraction.FinishEventSource", source, VoiceInteractionSource.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/voice/VoiceRecognitionHandler.java" /> + <issue + id="UseSwitchCompatOrMaterialXml" + message="Use `SwitchCompat` from AppCompat or `SwitchMaterial` from Material library" + errorLine1=" <Switch" + errorLine2=" ^"> + <location + file="$SRC/chrome/browser/ui/android/signin/java/res/layout/fre_uma_dialog.xml" + line="33" + column="13"/> </issue> - <issue id="WrongConstant" message="Must be one of: VoiceIntentTarget.SYSTEM, VoiceIntentTarget.ASSISTANT" errorLine1=" "VoiceInteraction.FinishEventTarget", target, VoiceIntentTarget.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/voice/VoiceRecognitionHandler.java" /> + <issue + id="VectorRaster" + message="Limit vector icons sizes to 200×200 to keep icon drawing fast; see https://developer.android.com/studio/write/vector-asset-studio#when for more" + errorLine1=" android:width="360dp"" + errorLine2=" ~~~~~"> + <location + file="$SRC/chrome/android/java/res/drawable/adaptive_toolbar_preference_header.xml" + line="7" + column="20"/> </issue> - <issue id="WrongConstant" message="Must be one of: VoiceInteractionSource.OMNIBOX, VoiceInteractionSource.NTP, VoiceInteractionSource.SEARCH_WIDGET, VoiceInteractionSource.TASKS_SURFACE, VoiceInteractionSource.TOOLBAR" errorLine1=" VoiceInteractionSource.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/voice/VoiceRecognitionHandler.java" /> + <issue + id="UnsafeOptInUsageError" + message="This declaration is opt-in and its usage should be marked with `@com.google.android.material.badge.ExperimentalBadgeUtils` or `@OptIn(markerClass = com.google.android.material.badge.ExperimentalBadgeUtils.class)`" + errorLine1=" BadgeUtils.detachBadgeDrawable(mBadge, mAnchor);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/sections/SectionHeaderView.java" + line="99" + column="24"/> </issue> - <issue id="WrongConstant" message="Must be one of: VoiceIntentTarget.SYSTEM, VoiceIntentTarget.ASSISTANT" errorLine1=" "VoiceInteraction.DismissedEventTarget", target, VoiceIntentTarget.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/voice/VoiceRecognitionHandler.java" /> + <issue + id="UnsafeOptInUsageError" + message="This declaration is opt-in and its usage should be marked with `@com.google.android.material.badge.ExperimentalBadgeUtils` or `@OptIn(markerClass = com.google.android.material.badge.ExperimentalBadgeUtils.class)`" + errorLine1=" BadgeUtils.detachBadgeDrawable(mBadge, mAnchor);" + errorLine2=" ~~~~~~"> + <location + file="$SRC/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/sections/SectionHeaderView.java" + line="99" + column="44"/> </issue> - <issue id="WrongConstant" message="Must be one of: VoiceInteractionSource.OMNIBOX, VoiceInteractionSource.NTP, VoiceInteractionSource.SEARCH_WIDGET, VoiceInteractionSource.TASKS_SURFACE, VoiceInteractionSource.TOOLBAR" errorLine1=" "VoiceInteraction.FailureEventSource", source, VoiceInteractionSource.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/voice/VoiceRecognitionHandler.java" /> + <issue + id="UnsafeOptInUsageError" + message="This declaration is opt-in and its usage should be marked with `@com.google.android.material.badge.ExperimentalBadgeUtils` or `@OptIn(markerClass = com.google.android.material.badge.ExperimentalBadgeUtils.class)`" + errorLine1=" BadgeUtils.detachBadgeDrawable(mBadge, mAnchor);" + errorLine2=" ~~~~~~~"> + <location + file="$SRC/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/sections/SectionHeaderView.java" + line="99" + column="52"/> </issue> - <issue id="WrongConstant" message="Must be one of: VoiceIntentTarget.SYSTEM, VoiceIntentTarget.ASSISTANT" errorLine1=" "VoiceInteraction.FailureEventTarget", target, VoiceIntentTarget.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/voice/VoiceRecognitionHandler.java" /> + <issue + id="UnsafeOptInUsageError" + message="This declaration is opt-in and its usage should be marked with `@com.google.android.material.badge.ExperimentalBadgeUtils` or `@OptIn(markerClass = com.google.android.material.badge.ExperimentalBadgeUtils.class)`" + errorLine1=" BadgeUtils.attachBadgeDrawable(mBadge, mAnchor);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/sections/SectionHeaderView.java" + line="107" + column="28"/> </issue> - <issue id="WrongConstant" message="Must be one of: VoiceInteractionSource.OMNIBOX, VoiceInteractionSource.NTP, VoiceInteractionSource.SEARCH_WIDGET, VoiceInteractionSource.TASKS_SURFACE, VoiceInteractionSource.TOOLBAR" errorLine1=" VoiceInteractionSource.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/voice/VoiceRecognitionHandler.java" /> + <issue + id="UnsafeOptInUsageError" + message="This declaration is opt-in and its usage should be marked with `@com.google.android.material.badge.ExperimentalBadgeUtils` or `@OptIn(markerClass = com.google.android.material.badge.ExperimentalBadgeUtils.class)`" + errorLine1=" BadgeUtils.attachBadgeDrawable(mBadge, mAnchor);" + errorLine2=" ~~~~~~"> + <location + file="$SRC/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/sections/SectionHeaderView.java" + line="107" + column="48"/> </issue> - <issue id="WrongConstant" message="Must be one of: VoiceIntentTarget.SYSTEM, VoiceIntentTarget.ASSISTANT" errorLine1=" "VoiceInteraction.UnexpectedResultTarget", target, VoiceIntentTarget.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/voice/VoiceRecognitionHandler.java" /> + <issue + id="UnsafeOptInUsageError" + message="This declaration is opt-in and its usage should be marked with `@com.google.android.material.badge.ExperimentalBadgeUtils` or `@OptIn(markerClass = com.google.android.material.badge.ExperimentalBadgeUtils.class)`" + errorLine1=" BadgeUtils.attachBadgeDrawable(mBadge, mAnchor);" + errorLine2=" ~~~~~~~"> + <location + file="$SRC/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/sections/SectionHeaderView.java" + line="107" + column="56"/> </issue> - <issue id="WrongConstant" message="Must be one of: AssistantActionPerformed.UNKNOWN, AssistantActionPerformed.TRANSCRIPTION, AssistantActionPerformed.TRANSLATE, AssistantActionPerformed.READOUT" errorLine1=" AssistantActionPerformed.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/voice/VoiceRecognitionHandler.java" /> + <issue + id="UnsupportedChromeOsCameraSystemFeature" + message="You should look for any camera available on the device, not just the rear" + errorLine1=" return pm.hasSystemFeature(PackageManager.FEATURE_CAMERA)" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/base/android/java/src/org/chromium/base/SysUtils.java" + line="159" + column="16"/> </issue> - <issue id="WrongConstant" message="Must be one of: AudioPermissionState.GRANTED, AudioPermissionState.DENIED_CAN_ASK_AGAIN, AudioPermissionState.DENIED_CANNOT_ASK_AGAIN" errorLine1=" permissionsState, AudioPermissionState.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/voice/VoiceRecognitionHandler.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" IconProvider.getIcon(context, R.drawable.gm_filled_location_on_24)," + errorLine2=" ~~~~~~~"> + <location + file="$SRC/chrome/android/features/keyboard_accessory/internal/java/src/org/chromium/chrome/browser/keyboard_accessory/sheet_tabs/AddressAccessorySheetCoordinator.java" + line="39" + column="30"/> </issue> - <issue id="WrongConstant" message="Must be one of: ChannelId.BROWSER, ChannelId.DOWNLOADS, ChannelId.INCOGNITO, ChannelId.MEDIA_PLAYBACK, ChannelId.SCREEN_CAPTURE, ChannelId.CONTENT_SUGGESTIONS, ChannelId.WEBAPP_ACTIONS, ChannelId.SITES, ChannelId.SHARING, ChannelId.UPDATES, ChannelId.COMPLETED_DOWNLOADS, ChannelId.PERMISSION_REQUESTS, ChannelId.PERMISSION_REQUESTS_HIGH, ChannelId.ANNOUNCEMENT, ChannelId.WEBAPPS, ChannelId.WEBAPPS_QUIET, ChannelId.PRICE_DROP, ChannelId.SECURITY_KEY, ChannelId.CHROME_TIPS, ChannelId.BLUETOOTH, ChannelId.USB" errorLine1=" .createNotificationWrapperBuilder(ChromeChannelDefinitions.ChannelId.VR)" errorLine2=" ~~"> - <location file="chrome/android/features/vr/java/src/org/chromium/chrome/browser/vr/VrFallbackUtils.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" if (mBypassIsReadyToPayServiceInTest) app.bypassIsReadyToPayServiceInTest();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/payments/content/android/java/src/org/chromium/components/payments/AndroidPaymentAppFinder.java" + line="555" + column="55"/> </issue> - <issue id="WrongConstant" message="Must be one of: WebContentsStatus.CREATED, WebContentsStatus.USED, WebContentsStatus.KILLED, WebContentsStatus.DESTROYED, WebContentsStatus.STOLEN" errorLine1=" WEBCONTENTS_STATUS_HISTOGRAM, status, WebContentsStatus.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/WarmupManager.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" mHandler.onOptionsItemSelected(id, mHighlightedItemId != null && mHighlightedItemId == id);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/ui/android/appmenu/internal/java/src/org/chromium/chrome/browser/ui/appmenu/AppMenu.java" + line="392" + column="18"/> </issue> - <issue id="WrongConstant" message="Must be one of: UpdateRequestSent.WHILE_WEBAPK_CLOSED" errorLine1=" HISTOGRAM_UPDATE_REQUEST_SENT, type, UpdateRequestSent.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/android/browserservices/metrics/java/src/org/chromium/chrome/browser/browserservices/metrics/WebApkUmaRecorder.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" .getAuthenticatorNavigationInterceptor();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/tab/AuthenticatorNavigationInterceptorTabHelper.java" + line="19" + column="18"/> </issue> - <issue id="WrongConstant" message="Must be one of: UpdateRequestQueued.ONCE, UpdateRequestQueued.TWICE, UpdateRequestQueued.THREE_TIMES" errorLine1=" HISTOGRAM_UPDATE_REQUEST_QUEUED, times, UpdateRequestQueued.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/android/browserservices/metrics/java/src/org/chromium/chrome/browser/browserservices/metrics/WebApkUmaRecorder.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" CombinedPolicyProvider.get().registerProvider(new AwPolicyProvider(appContext));" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java" + line="155" + column="63"/> </issue> - <issue id="WrongConstant" message="Must be one of: GooglePlayInstallResult.SUCCESS, GooglePlayInstallResult.FAILED_NO_DELEGATE, GooglePlayInstallResult.FAILED_TO_CONNECT_TO_SERVICE, GooglePlayInstallResult.FAILED_CALLER_VERIFICATION_FAILURE, GooglePlayInstallResult.FAILED_POLICY_VIOLATION, GooglePlayInstallResult.FAILED_API_DISABLED, GooglePlayInstallResult.FAILED_REQUEST_FAILED, GooglePlayInstallResult.FAILED_DOWNLOAD_CANCELLED, GooglePlayInstallResult.FAILED_DOWNLOAD_ERROR, GooglePlayInstallResult.FAILED_INSTALL_ERROR, GooglePlayInstallResult.FAILED_INSTALL_TIMEOUT, GooglePlayInstallResult.REQUEST_FAILED_POLICY_DISABLED, GooglePlayInstallResult.REQUEST_FAILED_UNKNOWN_ACCOUNT, GooglePlayInstallResult.REQUEST_FAILED_NETWORK_ERROR, GooglePlayInstallResult.REQUSET_FAILED_RESOLVE_ERROR, GooglePlayInstallResult.REQUEST_FAILED_NOT_GOOGLE_SIGNED" errorLine1=" GooglePlayInstallResult.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/android/browserservices/metrics/java/src/org/chromium/chrome/browser/browserservices/metrics/WebApkUmaRecorder.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" new AwViewAndroidDelegate(mContainerView, mContentsClient, mScrollOffsetManager);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/android_webview/java/src/org/chromium/android_webview/AwContents.java" + line="1490" + column="17"/> </issue> - <issue id="WrongConstant" message="Must be one of: GooglePlayInstallResult.SUCCESS, GooglePlayInstallResult.FAILED_NO_DELEGATE, GooglePlayInstallResult.FAILED_TO_CONNECT_TO_SERVICE, GooglePlayInstallResult.FAILED_CALLER_VERIFICATION_FAILURE, GooglePlayInstallResult.FAILED_POLICY_VIOLATION, GooglePlayInstallResult.FAILED_API_DISABLED, GooglePlayInstallResult.FAILED_REQUEST_FAILED, GooglePlayInstallResult.FAILED_DOWNLOAD_CANCELLED, GooglePlayInstallResult.FAILED_DOWNLOAD_ERROR, GooglePlayInstallResult.FAILED_INSTALL_ERROR, GooglePlayInstallResult.FAILED_INSTALL_TIMEOUT, GooglePlayInstallResult.REQUEST_FAILED_POLICY_DISABLED, GooglePlayInstallResult.REQUEST_FAILED_UNKNOWN_ACCOUNT, GooglePlayInstallResult.REQUEST_FAILED_NETWORK_ERROR, GooglePlayInstallResult.REQUSET_FAILED_RESOLVE_ERROR, GooglePlayInstallResult.REQUEST_FAILED_NOT_GOOGLE_SIGNED" errorLine1=" GooglePlayInstallResult.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/android/browserservices/metrics/java/src/org/chromium/chrome/browser/browserservices/metrics/WebApkUmaRecorder.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" LoadUrlParams params = LoadUrlParams.createLoadHttpPostParams(url, postData);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/android_webview/java/src/org/chromium/android_webview/AwContents.java" + line="2027" + column="46"/> </issue> - <issue id="WrongConstant" message="Must be one of: ThemeSettingsEntry.SETTINGS, ThemeSettingsEntry.AUTO_DARK_MODE_MESSAGE" errorLine1=" ThemeSettingsEntry.AUTO_DARK_MODE_DIALOG);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/browser/ui/android/night_mode/java/src/org/chromium/chrome/browser/night_mode/WebContentsDarkModeMessageController.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" mWebContents.evaluateJavaScriptForTests(script, jsCallback);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/android_webview/java/src/org/chromium/android_webview/AwContents.java" + line="3038" + column="22"/> </issue> - <issue id="WrongConstant" message="Must be one of: InfobarAction.SHOWN, InfobarAction.KEYBOARD_DISMISSED" errorLine1=" "Blink.Sms.Receive.Infobar", action, InfobarAction.NUM_ENTRIES);" errorLine2=" ~~~~~~~~~~~"> - <location file="components/browser_ui/sms/android/java/src/org/chromium/components/browser_ui/sms/WebOTPServiceUma.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" return FindAddress.findAddress(addr);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/android_webview/java/src/org/chromium/android_webview/AwContentsStatics.java" + line="172" + column="28"/> </issue> - <issue id="WrongConstant" message="Must be one of: ApiCall.ADD_JAVASCRIPT_INTERFACE, ApiCall.AUTOFILL, ApiCall.CAN_GO_BACK, ApiCall.CAN_GO_BACK_OR_FORWARD, ApiCall.CAN_GO_FORWARD, ApiCall.CAN_ZOOM_IN, ApiCall.CAN_ZOOM_OUT, ApiCall.CAPTURE_PICTURE, ApiCall.CLEAR_CACHE, ApiCall.CLEAR_FORM_DATA, ApiCall.CLEAR_HISTORY, ApiCall.CLEAR_MATCHES, ApiCall.CLEAR_SSL_PREFERENCES, ApiCall.CLEAR_VIEW, ApiCall.COPY_BACK_FORWARD_LIST, ApiCall.CREATE_PRINT_DOCUMENT_ADAPTER, ApiCall.CREATE_WEBMESSAGE_CHANNEL, ApiCall.DOCUMENT_HAS_IMAGES, ApiCall.DOES_SUPPORT_FULLSCREEN, ApiCall.EVALUATE_JAVASCRIPT, ApiCall.EXTRACT_SMART_CLIP_DATA, ApiCall.FIND_NEXT, ApiCall.GET_CERTIFICATE, ApiCall.GET_CONTENT_HEIGHT, ApiCall.GET_CONTENT_WIDTH, ApiCall.GET_FAVICON, ApiCall.GET_HIT_TEST_RESULT, ApiCall.GET_HTTP_AUTH_USERNAME_PASSWORD, ApiCall.GET_ORIGINAL_URL, ApiCall.GET_PROGRESS, ApiCall.GET_SCALE, ApiCall.GET_SETTINGS, ApiCall.GET_TEXT_CLASSIFIER, ApiCall.GET_TITLE, ApiCall.GET_URL, ApiCall.GET_WEBCHROME_CLIENT, ApiCall.GET_WEBVIEW_CLIENT, ApiCall.GO_BACK, ApiCall.GO_BACK_OR_FORWARD, ApiCall.GO_FORWARD, ApiCall.INSERT_VISUAL_STATE_CALLBACK, ApiCall.INVOKE_ZOOM_PICKER, ApiCall.IS_PAUSED, ApiCall.IS_PRIVATE_BROWSING_ENABLED, ApiCall.LOAD_DATA, ApiCall.LOAD_DATA_WITH_BASE_URL, ApiCall.NOTIFY_FIND_DIALOG_DISMISSED, ApiCall.ON_PAUSE, ApiCall.ON_PROVIDE_AUTOFILL_VIRTUAL_STRUCTURE, ApiCall.ON_RESUME, ApiCall.OVERLAY_HORIZONTAL_SCROLLBAR, ApiCall.OVERLAY_VERTICAL_SCROLLBAR, ApiCall.PAGE_DOWN, ApiCall.PAGE_UP, ApiCall.PAUSE_TIMERS, ApiCall.POST_MESSAGE_TO_MAIN_FRAME, ApiCall.POST_URL, ApiCall.RELOAD, ApiCall.REMOVE_JAVASCRIPT_INTERFACE, ApiCall.REQUEST_FOCUS_NODE_HREF, ApiCall.REQUEST_IMAGE_REF, ApiCall.RESTORE_STATE, ApiCall.RESUME_TIMERS, ApiCall.SAVE_STATE, ApiCall.SET_DOWNLOAD_LISTENER, ApiCall.SET_FIND_LISTENER, ApiCall.SET_HORIZONTAL_SCROLLBAR_OVERLAY, ApiCall.SET_HTTP_AUTH_USERNAME_PASSWORD, ApiCall.SET_INITIAL_SCALE, ApiCall.SET_NETWORK_AVAILABLE, ApiCall.SET_PICTURE_LISTENER, ApiCall.SET_SMART_CLIP_RESULT_HANDLER, ApiCall.SET_TEXT_CLASSIFIER, ApiCall.SET_VERTICAL_SCROLLBAR_OVERLAY, ApiCall.SET_WEBCHROME_CLIENT, ApiCall.SET_WEBVIEW_CLIENT, ApiCall.SHOW_FIND_DIALOG, ApiCall.STOP_LOADING" errorLine1=" RecordHistogram.recordEnumeratedHistogram("Android.WebView.ApiCall", sample, ApiCall.COUNT);" errorLine2=" ~~~~~"> - <location file="android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1="class AwWebContentsDelegateAdapter extends AwWebContentsDelegate {" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java" + line="36" + column="44"/> </issue> - <issue id="WrongConstant" message="Must be one of: WebViewInitType.SYNC, WebViewInitType.ASYNC, WebViewInitType.BOTH" errorLine1=" "Android.WebView.Startup.InitType", type, WebViewInitType.COUNT);" errorLine2=" ~~~~~"> - <location file="android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumAwInit.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" if (mAwContents.getNavigationController() == null) return;" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java" + line="190" + column="33"/> </issue> - <issue id="WrongConstant" message="Must be one of: SafeModeExecutionResult.SUCCESS, SafeModeExecutionResult.UNKNOWN_ERROR, SafeModeExecutionResult.ACTION_FAILED" errorLine1=" "Android.WebView.SafeMode.ExecutionResult", result, SafeModeExecutionResult.COUNT);" errorLine2=" ~~~~~"> - <location file="android_webview/glue/java/src/com/android/webview/chromium/WebViewChromiumFactoryProvider.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" mAwContents.getNavigationController().continuePendingReload();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java" + line="194" + column="37"/> </issue> - <issue id="UseSwitchCompatOrMaterialCode" message="Use `SwitchCompat` from AppCompat or `SwitchMaterial` from Material library" errorLine1=" final Switch umaSwitch = mView.findViewById(R.id.fre_uma_dialog_switch);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/browser/ui/android/signin/java/src/org/chromium/chrome/browser/ui/signin/fre/FreUMADialogCoordinator.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" mAwContents.getNavigationController().cancelPendingReload();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java" + line="198" + column="37"/> </issue> - <issue id="UseSwitchCompatOrMaterialXml" message="Use `SwitchCompat` from AppCompat or `SwitchMaterial` from Material library" errorLine1=" <Switch" errorLine2=" ^"> - <location file="chrome/browser/ui/android/signin/java/res/layout/fre_uma_dialog.xml" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" AwWebContentsDelegateJni.get().filesSelectedInChooser(" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java" + line="229" + column="52"/> </issue> - <issue id="VectorRaster" message="Limit vector icons sizes to 200×200 to keep icon drawing fast; see https://developer.android.com/studio/write/vector-asset-studio#when for more" errorLine1=" android:width="360dp"" errorLine2=" ~~~~~"> - <location file="chrome/android/java/res/drawable/adaptive_toolbar_preference_header.xml" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" AwWebContentsDelegateJni.get().filesSelectedInChooser(" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java" + line="369" + column="44"/> </issue> - <issue id="UnsafeOptInUsageError" message="This declaration is opt-in and its usage should be marked with `@com.google.android.material.badge.ExperimentalBadgeUtils` or `@OptIn(markerClass = com.google.android.material.badge.ExperimentalBadgeUtils.class)`" errorLine1=" BadgeUtils.detachBadgeDrawable(mBadge, mAnchor);" errorLine2=" ~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/sections/SectionHeaderView.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" 0, new VisualStateCallback() {" + errorLine2=" ~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/android_webview/java/src/org/chromium/android_webview/AwWebContentsObserver.java" + line="158" + column="36"/> </issue> - <issue id="UnsafeOptInUsageError" message="This declaration is opt-in and its usage should be marked with `@com.google.android.material.badge.ExperimentalBadgeUtils` or `@OptIn(markerClass = com.google.android.material.badge.ExperimentalBadgeUtils.class)`" errorLine1=" BadgeUtils.attachBadgeDrawable(mBadge, mAnchor);" errorLine2=" ~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/sections/SectionHeaderView.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" int playerState = mediaStatus.getPlayerState();" + errorLine2=" ~~~~~~~~~~~~~~"> + <location + file="$SRC/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/BaseNotificationController.java" + line="69" + column="39"/> </issue> - <issue id="UnsupportedChromeOsCameraSystemFeature" message="You should look for any camera available on the device, not just the rear" errorLine1=" return pm.hasSystemFeature(PackageManager.FEATURE_CAMERA)" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="base/android/java/src/org/chromium/base/SysUtils.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" if (playerState == MediaStatus.PLAYER_STATE_PAUSED" + errorLine2=" ~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/BaseNotificationController.java" + line="70" + column="40"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" IconProvider.getIcon(context, R.drawable.gm_filled_location_on_24)," errorLine2=" ~~~~~~~"> - <location file="chrome/android/features/keyboard_accessory/internal/java/src/org/chromium/chrome/browser/keyboard_accessory/sheet_tabs/AddressAccessorySheetCoordinator.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" || playerState == MediaStatus.PLAYER_STATE_PLAYING) {" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/BaseNotificationController.java" + line="71" + column="47"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" IconProvider.getIcon(context, R.drawable.gm_filled_location_on_24)," errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/features/keyboard_accessory/internal/java/src/org/chromium/chrome/browser/keyboard_accessory/sheet_tabs/AddressAccessorySheetCoordinator.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" mNotificationBuilder.setPaused(playerState != MediaStatus.PLAYER_STATE_PLAYING);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/BaseNotificationController.java" + line="72" + column="71"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" if (mBypassIsReadyToPayServiceInTest) app.bypassIsReadyToPayServiceInTest();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/payments/content/android/java/src/org/chromium/components/payments/AndroidPaymentAppFinder.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" && mOverlayPanelManager.get().getActivePanel() != null) {" + errorLine2=" ~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/ui/BottomSheetManager.java" + line="312" + column="47"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" mHandler.onOptionsItemSelected(id, mHighlightedItemId != null && mHighlightedItemId == id);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/browser/ui/android/appmenu/internal/java/src/org/chromium/chrome/browser/ui/appmenu/AppMenu.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" mOverlayPanelManager.get().getActivePanel().closePanel(" + errorLine2=" ~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/ui/BottomSheetManager.java" + line="313" + column="40"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" .getAuthenticatorNavigationInterceptor();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/tab/AuthenticatorNavigationInterceptorTabHelper.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" BrowserImplJni.get().addTab(mNativeBrowser, tab.getNativeTab());" + errorLine2=" ~~~~~~~~~~~~"> + <location + file="$SRC/weblayer/browser/java/org/chromium/weblayer_private/BrowserImpl.java" + line="359" + column="57"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" CombinedPolicyProvider.get().registerProvider(new AwPolicyProvider(appContext));" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="android_webview/java/src/org/chromium/android_webview/AwBrowserProcess.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" BrowserImplJni.get().setActiveTab(mNativeBrowser, tab != null ? tab.getNativeTab() : 0);" + errorLine2=" ~~~~~~~~~~~~"> + <location + file="$SRC/weblayer/browser/java/org/chromium/weblayer_private/BrowserImpl.java" + line="454" + column="77"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" new AwViewAndroidDelegate(mContainerView, mContentsClient, mScrollOffsetManager);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="android_webview/java/src/org/chromium/android_webview/AwContents.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" return new CastOptions.Builder()" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/CastOptionsProvider.java" + line="20" + column="16"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" LoadUrlParams params = LoadUrlParams.createLoadHttpPostParams(url, postData);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="android_webview/java/src/org/chromium/android_webview/AwContents.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" .setCastMediaOptions(null)" + errorLine2=" ~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/CastOptionsProvider.java" + line="21" + column="18"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" mWebContents.evaluateJavaScriptForTests(script, jsCallback);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="android_webview/java/src/org/chromium/android_webview/AwContents.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" .setEnableReconnectionService(false)" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/CastOptionsProvider.java" + line="22" + column="18"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" return FindAddress.findAddress(addr);" errorLine2=" ~~~~~~~~~~~"> - <location file="android_webview/java/src/org/chromium/android_webview/AwContentsStatics.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" .setLaunchOptions(new LaunchOptions.Builder().setRelaunchIfRunning(true).build())" + errorLine2=" ~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/CastOptionsProvider.java" + line="23" + column="18"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1="class AwWebContentsDelegateAdapter extends AwWebContentsDelegate {" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> - <location file="android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" .setLaunchOptions(new LaunchOptions.Builder().setRelaunchIfRunning(true).build())" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/CastOptionsProvider.java" + line="23" + column="35"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" if (mAwContents.getNavigationController() == null) return;" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" .setLaunchOptions(new LaunchOptions.Builder().setRelaunchIfRunning(true).build())" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/CastOptionsProvider.java" + line="23" + column="63"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" mAwContents.getNavigationController().continuePendingReload();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" .setLaunchOptions(new LaunchOptions.Builder().setRelaunchIfRunning(true).build())" + errorLine2=" ~~~~~"> + <location + file="$SRC/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/CastOptionsProvider.java" + line="23" + column="90"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" mAwContents.getNavigationController().cancelPendingReload();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" .setResumeSavedSession(false)" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/CastOptionsProvider.java" + line="24" + column="18"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" AwWebContentsDelegateJni.get().filesSelectedInChooser(" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> - <location file="android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" .setStopReceiverApplicationWhenEndingSession(true)" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/CastOptionsProvider.java" + line="25" + column="18"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" AwWebContentsDelegateJni.get().filesSelectedInChooser(" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> - <location file="android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" .build();" + errorLine2=" ~~~~~"> + <location + file="$SRC/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/CastOptionsProvider.java" + line="26" + column="18"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" 0, new VisualStateCallback() {" errorLine2=" ~~~~~~~~~~~~~~~~~~~"> - <location file="android_webview/java/src/org/chromium/android_webview/AwWebContentsObserver.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" IntentHandler.setTestIntentsEnabled(" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java" + line="927" + column="23"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" && mOverlayPanelManager.get().getActivePanel() != null) {" errorLine2=" ~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/ui/BottomSheetManager.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" DownloadManagerService.getDownloadManagerService().onDownloadFailed(downloadItem, reason);" + errorLine2=" ~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/download/ChromeDownloadDelegate.java" + line="184" + column="60"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" mOverlayPanelManager.get().getActivePanel().closePanel(" errorLine2=" ~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/ui/BottomSheetManager.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" mOverviewListLayout = (OverviewListLayout) mLayoutManager.getOverviewListLayout();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java" + line="965" + column="71"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" BrowserImplJni.get().addTab(mNativeBrowser, tab.getNativeTab());" errorLine2=" ~~~~~~~~~~~~"> - <location file="weblayer/browser/java/org/chromium/weblayer_private/BrowserImpl.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" IconProvider.getIcon(context, R.drawable.infobar_autofill_cc)," + errorLine2=" ~~~~~~~"> + <location + file="$SRC/chrome/android/features/keyboard_accessory/internal/java/src/org/chromium/chrome/browser/keyboard_accessory/sheet_tabs/CreditCardAccessorySheetCoordinator.java" + line="37" + column="30"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" BrowserImplJni.get().setActiveTab(mNativeBrowser, tab != null ? tab.getNativeTab() : 0);" errorLine2=" ~~~~~~~~~~~~"> - <location file="weblayer/browser/java/org/chromium/weblayer_private/BrowserImpl.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" mConnection.cleanUpSession(sessionToken);" + errorLine2=" ~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnectionServiceImpl.java" + line="104" + column="21"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" IntentHandler.setTestIntentsEnabled(" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/app/ChromeActivity.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" mDownloadNotificationService.notifyDownloadPaused(entry.id, entry.fileName," + errorLine2=" ~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadBroadcastManagerImpl.java" + line="139" + column="50"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" DownloadManagerService.getDownloadManagerService().onDownloadFailed(downloadItem, reason);" errorLine2=" ~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/download/ChromeDownloadDelegate.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" mDownloadNotificationService.notifyDownloadCanceled(" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadBroadcastManagerImpl.java" + line="153" + column="50"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" mOverviewListLayout = (OverviewListLayout) mLayoutManager.getOverviewListLayout();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" Set<String> entries = DownloadManagerService.getStoredDownloadInfo(" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSharedPreferenceHelper.java" + line="134" + column="54"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" IconProvider.getIcon(context, R.drawable.infobar_autofill_cc)," errorLine2=" ~~~~~~~"> - <location file="chrome/android/features/keyboard_accessory/internal/java/src/org/chromium/chrome/browser/keyboard_accessory/sheet_tabs/CreditCardAccessorySheetCoordinator.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" private static final Api.ClientKey<FidoClient> APP_CLIENT_KEY = new Api.ClientKey<>();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/webauthn/android/java/src/org/chromium/components/webauthn/Fido2ApiCall.java" + line="94" + column="69"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" IconProvider.getIcon(context, R.drawable.infobar_autofill_cc)," errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/features/keyboard_accessory/internal/java/src/org/chromium/chrome/browser/keyboard_accessory/sheet_tabs/CreditCardAccessorySheetCoordinator.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" private static final Api.ClientKey<FidoClient> BROWSER_CLIENT_KEY = new Api.ClientKey<>();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/webauthn/android/java/src/org/chromium/components/webauthn/Fido2ApiCall.java" + line="106" + column="73"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" mConnection.cleanUpSession(sessionToken);" errorLine2=" ~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/customtabs/CustomTabsConnectionServiceImpl.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" extends Api.AbstractClientBuilder<FidoClient, ApiOptions.NoOptions> {" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/webauthn/android/java/src/org/chromium/components/webauthn/Fido2ApiCall.java" + line="344" + column="25"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" mDownloadNotificationService.notifyDownloadPaused(entry.id, entry.fileName," errorLine2=" ~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/download/DownloadBroadcastManagerImpl.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" MediaInfo mediaInfo = new MediaInfo.Builder(mMediaUrl)" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/remoting/FlingingControllerAdapter.java" + line="75" + column="31"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" mDownloadNotificationService.notifyDownloadCanceled(" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/download/DownloadBroadcastManagerImpl.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" .setContentType("*/*")" + errorLine2=" ~~~~~~~~~~~~~~"> + <location + file="$SRC/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/remoting/FlingingControllerAdapter.java" + line="76" + column="40"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" Set<String> entries = DownloadManagerService.getStoredDownloadInfo(" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/download/DownloadSharedPreferenceHelper.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" .setStreamType(MediaInfo.STREAM_TYPE_BUFFERED)" + errorLine2=" ~~~~~~~~~~~~~"> + <location + file="$SRC/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/remoting/FlingingControllerAdapter.java" + line="77" + column="40"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" ImageFetcher.resizeImage(bitmap, params.width, params.height));" errorLine2=" ~~~~~~~~~~~"> - <location file="components/image_fetcher/android/java/src/org/chromium/components/image_fetcher/ImageFetcherBridge.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" .build();" + errorLine2=" ~~~~~"> + <location + file="$SRC/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/remoting/FlingingControllerAdapter.java" + line="78" + column="40"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" IncognitoNotificationServiceImpl.getRemoveAllIncognitoTabsIntent(" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/incognito/IncognitoNotificationManager.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" if (mediaStatus.getPlayerState() == MediaStatus.PLAYER_STATE_IDLE" + errorLine2=" ~~~~~~~~~~~~~~"> + <location + file="$SRC/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/remoting/FlingingControllerAdapter.java" + line="146" + column="29"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" ClickableSpan[] spans = getClickableSpans();" errorLine2=" ~~~~~~~~~~~~~~~~~"> - <location file="components/infobars/android/java/src/org/chromium/components/infobars/InfoBarMessageView.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" if (mediaStatus.getPlayerState() == MediaStatus.PLAYER_STATE_IDLE" + errorLine2=" ~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/remoting/FlingingControllerAdapter.java" + line="146" + column="61"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" assert mExternalNavHandler.canExternalAppHandleUrl(url);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/external_intents/android/java/src/org/chromium/components/external_intents/InterceptNavigationDelegateImpl.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" && mediaStatus.getIdleReason() == MediaStatus.IDLE_REASON_FINISHED) {" + errorLine2=" ~~~~~~~~~~~~~"> + <location + file="$SRC/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/remoting/FlingingControllerAdapter.java" + line="147" + column="36"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" int resId = mExternalNavHandler.canExternalAppHandleUrl(url)" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/external_intents/android/java/src/org/chromium/components/external_intents/InterceptNavigationDelegateImpl.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" && mediaStatus.getIdleReason() == MediaStatus.IDLE_REASON_FINISHED) {" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/remoting/FlingingControllerAdapter.java" + line="147" + column="67"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" } else if (animationsEnabled() && !hasExplicitNextLayout()) {" errorLine2=" ~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerChromePhone.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" remoteMediaClient.isPlaying(), mediaStatus.getPlaybackRate());" + errorLine2=" ~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/media_router/browser/android/java/src/org/chromium/components/media_router/caf/remoting/FlingingControllerAdapter.java" + line="153" + column="68"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" boolean animate = !tabRemoved && animationsEnabled();" errorLine2=" ~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerChromePhone.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" ImageFetcher.resizeImage(bitmap, params.width, params.height));" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/components/image_fetcher/android/java/src/org/chromium/components/image_fetcher/ImageFetcherBridge.java" + line="96" + column="42"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" } else if (animationsEnabled()) {" errorLine2=" ~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerChromePhone.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" IncognitoNotificationServiceImpl.getRemoveAllIncognitoTabsIntent(" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/incognito/IncognitoNotificationManager.java" + line="55" + column="66"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" ((ChromeTabbedActivity) activity).saveState();" errorLine2=" ~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManager.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" ClickableSpan[] spans = getClickableSpans();" + errorLine2=" ~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/infobars/android/java/src/org/chromium/components/infobars/InfoBarMessageView.java" + line="39" + column="37"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" NavigationControllerImplJni.get().getNavigationController(tab.getNativeTab());" errorLine2=" ~~~~~~~~~~~~"> - <location file="weblayer/browser/java/org/chromium/weblayer_private/NavigationControllerImpl.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" assert mExternalNavHandler.canExternalAppHandleUrl(url);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/external_intents/android/java/src/org/chromium/components/external_intents/InterceptNavigationDelegateImpl.java" + line="169" + column="44"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" NewTabCallbackProxyJni.get().createNewTabCallbackProxy(this, tab.getNativeTab());" errorLine2=" ~~~~~~~~~~~~"> - <location file="weblayer/browser/java/org/chromium/weblayer_private/NewTabCallbackProxy.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" int resId = mExternalNavHandler.canExternalAppHandleUrl(url)" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/external_intents/android/java/src/org/chromium/components/external_intents/InterceptNavigationDelegateImpl.java" + line="333" + column="41"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" return DownloadManagerService.getStoredDownloadInfo(sharedPrefs, type);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/download/OMADownloadHandler.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" } else if (animationsEnabled() && !hasExplicitNextLayout()) {" + errorLine2=" ~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerChromePhone.java" + line="108" + column="20"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" return VersionNumberGetter.getInstance().getCurrentlyUsedVersion(getContext());" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaBase.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" boolean animate = !tabRemoved && animationsEnabled();" + errorLine2=" ~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerChromePhone.java" + line="129" + column="42"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" String appId = getRequestGenerator().getAppId();" errorLine2=" ~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaBase.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" } else if (animationsEnabled()) {" + errorLine2=" ~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerChromePhone.java" + line="143" + column="20"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" mContent.destroy();" errorLine2=" ~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanel.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" return mStatus.getPlayerState();" + errorLine2=" ~~~~~~~~~~~~~~"> + <location + file="$SRC/components/media_router/browser/android/java/src/org/chromium/components/media_router/MediaStatusBridge.java" + line="37" + column="24"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" IconProvider.getIcon(context, R.drawable.ic_vpn_key_grey)," errorLine2=" ~~~~~~~"> - <location file="chrome/android/features/keyboard_accessory/internal/java/src/org/chromium/chrome/browser/keyboard_accessory/sheet_tabs/PasswordAccessorySheetCoordinator.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" return mStatus.getIdleReason();" + errorLine2=" ~~~~~~~~~~~~~"> + <location + file="$SRC/components/media_router/browser/android/java/src/org/chromium/components/media_router/MediaStatusBridge.java" + line="51" + column="24"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" IconProvider.getIcon(context, R.drawable.ic_vpn_key_grey)," errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/features/keyboard_accessory/internal/java/src/org/chromium/chrome/browser/keyboard_accessory/sheet_tabs/PasswordAccessorySheetCoordinator.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" MediaInfo info = mStatus.getMediaInfo();" + errorLine2=" ~~~~~~~~~~~~"> + <location + file="$SRC/components/media_router/browser/android/java/src/org/chromium/components/media_router/MediaStatusBridge.java" + line="60" + column="34"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" getTab().setIcon(IconProvider.getIcon(" errorLine2=" ~~~~~~~"> - <location file="chrome/android/features/keyboard_accessory/internal/java/src/org/chromium/chrome/browser/keyboard_accessory/sheet_tabs/PasswordAccessorySheetCoordinator.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" return mStatus.isMediaCommandSupported(MediaStatus.COMMAND_PAUSE);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/media_router/browser/android/java/src/org/chromium/components/media_router/MediaStatusBridge.java" + line="74" + column="24"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" mContext, enabled ? R.drawable.ic_vpn_key_grey : R.drawable.ic_vpn_key_off));" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/features/keyboard_accessory/internal/java/src/org/chromium/chrome/browser/keyboard_accessory/sheet_tabs/PasswordAccessorySheetCoordinator.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" return mStatus.isMediaCommandSupported(MediaStatus.COMMAND_PAUSE);" + errorLine2=" ~~~~~~~~~~~~~"> + <location + file="$SRC/components/media_router/browser/android/java/src/org/chromium/components/media_router/MediaStatusBridge.java" + line="74" + column="60"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" String distillerUrl = DomDistillerUrlUtils.getDistillerViewUrlFromUrl(" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/ReaderModeManager.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" return mStatus.isMediaCommandSupported(MediaStatus.COMMAND_TOGGLE_MUTE);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/media_router/browser/android/java/src/org/chromium/components/media_router/MediaStatusBridge.java" + line="82" + column="24"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" new SettingsSecureBasedIdentificationGenerator(getContext()), false);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/omaha/RequestGenerator.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" return mStatus.isMediaCommandSupported(MediaStatus.COMMAND_TOGGLE_MUTE);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/media_router/browser/android/java/src/org/chromium/components/media_router/MediaStatusBridge.java" + line="82" + column="60"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" new SettingsSecureBasedIdentificationGenerator(ContextUtils.getApplicationContext())" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/rlz/RlzPingHandler.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" return mStatus.isMediaCommandSupported(MediaStatus.COMMAND_SET_VOLUME);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/media_router/browser/android/java/src/org/chromium/components/media_router/MediaStatusBridge.java" + line="90" + column="24"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" mSearchBox.beginQuery(searchType, getOptionalIntentQuery()," errorLine2=" ~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivity.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" return mStatus.isMediaCommandSupported(MediaStatus.COMMAND_SET_VOLUME);" + errorLine2=" ~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/media_router/browser/android/java/src/org/chromium/components/media_router/MediaStatusBridge.java" + line="90" + column="60"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" Intent intent = getShareLinkIntent(params);" errorLine2=" ~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/share/ShareHelper.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" return mStatus.isMediaCommandSupported(MediaStatus.COMMAND_SEEK);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/media_router/browser/android/java/src/org/chromium/components/media_router/MediaStatusBridge.java" + line="98" + column="24"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" ShareHelper.setLastShareComponentName(mProfile, component);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/share_sheet/ShareSheetPropertyModelBuilder.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" return mStatus.isMediaCommandSupported(MediaStatus.COMMAND_SEEK);" + errorLine2=" ~~~~~~~~~~~~"> + <location + file="$SRC/components/media_router/browser/android/java/src/org/chromium/components/media_router/MediaStatusBridge.java" + line="98" + column="60"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within package private scope" errorLine1=" SigninPreferencesManager.getInstance().setNewTabPageSigninPromoSuppressionPeriodStart(" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SignInPromo.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" return mStatus.isMute();" + errorLine2=" ~~~~~~"> + <location + file="$SRC/components/media_router/browser/android/java/src/org/chromium/components/media_router/MediaStatusBridge.java" + line="106" + column="24"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within package private scope" errorLine1=" .getNewTabPageSigninPromoSuppressionPeriodStart();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SignInPromo.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" return mStatus.getStreamVolume();" + errorLine2=" ~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/media_router/browser/android/java/src/org/chromium/components/media_router/MediaStatusBridge.java" + line="116" + column="24"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within package private scope" errorLine1=" SigninPreferencesManager.getInstance().clearNewTabPageSigninPromoSuppressionPeriodStart();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SignInPromo.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" MediaInfo info = mStatus.getMediaInfo();" + errorLine2=" ~~~~~~~~~~~~"> + <location + file="$SRC/components/media_router/browser/android/java/src/org/chromium/components/media_router/MediaStatusBridge.java" + line="125" + column="34"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" && clickedTab.getVisiblePercentage() >= 1.f" errorLine2=" ~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelper.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" return mStatus.getStreamPosition();" + errorLine2=" ~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/media_router/browser/android/java/src/org/chromium/components/media_router/MediaStatusBridge.java" + line="136" + column="24"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" requestId, new AwContents.VisualStateCallback() {" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="android_webview/support_library/java/src/org/chromium/support_lib_glue/SupportLibWebViewChromium.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" ((ChromeTabbedActivity) activity).saveState();" + errorLine2=" ~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManager.java" + line="428" + column="55"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" getDownloadNotificationService().notifyDownloadCanceled(id, false);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/download/SystemDownloadNotifier.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" NavigationControllerImplJni.get().getNavigationController(tab.getNativeTab());" + errorLine2=" ~~~~~~~~~~~~"> + <location + file="$SRC/weblayer/browser/java/org/chromium/weblayer_private/NavigationControllerImpl.java" + line="42" + column="79"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" getDownloadNotificationService().notifyDownloadProgress(info.getContentId()," errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/download/SystemDownloadNotifier.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" NewTabCallbackProxyJni.get().createNewTabCallbackProxy(this, tab.getNativeTab());" + errorLine2=" ~~~~~~~~~~~~"> + <location + file="$SRC/weblayer/browser/java/org/chromium/weblayer_private/NewTabCallbackProxy.java" + line="26" + column="82"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" getDownloadNotificationService().notifyDownloadPaused(info.getContentId()," errorLine2=" ~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/download/SystemDownloadNotifier.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" return DownloadManagerService.getStoredDownloadInfo(sharedPrefs, type);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/download/OMADownloadHandler.java" + line="922" + column="39"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" getDownloadNotificationService().notifyDownloadSuccessful(" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/download/SystemDownloadNotifier.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" return VersionNumberGetter.getInstance().getCurrentlyUsedVersion(getContext());" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaBase.java" + line="322" + column="36"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" getDownloadNotificationService().notifyDownloadFailed(info.getContentId()," errorLine2=" ~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/download/SystemDownloadNotifier.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" String appId = getRequestGenerator().getAppId();" + errorLine2=" ~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/omaha/OmahaBase.java" + line="350" + column="50"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" getDownloadNotificationService().notifyDownloadPaused(info.getContentId()," errorLine2=" ~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/download/SystemDownloadNotifier.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" mContent.destroy();" + errorLine2=" ~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanel.java" + line="549" + column="22"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" != mTabSwitcherAnimationTabStackDrawable.getTabCount();" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarPhone.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" IconProvider.getIcon(context, R.drawable.ic_vpn_key_grey)," + errorLine2=" ~~~~~~~"> + <location + file="$SRC/chrome/android/features/keyboard_accessory/internal/java/src/org/chromium/chrome/browser/keyboard_accessory/sheet_tabs/PasswordAccessorySheetCoordinator.java" + line="43" + column="30"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" return mToolbarLayout.getLocationBar();" errorLine2=" ~~~~~~~~~~~~~~"> - <location file="chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/TopToolbarCoordinator.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" getTab().setIcon(IconProvider.getIcon(" + errorLine2=" ~~~~~~~"> + <location + file="$SRC/chrome/android/features/keyboard_accessory/internal/java/src/org/chromium/chrome/browser/keyboard_accessory/sheet_tabs/PasswordAccessorySheetCoordinator.java" + line="66" + column="39"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" VersionNumberGetter.getInstance().getLatestKnownVersion(context);" errorLine2=" ~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateStatusProvider.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" String distillerUrl = DomDistillerUrlUtils.getDistillerViewUrlFromUrl(" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/ReaderModeManager.java" + line="642" + column="52"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" requestId, callback == null ? null : new AwContents.VisualStateCallback() {" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" new SettingsSecureBasedIdentificationGenerator(getContext()), false);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/omaha/RequestGenerator.java" + line="45" + column="17"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" mAwContents.getWebContents()));" errorLine2=" ~~~~~~~~~~~~~~"> - <location file="android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" new SettingsSecureBasedIdentificationGenerator(ContextUtils.getApplicationContext())" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/rlz/RlzPingHandler.java" + line="40" + column="17"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" list.add(new StorageInfo(host, type, size));" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/WebsitePreferenceBridge.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" mSearchBox.beginQuery(searchType, getOptionalIntentQuery()," + errorLine2=" ~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/searchwidget/SearchActivity.java" + line="405" + column="20"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" .put(origin, new LocalStorageInfo(origin, size, important));" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/WebsitePreferenceBridge.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" Intent intent = getShareLinkIntent(params);" + errorLine2=" ~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/share/ShareHelper.java" + line="63" + column="25"/> </issue> - <issue id="VisibleForTests" message="This method should only be accessed from tests or within private scope" errorLine1=" list.add(new ChosenObjectInfo(contentSettingsType, origin, name, object, isManaged));" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/WebsitePreferenceBridge.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" ShareHelper.setLastShareComponentName(mProfile, component);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/share_sheet/ShareSheetPropertyModelBuilder.java" + line="233" + column="25"/> </issue> - <issue id="Deprecated" message="Job scheduling with `GcmNetworkManager` is deprecated: Use AndroidX `WorkManager` instead" errorLine1=" return GcmNetworkManager.getInstance(context);" errorLine2=" ~~~~~~~~~~~"> - <location file="components/background_task_scheduler/internal/android/java/src/org/chromium/components/background_task_scheduler/internal/BackgroundTaskSchedulerGcmNetworkManager.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within package private scope" + errorLine1=" SigninPreferencesManager.getInstance().setNewTabPageSigninPromoSuppressionPeriodStart(" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SignInPromo.java" + line="87" + column="48"/> </issue> - <issue id="UseAppTint" message="Must use `app:tint` instead of `android:tint`" errorLine1=" android:tint="@macro/drag_handlebar_color" />" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/res/layout/custom_tabs_handle_view.xml" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within package private scope" + errorLine1=" .getNewTabPageSigninPromoSuppressionPeriodStart();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SignInPromo.java" + line="103" + column="40"/> </issue> - <issue id="UseAppTint" message="Must use `app:tint` instead of `android:tint`" errorLine1=" android:tint="@macro/checked_item"" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/browser/ui/android/multiwindow/java/res/layout/instance_switcher_item.xml" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within package private scope" + errorLine1=" SigninPreferencesManager.getInstance().clearNewTabPageSigninPromoSuppressionPeriodStart();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/ntp/cards/SignInPromo.java" + line="110" + column="48"/> </issue> - <issue id="UseAppTint" message="Must use `app:tint` instead of `android:tint`" errorLine1=" android:tint="@color/photo_picker_tile_bg_color" />" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/photo_picker/android/java/res/layout/photo_picker_bitmap_view.xml" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" && clickedTab.getVisiblePercentage() >= 1.f" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelper.java" + line="983" + column="31"/> </issue> - <issue id="UseAppTint" message="Must use `app:tint` instead of `android:tint`" errorLine1=" android:tint="@color/default_icon_color_baseline"" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/res/layout/search_widget_template.xml" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" requestId, new AwContents.VisualStateCallback() {" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/android_webview/support_library/java/src/org/chromium/support_lib_glue/SupportLibWebViewChromium.java" + line="50" + column="32"/> </issue> - <issue id="UseCompatLoadingForDrawables" message="Use `ResourcesCompat.getDrawable()`" errorLine1=" return res.getDrawable(id, null);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" getDownloadNotificationService().notifyDownloadCanceled(id, false);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/download/SystemDownloadNotifier.java" + line="87" + column="42"/> </issue> - <issue id="UseCompatLoadingForDrawables" message="Use `AppCompatResources.getDrawable()`" errorLine1=" Drawable mInlineTitleIcon = context.getDrawable(mGooglePayDrawableId);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/autofill/CardUnmaskPrompt.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" getDownloadNotificationService().notifyDownloadProgress(info.getContentId()," + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/download/SystemDownloadNotifier.java" + line="173" + column="50"/> </issue> - <issue id="UseCompatLoadingForDrawables" message="Use `AppCompatResources.getDrawable()`" errorLine1=" iconDrawable = mContext.getDrawable(iconResId);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchQuickActionControl.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" getDownloadNotificationService().notifyDownloadPaused(info.getContentId()," + errorLine2=" ~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/download/SystemDownloadNotifier.java" + line="181" + column="50"/> </issue> - <issue id="UseCompatLoadingForDrawables" message="Use `AppCompatResources.getDrawable()`" errorLine1=" Drawable clearTextIcon = getContext().getDrawable(R.drawable.ic_clear_text);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="android_webview/nonembedded/java/src/org/chromium/android_webview/devui/FlagsFragment.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" getDownloadNotificationService().notifyDownloadSuccessful(" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/download/SystemDownloadNotifier.java" + line="188" + column="58"/> </issue> - <issue id="UseCompatLoadingForDrawables" message="Use `AppCompatResources.getDrawable()`" errorLine1=" final Drawable statusIcon = mContext.getDrawable(R.drawable.ic_cloud_offline_24dp);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/offlinepages/indicator/OfflineIndicatorControllerV2.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" getDownloadNotificationService().notifyDownloadFailed(info.getContentId()," + errorLine2=" ~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/download/SystemDownloadNotifier.java" + line="203" + column="50"/> </issue> - <issue id="UseCompatLoadingForDrawables" message="Use `AppCompatResources.getDrawable()`" errorLine1=" final Drawable statusIcon = mContext.getDrawable(R.drawable.ic_globe_24dp);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/offlinepages/indicator/OfflineIndicatorControllerV2.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" getDownloadNotificationService().notifyDownloadPaused(info.getContentId()," + errorLine2=" ~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/download/SystemDownloadNotifier.java" + line="208" + column="50"/> </issue> - <issue id="UseCompatLoadingForDrawables" message="Use `AppCompatResources.getDrawable()`" errorLine1=" Drawable drawable = context.getDrawable(R.drawable.toolbar_hairline);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabListRecyclerView.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" != mTabSwitcherAnimationTabStackDrawable.getTabCount();" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarPhone.java" + line="1605" + column="74"/> </issue> - <issue id="UseCompatLoadingForDrawables" message="Use `AppCompatResources.getDrawable()`" errorLine1=" Drawable drawable = context.getDrawable(" errorLine2=" ^"> - <location file="chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarPhone.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" return mToolbarLayout.getLocationBar();" + errorLine2=" ~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/TopToolbarCoordinator.java" + line="645" + column="31"/> </issue> - <issue id="UseCompatLoadingForDrawables" message="Use `AppCompatResources.getDrawable()`" errorLine1=" super(context.getDrawable(R.drawable.ntp_search_box));" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarPhone.java" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" VersionNumberGetter.getInstance().getLatestKnownVersion(context);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateStatusProvider.java" + line="295" + column="45"/> </issue> - <issue id="UseCompatTextViewDrawableXml" message="Use `app:drawableTopCompat` instead of `android:drawableTop`" errorLine1=" android:drawableTop="@drawable/ic_action_home"" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="android_webview/nonembedded/java/res_devui/layout/activity_main.xml" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" requestId, callback == null ? null : new AwContents.VisualStateCallback() {" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java" + line="976" + column="58"/> </issue> - <issue id="UseCompatTextViewDrawableXml" message="Use `app:drawableTopCompat` instead of `android:drawableTop`" errorLine1=" android:drawableTop="@drawable/ic_alert_error"" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="android_webview/nonembedded/java/res_devui/layout/activity_main.xml" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" mAwContents.getWebContents()));" + errorLine2=" ~~~~~~~~~~~~~~"> + <location + file="$SRC/android_webview/glue/java/src/com/android/webview/chromium/WebViewChromium.java" + line="1836" + column="29"/> </issue> - <issue id="UseCompatTextViewDrawableXml" message="Use `app:drawableTopCompat` instead of `android:drawableTop`" errorLine1=" android:drawableTop="@drawable/ic_flag"" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="android_webview/nonembedded/java/res_devui/layout/activity_main.xml" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" list.add(new StorageInfo(host, type, size));" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/WebsitePreferenceBridge.java" + line="72" + column="18"/> </issue> - <issue id="UseCompatTextViewDrawableXml" message="Use `app:drawableEndCompat` instead of `android:drawableEnd`" errorLine1=" android:drawableEnd="@drawable/exclamation_triangle"" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/res/layout/os_version_unsupported_text.xml" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" .put(origin, new LocalStorageInfo(origin, size, important));" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/WebsitePreferenceBridge.java" + line="90" + column="30"/> </issue> - <issue id="UseCompatTextViewDrawableXml" message="Use `app:drawableStartCompat` instead of `android:drawableStart`" errorLine1=" android:drawableStart="@drawable/ic_alert_error"" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="android_webview/nonembedded/java/res_devui/layout/persistent_error_message.xml" /> + <issue + id="VisibleForTests" + message="This method should only be accessed from tests or within private scope" + errorLine1=" list.add(new ChosenObjectInfo(contentSettingsType, origin, name, object, isManaged));" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/WebsitePreferenceBridge.java" + line="145" + column="18"/> </issue> - <issue id="UseCompatTextViewDrawableXml" message="Use `app:drawableStartCompat` instead of `android:drawableStart`" errorLine1=" android:drawableStart="@drawable/ic_error"" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/browser/share/android/java/res/layout/qrcode_camera_error_layout.xml" /> + <issue + id="Deprecated" + message="Job scheduling with `GcmNetworkManager` is deprecated: Use AndroidX `WorkManager` instead" + errorLine1=" return GcmNetworkManager.getInstance(context);" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/components/background_task_scheduler/internal/android/java/src/org/chromium/components/background_task_scheduler/internal/BackgroundTaskSchedulerGcmNetworkManager.java" + line="249" + column="38"/> </issue> - <issue id="UseCompatTextViewDrawableXml" message="Use `app:drawableTopCompat` instead of `android:drawableTop`" errorLine1=" android:drawableTop="@drawable/edit_icon"" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/browser/share/android/java/res/layout/screenshot_share_sheet.xml" /> + <issue + id="UseAppTint" + message="Must use `app:tint` instead of `android:tint`" + errorLine1=" android:tint="@macro/drag_handlebar_color" />" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/res/layout/custom_tabs_handle_view.xml" + line="20" + column="9"/> </issue> - <issue id="UseCompatTextViewDrawableXml" message="Use `app:drawableTint` instead of `android:drawableTint`" errorLine1=" android:drawableTint="@color/default_icon_color_tint_list"" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/browser/share/android/java/res/layout/screenshot_share_sheet.xml" /> + <issue + id="UseAppTint" + message="Must use `app:tint` instead of `android:tint`" + errorLine1=" android:tint="@macro/checked_item"" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/ui/android/multiwindow/java/res/layout/instance_switcher_item.xml" + line="82" + column="9"/> </issue> - <issue id="UseCompatTextViewDrawableXml" message="Use `app:drawableTopCompat` instead of `android:drawableTop`" errorLine1=" android:drawableTop="@drawable/delete_icon"" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/browser/share/android/java/res/layout/screenshot_share_sheet.xml" /> + <issue + id="UseAppTint" + message="Must use `app:tint` instead of `android:tint`" + errorLine1=" android:tint="@color/photo_picker_tile_bg_color" />" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/photo_picker/android/java/res/layout/photo_picker_bitmap_view.xml" + line="109" + column="13"/> </issue> - <issue id="UseCompatTextViewDrawableXml" message="Use `app:drawableTint` instead of `android:drawableTint`" errorLine1=" android:drawableTint="@color/default_icon_color_tint_list"" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/browser/share/android/java/res/layout/screenshot_share_sheet.xml" /> + <issue + id="UseAppTint" + message="Must use `app:tint` instead of `android:tint`" + errorLine1=" android:tint="@color/default_icon_color_baseline"" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/res/layout/search_widget_template.xml" + line="42" + column="13"/> </issue> - <issue id="UseCompatTextViewDrawableXml" message="Use `app:drawableTopCompat` instead of `android:drawableTop`" errorLine1=" android:drawableTop="@drawable/save_icon"" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/browser/share/android/java/res/layout/screenshot_share_sheet.xml" /> + <issue + id="UseCompatLoadingForDrawables" + message="Use `ResourcesCompat.getDrawable()`" + errorLine1=" return res.getDrawable(id, null);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/base/android/java/src/org/chromium/base/ApiCompatibilityUtils.java" + line="311" + column="24"/> </issue> - <issue id="UseCompatTextViewDrawableXml" message="Use `app:drawableTint` instead of `android:drawableTint`" errorLine1=" android:drawableTint="@color/default_icon_color_tint_list"" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/browser/share/android/java/res/layout/screenshot_share_sheet.xml" /> + <issue + id="UseCompatLoadingForDrawables" + message="Use `AppCompatResources.getDrawable()`" + errorLine1=" Drawable mInlineTitleIcon = context.getDrawable(mGooglePayDrawableId);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/autofill/CardUnmaskPrompt.java" + line="299" + column="37"/> </issue> - <issue id="UseCompatTextViewDrawableXml" message="Use `app:drawableTopCompat` instead of `android:drawableTop`" errorLine1=" android:drawableTop="@drawable/share_icon"" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/browser/share/android/java/res/layout/screenshot_share_sheet.xml" /> + <issue + id="UseCompatLoadingForDrawables" + message="Use `AppCompatResources.getDrawable()`" + errorLine1=" iconDrawable = mContext.getDrawable(iconResId);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchQuickActionControl.java" + line="311" + column="36"/> </issue> - <issue id="UseCompatTextViewDrawableXml" message="Use `app:drawableTint` instead of `android:drawableTint`" errorLine1=" android:drawableTint="@color/default_icon_color_tint_list"" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/browser/share/android/java/res/layout/screenshot_share_sheet.xml" /> + <issue + id="UseCompatLoadingForDrawables" + message="Use `AppCompatResources.getDrawable()`" + errorLine1=" Drawable clearTextIcon = getContext().getDrawable(R.drawable.ic_clear_text);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/android_webview/nonembedded/java/src/org/chromium/android_webview/devui/FlagsFragment.java" + line="172" + column="34"/> </issue> - <issue id="UnspecifiedImmutableFlag" message="Missing `PendingIntent` mutability flag" errorLine1=" intent, PendingIntent.FLAG_UPDATE_CURRENT);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/media/MediaCaptureNotificationServiceImpl.java" /> + <issue + id="UseCompatLoadingForDrawables" + message="Use `AppCompatResources.getDrawable()`" + errorLine1=" final Drawable statusIcon = mContext.getDrawable(R.drawable.ic_cloud_offline_24dp);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/indicator/OfflineIndicatorControllerV2.java" + line="138" + column="41"/> </issue> - <issue id="DataExtractionRules" message="The attribute `android:allowBackup` is deprecated from Android 12 and higher and may be removed in future versions. Consider adding the attribute `android:dataExtractionRules` specifying an `@xml` resource which configures cloud backups and device transfers on Android 12 and higher." errorLine1=" <application android:name="org.chromium.chrome.browser.base.SplitMonochromeApplication" android:icon="@drawable/ic_launcher" android:roundIcon="@drawable/ic_launcher_round" android:label="@string/app_name" android:largeHeap="false" android:manageSpaceActivity="@string/manage_space_activity" android:supportsRtl="true" android:zygotePreloadName="org.chromium.content_public.app.ZygotePreload" android:allowBackup="false" android:networkSecurityConfig="@xml/network_security_config" android:allowAudioPlaybackCapture="false" android:appComponentFactory="org.chromium.chrome.browser.base.SplitCompatAppComponentFactory" android:multiArch="true" android:extractNativeLibs="false" android:use32bitAbi="true">" errorLine2=" ~~~~~"> - <location file="gen/chrome/android/monochrome_public_bundle__lint/gen/chrome/android/manifest/monochrome_public_bundle__base_bundle_module/AndroidManifest.xml" /> + <issue + id="UseCompatLoadingForDrawables" + message="Use `AppCompatResources.getDrawable()`" + errorLine1=" final Drawable statusIcon = mContext.getDrawable(R.drawable.ic_globe_24dp);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/indicator/OfflineIndicatorControllerV2.java" + line="159" + column="41"/> </issue> - <issue id="NotifyDataSetChanged" message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." errorLine1=" notifyDataSetChanged();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/AppLanguagePromoDialog.java" /> + <issue + id="UseCompatLoadingForDrawables" + message="Use `AppCompatResources.getDrawable()`" + errorLine1=" Drawable drawable = context.getDrawable(R.drawable.toolbar_hairline);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabListRecyclerView.java" + line="232" + column="33"/> </issue> - <issue id="NotifyDataSetChanged" message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." errorLine1=" notifyDataSetChanged();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkItemsAdapter.java" /> + <issue + id="UseCompatLoadingForDrawables" + message="Use `AppCompatResources.getDrawable()`" + errorLine1=" Drawable drawable = context.getDrawable(" + errorLine2=" ^"> + <location + file="$SRC/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarPhone.java" + line="415" + column="29"/> </issue> - <issue id="NotifyDataSetChanged" message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." errorLine1=" notifyDataSetChanged();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkItemsAdapter.java" /> + <issue + id="UseCompatLoadingForDrawables" + message="Use `AppCompatResources.getDrawable()`" + errorLine1=" super(context.getDrawable(R.drawable.ntp_search_box));" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarPhone.java" + line="2791" + column="19"/> </issue> - <issue id="NotifyDataSetChanged" message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." errorLine1=" notifyDataSetChanged();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkItemsAdapter.java" /> + <issue + id="UseCompatTextViewDrawableXml" + message="Use `app:drawableTopCompat` instead of `android:drawableTop`" + errorLine1=" android:drawableTop="@drawable/ic_action_home"" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/android_webview/nonembedded/java/res_devui/layout/activity_main.xml" + line="50" + column="13"/> </issue> - <issue id="NotifyDataSetChanged" message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." errorLine1=" if (mElements != null) notifyDataSetChanged();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkItemsAdapter.java" /> + <issue + id="UseCompatTextViewDrawableXml" + message="Use `app:drawableTopCompat` instead of `android:drawableTop`" + errorLine1=" android:drawableTop="@drawable/ic_alert_error"" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/android_webview/nonembedded/java/res_devui/layout/activity_main.xml" + line="60" + column="13"/> </issue> - <issue id="NotifyDataSetChanged" message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." errorLine1=" mAdapter.notifyDataSetChanged();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkManager.java" /> + <issue + id="UseCompatTextViewDrawableXml" + message="Use `app:drawableTopCompat` instead of `android:drawableTop`" + errorLine1=" android:drawableTop="@drawable/ic_flag"" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/android_webview/nonembedded/java/res_devui/layout/activity_main.xml" + line="70" + column="13"/> </issue> - <issue id="NotifyDataSetChanged" message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." errorLine1=" notifyDataSetChanged();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/ContentLanguagesPreference.java" /> + <issue + id="UseCompatTextViewDrawableXml" + message="Use `app:drawableEndCompat` instead of `android:drawableEnd`" + errorLine1=" android:drawableEnd="@drawable/exclamation_triangle"" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/res/layout/os_version_unsupported_text.xml" + line="15" + column="5"/> </issue> - <issue id="NotifyDataSetChanged" message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." errorLine1=" notifyDataSetChanged();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/DateDividedAdapter.java" /> + <issue + id="UseCompatTextViewDrawableXml" + message="Use `app:drawableStartCompat` instead of `android:drawableStart`" + errorLine1=" android:drawableStart="@drawable/ic_alert_error"" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/android_webview/nonembedded/java/res_devui/layout/persistent_error_message.xml" + line="26" + column="9"/> </issue> - <issue id="NotifyDataSetChanged" message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." errorLine1=" notifyDataSetChanged();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/DateDividedAdapter.java" /> + <issue + id="UseCompatTextViewDrawableXml" + message="Use `app:drawableStartCompat` instead of `android:drawableStart`" + errorLine1=" android:drawableStart="@drawable/ic_error"" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/share/android/java/res/layout/qrcode_camera_error_layout.xml" + line="27" + column="9"/> </issue> - <issue id="NotifyDataSetChanged" message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." errorLine1=" notifyDataSetChanged();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/DateDividedAdapter.java" /> + <issue + id="UseCompatTextViewDrawableXml" + message="Use `app:drawableTopCompat` instead of `android:drawableTop`" + errorLine1=" android:drawableTop="@drawable/edit_icon"" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/share/android/java/res/layout/screenshot_share_sheet.xml" + line="49" + column="21"/> </issue> - <issue id="NotifyDataSetChanged" message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." errorLine1=" notifyDataSetChanged();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/DateDividedAdapter.java" /> + <issue + id="UseCompatTextViewDrawableXml" + message="Use `app:drawableTint` instead of `android:drawableTint`" + errorLine1=" android:drawableTint="@color/default_icon_color_tint_list"" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/share/android/java/res/layout/screenshot_share_sheet.xml" + line="50" + column="21"/> </issue> - <issue id="NotifyDataSetChanged" message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." errorLine1=" if (notifyDataSetChanged) notifyDataSetChanged();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/DateDividedAdapter.java" /> + <issue + id="UseCompatTextViewDrawableXml" + message="Use `app:drawableTopCompat` instead of `android:drawableTop`" + errorLine1=" android:drawableTop="@drawable/delete_icon"" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/share/android/java/res/layout/screenshot_share_sheet.xml" + line="60" + column="21"/> </issue> - <issue id="NotifyDataSetChanged" message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." errorLine1=" notifyDataSetChanged();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/DateDividedAdapter.java" /> + <issue + id="UseCompatTextViewDrawableXml" + message="Use `app:drawableTint` instead of `android:drawableTint`" + errorLine1=" android:drawableTint="@color/default_icon_color_tint_list"" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/share/android/java/res/layout/screenshot_share_sheet.xml" + line="61" + column="21"/> </issue> - <issue id="NotifyDataSetChanged" message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." errorLine1=" mPagerAdapter.notifyDataSetChanged();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java" /> + <issue + id="UseCompatTextViewDrawableXml" + message="Use `app:drawableTopCompat` instead of `android:drawableTop`" + errorLine1=" android:drawableTop="@drawable/save_icon"" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/share/android/java/res/layout/screenshot_share_sheet.xml" + line="71" + column="21"/> </issue> - <issue id="NotifyDataSetChanged" message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." errorLine1=" notifyDataSetChanged();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/history/HistoryAdapter.java" /> + <issue + id="UseCompatTextViewDrawableXml" + message="Use `app:drawableTint` instead of `android:drawableTint`" + errorLine1=" android:drawableTint="@color/default_icon_color_tint_list"" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/share/android/java/res/layout/screenshot_share_sheet.xml" + line="72" + column="21"/> </issue> - <issue id="NotifyDataSetChanged" message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." errorLine1=" notifyDataSetChanged();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/LanguageAskPrompt.java" /> + <issue + id="UseCompatTextViewDrawableXml" + message="Use `app:drawableTopCompat` instead of `android:drawableTop`" + errorLine1=" android:drawableTop="@drawable/share_icon"" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/share/android/java/res/layout/screenshot_share_sheet.xml" + line="82" + column="21"/> </issue> - <issue id="NotifyDataSetChanged" message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." errorLine1=" notifyDataSetChanged();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/LanguageListBaseAdapter.java" /> + <issue + id="UseCompatTextViewDrawableXml" + message="Use `app:drawableTint` instead of `android:drawableTint`" + errorLine1=" android:drawableTint="@color/default_icon_color_tint_list"" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/share/android/java/res/layout/screenshot_share_sheet.xml" + line="83" + column="21"/> </issue> - <issue id="NotifyDataSetChanged" message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." errorLine1=" notifyDataSetChanged();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/LanguageListBaseAdapter.java" /> + <issue + id="UnspecifiedImmutableFlag" + message="Missing `PendingIntent` mutability flag" + errorLine1=" intent, PendingIntent.FLAG_UPDATE_CURRENT);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/media/MediaCaptureNotificationServiceImpl.java" + line="342" + column="25"/> </issue> - <issue id="NotifyDataSetChanged" message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." errorLine1=" notifyDataSetChanged();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/LanguageListBaseAdapter.java" /> + <issue + id="DataExtractionRules" + message="The attribute `android:allowBackup` is deprecated from Android 12 and higher and may be removed in future versions. Consider adding the attribute `android:dataExtractionRules` specifying an `@xml` resource which configures cloud backups and device transfers on Android 12 and higher." + errorLine1=" <application android:name="org.chromium.chrome.browser.base.SplitMonochromeApplication" android:icon="@drawable/ic_launcher" android:roundIcon="@drawable/ic_launcher_round" android:label="@string/app_name" android:largeHeap="false" android:manageSpaceActivity="@string/manage_space_activity" android:supportsRtl="true" android:zygotePreloadName="org.chromium.content_public.app.ZygotePreload" android:allowBackup="false" android:networkSecurityConfig="@xml/network_security_config" android:allowAudioPlaybackCapture="false" android:appComponentFactory="org.chromium.chrome.browser.base.SplitCompatAppComponentFactory" android:multiArch="true" android:extractNativeLibs="false" android:use32bitAbi="true">" + errorLine2=" ~~~~~"> + <location + file="gen/chrome/android/monochrome_public_bundle__lint/gen/chrome/android/manifest/monochrome_public_bundle__base_bundle_module/AndroidManifest.xml" + line="228" + column="417"/> </issue> - <issue id="NotifyDataSetChanged" message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." errorLine1=" noteCarousel.getAdapter().notifyDataSetChanged();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/browser/content_creation/notes/internal/android/java/src/org/chromium/chrome/browser/content_creation/notes/NoteCreationDialog.java" /> + <issue + id="NotifyDataSetChanged" + message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." + errorLine1=" notifyDataSetChanged();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/AppLanguagePromoDialog.java" + line="201" + column="13"/> </issue> - <issue id="NotifyDataSetChanged" message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." errorLine1=" notifyDataSetChanged();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/contacts_picker/android/java/src/org/chromium/components/browser_ui/contacts_picker/PickerAdapter.java" /> + <issue + id="NotifyDataSetChanged" + message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." + errorLine1=" notifyDataSetChanged();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkItemsAdapter.java" + line="204" + column="9"/> </issue> - <issue id="NotifyDataSetChanged" message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." errorLine1=" notifyDataSetChanged();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/contacts_picker/android/java/src/org/chromium/components/browser_ui/contacts_picker/PickerAdapter.java" /> + <issue + id="NotifyDataSetChanged" + message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." + errorLine1=" notifyDataSetChanged();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkItemsAdapter.java" + line="375" + column="9"/> </issue> - <issue id="NotifyDataSetChanged" message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." errorLine1=" notifyDataSetChanged();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/contacts_picker/android/java/src/org/chromium/components/browser_ui/contacts_picker/PickerAdapter.java" /> + <issue + id="NotifyDataSetChanged" + message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." + errorLine1=" notifyDataSetChanged();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkItemsAdapter.java" + line="425" + column="9"/> </issue> - <issue id="NotifyDataSetChanged" message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." errorLine1=" notifyDataSetChanged();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/contacts_picker/android/java/src/org/chromium/components/browser_ui/contacts_picker/PickerAdapter.java" /> + <issue + id="NotifyDataSetChanged" + message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." + errorLine1=" if (mElements != null) notifyDataSetChanged();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkItemsAdapter.java" + line="438" + column="32"/> </issue> - <issue id="NotifyDataSetChanged" message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." errorLine1=" mPickerAdapter.notifyDataSetChanged();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/contacts_picker/android/java/src/org/chromium/components/browser_ui/contacts_picker/PickerCategoryView.java" /> + <issue + id="NotifyDataSetChanged" + message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." + errorLine1=" mAdapter.notifyDataSetChanged();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkManager.java" + line="104" + column="13"/> </issue> - <issue id="NotifyDataSetChanged" message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." errorLine1=" mPickerAdapter.notifyDataSetChanged();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/photo_picker/android/java/src/org/chromium/components/browser_ui/photo_picker/PickerCategoryView.java" /> + <issue + id="NotifyDataSetChanged" + message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." + errorLine1=" notifyDataSetChanged();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/ContentLanguagesPreference.java" + line="119" + column="21"/> </issue> - <issue id="NotifyDataSetChanged" message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." errorLine1=" mPickerAdapter.notifyDataSetChanged();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/photo_picker/android/java/src/org/chromium/components/browser_ui/photo_picker/PickerCategoryView.java" /> + <issue + id="NotifyDataSetChanged" + message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." + errorLine1=" notifyDataSetChanged();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/DateDividedAdapter.java" + line="551" + column="9"/> </issue> - <issue id="NotifyDataSetChanged" message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." errorLine1=" mPickerAdapter.notifyDataSetChanged();" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/photo_picker/android/java/src/org/chromium/components/browser_ui/photo_picker/PickerCategoryView.java" /> + <issue + id="NotifyDataSetChanged" + message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." + errorLine1=" notifyDataSetChanged();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/DateDividedAdapter.java" + line="574" + column="9"/> </issue> - <issue id="UseCompoundDrawables" message="This tag and its children can be replaced by one `<TextView/>` and a compound drawable" errorLine1=" <LinearLayout" errorLine2=" ~~~~~~~~~~~~"> - <location file="components/browser_ui/photo_picker/android/java/res/layout/photo_picker_bitmap_view.xml" /> + <issue + id="NotifyDataSetChanged" + message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." + errorLine1=" notifyDataSetChanged();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/DateDividedAdapter.java" + line="611" + column="9"/> </issue> - <issue id="UseCompoundDrawables" message="This tag and its children can be replaced by one `<TextView/>` and a compound drawable" errorLine1=" <LinearLayout" errorLine2=" ~~~~~~~~~~~~"> - <location file="components/browser_ui/photo_picker/android/java/res/layout/photo_picker_bitmap_view.xml" /> + <issue + id="NotifyDataSetChanged" + message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." + errorLine1=" notifyDataSetChanged();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/DateDividedAdapter.java" + line="646" + column="9"/> </issue> - <issue id="UseCompoundDrawables" message="This tag and its children can be replaced by one `<TextView/>` and a compound drawable" errorLine1=" <LinearLayout" errorLine2=" ~~~~~~~~~~~~"> - <location file="chrome/browser/share/android/java/res/layout/qrcode_camera_error_layout.xml" /> + <issue + id="NotifyDataSetChanged" + message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." + errorLine1=" if (notifyDataSetChanged) notifyDataSetChanged();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/DateDividedAdapter.java" + line="660" + column="35"/> </issue> - <issue id="MergeRootFrame" message="This `<FrameLayout>` can be replaced with a `<merge>` tag" errorLine1="<FrameLayout" errorLine2="^"> - <location file="chrome/android/java/res/layout/signin_activity.xml" /> + <issue + id="NotifyDataSetChanged" + message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." + errorLine1=" notifyDataSetChanged();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/DateDividedAdapter.java" + line="781" + column="9"/> </issue> - <issue id="UnusedResources" message="The resource `R.macro.suggestion_url_color` appears to be unused" errorLine1=" <macro name="suggestion_url_color">@macro/default_text_color_link</macro>" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/browser/ui/android/omnibox/java/res/values/colors.xml" /> + <issue + id="NotifyDataSetChanged" + message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." + errorLine1=" mPagerAdapter.notifyDataSetChanged();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java" + line="203" + column="13"/> </issue> - <issue id="UnusedResources" message="The resource `R.macro.signin_head_background` appears to be unused" errorLine1=" <macro name="signin_head_background">@macro/default_bg_color</macro>" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/res/values/colors.xml" /> + <issue + id="NotifyDataSetChanged" + message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." + errorLine1=" notifyDataSetChanged();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/history/HistoryAdapter.java" + line="134" + column="9"/> </issue> - <issue id="UnusedResources" message="The resource `R.macro.signin_body_background` appears to be unused" errorLine1=" <macro name="signin_body_background">@macro/default_bg_color</macro>" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/res/values/colors.xml" /> + <issue + id="NotifyDataSetChanged" + message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." + errorLine1=" notifyDataSetChanged();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/LanguageAskPrompt.java" + line="209" + column="13"/> </issue> - <issue id="UnusedResources" message="The resource `R.macro.bottom_system_nav_divider_color` appears to be unused" errorLine1=" <macro name="bottom_system_nav_divider_color">@macro/divider_line_bg_color</macro>" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/styles/android/java/res/values/colors.xml" /> + <issue + id="NotifyDataSetChanged" + message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." + errorLine1=" notifyDataSetChanged();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/LanguageListBaseAdapter.java" + line="136" + column="17"/> </issue> - <issue id="UnusedResources" message="The resource `R.macro.progress_bar_foreground` appears to be unused" errorLine1=" <macro name="progress_bar_foreground">@macro/default_control_color_active</macro>" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/styles/android/java/res/values/colors.xml" /> + <issue + id="NotifyDataSetChanged" + message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." + errorLine1=" notifyDataSetChanged();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/LanguageListBaseAdapter.java" + line="204" + column="9"/> </issue> - <issue id="UnusedResources" message="The resource `R.macro.overlay_panel_bar_background_color` appears to be unused" errorLine1=" <macro name="overlay_panel_bar_background_color">@macro/default_bg_color</macro>" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/res/values/colors.xml" /> + <issue + id="NotifyDataSetChanged" + message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." + errorLine1=" notifyDataSetChanged();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/LanguageListBaseAdapter.java" + line="215" + column="9"/> </issue> - <issue id="UnusedResources" message="The resource `R.macro.tab_layout_selected_tab_color` appears to be unused" errorLine1=" <macro name="tab_layout_selected_tab_color">@macro/default_text_color_accent1</macro>" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/res/values/colors.xml" /> + <issue + id="NotifyDataSetChanged" + message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." + errorLine1=" noteCarousel.getAdapter().notifyDataSetChanged();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/content_creation/notes/internal/android/java/src/org/chromium/chrome/browser/content_creation/notes/NoteCreationDialog.java" + line="129" + column="9"/> </issue> - <issue id="UnusedResources" message="The resource `R.macro.default_bg_color` appears to be unused" errorLine1=" <macro name="default_bg_color">?attr/colorSurface</macro>" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/styles/android/java/res/values/semantic_colors_dynamic.xml" /> + <issue + id="NotifyDataSetChanged" + message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." + errorLine1=" notifyDataSetChanged();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/contacts_picker/android/java/src/org/chromium/components/browser_ui/contacts_picker/PickerAdapter.java" + line="169" + column="9"/> </issue> - <issue id="UnusedResources" message="The resource `R.macro.default_bg_color_elev_0` appears to be unused" errorLine1=" <macro name="default_bg_color_elev_0">?attr/colorSurface</macro>" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/styles/android/java/res/values/semantic_colors_dynamic.xml" /> + <issue + id="NotifyDataSetChanged" + message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." + errorLine1=" notifyDataSetChanged();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/contacts_picker/android/java/src/org/chromium/components/browser_ui/contacts_picker/PickerAdapter.java" + line="196" + column="9"/> </issue> - <issue id="UnusedResources" message="The resource `R.macro.default_control_color_active` appears to be unused" errorLine1=" <macro name="default_control_color_active">?attr/colorPrimary</macro>" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/styles/android/java/res/values/semantic_colors_dynamic.xml" /> + <issue + id="NotifyDataSetChanged" + message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." + errorLine1=" notifyDataSetChanged();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/contacts_picker/android/java/src/org/chromium/components/browser_ui/contacts_picker/PickerAdapter.java" + line="213" + column="9"/> </issue> - <issue id="UnusedResources" message="The resource `R.macro.default_control_color_normal` appears to be unused" errorLine1=" <macro name="default_control_color_normal">?attr/colorOnSurfaceVariant</macro>" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/styles/android/java/res/values/semantic_colors_dynamic.xml" /> + <issue + id="NotifyDataSetChanged" + message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." + errorLine1=" notifyDataSetChanged();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/contacts_picker/android/java/src/org/chromium/components/browser_ui/contacts_picker/PickerAdapter.java" + line="342" + column="9"/> </issue> - <issue id="UnusedResources" message="The resource `R.macro.default_icon_color` appears to be unused" errorLine1=" <macro name="default_icon_color">?attr/colorOnSurface</macro>" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/styles/android/java/res/values/semantic_colors_dynamic.xml" /> + <issue + id="NotifyDataSetChanged" + message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." + errorLine1=" mPickerAdapter.notifyDataSetChanged();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/contacts_picker/android/java/src/org/chromium/components/browser_ui/contacts_picker/PickerCategoryView.java" + line="212" + column="9"/> </issue> - <issue id="UnusedResources" message="The resource `R.macro.default_icon_color_accent1` appears to be unused" errorLine1=" <macro name="default_icon_color_accent1">?attr/colorPrimary</macro>" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/styles/android/java/res/values/semantic_colors_dynamic.xml" /> + <issue + id="NotifyDataSetChanged" + message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." + errorLine1=" mPickerAdapter.notifyDataSetChanged();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/photo_picker/android/java/src/org/chromium/components/browser_ui/photo_picker/PickerCategoryView.java" + line="259" + column="13"/> </issue> - <issue id="UnusedResources" message="The resource `R.macro.default_icon_color_inverse` appears to be unused" errorLine1=" <macro name="default_icon_color_inverse">?attr/colorOnSurfaceInverse</macro>" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/styles/android/java/res/values/semantic_colors_dynamic.xml" /> + <issue + id="NotifyDataSetChanged" + message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." + errorLine1=" mPickerAdapter.notifyDataSetChanged();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/photo_picker/android/java/src/org/chromium/components/browser_ui/photo_picker/PickerCategoryView.java" + line="395" + column="13"/> </issue> - <issue id="UnusedResources" message="The resource `R.macro.default_icon_color_on_accent1` appears to be unused" errorLine1=" <macro name="default_icon_color_on_accent1">?attr/colorOnPrimary</macro>" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/styles/android/java/res/values/semantic_colors_dynamic.xml" /> + <issue + id="NotifyDataSetChanged" + message="It will always be more efficient to use more specific change events if you can. Rely on `notifyDataSetChanged` as a last resort." + errorLine1=" mPickerAdapter.notifyDataSetChanged();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/photo_picker/android/java/src/org/chromium/components/browser_ui/photo_picker/PickerCategoryView.java" + line="455" + column="9"/> </issue> - <issue id="UnusedResources" message="The resource `R.macro.default_icon_color_secondary` appears to be unused" errorLine1=" <macro name="default_icon_color_secondary">?attr/colorOnSurfaceVariant</macro>" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/styles/android/java/res/values/semantic_colors_dynamic.xml" /> + <issue + id="UseCompoundDrawables" + message="This tag and its children can be replaced by one `<TextView/>` and a compound drawable" + errorLine1=" <LinearLayout" + errorLine2=" ~~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/photo_picker/android/java/res/layout/photo_picker_bitmap_view.xml" + line="37" + column="10"/> </issue> - <issue id="UnusedResources" message="The resource `R.macro.default_text_color` appears to be unused" errorLine1=" <macro name="default_text_color">?attr/colorOnSurface</macro>" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/styles/android/java/res/values/semantic_colors_dynamic.xml" /> + <issue + id="UseCompoundDrawables" + message="This tag and its children can be replaced by one `<TextView/>` and a compound drawable" + errorLine1=" <LinearLayout" + errorLine2=" ~~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/photo_picker/android/java/res/layout/photo_picker_bitmap_view.xml" + line="94" + column="6"/> </issue> - <issue id="UnusedResources" message="The resource `R.macro.default_text_color_accent1` appears to be unused" errorLine1=" <macro name="default_text_color_accent1">?attr/colorPrimary</macro>" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/styles/android/java/res/values/semantic_colors_dynamic.xml" /> + <issue + id="UseCompoundDrawables" + message="This tag and its children can be replaced by one `<TextView/>` and a compound drawable" + errorLine1=" <LinearLayout" + errorLine2=" ~~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/share/android/java/res/layout/qrcode_camera_error_layout.xml" + line="11" + column="4"/> </issue> - <issue id="UnusedResources" message="The resource `R.macro.default_text_color_on_accent1` appears to be unused" errorLine1=" <macro name="default_text_color_on_accent1">?attr/colorOnPrimary</macro>" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/styles/android/java/res/values/semantic_colors_dynamic.xml" /> + <issue + id="AssertionSideEffect" + message="Assertion condition has a side effect: f.setAccessible(true)" + errorLine1=" assert reachesWindowCallback(activity.getWindow().getCallback());" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/base/android/java/src/org/chromium/base/ApplicationStatus.java" + line="301" + column="28"/> </issue> - <issue id="UnusedResources" message="The resource `R.macro.default_text_color_on_accent2_container` appears to be unused" errorLine1=" <macro name="default_text_color_on_accent2_container">?attr/colorOnSecondaryContainer</macro>" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/styles/android/java/res/values/semantic_colors_dynamic.xml" /> + <issue + id="AssertionSideEffect" + message="Assertion condition has a side effect: nativeMatches[index] = mSuggestions.get(index).getNativeObjectRef()" + errorLine1=" assert verifyCoherency(" + errorLine2=" ^"> + <location + file="$SRC/components/omnibox/browser/android/java/src/org/chromium/components/omnibox/AutocompleteResult.java" + line="273" + column="20"/> </issue> - <issue id="UnusedResources" message="The resource `R.macro.switch_enabled_unchecked_color_dark` appears to be unused" errorLine1=" <macro name="switch_enabled_unchecked_color_dark">?attr/colorOutline</macro>" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/styles/android/java/res/values/semantic_colors_dynamic.xml" /> + <issue + id="AssertionSideEffect" + message="Assertion condition has a side effect: sRemotingNotificationId = WebLayerImpl.getRemotePlaybackApiNotificationId()" + errorLine1=" assert mNotificationId == getRemotingNotificationIdFromClient();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/weblayer/browser/java/org/chromium/weblayer_private/media/MediaRouterClientImpl.java" + line="144" + column="39"/> </issue> - <issue id="UnusedResources" message="The resource `R.macro.switch_enabled_unchecked_color_light` appears to be unused" errorLine1=" <macro name="switch_enabled_unchecked_color_light">?attr/colorOnSurface</macro>" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/styles/android/java/res/values/semantic_colors_dynamic.xml" /> + <issue + id="AssertionSideEffect" + message="Assertion condition has a side effect: sNotificationId = WebLayerImpl.getMediaSessionNotificationId()" + errorLine1=" assert notificationInfo.id == getNotificationId();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/weblayer/browser/java/org/chromium/weblayer_private/media/MediaSessionManager.java" + line="60" + column="47"/> </issue> - <issue id="UnusedResources" message="The resource `R.macro.switch_track_disabled_color` appears to be unused" errorLine1=" <macro name="switch_track_disabled_color">?attr/colorOnSurface</macro>" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/styles/android/java/res/values/semantic_colors_dynamic.xml" /> + <issue + id="AssertionSideEffect" + message="Assertion condition has a side effect: sSyncService = SyncServiceImpl.create()" + errorLine1=" assert SyncService.get() != null;" + errorLine2=" ~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/sync/ui/PassphraseActivity.java" + line="46" + column="16"/> </issue> - <issue id="UnusedResources" message="The resource `R.macro.switch_thumb_disabled_color` appears to be unused" errorLine1=" <macro name="switch_thumb_disabled_color">?attr/colorOnSurfaceInverse</macro>" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/styles/android/java/res/values/semantic_colors_dynamic.xml" /> + <issue + id="AssertionSideEffect" + message="Assertion condition has a side effect: sSyncService = SyncServiceImpl.create()" + errorLine1=" assert SyncService.get() != null;" + errorLine2=" ~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/sync/ui/PassphraseDialogFragment.java" + line="82" + column="16"/> </issue> - <issue id="UnusedResources" message="The resource `R.macro.hairline_stroke_color` appears to be unused" errorLine1=" <macro name="hairline_stroke_color">?attr/colorOutline</macro>" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/styles/android/java/res/values/semantic_colors_dynamic.xml" /> + <issue + id="AssertionSideEffect" + message="Assertion condition has a side effect: sSyncService = SyncServiceImpl.create()" + errorLine1=" assert SyncService.get() != null;" + errorLine2=" ~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/password_manager/settings/PasswordSettings.java" + line="660" + column="16"/> </issue> - <issue id="UnusedResources" message="The resource `R.macro.divider_line_bg_color` appears to be unused" errorLine1=" <macro name="divider_line_bg_color">?attr/colorSurfaceVariant</macro>" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/styles/android/java/res/values/semantic_colors_dynamic.xml" /> + <issue + id="AssertionSideEffect" + message="Assertion condition has a side effect: sValuesReturned.boolValues.put(preferenceName, flag)" + errorLine1=" assert CachedFeatureFlags.isEnabled(ChromeFeatureList.INSTANT_START);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/pseudotab/PseudoTab.java" + line="301" + column="20"/> </issue> - <issue id="UnusedResources" message="The resource `R.macro.chip_bg_color` appears to be unused" errorLine1=" <macro name="chip_bg_color">@macro/default_bg_color</macro>" errorLine2=" ~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/styles/android/java/res/values/semantic_colors_dynamic.xml" /> + <issue + id="AssertionSideEffect" + message="Assertion condition has a side effect: sValuesReturned.boolValues.put(preferenceName, flag)" + errorLine1=" assert CachedFeatureFlags.isEnabled(ChromeFeatureList.INSTANT_START)" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/pseudotab/PseudoTab.java" + line="335" + column="16"/> </issue> - <issue id="UnusedResources" message="The resource `R.macro.chip_bg_selected_color` appears to be unused" errorLine1=" <macro name="chip_bg_selected_color">?attr/colorSecondaryContainer</macro>" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/styles/android/java/res/values/semantic_colors_dynamic.xml" /> + <issue + id="AssertionSideEffect" + message="Assertion condition has a side effect: sHaveAccessNetworkState =
 ApiCompatibilityUtils.checkPermission(ContextUtils.getApplicationContext(),
 Manifest.permission.ACCESS_NETWORK_STATE, Process.myPid(),
 Process.myUid())
 == PackageManager.PERMISSION_GRANTED" + errorLine1=" assert isSupported();" + errorLine2=" ~~~~~~~~~~~~~"> + <location + file="$SRC/base/android/java/src/org/chromium/base/RadioUtils.java" + line="80" + column="16"/> </issue> - <issue id="UnusedResources" message="The resource `R.macro.chip_outline_color` appears to be unused" errorLine1=" <macro name="chip_outline_color">?attr/colorOutline</macro>" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/styles/android/java/res/values/semantic_colors_dynamic.xml" /> + <issue + id="AssertionSideEffect" + message="Assertion condition has a side effect: sHaveAccessNetworkState =
 ApiCompatibilityUtils.checkPermission(ContextUtils.getApplicationContext(),
 Manifest.permission.ACCESS_NETWORK_STATE, Process.myPid(),
 Process.myUid())
 == PackageManager.PERMISSION_GRANTED" + errorLine1=" assert isSupported();" + errorLine2=" ~~~~~~~~~~~~~"> + <location + file="$SRC/base/android/java/src/org/chromium/base/RadioUtils.java" + line="105" + column="16"/> </issue> - <issue id="UnusedResources" message="The resource `R.macro.chip_outline_focused_color` appears to be unused" errorLine1=" <macro name="chip_outline_focused_color">?attr/colorOnSurface</macro>" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/styles/android/java/res/values/semantic_colors_dynamic.xml" /> + <issue + id="AssertionSideEffect" + message="Assertion condition has a side effect: sHaveAccessNetworkState =
 ApiCompatibilityUtils.checkPermission(ContextUtils.getApplicationContext(),
 Manifest.permission.ACCESS_NETWORK_STATE, Process.myPid(),
 Process.myUid())
 == PackageManager.PERMISSION_GRANTED" + errorLine1=" assert isSupported();" + errorLine2=" ~~~~~~~~~~~~~"> + <location + file="$SRC/base/android/java/src/org/chromium/base/RadioUtils.java" + line="131" + column="16"/> </issue> - <issue id="UnusedResources" message="The resource `R.macro.chip_state_layer_color` appears to be unused" errorLine1=" <macro name="chip_state_layer_color">?attr/colorOnSurfaceVariant</macro>" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/styles/android/java/res/values/semantic_colors_dynamic.xml" /> + <issue + id="AssertionSideEffect" + message="Assertion condition has a side effect: sSyncService = SyncServiceImpl.create()" + errorLine1=" assert SyncService.get() != null;" + errorLine2=" ~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/signin/SyncPromoView.java" + line="59" + column="16"/> </issue> - <issue id="UnusedResources" message="The resource `R.macro.chip_state_layer_selected_color` appears to be unused" errorLine1=" <macro name="chip_state_layer_selected_color">?attr/colorOnSecondaryContainer</macro>" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/styles/android/java/res/values/semantic_colors_dynamic.xml" /> + <issue + id="AssertionSideEffect" + message="Assertion condition has a side effect: sValuesReturned.boolValues.put(preferenceName, value)" + errorLine1=" assert TabUiFeatureUtilities.ENABLE_SEARCH_CHIP.getValue();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabListMediator.java" + line="1569" + column="16"/> </issue> - <issue id="UnusedResources" message="The resource `R.macro.circular_progress_icon_color_small_large` appears to be unused" errorLine1=" <macro name="circular_progress_icon_color_small_large">?attr/colorPrimary</macro>" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/styles/android/java/res/values/semantic_colors_dynamic.xml" /> + <issue + id="MergeRootFrame" + message="This `<FrameLayout>` can be replaced with a `<merge>` tag" + errorLine1="<FrameLayout" + errorLine2="^"> + <location + file="$SRC/chrome/android/java/res/layout/signin_activity.xml" + line="5" + column="1"/> </issue> - <issue id="UnusedResources" message="The resource `R.macro.circular_progress_outer_circle_progress_color_small` appears to be unused" errorLine1=" <macro name="circular_progress_outer_circle_progress_color_small">?attr/colorPrimary</macro>" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/styles/android/java/res/values/semantic_colors_dynamic.xml" /> + <issue + id="UnusedResources" + message="The resource `R.macro.suggestion_url_color` appears to be unused" + errorLine1=" <macro name="suggestion_url_color">@macro/default_text_color_link</macro>" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/ui/android/omnibox/java/res/values/colors.xml" + line="10" + column="12"/> </issue> - <issue id="UnusedResources" message="The resource `R.macro.default_text_color_link` appears to be unused" errorLine1=" <macro name="default_text_color_link">@color/default_text_color_link_baseline</macro>" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/styles/android/java/res/values/semantic_colors_dynamic.xml" /> + <issue + id="UnusedResources" + message="The resource `R.macro.default_bg_color_elev_0` appears to be unused" + errorLine1=" <macro name="default_bg_color_elev_0">?attr/colorSurface</macro>" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/styles/android/java/res/values/semantic_colors_dynamic.xml" + line="7" + column="12"/> </issue> - <issue id="UsableSpace" message="Consider also using `StorageManager#getAllocatableBytes` and `allocateBytes` which will consider clearable cached data" errorLine1=" dir.getAbsolutePath(), dir.getUsableSpace(), dir.getTotalSpace(), type);" errorLine2=" ~~~~~~~~~~~~~~"> - <location file="chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/DownloadDirectoryProvider.java" /> + <issue + id="UsableSpace" + message="Consider also using `StorageManager#getAllocatableBytes` and `allocateBytes` which will consider clearable cached data" + errorLine1=" dir.getAbsolutePath(), dir.getUsableSpace(), dir.getTotalSpace(), type);" + errorLine2=" ~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/download/android/java/src/org/chromium/chrome/browser/download/DownloadDirectoryProvider.java" + line="156" + column="48"/> </issue> - <issue id="UsableSpace" message="Consider also using `StorageManager#getAllocatableBytes` and `allocateBytes` which will consider clearable cached data" errorLine1=" mFreeSpace = Environment.getExternalStorageDirectory().getUsableSpace();" errorLine2=" ~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/download/OMADownloadHandler.java" /> + <issue + id="UsableSpace" + message="Consider also using `StorageManager#getAllocatableBytes` and `allocateBytes` which will consider clearable cached data" + errorLine1=" mFreeSpace = Environment.getExternalStorageDirectory().getUsableSpace();" + errorLine2=" ~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/download/OMADownloadHandler.java" + line="348" + column="68"/> </issue> - <issue id="UsableSpace" message="Consider also using `StorageManager#getAllocatableBytes` and `allocateBytes` which will consider clearable cached data" errorLine1=" return Environment.getDataDirectory().getUsableSpace();" errorLine2=" ~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/offlinepages/OfflinePageUtils.java" /> + <issue + id="UsableSpace" + message="Consider also using `StorageManager#getAllocatableBytes` and `allocateBytes` which will consider clearable cached data" + errorLine1=" return Environment.getDataDirectory().getUsableSpace();" + errorLine2=" ~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/OfflinePageUtils.java" + line="240" + column="47"/> </issue> - <issue id="UsableSpace" message="Consider also using `StorageManager#getAllocatableBytes` and `allocateBytes` which will consider clearable cached data" errorLine1=" defaultDownloadDir.getAbsolutePath(), defaultDownloadDir.getUsableSpace()," errorLine2=" ~~~~~~~~~~~~~~"> - <location file="chrome/browser/download/internal/android/java/src/org/chromium/chrome/browser/download/home/storage/StorageSummaryProvider.java" /> + <issue + id="UsableSpace" + message="Consider also using `StorageManager#getAllocatableBytes` and `allocateBytes` which will consider clearable cached data" + errorLine1=" defaultDownloadDir.getAbsolutePath(), defaultDownloadDir.getUsableSpace()," + errorLine2=" ~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/download/internal/android/java/src/org/chromium/chrome/browser/download/home/storage/StorageSummaryProvider.java" + line="88" + column="82"/> </issue> - <issue id="Autofill" message="Missing `autofillHints` attribute" errorLine1=" <EditText" errorLine2=" ~~~~~~~~"> - <location file="android_webview/nonembedded/java/res_devui/layout/fragment_flags.xml" /> + <issue + id="Autofill" + message="Missing `autofillHints` attribute" + errorLine1=" <EditText" + errorLine2=" ~~~~~~~~"> + <location + file="$SRC/android_webview/nonembedded/java/res_devui/layout/fragment_flags.xml" + line="25" + column="10"/> </issue> - <issue id="ClickableViewAccessibility" message="Custom view `AccessibilityTabModelListItem` overrides `onTouchEvent` but not `performClick`" errorLine1=" public boolean onTouchEvent(MotionEvent e) {" errorLine2=" ~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/accessibility_tab_switcher/AccessibilityTabModelListItem.java" /> + <issue + id="ClickableViewAccessibility" + message="Custom view `AccessibilityTabModelListItem` overrides `onTouchEvent` but not `performClick`" + errorLine1=" public boolean onTouchEvent(MotionEvent e) {" + errorLine2=" ~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/accessibility_tab_switcher/AccessibilityTabModelListItem.java" + line="463" + column="20"/> </issue> - <issue id="ClickableViewAccessibility" message="`onTouch` lambda should call `View#performClick` when a click is detected" errorLine1=" row.setDragHandleOnTouchListener((v, event) -> {" errorLine2=" ^"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkItemsAdapter.java" /> + <issue + id="ClickableViewAccessibility" + message="`onTouch` lambda should call `View#performClick` when a click is detected" + errorLine1=" row.setDragHandleOnTouchListener((v, event) -> {" + errorLine2=" ^"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkItemsAdapter.java" + line="294" + column="46"/> </issue> - <issue id="ClickableViewAccessibility" message="Custom view ``ImageView`` has `setOnTouchListener` called on it but does not override `performClick`" errorLine1=" mDragHandle.setOnTouchListener(l);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkRow.java" /> + <issue + id="ClickableViewAccessibility" + message="Custom view ``ImageView`` has `setOnTouchListener` called on it but does not override `performClick`" + errorLine1=" mDragHandle.setOnTouchListener(l);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkRow.java" + line="321" + column="9"/> </issue> - <issue id="ClickableViewAccessibility" message="Custom view `BottomSheet` overrides `onTouchEvent` but not `performClick`" errorLine1=" public boolean onTouchEvent(MotionEvent e) {" errorLine2=" ~~~~~~~~~~~~"> - <location file="components/browser_ui/bottomsheet/android/internal/java/src/org/chromium/components/browser_ui/bottomsheet/BottomSheet.java" /> + <issue + id="ClickableViewAccessibility" + message="Custom view `BottomSheet` overrides `onTouchEvent` but not `performClick`" + errorLine1=" public boolean onTouchEvent(MotionEvent e) {" + errorLine2=" ~~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/bottomsheet/android/internal/java/src/org/chromium/components/browser_ui/bottomsheet/BottomSheet.java" + line="286" + column="20"/> </issue> - <issue id="ClickableViewAccessibility" message="Custom view ``TextView`` has `setOnTouchListener` called on it but does not override `performClick`" errorLine1=" textView.setOnTouchListener((View v, MotionEvent event) -> {" errorLine2=" ^"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/browsing_data/ClearBrowsingDataCheckBoxPreference.java" /> + <issue + id="ClickableViewAccessibility" + message="Custom view ``TextView`` has `setOnTouchListener` called on it but does not override `performClick`" + errorLine1=" textView.setOnTouchListener((View v, MotionEvent event) -> {" + errorLine2=" ^"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/browsing_data/ClearBrowsingDataCheckBoxPreference.java" + line="54" + column="9"/> </issue> - <issue id="ClickableViewAccessibility" message="`onTouch` lambda should call `View#performClick` when a click is detected" errorLine1=" textView.setOnTouchListener((View v, MotionEvent event) -> {" errorLine2=" ^"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/browsing_data/ClearBrowsingDataCheckBoxPreference.java" /> + <issue + id="ClickableViewAccessibility" + message="`onTouch` lambda should call `View#performClick` when a click is detected" + errorLine1=" textView.setOnTouchListener((View v, MotionEvent event) -> {" + errorLine2=" ^"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/browsing_data/ClearBrowsingDataCheckBoxPreference.java" + line="54" + column="37"/> </issue> - <issue id="ClickableViewAccessibility" message="Custom view `CompositorViewHolder` overrides `onTouchEvent` but not `performClick`" errorLine1=" public boolean onTouchEvent(MotionEvent e) {" errorLine2=" ~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/compositor/CompositorViewHolder.java" /> + <issue + id="ClickableViewAccessibility" + message="Custom view `CompositorViewHolder` overrides `onTouchEvent` but not `performClick`" + errorLine1=" public boolean onTouchEvent(MotionEvent e) {" + errorLine2=" ~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/compositor/CompositorViewHolder.java" + line="645" + column="20"/> </issue> - <issue id="ClickableViewAccessibility" message="Custom view `ContentView` overrides `onTouchEvent` but not `performClick`" errorLine1=" public boolean onTouchEvent(MotionEvent event) {" errorLine2=" ~~~~~~~~~~~~"> - <location file="components/embedder_support/android/java/src/org/chromium/components/embedder_support/view/ContentView.java" /> + <issue + id="ClickableViewAccessibility" + message="Custom view `ContentView` overrides `onTouchEvent` but not `performClick`" + errorLine1=" public boolean onTouchEvent(MotionEvent event) {" + errorLine2=" ~~~~~~~~~~~~"> + <location + file="$SRC/components/embedder_support/android/java/src/org/chromium/components/embedder_support/view/ContentView.java" + line="367" + column="20"/> </issue> - <issue id="ClickableViewAccessibility" message="Custom view ``ImageButton`` has `setOnTouchListener` called on it but does not override `performClick`" errorLine1=" menuBtn.setOnTouchListener(menuPopupButtonHelper);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/src/org/chromium/chrome/browser/ui/tablet/emptybackground/EmptyBackgroundViewTablet.java" /> + <issue + id="ClickableViewAccessibility" + message="Custom view ``ImageButton`` has `setOnTouchListener` called on it but does not override `performClick`" + errorLine1=" menuBtn.setOnTouchListener(menuPopupButtonHelper);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/src/org/chromium/chrome/browser/ui/tablet/emptybackground/EmptyBackgroundViewTablet.java" + line="98" + column="9"/> </issue> - <issue id="ClickableViewAccessibility" message="Custom view ``EditText`` has `setOnTouchListener` called on it but does not override `performClick`" errorLine1=" editText.setOnTouchListener((View v, MotionEvent event) -> {" errorLine2=" ^"> - <location file="android_webview/nonembedded/java/src/org/chromium/android_webview/devui/FlagsFragment.java" /> + <issue + id="ClickableViewAccessibility" + message="Custom view ``EditText`` has `setOnTouchListener` called on it but does not override `performClick`" + errorLine1=" editText.setOnTouchListener((View v, MotionEvent event) -> {" + errorLine2=" ^"> + <location + file="$SRC/android_webview/nonembedded/java/src/org/chromium/android_webview/devui/FlagsFragment.java" + line="185" + column="13"/> </issue> - <issue id="ClickableViewAccessibility" message="`onTouch` lambda should call `View#performClick` when a click is detected" errorLine1=" editText.setOnTouchListener((View v, MotionEvent event) -> {" errorLine2=" ^"> - <location file="android_webview/nonembedded/java/src/org/chromium/android_webview/devui/FlagsFragment.java" /> + <issue + id="ClickableViewAccessibility" + message="`onTouch` lambda should call `View#performClick` when a click is detected" + errorLine1=" editText.setOnTouchListener((View v, MotionEvent event) -> {" + errorLine2=" ^"> + <location + file="$SRC/android_webview/nonembedded/java/src/org/chromium/android_webview/devui/FlagsFragment.java" + line="185" + column="41"/> </issue> - <issue id="ClickableViewAccessibility" message="Custom view ``EditText`` has `setOnTouchListener` called on it but does not override `performClick`" errorLine1=" editText.setOnTouchListener(null);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="android_webview/nonembedded/java/src/org/chromium/android_webview/devui/FlagsFragment.java" /> + <issue + id="ClickableViewAccessibility" + message="Custom view ``EditText`` has `setOnTouchListener` called on it but does not override `performClick`" + errorLine1=" editText.setOnTouchListener(null);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/android_webview/nonembedded/java/src/org/chromium/android_webview/devui/FlagsFragment.java" + line="200" + column="13"/> </issue> - <issue id="ClickableViewAccessibility" message="Custom view `FullScreenView` overrides `onTouchEvent` but not `performClick`" errorLine1=" public boolean onTouchEvent(final MotionEvent event) {" errorLine2=" ~~~~~~~~~~~~"> - <location file="android_webview/java/src/org/chromium/android_webview/FullScreenView.java" /> + <issue + id="ClickableViewAccessibility" + message="Custom view `FullScreenView` overrides `onTouchEvent` but not `performClick`" + errorLine1=" public boolean onTouchEvent(final MotionEvent event) {" + errorLine2=" ~~~~~~~~~~~~"> + <location + file="$SRC/android_webview/java/src/org/chromium/android_webview/FullScreenView.java" + line="91" + column="20"/> </issue> - <issue id="ClickableViewAccessibility" message="Custom view `InfoBarMessageView` overrides `onTouchEvent` but not `performClick`" errorLine1=" public boolean onTouchEvent(MotionEvent event) {" errorLine2=" ~~~~~~~~~~~~"> - <location file="components/infobars/android/java/src/org/chromium/components/infobars/InfoBarMessageView.java" /> + <issue + id="ClickableViewAccessibility" + message="Custom view `InfoBarMessageView` overrides `onTouchEvent` but not `performClick`" + errorLine1=" public boolean onTouchEvent(MotionEvent event) {" + errorLine2=" ~~~~~~~~~~~~"> + <location + file="$SRC/components/infobars/android/java/src/org/chromium/components/infobars/InfoBarMessageView.java" + line="32" + column="20"/> </issue> - <issue id="ClickableViewAccessibility" message="Custom view ``ImageView`` has `setOnTouchListener` called on it but does not override `performClick`" errorLine1=" holder.mStartIcon.setOnTouchListener((v, event) -> {" errorLine2=" ^"> - <location file="chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/LanguageListBaseAdapter.java" /> + <issue + id="ClickableViewAccessibility" + message="Custom view ``ImageView`` has `setOnTouchListener` called on it but does not override `performClick`" + errorLine1=" holder.mStartIcon.setOnTouchListener((v, event) -> {" + errorLine2=" ^"> + <location + file="$SRC/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/LanguageListBaseAdapter.java" + line="177" + column="9"/> </issue> - <issue id="ClickableViewAccessibility" message="`onTouch` lambda should call `View#performClick` when a click is detected" errorLine1=" holder.mStartIcon.setOnTouchListener((v, event) -> {" errorLine2=" ^"> - <location file="chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/LanguageListBaseAdapter.java" /> + <issue + id="ClickableViewAccessibility" + message="`onTouch` lambda should call `View#performClick` when a click is detected" + errorLine1=" holder.mStartIcon.setOnTouchListener((v, event) -> {" + errorLine2=" ^"> + <location + file="$SRC/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/LanguageListBaseAdapter.java" + line="177" + column="46"/> </issue> - <issue id="ClickableViewAccessibility" message="Custom view ``ImageButton`` has `setOnTouchListener` called on it but does not override `performClick`" errorLine1=" mMenuImageButton.setOnTouchListener(mAppMenuButtonHelper);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/menu_button/MenuButton.java" /> + <issue + id="ClickableViewAccessibility" + message="Custom view ``ImageButton`` has `setOnTouchListener` called on it but does not override `performClick`" + errorLine1=" mMenuImageButton.setOnTouchListener(mAppMenuButtonHelper);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/menu_button/MenuButton.java" + line="79" + column="9"/> </issue> - <issue id="ClickableViewAccessibility" message="`onTouch` lambda should call `View#performClick` when a click is detected" errorLine1=" View.OnTouchListener onTouchListener = (View v, MotionEvent ev) -> {" errorLine2=" ^"> - <location file="components/browser_ui/modaldialog/android/java/src/org/chromium/components/browser_ui/modaldialog/ModalDialogView.java" /> + <issue + id="ClickableViewAccessibility" + message="`onTouch` lambda should call `View#performClick` when a click is detected" + errorLine1=" View.OnTouchListener onTouchListener = (View v, MotionEvent ev) -> {" + errorLine2=" ^"> + <location + file="$SRC/components/browser_ui/modaldialog/android/java/src/org/chromium/components/browser_ui/modaldialog/ModalDialogView.java" + line="228" + column="48"/> </issue> - <issue id="ClickableViewAccessibility" message="Custom view ``Button`` has `setOnTouchListener` called on it but does not override `performClick`" errorLine1=" positiveButton.setOnTouchListener(onTouchListener);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/modaldialog/android/java/src/org/chromium/components/browser_ui/modaldialog/ModalDialogView.java" /> + <issue + id="ClickableViewAccessibility" + message="Custom view ``Button`` has `setOnTouchListener` called on it but does not override `performClick`" + errorLine1=" positiveButton.setOnTouchListener(onTouchListener);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/modaldialog/android/java/src/org/chromium/components/browser_ui/modaldialog/ModalDialogView.java" + line="258" + column="9"/> </issue> - <issue id="ClickableViewAccessibility" message="Custom view ``Button`` has `setOnTouchListener` called on it but does not override `performClick`" errorLine1=" negativeButton.setOnTouchListener(onTouchListener);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/modaldialog/android/java/src/org/chromium/components/browser_ui/modaldialog/ModalDialogView.java" /> + <issue + id="ClickableViewAccessibility" + message="Custom view ``Button`` has `setOnTouchListener` called on it but does not override `performClick`" + errorLine1=" negativeButton.setOnTouchListener(onTouchListener);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/modaldialog/android/java/src/org/chromium/components/browser_ui/modaldialog/ModalDialogView.java" + line="260" + column="9"/> </issue> - <issue id="ClickableViewAccessibility" message="Custom view `NoSwipeViewPager` overrides `onTouchEvent` but not `performClick`" errorLine1=" public boolean onTouchEvent(MotionEvent event) {" errorLine2=" ~~~~~~~~~~~~"> - <location file="chrome/android/features/keyboard_accessory/internal/java/src/org/chromium/chrome/browser/keyboard_accessory/sheet_component/NoSwipeViewPager.java" /> + <issue + id="ClickableViewAccessibility" + message="Custom view `NoSwipeViewPager` overrides `onTouchEvent` but not `performClick`" + errorLine1=" public boolean onTouchEvent(MotionEvent event) {" + errorLine2=" ~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/features/keyboard_accessory/internal/java/src/org/chromium/chrome/browser/keyboard_accessory/sheet_component/NoSwipeViewPager.java" + line="24" + column="20"/> </issue> - <issue id="ClickableViewAccessibility" message="`onTouch` should call `View#performClick` when a click is detected" errorLine1=" public boolean onTouch(View v, MotionEvent event) {" errorLine2=" ~~~~~~~"> - <location file="components/browser_ui/photo_picker/android/java/src/org/chromium/components/browser_ui/photo_picker/PickerVideoPlayer.java" /> + <issue + id="ClickableViewAccessibility" + message="`onTouch` should call `View#performClick` when a click is detected" + errorLine1=" public boolean onTouch(View v, MotionEvent event) {" + errorLine2=" ~~~~~~~"> + <location + file="$SRC/components/browser_ui/photo_picker/android/java/src/org/chromium/components/browser_ui/photo_picker/PickerVideoPlayer.java" + line="242" + column="28"/> </issue> - <issue id="ClickableViewAccessibility" message="Custom view `PlayerFrameView` overrides `onTouchEvent` but not `performClick`" errorLine1=" public boolean onTouchEvent(MotionEvent event) {" errorLine2=" ~~~~~~~~~~~~"> - <location file="components/paint_preview/player/android/java/src/org/chromium/components/paintpreview/player/frame/PlayerFrameView.java" /> + <issue + id="ClickableViewAccessibility" + message="Custom view `PlayerFrameView` overrides `onTouchEvent` but not `performClick`" + errorLine1=" public boolean onTouchEvent(MotionEvent event) {" + errorLine2=" ~~~~~~~~~~~~"> + <location + file="$SRC/components/paint_preview/player/android/java/src/org/chromium/components/paintpreview/player/frame/PlayerFrameView.java" + line="143" + column="20"/> </issue> - <issue id="ClickableViewAccessibility" message="Custom view `ScrimView` overrides `onTouchEvent` but not `performClick`" errorLine1=" public boolean onTouchEvent(MotionEvent e) {" errorLine2=" ~~~~~~~~~~~~"> - <location file="components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/scrim/ScrimView.java" /> + <issue + id="ClickableViewAccessibility" + message="Custom view `ScrimView` overrides `onTouchEvent` but not `performClick`" + errorLine1=" public boolean onTouchEvent(MotionEvent e) {" + errorLine2=" ~~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/scrim/ScrimView.java" + line="79" + column="20"/> </issue> - <issue id="ClickableViewAccessibility" message="`onTouch` lambda should call `View#performClick` when a click is detected" errorLine1=" mEmptyViewWrapper.setOnTouchListener((v, event) -> true);" errorLine2=" ~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/selectable_list/SelectableListLayout.java" /> + <issue + id="ClickableViewAccessibility" + message="`onTouch` lambda should call `View#performClick` when a click is detected" + errorLine1=" mEmptyViewWrapper.setOnTouchListener((v, event) -> true);" + errorLine2=" ~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/selectable_list/SelectableListLayout.java" + line="232" + column="46"/> </issue> - <issue id="ClickableViewAccessibility" message="Custom view `ToolbarControlContainer` overrides `onTouchEvent` but not `performClick`" errorLine1=" public boolean onTouchEvent(MotionEvent event) {" errorLine2=" ~~~~~~~~~~~~"> - <location file="chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarControlContainer.java" /> + <issue + id="ClickableViewAccessibility" + message="Custom view `ToolbarControlContainer` overrides `onTouchEvent` but not `performClick`" + errorLine1=" public boolean onTouchEvent(MotionEvent event) {" + errorLine2=" ~~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarControlContainer.java" + line="283" + column="20"/> </issue> - <issue id="ClickableViewAccessibility" message="Custom view `ToolbarPhone` overrides `onTouchEvent` but not `performClick`" errorLine1=" public boolean onTouchEvent(MotionEvent ev) {" errorLine2=" ~~~~~~~~~~~~"> - <location file="chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarPhone.java" /> + <issue + id="ClickableViewAccessibility" + message="Custom view `ToolbarPhone` overrides `onTouchEvent` but not `performClick`" + errorLine1=" public boolean onTouchEvent(MotionEvent ev) {" + errorLine2=" ~~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToolbarPhone.java" + line="522" + column="20"/> </issue> - <issue id="ClickableViewAccessibility" message="Custom view `TouchRestrictingFrameLayout` overrides `onTouchEvent` but not `performClick`" errorLine1=" public boolean onTouchEvent(MotionEvent event) {" errorLine2=" ~~~~~~~~~~~~"> - <location file="components/browser_ui/bottomsheet/android/internal/java/src/org/chromium/components/browser_ui/bottomsheet/TouchRestrictingFrameLayout.java" /> + <issue + id="ClickableViewAccessibility" + message="Custom view `TouchRestrictingFrameLayout` overrides `onTouchEvent` but not `performClick`" + errorLine1=" public boolean onTouchEvent(MotionEvent event) {" + errorLine2=" ~~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/bottomsheet/android/internal/java/src/org/chromium/components/browser_ui/bottomsheet/TouchRestrictingFrameLayout.java" + line="46" + column="20"/> </issue> - <issue id="ClickableViewAccessibility" message="`onTouch` should call `View#performClick` when a click is detected" errorLine1=" public boolean onTouch(View view, MotionEvent event) {" errorLine2=" ~~~~~~~"> - <location file="weblayer/browser/java/org/chromium/weblayer_private/WebContentsGestureStateTracker.java" /> + <issue + id="ClickableViewAccessibility" + message="`onTouch` should call `View#performClick` when a click is detected" + errorLine1=" public boolean onTouch(View view, MotionEvent event) {" + errorLine2=" ~~~~~~~"> + <location + file="$SRC/weblayer/browser/java/org/chromium/weblayer_private/WebContentsGestureStateTracker.java" + line="48" + column="28"/> </issue> - <issue id="KeyboardInaccessibleWidget" message="'clickable' attribute found, please also add 'focusable'" errorLine1=" android:clickable="true"" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/contacts_picker/android/java/res/layout/contacts_list_item_view.xml" /> + <issue + id="KeyboardInaccessibleWidget" + message="'clickable' attribute found, please also add 'focusable'" + errorLine1=" android:clickable="true"" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/contacts_picker/android/java/res/layout/contacts_list_item_view.xml" + line="49" + column="17"/> </issue> - <issue id="KeyboardInaccessibleWidget" message="'clickable' attribute found, please also add 'focusable'" errorLine1=" android:clickable="true"" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/contacts_picker/android/java/res/layout/contacts_list_item_view.xml" /> + <issue + id="KeyboardInaccessibleWidget" + message="'clickable' attribute found, please also add 'focusable'" + errorLine1=" android:clickable="true"" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/contacts_picker/android/java/res/layout/contacts_list_item_view.xml" + line="73" + column="17"/> </issue> - <issue id="KeyboardInaccessibleWidget" message="'clickable' attribute found, please also add 'focusable'" errorLine1=" android:clickable="true"" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/contacts_picker/android/java/res/layout/contacts_list_item_view.xml" /> + <issue + id="KeyboardInaccessibleWidget" + message="'clickable' attribute found, please also add 'focusable'" + errorLine1=" android:clickable="true"" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/contacts_picker/android/java/res/layout/contacts_list_item_view.xml" + line="97" + column="17"/> </issue> - <issue id="KeyboardInaccessibleWidget" message="'clickable' attribute found, please also add 'focusable'" errorLine1=" android:clickable="true"" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/photo_picker/android/java/res/layout/photo_picker_dialog.xml" /> + <issue + id="KeyboardInaccessibleWidget" + message="'clickable' attribute found, please also add 'focusable'" + errorLine1=" android:clickable="true"" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/photo_picker/android/java/res/layout/photo_picker_dialog.xml" + line="41" + column="9"/> </issue> - <issue id="KeyboardInaccessibleWidget" message="'clickable' attribute found, please also add 'focusable'" errorLine1=" android:clickable="true" >" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/android/java/res/layout/search_activity.xml" /> + <issue + id="KeyboardInaccessibleWidget" + message="'clickable' attribute found, please also add 'focusable'" + errorLine1=" android:clickable="true" >" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/android/java/res/layout/search_activity.xml" + line="28" + column="13"/> </issue> - <issue id="KeyboardInaccessibleWidget" message="'clickable' attribute found, please also add 'focusable'" errorLine1=" android:clickable="true"" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chrome/browser/ui/android/toolbar/java/res/layout/start_top_toolbar.xml" /> + <issue + id="KeyboardInaccessibleWidget" + message="'clickable' attribute found, please also add 'focusable'" + errorLine1=" android:clickable="true"" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chrome/browser/ui/android/toolbar/java/res/layout/start_top_toolbar.xml" + line="13" + column="5"/> </issue> - <issue id="KeyboardInaccessibleWidget" message="'clickable' attribute found, please also add 'focusable'" errorLine1=" android:clickable="true"" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/photo_picker/android/java/res/layout/video_player.xml" /> + <issue + id="KeyboardInaccessibleWidget" + message="'clickable' attribute found, please also add 'focusable'" + errorLine1=" android:clickable="true"" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/photo_picker/android/java/res/layout/video_player.xml" + line="37" + column="9"/> </issue> - <issue id="KeyboardInaccessibleWidget" message="'clickable' attribute found, please also add 'focusable'" errorLine1=" android:clickable="true"" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/photo_picker/android/java/res/layout/video_player.xml" /> + <issue + id="KeyboardInaccessibleWidget" + message="'clickable' attribute found, please also add 'focusable'" + errorLine1=" android:clickable="true"" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/photo_picker/android/java/res/layout/video_player.xml" + line="99" + column="17"/> </issue> - <issue id="KeyboardInaccessibleWidget" message="'clickable' attribute found, please also add 'focusable'" errorLine1=" android:clickable="true"" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="components/browser_ui/photo_picker/android/java/res/layout/video_player.xml" /> + <issue + id="KeyboardInaccessibleWidget" + message="'clickable' attribute found, please also add 'focusable'" + errorLine1=" android:clickable="true"" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/browser_ui/photo_picker/android/java/res/layout/video_player.xml" + line="124" + column="17"/> </issue> -</issues> \ No newline at end of file +</issues>
diff --git a/chrome/android/java/res/layout/custom_tabs_handle_view.xml b/chrome/android/java/res/layout/custom_tabs_handle_view.xml index 6427f52..72ae3c1 100644 --- a/chrome/android/java/res/layout/custom_tabs_handle_view.xml +++ b/chrome/android/java/res/layout/custom_tabs_handle_view.xml
@@ -5,17 +5,22 @@ <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="@drawable/custom_tabs_handle_view_shape"> - - <ImageView - android:id="@+id/handle_bar" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginTop="0dp" - android:layout_gravity="center_horizontal" - android:importantForAccessibility="no" - android:src="@drawable/drag_handlebar" - android:tint="@macro/drag_handlebar_color" /> + android:background="@drawable/custom_tabs_handle_view_shape" + tools:ignore="UselessParent"> + <FrameLayout + android:id="@+id/drag_bar" + android:layout_width="match_parent" + android:layout_height="@dimen/custom_tabs_handle_height" + android:background="@drawable/custom_tabs_handle_view_shape"> + <ImageView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="bottom|center_horizontal" + android:importantForAccessibility="no" + android:src="@drawable/drag_handlebar" + android:tint="@macro/drag_handlebar_color" /> + </FrameLayout> </FrameLayout>
diff --git a/chrome/android/java/res/values/dimens.xml b/chrome/android/java/res/values/dimens.xml index eb4958d..2451cdb4 100644 --- a/chrome/android/java/res/values/dimens.xml +++ b/chrome/android/java/res/values/dimens.xml
@@ -286,7 +286,6 @@ <dimen name="custom_tabs_screenshot_height">300dp</dimen> <dimen name="custom_tabs_screenshot_width">190dp</dimen> <dimen name="custom_tabs_handle_height">16dp</dimen> - <dimen name="custom_tabs_drag_bar_height">4dp</dimen> <dimen name="custom_tabs_elevation">8dp</dimen> <dimen name="custom_tabs_shadow_offset">4dp</dimen> <dimen name="custom_tabs_outline_width">1dp</dimen>
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeApplicationImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeApplicationImpl.java index c807738..cef81c045 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeApplicationImpl.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeApplicationImpl.java
@@ -31,7 +31,6 @@ import org.chromium.chrome.browser.vr.VrModuleProvider; import org.chromium.components.browser_ui.util.GlobalDiscardableReferencePool; import org.chromium.components.embedder_support.browser_context.PartitionResolverSupplier; -import org.chromium.components.module_installer.util.ModuleUtil; import org.chromium.components.version_info.Channel; import org.chromium.components.version_info.VersionConstants; import org.chromium.url.GURL; @@ -70,9 +69,6 @@ ApplicationStatus.registerStateListenerForAllActivities( ChromePowerModeVoter.getInstance()); - // Initializes the support for dynamic feature modules (browser only). - ModuleUtil.initApplication(); - if (VersionConstants.CHANNEL == Channel.CANARY) { GURL.setReportDebugThrowableCallback( ChromePureJavaExceptionReporter::reportJavaException);
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/base/SplitCompatApplication.java b/chrome/android/java/src/org/chromium/chrome/browser/base/SplitCompatApplication.java index ca7757f..baa76a3 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/base/SplitCompatApplication.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/base/SplitCompatApplication.java
@@ -204,6 +204,10 @@ if (AppLocaleUtils.shouldUseSystemManagedLocale()) { AppLocaleUtils.maybeMigrateOverrideLanguage(); } + + // Initializes the support for dynamic feature modules. This calls SplitCompat.install + // which if done in onCreate breaks emulated splits on Android T+. + ModuleUtil.initApplication(); } BuildInfo.setFirebaseAppId(FirebaseConfig.getFirebaseAppId());
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/PartialCustomTabHeightStrategy.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/PartialCustomTabHeightStrategy.java index 630bebb..f8967c1 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/PartialCustomTabHeightStrategy.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/PartialCustomTabHeightStrategy.java
@@ -18,6 +18,7 @@ import android.graphics.Rect; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.GradientDrawable; +import android.graphics.drawable.InsetDrawable; import android.os.Build; import android.util.DisplayMetrics; import android.view.Display; @@ -75,7 +76,8 @@ private static final float EXTRA_HEIGHT_RATIO = 0.1f; private static final int SCROLL_DURATION_MS = 200; private static final int NAVBAR_FADE_DURATION_MS = 16; - private static final int SPINNER_FADE_DURATION_MS = 400; + private static final int SPINNER_FADEIN_DURATION_MS = 100; + private static final int SPINNER_FADEOUT_DURATION_MS = 400; @IntDef({HeightStatus.TOP, HeightStatus.INITIAL_HEIGHT, HeightStatus.TRANSITION}) @Retention(RetentionPolicy.SOURCE) @@ -123,14 +125,13 @@ private CircularProgressDrawable mSpinner; private View mToolbarView; private View mToolbarCoordinator; + private int mToolbarColor; private Runnable mPositionUpdater; // Runnable finishing the activity after the exit animation. Non-null when PCCT is closing. @Nullable private Runnable mFinishRunnable; - private int mToolbarColor; - /** A callback to be called once the Custom Tab has been resized. */ interface OnResizedCallback { /** The Custom Tab has been resized. */ @@ -390,6 +391,7 @@ View coordinatorView, CustomTabToolbar toolbar, @Px int toolbarCornerRadius) { mToolbarCoordinator = coordinatorView; mToolbarView = toolbar; + mToolbarColor = toolbar.getBackground().getColor(); roundCorners(coordinatorView, toolbar, toolbarCornerRadius); toolbar.setHandleStrategy(new PartialCustomTabHandleStrategy(mActivity)); } @@ -430,36 +432,41 @@ View handleView = mActivity.findViewById(R.id.custom_tabs_handle_view); handleView.setElevation( mActivity.getResources().getDimensionPixelSize(R.dimen.custom_tabs_elevation)); - View handleBar = handleView.findViewById(R.id.handle_bar); - ViewGroup.MarginLayoutParams lp = - (ViewGroup.MarginLayoutParams) handleBar.getLayoutParams(); - int dragBarTopMargin = - mActivity.getResources().getDimensionPixelSize(R.dimen.custom_tabs_handle_height) - - mActivity.getResources().getDimensionPixelSize( - R.dimen.custom_tabs_drag_bar_height); - lp.setMargins(0, dragBarTopMargin, 0, 0); - - GradientDrawable background = (GradientDrawable) handleView.getBackground(); - background.mutate(); - background.setCornerRadii(new float[] {toolbarCornerRadius, toolbarCornerRadius, - toolbarCornerRadius, toolbarCornerRadius, 0, 0, 0, 0}); updateShadowOffset(); - mToolbarColor = toolbar.getBackground().getColor(); + + GradientDrawable cctBackground = (GradientDrawable) handleView.getBackground(); + adjustCornerRadius(cctBackground, toolbarCornerRadius); + handleView.setBackground(cctBackground); + + // Inner frame |R.id.drag_bar| is used for setting background color to match that of + // the toolbar. Outer frame |R.id.custom_tabs_handle_view| is not suitable since it + // covers the entire client area for rendering outline shadow around the CCT. + View dragBar = handleView.findViewById(R.id.drag_bar); + GradientDrawable dragBarBackground = (GradientDrawable) dragBar.getBackground(); + adjustCornerRadius(dragBarBackground, toolbarCornerRadius); if (mDrawOutlineShadow) { int width = mActivity.getResources().getDimensionPixelSize( R.dimen.custom_tabs_outline_width); - background.setStroke(width, toolbar.getToolbarHairlineColor(mToolbarColor)); + cctBackground.setStroke(width, toolbar.getToolbarHairlineColor(mToolbarColor)); + + // We need an inset to make the outline shadow visible. + dragBar.setBackground(new InsetDrawable(dragBarBackground, width, width, width, 0)); + } else { + dragBar.setBackground(dragBarBackground); } - handleView.setBackground(background); - - // Pass the handle View to CustomTabToolbar for background color management. - toolbar.setHandleView(handleView); + // Pass the drag bar portion to CustomTabToolbar for background color management. + toolbar.setHandleBackground(dragBarBackground); // Having the transparent background is necessary for the shadow effect. mActivity.getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT)); } + private static void adjustCornerRadius(GradientDrawable d, int radius) { + d.mutate(); + d.setCornerRadii(new float[] {radius, radius, radius, radius, 0, 0, 0, 0}); + } + @Override public void setScrimFraction(float scrimFraction) { int scrimColor = mActivity.getResources().getColor(R.color.default_scrim_color); @@ -562,7 +569,7 @@ // animation can always cover the transition artifact. mSpinnerView.animate() .alpha(0f) - .setDuration(SPINNER_FADE_DURATION_MS) + .setDuration(SPINNER_FADEOUT_DURATION_MS) .setListener(mSpinnerFadeoutAnimatorListener); updateNavbarVisibility(true); } @@ -594,7 +601,7 @@ mSpinnerView.clearAnimation(); mSpinnerView.setAlpha(0.f); mSpinnerView.setVisibility(View.VISIBLE); - mSpinnerView.animate().alpha(1.f).setDuration(SPINNER_FADE_DURATION_MS).setListener(null); + mSpinnerView.animate().alpha(1.f).setDuration(SPINNER_FADEIN_DURATION_MS).setListener(null); mSpinner.start(); }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/features/toolbar/CustomTabToolbar.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/features/toolbar/CustomTabToolbar.java index fb3d8af..ba2bab80 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/features/toolbar/CustomTabToolbar.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/features/toolbar/CustomTabToolbar.java
@@ -103,7 +103,7 @@ private ImageButton mCloseButton; private MenuButton mMenuButton; // This View will be non-null only for bottom sheet custom tabs. - private View mHandleView; + private Drawable mHandleDrawable; // Color scheme and tint that will be applied to icons and text. private @BrandedColorScheme int mBrandedColorScheme; @@ -569,15 +569,14 @@ return mLocationBar; } - public void setHandleView(View view) { - mHandleView = view; + public void setHandleBackground(Drawable handleDrawable) { + mHandleDrawable = handleDrawable; setHandleViewBackgroundColor(getBackground().getColor()); } private void setHandleViewBackgroundColor(int color) { - if (mHandleView == null) return; - GradientDrawable drawable = (GradientDrawable) mHandleView.getBackground(); - ((GradientDrawable) drawable.mutate()).setColor(color); + if (mHandleDrawable == null) return; + ((GradientDrawable) mHandleDrawable.mutate()).setColor(color); } @Override
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/WebPaymentIntentHelperTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/WebPaymentIntentHelperTest.java index 1de474a..ce7c24b 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/payments/WebPaymentIntentHelperTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/payments/WebPaymentIntentHelperTest.java
@@ -143,11 +143,10 @@ new HashSet<>( bundle.getStringArrayList(WebPaymentIntentHelper.EXTRA_METHOD_NAMES))); - Bundle expectedMethodDataBundle = - bundle.getParcelable(WebPaymentIntentHelper.EXTRA_METHOD_DATA); - Assert.assertEquals(2, expectedMethodDataBundle.keySet().size()); - Assert.assertEquals("{\"key\":\"value\"}", expectedMethodDataBundle.getString("bobPay")); - Assert.assertEquals("{}", expectedMethodDataBundle.getString("maxPay")); + Bundle methodDataBundle = bundle.getParcelable(WebPaymentIntentHelper.EXTRA_METHOD_DATA); + Assert.assertEquals(2, methodDataBundle.keySet().size()); + Assert.assertEquals("{\"key\":\"value\"}", methodDataBundle.getString("bobPay")); + Assert.assertEquals("{}", methodDataBundle.getString("maxPay")); // The data field is a string because it is PaymentMethodData#stringifiedData. String expectedSerializedModifiers = @@ -829,7 +828,7 @@ @Test @SmallTest @Feature({"Payments"}) - public void createIsReadyToPayIntent() throws Throwable { + public void createIsReadyToPayIntentWithIdentity() throws Throwable { Map<String, PaymentMethodData> methodDataMap = new HashMap<String, PaymentMethodData>(); PaymentMethodData bobPayMethodData = new PaymentMethodData("bobPayMethod", "{\"key\":\"value\"}"); @@ -841,7 +840,7 @@ Intent intent = WebPaymentIntentHelper.createIsReadyToPayIntent("package.name", "service.name", "schemeless.origin", "schemeless.iframe.origin", certificateChain, - methodDataMap); + methodDataMap, /*isIdentityInReadyToPayEnabled=*/true); Assert.assertEquals("package.name", intent.getComponent().getPackageName()); Assert.assertEquals("service.name", intent.getComponent().getClassName()); Bundle bundle = intent.getExtras(); @@ -861,17 +860,49 @@ Assert.assertEquals(new HashSet(Arrays.asList("bobPay", "maxPay")), new HashSet(bundle.getStringArrayList(WebPaymentIntentHelper.EXTRA_METHOD_NAMES))); - Bundle expectedMethodDataBundle = - bundle.getParcelable(WebPaymentIntentHelper.EXTRA_METHOD_DATA); - Assert.assertEquals(2, expectedMethodDataBundle.keySet().size()); - Assert.assertEquals("{\"key\":\"value\"}", expectedMethodDataBundle.getString("bobPay")); - Assert.assertEquals("{}", expectedMethodDataBundle.getString("maxPay")); + Bundle methodDataBundle = bundle.getParcelable(WebPaymentIntentHelper.EXTRA_METHOD_DATA); + Assert.assertEquals(2, methodDataBundle.keySet().size()); + Assert.assertEquals("{\"key\":\"value\"}", methodDataBundle.getString("bobPay")); + Assert.assertEquals("{}", methodDataBundle.getString("maxPay")); } @Test @SmallTest @Feature({"Payments"}) - public void createIsReadyToPayIntentNullPackageNameExceptionTest() throws Throwable { + public void createIsReadyToPayIntentWithoutIdentity() throws Throwable { + Map<String, PaymentMethodData> methodDataMap = new HashMap<String, PaymentMethodData>(); + PaymentMethodData bobPayMethodData = + new PaymentMethodData("bobPayMethod", "{\"key\":\"value\"}"); + PaymentMethodData maxPayMethodData = new PaymentMethodData("maxPayMethod", "{}"); + methodDataMap.put("bobPay", bobPayMethodData); + methodDataMap.put("maxPay", maxPayMethodData); + + byte[][] certificateChain = new byte[][] {{0}}; + + Intent intent = WebPaymentIntentHelper.createIsReadyToPayIntent("package.name", + "service.name", "schemeless.origin", "schemeless.iframe.origin", certificateChain, + methodDataMap, /*isIdentityInReadyToPayEnabled=*/false); + Assert.assertEquals("package.name", intent.getComponent().getPackageName()); + Assert.assertEquals("service.name", intent.getComponent().getClassName()); + Bundle bundle = intent.getExtras(); + Assert.assertNotNull(bundle); + Assert.assertEquals(null, bundle.get(WebPaymentIntentHelper.EXTRA_TOP_ORIGIN)); + Assert.assertEquals(null, bundle.get(WebPaymentIntentHelper.EXTRA_PAYMENT_REQUEST_ORIGIN)); + + Parcelable[] certificateChainParcels = + bundle.getParcelableArray(WebPaymentIntentHelper.EXTRA_TOP_CERTIFICATE_CHAIN); + Assert.assertEquals(null, certificateChainParcels); + Assert.assertEquals( + null, bundle.getStringArrayList(WebPaymentIntentHelper.EXTRA_METHOD_NAMES)); + + Assert.assertEquals(null, bundle.getParcelable(WebPaymentIntentHelper.EXTRA_METHOD_DATA)); + } + + @Test + @SmallTest + @Feature({"Payments"}) + public void createIsReadyToPayIntentNullPackageNameExceptionTestWithIdentity() + throws Throwable { thrown.expect(IllegalArgumentException.class); thrown.expectMessage("packageName should not be null or empty."); @@ -883,6 +914,25 @@ WebPaymentIntentHelper.createIsReadyToPayIntent(/*packageName=*/null, "service.name", "schemeless.origin", "schemeless.iframe.origin", /*certificateChain=*/null, - methodDataMap); + methodDataMap, /*isIdentityInReadyToPayEnabled=*/true); + } + + @Test + @SmallTest + @Feature({"Payments"}) + public void createIsReadyToPayIntentNullPackageNameExceptionTestWithoutIdentity() + throws Throwable { + thrown.expect(IllegalArgumentException.class); + thrown.expectMessage("packageName should not be null or empty."); + + Map<String, PaymentMethodData> methodDataMap = new HashMap<String, PaymentMethodData>(); + PaymentMethodData bobPayMethodData = new PaymentMethodData("method", "null"); + methodDataMap.put("bobPay", bobPayMethodData); + + PaymentItem total = new PaymentItem(new PaymentCurrencyAmount("CAD", "200")); + + WebPaymentIntentHelper.createIsReadyToPayIntent(/*packageName=*/null, "service.name", + "schemeless.origin", "schemeless.iframe.origin", /*certificateChain=*/null, + methodDataMap, /*isIdentityInReadyToPayEnabled=*/false); } }
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index c84cc74..006b71e95 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd
@@ -768,7 +768,7 @@ &Search <ph name="SEARCH_ENGINE">$1<ex>Google</ex></ph> for image </message> <message name="IDS_CONTENT_CONTEXT_SEARCHLENSFORIMAGE" desc="The name of the Search Lens for Image command in the content area context menu"> - Search image with Google Lens + Search image with <ph name="VISUAL_SEARCH_PROVIDER">$1<ex>Google Lens</ex></ph> </message> <message name="IDS_CONTENT_CONTEXT_LENS_REGION_SEARCH_ALT1" desc="The name of the Lens Region Search command in the content area context menu"> Search page with <ph name="VISUAL_SEARCH_PROVIDER">$1<ex>Google Lens</ex></ph> @@ -1025,7 +1025,7 @@ &Search <ph name="SEARCH_ENGINE">$1<ex>Google</ex></ph> for Image </message> <message name="IDS_CONTENT_CONTEXT_SEARCHLENSFORIMAGE" desc="In Title Case: The name of the Search Lens for Image command in the content area context menu"> - Search Image with Google Lens + Search Image with <ph name="VISUAL_SEARCH_PROVIDER">$1<ex>Google Lens</ex></ph> </message> <message name="IDS_CONTENT_CONTEXT_LENS_REGION_SEARCH_ALT1" desc="In Title Case: The name of the Lens Region Search command in the content area context menu"> Search Page with <ph name="VISUAL_SEARCH_PROVIDER">$1<ex>Google</ex></ph>
diff --git a/chrome/app/generated_resources_grd/IDS_CONTENT_CONTEXT_SEARCHLENSFORIMAGE.png.sha1 b/chrome/app/generated_resources_grd/IDS_CONTENT_CONTEXT_SEARCHLENSFORIMAGE.png.sha1 index a5c1ad3c..adf1c44 100644 --- a/chrome/app/generated_resources_grd/IDS_CONTENT_CONTEXT_SEARCHLENSFORIMAGE.png.sha1 +++ b/chrome/app/generated_resources_grd/IDS_CONTENT_CONTEXT_SEARCHLENSFORIMAGE.png.sha1
@@ -1 +1 @@ -7220bacb184bc98d65094f986b1154761486e121 \ No newline at end of file +ff682c8767ee28c2f2d0ec6acda1dd50423180f5 \ No newline at end of file
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc index 00c4dcea..49832d2 100644 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc
@@ -4765,6 +4765,11 @@ flag_descriptions::kPaymentRequestBasicCardName, flag_descriptions::kPaymentRequestBasicCardDescription, kOsAll, FEATURE_VALUE_TYPE(features::kPaymentRequestBasicCard)}, + {"identity-in-can-make-payment", + flag_descriptions::kIdentityInCanMakePaymentEventFeatureName, + flag_descriptions::kIdentityInCanMakePaymentEventFeatureDescription, + kOsAll, + FEATURE_VALUE_TYPE(features::kIdentityInCanMakePaymentEventFeature)}, {"enable-debug-for-store-billing", flag_descriptions::kAppStoreBillingDebugName, flag_descriptions::kAppStoreBillingDebugDescription, kOsAll,
diff --git a/chrome/browser/ash/BUILD.gn b/chrome/browser/ash/BUILD.gn index fdb655f..6dbdc55 100644 --- a/chrome/browser/ash/BUILD.gn +++ b/chrome/browser/ash/BUILD.gn
@@ -2253,6 +2253,7 @@ "//chrome/common:non_code_constants", "//chrome/common/net", "//chromeos/ash/components/assistant:buildflags", + "//chromeos/ash/components/dbus/audio", "//chromeos/ash/components/dbus/biod", "//chromeos/ash/components/dbus/biod:biod_proto", "//chromeos/ash/components/dbus/cros_healthd", @@ -2286,7 +2287,6 @@ "//chromeos/dbus:vm_permission_service_proto", "//chromeos/dbus:vm_sk_forwarding_proto", "//chromeos/dbus/arc", - "//chromeos/dbus/audio", "//chromeos/dbus/cdm_factory_daemon", "//chromeos/dbus/cryptohome:attestation_proto", "//chromeos/dbus/dlcservice:dlcservice_proto",
diff --git a/chrome/browser/ash/app_mode/kiosk_crash_restore_browsertest.cc b/chrome/browser/ash/app_mode/kiosk_crash_restore_browsertest.cc index d28278d..8ca34806 100644 --- a/chrome/browser/ash/app_mode/kiosk_crash_restore_browsertest.cc +++ b/chrome/browser/ash/app_mode/kiosk_crash_restore_browsertest.cc
@@ -68,7 +68,7 @@ cryptohome_id.account_id()); command_line->AppendSwitchASCII( switches::kLoginProfile, - chromeos::UserDataAuthClient::GetStubSanitizedUsername(cryptohome_id)); + UserDataAuthClient::GetStubSanitizedUsername(cryptohome_id)); } void SetUpOnMainThread() override {
diff --git a/chrome/browser/ash/app_mode/kiosk_cryptohome_remover.cc b/chrome/browser/ash/app_mode/kiosk_cryptohome_remover.cc index 6a5696d3..d98d4da7 100644 --- a/chrome/browser/ash/app_mode/kiosk_cryptohome_remover.cc +++ b/chrome/browser/ash/app_mode/kiosk_cryptohome_remover.cc
@@ -28,8 +28,6 @@ namespace { -using ::chromeos::UserDataAuthClient; - void ScheduleDelayedCryptohomeRemoval(const AccountId& account_id) { PrefService* const local_state = g_browser_process->local_state(); {
diff --git a/chrome/browser/ash/app_mode/kiosk_profile_loader.cc b/chrome/browser/ash/app_mode/kiosk_profile_loader.cc index 743f7a32..17fa178 100644 --- a/chrome/browser/ash/app_mode/kiosk_profile_loader.cc +++ b/chrome/browser/ash/app_mode/kiosk_profile_loader.cc
@@ -35,7 +35,6 @@ namespace { -using ::chromeos::UserDataAuthClient; using ::content::BrowserThread; KioskAppLaunchError::Error LoginFailureToKioskAppLaunchError(
diff --git a/chrome/browser/ash/arc/auth/arc_active_directory_enrollment_token_fetcher_browsertest.cc b/chrome/browser/ash/arc/auth/arc_active_directory_enrollment_token_fetcher_browsertest.cc index 04d83fe..6f4d7e7b 100644 --- a/chrome/browser/ash/arc/auth/arc_active_directory_enrollment_token_fetcher_browsertest.cc +++ b/chrome/browser/ash/arc/auth/arc_active_directory_enrollment_token_fetcher_browsertest.cc
@@ -273,9 +273,9 @@ // ArcActiveDirectoryEnrollmentTokenFetcher will succeed to fetch the DM // token. void StoreCorrectDmToken() { - chromeos::FakeCryptohomeMiscClient::Get()->set_system_salt( - chromeos::FakeCryptohomeMiscClient::GetStubSystemSalt()); - chromeos::FakeCryptohomeMiscClient::Get()->SetServiceIsAvailable(true); + ash::FakeCryptohomeMiscClient::Get()->set_system_salt( + ash::FakeCryptohomeMiscClient::GetStubSystemSalt()); + ash::FakeCryptohomeMiscClient::Get()->SetServiceIsAvailable(true); // Store a fake DM token. base::RunLoop run_loop; auto dm_token_storage = std::make_unique<policy::DMTokenStorage>( @@ -296,9 +296,9 @@ // Does not store a correct DM token. // ArcActiveDirectoryEnrollmentTokenFetcher will fail to fetch the DM token. void FailDmToken() { - chromeos::FakeCryptohomeMiscClient::Get()->set_system_salt( + ash::FakeCryptohomeMiscClient::Get()->set_system_salt( std::vector<uint8_t>()); - chromeos::FakeCryptohomeMiscClient::Get()->SetServiceIsAvailable(true); + ash::FakeCryptohomeMiscClient::Get()->SetServiceIsAvailable(true); } void FetchEnrollmentToken(base::RunLoop* run_loop,
diff --git a/chrome/browser/ash/arc/session/arc_session_manager_unittest.cc b/chrome/browser/ash/arc/session/arc_session_manager_unittest.cc index c0507719..fcfee7b 100644 --- a/chrome/browser/ash/arc/session/arc_session_manager_unittest.cc +++ b/chrome/browser/ash/arc/session/arc_session_manager_unittest.cc
@@ -393,8 +393,8 @@ GetFakeUserManager()->AddUser(account_id); GetFakeUserManager()->LoginUser(account_id); - chromeos::CryptohomeMiscClient::InitializeFake(); - chromeos::FakeCryptohomeMiscClient::Get()->set_requires_powerwash(false); + ash::CryptohomeMiscClient::InitializeFake(); + ash::FakeCryptohomeMiscClient::Get()->set_requires_powerwash(false); policy::PowerwashRequirementsChecker::InitializeSynchronouslyForTesting(); ASSERT_EQ(ArcSessionManager::State::NOT_INITIALIZED, @@ -402,7 +402,7 @@ } void TearDown() override { - chromeos::CryptohomeMiscClient::Shutdown(); + ash::CryptohomeMiscClient::Shutdown(); ArcSessionManagerTestBase::TearDown(); } }; @@ -2201,11 +2201,11 @@ void SetUp() override { ArcSessionManagerTestBase::SetUp(); - chromeos::CryptohomeMiscClient::InitializeFake(); + ash::CryptohomeMiscClient::InitializeFake(); } void TearDown() override { - chromeos::CryptohomeMiscClient::Shutdown(); + ash::CryptohomeMiscClient::Shutdown(); ArcSessionManagerTestBase::TearDown(); } }; @@ -2235,7 +2235,7 @@ enterprise_management::DeviceRebootOnUserSignoutProto::ALWAYS); // Initialize cryptohome to require powerwash. - chromeos::FakeCryptohomeMiscClient::Get()->set_requires_powerwash(true); + ash::FakeCryptohomeMiscClient::Get()->set_requires_powerwash(true); policy::PowerwashRequirementsChecker::InitializeSynchronouslyForTesting(); arc_session_manager()->SetProfile(profile());
diff --git a/chrome/browser/ash/crostini/crostini_manager_unittest.cc b/chrome/browser/ash/crostini/crostini_manager_unittest.cc index 413b133..2cbf405 100644 --- a/chrome/browser/ash/crostini/crostini_manager_unittest.cc +++ b/chrome/browser/ash/crostini/crostini_manager_unittest.cc
@@ -251,8 +251,8 @@ ->WaylandServer() ->OverrideServerForTesting(vm_tools::launch::TERMINA, nullptr, {}); - chromeos::CryptohomeMiscClient::InitializeFake(); - chromeos::FakeCryptohomeMiscClient::Get()->set_requires_powerwash(false); + ash::CryptohomeMiscClient::InitializeFake(); + ash::FakeCryptohomeMiscClient::Get()->set_requires_powerwash(false); policy::PowerwashRequirementsChecker::InitializeSynchronouslyForTesting(); TestingBrowserProcess::GetGlobal()->SetSystemNotificationHelper( std::make_unique<SystemNotificationHelper>()); @@ -266,7 +266,7 @@ } void TearDown() override { - chromeos::CryptohomeMiscClient::Shutdown(); + ash::CryptohomeMiscClient::Shutdown(); g_browser_process->platform_part()->ShutdownSchedulerConfigurationManager(); scoped_user_manager_.reset(); crostini_manager_->Shutdown(); @@ -408,7 +408,7 @@ enterprise_management::DeviceRebootOnUserSignoutProto::ALWAYS); // Set cryptohome requiring powerwash. - chromeos::FakeCryptohomeMiscClient::Get()->set_requires_powerwash(true); + ash::FakeCryptohomeMiscClient::Get()->set_requires_powerwash(true); policy::PowerwashRequirementsChecker::InitializeSynchronouslyForTesting(); NotificationDisplayServiceTester notification_service(profile()); @@ -444,9 +444,9 @@ // Reset cryptohome state to undefined and make cryptohome unavailable. policy::PowerwashRequirementsChecker::ResetForTesting(); - chromeos::FakeCryptohomeMiscClient::Get()->SetServiceIsAvailable(false); + ash::FakeCryptohomeMiscClient::Get()->SetServiceIsAvailable(false); policy::PowerwashRequirementsChecker::Initialize(); - chromeos::FakeCryptohomeMiscClient::Get()->ReportServiceIsNotAvailable(); + ash::FakeCryptohomeMiscClient::Get()->ReportServiceIsNotAvailable(); NotificationDisplayServiceTester notification_service(profile());
diff --git a/chrome/browser/ash/dbus/ash_dbus_helper.cc b/chrome/browser/ash/dbus/ash_dbus_helper.cc index 9fd731c2..44a4f46a 100644 --- a/chrome/browser/ash/dbus/ash_dbus_helper.cc +++ b/chrome/browser/ash/dbus/ash_dbus_helper.cc
@@ -16,6 +16,7 @@ #include "chrome/browser/ash/settings/device_settings_service.h" #include "chrome/browser/ash/wilco_dtc_supportd/wilco_dtc_supportd_client.h" #include "chrome/common/chrome_paths.h" +#include "chromeos/ash/components/dbus/audio/cras_audio_client.h" #include "chromeos/ash/components/dbus/authpolicy/authpolicy_client.h" #include "chromeos/ash/components/dbus/biod/biod_client.h" #include "chromeos/ash/components/dbus/cicerone/cicerone_client.h" @@ -49,7 +50,6 @@ #include "chromeos/dbus/arc/arc_camera_client.h" #include "chromeos/dbus/arc/arc_sensor_service_client.h" #include "chromeos/dbus/attestation/attestation_client.h" -#include "chromeos/dbus/audio/cras_audio_client.h" #include "chromeos/dbus/cdm_factory_daemon/cdm_factory_daemon_client.h" #include "chromeos/dbus/constants/dbus_paths.h" #include "chromeos/dbus/dbus_thread_manager.h" @@ -117,7 +117,7 @@ InitializeDBusClient<chromeos::AnomalyDetectorClient>(bus); InitializeDBusClient<chromeos::ArcAppfuseProviderClient>(bus); InitializeDBusClient<chromeos::ArcCameraClient>(bus); - InitializeDBusClient<chromeos::ArcQuotaClient>(bus); + InitializeDBusClient<ArcQuotaClient>(bus); InitializeDBusClient<chromeos::ArcSensorServiceClient>(bus); InitializeDBusClient<chromeos::AttestationClient>(bus); InitializeDBusClient<AuthPolicyClient>(bus); @@ -126,10 +126,10 @@ InitializeDBusClient<CiceroneClient>(bus); // ConciergeClient depends on CiceroneClient. InitializeDBusClient<ConciergeClient>(bus); - InitializeDBusClient<chromeos::CrasAudioClient>(bus); + InitializeDBusClient<CrasAudioClient>(bus); InitializeDBusClient<cros_healthd::CrosHealthdClient>(bus); - InitializeDBusClient<chromeos::CryptohomeMiscClient>(bus); - InitializeDBusClient<chromeos::CryptohomePkcs11Client>(bus); + InitializeDBusClient<CryptohomeMiscClient>(bus); + InitializeDBusClient<CryptohomePkcs11Client>(bus); InitializeDBusClient<CupsProxyClient>(bus); InitializeDBusClient<chromeos::DlcserviceClient>(bus); InitializeDBusClient<chromeos::DlpClient>(bus); @@ -139,7 +139,7 @@ #if BUILDFLAG(ENABLE_HIBERNATE) InitializeDBusClient<HibermanClient>(bus); #endif - InitializeDBusClient<chromeos::InstallAttributesClient>(bus); + InitializeDBusClient<InstallAttributesClient>(bus); InitializeDBusClient<IpPeripheralServiceClient>(bus); InitializeDBusClient<KerberosClient>(bus); InitializeDBusClient<chromeos::LorgnetteManagerClient>(bus); @@ -161,7 +161,7 @@ InitializeDBusClient<TypecdClient>(bus); InitializeDBusClient<chromeos::U2FClient>(bus); InitializeDBusClient<chromeos::UpdateEngineClient>(bus); - InitializeDBusClient<chromeos::UserDataAuthClient>(bus); + InitializeDBusClient<UserDataAuthClient>(bus); InitializeDBusClient<UpstartClient>(bus); InitializeDBusClient<chromeos::VmPluginDispatcherClient>(bus); @@ -221,7 +221,7 @@ // Other D-Bus clients are shut down, also in reverse order of initialization. chromeos::VmPluginDispatcherClient::Shutdown(); UpstartClient::Shutdown(); - chromeos::UserDataAuthClient::Shutdown(); + UserDataAuthClient::Shutdown(); chromeos::UpdateEngineClient::Shutdown(); chromeos::U2FClient::Shutdown(); TypecdClient::Shutdown(); @@ -249,7 +249,7 @@ chromeos::LorgnetteManagerClient::Shutdown(); KerberosClient::Shutdown(); IpPeripheralServiceClient::Shutdown(); - chromeos::InstallAttributesClient::Shutdown(); + InstallAttributesClient::Shutdown(); #if BUILDFLAG(ENABLE_HIBERNATE) HibermanClient::Shutdown(); #endif @@ -259,17 +259,17 @@ chromeos::DlcserviceClient::Shutdown(); chromeos::DlpClient::Shutdown(); CupsProxyClient::Shutdown(); - chromeos::CryptohomePkcs11Client::Shutdown(); - chromeos::CryptohomeMiscClient::Shutdown(); + CryptohomePkcs11Client::Shutdown(); + CryptohomeMiscClient::Shutdown(); cros_healthd::CrosHealthdClient::Shutdown(); - chromeos::CrasAudioClient::Shutdown(); + CrasAudioClient::Shutdown(); ConciergeClient::Shutdown(); CiceroneClient::Shutdown(); chromeos::CdmFactoryDaemonClient::Shutdown(); BiodClient::Shutdown(); AuthPolicyClient::Shutdown(); chromeos::AttestationClient::Shutdown(); - chromeos::ArcQuotaClient::Shutdown(); + ArcQuotaClient::Shutdown(); chromeos::ArcCameraClient::Shutdown(); chromeos::ArcAppfuseProviderClient::Shutdown(); chromeos::AnomalyDetectorClient::Shutdown();
diff --git a/chrome/browser/ash/login/auth/cryptohome_authenticator_unittest.cc b/chrome/browser/ash/login/auth/cryptohome_authenticator_unittest.cc index 2d3fddf..583d97c7 100644 --- a/chrome/browser/ash/login/auth/cryptohome_authenticator_unittest.cc +++ b/chrome/browser/ash/login/auth/cryptohome_authenticator_unittest.cc
@@ -121,7 +121,7 @@ } // Fake UserDataAuthClient implementation for this test. -class TestUserDataAuthClient : public ::chromeos::FakeUserDataAuthClient { +class TestUserDataAuthClient : public FakeUserDataAuthClient { public: TestUserDataAuthClient() = default;
diff --git a/chrome/browser/ash/login/easy_unlock/easy_unlock_create_keys_operation.cc b/chrome/browser/ash/login/easy_unlock/easy_unlock_create_keys_operation.cc index 87384a46..8a4bfbae 100644 --- a/chrome/browser/ash/login/easy_unlock/easy_unlock_create_keys_operation.cc +++ b/chrome/browser/ash/login/easy_unlock/easy_unlock_create_keys_operation.cc
@@ -355,7 +355,7 @@ auth_key->GetSecret()); *request.mutable_account_id() = CreateAccountIdentifierFromIdentification( cryptohome::Identification(user_context_.GetAccountId())); - chromeos::UserDataAuthClient::Get()->AddKey( + UserDataAuthClient::Get()->AddKey( request, base::BindOnce(&EasyUnlockCreateKeysOperation::OnKeyCreated, weak_ptr_factory_.GetWeakPtr(), index, user_key)); }
diff --git a/chrome/browser/ash/login/easy_unlock/easy_unlock_remove_keys_operation.cc b/chrome/browser/ash/login/easy_unlock/easy_unlock_remove_keys_operation.cc index 20cd4e3..89a5d15c 100644 --- a/chrome/browser/ash/login/easy_unlock/easy_unlock_remove_keys_operation.cc +++ b/chrome/browser/ash/login/easy_unlock/easy_unlock_remove_keys_operation.cc
@@ -59,7 +59,7 @@ *request.mutable_authorization_request() = cryptohome::CreateAuthorizationRequest(auth_key->GetLabel(), auth_key->GetSecret()); - chromeos::UserDataAuthClient::Get()->RemoveKey( + UserDataAuthClient::Get()->RemoveKey( request, base::BindOnce(&EasyUnlockRemoveKeysOperation::OnKeyRemoved, weak_ptr_factory_.GetWeakPtr())); }
diff --git a/chrome/browser/ash/login/enrollment/enrollment_screen.cc b/chrome/browser/ash/login/enrollment/enrollment_screen.cc index 1c7851fa..4afd66a 100644 --- a/chrome/browser/ash/login/enrollment/enrollment_screen.cc +++ b/chrome/browser/ash/login/enrollment/enrollment_screen.cc
@@ -378,7 +378,7 @@ return; } user_data_auth::InstallAttributesState state = - chromeos::install_attributes_util::InstallAttributesGetStatus(); + install_attributes_util::InstallAttributesGetStatus(); // TODO(crbug.com/1271134): Logging as "WARNING" to make sure it's preserved // in the logs.
diff --git a/chrome/browser/ash/login/existing_user_controller_browsertest.cc b/chrome/browser/ash/login/existing_user_controller_browsertest.cc index 5c1048a3..fbf1782d 100644 --- a/chrome/browser/ash/login/existing_user_controller_browsertest.cc +++ b/chrome/browser/ash/login/existing_user_controller_browsertest.cc
@@ -893,7 +893,7 @@ AuthPolicyClient::InitializeFake(); FakeAuthPolicyClient::Get()->DisableOperationDelayForTesting(); // Required for tpm_util. Will be destroyed in browser shutdown. - chromeos::UserDataAuthClient::InitializeFake(); + UserDataAuthClient::InitializeFake(); RefreshDevicePolicy(); policy_provider_.SetDefaultReturns(
diff --git a/chrome/browser/ash/login/lock/screen_locker_unittest.cc b/chrome/browser/ash/login/lock/screen_locker_unittest.cc index c9873aa9..f46c288 100644 --- a/chrome/browser/ash/login/lock/screen_locker_unittest.cc +++ b/chrome/browser/ash/login/lock/screen_locker_unittest.cc
@@ -35,11 +35,11 @@ #include "chrome/test/base/testing_browser_process.h" #include "chrome/test/base/testing_profile.h" #include "chrome/test/base/testing_profile_manager.h" +#include "chromeos/ash/components/dbus/audio/cras_audio_client.h" #include "chromeos/ash/components/dbus/biod/biod_client.h" #include "chromeos/ash/components/dbus/concierge/concierge_client.h" #include "chromeos/ash/components/dbus/userdataauth/cryptohome_misc_client.h" #include "chromeos/ash/components/dbus/userdataauth/userdataauth_client.h" -#include "chromeos/dbus/audio/cras_audio_client.h" #include "chromeos/dbus/dbus_thread_manager.h" #include "chromeos/dbus/tpm_manager/tpm_manager_client.h" #include "chromeos/login/login_state/login_state.h"
diff --git a/chrome/browser/ash/login/login_browsertest.cc b/chrome/browser/ash/login/login_browsertest.cc index 2b35e87..6fc19a2 100644 --- a/chrome/browser/ash/login/login_browsertest.cc +++ b/chrome/browser/ash/login/login_browsertest.cc
@@ -146,7 +146,7 @@ EXPECT_TRUE(LoginScreenTestApi::FocusUser(account_id)); OobeScreenWaiter(GaiaView::kScreenId).Wait(); EXPECT_TRUE(LoginScreenTestApi::IsOobeDialogVisible()); - chromeos::FakeUserDataAuthClient::Get()->set_cryptohome_error( + FakeUserDataAuthClient::Get()->set_cryptohome_error( user_data_auth::CRYPTOHOME_ERROR_MOUNT_FATAL); LoginDisplayHost::default_host() @@ -163,7 +163,7 @@ IN_PROC_BROWSER_TEST_P(LoginOfflineTest, FatalScreenShown) { EXPECT_FALSE(LoginScreenTestApi::IsOobeDialogVisible()); - chromeos::FakeUserDataAuthClient::Get()->set_cryptohome_error( + FakeUserDataAuthClient::Get()->set_cryptohome_error( user_data_auth::CRYPTOHOME_ERROR_TPM_UPDATE_REQUIRED); LoginScreenTestApi::SubmitPassword(test_account_id_, "password", /*check_if_submittable=*/false); @@ -173,7 +173,7 @@ IN_PROC_BROWSER_TEST_P(LoginOfflineTest, FatalScreenNotShown) { EXPECT_FALSE(LoginScreenTestApi::IsOobeDialogVisible()); - chromeos::FakeUserDataAuthClient::Get()->set_cryptohome_error( + FakeUserDataAuthClient::Get()->set_cryptohome_error( user_data_auth::CRYPTOHOME_ERROR_AUTHORIZATION_KEY_FAILED); LoginScreenTestApi::SubmitPassword(test_account_id_, "password", /*check_if_submittable=*/false);
diff --git a/chrome/browser/ash/login/quick_unlock/pin_storage_cryptohome.cc b/chrome/browser/ash/login/quick_unlock/pin_storage_cryptohome.cc index 25ce30a4..089a854 100644 --- a/chrome/browser/ash/login/quick_unlock/pin_storage_cryptohome.cc +++ b/chrome/browser/ash/login/quick_unlock/pin_storage_cryptohome.cc
@@ -165,7 +165,7 @@ request.mutable_authorization_request(); request.mutable_key()->mutable_data()->set_label(kCryptohomePinLabel); - chromeos::UserDataAuthClient::Get()->GetKeyData( + UserDataAuthClient::Get()->GetKeyData( request, base::BindOnce(&CheckCryptohomePinKey, std::move(result), false /*require_unlocked*/)); } @@ -217,7 +217,7 @@ cryptohome::Identification(user_context.GetAccountId())); *request.mutable_authorization_request() = cryptohome::CreateAuthorizationRequest(key.GetLabel(), key.GetSecret()); - chromeos::UserDataAuthClient::Get()->AddKey( + UserDataAuthClient::Get()->AddKey( request, base::BindOnce(&OnCryptohomeCallComplete<::user_data_auth::AddKeyReply>, std::move(did_set))); @@ -242,7 +242,7 @@ cryptohome::CreateAuthorizationRequest( user_context.GetKey()->GetLabel(), user_context.GetKey()->GetSecret()); - chromeos::UserDataAuthClient::Get()->RemoveKey( + UserDataAuthClient::Get()->RemoveKey( request, base::BindOnce( &OnCryptohomeCallComplete<::user_data_auth::RemoveKeyReply>, std::move(did_remove))); @@ -274,7 +274,7 @@ *request.mutable_account_id() = cryptohome::CreateAccountIdentifierFromAccountId(account_id); request.mutable_authorization_request(); - chromeos::UserDataAuthClient::Get()->GetKeyData( + UserDataAuthClient::Get()->GetKeyData( request, base::BindOnce(&CheckCryptohomePinKey, std::move(result), true /*require_unlocked*/)); } @@ -299,7 +299,7 @@ request.set_unlock_webauthn_secret(true); } - chromeos::UserDataAuthClient::Get()->CheckKey( + UserDataAuthClient::Get()->CheckKey( request, base::BindOnce(&OnCryptohomeCallComplete<::user_data_auth::CheckKeyReply>, std::move(result)));
diff --git a/chrome/browser/ash/login/quick_unlock/pin_storage_cryptohome_unittest.cc b/chrome/browser/ash/login/quick_unlock/pin_storage_cryptohome_unittest.cc index 66bd610..c606cb3 100644 --- a/chrome/browser/ash/login/quick_unlock/pin_storage_cryptohome_unittest.cc +++ b/chrome/browser/ash/login/quick_unlock/pin_storage_cryptohome_unittest.cc
@@ -133,7 +133,7 @@ // Ensure that has_authorization_request() would return true. request.mutable_authorization_request(); base::RunLoop run_loop; - chromeos::UserDataAuthClient::Get()->AddKey( + UserDataAuthClient::Get()->AddKey( request, base::BindOnce( [](base::OnceClosure closure, absl::optional<::user_data_auth::AddKeyReply> reply) { @@ -161,7 +161,7 @@ // Ensure that has_authorization_request() would return true. request.mutable_authorization_request(); base::RunLoop run_loop; - chromeos::UserDataAuthClient::Get()->AddKey( + UserDataAuthClient::Get()->AddKey( request, base::BindOnce( [](base::OnceClosure closure, absl::optional<::user_data_auth::AddKeyReply> reply) {
diff --git a/chrome/browser/ash/login/screens/enable_debugging_screen.cc b/chrome/browser/ash/login/screens/enable_debugging_screen.cc index 5583e246..9d3ff094 100644 --- a/chrome/browser/ash/login/screens/enable_debugging_screen.cc +++ b/chrome/browser/ash/login/screens/enable_debugging_screen.cc
@@ -121,7 +121,7 @@ void EnableDebuggingScreen::WaitForCryptohome() { UpdateUIState(EnableDebuggingScreenView::UI_STATE_WAIT); - chromeos::UserDataAuthClient* client = chromeos::UserDataAuthClient::Get(); + UserDataAuthClient* client = UserDataAuthClient::Get(); client->WaitForServiceToBeAvailable(base::BindOnce( &EnableDebuggingScreen::OnCryptohomeDaemonAvailabilityChecked, weak_ptr_factory_.GetWeakPtr()));
diff --git a/chrome/browser/ash/login/screens/pin_setup_screen_browsertest.cc b/chrome/browser/ash/login/screens/pin_setup_screen_browsertest.cc index 2b0d4a19..d65fe21 100644 --- a/chrome/browser/ash/login/screens/pin_setup_screen_browsertest.cc +++ b/chrome/browser/ash/login/screens/pin_setup_screen_browsertest.cc
@@ -43,7 +43,7 @@ // which perform the necessary setup so that the PIN setup screen is shown. class PinSetupScreenTest : public OobeBaseTest { public: - PinSetupScreenTest() { chromeos::UserDataAuthClient::InitializeFake(); } + PinSetupScreenTest() { UserDataAuthClient::InitializeFake(); } ~PinSetupScreenTest() override = default;
diff --git a/chrome/browser/ash/login/screens/user_selection_screen_browsertest.cc b/chrome/browser/ash/login/screens/user_selection_screen_browsertest.cc index 40cab87b..86e23f54 100644 --- a/chrome/browser/ash/login/screens/user_selection_screen_browsertest.cc +++ b/chrome/browser/ash/login/screens/user_selection_screen_browsertest.cc
@@ -299,8 +299,6 @@ run_loop_->Quit(); } - void OnColorModeThemed(bool is_themed) override {} - void WaitForColorModeChange() { if (!wait_for_color_mode_change_) return;
diff --git a/chrome/browser/ash/login/test/cryptohome_mixin.cc b/chrome/browser/ash/login/test/cryptohome_mixin.cc index 278f259b..118ed14 100644 --- a/chrome/browser/ash/login/test/cryptohome_mixin.cc +++ b/chrome/browser/ash/login/test/cryptohome_mixin.cc
@@ -20,8 +20,8 @@ void CryptohomeMixin::MarkUserAsExisting(const AccountId& user) { auto account_id = cryptohome::CreateAccountIdentifierFromAccountId(user); - if (chromeos::FakeUserDataAuthClient::Get() != nullptr) { - chromeos::FakeUserDataAuthClient::Get()->AddExistingUser(account_id); + if (FakeUserDataAuthClient::Get() != nullptr) { + FakeUserDataAuthClient::Get()->AddExistingUser(account_id); } else { pending_users_.emplace(account_id); } @@ -30,8 +30,8 @@ void CryptohomeMixin::SetUpOnMainThread() { while (!pending_users_.empty()) { auto user = pending_users_.front(); - chromeos::FakeUserDataAuthClient::Get()->AddExistingUser(user); - chromeos::FakeUserDataAuthClient::Get()->CreateUserProfileDir(user); + FakeUserDataAuthClient::Get()->AddExistingUser(user); + FakeUserDataAuthClient::Get()->CreateUserProfileDir(user); pending_users_.pop(); } }
diff --git a/chrome/browser/ash/login/test/cryptohome_mixin_unittest.cc b/chrome/browser/ash/login/test/cryptohome_mixin_unittest.cc index 47a77165..33ba3c6 100644 --- a/chrome/browser/ash/login/test/cryptohome_mixin_unittest.cc +++ b/chrome/browser/ash/login/test/cryptohome_mixin_unittest.cc
@@ -19,14 +19,14 @@ } void TearDown() override { - if (chromeos::FakeUserDataAuthClient::Get() != nullptr) { - chromeos::FakeUserDataAuthClient::Shutdown(); + if (FakeUserDataAuthClient::Get() != nullptr) { + FakeUserDataAuthClient::Shutdown(); } } protected: void InitializeFakeUserDataAuthClient() { - chromeos::UserDataAuthClient::InitializeFake(); + UserDataAuthClient::InitializeFake(); } std::unique_ptr<CryptohomeMixin> cryptohome_mixin_;
diff --git a/chrome/browser/ash/login/test/user_policy_mixin.cc b/chrome/browser/ash/login/test/user_policy_mixin.cc index 878db52..d6a07c2 100644 --- a/chrome/browser/ash/login/test/user_policy_mixin.cc +++ b/chrome/browser/ash/login/test/user_policy_mixin.cc
@@ -74,7 +74,7 @@ &user_keys_dir)); const std::string sanitized_username = - chromeos::UserDataAuthClient::GetStubSanitizedUsername( + UserDataAuthClient::GetStubSanitizedUsername( cryptohome::CreateAccountIdentifierFromAccountId(account_id_)); const base::FilePath user_key_file = user_keys_dir.AppendASCII(sanitized_username).AppendASCII("policy.pub");
diff --git a/chrome/browser/ash/login/users/avatar/user_image_manager_browsertest.cc b/chrome/browser/ash/login/users/avatar/user_image_manager_browsertest.cc index c378e32b..e2556fe 100644 --- a/chrome/browser/ash/login/users/avatar/user_image_manager_browsertest.cc +++ b/chrome/browser/ash/login/users/avatar/user_image_manager_browsertest.cc
@@ -573,7 +573,7 @@ ASSERT_TRUE(base::PathService::Get( chromeos::dbus_paths::DIR_USER_POLICY_KEYS, &user_keys_dir)); const std::string sanitized_username = - chromeos::UserDataAuthClient::GetStubSanitizedUsername(cryptohome_id_); + UserDataAuthClient::GetStubSanitizedUsername(cryptohome_id_); const base::FilePath user_key_file = user_keys_dir.AppendASCII(sanitized_username).AppendASCII("policy.pub"); std::vector<uint8_t> user_key_bits;
diff --git a/chrome/browser/ash/login/users/chrome_user_manager_impl.cc b/chrome/browser/ash/login/users/chrome_user_manager_impl.cc index da8564bd..db7244d 100644 --- a/chrome/browser/ash/login/users/chrome_user_manager_impl.cc +++ b/chrome/browser/ash/login/users/chrome_user_manager_impl.cc
@@ -275,7 +275,7 @@ if (base::CommandLine::ForCurrentProcess()->HasSwitch(::switches::kTestType)) return; - chromeos::UserDataAuthClient::Get()->IsMounted( + UserDataAuthClient::Get()->IsMounted( user_data_auth::IsMountedRequest(), base::BindOnce(&CheckCryptohomeIsMounted)); @@ -1396,7 +1396,7 @@ user_data_auth::RemoveRequest request; *request.mutable_identifier() = account_id_proto; - chromeos::UserDataAuthClient::Get()->Remove( + UserDataAuthClient::Get()->Remove( request, base::BindOnce(&OnRemoveUserComplete, account_id)); }
diff --git a/chrome/browser/ash/login/users/wallpaper_policy_browsertest.cc b/chrome/browser/ash/login/users/wallpaper_policy_browsertest.cc index 548bf527..d8a7f9fc 100644 --- a/chrome/browser/ash/login/users/wallpaper_policy_browsertest.cc +++ b/chrome/browser/ash/login/users/wallpaper_policy_browsertest.cc
@@ -147,7 +147,7 @@ EXPECT_TRUE(base::PathService::Get( chromeos::dbus_paths::DIR_USER_POLICY_KEYS, &user_keys_dir)); const std::string sanitized_user_id = - chromeos::UserDataAuthClient::GetStubSanitizedUsername( + UserDataAuthClient::GetStubSanitizedUsername( cryptohome::CreateAccountIdentifierFromAccountId(account_id)); const base::FilePath user_key_file = user_keys_dir.AppendASCII(sanitized_user_id).AppendASCII("policy.pub");
diff --git a/chrome/browser/ash/notifications/low_disk_notification.cc b/chrome/browser/ash/notifications/low_disk_notification.cc index 5f07b9b..706cef60 100644 --- a/chrome/browser/ash/notifications/low_disk_notification.cc +++ b/chrome/browser/ash/notifications/low_disk_notification.cc
@@ -44,13 +44,13 @@ LowDiskNotification::LowDiskNotification() : notification_interval_(kNotificationInterval) { - DCHECK(chromeos::UserDataAuthClient::Get()); - chromeos::UserDataAuthClient::Get()->AddObserver(this); + DCHECK(UserDataAuthClient::Get()); + UserDataAuthClient::Get()->AddObserver(this); } LowDiskNotification::~LowDiskNotification() { - DCHECK(chromeos::UserDataAuthClient::Get()); - chromeos::UserDataAuthClient::Get()->RemoveObserver(this); + DCHECK(UserDataAuthClient::Get()); + UserDataAuthClient::Get()->RemoveObserver(this); } void LowDiskNotification::LowDiskSpace(
diff --git a/chrome/browser/ash/notifications/low_disk_notification.h b/chrome/browser/ash/notifications/low_disk_notification.h index c7cf6400..2c43c2e 100644 --- a/chrome/browser/ash/notifications/low_disk_notification.h +++ b/chrome/browser/ash/notifications/low_disk_notification.h
@@ -26,7 +26,7 @@ // This class should be created after DBus has been initialized and destroyed // before DBus has been shutdown. // This class must be instantiated on the UI thread. -class LowDiskNotification : public chromeos::UserDataAuthClient::Observer { +class LowDiskNotification : public UserDataAuthClient::Observer { public: // Registers this class as the UserDataAuthClient LowDiskSpaceHandler. LowDiskNotification();
diff --git a/chrome/browser/ash/notifications/low_disk_notification_unittest.cc b/chrome/browser/ash/notifications/low_disk_notification_unittest.cc index ce7f3ca7..2214255 100644 --- a/chrome/browser/ash/notifications/low_disk_notification_unittest.cc +++ b/chrome/browser/ash/notifications/low_disk_notification_unittest.cc
@@ -43,7 +43,7 @@ void SetUp() override { BrowserWithTestWindowTest::SetUp(); - chromeos::UserDataAuthClient::InitializeFake(); + UserDataAuthClient::InitializeFake(); GetCrosSettingsHelper()->ReplaceDeviceSettingsProviderWithStub(); GetCrosSettingsHelper()->SetBoolean(kDeviceShowLowDiskSpaceNotification, @@ -69,7 +69,7 @@ void TearDown() override { low_disk_notification_.reset(); - chromeos::UserDataAuthClient::Shutdown(); + UserDataAuthClient::Shutdown(); BrowserWithTestWindowTest::TearDown(); }
diff --git a/chrome/browser/ash/os_feedback/chrome_os_feedback_delegate.cc b/chrome/browser/ash/os_feedback/chrome_os_feedback_delegate.cc index 9d43e78..61b4157e 100644 --- a/chrome/browser/ash/os_feedback/chrome_os_feedback_delegate.cc +++ b/chrome/browser/ash/os_feedback/chrome_os_feedback_delegate.cc
@@ -94,6 +94,7 @@ constexpr char kFeedbackUserConsentGrantedValue[] = "true"; // Consent value matches JavaScript: `String(false)`. constexpr char kFeedbackUserConsentDeniedValue[] = "false"; +constexpr char kExtraDiagnosticsKey[] = "EXTRA_DIAGNOSTICS"; } // namespace @@ -177,6 +178,11 @@ if (feedback_context->page_url.has_value()) { feedback_data->set_page_url(feedback_context->page_url.value().spec()); } + if (feedback_context->extra_diagnostics.has_value() && + !feedback_context->extra_diagnostics.value().empty()) { + feedback_data->AddLog(kExtraDiagnosticsKey, + feedback_context->extra_diagnostics.value()); + } scoped_refptr<base::RefCountedMemory> png_data = GetScreenshotData(); if (report->include_screenshot && png_data && png_data.get()) {
diff --git a/chrome/browser/ash/os_feedback/chrome_os_feedback_delegate_browsertest.cc b/chrome/browser/ash/os_feedback/chrome_os_feedback_delegate_browsertest.cc index bf1d292..1d61cc1c 100644 --- a/chrome/browser/ash/os_feedback/chrome_os_feedback_delegate_browsertest.cc +++ b/chrome/browser/ash/os_feedback/chrome_os_feedback_delegate_browsertest.cc
@@ -53,6 +53,9 @@ using feedback::FeedbackData; using testing::_; +constexpr char kExtraDiagnosticsKey[] = "EXTRA_DIAGNOSTICS"; +constexpr char kFakeExtraDiagnosticsValue[] = + "Failed to connect to wifi network."; constexpr char kPageUrl[] = "https://www.google.com/?q=123"; constexpr char kSignedInUserEmail[] = "test_user_email@gmail.com"; constexpr char kFeedbackUserConsentKey[] = "feedbackUserCtlConsent"; @@ -161,6 +164,7 @@ // - System logs and histograms are included. // - Screenshot is included. // - Consent granted. +// - Non-empty extra_diagnostics provided. // TODO(xiangdongkong): Add tests for other flags once they are supported. // Currently, only load_system_info and send_histograms flags are implemented. IN_PROC_BROWSER_TEST_F(ChromeOsFeedbackDelegateTest, @@ -170,6 +174,7 @@ report->description = kDescription; report->include_screenshot = true; report->contact_user_consent_granted = true; + report->feedback_context->extra_diagnostics = kFakeExtraDiagnosticsValue; report->include_system_logs_and_histograms = true; const FeedbackParams expected_params{/*is_internal_email=*/false, @@ -192,6 +197,10 @@ EXPECT_NE(feedback_data->sys_info()->end(), consent_granted); EXPECT_EQ(kFeedbackUserConsentKey, consent_granted->first); EXPECT_EQ(kFeedbackUserConsentGrantedValue, consent_granted->second); + auto extra_diagnostics = + feedback_data->sys_info()->find(kExtraDiagnosticsKey); + EXPECT_EQ(kExtraDiagnosticsKey, extra_diagnostics->first); + EXPECT_EQ(kFakeExtraDiagnosticsValue, extra_diagnostics->second); } // Test that feedback params and data are populated with correct data before @@ -199,12 +208,14 @@ // - System logs and histograms are not included. // - Screenshot is not included. // - Consent not granted. +// - Empty string Extra Diagnostics provided. IN_PROC_BROWSER_TEST_F(ChromeOsFeedbackDelegateTest, FeedbackDataPopulatedNotIncludeSysLogsOrScreenshot) { ReportPtr report = Report::New(); report->feedback_context = FeedbackContext::New(); report->feedback_context->email = kSignedInUserEmail; report->feedback_context->page_url = GURL(kPageUrl); + report->feedback_context->extra_diagnostics = std::string(); report->description = kDescription; report->include_screenshot = false; report->contact_user_consent_granted = false; @@ -230,6 +241,9 @@ EXPECT_NE(feedback_data->sys_info()->end(), consent_denied); EXPECT_EQ(kFeedbackUserConsentKey, consent_denied->first); EXPECT_EQ(kFeedbackUserConsentDeniedValue, consent_denied->second); + auto extra_diagnostics = + feedback_data->sys_info()->find(kExtraDiagnosticsKey); + EXPECT_EQ(feedback_data->sys_info()->end(), extra_diagnostics); } // Test GetScreenshot returns correct data when there is a screenshot.
diff --git a/chrome/browser/ash/policy/affiliation/affiliation_test_helper.cc b/chrome/browser/ash/policy/affiliation/affiliation_test_helper.cc index b2c6867..2678e87 100644 --- a/chrome/browser/ash/policy/affiliation/affiliation_test_helper.cc +++ b/chrome/browser/ash/policy/affiliation/affiliation_test_helper.cc
@@ -59,7 +59,7 @@ ASSERT_TRUE(base::PathService::Get(chromeos::dbus_paths::DIR_USER_POLICY_KEYS, &user_keys_dir)); const std::string sanitized_username = - chromeos::UserDataAuthClient::GetStubSanitizedUsername( + ash::UserDataAuthClient::GetStubSanitizedUsername( cryptohome::CreateAccountIdentifierFromAccountId(account_id)); const base::FilePath user_key_file = user_keys_dir.AppendASCII(sanitized_username).AppendASCII("policy.pub");
diff --git a/chrome/browser/ash/policy/affiliation/user_affiliation_browsertest.cc b/chrome/browser/ash/policy/affiliation/user_affiliation_browsertest.cc index 5296786..ef6464d 100644 --- a/chrome/browser/ash/policy/affiliation/user_affiliation_browsertest.cc +++ b/chrome/browser/ash/policy/affiliation/user_affiliation_browsertest.cc
@@ -139,8 +139,7 @@ cryptohome_id.account_id()); command_line->AppendSwitchASCII( ash::switches::kLoginProfile, - chromeos::UserDataAuthClient::GetStubSanitizedUsername( - cryptohome_id)); + ash::UserDataAuthClient::GetStubSanitizedUsername(cryptohome_id)); } }
diff --git a/chrome/browser/ash/policy/core/cached_policy_key_loader.cc b/chrome/browser/ash/policy/core/cached_policy_key_loader.cc index 4192ae0..1b9ffb10 100644 --- a/chrome/browser/ash/policy/core/cached_policy_key_loader.cc +++ b/chrome/browser/ash/policy/core/cached_policy_key_loader.cc
@@ -34,7 +34,7 @@ } // namespace CachedPolicyKeyLoader::CachedPolicyKeyLoader( - chromeos::CryptohomeMiscClient* cryptohome_misc_client, + ash::CryptohomeMiscClient* cryptohome_misc_client, scoped_refptr<base::SequencedTaskRunner> task_runner, const AccountId& account_id, const base::FilePath& user_policy_key_dir)
diff --git a/chrome/browser/ash/policy/core/cached_policy_key_loader.h b/chrome/browser/ash/policy/core/cached_policy_key_loader.h index fb89bd8..ec2d17c7 100644 --- a/chrome/browser/ash/policy/core/cached_policy_key_loader.h +++ b/chrome/browser/ash/policy/core/cached_policy_key_loader.h
@@ -17,12 +17,12 @@ #include "components/account_id/account_id.h" #include "third_party/abseil-cpp/absl/types/optional.h" -namespace base { -class SequencedTaskRunner; +namespace ash { +class CryptohomeMiscClient; } -namespace chromeos { -class CryptohomeMiscClient; +namespace base { +class SequencedTaskRunner; } namespace policy { @@ -30,7 +30,7 @@ // Loads policy key cached by session_manager. class CachedPolicyKeyLoader { public: - CachedPolicyKeyLoader(chromeos::CryptohomeMiscClient* cryptohome_misc_client, + CachedPolicyKeyLoader(ash::CryptohomeMiscClient* cryptohome_misc_client, scoped_refptr<base::SequencedTaskRunner> task_runner, const AccountId& account_id, const base::FilePath& user_policy_key_dir); @@ -75,7 +75,7 @@ // Task runner for background file operations. scoped_refptr<base::SequencedTaskRunner> task_runner_; - chromeos::CryptohomeMiscClient* const cryptohome_misc_client_; + ash::CryptohomeMiscClient* const cryptohome_misc_client_; const AccountId account_id_; const base::FilePath user_policy_key_dir_; base::FilePath cached_policy_key_path_;
diff --git a/chrome/browser/ash/policy/core/cached_policy_key_loader_unittest.cc b/chrome/browser/ash/policy/core/cached_policy_key_loader_unittest.cc index dd90da3..15dedf13 100644 --- a/chrome/browser/ash/policy/core/cached_policy_key_loader_unittest.cc +++ b/chrome/browser/ash/policy/core/cached_policy_key_loader_unittest.cc
@@ -54,7 +54,7 @@ base::FilePath user_policy_key_file() const { const std::string sanitized_username = - chromeos::UserDataAuthClient::GetStubSanitizedUsername(cryptohome_id_); + ash::UserDataAuthClient::GetStubSanitizedUsername(cryptohome_id_); return user_policy_keys_dir() .AppendASCII(sanitized_username) .AppendASCII("policy.pub"); @@ -74,7 +74,7 @@ base::test::TaskEnvironment task_environment_{ base::test::TaskEnvironment::MainThreadType::UI}; - chromeos::FakeCryptohomeMiscClient cryptohome_misc_client_; + ash::FakeCryptohomeMiscClient cryptohome_misc_client_; const AccountId account_id_ = AccountId::FromUserEmail(kTestUserName); const cryptohome::AccountIdentifier cryptohome_id_ = cryptohome::CreateAccountIdentifierFromAccountId(account_id_);
diff --git a/chrome/browser/ash/policy/core/device_cloud_policy_manager_ash_unittest.cc b/chrome/browser/ash/policy/core/device_cloud_policy_manager_ash_unittest.cc index 4143be43d..43d5ad9 100644 --- a/chrome/browser/ash/policy/core/device_cloud_policy_manager_ash_unittest.cc +++ b/chrome/browser/ash/policy/core/device_cloud_policy_manager_ash_unittest.cc
@@ -197,13 +197,13 @@ base::RunLoop().RunUntilIdle(); if (set_empty_system_salt_) { - chromeos::FakeCryptohomeMiscClient::Get()->set_system_salt( + ash::FakeCryptohomeMiscClient::Get()->set_system_salt( std::vector<uint8_t>()); } ash::InstallAttributesClient::InitializeFake(); install_attributes_ = std::make_unique<ash::InstallAttributes>( - chromeos::FakeInstallAttributesClient::Get()); + ash::FakeInstallAttributesClient::Get()); store_ = new DeviceCloudPolicyStoreAsh(device_settings_service_.get(), install_attributes_.get(), base::ThreadTaskRunnerHandle::Get());
diff --git a/chrome/browser/ash/policy/core/device_cloud_policy_store_ash_unittest.cc b/chrome/browser/ash/policy/core/device_cloud_policy_store_ash_unittest.cc index d245e7cc..abca4c5 100644 --- a/chrome/browser/ash/policy/core/device_cloud_policy_store_ash_unittest.cc +++ b/chrome/browser/ash/policy/core/device_cloud_policy_store_ash_unittest.cc
@@ -132,10 +132,10 @@ void ResetToNonEnterprise() { store_->RemoveObserver(&observer_); store_.reset(); - chromeos::install_attributes_util::InstallAttributesSet("enterprise.owned", - std::string()); + ash::install_attributes_util::InstallAttributesSet("enterprise.owned", + std::string()); install_attributes_ = std::make_unique<ash::InstallAttributes>( - chromeos::FakeInstallAttributesClient::Get()); + ash::FakeInstallAttributesClient::Get()); store_ = std::make_unique<DeviceCloudPolicyStoreAsh>( device_settings_service_.get(), install_attributes_.get(), base::ThreadTaskRunnerHandle::Get());
diff --git a/chrome/browser/ash/policy/core/dm_token_storage_unittest.cc b/chrome/browser/ash/policy/core/dm_token_storage_unittest.cc index 4723778..fa454d9 100644 --- a/chrome/browser/ash/policy/core/dm_token_storage_unittest.cc +++ b/chrome/browser/ash/policy/core/dm_token_storage_unittest.cc
@@ -17,7 +17,7 @@ #include "content/public/test/browser_task_environment.h" #include "testing/gtest/include/gtest/gtest.h" -using chromeos::FakeCryptohomeMiscClient; +using ash::FakeCryptohomeMiscClient; namespace policy { @@ -48,7 +48,7 @@ void SetUp() override { chromeos::DBusThreadManager::Initialize(); - chromeos::CryptohomeMiscClient::InitializeFake(); + ash::CryptohomeMiscClient::InitializeFake(); SetSaltAvailable(); chromeos::SystemSaltGetter::Initialize(); @@ -57,7 +57,7 @@ void TearDown() override { dm_token_storage_.reset(); chromeos::SystemSaltGetter::Shutdown(); - chromeos::CryptohomeMiscClient::Shutdown(); + ash::CryptohomeMiscClient::Shutdown(); chromeos::DBusThreadManager::Shutdown(); base::RunLoop().RunUntilIdle(); }
diff --git a/chrome/browser/ash/policy/core/user_cloud_policy_store_ash.cc b/chrome/browser/ash/policy/core/user_cloud_policy_store_ash.cc index ec7775c..4077f55 100644 --- a/chrome/browser/ash/policy/core/user_cloud_policy_store_ash.cc +++ b/chrome/browser/ash/policy/core/user_cloud_policy_store_ash.cc
@@ -37,7 +37,7 @@ } // namespace UserCloudPolicyStoreAsh::UserCloudPolicyStoreAsh( - chromeos::CryptohomeMiscClient* cryptohome_misc_client, + ash::CryptohomeMiscClient* cryptohome_misc_client, ash::SessionManagerClient* session_manager_client, scoped_refptr<base::SequencedTaskRunner> background_task_runner, const AccountId& account_id,
diff --git a/chrome/browser/ash/policy/core/user_cloud_policy_store_ash.h b/chrome/browser/ash/policy/core/user_cloud_policy_store_ash.h index aa1c256..ed08b64 100644 --- a/chrome/browser/ash/policy/core/user_cloud_policy_store_ash.h +++ b/chrome/browser/ash/policy/core/user_cloud_policy_store_ash.h
@@ -16,12 +16,12 @@ #include "components/policy/core/common/cloud/cloud_policy_validator.h" #include "components/policy/core/common/cloud/user_cloud_policy_store_base.h" -namespace base { -class SequencedTaskRunner; +namespace ash { +class CryptohomeMiscClient; } -namespace chromeos { -class CryptohomeMiscClient; +namespace base { +class SequencedTaskRunner; } namespace policy { @@ -41,7 +41,7 @@ // notably signature validation is disabled. It is essential that this flag // is only set when install attributes are locked into Active Directory mode. UserCloudPolicyStoreAsh( - chromeos::CryptohomeMiscClient* cryptohome_misc_client, + ash::CryptohomeMiscClient* cryptohome_misc_client, ash::SessionManagerClient* session_manager_client, scoped_refptr<base::SequencedTaskRunner> background_task_runner, const AccountId& account_id,
diff --git a/chrome/browser/ash/policy/core/user_cloud_policy_store_ash_unittest.cc b/chrome/browser/ash/policy/core/user_cloud_policy_store_ash_unittest.cc index d199d11d..bbfbe10 100644 --- a/chrome/browser/ash/policy/core/user_cloud_policy_store_ash_unittest.cc +++ b/chrome/browser/ash/policy/core/user_cloud_policy_store_ash_unittest.cc
@@ -59,7 +59,7 @@ const base::FilePath& user_policy_dir, const cryptohome::AccountIdentifier& cryptohome_id) { const std::string sanitized_username = - chromeos::UserDataAuthClient::GetStubSanitizedUsername(cryptohome_id); + ash::UserDataAuthClient::GetStubSanitizedUsername(cryptohome_id); return user_policy_dir.AppendASCII(sanitized_username) .AppendASCII("policy.pub"); } @@ -244,7 +244,7 @@ } base::test::SingleThreadTaskEnvironment task_environment_; - chromeos::FakeCryptohomeMiscClient cryptohome_misc_client_; + ash::FakeCryptohomeMiscClient cryptohome_misc_client_; std::unique_ptr<FakeSessionManagerClient> session_manager_client_; UserPolicyBuilder policy_; MockCloudPolicyStoreObserver observer_;
diff --git a/chrome/browser/ash/policy/core/user_policy_manager_builder_ash.cc b/chrome/browser/ash/policy/core/user_policy_manager_builder_ash.cc index e4cb91d..f17a86ba 100644 --- a/chrome/browser/ash/policy/core/user_policy_manager_builder_ash.cc +++ b/chrome/browser/ash/policy/core/user_policy_manager_builder_ash.cc
@@ -249,9 +249,9 @@ std::unique_ptr<UserCloudPolicyStoreAsh> store = std::make_unique<UserCloudPolicyStoreAsh>( - chromeos::CryptohomeMiscClient::Get(), - ash::SessionManagerClient::Get(), background_task_runner, account_id, - policy_key_dir, is_active_directory); + ash::CryptohomeMiscClient::Get(), ash::SessionManagerClient::Get(), + background_task_runner, account_id, policy_key_dir, + is_active_directory); scoped_refptr<base::SequencedTaskRunner> backend_task_runner = base::ThreadPool::CreateSequencedTaskRunner(
diff --git a/chrome/browser/ash/policy/handlers/lock_to_single_user_manager.cc b/chrome/browser/ash/policy/handlers/lock_to_single_user_manager.cc index aca03d9..97584b1 100644 --- a/chrome/browser/ash/policy/handlers/lock_to_single_user_manager.cc +++ b/chrome/browser/ash/policy/handlers/lock_to_single_user_manager.cc
@@ -142,7 +142,7 @@ user_manager::UserManager::Get()->GetPrimaryUser()->GetAccountId()); RebootOnSignOutRequest request; request.mutable_account_id()->CopyFrom(account_id); - chromeos::CryptohomeMiscClient::Get()->LockToSingleUserMountUntilReboot( + ash::CryptohomeMiscClient::Get()->LockToSingleUserMountUntilReboot( request, base::BindOnce( &LockToSingleUserManager::OnLockToSingleUserMountUntilRebootDone,
diff --git a/chrome/browser/ash/policy/handlers/lock_to_single_user_manager_unittest.cc b/chrome/browser/ash/policy/handlers/lock_to_single_user_manager_unittest.cc index 613c800..08a79633 100644 --- a/chrome/browser/ash/policy/handlers/lock_to_single_user_manager_unittest.cc +++ b/chrome/browser/ash/policy/handlers/lock_to_single_user_manager_unittest.cc
@@ -59,7 +59,7 @@ arc::SetArcAvailableCommandLineForTesting( base::CommandLine::ForCurrentProcess()); chromeos::AnomalyDetectorClient::InitializeFake(); - chromeos::CryptohomeMiscClient::InitializeFake(); + ash::CryptohomeMiscClient::InitializeFake(); chromeos::VmPluginDispatcherClient::InitializeFake(); lock_to_single_user_manager_ = std::make_unique<LockToSingleUserManager>(); @@ -104,7 +104,7 @@ arc_service_manager_->set_browser_context(nullptr); arc_service_manager_.reset(); chromeos::VmPluginDispatcherClient::Shutdown(); - chromeos::CryptohomeMiscClient::Shutdown(); + ash::CryptohomeMiscClient::Shutdown(); chromeos::AnomalyDetectorClient::Shutdown(); ash::SeneschalClient::Shutdown(); ash::ConciergeClient::Shutdown(); @@ -163,7 +163,7 @@ } bool is_device_locked() const { - return chromeos::FakeCryptohomeMiscClient::Get() + return ash::FakeCryptohomeMiscClient::Get() ->is_device_locked_to_single_user(); } @@ -270,7 +270,7 @@ } TEST_F(LockToSingleUserManagerTest, DbusCallErrorTest) { - chromeos::FakeCryptohomeMiscClient::Get()->set_cryptohome_error( + ash::FakeCryptohomeMiscClient::Get()->set_cryptohome_error( ::user_data_auth::CryptohomeErrorCode::CRYPTOHOME_ERROR_KEY_NOT_FOUND); SetPolicyValue(enterprise_management::DeviceRebootOnUserSignoutProto::ALWAYS); LogInUser(false /* is_affiliated */);
diff --git a/chrome/browser/ash/policy/handlers/power_policy_browsertest.cc b/chrome/browser/ash/policy/handlers/power_policy_browsertest.cc index 0ff3a77a..22fa1329 100644 --- a/chrome/browser/ash/policy/handlers/power_policy_browsertest.cc +++ b/chrome/browser/ash/policy/handlers/power_policy_browsertest.cc
@@ -202,7 +202,7 @@ ASSERT_TRUE(base::PathService::Get(chromeos::dbus_paths::DIR_USER_POLICY_KEYS, &user_keys_dir)); std::string sanitized_username = - chromeos::UserDataAuthClient::GetStubSanitizedUsername( + ash::UserDataAuthClient::GetStubSanitizedUsername( cryptohome::CreateAccountIdentifierFromAccountId( user_manager::StubAccountId())); base::FilePath user_key_file =
diff --git a/chrome/browser/ash/policy/handlers/powerwash_requirements_checker.cc b/chrome/browser/ash/policy/handlers/powerwash_requirements_checker.cc index d18cc1a..85d883a1 100644 --- a/chrome/browser/ash/policy/handlers/powerwash_requirements_checker.cc +++ b/chrome/browser/ash/policy/handlers/powerwash_requirements_checker.cc
@@ -100,7 +100,7 @@ std::move(on_initialized_callback).Run(); return; } - chromeos::CryptohomeMiscClient::Get()->CheckHealth( + ash::CryptohomeMiscClient::Get()->CheckHealth( user_data_auth::CheckHealthRequest(), base::BindOnce(OnCryptohomeCheckHealth, std::move(on_initialized_callback))); @@ -110,14 +110,14 @@ // static void PowerwashRequirementsChecker::Initialize() { - chromeos::CryptohomeMiscClient::Get()->WaitForServiceToBeAvailable( + ash::CryptohomeMiscClient::Get()->WaitForServiceToBeAvailable( base::BindOnce(OnCryptohomeAvailability, base::OnceClosure{})); } // static void PowerwashRequirementsChecker::InitializeSynchronouslyForTesting() { base::RunLoop run_loop; - chromeos::CryptohomeMiscClient::Get()->WaitForServiceToBeAvailable( + ash::CryptohomeMiscClient::Get()->WaitForServiceToBeAvailable( base::BindOnce(OnCryptohomeAvailability, run_loop.QuitClosure())); run_loop.Run(); }
diff --git a/chrome/browser/ash/policy/handlers/powerwash_requirements_checker_unittest.cc b/chrome/browser/ash/policy/handlers/powerwash_requirements_checker_unittest.cc index 193f04b..1b641ccb 100644 --- a/chrome/browser/ash/policy/handlers/powerwash_requirements_checker_unittest.cc +++ b/chrome/browser/ash/policy/handlers/powerwash_requirements_checker_unittest.cc
@@ -28,13 +28,13 @@ void SetUp() override { BrowserWithTestWindowTest::SetUp(); - chromeos::CryptohomeMiscClient::InitializeFake(); + ash::CryptohomeMiscClient::InitializeFake(); settings_helper_.ReplaceDeviceSettingsProviderWithStub(); } void TearDown() override { BrowserWithTestWindowTest::TearDown(); - chromeos::CryptohomeMiscClient::Shutdown(); + ash::CryptohomeMiscClient::Shutdown(); } void SetupUserWithAffiliation(bool is_affiliated) { @@ -49,7 +49,7 @@ } void SetupCryptohomeRequiresPowerwash(bool requires_powerwash) { - chromeos::FakeCryptohomeMiscClient::Get()->set_requires_powerwash( + ash::FakeCryptohomeMiscClient::Get()->set_requires_powerwash( requires_powerwash); PowerwashRequirementsChecker::InitializeSynchronouslyForTesting(); } @@ -148,7 +148,7 @@ SetupUserWithAffiliation(false); SetDeviceRebootOnUserSignoutPolicy(RebootOnSignOutPolicy::ALWAYS); PowerwashRequirementsChecker::ResetForTesting(); - chromeos::FakeCryptohomeMiscClient::Get()->set_cryptohome_error( + ash::FakeCryptohomeMiscClient::Get()->set_cryptohome_error( ::user_data_auth::CryptohomeErrorCode::CRYPTOHOME_ERROR_KEY_NOT_FOUND); SetupCryptohomeRequiresPowerwash(false); @@ -162,7 +162,7 @@ SetupUserWithAffiliation(false); SetDeviceRebootOnUserSignoutPolicy(RebootOnSignOutPolicy::ALWAYS); PowerwashRequirementsChecker::ResetForTesting(); - chromeos::FakeCryptohomeMiscClient::Get()->SetServiceIsAvailable(false); + ash::FakeCryptohomeMiscClient::Get()->SetServiceIsAvailable(false); // Cryptohome will never response and initialization callbacks will never be // called. PowerwashRequirementsChecker::Initialize(); @@ -170,7 +170,7 @@ EXPECT_EQ(PowerwashRequirementsChecker::State::kUndefined, GetStateForArc()); EXPECT_EQ(PowerwashRequirementsChecker::State::kUndefined, GetStateForCrostini()); - chromeos::FakeCryptohomeMiscClient::Get()->ReportServiceIsNotAvailable(); + ash::FakeCryptohomeMiscClient::Get()->ReportServiceIsNotAvailable(); } TEST_F( @@ -179,9 +179,9 @@ SetupUserWithAffiliation(false); SetDeviceRebootOnUserSignoutPolicy(RebootOnSignOutPolicy::ALWAYS); PowerwashRequirementsChecker::ResetForTesting(); - chromeos::FakeCryptohomeMiscClient::Get()->SetServiceIsAvailable(false); + ash::FakeCryptohomeMiscClient::Get()->SetServiceIsAvailable(false); PowerwashRequirementsChecker::Initialize(); - chromeos::FakeCryptohomeMiscClient::Get()->ReportServiceIsNotAvailable(); + ash::FakeCryptohomeMiscClient::Get()->ReportServiceIsNotAvailable(); EXPECT_EQ(PowerwashRequirementsChecker::State::kUndefined, GetStateForArc()); EXPECT_EQ(PowerwashRequirementsChecker::State::kUndefined,
diff --git a/chrome/browser/ash/policy/invalidation/affiliated_invalidation_service_provider_impl_unittest.cc b/chrome/browser/ash/policy/invalidation/affiliated_invalidation_service_provider_impl_unittest.cc index e378b3b..3eb0197 100644 --- a/chrome/browser/ash/policy/invalidation/affiliated_invalidation_service_provider_impl_unittest.cc +++ b/chrome/browser/ash/policy/invalidation/affiliated_invalidation_service_provider_impl_unittest.cc
@@ -218,7 +218,7 @@ } void AffiliatedInvalidationServiceProviderImplTest::SetUp() { - chromeos::CryptohomeMiscClient::InitializeFake(); + ash::CryptohomeMiscClient::InitializeFake(); chromeos::SystemSaltGetter::Initialize(); ASSERT_TRUE(profile_manager_.SetUp()); @@ -243,7 +243,7 @@ BrowserContextKeyedServiceFactory::TestingFactory()); DeviceOAuth2TokenServiceFactory::Shutdown(); chromeos::SystemSaltGetter::Shutdown(); - chromeos::CryptohomeMiscClient::Shutdown(); + ash::CryptohomeMiscClient::Shutdown(); } Profile*
diff --git a/chrome/browser/ash/policy/rsu/lookup_key_uploader.cc b/chrome/browser/ash/policy/rsu/lookup_key_uploader.cc index 14d9dbd..588c4abe 100644 --- a/chrome/browser/ash/policy/rsu/lookup_key_uploader.cc +++ b/chrome/browser/ash/policy/rsu/lookup_key_uploader.cc
@@ -26,7 +26,7 @@ : policy_store_(policy_store), prefs_(pref_service), certificate_uploader_(certificate_uploader), - cryptohome_misc_client_(chromeos::CryptohomeMiscClient::Get()), + cryptohome_misc_client_(ash::CryptohomeMiscClient::Get()), clock_(base::DefaultClock::GetInstance()) { // Can be null in tests. if (policy_store_)
diff --git a/chrome/browser/ash/policy/rsu/lookup_key_uploader.h b/chrome/browser/ash/policy/rsu/lookup_key_uploader.h index f6950da..9996d162 100644 --- a/chrome/browser/ash/policy/rsu/lookup_key_uploader.h +++ b/chrome/browser/ash/policy/rsu/lookup_key_uploader.h
@@ -18,9 +18,9 @@ class PrefService; -namespace chromeos { +namespace ash { class CryptohomeMiscClient; -} // namespace chromeos +} namespace policy { @@ -66,7 +66,7 @@ DeviceCloudPolicyStoreAsh* policy_store_; PrefService* prefs_; ash::attestation::EnrollmentCertificateUploader* certificate_uploader_; - chromeos::CryptohomeMiscClient* cryptohome_misc_client_; + ash::CryptohomeMiscClient* cryptohome_misc_client_; // Whether we need to upload the lookup key right now. By default, it is set // to true. Later, it is set to false after first successful upload or finding
diff --git a/chrome/browser/ash/policy/rsu/lookup_key_uploader_unittest.cc b/chrome/browser/ash/policy/rsu/lookup_key_uploader_unittest.cc index ee41c89b..0e40f145 100644 --- a/chrome/browser/ash/policy/rsu/lookup_key_uploader_unittest.cc +++ b/chrome/browser/ash/policy/rsu/lookup_key_uploader_unittest.cc
@@ -62,7 +62,7 @@ bool NeedsUpload() { return lookup_key_uploader_->needs_upload_; } void SetCryptohomeReplyTo(const std::string& rsu_device_id) { - chromeos::FakeCryptohomeMiscClient::Get()->set_rsu_device_id(rsu_device_id); + ash::FakeCryptohomeMiscClient::Get()->set_rsu_device_id(rsu_device_id); } void AdvanceTime() { clock_.Advance(lookup_key_uploader_->kRetryFrequency); }
diff --git a/chrome/browser/ash/policy/status_collector/device_status_collector_browsertest.cc b/chrome/browser/ash/policy/status_collector/device_status_collector_browsertest.cc index 1ec00dba..642f80c 100644 --- a/chrome/browser/ash/policy/status_collector/device_status_collector_browsertest.cc +++ b/chrome/browser/ash/policy/status_collector/device_status_collector_browsertest.cc
@@ -911,7 +911,7 @@ base::RunLoop().RunUntilIdle(); chromeos::CrasAudioHandler::InitializeForTesting(); - chromeos::UserDataAuthClient::InitializeFake(); + ash::UserDataAuthClient::InitializeFake(); chromeos::PowerManagerClient::InitializeFake(); chromeos::AttestationClient::InitializeFake(); chromeos::TpmManagerClient::InitializeFake(); @@ -937,7 +937,7 @@ chromeos::TpmManagerClient::Shutdown(); chromeos::AttestationClient::Shutdown(); chromeos::PowerManagerClient::Shutdown(); - chromeos::UserDataAuthClient::Shutdown(); + ash::UserDataAuthClient::Shutdown(); chromeos::CrasAudioHandler::Shutdown(); chromeos::UpdateEngineClient::Shutdown(); ash::KioskAppManager::Shutdown();
diff --git a/chrome/browser/ash/policy/status_collector/legacy_device_status_collector_browsertest.cc b/chrome/browser/ash/policy/status_collector/legacy_device_status_collector_browsertest.cc index f83cfcd..61f7199 100644 --- a/chrome/browser/ash/policy/status_collector/legacy_device_status_collector_browsertest.cc +++ b/chrome/browser/ash/policy/status_collector/legacy_device_status_collector_browsertest.cc
@@ -900,7 +900,7 @@ base::RunLoop().RunUntilIdle(); chromeos::CrasAudioHandler::InitializeForTesting(); - chromeos::UserDataAuthClient::InitializeFake(); + ash::UserDataAuthClient::InitializeFake(); chromeos::PowerManagerClient::InitializeFake(); chromeos::AttestationClient::InitializeFake(); chromeos::TpmManagerClient::InitializeFake(); @@ -926,7 +926,7 @@ chromeos::TpmManagerClient::Shutdown(); chromeos::AttestationClient::Shutdown(); chromeos::PowerManagerClient::Shutdown(); - chromeos::UserDataAuthClient::Shutdown(); + ash::UserDataAuthClient::Shutdown(); chromeos::CrasAudioHandler::Shutdown(); chromeos::UpdateEngineClient::Shutdown(); ash::KioskAppManager::Shutdown();
diff --git a/chrome/browser/ash/settings/device_settings_test_helper.cc b/chrome/browser/ash/settings/device_settings_test_helper.cc index 3b769a9..6fa05b29 100644 --- a/chrome/browser/ash/settings/device_settings_test_helper.cc +++ b/chrome/browser/ash/settings/device_settings_test_helper.cc
@@ -59,8 +59,8 @@ owner_key_util_ = new ownership::MockOwnerKeyUtil(); device_settings_service_ = std::make_unique<DeviceSettingsService>(); ConciergeClient::InitializeFake(/*fake_cicerone_client=*/nullptr); - chromeos::UserDataAuthClient::InitializeFake(); - chromeos::CryptohomeMiscClient::InitializeFake(); + UserDataAuthClient::InitializeFake(); + CryptohomeMiscClient::InitializeFake(); PowerManagerClient::InitializeFake(); chromeos::TpmManagerClient::InitializeFake(); OwnerSettingsServiceAshFactory::SetDeviceSettingsServiceForTesting( @@ -87,8 +87,8 @@ device_settings_service_.reset(); chromeos::TpmManagerClient::Shutdown(); PowerManagerClient::Shutdown(); - chromeos::CryptohomeMiscClient::Shutdown(); - chromeos::UserDataAuthClient::Shutdown(); + CryptohomeMiscClient::Shutdown(); + UserDataAuthClient::Shutdown(); ConciergeClient::Shutdown(); device_policy_.reset(); base::RunLoop().RunUntilIdle();
diff --git a/chrome/browser/chrome_back_forward_cache_browsertest.cc b/chrome/browser/chrome_back_forward_cache_browsertest.cc index 70227f1..7374ac0 100644 --- a/chrome/browser/chrome_back_forward_cache_browsertest.cc +++ b/chrome/browser/chrome_back_forward_cache_browsertest.cc
@@ -238,15 +238,15 @@ // TODO(crbug.com/1324437): Disabled for being flaky. IN_PROC_BROWSER_TEST_F(ChromeBackForwardCacheBrowserTest, - DISABLED_PermissionContextBase) { + PermissionContextBase) { // HTTPS needed for GEOLOCATION permission net::EmbeddedTestServer https_server(net::EmbeddedTestServer::TYPE_HTTPS); https_server.AddDefaultHandlers(GetChromeTestDataDir()); - https_server.SetSSLConfig(net::EmbeddedTestServer::CERT_OK); + https_server.SetSSLConfig(net::EmbeddedTestServer::CERT_TEST_NAMES); ASSERT_TRUE(https_server.Start()); - GURL url_a(https_server.GetURL("a.com", "/title1.html")); - GURL url_b(https_server.GetURL("b.com", "/title1.html")); + GURL url_a(https_server.GetURL("a.test", "/title1.html")); + GURL url_b(https_server.GetURL("b.test", "/title1.html")); // 1) Navigate to A. EXPECT_TRUE(NavigateToURL(web_contents(), url_a));
diff --git a/chrome/browser/chromeos/BUILD.gn b/chrome/browser/chromeos/BUILD.gn index fad2f2d..77322a68 100644 --- a/chrome/browser/chromeos/BUILD.gn +++ b/chrome/browser/chromeos/BUILD.gn
@@ -244,6 +244,7 @@ "//chrome/services/wilco_dtc_supportd/public/mojom", "//chromeos:chromeos_export", "//chromeos/ash/components/assistant:buildflags", + "//chromeos/ash/components/dbus/audio", "//chromeos/ash/components/dbus/authpolicy", "//chromeos/ash/components/dbus/authpolicy:authpolicy_proto", "//chromeos/ash/components/dbus/biod", @@ -310,7 +311,6 @@ "//chromeos/dbus/anomaly_detector", "//chromeos/dbus/attestation", "//chromeos/dbus/attestation:attestation_proto", - "//chromeos/dbus/audio", "//chromeos/dbus/cdm_factory_daemon", "//chromeos/dbus/chunneld", "//chromeos/dbus/constants",
diff --git a/chrome/browser/device_identity/chromeos/device_oauth2_token_store_chromeos_unittest.cc b/chrome/browser/device_identity/chromeos/device_oauth2_token_store_chromeos_unittest.cc index 75d5a62..2042f1beb 100644 --- a/chrome/browser/device_identity/chromeos/device_oauth2_token_store_chromeos_unittest.cc +++ b/chrome/browser/device_identity/chromeos/device_oauth2_token_store_chromeos_unittest.cc
@@ -44,10 +44,10 @@ : scoped_testing_local_state_(TestingBrowserProcess::GetGlobal()) {} void SetUp() override { - chromeos::CryptohomeMiscClient::InitializeFake(); - chromeos::FakeCryptohomeMiscClient::Get()->SetServiceIsAvailable(true); - chromeos::FakeCryptohomeMiscClient::Get()->set_system_salt( - chromeos::FakeCryptohomeMiscClient::GetStubSystemSalt()); + ash::CryptohomeMiscClient::InitializeFake(); + ash::FakeCryptohomeMiscClient::Get()->SetServiceIsAvailable(true); + ash::FakeCryptohomeMiscClient::Get()->set_system_salt( + ash::FakeCryptohomeMiscClient::GetStubSystemSalt()); chromeos::SystemSaltGetter::Initialize(); @@ -63,7 +63,7 @@ base::ThreadPoolInstance::Get()->FlushForTesting(); ash::DeviceSettingsService::Get()->UnsetSessionManager(); chromeos::SystemSaltGetter::Shutdown(); - chromeos::CryptohomeMiscClient::Shutdown(); + ash::CryptohomeMiscClient::Shutdown(); } void SetUpDefaultValues() { @@ -72,25 +72,25 @@ } void InitWithPendingSalt(chromeos::DeviceOAuth2TokenStoreChromeOS* store) { - chromeos::FakeCryptohomeMiscClient::Get()->set_system_salt( + ash::FakeCryptohomeMiscClient::Get()->set_system_salt( std::vector<uint8_t>()); - chromeos::FakeCryptohomeMiscClient::Get()->SetServiceIsAvailable(false); + ash::FakeCryptohomeMiscClient::Get()->SetServiceIsAvailable(false); store->Init(base::BindLambdaForTesting([](bool, bool) {})); SetUpDefaultValues(); } void InitStore(chromeos::DeviceOAuth2TokenStoreChromeOS* store) { - chromeos::FakeCryptohomeMiscClient::Get()->set_system_salt( + ash::FakeCryptohomeMiscClient::Get()->set_system_salt( std::vector<uint8_t>()); - chromeos::FakeCryptohomeMiscClient::Get()->SetServiceIsAvailable(false); + ash::FakeCryptohomeMiscClient::Get()->SetServiceIsAvailable(false); DeviceOAuth2TokenStoreInitWaiter init_waiter; store->Init(init_waiter.GetCallback()); // Make the system salt available. - chromeos::FakeCryptohomeMiscClient::Get()->set_system_salt( - chromeos::FakeCryptohomeMiscClient::GetStubSystemSalt()); - chromeos::FakeCryptohomeMiscClient::Get()->SetServiceIsAvailable(true); + ash::FakeCryptohomeMiscClient::Get()->set_system_salt( + ash::FakeCryptohomeMiscClient::GetStubSystemSalt()); + ash::FakeCryptohomeMiscClient::Get()->SetServiceIsAvailable(true); // Wait for init to complete before continuing with the test. EXPECT_TRUE(init_waiter.Wait()); @@ -121,9 +121,8 @@ }; TEST_F(DeviceOAuth2TokenStoreChromeOSTest, InitSuccessful) { - chromeos::FakeCryptohomeMiscClient::Get()->set_system_salt( - std::vector<uint8_t>()); - chromeos::FakeCryptohomeMiscClient::Get()->SetServiceIsAvailable(false); + ash::FakeCryptohomeMiscClient::Get()->set_system_salt(std::vector<uint8_t>()); + ash::FakeCryptohomeMiscClient::Get()->SetServiceIsAvailable(false); chromeos::DeviceOAuth2TokenStoreChromeOS store( scoped_testing_local_state_.Get()); @@ -137,9 +136,9 @@ EXPECT_FALSE(init_waiter.HasInitBeenCalled()); // Make the system salt available. - chromeos::FakeCryptohomeMiscClient::Get()->set_system_salt( - chromeos::FakeCryptohomeMiscClient::GetStubSystemSalt()); - chromeos::FakeCryptohomeMiscClient::Get()->SetServiceIsAvailable(true); + ash::FakeCryptohomeMiscClient::Get()->set_system_salt( + ash::FakeCryptohomeMiscClient::GetStubSystemSalt()); + ash::FakeCryptohomeMiscClient::Get()->SetServiceIsAvailable(true); ASSERT_TRUE(init_waiter.Wait()); EXPECT_TRUE(init_waiter.HasInitBeenCalled()); @@ -170,9 +169,9 @@ EXPECT_EQ("test-token", store.GetRefreshToken()); // Make the system salt available. - chromeos::FakeCryptohomeMiscClient::Get()->set_system_salt( - chromeos::FakeCryptohomeMiscClient::GetStubSystemSalt()); - chromeos::FakeCryptohomeMiscClient::Get()->SetServiceIsAvailable(true); + ash::FakeCryptohomeMiscClient::Get()->set_system_salt( + ash::FakeCryptohomeMiscClient::GetStubSystemSalt()); + ash::FakeCryptohomeMiscClient::Get()->SetServiceIsAvailable(true); base::RunLoop().RunUntilIdle(); // The original token should still be present.
diff --git a/chrome/browser/extensions/api/activity_log_private/activity_log_private_api.cc b/chrome/browser/extensions/api/activity_log_private/activity_log_private_api.cc index 1815aa6..57db923 100644 --- a/chrome/browser/extensions/api/activity_log_private/activity_log_private_api.cc +++ b/chrome/browser/extensions/api/activity_log_private/activity_log_private_api.cc
@@ -93,8 +93,8 @@ value.Append(base::Value::FromUniquePtrValue(activity_arg.ToValue())); auto event = std::make_unique<Event>( events::ACTIVITY_LOG_PRIVATE_ON_EXTENSION_ACTIVITY, - activity_log_private::OnExtensionActivity::kEventName, - base::Value(std::move(value)).TakeListDeprecated(), browser_context_); + activity_log_private::OnExtensionActivity::kEventName, std::move(value), + browser_context_); EventRouter::Get(browser_context_)->BroadcastEvent(std::move(event)); }
diff --git a/chrome/browser/extensions/api/cookies/cookies_api.cc b/chrome/browser/extensions/api/cookies/cookies_api.cc index f30e82d9..755f6b25 100644 --- a/chrome/browser/extensions/api/cookies/cookies_api.cc +++ b/chrome/browser/extensions/api/cookies/cookies_api.cc
@@ -225,8 +225,7 @@ if (!router) return; auto event = std::make_unique<Event>( - histogram_value, event_name, std::move(*event_args).TakeListDeprecated(), - context); + histogram_value, event_name, std::move(event_args->GetList()), context); event->event_url = cookie_domain; router->BroadcastEvent(std::move(event)); }
diff --git a/chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc b/chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc index 588e510..26439834 100644 --- a/chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc +++ b/chrome/browser/extensions/api/desktop_capture/desktop_capture_api.cc
@@ -102,8 +102,13 @@ if (!target_render_frame_host) return RespondNow(Error(kTargetTabRequiredFromServiceWorker)); - return Execute(params->sources, target_render_frame_host, origin, - target_name); + const bool exclude_system_audio = + params->options && + params->options->system_audio == + api::desktop_capture::SYSTEM_AUDIO_PREFERENCE_ENUM_EXCLUDE; + + return Execute(params->sources, exclude_system_audio, + target_render_frame_host, origin, target_name); } std::string DesktopCaptureChooseDesktopMediaFunction::GetExtensionTargetName()
diff --git a/chrome/browser/extensions/api/desktop_capture/desktop_capture_apitest.cc b/chrome/browser/extensions/api/desktop_capture/desktop_capture_apitest.cc index 00a662a..d91524a 100644 --- a/chrome/browser/extensions/api/desktop_capture/desktop_capture_apitest.cc +++ b/chrome/browser/extensions/api/desktop_capture/desktop_capture_apitest.cc
@@ -7,6 +7,7 @@ #include "base/command_line.h" #include "base/path_service.h" #include "base/strings/string_number_conversions.h" +#include "base/strings/stringprintf.h" #include "build/build_config.h" #include "build/chromeos_buildflags.h" #include "chrome/browser/extensions/api/desktop_capture/desktop_capture_api.h" @@ -275,7 +276,33 @@ ASSERT_TRUE(RunExtensionTest(test_dir.UnpackedPath(), {}, {})) << message_; } -IN_PROC_BROWSER_TEST_F(DesktopCaptureApiTest, FromServiceWorker) { +class DesktopCaptureApiTestWithSystemAudioValue + : public DesktopCaptureApiTest, + public testing::WithParamInterface<std::string> { + public: + DesktopCaptureApiTestWithSystemAudioValue() + : system_audio_preference_(GetParam()) { + DesktopCaptureChooseDesktopMediaFunction::SetPickerFactoryForTests( + &picker_factory_); + } + + ~DesktopCaptureApiTestWithSystemAudioValue() override = default; + + protected: + const std::string system_audio_preference_; +}; + +// |options| itself is optional, as is its member (systemAudio), and so will +// future members be (e.g. selfBrowserSurface). +INSTANTIATE_TEST_SUITE_P(_, + DesktopCaptureApiTestWithSystemAudioValue, + ::testing::Values("", + "{},", + "{systemAudio: \"include\"},", + "{systemAudio: \"exclude\"},")); + +IN_PROC_BROWSER_TEST_P(DesktopCaptureApiTestWithSystemAudioValue, + FromServiceWorker) { static constexpr char kManifest[] = R"({ "name": "Desktop Capture", @@ -285,24 +312,26 @@ "permissions": ["desktopCapture", "tabs"] })"; - static constexpr char kWorker[] = + const std::string worker = base::StringPrintf( R"(chrome.test.runTests([ function tabIdSpecified() { chrome.tabs.query({}, function(tabs) { chrome.test.assertTrue(tabs.length == 1); chrome.desktopCapture.chooseDesktopMedia( ["tab"], tabs[0], + %s function(id) { chrome.test.assertEq("string", typeof id); chrome.test.assertTrue(id != ""); chrome.test.succeed(); }); }); - }]))"; + }]))", + system_audio_preference_.c_str()); TestExtensionDir test_dir; test_dir.WriteManifest(kManifest); - test_dir.WriteFile(FILE_PATH_LITERAL("worker.js"), kWorker); + test_dir.WriteFile(FILE_PATH_LITERAL("worker.js"), worker); // Open a tab to capture. embedded_test_server()->ServeFilesFromDirectory(GetTestResourcesParentDir());
diff --git a/chrome/browser/extensions/api/desktop_capture/desktop_capture_base.cc b/chrome/browser/extensions/api/desktop_capture/desktop_capture_base.cc index b68d6ca..2a713cc 100644 --- a/chrome/browser/extensions/api/desktop_capture/desktop_capture_base.cc +++ b/chrome/browser/extensions/api/desktop_capture/desktop_capture_base.cc
@@ -81,6 +81,7 @@ ExtensionFunction::ResponseAction DesktopCaptureChooseDesktopMediaFunctionBase::Execute( const std::vector<api::desktop_capture::DesktopCaptureSourceType>& sources, + bool exclude_system_audio, content::RenderFrameHost* render_frame_host, const GURL& origin, const std::u16string target_name) { @@ -157,6 +158,7 @@ picker_params.app_name = base::UTF8ToUTF16(GetCallerDisplayName()); picker_params.target_name = target_name; picker_params.request_audio = request_audio; + picker_params.exclude_system_audio = exclude_system_audio; picker_controller_ = std::make_unique<DesktopMediaPickerController>(g_picker_factory); picker_params.restricted_by_policy =
diff --git a/chrome/browser/extensions/api/desktop_capture/desktop_capture_base.h b/chrome/browser/extensions/api/desktop_capture/desktop_capture_base.h index b1f067d7..f97c711 100644 --- a/chrome/browser/extensions/api/desktop_capture/desktop_capture_base.h +++ b/chrome/browser/extensions/api/desktop_capture/desktop_capture_base.h
@@ -36,13 +36,18 @@ static const char kTargetNotFoundError[]; - // |web_contents| is the WebContents for which the stream is created, and will - // also be used to determine where to show the picker's UI. + // |exclude_system_audio| is piped from the original call. It is a constraint + // that needs to be applied before the picker is shown to the user, as it + // affects the picker. It is therefore provided to the extension function + // rather than to getUserMedia(), as is the case for other constraints. + // // |origin| is the origin for which the stream is created. + // // |target_name| is the display name of the stream target. ResponseAction Execute( const std::vector<api::desktop_capture::DesktopCaptureSourceType>& sources, + bool exclude_system_audio, content::RenderFrameHost* render_frame_host, const GURL& origin, const std::u16string target_name);
diff --git a/chrome/browser/extensions/api/developer_private/developer_private_api.cc b/chrome/browser/extensions/api/developer_private/developer_private_api.cc index 3f84502..adae6a8 100644 --- a/chrome/browser/extensions/api/developer_private/developer_private_api.cc +++ b/chrome/browser/extensions/api/developer_private/developer_private_api.cc
@@ -525,13 +525,13 @@ } void DeveloperPrivateEventRouter::OnExtensionManagementSettingsChanged() { - std::vector<base::Value> args; - args.push_back(base::Value::FromUniquePtrValue( + base::Value::List args; + args.Append(base::Value::FromUniquePtrValue( DeveloperPrivateAPI::CreateProfileInfo(profile_)->ToValue())); - std::unique_ptr<Event> event( - new Event(events::DEVELOPER_PRIVATE_ON_PROFILE_STATE_CHANGED, - developer::OnProfileStateChanged::kEventName, std::move(args))); + auto event = std::make_unique<Event>( + events::DEVELOPER_PRIVATE_ON_PROFILE_STATE_CHANGED, + developer::OnProfileStateChanged::kEventName, std::move(args)); event_router_->BroadcastEvent(std::move(event)); } @@ -545,8 +545,8 @@ const PermissionsManager::UserPermissionsSettings& settings) { developer::UserSiteSettings user_site_settings = ConvertToUserSiteSettings(settings); - std::vector<base::Value> args; - args.push_back(base::Value::FromUniquePtrValue(user_site_settings.ToValue())); + base::Value::List args; + args.Append(base::Value::FromUniquePtrValue(user_site_settings.ToValue())); auto event = std::make_unique<Event>( events::DEVELOPER_PRIVATE_ON_USER_SITE_SETTINGS_CHANGED, @@ -567,12 +567,12 @@ } void DeveloperPrivateEventRouter::OnProfilePrefChanged() { - std::vector<base::Value> args; - args.push_back(base::Value::FromUniquePtrValue( + base::Value::List args; + args.Append(base::Value::FromUniquePtrValue( DeveloperPrivateAPI::CreateProfileInfo(profile_)->ToValue())); - std::unique_ptr<Event> event( - new Event(events::DEVELOPER_PRIVATE_ON_PROFILE_STATE_CHANGED, - developer::OnProfileStateChanged::kEventName, std::move(args))); + auto event = std::make_unique<Event>( + events::DEVELOPER_PRIVATE_ON_PROFILE_STATE_CHANGED, + developer::OnProfileStateChanged::kEventName, std::move(args)); event_router_->BroadcastEvent(std::move(event)); // The following properties are updated when dev mode is toggled. @@ -622,8 +622,8 @@ std::make_unique<developer::ExtensionInfo>(std::move(infos[0])); } - std::vector<base::Value> args; - args.push_back(base::Value::FromUniquePtrValue(event_data.ToValue())); + base::Value::List args; + args.Append(base::Value::FromUniquePtrValue(event_data.ToValue())); std::unique_ptr<Event> event( new Event(events::DEVELOPER_PRIVATE_ON_ITEM_STATE_CHANGED, developer::OnItemStateChanged::kEventName, std::move(args)));
diff --git a/chrome/browser/extensions/api/downloads/downloads_api.cc b/chrome/browser/extensions/api/downloads/downloads_api.cc index 9b2e75bf..1006390 100644 --- a/chrome/browser/extensions/api/downloads/downloads_api.cc +++ b/chrome/browser/extensions/api/downloads/downloads_api.cc
@@ -1910,8 +1910,8 @@ DCHECK_CURRENTLY_ON(BrowserThread::UI); if (!EventRouter::Get(profile_)) return; - std::vector<base::Value> args; - args.push_back(std::move(arg)); + base::Value::List args; + args.Append(std::move(arg)); // The downloads system wants to share on-record events with off-record // extension renderers even in incognito_split_mode because that's how // chrome://downloads works. The "restrict_to_profile" mechanism does not
diff --git a/chrome/browser/extensions/api/extension_action/extension_action_api.cc b/chrome/browser/extensions/api/extension_action/extension_action_api.cc index 7cd02548..bb6e8000 100644 --- a/chrome/browser/extensions/api/extension_action/extension_action_api.cc +++ b/chrome/browser/extensions/api/extension_action/extension_action_api.cc
@@ -280,8 +280,7 @@ return; auto event = std::make_unique<Event>( - histogram_value, event_name, std::move(*event_args).TakeListDeprecated(), - context); + histogram_value, event_name, std::move(event_args->GetList()), context); event->user_gesture = EventRouter::USER_GESTURE_ENABLED; EventRouter::Get(context) ->DispatchEventToExtension(extension_id, std::move(event));
diff --git a/chrome/browser/extensions/api/file_browser_handler/file_browser_handler_flow_lacros.cc b/chrome/browser/extensions/api/file_browser_handler/file_browser_handler_flow_lacros.cc index 7963fef..4231837 100644 --- a/chrome/browser/extensions/api/file_browser_handler/file_browser_handler_flow_lacros.cc +++ b/chrome/browser/extensions/api/file_browser_handler/file_browser_handler_flow_lacros.cc
@@ -243,8 +243,7 @@ auto event = std::make_unique<extensions::Event>( extensions::events::FILE_BROWSER_HANDLER_ON_EXECUTE, - "fileBrowserHandler.onExecute", - base::Value(std::move(event_args)).TakeListDeprecated(), profile_); + "fileBrowserHandler.onExecute", std::move(event_args), profile_); router->DispatchEventToExtension(extension_->id(), std::move(event)); Finish(true); // Success.
diff --git a/chrome/browser/extensions/api/identity/web_auth_flow.cc b/chrome/browser/extensions/api/identity/web_auth_flow.cc index ea9512fd..4f96aea 100644 --- a/chrome/browser/extensions/api/identity/web_auth_flow.cc +++ b/chrome/browser/extensions/api/identity/web_auth_flow.cc
@@ -105,19 +105,19 @@ base::Base64Encode(random_bytes, &app_window_key_); // identityPrivate.onWebFlowRequest(app_window_key, provider_url_, mode_) - std::unique_ptr<base::ListValue> args(new base::ListValue()); - args->Append(app_window_key_); - args->Append(provider_url_.spec()); + base::Value::List args; + args.Append(app_window_key_); + args.Append(provider_url_.spec()); if (mode_ == WebAuthFlow::INTERACTIVE) - args->Append("interactive"); + args.Append("interactive"); else - args->Append("silent"); - args->Append(GetPartitionName(partition_)); + args.Append("silent"); + args.Append(GetPartitionName(partition_)); auto event = std::make_unique<Event>(events::IDENTITY_PRIVATE_ON_WEB_FLOW_REQUEST, identity_private::OnWebFlowRequest::kEventName, - std::move(*args).TakeListDeprecated(), profile_); + std::move(args), profile_); ExtensionSystem* system = ExtensionSystem::Get(profile_); extensions::ComponentLoader* component_loader =
diff --git a/chrome/browser/extensions/api/messaging/messaging_apitest.cc b/chrome/browser/extensions/api/messaging/messaging_apitest.cc index 1edf30f..18ca5936 100644 --- a/chrome/browser/extensions/api/messaging/messaging_apitest.cc +++ b/chrome/browser/extensions/api/messaging/messaging_apitest.cc
@@ -94,7 +94,7 @@ GURL event_url) { auto event = std::make_unique<Event>( events::TEST_ON_MESSAGE, "test.onMessage", - std::move(*event_args).TakeListDeprecated(), browser_context); + std::move(event_args->GetList()), browser_context); event->event_url = std::move(event_url); return event; }
diff --git a/chrome/browser/extensions/api/networking_private/networking_private_chromeos_apitest.cc b/chrome/browser/extensions/api/networking_private/networking_private_chromeos_apitest.cc index 85ab1fd..caa21ef 100644 --- a/chrome/browser/extensions/api/networking_private/networking_private_chromeos_apitest.cc +++ b/chrome/browser/extensions/api/networking_private/networking_private_chromeos_apitest.cc
@@ -73,12 +73,12 @@ using testing::Return; using testing::_; +using ash::UserDataAuthClient; using chromeos::ShillDeviceClient; using chromeos::ShillIPConfigClient; using chromeos::ShillManagerClient; using chromeos::ShillProfileClient; using chromeos::ShillServiceClient; -using chromeos::UserDataAuthClient; using extensions::NetworkingPrivateDelegate; using extensions::NetworkingPrivateDelegateFactory; @@ -163,7 +163,7 @@ request.set_username( cryptohome::CreateAccountIdentifierFromAccountId(user->GetAccountId()) .account_id()); - chromeos::CryptohomeMiscClient::Get()->GetSanitizedUsername( + ash::CryptohomeMiscClient::Get()->GetSanitizedUsername( request, base::BindOnce( [](std::string* out,
diff --git a/chrome/browser/extensions/api/notifications/extension_notification_handler.cc b/chrome/browser/extensions/api/notifications/extension_notification_handler.cc index 9c7b408..a921944 100644 --- a/chrome/browser/extensions/api/notifications/extension_notification_handler.cc +++ b/chrome/browser/extensions/api/notifications/extension_notification_handler.cc
@@ -130,8 +130,8 @@ if (!event_router) return; - std::unique_ptr<Event> event(new Event( - histogram_value, event_name, std::move(*args).TakeListDeprecated())); + auto event = std::make_unique<Event>(histogram_value, event_name, + std::move(args->GetList())); event->user_gesture = user_gesture; event_router->DispatchEventToExtension(extension_id, std::move(event)); }
diff --git a/chrome/browser/extensions/api/omnibox/omnibox_api.cc b/chrome/browser/extensions/api/omnibox/omnibox_api.cc index 746cc75..39df08f5 100644 --- a/chrome/browser/extensions/api/omnibox/omnibox_api.cc +++ b/chrome/browser/extensions/api/omnibox/omnibox_api.cc
@@ -96,7 +96,7 @@ Profile* profile, const std::string& extension_id) { auto event = std::make_unique<Event>(events::OMNIBOX_ON_INPUT_STARTED, omnibox::OnInputStarted::kEventName, - std::vector<base::Value>(), profile); + base::Value::List(), profile); EventRouter::Get(profile) ->DispatchEventToExtension(extension_id, std::move(event)); } @@ -110,13 +110,13 @@ extension_id, omnibox::OnInputChanged::kEventName)) return false; - auto args(std::make_unique<base::ListValue>()); - args->Append(input); - args->Append(suggest_id); + base::Value::List args; + args.Append(input); + args.Append(suggest_id); - auto event = std::make_unique<Event>( - events::OMNIBOX_ON_INPUT_CHANGED, omnibox::OnInputChanged::kEventName, - std::move(*args).TakeListDeprecated(), profile); + auto event = std::make_unique<Event>(events::OMNIBOX_ON_INPUT_CHANGED, + omnibox::OnInputChanged::kEventName, + std::move(args), profile); event_router->DispatchEventToExtension(extension_id, std::move(event)); return true; } @@ -137,18 +137,18 @@ extensions::TabHelper::FromWebContents(web_contents)-> active_tab_permission_granter()->GrantIfRequested(extension); - auto args(std::make_unique<base::ListValue>()); - args->Append(input); + base::Value::List args; + args.Append(input); if (disposition == WindowOpenDisposition::NEW_FOREGROUND_TAB) - args->Append(kForegroundTabDisposition); + args.Append(kForegroundTabDisposition); else if (disposition == WindowOpenDisposition::NEW_BACKGROUND_TAB) - args->Append(kBackgroundTabDisposition); + args.Append(kBackgroundTabDisposition); else - args->Append(kCurrentTabDisposition); + args.Append(kCurrentTabDisposition); - auto event = std::make_unique<Event>( - events::OMNIBOX_ON_INPUT_ENTERED, omnibox::OnInputEntered::kEventName, - std::move(*args).TakeListDeprecated(), profile); + auto event = std::make_unique<Event>(events::OMNIBOX_ON_INPUT_ENTERED, + omnibox::OnInputEntered::kEventName, + std::move(args), profile); EventRouter::Get(profile) ->DispatchEventToExtension(extension_id, std::move(event)); @@ -160,7 +160,7 @@ Profile* profile, const std::string& extension_id) { auto event = std::make_unique<Event>(events::OMNIBOX_ON_INPUT_CANCELLED, omnibox::OnInputCancelled::kEventName, - std::vector<base::Value>(), profile); + base::Value::List(), profile); EventRouter::Get(profile) ->DispatchEventToExtension(extension_id, std::move(event)); } @@ -169,13 +169,12 @@ Profile* profile, const std::string& extension_id, const std::string& suggestion_text) { - auto args(std::make_unique<base::ListValue>()); - args->Append(suggestion_text); + base::Value::List args; + args.Append(suggestion_text); - auto event = - std::make_unique<Event>(events::OMNIBOX_ON_DELETE_SUGGESTION, - omnibox::OnDeleteSuggestion::kEventName, - std::move(*args).TakeListDeprecated(), profile); + auto event = std::make_unique<Event>(events::OMNIBOX_ON_DELETE_SUGGESTION, + omnibox::OnDeleteSuggestion::kEventName, + std::move(args), profile); EventRouter::Get(profile)->DispatchEventToExtension(extension_id, std::move(event));
diff --git a/chrome/browser/extensions/api/passwords_private/passwords_private_event_router.cc b/chrome/browser/extensions/api/passwords_private/passwords_private_event_router.cc index 4cff619f..4a78041 100644 --- a/chrome/browser/extensions/api/passwords_private/passwords_private_event_router.cc +++ b/chrome/browser/extensions/api/passwords_private/passwords_private_event_router.cc
@@ -76,8 +76,8 @@ params.status = status; params.folder_name = std::make_unique<std::string>(std::move(folder_name)); - std::vector<base::Value> event_value; - event_value.push_back(base::Value::FromUniquePtrValue(params.ToValue())); + base::Value::List event_value; + event_value.Append(base::Value::FromUniquePtrValue(params.ToValue())); auto extension_event = std::make_unique<Event>( events::PASSWORDS_PRIVATE_ON_PASSWORDS_FILE_EXPORT_PROGRESS,
diff --git a/chrome/browser/extensions/api/preference/preference_helpers.cc b/chrome/browser/extensions/api/preference/preference_helpers.cc index 2e311fc..de1be98 100644 --- a/chrome/browser/extensions/api/preference/preference_helpers.cc +++ b/chrome/browser/extensions/api/preference/preference_helpers.cc
@@ -151,10 +151,10 @@ } } - base::Value args_copy = args->Clone(); - auto event = std::make_unique<Event>( - histogram_value, event_name, - std::move(args_copy).TakeListDeprecated(), restrict_to_profile); + base::Value::List args_copy = args->GetList().Clone(); + auto event = + std::make_unique<Event>(histogram_value, event_name, + std::move(args_copy), restrict_to_profile); router->DispatchEventToExtension(extension->id(), std::move(event)); } }
diff --git a/chrome/browser/extensions/api/quick_unlock_private/quick_unlock_private_api_unittest.cc b/chrome/browser/extensions/api/quick_unlock_private/quick_unlock_private_api_unittest.cc index 12bf541..a90bf46 100644 --- a/chrome/browser/extensions/api/quick_unlock_private/quick_unlock_private_api_unittest.cc +++ b/chrome/browser/extensions/api/quick_unlock_private/quick_unlock_private_api_unittest.cc
@@ -179,7 +179,7 @@ ash::UserDataAuthClient::InitializeFake(); if (std::get<0>(param) == TestType::kCryptohome) { auto* fake_userdataauth_client_testapi = - chromeos::FakeUserDataAuthClient::TestApi::Get(); + ash::FakeUserDataAuthClient::TestApi::Get(); fake_userdataauth_client_testapi->set_supports_low_entropy_credentials( true); fake_userdataauth_client_testapi->set_enable_auth_check(true);
diff --git a/chrome/browser/extensions/api/safe_browsing_private/safe_browsing_private_event_router.cc b/chrome/browser/extensions/api/safe_browsing_private/safe_browsing_private_event_router.cc index f1ed301..9382824 100644 --- a/chrome/browser/extensions/api/safe_browsing_private/safe_browsing_private_event_router.cc +++ b/chrome/browser/extensions/api/safe_browsing_private/safe_browsing_private_event_router.cc
@@ -293,8 +293,8 @@ // |event_router_| can be null in tests. if (event_router_) { - std::vector<base::Value> event_value; - event_value.push_back(base::Value::FromUniquePtrValue(params.ToValue())); + base::Value::List event_value; + event_value.Append(base::Value::FromUniquePtrValue(params.ToValue())); auto extension_event = std::make_unique<Event>( events:: @@ -330,8 +330,8 @@ const std::string& user_name) { // |event_router_| can be null in tests. if (event_router_) { - std::vector<base::Value> event_value; - event_value.push_back(base::Value(user_name)); + base::Value::List event_value; + event_value.Append(user_name); auto extension_event = std::make_unique<Event>( events::SAFE_BROWSING_PRIVATE_ON_POLICY_SPECIFIED_PASSWORD_CHANGED, api::safe_browsing_private::OnPolicySpecifiedPasswordChanged:: @@ -371,8 +371,8 @@ // |event_router_| can be null in tests. if (event_router_) { - std::vector<base::Value> event_value; - event_value.push_back(base::Value::FromUniquePtrValue(params.ToValue())); + base::Value::List event_value; + event_value.Append(base::Value::FromUniquePtrValue(params.ToValue())); auto extension_event = std::make_unique<Event>( events::SAFE_BROWSING_PRIVATE_ON_DANGEROUS_DOWNLOAD_OPENED, @@ -428,8 +428,8 @@ // |event_router_| can be null in tests. if (event_router_) { - std::vector<base::Value> event_value; - event_value.push_back(base::Value::FromUniquePtrValue(params.ToValue())); + base::Value::List event_value; + event_value.Append(base::Value::FromUniquePtrValue(params.ToValue())); auto extension_event = std::make_unique<Event>( events::SAFE_BROWSING_PRIVATE_ON_SECURITY_INTERSTITIAL_SHOWN, @@ -477,8 +477,8 @@ // |event_router_| can be null in tests. if (event_router_) { - std::vector<base::Value> event_value; - event_value.push_back(base::Value::FromUniquePtrValue(params.ToValue())); + base::Value::List event_value; + event_value.Append(base::Value::FromUniquePtrValue(params.ToValue())); auto extension_event = std::make_unique<Event>( events::SAFE_BROWSING_PRIVATE_ON_SECURITY_INTERSTITIAL_PROCEEDED,
diff --git a/chrome/browser/extensions/api/sessions/sessions_api.cc b/chrome/browser/extensions/api/sessions/sessions_api.cc index de02aca..bfaa6af 100644 --- a/chrome/browser/extensions/api/sessions/sessions_api.cc +++ b/chrome/browser/extensions/api/sessions/sessions_api.cc
@@ -637,7 +637,7 @@ sessions::TabRestoreService* service) { EventRouter::Get(profile_)->BroadcastEvent(std::make_unique<Event>( events::SESSIONS_ON_CHANGED, api::sessions::OnChanged::kEventName, - std::vector<base::Value>())); + base::Value::List())); } void SessionsEventRouter::TabRestoreServiceDestroyed(
diff --git a/chrome/browser/extensions/api/tab_capture/tab_capture_registry.cc b/chrome/browser/extensions/api/tab_capture/tab_capture_registry.cc index 65926f8..ce6e33f 100644 --- a/chrome/browser/extensions/api/tab_capture/tab_capture_registry.cc +++ b/chrome/browser/extensions/api/tab_capture/tab_capture_registry.cc
@@ -292,14 +292,13 @@ if (!router) return; - std::unique_ptr<base::ListValue> args(new base::ListValue()); + base::Value::List args; tab_capture::CaptureInfo info; request->GetCaptureInfo(&info); - args->GetList().Append(base::Value::FromUniquePtrValue(info.ToValue())); + args.Append(base::Value::FromUniquePtrValue(info.ToValue())); auto event = std::make_unique<Event>(events::TAB_CAPTURE_ON_STATUS_CHANGED, tab_capture::OnStatusChanged::kEventName, - std::move(*args).TakeListDeprecated(), - browser_context_); + std::move(args), browser_context_); router->DispatchEventToExtension(request->extension_id(), std::move(event)); }
diff --git a/chrome/browser/extensions/api/tabs/tabs_event_router.cc b/chrome/browser/extensions/api/tabs/tabs_event_router.cc index 82dbefe..49055364 100644 --- a/chrome/browser/extensions/api/tabs/tabs_event_router.cc +++ b/chrome/browser/extensions/api/tabs/tabs_event_router.cc
@@ -525,7 +525,7 @@ Profile* profile = Profile::FromBrowserContext(contents->GetBrowserContext()); auto event = std::make_unique<Event>(events::TABS_ON_CREATED, api::tabs::OnCreated::kEventName, - std::vector<base::Value>(), profile); + base::Value::List(), profile); event->user_gesture = EventRouter::USER_GESTURE_NOT_ENABLED; event->will_dispatch_callback = base::BindRepeating(&WillDispatchTabCreatedEvent, contents, active); @@ -591,7 +591,7 @@ events::TABS_ON_UPDATED, api::tabs::OnUpdated::kEventName, // The event arguments depend on the extension's permission. They are set // in WillDispatchTabUpdatedEvent(). - std::vector<base::Value>(), profile); + base::Value::List(), profile); event->user_gesture = EventRouter::USER_GESTURE_NOT_ENABLED; event->will_dispatch_callback = base::BindRepeating(&WillDispatchTabUpdatedEvent, contents,
diff --git a/chrome/browser/extensions/api/tabs/windows_event_router.cc b/chrome/browser/extensions/api/tabs/windows_event_router.cc index 32e03171..4d0befa 100644 --- a/chrome/browser/extensions/api/tabs/windows_event_router.cc +++ b/chrome/browser/extensions/api/tabs/windows_event_router.cc
@@ -304,7 +304,7 @@ std::unique_ptr<Event> event = std::make_unique<Event>( events::WINDOWS_ON_FOCUS_CHANGED, windows::OnFocusChanged::kEventName, - std::vector<base::Value>()); + base::Value::List()); event->will_dispatch_callback = base::BindRepeating(&WillDispatchWindowFocusedEvent, window_controller); EventRouter::Get(profile_)->BroadcastEvent(std::move(event)); @@ -315,7 +315,7 @@ WindowController* window_controller, std::unique_ptr<base::ListValue> args) { auto event = std::make_unique<Event>(histogram_value, event_name, - std::move(*args).TakeListDeprecated(), + std::move(args->GetList()), window_controller->profile()); event->will_dispatch_callback = base::BindRepeating(&WillDispatchWindowEvent, window_controller);
diff --git a/chrome/browser/extensions/api/terminal/terminal_private_api.cc b/chrome/browser/extensions/api/terminal/terminal_private_api.cc index 1580bc1..bef4ea5c 100644 --- a/chrome/browser/extensions/api/terminal/terminal_private_api.cc +++ b/chrome/browser/extensions/api/terminal/terminal_private_api.cc
@@ -191,10 +191,10 @@ return; } - std::vector<base::Value> args; - args.push_back(base::Value(terminal_id)); - args.push_back(base::Value(output_type)); - args.push_back(base::Value(base::make_span( + base::Value::List args; + args.Append(terminal_id); + args.Append(output_type); + args.Append(base::Value(base::make_span( reinterpret_cast<const uint8_t*>(&output[0]), output.size()))); extensions::EventRouter* event_router = @@ -212,10 +212,10 @@ if (!event_router) { return; } - std::vector<base::Value> args; + base::Value::List args; base::Value prefs(base::Value::Type::DICTIONARY); prefs.SetKey(pref_name, profile->GetPrefs()->Get(pref_name)->Clone()); - args.push_back(std::move(prefs)); + args.Append(std::move(prefs)); auto event = std::make_unique<extensions::Event>( extensions::events::TERMINAL_PRIVATE_ON_PREF_CHANGED, terminal_private::OnPrefChanged::kEventName, std::move(args));
diff --git a/chrome/browser/extensions/api/virtual_keyboard_private/chrome_virtual_keyboard_delegate.cc b/chrome/browser/extensions/api/virtual_keyboard_private/chrome_virtual_keyboard_delegate.cc index e7409cc..43892bb 100644 --- a/chrome/browser/extensions/api/virtual_keyboard_private/chrome_virtual_keyboard_delegate.cc +++ b/chrome/browser/extensions/api/virtual_keyboard_private/chrome_virtual_keyboard_delegate.cc
@@ -610,13 +610,13 @@ if (!router) return; - auto event_args = std::make_unique<base::ListValue>(); - event_args->Append(base::Value::FromUniquePtrValue(std::move(settings))); + base::Value::List event_args; + event_args.Append(base::Value::FromUniquePtrValue(std::move(settings))); auto event = std::make_unique<extensions::Event>( extensions::events::VIRTUAL_KEYBOARD_PRIVATE_ON_KEYBOARD_CONFIG_CHANGED, - keyboard_api::OnKeyboardConfigChanged::kEventName, - std::move(*event_args).TakeListDeprecated(), browser_context_); + keyboard_api::OnKeyboardConfigChanged::kEventName, std::move(event_args), + browser_context_); router->BroadcastEvent(std::move(event)); }
diff --git a/chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.cc b/chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.cc index 86a4e3e..891d7db0 100644 --- a/chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.cc +++ b/chrome/browser/extensions/api/web_navigation/web_navigation_api_helpers.cc
@@ -168,9 +168,8 @@ content::BrowserContext* browser_context = navigation_handle->GetWebContents()->GetBrowserContext(); - auto event = std::make_unique<Event>( - histogram_value, event_name, - base::Value(std::move(args)).TakeListDeprecated(), browser_context); + auto event = std::make_unique<Event>(histogram_value, event_name, + std::move(args), browser_context); DispatchEvent(browser_context, std::move(event), url); }
diff --git a/chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_api.cc b/chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_api.cc index 875c5a0..c0410fc 100644 --- a/chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_api.cc +++ b/chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_api.cc
@@ -93,7 +93,7 @@ extension->permissions_data()->HasAPIPermission("webrtcAudioPrivate")) { std::unique_ptr<Event> event = std::make_unique<Event>(events::WEBRTC_AUDIO_PRIVATE_ON_SINKS_CHANGED, - kEventName, std::vector<base::Value>()); + kEventName, base::Value::List()); router->DispatchEventToExtension(extension_id, std::move(event)); } }
diff --git a/chrome/browser/extensions/api/webrtc_desktop_capture_private/webrtc_desktop_capture_private_api.cc b/chrome/browser/extensions/api/webrtc_desktop_capture_private/webrtc_desktop_capture_private_api.cc index fcfbf29..0d045b7d 100644 --- a/chrome/browser/extensions/api/webrtc_desktop_capture_private/webrtc_desktop_capture_private_api.cc +++ b/chrome/browser/extensions/api/webrtc_desktop_capture_private/webrtc_desktop_capture_private_api.cc
@@ -70,7 +70,10 @@ using Sources = std::vector<api::desktop_capture::DesktopCaptureSourceType>; Sources* sources = reinterpret_cast<Sources*>(¶ms->sources); - return Execute(*sources, rfh, origin, target_name); + + // TODO(crbug.com/1329129): Plumb systemAudio through here. + return Execute(*sources, /*exclude_system_audio=*/false, rfh, origin, + target_name); } WebrtcDesktopCapturePrivateCancelChooseDesktopMediaFunction::
diff --git a/chrome/browser/extensions/event_router_forwarder.cc b/chrome/browser/extensions/event_router_forwarder.cc index 9fd1190..5a52bcb6 100644 --- a/chrome/browser/extensions/event_router_forwarder.cc +++ b/chrome/browser/extensions/event_router_forwarder.cc
@@ -143,11 +143,8 @@ return; #endif - std::vector<base::Value> arg_values(event_args.size()); - std::transform(event_args.begin(), event_args.end(), arg_values.begin(), - [](const base::Value& arg) { return arg.Clone(); }); auto event = std::make_unique<Event>( - histogram_value, event_name, std::move(arg_values), restrict_to_profile); + histogram_value, event_name, std::move(event_args), restrict_to_profile); event->event_url = event_url; if (extension_id.empty()) { extensions::EventRouter::Get(profile)->BroadcastEvent(std::move(event));
diff --git a/chrome/browser/extensions/extension_keybinding_registry.cc b/chrome/browser/extensions/extension_keybinding_registry.cc index 2c650ddfa..5b6f6eab 100644 --- a/chrome/browser/extensions/extension_keybinding_registry.cc +++ b/chrome/browser/extensions/extension_keybinding_registry.cc
@@ -142,8 +142,8 @@ if (!extension) return; - std::vector<base::Value> args; - args.emplace_back(base::Value(command)); + base::Value::List args; + args.Append(command); std::unique_ptr<base::Value> tab_value; if (delegate_) { @@ -180,7 +180,7 @@ // No currently-active tab. Push a null value. tab_value = std::make_unique<base::Value>(); } - args.push_back(base::Value::FromUniquePtrValue(std::move(tab_value))); + args.Append(base::Value::FromUniquePtrValue(std::move(tab_value))); auto event = std::make_unique<Event>(events::COMMANDS_ON_COMMAND, kOnCommandEventName,
diff --git a/chrome/browser/extensions/menu_manager.cc b/chrome/browser/extensions/menu_manager.cc index 43b63066..a4bb3ca 100644 --- a/chrome/browser/extensions/menu_manager.cc +++ b/chrome/browser/extensions/menu_manager.cc
@@ -691,8 +691,8 @@ webview_guest->view_instance_id()); } - base::Value::ListStorage args; - args.push_back(std::move(properties)); + base::Value::List args; + args.Append(std::move(properties)); // Add the tab info to the argument list. // No tab info in a platform app. @@ -709,12 +709,12 @@ // on permissions. ExtensionTabUtil::ScrubTabBehavior scrub_tab_behavior = { ExtensionTabUtil::kDontScrubTab, ExtensionTabUtil::kDontScrubTab}; - args.push_back(base::Value::FromUniquePtrValue( + args.Append(base::Value::FromUniquePtrValue( ExtensionTabUtil::CreateTabObject(web_contents, scrub_tab_behavior, extension) ->ToValue())); } else { - args.push_back(base::Value(base::Value::Type::DICTIONARY)); + args.Append(base::Value(base::Value::Type::DICTIONARY)); } } @@ -747,8 +747,8 @@ auto event = std::make_unique<Event>( webview_guest ? events::WEB_VIEW_INTERNAL_CONTEXT_MENUS : events::CONTEXT_MENUS, - webview_guest ? kOnWebviewContextMenus : kOnContextMenus, - base::Value(args).TakeListDeprecated(), context); + webview_guest ? kOnWebviewContextMenus : kOnContextMenus, args.Clone(), + context); event->user_gesture = EventRouter::USER_GESTURE_ENABLED; event_router->DispatchEventToExtension(item->extension_id(), std::move(event));
diff --git a/chrome/browser/extensions/permissions_updater.cc b/chrome/browser/extensions/permissions_updater.cc index 25a9021..09aec5cf 100644 --- a/chrome/browser/extensions/permissions_updater.cc +++ b/chrome/browser/extensions/permissions_updater.cc
@@ -664,11 +664,10 @@ EventRouter* event_router = event_name ? EventRouter::Get(browser_context) : nullptr; if (event_router) { - std::vector<base::Value> event_args; + base::Value::List event_args; std::unique_ptr<api::permissions::Permissions> permissions = PackPermissionSet(*changed); - event_args.emplace_back( - base::Value::FromUniquePtrValue(permissions->ToValue())); + event_args.Append(base::Value::FromUniquePtrValue(permissions->ToValue())); auto event = std::make_unique<Event>( histogram_value, event_name, std::move(event_args), browser_context); event_router->DispatchEventToExtension(extension->id(), std::move(event));
diff --git a/chrome/browser/extensions/service_worker_apitest.cc b/chrome/browser/extensions/service_worker_apitest.cc index 4c7756a4..d14ae9f 100644 --- a/chrome/browser/extensions/service_worker_apitest.cc +++ b/chrome/browser/extensions/service_worker_apitest.cc
@@ -901,9 +901,10 @@ // Build "test.onMessage" event for dispatch. auto event = std::make_unique<Event>( events::FOR_TEST, extensions::api::test::OnMessage::kEventName, - base::JSONReader::Read(R"([{"data": "hello", "lastMessage": true}])") - .value() - .TakeListDeprecated(), + std::move( + base::JSONReader::Read(R"([{"data": "hello", "lastMessage": true}])") + .value() + .GetList()), profile()); EarlyWorkerMessageSender sender(profile(), kId, std::move(event));
diff --git a/chrome/browser/feedback/show_feedback_page.cc b/chrome/browser/feedback/show_feedback_page.cc index 3940078..8b0d71f0 100644 --- a/chrome/browser/feedback/show_feedback_page.cc +++ b/chrome/browser/feedback/show_feedback_page.cc
@@ -26,7 +26,10 @@ #include "extensions/browser/api/feedback_private/feedback_private_api.h" #if BUILDFLAG(IS_CHROMEOS_ASH) +#include "ash/webui/os_feedback_ui/url_constants.h" #include "base/bind.h" +#include "base/strings/escape.h" +#include "base/strings/strcat.h" #include "chrome/browser/ash/crosapi/browser_manager.h" #include "chrome/browser/signin/identity_manager_factory.h" #include "components/signin/public/identity_manager/identity_manager.h" @@ -45,6 +48,35 @@ namespace { #if BUILDFLAG(IS_CHROMEOS_ASH) +constexpr char kExtraDiagnosticsQueryParam[] = "extra_diagnostics"; +constexpr char kQueryParamSeparator[] = "&"; +constexpr char kQueryParamKeyValueSeparator[] = "="; + +// Concat query parameter with escaped value. +std::string StrCatQueryParam(const std::string query_param, + const std::string value) { + return base::StrCat({query_param, kQueryParamKeyValueSeparator, + base::EscapeQueryParamValue(value, /*use_plus=*/false)}); +} + +// Returns URL for OS Feedback with additional data passed as query parameters. +GURL BuildFeedbackUrl(const std::string extra_diagnostics) { + std::vector<std::string> query_params; + + if (!extra_diagnostics.empty()) { + query_params.emplace_back( + StrCatQueryParam(kExtraDiagnosticsQueryParam, extra_diagnostics)); + } + + // Use default URL if no extra parameters to be added. + if (query_params.empty()) { + return GURL(ash::kChromeUIOSFeedbackUrl); + } + + return GURL( + base::StrCat({ash::kChromeUIOSFeedbackUrl, "/?", + base::JoinString(query_params, kQueryParamSeparator)})); +} // Returns whether the user has an internal Google account (e.g. @google.com). bool IsGoogleInternalAccount(Profile* profile) { @@ -121,8 +153,12 @@ #endif if (use_os_feedback) { - web_app::LaunchSystemWebAppAsync(profile, - ash::SystemWebAppType::OS_FEEDBACK); + web_app::SystemAppLaunchParams params{}; +#if BUILDFLAG(IS_CHROMEOS_ASH) + params.url = BuildFeedbackUrl(extra_diagnostics); +#endif // BUILDFLAG(IS_CHROMEOS_ASH) + web_app::LaunchSystemWebAppAsync( + profile, ash::SystemWebAppType::OS_FEEDBACK, std::move(params)); } else { extensions::FeedbackPrivateAPI* api = extensions::FeedbackPrivateAPI::GetFactoryInstance()->Get(profile);
diff --git a/chrome/browser/feedback/show_feedback_page_browsertest.cc b/chrome/browser/feedback/show_feedback_page_browsertest.cc index 09c5ac8..3623463 100644 --- a/chrome/browser/feedback/show_feedback_page_browsertest.cc +++ b/chrome/browser/feedback/show_feedback_page_browsertest.cc
@@ -3,6 +3,9 @@ // found in the LICENSE file. #include "ash/constants/ash_features.h" +#include "ash/webui/os_feedback_ui/url_constants.h" +#include "base/strings/escape.h" +#include "base/strings/strcat.h" #include "base/test/metrics/histogram_tester.h" #include "base/test/scoped_feature_list.h" #include "chrome/browser/ash/system_web_apps/system_web_app_manager.h" @@ -65,7 +68,7 @@ base::HistogramTester histogram_tester; EXPECT_EQ(1u, chrome::GetTotalBrowserCount()); - const GURL expected_url("chrome://os-feedback"); + const GURL expected_url(ash::kChromeUIOSFeedbackUrl); content::TestNavigationObserver navigation_observer(expected_url); navigation_observer.StartWatchingNewWebContents(); @@ -81,10 +84,42 @@ histogram_tester.ExpectTotalCount("Feedback.RequestSource", 1); EXPECT_EQ(2u, chrome::GetTotalBrowserCount()); - EXPECT_EQ(expected_url, chrome::FindLastActive() - ->tab_strip_model() - ->GetActiveWebContents() - ->GetVisibleURL()); + const GURL visible_url = chrome::FindLastActive() + ->tab_strip_model() + ->GetActiveWebContents() + ->GetVisibleURL(); + EXPECT_FALSE(visible_url.has_query()); + EXPECT_EQ(expected_url, visible_url); +} + +// Test that when `extra_diagnostics` parameter appended. +IN_PROC_BROWSER_TEST_F(ShowFeedbackPageBrowserTest, + OsFeedbackAdditionalContextAddedToUrl) { + ash::SystemWebAppManager::GetForTest(browser()->profile()) + ->InstallSystemAppsForTesting(); + std::string unused; + const std::string extra_diagnostics = "extra diagnostics param"; + GURL expected_url(base::StrCat( + {ash::kChromeUIOSFeedbackUrl, "/?extra_diagnostics=", + base::EscapeQueryParamValue(extra_diagnostics, /*use_plus=*/false)})); + content::TestNavigationObserver navigation_observer(expected_url); + navigation_observer.StartWatchingNewWebContents(); + + browser()->profile()->GetPrefs()->SetBoolean(prefs::kUserFeedbackAllowed, + true); + chrome::ShowFeedbackPage(browser(), chrome::kFeedbackSourceBrowserCommand, + /*description_template=*/unused, + /*description_placeholder_text=*/unused, + /*category_tag=*/unused, + /*extra_diagnostics=*/extra_diagnostics); + navigation_observer.Wait(); + + const GURL visible_url = chrome::FindLastActive() + ->tab_strip_model() + ->GetActiveWebContents() + ->GetVisibleURL(); + EXPECT_TRUE(visible_url.has_query()); + EXPECT_EQ(expected_url, visible_url); } } // namespace ash
diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json index 869797ed..13b6989 100644 --- a/chrome/browser/flag-metadata.json +++ b/chrome/browser/flag-metadata.json
@@ -3650,6 +3650,11 @@ "expiry_milestone": 97 }, { + "name": "identity-in-can-make-payment", + "owners": [ "rouslan", "web-payments-team@google.com" ], + "expiry_milestone": 115 + }, + { "name": "ignore-gpu-blocklist", "owners": [ "kbr", "zmo" ], // A debugging flag intended for end-users where there may not be any other
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc index 902b55a31..1b87ac46 100644 --- a/chrome/browser/flag_descriptions.cc +++ b/chrome/browser/flag_descriptions.cc
@@ -2908,6 +2908,12 @@ const char kPaymentRequestBasicCardDescription[] = "The 'basic-card' payment method of the PaymentRequest API."; +const char kIdentityInCanMakePaymentEventFeatureName[] = + "Identity in canmakepayment event"; +const char kIdentityInCanMakePaymentEventFeatureDescription[] = + "The payment app receives the merchant and user identity when the merchant " + "checks whether this payment app is present and can make payments."; + const char kAppStoreBillingDebugName[] = "Web Payments App Store Billing Debug Mode"; const char kAppStoreBillingDebugDescription[] =
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h index aea5ed72..848eadd 100644 --- a/chrome/browser/flag_descriptions.h +++ b/chrome/browser/flag_descriptions.h
@@ -1631,6 +1631,9 @@ extern const char kPaymentRequestBasicCardName[]; extern const char kPaymentRequestBasicCardDescription[]; +extern const char kIdentityInCanMakePaymentEventFeatureName[]; +extern const char kIdentityInCanMakePaymentEventFeatureDescription[]; + extern const char kAppStoreBillingDebugName[]; extern const char kAppStoreBillingDebugDescription[];
diff --git a/chrome/browser/image_editor/image_editor_component_info.h b/chrome/browser/image_editor/image_editor_component_info.h index e6bdfc2..1177f45a 100644 --- a/chrome/browser/image_editor/image_editor_component_info.h +++ b/chrome/browser/image_editor/image_editor_component_info.h
@@ -13,8 +13,9 @@ struct DefaultSingletonTraits; } -// Contains information about installed image editor component. namespace image_editor { + +// Contains information about installed image editor component. class ImageEditorComponentInfo { public: static ImageEditorComponentInfo* GetInstance();
diff --git a/chrome/browser/net/dns_probe_browsertest.cc b/chrome/browser/net/dns_probe_browsertest.cc index f7487e8..e438280 100644 --- a/chrome/browser/net/dns_probe_browsertest.cc +++ b/chrome/browser/net/dns_probe_browsertest.cc
@@ -409,7 +409,8 @@ // Mark as not enterprise managed to prevent the secure DNS mode from // being downgraded to off. base::win::ScopedDomainStateForTesting scoped_domain(false); - EXPECT_FALSE(base::IsEnterpriseDevice()); + // TODO(crbug.com/1339062): What is the correct function to use here? + EXPECT_FALSE(base::win::IsEnrolledToDomain()); #endif // Set the mocked policy provider to act as if no policies are in use by
diff --git a/chrome/browser/net/nss_service_chromeos.cc b/chrome/browser/net/nss_service_chromeos.cc index ccb8eb89..e12338e 100644 --- a/chrome/browser/net/nss_service_chromeos.cc +++ b/chrome/browser/net/nss_service_chromeos.cc
@@ -99,7 +99,7 @@ << " " << account_id.Serialize() << " " << username_hash; std::unique_ptr<ash::TPMTokenInfoGetter> scoped_token_info_getter = ash::TPMTokenInfoGetter::CreateForUserToken( - account_id, chromeos::CryptohomePkcs11Client::Get(), + account_id, ash::CryptohomePkcs11Client::Get(), base::ThreadTaskRunnerHandle::Get()); ash::TPMTokenInfoGetter* token_info_getter = scoped_token_info_getter.get();
diff --git a/chrome/browser/net/stub_resolver_config_reader.cc b/chrome/browser/net/stub_resolver_config_reader.cc index 1837ace..6aa0d10 100644 --- a/chrome/browser/net/stub_resolver_config_reader.cc +++ b/chrome/browser/net/stub_resolver_config_reader.cc
@@ -44,6 +44,7 @@ #if BUILDFLAG(IS_WIN) #include "base/enterprise_util.h" +#include "base/win/win_util.h" #include "base/win/windows_version.h" #include "chrome/browser/win/parental_controls.h" #endif @@ -228,10 +229,12 @@ if (android_has_owner_.value_or(false)) return true; #elif BUILDFLAG(IS_WIN) + // TODO(crbug.com/1339062): What is the correct function to use here? (This + // may or may not obsolete the following TODO) // TODO (crbug.com/1320766): For legacy compatibility, this uses // IsEnterpriseDevice() which effectively equates to a domain join check. // Consider whether this should use IsManagedDevice() instead. - if (base::IsEnterpriseDevice()) + if (base::win::IsEnrolledToDomain()) return true; #endif #if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS)
diff --git a/chrome/browser/net/stub_resolver_config_reader_browsertest.cc b/chrome/browser/net/stub_resolver_config_reader_browsertest.cc index 805081e..eb75a151 100644 --- a/chrome/browser/net/stub_resolver_config_reader_browsertest.cc +++ b/chrome/browser/net/stub_resolver_config_reader_browsertest.cc
@@ -111,7 +111,8 @@ // Mark as not enterprise managed. #if BUILDFLAG(IS_WIN) base::win::ScopedDomainStateForTesting scoped_domain(false); - EXPECT_FALSE(base::IsEnterpriseDevice()); + // TODO(crbug.com/1339062): What is the correct function to use here? + EXPECT_FALSE(base::win::IsEnrolledToDomain()); #endif std::string good_post_template = "https://foo.test/";
diff --git a/chrome/browser/policy/cloud/cloud_policy_browsertest.cc b/chrome/browser/policy/cloud/cloud_policy_browsertest.cc index dee1b11..1f3c59b 100644 --- a/chrome/browser/policy/cloud/cloud_policy_browsertest.cc +++ b/chrome/browser/policy/cloud/cloud_policy_browsertest.cc
@@ -299,7 +299,7 @@ ASSERT_TRUE(base::PathService::Get( chromeos::dbus_paths::DIR_USER_POLICY_KEYS, &user_policy_key_dir)); std::string sanitized_username = - chromeos::UserDataAuthClient::GetStubSanitizedUsername( + ash::UserDataAuthClient::GetStubSanitizedUsername( cryptohome::CreateAccountIdentifierFromAccountId( AccountId::FromUserEmail(GetTestUser()))); user_policy_key_file_ = user_policy_key_dir.AppendASCII(sanitized_username)
diff --git a/chrome/browser/renderer_context_menu/render_view_context_menu.cc b/chrome/browser/renderer_context_menu/render_view_context_menu.cc index 5ae176d..d75b6c43 100644 --- a/chrome/browser/renderer_context_menu/render_view_context_menu.cc +++ b/chrome/browser/renderer_context_menu/render_view_context_menu.cc
@@ -1634,9 +1634,15 @@ !provider->image_url_ref().IsValid(service->search_terms_data())) { return; } + std::u16string provider_name = std::u16string(kGoogleLens); + if (lens::features::UseGoogleAsVisualSearchProvider()) { + provider_name = std::u16string(kGoogle); + } - menu_model_.AddItemWithStringId(IDC_CONTENT_CONTEXT_SEARCHLENSFORIMAGE, - IDS_CONTENT_CONTEXT_SEARCHLENSFORIMAGE); + menu_model_.AddItem( + IDC_CONTENT_CONTEXT_SEARCHLENSFORIMAGE, + l10n_util::GetStringFUTF16(IDS_CONTENT_CONTEXT_SEARCHLENSFORIMAGE, + provider_name)); } void RenderViewContextMenu::AppendAudioItems() { @@ -2128,27 +2134,25 @@ // IDS_CONTENT_CONTEXT_LENS_REGION_SEARCH_ALT4 is the currently launched // string for the regions search menu item. int resource_id = IDS_CONTENT_CONTEXT_LENS_REGION_SEARCH_ALT4; - std::u16string provider_name = std::u16string(kGoogleLens); + if (lens::features::UseRegionSearchMenuItemAltText1()) { resource_id = IDS_CONTENT_CONTEXT_LENS_REGION_SEARCH_ALT1; } else if (lens::features::UseRegionSearchMenuItemAltText2()) { resource_id = IDS_CONTENT_CONTEXT_LENS_REGION_SEARCH_ALT2; - } else if (lens::features::UseRegionSearchMenuItemAltText3()) { - // Uses `Google` instead of `Google Lens` like the first alternative string. - resource_id = IDS_CONTENT_CONTEXT_LENS_REGION_SEARCH_ALT1; - provider_name = std::u16string(kGoogle); - } else if (lens::features::UseRegionSearchMenuItemAltText4()) { - // This string is the same as currently launched but uses `Google` instead - // of `Google Lens` as the provider name. - provider_name = std::u16string(kGoogle); } else if (lens::features::IsLensFullscreenSearchEnabled()) { // Default text for fullscreen search when enabled. This is the same string // as the third alternative text option. resource_id = IDS_CONTENT_CONTEXT_LENS_REGION_SEARCH_ALT1; - provider_name = std::u16string(kGoogle); } if (search::DefaultSearchProviderIsGoogle(GetProfile())) { + // Check if string should use `Google Lens` as visual search provider or + // `Google`. + std::u16string provider_name = std::u16string(kGoogleLens); + if (lens::features::UseGoogleAsVisualSearchProvider()) { + provider_name = std::u16string(kGoogle); + } + menu_model_.AddItem(IDC_CONTENT_CONTEXT_LENS_REGION_SEARCH, l10n_util::GetStringFUTF16(resource_id, provider_name)); } else {
diff --git a/chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc b/chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc index 442fad5..dc5829e 100644 --- a/chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc +++ b/chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc
@@ -66,6 +66,7 @@ #include "content/public/browser/browser_message_filter.h" #include "content/public/browser/browser_plugin_guest_manager.h" #include "content/public/browser/browser_thread.h" +#include "content/public/browser/context_menu_params.h" #include "content/public/browser/navigation_controller.h" #include "content/public/browser/navigation_entry.h" #include "content/public/browser/notification_service.h" @@ -1066,46 +1067,6 @@ ASSERT_EQ(kEmptyReferrer, page_referrer); } -// Verify that "Open link in [App Name]" opens a new App window. -// TODO(crbug.com/1180790): Test is flaky on Linux and Windows. -#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) -#define MAYBE_OpenLinkInWebApp DISABLED_OpenLinkInWebApp -#else -#define MAYBE_OpenLinkInWebApp OpenLinkInWebApp -#endif -IN_PROC_BROWSER_TEST_F(ContextMenuBrowserTest, MAYBE_OpenLinkInWebApp) { - InstallTestWebApp(GURL(kAppUrl1)); - - ASSERT_TRUE(embedded_test_server()->Start()); - - size_t num_browsers = chrome::GetBrowserCount(browser()->profile()); - int num_tabs = browser()->tab_strip_model()->count(); - content::WebContents* initial_tab = - browser()->tab_strip_model()->GetActiveWebContents(); - const GURL initial_url = initial_tab->GetLastCommittedURL(); - - const GURL start_url(kAppUrl1); - ui_test_utils::UrlLoadObserver url_observer( - start_url, content::NotificationService::AllSources()); - content::ContextMenuParams params; - params.page_url = GURL("https://www.example.com/"); - params.link_url = start_url; - TestRenderViewContextMenu menu(*initial_tab->GetPrimaryMainFrame(), params); - menu.Init(); - menu.ExecuteCommand(IDC_CONTENT_CONTEXT_OPENLINKBOOKMARKAPP, - 0 /* event_flags */); - url_observer.Wait(); - - EXPECT_EQ(num_tabs, browser()->tab_strip_model()->count()); - EXPECT_EQ(++num_browsers, chrome::GetBrowserCount(browser()->profile())); - Browser* app_browser = chrome::FindLastActive(); - EXPECT_NE(browser(), app_browser); - EXPECT_EQ(initial_url, initial_tab->GetLastCommittedURL()); - EXPECT_EQ(start_url, app_browser->tab_strip_model() - ->GetActiveWebContents() - ->GetLastCommittedURL()); -} - // Check filename on clicking "Save Link As" via a "real" context menu. IN_PROC_BROWSER_TEST_F(ContextMenuBrowserTest, SuggestedFileName) { // Register observer.
diff --git a/chrome/browser/resources/chromeos/accessibility/chromevox/background/background_test.js b/chrome/browser/resources/chromeos/accessibility/chromevox/background/background_test.js index df5626e..c96b0ee 100644 --- a/chrome/browser/resources/chromeos/accessibility/chromevox/background/background_test.js +++ b/chrome/browser/resources/chromeos/accessibility/chromevox/background/background_test.js
@@ -220,17 +220,17 @@ /** Tests that ChromeVox classic is in this context. */ -SYNC_TEST_F('ChromeVoxBackgroundTest', 'ClassicNamespaces', function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'ClassicNamespaces', function() { assertEquals('function', typeof (ChromeVoxBackground)); }); /** Tests that ChromeVox's background object is not available globally. */ -SYNC_TEST_F('ChromeVoxBackgroundTest', 'NextNamespaces', function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'NextNamespaces', function() { assertEquals(undefined, window.Background); }); /** Tests consistency of navigating forward and backward. */ -TEST_F( +AX_TEST_F( 'ChromeVoxBackgroundTest', 'ForwardBackwardNavigation', async function() { const mockFeedback = this.createMockFeedback(); await this.runWithLoadedTree(this.linksAndHeadingsDoc); @@ -288,7 +288,7 @@ mockFeedback.replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'CaretNavigation', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'CaretNavigation', async function() { // TODO(plundblad): Add braille expectations when crbug.com/523285 is fixed. const mockFeedback = this.createMockFeedback(); await this.runWithLoadedTree(this.linksAndHeadingsDoc); @@ -316,7 +316,7 @@ }); /** Tests that individual buttons are stops for move-by-word functionality. */ -TEST_F( +AX_TEST_F( 'ChromeVoxBackgroundTest', 'CaretNavigationMoveThroughButtonByWord', async function() { const mockFeedback = this.createMockFeedback(); @@ -343,7 +343,7 @@ mockFeedback.replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'SelectSingleBasic', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'SelectSingleBasic', async function() { const mockFeedback = this.createMockFeedback(); await this.runWithLoadedTree(this.formsDoc); mockFeedback.expectSpeech('apple', 'has pop up', 'Collapsed') @@ -357,7 +357,7 @@ mockFeedback.replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'ContinuousRead', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'ContinuousRead', async function() { const mockFeedback = this.createMockFeedback(); await this.runWithLoadedTree(this.linksAndHeadingsDoc); mockFeedback.expectSpeech('start') @@ -367,14 +367,14 @@ mockFeedback.replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'InitialFocus', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'InitialFocus', async function() { const mockFeedback = this.createMockFeedback(); await this.runWithLoadedTree('<a href="a">a</a>'); mockFeedback.expectSpeech('a').expectSpeech('Link'); mockFeedback.replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'AriaLabel', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'AriaLabel', async function() { const mockFeedback = this.createMockFeedback(); const site = '<a aria-label="foo" href="a">a</a>'; const rootNode = await this.runWithLoadedTree(site); @@ -386,7 +386,7 @@ mockFeedback.replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'ShowContextMenu', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'ShowContextMenu', async function() { const mockFeedback = this.createMockFeedback(); const rootNode = await this.runWithLoadedTree('<p>before</p><a href="a">a</a>'); @@ -400,7 +400,7 @@ mockFeedback.replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'BrailleRouting', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'BrailleRouting', async function() { const mockFeedback = this.createMockFeedback(); const route = function(position) { assertTrue(ChromeVoxState.instance.onBrailleKeyEvent( @@ -439,7 +439,7 @@ mockFeedback.replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'FocusInputElement', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'FocusInputElement', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <input id="name" value="Lancelot"> @@ -461,7 +461,7 @@ mockFeedback.replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'UseEditableState', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'UseEditableState', async function() { const site = ` <input type="text"></input> <p tabindex=0>hi</p> @@ -480,7 +480,7 @@ DesktopAutomationInterface.instance.textEditHandler); }); -TEST_F('ChromeVoxBackgroundTest', 'EarconsForControls', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'EarconsForControls', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <p>Initial focus will be on something that's not a control.</p> @@ -540,7 +540,7 @@ })(); }); -TEST_F('ChromeVoxBackgroundTest', 'ShouldNotFocusIframe', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'ShouldNotFocusIframe', async function() { const site = ` <iframe tabindex=0 src="data:text/html,<p>Inside</p>"></iframe> <button>outside</button> @@ -562,7 +562,7 @@ assertFalse(didFocus); }); -TEST_F('ChromeVoxBackgroundTest', 'ShouldFocusLink', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'ShouldFocusLink', async function() { const site = ` <div><a href="#">mylink</a></div> <button>after</button> @@ -583,7 +583,7 @@ doCmd('previousElement'); }); -TEST_F('ChromeVoxBackgroundTest', 'NoisySlider', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'NoisySlider', async function() { const mockFeedback = this.createMockFeedback(); // Slider aria-valuetext must change otherwise blink suppresses event. const site = ` @@ -612,7 +612,7 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'Checkbox', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'Checkbox', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <div id="go" role="checkbox">go</div> @@ -648,7 +648,7 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'MixedCheckbox', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'MixedCheckbox', async function() { const mockFeedback = this.createMockFeedback(); const site = '<div id="go" role="checkbox" aria-checked="mixed">go</div>'; const root = await this.runWithLoadedTree(site); @@ -656,7 +656,7 @@ }); /** Tests navigating into and out of iframes using nextButton */ -TEST_F( +AX_TEST_F( 'ChromeVoxBackgroundTest', 'ForwardNavigationThroughIframeButtons', async function() { const mockFeedback = this.createMockFeedback(); @@ -699,7 +699,7 @@ }); /** Tests navigating into and out of iframes using nextObject */ -TEST_F( +AX_TEST_F( 'ChromeVoxBackgroundTest', 'ForwardObjectNavigationThroughIframes', async function() { const mockFeedback = this.createMockFeedback(); @@ -750,9 +750,9 @@ }); }); -TEST_F('ChromeVoxBackgroundTest', 'SelectOptionSelected', async function() { - // Undoes the ChromeVoxNextE2E call setting this to true. The doDefault action - // should always be read. +AX_TEST_F('ChromeVoxBackgroundTest', 'SelectOptionSelected', async function() { + // Undoes the ChromeVoxNextE2E call setting this to true. The doDefault + // action should always be read. BaseAutomationHandler.announceActions = false; const mockFeedback = this.createMockFeedback(); const site = ` @@ -783,7 +783,7 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'ToggleButton', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'ToggleButton', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <div aria-pressed="mixed" role="button">boldface</div> @@ -816,7 +816,7 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'EditText', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'EditText', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <input type="text"></input> @@ -832,14 +832,14 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'ComboBox', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'ComboBox', async function() { const mockFeedback = this.createMockFeedback(); await this.runWithLoadedTree(this.comboBoxDoc); mockFeedback.expectSpeech('Edit text', 'Choose an item', 'Combo box') .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'BackwardForwardSync', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'BackwardForwardSync', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <div aria-label="Group" role="group" tabindex=0> @@ -872,7 +872,7 @@ }); /** Tests that navigation works when the current object disappears. */ -TEST_F('ChromeVoxBackgroundTest', 'DisappearingObject', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'DisappearingObject', async function() { const mockFeedback = this.createMockFeedback(); const rootNode = await this.runWithLoadedTree(this.disappearingObjectDoc); const deleteButton = @@ -911,14 +911,14 @@ }); /** Tests that focus jumps to details properly when indicated. */ -TEST_F('ChromeVoxBackgroundTest', 'JumpToDetails', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'JumpToDetails', async function() { const mockFeedback = this.createMockFeedback(); const rootNode = await this.runWithLoadedTree(this.detailsDoc); mockFeedback.call(doCmd('jumpToDetails')).expectSpeech('Details'); mockFeedback.replay(); }); -TEST_F( +AX_TEST_F( 'ChromeVoxBackgroundTest', 'ButtonNameValueDescription', async function() { const mockFeedback = this.createMockFeedback(); const site = '<input type="submit" aria-label="foo" value="foo"></input>'; @@ -930,7 +930,7 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'NameFromHeadingLink', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'NameFromHeadingLink', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <p>before</p> @@ -945,7 +945,7 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'OptionChildIndexCount', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'OptionChildIndexCount', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <div role="listbox"> @@ -956,8 +956,8 @@ `; const root = await this.runWithLoadedTree(site); - // Select first child of the list box, similar to what happens if navigated - // by Tab. + // Select first child of the list box, similar to what happens if + // navigated by Tab. const firstChild = root.find({role: RoleType.PARAGRAPH}); mockFeedback .call( @@ -975,7 +975,7 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'ListMarkerIsIgnored', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'ListMarkerIsIgnored', async function() { const mockFeedback = this.createMockFeedback(); const root = await this.runWithLoadedTree('<ul><li>apple</ul>'); mockFeedback.call(doCmd('nextObject')) @@ -984,23 +984,24 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'SymetricComplexHeading', async function() { - const mockFeedback = this.createMockFeedback(); - const site = ` +AX_TEST_F( + 'ChromeVoxBackgroundTest', 'SymetricComplexHeading', async function() { + const mockFeedback = this.createMockFeedback(); + const site = ` <h4><p>NW</p><p>NE</p></h4> <h4><p>SW</p><p>SE</p></h4> `; - const root = await this.runWithLoadedTree(site); - mockFeedback.call(doCmd('nextHeading')) - .expectNextSpeechUtteranceIsNot('NE') - .expectSpeech('NW') - .call(doCmd('previousHeading')) - .expectNextSpeechUtteranceIsNot('NE') - .expectSpeech('NW') - .replay(); -}); + const root = await this.runWithLoadedTree(site); + mockFeedback.call(doCmd('nextHeading')) + .expectNextSpeechUtteranceIsNot('NE') + .expectSpeech('NW') + .call(doCmd('previousHeading')) + .expectNextSpeechUtteranceIsNot('NE') + .expectSpeech('NW') + .replay(); + }); -TEST_F( +AX_TEST_F( 'ChromeVoxBackgroundTest', 'ContentEditableJumpSyncsRange', async function() { const mockFeedback = this.createMockFeedback(); @@ -1034,7 +1035,7 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'Selection', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'Selection', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <p>simple</p> @@ -1064,7 +1065,7 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'BasicTableCommands', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'BasicTableCommands', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <table border=1> @@ -1134,7 +1135,7 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'MissingTableCells', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'MissingTableCells', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <table border=1> @@ -1176,14 +1177,14 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'DisabledState', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'DisabledState', async function() { const mockFeedback = this.createMockFeedback(); const site = '<button aria-disabled="true">ok</button>'; const root = await this.runWithLoadedTree(site); mockFeedback.expectSpeech('ok', 'Disabled', 'Button').replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'HeadingLevels', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'HeadingLevels', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <h1>1</h1><h2>2</h2><h3>3</h3><h4>4</h4><h5>5</h5><h6>6</h6> @@ -1203,7 +1204,7 @@ mockFeedback.replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'EditableNavigation', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'EditableNavigation', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <div contenteditable>this is a test</div> @@ -1222,7 +1223,7 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'NavigationMovesFocus', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'NavigationMovesFocus', async function() { const site = ` <p>start</p> <input type="text"></input> @@ -1235,30 +1236,31 @@ assertTrue(focus.state.focused); }); -TEST_F('ChromeVoxBackgroundTest', 'BrailleCaretNavigation', async function() { - const mockFeedback = this.createMockFeedback(); - const site = ` +AX_TEST_F( + 'ChromeVoxBackgroundTest', 'BrailleCaretNavigation', async function() { + const mockFeedback = this.createMockFeedback(); + const site = ` <p>This is a<em>test</em> of inline braille<br>with a second line</p> `; - const root = await this.runWithLoadedTree(site); - const text = 'This is a'; - mockFeedback.call(doCmd('nextCharacter')) - .expectBraille(text, {startIndex: 1, endIndex: 2}) // h - .call(doCmd('nextCharacter')) - .expectBraille(text, {startIndex: 2, endIndex: 3}) // i - .call(doCmd('nextWord')) - .expectBraille(text, {startIndex: 5, endIndex: 7}) // is - .call(doCmd('previousWord')) - .expectBraille(text, {startIndex: 0, endIndex: 4}) // This - .call(doCmd('nextLine')) - // Ensure nothing is selected when the range covers the entire line. - .expectBraille('with a second line', {startIndex: -1, endIndex: -1}) - .replay(); -}); + const root = await this.runWithLoadedTree(site); + const text = 'This is a'; + mockFeedback.call(doCmd('nextCharacter')) + .expectBraille(text, {startIndex: 1, endIndex: 2}) // h + .call(doCmd('nextCharacter')) + .expectBraille(text, {startIndex: 2, endIndex: 3}) // i + .call(doCmd('nextWord')) + .expectBraille(text, {startIndex: 5, endIndex: 7}) // is + .call(doCmd('previousWord')) + .expectBraille(text, {startIndex: 0, endIndex: 4}) // This + .call(doCmd('nextLine')) + // Ensure nothing is selected when the range covers the entire line. + .expectBraille('with a second line', {startIndex: -1, endIndex: -1}) + .replay(); + }); // This tests ChromeVox's special support for following an in-page link // if you force-click on it. Compare with InPageLinks, below. -TEST_F('ChromeVoxBackgroundTest', 'ForceClickInPageLinks', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'ForceClickInPageLinks', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <a href="#there">hi</a> @@ -1279,7 +1281,7 @@ // Note: this test needs the test server running because the browser // does not follow same-page links on data urls (because it modifies the // url fragment, and any change to the url is disallowed for a data url). -TEST_F( +AX_TEST_F( 'ChromeVoxBackgroundTestWithTestServer', 'InPageLinks', async function() { const mockFeedback = this.createMockFeedback(); const root = await this.runWithLoadedTree(undefined, { @@ -1295,7 +1297,7 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'ListItem', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'ListItem', async function() { this.resetContextualOutput(); const mockFeedback = this.createMockFeedback(); const site = ` @@ -1329,7 +1331,7 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'BusyHeading', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'BusyHeading', async function() { this.resetContextualOutput(); const mockFeedback = this.createMockFeedback(); const site = ` @@ -1346,7 +1348,7 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'NodeVsSubnode', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'NodeVsSubnode', async function() { const mockFeedback = this.createMockFeedback(); const root = await this.runWithLoadedTree('<a href="#">test</a>'); const link = root.find({role: RoleType.LINK}); @@ -1375,7 +1377,7 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'NativeFind', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'NativeFind', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <a href="#">grape</a> @@ -1392,7 +1394,7 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'EditableKeyCommand', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'EditableKeyCommand', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <input type="text"></input> @@ -1433,51 +1435,52 @@ #define MAYBE_TextSelectionAndLiveRegion TextSelectionAndLiveRegion #endif `, - 'ChromeVoxBackgroundTest', 'MAYBE_TextSelectionAndLiveRegion', - async function() { - BaseAutomationHandler.announceActions = true; - const mockFeedback = this.createMockFeedback(); - const root = await this.runWithLoadedTree(` - <p>start</p> - <div><input value="test" type="text"></input></div> - <div id="live" aria-live="assertive"></div> - <script> - const input = document.querySelector('input'); - const [div, live] = document.querySelectorAll('div'); - let clicks = 0; - div.addEventListener('click', function() { - clicks++; - if (clicks == 1) { - live.textContent = 'go'; - } else if (clicks == 2) { - input.selectionStart = 1; - live.textContent = 'queued'; - } else { - input.selectionStart = 2; - live.textContent = 'interrupted'; - } - }); - </script> - `); - const textField = root.find({role: RoleType.TEXT_FIELD}); - const div = textField.parent; - mockFeedback.call(textField.focus.bind(textField)) - .expectSpeech('Edit text') - .call(div.doDefault.bind(div)) - .expectSpeechWithQueueMode('go', QueueMode.CATEGORY_FLUSH) + 'ChromeVoxBackgroundTest', 'MAYBE_TextSelectionAndLiveRegion', function() { + this.newCallback(async () => { + BaseAutomationHandler.announceActions = true; + const mockFeedback = this.createMockFeedback(); + const root = await this.runWithLoadedTree(` + <p>start</p> + <div><input value="test" type="text"></input></div> + <div id="live" aria-live="assertive"></div> + <script> + const input = document.querySelector('input'); + const [div, live] = document.querySelectorAll('div'); + let clicks = 0; + div.addEventListener('click', function() { + clicks++; + if (clicks == 1) { + live.textContent = 'go'; + } else if (clicks == 2) { + input.selectionStart = 1; + live.textContent = 'queued'; + } else { + input.selectionStart = 2; + live.textContent = 'interrupted'; + } + }); + </script> + `); + const textField = root.find({role: RoleType.TEXT_FIELD}); + const div = textField.parent; + mockFeedback.call(textField.focus.bind(textField)) + .expectSpeech('Edit text') + .call(div.doDefault.bind(div)) + .expectSpeechWithQueueMode('go', QueueMode.CATEGORY_FLUSH) - .call(div.doDefault.bind(div)) - .expectSpeechWithQueueMode('queued', QueueMode.QUEUE) - .expectSpeechWithQueueMode('e', QueueMode.CATEGORY_FLUSH) + .call(div.doDefault.bind(div)) + .expectSpeechWithQueueMode('queued', QueueMode.QUEUE) + .expectSpeechWithQueueMode('e', QueueMode.CATEGORY_FLUSH) - .call(div.doDefault.bind(div)) - .expectSpeechWithQueueMode('interrupted', QueueMode.QUEUE) - .expectSpeechWithQueueMode('s', QueueMode.CATEGORY_FLUSH) + .call(div.doDefault.bind(div)) + .expectSpeechWithQueueMode('interrupted', QueueMode.QUEUE) + .expectSpeechWithQueueMode('s', QueueMode.CATEGORY_FLUSH) - .replay(); + .replay(); + })(); }); -TEST_F('ChromeVoxBackgroundTest', 'TableColumnHeaders', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'TableColumnHeaders', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <div role="grid"> @@ -1517,9 +1520,10 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'ActiveDescendantUpdates', async function() { - const mockFeedback = this.createMockFeedback(); - const site = ` +AX_TEST_F( + 'ChromeVoxBackgroundTest', 'ActiveDescendantUpdates', async function() { + const mockFeedback = this.createMockFeedback(); + const site = ` <div aria-label="container" tabindex=0 role="group" id="active" aria-activedescendant="1"> <div id="1" role="treeitem" aria-selected="false"></div> @@ -1536,17 +1540,17 @@ }); </script> `; - const root = await this.runWithLoadedTree(site); - const group = root.firstChild; - mockFeedback.call(group.focus.bind(group)) - .call(group.doDefault.bind(group)) - .expectSpeech('Tree item', ' 2 of 2 ') - .call(group.doDefault.bind(group)) - .expectSpeech('Tree item', 'Not selected', ' 1 of 2 ') - .replay(); -}); + const root = await this.runWithLoadedTree(site); + const group = root.firstChild; + mockFeedback.call(group.focus.bind(group)) + .call(group.doDefault.bind(group)) + .expectSpeech('Tree item', ' 2 of 2 ') + .call(group.doDefault.bind(group)) + .expectSpeech('Tree item', 'Not selected', ' 1 of 2 ') + .replay(); + }); -TEST_F('ChromeVoxBackgroundTest', 'NavigationEscapesEdit', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'NavigationEscapesEdit', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <p>before content editable</p> @@ -1613,7 +1617,7 @@ // TODO: soft line breaks currently won't work in <textarea>. }); -TEST_F( +AX_TEST_F( 'ChromeVoxBackgroundTest', 'DISABLED_SelectDoesNotSyncNavigation', async function() { const mockFeedback = this.createMockFeedback(); @@ -1644,9 +1648,10 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'NavigationIgnoresLabels', async function() { - const mockFeedback = this.createMockFeedback(); - const site = ` +AX_TEST_F( + 'ChromeVoxBackgroundTest', 'NavigationIgnoresLabels', async function() { + const mockFeedback = this.createMockFeedback(); + const site = ` <p>before</p> <p id="label">label</p> <a href="#next" id="lebal">lebal</a> @@ -1654,36 +1659,36 @@ <p>after</p> <button aria-labelledby="label headingLabel"></button> `; - const root = await this.runWithLoadedTree(site); - mockFeedback.expectSpeech('before') - .call(doCmd('nextObject')) - .expectSpeech('lebal', 'Link') - .call(doCmd('nextObject')) - .expectSpeech('headingLabel', 'Heading 2') - .call(doCmd('nextObject')) - .expectSpeech('after') - .call(doCmd('previousObject')) - .expectSpeech('headingLabel', 'Heading 2') - .call(doCmd('previousObject')) - .expectSpeech('lebal', 'Link') - .call(doCmd('previousObject')) - .expectSpeech('before') - .call(doCmd('nextObject')) - .expectSpeech('lebal', 'Link') - .call(doCmd('nextObject')) - .expectSpeech('headingLabel', 'Heading 2') - .call(doCmd('nextObject')) - .expectSpeech('after') - .call(doCmd('nextObject')) - .expectSpeech('label headingLabel', 'Button') - .call(doCmd('nextObject')) - .expectEarcon(Earcon.WRAP) - .call(doCmd('nextObject')) - .expectSpeech('before') - .replay(); -}); + const root = await this.runWithLoadedTree(site); + mockFeedback.expectSpeech('before') + .call(doCmd('nextObject')) + .expectSpeech('lebal', 'Link') + .call(doCmd('nextObject')) + .expectSpeech('headingLabel', 'Heading 2') + .call(doCmd('nextObject')) + .expectSpeech('after') + .call(doCmd('previousObject')) + .expectSpeech('headingLabel', 'Heading 2') + .call(doCmd('previousObject')) + .expectSpeech('lebal', 'Link') + .call(doCmd('previousObject')) + .expectSpeech('before') + .call(doCmd('nextObject')) + .expectSpeech('lebal', 'Link') + .call(doCmd('nextObject')) + .expectSpeech('headingLabel', 'Heading 2') + .call(doCmd('nextObject')) + .expectSpeech('after') + .call(doCmd('nextObject')) + .expectSpeech('label headingLabel', 'Button') + .call(doCmd('nextObject')) + .expectEarcon(Earcon.WRAP) + .call(doCmd('nextObject')) + .expectSpeech('before') + .replay(); + }); -TEST_F( +AX_TEST_F( 'ChromeVoxBackgroundTest', 'NavigationIgnoresDescriptions', async function() { const mockFeedback = this.createMockFeedback(); @@ -1717,9 +1722,10 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'MathContentViaInnerHtml', async function() { - const mockFeedback = this.createMockFeedback(); - const site = ` +AX_TEST_F( + 'ChromeVoxBackgroundTest', 'MathContentViaInnerHtml', async function() { + const mockFeedback = this.createMockFeedback(); + const site = ` <div role="math"> <semantics> <mrow class="MJX-TeXAtom-ORD"> @@ -1752,14 +1758,14 @@ </semantics> </div> `; - const root = await this.runWithLoadedTree(site); - mockFeedback.call(doCmd('nextObject')) - .expectSpeech('a ( y + m ) squared + b ( y + m ) + c = 0 .') - .expectSpeech('Press up, down, left, or right to explore math') - .replay(); -}); + const root = await this.runWithLoadedTree(site); + mockFeedback.call(doCmd('nextObject')) + .expectSpeech('a ( y + m ) squared + b ( y + m ) + c = 0 .') + .expectSpeech('Press up, down, left, or right to explore math') + .replay(); + }); -TEST_F('ChromeVoxBackgroundTest', 'GestureGranularity', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'GestureGranularity', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <p>This is a test</p> @@ -1827,7 +1833,7 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'LinesFilterWhitespace', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'LinesFilterWhitespace', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <p>start</p> @@ -1848,7 +1854,7 @@ .replay(); }); -TEST_F( +AX_TEST_F( 'ChromeVoxBackgroundTest', 'TabSwitchAndRefreshRecovery', async function() { const mockFeedback = this.createMockFeedback(); const root1 = await this.runWithLoadedTree('<p>tab1</p>'); @@ -1871,7 +1877,7 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'ListName', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'ListName', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <div id="_md-chips-wrapper-76" tabindex="-1" class="md-chips md-readonly" @@ -1887,7 +1893,7 @@ mockFeedback.expectSpeech('Favorite Sports').replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'LayoutTable', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'LayoutTable', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <table><tr><td>start</td></tr></table><p>end</p> @@ -1901,9 +1907,10 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'ReinsertedNodeRecovery', async function() { - const mockFeedback = this.createMockFeedback(); - const site = ` +AX_TEST_F( + 'ChromeVoxBackgroundTest', 'ReinsertedNodeRecovery', async function() { + const mockFeedback = this.createMockFeedback(); + const site = ` <div> <button id="start">start</button> <button id="hot">hot</button> @@ -1919,39 +1926,41 @@ }); </script> `; - const root = await this.runWithLoadedTree(site); - mockFeedback.expectSpeech('start') - .clearPendingOutput() - .call(doCmd('nextObject')) - .call(doCmd('nextObject')) - .call(doCmd('nextObject')) - .expectSpeech('end', 'Button') - .replay(); -}); + const root = await this.runWithLoadedTree(site); + mockFeedback.expectSpeech('start') + .clearPendingOutput() + .call(doCmd('nextObject')) + .call(doCmd('nextObject')) + .call(doCmd('nextObject')) + .expectSpeech('end', 'Button') + .replay(); + }); -TEST_F('ChromeVoxBackgroundTest', 'PointerTargetsLeafNode', async function() { - const mockFeedback = this.createMockFeedback(); - const site = ` +AX_TEST_F( + 'ChromeVoxBackgroundTest', 'PointerTargetsLeafNode', async function() { + const mockFeedback = this.createMockFeedback(); + const site = ` <div role=button><p>Washington</p></div> <div role=button><p>Adams</p></div> <div role=button><p>Jefferson</p></div> `; - const root = await this.runWithLoadedTree(site); - const button = - root.find({role: RoleType.BUTTON, attributes: {name: 'Jefferson'}}); - const buttonP = button.firstChild; - assertNotNullNorUndefined(buttonP); - const buttonText = buttonP.firstChild; - assertNotNullNorUndefined(buttonText); - mockFeedback.call(simulateHitTestResult(buttonText)) - .expectSpeech('Jefferson') - .expectSpeech('Button') - .replay(); -}); + const root = await this.runWithLoadedTree(site); + const button = + root.find({role: RoleType.BUTTON, attributes: {name: 'Jefferson'}}); + const buttonP = button.firstChild; + assertNotNullNorUndefined(buttonP); + const buttonText = buttonP.firstChild; + assertNotNullNorUndefined(buttonText); + mockFeedback.call(simulateHitTestResult(buttonText)) + .expectSpeech('Jefferson') + .expectSpeech('Button') + .replay(); + }); -TEST_F('ChromeVoxBackgroundTest', 'AriaSliderWithValueNow', async function() { - const mockFeedback = this.createMockFeedback(); - const site = ` +AX_TEST_F( + 'ChromeVoxBackgroundTest', 'AriaSliderWithValueNow', async function() { + const mockFeedback = this.createMockFeedback(); + const site = ` <div id="slider" role="slider" tabindex="0" aria-valuemin="0" aria-valuenow="50" aria-valuemax="100"></div> <script> @@ -1962,15 +1971,18 @@ }); </script> `; - const root = await this.runWithLoadedTree(site); - const slider = root.find({role: RoleType.SLIDER}); - assertNotNullNorUndefined(slider); - mockFeedback.call(slider.doDefault.bind(slider)).expectSpeech('51').replay(); -}); + const root = await this.runWithLoadedTree(site); + const slider = root.find({role: RoleType.SLIDER}); + assertNotNullNorUndefined(slider); + mockFeedback.call(slider.doDefault.bind(slider)) + .expectSpeech('51') + .replay(); + }); -TEST_F('ChromeVoxBackgroundTest', 'AriaSliderWithValueText', async function() { - const mockFeedback = this.createMockFeedback(); - const site = ` +AX_TEST_F( + 'ChromeVoxBackgroundTest', 'AriaSliderWithValueText', async function() { + const mockFeedback = this.createMockFeedback(); + const site = ` <div id="slider" role="slider" tabindex="0" aria-valuemin="0" aria-valuenow="50" aria-valuemax="100" aria-valuetext="tiny"></div> <script> @@ -1982,17 +1994,17 @@ }); </script> `; - const root = await this.runWithLoadedTree(site); - const slider = root.find({role: RoleType.SLIDER}); - assertNotNullNorUndefined(slider); - mockFeedback.clearPendingOutput() - .call(slider.doDefault.bind(slider)) - .expectNextSpeechUtteranceIsNot('51') - .expectSpeech('large') - .replay(); -}); + const root = await this.runWithLoadedTree(site); + const slider = root.find({role: RoleType.SLIDER}); + assertNotNullNorUndefined(slider); + mockFeedback.clearPendingOutput() + .call(slider.doDefault.bind(slider)) + .expectNextSpeechUtteranceIsNot('51') + .expectSpeech('large') + .replay(); + }); -TEST_F('ChromeVoxBackgroundTest', 'SelectValidityOutput', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'SelectValidityOutput', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <p>start</p> @@ -2019,7 +2031,7 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'EventFromAction', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'EventFromAction', async function() { const site = '<button>ok</button><button>cancel</button>'; const root = await this.runWithLoadedTree(site); const button = root.findAll({role: RoleType.BUTTON})[1]; @@ -2033,7 +2045,7 @@ button.focus(); }); -TEST_F('ChromeVoxBackgroundTest', 'EventFromUser', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'EventFromUser', async function() { const site = '<button>ok</button><button>cancel</button>'; const root = await this.runWithLoadedTree(site); const buttons = root.findAll({role: RoleType.BUTTON}); @@ -2056,7 +2068,7 @@ assertEquals('cancel', evt.target.name); }); -TEST_F( +AX_TEST_F( 'ChromeVoxBackgroundTest', 'ReadPhoneticPronunciationTest', async function() { const mockFeedback = this.createMockFeedback(); @@ -2090,7 +2102,7 @@ mockFeedback.replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'SimilarItemNavigation', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'SimilarItemNavigation', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <h3><a href="#a">inner</a></h3> @@ -2118,7 +2130,7 @@ mockFeedback.replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'InvalidItemNavigation', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'InvalidItemNavigation', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <h3><a href="#a">inner</a></h3> @@ -2157,7 +2169,7 @@ mockFeedback.replay(); }); -TEST_F( +AX_TEST_F( 'ChromeVoxBackgroundTest', 'InvalidItemNavigationNoItem', async function() { const mockFeedback = this.createMockFeedback(); const site = ` @@ -2180,7 +2192,7 @@ mockFeedback.replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'TableWithAriaRowCol', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'TableWithAriaRowCol', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <div role="table"> @@ -2195,7 +2207,7 @@ .replay(); }); -TEST_F( +AX_TEST_F( 'ChromeVoxBackgroundTest', 'NonModalDialogHeadingJump', async function() { const mockFeedback = this.createMockFeedback(); const site = ` @@ -2212,9 +2224,10 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'LevelEndsForNestedLists', async function() { - const mockFeedback = this.createMockFeedback(); - const site = ` +AX_TEST_F( + 'ChromeVoxBackgroundTest', 'LevelEndsForNestedLists', async function() { + const mockFeedback = this.createMockFeedback(); + const site = ` <div> <ul> <li>Berries @@ -2239,30 +2252,32 @@ </div> `; - const root = await this.runWithLoadedTree(site); - const blueberries = root.find({attributes: {name: 'Blueberries'}}); - const grapefruits = root.find({attributes: {name: 'Grapefruits'}}); + const root = await this.runWithLoadedTree(site); + const blueberries = root.find({attributes: {name: 'Blueberries'}}); + const grapefruits = root.find({attributes: {name: 'Grapefruits'}}); - mockFeedback - .call(() => { - ChromeVoxState.instance.setCurrentRange( - cursors.Range.fromNode(blueberries)); - }) - .call(doCmd('nextObject')) - .expectSpeech('â—¦ Raspberries', 'List item', 'List end', 'nested level 2') - .call(() => { - ChromeVoxState.instance.setCurrentRange( - cursors.Range.fromNode(grapefruits)); - }) - .call(doCmd('nextObject')) - .expectSpeech('â– Mandarins', 'List item', 'List end', 'nested level 3') - .call(doCmd('nextObject')) - // Nested level is not mentioned for level 1. - .expectSpeech('• Bananas', 'List item', 'List end') - .replay(); -}); + mockFeedback + .call(() => { + ChromeVoxState.instance.setCurrentRange( + cursors.Range.fromNode(blueberries)); + }) + .call(doCmd('nextObject')) + .expectSpeech( + 'â—¦ Raspberries', 'List item', 'List end', 'nested level 2') + .call(() => { + ChromeVoxState.instance.setCurrentRange( + cursors.Range.fromNode(grapefruits)); + }) + .call(doCmd('nextObject')) + .expectSpeech( + 'â– Mandarins', 'List item', 'List end', 'nested level 3') + .call(doCmd('nextObject')) + // Nested level is not mentioned for level 1. + .expectSpeech('• Bananas', 'List item', 'List end') + .replay(); + }); -TEST_F( +AX_TEST_F( 'ChromeVoxBackgroundTest', 'NestedListNavigationSimple', async function() { const mockFeedback = this.createMockFeedback(); const root = await this.runWithLoadedTree(this.nestedListDoc); @@ -2282,7 +2297,7 @@ .replay(); }); -TEST_F( +AX_TEST_F( 'ChromeVoxBackgroundTest', 'NestedListNavigationMixed', async function() { const mockFeedback = this.createMockFeedback(); const root = await this.runWithLoadedTree(this.nestedListDoc); @@ -2314,7 +2329,7 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'NavigationByList', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'NavigationByList', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <p>Start here</p> @@ -2389,7 +2404,7 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'NoListTest', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'NoListTest', async function() { const mockFeedback = this.createMockFeedback(); const root = await this.runWithLoadedTree('<button>Click me</button>'); mockFeedback.call(doCmd('nextList')) @@ -2399,7 +2414,7 @@ mockFeedback.replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'NavigateToLastHeading', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'NavigateToLastHeading', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <h1>First</h1> @@ -2414,7 +2429,7 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'ReadLinkURLTest', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'ReadLinkURLTest', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <a href="https://www.google.com/">A popular link</a> @@ -2432,7 +2447,7 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'NoRepeatTitle', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'NoRepeatTitle', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <div role="button" aria-label="title" title="title"></div> @@ -2445,7 +2460,7 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'PhoneticsAndCommands', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'PhoneticsAndCommands', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <p>some sample text</p> @@ -2474,7 +2489,7 @@ mockFeedback.replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'ToggleScreen', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'ToggleScreen', async function() { const mockFeedback = this.createMockFeedback(); // Pretend we've already accepted the confirmation dialog once. localStorage['acceptToggleScreen'] = 'true'; @@ -2488,50 +2503,53 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'NoFocusTalkBackDisabled', async function() { - // Fire onCustomSpokenFeedbackEnabled event to communicate that Talkback is - // off for the current app. - this.dispatchOnCustomSpokenFeedbackToggledEvent(false); - const mockFeedback = this.createMockFeedback(); - await this.runWithLoadedTree('<p>Test document</p>'); - ChromeVoxState.instance.setCurrentRange(null); - mockFeedback.call(doCmd('nextObject')) - .expectSpeech( - 'No current ChromeVox focus. Press Alt+Shift+L to go to the ' + - 'launcher.') - .call(doCmd('previousObject')) - .expectSpeech( - 'No current ChromeVox focus. Press Alt+Shift+L to go to the ' + - 'launcher.'); - mockFeedback.replay(); -}); +AX_TEST_F( + 'ChromeVoxBackgroundTest', 'NoFocusTalkBackDisabled', async function() { + // Fire onCustomSpokenFeedbackEnabled event to communicate that Talkback + // is off for the current app. + this.dispatchOnCustomSpokenFeedbackToggledEvent(false); + const mockFeedback = this.createMockFeedback(); + await this.runWithLoadedTree('<p>Test document</p>'); + ChromeVoxState.instance.setCurrentRange(null); + mockFeedback.call(doCmd('nextObject')) + .expectSpeech( + 'No current ChromeVox focus. Press Alt+Shift+L to go to the ' + + 'launcher.') + .call(doCmd('previousObject')) + .expectSpeech( + 'No current ChromeVox focus. Press Alt+Shift+L to go to the ' + + 'launcher.'); + mockFeedback.replay(); + }); -TEST_F('ChromeVoxBackgroundTest', 'NoFocusTalkBackEnabled', async function() { - // Fire onCustomSpokenFeedbackEnabled event to communicate that Talkback is - // on for the current app. We don't want to announce the no-focus hint message - // when TalkBack is on because we expect ChromeVox to have no focus in that - // case. If we announce the hint message, TalkBack and ChromeVox will - // try to speak at the same time. - this.dispatchOnCustomSpokenFeedbackToggledEvent(true); - const mockFeedback = this.createMockFeedback(); - await this.runWithLoadedTree('<p>Start here</p>'); - ChromeVoxState.instance.setCurrentRange(null); - mockFeedback.call(doCmd('nextObject')) - .call( - () => assertFalse(mockFeedback.utteranceInQueue( - 'No current ChromeVox focus. ' + - 'Press Alt+Shift+L to go to the launcher.'))) - .call(doCmd('previousObject')) - .call( - () => assertFalse(mockFeedback.utteranceInQueue( - 'No current ChromeVox focus. ' + - 'Press Alt+Shift+L to go to the launcher.'))); - mockFeedback.replay(); -}); +AX_TEST_F( + 'ChromeVoxBackgroundTest', 'NoFocusTalkBackEnabled', async function() { + // Fire onCustomSpokenFeedbackEnabled event to communicate that Talkback + // is on for the current app. We don't want to announce the no-focus hint + // message when TalkBack is on because we expect ChromeVox to have no + // focus in that case. If we announce the hint message, TalkBack and + // ChromeVox will try to speak at the same time. + this.dispatchOnCustomSpokenFeedbackToggledEvent(true); + const mockFeedback = this.createMockFeedback(); + await this.runWithLoadedTree('<p>Start here</p>'); + ChromeVoxState.instance.setCurrentRange(null); + mockFeedback.call(doCmd('nextObject')) + .call( + () => assertFalse(mockFeedback.utteranceInQueue( + 'No current ChromeVox focus. ' + + 'Press Alt+Shift+L to go to the launcher.'))) + .call(doCmd('previousObject')) + .call( + () => assertFalse(mockFeedback.utteranceInQueue( + 'No current ChromeVox focus. ' + + 'Press Alt+Shift+L to go to the launcher.'))); + mockFeedback.replay(); + }); -TEST_F('ChromeVoxBackgroundTest', 'NavigateOutOfMultiline', async function() { - const mockFeedback = this.createMockFeedback(); - const site = ` +AX_TEST_F( + 'ChromeVoxBackgroundTest', 'NavigateOutOfMultiline', async function() { + const mockFeedback = this.createMockFeedback(); + const site = ` <p>start</p> <p>before</p> <div contenteditable> @@ -2539,32 +2557,32 @@ </div> <p>after</p> `; - const root = await this.runWithLoadedTree(site); - const contentEditable = - root.find({attributes: {nonAtomicTextFieldRoot: true}}); - mockFeedback.call(contentEditable.focus.bind(contentEditable)) - .expectSpeech(/Testing testing\s+one two three/) - .call(doCmd('nextLine')) - .expectSpeech('one two three') - .call(doCmd('nextLine')) - .expectSpeech('after') + const root = await this.runWithLoadedTree(site); + const contentEditable = + root.find({attributes: {nonAtomicTextFieldRoot: true}}); + mockFeedback.call(contentEditable.focus.bind(contentEditable)) + .expectSpeech(/Testing testing\s+one two three/) + .call(doCmd('nextLine')) + .expectSpeech('one two three') + .call(doCmd('nextLine')) + .expectSpeech('after') - // In reverse (explicitly focus, instead of moving to previous - // line, because all subsequent commands require the content - // editable to be focused first): - .clearPendingOutput() - .call(contentEditable.focus.bind(contentEditable)) - .expectSpeech(/Testing testing\s+one two three/) - .call(doCmd('nextLine')) - .expectSpeech('one two three') - .call(doCmd('previousLine')) - .expectSpeech('Testing testing') - .call(doCmd('previousLine')) - .expectSpeech('before') - .replay(); -}); + // In reverse (explicitly focus, instead of moving to previous + // line, because all subsequent commands require the content + // editable to be focused first): + .clearPendingOutput() + .call(contentEditable.focus.bind(contentEditable)) + .expectSpeech(/Testing testing\s+one two three/) + .call(doCmd('nextLine')) + .expectSpeech('one two three') + .call(doCmd('previousLine')) + .expectSpeech('Testing testing') + .call(doCmd('previousLine')) + .expectSpeech('before') + .replay(); + }); -TEST_F('ChromeVoxBackgroundTest', 'ReadWindowTitle', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'ReadWindowTitle', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <p>start</p> @@ -2596,7 +2614,7 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'OutputEmptyQueueMode', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'OutputEmptyQueueMode', async function() { const mockFeedback = this.createMockFeedback(); const root = await this.runWithLoadedTree('<p>unused</p>'); const output = new Output(); @@ -2612,7 +2630,7 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'SetAccessibilityFocus', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'SetAccessibilityFocus', async function() { const root = await this.runWithLoadedTree('<p>Text.</p><button>Button</button>'); const node = root.find({role: RoleType.BUTTON}); @@ -2626,7 +2644,7 @@ node.focus(); }); -TEST_F('ChromeVoxBackgroundTest', 'MenuItemRadio', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'MenuItemRadio', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <ul role="menu" tabindex="0" autofocus> @@ -2644,7 +2662,7 @@ .replay(); }); -TEST_F( +AX_TEST_F( 'ChromeVoxBackgroundTest', 'ButtonNavigationIgnoresRadioButtons', async function() { const mockFeedback = this.createMockFeedback(); @@ -2666,7 +2684,7 @@ mockFeedback.replay(); }); -TEST_F( +AX_TEST_F( 'ChromeVoxBackgroundTest', 'FocusableNamedDivIsNotContainer', async function() { const site = ` @@ -2678,7 +2696,7 @@ assertFalse(AutomationPredicate.container(genericContainer)); }); -TEST_F('ChromeVoxBackgroundTest', 'HitTestOnExoSurface', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'HitTestOnExoSurface', async function() { const site = ` <button></button> <input type="text"</input> @@ -2709,50 +2727,51 @@ Gesture.TOUCH_EXPLORE, fakeWindow.location.left, fakeWindow.location.top); }); -TEST_F('ChromeVoxBackgroundTest', 'PointerSkipsContainers', async function() { - PointerHandler.MIN_NO_POINTER_ANCHOR_SOUND_DELAY_MS = -1; - const mockFeedback = this.createMockFeedback(); - const site = ` +AX_TEST_F( + 'ChromeVoxBackgroundTest', 'PointerSkipsContainers', async function() { + PointerHandler.MIN_NO_POINTER_ANCHOR_SOUND_DELAY_MS = -1; + const mockFeedback = this.createMockFeedback(); + const site = ` <div role="grouparia-label="test" " tabindex=0> <div role=button><p></p></div> </div> `; - const root = await this.runWithLoadedTree(site); - ChromeVoxState.addObserver(new class { - onCurrentRangeChanged(range) { - if (!range) { - ChromeVox.tts.speak('range cleared!'); - } - } - }()); - - const button = root.find({role: RoleType.BUTTON}); - assertNotNullNorUndefined(button); - const group = button.parent; - assertNotNullNorUndefined(group); - mockFeedback.call(simulateHitTestResult(button)) - .expectSpeech('Button') - .call(() => { - // Override the role to simulate panes which are only found in - // views. - Object.defineProperty(group, 'role', { - get() { - return chrome.automation.RoleType.PANE; + const root = await this.runWithLoadedTree(site); + ChromeVoxState.addObserver(new class { + onCurrentRangeChanged(range) { + if (!range) { + ChromeVox.tts.speak('range cleared!'); } - }); - }) - .call(simulateHitTestResult(group)) - .expectSpeech('range cleared!') - .expectEarcon(Earcon.NO_POINTER_ANCHOR) - .call(simulateHitTestResult(button)) - .expectSpeech('Button') - .call(simulateHitTestResult(group)) - .expectSpeech('range cleared!') - .expectEarcon(Earcon.NO_POINTER_ANCHOR) - .replay(); -}); + } + }()); -TEST_F('ChromeVoxBackgroundTest', 'FocusOnUnknown', async function() { + const button = root.find({role: RoleType.BUTTON}); + assertNotNullNorUndefined(button); + const group = button.parent; + assertNotNullNorUndefined(group); + mockFeedback.call(simulateHitTestResult(button)) + .expectSpeech('Button') + .call(() => { + // Override the role to simulate panes which are only found in + // views. + Object.defineProperty(group, 'role', { + get() { + return chrome.automation.RoleType.PANE; + } + }); + }) + .call(simulateHitTestResult(group)) + .expectSpeech('range cleared!') + .expectEarcon(Earcon.NO_POINTER_ANCHOR) + .call(simulateHitTestResult(button)) + .expectSpeech('Button') + .call(simulateHitTestResult(group)) + .expectSpeech('range cleared!') + .expectEarcon(Earcon.NO_POINTER_ANCHOR) + .replay(); + }); + +AX_TEST_F('ChromeVoxBackgroundTest', 'FocusOnUnknown', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <p>start</p> @@ -2789,7 +2808,7 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'TimeDateCommand', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'TimeDateCommand', async function() { const mockFeedback = this.createMockFeedback(); const root = await this.runWithLoadedTree('<p></p>'); mockFeedback.call(doCmd('speakTimeAndDate')) @@ -2798,7 +2817,7 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'SwipeToScrollByPage', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'SwipeToScrollByPage', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <p style="font-size: 200pt">This is a test</p> @@ -2821,7 +2840,7 @@ .replay(); }); -TEST_F( +AX_TEST_F( 'ChromeVoxBackgroundTest', 'PointerOnOffOnRepeatsNode', async function() { PointerHandler.MIN_NO_POINTER_ANCHOR_SOUND_DELAY_MS = -1; const mockFeedback = this.createMockFeedback(); @@ -2851,7 +2870,7 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'PopupButtonCollapsed', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'PopupButtonCollapsed', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <select id="button"> @@ -2867,7 +2886,7 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'PopupButtonExpanded', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'PopupButtonExpanded', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <button id="button" aria-haspopup="true" aria-expanded="true" @@ -2892,7 +2911,7 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'SortDirection', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'SortDirection', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <table border="1"> @@ -2922,7 +2941,7 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'InlineLineNavigation', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'InlineLineNavigation', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <p>start</p> @@ -2934,7 +2953,7 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'AudioVideo', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'AudioVideo', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <button></button> @@ -2971,7 +2990,7 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'AlertNoAnnouncement', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'AlertNoAnnouncement', async function() { const mockFeedback = this.createMockFeedback(); const root = await this.runWithLoadedTree('<button></button>'); ChromeVoxState.addObserver(new class { @@ -2988,7 +3007,7 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'AlertAnnouncement', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'AlertAnnouncement', async function() { const mockFeedback = this.createMockFeedback(); const root = await this.runWithLoadedTree('<button>hello world</button>'); ChromeVoxState.addObserver(new class { @@ -3007,7 +3026,7 @@ .replay(); }); -TEST_F( +AX_TEST_F( 'ChromeVoxBackgroundTest', 'SwipeLeftRight4ByContainers', async function() { const mockFeedback = this.createMockFeedback(); const root = await this.runWithLoadedTree(`<p>test</p>`); @@ -3028,7 +3047,7 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'SwipeLeftRight2', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'SwipeLeftRight2', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <p id="live" aria-live="polite"</p> @@ -3046,7 +3065,7 @@ }); // TODO(crbug.com/1228418) - Improve the generation of summaries across ChromeOS -TEST_F( +AX_TEST_F( 'ChromeVoxBackgroundTest', 'AlertDialogAutoSummaryTextContent', async function() { this.resetContextualOutput(); @@ -3083,7 +3102,7 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'ImageAnnotations', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'ImageAnnotations', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <p>start</p> @@ -3121,7 +3140,7 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'VolumeChanges', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'VolumeChanges', async function() { const mockFeedback = this.createMockFeedback(); await this.runWithLoadedTree('<p>test</p>'); const bounds = FocusBounds.get(); @@ -3134,7 +3153,7 @@ .replay(); }); -TEST_F( +AX_TEST_F( 'ChromeVoxBackgroundTest', 'WrapContentEditableAtEndOfDoc', async function() { const mockFeedback = this.createMockFeedback(); @@ -3151,23 +3170,24 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'ReadFromHereBlankNodes', async function() { - const mockFeedback = this.createMockFeedback(); - const site = `<a tabindex=0></a><p>start</p><a tabindex=0></a><p>end</p>`; - const root = await this.runWithLoadedTree(site); - assertEquals( - RoleType.STATIC_TEXT, - ChromeVoxState.instance.currentRange.start.node.role); +AX_TEST_F( + 'ChromeVoxBackgroundTest', 'ReadFromHereBlankNodes', async function() { + const mockFeedback = this.createMockFeedback(); + const site = `<a tabindex=0></a><p>start</p><a tabindex=0></a><p>end</p>`; + const root = await this.runWithLoadedTree(site); + assertEquals( + RoleType.STATIC_TEXT, + ChromeVoxState.instance.currentRange.start.node.role); - // "start" is uttered twice, once for the initial focus as the page loads, - // and once during the 'read from here' command. - mockFeedback.expectSpeech('start') - .call(doCmd('readFromHere')) - .expectSpeech('start', 'end') - .replay(); -}); + // "start" is uttered twice, once for the initial focus as the page loads, + // and once during the 'read from here' command. + mockFeedback.expectSpeech('start') + .call(doCmd('readFromHere')) + .expectSpeech('start', 'end') + .replay(); + }); -TEST_F('ChromeVoxBackgroundTest', 'ContainerButtons', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'ContainerButtons', async function() { const mockFeedback = this.createMockFeedback(); // This pattern can be found in ARC++/YouTube. @@ -3193,7 +3213,7 @@ .replay(); }); -TEST_F( +AX_TEST_F( 'ChromeVoxBackgroundTest', 'FocusOnWebAreaIgnoresEvents', async function() { const site = ` <div role="application" tabindex=0 aria-label="container"> @@ -3250,7 +3270,7 @@ assertEquals(undefined, nextSpeech); }); -TEST_F('ChromeVoxBackgroundTest', 'AriaLeaves', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'AriaLeaves', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <div role="radio"><p>PM</p></div> @@ -3287,7 +3307,7 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'MarkedContent', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'MarkedContent', async function() { this.resetContextualOutput(); const mockFeedback = this.createMockFeedback(); const site = ` @@ -3341,7 +3361,7 @@ .replay(); }); -TEST_F( +AX_TEST_F( 'ChromeVoxBackgroundTest', 'ClickAncestorAreNotActionable', async function() { const mockFeedback = this.createMockFeedback(); @@ -3372,7 +3392,7 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'TouchEditingState', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'TouchEditingState', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <p>Start</p> @@ -3391,7 +3411,7 @@ .replay(); }); -TEST_F( +AX_TEST_F( 'ChromeVoxBackgroundTest', 'TouchGesturesProducesEarcons', async function() { const mockFeedback = this.createMockFeedback(); @@ -3414,7 +3434,7 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'Separator', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'Separator', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <p>Start</p> @@ -3434,7 +3454,7 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'FocusAfterClick', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'FocusAfterClick', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <p>Start</p> @@ -3461,7 +3481,7 @@ .replay(); }); -SYNC_TEST_F('ChromeVoxBackgroundTest', 'EarconPlayback', function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'EarconPlayback', function() { const engine = ChromeVoxState.instance.earcons_.engine_; assertTrue(engine !== undefined); @@ -3503,7 +3523,7 @@ assertEquals(0, Object.keys(engine.lastEarconSources_).length); }); -TEST_F( +AX_TEST_F( 'ChromeVoxBackgroundTest', 'MixedNavWithRangeInvalidation', async function() { const mockFeedback = this.createMockFeedback(); @@ -3575,7 +3595,7 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'DetailsChanged', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'DetailsChanged', async function() { const mockFeedback = this.createMockFeedback(); // Make sure we're not testing reading of the hint from the button's output @@ -3599,7 +3619,7 @@ .replay(); }); -SYNC_TEST_F('ChromeVoxBackgroundTest', 'PageLoadEarcons', function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'PageLoadEarcons', function() { const sawEarcons = []; const fakeEarcons = {playEarcon: earcon => sawEarcons.push(earcon)}; Object.defineProperty(ChromeVox, 'earcons', {get: () => fakeEarcons}); @@ -3634,7 +3654,7 @@ [Earcon.PAGE_START_LOADING, Earcon.PAGE_FINISH_LOADING], sawEarcons); }); -TEST_F('ChromeVoxBackgroundTest', 'NewTabRead', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'NewTabRead', async function() { const mockFeedback = this.createMockFeedback(); const site = `<p>start</p><p>end</p>`; const root = await this.runWithLoadedTree(site); @@ -3645,7 +3665,7 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'NestedMenuHints', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'NestedMenuHints', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <div role="menu" aria-orientation="vertical"> @@ -3664,9 +3684,10 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'SkipLabelDescriptionFor', async function() { - const mockFeedback = this.createMockFeedback(); - const site = ` +AX_TEST_F( + 'ChromeVoxBackgroundTest', 'SkipLabelDescriptionFor', async function() { + const mockFeedback = this.createMockFeedback(); + const site = ` <p>start</p> <label> <input type="checkbox" name="enableSpeechLogging"> @@ -3674,20 +3695,20 @@ </label> <p>end</p> `; - const root = await this.runWithLoadedTree(site); - mockFeedback.expectSpeech('start') - .call(doCmd('nextObject')) - .expectSpeech('Enable speech logging', 'Check box') - .call(doCmd('nextObject')) - .expectSpeech('end') - .call(doCmd('previousObject')) - .expectSpeech('Enable speech logging', 'Check box') - .call(doCmd('previousObject')) - .expectSpeech('start') - .replay(); -}); + const root = await this.runWithLoadedTree(site); + mockFeedback.expectSpeech('start') + .call(doCmd('nextObject')) + .expectSpeech('Enable speech logging', 'Check box') + .call(doCmd('nextObject')) + .expectSpeech('end') + .call(doCmd('previousObject')) + .expectSpeech('Enable speech logging', 'Check box') + .call(doCmd('previousObject')) + .expectSpeech('start') + .replay(); + }); -TEST_F('ChromeVoxBackgroundTest', 'Abbreviation', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'Abbreviation', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <abbr title="uniform resource locator">URL</abbr> @@ -3697,7 +3718,7 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'EndOfText', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'EndOfText', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <p>start</p> @@ -3741,7 +3762,7 @@ .replay(); }); -TEST_F( +AX_TEST_F( 'ChromeVoxBackgroundTest', 'ShowContextMenuOnViewsTab', async function() { const mockFeedback = this.createMockFeedback(); const site = `<p>test</p>`; @@ -3752,7 +3773,7 @@ mockFeedback.expectSpeech(/menu opened/).replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'SelectWithOptGroup', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'SelectWithOptGroup', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <select> @@ -3776,7 +3797,7 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'GroupNavigation', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'GroupNavigation', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <p><span>hello</span><a href="a.com">hi</a><a href="a.com">hey</a></p> @@ -3794,9 +3815,10 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'AllowIframeToBeFocused', async function() { - const mockFeedback = this.createMockFeedback(); - const site = ` +AX_TEST_F( + 'ChromeVoxBackgroundTest', 'AllowIframeToBeFocused', async function() { + const mockFeedback = this.createMockFeedback(); + const site = ` <p>hello</p> <iframe id="frame" tabindex=-1 srcdoc="<title>test title</title><p>world</p>"></iframe> @@ -3808,13 +3830,13 @@ }); </script> `; - const root = await this.runWithLoadedTree(site); - const button = root.find({role: RoleType.BUTTON}); - mockFeedback.expectSpeech('hello') - .call(button.doDefault.bind(button)) - .expectSpeech('test title') - .replay(); -}); + const root = await this.runWithLoadedTree(site); + const button = root.find({role: RoleType.BUTTON}); + mockFeedback.expectSpeech('hello') + .call(button.doDefault.bind(button)) + .expectSpeech('test title') + .replay(); + }); TEST_F('ChromeVoxBackgroundTest', 'NewWindowWebSpeech', function() { this.newCallback(async () => { @@ -3855,7 +3877,7 @@ })(); }); -TEST_F('ChromeVoxBackgroundTest', 'MultipleListBoxes', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'MultipleListBoxes', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <p>start</p> @@ -3921,35 +3943,37 @@ }); // Make sure linear navigation does not go inside ListBox's options. -TEST_F('ChromeVoxBackgroundTest', 'ListBoxLinearNavigation', async function() { - const mockFeedback = this.createMockFeedback(); - await this.runWithLoadedTree(this.listBoxDoc); - mockFeedback.call(doCmd('nextObject')) - .expectSpeech('Select an item', 'List box') - .call(doCmd('nextObject')) - .expectSpeech('Click', 'Button') - .call(doCmd('previousObject')) - .expectSpeech('Select an item', 'List box') - .replay(); -}); +AX_TEST_F( + 'ChromeVoxBackgroundTest', 'ListBoxLinearNavigation', async function() { + const mockFeedback = this.createMockFeedback(); + await this.runWithLoadedTree(this.listBoxDoc); + mockFeedback.call(doCmd('nextObject')) + .expectSpeech('Select an item', 'List box') + .call(doCmd('nextObject')) + .expectSpeech('Click', 'Button') + .call(doCmd('previousObject')) + .expectSpeech('Select an item', 'List box') + .replay(); + }); // Make sure navigation with Tab to ListBox lands on options. -TEST_F('ChromeVoxBackgroundTest', 'ListBoxItemsNavigation', async function() { - const mockFeedback = this.createMockFeedback(); +AX_TEST_F( + 'ChromeVoxBackgroundTest', 'ListBoxItemsNavigation', async function() { + const mockFeedback = this.createMockFeedback(); - await this.runWithLoadedTree(this.listBoxDoc); - mockFeedback.call(press(KeyCode.TAB)) - .expectSpeech( - 'Listbox item one', ' 1 of 3 ', 'Select an item', 'List box') - .call(doCmd('nextObject')) - .expectSpeech('Listbox item two', ' 2 of 3 ') - .call(doCmd('nextObject')) - .expectSpeech('Listbox item three', ' 3 of 3 ') - .replay(); -}); + await this.runWithLoadedTree(this.listBoxDoc); + mockFeedback.call(press(KeyCode.TAB)) + .expectSpeech( + 'Listbox item one', ' 1 of 3 ', 'Select an item', 'List box') + .call(doCmd('nextObject')) + .expectSpeech('Listbox item two', ' 2 of 3 ') + .call(doCmd('nextObject')) + .expectSpeech('Listbox item three', ' 3 of 3 ') + .replay(); + }); // Make sure navigation with touch to ListBox lands on options. -TEST_F( +AX_TEST_F( 'ChromeVoxBackgroundTest', 'TouchListBoxItemsNavigation', async function() { const mockFeedback = this.createMockFeedback(); await this.runWithLoadedTree(this.listBoxDoc); @@ -3970,7 +3994,7 @@ .replay(); }); -TEST_F( +AX_TEST_F( 'ChromeVoxBackgroundTest', 'CrossWindowNextPreviousFocus', async function() { const mockFeedback = this.createMockFeedback(); @@ -4034,7 +4058,7 @@ .replay(); }); -TEST_F('ChromeVoxBackgroundTest', 'GestureOnPopUpButton', async function() { +AX_TEST_F('ChromeVoxBackgroundTest', 'GestureOnPopUpButton', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <select><option>apple</option><option>banana</option></select>
diff --git a/chrome/browser/resources/chromeos/accessibility/chromevox/background/editing/editing_test.js b/chrome/browser/resources/chromeos/accessibility/chromevox/background/editing/editing_test.js index 28126ef..6161097 100644 --- a/chrome/browser/resources/chromeos/accessibility/chromevox/background/editing/editing_test.js +++ b/chrome/browser/resources/chromeos/accessibility/chromevox/background/editing/editing_test.js
@@ -67,7 +67,7 @@ </textarea> `; -TEST_F('ChromeVoxEditingTest', 'Focus', async function() { +AX_TEST_F('ChromeVoxEditingTest', 'Focus', async function() { const mockFeedback = this.createMockFeedback(); const root = await this.runWithLoadedTree(doc); const singleLine = @@ -86,7 +86,7 @@ mockFeedback.replay(); }); -TEST_F('ChromeVoxEditingTest', 'Multiline', async function() { +AX_TEST_F('ChromeVoxEditingTest', 'Multiline', async function() { const mockFeedback = this.createMockFeedback(); const root = await this.runWithLoadedTree(doc); const textarea = @@ -108,7 +108,7 @@ mockFeedback.replay(); }); -TEST_F('ChromeVoxEditingTest', 'TextButNoSelectionChange', async function() { +AX_TEST_F('ChromeVoxEditingTest', 'TextButNoSelectionChange', async function() { const mockFeedback = this.createMockFeedback(); const root = await this.runWithLoadedTree(` <h1>Test doc</h1> @@ -140,7 +140,7 @@ mockFeedback.replay(); }); -TEST_F('ChromeVoxEditingTest', 'RichTextMoveByLine', async function() { +AX_TEST_F('ChromeVoxEditingTest', 'RichTextMoveByLine', async function() { // Turn on rich text output settings. localStorage['announceRichTextAttributes'] = 'true'; @@ -192,7 +192,7 @@ .replay(); }); -TEST_F('ChromeVoxEditingTest', 'RichTextMoveByCharacter', async function() { +AX_TEST_F('ChromeVoxEditingTest', 'RichTextMoveByCharacter', async function() { // Turn on rich text output settings. localStorage['announceRichTextAttributes'] = 'true'; @@ -266,7 +266,7 @@ .replay(); }); -TEST_F( +AX_TEST_F( 'ChromeVoxEditingTest', 'RichTextMoveByCharacterAllAttributes', async function() { // Turn on rich text output settings. @@ -433,7 +433,7 @@ }); // Tests specifically for cursor workarounds. -TEST_F( +AX_TEST_F( 'ChromeVoxEditingTest', 'RichTextMoveByCharacterNodeWorkaround', async function() { const mockFeedback = this.createMockFeedback(); @@ -475,7 +475,7 @@ .replay(); }); -TEST_F( +AX_TEST_F( 'ChromeVoxEditingTest', 'RichTextMoveByCharacterEndOfLine', async function() { const mockFeedback = this.createMockFeedback(); @@ -512,7 +512,7 @@ .replay(); }); -TEST_F('ChromeVoxEditingTest', 'RichTextLinkOutput', async function() { +AX_TEST_F('ChromeVoxEditingTest', 'RichTextLinkOutput', async function() { // Turn on rich text output settings. localStorage['announceRichTextAttributes'] = 'true'; @@ -556,9 +556,10 @@ .replay(); }); -TEST_F('ChromeVoxEditingTest', 'RichTextExtendByCharacter', async function() { - const mockFeedback = this.createMockFeedback(); - const root = await this.runWithLoadedTree(` +AX_TEST_F( + 'ChromeVoxEditingTest', 'RichTextExtendByCharacter', async function() { + const mockFeedback = this.createMockFeedback(); + const root = await this.runWithLoadedTree(` <div role="textbox" contenteditable>Te<br>st</div> <button id="go">Go</button> @@ -569,26 +570,26 @@ }, true); </script> `); - await this.focusFirstTextField(root); + await this.focusFirstTextField(root); - const go = root.find({role: RoleType.BUTTON}); - const moveByChar = go.doDefault.bind(go); + const go = root.find({role: RoleType.BUTTON}); + const moveByChar = go.doDefault.bind(go); - mockFeedback.call(moveByChar) - .expectSpeech('T', 'selected') - .call(moveByChar) - .expectSpeech('e', 'selected') - .call(moveByChar) - .expectSpeech('selected') - .call(moveByChar) - .expectSpeech('s', 'selected') - .call(moveByChar) - .expectSpeech('t', 'selected') + mockFeedback.call(moveByChar) + .expectSpeech('T', 'selected') + .call(moveByChar) + .expectSpeech('e', 'selected') + .call(moveByChar) + .expectSpeech('selected') + .call(moveByChar) + .expectSpeech('s', 'selected') + .call(moveByChar) + .expectSpeech('t', 'selected') - .replay(); -}); + .replay(); + }); -TEST_F('ChromeVoxEditingTest', 'RichTextImageByCharacter', async function() { +AX_TEST_F('ChromeVoxEditingTest', 'RichTextImageByCharacter', async function() { const mockFeedback = this.createMockFeedback(); const root = await this.runWithLoadedTree(` <p contenteditable> @@ -652,7 +653,7 @@ mockFeedback.replay(); }); -TEST_F('ChromeVoxEditingTest', 'RichTextSelectByLine', async function() { +AX_TEST_F('ChromeVoxEditingTest', 'RichTextSelectByLine', async function() { const mockFeedback = this.createMockFeedback(); // Use digit strings like "11111" and "22222" because the character widths // of digits are always the same. This means the test can move down one line @@ -762,7 +763,7 @@ .replay(); }); -TEST_F( +AX_TEST_F( 'ChromeVoxEditingTest', 'RichTextSelectComplexStructure', async function() { const mockFeedback = this.createMockFeedback(); const root = await this.runWithLoadedTree(` @@ -870,110 +871,112 @@ .replay(); }); -TEST_F('ChromeVoxEditingTest', 'EditableLineOneStaticText', async function() { - const root = await this.runWithLoadedTree(` +AX_TEST_F( + 'ChromeVoxEditingTest', 'EditableLineOneStaticText', async function() { + const root = await this.runWithLoadedTree(` <p contenteditable style="word-spacing:100000px">this is a test</p> `); - const staticText = root.find({role: RoleType.STATIC_TEXT}); + const staticText = root.find({role: RoleType.STATIC_TEXT}); - let e = new EditableLine(staticText, 0, staticText, 0); - assertEquals('this ', e.text); + let e = new EditableLine(staticText, 0, staticText, 0); + assertEquals('this ', e.text); - assertEquals(0, e.startOffset); - assertEquals(0, e.endOffset); - assertEquals(0, e.localStartOffset); - assertEquals(0, e.localEndOffset); + assertEquals(0, e.startOffset); + assertEquals(0, e.endOffset); + assertEquals(0, e.localStartOffset); + assertEquals(0, e.localEndOffset); - assertEquals(0, e.containerStartOffset); - assertEquals(4, e.containerEndOffset); + assertEquals(0, e.containerStartOffset); + assertEquals(4, e.containerEndOffset); - e = new EditableLine(staticText, 1, staticText, 1); - assertEquals('this ', e.text); + e = new EditableLine(staticText, 1, staticText, 1); + assertEquals('this ', e.text); - assertEquals(1, e.startOffset); - assertEquals(1, e.endOffset); - assertEquals(1, e.localStartOffset); - assertEquals(1, e.localEndOffset); + assertEquals(1, e.startOffset); + assertEquals(1, e.endOffset); + assertEquals(1, e.localStartOffset); + assertEquals(1, e.localEndOffset); - assertEquals(0, e.containerStartOffset); - assertEquals(4, e.containerEndOffset); + assertEquals(0, e.containerStartOffset); + assertEquals(4, e.containerEndOffset); - e = new EditableLine(staticText, 5, staticText, 5); - assertEquals('is ', e.text); + e = new EditableLine(staticText, 5, staticText, 5); + assertEquals('is ', e.text); - assertEquals(0, e.startOffset); - assertEquals(0, e.endOffset); - assertEquals(5, e.localStartOffset); - assertEquals(5, e.localEndOffset); + assertEquals(0, e.startOffset); + assertEquals(0, e.endOffset); + assertEquals(5, e.localStartOffset); + assertEquals(5, e.localEndOffset); - assertEquals(0, e.containerStartOffset); - assertEquals(2, e.containerEndOffset); + assertEquals(0, e.containerStartOffset); + assertEquals(2, e.containerEndOffset); - e = new EditableLine(staticText, 7, staticText, 7); - assertEquals('is ', e.text); + e = new EditableLine(staticText, 7, staticText, 7); + assertEquals('is ', e.text); - assertEquals(2, e.startOffset); - assertEquals(2, e.endOffset); - assertEquals(7, e.localStartOffset); - assertEquals(7, e.localEndOffset); + assertEquals(2, e.startOffset); + assertEquals(2, e.endOffset); + assertEquals(7, e.localStartOffset); + assertEquals(7, e.localEndOffset); - assertEquals(0, e.containerStartOffset); - assertEquals(2, e.containerEndOffset); -}); + assertEquals(0, e.containerStartOffset); + assertEquals(2, e.containerEndOffset); + }); -TEST_F('ChromeVoxEditingTest', 'EditableLineTwoStaticTexts', async function() { - const root = await this.runWithLoadedTree(` +AX_TEST_F( + 'ChromeVoxEditingTest', 'EditableLineTwoStaticTexts', async function() { + const root = await this.runWithLoadedTree(` <p contenteditable>hello <b>world</b></p> `); - const text = root.find({role: RoleType.STATIC_TEXT}); - const bold = text.nextSibling; + const text = root.find({role: RoleType.STATIC_TEXT}); + const bold = text.nextSibling; - let e = new EditableLine(text, 0, text, 0); - assertEquals('hello world', e.text); + let e = new EditableLine(text, 0, text, 0); + assertEquals('hello world', e.text); - assertEquals(0, e.startOffset); - assertEquals(0, e.endOffset); - assertEquals(0, e.localStartOffset); - assertEquals(0, e.localEndOffset); + assertEquals(0, e.startOffset); + assertEquals(0, e.endOffset); + assertEquals(0, e.localStartOffset); + assertEquals(0, e.localEndOffset); - assertEquals(0, e.containerStartOffset); - assertEquals(5, e.containerEndOffset); + assertEquals(0, e.containerStartOffset); + assertEquals(5, e.containerEndOffset); - e = new EditableLine(text, 5, text, 5); - assertEquals('hello world', e.text); + e = new EditableLine(text, 5, text, 5); + assertEquals('hello world', e.text); - assertEquals(5, e.startOffset); - assertEquals(5, e.endOffset); - assertEquals(5, e.localStartOffset); - assertEquals(5, e.localEndOffset); + assertEquals(5, e.startOffset); + assertEquals(5, e.endOffset); + assertEquals(5, e.localStartOffset); + assertEquals(5, e.localEndOffset); - assertEquals(0, e.containerStartOffset); - assertEquals(5, e.containerEndOffset); + assertEquals(0, e.containerStartOffset); + assertEquals(5, e.containerEndOffset); - e = new EditableLine(bold, 0, bold, 0); - assertEquals('hello world', e.text); + e = new EditableLine(bold, 0, bold, 0); + assertEquals('hello world', e.text); - assertEquals(6, e.startOffset); - assertEquals(6, e.endOffset); - assertEquals(0, e.localStartOffset); - assertEquals(0, e.localEndOffset); + assertEquals(6, e.startOffset); + assertEquals(6, e.endOffset); + assertEquals(0, e.localStartOffset); + assertEquals(0, e.localEndOffset); - assertEquals(6, e.containerStartOffset); - assertEquals(10, e.containerEndOffset); + assertEquals(6, e.containerStartOffset); + assertEquals(10, e.containerEndOffset); - e = new EditableLine(bold, 4, bold, 4); - assertEquals('hello world', e.text); + e = new EditableLine(bold, 4, bold, 4); + assertEquals('hello world', e.text); - assertEquals(10, e.startOffset); - assertEquals(10, e.endOffset); - assertEquals(4, e.localStartOffset); - assertEquals(4, e.localEndOffset); + assertEquals(10, e.startOffset); + assertEquals(10, e.endOffset); + assertEquals(4, e.localStartOffset); + assertEquals(4, e.localEndOffset); - assertEquals(6, e.containerStartOffset); - assertEquals(10, e.containerEndOffset); -}); + assertEquals(6, e.containerStartOffset); + assertEquals(10, e.containerEndOffset); + }); -TEST_F('ChromeVoxEditingTest', 'EditableLineEquality', async function() { +AX_TEST_F('ChromeVoxEditingTest', 'EditableLineEquality', async function() { const root = await this.runWithLoadedTree(` <div contenteditable role="textbox"> <p style="word-spacing:100000px">this is a test</p> @@ -1046,61 +1049,63 @@ assertFalse(e1.isSameLine(e2)); }); -TEST_F('ChromeVoxEditingTest', 'EditableLineStrictEquality', async function() { - const root = await this.runWithLoadedTree(` +AX_TEST_F( + 'ChromeVoxEditingTest', 'EditableLineStrictEquality', async function() { + const root = await this.runWithLoadedTree(` <div contenteditable role="textbox"> <p style="word-spacing:100000px">this is a test</p> <p>hello <b>world</b></p> </div> `); - const thisIsATest = root.findAll({role: RoleType.PARAGRAPH})[0].firstChild; - const hello = root.findAll({role: RoleType.PARAGRAPH})[1].firstChild; - const world = root.findAll({role: RoleType.PARAGRAPH})[1].lastChild; + const thisIsATest = + root.findAll({role: RoleType.PARAGRAPH})[0].firstChild; + const hello = root.findAll({role: RoleType.PARAGRAPH})[1].firstChild; + const world = root.findAll({role: RoleType.PARAGRAPH})[1].lastChild; - // The same position -- sanity check. - let e1 = new EditableLine(thisIsATest, 0, thisIsATest, 0); - assertEquals('this ', e1.text); - assertTrue(e1.isSameLineAndSelection(e1)); + // The same position -- sanity check. + let e1 = new EditableLine(thisIsATest, 0, thisIsATest, 0); + assertEquals('this ', e1.text); + assertTrue(e1.isSameLineAndSelection(e1)); - // Offset into the same soft line. - let e2 = new EditableLine(thisIsATest, 1, thisIsATest, 1); - assertFalse(e1.isSameLineAndSelection(e2)); + // Offset into the same soft line. + let e2 = new EditableLine(thisIsATest, 1, thisIsATest, 1); + assertFalse(e1.isSameLineAndSelection(e2)); - // Boundary. - e2 = new EditableLine(thisIsATest, 4, thisIsATest, 4); - assertFalse(e1.isSameLineAndSelection(e2)); + // Boundary. + e2 = new EditableLine(thisIsATest, 4, thisIsATest, 4); + assertFalse(e1.isSameLineAndSelection(e2)); - // Offsets into different soft lines. - e2 = new EditableLine(thisIsATest, 5, thisIsATest, 5); - assertEquals('is ', e2.text); - assertFalse(e1.isSameLineAndSelection(e2)); + // Offsets into different soft lines. + e2 = new EditableLine(thisIsATest, 5, thisIsATest, 5); + assertEquals('is ', e2.text); + assertFalse(e1.isSameLineAndSelection(e2)); - // Sanity check; second soft line. - assertTrue(e2.isSameLineAndSelection(e2)); + // Sanity check; second soft line. + assertTrue(e2.isSameLineAndSelection(e2)); - // Different offsets into second soft line. - e1 = new EditableLine(thisIsATest, 6, thisIsATest, 6); - assertFalse(e1.isSameLineAndSelection(e2)); + // Different offsets into second soft line. + e1 = new EditableLine(thisIsATest, 6, thisIsATest, 6); + assertFalse(e1.isSameLineAndSelection(e2)); - // Boundary. - e1 = new EditableLine(thisIsATest, 7, thisIsATest, 7); - assertFalse(e1.isSameLineAndSelection(e2)); + // Boundary. + e1 = new EditableLine(thisIsATest, 7, thisIsATest, 7); + assertFalse(e1.isSameLineAndSelection(e2)); - // Cross into new paragraph. - e2 = new EditableLine(hello, 0, hello, 0); - assertEquals('hello world', e2.text); - assertFalse(e1.isSameLineAndSelection(e2)); + // Cross into new paragraph. + e2 = new EditableLine(hello, 0, hello, 0); + assertEquals('hello world', e2.text); + assertFalse(e1.isSameLineAndSelection(e2)); - // On same node, with multi-static text line. - e1 = new EditableLine(hello, 1, hello, 1); - assertFalse(e1.isSameLineAndSelection(e2)); + // On same node, with multi-static text line. + e1 = new EditableLine(hello, 1, hello, 1); + assertFalse(e1.isSameLineAndSelection(e2)); - // On same node, with multi-static text line; boundary. - e1 = new EditableLine(hello, 5, hello, 5); - assertFalse(e1.isSameLineAndSelection(e2)); -}); + // On same node, with multi-static text line; boundary. + e1 = new EditableLine(hello, 5, hello, 5); + assertFalse(e1.isSameLineAndSelection(e2)); + }); -TEST_F( +AX_TEST_F( 'ChromeVoxEditingTest', 'EditableLineBaseLineAnchorOrFocus', async function() { const root = await this.runWithLoadedTree(` @@ -1147,7 +1152,7 @@ assertEquals(3, e1.endOffset); }); -TEST_F('ChromeVoxEditingTest', 'IsValidLine', async function() { +AX_TEST_F('ChromeVoxEditingTest', 'IsValidLine', async function() { const root = await this.runWithLoadedTree(` <div contenteditable role="textbox"> <p style="word-spacing:100000px">this is a test</p> @@ -1188,7 +1193,7 @@ assertFalse(line.isValidLine()); }); -TEST_F('ChromeVoxEditingTest', 'TelTrimsWhitespace', async function() { +AX_TEST_F('ChromeVoxEditingTest', 'TelTrimsWhitespace', async function() { const mockFeedback = this.createMockFeedback(); const root = await this.runWithLoadedTree(` <div id="go"></div> @@ -1229,7 +1234,7 @@ .replay(); }); -TEST_F('ChromeVoxEditingTest', 'BackwardWordDelete', async function() { +AX_TEST_F('ChromeVoxEditingTest', 'BackwardWordDelete', async function() { const mockFeedback = this.createMockFeedback(); const root = await this.runWithLoadedTree(` <div @@ -1257,7 +1262,7 @@ .replay(); }); -TEST_F( +AX_TEST_F( 'ChromeVoxEditingTest', 'BackwardWordDeleteAcrossParagraphs', async function() { const mockFeedback = this.createMockFeedback(); @@ -1287,7 +1292,7 @@ .replay(); }); -TEST_F('ChromeVoxEditingTest', 'GrammarErrors', async function() { +AX_TEST_F('ChromeVoxEditingTest', 'GrammarErrors', async function() { const mockFeedback = this.createMockFeedback(); const root = await this.runWithLoadedTree(` <div contenteditable="true" role="textbox"> @@ -1329,7 +1334,7 @@ }); // Flaky test, crbug.com/1098642. -TEST_F( +AX_TEST_F( 'ChromeVoxEditingTest', 'DISABLED_CharacterTypedAfterNewLine', async function() { const mockFeedback = this.createMockFeedback(); @@ -1350,7 +1355,7 @@ .replay(); }); -TEST_F('ChromeVoxEditingTest', 'SelectAll', async function() { +AX_TEST_F('ChromeVoxEditingTest', 'SelectAll', async function() { const mockFeedback = this.createMockFeedback(); const root = await this.runWithLoadedTree(` <div contenteditable role="textbox"> @@ -1376,7 +1381,7 @@ .replay(); }); -TEST_F('ChromeVoxEditingTest', 'TextAreaBrailleEmptyLine', async function() { +AX_TEST_F('ChromeVoxEditingTest', 'TextAreaBrailleEmptyLine', async function() { const mockFeedback = this.createMockFeedback(); const root = await this.runWithLoadedTree('<textarea></textarea>'); const textarea = await this.focusFirstTextField(root); @@ -1391,7 +1396,7 @@ .replay(); }); -TEST_F('ChromeVoxEditingTest', 'MoveByCharacterIntent', async function() { +AX_TEST_F('ChromeVoxEditingTest', 'MoveByCharacterIntent', async function() { const mockFeedback = this.createMockFeedback(); const root = await this.runWithLoadedTree(` <div contenteditable role="textbox"> @@ -1416,7 +1421,7 @@ .replay(); }); -TEST_F('ChromeVoxEditingTest', 'MoveByLineIntent', async function() { +AX_TEST_F('ChromeVoxEditingTest', 'MoveByLineIntent', async function() { const mockFeedback = this.createMockFeedback(); const root = await this.runWithLoadedTree(` <div contenteditable role="textbox"> @@ -1438,7 +1443,7 @@ .replay(); }); -TEST_F('ChromeVoxEditingTest', 'SelectAllBareTextContent', async function() { +AX_TEST_F('ChromeVoxEditingTest', 'SelectAllBareTextContent', async function() { const mockFeedback = this.createMockFeedback(); const root = await this.runWithLoadedTree(` <div contenteditable role="textbox">unread</div> @@ -1452,7 +1457,7 @@ .replay(); }); -TEST_F('ChromeVoxEditingTest', 'InputEvents', async function() { +AX_TEST_F('ChromeVoxEditingTest', 'InputEvents', async function() { const site = `<input type="text"></input>`; const root = await this.runWithLoadedTree(site); const input = await this.focusFirstTextField(root); @@ -1492,7 +1497,7 @@ assertEquals('ab', input.value); }); -TEST_F('ChromeVoxEditingTest', 'TextAreaEvents', async function() { +AX_TEST_F('ChromeVoxEditingTest', 'TextAreaEvents', async function() { const site = `<textarea></textarea>`; const root = await this.runWithLoadedTree(site); const textArea = await this.focusFirstTextField(root); @@ -1516,7 +1521,7 @@ assertEquals('ab', textArea.value); }); -TEST_F('ChromeVoxEditingTest', 'ContentEditableEvents', async function() { +AX_TEST_F('ChromeVoxEditingTest', 'ContentEditableEvents', async function() { const site = `<div role="textbox" contenteditable></div>`; const root = await this.runWithLoadedTree(site); const contentEditable = await this.focusFirstTextField(root); @@ -1540,7 +1545,7 @@ assertEquals('ab', contentEditable.value); }); -TEST_F('ChromeVoxEditingTest', 'MarkedContent', async function() { +AX_TEST_F('ChromeVoxEditingTest', 'MarkedContent', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <div contenteditable role="textbox"> @@ -1576,7 +1581,7 @@ .replay(); }); -TEST_F('ChromeVoxEditingTest', 'NestedInsertionDeletion', async function() { +AX_TEST_F('ChromeVoxEditingTest', 'NestedInsertionDeletion', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <div contenteditable role="textbox"> @@ -1600,7 +1605,7 @@ .replay(); }); -TEST_F('ChromeVoxEditingTest', 'MoveByCharSuggestions', async function() { +AX_TEST_F('ChromeVoxEditingTest', 'MoveByCharSuggestions', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <div contenteditable="true" role="textbox"> @@ -1648,7 +1653,7 @@ .replay(); }); -TEST_F('ChromeVoxEditingTest', 'MoveByWordSuggestions', async function() { +AX_TEST_F('ChromeVoxEditingTest', 'MoveByWordSuggestions', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <div contenteditable="true" role="textbox"> @@ -1684,7 +1689,7 @@ .replay(); }); -TEST_F( +AX_TEST_F( 'ChromeVoxEditingTest', 'MoveByWordSuggestionsNoIntents', async function() { const mockFeedback = this.createMockFeedback(); const site = ` @@ -1745,7 +1750,7 @@ .replay(); }); -TEST_F('ChromeVoxEditingTest', 'Separator', async function() { +AX_TEST_F('ChromeVoxEditingTest', 'Separator', async function() { // In the past, an ARIA leaf role would cause subtree content to be removed. // However, the new decision is to not remove any content the user might // interact with. @@ -1789,7 +1794,7 @@ // loop in ChromeVox's editable line data computation. This test ensures we // workaround potential infinite loops correctly, and should be removed once the // proper fix is implemented in blink. -TEST_F( +AX_TEST_F( 'ChromeVoxEditingTest', 'EditableLineInfiniteLoopWorkaround', async function() { const mockFeedback = this.createMockFeedback(); @@ -1819,7 +1824,7 @@ .replay(); }); -TEST_F( +AX_TEST_F( 'ChromeVoxEditingTest', 'TextEditHandlerCreatesAutomationEditable', async function() { const site = ` @@ -1920,7 +1925,7 @@ // TODO(https://crbug.com/1254742): flakes due to underlying bug with // accessibility intents. -TEST_F( +AX_TEST_F( 'ChromeVoxEditingTest', 'DISABLED_ParagraphNavigation', async function() { const mockFeedback = this.createMockFeedback(); const site = ` @@ -1965,7 +1970,7 @@ .replay(); }); -TEST_F( +AX_TEST_F( 'ChromeVoxEditingTest', 'StartAndEndOfOutputStopAtEditableRoot', async function() { const mockFeedback = this.createMockFeedback(); @@ -1988,7 +1993,7 @@ .replay(); }); -TEST_F('ChromeVoxEditingTest', 'TableNavigation', async function() { +AX_TEST_F('ChromeVoxEditingTest', 'TableNavigation', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <div contenteditable role="textbox" tabindex=0> @@ -2018,7 +2023,7 @@ .replay(); }); -TEST_F( +AX_TEST_F( 'ChromeVoxEditingTest', 'InputTextBrailleContractions', async function() { const site = ` <input type=text value="about that"></input> @@ -2106,7 +2111,7 @@ }); -TEST_F('ChromeVoxEditingTest', 'ContextMenus', async function() { +AX_TEST_F('ChromeVoxEditingTest', 'ContextMenus', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <textarea>abc</textarea> @@ -2127,7 +2132,7 @@ .replay(); }); -TEST_F('ChromeVoxEditingTest', 'NativeCharWordCommands', async function() { +AX_TEST_F('ChromeVoxEditingTest', 'NativeCharWordCommands', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <p>start</p> @@ -2158,7 +2163,7 @@ .replay(); }); -TEST_F('ChromeVoxEditingTest', 'TablesWithEmptyCells', async function() { +AX_TEST_F('ChromeVoxEditingTest', 'TablesWithEmptyCells', async function() { const mockFeedback = this.createMockFeedback(); const site = ` <div contenteditable="true" role="textbox"> @@ -2212,7 +2217,7 @@ .replay(); }); -TEST_F( +AX_TEST_F( 'ChromeVoxEditingTest', 'NonbreakingSpaceNewLineOrSpace', async function() { const mockFeedback = this.createMockFeedback(); const site = ` @@ -2284,9 +2289,10 @@ .replay(); }); -TEST_F('ChromeVoxEditingTest', 'JumpCommandsSyncSelection', async function() { - const mockFeedback = this.createMockFeedback(); - const site = ` +AX_TEST_F( + 'ChromeVoxEditingTest', 'JumpCommandsSyncSelection', async function() { + const mockFeedback = this.createMockFeedback(); + const site = ` <div contenteditable="true" role="textbox"> <p>first</p> <h1>second</h1> @@ -2294,27 +2300,27 @@ <table border=1><r><td>fifth</td></tr></table> </div> `; - const root = await this.runWithLoadedTree(site); - await this.focusFirstTextField(root); + const root = await this.runWithLoadedTree(site); + await this.focusFirstTextField(root); - const textField = root.find({role: RoleType.TEXT_FIELD}); - mockFeedback.expectSpeech('Text area') - .call(doCmd('nextTable')) - .expectSpeech('fifth', 'row 1 column 1', 'Table , 1 by 1') + const textField = root.find({role: RoleType.TEXT_FIELD}); + mockFeedback.expectSpeech('Text area') + .call(doCmd('nextTable')) + .expectSpeech('fifth', 'row 1 column 1', 'Table , 1 by 1') - // Verifies selection is where we expect. - .call(this.press(KeyCode.RIGHT, {shift: true, ctrl: true})) - .expectSpeech('fifth', 'row 1 column 1', 'Table , 1 by 1', 'selected') + // Verifies selection is where we expect. + .call(this.press(KeyCode.RIGHT, {shift: true, ctrl: true})) + .expectSpeech('fifth', 'row 1 column 1', 'Table , 1 by 1', 'selected') - .call(doCmd('previousHeading')) - .expectSpeech('second', 'Heading 1') - .call(this.press(KeyCode.RIGHT, {shift: true, ctrl: true})) - .expectSpeech('second', 'Heading 1', 'selected') + .call(doCmd('previousHeading')) + .expectSpeech('second', 'Heading 1') + .call(this.press(KeyCode.RIGHT, {shift: true, ctrl: true})) + .expectSpeech('second', 'Heading 1', 'selected') - .call(doCmd('nextLink')) - .expectSpeech('fourth', 'Internal link') - .call(this.press(KeyCode.RIGHT, {shift: true, ctrl: true})) - .expectSpeech('fourth', 'Link', 'selected') + .call(doCmd('nextLink')) + .expectSpeech('fourth', 'Internal link') + .call(this.press(KeyCode.RIGHT, {shift: true, ctrl: true})) + .expectSpeech('fourth', 'Link', 'selected') - .replay(); -}); + .replay(); + });
diff --git a/chrome/browser/resources/chromeos/accessibility/common/testing/common.js b/chrome/browser/resources/chromeos/accessibility/common/testing/common.js index f65365e2..427c3f9 100644 --- a/chrome/browser/resources/chromeos/accessibility/common/testing/common.js +++ b/chrome/browser/resources/chromeos/accessibility/common/testing/common.js
@@ -7,18 +7,22 @@ /** * Similar to |TEST_F|. Generates a test for the given |testFixture|, * |testName|, and |testFunction|. - * Used this variant when an |isAsync| fixture wants to temporarily mix in a - * sync test. + * Use this variant when an |isAsync| fixture wants to temporarily mix in a + * sync test or use async/await. * @param {string} testFixture Fixture name. * @param {string} testName Test name. * @param {function} testFunction The test impl. */ -function SYNC_TEST_F(testFixture, testName, testFunction) { +function AX_TEST_F(testFixture, testName, testFunction) { TEST_F(testFixture, testName, function() { this.newCallback(testFunction)(); }); } +// var is used to export this function alias outside of the current context +// while all tests are migrated to the new fixture. +var SYNC_TEST_F = AX_TEST_F; + /** * Helper to import a module, and expose it onto window. * @param {string|!Array<string>} toImport Names of the module exports to
diff --git a/chrome/browser/resources/chromeos/accessibility/common/testing/e2e_test_base.js b/chrome/browser/resources/chromeos/accessibility/common/testing/e2e_test_base.js index 590d6dd..7eafdc25 100644 --- a/chrome/browser/resources/chromeos/accessibility/common/testing/e2e_test_base.js +++ b/chrome/browser/resources/chromeos/accessibility/common/testing/e2e_test_base.js
@@ -133,13 +133,13 @@ * @param {boolean=} capture */ async waitForEvent(node, eventType, capture) { - return new Promise(resolve => { + return new Promise(this.newCallback(resolve => { const callback = this.newCallback(() => { node.removeEventListener(eventType, callback, capture); resolve(); }); node.addEventListener(eventType, callback, capture); - }); + })); } /** @@ -222,7 +222,7 @@ * returned once the document is ready. */ async runWithLoadedTree(doc, opt_params = {}) { - return new Promise(async resolve => { + return new Promise(this.newCallback(async resolve => { // Make sure the test doesn't finish until this function has resolved. let callback = this.newCallback(resolve); this.desktop_ = await new Promise(r => chrome.automation.getDesktop(r)); @@ -290,7 +290,7 @@ listener({target: f}); }); } - }); + })); } /**
diff --git a/chrome/browser/resources/hangout_services/manifest.json b/chrome/browser/resources/hangout_services/manifest.json index 53fb2b5..3982787 100644 --- a/chrome/browser/resources/hangout_services/manifest.json +++ b/chrome/browser/resources/hangout_services/manifest.json
@@ -5,7 +5,7 @@ "name": "Google Hangouts", // Note: Always update the version number when this file is updated. Chrome // triggers extension preferences update on the version increase. - "version": "1.3.18", + "version": "1.3.19", "manifest_version": 2, "externally_connectable": { "matches": [
diff --git a/chrome/browser/resources/hangout_services/thunk.js b/chrome/browser/resources/hangout_services/thunk.js index 9990e9da..2e03156 100644 --- a/chrome/browser/resources/hangout_services/thunk.js +++ b/chrome/browser/resources/hangout_services/thunk.js
@@ -222,6 +222,12 @@ const method = message['method']; if (method === 'chooseDesktopMedia') { const sources = message['sources']; + + // Options that getDisplayMedia() also has, which are applied *before* + // the user makes their choice, and which typically serve to shape + // the choice offered to the user. + const options = message['options'] || {systemAudio: 'include'}; + let cancelId = null; const tab = port.sender.tab; if (tab) { @@ -230,12 +236,13 @@ // the <iframe>, even though it doesn't really load the new url. tab.url = port.sender.url; cancelId = chrome.desktopCapture.chooseDesktopMedia( - sources, tab, sendResponse); + sources, tab, options, sendResponse); } else { const requestInfo = {}; requestInfo['guestProcessId'] = port.sender.guestProcessId || 0; requestInfo['guestRenderFrameId'] = port.sender.guestRenderFrameRoutingId || 0; + // TODO(crbug.com/1329129): Plumb systemAudio and other options here. cancelId = chrome.webrtcDesktopCapturePrivate.chooseDesktopMedia( sources, requestInfo, sendResponse); }
diff --git a/chrome/browser/resources/new_tab_page/modules/cart/module.html b/chrome/browser/resources/new_tab_page/modules/cart/module.html index 2a3dda5a..c11c8f5 100644 --- a/chrome/browser/resources/new_tab_page/modules/cart/module.html +++ b/chrome/browser/resources/new_tab_page/modules/cart/module.html
@@ -46,6 +46,11 @@ z-index: 0; } + .scroll-button { + align-items: center; + display: flex; + } + :host([header-description-text]) #cartCarousel { padding-top: 16px; } @@ -218,11 +223,6 @@ width: 102px; } - :host-context([dir=rtl]) cr-icon-button { - left: 0; - right: unset; - } - .cart-container cr-icon-button { --cr-icon-button-icon-size: 16px; --cr-icon-button-size: 24px; @@ -232,6 +232,25 @@ top: 2px; } + :host-context([dir=rtl]) cr-icon-button { + left: 0; + right: unset; + } + + :host-context([dir=rtl]) #rightScrollShadow { + left: 0; + right: unset; + } + + #scrollButtons { + align-items: center; + display: flex; + height: 100%; + justify-content: space-between; + position: absolute; + width: 100%; + } + .side-scroll-shadow { background-color: var(--ntp-background-override-color); display: flex; @@ -243,14 +262,6 @@ z-index: 1; } - #leftScrollShadow { - left: 0; - } - - #rightScrollShadow { - right: 0; - } - .side-scroll-button { --cr-icon-button-fill-color: var(--ntp-icon-button-color); --cr-icon-button-icon-size: 16px; @@ -259,9 +270,7 @@ --cr-icon-image: url(icons/chevron.svg); background-color: var(--ntp-module-scroll-button-color); border-radius: 50%; - position: absolute; top: 50%; - transform: translateY(-50%); visibility: hidden; z-index: 2; } @@ -273,13 +282,15 @@ #leftScrollButton { --cr-icon-image-transform: rotate(90deg); - left: 0; margin-inline-start: 4px; } #rightScrollButton { --cr-icon-image-transform: rotate(270deg); margin-inline-end: 4px; + } + + #rightScrollShadow { right: 0; } @@ -304,12 +315,24 @@ $i18n{modulesCartSentence} </ntp-module-header> <div id="moduleContent"> - <template is="dom-if" if="[[showLeftScrollButton_]]"> - <div id="leftScrollShadow" class="side-scroll-shadow"></div> - <cr-icon-button id="leftScrollButton" - class="side-scroll-button" on-click="onLeftScrollClick_"> - </cr-icon-button> - </template> + <div id="scrollButtons"> + <div class="scroll-button"> + <template is="dom-if" if="[[showLeftScrollButton_]]"> + <div id="leftScrollShadow" class="side-scroll-shadow"></div> + <cr-icon-button id="leftScrollButton" + class="side-scroll-button" on-click="onLeftScrollClick_"> + </cr-icon-button> + </template> + </div> + <div class="scroll-button"> + <template is="dom-if" if="[[showRightScrollButton_]]"> + <div id="rightScrollShadow" class="side-scroll-shadow"> </div> + <cr-icon-button id="rightScrollButton" + class="side-scroll-button" on-click="onRightScrollClick_"> + </cr-icon-button> + </template> + </div> + </div> <div id="cartCarousel"> <div id="leftProbe" class="probe"></div> <div id="consentContainer"> @@ -401,12 +424,6 @@ [[cartMenuRemoveItem_]] </button> </cr-action-menu> - <template is="dom-if" if="[[showRightScrollButton_]]"> - <div id="rightScrollShadow" class="side-scroll-shadow"> </div> - <cr-icon-button id="rightScrollButton" - class="side-scroll-button" on-click="onRightScrollClick_"> - </cr-icon-button> - </template> </div> </div> <cr-lazy-render id="infoDialogRender">
diff --git a/chrome/browser/resources/new_tab_page/modules/info_dialog.html b/chrome/browser/resources/new_tab_page/modules/info_dialog.html index c9de963..8842eb4 100644 --- a/chrome/browser/resources/new_tab_page/modules/info_dialog.html +++ b/chrome/browser/resources/new_tab_page/modules/info_dialog.html
@@ -1,7 +1,7 @@ <style> cr-dialog::part(dialog) { + max-width: 100%; position: fixed; - width: 459px; } cr-dialog [slot='body'] {
diff --git a/chrome/browser/resources/settings/chromeos/internet_page/internet_page.html b/chrome/browser/resources/settings/chromeos/internet_page/internet_page.html index c55a175..495aa69a 100644 --- a/chrome/browser/resources/settings/chromeos/internet_page/internet_page.html +++ b/chrome/browser/resources/settings/chromeos/internet_page/internet_page.html
@@ -157,6 +157,7 @@ <template is="dom-if" if="[[showSimLockDialog_]]" restamp> <sim-lock-dialogs + global-policy="[[globalPolicy_]]" is-dialog-open="{{showSimLockDialog_}}" device-state="[[getDeviceState_(subpageType_, deviceStates)]]"> </sim-lock-dialogs>
diff --git a/chrome/browser/resources/side_panel/BUILD.gn b/chrome/browser/resources/side_panel/BUILD.gn index 5385fbb..0c6542fd 100644 --- a/chrome/browser/resources/side_panel/BUILD.gn +++ b/chrome/browser/resources/side_panel/BUILD.gn
@@ -76,10 +76,8 @@ } copy("copy_mojo_read_anything") { - deps = [ - "//chrome/browser/ui/webui/side_panel/read_anything:mojo_bindings_webui_js", - ] - sources = [ "$mojo_root_folder/read_anything/read_anything.mojom-webui.js" ] + deps = [ "//chrome/common/accessibility:mojo_bindings_webui_js" ] + sources = [ "$root_gen_dir/mojom-webui/chrome/common/accessibility/read_anything.mojom-webui.js" ] outputs = [ "$target_gen_dir/$preprocess_folder/read_anything/{{source_file_part}}", ]
diff --git a/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/qrcode/QrCodeDialog.java b/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/qrcode/QrCodeDialog.java index 9df663a..53c2058 100644 --- a/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/qrcode/QrCodeDialog.java +++ b/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/qrcode/QrCodeDialog.java
@@ -128,7 +128,8 @@ QrCodeShareCoordinator shareCoordinator = new QrCodeShareCoordinator( context, this::dismiss, getArguments().getString(URL_KEY), mWindowAndroid); - QrCodeScanCoordinator scanCoordinator = new QrCodeScanCoordinator(context, this::dismiss); + QrCodeScanCoordinator scanCoordinator = + new QrCodeScanCoordinator(context, this::dismiss, mWindowAndroid); mTabs = new ArrayList<>(); mTabs.add(shareCoordinator);
diff --git a/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/qrcode/scan_tab/QrCodeScanCoordinator.java b/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/qrcode/scan_tab/QrCodeScanCoordinator.java index ee1ec7de..3bb5c027 100644 --- a/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/qrcode/scan_tab/QrCodeScanCoordinator.java +++ b/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/qrcode/scan_tab/QrCodeScanCoordinator.java
@@ -24,10 +24,13 @@ * The QrCodeScanCoordinator constructor. * * @param context The context to use for user permissions. + * @param observer The observer for navigation event. + * @param windowAndroid The {@link WindowAndroid} for the containing activity. */ - public QrCodeScanCoordinator(Context context, QrCodeScanMediator.NavigationObserver observer) { + public QrCodeScanCoordinator(Context context, QrCodeScanMediator.NavigationObserver observer, + WindowAndroid windowAndroid) { PropertyModel scanViewModel = new PropertyModel(QrCodeScanViewProperties.ALL_KEYS); - mMediator = new QrCodeScanMediator(context, scanViewModel, observer); + mMediator = new QrCodeScanMediator(context, scanViewModel, observer, windowAndroid); mScanView = new QrCodeScanView( context, mMediator::onPreviewFrame, mMediator::promptForCameraPermission);
diff --git a/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/qrcode/scan_tab/QrCodeScanMediator.java b/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/qrcode/scan_tab/QrCodeScanMediator.java index 1116b5f..43e560a8 100644 --- a/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/qrcode/scan_tab/QrCodeScanMediator.java +++ b/chrome/browser/share/android/java/src/org/chromium/chrome/browser/share/qrcode/scan_tab/QrCodeScanMediator.java
@@ -21,12 +21,19 @@ import com.google.android.gms.vision.barcode.Barcode; import com.google.android.gms.vision.barcode.BarcodeDetector; +import org.chromium.base.BuildInfo; +import org.chromium.base.Callback; +import org.chromium.base.Consumer; import org.chromium.base.IntentUtils; import org.chromium.base.metrics.RecordUserAction; import org.chromium.base.task.AsyncTask; import org.chromium.chrome.R; import org.chromium.chrome.browser.browserservices.intents.WebappConstants; import org.chromium.chrome.browser.document.ChromeLauncherActivity; +import org.chromium.components.permissions.AndroidPermissionRequester; +import org.chromium.ui.base.WindowAndroid; +import org.chromium.ui.modaldialog.DialogDismissalCause; +import org.chromium.ui.modaldialog.ModalDialogManager; import org.chromium.ui.modelutil.PropertyModel; import org.chromium.ui.permissions.ActivityAndroidPermissionDelegate; import org.chromium.ui.permissions.AndroidPermissionDelegate; @@ -50,6 +57,7 @@ private BarcodeDetector mDetector; private Toast mToast; + private WindowAndroid mWindowAndroid; /** * The QrCodeScanMediator constructor. @@ -58,13 +66,15 @@ * @param propertyModel The property modelto use to communicate with views. * @param observer The observer for navigation event. */ - QrCodeScanMediator(Context context, PropertyModel propertyModel, NavigationObserver observer) { + QrCodeScanMediator(Context context, PropertyModel propertyModel, NavigationObserver observer, + WindowAndroid windowAndroid) { mContext = context; mPropertyModel = propertyModel; mPermissionDelegate = new ActivityAndroidPermissionDelegate( new WeakReference<Activity>((Activity) mContext)); updatePermissionSettings(); mNavigationObserver = observer; + mWindowAndroid = windowAndroid; // Set detector to null until it gets initialized asynchronously. mDetector = null; @@ -109,30 +119,57 @@ * Prompts the user for camera permission and processes the results. */ public void promptForCameraPermission() { - final PermissionCallback callback = new PermissionCallback() { - // Handle the results from prompting the user for camera permission. - @Override - public void onRequestPermissionsResult(String[] permissions, int[] grantResults) { - // No results were produced (Does this ever happen?) - if (grantResults.length == 0) { - return; + requestCameraAccessPermissionHelper(mWindowAndroid, granted -> { + if (granted) { + mPropertyModel.set(QrCodeScanViewProperties.HAS_CAMERA_PERMISSION, true); + } else { + // The order in which these fields are important because it causes updates to + // the view. CanPromptForPermission must be updated first so that it doesn't + // cause the view to be updated twice creating a flicker effect. + if (!mPermissionDelegate.canRequestPermission(permission.CAMERA)) { + mPropertyModel.set(QrCodeScanViewProperties.CAN_PROMPT_FOR_PERMISSION, false); } - if (grantResults[0] == PackageManager.PERMISSION_GRANTED) { - mPropertyModel.set(QrCodeScanViewProperties.HAS_CAMERA_PERMISSION, true); - } else { - // The order in which these fields are important because it causes updates to - // the view. CanPromptForPermission must be updated first so that it doesn't - // cause the view to be updated twice creating a flicker effect. - if (!mPermissionDelegate.canRequestPermission(permission.CAMERA)) { - mPropertyModel.set( - QrCodeScanViewProperties.CAN_PROMPT_FOR_PERMISSION, false); - } - mPropertyModel.set(QrCodeScanViewProperties.HAS_CAMERA_PERMISSION, false); - } + mPropertyModel.set(QrCodeScanViewProperties.HAS_CAMERA_PERMISSION, false); } + }); + } + + private void requestCameraAccessPermissionHelper( + WindowAndroid windowAndroid, final Callback<Boolean> callback) { + AndroidPermissionDelegate permissionDelegate = windowAndroid; + + if (windowAndroid.hasPermission(permission.CAMERA)) { + callback.onResult(true); + return; + } + + if (mContext == null) { + callback.onResult(false); + return; + } + + Consumer<PropertyModel> requestPermissions = (model) -> { + final PermissionCallback permissionCallback = (permissions, grantResults) -> { + ModalDialogManager modalDialogManager = windowAndroid.getModalDialogManager(); + if (modalDialogManager != null && model != null) { + modalDialogManager.dismissDialog( + model, DialogDismissalCause.POSITIVE_BUTTON_CLICKED); + } + callback.onResult(grantResults.length > 0 + && grantResults[0] == PackageManager.PERMISSION_GRANTED); + }; + + permissionDelegate.requestPermissions( + new String[] {permission.CAMERA}, permissionCallback); }; - mPermissionDelegate.requestPermissions(new String[] {permission.CAMERA}, callback); + if (windowAndroid.getModalDialogManager() != null) { + AndroidPermissionRequester.showMissingPermissionDialog(windowAndroid, + mContext.getString( + org.chromium.chrome.R.string.infobar_missing_camera_permission_text, + BuildInfo.getInstance().hostPackageLabel), + requestPermissions, callback.bind(false)); + } } /**
diff --git a/chrome/browser/storage/shared_storage_browsertest.cc b/chrome/browser/storage/shared_storage_browsertest.cc index f0c9ba31..f3d0f9d 100644 --- a/chrome/browser/storage/shared_storage_browsertest.cc +++ b/chrome/browser/storage/shared_storage_browsertest.cc
@@ -328,10 +328,10 @@ sharedStorage.selectURL( 'test-url-selection-operation', [{url: "fenced_frames/title0.html"}, - {url: "fenced_frames/title1.html", - reporting_metadata: {report_event: "click", - report_url: "fenced_frames/report1.html"}}, - {url: "fenced_frames/title2.html"}], {data: {'mockResult': 1}}); + {url: "fenced_frames/title1.html", + reportingMetadata: {"click": "fenced_frames/report1.html"}}, + {url: "fenced_frames/title2.html"}], + {data: {'mockResult': 1}}); )"); if (!SuccessExpected()) {
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn index 3fd3d0e3..17fde62 100644 --- a/chrome/browser/ui/BUILD.gn +++ b/chrome/browser/ui/BUILD.gn
@@ -1777,13 +1777,13 @@ "//chrome/browser/ui/webui/new_tab_page_third_party:mojo_bindings", "//chrome/browser/ui/webui/realbox:mojo_bindings", "//chrome/browser/ui/webui/side_panel/bookmarks:mojo_bindings", - "//chrome/browser/ui/webui/side_panel/read_anything:mojo_bindings", "//chrome/browser/ui/webui/side_panel/reading_list:mojo_bindings", "//chrome/browser/ui/webui/tab_search:mojo_bindings", "//chrome/browser/ui/webui/tab_strip:mojo_bindings", "//chrome/browser/web_applications", "//chrome/common:buildflags", "//chrome/common:version_header", + "//chrome/common/accessibility:mojo_bindings", "//chrome/common/search:mojo_bindings", "//chrome/common/themes:autogenerated_theme_util", "//components/app_constants", @@ -3134,6 +3134,7 @@ "//chrome/browser/web_applications", "//chrome/services/file_util/public/cpp", "//chromeos/ash/components/assistant:buildflags", + "//chromeos/ash/components/dbus/audio", "//chromeos/ash/components/dbus/kerberos:kerberos_proto", "//chromeos/ash/components/dbus/os_install", "//chromeos/ash/components/dbus/pciguard:pciguard", @@ -3161,7 +3162,6 @@ "//chromeos/crosapi/cpp", "//chromeos/crosapi/cpp:crosapi_constants", "//chromeos/dbus", - "//chromeos/dbus/audio", "//chromeos/dbus/cryptohome", "//chromeos/dbus/cryptohome:cryptohome_proto", "//chromeos/dbus/hermes",
diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/SuggestionsMetrics.java b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/SuggestionsMetrics.java index a7c7ecf..e1fd80db 100644 --- a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/SuggestionsMetrics.java +++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/SuggestionsMetrics.java
@@ -10,6 +10,7 @@ import org.chromium.base.metrics.RecordHistogram; import org.chromium.base.metrics.TimingMetric; import org.chromium.chrome.browser.omnibox.action.OmniboxPedalType; +import org.chromium.chrome.browser.omnibox.suggestions.mostvisited.SuggestTileType; import org.chromium.components.metrics.OmniboxEventProtos.OmniboxEventProto.PageClassification; import java.lang.annotation.Retention; @@ -19,6 +20,12 @@ * This class collects a variety of different Suggestions related metrics. */ public class SuggestionsMetrics { + /** + * Maximum number of suggest tile types we want to record. + * Anything beyond this will be reported in the overflow bucket. + */ + private static final int MAX_SUGGEST_TILE_TYPE_POSITION = 15; + @IntDef({RefineActionUsage.NOT_USED, RefineActionUsage.SEARCH_WITH_ZERO_PREFIX, RefineActionUsage.SEARCH_WITH_PREFIX, RefineActionUsage.SEARCH_WITH_BOTH, RefineActionUsage.COUNT}) @@ -137,6 +144,21 @@ } /** + * Record the kind of (MostVisitedURL/OrganicRepeatableSearch) Tile type the User opened. + * + * @param position The position of a tile in the carousel. + * @param isSearchTile Whether tile being opened is a Search tile. + */ + public static final void recordSuggestTileTypeUsed(int position, boolean isSearchTile) { + @SuggestTileType + int tileType = isSearchTile ? SuggestTileType.SEARCH : SuggestTileType.URL; + RecordHistogram.recordExactLinearHistogram( + "Omnibox.SuggestTiles.SelectedTileIndex", position, MAX_SUGGEST_TILE_TYPE_POSITION); + RecordHistogram.recordEnumeratedHistogram( + "Omnibox.SuggestTiles.SelectedTileType", tileType, SuggestTileType.COUNT); + } + + /** * Translate the pageClass to a histogram suffix. * * @param histogram Histogram prefix.
diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/mostvisited/MostVisitedTilesProcessor.java b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/mostvisited/MostVisitedTilesProcessor.java index 4b36b543..fca8573 100644 --- a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/mostvisited/MostVisitedTilesProcessor.java +++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/mostvisited/MostVisitedTilesProcessor.java
@@ -16,6 +16,7 @@ import org.chromium.chrome.browser.omnibox.suggestions.OmniboxSuggestionUiType; import org.chromium.chrome.browser.omnibox.suggestions.SuggestionCommonProperties; import org.chromium.chrome.browser.omnibox.suggestions.SuggestionHost; +import org.chromium.chrome.browser.omnibox.suggestions.SuggestionsMetrics; import org.chromium.chrome.browser.omnibox.suggestions.carousel.BaseCarouselSuggestionItemViewBuilder; import org.chromium.chrome.browser.omnibox.suggestions.carousel.BaseCarouselSuggestionProcessor; import org.chromium.chrome.browser.omnibox.suggestions.carousel.BaseCarouselSuggestionViewProperties; @@ -23,6 +24,7 @@ import org.chromium.components.browser_ui.styles.ChromeColors; import org.chromium.components.browser_ui.widget.tile.TileViewProperties; import org.chromium.components.omnibox.AutocompleteMatch; +import org.chromium.components.omnibox.AutocompleteMatch.SuggestTile; import org.chromium.ui.modelutil.MVCListAdapter.ListItem; import org.chromium.ui.modelutil.PropertyModel; import org.chromium.url.GURL; @@ -84,14 +86,20 @@ for (int elementIndex = 0; elementIndex < tilesCount; elementIndex++) { final PropertyModel tileModel = new PropertyModel(TileViewProperties.ALL_KEYS); - final String title = tiles.get(elementIndex).title; - final GURL url = tiles.get(elementIndex).url; + final SuggestTile tile = tiles.get(elementIndex); + final String title = tile.title; + final GURL url = tile.url; + final boolean isSearch = tile.isSearch; + final int itemIndex = elementIndex; + tileModel.set(TileViewProperties.TITLE, title); tileModel.set(TileViewProperties.TITLE_LINES, 1); tileModel.set(TileViewProperties.ON_FOCUS_VIA_SELECTION, () -> mSuggestionHost.setOmniboxEditingText(url.getSpec())); - tileModel.set(TileViewProperties.ON_CLICK, - v -> mSuggestionHost.onSuggestionClicked(suggestion, matchIndex, url)); + tileModel.set(TileViewProperties.ON_CLICK, v -> { + SuggestionsMetrics.recordSuggestTileTypeUsed(itemIndex, isSearch); + mSuggestionHost.onSuggestionClicked(suggestion, matchIndex, url); + }); final int elementIndexForDeletion = elementIndex; tileModel.set(TileViewProperties.ON_LONG_CLICK, v -> { @@ -100,7 +108,7 @@ return true; }); - if (tiles.get(elementIndex).isSearch) { + if (isSearch) { // Note: we should never show most visited tiles in incognito mode. Catch this early // if we ever do. assert model.get(SuggestionCommonProperties.COLOR_SCHEME)
diff --git a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/mostvisited/MostVisitedTilesProcessorUnitTest.java b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/mostvisited/MostVisitedTilesProcessorUnitTest.java index 1cb8ef5..6064264 100644 --- a/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/mostvisited/MostVisitedTilesProcessorUnitTest.java +++ b/chrome/browser/ui/android/omnibox/java/src/org/chromium/chrome/browser/omnibox/suggestions/mostvisited/MostVisitedTilesProcessorUnitTest.java
@@ -35,6 +35,7 @@ import org.robolectric.annotation.Config; import org.robolectric.shadows.ShadowLog; +import org.chromium.base.metrics.test.ShadowRecordHistogram; import org.chromium.base.test.BaseRobolectricTestRunner; import org.chromium.chrome.R; import org.chromium.chrome.browser.omnibox.suggestions.FaviconFetcher; @@ -58,7 +59,7 @@ * Tests for {@link MostVisitedTilesProcessor}. */ @RunWith(BaseRobolectricTestRunner.class) -@Config(manifest = Config.NONE) +@Config(manifest = Config.NONE, shadows = {ShadowRecordHistogram.class}) public final class MostVisitedTilesProcessorUnitTest { private static final GURL NAV_URL = JUnitTestGURLs.getGURL(JUnitTestGURLs.URL_1); private static final GURL NAV_URL_2 = JUnitTestGURLs.getGURL(JUnitTestGURLs.URL_2); @@ -146,7 +147,7 @@ public void testInteractions_onClick() { List<ListItem> tileList = populateTilePropertiesForTiles(3, new SuggestTile("search1", SEARCH_URL, true), - new SuggestTile("nav1", NAV_URL, true), new SuggestTile("nav2", NAV_URL_2, true)); + new SuggestTile("nav1", NAV_URL, false), new SuggestTile("nav2", NAV_URL_2, false)); assertEquals(3, tileList.size()); @@ -168,7 +169,23 @@ .onSuggestionClicked(eq(mMatch), eq(3), eq(SEARCH_URL)); verifyNoMoreInteractions(mSuggestionHost); - verifyNoMoreInteractions(mFaviconFetcher); + + // Verify histogram increased for delete attempt. + assertEquals(1, + ShadowRecordHistogram.getHistogramValueCountForTesting( + "Omnibox.SuggestTiles.SelectedTileType", SuggestTileType.SEARCH)); + assertEquals(2, + ShadowRecordHistogram.getHistogramValueCountForTesting( + "Omnibox.SuggestTiles.SelectedTileType", SuggestTileType.URL)); + assertEquals(1, + ShadowRecordHistogram.getHistogramValueCountForTesting( + "Omnibox.SuggestTiles.SelectedTileIndex", 0)); + assertEquals(1, + ShadowRecordHistogram.getHistogramValueCountForTesting( + "Omnibox.SuggestTiles.SelectedTileIndex", 1)); + assertEquals(1, + ShadowRecordHistogram.getHistogramValueCountForTesting( + "Omnibox.SuggestTiles.SelectedTileIndex", 2)); } @Test
diff --git a/chrome/browser/ui/android/webid/internal/BUILD.gn b/chrome/browser/ui/android/webid/internal/BUILD.gn index ca55134..e5e84e6 100644 --- a/chrome/browser/ui/android/webid/internal/BUILD.gn +++ b/chrome/browser/ui/android/webid/internal/BUILD.gn
@@ -66,7 +66,10 @@ } robolectric_library("junit") { - sources = [ "java/src/org/chromium/chrome/browser/ui/android/webid/AccountSelectionControllerTest.java" ] + sources = [ + "java/src/org/chromium/chrome/browser/ui/android/webid/AccountSelectionControllerTest.java", + "java/src/org/chromium/chrome/browser/ui/android/webid/AccountSelectionViewTest.java", + ] deps = [ ":java", @@ -81,9 +84,12 @@ "//components/image_fetcher:java", "//components/url_formatter/android:url_formatter_java", "//third_party/androidx:androidx_annotation_annotation_java", + "//third_party/androidx:androidx_recyclerview_recyclerview_java", + "//third_party/androidx:androidx_test_core_java", "//third_party/junit", "//third_party/mockito:mockito_java", "//ui/android:ui_full_java", + "//ui/android:ui_java_test_support", "//url:gurl_java", "//url:gurl_junit_shadows", "//url:gurl_junit_test_support", @@ -93,10 +99,7 @@ android_library("javatests") { testonly = true - sources = [ - "java/src/org/chromium/chrome/browser/ui/android/webid/AccountSelectionIntegrationTest.java", - "java/src/org/chromium/chrome/browser/ui/android/webid/AccountSelectionViewTest.java", - ] + sources = [ "java/src/org/chromium/chrome/browser/ui/android/webid/AccountSelectionIntegrationTest.java" ] deps = [ ":java",
diff --git a/chrome/browser/ui/android/webid/internal/java/src/org/chromium/chrome/browser/ui/android/webid/AccountSelectionViewTest.java b/chrome/browser/ui/android/webid/internal/java/src/org/chromium/chrome/browser/ui/android/webid/AccountSelectionViewTest.java index f408e5f..222f0d6 100644 --- a/chrome/browser/ui/android/webid/internal/java/src/org/chromium/chrome/browser/ui/android/webid/AccountSelectionViewTest.java +++ b/chrome/browser/ui/android/webid/internal/java/src/org/chromium/chrome/browser/ui/android/webid/AccountSelectionViewTest.java
@@ -11,10 +11,9 @@ import static org.mockito.Mockito.timeout; import static org.mockito.Mockito.verify; -import static org.chromium.base.test.util.CriteriaHelper.pollUiThread; - import static java.util.Arrays.asList; +import android.content.res.Resources; import android.graphics.Color; import android.text.Spanned; import android.text.style.ClickableSpan; @@ -22,18 +21,17 @@ import android.widget.TextView; import androidx.recyclerview.widget.RecyclerView; -import androidx.test.filters.MediumTest; +import androidx.test.core.app.ActivityScenario; import org.junit.Before; -import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.MockitoAnnotations; +import org.robolectric.shadows.ShadowLooper; import org.chromium.base.Callback; -import org.chromium.base.test.BaseActivityTestRule; -import org.chromium.base.test.util.Batch; +import org.chromium.base.test.BaseRobolectricTestRunner; import org.chromium.base.test.util.CriteriaHelper; import org.chromium.base.test.util.ScalableTimeout; import org.chromium.chrome.R; @@ -46,13 +44,10 @@ import org.chromium.chrome.browser.ui.android.webid.AccountSelectionProperties.ItemProperties; import org.chromium.chrome.browser.ui.android.webid.data.Account; import org.chromium.chrome.browser.ui.android.webid.data.IdentityProviderMetadata; -import org.chromium.chrome.test.ChromeJUnit4ClassRunner; -import org.chromium.content_public.browser.test.util.TestThreadUtils; -import org.chromium.content_public.browser.test.util.TouchCommon; +import org.chromium.ui.base.TestActivity; import org.chromium.ui.modelutil.MVCListAdapter; import org.chromium.ui.modelutil.MVCListAdapter.ModelList; import org.chromium.ui.modelutil.PropertyModel; -import org.chromium.ui.test.util.BlankUiTestActivity; import org.chromium.url.GURL; import org.chromium.url.JUnitTestGURLs; @@ -62,8 +57,7 @@ * View tests for the Account Selection component ensure that model changes are reflected in the * sheet. */ -@RunWith(ChromeJUnit4ClassRunner.class) -@Batch(Batch.UNIT_TESTS) +@RunWith(BaseRobolectricTestRunner.class) public class AccountSelectionViewTest { private static final GURL TEST_PROFILE_PIC = JUnitTestGURLs.getGURL(JUnitTestGURLs.EXAMPLE_URL); @@ -77,77 +71,68 @@ private Callback<Account> mAccountCallback; private Runnable mAutoSignInCancelCallback; - private BlankUiTestActivity mActivity; + private ActivityScenario<TestActivity> mActivityScenario; + private Resources mResources; private PropertyModel mModel; private ModelList mSheetAccountItems; private View mContentView; - @Rule - public BaseActivityTestRule<BlankUiTestActivity> mActivityTestRule = - new BaseActivityTestRule<>(BlankUiTestActivity.class); @Before public void setUp() throws Exception { MockitoAnnotations.initMocks(this); - mActivityTestRule.launchActivity(null); - mActivity = mActivityTestRule.getActivity(); - TestThreadUtils.runOnUiThreadBlocking(() -> { + mActivityScenario = ActivityScenario.launch(TestActivity.class); + + mActivityScenario.onActivity(activity -> { mModel = new PropertyModel.Builder(AccountSelectionProperties.ItemProperties.ALL_KEYS) .build(); mSheetAccountItems = new ModelList(); mContentView = AccountSelectionCoordinator.setupContentView( - mActivity, mModel, mSheetAccountItems); - mActivity.setContentView(mContentView); + activity, mModel, mSheetAccountItems); + activity.setContentView(mContentView); + mResources = activity.getResources(); }); } @Test - @MediumTest public void testSignInTitleDisplayed() { - TestThreadUtils.runOnUiThreadBlocking(() -> { - mModel.set(ItemProperties.HEADER, - new PropertyModel.Builder(HeaderProperties.ALL_KEYS) - .with(HeaderProperties.TYPE, HeaderType.SIGN_IN) - .with(HeaderProperties.RP_FOR_DISPLAY, "example.org") - .with(HeaderProperties.IDP_FOR_DISPLAY, "idp.org") - .build()); - }); - pollUiThread(() -> mContentView.getVisibility() == View.VISIBLE); + mModel.set(ItemProperties.HEADER, + new PropertyModel.Builder(HeaderProperties.ALL_KEYS) + .with(HeaderProperties.TYPE, HeaderType.SIGN_IN) + .with(HeaderProperties.RP_FOR_DISPLAY, "example.org") + .with(HeaderProperties.IDP_FOR_DISPLAY, "idp.org") + .build()); + assertEquals(View.VISIBLE, mContentView.getVisibility()); TextView title = mContentView.findViewById(R.id.header_title); assertEquals("Incorrect title", - mActivity.getString( + mResources.getString( R.string.account_selection_sheet_title_explicit, "example.org", "idp.org"), title.getText()); } @Test - @MediumTest public void testVerifyingTitleDisplayed() { - TestThreadUtils.runOnUiThreadBlocking(() -> { - mModel.set(ItemProperties.HEADER, - new PropertyModel.Builder(HeaderProperties.ALL_KEYS) - .with(HeaderProperties.TYPE, HeaderType.VERIFY) - .with(HeaderProperties.RP_FOR_DISPLAY, "example.org") - .with(HeaderProperties.IDP_FOR_DISPLAY, "idp.org") - .build()); - }); - pollUiThread(() -> mContentView.getVisibility() == View.VISIBLE); + mModel.set(ItemProperties.HEADER, + new PropertyModel.Builder(HeaderProperties.ALL_KEYS) + .with(HeaderProperties.TYPE, HeaderType.VERIFY) + .with(HeaderProperties.RP_FOR_DISPLAY, "example.org") + .with(HeaderProperties.IDP_FOR_DISPLAY, "idp.org") + .build()); + assertEquals(View.VISIBLE, mContentView.getVisibility()); TextView title = mContentView.findViewById(R.id.header_title); - assertEquals("Incorrect title", mActivity.getString(R.string.verify_sheet_title), + assertEquals("Incorrect title", mResources.getString(R.string.verify_sheet_title), title.getText()); } @Test - @MediumTest public void testAccountsChangedByModel() { - TestThreadUtils.runOnUiThreadBlocking(() -> { - mSheetAccountItems.addAll( - asList(buildAccountItem(ANA), buildAccountItem(NO_ONE), buildAccountItem(BOB))); - }); + mSheetAccountItems.addAll( + asList(buildAccountItem(ANA), buildAccountItem(NO_ONE), buildAccountItem(BOB))); + ShadowLooper.shadowMainLooper().idle(); - pollUiThread(() -> mContentView.getVisibility() == View.VISIBLE); + assertEquals(View.VISIBLE, mContentView.getVisibility()); assertEquals("Incorrect account count", 3, getAccounts().getChildCount()); assertEquals("Incorrect name", ANA.getName(), getAccountNameAt(0).getText()); assertEquals("Incorrect email", ANA.getEmail(), getAccountEmailAt(0).getText()); @@ -158,100 +143,90 @@ } @Test - @MediumTest public void testAccountsAreClickable() { - TestThreadUtils.runOnUiThreadBlocking(() -> { - mSheetAccountItems.addAll(Collections.singletonList(buildAccountItem(ANA))); - }); - pollUiThread(() -> mContentView.getVisibility() == View.VISIBLE); + mSheetAccountItems.addAll(Collections.singletonList(buildAccountItem(ANA))); + ShadowLooper.shadowMainLooper().idle(); + + assertEquals(View.VISIBLE, mContentView.getVisibility()); assertNotNull(getAccounts().getChildAt(0)); - TouchCommon.singleClickView(getAccounts().getChildAt(0)); + getAccounts().getChildAt(0).performClick(); waitForEvent(mAccountCallback).onResult(eq(ANA)); } @Test - @MediumTest public void testSingleAccountHasClickableButton() { - TestThreadUtils.runOnUiThreadBlocking(() -> { - // Create an account with no callback to ensure the button callback - // is the one that gets invoked. - mSheetAccountItems.add( - new MVCListAdapter.ListItem(AccountSelectionProperties.ITEM_TYPE_ACCOUNT, - new PropertyModel.Builder(AccountProperties.ALL_KEYS) - .with(AccountProperties.ACCOUNT, ANA) - .with(AccountProperties.ON_CLICK_LISTENER, null) - .build())); + // Create an account with no callback to ensure the button callback + // is the one that gets invoked. + mSheetAccountItems.add( + new MVCListAdapter.ListItem(AccountSelectionProperties.ITEM_TYPE_ACCOUNT, + new PropertyModel.Builder(AccountProperties.ALL_KEYS) + .with(AccountProperties.ACCOUNT, ANA) + .with(AccountProperties.ON_CLICK_LISTENER, null) + .build())); + ShadowLooper.shadowMainLooper().idle(); - mModel.set(ItemProperties.CONTINUE_BUTTON, buildContinueButton(ANA, null)); - }); - pollUiThread(() -> mContentView.getVisibility() == View.VISIBLE); + mModel.set(ItemProperties.CONTINUE_BUTTON, buildContinueButton(ANA, null)); + assertEquals(View.VISIBLE, mContentView.getVisibility()); assertNotNull(getAccounts().getChildAt(0)); View continueButton = mContentView.findViewById(R.id.account_selection_continue_btn); assertTrue(continueButton.isShown()); - TouchCommon.singleClickView(continueButton); + continueButton.performClick(); waitForEvent(mAccountCallback).onResult(eq(ANA)); } @Test - @MediumTest - public void testAutoSignInCancellButtonDisplayed() { - TestThreadUtils.runOnUiThreadBlocking(() -> { - // Create an account with no callback to ensure the button callback - // is the one that gets invoked. - mSheetAccountItems.add( - new MVCListAdapter.ListItem(AccountSelectionProperties.ITEM_TYPE_ACCOUNT, - new PropertyModel.Builder(AccountProperties.ALL_KEYS) - .with(AccountProperties.ACCOUNT, ANA) - .with(AccountProperties.ON_CLICK_LISTENER, null) - .build())); + public void testAutoSignInCancelButtonDisplayed() { + // Create an account with no callback to ensure the button callback + // is the one that gets invoked. + mSheetAccountItems.add( + new MVCListAdapter.ListItem(AccountSelectionProperties.ITEM_TYPE_ACCOUNT, + new PropertyModel.Builder(AccountProperties.ALL_KEYS) + .with(AccountProperties.ACCOUNT, ANA) + .with(AccountProperties.ON_CLICK_LISTENER, null) + .build())); - mModel.set(ItemProperties.AUTO_SIGN_IN_CANCEL_BUTTON, buildCancelButton()); - }); - pollUiThread(() -> mContentView.getVisibility() == View.VISIBLE); + mModel.set(ItemProperties.AUTO_SIGN_IN_CANCEL_BUTTON, buildCancelButton()); + ShadowLooper.shadowMainLooper().idle(); + + assertEquals(View.VISIBLE, mContentView.getVisibility()); assertNotNull(getAccounts().getChildAt(0)); assertTrue(mContentView.findViewById(R.id.auto_sign_in_cancel_btn).isShown()); } @Test - @MediumTest public void testHeaderDisplayedForAutoSignIn() { - TestThreadUtils.runOnUiThreadBlocking(() -> { - mModel.set(ItemProperties.HEADER, - new PropertyModel.Builder(HeaderProperties.ALL_KEYS) - .with(HeaderProperties.TYPE, HeaderType.AUTO_SIGN_IN) - .with(HeaderProperties.RP_FOR_DISPLAY, "example.org") - .with(HeaderProperties.IDP_FOR_DISPLAY, "idp.org") - .build()); - }); - pollUiThread(() -> mContentView.getVisibility() == View.VISIBLE); + mModel.set(ItemProperties.HEADER, + new PropertyModel.Builder(HeaderProperties.ALL_KEYS) + .with(HeaderProperties.TYPE, HeaderType.AUTO_SIGN_IN) + .with(HeaderProperties.RP_FOR_DISPLAY, "example.org") + .with(HeaderProperties.IDP_FOR_DISPLAY, "idp.org") + .build()); + assertEquals(View.VISIBLE, mContentView.getVisibility()); TextView title = mContentView.findViewById(R.id.header_title); assertEquals("Incorrect title", - mActivity.getString( + mResources.getString( R.string.account_selection_sheet_title_auto, "example.org", "idp.org"), title.getText()); } @Test - @MediumTest public void testDataSharingConsentDisplayed() { final String idpEtldPlusOne = "idp.org"; - TestThreadUtils.runOnUiThreadBlocking(() -> { - mModel.set(ItemProperties.DATA_SHARING_CONSENT, - buildDataSharingConsentItem(idpEtldPlusOne)); - }); - pollUiThread(() -> mContentView.getVisibility() == View.VISIBLE); + mModel.set( + ItemProperties.DATA_SHARING_CONSENT, buildDataSharingConsentItem(idpEtldPlusOne)); + assertEquals(View.VISIBLE, mContentView.getVisibility()); TextView consent = mContentView.findViewById(R.id.user_data_sharing_consent); assertTrue(consent.isShown()); String expectedSharingConsentText = - mActivity.getString(R.string.account_selection_data_sharing_consent, "idp.org"); + mResources.getString(R.string.account_selection_data_sharing_consent, "idp.org"); expectedSharingConsentText = expectedSharingConsentText.replaceAll("<[^>]*>", ""); // We use toString() here because otherwise getText() returns a // Spanned, which is not equal to the string we get from the resources. @@ -267,17 +242,14 @@ * Tests that the brand foreground and the brand icon are used in the "Continue" button. */ @Test - @MediumTest public void testContinueButtonBranding() { final int expectedTextColor = Color.BLUE; - TestThreadUtils.runOnUiThreadBlocking(() -> { - IdentityProviderMetadata idpMetadata = new IdentityProviderMetadata(expectedTextColor, - /*brandBackgroundColor*/ Color.GREEN, "https://icon-url.example"); + IdentityProviderMetadata idpMetadata = new IdentityProviderMetadata(expectedTextColor, + /*brandBackgroundColor*/ Color.GREEN, "https://icon-url.example"); - mModel.set(ItemProperties.CONTINUE_BUTTON, buildContinueButton(ANA, idpMetadata)); - }); + mModel.set(ItemProperties.CONTINUE_BUTTON, buildContinueButton(ANA, idpMetadata)); - pollUiThread(() -> mContentView.getVisibility() == View.VISIBLE); + assertEquals(View.VISIBLE, mContentView.getVisibility()); TextView continueButton = mContentView.findViewById(R.id.account_selection_continue_btn);
diff --git a/chrome/browser/ui/autofill/chrome_autofill_client.cc b/chrome/browser/ui/autofill/chrome_autofill_client.cc index 3edc35e..7f5ce7b4 100644 --- a/chrome/browser/ui/autofill/chrome_autofill_client.cc +++ b/chrome/browser/ui/autofill/chrome_autofill_client.cc
@@ -892,9 +892,11 @@ } void ChromeAutofillClient::ShowAutofillProgressDialog( + AutofillProgressDialogType autofill_progress_dialog_type, base::OnceClosure cancel_callback) { DCHECK(autofill_progress_dialog_controller_); - autofill_progress_dialog_controller_->ShowDialog(std::move(cancel_callback)); + autofill_progress_dialog_controller_->ShowDialog( + autofill_progress_dialog_type, std::move(cancel_callback)); } void ChromeAutofillClient::CloseAutofillProgressDialog(
diff --git a/chrome/browser/ui/autofill/chrome_autofill_client.h b/chrome/browser/ui/autofill/chrome_autofill_client.h index 7c3d08a6..1fce98d8 100644 --- a/chrome/browser/ui/autofill/chrome_autofill_client.h +++ b/chrome/browser/ui/autofill/chrome_autofill_client.h
@@ -190,7 +190,9 @@ const std::u16string& cvc, const gfx::Image& card_image) override; void ShowVirtualCardErrorDialog(bool is_permanent_error) override; - void ShowAutofillProgressDialog(base::OnceClosure cancel_callback) override; + void ShowAutofillProgressDialog( + AutofillProgressDialogType autofill_progress_dialog_type, + base::OnceClosure cancel_callback) override; void CloseAutofillProgressDialog( bool show_confirmation_before_closing) override; bool IsAutofillAssistantShowing() override;
diff --git a/chrome/browser/ui/autofill/payments/autofill_progress_dialog_controller_impl.cc b/chrome/browser/ui/autofill/payments/autofill_progress_dialog_controller_impl.cc index 2fdac97..0c2082da 100644 --- a/chrome/browser/ui/autofill/payments/autofill_progress_dialog_controller_impl.cc +++ b/chrome/browser/ui/autofill/payments/autofill_progress_dialog_controller_impl.cc
@@ -25,9 +25,11 @@ } void AutofillProgressDialogControllerImpl::ShowDialog( + AutofillProgressDialogType autofill_progress_dialog_type, base::OnceClosure cancel_callback) { DCHECK(!autofill_progress_dialog_view_); + autofill_progress_dialog_type_ = autofill_progress_dialog_type; cancel_callback_ = std::move(cancel_callback); autofill_progress_dialog_view_ = AutofillProgressDialogView::CreateAndShow(this); @@ -52,7 +54,7 @@ bool is_canceled_by_user) { // Dialog is being dismissed so set the pointer to nullptr. autofill_progress_dialog_view_ = nullptr; - + autofill_progress_dialog_type_ = AutofillProgressDialogType::kUnspecified; if (is_canceled_by_user) std::move(cancel_callback_).Run(); // TODO(crbug.com/1261529): Pass in the flow type once we have another use @@ -62,24 +64,58 @@ } const std::u16string AutofillProgressDialogControllerImpl::GetTitle() { - return l10n_util::GetStringUTF16(IDS_AUTOFILL_CARD_UNMASK_PROMPT_TITLE_V2); + switch (autofill_progress_dialog_type_) { + case AutofillProgressDialogType::kAndroidFIDOProgressDialog: + return l10n_util::GetStringUTF16( + IDS_AUTOFILL_FIDO_AUTHENTICATION_PROMPT_TITLE); + case AutofillProgressDialogType::kVirtualCardUnmaskProgressDialog: + return l10n_util::GetStringUTF16( + IDS_AUTOFILL_CARD_UNMASK_PROMPT_TITLE_V2); + case AutofillProgressDialogType::kUnspecified: + NOTREACHED(); + return std::u16string(); + } } const std::u16string AutofillProgressDialogControllerImpl::GetCancelButtonLabel() { - return l10n_util::GetStringUTF16( - IDS_AUTOFILL_CARD_UNMASK_CANCEL_BUTTON_LABEL); + switch (autofill_progress_dialog_type_) { + case AutofillProgressDialogType::kAndroidFIDOProgressDialog: + return l10n_util::GetStringUTF16(IDS_CANCEL); + case AutofillProgressDialogType::kVirtualCardUnmaskProgressDialog: + return l10n_util::GetStringUTF16( + IDS_AUTOFILL_CARD_UNMASK_CANCEL_BUTTON_LABEL); + case AutofillProgressDialogType::kUnspecified: + NOTREACHED(); + return std::u16string(); + } } const std::u16string AutofillProgressDialogControllerImpl::GetLoadingMessage() { - return l10n_util::GetStringUTF16( - IDS_AUTOFILL_CARD_UNMASK_PROGRESS_BAR_MESSAGE); + switch (autofill_progress_dialog_type_) { + case AutofillProgressDialogType::kAndroidFIDOProgressDialog: + return std::u16string(); + case AutofillProgressDialogType::kVirtualCardUnmaskProgressDialog: + return l10n_util::GetStringUTF16( + IDS_AUTOFILL_CARD_UNMASK_PROGRESS_BAR_MESSAGE); + case AutofillProgressDialogType::kUnspecified: + NOTREACHED(); + return std::u16string(); + } } const std::u16string AutofillProgressDialogControllerImpl::GetConfirmationMessage() { - return l10n_util::GetStringUTF16( - IDS_AUTOFILL_CARD_UNMASK_CONFIRMATION_MESSAGE); + switch (autofill_progress_dialog_type_) { + case AutofillProgressDialogType::kAndroidFIDOProgressDialog: + return std::u16string(); + case AutofillProgressDialogType::kVirtualCardUnmaskProgressDialog: + return l10n_util::GetStringUTF16( + IDS_AUTOFILL_CARD_UNMASK_CONFIRMATION_MESSAGE); + case AutofillProgressDialogType::kUnspecified: + NOTREACHED(); + return std::u16string(); + } } content::WebContents* AutofillProgressDialogControllerImpl::GetWebContents() {
diff --git a/chrome/browser/ui/autofill/payments/autofill_progress_dialog_controller_impl.h b/chrome/browser/ui/autofill/payments/autofill_progress_dialog_controller_impl.h index a61e8c5..8db2f32 100644 --- a/chrome/browser/ui/autofill/payments/autofill_progress_dialog_controller_impl.h +++ b/chrome/browser/ui/autofill/payments/autofill_progress_dialog_controller_impl.h
@@ -10,10 +10,13 @@ #include "base/memory/raw_ptr.h" #include "chrome/browser/ui/autofill/payments/autofill_progress_dialog_controller.h" #include "chrome/browser/ui/autofill/payments/autofill_progress_dialog_view.h" +#include "components/autofill/core/browser/autofill_progress_dialog_type.h" #include "content/public/browser/web_contents.h" namespace autofill { +enum class AutofillProgressDialogType; + // Implementation of the AutofillProgressDialogController. This class shows a // progress bar with a cancel button that can be updated to a success state // (check mark). The controller is destroyed once the view is dismissed. @@ -30,7 +33,12 @@ ~AutofillProgressDialogControllerImpl() override; - void ShowDialog(base::OnceClosure cancel_callback); + // Show a progress dialog for underlying autofill processes. The + // `autofill_progress_dialog_type` determines the type of the progress dialog + // and `cancel_callback` is the function to invoke when the cancel button is + // clicked. + void ShowDialog(AutofillProgressDialogType autofill_progress_dialog_type, + base::OnceClosure cancel_callback); void DismissDialog(bool show_confirmation_before_closing); // AutofillProgressDialogController. @@ -54,6 +62,10 @@ // Callback function invoked when the cancel button is clicked. base::OnceClosure cancel_callback_; + + // The type of the progress dialog that is being displayed. + AutofillProgressDialogType autofill_progress_dialog_type_ = + AutofillProgressDialogType::kUnspecified; }; } // namespace autofill
diff --git a/chrome/browser/ui/autofill/payments/offer_notification_bubble_controller_impl.cc b/chrome/browser/ui/autofill/payments/offer_notification_bubble_controller_impl.cc index a1b582a..39b2bd5 100644 --- a/chrome/browser/ui/autofill/payments/offer_notification_bubble_controller_impl.cc +++ b/chrome/browser/ui/autofill/payments/offer_notification_bubble_controller_impl.cc
@@ -68,6 +68,11 @@ return l10n_util::GetStringUTF16( IDS_AUTOFILL_CARD_LINKED_OFFER_REMINDER_TITLE); case AutofillOfferData::OfferType::GPAY_PROMO_CODE_OFFER: + return l10n_util::GetStringUTF16( + base::FeatureList::IsEnabled( + features::kAutofillFillMerchantPromoCodeFields) + ? IDS_AUTOFILL_GPAY_PROMO_CODE_OFFERS_REMINDER_TITLE + : IDS_AUTOFILL_PROMO_CODE_OFFERS_REMINDER_TITLE); case AutofillOfferData::OfferType::FREE_LISTING_COUPON_OFFER: return l10n_util::GetStringUTF16( IDS_AUTOFILL_PROMO_CODE_OFFERS_REMINDER_TITLE);
diff --git a/chrome/browser/ui/autofill/payments/offer_notification_bubble_controller_impl_unittest.cc b/chrome/browser/ui/autofill/payments/offer_notification_bubble_controller_impl_unittest.cc index b7755d6..421f13e 100644 --- a/chrome/browser/ui/autofill/payments/offer_notification_bubble_controller_impl_unittest.cc +++ b/chrome/browser/ui/autofill/payments/offer_notification_bubble_controller_impl_unittest.cc
@@ -12,9 +12,12 @@ #include "components/autofill/core/browser/autofill_test_utils.h" #include "components/autofill/core/browser/data_model/autofill_offer_data.h" #include "components/autofill/core/browser/test_autofill_clock.h" +#include "components/autofill/core/common/autofill_payments_features.h" #include "components/commerce/core/commerce_feature_list.h" +#include "components/strings/grit/components_strings.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" +#include "ui/base/l10n/l10n_util.h" namespace autofill { @@ -68,6 +71,8 @@ } protected: + base::test::ScopedFeatureList feature_list_; + class MockCouponService : public CouponService { public: MOCK_METHOD1(RecordCouponDisplayTimestamp, @@ -119,6 +124,22 @@ display_strings, promo_code); } + AutofillOfferData CreateTestGPayPromoCodeOffer( + const std::vector<GURL>& merchant_origins, + const std::string& promo_code) { + int64_t offer_id = 2468; + base::Time expiry = base::Time::Now() + base::Days(2); + autofill::DisplayStrings display_strings; + display_strings.value_prop_text = "5% off on shoes. Up to $50."; + display_strings.see_details_text = "See details"; + display_strings.usage_instructions_text = + "Click the promo code field at checkout to autofill it."; + GURL offer_details_url = GURL("https://pay.google.com"); + return autofill::AutofillOfferData::GPayPromoCodeOffer( + offer_id, expiry, merchant_origins, offer_details_url, display_strings, + promo_code); + } + TestOfferNotificationBubbleControllerImpl* controller() { return static_cast<TestOfferNotificationBubbleControllerImpl*>( TestOfferNotificationBubbleControllerImpl::FromWebContents( @@ -254,4 +275,42 @@ EXPECT_FALSE(controller()->GetOfferNotificationBubbleView()); } +// Tests that the offer notification bubble will be shown, and coupon service +// will not be called for a GPay promo code offer. +TEST_F(OfferNotificationBubbleControllerImplTest, GPayPromoCode_BubbleShown) { + feature_list_.InitAndEnableFeature( + autofill::features::kAutofillFillMerchantPromoCodeFields); + AutofillOfferData offer = CreateTestGPayPromoCodeOffer( + /*merchant_origins=*/{GURL("https://www.example.com/first/") + .DeprecatedGetOriginAsURL()}, + /*promo_code=*/"FREEFALL5678"); + ShowBubble(&offer); + + EXPECT_CALL(mock_coupon_service_, GetCouponDisplayTimestamp).Times(0); + EXPECT_TRUE(controller()->GetOfferNotificationBubbleView()); + EXPECT_EQ(controller()->GetWindowTitle(), + l10n_util::GetStringUTF16( + IDS_AUTOFILL_GPAY_PROMO_CODE_OFFERS_REMINDER_TITLE)); +} + +// Tests that the offer notification bubble will be shown as a free-listing +// coupon notification bubble when the feature is disabled. +TEST_F(OfferNotificationBubbleControllerImplTest, + GPayPromoCode_BubbleShownWithFLCTitle) { + feature_list_.InitAndDisableFeature( + autofill::features::kAutofillFillMerchantPromoCodeFields); + + AutofillOfferData offer = CreateTestGPayPromoCodeOffer( + /*merchant_origins=*/{GURL("https://www.example.com/first/") + .DeprecatedGetOriginAsURL()}, + /*promo_code=*/"FREEFALL5678"); + ShowBubble(&offer); + + EXPECT_CALL(mock_coupon_service_, GetCouponDisplayTimestamp).Times(0); + EXPECT_TRUE(controller()->GetOfferNotificationBubbleView()); + EXPECT_EQ( + controller()->GetWindowTitle(), + l10n_util::GetStringUTF16(IDS_AUTOFILL_PROMO_CODE_OFFERS_REMINDER_TITLE)); +} + } // namespace autofill
diff --git a/chrome/browser/ui/views/autofill/payments/autofill_progress_dialog_views_browsertest.cc b/chrome/browser/ui/views/autofill/payments/autofill_progress_dialog_views_browsertest.cc index 51633408..1b757714 100644 --- a/chrome/browser/ui/views/autofill/payments/autofill_progress_dialog_views_browsertest.cc +++ b/chrome/browser/ui/views/autofill/payments/autofill_progress_dialog_views_browsertest.cc
@@ -10,6 +10,7 @@ #include "chrome/browser/ui/browser_window.h" #include "chrome/browser/ui/test/test_browser_dialog.h" #include "chrome/browser/ui/views/autofill/payments/autofill_progress_dialog_views.h" +#include "components/autofill/core/browser/autofill_progress_dialog_type.h" #include "components/autofill/core/browser/metrics/autofill_metrics.h" #include "content/public/test/browser_test.h" #include "ui/views/test/widget_test.h" @@ -32,7 +33,15 @@ } void ShowUi(const std::string& name) override { - controller()->ShowDialog(base::DoNothing()); + AutofillProgressDialogType autofill_progress_dialog_type_; + if (name == "VirtualCardUnmask") { + autofill_progress_dialog_type_ = + AutofillProgressDialogType::kVirtualCardUnmaskProgressDialog; + } else { + NOTREACHED(); + return; + } + controller()->ShowDialog(autofill_progress_dialog_type_, base::DoNothing()); } AutofillProgressDialogViews* GetDialogViews() { @@ -54,7 +63,8 @@ std::unique_ptr<AutofillProgressDialogControllerImpl> controller_; }; -IN_PROC_BROWSER_TEST_F(AutofillProgressDialogViewsBrowserTest, InvokeUi) { +IN_PROC_BROWSER_TEST_F(AutofillProgressDialogViewsBrowserTest, + InvokeUi_VirtualCardUnmask) { base::HistogramTester histogram_tester; ShowAndVerifyUi(); histogram_tester.ExpectUniqueSample( @@ -66,7 +76,7 @@ IN_PROC_BROWSER_TEST_F(AutofillProgressDialogViewsBrowserTest, CloseTabWhileDialogShowing) { base::HistogramTester histogram_tester; - ShowUi(""); + ShowUi("VirtualCardUnmask"); VerifyUi(); browser()->tab_strip_model()->GetActiveWebContents()->Close(); base::RunLoop().RunUntilIdle(); @@ -81,7 +91,7 @@ IN_PROC_BROWSER_TEST_F(AutofillProgressDialogViewsBrowserTest, CloseBrowserWhileDialogShowing) { base::HistogramTester histogram_tester; - ShowUi(""); + ShowUi("VirtualCardUnmask"); VerifyUi(); browser()->window()->Close(); base::RunLoop().RunUntilIdle(); @@ -96,7 +106,7 @@ IN_PROC_BROWSER_TEST_F(AutofillProgressDialogViewsBrowserTest, DISABLED_ClickCancelButton) { base::HistogramTester histogram_tester; - ShowUi(""); + ShowUi("VirtualCardUnmask"); VerifyUi(); GetDialogViews()->CancelDialog(); base::RunLoop().RunUntilIdle(); @@ -111,7 +121,7 @@ IN_PROC_BROWSER_TEST_F(AutofillProgressDialogViewsBrowserTest, CloseDialogWithConfirmation) { base::HistogramTester histogram_tester; - ShowUi(""); + ShowUi("VirtualCardUnmask"); VerifyUi(); auto* dialog_views = GetDialogViews(); EXPECT_TRUE(dialog_views);
diff --git a/chrome/browser/ui/views/autofill/payments/offer_notification_bubble_views.cc b/chrome/browser/ui/views/autofill/payments/offer_notification_bubble_views.cc index 26ce5f5..a16f166 100644 --- a/chrome/browser/ui/views/autofill/payments/offer_notification_bubble_views.cc +++ b/chrome/browser/ui/views/autofill/payments/offer_notification_bubble_views.cc
@@ -10,15 +10,18 @@ #include "chrome/browser/ui/views/autofill/payments/payments_view_util.h" #include "chrome/browser/ui/views/autofill/payments/promo_code_label_button.h" #include "chrome/browser/ui/views/chrome_layout_provider.h" +#include "chrome/browser/ui/views/chrome_typography.h" #include "chrome/grit/theme_resources.h" #include "components/autofill/core/browser/data_model/autofill_offer_data.h" #include "components/autofill/core/browser/data_model/credit_card.h" +#include "components/autofill/core/common/autofill_payments_features.h" #include "components/strings/grit/components_strings.h" #include "ui/base/clipboard/clipboard_buffer.h" #include "ui/base/clipboard/scoped_clipboard_writer.h" #include "ui/base/l10n/l10n_util.h" #include "ui/gfx/geometry/insets.h" #include "ui/views/bubble/bubble_frame_view.h" +#include "ui/views/controls/styled_label.h" #include "ui/views/layout/box_layout.h" #include "ui/views/layout/box_layout_view.h" #include "ui/views/layout/flex_layout.h" @@ -57,14 +60,21 @@ switch (controller_->GetOffer()->GetOfferType()) { case AutofillOfferData::OfferType::GPAY_CARD_LINKED_OFFER: InitWithCardLinkedOfferContent(); - break; + return; case AutofillOfferData::OfferType::GPAY_PROMO_CODE_OFFER: + if (base::FeatureList::IsEnabled( + features::kAutofillFillMerchantPromoCodeFields)) { + InitWithGPayPromoCodeOfferContent(); + } else { + InitWithFreeListingCouponOfferContent(); + } + return; case AutofillOfferData::OfferType::FREE_LISTING_COUPON_OFFER: - InitWithPromoCodeOfferContent(); - break; + InitWithFreeListingCouponOfferContent(); + return; case AutofillOfferData::OfferType::UNKNOWN: NOTREACHED(); - break; + return; } } @@ -73,8 +83,14 @@ std::make_unique<TitleWithIconAndSeparatorView>( GetWindowTitle(), TitleWithIconAndSeparatorView::Icon::GOOGLE_G)); - // Set the header image for free listing coupon offers. - if (controller_->GetOffer()->IsFreeListingCouponOffer()) { + // Set the header image for free listing coupon notification bubble. + // If the promo code field autofill feature is off, we also need to add this + // image for GPay promo code offer because we are showing the free listing + // coupon bubble in this case. + if (controller_->GetOffer()->IsFreeListingCouponOffer() || + (!base::FeatureList::IsEnabled( + features::kAutofillFillMerchantPromoCodeFields) && + controller_->GetOffer()->IsGPayPromoCodeOffer())) { ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); auto* autofill_offers_banner = bundle.GetImageSkiaNamed(IDR_AUTOFILL_OFFERS); @@ -125,7 +141,7 @@ explanatory_message->SetMultiLine(true); } -void OfferNotificationBubbleViews::InitWithPromoCodeOfferContent() { +void OfferNotificationBubbleViews::InitWithFreeListingCouponOfferContent() { // Promo code offers have no CTA buttons: SetButtons(ui::DIALOG_BUTTON_NONE); @@ -158,6 +174,57 @@ UpdateButtonTooltipsAndAccessibleNames(); } +void OfferNotificationBubbleViews::InitWithGPayPromoCodeOfferContent() { + // Promo code offers have no CTA buttons: + SetButtons(ui::DIALOG_BUTTON_NONE); + + // Create bubble content: + auto* layout = SetLayoutManager(std::make_unique<views::BoxLayout>( + views::BoxLayout::Orientation::kVertical, gfx::Insets(), + ChromeLayoutProvider::Get()->GetDistanceMetric( + DISTANCE_OMNIBOX_TWO_LINE_CELL_VERTICAL_PADDING))); + layout->set_cross_axis_alignment( + views::BoxLayout::CrossAxisAlignment::kStart); + + const AutofillOfferData* offer = controller_->GetOffer(); + DCHECK(offer); + const std::string& value_prop_text = + offer->GetDisplayStrings().value_prop_text; + // Add the first line of `value_prop_text` with see details link. + if (!value_prop_text.empty()) { + // Hide See details if the link is not valid. + const std::string& see_details_text = + offer->GetOfferDetailsUrl().is_valid() + ? offer->GetDisplayStrings().see_details_text + : ""; + promo_code_label_ = AddChildView(std::make_unique<views::StyledLabel>()); + std::vector<size_t> offsets; + auto label_text = l10n_util::GetStringFUTF16( + IDS_AUTOFILL_GPAY_PROMO_CODE_OFFERS_REMINDER_VALUE_PROP_TEXT, + base::UTF8ToUTF16(value_prop_text), base::UTF8ToUTF16(see_details_text), + &offsets); + promo_code_label_->SetText(label_text); + promo_code_label_->SetTextContext( + ChromeTextContext::CONTEXT_DIALOG_BODY_TEXT_SMALL); + promo_code_label_->SetDefaultTextStyle(views::style::STYLE_SECONDARY); + promo_code_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); + promo_code_label_->AddStyleRange( + gfx::Range(offsets.at(1), offsets.at(1) + see_details_text.length()), + views::StyledLabel::RangeStyleInfo::CreateForLink(base::BindRepeating( + &OfferNotificationBubbleViews::OnPromoCodeSeeDetailsClicked, + base::Unretained(this)))); + } + // Add the usage instructions text. + if (!offer->GetDisplayStrings().usage_instructions_text.empty()) { + instructions_label_ = AddChildView(std::make_unique<views::Label>( + base::ASCIIToUTF16(offer->GetDisplayStrings().usage_instructions_text), + ChromeTextContext::CONTEXT_DIALOG_BODY_TEXT_SMALL, + views::style::STYLE_SECONDARY)); + instructions_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); + instructions_label_->SetMultiLine(true); + } +} + void OfferNotificationBubbleViews::OnPromoCodeButtonClicked() { // Copy clicked promo code to clipboard. ui::ScopedClipboardWriter(ui::ClipboardBuffer::kCopyPaste) @@ -168,6 +235,14 @@ UpdateButtonTooltipsAndAccessibleNames(); } +void OfferNotificationBubbleViews::OnPromoCodeSeeDetailsClicked() { + DCHECK(controller_->GetOffer()->GetOfferDetailsUrl().is_valid()); + web_contents()->OpenURL(content::OpenURLParams( + GURL(controller_->GetOffer()->GetOfferDetailsUrl()), content::Referrer(), + WindowOpenDisposition::NEW_FOREGROUND_TAB, ui::PAGE_TRANSITION_LINK, + /*is_renderer_initiated=*/false)); +} + void OfferNotificationBubbleViews::UpdateButtonTooltipsAndAccessibleNames() { if (!promo_code_label_button_) return;
diff --git a/chrome/browser/ui/views/autofill/payments/offer_notification_bubble_views.h b/chrome/browser/ui/views/autofill/payments/offer_notification_bubble_views.h index d188ea0..06ec3e0 100644 --- a/chrome/browser/ui/views/autofill/payments/offer_notification_bubble_views.h +++ b/chrome/browser/ui/views/autofill/payments/offer_notification_bubble_views.h
@@ -9,6 +9,7 @@ #include "chrome/browser/ui/autofill/autofill_bubble_base.h" #include "chrome/browser/ui/autofill/payments/offer_notification_bubble_controller.h" #include "chrome/browser/ui/views/location_bar/location_bar_bubble_delegate_view.h" +#include "ui/views/controls/styled_label.h" namespace content { class WebContents; @@ -39,6 +40,8 @@ CopyPromoCode); FRIEND_TEST_ALL_PREFIXES(OfferNotificationBubbleViewsInteractiveUiTest, TooltipAndAccessibleName); + FRIEND_TEST_ALL_PREFIXES(OfferNotificationBubbleViewsInteractiveUiTest, + ShowGPayPromoCodeBubble); // AutofillBubbleBase: void Hide() override; @@ -51,17 +54,27 @@ void OnWidgetDestroying(views::Widget* widget) override; void InitWithCardLinkedOfferContent(); - void InitWithPromoCodeOfferContent(); + void InitWithFreeListingCouponOfferContent(); + void InitWithGPayPromoCodeOfferContent(); // Called when the promo code LabelButton is clicked for a promo code offer. // Copies the promo code to the clipboard and updates the button tooltip. void OnPromoCodeButtonClicked(); + // Called when the See Details link of the value prop text is clicked. + // Browser will switch to a new tab with the offer details url. + void OnPromoCodeSeeDetailsClicked(); + void UpdateButtonTooltipsAndAccessibleNames(); raw_ptr<OfferNotificationBubbleController> controller_; raw_ptr<PromoCodeLabelButton> promo_code_label_button_ = nullptr; + + // TODO(crbug.com/1334806): Replace tests with Pixel tests. + raw_ptr<views::StyledLabel> promo_code_label_ = nullptr; + + raw_ptr<views::Label> instructions_label_ = nullptr; }; } // namespace autofill
diff --git a/chrome/browser/ui/views/autofill/payments/offer_notification_bubble_views_interactive_uitest.cc b/chrome/browser/ui/views/autofill/payments/offer_notification_bubble_views_interactive_uitest.cc index ee4e57b8..620ac482 100644 --- a/chrome/browser/ui/views/autofill/payments/offer_notification_bubble_views_interactive_uitest.cc +++ b/chrome/browser/ui/views/autofill/payments/offer_notification_bubble_views_interactive_uitest.cc
@@ -20,6 +20,7 @@ #include "components/autofill/core/browser/metrics/autofill_metrics.h" #include "components/autofill/core/browser/payments/offer_notification_handler.h" #include "components/autofill/core/browser/ui/payments/payments_bubble_closed_reasons.h" +#include "components/autofill/core/common/autofill_payments_features.h" #include "components/strings/grit/components_strings.h" #include "content/public/test/browser_test.h" #include "testing/gtest/include/gtest/gtest.h" @@ -149,6 +150,8 @@ const AutofillOfferData::OfferType test_offer_type_; }; +// TODO(https://crbug.com/1334806): Split parameterized tests that are +// applicable for only one offer type. INSTANTIATE_TEST_SUITE_P( GpayCardLinked, OfferNotificationBubbleViewsInteractiveUiTest, @@ -157,6 +160,10 @@ FreeListingCoupon, OfferNotificationBubbleViewsInteractiveUiTest, testing::Values(AutofillOfferData::OfferType::FREE_LISTING_COUPON_OFFER)); +INSTANTIATE_TEST_SUITE_P( + GPayPromoCode, + OfferNotificationBubbleViewsInteractiveUiTest, + testing::Values(AutofillOfferData::OfferType::GPAY_PROMO_CODE_OFFER)); // TODO(https://crbug.com/1289161): Flaky failures. #if BUILDFLAG(IS_LINUX) @@ -447,10 +454,12 @@ IN_PROC_BROWSER_TEST_P(OfferNotificationBubbleViewsInteractiveUiTest, TooltipAndAccessibleName) { - // Applies to promo code offers only, as card-linked offers do not have a + // Applies to free listing coupons offers only, as other offers do not have a // clickable promo code copy button. - if (test_offer_type_ == AutofillOfferData::OfferType::GPAY_CARD_LINKED_OFFER) + if (test_offer_type_ != + AutofillOfferData::OfferType::FREE_LISTING_COUPON_OFFER) { return; + } ShowBubbleForOfferAndVerify(); ASSERT_TRUE(GetOfferNotificationBubbleViews()); @@ -475,10 +484,12 @@ IN_PROC_BROWSER_TEST_P(OfferNotificationBubbleViewsInteractiveUiTest, CopyPromoCode) { - // Applies to promo code offers only, as card-linked offers do not have a + // Applies to free listing coupons offers only, as other offers do not have a // clickable promo code copy button. - if (test_offer_type_ == AutofillOfferData::OfferType::GPAY_CARD_LINKED_OFFER) + if (test_offer_type_ != + AutofillOfferData::OfferType::FREE_LISTING_COUPON_OFFER) { return; + } ShowBubbleForOfferAndVerify(); ASSERT_TRUE(GetOfferNotificationBubbleViews()); @@ -506,4 +517,33 @@ true, 1); } +IN_PROC_BROWSER_TEST_P(OfferNotificationBubbleViewsInteractiveUiTest, + ShowGPayPromoCodeBubble) { + // Applies to GPay promo code offers only. + if (test_offer_type_ != AutofillOfferData::OfferType::GPAY_PROMO_CODE_OFFER) { + return; + } + + ShowBubbleForOfferAndVerify(); + ASSERT_TRUE(GetOfferNotificationBubbleViews()); + ASSERT_TRUE(IsIconVisible()); + + auto* promo_code_styled_label = + GetOfferNotificationBubbleViews()->promo_code_label_.get(); + auto* promo_code_usage_instructions_ = + GetOfferNotificationBubbleViews()->instructions_label_.get(); + + EXPECT_EQ(promo_code_styled_label->GetText(), + base::ASCIIToUTF16(GetDefaultTestValuePropText()) + u" " + + base::ASCIIToUTF16(GetDefaultTestSeeDetailsText())); + EXPECT_EQ(promo_code_usage_instructions_->GetText(), + base::ASCIIToUTF16(GetDefaultTestUsageInstructionsText())); + + // Simulate clicking on see details part of the text. + GetOfferNotificationBubbleViews()->OnPromoCodeSeeDetailsClicked(); + EXPECT_EQ( + browser()->tab_strip_model()->GetActiveWebContents()->GetVisibleURL(), + GURL(GetDefaultTestDetailsUrlString())); +} + } // namespace autofill
diff --git a/chrome/browser/ui/views/autofill/payments/offer_notification_bubble_views_test_base.cc b/chrome/browser/ui/views/autofill/payments/offer_notification_bubble_views_test_base.cc index 23c72fd..e4b339ac 100644 --- a/chrome/browser/ui/views/autofill/payments/offer_notification_bubble_views_test_base.cc +++ b/chrome/browser/ui/views/autofill/payments/offer_notification_bubble_views_test_base.cc
@@ -22,22 +22,29 @@ namespace autofill { const char kDefaultTestPromoCode[] = "5PCTOFFSHOES"; +const char kDefaultTestValuePropText[] = "5% off on shoes. Up to $50."; +const char kDefaultTestSeeDetailsText[] = "See details"; +const char kDefaultTestUsageInstructionsText[] = + "Click the promo code field at checkout to autofill it."; +const char kDefaultTestDetailsUrlString[] = "https://pay.google.com"; OfferNotificationBubbleViewsTestBase::OfferNotificationBubbleViewsTestBase( bool promo_code_flag_enabled) { if (promo_code_flag_enabled) { scoped_feature_list_.InitWithFeaturesAndParameters( /*enabled_features=*/ - {{features::kAutofillEnableOfferNotificationForPromoCodes, {}}, - {commerce::kRetailCoupons, - {{commerce::kRetailCouponsWithCodeParam, "true"}}}}, + {{commerce::kRetailCoupons, + {{commerce::kRetailCouponsWithCodeParam, "true"}}}, + {features::kAutofillEnableOfferNotificationForPromoCodes, {}}, + {features::kAutofillFillMerchantPromoCodeFields, {}}}, /*disabled_features=*/{}); } else { scoped_feature_list_.InitWithFeatures( /*enabled_features=*/{}, /*disabled_features=*/{ + commerce::kRetailCoupons, features::kAutofillEnableOfferNotificationForPromoCodes, - commerce::kRetailCoupons}); + features::kAutofillFillMerchantPromoCodeFields}); } } @@ -97,10 +104,10 @@ for (auto url : domains) merchant_origins.emplace_back(url.DeprecatedGetOriginAsURL()); DisplayStrings display_strings; - display_strings.value_prop_text = "5% off on shoes. Up to $50."; - display_strings.see_details_text = "See details"; + display_strings.value_prop_text = GetDefaultTestValuePropText(); + display_strings.see_details_text = GetDefaultTestSeeDetailsText(); display_strings.usage_instructions_text = - "Click the promo code field at checkout to autofill it."; + GetDefaultTestUsageInstructionsText(); auto promo_code = GetDefaultTestPromoCode(); return std::make_unique<AutofillOfferData>( AutofillOfferData::FreeListingCouponOffer( @@ -117,12 +124,12 @@ for (auto url : domains) merchant_origins.emplace_back(url.DeprecatedGetOriginAsURL()); DisplayStrings display_strings; - display_strings.value_prop_text = "5% off on shoes. Up to $50."; - display_strings.see_details_text = "See details"; + display_strings.value_prop_text = GetDefaultTestValuePropText(); + display_strings.see_details_text = GetDefaultTestSeeDetailsText(); display_strings.usage_instructions_text = - "Click the promo code field at checkout to autofill it."; + GetDefaultTestUsageInstructionsText(); auto promo_code = GetDefaultTestPromoCode(); - GURL offer_details_url = GURL("https://pay.google.com"); + GURL offer_details_url = GURL(GetDefaultTestDetailsUrlString()); return std::make_unique<AutofillOfferData>( AutofillOfferData::GPayPromoCodeOffer(offer_id, expiry, merchant_origins, offer_details_url, display_strings, @@ -252,6 +259,27 @@ return kDefaultTestPromoCode; } +std::string OfferNotificationBubbleViewsTestBase::GetDefaultTestValuePropText() + const { + return kDefaultTestValuePropText; +} + +std::string OfferNotificationBubbleViewsTestBase::GetDefaultTestSeeDetailsText() + const { + return kDefaultTestSeeDetailsText; +} + +std::string +OfferNotificationBubbleViewsTestBase::GetDefaultTestUsageInstructionsText() + const { + return kDefaultTestUsageInstructionsText; +} + +std::string +OfferNotificationBubbleViewsTestBase::GetDefaultTestDetailsUrlString() const { + return kDefaultTestDetailsUrlString; +} + AutofillOfferManager* OfferNotificationBubbleViewsTestBase::GetOfferManager() { return ContentAutofillDriver::GetForRenderFrameHost( GetActiveWebContents()->GetPrimaryMainFrame())
diff --git a/chrome/browser/ui/views/autofill/payments/offer_notification_bubble_views_test_base.h b/chrome/browser/ui/views/autofill/payments/offer_notification_bubble_views_test_base.h index a987d40..0cbfcec 100644 --- a/chrome/browser/ui/views/autofill/payments/offer_notification_bubble_views_test_base.h +++ b/chrome/browser/ui/views/autofill/payments/offer_notification_bubble_views_test_base.h
@@ -109,6 +109,20 @@ // can be expected on UI elements if desired. std::string GetDefaultTestPromoCode() const; + // Returns the value prop string used for the default test GPay promo code, + // so that it can be expected on UI elements if desired. + std::string GetDefaultTestValuePropText() const; + + // Returns the see details string used for the default test GPay promo code. + std::string GetDefaultTestSeeDetailsText() const; + + // Returns the user instructions string used for the default GPay promo code + // data. + std::string GetDefaultTestUsageInstructionsText() const; + + // Returns the offer details url string used for the default GPay promo code. + std::string GetDefaultTestDetailsUrlString() const; + private: raw_ptr<PersonalDataManager> personal_data_; raw_ptr<CouponService> coupon_service_;
diff --git a/chrome/browser/ui/views/frame/top_controls_slide_controller_chromeos_browsertest.cc b/chrome/browser/ui/views/frame/top_controls_slide_controller_chromeos_browsertest.cc index 14263c4..c7bbede4 100644 --- a/chrome/browser/ui/views/frame/top_controls_slide_controller_chromeos_browsertest.cc +++ b/chrome/browser/ui/views/frame/top_controls_slide_controller_chromeos_browsertest.cc
@@ -1428,14 +1428,9 @@ TopChromeShownState::kFullyHidden); } -// Flaky on ChromeOS Release bots. https://crbug.com/1033648 -#if BUILDFLAG(IS_CHROMEOS) && defined(NDEBUG) -#define MAYBE_TestToggleChromeVox DISABLED_TestToggleChromeVox -#else -#define MAYBE_TestToggleChromeVox TestToggleChromeVox -#endif +// Flaky on ChromeOS bots. https://crbug.com/1033648 IN_PROC_BROWSER_TEST_F(TopControlsSlideControllerTest, - MAYBE_TestToggleChromeVox) { + DISABLED_TestToggleChromeVox) { ToggleTabletMode(); ASSERT_TRUE(GetTabletModeEnabled()); EXPECT_TRUE(top_controls_slide_controller()->IsEnabled());
diff --git a/chrome/browser/ui/views/sharing_hub/screenshot/screenshot_captured_bubble.cc b/chrome/browser/ui/views/sharing_hub/screenshot/screenshot_captured_bubble.cc index 1afb960..8476475f 100644 --- a/chrome/browser/ui/views/sharing_hub/screenshot/screenshot_captured_bubble.cc +++ b/chrome/browser/ui/views/sharing_hub/screenshot/screenshot_captured_bubble.cc
@@ -9,6 +9,7 @@ #include <vector> #include "base/bind.h" +#include "base/containers/span.h" #include "base/feature_list.h" #include "base/files/file_path.h" #include "base/files/file_util.h" @@ -50,6 +51,20 @@ // Rendered image size, pixels. constexpr int kImageWidthPx = 336; constexpr int kImageHeightPx = 252; + +static base::FilePath WriteTemporaryFile( + const std::vector<unsigned char>& image_bytes) { + base::FilePath file_path; + base::CreateTemporaryFile(&file_path); + if (!file_path.empty()) { + if (!base::WriteFile(file_path, base::make_span(image_bytes.data(), + image_bytes.size()))) { + file_path.clear(); + } + } + return file_path; +} + } // namespace namespace sharing_hub { @@ -209,9 +224,8 @@ void ScreenshotCapturedBubble::DownloadButtonPressed() { // Returns closest scaling to parameter (1.0). - const gfx::ImageSkia& image_ref = image_view_->GetImage(); - const gfx::ImageSkiaRep& image_rep = image_ref.GetRepresentation(1.0f); - const SkBitmap& bitmap = image_rep.GetBitmap(); + const SkBitmap& bitmap = + image_view_->GetImage().GetRepresentation(1.0f).GetBitmap(); const GURL data_url = GURL(webui::GetBitmapDataUrl(bitmap)); if (!web_contents_) @@ -255,19 +269,6 @@ "SharingDesktopScreenshot.ScreenshotSavedViaBubble")); } -static base::FilePath WriteTemporaryFile( - const std::vector<unsigned char>& image_bytes) { - base::FilePath file_path; - base::CreateTemporaryFile(&file_path); - if (!file_path.empty()) { - if (!base::WriteFile(file_path, base::make_span(image_bytes.data(), - image_bytes.size()))) { - file_path.clear(); - } - } - return file_path; -} - void ScreenshotCapturedBubble::EditButtonPressed() { base::RecordAction( base::UserMetricsAction("SharingDesktopScreenshot.ScreenshotEdited"));
diff --git a/chrome/browser/ui/views/side_panel/read_anything/read_anything_controller.cc b/chrome/browser/ui/views/side_panel/read_anything/read_anything_controller.cc index 5d0aef5d..09bd258 100644 --- a/chrome/browser/ui/views/side_panel/read_anything/read_anything_controller.cc +++ b/chrome/browser/ui/views/side_panel/read_anything/read_anything_controller.cc
@@ -10,11 +10,12 @@ #include "base/strings/utf_string_conversions.h" #include "chrome/browser/ui/browser.h" -#include "chrome/browser/ui/webui/side_panel/read_anything/read_anything.mojom.h" +#include "chrome/common/accessibility/read_anything.mojom.h" #include "content/public/browser/page.h" #include "ui/accessibility/ax_node.h" #include "ui/accessibility/ax_role_properties.h" #include "ui/accessibility/ax_tree.h" +#include "ui/accessibility/ax_tree_update.h" #include "url/gurl.h" namespace { @@ -128,6 +129,8 @@ void ReadAnythingController::OnAXTreeDistilled( const ui::AXTreeUpdate& snapshot, const std::vector<ui::AXNodeID>& content_node_ids) { + // TODO(abigailbklein): Rather than the below, do + // model_->SetDistilledAXTree(snapshot, content_node_ids); // Unserialize the snapshot. ui::AXTree tree; bool success = tree.Unserialize(snapshot);
diff --git a/chrome/browser/ui/views/side_panel/read_anything/read_anything_controller.h b/chrome/browser/ui/views/side_panel/read_anything/read_anything_controller.h index 4c72588b..c7715a59 100644 --- a/chrome/browser/ui/views/side_panel/read_anything/read_anything_controller.h +++ b/chrome/browser/ui/views/side_panel/read_anything/read_anything_controller.h
@@ -16,10 +16,7 @@ #include "chrome/browser/ui/webui/side_panel/read_anything/read_anything_page_handler.h" #include "content/public/browser/web_contents_observer.h" #include "ui/accessibility/ax_node_id_forward.h" - -namespace ui { -struct AXTreeUpdate; -} +#include "ui/accessibility/ax_tree_update_forward.h" class Browser;
diff --git a/chrome/browser/ui/views/side_panel/read_anything/read_anything_coordinator_unittest.cc b/chrome/browser/ui/views/side_panel/read_anything/read_anything_coordinator_unittest.cc index 5749151..689b9a4 100644 --- a/chrome/browser/ui/views/side_panel/read_anything/read_anything_coordinator_unittest.cc +++ b/chrome/browser/ui/views/side_panel/read_anything/read_anything_coordinator_unittest.cc
@@ -30,6 +30,11 @@ class MockReadAnythingModelObserver : public ReadAnythingModel::Observer { public: MOCK_METHOD(void, + OnAXTreeDistilled, + (const ui::AXTreeUpdate& snapshot, + const std::vector<ui::AXNodeID>& content_node_ids), + (override)); + MOCK_METHOD(void, OnFontNameUpdated, (const std::string& new_font_name), (override)); @@ -113,9 +118,12 @@ TEST_F(ReadAnythingCoordinatorTest, ModelObserversReceiveNotifications) { GetModel()->AddObserver(&model_observer_); + EXPECT_CALL(model_observer_, OnAXTreeDistilled(_, _)).Times(1); EXPECT_CALL(model_observer_, OnFontNameUpdated(_)).Times(1); EXPECT_CALL(model_observer_, OnContentUpdated(_)).Times(1); + GetModel()->SetDistilledAXTree(ui::AXTreeUpdate(), + std::vector<ui::AXNodeID>()); GetModel()->SetSelectedFontIndex(3); GetModel()->SetContent(std::vector<ContentNodePtr>());
diff --git a/chrome/browser/ui/views/side_panel/read_anything/read_anything_model.cc b/chrome/browser/ui/views/side_panel/read_anything/read_anything_model.cc index dd4d695..067b1d3 100644 --- a/chrome/browser/ui/views/side_panel/read_anything/read_anything_model.cc +++ b/chrome/browser/ui/views/side_panel/read_anything/read_anything_model.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/ui/views/side_panel/read_anything/read_anything_model.h" #include <memory> +#include <utility> #include "base/check.h" #include "base/strings/utf_string_conversions.h" @@ -31,6 +32,14 @@ NotifyContentUpdated(); } +void ReadAnythingModel::SetDistilledAXTree( + ui::AXTreeUpdate snapshot, + std::vector<ui::AXNodeID> content_node_ids) { + snapshot_ = std::move(snapshot); + content_node_ids_ = std::move(content_node_ids); + NotifyAXTreeDistilled(); +} + void ReadAnythingModel::NotifyFontNameUpdated() { for (Observer& obs : observers_) { obs.OnFontNameUpdated(font_name_); @@ -43,6 +52,12 @@ } } +void ReadAnythingModel::NotifyAXTreeDistilled() { + for (Observer& obs : observers_) { + obs.OnAXTreeDistilled(snapshot_, content_node_ids_); + } +} + ReadAnythingFontModel::ReadAnythingFontModel() { // TODO(1266555): Replace these with proper versions once finalized. font_choices_.emplace_back(u"Standard font");
diff --git a/chrome/browser/ui/views/side_panel/read_anything/read_anything_model.h b/chrome/browser/ui/views/side_panel/read_anything/read_anything_model.h index 254cab77..dc00dc5 100644 --- a/chrome/browser/ui/views/side_panel/read_anything/read_anything_model.h +++ b/chrome/browser/ui/views/side_panel/read_anything/read_anything_model.h
@@ -11,7 +11,9 @@ #include "base/observer_list.h" #include "base/observer_list_types.h" -#include "chrome/browser/ui/webui/side_panel/read_anything/read_anything.mojom.h" +#include "chrome/common/accessibility/read_anything.mojom.h" +#include "ui/accessibility/ax_node_id_forward.h" +#include "ui/accessibility/ax_tree_update.h" #include "ui/base/models/combobox_model.h" using read_anything::mojom::ContentNodePtr; @@ -55,6 +57,9 @@ public: class Observer : public base::CheckedObserver { public: + virtual void OnAXTreeDistilled( + const ui::AXTreeUpdate& snapshot, + const std::vector<ui::AXNodeID>& content_node_ids) = 0; virtual void OnFontNameUpdated(const std::string& new_font_name) = 0; virtual void OnContentUpdated( const std::vector<ContentNodePtr>& content) = 0; @@ -68,18 +73,25 @@ void AddObserver(Observer* obs); void RemoveObserver(Observer* obs); + void SetDistilledAXTree(ui::AXTreeUpdate snapshot, + std::vector<ui::AXNodeID> content_node_ids); void SetSelectedFontIndex(int new_index); void SetContent(std::vector<ContentNodePtr> content_nodes); ReadAnythingFontModel* GetFontModel() { return font_model_.get(); } private: + void NotifyAXTreeDistilled(); void NotifyFontNameUpdated(); void NotifyContentUpdated(); // State: std::string font_name_; std::vector<ContentNodePtr> content_nodes_; + // TODO(crbug.com/1266555): Use |snapshot_| and |content_node_ids_| to keep + // scrolls in sync. + ui::AXTreeUpdate snapshot_; + std::vector<ui::AXNodeID> content_node_ids_; base::ObserverList<Observer> observers_; const std::unique_ptr<ReadAnythingFontModel> font_model_;
diff --git a/chrome/browser/ui/web_applications/launch_web_app_browsertest.cc b/chrome/browser/ui/web_applications/launch_web_app_browsertest.cc new file mode 100644 index 0000000..f48099b9 --- /dev/null +++ b/chrome/browser/ui/web_applications/launch_web_app_browsertest.cc
@@ -0,0 +1,91 @@ +// Copyright 2022 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. + +#include "base/logging.h" +#include "build/chromeos_buildflags.h" +#include "chrome/app/chrome_command_ids.h" +#include "chrome/browser/renderer_context_menu/render_view_context_menu_test_util.h" +#include "chrome/browser/ui/browser.h" +#include "chrome/browser/ui/browser_finder.h" +#include "chrome/browser/ui/tabs/tab_strip_model.h" +#include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" +#include "chrome/browser/web_applications/test/app_registration_waiter.h" +#include "chrome/test/base/ui_test_utils.h" +#include "content/public/browser/context_menu_params.h" +#include "content/public/browser/notification_service.h" +#include "content/public/browser/web_contents.h" +#include "content/public/test/browser_test.h" +#include "net/test/embedded_test_server/embedded_test_server.h" +#include "url/gurl.h" + +#if BUILDFLAG(IS_CHROMEOS_LACROS) +#include "chrome/browser/lacros/browser_test_util.h" +#include "chromeos/crosapi/mojom/test_controller.mojom.h" +#include "chromeos/lacros/lacros_service.h" +#endif // BUILDFLAG(IS_CHROMEOS_LACROS) + +namespace web_app { + +class LaunchWebAppBrowserTest : public WebAppControllerBrowserTest { + public: + LaunchWebAppBrowserTest() = default; + ~LaunchWebAppBrowserTest() override = default; + + bool IsServiceAvailable() { +#if BUILDFLAG(IS_CHROMEOS_LACROS) + // If ash is does not contain the relevant test controller functionality, + // then there's nothing to do for this test. + if (chromeos::LacrosService::Get()->GetInterfaceVersion( + crosapi::mojom::TestController::Uuid_) < + static_cast<int>(crosapi::mojom::TestController::MethodMinVersions:: + kDoesItemExistInShelfMinVersion)) { + LOG(WARNING) << "Unsupported ash version."; + return false; + } +#endif // BUILDFLAG(IS_CHROMEOS_LACROS) + return true; + } +}; + +IN_PROC_BROWSER_TEST_F(LaunchWebAppBrowserTest, OpenLinkInWebApp) { + if (!IsServiceAvailable()) + return; + + const GURL start_url("https://app.site.test/"); + const AppId app_id = InstallPWA(start_url); + AppRegistrationWaiter(profile(), app_id).Await(); + + size_t num_browsers = chrome::GetBrowserCount(browser()->profile()); + const int num_tabs = browser()->tab_strip_model()->count(); + content::WebContents* initial_tab = + browser()->tab_strip_model()->GetActiveWebContents(); + const GURL initial_url = initial_tab->GetLastCommittedURL(); + ui_test_utils::BrowserChangeObserver browser_change_observer( + /*browser=*/nullptr, + ui_test_utils::BrowserChangeObserver::ChangeType::kAdded); + + { + ui_test_utils::UrlLoadObserver url_observer( + start_url, content::NotificationService::AllSources()); + content::ContextMenuParams params; + params.page_url = GURL("https://www.example.com/"); + params.link_url = start_url; + TestRenderViewContextMenu menu(*initial_tab->GetPrimaryMainFrame(), params); + menu.Init(); + menu.ExecuteCommand(IDC_CONTENT_CONTEXT_OPENLINKBOOKMARKAPP, + 0 /* event_flags */); + url_observer.Wait(); + } + + Browser* const app_browser = browser_change_observer.Wait(); + EXPECT_EQ(num_tabs, browser()->tab_strip_model()->count()); + EXPECT_EQ(++num_browsers, chrome::GetBrowserCount(browser()->profile())); + EXPECT_NE(browser(), app_browser); + EXPECT_EQ(initial_url, initial_tab->GetLastCommittedURL()); + EXPECT_EQ(start_url, app_browser->tab_strip_model() + ->GetActiveWebContents() + ->GetLastCommittedURL()); +} + +} // namespace web_app
diff --git a/chrome/browser/ui/webui/chromeos/emulator/device_emulator_message_handler.cc b/chrome/browser/ui/webui/chromeos/emulator/device_emulator_message_handler.cc index a9e5dd5..970cdd0b 100644 --- a/chrome/browser/ui/webui/chromeos/emulator/device_emulator_message_handler.cc +++ b/chrome/browser/ui/webui/chromeos/emulator/device_emulator_message_handler.cc
@@ -18,7 +18,7 @@ #include "chrome/browser/ash/system/fake_input_device_settings.h" #include "chrome/browser/ash/system/input_device_settings.h" #include "chrome/browser/ui/webui/chromeos/bluetooth_pairing_dialog.h" -#include "chromeos/dbus/audio/fake_cras_audio_client.h" +#include "chromeos/ash/components/dbus/audio/fake_cras_audio_client.h" #include "chromeos/dbus/dbus_thread_manager.h" #include "chromeos/dbus/power/fake_power_manager_client.h" #include "content/public/browser/web_ui.h"
diff --git a/chrome/browser/ui/webui/image_editor/image_editor_ui.cc b/chrome/browser/ui/webui/image_editor/image_editor_ui.cc index 2236b1c..8ca6af2 100644 --- a/chrome/browser/ui/webui/image_editor/image_editor_ui.cc +++ b/chrome/browser/ui/webui/image_editor/image_editor_ui.cc
@@ -4,7 +4,6 @@ #include "chrome/browser/ui/webui/image_editor/image_editor_ui.h" -#include "base/files/file_util.h" #include "base/strings/stringprintf.h" #include "chrome/browser/profiles/profile.h" #include "chrome/common/url_constants.h" @@ -15,7 +14,6 @@ #include "content/public/browser/web_ui.h" #include "content/public/browser/web_ui_data_source.h" #include "content/public/common/url_constants.h" -#include "ui/webui/webui_allowlist.h" namespace image_editor {
diff --git a/chrome/browser/ui/webui/net_internals/net_internals_ui.cc b/chrome/browser/ui/webui/net_internals/net_internals_ui.cc index 30cb878..cd68c70 100644 --- a/chrome/browser/ui/webui/net_internals/net_internals_ui.cc +++ b/chrome/browser/ui/webui/net_internals/net_internals_ui.cc
@@ -41,7 +41,8 @@ source->SetDefaultResource(IDR_NET_INTERNALS_INDEX_HTML); source->OverrideContentSecurityPolicy( network::mojom::CSPDirectiveName::ScriptSrc, - "script-src chrome://resources chrome://test 'self';"); + "script-src chrome://resources chrome://test chrome://webui-test " + "'self';"); source->AddResourcePath("test_loader_util.js", IDR_WEBUI_JS_TEST_LOADER_UTIL_JS); source->DisableTrustedTypesCSP();
diff --git a/chrome/browser/ui/webui/ntp_tiles_internals_ui.cc b/chrome/browser/ui/webui/ntp_tiles_internals_ui.cc index a63a42c..e150190 100644 --- a/chrome/browser/ui/webui/ntp_tiles_internals_ui.cc +++ b/chrome/browser/ui/webui/ntp_tiles_internals_ui.cc
@@ -60,10 +60,6 @@ const std::string& message, base::RepeatingCallback<void(const base::Value::List&)> callback) override; - void RegisterDeprecatedMessageCallback( - const std::string& message, - const base::RepeatingCallback<void(const base::ListValue*)>& callback) - override; void CallJavascriptFunctionVector( const std::string& name, const std::vector<const base::Value*>& values) override; @@ -122,13 +118,6 @@ web_ui()->RegisterMessageCallback(message, std::move(callback)); } -void ChromeNTPTilesInternalsMessageHandlerClient:: - RegisterDeprecatedMessageCallback( - const std::string& message, - const base::RepeatingCallback<void(const base::ListValue*)>& callback) { - web_ui()->RegisterDeprecatedMessageCallback(message, callback); -} - void ChromeNTPTilesInternalsMessageHandlerClient::CallJavascriptFunctionVector( const std::string& name, const std::vector<const base::Value*>& values) {
diff --git a/chrome/browser/ui/webui/side_panel/read_anything/DEPS b/chrome/browser/ui/webui/side_panel/read_anything/DEPS index 18ecc21..4883ab9 100644 --- a/chrome/browser/ui/webui/side_panel/read_anything/DEPS +++ b/chrome/browser/ui/webui/side_panel/read_anything/DEPS
@@ -1,4 +1,5 @@ include_rules = [ "+chrome/browser/ui/views/side_panel/read_anything", - "+chrome/browser/ui/views/frame/browser_view.h" -] \ No newline at end of file + "+chrome/browser/ui/views/frame/browser_view.h", + "+chrome/common/accessibility", +]
diff --git a/chrome/browser/ui/webui/side_panel/read_anything/read_anything_page_handler.cc b/chrome/browser/ui/webui/side_panel/read_anything/read_anything_page_handler.cc index 3e046820..9613cb5 100644 --- a/chrome/browser/ui/webui/side_panel/read_anything/read_anything_page_handler.cc +++ b/chrome/browser/ui/webui/side_panel/read_anything/read_anything_page_handler.cc
@@ -11,6 +11,7 @@ #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_finder.h" #include "chrome/browser/ui/views/side_panel/read_anything/read_anything_controller.h" +#include "ui/accessibility/ax_tree_update.h" ReadAnythingPageHandler::ReadAnythingPageHandler( mojo::PendingRemote<Page> page, @@ -63,6 +64,12 @@ page_->ShowContent(std::move(content_nodes_copy)); } +void ReadAnythingPageHandler::OnAXTreeDistilled( + const ui::AXTreeUpdate& snapshot, + const std::vector<ui::AXNodeID>& content_node_ids) { + page_->OnAXTreeDistilled(snapshot, content_node_ids); +} + void ReadAnythingPageHandler::OnFontNameUpdated( const std::string& new_font_name) { page_->OnFontNameChange(new_font_name);
diff --git a/chrome/browser/ui/webui/side_panel/read_anything/read_anything_page_handler.h b/chrome/browser/ui/webui/side_panel/read_anything/read_anything_page_handler.h index 7b0d97c..4c7dc10 100644 --- a/chrome/browser/ui/webui/side_panel/read_anything/read_anything_page_handler.h +++ b/chrome/browser/ui/webui/side_panel/read_anything/read_anything_page_handler.h
@@ -13,11 +13,13 @@ #include "chrome/browser/ui/views/frame/browser_view.h" #include "chrome/browser/ui/views/side_panel/read_anything/read_anything_coordinator.h" #include "chrome/browser/ui/views/side_panel/read_anything/read_anything_model.h" -#include "chrome/browser/ui/webui/side_panel/read_anything/read_anything.mojom.h" +#include "chrome/common/accessibility/read_anything.mojom.h" #include "mojo/public/cpp/bindings/pending_receiver.h" #include "mojo/public/cpp/bindings/pending_remote.h" #include "mojo/public/cpp/bindings/receiver.h" #include "mojo/public/cpp/bindings/remote.h" +#include "ui/accessibility/ax_node_id_forward.h" +#include "ui/accessibility/ax_tree_update_forward.h" using read_anything::mojom::ContentNodePtr; using read_anything::mojom::Page; @@ -50,6 +52,9 @@ void OnUIReady() override; // ReadAnythingModel::Observer: + void OnAXTreeDistilled( + const ui::AXTreeUpdate& snapshot, + const std::vector<ui::AXNodeID>& content_node_ids) override; void OnFontNameUpdated(const std::string& new_font_name) override; void OnContentUpdated( const std::vector<ContentNodePtr>& content_nodes) override;
diff --git a/chrome/browser/ui/webui/side_panel/read_anything/read_anything_ui.h b/chrome/browser/ui/webui/side_panel/read_anything/read_anything_ui.h index 9375742..a13425a 100644 --- a/chrome/browser/ui/webui/side_panel/read_anything/read_anything_ui.h +++ b/chrome/browser/ui/webui/side_panel/read_anything/read_anything_ui.h
@@ -7,7 +7,7 @@ #include <memory> -#include "chrome/browser/ui/webui/side_panel/read_anything/read_anything.mojom.h" +#include "chrome/common/accessibility/read_anything.mojom.h" #include "mojo/public/cpp/bindings/pending_receiver.h" #include "mojo/public/cpp/bindings/pending_remote.h" #include "mojo/public/cpp/bindings/receiver.h"
diff --git a/chrome/browser/ui/webui/side_panel/reading_list/DEPS b/chrome/browser/ui/webui/side_panel/reading_list/DEPS new file mode 100644 index 0000000..e20eb35f --- /dev/null +++ b/chrome/browser/ui/webui/side_panel/reading_list/DEPS
@@ -0,0 +1,3 @@ +include_rules = [ + "+chrome/common/accessibility", +]
diff --git a/chrome/browser/ui/webui/side_panel/reading_list/reading_list_ui.h b/chrome/browser/ui/webui/side_panel/reading_list/reading_list_ui.h index 3dd23b0d..674f2ee1 100644 --- a/chrome/browser/ui/webui/side_panel/reading_list/reading_list_ui.h +++ b/chrome/browser/ui/webui/side_panel/reading_list/reading_list_ui.h
@@ -8,9 +8,9 @@ #include <memory> #include "chrome/browser/ui/webui/side_panel/bookmarks/bookmarks.mojom.h" -#include "chrome/browser/ui/webui/side_panel/read_anything/read_anything.mojom.h" #include "chrome/browser/ui/webui/side_panel/reading_list/reading_list.mojom.h" #include "chrome/browser/ui/webui/webui_load_timer.h" +#include "chrome/common/accessibility/read_anything.mojom.h" #include "mojo/public/cpp/bindings/pending_receiver.h" #include "mojo/public/cpp/bindings/pending_remote.h" #include "mojo/public/cpp/bindings/receiver.h"
diff --git a/chrome/browser/ui/webui/tab_search/tab_search_page_handler.cc b/chrome/browser/ui/webui/tab_search/tab_search_page_handler.cc index 239fc714..81fee30 100644 --- a/chrome/browser/ui/webui/tab_search/tab_search_page_handler.cc +++ b/chrome/browser/ui/webui/tab_search/tab_search_page_handler.cc
@@ -57,6 +57,21 @@ ui::TimeFormat::FORMAT_ELAPSED, ui::TimeFormat::LENGTH_SHORT, elapsed)); } +// If Tab Group has no timestamp, we find the tab in the tab group with +// the most recent navigation last active time. +base::Time GetTabGroupTimeStamp( + const std::vector<std::unique_ptr<sessions::TabRestoreService::Tab>>& + tabs) { + base::Time last_active_time; + for (const auto& tab : tabs) { + const sessions::SerializedNavigationEntry& entry = + tab->navigations[tab->current_navigation_index]; + if (entry.timestamp() > last_active_time) + last_active_time = entry.timestamp(); + } + return last_active_time; +} + // If a recently closed tab is associated to a group that is no longer // open we create a TabGroup entry with the required fields to support // rendering the tab's associated group information in the UI. @@ -369,12 +384,15 @@ recently_closed_tab_group->title = base::UTF16ToUTF8(tab_group_visual_data->title()); recently_closed_tab_group->tab_count = group->tabs.size(); - recently_closed_tab_group->last_active_time = entry->timestamp; + const base::Time last_active_time = + (entry->timestamp).is_null() ? GetTabGroupTimeStamp(group->tabs) + : entry->timestamp; + recently_closed_tab_group->last_active_time = last_active_time; recently_closed_tab_group->last_active_elapsed_text = - GetLastActiveElapsedText(entry->timestamp); + GetLastActiveElapsedText(last_active_time); for (auto& tab : group->tabs) { - if (AddRecentlyClosedTab(tab.get(), entry->timestamp, + if (AddRecentlyClosedTab(tab.get(), last_active_time, recently_closed_tabs, tab_dedup_keys, tab_group_ids, tab_groups)) { recently_closed_tab_count += 1;
diff --git a/chrome/browser/web_applications/test/test_web_app_url_loader.cc b/chrome/browser/web_applications/test/test_web_app_url_loader.cc index 25f67d4..bb60726 100644 --- a/chrome/browser/web_applications/test/test_web_app_url_loader.cc +++ b/chrome/browser/web_applications/test/test_web_app_url_loader.cc
@@ -53,6 +53,8 @@ content::WebContents* web_contents, UrlComparison url_comparison, ResultCallback callback) { + last_load_url_call_ = {url, web_contents, url_comparison}; + if (should_save_requests_) { pending_requests_.emplace(url, std::move(callback)); return;
diff --git a/chrome/browser/web_applications/test/test_web_app_url_loader.h b/chrome/browser/web_applications/test/test_web_app_url_loader.h index 0d99518..f68e0ab 100644 --- a/chrome/browser/web_applications/test/test_web_app_url_loader.h +++ b/chrome/browser/web_applications/test/test_web_app_url_loader.h
@@ -10,13 +10,21 @@ #include <vector> #include "base/containers/queue.h" +#include "base/memory/raw_ptr.h" #include "chrome/browser/web_applications/web_app_url_loader.h" +#include "third_party/abseil-cpp/absl/types/optional.h" #include "url/gurl.h" namespace web_app { class TestWebAppUrlLoader : public WebAppUrlLoader { public: + struct LoadUrlCall { + GURL url; + base::raw_ptr<content::WebContents> web_contents; + UrlComparison url_comparison; + }; + TestWebAppUrlLoader(); TestWebAppUrlLoader(const TestWebAppUrlLoader&) = delete; TestWebAppUrlLoader& operator=(const TestWebAppUrlLoader&) = delete; @@ -48,6 +56,10 @@ void SetPrepareForLoadResultLoaded(); void AddPrepareForLoadResults(const std::vector<Result>& results); + absl::optional<LoadUrlCall> last_load_url_call() const { + return last_load_url_call_; + } + private: bool should_save_requests_ = false; @@ -63,6 +75,7 @@ std::queue<std::pair<GURL, ResultCallback>> pending_requests_; + absl::optional<LoadUrlCall> last_load_url_call_ = absl::nullopt; }; } // namespace web_app
diff --git a/chrome/build/linux.pgo.txt b/chrome/build/linux.pgo.txt index 2d158cb..9d20cd1 100644 --- a/chrome/build/linux.pgo.txt +++ b/chrome/build/linux.pgo.txt
@@ -1 +1 @@ -chrome-linux-main-1656006882-770b4812ac51fc810aa4a754075de80aeb003049.profdata +chrome-linux-main-1656028705-702b302b60ec01dcdaef25b7de6a0f47efe45929.profdata
diff --git a/chrome/build/mac.pgo.txt b/chrome/build/mac.pgo.txt index 738f1b4..97676d6f 100644 --- a/chrome/build/mac.pgo.txt +++ b/chrome/build/mac.pgo.txt
@@ -1 +1 @@ -chrome-mac-main-1656006882-22bc251c36b8eea2cd35419eeae183790cc056fa.profdata +chrome-mac-main-1656028705-262d9f1fb68ab007552b222f4ff81738057259dd.profdata
diff --git a/chrome/build/win32.pgo.txt b/chrome/build/win32.pgo.txt index 1b8e2d98..c535939 100644 --- a/chrome/build/win32.pgo.txt +++ b/chrome/build/win32.pgo.txt
@@ -1 +1 @@ -chrome-win32-main-1655996214-7aa4a369d12fc0d08c51e088b712d7b3563322ed.profdata +chrome-win32-main-1656017500-8f39b824d1281af3b4666134c0a8c15be51c3b6b.profdata
diff --git a/chrome/build/win64.pgo.txt b/chrome/build/win64.pgo.txt index 3492b74..557a4d6 100644 --- a/chrome/build/win64.pgo.txt +++ b/chrome/build/win64.pgo.txt
@@ -1 +1 @@ -chrome-win64-main-1656006882-048b87c1bd945b18109948ad217dfe049d5905e7.profdata +chrome-win64-main-1656017500-b73f270d663b35730eead36cc01efdf215c6f35d.profdata
diff --git a/chrome/browser/ui/webui/side_panel/read_anything/BUILD.gn b/chrome/common/accessibility/BUILD.gn similarity index 92% rename from chrome/browser/ui/webui/side_panel/read_anything/BUILD.gn rename to chrome/common/accessibility/BUILD.gn index b629fb3e..a046125c 100644 --- a/chrome/browser/ui/webui/side_panel/read_anything/BUILD.gn +++ b/chrome/common/accessibility/BUILD.gn
@@ -11,6 +11,7 @@ webui_module_path = "/" public_deps = [ "//mojo/public/mojom/base", + "//ui/accessibility/mojom", "//url/mojom:url_mojom_gurl", ] }
diff --git a/chrome/common/accessibility/OWNERS b/chrome/common/accessibility/OWNERS new file mode 100644 index 0000000..a5b37dd --- /dev/null +++ b/chrome/common/accessibility/OWNERS
@@ -0,0 +1,4 @@ +file://ui/accessibility/OWNERS + +per-file *.mojom=set noparent +per-file *.mojom=file://ipc/SECURITY_OWNERS
diff --git a/chrome/browser/ui/webui/side_panel/read_anything/read_anything.mojom b/chrome/common/accessibility/read_anything.mojom similarity index 79% rename from chrome/browser/ui/webui/side_panel/read_anything/read_anything.mojom rename to chrome/common/accessibility/read_anything.mojom index 5337d5f..92a2b63 100644 --- a/chrome/browser/ui/webui/side_panel/read_anything/read_anything.mojom +++ b/chrome/common/accessibility/read_anything.mojom
@@ -5,6 +5,7 @@ // A module for a prototype of the Read Anything feature. module read_anything.mojom; +import "ui/accessibility/mojom/ax_tree_update.mojom"; import "url/mojom/url.mojom"; // Used by the WebUI page to bootstrap bidirectional communication. @@ -48,6 +49,13 @@ // of the main article for that web page. ShowContent(array<ContentNode> content_nodes); + // Trigger the frontend to update the current read anything display. Snapshot + // is an accessibility tree snapshot of a web page. Content node ids are node + // ids from that ax tree update, where each node is part of the main article + // for that web page. + OnAXTreeDistilled(ax.mojom.AXTreeUpdate snapshot, + array<int32> content_node_ids); + // Send an updated font name to front end. OnFontNameChange(string new_font_name); };
diff --git a/chrome/common/extensions/api/desktop_capture.json b/chrome/common/extensions/api/desktop_capture.json index 9d99897f..68e2aa7 100644 --- a/chrome/common/extensions/api/desktop_capture.json +++ b/chrome/common/extensions/api/desktop_capture.json
@@ -12,6 +12,12 @@ "type": "string", "enum": ["screen", "window", "tab", "audio"], "description": "Enum used to define set of desktop media sources used in chooseDesktopMedia()." + }, + { + "id": "SystemAudioPreferenceEnum", + "type": "string", + "enum": ["include", "exclude"], + "description": "Mirrors <a href=\"https://w3c.github.io/mediacapture-screen-share/#dom-systemaudiopreferenceenum\">SystemAudioPreferenceEnum</a>." } ], "functions": [ @@ -33,6 +39,20 @@ "description": "Optional tab for which the stream is created. If not specified then the resulting stream can be used only by the calling extension. The stream can only be used by frames in the given tab whose security origin matches <code>tab.url</code>. The tab's origin must be a secure origin, e.g. HTTPS." }, { + "type": "object", + "name": "options", + "optional": true, + "nodoc": true, + "properties": { + "systemAudio": { + "$ref": "SystemAudioPreferenceEnum", + "optional": true, + "description": "Mirrors <a href=\"https://w3c.github.io/mediacapture-screen-share/#dom-displaymediastreamconstraints-systemaudio\">systemAudio</a>." + } + }, + "description": "Mirrors members of <a href=\"https://w3c.github.io/mediacapture-screen-share/#dom-displaymediastreamconstraints\">DisplayMediaStreamConstraints</a> which need to be applied before the user makes their selection, and must therefore be provided to chooseDesktopMedia() rather than be deferred to getUserMedia()." + }, + { "type": "function", "name": "callback", "parameters": [
diff --git a/chrome/renderer/BUILD.gn b/chrome/renderer/BUILD.gn index 3bf8e2e0..431e7f5 100644 --- a/chrome/renderer/BUILD.gn +++ b/chrome/renderer/BUILD.gn
@@ -390,7 +390,10 @@ "searchbox/searchbox_extension.h", ] - deps += [ "//components/crx_file" ] + deps += [ + "//chrome/common/accessibility:mojo_bindings", + "//components/crx_file", + ] } if (is_android) {
diff --git a/chrome/renderer/DEPS b/chrome/renderer/DEPS index cbe667b..6d5f846 100644 --- a/chrome/renderer/DEPS +++ b/chrome/renderer/DEPS
@@ -1,5 +1,6 @@ include_rules = [ "+ash/webui/file_manager/url_constants.h", + "+chrome/common/accessibility", "+chrome/grit", "+chrome/services/speech/buildflags/buildflags.h", "+components/autofill/content/common",
diff --git a/chrome/renderer/accessibility/read_anything_app_controller.cc b/chrome/renderer/accessibility/read_anything_app_controller.cc index 6092174..6fd8c35 100644 --- a/chrome/renderer/accessibility/read_anything_app_controller.cc +++ b/chrome/renderer/accessibility/read_anything_app_controller.cc
@@ -178,7 +178,14 @@ } void ReadAnythingAppController::OnConnected() { - // TODO(abigailbklein): Connect via mojo to browser. + mojo::PendingReceiver<read_anything::mojom::PageHandlerFactory> + page_handler_factory_receiver = + page_handler_factory_.BindNewPipeAndPassReceiver(); + page_handler_factory_->CreatePageHandler( + receiver_.BindNewPipeAndPassRemote(), + page_handler_.BindNewPipeAndPassReceiver()); + render_frame_->GetBrowserInterfaceBroker()->GetInterface( + std::move(page_handler_factory_receiver)); } ui::AXNode* ReadAnythingAppController::GetAXNode(ui::AXNodeID ax_node_id) {
diff --git a/chrome/renderer/accessibility/read_anything_app_controller.h b/chrome/renderer/accessibility/read_anything_app_controller.h index 3abd4f8..f1100b8 100644 --- a/chrome/renderer/accessibility/read_anything_app_controller.h +++ b/chrome/renderer/accessibility/read_anything_app_controller.h
@@ -9,6 +9,7 @@ #include <string> #include <vector> +#include "chrome/common/accessibility/read_anything.mojom.h" #include "gin/wrappable.h" #include "mojo/public/cpp/bindings/receiver.h" #include "mojo/public/cpp/bindings/remote.h" @@ -38,7 +39,8 @@ // lifetime as the render frame. // class ReadAnythingAppController - : public gin::Wrappable<ReadAnythingAppController> { + : public gin::Wrappable<ReadAnythingAppController>, + public read_anything::mojom::Page { public: static gin::WrapperInfo kWrapperInfo; @@ -60,10 +62,13 @@ gin::ObjectTemplateBuilder GetObjectTemplateBuilder( v8::Isolate* isolate) override; - // TODO(abigailbklein): Add these methods to read_anything::mojom::Page. - void OnAXTreeDistilled(const ui::AXTreeUpdate& snapshot, - const std::vector<ui::AXNodeID>& content_node_ids); - void OnFontNameChange(const std::string& new_font_name); + // read_anything::mojom::Page + void ShowContent(std::vector<read_anything::mojom::ContentNodePtr> + content_nodes) override {} + void OnAXTreeDistilled( + const ui::AXTreeUpdate& snapshot, + const std::vector<ui::AXNodeID>& content_node_ids) override; + void OnFontNameChange(const std::string& new_font_name) override; // gin templates: std::vector<ui::AXNodeID> ContentNodeIds(); @@ -81,6 +86,9 @@ ui::AXNode* GetAXNode(ui::AXNodeID ax_node_id); content::RenderFrame* render_frame_; + mojo::Remote<read_anything::mojom::PageHandlerFactory> page_handler_factory_; + mojo::Remote<read_anything::mojom::PageHandler> page_handler_; + mojo::Receiver<read_anything::mojom::Page> receiver_{this}; // State std::unique_ptr<ui::AXTree> tree_;
diff --git a/chrome/renderer/resources/extensions/desktop_capture_custom_bindings.js b/chrome/renderer/resources/extensions/desktop_capture_custom_bindings.js index 883d94dc..329464d 100644 --- a/chrome/renderer/resources/extensions/desktop_capture_custom_bindings.js +++ b/chrome/renderer/resources/extensions/desktop_capture_custom_bindings.js
@@ -20,7 +20,8 @@ } apiFunctions.setHandleRequest('chooseDesktopMedia', - function(sources, target_tab, callback) { + function(sources, target_tab, options, + callback) { // |target_tab| is an optional parameter. if (callback === undefined) { callback = target_tab; @@ -29,7 +30,7 @@ var id = idGenerator.GetNextId(); pendingRequests[id] = callback; bindingUtil.sendRequest('desktopCapture.chooseDesktopMedia', - [id, sources, target_tab, + [id, sources, target_tab, options, $Function.bind(onRequestResult, null, id)], undefined); return id;
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn index 89fbc64..bcd1579 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn
@@ -2348,8 +2348,10 @@ "../browser/accessibility/live_caption_controller_browsertest.cc", "../browser/accessibility/live_caption_speech_recognition_host_browsertest.cc", - # This test is run as part of lacros_chrome_browsertests below. + # These tests also run on Lacros, as part of + # lacros_chrome_browsertests_run_in_series below. "../browser/ui/views/location_bar/intent_chip_button_browsertest.cc", + "../browser/ui/web_applications/launch_web_app_browsertest.cc", # Test not valid on Lacros as WebApps is only enabled in the main # profile which can never be deleted. @@ -4645,6 +4647,7 @@ "../browser/ui/views/location_bar/intent_chip_button_browsertest.cc", "../browser/ui/views/profiles/profile_picker_view_browsertest.cc", "../browser/ui/web_applications/lacros_web_app_browsertest.cc", + "../browser/ui/web_applications/launch_web_app_browsertest.cc", "../browser/ui/web_applications/share_to_target_browsertest.cc", "../browser/web_applications/app_service/lacros_web_apps_controller_lacros_browsertest.cc", ]
diff --git a/chrome/test/data/webui/BUILD.gn b/chrome/test/data/webui/BUILD.gn index 1967a8e0..7fd3091 100644 --- a/chrome/test/data/webui/BUILD.gn +++ b/chrome/test/data/webui/BUILD.gn
@@ -123,7 +123,6 @@ ] deps = [ - "net_internals:preprocess", "//build:branding_buildflags", "//chrome/browser/ui", "//crypto:buildflags", @@ -207,11 +206,7 @@ ] } - data = [ - "$root_gen_dir/chrome/test/data/webui/net_internals/main_test.js", - "$root_gen_dir/chrome/test/data/webui/net_internals/test_util.js", - "$root_gen_dir/ui/webui/resources/js/load_time_data.js", - ] + data = [ "$root_gen_dir/ui/webui/resources/js/load_time_data.js" ] if (is_chromeos_ash || is_win || is_mac) { deps += [ "inline_login:preprocess" ] @@ -424,6 +419,7 @@ "history:build_grdp", "js:build_grdp", "metrics_reporter:build_grdp", + "net_internals:build_grdp", "new_tab_page:build_grdp", "privacy_sandbox:build_grdp", "settings:build_grdp", @@ -440,6 +436,7 @@ "$target_gen_dir/downloads/resources.grdp", "$target_gen_dir/js/resources.grdp", "$target_gen_dir/history/resources.grdp", + "$target_gen_dir/net_internals/resources.grdp", "$target_gen_dir/new_tab_page/resources.grdp", "$target_gen_dir/side_panel/resources.grdp", "$target_gen_dir/metrics_reporter/resources.grdp",
diff --git a/chrome/test/data/webui/chromeos/os_feedback_ui/confirmation_page_test.js b/chrome/test/data/webui/chromeos/os_feedback_ui/confirmation_page_test.js index 9e789fd8..199fb123 100644 --- a/chrome/test/data/webui/chromeos/os_feedback_ui/confirmation_page_test.js +++ b/chrome/test/data/webui/chromeos/os_feedback_ui/confirmation_page_test.js
@@ -21,7 +21,7 @@ const ONLINE_MESSAGE = 'Your feedback helps improve ChromeOS and will be reviewed by ' + 'our team. Because of the large number of reports, we won\’t be able ' + - ' to send a reply.'; + 'to send a reply.'; /** @type {string} */ const OFFLINE_MESSAGE = 'Thanks for the feedback. Your feedback helps improve Chrome OS ' + @@ -86,6 +86,7 @@ assertEquals(ONLINE_TITLE, getElementContent(page, '.page-title')); assertEquals(ONLINE_MESSAGE, getElementContent(page, '#message')); } else { + assertTrue(page.i18nExists('thankYouNoteOnline')); assertEquals(OFFLINE_TITLE, getElementContent(page, '.page-title')); assertTrue(page.i18nExists('thankYouNoteOffline')); assertEquals(OFFLINE_MESSAGE, getElementContent(page, '#message'));
diff --git a/chrome/test/data/webui/chromeos/os_feedback_ui/feedback_flow_test.js b/chrome/test/data/webui/chromeos/os_feedback_ui/feedback_flow_test.js index 74844b0c..8009abd3 100644 --- a/chrome/test/data/webui/chromeos/os_feedback_ui/feedback_flow_test.js +++ b/chrome/test/data/webui/chromeos/os_feedback_ui/feedback_flow_test.js
@@ -5,8 +5,8 @@ import {fakeFeedbackContext, fakePngData, fakeSearchResponse} from 'chrome://os-feedback/fake_data.js'; import {FakeFeedbackServiceProvider} from 'chrome://os-feedback/fake_feedback_service_provider.js'; import {FakeHelpContentProvider} from 'chrome://os-feedback/fake_help_content_provider.js'; -import {FeedbackFlowElement, FeedbackFlowState} from 'chrome://os-feedback/feedback_flow.js'; -import {SendReportStatus} from 'chrome://os-feedback/feedback_types.js'; +import {AdditionalContextQueryParam, FeedbackFlowElement, FeedbackFlowState} from 'chrome://os-feedback/feedback_flow.js'; +import {FeedbackContext, SendReportStatus} from 'chrome://os-feedback/feedback_types.js'; import {setFeedbackServiceProviderForTesting, setHelpContentProviderForTesting} from 'chrome://os-feedback/mojo_interface_provider.js'; import {getDeepActiveElement} from 'chrome://resources/js/util.m.js'; @@ -54,6 +54,16 @@ return flushTasks(); } + /** + * @suppress {visibility} + * @return {?FeedbackContext} + */ + function getFeedbackContext_() { + assertTrue(!!page); + + return page.feedbackContext_; + } + // Test that the search page is shown by default. test('SearchPageIsShownByDefault', async () => { await initializePage(); @@ -329,4 +339,42 @@ await initializePage(); assertEquals(1, feedbackServiceProvider.getFeedbackContextCallCount()); }); + + // Test that the extra diagnostics gets set when query parameter is non-empty. + test( + 'AdditionalContextParametersProvidedInUrl_FeedbackContext_Matches', + async () => { + const queryParams = new URLSearchParams(window.location.search); + const extra_diagnostics = 'some%20extra%20diagnostics'; + queryParams.set( + AdditionalContextQueryParam.EXTRA_DIAGNOSTICS, extra_diagnostics); + // Replace current querystring with the new one. + window.history.replaceState(null, '', '?' + queryParams.toString()); + await initializePage(); + + const feedbackContext = getFeedbackContext_(); + assertEquals(fakeFeedbackContext.pageUrl, feedbackContext.pageUrl); + assertEquals(fakeFeedbackContext.email, feedbackContext.email); + assertEquals( + decodeURIComponent(extra_diagnostics), + feedbackContext.extraDiagnostics); + }); + + // Test that the extra diagnostics gets set when query parameter is empty. + test( + 'AdditionalContextParametersNotProvidedInUrl_FeedbackContext_UsesDefault', + async () => { + // Replace current querystring with the new one. + window.history.replaceState( + null, '', + '?' + + ''); + await initializePage(); + + const feedbackContext = getFeedbackContext_(); + // TODO(ashleydp): Update expectation when page_url passed. + assertEquals(fakeFeedbackContext.pageUrl, feedbackContext.pageUrl); + assertEquals(fakeFeedbackContext.email, feedbackContext.email); + assertEquals('', feedbackContext.extraDiagnostics); + }); }
diff --git a/chrome/test/data/webui/chromeos/os_feedback_ui/share_data_page_test.js b/chrome/test/data/webui/chromeos/os_feedback_ui/share_data_page_test.js index 190c37f..24cbaf72 100644 --- a/chrome/test/data/webui/chromeos/os_feedback_ui/share_data_page_test.js +++ b/chrome/test/data/webui/chromeos/os_feedback_ui/share_data_page_test.js
@@ -7,6 +7,7 @@ import {fakeEmptyFeedbackContext, fakeFeedbackContext} from 'chrome://os-feedback/fake_data.js'; import {FeedbackFlowState} from 'chrome://os-feedback/feedback_flow.js'; +import {FeedbackContext} from 'chrome://os-feedback/feedback_types.js'; import {ShareDataPageElement} from 'chrome://os-feedback/share_data_page.js'; import {mojoString16ToString, stringToMojoString16} from 'chrome://resources/ash/common/mojo_utils.js'; import {flush} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; @@ -146,7 +147,6 @@ 'give us to help address technical issues and to improve our ' + 'services, subject to our Privacy Policy and Terms of Service.', getElementContent('#privacyNote')); - }); // Test that the email drop down is populated with two options. @@ -472,4 +472,33 @@ assertFalse(consentCheckbox.checked); assertTrue(consentLabel.classList.contains(disabledInputClass)); }); + + /** + * Test that when feedback context contains extra_diagnostics matching value + * is set on report. + */ + test('AdditionalContext_ExtraDiagnostics', async () => { + await initializePage(); + page.feedbackContext = fakeFeedbackContext; + + const reportWithoutExtraDiagnostics = (await clickSendAndWait(page)).report; + assertFalse( + !!reportWithoutExtraDiagnostics.feedbackContext.extraDiagnostics); + + page.reEnableSendReportButton(); + const fakeFeedbackContextWithExtraDiagnostics = + /** @type {!FeedbackContext} */ ({extraDiagnostics: 'some extra info'}); + page.feedbackContext = fakeFeedbackContextWithExtraDiagnostics; + await flushTasks(); + + const reportWithExtraDiagnostics = (await clickSendAndWait(page)).report; + assertEquals( + fakeFeedbackContextWithExtraDiagnostics.extraDiagnostics, + reportWithExtraDiagnostics.feedbackContext.extraDiagnostics); + + getElement('#sysInfoCheckbox').checked = false; + page.reEnableSendReportButton(); + const reportNoSysInfo = (await clickSendAndWait(page)).report; + assertFalse(!!reportNoSysInfo.feedbackContext.extraDiagnostics); + }); }
diff --git a/chrome/test/data/webui/cr_components/chromeos/network/sim_lock_dialogs_test.js b/chrome/test/data/webui/cr_components/chromeos/network/sim_lock_dialogs_test.js index 98ad402..2819e34b 100644 --- a/chrome/test/data/webui/cr_components/chromeos/network/sim_lock_dialogs_test.js +++ b/chrome/test/data/webui/cr_components/chromeos/network/sim_lock_dialogs_test.js
@@ -68,6 +68,12 @@ simLockStatus: {lockEnabled: true, lockType: 'sim-pin', retriesLeft: 3} }; verifyDialogShown('unlockPinDialog', deviceState); + assertFalse(!!simLockDialog.$$(`#adminSubtitle`)); + simLockDialog.globalPolicy = { + allowCellularSimLock: false, + }; + await flushAsync(); + assertTrue(!!simLockDialog.$$(`#adminSubtitle`)); }); test('Show Unlock PUK dialog', async function() {
diff --git a/chrome/test/data/webui/net_internals/BUILD.gn b/chrome/test/data/webui/net_internals/BUILD.gn index 962ac3e..7d3b068 100644 --- a/chrome/test/data/webui/net_internals/BUILD.gn +++ b/chrome/test/data/webui/net_internals/BUILD.gn
@@ -3,12 +3,39 @@ # found in the LICENSE file. import("//tools/grit/preprocess_if_expr.gni") +import("//ui/webui/resources/tools/generate_grd.gni") + +preprocessed_files = [ + "main_test.js", + "test_util.js", +] + +non_preprocessed_files = [ + "dns_view_test.js", + "domain_security_policy_view_test.js", + "task_queue.js", +] + +copy("copy") { + sources = non_preprocessed_files + outputs = [ "$target_gen_dir/{{source_target_relative}}" ] +} preprocess_if_expr("preprocess") { - in_folder = "./" - out_folder = "$target_gen_dir" - in_files = [ - "main_test.js", - "test_util.js", + in_folder = "." + out_folder = target_gen_dir + in_files = preprocessed_files +} + +generate_grd("build_grdp") { + grd_prefix = "webui_net_internals" + out_grd = "$target_gen_dir/resources.grdp" + + deps = [ + ":copy", + ":preprocess", ] + input_files = preprocessed_files + non_preprocessed_files + input_files_base_dir = rebase_path(target_gen_dir, root_build_dir) + resource_path_prefix = "net_internals" }
diff --git a/chrome/test/data/webui/net_internals/net_internals_browsertest.js b/chrome/test/data/webui/net_internals/net_internals_browsertest.js index dc711eb..b02ac60a 100644 --- a/chrome/test/data/webui/net_internals/net_internals_browsertest.js +++ b/chrome/test/data/webui/net_internals/net_internals_browsertest.js
@@ -58,7 +58,7 @@ __proto__: NetInternalsBrowserTest.prototype, browsePreload: - 'chrome://net-internals/index.html?module=net_internals/dns_view_test.js&host=test', + 'chrome://net-internals/index.html?module=net_internals/dns_view_test.js', }; TEST_F('NetInternalsDnsViewTest', 'ClearCache', function() { @@ -75,7 +75,7 @@ __proto__: NetInternalsBrowserTest.prototype, browsePreload: - 'chrome://net-internals/index.html?module=net_internals/main_test.js&host=test', + 'chrome://net-internals/index.html?module=net_internals/main_test.js', }; TEST_F('NetInternalsMainTest', 'TabVisibility', function() { @@ -87,7 +87,7 @@ __proto__: NetInternalsBrowserTest.prototype, browsePreload: - 'chrome://net-internals/index.html?module=net_internals/domain_security_policy_view_test.js&host=test', + 'chrome://net-internals/index.html?module=net_internals/domain_security_policy_view_test.js', get suiteName() { return domain_security_policy_view_test.suiteName;
diff --git a/chromecast/android/lint-baseline.xml b/chromecast/android/lint-baseline.xml index f8366467..0e8bc82 100644 --- a/chromecast/android/lint-baseline.xml +++ b/chromecast/android/lint-baseline.xml
@@ -1,20 +1,55 @@ -<?xml version='1.0' encoding='utf-8'?> -<issues format="6" by="lint 7.1.0" type="baseline" client="" dependencies="true" name="" variant="all" version="7.1.0"> +<?xml version="1.0" encoding="UTF-8"?> +<issues format="6" by="lint 7.4.0-alpha05" type="baseline" client="" dependencies="true" name="" variant="all" version="7.4.0-alpha05"> - <issue id="MissingVersion" message="Should set `android:versionCode` to specify the application version" errorLine1="<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.chromium.chromecast.shell">" errorLine2=" ~~~~~~~~"> - <location file="gen/chromecast/cast_shell_apk__lint/gen/cast_shell_manifest/AndroidManifest.xml" /> + <issue + id="LintError" + message="../../chromecast/android/lint-baseline.xml (relative to /usr/local/google/home/wnwen/z1/src/out/Cast) does not exist" + errorLine1=" <baseline file="../../chromecast/android/lint-baseline.xml"/>" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="project.xml" + line="5" + column="3"/> </issue> - <issue id="MissingVersion" message="Should set `android:versionName` to specify the application version" errorLine1="<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.chromium.chromecast.shell">" errorLine2=" ~~~~~~~~"> - <location file="gen/chromecast/cast_shell_apk__lint/gen/cast_shell_manifest/AndroidManifest.xml" /> + <issue + id="MissingVersion" + message="Should set `android:versionCode` to specify the application version" + errorLine1="<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.chromium.chromecast.shell">" + errorLine2=" ~~~~~~~~"> + <location + file="gen/chromecast/cast_shell_apk__lint/gen/cast_shell_manifest/AndroidManifest.xml" + line="2" + column="2"/> </issue> - <issue id="Overdraw" message="Possible overdraw: Root element paints background `#FFFFFF` with a theme that also paints a background (inferred theme is `@style/CastShellTheme`)" errorLine1=" android:background="#FFFFFF"" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="chromecast/browser/android/apk/res/layout/cast_web_contents_activity.xml" /> + <issue + id="MissingVersion" + message="Should set `android:versionName` to specify the application version" + errorLine1="<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.chromium.chromecast.shell">" + errorLine2=" ~~~~~~~~"> + <location + file="gen/chromecast/cast_shell_apk__lint/gen/cast_shell_manifest/AndroidManifest.xml" + line="2" + column="2"/> </issue> - <issue id="RtlEnabled" message="The project references RTL attributes, but does not explicitly enable or disable RTL support with `android:supportsRtl` in the manifest"> - <location file="gen/chromecast/cast_shell_apk__lint/gen/cast_shell_manifest/AndroidManifest.xml" /> + <issue + id="Overdraw" + message="Possible overdraw: Root element paints background `#FFFFFF` with a theme that also paints a background (inferred theme is `@style/CastShellTheme`)" + errorLine1=" android:background="#FFFFFF"" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/chromecast/browser/android/apk/res/layout/cast_web_contents_activity.xml" + line="12" + column="5"/> </issue> -</issues> \ No newline at end of file + <issue + id="RtlEnabled" + message="The project references RTL attributes, but does not explicitly enable or disable RTL support with `android:supportsRtl` in the manifest"> + <location + file="gen/chromecast/cast_shell_apk__lint/gen/cast_shell_manifest/AndroidManifest.xml"/> + </issue> + +</issues>
diff --git a/chromeos/ash/components/dbus/BUILD.gn b/chromeos/ash/components/dbus/BUILD.gn index ce218ec8..93f9e7d 100644 --- a/chromeos/ash/components/dbus/BUILD.gn +++ b/chromeos/ash/components/dbus/BUILD.gn
@@ -14,6 +14,7 @@ "//ash/components/tpm:test_support", "//base", "//base/test:test_support", + "//chromeos/ash/components/dbus/audio", "//chromeos/ash/components/dbus/authpolicy", "//chromeos/ash/components/dbus/authpolicy:authpolicy_proto", "//chromeos/ash/components/dbus/biod:test_support", @@ -35,6 +36,7 @@ [ "//chromeos/ash/components/dbus/chromebox_for_meetings:unit_tests" ] } sources = [ + "audio/cras_audio_client_unittest.cc", "authpolicy/fake_authpolicy_client_unittest.cc", "biod/biod_client_unittest.cc", "biod/fake_biod_client_unittest.cc",
diff --git a/chromeos/dbus/audio/BUILD.gn b/chromeos/ash/components/dbus/audio/BUILD.gn similarity index 76% rename from chromeos/dbus/audio/BUILD.gn rename to chromeos/ash/components/dbus/audio/BUILD.gn index dc32ebaf..19c55010 100644 --- a/chromeos/dbus/audio/BUILD.gn +++ b/chromeos/ash/components/dbus/audio/BUILD.gn
@@ -2,10 +2,12 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -assert(is_chromeos, "Non-Chrome-OS builds cannot depend on //chromeos") +import("//build/config/chromeos/ui_mode.gni") + +assert(is_chromeos_ash, "Non-Chrome-OS builds cannot depend on //chromeos/ash") component("audio") { - output_name = "chromeos_dbus_audio" + output_name = "ash_dbus_audio" defines = [ "IS_DBUS_AUDIO_IMPL" ]
diff --git a/chromeos/dbus/audio/OWNERS b/chromeos/ash/components/dbus/audio/OWNERS similarity index 100% rename from chromeos/dbus/audio/OWNERS rename to chromeos/ash/components/dbus/audio/OWNERS
diff --git a/chromeos/dbus/audio/audio_node.cc b/chromeos/ash/components/dbus/audio/audio_node.cc similarity index 96% rename from chromeos/dbus/audio/audio_node.cc rename to chromeos/ash/components/dbus/audio/audio_node.cc index 5c2b535d..6a7fdc1 100644 --- a/chromeos/dbus/audio/audio_node.cc +++ b/chromeos/ash/components/dbus/audio/audio_node.cc
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chromeos/dbus/audio/audio_node.h" +#include "chromeos/ash/components/dbus/audio/audio_node.h" #include <stdint.h> @@ -12,7 +12,7 @@ #include "base/strings/stringprintf.h" #include "third_party/cros_system_api/dbus/service_constants.h" -namespace chromeos { +namespace ash { AudioNode::AudioNode() = default; @@ -78,4 +78,4 @@ return has_v2_stable_device_id ? stable_device_id_v2 : stable_device_id_v1; } -} // namespace chromeos +} // namespace ash
diff --git a/chromeos/dbus/audio/audio_node.h b/chromeos/ash/components/dbus/audio/audio_node.h similarity index 82% rename from chromeos/dbus/audio/audio_node.h rename to chromeos/ash/components/dbus/audio/audio_node.h index 67bee27..f1cf8a8 100644 --- a/chromeos/dbus/audio/audio_node.h +++ b/chromeos/ash/components/dbus/audio/audio_node.h
@@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROMEOS_DBUS_AUDIO_AUDIO_NODE_H_ -#define CHROMEOS_DBUS_AUDIO_AUDIO_NODE_H_ +#ifndef CHROMEOS_ASH_COMPONENTS_DBUS_AUDIO_AUDIO_NODE_H_ +#define CHROMEOS_ASH_COMPONENTS_DBUS_AUDIO_AUDIO_NODE_H_ #include <stdint.h> @@ -12,7 +12,7 @@ #include "base/component_export.h" -namespace chromeos { +namespace ash { // Structure to hold AudioNode data received from cras. struct COMPONENT_EXPORT(DBUS_AUDIO) AudioNode { @@ -55,6 +55,11 @@ typedef std::vector<AudioNode> AudioNodeList; -} // namespace chromeos +} // namespace ash -#endif // CHROMEOS_DBUS_AUDIO_AUDIO_NODE_H_ +// TODO(https://crbug.com/1164001): remove when the migration is finished. +namespace chromeos { +using ::ash::AudioNode; +} + +#endif // CHROMEOS_ASH_COMPONENTS_DBUS_AUDIO_AUDIO_NODE_H_
diff --git a/chromeos/dbus/audio/cras_audio_client.cc b/chromeos/ash/components/dbus/audio/cras_audio_client.cc similarity index 99% rename from chromeos/dbus/audio/cras_audio_client.cc rename to chromeos/ash/components/dbus/audio/cras_audio_client.cc index 4d55c87c..ad8e14b 100644 --- a/chromeos/dbus/audio/cras_audio_client.cc +++ b/chromeos/ash/components/dbus/audio/cras_audio_client.cc
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chromeos/dbus/audio/cras_audio_client.h" +#include "chromeos/ash/components/dbus/audio/cras_audio_client.h" #include <stdint.h> @@ -12,14 +12,14 @@ #include "base/callback_helpers.h" #include "base/format_macros.h" #include "base/logging.h" -#include "chromeos/dbus/audio/fake_cras_audio_client.h" +#include "chromeos/ash/components/dbus/audio/fake_cras_audio_client.h" #include "dbus/bus.h" #include "dbus/message.h" #include "dbus/object_path.h" #include "dbus/object_proxy.h" #include "third_party/cros_system_api/dbus/service_constants.h" -namespace chromeos { +namespace ash { namespace { @@ -1147,4 +1147,4 @@ return g_instance; } -} // namespace chromeos +} // namespace ash
diff --git a/chromeos/dbus/audio/cras_audio_client.h b/chromeos/ash/components/dbus/audio/cras_audio_client.h similarity index 95% rename from chromeos/dbus/audio/cras_audio_client.h rename to chromeos/ash/components/dbus/audio/cras_audio_client.h index 8b1af01..59f2919 100644 --- a/chromeos/dbus/audio/cras_audio_client.h +++ b/chromeos/ash/components/dbus/audio/cras_audio_client.h
@@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROMEOS_DBUS_AUDIO_CRAS_AUDIO_CLIENT_H_ -#define CHROMEOS_DBUS_AUDIO_CRAS_AUDIO_CLIENT_H_ +#ifndef CHROMEOS_ASH_COMPONENTS_DBUS_AUDIO_CRAS_AUDIO_CLIENT_H_ +#define CHROMEOS_ASH_COMPONENTS_DBUS_AUDIO_CRAS_AUDIO_CLIENT_H_ #include <stdint.h> @@ -14,8 +14,8 @@ #include "base/callback.h" #include "base/component_export.h" #include "base/containers/flat_map.h" -#include "chromeos/dbus/audio/audio_node.h" -#include "chromeos/dbus/audio/volume_state.h" +#include "chromeos/ash/components/dbus/audio/audio_node.h" +#include "chromeos/ash/components/dbus/audio/volume_state.h" #include "chromeos/dbus/common/dbus_method_call_status.h" #include "third_party/cros_system_api/dbus/service_constants.h" @@ -23,7 +23,7 @@ class Bus; } -namespace chromeos { +namespace ash { // CrasAudioClient is used to communicate with the cras audio dbus interface. class COMPONENT_EXPORT(DBUS_AUDIO) CrasAudioClient { @@ -243,12 +243,11 @@ virtual ~CrasAudioClient(); }; -} // namespace chromeos +} // namespace ash -// TODO(https://crbug.com/1164001): remove after the //chrome/browser/chromeos -// source migration is finished. -namespace ash { -using ::chromeos::CrasAudioClient; +// TODO(https://crbug.com/1164001): remove when the migration is finished. +namespace chromeos { +using ::ash::CrasAudioClient; } -#endif // CHROMEOS_DBUS_AUDIO_CRAS_AUDIO_CLIENT_H_ +#endif // CHROMEOS_ASH_COMPONENTS_DBUS_AUDIO_CRAS_AUDIO_CLIENT_H_
diff --git a/chromeos/dbus/audio/cras_audio_client_unittest.cc b/chromeos/ash/components/dbus/audio/cras_audio_client_unittest.cc similarity index 99% rename from chromeos/dbus/audio/cras_audio_client_unittest.cc rename to chromeos/ash/components/dbus/audio/cras_audio_client_unittest.cc index 9beb717e..21e82b0 100644 --- a/chromeos/dbus/audio/cras_audio_client_unittest.cc +++ b/chromeos/ash/components/dbus/audio/cras_audio_client_unittest.cc
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chromeos/dbus/audio/cras_audio_client.h" +#include "chromeos/ash/components/dbus/audio/cras_audio_client.h" #include <memory> #include <string> @@ -24,7 +24,7 @@ using ::testing::Invoke; using ::testing::Return; -namespace chromeos { +namespace ash { namespace { @@ -1454,4 +1454,4 @@ base::RunLoop().RunUntilIdle(); } -} // namespace chromeos +} // namespace ash
diff --git a/chromeos/dbus/audio/fake_cras_audio_client.cc b/chromeos/ash/components/dbus/audio/fake_cras_audio_client.cc similarity index 98% rename from chromeos/dbus/audio/fake_cras_audio_client.cc rename to chromeos/ash/components/dbus/audio/fake_cras_audio_client.cc index 05bdc6f2..7197ef6 100644 --- a/chromeos/dbus/audio/fake_cras_audio_client.cc +++ b/chromeos/ash/components/dbus/audio/fake_cras_audio_client.cc
@@ -2,13 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chromeos/dbus/audio/fake_cras_audio_client.h" +#include "chromeos/ash/components/dbus/audio/fake_cras_audio_client.h" #include <utility> #include "base/logging.h" -namespace chromeos { +namespace ash { namespace { @@ -379,4 +379,4 @@ [node_id](const AudioNode& node) { return node_id == node.id; }); } -} // namespace chromeos +} // namespace ash
diff --git a/chromeos/dbus/audio/fake_cras_audio_client.h b/chromeos/ash/components/dbus/audio/fake_cras_audio_client.h similarity index 93% rename from chromeos/dbus/audio/fake_cras_audio_client.h rename to chromeos/ash/components/dbus/audio/fake_cras_audio_client.h index 3cf2105..715b1d2 100644 --- a/chromeos/dbus/audio/fake_cras_audio_client.h +++ b/chromeos/ash/components/dbus/audio/fake_cras_audio_client.h
@@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROMEOS_DBUS_AUDIO_FAKE_CRAS_AUDIO_CLIENT_H_ -#define CHROMEOS_DBUS_AUDIO_FAKE_CRAS_AUDIO_CLIENT_H_ +#ifndef CHROMEOS_ASH_COMPONENTS_DBUS_AUDIO_FAKE_CRAS_AUDIO_CLIENT_H_ +#define CHROMEOS_ASH_COMPONENTS_DBUS_AUDIO_FAKE_CRAS_AUDIO_CLIENT_H_ #include <stdint.h> @@ -11,9 +11,9 @@ #include "base/component_export.h" #include "base/observer_list.h" -#include "chromeos/dbus/audio/cras_audio_client.h" +#include "chromeos/ash/components/dbus/audio/cras_audio_client.h" -namespace chromeos { +namespace ash { // The CrasAudioClient implementation used on Linux desktop. class COMPONENT_EXPORT(DBUS_AUDIO) FakeCrasAudioClient @@ -146,6 +146,11 @@ base::ObserverList<Observer>::Unchecked observers_; }; -} // namespace chromeos +} // namespace ash -#endif // CHROMEOS_DBUS_AUDIO_FAKE_CRAS_AUDIO_CLIENT_H_ +// TODO(https://crbug.com/1164001): remove when the migration is finished. +namespace chromeos { +using ::ash::FakeCrasAudioClient; +} + +#endif // CHROMEOS_ASH_COMPONENTS_DBUS_AUDIO_FAKE_CRAS_AUDIO_CLIENT_H_
diff --git a/chromeos/dbus/audio/volume_state.cc b/chromeos/ash/components/dbus/audio/volume_state.cc similarity index 90% rename from chromeos/dbus/audio/volume_state.cc rename to chromeos/ash/components/dbus/audio/volume_state.cc index 78a2211..d7a1946c 100644 --- a/chromeos/dbus/audio/volume_state.cc +++ b/chromeos/ash/components/dbus/audio/volume_state.cc
@@ -2,12 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chromeos/dbus/audio/volume_state.h" +#include "chromeos/ash/components/dbus/audio/volume_state.h" #include "base/format_macros.h" #include "base/strings/stringprintf.h" -namespace chromeos { +namespace ash { VolumeState::VolumeState() : output_volume(0), @@ -29,4 +29,4 @@ return result; } -} // namespace chromeos +} // namespace ash
diff --git a/chromeos/dbus/audio/volume_state.h b/chromeos/ash/components/dbus/audio/volume_state.h similarity index 68% rename from chromeos/dbus/audio/volume_state.h rename to chromeos/ash/components/dbus/audio/volume_state.h index 7b7ca4e..2e863ce 100644 --- a/chromeos/dbus/audio/volume_state.h +++ b/chromeos/ash/components/dbus/audio/volume_state.h
@@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROMEOS_DBUS_AUDIO_VOLUME_STATE_H_ -#define CHROMEOS_DBUS_AUDIO_VOLUME_STATE_H_ +#ifndef CHROMEOS_ASH_COMPONENTS_DBUS_AUDIO_VOLUME_STATE_H_ +#define CHROMEOS_ASH_COMPONENTS_DBUS_AUDIO_VOLUME_STATE_H_ #include <stdint.h> @@ -11,7 +11,7 @@ #include "base/component_export.h" -namespace chromeos { +namespace ash { struct COMPONENT_EXPORT(DBUS_AUDIO) VolumeState { int32_t output_volume; @@ -24,6 +24,6 @@ std::string ToString() const; }; -} // namespace chromeos +} // namespace ash -#endif // CHROMEOS_DBUS_AUDIO_VOLUME_STATE_H_ +#endif // CHROMEOS_ASH_COMPONENTS_DBUS_AUDIO_VOLUME_STATE_H_
diff --git a/chromeos/ash/components/dbus/userdataauth/arc_quota_client.cc b/chromeos/ash/components/dbus/userdataauth/arc_quota_client.cc index dfa80ca..5afd3869 100644 --- a/chromeos/ash/components/dbus/userdataauth/arc_quota_client.cc +++ b/chromeos/ash/components/dbus/userdataauth/arc_quota_client.cc
@@ -21,7 +21,7 @@ #include "dbus/object_proxy.h" #include "third_party/cros_system_api/dbus/cryptohome/dbus-constants.h" -namespace chromeos { +namespace ash { namespace { // The default timeout for all method call within ArcQuota interface. @@ -211,4 +211,4 @@ return g_instance; } -} // namespace chromeos +} // namespace ash
diff --git a/chromeos/ash/components/dbus/userdataauth/arc_quota_client.h b/chromeos/ash/components/dbus/userdataauth/arc_quota_client.h index 0e9066d..b5a0cdf 100644 --- a/chromeos/ash/components/dbus/userdataauth/arc_quota_client.h +++ b/chromeos/ash/components/dbus/userdataauth/arc_quota_client.h
@@ -16,7 +16,7 @@ class Bus; } -namespace chromeos { +namespace ash { // ArcQuotaClient is used to communicate with the org.chromium.ArcQuota // interface within org.chromium.UserDataAuth service exposed by cryptohomed. @@ -88,11 +88,6 @@ virtual ~ArcQuotaClient(); }; -} // namespace chromeos - -// TODO(https://crbug.com/1164001): remove when moved to ash. -namespace ash { -using ::chromeos::ArcQuotaClient; } // namespace ash #endif // CHROMEOS_ASH_COMPONENTS_DBUS_USERDATAAUTH_ARC_QUOTA_CLIENT_H_
diff --git a/chromeos/ash/components/dbus/userdataauth/arc_quota_client_unittest.cc b/chromeos/ash/components/dbus/userdataauth/arc_quota_client_unittest.cc index 7be010565..7527211 100644 --- a/chromeos/ash/components/dbus/userdataauth/arc_quota_client_unittest.cc +++ b/chromeos/ash/components/dbus/userdataauth/arc_quota_client_unittest.cc
@@ -22,7 +22,7 @@ using ::testing::Return; using ::testing::SaveArg; -namespace chromeos { +namespace ash { namespace { @@ -232,4 +232,4 @@ ProtobufEquals(result_reply.value(), expected_set_project_id_reply_)); } -} // namespace chromeos +} // namespace ash
diff --git a/chromeos/ash/components/dbus/userdataauth/cryptohome_misc_client.cc b/chromeos/ash/components/dbus/userdataauth/cryptohome_misc_client.cc index 0b682578..794d5eb 100644 --- a/chromeos/ash/components/dbus/userdataauth/cryptohome_misc_client.cc +++ b/chromeos/ash/components/dbus/userdataauth/cryptohome_misc_client.cc
@@ -22,7 +22,7 @@ #include "dbus/object_proxy.h" #include "third_party/cros_system_api/dbus/cryptohome/dbus-constants.h" -namespace chromeos { +namespace ash { namespace { // The default timeout for all method call within CryptohomeMisc interface. @@ -67,7 +67,7 @@ ::user_data_auth::kUserDataAuthServiceName, dbus::ObjectPath(::user_data_auth::kUserDataAuthServicePath)); blocking_method_caller_ = - std::make_unique<BlockingMethodCaller>(bus, proxy_); + std::make_unique<chromeos::BlockingMethodCaller>(bus, proxy_); } // CryptohomeMiscClient override: @@ -224,7 +224,7 @@ dbus::ObjectProxy* proxy_ = nullptr; // For making blocking dbus calls. - std::unique_ptr<BlockingMethodCaller> blocking_method_caller_; + std::unique_ptr<chromeos::BlockingMethodCaller> blocking_method_caller_; base::WeakPtrFactory<CryptohomeMiscClientImpl> weak_factory_{this}; }; @@ -265,4 +265,4 @@ return g_instance; } -} // namespace chromeos +} // namespace ash
diff --git a/chromeos/ash/components/dbus/userdataauth/cryptohome_misc_client.h b/chromeos/ash/components/dbus/userdataauth/cryptohome_misc_client.h index 5bedbe68..31e5ade 100644 --- a/chromeos/ash/components/dbus/userdataauth/cryptohome_misc_client.h +++ b/chromeos/ash/components/dbus/userdataauth/cryptohome_misc_client.h
@@ -17,7 +17,7 @@ class Bus; } -namespace chromeos { +namespace ash { // CryptohomeMiscClient is used to communicate with the // org.chromium.CryptohomeMisc interface within org.chromium.UserDataAuth @@ -100,12 +100,6 @@ virtual ~CryptohomeMiscClient(); }; -} // namespace chromeos - -// TODO(https://crbug.com/1164001): remove after the //chrome/browser/chromeos -// source code migration is finished. -namespace ash { -using ::chromeos::CryptohomeMiscClient; -} +} // namespace ash #endif // CHROMEOS_ASH_COMPONENTS_DBUS_USERDATAAUTH_CRYPTOHOME_MISC_CLIENT_H_
diff --git a/chromeos/ash/components/dbus/userdataauth/cryptohome_misc_client_unittest.cc b/chromeos/ash/components/dbus/userdataauth/cryptohome_misc_client_unittest.cc index fd9be23..60650b7 100644 --- a/chromeos/ash/components/dbus/userdataauth/cryptohome_misc_client_unittest.cc +++ b/chromeos/ash/components/dbus/userdataauth/cryptohome_misc_client_unittest.cc
@@ -22,7 +22,7 @@ using ::testing::Return; using ::testing::SaveArg; -namespace chromeos { +namespace ash { namespace { @@ -339,4 +339,4 @@ EXPECT_EQ(result_reply, absl::nullopt); } -} // namespace chromeos +} // namespace ash
diff --git a/chromeos/ash/components/dbus/userdataauth/cryptohome_pkcs11_client.cc b/chromeos/ash/components/dbus/userdataauth/cryptohome_pkcs11_client.cc index 78ea64c..e5b9a326 100644 --- a/chromeos/ash/components/dbus/userdataauth/cryptohome_pkcs11_client.cc +++ b/chromeos/ash/components/dbus/userdataauth/cryptohome_pkcs11_client.cc
@@ -21,7 +21,7 @@ #include "dbus/object_proxy.h" #include "third_party/cros_system_api/dbus/cryptohome/dbus-constants.h" -namespace chromeos { +namespace ash { namespace { // The default timeout for all method call within CryptohomePkcs11 interface. @@ -191,4 +191,4 @@ return g_instance; } -} // namespace chromeos +} // namespace ash
diff --git a/chromeos/ash/components/dbus/userdataauth/cryptohome_pkcs11_client.h b/chromeos/ash/components/dbus/userdataauth/cryptohome_pkcs11_client.h index 524fc494..b4b1ef4 100644 --- a/chromeos/ash/components/dbus/userdataauth/cryptohome_pkcs11_client.h +++ b/chromeos/ash/components/dbus/userdataauth/cryptohome_pkcs11_client.h
@@ -16,7 +16,7 @@ class Bus; } -namespace chromeos { +namespace ash { // CryptohomePkcs11Client is used to communicate with the // org.chromium.CryptohomePkcs11 interface within org.chromium.UserDataAuth @@ -67,11 +67,11 @@ virtual ~CryptohomePkcs11Client(); }; -} // namespace chromeos - -// TODO(https://crbug.com/1164001): remove when moved to ash. -namespace ash { -using ::chromeos::CryptohomePkcs11Client; } // namespace ash +// TODO(https://crbug.com/1164001): remove when the migration is finished. +namespace chromeos { +using ::ash::CryptohomePkcs11Client; +} + #endif // CHROMEOS_ASH_COMPONENTS_DBUS_USERDATAAUTH_CRYPTOHOME_PKCS11_CLIENT_H_
diff --git a/chromeos/ash/components/dbus/userdataauth/cryptohome_pkcs11_client_unittest.cc b/chromeos/ash/components/dbus/userdataauth/cryptohome_pkcs11_client_unittest.cc index 64eaf16..08ece422 100644 --- a/chromeos/ash/components/dbus/userdataauth/cryptohome_pkcs11_client_unittest.cc +++ b/chromeos/ash/components/dbus/userdataauth/cryptohome_pkcs11_client_unittest.cc
@@ -22,7 +22,7 @@ using ::testing::Return; using ::testing::SaveArg; -namespace chromeos { +namespace ash { namespace { @@ -179,4 +179,4 @@ expected_pkcs11_get_tpm_token_info_reply_)); } -} // namespace chromeos +} // namespace ash
diff --git a/chromeos/ash/components/dbus/userdataauth/fake_arc_quota_client.cc b/chromeos/ash/components/dbus/userdataauth/fake_arc_quota_client.cc index 1490b10..89124dc 100644 --- a/chromeos/ash/components/dbus/userdataauth/fake_arc_quota_client.cc +++ b/chromeos/ash/components/dbus/userdataauth/fake_arc_quota_client.cc
@@ -8,7 +8,7 @@ #include "base/notreached.h" #include "base/threading/thread_task_runner_handle.h" -namespace chromeos { +namespace ash { namespace { // Used to track the fake instance, mirrors the instance in the base class. @@ -89,4 +89,4 @@ std::move(callback).Run(false); } -} // namespace chromeos +} // namespace ash
diff --git a/chromeos/ash/components/dbus/userdataauth/fake_arc_quota_client.h b/chromeos/ash/components/dbus/userdataauth/fake_arc_quota_client.h index b466295..ff24140 100644 --- a/chromeos/ash/components/dbus/userdataauth/fake_arc_quota_client.h +++ b/chromeos/ash/components/dbus/userdataauth/fake_arc_quota_client.h
@@ -10,7 +10,7 @@ #include "base/component_export.h" #include "chromeos/dbus/cryptohome/UserDataAuth.pb.h" -namespace chromeos { +namespace ash { class COMPONENT_EXPORT(USERDATAAUTH_CLIENT) FakeArcQuotaClient : public ArcQuotaClient { @@ -69,6 +69,6 @@ pending_wait_for_service_to_be_available_callbacks_; }; -} // namespace chromeos +} // namespace ash #endif // CHROMEOS_ASH_COMPONENTS_DBUS_USERDATAAUTH_FAKE_ARC_QUOTA_CLIENT_H_
diff --git a/chromeos/ash/components/dbus/userdataauth/fake_cryptohome_misc_client.cc b/chromeos/ash/components/dbus/userdataauth/fake_cryptohome_misc_client.cc index 629b98b..3d3b99e 100644 --- a/chromeos/ash/components/dbus/userdataauth/fake_cryptohome_misc_client.cc +++ b/chromeos/ash/components/dbus/userdataauth/fake_cryptohome_misc_client.cc
@@ -9,7 +9,7 @@ #include "base/threading/thread_task_runner_handle.h" #include "chromeos/ash/components/dbus/userdataauth/userdataauth_client.h" -namespace chromeos { +namespace ash { namespace { // Used to track the fake instance, mirrors the instance in the base class. @@ -154,4 +154,4 @@ kStubSystemSalt + std::size(kStubSystemSalt) - 1); } -} // namespace chromeos +} // namespace ash
diff --git a/chromeos/ash/components/dbus/userdataauth/fake_cryptohome_misc_client.h b/chromeos/ash/components/dbus/userdataauth/fake_cryptohome_misc_client.h index 10ae7a4..d25464bd 100644 --- a/chromeos/ash/components/dbus/userdataauth/fake_cryptohome_misc_client.h +++ b/chromeos/ash/components/dbus/userdataauth/fake_cryptohome_misc_client.h
@@ -10,7 +10,7 @@ #include "base/component_export.h" #include "chromeos/dbus/cryptohome/UserDataAuth.pb.h" -namespace chromeos { +namespace ash { class COMPONENT_EXPORT(USERDATAAUTH_CLIENT) FakeCryptohomeMiscClient : public CryptohomeMiscClient { @@ -129,12 +129,6 @@ pending_wait_for_service_to_be_available_callbacks_; }; -} // namespace chromeos - -// TODO(https://crbug.com/1164001): remove after the //chrome/browser/chromeos -// source migration is finished. -namespace ash { -using ::chromeos::FakeCryptohomeMiscClient; -} +} // namespace ash #endif // CHROMEOS_ASH_COMPONENTS_DBUS_USERDATAAUTH_FAKE_CRYPTOHOME_MISC_CLIENT_H_
diff --git a/chromeos/ash/components/dbus/userdataauth/fake_cryptohome_pkcs11_client.cc b/chromeos/ash/components/dbus/userdataauth/fake_cryptohome_pkcs11_client.cc index 4e2eaf9..750733a4d 100644 --- a/chromeos/ash/components/dbus/userdataauth/fake_cryptohome_pkcs11_client.cc +++ b/chromeos/ash/components/dbus/userdataauth/fake_cryptohome_pkcs11_client.cc
@@ -8,7 +8,7 @@ #include "base/notreached.h" #include "base/threading/thread_task_runner_handle.h" -namespace chromeos { +namespace ash { namespace { // Used to track the fake instance, mirrors the instance in the base class. @@ -86,4 +86,4 @@ std::move(callback).Run(false); } -} // namespace chromeos +} // namespace ash
diff --git a/chromeos/ash/components/dbus/userdataauth/fake_cryptohome_pkcs11_client.h b/chromeos/ash/components/dbus/userdataauth/fake_cryptohome_pkcs11_client.h index 7d7efd1..1d035ae 100644 --- a/chromeos/ash/components/dbus/userdataauth/fake_cryptohome_pkcs11_client.h +++ b/chromeos/ash/components/dbus/userdataauth/fake_cryptohome_pkcs11_client.h
@@ -10,7 +10,7 @@ #include "base/component_export.h" #include "chromeos/dbus/cryptohome/UserDataAuth.pb.h" -namespace chromeos { +namespace ash { class COMPONENT_EXPORT(USERDATAAUTH_CLIENT) FakeCryptohomePkcs11Client : public CryptohomePkcs11Client { @@ -63,6 +63,6 @@ pending_wait_for_service_to_be_available_callbacks_; }; -} // namespace chromeos +} // namespace ash #endif // CHROMEOS_ASH_COMPONENTS_DBUS_USERDATAAUTH_FAKE_CRYPTOHOME_PKCS11_CLIENT_H_
diff --git a/chromeos/ash/components/dbus/userdataauth/fake_install_attributes_client.cc b/chromeos/ash/components/dbus/userdataauth/fake_install_attributes_client.cc index 0c78ae6..0a0da910 100644 --- a/chromeos/ash/components/dbus/userdataauth/fake_install_attributes_client.cc +++ b/chromeos/ash/components/dbus/userdataauth/fake_install_attributes_client.cc
@@ -16,7 +16,7 @@ #include "chromeos/dbus/cryptohome/rpc.pb.h" #include "components/policy/proto/install_attributes.pb.h" -namespace chromeos { +namespace ash { namespace { @@ -226,4 +226,4 @@ return true; } -} // namespace chromeos +} // namespace ash
diff --git a/chromeos/ash/components/dbus/userdataauth/fake_install_attributes_client.h b/chromeos/ash/components/dbus/userdataauth/fake_install_attributes_client.h index 744f67c..efe1076 100644 --- a/chromeos/ash/components/dbus/userdataauth/fake_install_attributes_client.h +++ b/chromeos/ash/components/dbus/userdataauth/fake_install_attributes_client.h
@@ -10,7 +10,7 @@ #include "base/component_export.h" #include "chromeos/dbus/cryptohome/UserDataAuth.pb.h" -namespace chromeos { +namespace ash { class COMPONENT_EXPORT(USERDATAAUTH_CLIENT) FakeInstallAttributesClient : public InstallAttributesClient { @@ -119,12 +119,6 @@ pending_wait_for_service_to_be_available_callbacks_; }; -} // namespace chromeos - -// TODO(https://crbug.com/1164001): remove after the //chrome/browser/chromeos -// source migration is finished. -namespace ash { -using ::chromeos::FakeInstallAttributesClient; -} +} // namespace ash #endif // CHROMEOS_ASH_COMPONENTS_DBUS_USERDATAAUTH_FAKE_INSTALL_ATTRIBUTES_CLIENT_H_
diff --git a/chromeos/ash/components/dbus/userdataauth/fake_userdataauth_client.cc b/chromeos/ash/components/dbus/userdataauth/fake_userdataauth_client.cc index 82c483a..5411505 100644 --- a/chromeos/ash/components/dbus/userdataauth/fake_userdataauth_client.cc +++ b/chromeos/ash/components/dbus/userdataauth/fake_userdataauth_client.cc
@@ -22,7 +22,7 @@ #include "chromeos/dbus/cryptohome/rpc.pb.h" #include "third_party/abseil-cpp/absl/types/variant.h" -namespace chromeos { +namespace ash { namespace { @@ -950,4 +950,4 @@ DCHECK(was_inserted) << "User already exists: " << account_id.account_id(); } -} // namespace chromeos +} // namespace ash
diff --git a/chromeos/ash/components/dbus/userdataauth/fake_userdataauth_client.h b/chromeos/ash/components/dbus/userdataauth/fake_userdataauth_client.h index 4492a2f..148e9b8 100644 --- a/chromeos/ash/components/dbus/userdataauth/fake_userdataauth_client.h +++ b/chromeos/ash/components/dbus/userdataauth/fake_userdataauth_client.h
@@ -19,7 +19,7 @@ #include "chromeos/dbus/cryptohome/UserDataAuth.pb.h" #include "chromeos/dbus/cryptohome/account_identifier_operators.h" -namespace chromeos { +namespace ash { class COMPONENT_EXPORT(USERDATAAUTH_CLIENT) FakeUserDataAuthClient : public UserDataAuthClient { @@ -400,12 +400,11 @@ base::ObserverList<Observer> observer_list_; }; -} // namespace chromeos +} // namespace ash -// TODO(https://crbug.com/1164001): remove after the //chrome/browser/chromeos -// source migration is finished. -namespace ash { -using ::chromeos::FakeUserDataAuthClient; +// TODO(https://crbug.com/1164001): remove when the migration is finished. +namespace chromeos { +using ::ash::FakeUserDataAuthClient; } #endif // CHROMEOS_ASH_COMPONENTS_DBUS_USERDATAAUTH_FAKE_USERDATAAUTH_CLIENT_H_
diff --git a/chromeos/ash/components/dbus/userdataauth/install_attributes_client.cc b/chromeos/ash/components/dbus/userdataauth/install_attributes_client.cc index 2daa8e1d..3a0bce6 100644 --- a/chromeos/ash/components/dbus/userdataauth/install_attributes_client.cc +++ b/chromeos/ash/components/dbus/userdataauth/install_attributes_client.cc
@@ -22,7 +22,7 @@ #include "dbus/object_proxy.h" #include "third_party/cros_system_api/dbus/cryptohome/dbus-constants.h" -namespace chromeos { +namespace ash { namespace { // The default timeout for all method call within InstallAttributes interface. @@ -68,7 +68,7 @@ ::user_data_auth::kUserDataAuthServiceName, dbus::ObjectPath(::user_data_auth::kUserDataAuthServicePath)); blocking_method_caller_ = - std::make_unique<BlockingMethodCaller>(bus, proxy_); + std::make_unique<chromeos::BlockingMethodCaller>(bus, proxy_); } // InstallAttributesClient override: @@ -259,7 +259,7 @@ dbus::ObjectProxy* proxy_ = nullptr; // For making blocking dbus calls. - std::unique_ptr<BlockingMethodCaller> blocking_method_caller_; + std::unique_ptr<chromeos::BlockingMethodCaller> blocking_method_caller_; base::WeakPtrFactory<InstallAttributesClientImpl> weak_factory_{this}; }; @@ -300,4 +300,4 @@ return g_instance; } -} // namespace chromeos +} // namespace ash
diff --git a/chromeos/ash/components/dbus/userdataauth/install_attributes_client.h b/chromeos/ash/components/dbus/userdataauth/install_attributes_client.h index 5b7668f1..72927e2 100644 --- a/chromeos/ash/components/dbus/userdataauth/install_attributes_client.h +++ b/chromeos/ash/components/dbus/userdataauth/install_attributes_client.h
@@ -17,7 +17,7 @@ class Bus; } -namespace chromeos { +namespace ash { // InstallAttributesClient is used to communicate with the // org.chromium.InstallAttributes interface within org.chromium.UserDataAuth @@ -117,12 +117,6 @@ virtual ~InstallAttributesClient(); }; -} // namespace chromeos - -// TODO(https://crbug.com/1164001): remove after the //chrome/browser/chromeos -// source migration is finished. -namespace ash { -using ::chromeos::InstallAttributesClient; -} +} // namespace ash #endif // CHROMEOS_ASH_COMPONENTS_DBUS_USERDATAAUTH_INSTALL_ATTRIBUTES_CLIENT_H_
diff --git a/chromeos/ash/components/dbus/userdataauth/install_attributes_client_unittest.cc b/chromeos/ash/components/dbus/userdataauth/install_attributes_client_unittest.cc index ba1fe26..62bc4ad9 100644 --- a/chromeos/ash/components/dbus/userdataauth/install_attributes_client_unittest.cc +++ b/chromeos/ash/components/dbus/userdataauth/install_attributes_client_unittest.cc
@@ -22,7 +22,7 @@ using ::testing::Return; using ::testing::SaveArg; -namespace chromeos { +namespace ash { namespace { @@ -429,4 +429,4 @@ expected_blocking_install_attributes_get_status_reply_)); } -} // namespace chromeos +} // namespace ash
diff --git a/chromeos/ash/components/dbus/userdataauth/install_attributes_util.cc b/chromeos/ash/components/dbus/userdataauth/install_attributes_util.cc index a8851ce..865b388 100644 --- a/chromeos/ash/components/dbus/userdataauth/install_attributes_util.cc +++ b/chromeos/ash/components/dbus/userdataauth/install_attributes_util.cc
@@ -12,8 +12,7 @@ #include "chromeos/ash/components/dbus/userdataauth/install_attributes_client.h" #include "third_party/abseil-cpp/absl/types/optional.h" -namespace chromeos { -namespace install_attributes_util { +namespace ash::install_attributes_util { bool InstallAttributesGet(const std::string& name, std::string* value) { ::user_data_auth::InstallAttributesGetRequest request; @@ -91,5 +90,4 @@ return state == user_data_auth::InstallAttributesState::FIRST_INSTALL; } -} // namespace install_attributes_util -} // namespace chromeos +} // namespace ash::install_attributes_util
diff --git a/chromeos/ash/components/dbus/userdataauth/install_attributes_util.h b/chromeos/ash/components/dbus/userdataauth/install_attributes_util.h index a157a82..f8316c1 100644 --- a/chromeos/ash/components/dbus/userdataauth/install_attributes_util.h +++ b/chromeos/ash/components/dbus/userdataauth/install_attributes_util.h
@@ -10,14 +10,12 @@ #include "base/component_export.h" #include "chromeos/ash/components/dbus/userdataauth/install_attributes_client.h" -namespace chromeos { +namespace ash::install_attributes_util { // Wrappers for calls to InstallAttributesClient. Must be called from the UI // thread. NOTE: Some of these make blocking DBus calls which will spin until // the DBus call completes. They should be avoided if possible. -namespace install_attributes_util { - // Blocking calls to InstallAttributesClient methods. COMPONENT_EXPORT(USERDATAAUTH_CLIENT) bool InstallAttributesGet(const std::string& name, std::string* value); @@ -29,16 +27,6 @@ COMPONENT_EXPORT(USERDATAAUTH_CLIENT) bool InstallAttributesIsInvalid(); COMPONENT_EXPORT(USERDATAAUTH_CLIENT) bool InstallAttributesIsFirstInstall(); -} // namespace install_attributes_util -} // namespace chromeos - -// TODO(https://crbug.com/1164001): remove after the migration is finished. -namespace ash::install_attributes_util { -using ::chromeos::install_attributes_util::InstallAttributesFinalize; -using ::chromeos::install_attributes_util::InstallAttributesGet; -using ::chromeos::install_attributes_util::InstallAttributesIsFirstInstall; -using ::chromeos::install_attributes_util::InstallAttributesIsInvalid; -using ::chromeos::install_attributes_util::InstallAttributesSet; } // namespace ash::install_attributes_util #endif // CHROMEOS_ASH_COMPONENTS_DBUS_USERDATAAUTH_INSTALL_ATTRIBUTES_UTIL_H_
diff --git a/chromeos/ash/components/dbus/userdataauth/mock_userdataauth_client.cc b/chromeos/ash/components/dbus/userdataauth/mock_userdataauth_client.cc index fa0df208..e2c86470 100644 --- a/chromeos/ash/components/dbus/userdataauth/mock_userdataauth_client.cc +++ b/chromeos/ash/components/dbus/userdataauth/mock_userdataauth_client.cc
@@ -8,7 +8,7 @@ #include "base/notreached.h" -namespace chromeos { +namespace ash { MockUserDataAuthClient::MockUserDataAuthClient() {} MockUserDataAuthClient::~MockUserDataAuthClient() = default; @@ -26,4 +26,4 @@ NOTIMPLEMENTED(); } -} // namespace chromeos +} // namespace ash
diff --git a/chromeos/ash/components/dbus/userdataauth/mock_userdataauth_client.h b/chromeos/ash/components/dbus/userdataauth/mock_userdataauth_client.h index a95e340..4e7b4b1 100644 --- a/chromeos/ash/components/dbus/userdataauth/mock_userdataauth_client.h +++ b/chromeos/ash/components/dbus/userdataauth/mock_userdataauth_client.h
@@ -10,7 +10,7 @@ #include "base/component_export.h" #include "testing/gmock/include/gmock/gmock.h" -namespace chromeos { +namespace ash { class COMPONENT_EXPORT(USERDATAAUTH_CLIENT) MockUserDataAuthClient : public UserDataAuthClient { @@ -182,12 +182,6 @@ (override)); }; -} // namespace chromeos - -// TODO(https://crbug.com/1164001): remove after the //chrome/browser/chromeos -// source migration is finished. -namespace ash { -using ::chromeos::UserDataAuthClient; -} +} // namespace ash #endif // CHROMEOS_ASH_COMPONENTS_DBUS_USERDATAAUTH_MOCK_USERDATAAUTH_CLIENT_H_
diff --git a/chromeos/ash/components/dbus/userdataauth/userdataauth_client.cc b/chromeos/ash/components/dbus/userdataauth/userdataauth_client.cc index dc5b77ca..63f33b9 100644 --- a/chromeos/ash/components/dbus/userdataauth/userdataauth_client.cc +++ b/chromeos/ash/components/dbus/userdataauth/userdataauth_client.cc
@@ -20,7 +20,7 @@ #include "dbus/object_proxy.h" #include "third_party/cros_system_api/dbus/cryptohome/dbus-constants.h" -namespace chromeos { +namespace ash { namespace { // This suffix is appended to cryptohome_id to get hash in stub implementation: @@ -485,4 +485,4 @@ return id.account_id() + kUserIdStubHashSuffix; } -} // namespace chromeos +} // namespace ash
diff --git a/chromeos/ash/components/dbus/userdataauth/userdataauth_client.h b/chromeos/ash/components/dbus/userdataauth/userdataauth_client.h index b3ace823..89e572d 100644 --- a/chromeos/ash/components/dbus/userdataauth/userdataauth_client.h +++ b/chromeos/ash/components/dbus/userdataauth/userdataauth_client.h
@@ -16,7 +16,7 @@ class Bus; } -namespace chromeos { +namespace ash { // UserDataAuthClient is used to communicate with the org.chromium.UserDataAuth // service exposed by cryptohomed. All method should be called from the origin @@ -293,12 +293,11 @@ virtual ~UserDataAuthClient(); }; -} // namespace chromeos +} // namespace ash -// TODO(https://crbug.com/1164001): remove after the //chrome/browser/chromeos -// source migration is finished. -namespace ash { -using ::chromeos::UserDataAuthClient; +// TODO(https://crbug.com/1164001): remove when the migration is finished. +namespace chromeos { +using ::ash::UserDataAuthClient; } #endif // CHROMEOS_ASH_COMPONENTS_DBUS_USERDATAAUTH_USERDATAAUTH_CLIENT_H_
diff --git a/chromeos/ash/components/dbus/userdataauth/userdataauth_client_unittest.cc b/chromeos/ash/components/dbus/userdataauth/userdataauth_client_unittest.cc index 6862347..0cef48b 100644 --- a/chromeos/ash/components/dbus/userdataauth/userdataauth_client_unittest.cc +++ b/chromeos/ash/components/dbus/userdataauth/userdataauth_client_unittest.cc
@@ -21,7 +21,7 @@ using ::testing::Return; using ::testing::SaveArg; -namespace chromeos { +namespace ash { namespace { @@ -600,4 +600,4 @@ EXPECT_EQ(observer.dircrypto_progress_count(), 2); } -} // namespace chromeos +} // namespace ash
diff --git a/chromeos/ash/services/assistant/BUILD.gn b/chromeos/ash/services/assistant/BUILD.gn index 288ce647..5e22c5b 100644 --- a/chromeos/ash/services/assistant/BUILD.gn +++ b/chromeos/ash/services/assistant/BUILD.gn
@@ -106,9 +106,9 @@ "//base/test:test_support", "//chromeos/ash/components/assistant:buildflags", "//chromeos/ash/components/assistant/test_support", + "//chromeos/ash/components/dbus/audio", "//chromeos/ash/services/assistant/public/cpp", "//chromeos/dbus:test_support", - "//chromeos/dbus/audio", "//chromeos/dbus/power", "//chromeos/services/assistant/public/mojom", "//chromeos/services/libassistant/public/mojom",
diff --git a/chromeos/ash/services/assistant/platform/audio_devices_unittest.cc b/chromeos/ash/services/assistant/platform/audio_devices_unittest.cc index 970002a5..804cf002 100644 --- a/chromeos/ash/services/assistant/platform/audio_devices_unittest.cc +++ b/chromeos/ash/services/assistant/platform/audio_devices_unittest.cc
@@ -9,8 +9,8 @@ #include "base/run_loop.h" #include "base/test/scoped_feature_list.h" #include "base/test/task_environment.h" +#include "chromeos/ash/components/dbus/audio/fake_cras_audio_client.h" #include "chromeos/ash/services/assistant/public/cpp/features.h" -#include "chromeos/dbus/audio/fake_cras_audio_client.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h"
diff --git a/chromeos/chromeos_strings.grd b/chromeos/chromeos_strings.grd index d42898e..948572b1 100644 --- a/chromeos/chromeos_strings.grd +++ b/chromeos/chromeos_strings.grd
@@ -3447,6 +3447,9 @@ <message name="IDS_FEEDBACK_TOOL_THANK_YOU_NOTE_OFFLINE" desc="Thank you note when feedback tool is offline"> Thanks for the feedback. Your feedback helps improve Chrome OS and will be reviewed by the Chrome OS team. Because of the number of reports submitted, you won’t receive a direct reply. </message> + <message name="IDS_FEEDBACK_TOOL_THANK_YOU_NOTE_ONLINE" desc="Thank you note when feedback tool is online"> + Your feedback helps improve ChromeOS and will be reviewed by our team. Because of the large number of reports, we won’t be able to send a reply. + </message> <message name="IDS_FEEDBACK_TOOL_RESOURCES_EXPLORE_APP_DESCRIPTION" desc="Description of the explore app that links to some resourses like help articals and new features of Chromebook."> Find help articles and answers to common Chromebook questions </message>
diff --git a/chromeos/chromeos_strings_grd/IDS_FEEDBACK_TOOL_THANK_YOU_NOTE_ONLINE.png.sha1 b/chromeos/chromeos_strings_grd/IDS_FEEDBACK_TOOL_THANK_YOU_NOTE_ONLINE.png.sha1 new file mode 100644 index 0000000..76d8c78 --- /dev/null +++ b/chromeos/chromeos_strings_grd/IDS_FEEDBACK_TOOL_THANK_YOU_NOTE_ONLINE.png.sha1
@@ -0,0 +1 @@ +aa712245b2f0bb83af659f9d0a2e59cb3e447ed0 \ No newline at end of file
diff --git a/chromeos/dbus/BUILD.gn b/chromeos/dbus/BUILD.gn index 90f9b6ae..6fe75ec0 100644 --- a/chromeos/dbus/BUILD.gn +++ b/chromeos/dbus/BUILD.gn
@@ -90,7 +90,6 @@ ":test_support", "//base", "//base/test:test_support", - "//chromeos/dbus/audio", "//chromeos/dbus/cec_service:unit_tests", "//chromeos/dbus/cros_disks:unit_tests", "//chromeos/dbus/cryptohome", @@ -118,7 +117,6 @@ "//third_party/icu", ] sources = [ - "audio/cras_audio_client_unittest.cc", "blocking_method_caller_unittest.cc", "dbus_thread_manager_unittest.cc", "native_timer_unittest.cc",
diff --git a/chromeos/tast_control.gni b/chromeos/tast_control.gni index 4c3c0ca..f6affbd 100644 --- a/chromeos/tast_control.gni +++ b/chromeos/tast_control.gni
@@ -312,6 +312,10 @@ "crostini.AppGeditFilesharing", "crostini.AppGeditFilesharing.stable", + # http://b/236710501 + "crostini.AppAndroidStudio.stable", + "crostini.AppGeditUnshareFolder.stable", + # http://crbug.com/1338038 "arc.IMEBlockingVK", @@ -323,6 +327,9 @@ # http://crbug.com/1338201 "ui.ChromeCrashLoggedIn.gpu_process_breakpad", + + # http://crbug.com/1309278 + "policy.ChromeOsLockOnIdleSuspend", ] # To create filters to be used on specific builders add them like this:
diff --git a/components/autofill/content/renderer/form_autofill_util.cc b/components/autofill/content/renderer/form_autofill_util.cc index ffb53d4..28a2c71 100644 --- a/components/autofill/content/renderer/form_autofill_util.cc +++ b/components/autofill/content/renderer/form_autofill_util.cc
@@ -1846,7 +1846,7 @@ return element.IsFocusable(); } -bool IsWebElementVisible(blink::WebElement element) { +bool IsWebElementVisible(const blink::WebElement& element) { auto HasMinSize = [](auto size) { constexpr int kMinPixelSize = 10; return size.width() >= kMinPixelSize && size.height() >= kMinPixelSize;
diff --git a/components/autofill/content/renderer/form_autofill_util.h b/components/autofill/content/renderer/form_autofill_util.h index c9ae9cee..414795a3 100644 --- a/components/autofill/content/renderer/form_autofill_util.h +++ b/components/autofill/content/renderer/form_autofill_util.h
@@ -194,7 +194,7 @@ // Exposed for testing purposes. // // TODO(crbug.com/1335257): Can input fields or iframes actually overflow? -bool IsWebElementVisible(blink::WebElement element); +bool IsWebElementVisible(const blink::WebElement& element); // Returns the form's |name| attribute if non-empty; otherwise the form's |id| // attribute.
diff --git a/components/autofill/core/browser/autofill_client.cc b/components/autofill/core/browser/autofill_client.cc index 1bb339f..48cedb25 100644 --- a/components/autofill/core/browser/autofill_client.cc +++ b/components/autofill/core/browser/autofill_client.cc
@@ -149,6 +149,7 @@ } void AutofillClient::ShowAutofillProgressDialog( + AutofillProgressDialogType autofill_progress_dialog_type, base::OnceClosure cancel_callback) { // This is overridden by platform subclasses. Currently only // ChromeAutofillClient (Chrome Desktop & Android) implements this.
diff --git a/components/autofill/core/browser/autofill_client.h b/components/autofill/core/browser/autofill_client.h index 9cf6676..1c331c9 100644 --- a/components/autofill/core/browser/autofill_client.h +++ b/components/autofill/core/browser/autofill_client.h
@@ -66,6 +66,7 @@ class AutocompleteHistoryManager; class AutofillOfferManager; class AutofillPopupDelegate; +enum class AutofillProgressDialogType; struct CardUnmaskChallengeOption; class CardUnmaskDelegate; class CreditCard; @@ -661,7 +662,9 @@ // Show/dismiss the progress dialog which contains a throbber and a text // message indicating that something is in progress. - virtual void ShowAutofillProgressDialog(base::OnceClosure cancel_callback); + virtual void ShowAutofillProgressDialog( + AutofillProgressDialogType autofill_progress_dialog_type, + base::OnceClosure cancel_callback); virtual void CloseAutofillProgressDialog( bool show_confirmation_before_closing);
diff --git a/components/autofill/core/browser/autofill_progress_dialog_type.h b/components/autofill/core/browser/autofill_progress_dialog_type.h new file mode 100644 index 0000000..4b622ac --- /dev/null +++ b/components/autofill/core/browser/autofill_progress_dialog_type.h
@@ -0,0 +1,23 @@ +// Copyright 2022 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. + +#ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_PROGRESS_DIALOG_TYPE_H_ +#define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_PROGRESS_DIALOG_TYPE_H_ + +namespace autofill { + +// The type of autofill progress dialog to show. +enum class AutofillProgressDialogType { + // Unspecified progress dialog type. + kUnspecified = 0, + // Used when authenticating with FIDO. + // This progress dialog type applies to Android only. + kAndroidFIDOProgressDialog = 1, + // Used when unmasking virtual cards. + kVirtualCardUnmaskProgressDialog = 2 +}; + +} // namespace autofill + +#endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_PROGRESS_DIALOG_TYPE_H_
diff --git a/components/autofill/core/browser/payments/credit_card_access_manager.cc b/components/autofill/core/browser/payments/credit_card_access_manager.cc index ba148d0..25bb859 100644 --- a/components/autofill/core/browser/payments/credit_card_access_manager.cc +++ b/components/autofill/core/browser/payments/credit_card_access_manager.cc
@@ -21,6 +21,7 @@ #include "build/build_config.h" #include "components/autofill/core/browser/autofill_client.h" #include "components/autofill/core/browser/autofill_driver.h" +#include "components/autofill/core/browser/autofill_progress_dialog_type.h" #include "components/autofill/core/browser/browser_autofill_manager.h" #include "components/autofill/core/browser/data_model/credit_card.h" #include "components/autofill/core/browser/metrics/form_events/credit_card_form_event_logger.h" @@ -636,7 +637,15 @@ #if !BUILDFLAG(IS_IOS) void CreditCardAccessManager::OnFIDOAuthenticationComplete( const CreditCardFIDOAuthenticator::FidoAuthenticationResponse& response) { -#if !BUILDFLAG(IS_ANDROID) +#if BUILDFLAG(IS_ANDROID) + if (base::FeatureList::IsEnabled( + features::kAutofillEnableFIDOProgressDialog)) { + // Close the progress dialog when the authentication for getting the full + // card completes. + client_->CloseAutofillProgressDialog( + /*show_confirmation_before_closing=*/true); + } +#else // Close the Webauthn verify pending dialog. If FIDO authentication succeeded, // card is filled to the form, otherwise fall back to CVC authentication which // does not need the verify pending dialog either. @@ -969,6 +978,7 @@ void CreditCardAccessManager::FetchVirtualCard() { is_authentication_in_progress_ = true; client_->ShowAutofillProgressDialog( + AutofillProgressDialogType::kVirtualCardUnmaskProgressDialog, base::BindOnce(&CreditCardAccessManager::OnVirtualCardUnmaskCancelled, weak_ptr_factory_.GetWeakPtr()));
diff --git a/components/autofill/core/browser/payments/credit_card_fido_authenticator.cc b/components/autofill/core/browser/payments/credit_card_fido_authenticator.cc index 9043fc6..ab3aa271 100644 --- a/components/autofill/core/browser/payments/credit_card_fido_authenticator.cc +++ b/components/autofill/core/browser/payments/credit_card_fido_authenticator.cc
@@ -21,6 +21,7 @@ #include "build/build_config.h" #include "components/autofill/core/browser/autofill_client.h" #include "components/autofill/core/browser/autofill_experiments.h" +#include "components/autofill/core/browser/autofill_progress_dialog_type.h" #include "components/autofill/core/browser/data_model/credit_card.h" #include "components/autofill/core/browser/metrics/autofill_metrics.h" #include "components/autofill/core/browser/payments/fido_authentication_strike_database.h" @@ -440,6 +441,18 @@ autofill_client_->GetLastCommittedURL().DeprecatedGetOriginAsURL(); } +#if BUILDFLAG(IS_ANDROID) + if (base::FeatureList::IsEnabled( + features::kAutofillEnableFIDOProgressDialog)) { + // Open the progress dialog when authenticating and getting the full card + // from FIDO. + autofill_client_->ShowAutofillProgressDialog( + AutofillProgressDialogType::kAndroidFIDOProgressDialog, + base::BindOnce(&CreditCardFIDOAuthenticator::CancelVerification, + weak_ptr_factory_.GetWeakPtr())); + } +#endif + full_card_request_->GetFullCardViaFIDO( *card_, AutofillClient::UnmaskCardReason::kAutofill, weak_ptr_factory_.GetWeakPtr(), std::move(response),
diff --git a/components/autofill/core/common/autofill_payments_features.cc b/components/autofill/core/common/autofill_payments_features.cc index 9470cfb3..6ae16f36 100644 --- a/components/autofill/core/common/autofill_payments_features.cc +++ b/components/autofill/core/common/autofill_payments_features.cc
@@ -62,6 +62,12 @@ "AutofillEnableGetDetailsForEnrollParsingInUploadCardResponse", base::FEATURE_ENABLED_BY_DEFAULT}; +// When enabled, a progress dialog will display while authenticating with FIDO. +// TODO(crbug.com/1337380): Clean up kAutofillEnableFIDOProgressDialog when it's +// fully rolled out. +const base::Feature kAutofillEnableFIDOProgressDialog{ + "AutofillEnableFIDOProgressDialog", base::FEATURE_DISABLED_BY_DEFAULT}; + // When enabled, enable manual falling component for virtual cards on Android. const base::Feature kAutofillEnableManualFallbackForVirtualCards{ "AutofillEnableManualFallbackForVirtualCards",
diff --git a/components/autofill/core/common/autofill_payments_features.h b/components/autofill/core/common/autofill_payments_features.h index 96a9677..ad8ec51 100644 --- a/components/autofill/core/common/autofill_payments_features.h +++ b/components/autofill/core/common/autofill_payments_features.h
@@ -23,6 +23,7 @@ extern const base::Feature kAutofillCreditCardUploadFeedback; extern const base::Feature kAutofillEnableGetDetailsForEnrollParsingInUploadCardResponse; +extern const base::Feature kAutofillEnableFIDOProgressDialog; extern const base::Feature kAutofillEnableManualFallbackForVirtualCards; extern const base::Feature kAutofillEnableOfferNotificationForPromoCodes; extern const base::Feature kAutofillEnableOffersInClankKeyboardAccessory;
diff --git a/components/autofill_payments_strings.grdp b/components/autofill_payments_strings.grdp index 6950ecba..f36aac2 100644 --- a/components/autofill_payments_strings.grdp +++ b/components/autofill_payments_strings.grdp
@@ -414,6 +414,9 @@ <message name="IDS_AUTOFILL_CARD_UNMASK_CONFIRMATION_MESSAGE" desc="Message displayed after tapping a Virtual Card, and the response from the bank indicates that no further verification is required."> Your card is confirmed </message> + <message name="IDS_AUTOFILL_FIDO_AUTHENTICATION_PROMPT_TITLE" desc="Title for FIDO authentication progress dialog"> + Verifying... + </message> <!-- WebAuthn fingerprint opt-in dialog --> <!-- Desktop only --> @@ -694,12 +697,18 @@ <message name="IDS_AUTOFILL_PROMO_CODE_OFFERS_REMINDER_TITLE" desc="Title of the bubble shown on the merchant website when a merchant promo code offer is available to use."> Use this code at checkout </message> + <message name="IDS_AUTOFILL_GPAY_PROMO_CODE_OFFERS_REMINDER_TITLE" desc="Title of the bubble shown on the merchant website when a GPay merchant promo code offer is available to use, and the user can click on the promo code field to autofill it."> + Reminder: Saved promo code available + </message> <message name="IDS_AUTOFILL_PROMO_CODE_OFFER_BUTTON_TOOLTIP_NORMAL" desc="The tooltip message for a button containing a copyable promo code in the merchant promo code offer notification bubble on Desktop. This message is shown when the button is hovered over and if the button has not been clicked."> Click to copy </message> <message name="IDS_AUTOFILL_PROMO_CODE_OFFER_BUTTON_TOOLTIP_CLICKED" desc="The tooltip message for a button containing a copyable promo code in the merchant promo code offer notification bubble on Desktop. This message is shown when the button is hovered over and if the button has been clicked."> Copied to clipboard </message> + <message name="IDS_AUTOFILL_GPAY_PROMO_CODE_OFFERS_REMINDER_VALUE_PROP_TEXT" desc="The first line of the GPay promo ocde notification bubble, consisting of the value prop text and a see details link"> + <ph name="VALUE_PROP">$1<ex>5% off on shoes. Up to $50.</ex></ph> <ph name="DETAILS">$2<ex>See Details</ex></ph> + </message> </if> <!-- Autofill Payments OTP verification dialog -->
diff --git a/components/autofill_payments_strings_grdp/IDS_AUTOFILL_FIDO_AUTHENTICATION_PROMPT_TITLE.png.sha1 b/components/autofill_payments_strings_grdp/IDS_AUTOFILL_FIDO_AUTHENTICATION_PROMPT_TITLE.png.sha1 new file mode 100644 index 0000000..74e42929 --- /dev/null +++ b/components/autofill_payments_strings_grdp/IDS_AUTOFILL_FIDO_AUTHENTICATION_PROMPT_TITLE.png.sha1
@@ -0,0 +1 @@ +6e1bef112a108751ea59f8c3027d3bfc8fb7cf7d \ No newline at end of file
diff --git a/components/autofill_payments_strings_grdp/IDS_AUTOFILL_GPAY_PROMO_CODE_OFFERS_REMINDER_TITLE.png.sha1 b/components/autofill_payments_strings_grdp/IDS_AUTOFILL_GPAY_PROMO_CODE_OFFERS_REMINDER_TITLE.png.sha1 new file mode 100644 index 0000000..67750d0 --- /dev/null +++ b/components/autofill_payments_strings_grdp/IDS_AUTOFILL_GPAY_PROMO_CODE_OFFERS_REMINDER_TITLE.png.sha1
@@ -0,0 +1 @@ +ea2b1ecffc0df1c3604c711b29ed085417abeaa3 \ No newline at end of file
diff --git a/components/autofill_payments_strings_grdp/IDS_AUTOFILL_GPAY_PROMO_CODE_OFFERS_REMINDER_VALUE_PROP_TEXT.png.sha1 b/components/autofill_payments_strings_grdp/IDS_AUTOFILL_GPAY_PROMO_CODE_OFFERS_REMINDER_VALUE_PROP_TEXT.png.sha1 new file mode 100644 index 0000000..67750d0 --- /dev/null +++ b/components/autofill_payments_strings_grdp/IDS_AUTOFILL_GPAY_PROMO_CODE_OFFERS_REMINDER_VALUE_PROP_TEXT.png.sha1
@@ -0,0 +1 @@ +ea2b1ecffc0df1c3604c711b29ed085417abeaa3 \ No newline at end of file
diff --git a/components/cronet/android/BUILD.gn b/components/cronet/android/BUILD.gn index 1540685..d70cfbc 100644 --- a/components/cronet/android/BUILD.gn +++ b/components/cronet/android/BUILD.gn
@@ -1049,6 +1049,7 @@ # This is the only Cronet APK with lint enabled. This one was chosen because # it depends on basically all source files. enable_lint = true + lint_baseline_file = "lint-baseline.xml" lint_suppressions_file = "lint-suppressions.xml" # Still needs to support KitKat. See crbug.com/1042122.
diff --git a/components/cronet/android/lint-baseline.xml b/components/cronet/android/lint-baseline.xml new file mode 100644 index 0000000..de209d95 --- /dev/null +++ b/components/cronet/android/lint-baseline.xml
@@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?> +<issues format="6" by="lint 7.4.0-alpha05" type="baseline" client="" dependencies="true" name="" variant="all" version="7.4.0-alpha05"> + + <issue + id="LintError" + message="../../components/cronet/android/lint-baseline.xml (relative to /usr/local/google/home/wnwen/z1/src/out/Cronet) does not exist" + errorLine1=" <baseline file="../../components/cronet/android/lint-baseline.xml"/>" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="project.xml" + line="5" + column="3"/> + </issue> + + <issue + id="ObsoleteSdkInt" + message="Unnecessary; SDK_INT is always >= 14" + errorLine1="@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH) // TrafficStats only available on ICS" + errorLine2="~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/cronet/android/java/src/org/chromium/net/impl/JavaUrlRequest.java" + line="50" + column="1"/> + </issue> + + <issue + id="AssertionSideEffect" + message="Assertion condition has a side effect: mThreadId = Thread.currentThread().getId()" + errorLine1=" assert calledOnValidThread();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/cronet/android/java/src/org/chromium/net/urlconnection/MessageLoop.java" + line="100" + column="16"/> + </issue> + + <issue + id="AssertionSideEffect" + message="Assertion condition has a side effect: mThreadId = Thread.currentThread().getId()" + errorLine1=" assert calledOnValidThread();" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/components/cronet/android/java/src/org/chromium/net/urlconnection/MessageLoop.java" + line="143" + column="16"/> + </issue> + +</issues>
diff --git a/components/desks_storage/core/desk_sync_bridge.cc b/components/desks_storage/core/desk_sync_bridge.cc index 24da0bf..2cd83b9 100644 --- a/components/desks_storage/core/desk_sync_bridge.cc +++ b/components/desks_storage/core/desk_sync_bridge.cc
@@ -13,6 +13,7 @@ #include "base/guid.h" #include "base/json/json_writer.h" #include "base/memory/ptr_util.h" +#include "base/notreached.h" #include "base/strings/string_util.h" #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversions.h" @@ -850,6 +851,9 @@ out_entry_proto->set_desk_type( SyncDeskType::WorkspaceDeskSpecifics_DeskType_SAVE_AND_RECALL); return; + case DeskTemplateType::kUnknown: + NOTREACHED(); + return; } } @@ -860,6 +864,7 @@ switch (proto_type) { // Treat unknown desk types as templates. case SyncDeskType::WorkspaceDeskSpecifics_DeskType_UNKNOWN_TYPE: + return DeskTemplateType::kUnknown; case SyncDeskType::WorkspaceDeskSpecifics_DeskType_TEMPLATE: return DeskTemplateType::kTemplate; case SyncDeskType::WorkspaceDeskSpecifics_DeskType_SAVE_AND_RECALL: @@ -893,12 +898,19 @@ const base::Time created_time = desk_template_conversion::ProtoTimeToTime( pb_entry.created_time_windows_epoch_micros()); - // Protobuf parsing enforces UTF-8 encoding for all strings. - auto desk_template = std::make_unique<DeskTemplate>( - uuid, ash::DeskTemplateSource::kUser, pb_entry.name(), created_time, + const ash::DeskTemplateType desk_type = pb_entry.has_desk_type() ? GetDeskTemplateTypeFromProtoType(pb_entry.desk_type()) - : ash::DeskTemplateType::kTemplate); + : ash::DeskTemplateType::kTemplate; + + if (desk_type == ash::DeskTemplateType::kUnknown) { + return nullptr; + } + + // Protobuf parsing enforces UTF-8 encoding for all strings. + auto desk_template = + std::make_unique<DeskTemplate>(uuid, ash::DeskTemplateSource::kUser, + pb_entry.name(), created_time, desk_type); if (pb_entry.has_updated_time_windows_epoch_micros()) { desk_template->set_updated_time(desk_template_conversion::ProtoTimeToTime(
diff --git a/components/desks_storage/core/desk_sync_bridge_unittest.cc b/components/desks_storage/core/desk_sync_bridge_unittest.cc index 6bab280..4be3183 100644 --- a/components/desks_storage/core/desk_sync_bridge_unittest.cc +++ b/components/desks_storage/core/desk_sync_bridge_unittest.cc
@@ -304,13 +304,11 @@ app->set_title(kTestArcAppTitle); } -WorkspaceDeskSpecifics ExampleWorkspaceDeskSpecifics( +WorkspaceDeskSpecifics ExampleWorkspaceDeskSpecificsWithoutDeskType( const std::string uuid, const std::string template_name, base::Time created_time = base::Time::Now(), - int number_of_tabs = 2, - SyncDeskType desk_type = - SyncDeskType::WorkspaceDeskSpecifics_DeskType_SAVE_AND_RECALL) { + int number_of_tabs = 2) { WorkspaceDeskSpecifics specifics; specifics.set_uuid(uuid); specifics.set_name(template_name); @@ -320,7 +318,6 @@ (created_time + base::Minutes(5)) .ToDeltaSinceWindowsEpoch() .InMicroseconds()); - specifics.set_desk_type(desk_type); Desk* desk = specifics.mutable_desk(); FillExampleBrowserAppWindow(desk->add_apps(), number_of_tabs); FillExampleArcAppWindow(desk->add_apps()); @@ -331,6 +328,20 @@ } WorkspaceDeskSpecifics ExampleWorkspaceDeskSpecifics( + const std::string uuid, + const std::string template_name, + base::Time created_time = base::Time::Now(), + int number_of_tabs = 2, + SyncDeskType desk_type = + SyncDeskType::WorkspaceDeskSpecifics_DeskType_SAVE_AND_RECALL) { + WorkspaceDeskSpecifics specifics = + ExampleWorkspaceDeskSpecificsWithoutDeskType( + uuid, template_name, created_time, number_of_tabs); + specifics.set_desk_type(desk_type); + return specifics; +} + +WorkspaceDeskSpecifics ExampleWorkspaceDeskSpecifics( const std::string& uuid, const std::string& template_name, int tab_group_first_index, @@ -370,7 +381,7 @@ base::StringPrintf(kNameFormat, templateIndex), created_time); } -WorkspaceDeskSpecifics CreateUnkownDeskType() { +WorkspaceDeskSpecifics CreateUnknownDeskType() { return ExampleWorkspaceDeskSpecifics( kTestUuid1.AsLowercaseString(), base::StringPrintf(kNameFormat, 1), base::Time::Now(), @@ -378,6 +389,13 @@ SyncDeskType::WorkspaceDeskSpecifics_DeskType_UNKNOWN_TYPE); } +WorkspaceDeskSpecifics CreateWorkspaceDeskWithoutDeskType() { + return ExampleWorkspaceDeskSpecificsWithoutDeskType( + kTestUuid1.AsLowercaseString(), base::StringPrintf(kNameFormat, 1), + base::Time::Now(), + /*number_of_tabs=*/2); +} + WorkspaceDeskSpecifics CreateBrowserTemplateExpectedValue( int template_index, const base::Time& created_time) { @@ -1037,10 +1055,20 @@ EXPECT_THAT(converted_desk_proto, EqualsSpecifics(expected_desk_proto)); } -// Tests that the sync bridge appropriately handles all unknown desks as -// templates by default. -TEST_F(DeskSyncBridgeTest, EnsureGracefulHandlingOfUnkownDeskTypes) { - WorkspaceDeskSpecifics unknown_desk = CreateUnkownDeskType(); +// Tests that the sync bridge appropriately handles explicitly unknown desk type +// as invalid. +TEST_F(DeskSyncBridgeTest, EnsureGracefulHandlingOfUnknownDeskTypes) { + WorkspaceDeskSpecifics unknown_desk = CreateUnknownDeskType(); + std::unique_ptr<DeskTemplate> desk_template = + DeskSyncBridge::FromSyncProto(unknown_desk); + + EXPECT_EQ(desk_template, nullptr); +} + +// Tests that the sync bridge treat saved desk with missing desk type as desk +// template. +TEST_F(DeskSyncBridgeTest, EnsureHandlingOfMissingDeskTypes) { + WorkspaceDeskSpecifics unknown_desk = CreateWorkspaceDeskWithoutDeskType(); std::unique_ptr<DeskTemplate> desk_template = DeskSyncBridge::FromSyncProto(unknown_desk);
diff --git a/components/desks_storage/core/desk_template_conversion.cc b/components/desks_storage/core/desk_template_conversion.cc index 7802ca4..de7df92 100644 --- a/components/desks_storage/core/desk_template_conversion.cc +++ b/components/desks_storage/core/desk_template_conversion.cc
@@ -52,6 +52,7 @@ constexpr char kDeskType[] = "desk_type"; constexpr char kDeskTypeTemplate[] = "TEMPLATE"; constexpr char kDeskTypeSaveAndRecall[] = "SAVE_AND_RECALL"; +constexpr char kDeskTypeUnknown[] = "UNKNOWN"; constexpr char kDisplayId[] = "display_id"; constexpr char kEventFlag[] = "event_flag"; constexpr char kIsAppTypeBrowser[] = "is_app"; @@ -962,6 +963,9 @@ return kDeskTypeTemplate; case ash::DeskTemplateType::kSaveAndRecall: return kDeskTypeSaveAndRecall; + case ash::DeskTemplateType::kUnknown: + NOTREACHED(); + return kDeskTypeUnknown; } }
diff --git a/components/exo/client_controlled_shell_surface.cc b/components/exo/client_controlled_shell_surface.cc index 8780bd4..e9403ae 100644 --- a/components/exo/client_controlled_shell_surface.cc +++ b/components/exo/client_controlled_shell_surface.cc
@@ -674,7 +674,15 @@ bool is_resize = client_bounds.size() != current_size && !widget_->IsMaximized() && !widget_->IsFullscreen(); - const float scale = 1.f / GetClientToDpScale(); + // Make sure to use the up-to-date scale factor. At this point, |scale_| or + // |pending_scale_| may not be updated yet. + display::Display display; + const bool display_exists = + display::Screen::GetScreen()->GetDisplayWithDisplayId(display_id, + &display); + DCHECK(display_exists && display.is_valid()); + const float scale = + use_default_scale_cancellation_ ? 1.f : display.device_scale_factor(); const gfx::Rect scaled_client_bounds = gfx::ScaleToRoundedRect(client_bounds, scale); delegate_->OnBoundsChanged(current_state, requested_state, display_id,
diff --git a/components/exo/client_controlled_shell_surface_unittest.cc b/components/exo/client_controlled_shell_surface_unittest.cc index 05a0a6c..85392bc 100644 --- a/components/exo/client_controlled_shell_surface_unittest.cc +++ b/components/exo/client_controlled_shell_surface_unittest.cc
@@ -972,8 +972,9 @@ std::unique_ptr<Buffer> buffer( new Buffer(exo_test_helper()->CreateGpuMemoryBuffer(buffer_size))); std::unique_ptr<Surface> surface(new Surface); - auto shell_surface( - exo_test_helper()->CreateClientControlledShellSurface(surface.get())); + auto shell_surface(exo_test_helper()->CreateClientControlledShellSurface( + surface.get(), false /* is_modal */, + true /* default_scale_cancelation */)); surface->Attach(buffer.get()); surface->Commit(); @@ -1557,7 +1558,7 @@ TEST_F(ClientControlledShellSurfaceDisplayTest, MoveToAnotherDisplayByShortcut) { - UpdateDisplay("400x600,800x600"); + UpdateDisplay("400x600,800x600*2"); aura::Window::Windows root_windows = ash::Shell::GetAllRootWindows(); std::unique_ptr<Surface> surface(new Surface); auto shell_surface = @@ -1592,13 +1593,15 @@ ash::window_util::MoveWindowToDisplay(window, secondary_display.id())); ASSERT_EQ(1, delegate->bounds_change_count()); - EXPECT_EQ(gfx::Rect(-174, 10, 200, 200), delegate->requested_bounds()[0]); + // Should be scaled by 2x in pixels on 2x-density density. + EXPECT_EQ(gfx::Rect(-348, 20, 400, 400), delegate->requested_bounds()[0]); EXPECT_EQ(secondary_display.id(), delegate->requested_display_ids()[0]); gfx::Rect secondary_position(700, 10, 200, 200); shell_surface->SetBounds(secondary_display.id(), secondary_position); surface->Commit(); - EXPECT_EQ(gfx::Rect(1100, 10, 200, 200), window->GetBoundsInScreen()); + // Should be scaled by half when converted from pixels to DP. + EXPECT_EQ(gfx::Rect(750, 5, 100, 100), window->GetBoundsInScreen()); delegate->Reset(); @@ -1607,7 +1610,7 @@ ash::window_util::MoveWindowToDisplay(window, primary_display.id())); ASSERT_EQ(1, delegate->bounds_change_count()); // Should fit in the primary display. - EXPECT_EQ(gfx::Rect(375, 10, 200, 200), delegate->requested_bounds()[0]); + EXPECT_EQ(gfx::Rect(350, 5, 100, 100), delegate->requested_bounds()[0]); EXPECT_EQ(primary_display.id(), delegate->requested_display_ids()[0]); }
diff --git a/components/exo/test/exo_test_helper.h b/components/exo/test/exo_test_helper.h index 23bf8a0..37fde82 100644 --- a/components/exo/test/exo_test_helper.h +++ b/components/exo/test/exo_test_helper.h
@@ -78,7 +78,7 @@ std::unique_ptr<ClientControlledShellSurface> CreateClientControlledShellSurface(Surface* surface, bool is_modal = false, - bool default_scale_cancellation = true); + bool default_scale_cancellation = false); std::unique_ptr<InputMethodSurface> CreateInputMethodSurface( Surface* surface, InputMethodSurfaceManager* surface_manager,
diff --git a/components/exo/wayland/zcr_remote_shell_impl.cc b/components/exo/wayland/zcr_remote_shell_impl.cc index b092b88..58840869 100644 --- a/components/exo/wayland/zcr_remote_shell_impl.cc +++ b/components/exo/wayland/zcr_remote_shell_impl.cc
@@ -521,6 +521,14 @@ } // Overridden from display::DisplayObserver: +void WaylandRemoteShell::OnWillProcessDisplayChanges() { + in_display_update_ = true; +} + +void WaylandRemoteShell::OnDidProcessDisplayChanges() { + in_display_update_ = false; +} + void WaylandRemoteShell::OnDisplayAdded(const display::Display& new_display) { ScheduleSendDisplayMetrics(0); } @@ -774,7 +782,7 @@ } } - if (needs_send_display_metrics_) { + if (in_display_update_ || needs_send_display_metrics_) { // We store only the latest bounds for each |resource|. pending_bounds_changes_.insert_or_assign( std::move(resource),
diff --git a/components/exo/wayland/zcr_remote_shell_impl.h b/components/exo/wayland/zcr_remote_shell_impl.h index 73bdcad..b6bb3df 100644 --- a/components/exo/wayland/zcr_remote_shell_impl.h +++ b/components/exo/wayland/zcr_remote_shell_impl.h
@@ -89,6 +89,8 @@ void OnRemoteSurfaceDestroyed(wl_resource* resource); // Overridden from display::DisplayObserver: + void OnWillProcessDisplayChanges() override; + void OnDidProcessDisplayChanges() override; void OnDisplayAdded(const display::Display& new_display) override; void OnDisplayRemoved(const display::Display& old_display) override; void OnDisplayTabletStateChanged(display::TabletState state) override; @@ -108,6 +110,8 @@ WaylandRemoteShellEventMapping const event_mapping_; private: + friend class WaylandRemoteShellTest; + void ScheduleSendDisplayMetrics(int delay_ms); // Returns the transform that a display's output is currently adjusted for. @@ -165,6 +169,7 @@ // in v2 this is always false. bool use_default_scale_cancellation_; + bool in_display_update_; bool needs_send_display_metrics_ = true; int layout_mode_ = ZCR_REMOTE_SHELL_V1_LAYOUT_MODE_WINDOWED;
diff --git a/components/exo/wayland/zcr_remote_shell_impl_unittest.cc b/components/exo/wayland/zcr_remote_shell_impl_unittest.cc index 90735092..22201aae 100644 --- a/components/exo/wayland/zcr_remote_shell_impl_unittest.cc +++ b/components/exo/wayland/zcr_remote_shell_impl_unittest.cc
@@ -8,6 +8,7 @@ #include <wayland-server.h> #include <memory> +#include <vector> #include "ash/shell.h" #include "ash/test/ash_test_base.h" @@ -25,6 +26,10 @@ namespace wayland { namespace { +const int kDefaultWindowLength = 100; + +enum class RemoteShellEventType { kSendBoundsChanged, kSendWorkspaceInfo }; + struct WlDisplayDeleter { void operator()(wl_display* ptr) const { wl_display_destroy(ptr); } }; @@ -53,7 +58,7 @@ void SetUp() override { test::ExoTestBase::SetUp(); - ResetCounter(); + ResetEventRecords(); UpdateDisplay("800x600"); @@ -86,14 +91,22 @@ ash::Shell::Get()->tablet_mode_controller()->SetEnabledForTest(enable); } - void ResetCounter() { send_bounds_changed_counter_ = 0; } + void ResetEventRecords() { + remote_shell_event_sequence_.clear(); + remote_shell_requested_bounds_changes_.clear(); + } WaylandRemoteShell* shell() { return shell_.get(); } wl_client* wl_client() { return wl_client_.get(); } - static int send_bounds_changed_counter() { - return send_bounds_changed_counter_; + static std::vector<RemoteShellEventType> remote_shell_event_sequence() { + return remote_shell_event_sequence_; + } + + static std::vector<WaylandRemoteShell::BoundsChangeData> + remote_shell_requested_bounds_changes() { + return remote_shell_requested_bounds_changes_; } static int last_desktop_focus_state() { return last_desktop_focus_state_; } @@ -108,7 +121,9 @@ std::unique_ptr<WaylandRemoteShell> shell_; - static int send_bounds_changed_counter_; + static std::vector<RemoteShellEventType> remote_shell_event_sequence_; + static std::vector<WaylandRemoteShell::BoundsChangeData> + remote_shell_requested_bounds_changes_; static uint32_t last_desktop_focus_state_; @@ -130,13 +145,20 @@ uint32_t) {}, /*send_bounds_changed=*/ +[](struct wl_resource*, - uint32_t, - uint32_t, - int32_t, - int32_t, - int32_t, - int32_t, - uint32_t) { send_bounds_changed_counter_++; }, + uint32_t display_id_hi, + uint32_t display_id_lo, + int32_t x, + int32_t y, + int32_t width, + int32_t height, + uint32_t reason) { + remote_shell_event_sequence_.push_back( + RemoteShellEventType::kSendBoundsChanged); + remote_shell_requested_bounds_changes_.emplace_back( + (((int64_t)display_id_hi << 32) | display_id_lo), + gfx::Rect(x, y, width, height), + static_cast<zcr_remote_surface_v1_bounds_change_reason>(reason)); + }, /*send_activated=*/ +[](struct wl_resource*, struct wl_resource*, struct wl_resource*) {}, /*send_desktop_focus_state_changed=*/ @@ -162,7 +184,10 @@ int32_t, int32_t, uint32_t, - struct wl_array*) {}, + struct wl_array*) { + remote_shell_event_sequence_.push_back( + RemoteShellEventType::kSendWorkspaceInfo); + }, /*send_drag_finished=*/ +[](struct wl_resource*, int32_t, int32_t, int32_t) {}, /*send_drag_started=*/+[](struct wl_resource*, uint32_t) {}, @@ -178,12 +203,15 @@ /*set_use_default_scale_cancellation_since_version=*/0, }; }; -int WaylandRemoteShellTest::send_bounds_changed_counter_ = 0; +std::vector<RemoteShellEventType> + WaylandRemoteShellTest::remote_shell_event_sequence_; +std::vector<WaylandRemoteShell::BoundsChangeData> + WaylandRemoteShellTest::remote_shell_requested_bounds_changes_; uint32_t WaylandRemoteShellTest::last_desktop_focus_state_ = 0; // Test that all bounds change requests are deferred while the tablet transition // is happening until it's finished. -TEST_F(WaylandRemoteShellTest, DeferBoundsChangeWhileTabletTransition) { +TEST_F(WaylandRemoteShellTest, TabletTransition) { // Setup buffer/surface/window. const gfx::Size buffer_size(256, 256); std::unique_ptr<Buffer> buffer( @@ -211,12 +239,258 @@ surface->Commit(); // Enable tablet mode. - ResetCounter(); + ResetEventRecords(); EnableTabletMode(true); task_environment()->FastForwardBy(base::Seconds(1)); task_environment()->RunUntilIdle(); - EXPECT_EQ(send_bounds_changed_counter(), 1); + const auto expected_sequence = std::vector<RemoteShellEventType>{ + RemoteShellEventType::kSendWorkspaceInfo, + RemoteShellEventType::kSendBoundsChanged}; + EXPECT_EQ(expected_sequence, remote_shell_event_sequence()); + // TODO(b/236432849): Add a reasonable bounds check. +} + +// Verifies bounds change events and workspace info events are triggered with +// proper values and in proper order when display zoom happens. A bounds change +// event must be triggered only for PIP. +TEST_F(WaylandRemoteShellTest, DisplayZoom) { + const gfx::Size buffer_size(256, 256); + std::unique_ptr<Buffer> buffer( + new Buffer(exo_test_helper()->CreateGpuMemoryBuffer(buffer_size))); + std::unique_ptr<Surface> surface(new Surface); + auto shell_surface = + exo_test_helper()->CreateClientControlledShellSurface(surface.get()); + ScopedWlResource wl_res(wl_resource_create( + wl_client(), &zcr_remote_surface_v2_interface, /*version=*/1, /*id=*/0)); + shell_surface->set_delegate( + shell()->CreateShellSurfaceDelegate(wl_res.get())); + surface->Attach(buffer.get()); + surface->Commit(); + auto* const window = shell_surface->GetWidget()->GetNativeWindow(); + const display::Display& display = + display::Screen::GetScreen()->GetDisplayNearestWindow(window); + + // Test a restored window. + shell_surface->SetRestored(); + shell_surface->SetGeometry( + gfx::Rect(100, 100, kDefaultWindowLength, kDefaultWindowLength)); + surface->Commit(); + ResetEventRecords(); + ash::Shell::Get()->display_manager()->ZoomDisplay(display.id(), /*up=*/true); + task_environment()->RunUntilIdle(); + const auto expected_sequence_for_restored = std::vector<RemoteShellEventType>{ + RemoteShellEventType::kSendWorkspaceInfo}; + EXPECT_EQ(expected_sequence_for_restored, remote_shell_event_sequence()); + + // Test a maximized window. + shell_surface->SetMaximized(); + surface->Commit(); + ResetEventRecords(); + ash::Shell::Get()->display_manager()->ZoomDisplay(display.id(), /*up=*/true); + task_environment()->RunUntilIdle(); + const auto expected_sequence_for_maximized = + std::vector<RemoteShellEventType>{ + RemoteShellEventType::kSendWorkspaceInfo}; + EXPECT_EQ(expected_sequence_for_maximized, remote_shell_event_sequence()); + + // Test a PIP window. + shell_surface->SetPip(); + // Place PIP at the bottom-right corner so the position will be adjusted with + // display size change. This means no bounds change event is triggered if PIP + // is at the top-left corner, but this is fine as the position doesn't need + // to be adjusted on the client side. + shell_surface->SetGeometry( + gfx::Rect(display.bounds().right() - kDefaultWindowLength, + display.bounds().bottom() - kDefaultWindowLength, + kDefaultWindowLength, kDefaultWindowLength)); + surface->Commit(); + ResetEventRecords(); + ash::Shell::Get()->display_manager()->ZoomDisplay(display.id(), /*up=*/true); + task_environment()->RunUntilIdle(); + const auto expected_sequence_for_pip = std::vector<RemoteShellEventType>{ + RemoteShellEventType::kSendWorkspaceInfo, + RemoteShellEventType::kSendBoundsChanged}; + EXPECT_EQ(remote_shell_event_sequence(), expected_sequence_for_pip); + ASSERT_EQ(1UL, remote_shell_requested_bounds_changes().size()); + const auto bounds_change = remote_shell_requested_bounds_changes()[0]; + EXPECT_EQ(display.id(), bounds_change.display_id); + // Verify that the new bounds is scaled larger in pixels. + EXPECT_GT(kDefaultWindowLength, bounds_change.bounds_in_display.width()); + EXPECT_GT(kDefaultWindowLength, bounds_change.bounds_in_display.height()); + EXPECT_EQ(ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_PIP, + bounds_change.reason); +} + +// Verifies bounds change events and workspace info events are triggered with +// proper values and in proper order when display rotation happens. A bounds +// change event must be triggered only for PIP. +TEST_F(WaylandRemoteShellTest, DisplayRotation) { + const gfx::Size buffer_size(256, 256); + std::unique_ptr<Buffer> buffer( + new Buffer(exo_test_helper()->CreateGpuMemoryBuffer(buffer_size))); + std::unique_ptr<Surface> surface(new Surface); + auto shell_surface = + exo_test_helper()->CreateClientControlledShellSurface(surface.get()); + ScopedWlResource wl_res(wl_resource_create( + wl_client(), &zcr_remote_surface_v2_interface, /*version=*/1, /*id=*/0)); + shell_surface->set_delegate( + shell()->CreateShellSurfaceDelegate(wl_res.get())); + surface->Attach(buffer.get()); + surface->Commit(); + auto* const window = shell_surface->GetWidget()->GetNativeWindow(); + const display::Display& display = + display::Screen::GetScreen()->GetDisplayNearestWindow(window); + + // Test a restored window. + shell_surface->SetRestored(); + shell_surface->SetGeometry( + gfx::Rect(100, 100, kDefaultWindowLength, kDefaultWindowLength)); + surface->Commit(); + ResetEventRecords(); + ash::Shell::Get()->display_manager()->SetDisplayRotation( + display.id(), display::Display::ROTATE_90, + display::Display::RotationSource::ACCELEROMETER); + task_environment()->RunUntilIdle(); + const auto expected_sequence_for_restored = std::vector<RemoteShellEventType>{ + RemoteShellEventType::kSendWorkspaceInfo}; + EXPECT_EQ(expected_sequence_for_restored, remote_shell_event_sequence()); + + // Test a maximized window. + shell_surface->SetMaximized(); + surface->Commit(); + ResetEventRecords(); + ash::Shell::Get()->display_manager()->SetDisplayRotation( + display.id(), display::Display::ROTATE_180, + display::Display::RotationSource::ACCELEROMETER); + task_environment()->RunUntilIdle(); + const auto expected_sequence_for_maximized = + std::vector<RemoteShellEventType>{ + RemoteShellEventType::kSendWorkspaceInfo, + RemoteShellEventType::kSendBoundsChanged}; + EXPECT_EQ(expected_sequence_for_maximized, remote_shell_event_sequence()); + + // Test a PIP window. + shell_surface->SetPip(); + // Place PIP at the bottom-right corner so the position will be adjusted with + // display rotation. + shell_surface->SetGeometry( + gfx::Rect(display.bounds().right(), display.bounds().bottom(), + kDefaultWindowLength, kDefaultWindowLength)); + surface->Commit(); + const gfx::Rect bounds = window->GetBoundsInScreen(); + const int right_inset = display.bounds().right() - bounds.right(); + const int bottom_inset = display.bounds().bottom() - bounds.bottom(); + ResetEventRecords(); + ash::Shell::Get()->display_manager()->SetDisplayRotation( + display.id(), display::Display::ROTATE_270, + display::Display::RotationSource::ACCELEROMETER); + task_environment()->RunUntilIdle(); + const auto expected_sequence_for_pip = std::vector<RemoteShellEventType>{ + RemoteShellEventType::kSendWorkspaceInfo, + RemoteShellEventType::kSendBoundsChanged}; + EXPECT_EQ(expected_sequence_for_pip, remote_shell_event_sequence()); + ASSERT_EQ(1UL, remote_shell_requested_bounds_changes().size()); + const auto bounds_change = remote_shell_requested_bounds_changes()[0]; + EXPECT_EQ(display.id(), bounds_change.display_id); + const display::Display& rotated_display = + display::Screen::GetScreen()->GetDisplayNearestWindow(window); + const int expected_x = + rotated_display.bounds().right() - right_inset - kDefaultWindowLength; + const int expected_y = + rotated_display.bounds().bottom() - bottom_inset - kDefaultWindowLength; + const gfx::Rect expected_bounds = gfx::Rect( + expected_x, expected_y, kDefaultWindowLength, kDefaultWindowLength); + EXPECT_EQ(expected_bounds, bounds_change.bounds_in_display); + EXPECT_EQ(ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_PIP, + bounds_change.reason); +} + +// Removing secandary display and re-reconnect it restores the bounds of +// windows on secandary display. This test verifies bounds change events +// and workspace info events are triggered with proper values and in +// proper order. +TEST_F(WaylandRemoteShellTest, DisplayRemovalAddition) { + const gfx::Size buffer_size(256, 256); + std::unique_ptr<Buffer> buffer( + new Buffer(exo_test_helper()->CreateGpuMemoryBuffer(buffer_size))); + std::unique_ptr<Surface> surface(new Surface); + auto shell_surface = + exo_test_helper()->CreateClientControlledShellSurface(surface.get()); + ScopedWlResource wl_res(wl_resource_create( + wl_client(), &zcr_remote_surface_v2_interface, /*version=*/1, /*id=*/0)); + shell_surface->set_delegate( + shell()->CreateShellSurfaceDelegate(wl_res.get())); + surface->Attach(buffer.get()); + shell_surface->SetRestored(); + shell_surface->SetGeometry( + gfx::Rect(100, 100, kDefaultWindowLength, kDefaultWindowLength)); + surface->Commit(); + + // Add secondary display with a different scale factor. + UpdateDisplay("800x600,800x600*2"); + auto* display_manager = ash::Shell::Get()->display_manager(); + const int64_t primary_display_id = display_manager->GetDisplayAt(0).id(); + const int64_t secondary_display_id = display_manager->GetDisplayAt(1).id(); + display::ManagedDisplayInfo primary_display_info = + display_manager->GetDisplayInfo(primary_display_id); + display::ManagedDisplayInfo secondary_display_info = + display_manager->GetDisplayInfo(secondary_display_id); + + // Move the window to the secandary display. + const int initial_x = 100; + const int initial_y = 100; + shell_surface->SetBounds(secondary_display_id, + gfx::Rect(initial_x, initial_y, kDefaultWindowLength, + kDefaultWindowLength)); + surface->Commit(); + + // Disconnect secondary display. + ResetEventRecords(); + std::vector<display::ManagedDisplayInfo> display_info_list; + display_info_list.push_back(primary_display_info); + display_manager->OnNativeDisplaysChanged(display_info_list); + task_environment()->RunUntilIdle(); + const auto event_sequence_disconnect = std::vector<RemoteShellEventType>{ + RemoteShellEventType::kSendWorkspaceInfo, + RemoteShellEventType::kSendBoundsChanged}; + EXPECT_EQ(remote_shell_event_sequence(), event_sequence_disconnect); + + ASSERT_EQ(1UL, remote_shell_requested_bounds_changes().size()); + const auto bounds_change = remote_shell_requested_bounds_changes()[0]; + EXPECT_EQ(bounds_change.display_id, primary_display_id); + // Verify the new bounds is scaled in pixles with the scale factor of the + // primary display. + const gfx::Rect expected_bounds_after_disconnection = gfx::Rect( + initial_x, initial_y, kDefaultWindowLength / 2, kDefaultWindowLength / 2); + EXPECT_EQ(expected_bounds_after_disconnection, + bounds_change.bounds_in_display); + EXPECT_EQ(ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_MOVE, + bounds_change.reason); + + // Reconnects the previously connected secondary display. + ResetEventRecords(); + display_info_list.push_back(secondary_display_info); + display_manager->OnNativeDisplaysChanged(display_info_list); + task_environment()->RunUntilIdle(); + // Reconnecting the secondary display seems to cause two workspace info + // events: One for a display metrics change for the primary display, and the + // other for a display addition event of the secondary display. + const auto event_sequence_reconnect = std::vector<RemoteShellEventType>{ + RemoteShellEventType::kSendWorkspaceInfo, + RemoteShellEventType::kSendWorkspaceInfo, + RemoteShellEventType::kSendBoundsChanged}; + EXPECT_EQ(event_sequence_reconnect, remote_shell_event_sequence()); + ASSERT_EQ(1UL, remote_shell_requested_bounds_changes().size()); + const auto bounds_change_to_secondary = + remote_shell_requested_bounds_changes()[0]; + EXPECT_EQ(secondary_display_id, bounds_change_to_secondary.display_id); + const gfx::Rect expected_bounds_after_reconnection = gfx::Rect( + initial_x, initial_y, kDefaultWindowLength, kDefaultWindowLength); + EXPECT_EQ(expected_bounds_after_reconnection, + bounds_change_to_secondary.bounds_in_display); + EXPECT_EQ(ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_MOVE, + bounds_change_to_secondary.reason); } // Test that the desktop focus state event is called with the proper value in
diff --git a/components/lens/lens_features.cc b/components/lens/lens_features.cc index 8081a17..2c398499 100644 --- a/components/lens/lens_features.cc +++ b/components/lens/lens_features.cc
@@ -16,6 +16,9 @@ const base::Feature kLensFullscreenSearch{"LensFullscreenSearch", base::FEATURE_DISABLED_BY_DEFAULT}; +const base::FeatureParam<bool> kUseGoogleAsVisualSearchProvider{ + &kLensStandalone, "use-google-as-visual-search-provider", false}; + const base::FeatureParam<bool> kRegionSearchMacCursorFix{ &kLensStandalone, "region-search-mac-cursor-fix", true}; @@ -25,12 +28,6 @@ const base::FeatureParam<bool> kRegionSearchUseMenuItemAltText2{ &kLensStandalone, "use-menu-item-alt-text-2", false}; -const base::FeatureParam<bool> kRegionSearchUseMenuItemAltText3{ - &kLensStandalone, "use-menu-item-alt-text-3", false}; - -const base::FeatureParam<bool> kRegionSearchUseMenuItemAltText4{ - &kLensStandalone, "use-menu-item-alt-text-4", false}; - const base::FeatureParam<bool> kEnableUKMLoggingForRegionSearch{ &kLensStandalone, "region-search-enable-ukm-logging", true}; @@ -89,14 +86,9 @@ kRegionSearchUseMenuItemAltText2.Get(); } -bool UseRegionSearchMenuItemAltText3() { +bool UseGoogleAsVisualSearchProvider() { return base::FeatureList::IsEnabled(kLensStandalone) && - kRegionSearchUseMenuItemAltText3.Get(); -} - -bool UseRegionSearchMenuItemAltText4() { - return base::FeatureList::IsEnabled(kLensStandalone) && - kRegionSearchUseMenuItemAltText4.Get(); + kUseGoogleAsVisualSearchProvider.Get(); } bool IsLensFullscreenSearchEnabled() {
diff --git a/components/lens/lens_features.h b/components/lens/lens_features.h index a21a49d..3ac3dd8f 100644 --- a/components/lens/lens_features.h +++ b/components/lens/lens_features.h
@@ -23,18 +23,16 @@ // TODO(crbug/1266514): make default and remove feature once launched. extern const base::FeatureParam<bool> kRegionSearchMacCursorFix; +// Enables using `Google` as the visual search provider instead of `Google +// Lens`. +extern const base::FeatureParam<bool> kUseGoogleAsVisualSearchProvider; + // Enables alternate option 1 for the Region Search context menu item text. extern const base::FeatureParam<bool> kRegionSearchUseMenuItemAltText1; // Enables alternate option 2 for the Region Search context menu item text. extern const base::FeatureParam<bool> kRegionSearchUseMenuItemAltText2; -// Enables alternate option 3 for the Region Search context menu item text. -extern const base::FeatureParam<bool> kRegionSearchUseMenuItemAltText3; - -// Enables alternate option 4 for the Region Search context menu item text. -extern const base::FeatureParam<bool> kRegionSearchUseMenuItemAltText4; - // Enables UKM logging for the Lens Region Search feature. extern const base::FeatureParam<bool> kEnableUKMLoggingForRegionSearch; @@ -77,13 +75,9 @@ // menu item text. extern bool UseRegionSearchMenuItemAltText2(); -// Returns whether to use alternative option 3 for the Region Search context -// menu item text. -extern bool UseRegionSearchMenuItemAltText3(); - -// Returns whether to use alternative option 4 for the Region Search context -// menu item text. -extern bool UseRegionSearchMenuItemAltText4(); +// Returns whether to use `Google` as the visual search provider for all +// relevant Lens context menu strings. +extern bool UseGoogleAsVisualSearchProvider(); // Returns whether the Lens side panel is enabled. extern bool IsLensSidePanelEnabled();
diff --git a/components/ntp_tiles/webui/ntp_tiles_internals_message_handler.cc b/components/ntp_tiles/webui/ntp_tiles_internals_message_handler.cc index 24cd165..7687f443 100644 --- a/components/ntp_tiles/webui/ntp_tiles_internals_message_handler.cc +++ b/components/ntp_tiles/webui/ntp_tiles_internals_message_handler.cc
@@ -67,18 +67,18 @@ NTPTilesInternalsMessageHandlerClient* client) { client_ = client; - client_->RegisterDeprecatedMessageCallback( + client_->RegisterMessageCallback( "registerForEvents", base::BindRepeating( &NTPTilesInternalsMessageHandler::HandleRegisterForEvents, base::Unretained(this))); - client_->RegisterDeprecatedMessageCallback( + client_->RegisterMessageCallback( "update", base::BindRepeating(&NTPTilesInternalsMessageHandler::HandleUpdate, base::Unretained(this))); - client_->RegisterDeprecatedMessageCallback( + client_->RegisterMessageCallback( "viewPopularSitesJson", base::BindRepeating( &NTPTilesInternalsMessageHandler::HandleViewPopularSitesJson, @@ -86,7 +86,7 @@ } void NTPTilesInternalsMessageHandler::HandleRegisterForEvents( - const base::ListValue* args) { + const base::Value::List& args) { if (!client_->SupportsNTPTiles()) { base::Value::Dict disabled; disabled.Set("topSites", false); @@ -98,7 +98,7 @@ SendTiles(NTPTilesVector(), FaviconResultMap()); return; } - DCHECK_EQ(0u, args->GetListDeprecated().size()); + DCHECK_EQ(0u, args.size()); popular_sites_json_.clear(); most_visited_sites_ = client_->MakeMostVisitedSites(); @@ -107,13 +107,13 @@ } void NTPTilesInternalsMessageHandler::HandleUpdate( - const base::ListValue* args) { + const base::Value::List& args) { if (!client_->SupportsNTPTiles()) { return; } - DCHECK_EQ(1u, args->GetListDeprecated().size()); - const base::Value& dict = args->GetListDeprecated()[0]; + DCHECK_EQ(1u, args.size()); + const base::Value& dict = args[0]; DCHECK(dict.is_dict()); PrefService* prefs = client_->GetPrefs(); @@ -165,8 +165,8 @@ } void NTPTilesInternalsMessageHandler::HandleViewPopularSitesJson( - const base::ListValue* args) { - DCHECK_EQ(0u, args->GetListDeprecated().size()); + const base::Value::List& args) { + DCHECK_EQ(0u, args.size()); if (!most_visited_sites_ || !most_visited_sites_->DoesSourceExist(ntp_tiles::TileSource::POPULAR)) { return;
diff --git a/components/ntp_tiles/webui/ntp_tiles_internals_message_handler.h b/components/ntp_tiles/webui/ntp_tiles_internals_message_handler.h index 4162afe..ca3098a 100644 --- a/components/ntp_tiles/webui/ntp_tiles_internals_message_handler.h +++ b/components/ntp_tiles/webui/ntp_tiles_internals_message_handler.h
@@ -12,13 +12,10 @@ #include "base/memory/raw_ptr.h" #include "base/memory/weak_ptr.h" #include "base/task/cancelable_task_tracker.h" +#include "base/values.h" #include "components/favicon_base/favicon_types.h" #include "components/ntp_tiles/most_visited_sites.h" -namespace base { -class ListValue; -} // namespace base - namespace favicon { class FaviconService; } // namespace favicon @@ -55,10 +52,9 @@ favicon_base::FaviconRawBitmapResult>; // Callbacks registered in RegisterMessages(). - void HandleRegisterForEvents(const base::ListValue* args); - void HandleUpdate(const base::ListValue* args); - void HandleFetchSuggestions(const base::ListValue* args); - void HandleViewPopularSitesJson(const base::ListValue* args); + void HandleRegisterForEvents(const base::Value::List& args); + void HandleUpdate(const base::Value::List& args); + void HandleViewPopularSitesJson(const base::Value::List& args); void SendSourceInfo(); void SendTiles(const NTPTilesVector& tiles,
diff --git a/components/ntp_tiles/webui/ntp_tiles_internals_message_handler_client.h b/components/ntp_tiles/webui/ntp_tiles_internals_message_handler_client.h index 4319dc7..8e74726 100644 --- a/components/ntp_tiles/webui/ntp_tiles_internals_message_handler_client.h +++ b/components/ntp_tiles/webui/ntp_tiles_internals_message_handler_client.h
@@ -46,18 +46,6 @@ const std::string& message, base::RepeatingCallback<void(const base::Value::List&)> callback) = 0; - // Always use RegisterMessageCallback() above in new code. - // - // TODO(crbug.com/1243386): Existing callers of - // RegisterDeprecatedMessageCallback() should be migrated to - // RegisterMessageCallback() if possible. - // - // Registers a callback in Javascript. See content::WebUI and web::WebUIIOS. - virtual void RegisterDeprecatedMessageCallback( - const std::string& message, - const base::RepeatingCallback<void(const base::ListValue*)>& - callback) = 0; - // Invokes a function in Javascript. See content::WebUI and web::WebUIIOS. virtual void CallJavascriptFunctionVector( const std::string& name,
diff --git a/components/omnibox/browser/BUILD.gn b/components/omnibox/browser/BUILD.gn index 3ba2f56..7b40c406 100644 --- a/components/omnibox/browser/BUILD.gn +++ b/components/omnibox/browser/BUILD.gn
@@ -479,6 +479,7 @@ "actions/omnibox_pedal_concepts.h", "autocomplete_match.h", "autocomplete_match_type.h", + "most_visited_sites_provider.cc", "suggestion_answer.h", ] }
diff --git a/components/omnibox/browser/autocomplete_result.cc b/components/omnibox/browser/autocomplete_result.cc index 48ada56..ec133cf 100644 --- a/components/omnibox/browser/autocomplete_result.cc +++ b/components/omnibox/browser/autocomplete_result.cc
@@ -664,6 +664,10 @@ if (top_match->type != ACMatchType::SEARCH_SUGGEST_ENTITY) return false; + // We define an iterator to capture the non-entity duplicate match (if any) + // so that we can later use it with duplicate_matches.erase(). + auto non_entity_it = top_match->duplicate_matches.end(); + // Search the duplicates for an equivalent non-entity search suggestion. for (auto it = top_match->duplicate_matches.begin(); it != top_match->duplicate_matches.end(); ++it) { @@ -674,17 +678,47 @@ continue; } + if (non_entity_it == top_match->duplicate_matches.end()) { + non_entity_it = it; + } + + // When an entity suggestion (SEARCH_SUGGEST_ENTITY) is received from + // google.com, we also receive a non-entity version of the same suggestion + // which (a) gets placed in the |duplicate_matches| list of the entity + // suggestion (as part of the deduplication process) and (b) has the same + // |deletion_url| as the entity suggestion. + // When the user attempts to remove the SEARCH_SUGGEST_ENTITY suggestion + // from the omnibox, the suggestion removal code will fire off network + // requests to the suggestion's own |deletion_url| as well as to any + // deletion_url's present on matches in the associated |duplicate_matches| + // list, which in this case would result in redundant network calls to the + // same URL. + // By prioritizing the "undeduping" (i.e. moving a duplicate match out of + // the |duplicate_matches| list) and promotion of the non-entity + // SEARCH_SUGGEST (or any other "specialized search") duplicate as the + // top match, we are deliberately separating the two matches that have the + // same |deletion_url|, thereby eliminating any redundant network calls + // upon suggestion removal. + if (it->type == ACMatchType::SEARCH_SUGGEST || + AutocompleteMatch::IsSpecializedSearchType(it->type)) { + non_entity_it = it; + break; + } + } + + if (non_entity_it != top_match->duplicate_matches.end()) { // Copy the non-entity match, then erase it from the list of duplicates. // We do this first, because the insertion operation invalidates all // iterators, including |top_match|. - AutocompleteMatch non_entity_match_copy = *it; - top_match->duplicate_matches.erase(it); + AutocompleteMatch non_entity_match_copy = *non_entity_it; + top_match->duplicate_matches.erase(non_entity_it); // Promote the non-entity match to the top, then immediately return, since // all our iterators are invalid after the insertion. matches->insert(matches->begin(), std::move(non_entity_match_copy)); return true; } + return false; }
diff --git a/components/omnibox/browser/autocomplete_result_unittest.cc b/components/omnibox/browser/autocomplete_result_unittest.cc index bafda6c2..800934e7 100644 --- a/components/omnibox/browser/autocomplete_result_unittest.cc +++ b/components/omnibox/browser/autocomplete_result_unittest.cc
@@ -1742,6 +1742,65 @@ EXPECT_EQ(u"oo", result.match_at(1)->inline_autocompletion); } +TEST_F( + AutocompleteResultTest, + SortAndCullPreferNonEntitySpecializedSearchSuggestionForDefaultSuggestion) { + // When selecting among multiple duplicate non-entity suggestions, prefer + // promoting the one that is a SEARCH_SUGGEST or other "specialized" search + // suggestion. + + std::vector<EntityTestData> test_cases = { + // Entity search suggestion. + {AutocompleteMatchType::SEARCH_SUGGEST_ENTITY, GetProvider(1), + "http://search/?q=foo", 1200, true}, + // Duplicate non-entity SEARCH_SUGGEST suggestion should be preferred + // above the other options (even when scoring lower). + {AutocompleteMatchType::SEARCH_SUGGEST, GetProvider(1), + "http://search/?q=foo", 1000, true}, + // Duplicate non-entity match which is neither a SEARCH_SUGGEST nor a + // "specialized" search suggestion. + {AutocompleteMatchType::SEARCH_HISTORY, GetProvider(1), + "http://search/?q=foo", 1100, true}, + }; + ACMatches matches; + PopulateEntityTestCases(test_cases, &matches); + + // Simulate the search provider pre-grouping duplicate suggestions. + matches[0].duplicate_matches.push_back(matches.back()); + matches.pop_back(); + + matches[0].duplicate_matches.push_back(matches.back()); + matches.pop_back(); + + AutocompleteInput input(u"f", metrics::OmniboxEventProto::OTHER, + TestSchemeClassifier()); + AutocompleteResult result; + result.AppendMatches(matches); + result.SortAndCull(input, template_url_service_.get()); + + ASSERT_EQ(result.size(), 2u); + + auto* match = result.match_at(0); + // The non-entity SEARCH_SUGGEST suggestion should be promoted as the top + // match. + EXPECT_EQ(match->type, AutocompleteMatchType::SEARCH_SUGGEST); + EXPECT_TRUE(match->allowed_to_be_default_match); + + match = result.match_at(1); + // The entity search suggestion should have been demoted. + EXPECT_EQ(match->type, AutocompleteMatchType::SEARCH_SUGGEST_ENTITY); + EXPECT_TRUE(match->allowed_to_be_default_match); + + EXPECT_EQ(match->duplicate_matches.size(), 1u); + + // The non-entity match which is neither a SEARCH_SUGGEST nor a "specialized" + // search suggestion should remain in |duplicate_matches| (i.e. it's not + // promoted as the top match). + EXPECT_EQ(match->duplicate_matches.at(0).type, + AutocompleteMatchType::SEARCH_HISTORY); + EXPECT_TRUE(match->duplicate_matches.at(0).allowed_to_be_default_match); +} + TEST_F(AutocompleteResultTest, SortAndCullPromoteDuplicateSearchURLs) { // Register a template URL that corresponds to 'foo' search engine. TemplateURLData url_data;
diff --git a/components/omnibox/browser/most_visited_sites_provider.cc b/components/omnibox/browser/most_visited_sites_provider.cc index 4c3bc35..0e8d393b 100644 --- a/components/omnibox/browser/most_visited_sites_provider.cc +++ b/components/omnibox/browser/most_visited_sites_provider.cc
@@ -9,6 +9,7 @@ #include "base/bind.h" #include "base/containers/cxx20_erase.h" #include "base/feature_list.h" +#include "base/metrics/histogram_functions.h" #include "base/strings/escape.h" #include "components/history/core/browser/top_sites.h" #include "components/omnibox/browser/autocomplete_input.h" @@ -25,6 +26,21 @@ // The relevance score for suggest tiles. // Suggest tiles should be positioned below the Query Tiles object. constexpr const int kMostVisitedTilesRelevance = 1500; +constexpr const int kMaxRecordedTileIndex = 15; + +constexpr char kHistogramTileTypeCountSearch[] = + "Omnibox.SuggestTiles.TileTypeCount.Search"; +constexpr char kHistogramTileTypeCountURL[] = + "Omnibox.SuggestTiles.TileTypeCount.URL"; +constexpr char kHistogramDeletedTileType[] = + "Omnibox.SuggestTiles.DeletedTileType"; +constexpr char kHistogramDeletedTileIndex[] = + "Omnibox.SuggestTiles.DeletedTileIndex"; + +// GENERATED_JAVA_ENUM_PACKAGE: ( +// org.chromium.chrome.browser.omnibox.suggestions.mostvisited) +// GENERATED_JAVA_CLASS_NAME_OVERRIDE: SuggestTileType +enum SuggestTileType { kOther = 0, kURL = 1, kSearch = 2, kCount = 3 }; // Constructs an AutocompleteMatch from supplied details. AutocompleteMatch BuildMatch(AutocompleteProvider* provider, @@ -60,8 +76,13 @@ AutocompleteProviderClient* const client, const TileContainer& container, ACMatches& matches) { - if (container.empty()) + if (container.empty()) { + base::UmaHistogramExactLinear(kHistogramTileTypeCountSearch, 0, + kMaxRecordedTileIndex); + base::UmaHistogramExactLinear(kHistogramTileTypeCountURL, 0, + kMaxRecordedTileIndex); return false; + } if (base::FeatureList::IsEnabled(omnibox::kMostVisitedTiles)) { AutocompleteMatch match = BuildMatch( @@ -71,15 +92,31 @@ match.suggest_tiles.reserve(container.size()); auto* const url_service = client->GetTemplateURLService(); + size_t num_search_tiles = 0; + size_t num_url_tiles = 0; + for (const auto& tile : container) { + bool is_search = + url_service->IsSearchResultsPageFromDefaultSearchProvider(tile.url); + match.suggest_tiles.push_back({ .url = tile.url, .title = tile.title, - .is_search = - url_service->IsSearchResultsPageFromDefaultSearchProvider( - tile.url), + .is_search = is_search, }); + + if (is_search) { + num_search_tiles++; + } else { + num_url_tiles++; + } } + + base::UmaHistogramExactLinear(kHistogramTileTypeCountSearch, + num_search_tiles, kMaxRecordedTileIndex); + base::UmaHistogramExactLinear(kHistogramTileTypeCountURL, num_url_tiles, + kMaxRecordedTileIndex); + matches.push_back(std::move(match)); } else { int relevance = 600; @@ -211,11 +248,20 @@ return; } - const auto& url_to_delete = source_match.suggest_tiles[element_index].url; - BlockURL(url_to_delete); + const auto& tile_to_delete = source_match.suggest_tiles[element_index]; + + base::UmaHistogramExactLinear(kHistogramDeletedTileIndex, element_index, + kMaxRecordedTileIndex); + base::UmaHistogramExactLinear(kHistogramDeletedTileType, + tile_to_delete.is_search + ? SuggestTileType::kSearch + : SuggestTileType::kURL, + SuggestTileType::kCount); + + BlockURL(tile_to_delete.url); auto& tiles_to_update = matches_[0].suggest_tiles; - base::EraseIf(tiles_to_update, [&url_to_delete](const auto& tile) { - return tile.url == url_to_delete; + base::EraseIf(tiles_to_update, [&tile_to_delete](const auto& tile) { + return tile.url == tile_to_delete.url; }); if (tiles_to_update.empty()) {
diff --git a/components/omnibox/browser/most_visited_sites_provider_unittest.cc b/components/omnibox/browser/most_visited_sites_provider_unittest.cc index 94f34ceb..b51eac86 100644 --- a/components/omnibox/browser/most_visited_sites_provider_unittest.cc +++ b/components/omnibox/browser/most_visited_sites_provider_unittest.cc
@@ -9,6 +9,7 @@ #include <memory> #include <string> +#include "base/test/metrics/histogram_tester.h" #include "base/test/scoped_feature_list.h" #include "base/test/task_environment.h" #include "build/build_config.h" @@ -132,6 +133,7 @@ // AutocompleteProviderListener: void OnProviderUpdate(bool updated_matches) override; + base::HistogramTester histogram_; std::unique_ptr<base::test::SingleThreadTaskEnvironment> task_environment_; scoped_refptr<FakeTopSites> top_sites_; scoped_refptr<MostVisitedSitesProvider> provider_; @@ -366,9 +368,19 @@ // Commence delete. if (GetParam()) { + histogram_.ExpectTotalCount("Omnibox.SuggestTiles.TileTypeCount.Search", 1); + histogram_.ExpectBucketCount("Omnibox.SuggestTiles.TileTypeCount.Search", 0, + 1); + histogram_.ExpectTotalCount("Omnibox.SuggestTiles.TileTypeCount.URL", 1); + histogram_.ExpectBucketCount("Omnibox.SuggestTiles.TileTypeCount.URL", 5, + 1); + histogram_.ExpectTotalCount("Omnibox.SuggestTiles.DeletedTileIndex", 0); auto* match = GetMatch(AutocompleteMatchType::TILE_NAVSUGGEST, 0); ASSERT_NE(nullptr, match) << "No TILE_NAVSUGGEST Match found"; controller_->DeleteMatchElement(*match, 1); + histogram_.ExpectTotalCount("Omnibox.SuggestTiles.DeletedTileIndex", 1); + histogram_.ExpectBucketCount("Omnibox.SuggestTiles.DeletedTileIndex", 1, 1); + // Note: TileTypeCounts are not emitted after deletion. } else { auto* match = GetMatch(AutocompleteMatchType::NAVSUGGEST, 1); ASSERT_NE(nullptr, match) << "No NAVSUGGEST Match found"; @@ -395,9 +407,19 @@ // Commence delete of the only item that we have. if (GetParam()) { + histogram_.ExpectTotalCount("Omnibox.SuggestTiles.TileTypeCount.Search", 1); + histogram_.ExpectBucketCount("Omnibox.SuggestTiles.TileTypeCount.Search", 0, + 1); + histogram_.ExpectTotalCount("Omnibox.SuggestTiles.TileTypeCount.URL", 1); + histogram_.ExpectBucketCount("Omnibox.SuggestTiles.TileTypeCount.URL", 1, + 1); + histogram_.ExpectTotalCount("Omnibox.SuggestTiles.DeletedTileIndex", 0); auto* match = GetMatch(AutocompleteMatchType::TILE_NAVSUGGEST, 0); ASSERT_NE(nullptr, match) << "No TILE_NAVSUGGEST Match found"; controller_->DeleteMatchElement(*match, 0); + histogram_.ExpectTotalCount("Omnibox.SuggestTiles.DeletedTileIndex", 1); + histogram_.ExpectBucketCount("Omnibox.SuggestTiles.DeletedTileIndex", 0, 1); + // Note: TileTypeCounts are not emitted after deletion. } else { auto* match = GetMatch(AutocompleteMatchType::NAVSUGGEST, 0); ASSERT_NE(nullptr, match) << "No NAVSUGGEST Match found";
diff --git a/components/os_crypt/BUILD.gn b/components/os_crypt/BUILD.gn index 9d7a8ad..124e5ae5 100644 --- a/components/os_crypt/BUILD.gn +++ b/components/os_crypt/BUILD.gn
@@ -54,7 +54,8 @@ defines += [ "ALLOW_RUNTIME_CONFIGURABLE_KEY_STORAGE" ] } - if ((is_posix || is_fuchsia) && !is_apple && !(is_linux && !is_castos)) { + # TODO(crbug.com/1339022): Provide a Fuchsia-specific implementation. + if ((is_posix && !is_apple && !(is_linux && !is_castos)) || is_fuchsia) { sources += [ "os_crypt_posix.cc" ] }
diff --git a/components/payments/content/android/java/src/org/chromium/components/payments/AndroidPaymentApp.java b/components/payments/content/android/java/src/org/chromium/components/payments/AndroidPaymentApp.java index 7d7391a..d42f6397 100644 --- a/components/payments/content/android/java/src/org/chromium/components/payments/AndroidPaymentApp.java +++ b/components/payments/content/android/java/src/org/chromium/components/payments/AndroidPaymentApp.java
@@ -260,7 +260,9 @@ Intent isReadyToPayIntent = WebPaymentIntentHelper.createIsReadyToPayIntent( /*packageName=*/mPackageName, /*serviceName=*/mIsReadyToPayServiceName, removeUrlScheme(origin), removeUrlScheme(iframeOrigin), certificateChain, - WebPaymentIntentHelperTypeConverter.fromMojoPaymentMethodDataMap(methodDataMap)); + WebPaymentIntentHelperTypeConverter.fromMojoPaymentMethodDataMap(methodDataMap), + PaymentFeatureList.isEnabled( + PaymentFeatureList.IDENTITY_IN_CAN_MAKE_PAYMENT_EVENT_FEATURE)); if (mBypassIsReadyToPayServiceInTest) { respondToIsReadyToPayQuery(true); return;
diff --git a/components/payments/content/android/java/src/org/chromium/components/payments/PaymentFeatureList.java b/components/payments/content/android/java/src/org/chromium/components/payments/PaymentFeatureList.java index 39c96786..fd577f3 100644 --- a/components/payments/content/android/java/src/org/chromium/components/payments/PaymentFeatureList.java +++ b/components/payments/content/android/java/src/org/chromium/components/payments/PaymentFeatureList.java
@@ -21,6 +21,8 @@ public static final String ANDROID_APP_PAYMENT_UPDATE_EVENTS = "AndroidAppPaymentUpdateEvents"; public static final String ENFORCE_FULL_DELEGATION = "EnforceFullDelegation"; public static final String GPAY_APP_DYNAMIC_UPDATE = "GPayAppDynamicUpdate"; + public static final String IDENTITY_IN_CAN_MAKE_PAYMENT_EVENT_FEATURE = + "IdentityInCanMakePaymentEventFeature"; public static final String SECURE_PAYMENT_CONFIRMATION = "SecurePaymentConfirmationBrowser"; public static final String SERVICE_WORKER_PAYMENT_APPS = "ServiceWorkerPaymentApps"; public static final String PAYMENT_REQUEST_BASIC_CARD = "PaymentRequestBasicCard";
diff --git a/components/payments/content/android/java/src/org/chromium/components/payments/intent/WebPaymentIntentHelper.java b/components/payments/content/android/java/src/org/chromium/components/payments/intent/WebPaymentIntentHelper.java index 247375d..ae334064 100644 --- a/components/payments/content/android/java/src/org/chromium/components/payments/intent/WebPaymentIntentHelper.java +++ b/components/payments/content/android/java/src/org/chromium/components/payments/intent/WebPaymentIntentHelper.java
@@ -56,6 +56,7 @@ public static final String EXTRA_SHIPPING_OPTIONS = "shippingOptions"; // Deprecated parameters sent to the payment app for backward compatibility. + // TODO(crbug.com/1338538): Remove these parameters. public static final String EXTRA_DEPRECATED_CERTIFICATE_CHAIN = "certificateChain"; public static final String EXTRA_DEPRECATED_DATA = "data"; public static final String EXTRA_DEPRECATED_DATA_MAP = "dataMap"; @@ -258,8 +259,7 @@ } /** - * Create an intent to invoke a service that can answer "is ready to pay" query, or null of - * none. + * Create an intent to invoke a service that can answer "is ready to pay" query. * * @param packageName The name of the package of the payment app. Only non-empty string is * allowed. @@ -274,25 +274,24 @@ * @param methodDataMap The payment-method specific data for all applicable payment methods, * e.g., whether the app should be invoked in test or production, a merchant identifier, * or a public key. The map should have at least one entry. + * @param isIdentityInReadyToPayEnabled Whether the IS_READY_TO_PAY intent should pass merchant + * user identity to the payment app. * @return The intent to invoke the service. */ public static Intent createIsReadyToPayIntent(String packageName, String serviceName, String schemelessOrigin, String schemelessIframeOrigin, - @Nullable byte[][] certificateChain, Map<String, PaymentMethodData> methodDataMap) { + @Nullable byte[][] certificateChain, Map<String, PaymentMethodData> methodDataMap, + boolean isIdentityInReadyToPayEnabled) { Intent isReadyToPayIntent = new Intent(); checkStringNotEmpty(serviceName, "serviceName"); checkStringNotEmpty(packageName, "packageName"); isReadyToPayIntent.setClassName(packageName, serviceName); - - checkStringNotEmpty(schemelessOrigin, "schemelessOrigin"); - checkStringNotEmpty(schemelessIframeOrigin, "schemelessIframeOrigin"); - // certificateChain is ok to be null, left unchecked here. - checkNotEmpty(methodDataMap, "methodDataMap"); - isReadyToPayIntent.putExtras(buildExtras(/*id=*/null, - /*merchantName=*/null, schemelessOrigin, schemelessIframeOrigin, certificateChain, - methodDataMap, /*total=*/null, /*displayItems=*/null, /*modifiers=*/null, - /*paymentOptions=*/null, - /*shippingOptions=*/null)); + Bundle extras = new Bundle(); + if (isIdentityInReadyToPayEnabled) { + addCommonExtrasWithIdentity(schemelessOrigin, schemelessIframeOrigin, certificateChain, + methodDataMap, extras); + } + isReadyToPayIntent.putExtras(extras); return isReadyToPayIntent; } @@ -318,20 +317,23 @@ @Nullable Map<String, PaymentDetailsModifier> modifiers, @Nullable PaymentOptions paymentOptions, @Nullable List<PaymentShippingOption> shippingOptions) { - // The following checks follow the order of the parameters. + Bundle extras = new Bundle(); checkStringNotEmpty(id, "id"); + extras.putString(EXTRA_PAYMENT_REQUEST_ID, id); + checkNotNull(merchantName, "merchantName"); + extras.putString(EXTRA_MERCHANT_NAME, merchantName); - checkStringNotEmpty(schemelessOrigin, "schemelessOrigin"); - checkStringNotEmpty(schemelessIframeOrigin, "schemelessIframeOrigin"); - - // certificateChain is ok to be null, left unchecked here. - - checkNotEmpty(methodDataMap, "methodDataMap"); checkNotNull(total, "total"); + String serializedTotalAmount = total.amount.serialize(); + extras.putString(EXTRA_TOTAL, + serializedTotalAmount == null ? EMPTY_JSON_DATA : serializedTotalAmount); - // displayItems is ok to be null, left unchecked here. - // modifiers is ok to be null, left unchecked here. + // modifiers is ok to be null. + if (modifiers != null) { + extras.putString( + EXTRA_MODIFIERS, PaymentDetailsModifier.serializeModifiers(modifiers.values())); + } // shippingOptions should not be null when shipping is requested. if (paymentOptions != null && paymentOptions.requestShipping @@ -340,58 +342,6 @@ "shippingOptions should not be null or empty when shipping is requested."); } - return buildExtras(id, merchantName, schemelessOrigin, schemelessIframeOrigin, - certificateChain, methodDataMap, total, displayItems, modifiers, paymentOptions, - shippingOptions); - } - - // id, merchantName, total are ok to be null only for {@link #createIsReadyToPayIntent}. - private static Bundle buildExtras(@Nullable String id, @Nullable String merchantName, - String schemelessOrigin, String schemelessIframeOrigin, - @Nullable byte[][] certificateChain, Map<String, PaymentMethodData> methodDataMap, - @Nullable PaymentItem total, @Nullable List<PaymentItem> displayItems, - @Nullable Map<String, PaymentDetailsModifier> modifiers, - @Nullable PaymentOptions paymentOptions, - @Nullable List<PaymentShippingOption> shippingOptions) { - Bundle extras = new Bundle(); - - if (id != null) extras.putString(EXTRA_PAYMENT_REQUEST_ID, id); - - if (merchantName != null) extras.putString(EXTRA_MERCHANT_NAME, merchantName); - - assert !TextUtils.isEmpty(schemelessOrigin); - extras.putString(EXTRA_TOP_ORIGIN, schemelessOrigin); - - assert !TextUtils.isEmpty(schemelessIframeOrigin); - extras.putString(EXTRA_PAYMENT_REQUEST_ORIGIN, schemelessIframeOrigin); - - Parcelable[] serializedCertificateChain = null; - if (certificateChain != null && certificateChain.length > 0) { - serializedCertificateChain = buildCertificateChain(certificateChain); - extras.putParcelableArray(EXTRA_TOP_CERTIFICATE_CHAIN, serializedCertificateChain); - } - - assert methodDataMap != null && !methodDataMap.isEmpty(); - extras.putStringArrayList(EXTRA_METHOD_NAMES, new ArrayList<>(methodDataMap.keySet())); - - Bundle methodDataBundle = new Bundle(); - for (Map.Entry<String, PaymentMethodData> methodData : methodDataMap.entrySet()) { - checkNotNull(methodData.getValue(), "methodDataMap's entry value"); - methodDataBundle.putString(methodData.getKey(), methodData.getValue().stringifiedData); - } - extras.putParcelable(EXTRA_METHOD_DATA, methodDataBundle); - - if (modifiers != null) { - extras.putString( - EXTRA_MODIFIERS, PaymentDetailsModifier.serializeModifiers(modifiers.values())); - } - - if (total != null) { - String serializedTotalAmount = total.amount.serialize(); - extras.putString(EXTRA_TOTAL, - serializedTotalAmount == null ? EMPTY_JSON_DATA : serializedTotalAmount); - } - if (paymentOptions != null) { extras.putBundle(EXTRA_PAYMENT_OPTIONS, buildPaymentOptionsBundle(paymentOptions)); } @@ -403,17 +353,48 @@ extras.putParcelableArray(EXTRA_SHIPPING_OPTIONS, serializedShippingOptionList); } - return addDeprecatedExtras(id, schemelessOrigin, schemelessIframeOrigin, - serializedCertificateChain, methodDataMap, methodDataBundle, total, displayItems, - extras); + addCommonExtrasWithIdentity( + schemelessOrigin, schemelessIframeOrigin, certificateChain, methodDataMap, extras); + + return addDeprecatedPayIntentExtras(id, total, displayItems, extras); } - private static Bundle addDeprecatedExtras(@Nullable String id, String schemelessOrigin, - String schemelessIframeOrigin, @Nullable Parcelable[] serializedCertificateChain, - Map<String, PaymentMethodData> methodDataMap, Bundle methodDataBundle, - @Nullable PaymentItem total, @Nullable List<PaymentItem> displayItems, Bundle extras) { - if (id != null) extras.putString(EXTRA_DEPRECATED_ID, id); + // Adds to the given `extras` bundle the common fields for both the IS_READY_TO_PAY (if identity + // in can-make-payment feature is enabled) and the PAY intents. + private static Bundle addCommonExtrasWithIdentity(String schemelessOrigin, + String schemelessIframeOrigin, @Nullable byte[][] certificateChain, + Map<String, PaymentMethodData> methodDataMap, Bundle extras) { + checkStringNotEmpty(schemelessOrigin, "schemelessOrigin"); + extras.putString(EXTRA_TOP_ORIGIN, schemelessOrigin); + checkStringNotEmpty(schemelessIframeOrigin, "schemelessIframeOrigin"); + extras.putString(EXTRA_PAYMENT_REQUEST_ORIGIN, schemelessIframeOrigin); + + // certificateChain is ok to be null. + Parcelable[] serializedCertificateChain = null; + if (certificateChain != null && certificateChain.length > 0) { + serializedCertificateChain = buildCertificateChain(certificateChain); + extras.putParcelableArray(EXTRA_TOP_CERTIFICATE_CHAIN, serializedCertificateChain); + } + + checkNotEmpty(methodDataMap, "methodDataMap"); + extras.putStringArrayList(EXTRA_METHOD_NAMES, new ArrayList<>(methodDataMap.keySet())); + + Bundle methodDataBundle = new Bundle(); + for (Map.Entry<String, PaymentMethodData> methodData : methodDataMap.entrySet()) { + checkNotNull(methodData.getValue(), "methodDataMap's entry value"); + methodDataBundle.putString(methodData.getKey(), methodData.getValue().stringifiedData); + } + extras.putParcelable(EXTRA_METHOD_DATA, methodDataBundle); + + return addDeprecatedCommonExtrasWithIdentity(schemelessOrigin, schemelessIframeOrigin, + serializedCertificateChain, methodDataMap, methodDataBundle, extras); + } + + // TODO(crbug.com/1338538): Remove this method. + private static Bundle addDeprecatedCommonExtrasWithIdentity(String schemelessOrigin, + String schemelessIframeOrigin, @Nullable Parcelable[] serializedCertificateChain, + Map<String, PaymentMethodData> methodDataMap, Bundle methodDataBundle, Bundle extras) { extras.putString(EXTRA_DEPRECATED_ORIGIN, schemelessOrigin); extras.putString(EXTRA_DEPRECATED_IFRAME_ORIGIN, schemelessIframeOrigin); @@ -432,6 +413,15 @@ extras.putParcelable(EXTRA_DEPRECATED_DATA_MAP, methodDataBundle); + return extras; + } + + // TODO(crbug.com/1338538): Remove this method. + private static Bundle addDeprecatedPayIntentExtras( + String id, PaymentItem total, @Nullable List<PaymentItem> displayItems, Bundle extras) { + extras.putString(EXTRA_DEPRECATED_ID, id); + + // displayItems is ok to be null. String details = deprecatedSerializeDetails(total, displayItems); extras.putString(EXTRA_DEPRECATED_DETAILS, details == null ? EMPTY_JSON_DATA : details);
diff --git a/components/payments/content/android/payment_feature_list.cc b/components/payments/content/android/payment_feature_list.cc index 93b1d72..66c3d58 100644 --- a/components/payments/content/android/payment_feature_list.cc +++ b/components/payments/content/android/payment_feature_list.cc
@@ -20,6 +20,7 @@ // components/payments/core/features.h, content/public/common/content_features.h // or the .h file (for Android only features). const base::Feature* const kFeaturesExposedToJava[] = { + &::features::kIdentityInCanMakePaymentEventFeature, &::features::kPaymentRequestBasicCard, &::features::kSecurePaymentConfirmation, &::features::kServiceWorkerPaymentApps,
diff --git a/components/resources/security_interstitials_dev_ui_resources.grdp b/components/resources/security_interstitials_dev_ui_resources.grdp index 6a41517f..c828f2b 100644 --- a/components/resources/security_interstitials_dev_ui_resources.grdp +++ b/components/resources/security_interstitials_dev_ui_resources.grdp
@@ -3,5 +3,6 @@ <grit-part> <include name="IDR_SECURITY_INTERSTITIAL_UI_HTML" file="../security_interstitials/core/browser/resources/list_of_interstitials.html" + preprocess="true" type="BINDATA" /> </grit-part>
diff --git a/components/security_interstitials/core/browser/resources/list_of_interstitials.html b/components/security_interstitials/core/browser/resources/list_of_interstitials.html index f9a07f19..f5bf84b 100644 --- a/components/security_interstitials/core/browser/resources/list_of_interstitials.html +++ b/components/security_interstitials/core/browser/resources/list_of_interstitials.html
@@ -40,27 +40,31 @@ example.com (HSTS, non-overridable) </a> </li> - <li> - <a href="clock?clock_manipulation=2">Clock is ahead</a> - </li> - <li> - <a href="clock?clock_manipulation=-2">Clock is behind</a> - </li> + <if expr="not is_ios"> + <li> + <a href="clock?clock_manipulation=2">Clock is ahead</a> + </li> + <li> + <a href="clock?clock_manipulation=-2">Clock is behind</a> + </li> + </if> <li> <a href="ssl?type=hpkp_failure">Pinned certificate error</a> </li> <li> <a href="ssl?type=ct_failure&overridable=1">Certificate Transparency error</a> </li> - <li> - <a href="mitm-software-ssl?enterprise=0">MITM software</a> - </li> - <li> - <a href="mitm-software-ssl?enterprise=1">MITM software on an enterprise-managed machine</a> - </li> - <li> - <a href="blocked-interception">Blocked interception</a> - </li> + <if expr="not is_ios"> + <li> + <a href="mitm-software-ssl?enterprise=0">MITM software</a> + </li> + <li> + <a href="mitm-software-ssl?enterprise=1">MITM software on an enterprise-managed machine</a> + </li> + <li> + <a href="blocked-interception">Blocked interception</a> + </li> + </if> </ul> <h3>SafeBrowsing</h3> <h4>Loud</h4> @@ -84,24 +88,26 @@ <a href="safebrowsing?type=billing">Billing</a> </li> </ul> - <h4>Quiet (WebView)</h4> - <ul> - <li> - <a href="quietsafebrowsing?type=malware">Malware</a> - </li> - <li> - <a href="quietsafebrowsing?type=phishing">Phishing</a> - </li> - <li> - <a href="quietsafebrowsing?type=unwanted">Malicious Unwanted Software</a> - </li> - <li> - <a href="quietsafebrowsing?type=billing">Billing</a> - </li> - <li> - <a href="quietsafebrowsing?type=giant">Giant</a> - </li> - </ul> + <if expr="not is_ios"> + <h4>Quiet (WebView)</h4> + <ul> + <li> + <a href="quietsafebrowsing?type=malware">Malware</a> + </li> + <li> + <a href="quietsafebrowsing?type=phishing">Phishing</a> + </li> + <li> + <a href="quietsafebrowsing?type=unwanted">Malicious Unwanted Software</a> + </li> + <li> + <a href="quietsafebrowsing?type=billing">Billing</a> + </li> + <li> + <a href="quietsafebrowsing?type=giant">Giant</a> + </li> + </ul> + </if> <h3>Captive Portal</h3> <ul> <li> @@ -118,40 +124,42 @@ </a> </li> </ul> - <h3>Origin Policy</h3> - <ul> - <li> - <a href="origin_policy"> - Origin Policy Error - </a> - </li> - </ul> - <h3>Lookalike URL Warnings</h3> - <ul> - <li> - <a href="lookalike">Lookalike URL</a> - </li> - <li> - <a href="lookalike?no-safe-url=1">Lookalike URL (no suggested URL)</a> - </li> - </ul> - <h3>Insecure (Mixed) Form Submission Warnings</h3> - <ul> - <li> - <a href="insecure_form">Insecure Form</a> - </li> - </ul> - <h3>HTTPS-Only Mode Warnings</h3> - <ul> - <li> - <a href="https_only">HTTPS-Only Mode</a> - </li> - </ul> - <h3>Supervised User</h3> - <ul> - <li> - <a href="supervised_user?allow-access-requests=1">Supervised User Blocked Site</a> - </li> - </ul> + <if expr="not is_ios"> + <h3>Origin Policy</h3> + <ul> + <li> + <a href="origin_policy"> + Origin Policy Error + </a> + </li> + </ul> + <h3>Lookalike URL Warnings</h3> + <ul> + <li> + <a href="lookalike">Lookalike URL</a> + </li> + <li> + <a href="lookalike?no-safe-url=1">Lookalike URL (no suggested URL)</a> + </li> + </ul> + <h3>Insecure (Mixed) Form Submission Warnings</h3> + <ul> + <li> + <a href="insecure_form">Insecure Form</a> + </li> + </ul> + <h3>HTTPS-Only Mode Warnings</h3> + <ul> + <li> + <a href="https_only">HTTPS-Only Mode</a> + </li> + </ul> + <h3>Supervised User</h3> + <ul> + <li> + <a href="supervised_user?allow-access-requests=1">Supervised User Blocked Site</a> + </li> + </ul> + </if> </body> </html>
diff --git a/components/sync/driver/resources/BUILD.gn b/components/sync/driver/resources/BUILD.gn index 815de12..51d6810f 100644 --- a/components/sync/driver/resources/BUILD.gn +++ b/components/sync/driver/resources/BUILD.gn
@@ -20,18 +20,18 @@ } #TODO(crbug.com/986001): Migrate the files below to TypeScript. -preprocessed_files = [ "sync_index.js" ] +preprocessed_files = [ "sync_index.ts" ] non_preprocessed_files = [ "about.js", "chrome_sync.ts", "data.js", "invalidations.js", "search.ts", - "sync_log.js", - "sync_node_browser.js", + "sync_log.ts", + "sync_node_browser.ts", "sync_search.ts", "traffic_log.js", - "user_events.js", + "user_events.ts", ] preprocess_if_expr("preprocess") { @@ -53,6 +53,7 @@ definitions = [ "//tools/typescript/definitions/chrome_send.d.ts", "//tools/typescript/definitions/pending.d.ts", + "jstemplate.d.ts", ] deps = [ "//ui/webui/resources:library" ] extra_deps = [
diff --git a/components/sync/driver/resources/chrome_sync.ts b/components/sync/driver/resources/chrome_sync.ts index d7f2394..1bd188a 100644 --- a/components/sync/driver/resources/chrome_sync.ts +++ b/components/sync/driver/resources/chrome_sync.ts
@@ -98,8 +98,18 @@ chrome.send('triggerRefresh'); } -export type SyncNodeList = Array<{NON_UNIQUE_NAME: string}>; -export type SyncNodeMap = Array<{nodes: SyncNodeList}>; +export type SyncNode = { + ID: string, + IS_DIR: boolean, + METAHANDLE: number, + NON_UNIQUE_NAME: string, + PARENT_ID: string, + UNIQUE_SERVER_TAG: string, + modelType: string, + positionIndex?: number, +}; + +export type SyncNodeMap = Array<{nodes: SyncNode[]}>; let nodesForTest: SyncNodeMap|null = null;
diff --git a/components/sync/driver/resources/jstemplate.d.ts b/components/sync/driver/resources/jstemplate.d.ts new file mode 100644 index 0000000..f477f052 --- /dev/null +++ b/components/sync/driver/resources/jstemplate.d.ts
@@ -0,0 +1,9 @@ +// Copyright 2022 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. + +declare class JsEvalContext { + constructor(data: any); +} +declare function jstProcess( + context: JsEvalContext, template: HTMLElement): void;
diff --git a/components/sync/driver/resources/search.ts b/components/sync/driver/resources/search.ts index 6b3024d..15395823 100644 --- a/components/sync/driver/resources/search.ts +++ b/components/sync/driver/resources/search.ts
@@ -6,7 +6,7 @@ import {assert} from 'chrome://resources/js/assert_ts.js'; -import {SyncNodeList} from './chrome_sync.js'; +import {SyncNode} from './chrome_sync.js'; import {decorateQuickQueryControls, SyncSearchManager} from './sync_search.js'; const submit = document.querySelector<HTMLButtonElement>('#sync-search-submit'); @@ -22,7 +22,7 @@ const manager = new SyncSearchManager(query, submit, status, results, detail); // Add a way to override the data model for the sync results list for testing. -function setupSyncResultsListForTest(data: SyncNodeList) { +function setupSyncResultsListForTest(data: SyncNode[]) { manager.setDataForTest(data); }
diff --git a/components/sync/driver/resources/sync_index.js b/components/sync/driver/resources/sync_index.ts similarity index 83% rename from components/sync/driver/resources/sync_index.js rename to components/sync/driver/resources/sync_index.ts index 92e5e63..a9944610 100644 --- a/components/sync/driver/resources/sync_index.js +++ b/components/sync/driver/resources/sync_index.ts
@@ -16,8 +16,8 @@ import './strings.m.js'; import './invalidations.js'; +import {assert} from 'chrome://resources/js/assert_ts.js'; import {isWindows} from 'chrome://resources/js/cr.m.js'; -import {$} from 'chrome://resources/js/util.m.js'; // Allow platform specific CSS rules. // @@ -27,4 +27,6 @@ document.documentElement.setAttribute('os', 'win'); } -document.querySelector('cr-tab-box').hidden = false; +const tabBox = document.querySelector('cr-tab-box'); +assert(tabBox); +tabBox.hidden = false;
diff --git a/components/sync/driver/resources/sync_log.js b/components/sync/driver/resources/sync_log.ts similarity index 66% rename from components/sync/driver/resources/sync_log.js rename to components/sync/driver/resources/sync_log.ts index d1f3d56..b00d8595 100644 --- a/components/sync/driver/resources/sync_log.js +++ b/components/sync/driver/resources/sync_log.ts
@@ -5,29 +5,30 @@ import {addWebUIListener} from 'chrome://resources/js/cr.m.js'; import {NativeEventTarget as EventTarget} from 'chrome://resources/js/cr/event_target.m.js'; +type LogEntry = { + submodule: string, + event: string, + date: Date, + details: object, + textDetails: string, +}; + /** * Creates a new log object which then immediately starts recording sync * protocol events. Recorded entries are available in the 'entries' * property and there is an 'append' event which can be listened to. */ class Log extends EventTarget { + /** Must match the value in SyncInternalsMessageHandler::OnProtocolEvent(). */ + private protocolEventName_: string = 'onProtocolEvent'; + + /** The recorded log entries. */ + entries: LogEntry[] = []; + constructor() { super(); - /** - * Must match the value in SyncInternalsMessageHandler::OnProtocolEvent(). - * @private - * @type {string} - */ - this.protocolEventName_ = 'onProtocolEvent'; - - /** - * The recorded log entries. - * @type {!Array} - */ - this.entries = []; - - addWebUIListener(this.protocolEventName_, (response) => { + addWebUIListener(this.protocolEventName_, (response: object) => { this.log_(response); }); } @@ -36,9 +37,9 @@ * Records a single event with the given parameters and fires the * 'append' event with the newly-created event as the 'detail' * field of a custom event. - * @param {!Object} details A dictionary of event-specific details. + * @param details A dictionary of event-specific details. */ - log_(details) { + private log_(details: object) { const entry = { submodule: 'protocol', event: this.protocolEventName_, @@ -49,8 +50,8 @@ entry.textDetails = JSON.stringify(entry.details, null, 2); this.entries.push(entry); // Fire append event. - const e = document.createEvent('CustomEvent'); - e.initCustomEvent('append', false, false, entry); + const e = new CustomEvent( + 'append', {bubbles: false, cancelable: false, detail: entry}); this.dispatchEvent(e); } }
diff --git a/components/sync/driver/resources/sync_node_browser.js b/components/sync/driver/resources/sync_node_browser.js deleted file mode 100644 index 0f3f862..0000000 --- a/components/sync/driver/resources/sync_node_browser.js +++ /dev/null
@@ -1,177 +0,0 @@ -// Copyright (c) 2011 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. - -import 'chrome://resources/cr_elements/cr_splitter/cr_splitter.js'; -import 'chrome://resources/cr_elements/cr_tree/cr_tree.js'; -import 'chrome://resources/cr_elements/cr_tree/cr_tree_item.js'; - -import {$} from 'chrome://resources/js/util.m.js'; - -import {getAllNodes} from './chrome_sync.js'; - -/** - * A helper function to determine if a node is the root of its type. - * - * @param {!Object} node The node to check. - */ -function isTypeRootNode(node) { - return node.PARENT_ID === 'r' && node.UNIQUE_SERVER_TAG !== ''; -} - -/** - * A helper function to determine if a node is a child of the given parent. - * - * @param {!Object} parent node. - * @param {!Object} node The node to check. - */ -function isChildOf(parentNode, node) { - if (node.PARENT_ID !== '') { - return node.PARENT_ID === parentNode.ID; - } else { - return node.modelType === parentNode.modelType; - } -} - -/** - * A helper function to sort sync nodes. - * - * Sorts by position index if possible, falls back to sorting by name, and - * finally sorting by METAHANDLE. - * - * If this proves to be slow and expensive, we should experiment with moving - * this functionality to C++ instead. - */ -function nodeComparator(nodeA, nodeB) { - if (nodeA.hasOwnProperty('positionIndex') && - nodeB.hasOwnProperty('positionIndex')) { - return nodeA.positionIndex - nodeB.positionIndex; - } else if (nodeA.NON_UNIQUE_NAME !== nodeB.NON_UNIQUE_NAME) { - return nodeA.NON_UNIQUE_NAME.localeCompare(nodeB.NON_UNIQUE_NAME); - } else { - return nodeA.METAHANDLE - nodeB.METAHANDLE; - } -} - -/** - * Updates the node detail view with the details for the given node. - * @param {!Object} node The struct representing the node we want to display. - */ -function updateNodeDetailView(node) { - const nodeDetailsView = $('node-details'); - nodeDetailsView.hidden = false; - jstProcess(new JsEvalContext(node.detail.payload), nodeDetailsView); -} - -/** - * Updates the 'Last refresh time' display. - * @param {string} str The text to display. - */ -function setLastRefreshTime(str) { - $('node-browser-refresh-time').textContent = str; -} - -/** - * Clears any existing UI state. Useful prior to a refresh. - */ -function clear() { - const treeContainer = $('sync-node-tree-container'); - while (treeContainer.firstChild) { - treeContainer.removeChild(treeContainer.firstChild); - } - - const nodeDetailsView = $('node-details'); - nodeDetailsView.hidden = true; -} - -function setNode(treeItem, node) { - treeItem.detail.payload = node; - treeItem.label = node.NON_UNIQUE_NAME; - if (node.IS_DIR) { - treeItem.toggleAttribute('may-have-children', true); - - // Load children on expand. - treeItem.toggleAttribute('expanded', false); - treeItem.addEventListener('cr-tree-item-expand', handleExpand(treeItem)); - } else { - treeItem.classList.add('leaf'); - } -} - -function handleExpand(treeItem) { - if (treeItem.hasChildren) { - return; - } - - const treeItemData = treeItem.detail.payload; - const treeData = treeItem.tree.detail.payload; - const children = treeData.filter(node => isChildOf(treeItemData, node)); - children.sort(nodeComparator); - - children.forEach(function(node) { - const item = document.createElement('cr-tree-item'); - treeItem.add(item); - setNode(item, node); - }); -} - -/** - * Fetch the latest set of nodes and refresh the UI. - */ -function refresh() { - $('node-browser-refresh-button').disabled = true; - - clear(); - setLastRefreshTime('In progress since ' + (new Date()).toLocaleString()); - - getAllNodes(function(nodeMap) { - let nodes = []; - if (nodeMap && nodeMap.length > 0) { - // Put all nodes into one big list that ignores the type. - nodes = nodeMap.map(x => x.nodes).reduce((a, b) => a.concat(b)); - } - - const treeContainer = $('sync-node-tree-container'); - const tree = document.createElement('cr-tree'); - tree.id = 'sync-node-tree'; - tree.addEventListener('cr-tree-change', () => { - if (tree.selectedItem) { - updateNodeDetailView(tree.selectedItem); - } - }); - treeContainer.appendChild(tree); - - tree.detail = {payload: nodes, children: {}}; - const roots = nodes.filter(isTypeRootNode); - roots.sort(nodeComparator); - roots.forEach(typeRoot => { - const child = document.createElement('cr-tree-item'); - tree.add(child); - setNode(child, typeRoot); - }); - - setLastRefreshTime((new Date()).toLocaleString()); - $('node-browser-refresh-button').disabled = false; - }); -} - -document.addEventListener('DOMContentLoaded', function(e) { - $('node-browser-refresh-button').addEventListener('click', refresh); - const splitter = document.querySelector('#sync-node-splitter'); - splitter.addEventListener('resize', () => { - const treeElement = document.querySelector('#sync-node-tree-container'); - const newWidth = parseFloat(treeElement.style.width); - treeElement.style.minWidth = Math.max(newWidth, 50) + 'px'; - }); - - // Automatically trigger a refresh the first time this tab is selected. - document.querySelector('cr-tab-box') - .addEventListener('selected-index-change', function f(e) { - if (document.querySelector('#sync-browser-tab') - .hasAttribute('selected')) { - document.querySelector('cr-tab-box') - .removeEventListener('selected-index-change', f); - refresh(); - } - }); -});
diff --git a/components/sync/driver/resources/sync_node_browser.ts b/components/sync/driver/resources/sync_node_browser.ts new file mode 100644 index 0000000..93de353 --- /dev/null +++ b/components/sync/driver/resources/sync_node_browser.ts
@@ -0,0 +1,196 @@ +// Copyright (c) 2011 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. + +import 'chrome://resources/cr_elements/cr_splitter/cr_splitter.js'; +import 'chrome://resources/cr_elements/cr_tree/cr_tree.js'; +import 'chrome://resources/cr_elements/cr_tree/cr_tree_item.js'; + +import {CrTreeItemElement} from 'chrome://resources/cr_elements/cr_tree/cr_tree_item.js'; +import {assert} from 'chrome://resources/js/assert_ts.js'; + +import {getAllNodes, SyncNode, SyncNodeMap} from './chrome_sync.js'; + +/** + * A helper function to determine if a node is the root of its type. + */ +function isTypeRootNode(node: SyncNode): boolean { + return node.PARENT_ID === 'r' && node.UNIQUE_SERVER_TAG !== ''; +} + +/** + * A helper function to determine if a node is a child of the given parent. + */ +function isChildOf(parentNode: SyncNode, node: SyncNode) { + if (node.PARENT_ID !== '') { + return node.PARENT_ID === parentNode.ID; + } else { + return node.modelType === parentNode.modelType; + } +} + +/** + * A helper function to sort sync nodes. + * + * Sorts by position index if possible, falls back to sorting by name, and + * finally sorting by METAHANDLE. + * + * If this proves to be slow and expensive, we should experiment with moving + * this functionality to C++ instead. + */ +function nodeComparator(nodeA: SyncNode, nodeB: SyncNode): number { + if (nodeA.hasOwnProperty('positionIndex') && + nodeB.hasOwnProperty('positionIndex')) { + return nodeA.positionIndex! - nodeB.positionIndex!; + } else if (nodeA.NON_UNIQUE_NAME !== nodeB.NON_UNIQUE_NAME) { + return nodeA.NON_UNIQUE_NAME.localeCompare(nodeB.NON_UNIQUE_NAME); + } else { + return nodeA.METAHANDLE - nodeB.METAHANDLE; + } +} + +/** + * Updates the node detail view with the details for the given node. + * @param node The struct representing the node we want to display. + */ +function updateNodeDetailView(node: CrTreeItemElement) { + const nodeDetailsView = document.querySelector<HTMLElement>('#node-details'); + assert(nodeDetailsView); + nodeDetailsView.hidden = false; + const detail = node.detail as {payload: SyncNode}; + jstProcess(new JsEvalContext(detail.payload), nodeDetailsView); +} + +/** + * Updates the 'Last refresh time' display. + * @param str The text to display. + */ +function setLastRefreshTime(str: string) { + const refreshTime = + document.querySelector<HTMLElement>('#node-browser-refresh-time'); + assert(refreshTime); + refreshTime.textContent = str; +} + +/** + * Clears any existing UI state. Useful prior to a refresh. + */ +function clear() { + const treeContainer = + document.querySelector<HTMLElement>('#sync-node-tree-container'); + assert(treeContainer); + while (treeContainer.firstChild) { + treeContainer.removeChild(treeContainer.firstChild); + } + + const nodeDetailsView = document.querySelector<HTMLElement>('#node-details'); + assert(nodeDetailsView); + nodeDetailsView.hidden = true; +} + +function setNode(treeItem: CrTreeItemElement, node: SyncNode) { + (treeItem.detail as {payload: SyncNode}).payload = node; + treeItem.label = node.NON_UNIQUE_NAME; + if (node.IS_DIR) { + treeItem.toggleAttribute('may-have-children', true); + + // Load children on expand. + treeItem.toggleAttribute('expanded', false); + treeItem.addEventListener( + 'cr-tree-item-expand', () => handleExpand(treeItem)); + } else { + treeItem.classList.add('leaf'); + } +} + +function handleExpand(treeItem: CrTreeItemElement) { + if (treeItem.hasChildren) { + return; + } + + const treeItemData = (treeItem.detail as {payload: SyncNode}).payload; + const treeData = (treeItem.tree!.detail as {payload: SyncNode[]}).payload; + const children = treeData.filter(node => isChildOf(treeItemData, node)); + children.sort(nodeComparator); + + children.forEach(function(node: SyncNode) { + const item = document.createElement('cr-tree-item'); + treeItem.add(item); + setNode(item, node); + }); +} + +/** + * Fetch the latest set of nodes and refresh the UI. + */ +function refresh() { + const refreshButton = + document.querySelector<HTMLButtonElement>('#node-browser-refresh-button'); + assert(refreshButton); + refreshButton.disabled = true; + + clear(); + setLastRefreshTime('In progress since ' + (new Date()).toLocaleString()); + + getAllNodes(function(nodeMap: SyncNodeMap) { + let nodes: SyncNode[] = []; + if (nodeMap && nodeMap.length > 0) { + // Put all nodes into one big list that ignores the type. + nodes = nodeMap.map(x => x.nodes).reduce((a, b) => a.concat(b)); + } + + const treeContainer = + document.querySelector<HTMLElement>('#sync-node-tree-container'); + assert(treeContainer); + const tree = document.createElement('cr-tree'); + tree.id = 'sync-node-tree'; + tree.addEventListener('cr-tree-change', () => { + if (tree.selectedItem) { + updateNodeDetailView(tree.selectedItem as CrTreeItemElement); + } + }); + treeContainer.appendChild(tree); + + tree.detail = {payload: nodes, children: {}}; + const roots = nodes.filter(isTypeRootNode); + roots.sort(nodeComparator); + roots.forEach(typeRoot => { + const child = document.createElement('cr-tree-item'); + tree.add(child); + setNode(child, typeRoot); + }); + + setLastRefreshTime((new Date()).toLocaleString()); + refreshButton.disabled = false; + }); +} + +document.addEventListener('DOMContentLoaded', () => { + const refreshButton = + document.querySelector<HTMLButtonElement>('#node-browser-refresh-button'); + assert(refreshButton); + refreshButton.addEventListener('click', refresh); + const splitter = document.querySelector<HTMLElement>('#sync-node-splitter'); + assert(splitter); + splitter.addEventListener('resize', () => { + const treeElement = + document.querySelector<HTMLElement>('#sync-node-tree-container'); + assert(treeElement); + const newWidth = parseFloat(treeElement.style.width); + treeElement.style.minWidth = Math.max(newWidth, 50) + 'px'; + }); + + // Automatically trigger a refresh the first time this tab is selected. + const tabBox = document.querySelector('cr-tab-box'); + assert(tabBox); + tabBox.addEventListener('selected-index-change', function f() { + const syncBrowserTab = + document.querySelector<HTMLElement>('#sync-browser-tab'); + assert(syncBrowserTab); + if (syncBrowserTab.hasAttribute('selected')) { + assert(tabBox); + tabBox.removeEventListener('selected-index-change', f); + refresh(); + } + }); +});
diff --git a/components/sync/driver/resources/sync_search.ts b/components/sync/driver/resources/sync_search.ts index 55d792d2..1e9067d 100644 --- a/components/sync/driver/resources/sync_search.ts +++ b/components/sync/driver/resources/sync_search.ts
@@ -4,7 +4,7 @@ import {assert} from 'chrome://resources/js/assert_ts.js'; -import {getAllNodes, SyncNodeList, SyncNodeMap, Timer} from './chrome_sync.js'; +import {getAllNodes, SyncNode, SyncNodeMap, Timer} from './chrome_sync.js'; const ERROR_ATTR: string = 'error'; const SELECTED_ATTR: string = 'selected'; @@ -131,7 +131,7 @@ const regex = new RegExp(query); getAllNodes((nodeMap: SyncNodeMap) => { // Put all nodes into one big list that ignores the type. - const nodes: SyncNodeList = + const nodes: SyncNode[] = nodeMap.map(x => x.nodes).reduce((a, b) => a.concat(b)); if (this.currSearchId_ !== searchId) { return;
diff --git a/components/sync/driver/resources/user_events.js b/components/sync/driver/resources/user_events.js deleted file mode 100644 index 6a3e699..0000000 --- a/components/sync/driver/resources/user_events.js +++ /dev/null
@@ -1,15 +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. - -import {$} from 'chrome://resources/js/util.m.js'; -import {writeUserEvent} from './chrome_sync.js'; - -function write() { - writeUserEvent( - $('event-time-usec-input').value, $('navigation-id-input').value); -} - -document.addEventListener('DOMContentLoaded', () => { - $('create-event-button').addEventListener('click', write); -}, false);
diff --git a/components/sync/driver/resources/user_events.ts b/components/sync/driver/resources/user_events.ts new file mode 100644 index 0000000..52e4fa9 --- /dev/null +++ b/components/sync/driver/resources/user_events.ts
@@ -0,0 +1,22 @@ +// 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. + +import {assert} from 'chrome://resources/js/assert_ts.js'; + +import {writeUserEvent} from './chrome_sync.js'; + +function write() { + const timeInput = + document.querySelector<HTMLInputElement>('#event-time-usec-input'); + const navigationInput = + document.querySelector<HTMLInputElement>('#navigation-id-input'); + assert(timeInput && navigationInput); + writeUserEvent(timeInput.value, navigationInput.value); +} + +document.addEventListener('DOMContentLoaded', () => { + const button = document.querySelector<HTMLElement>('#create-event-button'); + assert(button); + button.addEventListener('click', write); +}, false);
diff --git a/components/user_notes/browser/user_note_instance.cc b/components/user_notes/browser/user_note_instance.cc index 373b8d1..65ec9f7 100644 --- a/components/user_notes/browser/user_note_instance.cc +++ b/components/user_notes/browser/user_note_instance.cc
@@ -57,6 +57,10 @@ std::move(did_finish_attachment_callback_).Run(); } +void UserNoteInstance::OnWebHighlightFocused() { + parent_manager_->OnWebHighlightFocused(model_->id()); +} + void UserNoteInstance::OnNoteDetached() { rect_ = gfx::Rect(); DCHECK(IsDetached());
diff --git a/components/user_notes/browser/user_note_instance.h b/components/user_notes/browser/user_note_instance.h index 076a19c9..99845b8 100644 --- a/components/user_notes/browser/user_note_instance.h +++ b/components/user_notes/browser/user_note_instance.h
@@ -56,6 +56,10 @@ // blink::mojom::AnnotationAgentHost implementation. void DidFinishAttachment(const gfx::Rect& rect) override; + // TODO(corising) and TODO(bokan): add the following method to + // AnnotationAgentHost interface once the caller is implemented in Blink. + void OnWebHighlightFocused(); + // TODO(gujen) and TODO(bokan): add the following method to the // AnnotationAgentHost interface so it's called when a note becomes detached. // Mark this one as override.
diff --git a/components/user_notes/browser/user_note_manager.cc b/components/user_notes/browser/user_note_manager.cc index 915e1b8..5bc63df 100644 --- a/components/user_notes/browser/user_note_manager.cc +++ b/components/user_notes/browser/user_note_manager.cc
@@ -62,6 +62,10 @@ instance_map_.erase(entry_it); } +void UserNoteManager::OnWebHighlightFocused(const base::UnguessableToken& id) { + service_->OnWebHighlightFocused(id, &page().GetMainDocument()); +} + void UserNoteManager::AddNoteInstance(std::unique_ptr<UserNoteInstance> note) { AddNoteInstance(std::move(note), base::DoNothing()); }
diff --git a/components/user_notes/browser/user_note_manager.h b/components/user_notes/browser/user_note_manager.h index 9482866..461d935 100644 --- a/components/user_notes/browser/user_note_manager.h +++ b/components/user_notes/browser/user_note_manager.h
@@ -50,6 +50,10 @@ // Destroys the note instance associated with the given GUID. void RemoveNote(const base::UnguessableToken& id); + // Notifies the service that the web highlight has been focused for the given + // id and RenderFrameHost. + void OnWebHighlightFocused(const base::UnguessableToken& id); + // Stores the given note instance into this object's instance map, then kicks // off its asynchronous initialization in the renderer process, passing it the // provided callback for when it finishes.
diff --git a/components/user_notes/browser/user_note_service.cc b/components/user_notes/browser/user_note_service.cc index b9dd67db..ed9613b 100644 --- a/components/user_notes/browser/user_note_service.cc +++ b/components/user_notes/browser/user_note_service.cc
@@ -160,6 +160,15 @@ ui->StartNoteCreation(instance_raw); } +void UserNoteService::OnWebHighlightFocused(const base::UnguessableToken& id, + content::RenderFrameHost* rfh) { + DCHECK(IsUserNotesEnabled()); + DCHECK(rfh); + UserNotesUI* ui = delegate_->GetUICoordinatorForFrame(rfh); + DCHECK(ui); + ui->FocusNote(id); +} + void UserNoteService::OnNoteSelected(const base::UnguessableToken& id, content::RenderFrameHost* rfh) { DCHECK(IsUserNotesEnabled());
diff --git a/components/user_notes/browser/user_note_service.h b/components/user_notes/browser/user_note_service.h index 8fa56a66..8e26a56 100644 --- a/components/user_notes/browser/user_note_service.h +++ b/components/user_notes/browser/user_note_service.h
@@ -92,6 +92,11 @@ std::string selector, gfx::Rect rect); + // Called by a note manager when a user selects a web highlight in the page. + // This causes the associated note to become focused in the UserNotesUI. + void OnWebHighlightFocused(const base::UnguessableToken& id, + content::RenderFrameHost* rfh); + // UserNotesUIDelegate implementation. void OnNoteSelected(const base::UnguessableToken& id, content::RenderFrameHost* rfh) override;
diff --git a/components/user_notes/interfaces/user_notes_ui.h b/components/user_notes/interfaces/user_notes_ui.h index b3e4b612..10c9ca6e 100644 --- a/components/user_notes/interfaces/user_notes_ui.h +++ b/components/user_notes/interfaces/user_notes_ui.h
@@ -5,8 +5,6 @@ #ifndef COMPONENTS_USER_NOTES_INTERFACES_USER_NOTES_UI_H_ #define COMPONENTS_USER_NOTES_INTERFACES_USER_NOTES_UI_H_ -#include <string> - #include "base/unguessable_token.h" #include "ui/gfx/geometry/rect.h"
diff --git a/components/viz/service/display/resolved_frame_data.cc b/components/viz/service/display/resolved_frame_data.cc index 19546ed..07eb70c 100644 --- a/components/viz/service/display/resolved_frame_data.cc +++ b/components/viz/service/display/resolved_frame_data.cc
@@ -106,8 +106,6 @@ render_pass_id_map_.reserve(num_render_pass); resolved_passes_.reserve(num_render_pass); - root_damage_rect_ = render_passes.back()->damage_rect; - auto& child_to_parent_map = resource_provider_->GetChildToParentMap(child_resource_id_); @@ -127,17 +125,14 @@ fixed.remapped_id = remapped_id; fixed.is_root = i == num_render_pass - 1; - bool add_quad_damage_to_root_damage_rect = - fixed.is_root && render_pass->has_per_quad_damage; - // Loop through the quads, remapping resource ids and storing them. auto& draw_quads = fixed.draw_quads; draw_quads.reserve(render_pass->quad_list.size()); for (auto* quad : render_pass->quad_list) { - if (add_quad_damage_to_root_damage_rect) { + if (render_pass->has_per_quad_damage) { auto optional_damage = GetOptionalDamageRectFromQuad(quad); if (optional_damage.has_value()) { - root_damage_rect_.Union(optional_damage.value()); + fixed.prewalk_quads.push_back(quad); } } @@ -269,8 +264,7 @@ frame_index_ == previous_frame_index_ + 1; } -gfx::Rect ResolvedFrameData::GetSurfaceDamage( - bool include_per_quad_damage) const { +gfx::Rect ResolvedFrameData::GetSurfaceDamage() const { DCHECK(valid_); // The |damage_rect| set in |SurfaceAnimationManager| is the |output_rect|. @@ -286,9 +280,6 @@ if (IsSameFrameAsLastAggregation()) { return gfx::Rect(); } else if (IsNextFrameSinceLastAggregation()) { - if (include_per_quad_damage) - return root_damage_rect_; - return resolved_passes_.back().render_pass().damage_rect; }
diff --git a/components/viz/service/display/resolved_frame_data.h b/components/viz/service/display/resolved_frame_data.h index 0e16994..7e063868 100644 --- a/components/viz/service/display/resolved_frame_data.h +++ b/components/viz/service/display/resolved_frame_data.h
@@ -209,10 +209,9 @@ bool IsNextFrameSinceLastAggregation() const; // Returns surface damage rect. This is based on changes from the - // CompositorFrame aggregated last frame. If |include_per_quad_damage| then - // the damage_rect will include unioned per quad damage, otherwise it will be - // limited to the root render passes damage_rect. - gfx::Rect GetSurfaceDamage(bool include_per_quad_damage) const; + // CompositorFrame aggregated last frame. This limited to the root render + // passes damage_rect and does not include individual quads that add damage. + gfx::Rect GetSurfaceDamage() const; // Returns the root render pass output_rect. const gfx::Rect& GetOutputRect() const; @@ -234,7 +233,6 @@ base::flat_map<CompositorRenderPassId, ResolvedPassData*> render_pass_id_map_; base::flat_map<CompositorRenderPassId, AggregatedRenderPassId> aggregated_id_map_; - gfx::Rect root_damage_rect_; uint64_t previous_frame_index_ = kInvalidFrameIndex;
diff --git a/components/viz/service/display/resolved_frame_data_unittest.cc b/components/viz/service/display/resolved_frame_data_unittest.cc index bb93be4..587ac02 100644 --- a/components/viz/service/display/resolved_frame_data_unittest.cc +++ b/components/viz/service/display/resolved_frame_data_unittest.cc
@@ -203,13 +203,12 @@ resolved_frame.MarkAsUsedInAggregation(); - // GetSurfaceDamage() should be the union of render pass and quad damage if - // `include_per_quad_damage` is true, otherwise just render pass damage. - constexpr gfx::Rect full_damage_rect(10, 10, 80, 80); - EXPECT_EQ(resolved_frame.GetSurfaceDamage(/*include_per_quad_damage=*/true), - full_damage_rect); - EXPECT_EQ(resolved_frame.GetSurfaceDamage(/*include_per_quad_damage=*/false), - pass_damage_rect); + // The damage rect should not include TextureDrawQuad's damage_rect. + EXPECT_EQ(resolved_frame.GetSurfaceDamage(), pass_damage_rect); + + // The quads to prewalk should only include the TextureDrawQuad. + EXPECT_THAT(resolved_frame.GetRootRenderPassData().prewalk_quads(), + testing::ElementsAre(IsTextureQuad())); } TEST_F(ResolvedFrameDataTest, MarkAsUsed) { @@ -287,7 +286,7 @@ // damaged. EXPECT_FALSE(resolved_frame.IsNextFrameSinceLastAggregation()); EXPECT_FALSE(resolved_frame.IsSameFrameAsLastAggregation()); - EXPECT_EQ(resolved_frame.GetSurfaceDamage(false), kOutputRect); + EXPECT_EQ(resolved_frame.GetSurfaceDamage(), kOutputRect); } } // namespace
diff --git a/components/viz/service/display/surface_aggregator.cc b/components/viz/service/display/surface_aggregator.cc index ce6baf8..a1bd9061 100644 --- a/components/viz/service/display/surface_aggregator.cc +++ b/components/viz/service/display/surface_aggregator.cc
@@ -391,7 +391,7 @@ if (RenderPassNeedsFullDamage(resolved_frame->GetRootRenderPassData())) { damage_rect = resolved_frame->GetOutputRect(); } else { - damage_rect = resolved_frame->GetSurfaceDamage(false); + damage_rect = resolved_frame->GetSurfaceDamage(); } } @@ -1515,7 +1515,7 @@ // accumulated from all quads in the surface, and needs to be expanded by any // pixel-moving backdrop filter in the render pass if intersecting. Transform // this damage into the local space of the render pass for this purpose. - gfx::Rect surface_root_rp_damage = resolved_frame.GetSurfaceDamage(true); + gfx::Rect surface_root_rp_damage = resolved_frame.GetSurfaceDamage(); if (!surface_root_rp_damage.IsEmpty()) { gfx::Transform root_to_target_transform( gfx::Transform::kSkipInitialization); @@ -1693,6 +1693,16 @@ .has_damage_from_contributing_content) { resolved_pass.aggregation().has_damage_from_contributing_content = true; } + } else { + // If this the next frame in sequence from last aggregation then per quad + // damage_rects are valid so add them here. If not, either this is the + // same frame as last aggregation and there is no damage OR there is + // already full damage for the surface. + if (resolved_frame.IsNextFrameSinceLastAggregation()) { + auto& damage_rect = GetOptionalDamageRectFromQuad(quad); + DCHECK(damage_rect.has_value()); + quad_damage_rect = damage_rect.value(); + } } // Clip the quad damage to the quad visible before converting back to @@ -1787,7 +1797,7 @@ parent_pass->aggregation().embedded_passes.insert(&root_resolved_pass); } - gfx::Rect damage_rect = resolved_frame.GetSurfaceDamage(true); + gfx::Rect damage_rect = resolved_frame.GetSurfaceDamage(); // Avoid infinite recursion by adding current surface to // |referenced_surfaces_|.
diff --git a/components/viz/service/display/surface_aggregator_unittest.cc b/components/viz/service/display/surface_aggregator_unittest.cc index 6d1dff16..05d9817 100644 --- a/components/viz/service/display/surface_aggregator_unittest.cc +++ b/components/viz/service/display/surface_aggregator_unittest.cc
@@ -7489,6 +7489,63 @@ } } +// Check GetRectDamage() handles per quad damage correctly. +TEST_F(SurfaceAggregatorValidSurfaceTest, NonRootRenderPassWithPerQuadDamage) { + constexpr gfx::Rect root_damage_rect(70, 70, 10, 10); + constexpr gfx::Rect quad_damage_rect(10, 10, 20, 20); + constexpr gfx::Size child_pass_size(50, 50); + + CompositorRenderPassList root_passes; + root_passes.push_back( + RenderPassBuilder(CompositorRenderPassId{1}, child_pass_size) + .AddSolidColorQuad(gfx::Rect(child_pass_size), SK_ColorRED) + .AddTextureQuad(gfx::Rect(child_pass_size), ResourceId(1)) + .SetQuadDamageRect(quad_damage_rect) + .Build()); + root_passes.push_back( + RenderPassBuilder(CompositorRenderPassId{2}, kSurfaceSize) + .SetDamageRect(root_damage_rect) + .AddSolidColorQuad(gfx::Rect(kSurfaceSize), SK_ColorRED) + .AddRenderPassQuad(gfx::Rect(child_pass_size), + CompositorRenderPassId{1}) + .SetQuadToTargetTranslation(20, 20) + .Build()); + { + root_sink_->SubmitCompositorFrame( + root_surface_id_.local_surface_id(), + MakeCompositorFrame(CopyRenderPasses(root_passes))); + auto aggregated_frame = AggregateFrame(root_surface_id_); + + // First aggregation always has full damage. + ASSERT_EQ(aggregated_frame.render_pass_list.size(), 2u); + EXPECT_EQ(aggregated_frame.render_pass_list[1]->damage_rect, + gfx::Rect(kSurfaceSize)); + } + + { + root_sink_->SubmitCompositorFrame( + root_surface_id_.local_surface_id(), + MakeCompositorFrame(CopyRenderPasses(root_passes))); + auto aggregated_frame = AggregateFrame(root_surface_id_); + + // Second aggregation a new CompositorFrame was submitted. The final damage + // is the quad damage (30, 30 20x20) unioned with surface damage (70,70 + // 10x10). + ASSERT_EQ(aggregated_frame.render_pass_list.size(), 2u); + EXPECT_EQ(aggregated_frame.render_pass_list[1]->damage_rect, + gfx::Rect(30, 30, 50, 50)); + } + + { + auto aggregated_frame = AggregateFrame(root_surface_id_); + + // Third aggregation the active CompositorFrame for the root surface hasn't + // changed so both surface damage and per quad damage is empty. + ASSERT_EQ(aggregated_frame.render_pass_list.size(), 2u); + EXPECT_EQ(aggregated_frame.render_pass_list[1]->damage_rect, gfx::Rect()); + } +} + // Tests that quads outside the damage rect are not ignored for cached render // pass. TEST_F(SurfaceAggregatorPartialSwapTest, NotIgnoreOutsideForCachedRenderPass) {
diff --git a/content/browser/accessibility/browser_accessibility_manager_fuchsia.cc b/content/browser/accessibility/browser_accessibility_manager_fuchsia.cc index 17683bf..63438fb 100644 --- a/content/browser/accessibility/browser_accessibility_manager_fuchsia.cc +++ b/content/browser/accessibility/browser_accessibility_manager_fuchsia.cc
@@ -13,8 +13,6 @@ namespace content { -const size_t kInspectNodeMaxSize = 16 * 1024 * 1024; - // static BrowserAccessibilityManager* BrowserAccessibilityManager::Create( const ui::AXTreeUpdate& initial_tree, @@ -40,7 +38,7 @@ if (accessibility_bridge) { inspect_node_ = accessibility_bridge->GetInspectNode(); tree_dump_node_ = inspect_node_.CreateLazyNode("tree-data", [this]() { - inspect::Inspector inspector{{.maximum_size = kInspectNodeMaxSize}}; + inspect::Inspector inspector; auto str = ax_tree()->ToString(); auto str_capacity = str.capacity();
diff --git a/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc b/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc index 32a9346..d5eea60 100644 --- a/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc +++ b/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc
@@ -54,7 +54,7 @@ #if BUILDFLAG(IS_CHROMEOS_ASH) #include "ash/components/audio/cras_audio_handler.h" -#include "chromeos/dbus/audio/cras_audio_client.h" +#include "chromeos/ash/components/dbus/audio/cras_audio_client.h" #endif using ::testing::_; @@ -329,7 +329,7 @@ base::Unretained(this))); #if BUILDFLAG(IS_CHROMEOS_ASH) - chromeos::CrasAudioClient::InitializeFake(); + ash::CrasAudioClient::InitializeFake(); ash::CrasAudioHandler::InitializeForTesting(); #endif } @@ -338,7 +338,7 @@ audio_manager_->Shutdown(); #if BUILDFLAG(IS_CHROMEOS_ASH) ash::CrasAudioHandler::Shutdown(); - chromeos::CrasAudioClient::Shutdown(); + ash::CrasAudioClient::Shutdown(); #endif }
diff --git a/content/browser/shared_storage/shared_storage_browsertest.cc b/content/browser/shared_storage/shared_storage_browsertest.cc index 0f35c064..94975bf 100644 --- a/content/browser/shared_storage/shared_storage_browsertest.cc +++ b/content/browser/shared_storage/shared_storage_browsertest.cc
@@ -55,7 +55,7 @@ let urls = []; for (let i = 0; i < 8; ++i) { urls.push({url: 'fenced_frames/title' + i.toString() + '.html', - reporting_metadata: { + reportingMetadata: { 'click': 'fenced_frames/report' + i.toString() + '.html' }}); } @@ -1056,7 +1056,7 @@ sharedStorage.selectURL( 'test-url-selection-operation', [{url: "fenced_frames/title0.html", - reporting_metadata: {"click": "fenced_frames/report1.html", + reportingMetadata: {"click": "fenced_frames/report1.html", "mouse interaction": "fenced_frames/report2.html"}}], {data: {'mockResult':0}}); )") @@ -1105,7 +1105,7 @@ sharedStorage.selectURL( 'test-url-selection-operation', [{url: "fenced_frames/title0.html", - reporting_metadata: {"click": "fenced_frames/report1.html"}}], + reportingMetadata: {"click": "fenced_frames/report1.html"}}], {data: {'mockResult':-1}}); )") .ExtractString(); @@ -1160,7 +1160,7 @@ 'test-url-selection-operation', [{url: "fenced_frames/title0.html"}, {url: "fenced_frames/title1.html", - reporting_metadata: {"click": "fenced_frames/report1.html"}}, + reportingMetadata: {"click": "fenced_frames/report1.html"}}, {url: "fenced_frames/title2.html"}], {data: {'mockResult': 1}}); )") .ExtractString(); @@ -1202,7 +1202,7 @@ sharedStorage.selectURL( 'test-url-selection-operation', [{url: "fenced_frames/title0.html", - reporting_metadata: {"": "fenced_frames/report1.html"}}], + reportingMetadata: {"": "fenced_frames/report1.html"}}], {data: {'mockResult':0}}); )") .ExtractString(); @@ -1680,7 +1680,7 @@ 'test-url-selection-operation', [{url: "fenced_frames/title0.html"}, {url: "fenced_frames/title1.html", - reporting_metadata: {"click": "fenced_frames/report1.html"}}, + reportingMetadata: {"click": "fenced_frames/report1.html"}}, {url: "fenced_frames/title2.html"}], {data: {'mockResult': 1}}); )") .ExtractString(); @@ -1797,7 +1797,7 @@ 'test-url-selection-operation', [{url: "fenced_frames/title0.html"}, {url: "fenced_frames/title1.html", - reporting_metadata: {"click": "fenced_frames/report1.html"}}, + reportingMetadata: {"click": "fenced_frames/report1.html"}}, {url: "fenced_frames/title2.html"}], {data: {'mockResult': 1}}); )") .ExtractString(); @@ -2039,7 +2039,7 @@ 'test-url-selection-operation', [{url: "fenced_frames/title0.html"}, {url: "fenced_frames/title1.html", - reporting_metadata: {"click": "fenced_frames/report1.html"}}, + reportingMetadata: {"click": "fenced_frames/report1.html"}}, {url: "fenced_frames/title2.html"}], {data: {'mockResult': 3}}); )") .ExtractString(); @@ -2111,7 +2111,7 @@ [{url: "fenced_frames/title.html"}, {url: "fenced_frames/title0.html", url: "fenced_frames/title1.html", - reporting_metadata: {"click": "fenced_frames/report1.html"}}, + reportingMetadata: {"click": "fenced_frames/report1.html"}}, {url: "fenced_frames/title2.html"}], {data: {'mockResult': 1}}); )") .ExtractString(); @@ -2598,7 +2598,7 @@ 'test-url-selection-operation', [{url: "fenced_frames/title0.html"}, {url: "fenced_frames/title1.html", - reporting_metadata: {'click': "fenced_frames/report1.html", + reportingMetadata: {'click': "fenced_frames/report1.html", 'mouse interaction': "fenced_frames/report2.html"}}], {data: {'mockResult':1}}); )")
diff --git a/content/browser/webid/federated_auth_request_impl.cc b/content/browser/webid/federated_auth_request_impl.cc index 468914d..56a395f9 100644 --- a/content/browser/webid/federated_auth_request_impl.cc +++ b/content/browser/webid/federated_auth_request_impl.cc
@@ -245,8 +245,18 @@ if (auth_request_callback_) { DCHECK(!revoke_callback_); DCHECK(!logout_callback_); - RecordRequestIdTokenStatus(IdTokenStatus::kUnhandledRequest, - render_frame_host_->GetPageUkmSourceId()); + // If we have completed the request, e.g. when the token is returned or the + // API is aborted, `auth_request_callback_` would be null so we won't double + // count. If the request was failed but we have not yet rejected the + // promise, e.g. when the user has declined the permission or the API is + // disabled etc., we have already reported the errors to console. i.e. + // `errors_logged_to_console_` would be true so we won't double count + // either. We record `kUnhandledRequest` only when the user refreshed, + // closed or left the page while the UI is displayed. + if (!errors_logged_to_console_) { + RecordRequestIdTokenStatus(IdTokenStatus::kUnhandledRequest, + render_frame_host_->GetPageUkmSourceId()); + } CompleteRequest(FederatedAuthRequestResult::kError, "", /*should_call_callback=*/true); } @@ -1388,7 +1398,7 @@ // API is aborted, `auth_request_callback_` would be null so we won't double // count. If the request was failed but we have not yet rejected the // promise, e.g. when the user has declined the permission or the API is - // disabled etc., we have already report the errors to console. i.e. + // disabled etc., we have already reported the errors to console. i.e. // `errors_logged_to_console_` would be true so we won't double count // either. We record `kUserInterfaceTimedOut` only when the UI is displayed // and then time out without user interaction.
diff --git a/content/browser/webid/federated_auth_request_impl_unittest.cc b/content/browser/webid/federated_auth_request_impl_unittest.cc index e4d48f5c..cb7ed306 100644 --- a/content/browser/webid/federated_auth_request_impl_unittest.cc +++ b/content/browser/webid/federated_auth_request_impl_unittest.cc
@@ -1633,6 +1633,29 @@ ExpectRequestIdTokenStatusUKM(IdTokenStatus::kDisabledInFlags); } +TEST_F(BasicFederatedAuthRequestImplTest, + MetricsForFeatureIsDisabledNotDoubleCountedWithUnhandledRequest) { + test_api_permission_delegate_->permission_override_ = + std::make_pair(main_test_rfh()->GetLastCommittedOrigin(), + ApiPermissionStatus::BLOCKED_VARIATIONS); + + MockConfiguration configuration = kConfigurationValid; + configuration.wait_for_callback = false; + RequestExpectations expectations = {/*return_status=*/absl::nullopt, + /*devtools_issue_status*/ absl::nullopt, + /*fetched_endpoints=*/0}; + RunAuthTest(kDefaultRequestParameters, expectations, configuration); + + // Delete the request before DelayTimer kicks in. + federated_auth_request_impl_->ResetAndDeleteThis(); + + // If double counted, the the samples would not be unique so the following + // checks will fail. + histogram_tester_.ExpectUniqueSample("Blink.FedCm.Status.RequestIdToken", + IdTokenStatus::kDisabledInFlags, 1); + ExpectRequestIdTokenStatusUKM(IdTokenStatus::kDisabledInFlags); +} + // Test that embargo is requested if the // IdentityRequestDialogController::ShowAccountsDialog() callback requests it. TEST_F(BasicFederatedAuthRequestImplTest, RequestEmbargo) {
diff --git a/content/browser/webrtc/webrtc_content_browsertest_base.cc b/content/browser/webrtc/webrtc_content_browsertest_base.cc index 42720686..e2a1cba 100644 --- a/content/browser/webrtc/webrtc_content_browsertest_base.cc +++ b/content/browser/webrtc/webrtc_content_browsertest_base.cc
@@ -23,7 +23,7 @@ #if BUILDFLAG(IS_CHROMEOS_ASH) #include "ash/components/audio/cras_audio_handler.h" -#include "chromeos/dbus/audio/cras_audio_client.h" +#include "chromeos/ash/components/dbus/audio/cras_audio_client.h" #endif namespace content { @@ -44,7 +44,7 @@ // We need pixel output when we dig pixels out of video tags for verification. EnablePixelOutput(); #if BUILDFLAG(IS_CHROMEOS_ASH) - chromeos::CrasAudioClient::InitializeFake(); + ash::CrasAudioClient::InitializeFake(); ash::CrasAudioHandler::InitializeForTesting(); #endif ContentBrowserTest::SetUp(); @@ -56,7 +56,7 @@ ContentBrowserTest::TearDown(); #if BUILDFLAG(IS_CHROMEOS_ASH) ash::CrasAudioHandler::Shutdown(); - chromeos::CrasAudioClient::Shutdown(); + ash::CrasAudioClient::Shutdown(); #endif }
diff --git a/content/child/runtime_features.cc b/content/child/runtime_features.cc index a700c36e..d7cc05fa 100644 --- a/content/child/runtime_features.cc +++ b/content/child/runtime_features.cc
@@ -226,6 +226,8 @@ #if BUILDFLAG(IS_ANDROID) {wf::EnableGetDisplayMedia, features::kUserMediaScreenCapturing}, #endif + {wf::EnableIdentityInCanMakePaymentEventFeature, + features::kIdentityInCanMakePaymentEventFeature, kSetOnlyIfOverridden}, {wf::EnableIdleDetection, features::kIdleDetection, kSetOnlyIfOverridden}, {wf::EnableInstalledApp, features::kInstalledApp}, {wf::EnableLazyInitializeMediaControls,
diff --git a/content/public/common/content_features.cc b/content/public/common/content_features.cc index fa5914f..e6ceafd 100644 --- a/content/public/common/content_features.cc +++ b/content/public/common/content_features.cc
@@ -416,6 +416,11 @@ // (activated by kUserAgentClientHint) const base::Feature kGreaseUACH{"GreaseUACH", base::FEATURE_ENABLED_BY_DEFAULT}; +// To-be-disabled feature of payment apps receiving merchant and user identity +// when a merchant website checks whether the payment app can make payments. +const base::Feature kIdentityInCanMakePaymentEventFeature{ + "IdentityInCanMakePaymentEventFeature", base::FEATURE_ENABLED_BY_DEFAULT}; + // This is intended as a kill switch for the Idle Detection feature. To enable // this feature, the experimental web platform features flag should be set, // or the site should obtain an Origin Trial token.
diff --git a/content/public/common/content_features.h b/content/public/common/content_features.h index 163f6c0..02e0f90e 100644 --- a/content/public/common/content_features.h +++ b/content/public/common/content_features.h
@@ -106,6 +106,7 @@ kFledgeLimitNumAuctionsParam; CONTENT_EXPORT extern const base::Feature kFractionalScrollOffsets; CONTENT_EXPORT extern const base::Feature kGreaseUACH; +CONTENT_EXPORT extern const base::Feature kIdentityInCanMakePaymentEventFeature; CONTENT_EXPORT extern const base::Feature kIdleDetection; CONTENT_EXPORT extern const base::Feature kIncludeIpcOverheadInNavigationStart; CONTENT_EXPORT extern const base::Feature kInstalledApp;
diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn index 381c852..0314da0 100644 --- a/content/test/BUILD.gn +++ b/content/test/BUILD.gn
@@ -1896,7 +1896,7 @@ if (is_chromeos_ash) { deps += [ "//ash/components/audio", - "//chromeos/dbus/audio", + "//chromeos/ash/components/dbus/audio", "//chromeos/system", ] } @@ -2875,7 +2875,7 @@ deps += [ "//ash/components/audio", "//ash/constants:constants", - "//chromeos/dbus/audio", + "//chromeos/ash/components/dbus/audio", "//chromeos/services/machine_learning/public/cpp:stub", "//chromeos/services/machine_learning/public/mojom", ]
diff --git a/content/test/DEPS b/content/test/DEPS index 8321e91..ef961c75 100644 --- a/content/test/DEPS +++ b/content/test/DEPS
@@ -12,7 +12,7 @@ # For WebRTC tests. "+ash/components/audio", - "+chromeos/dbus/audio", + "+chromeos/ash/components/dbus/audio", "+chromeos/network/network_handler.h", "+chromeos/network/network_state.h", "+chromeos/network/network_state_handler.h",
diff --git a/content/test/ppapi/ppapi_test.cc b/content/test/ppapi/ppapi_test.cc index 8533844b..1add382b 100644 --- a/content/test/ppapi/ppapi_test.cc +++ b/content/test/ppapi/ppapi_test.cc
@@ -24,7 +24,7 @@ #if BUILDFLAG(IS_CHROMEOS_ASH) #include "ash/components/audio/cras_audio_handler.h" -#include "chromeos/dbus/audio/cras_audio_client.h" +#include "chromeos/ash/components/dbus/audio/cras_audio_client.h" #endif namespace content { @@ -148,7 +148,7 @@ void OutOfProcessPPAPITest::SetUp() { #if BUILDFLAG(IS_CHROMEOS_ASH) - chromeos::CrasAudioClient::InitializeFake(); + ash::CrasAudioClient::InitializeFake(); ash::CrasAudioHandler::InitializeForTesting(); #endif ContentBrowserTest::SetUp(); @@ -158,7 +158,7 @@ ContentBrowserTest::TearDown(); #if BUILDFLAG(IS_CHROMEOS_ASH) ash::CrasAudioHandler::Shutdown(); - chromeos::CrasAudioClient::Shutdown(); + ash::CrasAudioClient::Shutdown(); #endif }
diff --git a/extensions/browser/BUILD.gn b/extensions/browser/BUILD.gn index 0f9b3fab..a8ca7a5 100644 --- a/extensions/browser/BUILD.gn +++ b/extensions/browser/BUILD.gn
@@ -739,11 +739,11 @@ deps += [ "//ash/components/audio", + "//chromeos/ash/components/dbus/audio", "//chromeos/ash/components/dbus/media_analytics", "//chromeos/ash/components/dbus/media_analytics:media_perception_proto", "//chromeos/ash/components/dbus/upstart", "//chromeos/dbus:test_support", - "//chromeos/dbus/audio", "//chromeos/dbus/cec_service", "//chromeos/dbus/permission_broker", "//chromeos/dbus/power", @@ -986,12 +986,12 @@ "//chrome/browser/ash/crosapi:browser_util", "//chrome/common:constants", "//chromeos:test_support", + "//chromeos/ash/components/dbus/audio", "//chromeos/ash/components/dbus/media_analytics", "//chromeos/ash/components/dbus/media_analytics:media_perception_proto", "//chromeos/ash/components/dbus/upstart", "//chromeos/ash/components/network:test_support", "//chromeos/dbus:test_support", - "//chromeos/dbus/audio", "//chromeos/dbus/permission_broker", "//chromeos/dbus/power", "//chromeos/login/login_state",
diff --git a/extensions/browser/api/audio/audio_apitest_chromeos.cc b/extensions/browser/api/audio/audio_apitest_chromeos.cc index f38ae9b..482ed97 100644 --- a/extensions/browser/api/audio/audio_apitest_chromeos.cc +++ b/extensions/browser/api/audio/audio_apitest_chromeos.cc
@@ -13,7 +13,7 @@ #include "base/command_line.h" #include "base/run_loop.h" #include "build/build_config.h" -#include "chromeos/dbus/audio/fake_cras_audio_client.h" +#include "chromeos/ash/components/dbus/audio/fake_cras_audio_client.h" #include "extensions/common/features/feature_session_type.h" #include "extensions/common/mojom/feature_session_type.mojom.h" #include "extensions/common/switches.h" @@ -25,9 +25,9 @@ using ::ash::AudioDevice; using ::ash::AudioDeviceList; +using ::ash::AudioNode; +using ::ash::AudioNodeList; using ::ash::CrasAudioHandler; -using ::chromeos::AudioNode; -using ::chromeos::AudioNodeList; const uint64_t kJabraSpeaker1Id = 30001; const uint64_t kJabraSpeaker1StableDeviceId = 80001; @@ -110,8 +110,8 @@ } void ChangeAudioNodes(const AudioNodeList& audio_nodes) { - chromeos::FakeCrasAudioClient::Get() - ->SetAudioNodesAndNotifyObserversForTesting(audio_nodes); + ash::FakeCrasAudioClient::Get()->SetAudioNodesAndNotifyObserversForTesting( + audio_nodes); base::RunLoop().RunUntilIdle(); }
diff --git a/extensions/browser/api/clipboard/clipboard_api.cc b/extensions/browser/api/clipboard/clipboard_api.cc index 13dd1b9..5cd92ba7 100644 --- a/extensions/browser/api/clipboard/clipboard_api.cc +++ b/extensions/browser/api/clipboard/clipboard_api.cc
@@ -41,10 +41,9 @@ EventRouter* router = EventRouter::Get(browser_context_); if (router && router->HasEventListener(clipboard::OnClipboardDataChanged::kEventName)) { - std::unique_ptr<Event> event( - new Event(events::CLIPBOARD_ON_CLIPBOARD_DATA_CHANGED, - clipboard::OnClipboardDataChanged::kEventName, - std::vector<base::Value>())); + std::unique_ptr<Event> event(new Event( + events::CLIPBOARD_ON_CLIPBOARD_DATA_CHANGED, + clipboard::OnClipboardDataChanged::kEventName, base::Value::List())); router->BroadcastEvent(std::move(event)); } }
diff --git a/extensions/browser/event_router.cc b/extensions/browser/event_router.cc index cb4cd70..b4c8c05a 100644 --- a/extensions/browser/event_router.cc +++ b/extensions/browser/event_router.cc
@@ -1291,23 +1291,6 @@ << "See extension_event_histogram_value.h for inspiration."; } -Event::Event(events::HistogramValue histogram_value, - const std::string& event_name, - std::vector<base::Value> event_args) - : Event(histogram_value, event_name, std::move(event_args), nullptr) {} - -Event::Event(events::HistogramValue histogram_value, - const std::string& event_name, - std::vector<base::Value> event_args, - content::BrowserContext* restrict_to_browser_context) - : Event(histogram_value, - event_name, - std::move(base::Value(std::move(event_args)).GetList()), - restrict_to_browser_context, - GURL(), - EventRouter::USER_GESTURE_UNKNOWN, - mojom::EventFilteringInfo::New()) {} - Event::~Event() = default; std::unique_ptr<Event> Event::DeepCopy() const {
diff --git a/extensions/browser/event_router.h b/extensions/browser/event_router.h index 0312b17..2dcb2d63 100644 --- a/extensions/browser/event_router.h +++ b/extensions/browser/event_router.h
@@ -583,18 +583,6 @@ EventRouter::UserGestureState user_gesture, mojom::EventFilteringInfoPtr info); - // Deprecated versions of the above methods. - // - // TODO(https://crbug.com/1338341): Remove these when no more callers use - // them, or once base::Value::ListStorage has been removed. - Event(events::HistogramValue histogram_value, - const std::string& event_name, - std::vector<base::Value> event_args); - Event(events::HistogramValue histogram_value, - const std::string& event_name, - std::vector<base::Value> event_args, - content::BrowserContext* restrict_to_browser_context); - ~Event(); // Makes a deep copy of this instance.
diff --git a/extensions/shell/BUILD.gn b/extensions/shell/BUILD.gn index 5de4863..1eda1561d 100644 --- a/extensions/shell/BUILD.gn +++ b/extensions/shell/BUILD.gn
@@ -231,8 +231,8 @@ "//ash/components/audio", "//ash/components/disks", "//ash/constants", + "//chromeos/ash/components/dbus/audio", "//chromeos/dbus", - "//chromeos/dbus/audio", "//chromeos/dbus/hermes", "//chromeos/dbus/power", "//chromeos/login/login_state", @@ -362,8 +362,8 @@ ] deps += [ "//ash/components/audio", + "//chromeos/ash/components/dbus/audio", "//chromeos/dbus:test_support", - "//chromeos/dbus/audio", "//chromeos/dbus/power", ] }
diff --git a/extensions/shell/browser/shell_audio_controller_chromeos_unittest.cc b/extensions/shell/browser/shell_audio_controller_chromeos_unittest.cc index 584836f..26eabd9e 100644 --- a/extensions/shell/browser/shell_audio_controller_chromeos_unittest.cc +++ b/extensions/shell/browser/shell_audio_controller_chromeos_unittest.cc
@@ -12,22 +12,22 @@ #include "ash/components/audio/audio_devices_pref_handler.h" #include "ash/components/audio/cras_audio_handler.h" #include "base/memory/ptr_util.h" -#include "chromeos/dbus/audio/audio_node.h" -#include "chromeos/dbus/audio/fake_cras_audio_client.h" +#include "chromeos/ash/components/dbus/audio/audio_node.h" +#include "chromeos/ash/components/dbus/audio/fake_cras_audio_client.h" #include "testing/gtest/include/gtest/gtest.h" namespace extensions { using ::ash::AudioDevice; using ::ash::AudioDeviceType; +using ::ash::AudioNode; +using ::ash::AudioNodeList; using ::ash::CrasAudioHandler; -using ::chromeos::AudioNode; -using ::chromeos::AudioNodeList; class ShellAudioControllerTest : public testing::Test { public: ShellAudioControllerTest() : next_node_id_(1) { - chromeos::CrasAudioClient::InitializeFake(); + ash::CrasAudioClient::InitializeFake(); audio_client()->SetAudioNodesForTesting(AudioNodeList()); CrasAudioHandler::InitializeForTesting(); @@ -40,7 +40,7 @@ ~ShellAudioControllerTest() override { controller_.reset(); CrasAudioHandler::Shutdown(); - chromeos::CrasAudioClient::Shutdown(); + ash::CrasAudioClient::Shutdown(); } protected: @@ -67,8 +67,8 @@ ASSERT_TRUE(false) << "Didn't find ID " << id; } - chromeos::FakeCrasAudioClient* audio_client() { - return chromeos::FakeCrasAudioClient::Get(); + ash::FakeCrasAudioClient* audio_client() { + return ash::FakeCrasAudioClient::Get(); } CrasAudioHandler* audio_handler() { return CrasAudioHandler::Get(); }
diff --git a/extensions/shell/browser/shell_browser_main_parts.cc b/extensions/shell/browser/shell_browser_main_parts.cc index 29e1dbe..8f05754 100644 --- a/extensions/shell/browser/shell_browser_main_parts.cc +++ b/extensions/shell/browser/shell_browser_main_parts.cc
@@ -65,7 +65,7 @@ #endif #if BUILDFLAG(IS_CHROMEOS_ASH) -#include "chromeos/dbus/audio/cras_audio_client.h" +#include "chromeos/ash/components/dbus/audio/cras_audio_client.h" #include "chromeos/dbus/dbus_thread_manager.h" #include "chromeos/dbus/power/power_manager_client.h" #elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) @@ -123,11 +123,11 @@ #if BUILDFLAG(IS_CHROMEOS_ASH) if (bus) { chromeos::hermes_clients::Initialize(bus); - chromeos::CrasAudioClient::Initialize(bus); + ash::CrasAudioClient::Initialize(bus); chromeos::PowerManagerClient::Initialize(bus); } else { chromeos::hermes_clients::InitializeFakes(); - chromeos::CrasAudioClient::InitializeFake(); + ash::CrasAudioClient::InitializeFake(); chromeos::PowerManagerClient::InitializeFake(); } @@ -302,7 +302,7 @@ chromeos::NetworkHandler::Shutdown(); ash::disks::DiskMountManager::Shutdown(); chromeos::PowerManagerClient::Shutdown(); - chromeos::CrasAudioClient::Shutdown(); + ash::CrasAudioClient::Shutdown(); #endif #if BUILDFLAG(IS_CHROMEOS_ASH)
diff --git a/infra/config/generated/luci/realms.cfg b/infra/config/generated/luci/realms.cfg index 6c4dacb5..fdf1c9ec 100644 --- a/infra/config/generated/luci/realms.cfg +++ b/infra/config/generated/luci/realms.cfg
@@ -409,6 +409,7 @@ principals: "project:chromium-m92" principals: "project:chromium-m96" principals: "project:chromium-m97" + principals: "user:chromium-orchestrator@chops-service-accounts.iam.gserviceaccount.com" principals: "user:infra-try-recipes-tester@chops-service-accounts.iam.gserviceaccount.com" } } @@ -489,6 +490,7 @@ principals: "group:chromium-led-users" principals: "group:project-chromium-mac-arm64-tests-access" principals: "group:project-chromium-tryjob-access" + principals: "user:chromium-orchestrator@chops-service-accounts.iam.gserviceaccount.com" principals: "user:infra-try-recipes-tester@chops-service-accounts.iam.gserviceaccount.com" } }
diff --git a/infra/config/swarming.star b/infra/config/swarming.star index 6fe229e..638da5c 100644 --- a/infra/config/swarming.star +++ b/infra/config/swarming.star
@@ -87,6 +87,9 @@ "chromium-led-users", ], users = [ + # Build Recipes Tester launches orchestrator led builds which needs to + # trigger compilator led builds + "chromium-orchestrator@chops-service-accounts.iam.gserviceaccount.com", # An account used by "Build Recipes Tester" builder infra/try bucket # used to tests changes to Chromium recipes using LED before commit. "infra-try-recipes-tester@chops-service-accounts.iam.gserviceaccount.com",
diff --git a/ios/chrome/browser/providers/BUILD.gn b/ios/chrome/browser/providers/BUILD.gn index 2cf0235..eb772f0 100644 --- a/ios/chrome/browser/providers/BUILD.gn +++ b/ios/chrome/browser/providers/BUILD.gn
@@ -52,6 +52,7 @@ "//ios/chrome/browser/providers/signin:chromium_signin_error", "//ios/chrome/browser/providers/signin:chromium_signin_resources", "//ios/chrome/browser/providers/signin:chromium_signin_sso", + "//ios/chrome/browser/providers/text_classifier:chromium_text_classifier", "//ios/chrome/browser/providers/text_zoom:chromium_text_zoom", "//ios/chrome/browser/providers/ui_utils:chromium_ui_utils", "//ios/chrome/browser/providers/url_rewriters:chromium_url_rewriters",
diff --git a/ios/chrome/browser/providers/text_classifier/BUILD.gn b/ios/chrome/browser/providers/text_classifier/BUILD.gn new file mode 100644 index 0000000..24f8af1 --- /dev/null +++ b/ios/chrome/browser/providers/text_classifier/BUILD.gn
@@ -0,0 +1,11 @@ +# Copyright 2022 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. + +source_set("chromium_text_classifier") { + configs += [ "//build/config/compiler:enable_arc" ] + sources = [ "chromium_text_classifier.mm" ] + deps = [ + "//ios/public/provider/chrome/browser/text_classifier:text_classifier_api", + ] +}
diff --git a/ios/chrome/browser/providers/text_classifier/chromium_text_classifier.mm b/ios/chrome/browser/providers/text_classifier/chromium_text_classifier.mm new file mode 100644 index 0000000..ffbcf5a --- /dev/null +++ b/ios/chrome/browser/providers/text_classifier/chromium_text_classifier.mm
@@ -0,0 +1,19 @@ +// Copyright 2022 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. + +#import "ios/public/provider/chrome/browser/text_classifier/text_classifier_api.h" + +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +namespace ios { +namespace provider { + +void SetTextClassifierModelPath(const base::FilePath& model_path) { + // TextClassifier is not supported in Chromium. +} + +} // namespace provider +} // namespace ios
diff --git a/ios/chrome/browser/ui/webui/ntp_tiles_internals_ui.cc b/ios/chrome/browser/ui/webui/ntp_tiles_internals_ui.cc index ae358b9..b21271e 100644 --- a/ios/chrome/browser/ui/webui/ntp_tiles_internals_ui.cc +++ b/ios/chrome/browser/ui/webui/ntp_tiles_internals_ui.cc
@@ -52,11 +52,6 @@ base::RepeatingCallback<void(const base::Value::List&)>; void RegisterMessageCallback(const std::string& message, MessageCallback callback) override; - using DeprecatedMessageCallback = - base::RepeatingCallback<void(const base::ListValue*)>; - void RegisterDeprecatedMessageCallback( - const std::string& message, - const DeprecatedMessageCallback& callback) override; void CallJavascriptFunctionVector( const std::string& name, const std::vector<const base::Value*>& values) override; @@ -105,13 +100,6 @@ web_ui()->RegisterMessageCallback(message, std::move(callback)); } -void IOSNTPTilesInternalsMessageHandlerBridge:: - RegisterDeprecatedMessageCallback( - const std::string& message, - const DeprecatedMessageCallback& callback) { - web_ui()->RegisterDeprecatedMessageCallback(message, callback); -} - void IOSNTPTilesInternalsMessageHandlerBridge::CallJavascriptFunctionVector( const std::string& name, const std::vector<const base::Value*>& values) {
diff --git a/ios/chrome/test/providers/BUILD.gn b/ios/chrome/test/providers/BUILD.gn index 7832d1a..d97568fc 100644 --- a/ios/chrome/test/providers/BUILD.gn +++ b/ios/chrome/test/providers/BUILD.gn
@@ -23,6 +23,7 @@ "//ios/chrome/test/providers/push_notification", "//ios/chrome/test/providers/risk_data", "//ios/chrome/test/providers/signin", + "//ios/chrome/test/providers/text_classifier", "//ios/chrome/test/providers/text_zoom", "//ios/chrome/test/providers/ui_utils", "//ios/chrome/test/providers/url_rewriters",
diff --git a/ios/chrome/test/providers/text_classifier/BUILD.gn b/ios/chrome/test/providers/text_classifier/BUILD.gn new file mode 100644 index 0000000..1707e28 --- /dev/null +++ b/ios/chrome/test/providers/text_classifier/BUILD.gn
@@ -0,0 +1,12 @@ +# Copyright 2022 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. + +source_set("text_classifier") { + testonly = true + configs += [ "//build/config/compiler:enable_arc" ] + sources = [ "test_text_classifier.mm" ] + deps = [ + "//ios/public/provider/chrome/browser/text_classifier:text_classifier_api", + ] +}
diff --git a/ios/chrome/test/providers/text_classifier/test_text_classifier.mm b/ios/chrome/test/providers/text_classifier/test_text_classifier.mm new file mode 100644 index 0000000..f1041ba --- /dev/null +++ b/ios/chrome/test/providers/text_classifier/test_text_classifier.mm
@@ -0,0 +1,19 @@ +// Copyright 2022 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. + +#import "ios/public/provider/chrome/browser/text_classifier/text_classifier_api.h" + +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +namespace ios { +namespace provider { + +void SetTextClassifierModelPath(const base::FilePath& model_path) { + // TextClassifier is not supported for tests. +} + +} // namespace provider +} // namespace ios
diff --git a/ios/public/provider/chrome/browser/BUILD.gn b/ios/public/provider/chrome/browser/BUILD.gn index cae26997..8d45307 100644 --- a/ios/public/provider/chrome/browser/BUILD.gn +++ b/ios/public/provider/chrome/browser/BUILD.gn
@@ -40,6 +40,7 @@ "//ios/public/provider/chrome/browser/signin:signin_error_api", "//ios/public/provider/chrome/browser/signin:signin_resources_api", "//ios/public/provider/chrome/browser/signin:signin_sso_api", + "//ios/public/provider/chrome/browser/text_classifier:text_classifier_api", "//ios/public/provider/chrome/browser/text_zoom:text_zoom_api", "//ios/public/provider/chrome/browser/ui_utils:ui_utils_api", "//ios/public/provider/chrome/browser/url_rewriters:url_rewriters_api",
diff --git a/ios/public/provider/chrome/browser/text_classifier/BUILD.gn b/ios/public/provider/chrome/browser/text_classifier/BUILD.gn new file mode 100644 index 0000000..df15510 --- /dev/null +++ b/ios/public/provider/chrome/browser/text_classifier/BUILD.gn
@@ -0,0 +1,9 @@ +# Copyright 2022 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. + +source_set("text_classifier_api") { + configs += [ "//build/config/compiler:enable_arc" ] + sources = [ "text_classifier_api.h" ] + deps = [ "//base" ] +}
diff --git a/ios/public/provider/chrome/browser/text_classifier/text_classifier_api.h b/ios/public/provider/chrome/browser/text_classifier/text_classifier_api.h new file mode 100644 index 0000000..45847d60 --- /dev/null +++ b/ios/public/provider/chrome/browser/text_classifier/text_classifier_api.h
@@ -0,0 +1,19 @@ +// Copyright 2022 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. + +#ifndef IOS_PUBLIC_PROVIDER_CHROME_BROWSER_TEXT_CLASSIFIER_TEXT_CLASSIFIER_API_H_ +#define IOS_PUBLIC_PROVIDER_CHROME_BROWSER_TEXT_CLASSIFIER_TEXT_CLASSIFIER_API_H_ + +#import "base/files/file_path.h" + +namespace ios { +namespace provider { + +// Sets a static model path to be used by ML TextClassifier instances. +void SetTextClassifierModelPath(const base::FilePath& model_path); + +} // namespace provider +} // namespace ios + +#endif // IOS_PUBLIC_PROVIDER_CHROME_BROWSER_TEXT_CLASSIFIER_TEXT_CLASSIFIER_API_H_
diff --git a/media/DEPS b/media/DEPS index 0cd29bc..605f574 100644 --- a/media/DEPS +++ b/media/DEPS
@@ -38,13 +38,13 @@ specific_include_rules = { "audio_manager_unittest.cc": [ - "+chromeos/dbus" + "+chromeos/ash/components/dbus" ], "cras_input_unittest.cc": [ - "+chromeos/dbus" + "+chromeos/ash/components/dbus" ], "cras_unified_unittest.cc": [ - "+chromeos/dbus" + "+chromeos/ash/components/dbus" ], "fuchsia_video_decoder_unittest.cc": [ "+components/viz/test/test_context_support.h",
diff --git a/media/audio/BUILD.gn b/media/audio/BUILD.gn index bf0142f..1304924 100644 --- a/media/audio/BUILD.gn +++ b/media/audio/BUILD.gn
@@ -452,7 +452,7 @@ if (is_chromeos_ash) { deps += [ "//ash/components/audio", - "//chromeos/dbus/audio", + "//chromeos/ash/components/dbus/audio", ] if (use_cras) {
diff --git a/media/audio/audio_manager_unittest.cc b/media/audio/audio_manager_unittest.cc index 68590c1..76b169e8 100644 --- a/media/audio/audio_manager_unittest.cc +++ b/media/audio/audio_manager_unittest.cc
@@ -58,7 +58,7 @@ #if defined(USE_CRAS) && BUILDFLAG(IS_CHROMEOS_ASH) #include "ash/components/audio/audio_devices_pref_handler_stub.h" #include "ash/components/audio/cras_audio_handler.h" -#include "chromeos/dbus/audio/fake_cras_audio_client.h" +#include "chromeos/ash/components/dbus/audio/fake_cras_audio_client.h" #include "media/audio/cras/audio_manager_chromeos.h" #elif defined(USE_CRAS) && \ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) @@ -106,8 +106,8 @@ }; #if defined(USE_CRAS) && BUILDFLAG(IS_CHROMEOS_ASH) -using chromeos::AudioNode; -using chromeos::AudioNodeList; +using ::ash::AudioNode; +using ::ash::AudioNodeList; const int kDefaultSampleRate = 48000; @@ -313,12 +313,12 @@ void TearDown() override { CrasAudioHandler::Shutdown(); audio_pref_handler_ = nullptr; - chromeos::CrasAudioClient::Shutdown(); + ash::CrasAudioClient::Shutdown(); } void SetUpCrasAudioHandlerWithTestingNodes(const AudioNodeList& audio_nodes) { - chromeos::CrasAudioClient::InitializeFake(); - chromeos::FakeCrasAudioClient::Get()->SetAudioNodesForTesting(audio_nodes); + ash::CrasAudioClient::InitializeFake(); + ash::FakeCrasAudioClient::Get()->SetAudioNodesForTesting(audio_nodes); audio_pref_handler_ = new ash::AudioDevicesPrefHandlerStub(); CrasAudioHandler::Initialize( /*media_controller_manager*/ mojo::NullRemote(), audio_pref_handler_);
diff --git a/media/audio/cras/cras_input_unittest.cc b/media/audio/cras/cras_input_unittest.cc index 49a1146..22115443 100644 --- a/media/audio/cras/cras_input_unittest.cc +++ b/media/audio/cras/cras_input_unittest.cc
@@ -14,7 +14,7 @@ #include "base/test/test_timeouts.h" #include "base/threading/thread_task_runner_handle.h" #include "base/time/time.h" -#include "chromeos/dbus/audio/fake_cras_audio_client.h" +#include "chromeos/ash/components/dbus/audio/fake_cras_audio_client.h" #include "media/audio/audio_device_description.h" #include "media/audio/cras/audio_manager_chromeos.h" #include "media/audio/fake_audio_log_factory.h" @@ -64,7 +64,7 @@ class CrasInputStreamTest : public testing::Test { protected: CrasInputStreamTest() { - chromeos::CrasAudioClient::InitializeFake(); + ash::CrasAudioClient::InitializeFake(); ash::CrasAudioHandler::InitializeForTesting(); mock_manager_.reset(new StrictMock<MockAudioManagerCrasInput>()); base::RunLoop().RunUntilIdle(); @@ -76,7 +76,7 @@ ~CrasInputStreamTest() override { mock_manager_->Shutdown(); ash::CrasAudioHandler::Shutdown(); - chromeos::CrasAudioClient::Shutdown(); + ash::CrasAudioClient::Shutdown(); } CrasInputStream* CreateStream(ChannelLayout layout) {
diff --git a/media/audio/cras/cras_unified_unittest.cc b/media/audio/cras/cras_unified_unittest.cc index 98f53039..caff9d5 100644 --- a/media/audio/cras/cras_unified_unittest.cc +++ b/media/audio/cras/cras_unified_unittest.cc
@@ -14,7 +14,7 @@ #include "base/test/test_timeouts.h" #include "base/threading/thread_task_runner_handle.h" #include "base/time/time.h" -#include "chromeos/dbus/audio/cras_audio_client.h" +#include "chromeos/ash/components/dbus/audio/cras_audio_client.h" #include "media/audio/audio_device_description.h" #include "media/audio/cras/audio_manager_chromeos.h" #include "media/audio/fake_audio_log_factory.h" @@ -64,7 +64,7 @@ protected: CrasUnifiedStreamTest() { - chromeos::CrasAudioClient::InitializeFake(); + ash::CrasAudioClient::InitializeFake(); ash::CrasAudioHandler::InitializeForTesting(); mock_manager_.reset(new StrictMock<MockAudioManagerCras>()); base::RunLoop().RunUntilIdle(); @@ -73,7 +73,7 @@ ~CrasUnifiedStreamTest() override { mock_manager_->Shutdown(); ash::CrasAudioHandler::Shutdown(); - chromeos::CrasAudioClient::Shutdown(); + ash::CrasAudioClient::Shutdown(); } CrasUnifiedStream* CreateStream(ChannelLayout layout) {
diff --git a/net/http/transport_security_persister_unittest.cc b/net/http/transport_security_persister_unittest.cc index 0789ae4e..a45a44f 100644 --- a/net/http/transport_security_persister_unittest.cc +++ b/net/http/transport_security_persister_unittest.cc
@@ -41,6 +41,14 @@ TransportSecurityPersisterTest() : WithTaskEnvironment( base::test::TaskEnvironment::TimeSource::MOCK_TIME) { + // This feature is used in initializing |state_|. + if (partition_expect_ct_state()) { + feature_list_.InitAndEnableFeature( + features::kPartitionExpectCTStateByNetworkIsolationKey); + } else { + feature_list_.InitAndDisableFeature( + features::kPartitionExpectCTStateByNetworkIsolationKey); + } // Mock out time so that entries with hard-coded json data can be // successfully loaded. Use a large enough value that dynamically created // entries have at least somewhat interesting expiration times. @@ -61,14 +69,6 @@ base::ThreadPool::CreateSequencedTaskRunner( {base::MayBlock(), base::TaskPriority::BEST_EFFORT, base::TaskShutdownBehavior::BLOCK_SHUTDOWN})); - // This feature is used in initializing |state_|. - if (partition_expect_ct_state()) { - feature_list_.InitAndEnableFeature( - features::kPartitionExpectCTStateByNetworkIsolationKey); - } else { - feature_list_.InitAndDisableFeature( - features::kPartitionExpectCTStateByNetworkIsolationKey); - } state_ = std::make_unique<TransportSecurityState>(); persister_ = std::make_unique<TransportSecurityPersister>( state_.get(), std::move(background_runner),
diff --git a/net/http/transport_security_state_unittest.cc b/net/http/transport_security_state_unittest.cc index 2065ebd3..a59c758c 100644 --- a/net/http/transport_security_state_unittest.cc +++ b/net/http/transport_security_state_unittest.cc
@@ -1775,15 +1775,21 @@ : public TransportSecurityStateTest, public testing::WithParamInterface<CTEmergencyDisableSwitchKind> { public: + CTEmergencyDisableTest() { + if (GetParam() == + CTEmergencyDisableSwitchKind::kComponentUpdaterDrivenSwitch) { + scoped_feature_list_.Init(); + } else { + scoped_feature_list_.InitAndDisableFeature( + TransportSecurityState::kCertificateTransparencyEnforcement); + } + } void SetUp() override { if (GetParam() == CTEmergencyDisableSwitchKind::kComponentUpdaterDrivenSwitch) { state_.SetCTEmergencyDisabled(true); - scoped_feature_list_.Init(); } else { ASSERT_EQ(GetParam(), CTEmergencyDisableSwitchKind::kFinchDrivenFeature); - scoped_feature_list_.InitAndDisableFeature( - TransportSecurityState::kCertificateTransparencyEnforcement); } } @@ -4174,10 +4180,9 @@ class TransportSecurityStatePinningKillswitchTest : public TransportSecurityStateTest { public: - void SetUp() override { + TransportSecurityStatePinningKillswitchTest() { scoped_feature_list_.InitAndDisableFeature( features::kStaticKeyPinningEnforcement); - TransportSecurityStateTest::SetUp(); } protected:
diff --git a/remoting/android/lint-baseline.xml b/remoting/android/lint-baseline.xml index ab76844..992617ed 100644 --- a/remoting/android/lint-baseline.xml +++ b/remoting/android/lint-baseline.xml
@@ -1,84 +1,242 @@ -<?xml version='1.0' encoding='utf-8'?> -<issues format="6" by="lint 7.1.0" type="baseline" client="" dependencies="true" name="" variant="all" version="7.1.0"> +<?xml version="1.0" encoding="UTF-8"?> +<issues format="6" by="lint 7.4.0-alpha05" type="baseline" client="" dependencies="true" name="" variant="all" version="7.4.0-alpha05"> - <issue id="WrongConstant" message="Must be one or more of: Gravity.LEFT, Gravity.RIGHT, GravityCompat.START, GravityCompat.END, Gravity.NO_GRAVITY" errorLine1=" if (mDrawerLayout.isDrawerOpen(Gravity.START)) {" errorLine2=" ~~~~~~~~~~~~~"> - <location file="remoting/android/java/src/org/chromium/chromoting/Chromoting.java" /> + <issue + id="LintError" + message="../../remoting/android/lint-baseline.xml (relative to /usr/local/google/home/wnwen/z1/src/out/Debug) does not exist" + errorLine1=" <baseline file="../../remoting/android/lint-baseline.xml"/>" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="project.xml" + line="5" + column="3"/> </issue> - <issue id="WrongConstant" message="Must be one or more of: Gravity.LEFT, Gravity.RIGHT, GravityCompat.START, GravityCompat.END, Gravity.NO_GRAVITY" errorLine1=" mDrawerLayout.closeDrawer(Gravity.START);" errorLine2=" ~~~~~~~~~~~~~"> - <location file="remoting/android/java/src/org/chromium/chromoting/Chromoting.java" /> + <issue + id="WrongConstant" + message="Must be one or more of: Gravity.LEFT, Gravity.RIGHT, GravityCompat.START, GravityCompat.END, Gravity.NO_GRAVITY" + errorLine1=" if (mDrawerLayout.isDrawerOpen(Gravity.START)) {" + errorLine2=" ~~~~~~~~~~~~~"> + <location + file="$SRC/remoting/android/java/src/org/chromium/chromoting/Chromoting.java" + line="204" + column="40"/> </issue> - <issue id="WrongConstant" message="Must be one or more of: Gravity.LEFT, Gravity.RIGHT, GravityCompat.START, GravityCompat.END, Gravity.NO_GRAVITY" errorLine1=" if (mDrawerLayout.isDrawerOpen(Gravity.START)) {" errorLine2=" ~~~~~~~~~~~~~"> - <location file="remoting/android/java/src/org/chromium/chromoting/Chromoting.java" /> + <issue + id="WrongConstant" + message="Must be one or more of: Gravity.LEFT, Gravity.RIGHT, GravityCompat.START, GravityCompat.END, Gravity.NO_GRAVITY" + errorLine1=" mDrawerLayout.closeDrawer(Gravity.START);" + errorLine2=" ~~~~~~~~~~~~~"> + <location + file="$SRC/remoting/android/java/src/org/chromium/chromoting/Chromoting.java" + line="205" + column="39"/> </issue> - <issue id="WrongConstant" message="Must be one or more of: Gravity.LEFT, Gravity.RIGHT, GravityCompat.START, GravityCompat.END, Gravity.NO_GRAVITY" errorLine1=" mDrawerLayout.closeDrawer(Gravity.START);" errorLine2=" ~~~~~~~~~~~~~"> - <location file="remoting/android/java/src/org/chromium/chromoting/Chromoting.java" /> + <issue + id="WrongConstant" + message="Must be one or more of: Gravity.LEFT, Gravity.RIGHT, GravityCompat.START, GravityCompat.END, Gravity.NO_GRAVITY" + errorLine1=" if (mDrawerLayout.isDrawerOpen(Gravity.START)) {" + errorLine2=" ~~~~~~~~~~~~~"> + <location + file="$SRC/remoting/android/java/src/org/chromium/chromoting/Chromoting.java" + line="292" + column="56"/> </issue> - <issue id="WrongConstant" message="Must be one or more of: Gravity.LEFT, Gravity.RIGHT, GravityCompat.START, GravityCompat.END, Gravity.NO_GRAVITY" errorLine1=" mDrawerLayout.openDrawer(Gravity.START);" errorLine2=" ~~~~~~~~~~~~~"> - <location file="remoting/android/java/src/org/chromium/chromoting/Chromoting.java" /> + <issue + id="WrongConstant" + message="Must be one or more of: Gravity.LEFT, Gravity.RIGHT, GravityCompat.START, GravityCompat.END, Gravity.NO_GRAVITY" + errorLine1=" mDrawerLayout.closeDrawer(Gravity.START);" + errorLine2=" ~~~~~~~~~~~~~"> + <location + file="$SRC/remoting/android/java/src/org/chromium/chromoting/Chromoting.java" + line="293" + column="55"/> </issue> - <issue id="WrongConstant" message="Must be one of: InputMode.UNKNOWN, InputMode.TRACKPAD, InputMode.TOUCH" errorLine1=" for (int i = 0; i < InputMode.NUM_ENTRIES; i++) {" errorLine2=" ~~~~~~~~~~~"> - <location file="remoting/android/java/src/org/chromium/chromoting/Desktop.java" /> + <issue + id="WrongConstant" + message="Must be one or more of: Gravity.LEFT, Gravity.RIGHT, GravityCompat.START, GravityCompat.END, Gravity.NO_GRAVITY" + errorLine1=" mDrawerLayout.openDrawer(Gravity.START);" + errorLine2=" ~~~~~~~~~~~~~"> + <location + file="$SRC/remoting/android/java/src/org/chromium/chromoting/Chromoting.java" + line="295" + column="54"/> </issue> - <issue id="UseCompatTextViewDrawableXml" message="Use `app:drawableStartCompat` instead of `android:drawableStart`" errorLine1=" android:drawableStart="@drawable/ic_host_online"" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="remoting/android/java/res/layout/host_online.xml" /> + <issue + id="WrongConstant" + message="Must be one of: InputMode.UNKNOWN, InputMode.TRACKPAD, InputMode.TOUCH" + errorLine1=" for (int i = 0; i < InputMode.NUM_ENTRIES; i++) {" + errorLine2=" ~~~~~~~~~~~"> + <location + file="$SRC/remoting/android/java/src/org/chromium/chromoting/Desktop.java" + line="351" + column="39"/> </issue> - <issue id="SetJavaScriptEnabled" message="Using `setJavaScriptEnabled` can introduce XSS vulnerabilities into your application, review carefully" errorLine1=" mWebView.getSettings().setJavaScriptEnabled(true);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="remoting/android/java/src/org/chromium/chromoting/help/HelpActivity.java" /> + <issue + id="UseCompatTextViewDrawableXml" + message="Use `app:drawableStartCompat` instead of `android:drawableStart`" + errorLine1=" android:drawableStart="@drawable/ic_host_online"" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/remoting/android/java/res/layout/host_online.xml" + line="28" + column="9"/> </issue> - <issue id="SetJavaScriptEnabled" message="Using `setJavaScriptEnabled` can introduce XSS vulnerabilities into your application, review carefully" errorLine1=" webView.getSettings().setJavaScriptEnabled(true);" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="remoting/android/java/src/org/chromium/chromoting/WebViewActivity.java" /> + <issue + id="SetJavaScriptEnabled" + message="Using `setJavaScriptEnabled` can introduce XSS vulnerabilities into your application, review carefully" + errorLine1=" mWebView.getSettings().setJavaScriptEnabled(true);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/remoting/android/java/src/org/chromium/chromoting/help/HelpActivity.java" + line="91" + column="9"/> </issue> - <issue id="DataExtractionRules" message="The attribute `android:allowBackup` is deprecated from Android 12 and higher and may be removed in future versions. Consider adding the attribute `android:dataExtractionRules` specifying an `@xml` resource which configures cloud backups and device transfers on Android 12 and higher." errorLine1=" <application android:label="@string/product_name_android" android:name="org.chromium.chromoting.RemotingApplication" android:icon="@mipmap/ic_launcher" android:theme="@style/BaseTheme" android:allowBackup="false" android:resizeableActivity="true" android:supportsPictureInPicture="false">" errorLine2=" ~~~~~"> - <location file="gen/remoting/android/remoting_apk__lint/gen/remoting/android/AndroidManifest.xml" /> + <issue + id="SetJavaScriptEnabled" + message="Using `setJavaScriptEnabled` can introduce XSS vulnerabilities into your application, review carefully" + errorLine1=" webView.getSettings().setJavaScriptEnabled(true);" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/remoting/android/java/src/org/chromium/chromoting/WebViewActivity.java" + line="46" + column="9"/> </issue> - <issue id="ObsoleteSdkInt" message="Unnecessary; SDK_INT is always >= 23" errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="remoting/android/java/src/org/chromium/chromoting/accountswitcher/AccountManagerCompat.java" /> + <issue + id="DataExtractionRules" + message="The attribute `android:allowBackup` is deprecated from Android 12 and higher and may be removed in future versions. Consider adding the attribute `android:dataExtractionRules` specifying an `@xml` resource which configures cloud backups and device transfers on Android 12 and higher." + errorLine1=" <application android:label="@string/product_name_android" android:name="org.chromium.chromoting.RemotingApplication" android:icon="@mipmap/ic_launcher" android:theme="@style/BaseTheme" android:allowBackup="false" android:resizeableActivity="true" android:supportsPictureInPicture="false">" + errorLine2=" ~~~~~"> + <location + file="gen/remoting/android/remoting_apk__lint/gen/remoting/android/AndroidManifest.xml" + line="16" + column="209"/> </issue> - <issue id="ObsoleteSdkInt" message="Unnecessary; SDK_INT is always >= 23" errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="remoting/android/java/src/org/chromium/chromoting/Chromoting.java" /> + <issue + id="ObsoleteSdkInt" + message="Unnecessary; SDK_INT is always >= 23" + errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/remoting/android/java/src/org/chromium/chromoting/accountswitcher/AccountManagerCompat.java" + line="25" + column="13"/> </issue> - <issue id="ObsoleteSdkInt" message="Unnecessary; SDK_INT is always >= 23" errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="remoting/android/java/src/org/chromium/chromoting/Desktop.java" /> + <issue + id="ObsoleteSdkInt" + message="Unnecessary; SDK_INT is always >= 23" + errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/remoting/android/java/src/org/chromium/chromoting/Chromoting.java" + line="628" + column="13"/> </issue> - <issue id="ObsoleteSdkInt" message="Unnecessary; SDK_INT is always >= 23" errorLine1=" } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="remoting/android/java/src/org/chromium/chromoting/Desktop.java" /> + <issue + id="ObsoleteSdkInt" + message="Unnecessary; SDK_INT is always >= 23" + errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/remoting/android/java/src/org/chromium/chromoting/Desktop.java" + line="183" + column="13"/> </issue> - <issue id="ObsoleteSdkInt" message="Unnecessary; SDK_INT is always >= 23" errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="remoting/android/java/src/org/chromium/chromoting/Desktop.java" /> + <issue + id="ObsoleteSdkInt" + message="Unnecessary; SDK_INT is always >= 23" + errorLine1=" } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/remoting/android/java/src/org/chromium/chromoting/Desktop.java" + line="221" + column="20"/> </issue> - <issue id="ObsoleteSdkInt" message="Unnecessary; SDK_INT is always >= 23" errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="remoting/android/java/src/org/chromium/chromoting/Desktop.java" /> + <issue + id="ObsoleteSdkInt" + message="Unnecessary; SDK_INT is always >= 23" + errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/remoting/android/java/src/org/chromium/chromoting/Desktop.java" + line="280" + column="13"/> </issue> - <issue id="ObsoleteSdkInt" message="Unnecessary; SDK_INT is always >= 23" errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="remoting/android/java/src/org/chromium/chromoting/Desktop.java" /> + <issue + id="ObsoleteSdkInt" + message="Unnecessary; SDK_INT is always >= 23" + errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/remoting/android/java/src/org/chromium/chromoting/Desktop.java" + line="512" + column="13"/> </issue> - <issue id="ObsoleteSdkInt" message="Unnecessary; SDK_INT is always >= 23" errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {" errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> - <location file="remoting/android/java/src/org/chromium/chromoting/Desktop.java" /> + <issue + id="ObsoleteSdkInt" + message="Unnecessary; SDK_INT is always >= 23" + errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/remoting/android/java/src/org/chromium/chromoting/Desktop.java" + line="521" + column="13"/> </issue> - <issue id="ClickableViewAccessibility" message="Custom view `DesktopView` overrides `onTouchEvent` but not `performClick`" errorLine1=" public final boolean onTouchEvent(MotionEvent event) {" errorLine2=" ~~~~~~~~~~~~"> - <location file="remoting/android/java/src/org/chromium/chromoting/DesktopView.java" /> + <issue + id="ObsoleteSdkInt" + message="Unnecessary; SDK_INT is always >= 23" + errorLine1=" if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {" + errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"> + <location + file="$SRC/remoting/android/java/src/org/chromium/chromoting/Desktop.java" + line="605" + column="13"/> </issue> - <issue id="RtlEnabled" message="The project references RTL attributes, but does not explicitly enable or disable RTL support with `android:supportsRtl` in the manifest"> - <location file="gen/remoting/android/remoting_apk__lint/gen/remoting/android/AndroidManifest.xml" /> + <issue + id="MonochromeLauncherIcon" + message="The application adaptive icon is missing a monochrome tag" + errorLine1="<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">" + errorLine2="^"> + <location + file="$SRC/remoting/android/java/res/mipmap-anydpi-v26/ic_launcher.xml" + line="2" + column="1"/> </issue> -</issues> \ No newline at end of file + <issue + id="ClickableViewAccessibility" + message="Custom view `DesktopView` overrides `onTouchEvent` but not `performClick`" + errorLine1=" public final boolean onTouchEvent(MotionEvent event) {" + errorLine2=" ~~~~~~~~~~~~"> + <location + file="$SRC/remoting/android/java/src/org/chromium/chromoting/DesktopView.java" + line="85" + column="26"/> + </issue> + + <issue + id="RtlEnabled" + message="The project references RTL attributes, but does not explicitly enable or disable RTL support with `android:supportsRtl` in the manifest"> + <location + file="gen/remoting/android/remoting_apk__lint/gen/remoting/android/AndroidManifest.xml"/> + </issue> + +</issues>
diff --git a/remoting/codec/webrtc_video_encoder.cc b/remoting/codec/webrtc_video_encoder.cc index 6fc593047..9da7a40e8 100644 --- a/remoting/codec/webrtc_video_encoder.cc +++ b/remoting/codec/webrtc_video_encoder.cc
@@ -4,6 +4,8 @@ #include "remoting/codec/webrtc_video_encoder.h" +#include "base/system/sys_info.h" + namespace remoting { WebrtcVideoEncoder::EncodedFrame::EncodedFrame() = default; @@ -13,4 +15,25 @@ WebrtcVideoEncoder::EncodedFrame& WebrtcVideoEncoder::EncodedFrame::operator=( WebrtcVideoEncoder::EncodedFrame&&) = default; +// static +int WebrtcVideoEncoder::GetEncoderThreadCount(int frame_width) { + int thread_num; + if (frame_width >= 3840) { + thread_num = 16; + } else if (frame_width >= 2560) { + thread_num = 8; + } else if (frame_width >= 1280) { + thread_num = 4; + } else if (frame_width >= 720) { + thread_num = 2; + } else { + thread_num = 1; + } + + // Allow multiple cores on a system to be used for encoding to increase + // performance while at the same time ensuring we don't bog down the system by + // taking all of the available cores. + return std::min(thread_num, ((base::SysInfo::NumberOfProcessors() + 1) / 2)); +} + } // namespace remoting
diff --git a/remoting/codec/webrtc_video_encoder.h b/remoting/codec/webrtc_video_encoder.h index 325d63a..82874c7 100644 --- a/remoting/codec/webrtc_video_encoder.h +++ b/remoting/codec/webrtc_video_encoder.h
@@ -101,6 +101,10 @@ UNKNOWN_ERROR, }; + // Helper function for the VPX and AOM encoders to determine the number of + // threads needed to efficiently encode a frame based on its width. + static int GetEncoderThreadCount(int frame_width); + // A derived class calls EncodeCallback to return the result of an encoding // request. SUCCEEDED with an empty EncodedFrame (nullptr) indicates the frame // should be dropped (unchanged or empty frame). Otherwise EncodeResult shows
diff --git a/remoting/codec/webrtc_video_encoder_av1.cc b/remoting/codec/webrtc_video_encoder_av1.cc index fe0ef844..83c4fbc4 100644 --- a/remoting/codec/webrtc_video_encoder_av1.cc +++ b/remoting/codec/webrtc_video_encoder_av1.cc
@@ -51,9 +51,10 @@ } bool WebrtcVideoEncoderAV1::InitializeCodec(const webrtc::DesktopSize& size) { - // Set the config's width and height now that it's known. + // Set the width, height, and thread count now that the frame size is known. config_.g_w = size.width(); config_.g_h = size.height(); + config_.g_threads = GetEncoderThreadCount(config_.g_w); // Initialize an encoder instance. scoped_aom_codec codec(new aom_codec_ctx_t, DestroyAomCodecContext); @@ -86,7 +87,7 @@ // TODO(joedow): Experiment with AV1E_SET_TILE_ROWS. Note that the total // number of COLUMNS and ROWS should add up to, at most, config_.g_threads. - // These make realtime encoder faster. + // These make realtime encoding faster. error = aom_codec_control(codec.get(), AV1E_SET_TUNE_CONTENT, AOM_CONTENT_SCREEN); DCHECK_EQ(error, AOM_CODEC_OK) << "Failed to set AOM_CONTENT_SCREEN"; @@ -219,17 +220,17 @@ // Encoder config values are defined in: // //third_party/libaom/source/libaom/aom/aom_encoder.h config_.g_profile = 0; - // Width and height are reset once the frame size is known. + // Width, height, and thread count are set once the frame size is known. config_.g_w = 0; config_.g_h = 0; + config_.g_threads = 0; + config_.g_input_bit_depth = 8; config_.g_pass = AOM_RC_ONE_PASS; config_.g_lag_in_frames = 0; config_.g_error_resilient = 0; config_.g_timebase.num = 1; config_.g_timebase.den = base::Time::kMicrosecondsPerSecond; - config_.g_threads = - std::min(((base::SysInfo::NumberOfProcessors() + 1) / 2), 8); config_.kf_mode = AOM_KF_DISABLED;
diff --git a/remoting/codec/webrtc_video_encoder_vpx.cc b/remoting/codec/webrtc_video_encoder_vpx.cc index 65ca035..65c42679 100644 --- a/remoting/codec/webrtc_video_encoder_vpx.cc +++ b/remoting/codec/webrtc_video_encoder_vpx.cc
@@ -66,6 +66,7 @@ config->g_w = size.width(); config->g_h = size.height(); config->g_pass = VPX_RC_ONE_PASS; + config->g_threads = WebrtcVideoEncoder::GetEncoderThreadCount(config->g_w); // Start emitting packets immediately. config->g_lag_in_frames = 0; @@ -76,10 +77,6 @@ config->kf_min_dist = 10000; config->kf_max_dist = 10000; - // Allow multiple cores on a system to be used for encoding for - // performance while at the same time ensuring we do not saturate. - config->g_threads = (base::SysInfo::NumberOfProcessors() + 1) / 2; - // Do not drop any frames at encoder. config->rc_dropframe_thresh = 0; // We do not want variations in bandwidth. @@ -161,7 +158,7 @@ // The param for this knob is a log2 value so 0 is reasonable here. vpx_codec_control(codec, VP9E_SET_TILE_COLUMNS, - static_cast<int>(codec->config.enc->g_threads >> 1)); + static_cast<int>(std::log2(codec->config.enc->g_threads))); // Use the lowest level of noise sensitivity so as to spend less time // on motion estimation and inter-prediction mode.
diff --git a/remoting/host/client_session.cc b/remoting/host/client_session.cc index 3112e52..2af5f6e 100644 --- a/remoting/host/client_session.cc +++ b/remoting/host/client_session.cc
@@ -288,9 +288,11 @@ // Re-send the extended layout information so the client has information // needed to identify each stream. - // TODO(crbug.com/1326339): Remove this line when legacy VideoLayout + // TODO(crbug.com/1326339): Remove this code when legacy VideoLayout // messages are fully deprecated and no longer sent. - OnDesktopDisplayChanged(desktop_display_info_.GetVideoLayoutProto()); + if (desktop_display_info_.NumDisplays() != 0) { + OnDesktopDisplayChanged(desktop_display_info_.GetVideoLayoutProto()); + } } VLOG(1) << "Client capabilities: " << *client_capabilities_;
diff --git a/remoting/host/native_messaging/log_message_handler.cc b/remoting/host/native_messaging/log_message_handler.cc index 5c6a0b5c..95d1187 100644 --- a/remoting/host/native_messaging/log_message_handler.cc +++ b/remoting/host/native_messaging/log_message_handler.cc
@@ -11,6 +11,7 @@ #include "base/synchronization/lock.h" #include "base/task/single_thread_task_runner.h" #include "base/threading/thread_task_runner_handle.h" +#include "base/values.h" namespace remoting { @@ -40,6 +41,13 @@ g_log_message_handler = this; } +LogMessageHandler::LogMessageHandler(const DelegateDeprecated& delegate) + : LogMessageHandler(base::BindRepeating( + [](const DelegateDeprecated& delegate, base::Value value) { + delegate.Run(base::Value::ToUniquePtrValue(std::move(value))); + }, + delegate)) {} + LogMessageHandler::~LogMessageHandler() { base::AutoLock lock(g_log_message_handler_lock.Get()); if (logging::GetLogMessageHandler() != &LogMessageHandler::OnLogMessage) { @@ -115,12 +123,12 @@ std::string message = str.substr(message_start); base::TrimWhitespaceASCII(message, base::TRIM_ALL, &message); - std::unique_ptr<base::DictionaryValue> dictionary(new base::DictionaryValue); - dictionary->SetString("type", kDebugMessageTypeName); - dictionary->SetString("severity", severity_string); - dictionary->SetString("message", message); - dictionary->SetString("file", file); - dictionary->SetInteger("line", line); + base::Value dictionary(base::Value::Type::DICTIONARY); + dictionary.SetStringKey("type", kDebugMessageTypeName); + dictionary.SetStringKey("severity", severity_string); + dictionary.SetStringKey("message", message); + dictionary.SetStringKey("file", file); + dictionary.SetIntKey("line", line); // Protect against this instance being torn down after the delegate is run. base::WeakPtr<LogMessageHandler> self = weak_ptr_factory_.GetWeakPtr();
diff --git a/remoting/host/native_messaging/log_message_handler.h b/remoting/host/native_messaging/log_message_handler.h index 6507e44..cbfdbf4 100644 --- a/remoting/host/native_messaging/log_message_handler.h +++ b/remoting/host/native_messaging/log_message_handler.h
@@ -26,10 +26,16 @@ // over a Native Messaging channel. class LogMessageHandler { public: - typedef base::RepeatingCallback<void(std::unique_ptr<base::Value> message)> - Delegate; + using Delegate = base::RepeatingCallback<void(base::Value message)>; + using DelegateDeprecated = + base::RepeatingCallback<void(std::unique_ptr<base::Value> message)>; explicit LogMessageHandler(const Delegate& delegate); + + // DEPRECATED. + // TODO(yuweih): Migrate all call sites to use the new Delegate callback + // signature and delete this constructor. + explicit LogMessageHandler(const DelegateDeprecated& delegate); ~LogMessageHandler(); static const char* kDebugMessageTypeName;
diff --git a/remoting/host/webauthn/remote_webauthn_native_messaging_host.cc b/remoting/host/webauthn/remote_webauthn_native_messaging_host.cc index a9d850a..76e45ca 100644 --- a/remoting/host/webauthn/remote_webauthn_native_messaging_host.cc +++ b/remoting/host/webauthn/remote_webauthn_native_messaging_host.cc
@@ -11,6 +11,8 @@ #include "base/json/json_writer.h" #include "base/logging.h" #include "base/values.h" +#include "build/build_config.h" +#include "build/chromeos_buildflags.h" #include "mojo/public/cpp/bindings/pending_remote.h" #include "mojo/public/cpp/platform/named_platform_channel.h" #include "mojo/public/cpp/system/isolated_connection.h" @@ -101,6 +103,12 @@ extensions::NativeMessageHost::Client* client) { DCHECK(task_runner_->BelongsToCurrentThread()); client_ = client; +#if !BUILDFLAG(IS_CHROMEOS_ASH) + log_message_handler_ = + std::make_unique<LogMessageHandler>(base::BindRepeating( + &RemoteWebAuthnNativeMessagingHost::SendMessageToClient, + base::Unretained(this))); +#endif // !BUILDFLAG(IS_CHROMEOS_ASH) } scoped_refptr<base::SingleThreadTaskRunner>
diff --git a/remoting/host/webauthn/remote_webauthn_native_messaging_host.h b/remoting/host/webauthn/remote_webauthn_native_messaging_host.h index 42bab0a..a65c49a4d 100644 --- a/remoting/host/webauthn/remote_webauthn_native_messaging_host.h +++ b/remoting/host/webauthn/remote_webauthn_native_messaging_host.h
@@ -19,6 +19,7 @@ #include "mojo/public/cpp/bindings/remote_set.h" #include "remoting/host/chromoting_host_services_provider.h" #include "remoting/host/mojom/webauthn_proxy.mojom.h" +#include "remoting/host/native_messaging/log_message_handler.h" namespace remoting { @@ -95,13 +96,16 @@ void SendClientDisconnectedMessage(); scoped_refptr<base::SingleThreadTaskRunner> task_runner_; - raw_ptr<extensions::NativeMessageHost::Client> client_ = nullptr; std::unique_ptr<ChromotingHostServicesProvider> host_service_api_client_; mojo::Remote<mojom::WebAuthnProxy> remote_; mojo::RemoteSet<mojom::WebAuthnRequestCanceller> request_cancellers_; base::flat_map<base::Value, mojo::RemoteSetElementId> id_to_request_canceller_; + // Only available after Start() is called. + raw_ptr<extensions::NativeMessageHost::Client> client_ = nullptr; + std::unique_ptr<LogMessageHandler> log_message_handler_; + base::RepeatingClosure on_request_canceller_disconnected_for_testing_; // Pending getRemoteStateResponses to be sent.
diff --git a/remoting/host/webauthn/remote_webauthn_native_messaging_host_unittest.cc b/remoting/host/webauthn/remote_webauthn_native_messaging_host_unittest.cc index e91f01d..cac5df03 100644 --- a/remoting/host/webauthn/remote_webauthn_native_messaging_host_unittest.cc +++ b/remoting/host/webauthn/remote_webauthn_native_messaging_host_unittest.cc
@@ -19,6 +19,7 @@ #include "mojo/public/cpp/bindings/receiver.h" #include "remoting/host/host_mock_objects.h" #include "remoting/host/mojom/webauthn_proxy.mojom.h" +#include "remoting/host/native_messaging/log_message_handler.h" #include "remoting/host/native_messaging/native_messaging_constants.h" #include "remoting/host/webauthn/remote_webauthn_constants.h" #include "remoting/host/webauthn/remote_webauthn_native_messaging_host.h" @@ -159,9 +160,15 @@ void RemoteWebAuthnNativeMessagingHostTest::PostMessageFromNativeHost( const std::string& message) { - response_run_loop_->Quit(); auto message_json = base::JSONReader::Read(message); ASSERT_TRUE(message_json.has_value()); + std::string* message_type = message_json->FindStringKey(kMessageType); + if (message_type && + *message_type == LogMessageHandler::kDebugMessageTypeName) { + // Ignore debug message logs. + return; + } + response_run_loop_->Quit(); latest_message_ = std::move(*message_json); }
diff --git a/services/tracing/public/cpp/stack_sampling/tracing_sampler_profiler.cc b/services/tracing/public/cpp/stack_sampling/tracing_sampler_profiler.cc index 54a9a96..ffab7bd 100644 --- a/services/tracing/public/cpp/stack_sampling/tracing_sampler_profiler.cc +++ b/services/tracing/public/cpp/stack_sampling/tracing_sampler_profiler.cc
@@ -241,17 +241,20 @@ new (g_sampler_profiler_ds_for_test) TracingSamplerProfilerDataSource; } + void RegisterDataSource() { +#if BUILDFLAG(USE_PERFETTO_CLIENT_LIBRARY) + perfetto::DataSourceDescriptor dsd; + dsd.set_name(mojom::kSamplerProfilerSourceName); + DataSourceProxy::Register(dsd, this); +#endif + } + private: friend class base::NoDestructor<TracingSamplerProfilerDataSource>; TracingSamplerProfilerDataSource() : DataSourceBase(mojom::kSamplerProfilerSourceName) { PerfettoTracedProcess::Get()->AddDataSource(this); -#if BUILDFLAG(USE_PERFETTO_CLIENT_LIBRARY) - perfetto::DataSourceDescriptor dsd; - dsd.set_name(mojom::kSamplerProfilerSourceName); - DataSourceProxy::Register(dsd, this); -#endif g_sampler_profiler_ds_for_test = this; } @@ -741,6 +744,7 @@ // static void TracingSamplerProfiler::RegisterDataSource() { + TracingSamplerProfilerDataSource::Get()->RegisterDataSource(); PerfettoTracedProcess::Get()->AddDataSource( TracingSamplerProfilerDataSource::Get()); }
diff --git a/storage/browser/quota/usage_tracker.cc b/storage/browser/quota/usage_tracker.cc index 3069866..ddf43af 100644 --- a/storage/browser/quota/usage_tracker.cc +++ b/storage/browser/quota/usage_tracker.cc
@@ -58,22 +58,6 @@ weak_factory_.GetWeakPtr())); } -void UsageTracker::GetHostUsageWithBreakdown( - const std::string& host, - UsageWithBreakdownCallback callback) { - DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); - std::vector<UsageWithBreakdownCallback>& host_callbacks = - host_usage_callbacks_[host]; - host_callbacks.emplace_back(std::move(callback)); - if (host_callbacks.size() > 1) - return; - - quota_manager_impl_->GetBucketsForHost( - host, type_, - base::BindOnce(&UsageTracker::DidGetBucketsForHost, - weak_factory_.GetWeakPtr(), host)); -} - void UsageTracker::GetStorageKeyUsageWithBreakdown( const blink::StorageKey& storage_key, UsageWithBreakdownCallback callback) { @@ -234,50 +218,6 @@ } } -void UsageTracker::DidGetBucketsForHost( - const std::string& host, - QuotaErrorOr<std::set<BucketInfo>> result) { - DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); - auto info = std::make_unique<AccumulateInfo>(); - if (!result.ok()) { - // Return with invalid values on error. - info->usage = -1; - info->unlimited_usage = -1; - FinallySendHostUsageWithBreakdown(std::move(info), host); - return; - } - - const std::set<BucketInfo>& buckets = result.value(); - if (buckets.empty()) { - FinallySendHostUsageWithBreakdown(std::move(info), host); - return; - } - - std::set<BucketLocator> bucket_locators = - BucketInfosToBucketLocators(buckets); - - auto* info_ptr = info.get(); - base::RepeatingClosure barrier = base::BarrierClosure( - client_tracker_count_, - base::BindOnce(&UsageTracker::FinallySendHostUsageWithBreakdown, - weak_factory_.GetWeakPtr(), std::move(info), host)); - - for (const auto& client_type_and_trackers : client_tracker_map_) { - for (const auto& client_tracker : client_type_and_trackers.second) { - client_tracker->GetBucketsUsage( - bucket_locators, - // base::Unretained usage is safe here because BarrierClosure holds - // the std::unque_ptr that keeps AccumulateInfo alive, and the - // BarrierClosure will outlive all the AccumulateClientGlobalUsage - // closures. - base::BindOnce(&UsageTracker::AccumulateClientUsageWithBreakdown, - weak_factory_.GetWeakPtr(), barrier, - base::Unretained(info_ptr), - client_type_and_trackers.first)); - } - } -} - void UsageTracker::DidGetBucketsForStorageKey( const blink::StorageKey& storage_key, QuotaErrorOr<std::set<BucketInfo>> result) { @@ -397,24 +337,6 @@ std::move(callback).Run(info->usage, info->unlimited_usage); } -void UsageTracker::FinallySendHostUsageWithBreakdown( - std::unique_ptr<AccumulateInfo> info, - const std::string& host) { - DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); - auto it = host_usage_callbacks_.find(host); - if (it == host_usage_callbacks_.end()) - return; - - std::vector<UsageWithBreakdownCallback> pending_callbacks; - pending_callbacks.swap(it->second); - DCHECK(pending_callbacks.size() > 0) - << "host_usage_callbacks_ should only have non-empty callback lists"; - host_usage_callbacks_.erase(it); - - for (auto& callback : pending_callbacks) - std::move(callback).Run(info->usage, info->usage_breakdown->Clone()); -} - void UsageTracker::FinallySendStorageKeyUsageWithBreakdown( std::unique_ptr<AccumulateInfo> info, const blink::StorageKey& storage_key) {
diff --git a/storage/browser/quota/usage_tracker.h b/storage/browser/quota/usage_tracker.h index 95077e1..5ddf0144 100644 --- a/storage/browser/quota/usage_tracker.h +++ b/storage/browser/quota/usage_tracker.h
@@ -64,14 +64,6 @@ // a bucket. void GetGlobalUsage(UsageCallback callback); - // Retrieves all buckets for host from QuotaDatabase and requests bucket usage - // from each registered client. Returns cached bucket usage if one exists for - // a bucket. - // TODO(crbug/1202325): Remove once all usages move to - // GetStorageKeyUsageWithBreakdown. - void GetHostUsageWithBreakdown(const std::string& host, - UsageWithBreakdownCallback callback); - // Retrieves all buckets for a `storage_key` from QuotaDatabase and requests // bucket usage from each registered client. Returns cached bucket usage if // one exists for a bucket. @@ -105,11 +97,13 @@ // recording. std::map<blink::StorageKey, int64_t> GetCachedStorageKeysUsage() const; - // Checks if there are ongoing tasks to get global or host usage. Used to - // prevent a UsageTracker reset from happening before a task is complete. + // Checks if there are ongoing tasks to get usage. Used to prevent a + // UsageTracker reset from happening before a task is complete. bool IsWorking() const { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); - return !global_usage_callbacks_.empty() || !host_usage_callbacks_.empty(); + return !global_usage_callbacks_.empty() || + !storage_key_usage_callbacks_.empty() || + !bucket_usage_callbacks_.empty(); } // Sets if a `storage_key` for `client_type` should / should not be excluded @@ -123,8 +117,6 @@ friend class ClientUsageTracker; void DidGetBucketsForType(QuotaErrorOr<std::set<BucketInfo>> result); - void DidGetBucketsForHost(const std::string& host, - QuotaErrorOr<std::set<BucketInfo>> result); void DidGetBucketsForStorageKey(const blink::StorageKey& storage_key, QuotaErrorOr<std::set<BucketInfo>> result); void DidGetBucketForUsage(QuotaClientType client_type, @@ -142,8 +134,6 @@ int64_t unlimited_usage); void FinallySendGlobalUsage(std::unique_ptr<AccumulateInfo> info); - void FinallySendHostUsageWithBreakdown(std::unique_ptr<AccumulateInfo> info, - const std::string& host); void FinallySendStorageKeyUsageWithBreakdown( std::unique_ptr<AccumulateInfo> info, const blink::StorageKey& storage_key); @@ -162,8 +152,6 @@ int client_tracker_count_ = 0; std::vector<UsageCallback> global_usage_callbacks_; - std::map<std::string, std::vector<UsageWithBreakdownCallback>> - host_usage_callbacks_; std::map<blink::StorageKey, std::vector<UsageWithBreakdownCallback>> storage_key_usage_callbacks_; std::map<BucketLocator, std::vector<UsageWithBreakdownCallback>>
diff --git a/storage/browser/quota/usage_tracker_unittest.cc b/storage/browser/quota/usage_tracker_unittest.cc index 1cf26dbc7..054c4b4 100644 --- a/storage/browser/quota/usage_tracker_unittest.cc +++ b/storage/browser/quota/usage_tracker_unittest.cc
@@ -135,14 +135,6 @@ *unlimited_usage = future.Get<1>(); } - std::pair<int64_t, blink::mojom::UsageBreakdownPtr> GetHostUsageWithBreakdown( - const std::string& host) { - base::test::TestFuture<int64_t, blink::mojom::UsageBreakdownPtr> future; - usage_tracker_->GetHostUsageWithBreakdown(host, future.GetCallback()); - return std::make_pair(future.Get<0>(), - std::move(std::get<1>(future.Take()))); - } - std::pair<int64_t, blink::mojom::UsageBreakdownPtr> GetStorageKeyUsageWithBreakdown(const blink::StorageKey& storage_key) { base::test::TestFuture<int64_t, blink::mojom::UsageBreakdownPtr> future; @@ -210,6 +202,8 @@ quota_manager_->SetBootstrapDisabledForTesting(disable); } + UsageTracker* usage_tracker() { return usage_tracker_.get(); } + private: base::flat_map<mojom::QuotaClient*, QuotaClientType> GetQuotaClientMap() { base::flat_map<mojom::QuotaClient*, QuotaClientType> client_map; @@ -231,8 +225,6 @@ TEST_F(UsageTrackerTest, GrantAndRevokeUnlimitedStorage) { int64_t usage = 0; int64_t unlimited_usage = 0; - blink::mojom::UsageBreakdownPtr host_usage_breakdown_expected = - blink::mojom::UsageBreakdown::New(); blink::mojom::UsageBreakdownPtr storage_key_usage_breakdown_expected = blink::mojom::UsageBreakdown::New(); blink::mojom::UsageBreakdownPtr bucket_usage_breakdown_expected = @@ -243,7 +235,6 @@ const StorageKey storage_key = StorageKey::CreateFromStringForTesting("http://example.com"); - const std::string& host = storage_key.origin().host(); BucketLocator bucket = CreateBucket(storage_key, kDefaultBucketName); @@ -251,11 +242,6 @@ GetGlobalUsage(&usage, &unlimited_usage); EXPECT_EQ(100, usage); EXPECT_EQ(0, unlimited_usage); - host_usage_breakdown_expected->fileSystem = 100; - std::pair<int64_t, blink::mojom::UsageBreakdownPtr> host_usage_breakdown = - GetHostUsageWithBreakdown(host); - EXPECT_EQ(100, host_usage_breakdown.first); - EXPECT_EQ(host_usage_breakdown_expected, host_usage_breakdown.second); storage_key_usage_breakdown_expected->fileSystem = 100; std::pair<int64_t, blink::mojom::UsageBreakdownPtr> storage_key_usage_breakdown = @@ -273,9 +259,6 @@ GetGlobalUsage(&usage, &unlimited_usage); EXPECT_EQ(100, usage); EXPECT_EQ(100, unlimited_usage); - host_usage_breakdown = GetHostUsageWithBreakdown(host); - EXPECT_EQ(100, host_usage_breakdown.first); - EXPECT_EQ(host_usage_breakdown_expected, host_usage_breakdown.second); storage_key_usage_breakdown = GetStorageKeyUsageWithBreakdown(storage_key); EXPECT_EQ(100, storage_key_usage_breakdown.first); EXPECT_EQ(storage_key_usage_breakdown_expected, @@ -288,9 +271,6 @@ GetGlobalUsage(&usage, &unlimited_usage); EXPECT_EQ(100, usage); EXPECT_EQ(0, unlimited_usage); - GetHostUsageWithBreakdown(host); - EXPECT_EQ(100, host_usage_breakdown.first); - EXPECT_EQ(host_usage_breakdown_expected, host_usage_breakdown.second); GetStorageKeyUsageWithBreakdown(storage_key); EXPECT_EQ(100, storage_key_usage_breakdown.first); EXPECT_EQ(storage_key_usage_breakdown_expected, @@ -303,8 +283,6 @@ TEST_F(UsageTrackerTest, CacheDisabledClientTest) { int64_t usage = 0; int64_t unlimited_usage = 0; - blink::mojom::UsageBreakdownPtr host_usage_breakdown_expected = - blink::mojom::UsageBreakdown::New(); blink::mojom::UsageBreakdownPtr storage_key_usage_breakdown_expected = blink::mojom::UsageBreakdown::New(); blink::mojom::UsageBreakdownPtr bucket_usage_breakdown_expected = @@ -312,7 +290,6 @@ const StorageKey storage_key = StorageKey::CreateFromStringForTesting("http://example.com"); - const std::string& host = storage_key.origin().host(); BucketLocator bucket = CreateBucket(storage_key, kDefaultBucketName); @@ -320,11 +297,6 @@ GetGlobalUsage(&usage, &unlimited_usage); EXPECT_EQ(100, usage); EXPECT_EQ(0, unlimited_usage); - host_usage_breakdown_expected->fileSystem = 100; - std::pair<int64_t, blink::mojom::UsageBreakdownPtr> host_usage_breakdown = - GetHostUsageWithBreakdown(host); - EXPECT_EQ(100, host_usage_breakdown.first); - EXPECT_EQ(host_usage_breakdown_expected, host_usage_breakdown.second); storage_key_usage_breakdown_expected->fileSystem = 100; std::pair<int64_t, blink::mojom::UsageBreakdownPtr> storage_key_usage_breakdown = @@ -342,9 +314,6 @@ GetGlobalUsage(&usage, &unlimited_usage); EXPECT_EQ(100, usage); EXPECT_EQ(0, unlimited_usage); - host_usage_breakdown = GetHostUsageWithBreakdown(host); - EXPECT_EQ(100, host_usage_breakdown.first); - EXPECT_EQ(host_usage_breakdown_expected, host_usage_breakdown.second); storage_key_usage_breakdown = GetStorageKeyUsageWithBreakdown(storage_key); EXPECT_EQ(100, storage_key_usage_breakdown.first); EXPECT_EQ(storage_key_usage_breakdown_expected, @@ -361,10 +330,6 @@ GetGlobalUsage(&usage, &unlimited_usage); EXPECT_EQ(400, usage); EXPECT_EQ(400, unlimited_usage); - host_usage_breakdown = GetHostUsageWithBreakdown(host); - host_usage_breakdown_expected->fileSystem = 400; - EXPECT_EQ(400, host_usage_breakdown.first); - EXPECT_EQ(host_usage_breakdown_expected, host_usage_breakdown.second); storage_key_usage_breakdown = GetStorageKeyUsageWithBreakdown(storage_key); storage_key_usage_breakdown_expected->fileSystem = 400; EXPECT_EQ(400, storage_key_usage_breakdown.first); @@ -379,15 +344,11 @@ GetGlobalUsage(&usage, &unlimited_usage); EXPECT_EQ(400, usage); EXPECT_EQ(0, unlimited_usage); - host_usage_breakdown = GetHostUsageWithBreakdown(host); - EXPECT_EQ(400, host_usage_breakdown.first); - EXPECT_EQ(host_usage_breakdown_expected, host_usage_breakdown.second); storage_key_usage_breakdown = GetStorageKeyUsageWithBreakdown(storage_key); EXPECT_EQ(400, storage_key_usage_breakdown.first); EXPECT_EQ(storage_key_usage_breakdown_expected, storage_key_usage_breakdown.second); bucket_usage_breakdown = GetBucketUsageWithBreakdown(bucket); - EXPECT_EQ(400, host_usage_breakdown.first); EXPECT_EQ(bucket_usage_breakdown_expected, bucket_usage_breakdown.second); SetUsageCacheEnabled(storage_key, true); @@ -396,10 +357,6 @@ GetGlobalUsage(&usage, &unlimited_usage); EXPECT_EQ(500, usage); EXPECT_EQ(0, unlimited_usage); - host_usage_breakdown = GetHostUsageWithBreakdown(host); - host_usage_breakdown_expected->fileSystem = 500; - EXPECT_EQ(500, host_usage_breakdown.first); - EXPECT_EQ(host_usage_breakdown_expected, host_usage_breakdown.second); storage_key_usage_breakdown = GetStorageKeyUsageWithBreakdown(storage_key); storage_key_usage_breakdown_expected->fileSystem = 500; EXPECT_EQ(500, storage_key_usage_breakdown.first); @@ -577,10 +534,52 @@ const StorageKey kStorageKey = StorageKey::CreateFromStringForTesting("http://example.com"); - std::pair<int64_t, blink::mojom::UsageBreakdownPtr> host_usage_breakdown = - GetHostUsageWithBreakdown(kStorageKey.origin().host()); - EXPECT_EQ(host_usage_breakdown.first, -1); - EXPECT_EQ(host_usage_breakdown.second, blink::mojom::UsageBreakdown::New()); + std::pair<int64_t, blink::mojom::UsageBreakdownPtr> + storage_key_usage_breakdown = + GetStorageKeyUsageWithBreakdown(kStorageKey); + EXPECT_EQ(storage_key_usage_breakdown.first, -1); + EXPECT_EQ(storage_key_usage_breakdown.second, + blink::mojom::UsageBreakdown::New()); +} + +TEST_F(UsageTrackerTest, IsWorking) { + const StorageKey kStorageKey = + StorageKey::CreateFromStringForTesting("http://example.com"); + BucketLocator bucket = CreateBucket(kStorageKey, kDefaultBucketName); + UpdateUsageWithoutNotification(bucket, 100); + + EXPECT_FALSE(usage_tracker()->IsWorking()); + + // UsageTracker::GetBucketUsage task. + base::test::TestFuture<int64_t, blink::mojom::UsageBreakdownPtr> + bucket_usage_future; + usage_tracker()->GetBucketUsageWithBreakdown( + bucket, bucket_usage_future.GetCallback()); + + EXPECT_TRUE(usage_tracker()->IsWorking()); + + ASSERT_TRUE(bucket_usage_future.Wait()); + EXPECT_FALSE(usage_tracker()->IsWorking()); + + // UsageTracker::GetStorageKeyUsage task. + base::test::TestFuture<int64_t, blink::mojom::UsageBreakdownPtr> + storage_key_usage_future; + usage_tracker()->GetStorageKeyUsageWithBreakdown( + kStorageKey, storage_key_usage_future.GetCallback()); + + EXPECT_TRUE(usage_tracker()->IsWorking()); + + ASSERT_TRUE(storage_key_usage_future.Wait()); + EXPECT_FALSE(usage_tracker()->IsWorking()); + + // UsageTracker::GetGlobalUsage task. + base::test::TestFuture<int64_t, int64_t> global_usage_future; + usage_tracker()->GetGlobalUsage(global_usage_future.GetCallback()); + + EXPECT_TRUE(usage_tracker()->IsWorking()); + + ASSERT_TRUE(global_usage_future.Wait()); + EXPECT_FALSE(usage_tracker()->IsWorking()); } } // namespace storage
diff --git a/testing/buildbot/chrome.json b/testing/buildbot/chrome.json index 7d449a4..b3b5652 100644 --- a/testing/buildbot/chrome.json +++ b/testing/buildbot/chrome.json
@@ -1800,7 +1800,7 @@ { "args": [], "cros_board": "atlas", - "cros_img": "atlas-release/R105-14929.0.0", + "cros_img": "atlas-release/R105-14933.0.0", "name": "lacros_all_tast_tests ATLAS_RELEASE_LKGM", "resultdb": { "enable": true, @@ -1864,7 +1864,7 @@ { "args": [], "cros_board": "eve", - "cros_img": "eve-release/R105-14929.0.0", + "cros_img": "eve-release/R105-14933.0.0", "name": "lacros_all_tast_tests EVE_RELEASE_LKGM", "resultdb": { "enable": true, @@ -1973,7 +1973,7 @@ { "args": [], "cros_board": "hana", - "cros_img": "hana-release/R105-14929.0.0", + "cros_img": "hana-release/R105-14933.0.0", "name": "lacros_all_tast_tests HANA_RELEASE_LKGM", "resultdb": { "enable": true, @@ -2037,7 +2037,7 @@ { "args": [], "cros_board": "jacuzzi", - "cros_img": "jacuzzi-release/R105-14929.0.0", + "cros_img": "jacuzzi-release/R105-14933.0.0", "name": "lacros_all_tast_tests JACUZZI_RELEASE_LKGM", "resultdb": { "enable": true, @@ -2087,7 +2087,7 @@ "--test-launcher-filter-file=../../testing/buildbot/filters/lacros-arm.ozone_unittests.filter" ], "cros_board": "hana", - "cros_img": "hana-release/R105-14929.0.0", + "cros_img": "hana-release/R105-14933.0.0", "name": "ozone_unittests HANA_RELEASE_LKGM", "swarming": {}, "test": "ozone_unittests", @@ -2139,7 +2139,7 @@ "--test-launcher-filter-file=../../testing/buildbot/filters/lacros-arm.ozone_unittests.filter" ], "cros_board": "jacuzzi", - "cros_img": "jacuzzi-release/R105-14929.0.0", + "cros_img": "jacuzzi-release/R105-14933.0.0", "name": "ozone_unittests JACUZZI_RELEASE_LKGM", "swarming": {}, "test": "ozone_unittests", @@ -2178,7 +2178,7 @@ "--test-launcher-filter-file=../../testing/buildbot/filters/lacros-arm.viz_unittests.filter" ], "cros_board": "hana", - "cros_img": "hana-release/R105-14929.0.0", + "cros_img": "hana-release/R105-14933.0.0", "name": "viz_unittests HANA_RELEASE_LKGM", "swarming": {}, "test": "viz_unittests", @@ -2230,7 +2230,7 @@ "--test-launcher-filter-file=../../testing/buildbot/filters/lacros-arm.viz_unittests.filter" ], "cros_board": "jacuzzi", - "cros_img": "jacuzzi-release/R105-14929.0.0", + "cros_img": "jacuzzi-release/R105-14933.0.0", "name": "viz_unittests JACUZZI_RELEASE_LKGM", "swarming": {}, "test": "viz_unittests",
diff --git a/testing/buildbot/chromium.android.fyi.json b/testing/buildbot/chromium.android.fyi.json index 1c2f835c..8b0e81f 100644 --- a/testing/buildbot/chromium.android.fyi.json +++ b/testing/buildbot/chromium.android.fyi.json
@@ -8327,15 +8327,15 @@ { "args": [ "--additional-apk=apks/WebLayerShellSystemWebView.apk", + "--webview-apk-path=apks/SystemWebView.apk", "--test-runner-outdir", ".", + "--client-outdir", + "../../weblayer_instrumentation_test_M103/out/Release", "--implementation-outdir", ".", "--test-expectations", "../../weblayer/browser/android/javatests/skew/expectations.txt", - "--webview-apk-path=apks/SystemWebView.apk", - "--client-outdir", - "../../weblayer_instrumentation_test_M103/out/Release", "--client-version=103", "--gs-results-bucket=chromium-result-details", "--recover-devices", @@ -8361,7 +8361,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M103", - "revision": "version:103.0.5060.62" + "revision": "version:103.0.5060.64" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -8412,15 +8412,15 @@ { "args": [ "--additional-apk=apks/WebLayerShellSystemWebView.apk", + "--webview-apk-path=apks/SystemWebView.apk", "--test-runner-outdir", ".", + "--client-outdir", + "../../weblayer_instrumentation_test_M104/out/Release", "--implementation-outdir", ".", "--test-expectations", "../../weblayer/browser/android/javatests/skew/expectations.txt", - "--webview-apk-path=apks/SystemWebView.apk", - "--client-outdir", - "../../weblayer_instrumentation_test_M104/out/Release", "--client-version=104", "--gs-results-bucket=chromium-result-details", "--recover-devices", @@ -8446,7 +8446,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M104", - "revision": "version:104.0.5112.23" + "revision": "version:104.0.5112.24" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -8837,15 +8837,15 @@ { "args": [ "--additional-apk=apks/WebLayerShellSystemWebView.apk", + "--webview-apk-path=apks/AOSP_SystemWebView.apk", "--test-runner-outdir", ".", "--client-outdir", ".", - "--test-expectations", - "../../weblayer/browser/android/javatests/skew/expectations.txt", - "--webview-apk-path=apks/AOSP_SystemWebView.apk", "--implementation-outdir", "../../weblayer_instrumentation_test_M103/out/Release", + "--test-expectations", + "../../weblayer/browser/android/javatests/skew/expectations.txt", "--impl-version=103", "--gs-results-bucket=chromium-result-details", "--recover-devices", @@ -8871,7 +8871,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M103", - "revision": "version:103.0.5060.62" + "revision": "version:103.0.5060.64" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -8922,15 +8922,15 @@ { "args": [ "--additional-apk=apks/WebLayerShellSystemWebView.apk", + "--webview-apk-path=apks/AOSP_SystemWebView.apk", "--test-runner-outdir", ".", "--client-outdir", ".", - "--test-expectations", - "../../weblayer/browser/android/javatests/skew/expectations.txt", - "--webview-apk-path=apks/AOSP_SystemWebView.apk", "--implementation-outdir", "../../weblayer_instrumentation_test_M104/out/Release", + "--test-expectations", + "../../weblayer/browser/android/javatests/skew/expectations.txt", "--impl-version=104", "--gs-results-bucket=chromium-result-details", "--recover-devices", @@ -8956,7 +8956,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M104", - "revision": "version:104.0.5112.23" + "revision": "version:104.0.5112.24" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}",
diff --git a/testing/buildbot/chromium.android.json b/testing/buildbot/chromium.android.json index 1b67d7c..a690211 100644 --- a/testing/buildbot/chromium.android.json +++ b/testing/buildbot/chromium.android.json
@@ -46457,15 +46457,15 @@ { "args": [ "--additional-apk=apks/WebLayerShellSystemWebView.apk", + "--webview-apk-path=apks/SystemWebView.apk", "--test-runner-outdir", ".", + "--client-outdir", + "../../weblayer_instrumentation_test_M103/out/Release", "--implementation-outdir", ".", "--test-expectations", "../../weblayer/browser/android/javatests/skew/expectations.txt", - "--webview-apk-path=apks/SystemWebView.apk", - "--client-outdir", - "../../weblayer_instrumentation_test_M103/out/Release", "--client-version=103", "--gs-results-bucket=chromium-result-details", "--recover-devices", @@ -46491,7 +46491,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M103", - "revision": "version:103.0.5060.62" + "revision": "version:103.0.5060.64" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -46542,15 +46542,15 @@ { "args": [ "--additional-apk=apks/WebLayerShellSystemWebView.apk", + "--webview-apk-path=apks/SystemWebView.apk", "--test-runner-outdir", ".", + "--client-outdir", + "../../weblayer_instrumentation_test_M104/out/Release", "--implementation-outdir", ".", "--test-expectations", "../../weblayer/browser/android/javatests/skew/expectations.txt", - "--webview-apk-path=apks/SystemWebView.apk", - "--client-outdir", - "../../weblayer_instrumentation_test_M104/out/Release", "--client-version=104", "--gs-results-bucket=chromium-result-details", "--recover-devices", @@ -46576,7 +46576,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M104", - "revision": "version:104.0.5112.23" + "revision": "version:104.0.5112.24" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -46967,15 +46967,15 @@ { "args": [ "--additional-apk=apks/WebLayerShellSystemWebView.apk", + "--webview-apk-path=apks/AOSP_SystemWebView.apk", "--test-runner-outdir", ".", "--client-outdir", ".", - "--test-expectations", - "../../weblayer/browser/android/javatests/skew/expectations.txt", - "--webview-apk-path=apks/AOSP_SystemWebView.apk", "--implementation-outdir", "../../weblayer_instrumentation_test_M103/out/Release", + "--test-expectations", + "../../weblayer/browser/android/javatests/skew/expectations.txt", "--impl-version=103", "--gs-results-bucket=chromium-result-details", "--recover-devices", @@ -47001,7 +47001,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M103", - "revision": "version:103.0.5060.62" + "revision": "version:103.0.5060.64" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -47052,15 +47052,15 @@ { "args": [ "--additional-apk=apks/WebLayerShellSystemWebView.apk", + "--webview-apk-path=apks/AOSP_SystemWebView.apk", "--test-runner-outdir", ".", "--client-outdir", ".", - "--test-expectations", - "../../weblayer/browser/android/javatests/skew/expectations.txt", - "--webview-apk-path=apks/AOSP_SystemWebView.apk", "--implementation-outdir", "../../weblayer_instrumentation_test_M104/out/Release", + "--test-expectations", + "../../weblayer/browser/android/javatests/skew/expectations.txt", "--impl-version=104", "--gs-results-bucket=chromium-result-details", "--recover-devices", @@ -47086,7 +47086,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M104", - "revision": "version:104.0.5112.23" + "revision": "version:104.0.5112.24" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -47481,15 +47481,15 @@ { "args": [ "--additional-apk=apks/ChromePublic.apk", + "--webview-apk-path=apks/SystemWebView.apk", "--test-runner-outdir", ".", + "--client-outdir", + "../../weblayer_instrumentation_test_M103/out/Release", "--implementation-outdir", ".", "--test-expectations", "../../weblayer/browser/android/javatests/skew/expectations.txt", - "--webview-apk-path=apks/SystemWebView.apk", - "--client-outdir", - "../../weblayer_instrumentation_test_M103/out/Release", "--client-version=103", "--gs-results-bucket=chromium-result-details", "--recover-devices", @@ -47515,7 +47515,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M103", - "revision": "version:103.0.5060.62" + "revision": "version:103.0.5060.64" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -47566,15 +47566,15 @@ { "args": [ "--additional-apk=apks/ChromePublic.apk", + "--webview-apk-path=apks/SystemWebView.apk", "--test-runner-outdir", ".", + "--client-outdir", + "../../weblayer_instrumentation_test_M104/out/Release", "--implementation-outdir", ".", "--test-expectations", "../../weblayer/browser/android/javatests/skew/expectations.txt", - "--webview-apk-path=apks/SystemWebView.apk", - "--client-outdir", - "../../weblayer_instrumentation_test_M104/out/Release", "--client-version=104", "--gs-results-bucket=chromium-result-details", "--recover-devices", @@ -47600,7 +47600,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M104", - "revision": "version:104.0.5112.23" + "revision": "version:104.0.5112.24" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -47991,15 +47991,15 @@ { "args": [ "--additional-apk=apks/ChromePublic.apk", + "--webview-apk-path=apks/AOSP_SystemWebView.apk", "--test-runner-outdir", ".", "--client-outdir", ".", - "--test-expectations", - "../../weblayer/browser/android/javatests/skew/expectations.txt", - "--webview-apk-path=apks/AOSP_SystemWebView.apk", "--implementation-outdir", "../../weblayer_instrumentation_test_M103/out/Release", + "--test-expectations", + "../../weblayer/browser/android/javatests/skew/expectations.txt", "--impl-version=103", "--gs-results-bucket=chromium-result-details", "--recover-devices", @@ -48025,7 +48025,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M103", - "revision": "version:103.0.5060.62" + "revision": "version:103.0.5060.64" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -48076,15 +48076,15 @@ { "args": [ "--additional-apk=apks/ChromePublic.apk", + "--webview-apk-path=apks/AOSP_SystemWebView.apk", "--test-runner-outdir", ".", "--client-outdir", ".", - "--test-expectations", - "../../weblayer/browser/android/javatests/skew/expectations.txt", - "--webview-apk-path=apks/AOSP_SystemWebView.apk", "--implementation-outdir", "../../weblayer_instrumentation_test_M104/out/Release", + "--test-expectations", + "../../weblayer/browser/android/javatests/skew/expectations.txt", "--impl-version=104", "--gs-results-bucket=chromium-result-details", "--recover-devices", @@ -48110,7 +48110,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M104", - "revision": "version:104.0.5112.23" + "revision": "version:104.0.5112.24" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -48573,15 +48573,15 @@ { "args": [ "--additional-apk=apks/WebLayerShellSystemWebView.apk", + "--webview-apk-path=apks/SystemWebView.apk", "--test-runner-outdir", ".", + "--client-outdir", + "../../weblayer_instrumentation_test_M103/out/Release", "--implementation-outdir", ".", "--test-expectations", "../../weblayer/browser/android/javatests/skew/expectations.txt", - "--webview-apk-path=apks/SystemWebView.apk", - "--client-outdir", - "../../weblayer_instrumentation_test_M103/out/Release", "--client-version=103", "--gs-results-bucket=chromium-result-details", "--recover-devices", @@ -48607,7 +48607,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M103", - "revision": "version:103.0.5060.62" + "revision": "version:103.0.5060.64" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -48658,15 +48658,15 @@ { "args": [ "--additional-apk=apks/WebLayerShellSystemWebView.apk", + "--webview-apk-path=apks/SystemWebView.apk", "--test-runner-outdir", ".", + "--client-outdir", + "../../weblayer_instrumentation_test_M104/out/Release", "--implementation-outdir", ".", "--test-expectations", "../../weblayer/browser/android/javatests/skew/expectations.txt", - "--webview-apk-path=apks/SystemWebView.apk", - "--client-outdir", - "../../weblayer_instrumentation_test_M104/out/Release", "--client-version=104", "--gs-results-bucket=chromium-result-details", "--recover-devices", @@ -48692,7 +48692,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M104", - "revision": "version:104.0.5112.23" + "revision": "version:104.0.5112.24" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -49083,15 +49083,15 @@ { "args": [ "--additional-apk=apks/WebLayerShellSystemWebView.apk", + "--webview-apk-path=apks/SystemWebView.apk", "--test-runner-outdir", ".", "--client-outdir", ".", - "--test-expectations", - "../../weblayer/browser/android/javatests/skew/expectations.txt", - "--webview-apk-path=apks/SystemWebView.apk", "--implementation-outdir", "../../weblayer_instrumentation_test_M103/out/Release", + "--test-expectations", + "../../weblayer/browser/android/javatests/skew/expectations.txt", "--impl-version=103", "--gs-results-bucket=chromium-result-details", "--recover-devices", @@ -49117,7 +49117,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M103", - "revision": "version:103.0.5060.62" + "revision": "version:103.0.5060.64" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -49168,15 +49168,15 @@ { "args": [ "--additional-apk=apks/WebLayerShellSystemWebView.apk", + "--webview-apk-path=apks/SystemWebView.apk", "--test-runner-outdir", ".", "--client-outdir", ".", - "--test-expectations", - "../../weblayer/browser/android/javatests/skew/expectations.txt", - "--webview-apk-path=apks/SystemWebView.apk", "--implementation-outdir", "../../weblayer_instrumentation_test_M104/out/Release", + "--test-expectations", + "../../weblayer/browser/android/javatests/skew/expectations.txt", "--impl-version=104", "--gs-results-bucket=chromium-result-details", "--recover-devices", @@ -49202,7 +49202,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M104", - "revision": "version:104.0.5112.23" + "revision": "version:104.0.5112.24" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -49665,15 +49665,15 @@ { "args": [ "--additional-apk=apks/WebLayerShellSystemWebView.apk", + "--webview-apk-path=apks/SystemWebView.apk", "--test-runner-outdir", ".", + "--client-outdir", + "../../weblayer_instrumentation_test_M103/out/Release", "--implementation-outdir", ".", "--test-expectations", "../../weblayer/browser/android/javatests/skew/expectations.txt", - "--webview-apk-path=apks/SystemWebView.apk", - "--client-outdir", - "../../weblayer_instrumentation_test_M103/out/Release", "--client-version=103", "--gs-results-bucket=chromium-result-details", "--recover-devices", @@ -49699,7 +49699,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M103", - "revision": "version:103.0.5060.62" + "revision": "version:103.0.5060.64" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -49750,15 +49750,15 @@ { "args": [ "--additional-apk=apks/WebLayerShellSystemWebView.apk", + "--webview-apk-path=apks/SystemWebView.apk", "--test-runner-outdir", ".", + "--client-outdir", + "../../weblayer_instrumentation_test_M104/out/Release", "--implementation-outdir", ".", "--test-expectations", "../../weblayer/browser/android/javatests/skew/expectations.txt", - "--webview-apk-path=apks/SystemWebView.apk", - "--client-outdir", - "../../weblayer_instrumentation_test_M104/out/Release", "--client-version=104", "--gs-results-bucket=chromium-result-details", "--recover-devices", @@ -49784,7 +49784,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M104", - "revision": "version:104.0.5112.23" + "revision": "version:104.0.5112.24" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -50175,15 +50175,15 @@ { "args": [ "--additional-apk=apks/WebLayerShellSystemWebView.apk", + "--webview-apk-path=apks/SystemWebView.apk", "--test-runner-outdir", ".", "--client-outdir", ".", - "--test-expectations", - "../../weblayer/browser/android/javatests/skew/expectations.txt", - "--webview-apk-path=apks/SystemWebView.apk", "--implementation-outdir", "../../weblayer_instrumentation_test_M103/out/Release", + "--test-expectations", + "../../weblayer/browser/android/javatests/skew/expectations.txt", "--impl-version=103", "--gs-results-bucket=chromium-result-details", "--recover-devices", @@ -50209,7 +50209,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M103", - "revision": "version:103.0.5060.62" + "revision": "version:103.0.5060.64" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}", @@ -50260,15 +50260,15 @@ { "args": [ "--additional-apk=apks/WebLayerShellSystemWebView.apk", + "--webview-apk-path=apks/SystemWebView.apk", "--test-runner-outdir", ".", "--client-outdir", ".", - "--test-expectations", - "../../weblayer/browser/android/javatests/skew/expectations.txt", - "--webview-apk-path=apks/SystemWebView.apk", "--implementation-outdir", "../../weblayer_instrumentation_test_M104/out/Release", + "--test-expectations", + "../../weblayer/browser/android/javatests/skew/expectations.txt", "--impl-version=104", "--gs-results-bucket=chromium-result-details", "--recover-devices", @@ -50294,7 +50294,7 @@ { "cipd_package": "chromium/testing/weblayer-x86", "location": "weblayer_instrumentation_test_M104", - "revision": "version:104.0.5112.23" + "revision": "version:104.0.5112.24" }, { "cipd_package": "infra/tools/luci/logdog/butler/${platform}",
diff --git a/testing/buildbot/chromium.chromiumos.json b/testing/buildbot/chromium.chromiumos.json index 5aa313b..38abb1f 100644 --- a/testing/buildbot/chromium.chromiumos.json +++ b/testing/buildbot/chromium.chromiumos.json
@@ -5592,21 +5592,21 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.filter;../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v102.0.5005.75/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v102.0.5005.125/test_ash_chrome" ], "isolate_profile_data": true, "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "interactive_ui_tests Lacros version skew testing ash 102.0.5005.75", + "name": "interactive_ui_tests Lacros version skew testing ash 102.0.5005.125", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v102.0.5005.75", - "revision": "version:102.0.5005.75" + "location": "lacros_version_skew_tests_v102.0.5005.125", + "revision": "version:102.0.5005.125" } ], "dimension_sets": [ @@ -5619,26 +5619,26 @@ }, "test": "interactive_ui_tests", "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/", - "variant_id": "Lacros version skew testing ash 102.0.5005.75" + "variant_id": "Lacros version skew testing ash 102.0.5005.125" }, { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.filter;../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.15/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.53/test_ash_chrome" ], "isolate_profile_data": true, "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "interactive_ui_tests Lacros version skew testing ash 103.0.5060.15", + "name": "interactive_ui_tests Lacros version skew testing ash 103.0.5060.53", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v103.0.5060.15", - "revision": "version:103.0.5060.15" + "location": "lacros_version_skew_tests_v103.0.5060.53", + "revision": "version:103.0.5060.53" } ], "dimension_sets": [ @@ -5651,26 +5651,26 @@ }, "test": "interactive_ui_tests", "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/", - "variant_id": "Lacros version skew testing ash 103.0.5060.15" + "variant_id": "Lacros version skew testing ash 103.0.5060.53" }, { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.filter;../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.22/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v104.0.5112.9/test_ash_chrome" ], "isolate_profile_data": true, "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "interactive_ui_tests Lacros version skew testing ash 103.0.5060.22", + "name": "interactive_ui_tests Lacros version skew testing ash 104.0.5112.9", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v103.0.5060.22", - "revision": "version:103.0.5060.22" + "location": "lacros_version_skew_tests_v104.0.5112.9", + "revision": "version:104.0.5112.9" } ], "dimension_sets": [ @@ -5683,26 +5683,26 @@ }, "test": "interactive_ui_tests", "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/", - "variant_id": "Lacros version skew testing ash 103.0.5060.22" + "variant_id": "Lacros version skew testing ash 104.0.5112.9" }, { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.filter;../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v104.0.5101.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5138.0/test_ash_chrome" ], "isolate_profile_data": true, "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "interactive_ui_tests Lacros version skew testing ash 104.0.5101.0", + "name": "interactive_ui_tests Lacros version skew testing ash 105.0.5138.0", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v104.0.5101.0", - "revision": "version:104.0.5101.0" + "location": "lacros_version_skew_tests_v105.0.5138.0", + "revision": "version:105.0.5138.0" } ], "dimension_sets": [ @@ -5715,7 +5715,7 @@ }, "test": "interactive_ui_tests", "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/", - "variant_id": "Lacros version skew testing ash 104.0.5101.0" + "variant_id": "Lacros version skew testing ash 105.0.5138.0" }, { "isolate_profile_data": true, @@ -5760,21 +5760,21 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v102.0.5005.75/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v102.0.5005.125/test_ash_chrome" ], "isolate_profile_data": true, "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests Lacros version skew testing ash 102.0.5005.75", + "name": "lacros_chrome_browsertests Lacros version skew testing ash 102.0.5005.125", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v102.0.5005.75", - "revision": "version:102.0.5005.75" + "location": "lacros_version_skew_tests_v102.0.5005.125", + "revision": "version:102.0.5005.125" } ], "dimension_sets": [ @@ -5786,26 +5786,26 @@ }, "test": "lacros_chrome_browsertests", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests/", - "variant_id": "Lacros version skew testing ash 102.0.5005.75" + "variant_id": "Lacros version skew testing ash 102.0.5005.125" }, { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.15/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.53/test_ash_chrome" ], "isolate_profile_data": true, "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests Lacros version skew testing ash 103.0.5060.15", + "name": "lacros_chrome_browsertests Lacros version skew testing ash 103.0.5060.53", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v103.0.5060.15", - "revision": "version:103.0.5060.15" + "location": "lacros_version_skew_tests_v103.0.5060.53", + "revision": "version:103.0.5060.53" } ], "dimension_sets": [ @@ -5817,26 +5817,26 @@ }, "test": "lacros_chrome_browsertests", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests/", - "variant_id": "Lacros version skew testing ash 103.0.5060.15" + "variant_id": "Lacros version skew testing ash 103.0.5060.53" }, { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.22/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v104.0.5112.9/test_ash_chrome" ], "isolate_profile_data": true, "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests Lacros version skew testing ash 103.0.5060.22", + "name": "lacros_chrome_browsertests Lacros version skew testing ash 104.0.5112.9", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v103.0.5060.22", - "revision": "version:103.0.5060.22" + "location": "lacros_version_skew_tests_v104.0.5112.9", + "revision": "version:104.0.5112.9" } ], "dimension_sets": [ @@ -5848,26 +5848,26 @@ }, "test": "lacros_chrome_browsertests", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests/", - "variant_id": "Lacros version skew testing ash 103.0.5060.22" + "variant_id": "Lacros version skew testing ash 104.0.5112.9" }, { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v104.0.5101.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5138.0/test_ash_chrome" ], "isolate_profile_data": true, "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests Lacros version skew testing ash 104.0.5101.0", + "name": "lacros_chrome_browsertests Lacros version skew testing ash 105.0.5138.0", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v104.0.5101.0", - "revision": "version:104.0.5101.0" + "location": "lacros_version_skew_tests_v105.0.5138.0", + "revision": "version:105.0.5138.0" } ], "dimension_sets": [ @@ -5879,7 +5879,7 @@ }, "test": "lacros_chrome_browsertests", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests/", - "variant_id": "Lacros version skew testing ash 104.0.5101.0" + "variant_id": "Lacros version skew testing ash 105.0.5138.0" }, { "args": [ @@ -5906,21 +5906,21 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v102.0.5005.75/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v102.0.5005.125/test_ash_chrome" ], "isolate_profile_data": true, "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 102.0.5005.75", + "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 102.0.5005.125", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v102.0.5005.75", - "revision": "version:102.0.5005.75" + "location": "lacros_version_skew_tests_v102.0.5005.125", + "revision": "version:102.0.5005.125" } ], "dimension_sets": [ @@ -5932,26 +5932,26 @@ }, "test": "lacros_chrome_browsertests_run_in_series", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests_run_in_series/", - "variant_id": "Lacros version skew testing ash 102.0.5005.75" + "variant_id": "Lacros version skew testing ash 102.0.5005.125" }, { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.15/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.53/test_ash_chrome" ], "isolate_profile_data": true, "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 103.0.5060.15", + "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 103.0.5060.53", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v103.0.5060.15", - "revision": "version:103.0.5060.15" + "location": "lacros_version_skew_tests_v103.0.5060.53", + "revision": "version:103.0.5060.53" } ], "dimension_sets": [ @@ -5963,26 +5963,26 @@ }, "test": "lacros_chrome_browsertests_run_in_series", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests_run_in_series/", - "variant_id": "Lacros version skew testing ash 103.0.5060.15" + "variant_id": "Lacros version skew testing ash 103.0.5060.53" }, { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.22/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v104.0.5112.9/test_ash_chrome" ], "isolate_profile_data": true, "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 103.0.5060.22", + "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 104.0.5112.9", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v103.0.5060.22", - "revision": "version:103.0.5060.22" + "location": "lacros_version_skew_tests_v104.0.5112.9", + "revision": "version:104.0.5112.9" } ], "dimension_sets": [ @@ -5994,26 +5994,26 @@ }, "test": "lacros_chrome_browsertests_run_in_series", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests_run_in_series/", - "variant_id": "Lacros version skew testing ash 103.0.5060.22" + "variant_id": "Lacros version skew testing ash 104.0.5112.9" }, { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v104.0.5101.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5138.0/test_ash_chrome" ], "isolate_profile_data": true, "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 104.0.5101.0", + "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 105.0.5138.0", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v104.0.5101.0", - "revision": "version:104.0.5101.0" + "location": "lacros_version_skew_tests_v105.0.5138.0", + "revision": "version:105.0.5138.0" } ], "dimension_sets": [ @@ -6025,7 +6025,7 @@ }, "test": "lacros_chrome_browsertests_run_in_series", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests_run_in_series/", - "variant_id": "Lacros version skew testing ash 104.0.5101.0" + "variant_id": "Lacros version skew testing ash 105.0.5138.0" }, { "isolate_profile_data": true,
diff --git a/testing/buildbot/chromium.clang.json b/testing/buildbot/chromium.clang.json index a368f8d..d9f84b2 100644 --- a/testing/buildbot/chromium.clang.json +++ b/testing/buildbot/chromium.clang.json
@@ -9492,7 +9492,8 @@ }, { "args": [ - "--child-arg=--ozone-platform=headless" + "--", + "--ozone-platform=headless" ], "merge": { "args": [], @@ -9816,7 +9817,8 @@ }, { "args": [ - "--child-arg=--vmodule=test_navigation_listener=1" + "--", + "--vmodule=test_navigation_listener=1" ], "merge": { "args": [], @@ -10972,7 +10974,8 @@ }, { "args": [ - "--child-arg=--ozone-platform=headless" + "--", + "--ozone-platform=headless" ], "merge": { "args": [], @@ -11247,7 +11250,8 @@ }, { "args": [ - "--child-arg=--vmodule=test_navigation_listener=1" + "--", + "--vmodule=test_navigation_listener=1" ], "merge": { "args": [],
diff --git a/testing/buildbot/chromium.fuchsia.fyi.json b/testing/buildbot/chromium.fuchsia.fyi.json index 9029b82..5a4b390 100644 --- a/testing/buildbot/chromium.fuchsia.fyi.json +++ b/testing/buildbot/chromium.fuchsia.fyi.json
@@ -741,7 +741,8 @@ }, { "args": [ - "--child-arg=--ozone-platform=headless" + "--", + "--ozone-platform=headless" ], "merge": { "args": [], @@ -1019,7 +1020,8 @@ }, { "args": [ - "--child-arg=--vmodule=test_navigation_listener=1" + "--", + "--vmodule=test_navigation_listener=1" ], "merge": { "args": [], @@ -1997,7 +1999,8 @@ }, { "args": [ - "--child-arg=--ozone-platform=headless" + "--", + "--ozone-platform=headless" ], "merge": { "args": [], @@ -2324,7 +2327,8 @@ }, { "args": [ - "--child-arg=--vmodule=test_navigation_listener=1" + "--", + "--vmodule=test_navigation_listener=1" ], "merge": { "args": [], @@ -3284,7 +3288,8 @@ }, { "args": [ - "--child-arg=--ozone-platform=headless" + "--", + "--ozone-platform=headless" ], "merge": { "args": [], @@ -3608,7 +3613,8 @@ }, { "args": [ - "--child-arg=--vmodule=test_navigation_listener=1" + "--", + "--vmodule=test_navigation_listener=1" ], "merge": { "args": [],
diff --git a/testing/buildbot/chromium.fuchsia.json b/testing/buildbot/chromium.fuchsia.json index 7d39b7a..86b68cf4 100644 --- a/testing/buildbot/chromium.fuchsia.json +++ b/testing/buildbot/chromium.fuchsia.json
@@ -735,7 +735,8 @@ }, { "args": [ - "--child-arg=--ozone-platform=headless" + "--", + "--ozone-platform=headless" ], "merge": { "args": [], @@ -1010,7 +1011,8 @@ }, { "args": [ - "--child-arg=--vmodule=test_navigation_listener=1" + "--", + "--vmodule=test_navigation_listener=1" ], "merge": { "args": [], @@ -1999,7 +2001,8 @@ }, { "args": [ - "--child-arg=--ozone-platform=headless" + "--", + "--ozone-platform=headless" ], "merge": { "args": [], @@ -2323,7 +2326,8 @@ }, { "args": [ - "--child-arg=--vmodule=test_navigation_listener=1" + "--", + "--vmodule=test_navigation_listener=1" ], "merge": { "args": [],
diff --git a/testing/buildbot/chromium.fyi.json b/testing/buildbot/chromium.fyi.json index 68721d1..a4807487 100644 --- a/testing/buildbot/chromium.fyi.json +++ b/testing/buildbot/chromium.fyi.json
@@ -20633,7 +20633,8 @@ }, { "args": [ - "--child-arg=--ozone-platform=headless", + "--", + "--ozone-platform=headless", "--ram-size-mb=16384", "--code-coverage", "--code-coverage-dir=${ISOLATED_OUTDIR}", @@ -21049,7 +21050,8 @@ }, { "args": [ - "--child-arg=--vmodule=test_navigation_listener=1", + "--", + "--vmodule=test_navigation_listener=1", "--ram-size-mb=16384", "--code-coverage", "--code-coverage-dir=${ISOLATED_OUTDIR}", @@ -22137,7 +22139,8 @@ }, { "args": [ - "--child-arg=--ozone-platform=headless" + "--", + "--ozone-platform=headless" ], "merge": { "args": [], @@ -22495,7 +22498,8 @@ }, { "args": [ - "--child-arg=--vmodule=test_navigation_listener=1" + "--", + "--vmodule=test_navigation_listener=1" ], "merge": { "args": [], @@ -23518,7 +23522,8 @@ }, { "args": [ - "--child-arg=--ozone-platform=headless" + "--", + "--ozone-platform=headless" ], "merge": { "args": [], @@ -23842,7 +23847,8 @@ }, { "args": [ - "--child-arg=--vmodule=test_navigation_listener=1" + "--", + "--vmodule=test_navigation_listener=1" ], "merge": { "args": [], @@ -25025,7 +25031,8 @@ }, { "args": [ - "--child-arg=--ozone-platform=headless", + "--", + "--ozone-platform=headless", "--gtest_also_run_disabled_tests", "--gtest_filter=*DISABLE*" ], @@ -92773,21 +92780,21 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.filter;../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v102.0.5005.75/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v102.0.5005.125/test_ash_chrome" ], "isolate_profile_data": true, "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "interactive_ui_tests Lacros version skew testing ash 102.0.5005.75", + "name": "interactive_ui_tests Lacros version skew testing ash 102.0.5005.125", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v102.0.5005.75", - "revision": "version:102.0.5005.75" + "location": "lacros_version_skew_tests_v102.0.5005.125", + "revision": "version:102.0.5005.125" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", @@ -92795,26 +92802,26 @@ }, "test": "interactive_ui_tests", "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/", - "variant_id": "Lacros version skew testing ash 102.0.5005.75" + "variant_id": "Lacros version skew testing ash 102.0.5005.125" }, { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.filter;../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.15/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.53/test_ash_chrome" ], "isolate_profile_data": true, "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "interactive_ui_tests Lacros version skew testing ash 103.0.5060.15", + "name": "interactive_ui_tests Lacros version skew testing ash 103.0.5060.53", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v103.0.5060.15", - "revision": "version:103.0.5060.15" + "location": "lacros_version_skew_tests_v103.0.5060.53", + "revision": "version:103.0.5060.53" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", @@ -92822,26 +92829,26 @@ }, "test": "interactive_ui_tests", "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/", - "variant_id": "Lacros version skew testing ash 103.0.5060.15" + "variant_id": "Lacros version skew testing ash 103.0.5060.53" }, { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.filter;../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.22/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v104.0.5112.9/test_ash_chrome" ], "isolate_profile_data": true, "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "interactive_ui_tests Lacros version skew testing ash 103.0.5060.22", + "name": "interactive_ui_tests Lacros version skew testing ash 104.0.5112.9", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v103.0.5060.22", - "revision": "version:103.0.5060.22" + "location": "lacros_version_skew_tests_v104.0.5112.9", + "revision": "version:104.0.5112.9" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", @@ -92849,26 +92856,26 @@ }, "test": "interactive_ui_tests", "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/", - "variant_id": "Lacros version skew testing ash 103.0.5060.22" + "variant_id": "Lacros version skew testing ash 104.0.5112.9" }, { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.filter;../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v104.0.5101.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5138.0/test_ash_chrome" ], "isolate_profile_data": true, "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "interactive_ui_tests Lacros version skew testing ash 104.0.5101.0", + "name": "interactive_ui_tests Lacros version skew testing ash 105.0.5138.0", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v104.0.5101.0", - "revision": "version:104.0.5101.0" + "location": "lacros_version_skew_tests_v105.0.5138.0", + "revision": "version:105.0.5138.0" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com", @@ -92876,7 +92883,7 @@ }, "test": "interactive_ui_tests", "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/", - "variant_id": "Lacros version skew testing ash 104.0.5101.0" + "variant_id": "Lacros version skew testing ash 105.0.5138.0" }, { "isolate_profile_data": true, @@ -92911,106 +92918,106 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v102.0.5005.75/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v102.0.5005.125/test_ash_chrome" ], "isolate_profile_data": true, "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests Lacros version skew testing ash 102.0.5005.75", + "name": "lacros_chrome_browsertests Lacros version skew testing ash 102.0.5005.125", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v102.0.5005.75", - "revision": "version:102.0.5005.75" + "location": "lacros_version_skew_tests_v102.0.5005.125", + "revision": "version:102.0.5005.125" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, "test": "lacros_chrome_browsertests", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests/", - "variant_id": "Lacros version skew testing ash 102.0.5005.75" + "variant_id": "Lacros version skew testing ash 102.0.5005.125" }, { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.15/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.53/test_ash_chrome" ], "isolate_profile_data": true, "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests Lacros version skew testing ash 103.0.5060.15", + "name": "lacros_chrome_browsertests Lacros version skew testing ash 103.0.5060.53", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v103.0.5060.15", - "revision": "version:103.0.5060.15" + "location": "lacros_version_skew_tests_v103.0.5060.53", + "revision": "version:103.0.5060.53" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, "test": "lacros_chrome_browsertests", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests/", - "variant_id": "Lacros version skew testing ash 103.0.5060.15" + "variant_id": "Lacros version skew testing ash 103.0.5060.53" }, { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.22/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v104.0.5112.9/test_ash_chrome" ], "isolate_profile_data": true, "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests Lacros version skew testing ash 103.0.5060.22", + "name": "lacros_chrome_browsertests Lacros version skew testing ash 104.0.5112.9", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v103.0.5060.22", - "revision": "version:103.0.5060.22" + "location": "lacros_version_skew_tests_v104.0.5112.9", + "revision": "version:104.0.5112.9" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, "test": "lacros_chrome_browsertests", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests/", - "variant_id": "Lacros version skew testing ash 103.0.5060.22" + "variant_id": "Lacros version skew testing ash 104.0.5112.9" }, { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v104.0.5101.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5138.0/test_ash_chrome" ], "isolate_profile_data": true, "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests Lacros version skew testing ash 104.0.5101.0", + "name": "lacros_chrome_browsertests Lacros version skew testing ash 105.0.5138.0", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v104.0.5101.0", - "revision": "version:104.0.5101.0" + "location": "lacros_version_skew_tests_v105.0.5138.0", + "revision": "version:105.0.5138.0" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, "test": "lacros_chrome_browsertests", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests/", - "variant_id": "Lacros version skew testing ash 104.0.5101.0" + "variant_id": "Lacros version skew testing ash 105.0.5138.0" }, { "args": [ @@ -93032,106 +93039,106 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v102.0.5005.75/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v102.0.5005.125/test_ash_chrome" ], "isolate_profile_data": true, "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 102.0.5005.75", + "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 102.0.5005.125", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v102.0.5005.75", - "revision": "version:102.0.5005.75" + "location": "lacros_version_skew_tests_v102.0.5005.125", + "revision": "version:102.0.5005.125" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, "test": "lacros_chrome_browsertests_run_in_series", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests_run_in_series/", - "variant_id": "Lacros version skew testing ash 102.0.5005.75" + "variant_id": "Lacros version skew testing ash 102.0.5005.125" }, { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.15/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.53/test_ash_chrome" ], "isolate_profile_data": true, "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 103.0.5060.15", + "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 103.0.5060.53", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v103.0.5060.15", - "revision": "version:103.0.5060.15" + "location": "lacros_version_skew_tests_v103.0.5060.53", + "revision": "version:103.0.5060.53" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, "test": "lacros_chrome_browsertests_run_in_series", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests_run_in_series/", - "variant_id": "Lacros version skew testing ash 103.0.5060.15" + "variant_id": "Lacros version skew testing ash 103.0.5060.53" }, { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.22/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v104.0.5112.9/test_ash_chrome" ], "isolate_profile_data": true, "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 103.0.5060.22", + "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 104.0.5112.9", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v103.0.5060.22", - "revision": "version:103.0.5060.22" + "location": "lacros_version_skew_tests_v104.0.5112.9", + "revision": "version:104.0.5112.9" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, "test": "lacros_chrome_browsertests_run_in_series", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests_run_in_series/", - "variant_id": "Lacros version skew testing ash 103.0.5060.22" + "variant_id": "Lacros version skew testing ash 104.0.5112.9" }, { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v104.0.5101.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5138.0/test_ash_chrome" ], "isolate_profile_data": true, "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 104.0.5101.0", + "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 105.0.5138.0", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v104.0.5101.0", - "revision": "version:104.0.5101.0" + "location": "lacros_version_skew_tests_v105.0.5138.0", + "revision": "version:105.0.5138.0" } ], "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" }, "test": "lacros_chrome_browsertests_run_in_series", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests_run_in_series/", - "variant_id": "Lacros version skew testing ash 104.0.5101.0" + "variant_id": "Lacros version skew testing ash 105.0.5138.0" }, { "isolate_profile_data": true, @@ -94373,20 +94380,20 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.filter;../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v102.0.5005.75/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v102.0.5005.125/test_ash_chrome" ], "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "interactive_ui_tests Lacros version skew testing ash 102.0.5005.75", + "name": "interactive_ui_tests Lacros version skew testing ash 102.0.5005.125", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v102.0.5005.75", - "revision": "version:102.0.5005.75" + "location": "lacros_version_skew_tests_v102.0.5005.125", + "revision": "version:102.0.5005.125" } ], "dimension_sets": [ @@ -94400,25 +94407,25 @@ }, "test": "interactive_ui_tests", "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/", - "variant_id": "Lacros version skew testing ash 102.0.5005.75" + "variant_id": "Lacros version skew testing ash 102.0.5005.125" }, { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.filter;../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.15/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.53/test_ash_chrome" ], "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "interactive_ui_tests Lacros version skew testing ash 103.0.5060.15", + "name": "interactive_ui_tests Lacros version skew testing ash 103.0.5060.53", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v103.0.5060.15", - "revision": "version:103.0.5060.15" + "location": "lacros_version_skew_tests_v103.0.5060.53", + "revision": "version:103.0.5060.53" } ], "dimension_sets": [ @@ -94432,25 +94439,25 @@ }, "test": "interactive_ui_tests", "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/", - "variant_id": "Lacros version skew testing ash 103.0.5060.15" + "variant_id": "Lacros version skew testing ash 103.0.5060.53" }, { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.filter;../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.22/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v104.0.5112.9/test_ash_chrome" ], "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "interactive_ui_tests Lacros version skew testing ash 103.0.5060.22", + "name": "interactive_ui_tests Lacros version skew testing ash 104.0.5112.9", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v103.0.5060.22", - "revision": "version:103.0.5060.22" + "location": "lacros_version_skew_tests_v104.0.5112.9", + "revision": "version:104.0.5112.9" } ], "dimension_sets": [ @@ -94464,25 +94471,25 @@ }, "test": "interactive_ui_tests", "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/", - "variant_id": "Lacros version skew testing ash 103.0.5060.22" + "variant_id": "Lacros version skew testing ash 104.0.5112.9" }, { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.filter;../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v104.0.5101.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5138.0/test_ash_chrome" ], "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "interactive_ui_tests Lacros version skew testing ash 104.0.5101.0", + "name": "interactive_ui_tests Lacros version skew testing ash 105.0.5138.0", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v104.0.5101.0", - "revision": "version:104.0.5101.0" + "location": "lacros_version_skew_tests_v105.0.5138.0", + "revision": "version:105.0.5138.0" } ], "dimension_sets": [ @@ -94496,7 +94503,7 @@ }, "test": "interactive_ui_tests", "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/", - "variant_id": "Lacros version skew testing ash 104.0.5101.0" + "variant_id": "Lacros version skew testing ash 105.0.5138.0" }, { "merge": { @@ -94541,20 +94548,20 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v102.0.5005.75/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v102.0.5005.125/test_ash_chrome" ], "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests Lacros version skew testing ash 102.0.5005.75", + "name": "lacros_chrome_browsertests Lacros version skew testing ash 102.0.5005.125", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v102.0.5005.75", - "revision": "version:102.0.5005.75" + "location": "lacros_version_skew_tests_v102.0.5005.125", + "revision": "version:102.0.5005.125" } ], "dimension_sets": [ @@ -94567,25 +94574,25 @@ }, "test": "lacros_chrome_browsertests", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests/", - "variant_id": "Lacros version skew testing ash 102.0.5005.75" + "variant_id": "Lacros version skew testing ash 102.0.5005.125" }, { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.15/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.53/test_ash_chrome" ], "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests Lacros version skew testing ash 103.0.5060.15", + "name": "lacros_chrome_browsertests Lacros version skew testing ash 103.0.5060.53", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v103.0.5060.15", - "revision": "version:103.0.5060.15" + "location": "lacros_version_skew_tests_v103.0.5060.53", + "revision": "version:103.0.5060.53" } ], "dimension_sets": [ @@ -94598,25 +94605,25 @@ }, "test": "lacros_chrome_browsertests", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests/", - "variant_id": "Lacros version skew testing ash 103.0.5060.15" + "variant_id": "Lacros version skew testing ash 103.0.5060.53" }, { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.22/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v104.0.5112.9/test_ash_chrome" ], "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests Lacros version skew testing ash 103.0.5060.22", + "name": "lacros_chrome_browsertests Lacros version skew testing ash 104.0.5112.9", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v103.0.5060.22", - "revision": "version:103.0.5060.22" + "location": "lacros_version_skew_tests_v104.0.5112.9", + "revision": "version:104.0.5112.9" } ], "dimension_sets": [ @@ -94629,25 +94636,25 @@ }, "test": "lacros_chrome_browsertests", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests/", - "variant_id": "Lacros version skew testing ash 103.0.5060.22" + "variant_id": "Lacros version skew testing ash 104.0.5112.9" }, { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v104.0.5101.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5138.0/test_ash_chrome" ], "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests Lacros version skew testing ash 104.0.5101.0", + "name": "lacros_chrome_browsertests Lacros version skew testing ash 105.0.5138.0", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v104.0.5101.0", - "revision": "version:104.0.5101.0" + "location": "lacros_version_skew_tests_v105.0.5138.0", + "revision": "version:105.0.5138.0" } ], "dimension_sets": [ @@ -94660,7 +94667,7 @@ }, "test": "lacros_chrome_browsertests", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests/", - "variant_id": "Lacros version skew testing ash 104.0.5101.0" + "variant_id": "Lacros version skew testing ash 105.0.5138.0" }, { "args": [ @@ -94687,20 +94694,20 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v102.0.5005.75/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v102.0.5005.125/test_ash_chrome" ], "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 102.0.5005.75", + "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 102.0.5005.125", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v102.0.5005.75", - "revision": "version:102.0.5005.75" + "location": "lacros_version_skew_tests_v102.0.5005.125", + "revision": "version:102.0.5005.125" } ], "dimension_sets": [ @@ -94713,25 +94720,25 @@ }, "test": "lacros_chrome_browsertests_run_in_series", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests_run_in_series/", - "variant_id": "Lacros version skew testing ash 102.0.5005.75" + "variant_id": "Lacros version skew testing ash 102.0.5005.125" }, { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.15/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.53/test_ash_chrome" ], "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 103.0.5060.15", + "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 103.0.5060.53", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v103.0.5060.15", - "revision": "version:103.0.5060.15" + "location": "lacros_version_skew_tests_v103.0.5060.53", + "revision": "version:103.0.5060.53" } ], "dimension_sets": [ @@ -94744,25 +94751,25 @@ }, "test": "lacros_chrome_browsertests_run_in_series", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests_run_in_series/", - "variant_id": "Lacros version skew testing ash 103.0.5060.15" + "variant_id": "Lacros version skew testing ash 103.0.5060.53" }, { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.22/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v104.0.5112.9/test_ash_chrome" ], "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 103.0.5060.22", + "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 104.0.5112.9", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v103.0.5060.22", - "revision": "version:103.0.5060.22" + "location": "lacros_version_skew_tests_v104.0.5112.9", + "revision": "version:104.0.5112.9" } ], "dimension_sets": [ @@ -94775,25 +94782,25 @@ }, "test": "lacros_chrome_browsertests_run_in_series", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests_run_in_series/", - "variant_id": "Lacros version skew testing ash 103.0.5060.22" + "variant_id": "Lacros version skew testing ash 104.0.5112.9" }, { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v104.0.5101.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5138.0/test_ash_chrome" ], "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 104.0.5101.0", + "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 105.0.5138.0", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v104.0.5101.0", - "revision": "version:104.0.5101.0" + "location": "lacros_version_skew_tests_v105.0.5138.0", + "revision": "version:105.0.5138.0" } ], "dimension_sets": [ @@ -94806,7 +94813,7 @@ }, "test": "lacros_chrome_browsertests_run_in_series", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests_run_in_series/", - "variant_id": "Lacros version skew testing ash 104.0.5101.0" + "variant_id": "Lacros version skew testing ash 105.0.5138.0" }, { "merge": { @@ -96206,20 +96213,20 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.filter;../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v102.0.5005.75/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v102.0.5005.125/test_ash_chrome" ], "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "interactive_ui_tests Lacros version skew testing ash 102.0.5005.75", + "name": "interactive_ui_tests Lacros version skew testing ash 102.0.5005.125", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v102.0.5005.75", - "revision": "version:102.0.5005.75" + "location": "lacros_version_skew_tests_v102.0.5005.125", + "revision": "version:102.0.5005.125" } ], "dimension_sets": [ @@ -96233,25 +96240,25 @@ }, "test": "interactive_ui_tests", "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/", - "variant_id": "Lacros version skew testing ash 102.0.5005.75" + "variant_id": "Lacros version skew testing ash 102.0.5005.125" }, { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.filter;../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.15/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.53/test_ash_chrome" ], "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "interactive_ui_tests Lacros version skew testing ash 103.0.5060.15", + "name": "interactive_ui_tests Lacros version skew testing ash 103.0.5060.53", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v103.0.5060.15", - "revision": "version:103.0.5060.15" + "location": "lacros_version_skew_tests_v103.0.5060.53", + "revision": "version:103.0.5060.53" } ], "dimension_sets": [ @@ -96265,25 +96272,25 @@ }, "test": "interactive_ui_tests", "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/", - "variant_id": "Lacros version skew testing ash 103.0.5060.15" + "variant_id": "Lacros version skew testing ash 103.0.5060.53" }, { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.filter;../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.22/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v104.0.5112.9/test_ash_chrome" ], "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "interactive_ui_tests Lacros version skew testing ash 103.0.5060.22", + "name": "interactive_ui_tests Lacros version skew testing ash 104.0.5112.9", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v103.0.5060.22", - "revision": "version:103.0.5060.22" + "location": "lacros_version_skew_tests_v104.0.5112.9", + "revision": "version:104.0.5112.9" } ], "dimension_sets": [ @@ -96297,25 +96304,25 @@ }, "test": "interactive_ui_tests", "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/", - "variant_id": "Lacros version skew testing ash 103.0.5060.22" + "variant_id": "Lacros version skew testing ash 104.0.5112.9" }, { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.filter;../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v104.0.5101.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5138.0/test_ash_chrome" ], "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "interactive_ui_tests Lacros version skew testing ash 104.0.5101.0", + "name": "interactive_ui_tests Lacros version skew testing ash 105.0.5138.0", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v104.0.5101.0", - "revision": "version:104.0.5101.0" + "location": "lacros_version_skew_tests_v105.0.5138.0", + "revision": "version:105.0.5138.0" } ], "dimension_sets": [ @@ -96329,7 +96336,7 @@ }, "test": "interactive_ui_tests", "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/", - "variant_id": "Lacros version skew testing ash 104.0.5101.0" + "variant_id": "Lacros version skew testing ash 105.0.5138.0" }, { "merge": { @@ -96374,20 +96381,20 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v102.0.5005.75/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v102.0.5005.125/test_ash_chrome" ], "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests Lacros version skew testing ash 102.0.5005.75", + "name": "lacros_chrome_browsertests Lacros version skew testing ash 102.0.5005.125", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v102.0.5005.75", - "revision": "version:102.0.5005.75" + "location": "lacros_version_skew_tests_v102.0.5005.125", + "revision": "version:102.0.5005.125" } ], "dimension_sets": [ @@ -96400,25 +96407,25 @@ }, "test": "lacros_chrome_browsertests", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests/", - "variant_id": "Lacros version skew testing ash 102.0.5005.75" + "variant_id": "Lacros version skew testing ash 102.0.5005.125" }, { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.15/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.53/test_ash_chrome" ], "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests Lacros version skew testing ash 103.0.5060.15", + "name": "lacros_chrome_browsertests Lacros version skew testing ash 103.0.5060.53", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v103.0.5060.15", - "revision": "version:103.0.5060.15" + "location": "lacros_version_skew_tests_v103.0.5060.53", + "revision": "version:103.0.5060.53" } ], "dimension_sets": [ @@ -96431,25 +96438,25 @@ }, "test": "lacros_chrome_browsertests", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests/", - "variant_id": "Lacros version skew testing ash 103.0.5060.15" + "variant_id": "Lacros version skew testing ash 103.0.5060.53" }, { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.22/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v104.0.5112.9/test_ash_chrome" ], "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests Lacros version skew testing ash 103.0.5060.22", + "name": "lacros_chrome_browsertests Lacros version skew testing ash 104.0.5112.9", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v103.0.5060.22", - "revision": "version:103.0.5060.22" + "location": "lacros_version_skew_tests_v104.0.5112.9", + "revision": "version:104.0.5112.9" } ], "dimension_sets": [ @@ -96462,25 +96469,25 @@ }, "test": "lacros_chrome_browsertests", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests/", - "variant_id": "Lacros version skew testing ash 103.0.5060.22" + "variant_id": "Lacros version skew testing ash 104.0.5112.9" }, { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v104.0.5101.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5138.0/test_ash_chrome" ], "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests Lacros version skew testing ash 104.0.5101.0", + "name": "lacros_chrome_browsertests Lacros version skew testing ash 105.0.5138.0", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v104.0.5101.0", - "revision": "version:104.0.5101.0" + "location": "lacros_version_skew_tests_v105.0.5138.0", + "revision": "version:105.0.5138.0" } ], "dimension_sets": [ @@ -96493,7 +96500,7 @@ }, "test": "lacros_chrome_browsertests", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests/", - "variant_id": "Lacros version skew testing ash 104.0.5101.0" + "variant_id": "Lacros version skew testing ash 105.0.5138.0" }, { "args": [ @@ -96520,20 +96527,20 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v102.0.5005.75/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v102.0.5005.125/test_ash_chrome" ], "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 102.0.5005.75", + "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 102.0.5005.125", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v102.0.5005.75", - "revision": "version:102.0.5005.75" + "location": "lacros_version_skew_tests_v102.0.5005.125", + "revision": "version:102.0.5005.125" } ], "dimension_sets": [ @@ -96546,25 +96553,25 @@ }, "test": "lacros_chrome_browsertests_run_in_series", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests_run_in_series/", - "variant_id": "Lacros version skew testing ash 102.0.5005.75" + "variant_id": "Lacros version skew testing ash 102.0.5005.125" }, { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.15/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.53/test_ash_chrome" ], "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 103.0.5060.15", + "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 103.0.5060.53", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v103.0.5060.15", - "revision": "version:103.0.5060.15" + "location": "lacros_version_skew_tests_v103.0.5060.53", + "revision": "version:103.0.5060.53" } ], "dimension_sets": [ @@ -96577,25 +96584,25 @@ }, "test": "lacros_chrome_browsertests_run_in_series", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests_run_in_series/", - "variant_id": "Lacros version skew testing ash 103.0.5060.15" + "variant_id": "Lacros version skew testing ash 103.0.5060.53" }, { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.22/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v104.0.5112.9/test_ash_chrome" ], "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 103.0.5060.22", + "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 104.0.5112.9", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v103.0.5060.22", - "revision": "version:103.0.5060.22" + "location": "lacros_version_skew_tests_v104.0.5112.9", + "revision": "version:104.0.5112.9" } ], "dimension_sets": [ @@ -96608,25 +96615,25 @@ }, "test": "lacros_chrome_browsertests_run_in_series", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests_run_in_series/", - "variant_id": "Lacros version skew testing ash 103.0.5060.22" + "variant_id": "Lacros version skew testing ash 104.0.5112.9" }, { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v104.0.5101.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5138.0/test_ash_chrome" ], "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 104.0.5101.0", + "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 105.0.5138.0", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v104.0.5101.0", - "revision": "version:104.0.5101.0" + "location": "lacros_version_skew_tests_v105.0.5138.0", + "revision": "version:105.0.5138.0" } ], "dimension_sets": [ @@ -96639,7 +96646,7 @@ }, "test": "lacros_chrome_browsertests_run_in_series", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests_run_in_series/", - "variant_id": "Lacros version skew testing ash 104.0.5101.0" + "variant_id": "Lacros version skew testing ash 105.0.5138.0" }, { "merge": { @@ -97281,20 +97288,20 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.filter;../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v102.0.5005.75/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v102.0.5005.125/test_ash_chrome" ], "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "interactive_ui_tests Lacros version skew testing ash 102.0.5005.75", + "name": "interactive_ui_tests Lacros version skew testing ash 102.0.5005.125", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v102.0.5005.75", - "revision": "version:102.0.5005.75" + "location": "lacros_version_skew_tests_v102.0.5005.125", + "revision": "version:102.0.5005.125" } ], "dimension_sets": [ @@ -97307,25 +97314,25 @@ }, "test": "interactive_ui_tests", "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/", - "variant_id": "Lacros version skew testing ash 102.0.5005.75" + "variant_id": "Lacros version skew testing ash 102.0.5005.125" }, { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.filter;../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.15/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.53/test_ash_chrome" ], "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "interactive_ui_tests Lacros version skew testing ash 103.0.5060.15", + "name": "interactive_ui_tests Lacros version skew testing ash 103.0.5060.53", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v103.0.5060.15", - "revision": "version:103.0.5060.15" + "location": "lacros_version_skew_tests_v103.0.5060.53", + "revision": "version:103.0.5060.53" } ], "dimension_sets": [ @@ -97338,25 +97345,25 @@ }, "test": "interactive_ui_tests", "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/", - "variant_id": "Lacros version skew testing ash 103.0.5060.15" + "variant_id": "Lacros version skew testing ash 103.0.5060.53" }, { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.filter;../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.22/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v104.0.5112.9/test_ash_chrome" ], "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "interactive_ui_tests Lacros version skew testing ash 103.0.5060.22", + "name": "interactive_ui_tests Lacros version skew testing ash 104.0.5112.9", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v103.0.5060.22", - "revision": "version:103.0.5060.22" + "location": "lacros_version_skew_tests_v104.0.5112.9", + "revision": "version:104.0.5112.9" } ], "dimension_sets": [ @@ -97369,25 +97376,25 @@ }, "test": "interactive_ui_tests", "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/", - "variant_id": "Lacros version skew testing ash 103.0.5060.22" + "variant_id": "Lacros version skew testing ash 104.0.5112.9" }, { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.filter;../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v104.0.5101.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5138.0/test_ash_chrome" ], "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "interactive_ui_tests Lacros version skew testing ash 104.0.5101.0", + "name": "interactive_ui_tests Lacros version skew testing ash 105.0.5138.0", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v104.0.5101.0", - "revision": "version:104.0.5101.0" + "location": "lacros_version_skew_tests_v105.0.5138.0", + "revision": "version:105.0.5138.0" } ], "dimension_sets": [ @@ -97400,7 +97407,7 @@ }, "test": "interactive_ui_tests", "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/", - "variant_id": "Lacros version skew testing ash 104.0.5101.0" + "variant_id": "Lacros version skew testing ash 105.0.5138.0" } ] },
diff --git a/testing/buildbot/chromium.memory.json b/testing/buildbot/chromium.memory.json index e8098c5..ba050ab 100644 --- a/testing/buildbot/chromium.memory.json +++ b/testing/buildbot/chromium.memory.json
@@ -18989,21 +18989,21 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.filter;../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v102.0.5005.75/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v102.0.5005.125/test_ash_chrome" ], "isolate_profile_data": true, "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "interactive_ui_tests Lacros version skew testing ash 102.0.5005.75", + "name": "interactive_ui_tests Lacros version skew testing ash 102.0.5005.125", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v102.0.5005.75", - "revision": "version:102.0.5005.75" + "location": "lacros_version_skew_tests_v102.0.5005.125", + "revision": "version:102.0.5005.125" } ], "dimension_sets": [ @@ -19016,26 +19016,26 @@ }, "test": "interactive_ui_tests", "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/", - "variant_id": "Lacros version skew testing ash 102.0.5005.75" + "variant_id": "Lacros version skew testing ash 102.0.5005.125" }, { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.filter;../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.15/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.53/test_ash_chrome" ], "isolate_profile_data": true, "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "interactive_ui_tests Lacros version skew testing ash 103.0.5060.15", + "name": "interactive_ui_tests Lacros version skew testing ash 103.0.5060.53", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v103.0.5060.15", - "revision": "version:103.0.5060.15" + "location": "lacros_version_skew_tests_v103.0.5060.53", + "revision": "version:103.0.5060.53" } ], "dimension_sets": [ @@ -19048,26 +19048,26 @@ }, "test": "interactive_ui_tests", "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/", - "variant_id": "Lacros version skew testing ash 103.0.5060.15" + "variant_id": "Lacros version skew testing ash 103.0.5060.53" }, { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.filter;../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.22/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v104.0.5112.9/test_ash_chrome" ], "isolate_profile_data": true, "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "interactive_ui_tests Lacros version skew testing ash 103.0.5060.22", + "name": "interactive_ui_tests Lacros version skew testing ash 104.0.5112.9", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v103.0.5060.22", - "revision": "version:103.0.5060.22" + "location": "lacros_version_skew_tests_v104.0.5112.9", + "revision": "version:104.0.5112.9" } ], "dimension_sets": [ @@ -19080,26 +19080,26 @@ }, "test": "interactive_ui_tests", "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/", - "variant_id": "Lacros version skew testing ash 103.0.5060.22" + "variant_id": "Lacros version skew testing ash 104.0.5112.9" }, { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.filter;../../testing/buildbot/filters/linux-lacros.interactive_ui_tests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v104.0.5101.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5138.0/test_ash_chrome" ], "isolate_profile_data": true, "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "interactive_ui_tests Lacros version skew testing ash 104.0.5101.0", + "name": "interactive_ui_tests Lacros version skew testing ash 105.0.5138.0", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v104.0.5101.0", - "revision": "version:104.0.5101.0" + "location": "lacros_version_skew_tests_v105.0.5138.0", + "revision": "version:105.0.5138.0" } ], "dimension_sets": [ @@ -19112,7 +19112,7 @@ }, "test": "interactive_ui_tests", "test_id_prefix": "ninja://chrome/test:interactive_ui_tests/", - "variant_id": "Lacros version skew testing ash 104.0.5101.0" + "variant_id": "Lacros version skew testing ash 105.0.5138.0" }, { "isolate_profile_data": true, @@ -19157,21 +19157,21 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v102.0.5005.75/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v102.0.5005.125/test_ash_chrome" ], "isolate_profile_data": true, "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests Lacros version skew testing ash 102.0.5005.75", + "name": "lacros_chrome_browsertests Lacros version skew testing ash 102.0.5005.125", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v102.0.5005.75", - "revision": "version:102.0.5005.75" + "location": "lacros_version_skew_tests_v102.0.5005.125", + "revision": "version:102.0.5005.125" } ], "dimension_sets": [ @@ -19183,26 +19183,26 @@ }, "test": "lacros_chrome_browsertests", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests/", - "variant_id": "Lacros version skew testing ash 102.0.5005.75" + "variant_id": "Lacros version skew testing ash 102.0.5005.125" }, { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.15/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.53/test_ash_chrome" ], "isolate_profile_data": true, "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests Lacros version skew testing ash 103.0.5060.15", + "name": "lacros_chrome_browsertests Lacros version skew testing ash 103.0.5060.53", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v103.0.5060.15", - "revision": "version:103.0.5060.15" + "location": "lacros_version_skew_tests_v103.0.5060.53", + "revision": "version:103.0.5060.53" } ], "dimension_sets": [ @@ -19214,26 +19214,26 @@ }, "test": "lacros_chrome_browsertests", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests/", - "variant_id": "Lacros version skew testing ash 103.0.5060.15" + "variant_id": "Lacros version skew testing ash 103.0.5060.53" }, { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.22/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v104.0.5112.9/test_ash_chrome" ], "isolate_profile_data": true, "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests Lacros version skew testing ash 103.0.5060.22", + "name": "lacros_chrome_browsertests Lacros version skew testing ash 104.0.5112.9", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v103.0.5060.22", - "revision": "version:103.0.5060.22" + "location": "lacros_version_skew_tests_v104.0.5112.9", + "revision": "version:104.0.5112.9" } ], "dimension_sets": [ @@ -19245,26 +19245,26 @@ }, "test": "lacros_chrome_browsertests", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests/", - "variant_id": "Lacros version skew testing ash 103.0.5060.22" + "variant_id": "Lacros version skew testing ash 104.0.5112.9" }, { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v104.0.5101.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5138.0/test_ash_chrome" ], "isolate_profile_data": true, "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests Lacros version skew testing ash 104.0.5101.0", + "name": "lacros_chrome_browsertests Lacros version skew testing ash 105.0.5138.0", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v104.0.5101.0", - "revision": "version:104.0.5101.0" + "location": "lacros_version_skew_tests_v105.0.5138.0", + "revision": "version:105.0.5138.0" } ], "dimension_sets": [ @@ -19276,7 +19276,7 @@ }, "test": "lacros_chrome_browsertests", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests/", - "variant_id": "Lacros version skew testing ash 104.0.5101.0" + "variant_id": "Lacros version skew testing ash 105.0.5138.0" }, { "args": [ @@ -19303,21 +19303,21 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v102.0.5005.75/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v102.0.5005.125/test_ash_chrome" ], "isolate_profile_data": true, "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 102.0.5005.75", + "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 102.0.5005.125", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v102.0.5005.75", - "revision": "version:102.0.5005.75" + "location": "lacros_version_skew_tests_v102.0.5005.125", + "revision": "version:102.0.5005.125" } ], "dimension_sets": [ @@ -19329,26 +19329,26 @@ }, "test": "lacros_chrome_browsertests_run_in_series", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests_run_in_series/", - "variant_id": "Lacros version skew testing ash 102.0.5005.75" + "variant_id": "Lacros version skew testing ash 102.0.5005.125" }, { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.15/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.53/test_ash_chrome" ], "isolate_profile_data": true, "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 103.0.5060.15", + "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 103.0.5060.53", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v103.0.5060.15", - "revision": "version:103.0.5060.15" + "location": "lacros_version_skew_tests_v103.0.5060.53", + "revision": "version:103.0.5060.53" } ], "dimension_sets": [ @@ -19360,26 +19360,26 @@ }, "test": "lacros_chrome_browsertests_run_in_series", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests_run_in_series/", - "variant_id": "Lacros version skew testing ash 103.0.5060.15" + "variant_id": "Lacros version skew testing ash 103.0.5060.53" }, { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.22/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v104.0.5112.9/test_ash_chrome" ], "isolate_profile_data": true, "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 103.0.5060.22", + "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 104.0.5112.9", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v103.0.5060.22", - "revision": "version:103.0.5060.22" + "location": "lacros_version_skew_tests_v104.0.5112.9", + "revision": "version:104.0.5112.9" } ], "dimension_sets": [ @@ -19391,26 +19391,26 @@ }, "test": "lacros_chrome_browsertests_run_in_series", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests_run_in_series/", - "variant_id": "Lacros version skew testing ash 103.0.5060.22" + "variant_id": "Lacros version skew testing ash 104.0.5112.9" }, { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v104.0.5101.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5138.0/test_ash_chrome" ], "isolate_profile_data": true, "merge": { "args": [], "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 104.0.5101.0", + "name": "lacros_chrome_browsertests_run_in_series Lacros version skew testing ash 105.0.5138.0", "swarming": { "can_use_on_swarming_builders": true, "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v104.0.5101.0", - "revision": "version:104.0.5101.0" + "location": "lacros_version_skew_tests_v105.0.5138.0", + "revision": "version:105.0.5138.0" } ], "dimension_sets": [ @@ -19422,7 +19422,7 @@ }, "test": "lacros_chrome_browsertests_run_in_series", "test_id_prefix": "ninja://chrome/test:lacros_chrome_browsertests_run_in_series/", - "variant_id": "Lacros version skew testing ash 104.0.5101.0" + "variant_id": "Lacros version skew testing ash 105.0.5138.0" }, { "isolate_profile_data": true,
diff --git a/testing/buildbot/filters/android.emulator_m.chrome_public_test_apk.filter b/testing/buildbot/filters/android.emulator_m.chrome_public_test_apk.filter index b4519443..e714aaee 100644 --- a/testing/buildbot/filters/android.emulator_m.chrome_public_test_apk.filter +++ b/testing/buildbot/filters/android.emulator_m.chrome_public_test_apk.filter
@@ -49,10 +49,6 @@ -org.chromium.chrome.browser.autofill_assistant.AutofillAssistantAutostartTest.testAutostart -org.chromium.chrome.browser.autofill.AutofillUpstreamTest.testSaveCardInfoBarWithEmptyYear -# crbug.com/1146477 --org.chromium.chrome.browser.autofill.AutofillUpstreamTest.testSaveCardInfoBarWithEmptyMonth --org.chromium.chrome.browser.autofill.AutofillUpstreamTest.testSaveCardInfoBarWithEmptyMonthAndYear - # crbug.com/1131717 -org.chromium.chrome.browser.autofill_assistant.AutofillAssistantKeyboardIntegrationTest.keyboardDoesNotShowOnElementClickInIFrame
diff --git a/testing/buildbot/filters/linux-lacros.browser_tests.filter b/testing/buildbot/filters/linux-lacros.browser_tests.filter index 63a59503..b822f3e3 100644 --- a/testing/buildbot/filters/linux-lacros.browser_tests.filter +++ b/testing/buildbot/filters/linux-lacros.browser_tests.filter
@@ -10,7 +10,6 @@ -BrowserViewTest.GetAccessibleTabModalDialogTitle -BrowsingDataRemoverBrowserTest.StorageRemovedFromDisk -ContextMenuBrowserTest.OpenLinkInProfile --ContextMenuBrowserTest.OpenLinkInWebApp -DeclarativeContentApiTest.RulesPersistence -ExternalProtocolDialogBrowserTest.TestFocus -FolderUploadConfirmationViewTest.InitiallyFocusesCancel
diff --git a/testing/buildbot/internal.chromeos.fyi.json b/testing/buildbot/internal.chromeos.fyi.json index aa6e81e..49e88726 100644 --- a/testing/buildbot/internal.chromeos.fyi.json +++ b/testing/buildbot/internal.chromeos.fyi.json
@@ -1038,7 +1038,7 @@ { "args": [], "cros_board": "octopus", - "cros_img": "octopus-release/R105-14929.0.0", + "cros_img": "octopus-release/R105-14933.0.0", "name": "lacros_fyi_tast_tests OCTOPUS_RELEASE_LKGM", "swarming": {}, "tast_expr": "(\"group:mainline\" && \"dep:lacros\" && !informational)", @@ -1086,7 +1086,7 @@ { "args": [], "cros_board": "octopus", - "cros_img": "octopus-release/R105-14929.0.0", + "cros_img": "octopus-release/R105-14933.0.0", "name": "lacros_variations_tast_tests OCTOPUS_RELEASE_LKGM", "swarming": {}, "tast_expr": "(\"name:lacros.VariationSmoke\")", @@ -1134,7 +1134,7 @@ { "args": [], "cros_board": "octopus", - "cros_img": "octopus-release/R105-14929.0.0", + "cros_img": "octopus-release/R105-14933.0.0", "name": "ozone_unittests OCTOPUS_RELEASE_LKGM", "swarming": {}, "test": "ozone_unittests", @@ -1186,7 +1186,7 @@ { "args": [], "cros_board": "strongbad", - "cros_img": "strongbad-release/R105-14929.0.0", + "cros_img": "strongbad-release/R105-14933.0.0", "name": "lacros_all_tast_tests STRONGBAD_RELEASE_LKGM", "swarming": {}, "tast_expr": "(\"group:mainline\" && \"dep:lacros\" && !informational)", @@ -1234,7 +1234,7 @@ { "args": [], "cros_board": "strongbad", - "cros_img": "strongbad-release/R105-14929.0.0", + "cros_img": "strongbad-release/R105-14933.0.0", "name": "ozone_unittests STRONGBAD_RELEASE_LKGM", "swarming": {}, "test": "ozone_unittests", @@ -1278,7 +1278,7 @@ { "args": [], "cros_board": "strongbad", - "cros_img": "strongbad-release/R105-14929.0.0", + "cros_img": "strongbad-release/R105-14933.0.0", "name": "viz_unittests STRONGBAD_RELEASE_LKGM", "swarming": {}, "test": "viz_unittests",
diff --git a/testing/buildbot/test_suites.pyl b/testing/buildbot/test_suites.pyl index fe4516e..4b8480b 100644 --- a/testing/buildbot/test_suites.pyl +++ b/testing/buildbot/test_suites.pyl
@@ -1976,7 +1976,8 @@ }, 'ozone_gl_unittests': { 'args': [ - '--child-arg=--ozone-platform=headless', + '--', + '--ozone-platform=headless', ], }, 'ozone_unittests': {}, @@ -5319,7 +5320,8 @@ 'web_engine_browsertests': {}, 'web_engine_integration_tests': { 'args': [ - '--child-arg=--vmodule=test_navigation_listener=1', + '--', + '--vmodule=test_navigation_listener=1', ], }, 'web_engine_unittests': {},
diff --git a/testing/buildbot/variants.pyl b/testing/buildbot/variants.pyl index 2fdc21d..7269a9ee 100644 --- a/testing/buildbot/variants.pyl +++ b/testing/buildbot/variants.pyl
@@ -22,60 +22,60 @@ }, 'LACROS_VERSION_SKEW_CANARY': { 'args': [ - '--ash-chrome-path-override=../../lacros_version_skew_tests_v104.0.5101.0/test_ash_chrome', + '--ash-chrome-path-override=../../lacros_version_skew_tests_v105.0.5138.0/test_ash_chrome', ], - 'identifier': 'Lacros version skew testing ash 104.0.5101.0', + 'identifier': 'Lacros version skew testing ash 105.0.5138.0', 'swarming': { 'cipd_packages': [ { 'cipd_package': 'chromium/testing/linux-ash-chromium/x86_64/ash.zip', - 'location': 'lacros_version_skew_tests_v104.0.5101.0', - 'revision': 'version:104.0.5101.0', + 'location': 'lacros_version_skew_tests_v105.0.5138.0', + 'revision': 'version:105.0.5138.0', }, ], }, }, 'LACROS_VERSION_SKEW_DEV': { 'args': [ - '--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.15/test_ash_chrome', + '--ash-chrome-path-override=../../lacros_version_skew_tests_v104.0.5112.9/test_ash_chrome', ], - 'identifier': 'Lacros version skew testing ash 103.0.5060.15', + 'identifier': 'Lacros version skew testing ash 104.0.5112.9', 'swarming': { 'cipd_packages': [ { 'cipd_package': 'chromium/testing/linux-ash-chromium/x86_64/ash.zip', - 'location': 'lacros_version_skew_tests_v103.0.5060.15', - 'revision': 'version:103.0.5060.15', + 'location': 'lacros_version_skew_tests_v104.0.5112.9', + 'revision': 'version:104.0.5112.9', }, ], }, }, 'LACROS_VERSION_SKEW_BETA': { 'args': [ - '--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.22/test_ash_chrome', + '--ash-chrome-path-override=../../lacros_version_skew_tests_v103.0.5060.53/test_ash_chrome', ], - 'identifier': 'Lacros version skew testing ash 103.0.5060.22', + 'identifier': 'Lacros version skew testing ash 103.0.5060.53', 'swarming': { 'cipd_packages': [ { 'cipd_package': 'chromium/testing/linux-ash-chromium/x86_64/ash.zip', - 'location': 'lacros_version_skew_tests_v103.0.5060.22', - 'revision': 'version:103.0.5060.22', + 'location': 'lacros_version_skew_tests_v103.0.5060.53', + 'revision': 'version:103.0.5060.53', }, ], }, }, 'LACROS_VERSION_SKEW_STABLE': { 'args': [ - '--ash-chrome-path-override=../../lacros_version_skew_tests_v102.0.5005.75/test_ash_chrome', + '--ash-chrome-path-override=../../lacros_version_skew_tests_v102.0.5005.125/test_ash_chrome', ], - 'identifier': 'Lacros version skew testing ash 102.0.5005.75', + 'identifier': 'Lacros version skew testing ash 102.0.5005.125', 'swarming': { 'cipd_packages': [ { 'cipd_package': 'chromium/testing/linux-ash-chromium/x86_64/ash.zip', - 'location': 'lacros_version_skew_tests_v102.0.5005.75', - 'revision': 'version:102.0.5005.75', + 'location': 'lacros_version_skew_tests_v102.0.5005.125', + 'revision': 'version:102.0.5005.125', }, ], }, @@ -529,16 +529,16 @@ }, 'WEBLAYER_10_AND_M_IMPL_SKEW_TESTS_NTH_MILESTONE': { 'args': [ + '--webview-apk-path=apks/AOSP_SystemWebView.apk', '--test-runner-outdir', '.', '--client-outdir', '.', - '--test-expectations', - '../../weblayer/browser/android/javatests/skew/expectations.txt', - '--webview-apk-path=apks/AOSP_SystemWebView.apk', '--implementation-outdir', '../../weblayer_instrumentation_test_M104/out/Release', - '--impl-version=104' + '--test-expectations', + '../../weblayer/browser/android/javatests/skew/expectations.txt', + '--impl-version=104', ], 'identifier': 'with_impl_from_104', 'swarming': { @@ -546,23 +546,23 @@ { 'cipd_package': 'chromium/testing/weblayer-x86', 'location': 'weblayer_instrumentation_test_M104', - 'revision': 'version:104.0.5112.23' + 'revision': 'version:104.0.5112.24', } - ] - } + ], + }, }, 'WEBLAYER_10_AND_M_IMPL_SKEW_TESTS_NTH_MINUS_ONE_MILESTONE': { 'args': [ + '--webview-apk-path=apks/AOSP_SystemWebView.apk', '--test-runner-outdir', '.', '--client-outdir', '.', - '--test-expectations', - '../../weblayer/browser/android/javatests/skew/expectations.txt', - '--webview-apk-path=apks/AOSP_SystemWebView.apk', '--implementation-outdir', '../../weblayer_instrumentation_test_M103/out/Release', - '--impl-version=103' + '--test-expectations', + '../../weblayer/browser/android/javatests/skew/expectations.txt', + '--impl-version=103', ], 'identifier': 'with_impl_from_103', 'swarming': { @@ -570,10 +570,10 @@ { 'cipd_package': 'chromium/testing/weblayer-x86', 'location': 'weblayer_instrumentation_test_M103', - 'revision': 'version:103.0.5060.62' + 'revision': 'version:103.0.5060.64', } - ] - } + ], + }, }, 'WEBLAYER_10_AND_M_IMPL_SKEW_TESTS_NTH_MINUS_TWO_MILESTONE': { 'args': [ @@ -673,16 +673,16 @@ }, 'WEBLAYER_IMPL_SKEW_TESTS_NTH_MILESTONE': { 'args': [ + '--webview-apk-path=apks/SystemWebView.apk', '--test-runner-outdir', '.', '--client-outdir', '.', - '--test-expectations', - '../../weblayer/browser/android/javatests/skew/expectations.txt', - '--webview-apk-path=apks/SystemWebView.apk', '--implementation-outdir', '../../weblayer_instrumentation_test_M104/out/Release', - '--impl-version=104' + '--test-expectations', + '../../weblayer/browser/android/javatests/skew/expectations.txt', + '--impl-version=104', ], 'identifier': 'with_impl_from_104', 'swarming': { @@ -690,23 +690,23 @@ { 'cipd_package': 'chromium/testing/weblayer-x86', 'location': 'weblayer_instrumentation_test_M104', - 'revision': 'version:104.0.5112.23' + 'revision': 'version:104.0.5112.24', } - ] - } + ], + }, }, 'WEBLAYER_IMPL_SKEW_TESTS_NTH_MINUS_ONE_MILESTONE': { 'args': [ + '--webview-apk-path=apks/SystemWebView.apk', '--test-runner-outdir', '.', '--client-outdir', '.', - '--test-expectations', - '../../weblayer/browser/android/javatests/skew/expectations.txt', - '--webview-apk-path=apks/SystemWebView.apk', '--implementation-outdir', '../../weblayer_instrumentation_test_M103/out/Release', - '--impl-version=103' + '--test-expectations', + '../../weblayer/browser/android/javatests/skew/expectations.txt', + '--impl-version=103', ], 'identifier': 'with_impl_from_103', 'swarming': { @@ -714,10 +714,10 @@ { 'cipd_package': 'chromium/testing/weblayer-x86', 'location': 'weblayer_instrumentation_test_M103', - 'revision': 'version:103.0.5060.62' + 'revision': 'version:103.0.5060.64', } - ] - } + ], + }, }, 'WEBLAYER_IMPL_SKEW_TESTS_NTH_MINUS_TWO_MILESTONE': { 'args': [ @@ -817,16 +817,16 @@ }, 'WEBLAYER_CLIENT_SKEW_TESTS_NTH_MILESTONE': { 'args': [ + '--webview-apk-path=apks/SystemWebView.apk', '--test-runner-outdir', '.', + '--client-outdir', + '../../weblayer_instrumentation_test_M104/out/Release', '--implementation-outdir', '.', '--test-expectations', '../../weblayer/browser/android/javatests/skew/expectations.txt', - '--webview-apk-path=apks/SystemWebView.apk', - '--client-outdir', - '../../weblayer_instrumentation_test_M104/out/Release', - '--client-version=104' + '--client-version=104', ], 'identifier': 'with_client_from_104', 'swarming': { @@ -834,23 +834,23 @@ { 'cipd_package': 'chromium/testing/weblayer-x86', 'location': 'weblayer_instrumentation_test_M104', - 'revision': 'version:104.0.5112.23' + 'revision': 'version:104.0.5112.24', } - ] - } + ], + }, }, 'WEBLAYER_CLIENT_SKEW_TESTS_NTH_MINUS_ONE_MILESTONE': { 'args': [ + '--webview-apk-path=apks/SystemWebView.apk', '--test-runner-outdir', '.', + '--client-outdir', + '../../weblayer_instrumentation_test_M103/out/Release', '--implementation-outdir', '.', '--test-expectations', '../../weblayer/browser/android/javatests/skew/expectations.txt', - '--webview-apk-path=apks/SystemWebView.apk', - '--client-outdir', - '../../weblayer_instrumentation_test_M103/out/Release', - '--client-version=103' + '--client-version=103', ], 'identifier': 'with_client_from_103', 'swarming': { @@ -858,10 +858,10 @@ { 'cipd_package': 'chromium/testing/weblayer-x86', 'location': 'weblayer_instrumentation_test_M103', - 'revision': 'version:103.0.5060.62' + 'revision': 'version:103.0.5060.64', } - ] - } + ], + }, }, 'WEBLAYER_CLIENT_SKEW_TESTS_NTH_MINUS_TWO_MILESTONE': { 'args': [ @@ -962,8 +962,8 @@ 'CROS_ATLAS_RELEASE_LKGM': { 'skylab': { 'cros_board': 'atlas', - 'cros_chrome_version': '105.0.5125.0', - 'cros_img': 'atlas-release/R105-14929.0.0', + 'cros_chrome_version': '105.0.5134.0', + 'cros_img': 'atlas-release/R105-14933.0.0', }, 'enabled': True, 'identifier': 'ATLAS_RELEASE_LKGM', @@ -998,8 +998,8 @@ 'CROS_EVE_RELEASE_LKGM': { 'skylab': { 'cros_board': 'eve', - 'cros_chrome_version': '105.0.5125.0', - 'cros_img': 'eve-release/R105-14929.0.0', + 'cros_chrome_version': '105.0.5134.0', + 'cros_img': 'eve-release/R105-14933.0.0', }, 'enabled': True, 'identifier': 'EVE_RELEASE_LKGM', @@ -1043,8 +1043,8 @@ 'CROS_HANA_RELEASE_LKGM': { 'skylab': { 'cros_board': 'hana', - 'cros_chrome_version': '105.0.5125.0', - 'cros_img': 'hana-release/R105-14929.0.0', + 'cros_chrome_version': '105.0.5134.0', + 'cros_img': 'hana-release/R105-14933.0.0', }, 'enabled': True, 'identifier': 'HANA_RELEASE_LKGM', @@ -1079,8 +1079,8 @@ 'CROS_JACUZZI_RELEASE_LKGM': { 'skylab': { 'cros_board': 'jacuzzi', - 'cros_chrome_version': '105.0.5125.0', - 'cros_img': 'jacuzzi-release/R105-14929.0.0', + 'cros_chrome_version': '105.0.5134.0', + 'cros_img': 'jacuzzi-release/R105-14933.0.0', }, 'enabled': True, 'identifier': 'JACUZZI_RELEASE_LKGM', @@ -1115,8 +1115,8 @@ 'CROS_OCTOPUS_RELEASE_LKGM': { 'skylab': { 'cros_board': 'octopus', - 'cros_chrome_version': '105.0.5125.0', - 'cros_img': 'octopus-release/R105-14929.0.0', + 'cros_chrome_version': '105.0.5134.0', + 'cros_img': 'octopus-release/R105-14933.0.0', }, 'enabled': True, 'identifier': 'OCTOPUS_RELEASE_LKGM', @@ -1151,8 +1151,8 @@ 'CROS_STRONGBAD_RELEASE_LKGM': { 'skylab': { 'cros_board': 'strongbad', - 'cros_chrome_version': '105.0.5125.0', - 'cros_img': 'strongbad-release/R105-14929.0.0', + 'cros_chrome_version': '105.0.5134.0', + 'cros_img': 'strongbad-release/R105-14933.0.0', }, 'enabled': True, 'identifier': 'STRONGBAD_RELEASE_LKGM', @@ -1228,4 +1228,4 @@ 'win10_nvidia_gtx_1660_stable', ], }, -} +} \ No newline at end of file
diff --git a/testing/rust_gtest_interop/expect_macros.rs b/testing/rust_gtest_interop/expect_macros.rs index 23f2a37..bf265a84 100644 --- a/testing/rust_gtest_interop/expect_macros.rs +++ b/testing/rust_gtest_interop/expect_macros.rs
@@ -4,6 +4,39 @@ // TODO(danakj): Reuse code for comparison macros with an expect_op!() macro? +/// Internal helper to log an expectation failure. Other expect_* macros invoke +/// it with their standard expectation message, plus optionally a user-provided +/// custom string. +/// +/// Both the the expectation message and the user-provided message are format +/// strings with arguments. To disambiguate between them, the expectation +/// message is wrapped in extra parentheses. +#[macro_export] +macro_rules! internal_add_expectation_failure { + // Rule that both the below are forwarded to. + (@imp $fmt:literal, $($arg:tt)+) => { + $crate::__private::add_failure_at( + file!(), + line!(), + &format!($fmt, $($arg)+), + ) + }; + + // Add a failure with the standard message. + (($expectation:literal, $($e:tt)+)) => { + $crate::internal_add_expectation_failure!(@imp $expectation, $($e)+) + }; + + // Add a failure with the standard message plus an additional message. + (($expectation:literal, $($e:tt)+), $($arg:tt)+) => { + $crate::internal_add_expectation_failure!(@imp + "{}\n\n{}", + format_args!($expectation, $($e)+), + format_args!($($arg)+), + ) + }; +} + /// Evaluates the given expression. If false, a failure is reported to Gtest. /// /// # Examples @@ -12,19 +45,18 @@ /// ``` #[macro_export] macro_rules! expect_true { - ($e:expr) => { + ($e:expr $(, $($arg:tt)*)?) => { match &$e { val => { if !(*val) { - $crate::__private::add_failure_at( - file!(), - line!(), - &format!( + $crate::internal_add_expectation_failure!( + ( "Expected: {} is true\nActual: {} is {:?}", stringify!($e), stringify!($e), - *val, - ), + *val + ) + $(, $($arg)*)? ) } } @@ -40,19 +72,18 @@ /// ``` #[macro_export] macro_rules! expect_false { - ($e:expr) => { + ($e:expr $(, $($arg:tt)*)?) => { match &$e { val => { if *val { - $crate::__private::add_failure_at( - file!(), - line!(), - &format!( + $crate::internal_add_expectation_failure!( + ( "Expected: {} is false\nActual: {} is {:?}", stringify!($e), stringify!($e), - *val, - ), + *val + ) + $(, $($arg)*)? ) } } @@ -69,20 +100,19 @@ /// ``` #[macro_export] macro_rules! expect_eq { - ($e1:expr, $e2:expr) => { + ($e1:expr, $e2:expr $(, $($arg:tt)*)?) => { match (&$e1, &$e2) { (val1, val2) => { if !(*val1 == *val2) { - $crate::__private::add_failure_at( - file!(), - line!(), - &format!( + $crate::internal_add_expectation_failure!( + ( "Expected: {} == {}\nActual: {:?} vs {:?}", stringify!($e1), stringify!($e2), *val1, - *val2, - ), + *val2 + ) + $(, $($arg)*)? ) } } @@ -99,20 +129,19 @@ /// ``` #[macro_export] macro_rules! expect_ne { - ($e1:expr, $e2:expr) => { + ($e1:expr, $e2:expr $(, $($arg:tt)*)?) => { match (&$e1, &$e2) { (val1, val2) => { if !(*val1 != *val2) { - $crate::__private::add_failure_at( - file!(), - line!(), - &format!( + $crate::internal_add_expectation_failure!( + ( "Expected: {} != {}\nActual: {:?} vs {:?}", stringify!($e1), stringify!($e2), *val1, - *val2, - ), + *val2 + ) + $(, $($arg)*)? ) } } @@ -130,20 +159,19 @@ /// ``` #[macro_export] macro_rules! expect_gt { - ($e1:expr, $e2:expr) => { + ($e1:expr, $e2:expr $(, $($arg:tt)*)?) => { match (&$e1, &$e2) { (val1, val2) => { if !(*val1 > *val2) { - $crate::__private::add_failure_at( - file!(), - line!(), - &format!( + $crate::internal_add_expectation_failure!( + ( "Expected: {} > {}\nActual: {:?} vs {:?}", stringify!($e1), stringify!($e2), *val1, - *val2, - ), + *val2 + ) + $(, $($arg)*)? ) } } @@ -161,20 +189,19 @@ /// ``` #[macro_export] macro_rules! expect_lt { - ($e1:expr, $e2:expr) => { + ($e1:expr, $e2:expr $(, $($arg:tt)*)?) => { match (&$e1, &$e2) { (val1, val2) => { if !(*val1 < *val2) { - $crate::__private::add_failure_at( - file!(), - line!(), - &format!( + $crate::internal_add_expectation_failure!( + ( "Expected: {} < {}\nActual: {:?} vs {:?}", stringify!($e1), stringify!($e2), *val1, - *val2, - ), + *val2 + ) + $(, $($arg)*)? ) } } @@ -192,20 +219,18 @@ /// ``` #[macro_export] macro_rules! expect_ge { - ($e1:expr, $e2:expr) => { + ($e1:expr, $e2:expr $(, $($arg:tt)*)?) => { match (&$e1, &$e2) { (val1, val2) => { if !(*val1 >= *val2) { - $crate::__private::add_failure_at( - file!(), - line!(), - &format!( + $crate::internal_add_expectation_failure!( + ( "Expected: {} >= {}\nActual: {:?} vs {:?}", stringify!($e1), stringify!($e2), *val1, - *val2, - ), + *val2 + ) $(, $($arg)*)? ) } } @@ -223,20 +248,18 @@ /// ``` #[macro_export] macro_rules! expect_le { - ($e1:expr, $e2:expr) => { + ($e1:expr, $e2:expr $(, $($arg:tt)*)?) => { match (&$e1, &$e2) { (val1, val2) => { if !(*val1 <= *val2) { - $crate::__private::add_failure_at( - file!(), - line!(), - &format!( + $crate::internal_add_expectation_failure!( + ( "Expected: {} <= {}\nActual: {:?} vs {:?}", stringify!($e1), stringify!($e2), *val1, - *val2, - ), + *val2 + ) $(, $($arg)*)? ) } } @@ -257,7 +280,3 @@ // process.) // - EXPECT_FLOAT_EQ (Comparison for equality within a small range.) // - EXPECT_NEAR (Comparison for equality within a user-specified range.) - -// TODO(danakj): Also consider adding an optional parameter that takes a message string to append to -// the expect macro's built-in message. We could also consider a format string + varargs like -// format!(), to save folks from writing format!() in that spot, if it would be common.
diff --git a/testing/rust_gtest_interop/rust_gtest_interop_unittest.rs b/testing/rust_gtest_interop/rust_gtest_interop_unittest.rs index 249aaa0..a4a5aa0 100644 --- a/testing/rust_gtest_interop/rust_gtest_interop_unittest.rs +++ b/testing/rust_gtest_interop/rust_gtest_interop_unittest.rs
@@ -10,6 +10,14 @@ expect_true!(true); } +#[gtest(Test, WithCustomMessage)] +fn test() { + expect_true!(true, "foo"); + expect_true!(true, "foo {}", 1); + expect_eq!(5, 5, "math stopped working"); + expect_eq!(5 + 5, 10, "uh {}", "oh"); +} + mod module1 { use super::*;
diff --git a/testing/rust_gtest_interop/rust_gtest_interop_unittest_main.cc b/testing/rust_gtest_interop/rust_gtest_interop_unittest_main.cc index d190ff5..f0837b1 100644 --- a/testing/rust_gtest_interop/rust_gtest_interop_unittest_main.cc +++ b/testing/rust_gtest_interop/rust_gtest_interop_unittest_main.cc
@@ -12,7 +12,7 @@ #include <iostream> // Update this when adding a new test to rust_test_interop_unittest.rs. -int kNumTests = 10; +int kNumTests = 11; bool is_subprocess() { // The test launching process spawns a subprocess to run tests, and it
diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json index 3c474034..32f9fc93 100644 --- a/testing/variations/fieldtrial_testing_config.json +++ b/testing/variations/fieldtrial_testing_config.json
@@ -1982,6 +1982,21 @@ ] } ], + "CacheDeprecatedSystemLocationSetting": [ + { + "platforms": [ + "android" + ], + "experiments": [ + { + "name": "Enabled", + "enable_features": [ + "CacheDeprecatedSystemLocationSetting" + ] + } + ] + } + ], "CacheFontFamilyMatching": [ { "platforms": [ @@ -3679,6 +3694,21 @@ ] } ], + "EcheSWA": [ + { + "platforms": [ + "chromeos" + ], + "experiments": [ + { + "name": "Enabled", + "enable_features": [ + "EcheSWA" + ] + } + ] + } + ], "ElementSuperRareData": [ { "platforms": [ @@ -7265,25 +7295,6 @@ ] } ], - "SCTAuditingHashdance": [ - { - "platforms": [ - "chromeos", - "chromeos_lacros", - "linux", - "mac", - "windows" - ], - "experiments": [ - { - "name": "Enabled", - "enable_features": [ - "SCTAuditingHashdance" - ] - } - ] - } - ], "SafeBrowsingCSDAndroid": [ { "platforms": [ @@ -8235,6 +8246,33 @@ ] } ], + "TimedHTMLParserBudget": [ + { + "platforms": [ + "android", + "android_weblayer", + "android_webview", + "chromeos", + "chromeos_lacros", + "linux", + "mac", + "windows" + ], + "experiments": [ + { + "name": "20x500x2", + "params": { + "default-parser-budget": "20ms", + "long-parser-budget": "500ms", + "num-yields-with-default-budget": "2" + }, + "enable_features": [ + "TimedHTMLParserBudget" + ] + } + ] + } + ], "TouchToFillPasswordSubmissionStudy": [ { "platforms": [
diff --git a/third_party/blink/PRESUBMIT.py b/third_party/blink/PRESUBMIT.py index 6d23f9ce..2595f33 100644 --- a/third_party/blink/PRESUBMIT.py +++ b/third_party/blink/PRESUBMIT.py
@@ -176,11 +176,11 @@ # extension is too long. # The latter error comes from CreateProcess hitting its 32768 character # limit. - files_per_command = 70 if input_api.is_windows else 1000 + files_per_command = 40 if input_api.is_windows else 1000 results = [] for i in range(0, len(files), files_per_command): args = [ - input_api.python_executable, style_checker_path, '--diff-files' + input_api.python3_executable, style_checker_path, '--diff-files' ] args += files[i:i + files_per_command]
diff --git a/third_party/blink/perf_tests/privacy_budget/double_serialization.html b/third_party/blink/perf_tests/privacy_budget/double_serialization.html deleted file mode 100644 index 26533432..0000000 --- a/third_party/blink/perf_tests/privacy_budget/double_serialization.html +++ /dev/null
@@ -1,15 +0,0 @@ -<!DOCTYPE html> -<html> -<body> -<script src="../resources/runner.js"></script> -<script> -PerfTestRunner.measureRunsPerSecond({ - description: "This benchmark fetches window.devicePixelRatio, which is " + - "used to benchmark double privacy budget UKM serialization " + - "performance.", - run: function() { - return devicePixelRatio; -}}); -</script> -</body> -</html>
diff --git a/third_party/blink/public/platform/web_runtime_features.h b/third_party/blink/public/platform/web_runtime_features.h index 5e28742..7ebfcf1 100644 --- a/third_party/blink/public/platform/web_runtime_features.h +++ b/third_party/blink/public/platform/web_runtime_features.h
@@ -218,6 +218,8 @@ BLINK_PLATFORM_EXPORT static void EnableSignedExchangeSubresourcePrefetch( bool); BLINK_PLATFORM_EXPORT static void EnableSubresourceWebBundles(bool); + BLINK_PLATFORM_EXPORT static void EnableIdentityInCanMakePaymentEventFeature( + bool); BLINK_PLATFORM_EXPORT static void EnableIdleDetection(bool); BLINK_PLATFORM_EXPORT static void EnableSkipTouchEventFilter(bool); BLINK_PLATFORM_EXPORT static void EnableWebOTP(bool); @@ -237,7 +239,8 @@ BLINK_PLATFORM_EXPORT static void EnableDocumentTransition(bool); BLINK_PLATFORM_EXPORT static void EnableCLSScrollAnchoring(bool); - BLINK_PLATFORM_EXPORT static void EnableAndroidDownloadableFontsMatching(bool); + BLINK_PLATFORM_EXPORT static void EnableAndroidDownloadableFontsMatching( + bool); BLINK_PLATFORM_EXPORT static void EnableWebAuthenticationRemoteDesktopSupport( bool);
diff --git a/third_party/blink/public/web/web_element.h b/third_party/blink/public/web/web_element.h index af80bdb8..98b2f259 100644 --- a/third_party/blink/public/web/web_element.h +++ b/third_party/blink/public/web/web_element.h
@@ -117,10 +117,10 @@ gfx::Size GetImageSize(); // Returns {clientWidth, clientHeight}. - gfx::Size GetClientSize(); + gfx::Size GetClientSize() const; // Returns {scrollWidth, scrollHeight}. - gfx::Size GetScrollSize(); + gfx::Size GetScrollSize() const; // ComputedStyle property values. The following exposure is of CSS property // values are part of the ComputedStyle set which is usually exposed through
diff --git a/third_party/blink/renderer/core/css/css_selector_list.cc b/third_party/blink/renderer/core/css/css_selector_list.cc index 237ec4e..7748579ea 100644 --- a/third_party/blink/renderer/core/css/css_selector_list.cc +++ b/third_party/blink/renderer/core/css/css_selector_list.cc
@@ -52,7 +52,7 @@ } CSSSelectorList CSSSelectorList::AdoptSelectorVector( - Vector<std::unique_ptr<CSSParserSelector>>& selector_vector) { + CSSSelectorVector& selector_vector) { size_t flattened_size = 0; for (wtf_size_t i = 0; i < selector_vector.size(); ++i) { for (CSSParserSelector* selector = selector_vector[i].get(); selector;
diff --git a/third_party/blink/renderer/core/css/css_selector_list.h b/third_party/blink/renderer/core/css/css_selector_list.h index 486fcae8..d955fdd1 100644 --- a/third_party/blink/renderer/core/css/css_selector_list.h +++ b/third_party/blink/renderer/core/css/css_selector_list.h
@@ -34,6 +34,9 @@ class CSSParserSelector; +// See css_selector_parser.h. +using CSSSelectorVector = Vector<std::unique_ptr<CSSParserSelector>>; + // This class represents a CSS selector, i.e. a pattern of one or more // simple selectors. https://www.w3.org/TR/css3-selectors/ @@ -79,7 +82,7 @@ ~CSSSelectorList() = default; static CSSSelectorList AdoptSelectorVector( - Vector<std::unique_ptr<CSSParserSelector>>& selector_vector); + CSSSelectorVector& selector_vector); CSSSelectorList Copy() const; bool IsValid() const { return !!selector_array_; }
diff --git a/third_party/blink/renderer/core/css/parser/css_parser_selector.cc b/third_party/blink/renderer/core/css/parser/css_parser_selector.cc index 451a92f..52cb8b4 100644 --- a/third_party/blink/renderer/core/css/parser/css_parser_selector.cc +++ b/third_party/blink/renderer/core/css/parser/css_parser_selector.cc
@@ -47,7 +47,7 @@ } void CSSParserSelector::AdoptSelectorVector( - Vector<std::unique_ptr<CSSParserSelector>>& selector_vector) { + CSSSelectorVector& selector_vector) { CSSSelectorList* selector_list = new CSSSelectorList( CSSSelectorList::AdoptSelectorVector(selector_vector)); selector_->SetSelectorList(base::WrapUnique(selector_list));
diff --git a/third_party/blink/renderer/core/css/parser/css_parser_selector.h b/third_party/blink/renderer/core/css/parser/css_parser_selector.h index 00a5929a..51deaf34 100644 --- a/third_party/blink/renderer/core/css/parser/css_parser_selector.h +++ b/third_party/blink/renderer/core/css/parser/css_parser_selector.h
@@ -31,6 +31,10 @@ namespace blink { class CSSParserContext; +class CSSParserSelector; + +// See css_selector_parser.h. +using CSSSelectorVector = Vector<std::unique_ptr<CSSParserSelector>>; class CORE_EXPORT CSSParserSelector { USING_FAST_MALLOC(CSSParserSelector); @@ -75,8 +79,7 @@ selector_->UpdatePseudoPage(value); } - void AdoptSelectorVector( - Vector<std::unique_ptr<CSSParserSelector>>& selector_vector); + void AdoptSelectorVector(CSSSelectorVector& selector_vector); void SetSelectorList(std::unique_ptr<CSSSelectorList>); void SetAtomics(std::unique_ptr<CSSSelectorList>); void SetContainsPseudoInsideHasPseudoClass();
diff --git a/third_party/blink/renderer/core/css/parser/css_selector_parser.cc b/third_party/blink/renderer/core/css/parser/css_selector_parser.cc index 4cfb06ac..cc6af2f 100644 --- a/third_party/blink/renderer/core/css/parser/css_selector_parser.cc +++ b/third_party/blink/renderer/core/css/parser/css_selector_parser.cc
@@ -109,7 +109,7 @@ CSSSelectorList CSSSelectorParser::ConsumeComplexSelectorList( CSSParserTokenRange& range) { - Vector<std::unique_ptr<CSSParserSelector>> selector_list; + CSSSelectorVector selector_list; std::unique_ptr<CSSParserSelector> selector = ConsumeComplexSelector(range); if (!selector) return CSSSelectorList(); @@ -131,7 +131,7 @@ CSSSelectorList CSSSelectorParser::ConsumeComplexSelectorList( CSSParserTokenStream& stream, CSSParserObserver* observer) { - Vector<std::unique_ptr<CSSParserSelector>> selector_list; + CSSSelectorVector selector_list; while (true) { const wtf_size_t selector_offset_start = stream.LookAheadOffset(); @@ -163,7 +163,7 @@ CSSSelectorList CSSSelectorParser::ConsumeCompoundSelectorList( CSSParserTokenRange& range) { - Vector<std::unique_ptr<CSSParserSelector>> selector_list; + CSSSelectorVector selector_list; std::unique_ptr<CSSParserSelector> selector = ConsumeCompoundSelector(range); range.ConsumeWhitespace(); if (!selector) @@ -200,7 +200,7 @@ CSSSelectorList CSSSelectorParser::ConsumeForgivingComplexSelectorList( CSSParserTokenRange& range) { - Vector<std::unique_ptr<CSSParserSelector>> selector_list; + CSSSelectorVector selector_list; while (!range.AtEnd()) { base::AutoReset<bool> reset_failure(&failed_parsing_, false); @@ -222,7 +222,7 @@ CSSSelectorList CSSSelectorParser::ConsumeForgivingCompoundSelectorList( CSSParserTokenRange& range) { - Vector<std::unique_ptr<CSSParserSelector>> selector_list; + CSSSelectorVector selector_list; while (!range.AtEnd()) { base::AutoReset<bool> reset_failure(&failed_parsing_, false); @@ -245,7 +245,7 @@ CSSSelectorList CSSSelectorParser::ConsumeForgivingRelativeSelectorList( CSSParserTokenRange& range) { - Vector<std::unique_ptr<CSSParserSelector>> selector_list; + CSSSelectorVector selector_list; while (!range.AtEnd()) { base::AutoReset<bool> reset_failure(&failed_parsing_, false); @@ -1009,7 +1009,7 @@ block.ConsumeWhitespace(); if (!inner_selector || !block.AtEnd()) return nullptr; - Vector<std::unique_ptr<CSSParserSelector>> selector_vector; + CSSSelectorVector selector_vector; selector_vector.push_back(std::move(inner_selector)); selector->AdoptSelectorVector(selector_vector); return selector;
diff --git a/third_party/blink/renderer/core/css/parser/css_selector_parser.h b/third_party/blink/renderer/core/css/parser/css_selector_parser.h index ddb2df96..b7f5812 100644 --- a/third_party/blink/renderer/core/css/parser/css_selector_parser.h +++ b/third_party/blink/renderer/core/css/parser/css_selector_parser.h
@@ -20,6 +20,10 @@ class Node; class StyleSheetContents; +// SelectorVector is the list of CSS selectors as it is parsed, +// where each selector can contain others (in a tree). +using CSSSelectorVector = Vector<std::unique_ptr<CSSParserSelector>>; + // FIXME: We should consider building CSSSelectors directly instead of using // the intermediate CSSParserSelector. class CORE_EXPORT CSSSelectorParser {
diff --git a/third_party/blink/renderer/core/dom/element.idl b/third_party/blink/renderer/core/dom/element.idl index 56d58d2..34131782 100644 --- a/third_party/blink/renderer/core/dom/element.idl +++ b/third_party/blink/renderer/core/dom/element.idl
@@ -151,7 +151,7 @@ // The Popup API [MeasureAs=ElementShowPopup,RuntimeEnabled=HTMLPopupAttribute,RaisesException] void showPopup(); [MeasureAs=ElementHidePopup,RuntimeEnabled=HTMLPopupAttribute,RaisesException] void hidePopup(); - [Unscopable,CEReactions,RuntimeEnabled=HTMLPopupAttribute,MeasureAs=AnyPopupAttribute,Reflect,ReflectOnly=("auto","hint","async"),ReflectEmpty="auto",ReflectInvalid] attribute DOMString? popup; + [Unscopable,CEReactions,RuntimeEnabled=HTMLPopupAttribute,MeasureAs=AnyPopupAttribute,Reflect,ReflectOnly=("auto","hint","async"),ReflectEmpty="auto",ReflectInvalid] attribute DOMString? popUp; [CEReactions,RuntimeEnabled=HTMLPopupAttribute,Reflect] attribute boolean defaultOpen; // Experimental accessibility API
diff --git a/third_party/blink/renderer/core/exported/web_element.cc b/third_party/blink/renderer/core/exported/web_element.cc index 5e11ef9..9ae3334 100644 --- a/third_party/blink/renderer/core/exported/web_element.cc +++ b/third_party/blink/renderer/core/exported/web_element.cc
@@ -196,13 +196,13 @@ return gfx::Size(image->width(), image->height()); } -gfx::Size WebElement::GetClientSize() { - Element* element = Unwrap<Element>(); +gfx::Size WebElement::GetClientSize() const { + Element* element = const_cast<Element*>(ConstUnwrap<Element>()); return gfx::Size(element->clientWidth(), element->clientHeight()); } -gfx::Size WebElement::GetScrollSize() { - Element* element = Unwrap<Element>(); +gfx::Size WebElement::GetScrollSize() const { + Element* element = const_cast<Element*>(ConstUnwrap<Element>()); return gfx::Size(element->scrollWidth(), element->scrollHeight()); }
diff --git a/third_party/blink/renderer/core/html/parser/html_document_parser.cc b/third_party/blink/renderer/core/html/parser/html_document_parser.cc index 63b0d439..4d73797 100644 --- a/third_party/blink/renderer/core/html/parser/html_document_parser.cc +++ b/third_party/blink/renderer/core/html/parser/html_document_parser.cc
@@ -1494,8 +1494,10 @@ } void HTMLDocumentParser::ScanInBackground(const String& source) { + if (task_runner_state_->IsSynchronous() || !GetDocument()->Url().IsValid()) + return; + if (ThreadedPreloadScannerEnabled() && preloader_ && - !task_runner_state_->IsSynchronous() && GetDocument()->Url().IsValid() && // TODO(crbug.com/1329535): Support scanning prefetch documents in the // background. !GetDocument()->IsPrefetchOnly() &&
diff --git a/third_party/blink/renderer/modules/accessibility/ax_object.cc b/third_party/blink/renderer/modules/accessibility/ax_object.cc index 454ad1c..5694c4c 100644 --- a/third_party/blink/renderer/modules/accessibility/ax_object.cc +++ b/third_party/blink/renderer/modules/accessibility/ax_object.cc
@@ -6291,11 +6291,15 @@ IsUserScrollable()) { return true; } + if (!GetElement() || !GetDocument()) + return false; + int tab_index = GetElement()->tabIndex(); + bool is_focused = GetElement() == GetDocument()->FocusedElement(); + bool is_in_tab_order_or_focused = tab_index >= 0 || is_focused; // Don't repair name from contents to focusable elements unless - // tabbable, because providing a repaired accessible name often - // leads to redundant verbalizations. - return GetElement() && GetElement()->tabIndex() >= 0 && - CanSetFocusAttribute(); + // tabbable or focused, because providing a repaired accessible name + // often leads to redundant verbalizations. + return is_in_tab_order_or_focused && CanSetFocusAttribute(); } } break;
diff --git a/third_party/blink/renderer/modules/mediastream/browser_capture_media_stream_track.cc b/third_party/blink/renderer/modules/mediastream/browser_capture_media_stream_track.cc index 5ea7418..657d7ca 100644 --- a/third_party/blink/renderer/modules/mediastream/browser_capture_media_stream_track.cc +++ b/third_party/blink/renderer/modules/mediastream/browser_capture_media_stream_track.cc
@@ -43,9 +43,9 @@ #if !BUILDFLAG(IS_ANDROID) -// TODO(crbug.com/1332628): Turn on by default. +// TODO(crbug.com/1332628): Remove this flag once it's clear it's not necessary. const base::Feature kCropTopPromiseWaitsForFirstFrame{ - "CropTopPromiseWaitsForFirstFrame", base::FEATURE_DISABLED_BY_DEFAULT}; + "CropTopPromiseWaitsForFirstFrame", base::FEATURE_ENABLED_BY_DEFAULT}; // If crop_id is the empty string, returns an empty base::Token. // If crop_id is a valid UUID, returns a base::Token representing the ID.
diff --git a/third_party/blink/renderer/modules/payments/can_make_payment_event.idl b/third_party/blink/renderer/modules/payments/can_make_payment_event.idl index 5e493575..7c42264 100644 --- a/third_party/blink/renderer/modules/payments/can_make_payment_event.idl +++ b/third_party/blink/renderer/modules/payments/can_make_payment_event.idl
@@ -9,10 +9,10 @@ Exposed=ServiceWorker ] interface CanMakePaymentEvent : ExtendableEvent { constructor(DOMString type, CanMakePaymentEventInit eventInitDict); - [DeprecateAs=IdentityInCanMakePaymentEvent] readonly attribute USVString topOrigin; - [DeprecateAs=IdentityInCanMakePaymentEvent] readonly attribute USVString paymentRequestOrigin; - [DeprecateAs=IdentityInCanMakePaymentEvent] readonly attribute FrozenArray<PaymentMethodData> methodData; - [DeprecateAs=IdentityInCanMakePaymentEvent] readonly attribute FrozenArray<PaymentDetailsModifier> modifiers; + [DeprecateAs=IdentityInCanMakePaymentEvent, RuntimeEnabled=IdentityInCanMakePaymentEventFeature] readonly attribute USVString topOrigin; + [DeprecateAs=IdentityInCanMakePaymentEvent, RuntimeEnabled=IdentityInCanMakePaymentEventFeature] readonly attribute USVString paymentRequestOrigin; + [DeprecateAs=IdentityInCanMakePaymentEvent, RuntimeEnabled=IdentityInCanMakePaymentEventFeature] readonly attribute FrozenArray<PaymentMethodData> methodData; + [DeprecateAs=IdentityInCanMakePaymentEvent, RuntimeEnabled=IdentityInCanMakePaymentEventFeature] readonly attribute FrozenArray<PaymentDetailsModifier> modifiers; [CallWith=ScriptState, RaisesException] void respondWith(Promise<boolean> canMakePaymentResponse); };
diff --git a/third_party/blink/renderer/modules/payments/can_make_payment_event_init.idl b/third_party/blink/renderer/modules/payments/can_make_payment_event_init.idl index 9ed5799..583b48b 100644 --- a/third_party/blink/renderer/modules/payments/can_make_payment_event_init.idl +++ b/third_party/blink/renderer/modules/payments/can_make_payment_event_init.idl
@@ -5,8 +5,8 @@ // https://w3c.github.io/payment-handler/#canmakepaymenteventinit-dictionary dictionary CanMakePaymentEventInit : ExtendableEventInit { - USVString topOrigin; - USVString paymentRequestOrigin; - sequence<PaymentMethodData> methodData; - sequence<PaymentDetailsModifier> modifiers; + [RuntimeEnabled=IdentityInCanMakePaymentEventFeature] USVString topOrigin; + [RuntimeEnabled=IdentityInCanMakePaymentEventFeature] USVString paymentRequestOrigin; + [RuntimeEnabled=IdentityInCanMakePaymentEventFeature] sequence<PaymentMethodData> methodData; + [RuntimeEnabled=IdentityInCanMakePaymentEventFeature] sequence<PaymentDetailsModifier> modifiers; };
diff --git a/third_party/blink/renderer/modules/payments/payment_app_service_worker_registration.cc b/third_party/blink/renderer/modules/payments/payment_app_service_worker_registration.cc index e9fd87e..072dac7a 100644 --- a/third_party/blink/renderer/modules/payments/payment_app_service_worker_registration.cc +++ b/third_party/blink/renderer/modules/payments/payment_app_service_worker_registration.cc
@@ -16,8 +16,15 @@ bool AllowedToUsePaymentFeatures(ScriptState* script_state) { if (!script_state->ContextIsValid()) return false; - return ExecutionContext::From(script_state) - ->GetSecurityContext() + + // Check if the context is in fenced frame or not and return false here + // because we can't restrict the payment handler API access by permission + // policy when it's called from service worker context. + ExecutionContext* execution_context = ExecutionContext::From(script_state); + if (execution_context->IsInFencedFrame()) + return false; + + return execution_context->GetSecurityContext() .GetPermissionsPolicy() ->IsFeatureEnabled(mojom::blink::PermissionsPolicyFeature::kPayment); }
diff --git a/third_party/blink/renderer/modules/shared_storage/shared_storage.cc b/third_party/blink/renderer/modules/shared_storage/shared_storage.cc index 3a2d0c0..640c595 100644 --- a/third_party/blink/renderer/modules/shared_storage/shared_storage.cc +++ b/third_party/blink/renderer/modules/shared_storage/shared_storage.cc
@@ -362,7 +362,7 @@ if (!maybe_fields.ToLocal(&fields) || fields->Length() == 0) { resolver->Reject(V8ThrowDOMException::CreateOrEmpty( script_state->GetIsolate(), DOMExceptionCode::kDataError, - "selectURL could not get reporting_metadata object attributes")); + "selectURL could not get reportingMetadata object attributes")); return promise; } @@ -376,7 +376,7 @@ &report_event_string)) { resolver->Reject(V8ThrowDOMException::CreateOrEmpty( script_state->GetIsolate(), DOMExceptionCode::kDataError, - "selectURL reporting_metadata object attributes must be " + "selectURL reportingMetadata object attributes must be " "strings")); return promise; } @@ -388,7 +388,7 @@ &report_url_string)) { resolver->Reject(V8ThrowDOMException::CreateOrEmpty( script_state->GetIsolate(), DOMExceptionCode::kDataError, - "selectURL reporting_metadata object attributes must be " + "selectURL reportingMetadata object attributes must be " "strings")); return promise; }
diff --git a/third_party/blink/renderer/modules/shared_storage/shared_storage_url_with_metadata.idl b/third_party/blink/renderer/modules/shared_storage/shared_storage_url_with_metadata.idl index b82e481..f4fe458 100644 --- a/third_party/blink/renderer/modules/shared_storage/shared_storage_url_with_metadata.idl +++ b/third_party/blink/renderer/modules/shared_storage/shared_storage_url_with_metadata.idl
@@ -1,4 +1,4 @@ dictionary SharedStorageUrlWithMetadata { required USVString url; - object reporting_metadata; + object reportingMetadata; };
diff --git a/third_party/blink/renderer/platform/exported/web_runtime_features.cc b/third_party/blink/renderer/platform/exported/web_runtime_features.cc index 14ccb78..e767c614 100644 --- a/third_party/blink/renderer/platform/exported/web_runtime_features.cc +++ b/third_party/blink/renderer/platform/exported/web_runtime_features.cc
@@ -571,6 +571,12 @@ RuntimeEnabledFeatures::SetSubresourceWebBundlesEnabled(enable); } +void WebRuntimeFeatures::EnableIdentityInCanMakePaymentEventFeature( + bool enable) { + RuntimeEnabledFeatures::SetIdentityInCanMakePaymentEventFeatureEnabled( + enable); +} + void WebRuntimeFeatures::EnableIdleDetection(bool enable) { RuntimeEnabledFeatures::SetIdleDetectionEnabled(enable); }
diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 index dee3a006..76d17400 100644 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
@@ -1255,6 +1255,10 @@ status:"experimental", }, { + name: "IdentityInCanMakePaymentEventFeature", + status: "stable", + }, + { name: "IdleDetection", status: "stable", },
diff --git a/third_party/blink/tools/blinkpy/style/main.py b/third_party/blink/tools/blinkpy/style/main.py index 3addc55..c4a41c5 100644 --- a/third_party/blink/tools/blinkpy/style/main.py +++ b/third_party/blink/tools/blinkpy/style/main.py
@@ -153,6 +153,9 @@ changed_files = paths if options.diff_files else None patch = host.git().create_patch( options.git_commit, changed_files=changed_files) + # create_patch intentionally returns binary data, but we have to + # decode it because patch_checker.check assumes str data. + patch = patch.decode() patch_checker = PatchReader(file_reader) patch_checker.check(patch)
diff --git a/third_party/blink/tools/blinkpy/web_tests/merge_results.py b/third_party/blink/tools/blinkpy/web_tests/merge_results.py index 8409afeb..ad10988f0 100644 --- a/third_party/blink/tools/blinkpy/web_tests/merge_results.py +++ b/third_party/blink/tools/blinkpy/web_tests/merge_results.py
@@ -42,7 +42,7 @@ BLINK_TOOLS_PATH = os.path.abspath( os.path.join(os.path.dirname(__file__), '..', '..')) if BLINK_TOOLS_PATH not in sys.path: - sys.path.append(BLINK_TOOLS_PATH) + sys.path.append(BLINK_TOOLS_PATH) from blinkpy.common.system.filesystem import FileSystem from blinkpy.common.system.log_utils import configure_logging @@ -737,13 +737,18 @@ if fs.exists(merged_output_json): fs.remove(merged_output_json) - # Fuchsia specific Additional logs to be cleaned - fuchsia_log_files = [f for f in fs.listdir(directory) - if fs.isfile(fs.join(directory, f))] - for file_name in fuchsia_log_files: - path = fs.join(directory, file_name) - if fs.exists(path): - fs.remove(path) + # Fuchsia specific additional logs to be cleaned. Check if 'ffx_log' exists + # or not first, otherwise webgpu_blink_web_tests will hang forever. + # TODO: work with fuchsia team to remove this special case + if fs.exists(fs.join(directory, 'ffx_log')): + fuchsia_log_files = [ + f for f in fs.listdir(directory) + if fs.isfile(fs.join(directory, f)) + ] + for file_name in fuchsia_log_files: + path = fs.join(directory, file_name) + if fs.exists(path): + fs.remove(path) def mark_missing_shards(summary_json,
diff --git a/third_party/blink/web_tests/external/wpt/html/canvas/element/manual/imagebitmap/createImageBitmap-sizeOverflow.html b/third_party/blink/web_tests/external/wpt/html/canvas/element/manual/imagebitmap/createImageBitmap-sizeOverflow.html index 7239c2e..1be8184 100644 --- a/third_party/blink/web_tests/external/wpt/html/canvas/element/manual/imagebitmap/createImageBitmap-sizeOverflow.html +++ b/third_party/blink/web_tests/external/wpt/html/canvas/element/manual/imagebitmap/createImageBitmap-sizeOverflow.html
@@ -7,56 +7,46 @@ <script> promise_test(function() { var imgData = new ImageData(20, 20); - return new Promise(function(resolve, reject) { - createImageBitmap(imgData, 4294967400, 10, 10, 10).then(resolve, reject); - }); + return createImageBitmap(imgData, 4294967400, 10, 10, 10); }, "createImageBitmap does not crash or reject the promise when passing very large sx"); promise_test(function() { var imgData = new ImageData(20, 20); - return new Promise(function(resolve, reject) { - createImageBitmap(imgData, 10, 4294967400, 10, 10).then(resolve, reject); - }); + return createImageBitmap(imgData, 10, 4294967400, 10, 10); }, "createImageBitmap does not crash or reject the promise when passing very large sy"); promise_test(function() { var imgData = new ImageData(20, 20); - return new Promise(function(resolve, reject) { - createImageBitmap(imgData, 10, 10, 4294967400, 10).then(resolve, reject); - }); + return createImageBitmap(imgData, 10, 10, 4294967400, 10); }, "createImageBitmap does not crash or reject the promise when passing very large sw"); promise_test(function() { var imgData = new ImageData(20, 20); - return new Promise(function(resolve, reject) { - createImageBitmap(imgData, 10, 10, 10, 4294967400).then(resolve, reject); - }); + return createImageBitmap(imgData, 10, 10, 10, 4294967400); }, "createImageBitmap does not crash or reject the promise when passing very large sh"); promise_test(function() { var imgData = new ImageData(20, 20); - return new Promise(function(resolve, reject) { - createImageBitmap(imgData, 4294967400, 4294967400, 4294967400, 4294967400).then(resolve, reject); - }); + return createImageBitmap(imgData, 4294967400, 4294967400, 4294967400, 4294967400); }, "createImageBitmap does not crash or reject the promise when passing very large sx, sy, sw and sh"); -async_test(function(t) { +promise_test(function(t) { var imgData = new ImageData(20, 20); var imageBitmapOptions = {imageOrientation:'none', premultiplyAlpha:'default', colorSpaceConversion:'none', resizeHeight:2122252543, resizeQuality:'high'}; - createImageBitmap(imgData, 0, 0, 4294967295, 64).then(function(imageBitmap){ - assert_throws_dom("InvalidStateError", function() {createImageBitmap(imageBitmap, imageBitmapOptions);});}); - t.done(); + return createImageBitmap(imgData, 0, 0, 4294967295, 64) + .then(imageBitmap => promise_rejects_dom(t, "InvalidStateError", + createImageBitmap(imageBitmap, imageBitmapOptions))); }, "createImageBitmap throws an InvalidStateError error with big imageBitmap scaled up in big height"); -async_test(function(t) { +promise_test(function(t) { var imgData = new ImageData(20, 20); var imageBitmapOptions = {imageOrientation:'none', premultiplyAlpha:'default', colorSpaceConversion:'none', resizeWidth:2122252543, resizeQuality:'high'}; - createImageBitmap(imgData, 0, 0, 4294967295, 64).then(function(imageBitmap){ - assert_throws_dom("InvalidStateError", function() {createImageBitmap(imageBitmap, imageBitmapOptions);});}); - t.done(); + return createImageBitmap(imgData, 0, 0, 4294967295, 64) + .then(imageBitmap => promise_rejects_dom(t, "InvalidStateError", + createImageBitmap(imageBitmap, imageBitmapOptions))); }, "createImageBitmap throws an InvalidStateError error with big imageBitmap scaled up in big width"); </script> </body> -</html> \ No newline at end of file +</html>
diff --git a/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-in-sync-event.html b/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-in-sync-event.html index 55fc7c20..1635598 100644 --- a/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-in-sync-event.html +++ b/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-in-sync-event.html
@@ -19,14 +19,12 @@ assert_equals(v.networkState, v.NETWORK_NO_SOURCE, 'networkState after click()'); v.removeAttribute('src'); }); -</script> -<script> t.step(function() { // now the sync section of resource selection should have run and should // have found no src="" or <source> thus networkState being set to NETWORK_EMPTY. // if the sync section was run when onclick returned, then networkState // would be either NETWORK_LOADING or NETWORK_NO_SOURCE. - assert_equals(v.networkState, v.NETWORK_EMPTY, 'networkState in separate script'); + assert_equals(v.networkState, v.NETWORK_EMPTY, 'networkState after src removed'); t.done(); }); </script>
diff --git a/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-remove-from-document.html b/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-remove-from-document.html index 23e7104c..65d0f73 100644 --- a/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-remove-from-document.html +++ b/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-remove-from-document.html
@@ -5,7 +5,7 @@ <div id=log></div> <script> var v; -var t = async_test(function(t) { +test(function() { v = document.createElement('video'); document.body.appendChild(v); assert_equals(v.networkState, v.NETWORK_EMPTY, 'networkState after appending v to document'); @@ -13,9 +13,3 @@ assert_equals(v.networkState, v.NETWORK_EMPTY, 'networkState after removing v'); }); </script> -<script> -t.step(function() { - assert_equals(v.networkState, v.NETWORK_EMPTY, 'networkState in separate script'); - t.done(); -}); -</script>
diff --git a/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/media-elements/track/track-element/track-selection-metadata.html b/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/media-elements/track/track-element/track-selection-metadata.html index 1f7df3b6..c4d88a35 100644 --- a/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/media-elements/track/track-element/track-selection-metadata.html +++ b/third_party/blink/web_tests/external/wpt/html/semantics/embedded-content/media-elements/track/track-element/track-selection-metadata.html
@@ -8,26 +8,26 @@ <track kind="metadata" src="resources/class.vtt" default id="t2hidden"> <track kind="metadata" src="resources/metadata-area.vtt" id="t3"> <track kind="metadata" src="resources/webvtt-file.vtt" default id="t4hidden"> - <script> - async_test(function() { - var video = document.querySelector('video'); - video.onloadstart = this.step_func_done(function() { - assert_equals(video.textTracks.length, 4); - for (var track of video.textTracks) { - assert_equals(track.kind, 'metadata'); +</video> +<script> +async_test(function() { + var video = document.querySelector('video'); + video.onloadstart = this.step_func_done(function() { + assert_equals(video.textTracks.length, 4); + for (var track of video.textTracks) { + assert_equals(track.kind, 'metadata'); - var trackElement = document.getElementById(track.id); - if (track.id.indexOf('hidden') != -1) { - assert_true(trackElement.default); - assert_equals(track.mode, 'hidden'); - } else { - assert_false(trackElement.default); - assert_equals(track.mode, 'disabled'); - } + var trackElement = document.getElementById(track.id); + if (track.id.indexOf('hidden') != -1) { + assert_true(trackElement.default); + assert_equals(track.mode, 'hidden'); + } else { + assert_false(trackElement.default); + assert_equals(track.mode, 'disabled'); } - }); - - video.src = getVideoURI("/media/test"); + } }); - </script> -</video> \ No newline at end of file + + video.src = getVideoURI("/media/test"); +}); +</script>
diff --git a/third_party/blink/web_tests/external/wpt/html/semantics/popups/popup-animated-hide-cleanup.tentative.html b/third_party/blink/web_tests/external/wpt/html/semantics/popups/popup-animated-hide-cleanup.tentative.html index 762458e..99fc2b8 100644 --- a/third_party/blink/web_tests/external/wpt/html/semantics/popups/popup-animated-hide-cleanup.tentative.html +++ b/third_party/blink/web_tests/external/wpt/html/semantics/popups/popup-animated-hide-cleanup.tentative.html
@@ -45,51 +45,51 @@ function rAF() { return new Promise(resolve => requestAnimationFrame(resolve)); } -function addPopup(classname) { - const popup = document.createElement('div'); - popup.popup = 'auto'; - popup.classList = classname; - popup.textContent = 'This is a popup'; - document.body.appendChild(popup); - return popup; +function addPopUp(classname) { + const popUp = document.createElement('div'); + popUp.popUp = 'auto'; + popUp.classList = classname; + popUp.textContent = 'This is a pop-up'; + document.body.appendChild(popUp); + return popUp; } promise_test(async () => { - let popup = addPopup("animation"); + let popUp = addPopUp("animation"); let dialog = document.querySelector('dialog'); - popup.showPopup(); // No animations here + popUp.showPopup(); // No animations here await rAF(); - popup.hidePopup(); // Start animations + popUp.hidePopup(); // Start animations await rAF(); - popup.remove(); + popUp.remove(); garbageCollect(); await rAF(); // This test passes if it does not crash. },'Ensure no crashes if running animations are immediately cancelled (document removal)'); promise_test(async (t) => { - let popup = addPopup("animation"); + let popUp = addPopUp("animation"); let dialog = document.querySelector('dialog'); - popup.showPopup(); // No animations here + popUp.showPopup(); // No animations here await rAF(); - popup.hidePopup(); // Start animations + popUp.hidePopup(); // Start animations await rAF(); - dialog.showModal(); // Immediately hide popup + dialog.showModal(); // Immediately hide pop-up t.add_cleanup(() => dialog.close()); await rAF(); - popup.remove(); + popUp.remove(); garbageCollect(); await rAF(); // This test passes if it does not crash. },'Ensure no crashes if running animations are immediately cancelled (dialog showModal)'); promise_test(async (t) => { - let popup = addPopup("transition"); + let popUp = addPopUp("transition"); let dialog = document.querySelector('dialog'); let button = document.createElement('button'); - t.add_cleanup(() => {popup.remove();button.remove();}); + t.add_cleanup(() => {popUp.remove();button.remove();}); document.body.appendChild(button); button.addEventListener('click',() => dialog.show()); - popup.showPopup(); // No animations here + popUp.showPopup(); // No animations here await rAF(); await clickOn(button); await rAF();
diff --git a/third_party/blink/web_tests/external/wpt/html/semantics/popups/popup-animation-corner-cases.tentative.html b/third_party/blink/web_tests/external/wpt/html/semantics/popups/popup-animation-corner-cases.tentative.html index 2edcca5..9681287 100644 --- a/third_party/blink/web_tests/external/wpt/html/semantics/popups/popup-animation-corner-cases.tentative.html +++ b/third_party/blink/web_tests/external/wpt/html/semantics/popups/popup-animation-corner-cases.tentative.html
@@ -29,62 +29,62 @@ </style> <script> -function createPopup(t,type) { - const popup = document.createElement('div'); - popup.popup = 'auto'; - popup.classList = type; +function createPopUp(t,type) { + const popUp = document.createElement('div'); + popUp.popUp = 'auto'; + popUp.classList = type; const div = document.createElement('div'); const descendent = div.appendChild(document.createElement('div')); descendent.appendChild(document.createTextNode("Descendent element")); - popup.append("This is a popup",div); - document.body.appendChild(popup); - t.add_cleanup(() => popup.remove()); - return {popup, descendent}; + popUp.append("This is a pop up",div); + document.body.appendChild(popUp); + t.add_cleanup(() => popUp.remove()); + return {popUp, descendent}; } promise_test(async (t) => { - const {popup, descendent} = createPopup(t,'animation'); - assert_false(isElementVisible(popup)); - assert_equals(descendent.parentElement.parentElement,popup); - popup.showPopup(); - assert_true(popup.matches(':top-layer')); - assert_true(isElementVisible(popup)); - assert_equals(popup.getAnimations({subtree: true}).length,0); - popup.hidePopup(); - const animations = popup.getAnimations({subtree: true}); + const {popUp, descendent} = createPopUp(t,'animation'); + assert_false(isElementVisible(popUp)); + assert_equals(descendent.parentElement.parentElement,popUp); + popUp.showPopup(); + assert_true(popUp.matches(':top-layer')); + assert_true(isElementVisible(popUp)); + assert_equals(popUp.getAnimations({subtree: true}).length,0); + popUp.hidePopup(); + const animations = popUp.getAnimations({subtree: true}); assert_equals(animations.length,2,'There should be two animations running'); - assert_false(popup.matches(':top-layer'),'popup should not match :top-layer as soon as hidden'); - assert_true(isElementVisible(popup),'but animations should keep the popup visible'); + assert_false(popUp.matches(':top-layer'),'popUp should not match :top-layer as soon as hidden'); + assert_true(isElementVisible(popUp),'but animations should keep the popUp visible'); assert_true(isElementVisible(descendent),'The descendent should also be visible'); await waitForRender(); await waitForRender(); - assert_equals(popup.getAnimations({subtree: true}).length,2,'The animations should still be running'); - assert_true(isElementVisible(popup),'Popup should still be visible due to animation'); + assert_equals(popUp.getAnimations({subtree: true}).length,2,'The animations should still be running'); + assert_true(isElementVisible(popUp),'PopUp should still be visible due to animation'); animations.forEach(animation => animation.finish()); // Force the animations to finish await waitForRender(); // Wait one frame - assert_false(popup.matches(':top-layer'),'The popup still shouldn\'t match :top-layer'); - assert_false(isElementVisible(popup),'The popup should now be invisible'); + assert_false(popUp.matches(':top-layer'),'The pop up still shouldn\'t match :top-layer'); + assert_false(isElementVisible(popUp),'The pop up should now be invisible'); assert_false(isElementVisible(descendent),'The descendent should also be invisible'); - assert_equals(popup.getAnimations({subtree: true}).length,0); -},'Descendent animations should keep the popup visible until the animation ends'); + assert_equals(popUp.getAnimations({subtree: true}).length,0); +},'Descendent animations should keep the pop up visible until the animation ends'); promise_test(async (t) => { - const {popup, descendent} = createPopup(t,''); - assert_equals(popup.classList.length, 0); - assert_false(isElementVisible(popup)); - popup.showPopup(); - assert_true(popup.matches(':top-layer')); - assert_true(isElementVisible(popup)); - assert_equals(popup.getAnimations({subtree: true}).length,0); - // Start an animation on the popup and its descendent. - popup.animate([{opacity: 1},{opacity: 0}],{duration: 1000000,iterations: 1}); + const {popUp, descendent} = createPopUp(t,''); + assert_equals(popUp.classList.length, 0); + assert_false(isElementVisible(popUp)); + popUp.showPopup(); + assert_true(popUp.matches(':top-layer')); + assert_true(isElementVisible(popUp)); + assert_equals(popUp.getAnimations({subtree: true}).length,0); + // Start an animation on the popUp and its descendent. + popUp.animate([{opacity: 1},{opacity: 0}],{duration: 1000000,iterations: 1}); descendent.animate([{transform: 'rotate(0)'},{transform: 'rotate(360deg)'}],{duration: 1000000,iterations: 1}); - assert_equals(popup.getAnimations({subtree: true}).length,2); - // Then hide the popup. - popup.hidePopup(); - assert_false(popup.matches(':top-layer'),'popup should not match :top-layer as soon as hidden'); - assert_equals(popup.getAnimations({subtree: true}).length,2,'animations should still be running'); + assert_equals(popUp.getAnimations({subtree: true}).length,2); + // Then hide the popUp. + popUp.hidePopup(); + assert_false(popUp.matches(':top-layer'),'pop up should not match :top-layer as soon as hidden'); + assert_equals(popUp.getAnimations({subtree: true}).length,2,'animations should still be running'); await waitForRender(); - assert_equals(popup.getAnimations({subtree: true}).length,2,'animations should still be running'); - assert_false(isElementVisible(popup),'Pre-existing animations should not keep the popup visible'); -},'Pre-existing animations should *not* keep the popup visible until the animation ends'); + assert_equals(popUp.getAnimations({subtree: true}).length,2,'animations should still be running'); + assert_false(isElementVisible(popUp),'Pre-existing animations should not keep the pop up visible'); +},'Pre-existing animations should *not* keep the pop up visible until the animation ends'); </script>
diff --git a/third_party/blink/web_tests/external/wpt/html/semantics/popups/popup-attribute-basic.tentative.html b/third_party/blink/web_tests/external/wpt/html/semantics/popups/popup-attribute-basic.tentative.html index 22742a3..5e26a725 100644 --- a/third_party/blink/web_tests/external/wpt/html/semantics/popups/popup-attribute-basic.tentative.html +++ b/third_party/blink/web_tests/external/wpt/html/semantics/popups/popup-attribute-basic.tentative.html
@@ -7,164 +7,164 @@ <script src="resources/popup-utils.js"></script> <div id=popups> - <div popup id=boolean>Popup</div> - <div popup="">Popup</div> - <div popup=auto>Popup</div> - <div popup=hint>Popup</div> - <div popup=async>Popup</div> + <div popup id=boolean>Pop up</div> + <div popup="">Pop up</div> + <div popup=auto>Pop up</div> + <div popup=hint>Pop up</div> + <div popup=async>Pop up</div> </div> <div id=nonpopups> - <div>Non-popup</div> - <div popup=popup>Non-popup</div> - <div popup=invalid>Non-popup</div> + <div>Not a pop-up</div> + <div popup=popup>Not a pop-up</div> + <div popup=invalid>Not a pop-up</div> </div> <script> - function popupVisible(popup, isPopup) { - const isVisible = isElementVisible(popup); + function popUpVisible(popUp, isPopUp) { + const isVisible = isElementVisible(popUp); if (isVisible) { - assert_not_equals(window.getComputedStyle(popup).display,'none'); - assert_equals(isPopup,popup.matches(':top-layer')); + assert_not_equals(window.getComputedStyle(popUp).display,'none'); + assert_equals(isPopUp,popUp.matches(':top-layer')); } else { - assert_equals(window.getComputedStyle(popup).display,'none'); - assert_false(popup.matches(':top-layer')); + assert_equals(window.getComputedStyle(popUp).display,'none'); + assert_false(popUp.matches(':top-layer')); } return isVisible; } - function assertIsFunctionalPopup(popup) { - assert_false(popupVisible(popup, /*isPopup*/true)); - popup.showPopup(); - assert_true(popupVisible(popup, /*isPopup*/true)); - assert_throws_dom("InvalidStateError",() => popup.showPopup(),'Calling showPopup on a showing popup should throw InvalidStateError'); - popup.hidePopup(); - assert_false(popupVisible(popup, /*isPopup*/true)); - assert_throws_dom("InvalidStateError",() => popup.hidePopup(),'Calling hidePopup on a hidden popup should throw InvalidStateError'); - const parent = popup.parentElement; - popup.remove(); - assert_throws_dom("InvalidStateError",() => popup.showPopup(),'Calling showPopup on a disconnected popup should throw InvalidStateError'); - parent.appendChild(popup); + function assertIsFunctionalPopUp(popUp) { + assert_false(popUpVisible(popUp, /*isPopUp*/true)); + popUp.showPopup(); + assert_true(popUpVisible(popUp, /*isPopUp*/true)); + assert_throws_dom("InvalidStateError",() => popUp.showPopup(),'Calling showPopup on a showing pop-up should throw InvalidStateError'); + popUp.hidePopup(); + assert_false(popUpVisible(popUp, /*isPopUp*/true)); + assert_throws_dom("InvalidStateError",() => popUp.hidePopup(),'Calling hidePopup on a hidden pop-up should throw InvalidStateError'); + const parent = popUp.parentElement; + popUp.remove(); + assert_throws_dom("InvalidStateError",() => popUp.showPopup(),'Calling showPopup on a disconnected pop-up should throw InvalidStateError'); + parent.appendChild(popUp); } - function assertNotAPopup(nonPopup) { + function assertNotAPopUp(nonPopUp) { // Non-popup elements should already be visible. - assert_true(popupVisible(nonPopup, /*isPopup*/false)); - assert_throws_dom("NotSupportedError",() => nonPopup.showPopup(),'Calling showPopup on a non-popup should throw NotSupportedError'); - assert_true(popupVisible(nonPopup, /*isPopup*/false)); - assert_throws_dom("NotSupportedError",() => nonPopup.hidePopup(),'Calling hidePopup on a non-popup should throw NotSupportedError'); - assert_true(popupVisible(nonPopup, /*isPopup*/false)); + assert_true(popUpVisible(nonPopUp, /*isPopUp*/false)); + assert_throws_dom("NotSupportedError",() => nonPopUp.showPopup(),'Calling showPopup on a non-pop-up should throw NotSupportedError'); + assert_true(popUpVisible(nonPopUp, /*isPopUp*/false)); + assert_throws_dom("NotSupportedError",() => nonPopUp.hidePopup(),'Calling hidePopup on a non-pop-up should throw NotSupportedError'); + assert_true(popUpVisible(nonPopUp, /*isPopUp*/false)); } - Array.from(document.getElementById('popups').children).forEach(popup => { + Array.from(document.getElementById('popups').children).forEach(popUp => { test((t) => { - assertIsFunctionalPopup(popup); - }, `The .showPopup() and .hidePopup() work on a popup, for ${popup.outerHTML}.`); + assertIsFunctionalPopUp(popUp); + }, `The .showPopup() and .hidePopup() work on a pop-up, for ${popUp.outerHTML}.`); }); - Array.from(document.getElementById('nonpopups').children).forEach(nonPopup => { + Array.from(document.getElementById('nonpopups').children).forEach(nonPopUp => { test((t) => { - assertNotAPopup(nonPopup); - }, `The .showPopup() and .hidePopup() do NOT work on elements without a 'popup' attribute, ${nonPopup.outerHTML}.`); + assertNotAPopUp(nonPopUp); + }, `The .showPopup() and .hidePopup() do NOT work on elements without a 'popup' attribute, ${nonPopUp.outerHTML}.`); }); - function createPopup(t) { - const popup = document.createElement('div'); - document.body.appendChild(popup); - t.add_cleanup(() => popup.remove()); - popup.setAttribute('popup','auto'); - return popup; + function createPopUp(t) { + const popUp = document.createElement('div'); + document.body.appendChild(popUp); + t.add_cleanup(() => popUp.remove()); + popUp.setAttribute('popup','auto'); + return popUp; } test((t) => { // YOU CAN set the attribute to anything. // Setting IDL to something sets the content attribute to exactly that, always. // GETTING the IDL only gets valid values. - const popup = createPopup(t); - assert_equals(popup.popup,'auto'); - popup.setAttribute('popup','hint'); - assert_equals(popup.popup,'hint'); - popup.setAttribute('popup','HiNt'); - assert_equals(popup.popup,'hint','Case is normalized in IDL'); - assert_equals(popup.getAttribute('popup'),'HiNt','Case is *not* normalized/changed in the content attribute'); - popup.popup='hInT'; - assert_equals(popup.popup,'hint','Case is normalized in IDL'); - assert_equals(popup.getAttribute('popup'),'hInT','Value set from IDL is propagated exactly to the content attribute'); - popup.setAttribute('popup','invalid'); - assert_equals(popup.popup,null,'Invalid values should reflect as null'); - popup.removeAttribute('popup'); - assert_equals(popup.popup,null,'No value should reflect as null'); - popup.popup='hint'; - assert_equals(popup.getAttribute('popup'),'hint'); - popup.popup='auto'; - assert_equals(popup.getAttribute('popup'),'auto'); - popup.popup=''; - assert_equals(popup.getAttribute('popup'),''); - assert_equals(popup.popup,'auto'); - popup.popup='AuTo'; - assert_equals(popup.getAttribute('popup'),'AuTo'); - assert_equals(popup.popup,'auto'); - popup.popup='invalid'; - assert_equals(popup.getAttribute('popup'),'invalid','IDL setter allows any value'); - assert_equals(popup.popup,null,'but IDL getter does not re-reflect invalid values'); - popup.popup=''; - assert_equals(popup.getAttribute('popup'),'','IDL setter propagates exactly'); - assert_equals(popup.popup,'auto','Empty should map to auto in IDL'); - popup.popup='auto'; - popup.popup=null; - assert_equals(popup.getAttribute('popup'),null,'Setting null for the IDL property should remove the content attribute'); - assert_equals(popup.popup,null,'Null returns null'); - popup.popup='auto'; - popup.popup=undefined; - assert_equals(popup.getAttribute('popup'),null,'Setting undefined for the IDL property should remove the content attribute'); - assert_equals(popup.popup,null,'undefined returns null'); + const popUp = createPopUp(t); + assert_equals(popUp.popUp,'auto'); + popUp.setAttribute('popup','hint'); + assert_equals(popUp.popUp,'hint'); + popUp.setAttribute('popup','HiNt'); + assert_equals(popUp.popUp,'hint','Case is normalized in IDL'); + assert_equals(popUp.getAttribute('popup'),'HiNt','Case is *not* normalized/changed in the content attribute'); + popUp.popUp='hInT'; + assert_equals(popUp.popUp,'hint','Case is normalized in IDL'); + assert_equals(popUp.getAttribute('popup'),'hInT','Value set from IDL is propagated exactly to the content attribute'); + popUp.setAttribute('popup','invalid'); + assert_equals(popUp.popUp,null,'Invalid values should reflect as null'); + popUp.removeAttribute('popup'); + assert_equals(popUp.popUp,null,'No value should reflect as null'); + popUp.popUp='hint'; + assert_equals(popUp.getAttribute('popup'),'hint'); + popUp.popUp='auto'; + assert_equals(popUp.getAttribute('popup'),'auto'); + popUp.popUp=''; + assert_equals(popUp.getAttribute('popup'),''); + assert_equals(popUp.popUp,'auto'); + popUp.popUp='AuTo'; + assert_equals(popUp.getAttribute('popup'),'AuTo'); + assert_equals(popUp.popUp,'auto'); + popUp.popUp='invalid'; + assert_equals(popUp.getAttribute('popup'),'invalid','IDL setter allows any value'); + assert_equals(popUp.popUp,null,'but IDL getter does not re-reflect invalid values'); + popUp.popUp=''; + assert_equals(popUp.getAttribute('popup'),'','IDL setter propagates exactly'); + assert_equals(popUp.popUp,'auto','Empty should map to auto in IDL'); + popUp.popUp='auto'; + popUp.popUp=null; + assert_equals(popUp.getAttribute('popup'),null,'Setting null for the IDL property should remove the content attribute'); + assert_equals(popUp.popUp,null,'Null returns null'); + popUp.popUp='auto'; + popUp.popUp=undefined; + assert_equals(popUp.getAttribute('popup'),null,'Setting undefined for the IDL property should remove the content attribute'); + assert_equals(popUp.popUp,null,'undefined returns null'); },'IDL attribute reflection'); test((t) => { - const popup = createPopup(t); - assertIsFunctionalPopup(popup); - popup.removeAttribute('popup'); - assertNotAPopup(popup); - popup.setAttribute('popup','AuTo'); - assertIsFunctionalPopup(popup); - popup.removeAttribute('popup'); - popup.setAttribute('PoPuP','AuTo'); - assertIsFunctionalPopup(popup); + const popUp = createPopUp(t); + assertIsFunctionalPopUp(popUp); + popUp.removeAttribute('popup'); + assertNotAPopUp(popUp); + popUp.setAttribute('popup','AuTo'); + assertIsFunctionalPopUp(popUp); + popUp.removeAttribute('popup'); + popUp.setAttribute('PoPuP','AuTo'); + assertIsFunctionalPopUp(popUp); // Via IDL also - popup.popup = 'auto'; - assertIsFunctionalPopup(popup); - popup.popup = 'aUtO'; - assertIsFunctionalPopup(popup); - popup.popup = 'invalid'; - assertNotAPopup(popup); + popUp.popUp = 'auto'; + assertIsFunctionalPopUp(popUp); + popUp.popUp = 'aUtO'; + assertIsFunctionalPopUp(popUp); + popUp.popUp = 'invalid'; + assertNotAPopUp(popUp); },'Popup attribute value should be case insensitive'); test((t) => { - const popup = createPopup(t); - assertIsFunctionalPopup(popup); - popup.setAttribute('popup','hint'); // Change popup type - assertIsFunctionalPopup(popup); - popup.setAttribute('popup','invalid'); // Change popup type to something invalid - assertNotAPopup(popup); - popup.popup = 'hint'; // Change popup type via IDL - assertIsFunctionalPopup(popup); - popup.popup = 'invalid'; // Make invalid via IDL - assertNotAPopup(popup); - },'Changing attribute values for popup should work'); + const popUp = createPopUp(t); + assertIsFunctionalPopUp(popUp); + popUp.setAttribute('popup','hint'); // Change pop-up type + assertIsFunctionalPopUp(popUp); + popUp.setAttribute('popup','invalid'); // Change pop-up type to something invalid + assertNotAPopUp(popUp); + popUp.popUp = 'hint'; // Change pop-up type via IDL + assertIsFunctionalPopUp(popUp); + popUp.popUp = 'invalid'; // Make invalid via IDL + assertNotAPopUp(popUp); + },'Changing attribute values for pop-up should work'); test((t) => { - const popup = createPopup(t); - popup.showPopup(); - assert_true(popup.matches(':top-layer')); - popup.setAttribute('popup','hint'); // Change popup type - assert_false(popup.matches(':top-layer')); - popup.showPopup(); - assert_true(popup.matches(':top-layer')); - popup.setAttribute('popup','async'); - assert_false(popup.matches(':top-layer')); - popup.showPopup(); - assert_true(popup.matches(':top-layer')); - popup.setAttribute('popup','invalid'); - assert_false(popup.matches(':top-layer')); - },'Changing attribute values should close open popups'); + const popUp = createPopUp(t); + popUp.showPopup(); + assert_true(popUp.matches(':top-layer')); + popUp.setAttribute('popup','hint'); // Change pop-up type + assert_false(popUp.matches(':top-layer')); + popUp.showPopup(); + assert_true(popUp.matches(':top-layer')); + popUp.setAttribute('popup','async'); + assert_false(popUp.matches(':top-layer')); + popUp.showPopup(); + assert_true(popUp.matches(':top-layer')); + popUp.setAttribute('popup','invalid'); + assert_false(popUp.matches(':top-layer')); + },'Changing attribute values should close open pop-ups'); function modalPseudoSupported() { try { @@ -177,24 +177,24 @@ ["auto","hint","async"].forEach(type => { test((t) => { - const popup = createPopup(t); - popup.setAttribute('popup',type); - popup.showPopup(); - assert_true(popup.matches(':top-layer')); - popup.remove(); - assert_false(popup.matches(':top-layer')); - document.body.appendChild(popup); - assert_false(popup.matches(':top-layer')); - },`Removing a visible popup=${type} element from the document should close the popup`); + const popUp = createPopUp(t); + popUp.setAttribute('popup',type); + popUp.showPopup(); + assert_true(popUp.matches(':top-layer')); + popUp.remove(); + assert_false(popUp.matches(':top-layer')); + document.body.appendChild(popUp); + assert_false(popUp.matches(':top-layer')); + },`Removing a visible popup=${type} element from the document should close the pop-up`); if (modalPseudoSupported()) { test((t) => { - const popup = createPopup(t); - popup.setAttribute('popup',type); - popup.showPopup(); - assert_true(popup.matches(':top-layer')); - assert_false(popup.matches(':modal')); - popup.hidePopup(); + const popUp = createPopUp(t); + popUp.setAttribute('popup',type); + popUp.showPopup(); + assert_true(popUp.matches(':top-layer')); + assert_false(popUp.matches(':modal')); + popUp.hidePopup(); },`A showing popup=${type} does not match :modal`); } });
diff --git a/third_party/blink/web_tests/external/wpt/html/semantics/popups/popup-focus.tentative.html b/third_party/blink/web_tests/external/wpt/html/semantics/popups/popup-focus.tentative.html index 85f328f0..f9868369 100644 --- a/third_party/blink/web_tests/external/wpt/html/semantics/popups/popup-focus.tentative.html +++ b/third_party/blink/web_tests/external/wpt/html/semantics/popups/popup-focus.tentative.html
@@ -2,7 +2,7 @@ <meta charset="utf-8" /> <title>Popup focus behaviors</title> <link rel="author" href="mailto:masonf@chromium.org"> -<link rel=help href="https://open-ui.org/components/popup.research.explainer"> +<link rel=help href="https://open-ui.org/components/popUp.research.explainer"> <meta name="timeout" content="long"> <script src="/resources/testharness.js"></script> <script src="/resources/testharnessreport.js"></script> @@ -11,80 +11,80 @@ <script src="/resources/testdriver-vendor.js"></script> <script src="resources/popup-utils.js"></script> -<div popup data-test='default behavior - popup is not focused' data-no-focus> - <p>This is a popup</p> +<div popup data-test='default behavior - pop-up is not focused' data-no-focus> + <p>This is a pop-up</p> <button>first button</button> </div> -<div popup data-test='autofocus popup' autofocus tabindex=-1 class=should-be-focused> - <p>This is a popup</p> +<div popup data-test='autofocus pop-up' autofocus tabindex=-1 class=should-be-focused> + <p>This is a pop-up</p> </div> -<div popup data-test='autofocus empty popup' autofocus tabindex=-1 class=should-be-focused></div> +<div popup data-test='autofocus empty pop-up' autofocus tabindex=-1 class=should-be-focused></div> -<div popup data-test='autofocus popup with button' autofocus tabindex=-1 class=should-be-focused> - <p>This is a popup</p> +<div popup data-test='autofocus pop-up with button' autofocus tabindex=-1 class=should-be-focused> + <p>This is a pop-up</p> <button>button</button> </div> <div popup data-test='autofocus child'> - <p>This is a popup</p> + <p>This is a pop-up</p> <button autofocus class=should-be-focused>autofocus button</button> </div> <div popup data-test='autofocus on tabindex=0 element'> - <p autofocus tabindex=0 class=should-be-focused>This is a popup with autofocus on a tabindex=0 element</p> + <p autofocus tabindex=0 class=should-be-focused>This is a pop-up with autofocus on a tabindex=0 element</p> <button>button</button> </div> <div popup data-test='autofocus multiple children'> - <p>This is a popup</p> + <p>This is a pop-up</p> <button autofocus class=should-be-focused>autofocus button</button> <button autofocus>second autofocus button</button> </div> -<div popup autofocus tabindex=-1 data-test='autofocus popup and multiple autofocus children' class=should-be-focused> - <p>This is a popup</p> +<div popup autofocus tabindex=-1 data-test='autofocus pop-up and multiple autofocus children' class=should-be-focused> + <p>This is a pop-up</p> <button autofocus>autofocus button</button> <button autofocus>second autofocus button</button> </div> -<div popup delegatesfocus data-test='delegatesfocus popup'> - <p>This is a popup</p> +<div popup delegatesfocus data-test='delegatesfocus pop-up'> + <p>This is a pop-up</p> <button class=should-be-focused>first button should be focused</button> <button>second button</button> </div> <div popup delegatesfocus data-test='delegatesfocus takes precedence over autofocus'> - <p>This is a popup</p> + <p>This is a pop-up</p> <button class=should-be-focused>first button</button> <button autofocus>autofocus button should NOT be focused</button> </div> <div popup delegatesfocus autofocus data-test='delegatesfocus takes precedence over autofocus 2'> - <p>This is a popup</p> + <p>This is a pop-up</p> <button class=should-be-focused>first button</button> <button>autofocus button should NOT be focused</button> </div> -<div popup delegatesfocus data-test='delegatesfocus on empty popup has no effect' data-no-focus></div> +<div popup delegatesfocus data-test='delegatesfocus on empty pop-up has no effect' data-no-focus></div> <div popup data-test='delegatesfocus on child has no effect' data-no-focus> - <p>This is a popup</p> + <p>This is a pop-up</p> <button delegatesfocus>first button</button> </div> -<div popup delegatesfocus data-test='delegatesfocus skips contained popups'> - <p>This is a popup</p> +<div popup delegatesfocus data-test='delegatesfocus skips contained pop-ups'> + <p>This is a pop-up</p> <div popup> - <button>Contained popup button</button> + <button>Contained pop-up button</button> </div> <button class=should-be-focused>first button</button> <button>autofocus button should NOT be focused</button> </div> <div popup delegatesfocus data-test='delegatesfocus skips contained dialogs'> - <p>This is a popup</p> + <p>This is a pop-up</p> <dialog> <button>Contained dialog button</button> </dialog> @@ -103,18 +103,18 @@ </style> <script> - function addInvoker(t, popup) { + function addInvoker(t, popUp) { const button = document.createElement('button'); button.innerText = 'Click me'; - const popupId = 'popup-id'; - assert_equals(document.querySelectorAll('#' + popupId).length, 0); + const popUpId = 'pop-up-id'; + assert_equals(document.querySelectorAll('#' + popUpId).length, 0); document.body.appendChild(button); t.add_cleanup(function() { - popup.removeAttribute('id'); + popUp.removeAttribute('id'); button.remove(); }); - popup.id = popupId; - button.setAttribute('togglepopup', popupId); + popUp.id = popUpId; + button.setAttribute('togglepopup', popUpId); return button; } function addPriorFocus(t) { @@ -123,153 +123,153 @@ t.add_cleanup(() => priorFocus.remove()); return priorFocus; } - function activateAndVerify(popup) { - const testName = popup.getAttribute('data-test'); + function activateAndVerify(popUp) { + const testName = popUp.getAttribute('data-test'); promise_test(async t => { const priorFocus = addPriorFocus(t); - let expectedFocusedElement = popup.matches('.should-be-focused') ? popup : popup.querySelector('.should-be-focused'); - if (popup.hasAttribute('data-no-focus')) { + let expectedFocusedElement = popUp.matches('.should-be-focused') ? popUp : popUp.querySelector('.should-be-focused'); + if (popUp.hasAttribute('data-no-focus')) { expectedFocusedElement = priorFocus; } assert_true(!!expectedFocusedElement); - assert_false(popup.matches(':top-layer')); + assert_false(popUp.matches(':top-layer')); - // Directly show and hide the popup: + // Directly show and hide the pop-up: priorFocus.focus(); assert_equals(document.activeElement, priorFocus); - popup.showPopup(); - assert_equals(document.activeElement, expectedFocusedElement, `${testName} activated by popup.showPopup()`); - popup.hidePopup(); + popUp.showPopup(); + assert_equals(document.activeElement, expectedFocusedElement, `${testName} activated by popUp.showPopup()`); + popUp.hidePopup(); assert_equals(document.activeElement, priorFocus, 'prior element should get focus on hide'); // Hit Escape: priorFocus.focus(); assert_equals(document.activeElement, priorFocus); - popup.showPopup(); - assert_equals(document.activeElement, expectedFocusedElement, `${testName} activated by popup.showPopup()`); + popUp.showPopup(); + assert_equals(document.activeElement, expectedFocusedElement, `${testName} activated by popUp.showPopup()`); await sendEscape(); assert_equals(document.activeElement, priorFocus, 'prior element should get focus after Escape'); - // Change the popup type: + // Change the pop-up type: priorFocus.focus(); - popup.showPopup(); - assert_equals(document.activeElement, expectedFocusedElement, `${testName} activated by popup.showPopup()`); - assert_equals(popup.popup, 'auto', 'All popups in this test should start as popup=auto'); - popup.popup = 'hint'; - assert_false(popup.matches(':top-layer'), 'Changing the popup type should hide the popup'); + popUp.showPopup(); + assert_equals(document.activeElement, expectedFocusedElement, `${testName} activated by popUp.showPopup()`); + assert_equals(popUp.popUp, 'auto', 'All pop-ups in this test should start as popup=auto'); + popUp.popUp = 'hint'; + assert_false(popUp.matches(':top-layer'), 'Changing the pop-up type should hide the pop-up'); assert_equals(document.activeElement, priorFocus, 'prior element should get focus when the type is changed'); - popup.popup = 'auto'; + popUp.popUp = 'auto'; // Remove from the document: priorFocus.focus(); - popup.showPopup(); - assert_equals(document.activeElement, expectedFocusedElement, `${testName} activated by popup.showPopup()`); - popup.remove(); - assert_false(popup.matches(':top-layer'), 'Removing the popup should hide it'); - if (!popup.hasAttribute('data-no-focus')) { - assert_not_equals(document.activeElement, priorFocus, 'prior element should *not* get focus when the popup is removed from the document'); + popUp.showPopup(); + assert_equals(document.activeElement, expectedFocusedElement, `${testName} activated by popUp.showPopup()`); + popUp.remove(); + assert_false(popUp.matches(':top-layer'), 'Removing the pop-up should hide it'); + if (!popUp.hasAttribute('data-no-focus')) { + assert_not_equals(document.activeElement, priorFocus, 'prior element should *not* get focus when the pop-up is removed from the document'); } - document.body.appendChild(popup); + document.body.appendChild(popUp); // Show a modal dialog: priorFocus.focus(); - popup.showPopup(); - assert_equals(document.activeElement, expectedFocusedElement, `${testName} activated by popup.showPopup()`); + popUp.showPopup(); + assert_equals(document.activeElement, expectedFocusedElement, `${testName} activated by popUp.showPopup()`); const dialog = document.body.appendChild(document.createElement('dialog')); dialog.showModal(); - assert_false(popup.matches(':top-layer'), 'Opening a modal dialog should hide the popup'); + assert_false(popUp.matches(':top-layer'), 'Opening a modal dialog should hide the pop-up'); assert_not_equals(document.activeElement, priorFocus, 'prior element should *not* get focus when a modal dialog is shown'); dialog.close(); dialog.remove(); // Use an activating element: - const button = addInvoker(t, popup); + const button = addInvoker(t, popUp); priorFocus.focus(); button.click(); - assert_true(popup.matches(':top-layer')); + assert_true(popUp.matches(':top-layer')); assert_equals(document.activeElement, expectedFocusedElement, `${testName} activated by button.click()`); - // Make sure we can directly focus the (already open) popup: - popup.focus(); - assert_equals(document.activeElement, popup.hasAttribute('tabindex') ? popup : expectedFocusedElement, `${testName} directly focus with popup.focus()`); - button.click(); // Button is set to toggle the popup - assert_false(popup.matches(':top-layer')); + // Make sure we can directly focus the (already open) pop-up: + popUp.focus(); + assert_equals(document.activeElement, popUp.hasAttribute('tabindex') ? popUp : expectedFocusedElement, `${testName} directly focus with popUp.focus()`); + button.click(); // Button is set to toggle the pop-up + assert_false(popUp.matches(':top-layer')); assert_equals(document.activeElement, priorFocus, 'prior element should get focus on button-toggled hide'); }, "Popup focus test: " + testName); promise_test(async t => { const priorFocus = addPriorFocus(t); - assert_false(popup.matches(':top-layer'), 'popup should start out hidden'); - let button = addInvoker(t, popup); - assert_equals(button.getAttribute('togglepopup'), popup.id, 'This test assumes the button uses `togglepopup`.'); + assert_false(popUp.matches(':top-layer'), 'pop-up should start out hidden'); + let button = addInvoker(t, popUp); + assert_equals(button.getAttribute('togglepopup'), popUp.id, 'This test assumes the button uses `togglepopup`.'); assert_not_equals(button, priorFocus, 'Stranger things have happened'); - assert_false(popup.contains(button), 'Start with a non-contained button'); + assert_false(popUp.contains(button), 'Start with a non-contained button'); priorFocus.focus(); assert_equals(document.activeElement, priorFocus); - popup.showPopup(); - assert_true(popup.matches(':top-layer')); - await clickOn(button); // This will not light dismiss, but will "toggle" the popup. - assert_false(popup.matches(':top-layer')); + popUp.showPopup(); + assert_true(popUp.matches(':top-layer')); + await clickOn(button); // This will not light dismiss, but will "toggle" the popUp. + assert_false(popUp.matches(':top-layer')); assert_equals(document.activeElement, priorFocus, 'Focus should return to prior focus'); - // Same thing, but the button is contained within the popup + // Same thing, but the button is contained within the pop-up button.removeAttribute('togglepopup'); - button.setAttribute('hidepopup', popup.id); - popup.appendChild(button); + button.setAttribute('hidepopup', popUp.id); + popUp.appendChild(button); priorFocus.focus(); - popup.showPopup(); - assert_true(popup.matches(':top-layer')); - if (!popup.hasAttribute('data-no-focus')) { + popUp.showPopup(); + assert_true(popUp.matches(':top-layer')); + if (!popUp.hasAttribute('data-no-focus')) { assert_not_equals(document.activeElement, priorFocus, 'focus should shift for this element'); } await clickOn(button); - assert_false(popup.matches(':top-layer'), 'clicking button should hide the popup'); + assert_false(popUp.matches(':top-layer'), 'clicking button should hide the pop-up'); assert_equals(document.activeElement, priorFocus, 'Contained button should return focus to the previously focused element'); // Same thing, but the button is unrelated (no togglepopup) button = document.createElement('button'); document.body.appendChild(button); priorFocus.focus(); - popup.showPopup(); - assert_true(popup.matches(':top-layer')); - await clickOn(button); // This will light dismiss the popup, focus the prior focus, then focus this button. - assert_false(popup.matches(':top-layer'), 'clicking button should hide the popup (via light dismiss)'); + popUp.showPopup(); + assert_true(popUp.matches(':top-layer')); + await clickOn(button); // This will light dismiss the pop-up, focus the prior focus, then focus this button. + assert_false(popUp.matches(':top-layer'), 'clicking button should hide the pop-up (via light dismiss)'); assert_equals(document.activeElement, button, 'Focus should go to unrelated button on light dismiss'); }, "Popup button click focus test: " + testName); promise_test(async t => { - if (popup.hasAttribute('data-no-focus')) { - // This test only applies if the popup changes focus + if (popUp.hasAttribute('data-no-focus')) { + // This test only applies if the pop-up changes focus return; } const priorFocus = addPriorFocus(t); - assert_false(popup.matches(':top-layer'), 'popup should start out hidden'); + assert_false(popUp.matches(':top-layer'), 'pop-up should start out hidden'); // Move the prior focus out of the document priorFocus.focus(); - popup.showPopup(); - assert_true(popup.matches(':top-layer')); + popUp.showPopup(); + assert_true(popUp.matches(':top-layer')); const newFocus = document.activeElement; assert_not_equals(newFocus, priorFocus, 'focus should shift for this element'); priorFocus.remove(); assert_equals(document.activeElement, newFocus, 'focus should not change when prior focus is removed'); - popup.hidePopup(); + popUp.hidePopup(); assert_not_equals(document.activeElement, priorFocus, 'focused element has been removed'); document.body.appendChild(priorFocus); // Put it back - // Move the prior focus inside the (already open) popup + // Move the prior focus inside the (already open) pop-up priorFocus.focus(); - popup.showPopup(); - assert_true(popup.matches(':top-layer')); - assert_false(popup.contains(priorFocus), 'Start with a non-contained prior focus'); - popup.appendChild(priorFocus); // Move inside the popup - assert_true(popup.contains(priorFocus)); - assert_true(popup.matches(':top-layer'), 'popup should stay open'); - popup.hidePopup(); - assert_not_equals(document.activeElement, priorFocus, 'focused element is display:none inside the popup'); + popUp.showPopup(); + assert_true(popUp.matches(':top-layer')); + assert_false(popUp.contains(priorFocus), 'Start with a non-contained prior focus'); + popUp.appendChild(priorFocus); // Move inside the pop-up + assert_true(popUp.contains(priorFocus)); + assert_true(popUp.matches(':top-layer'), 'pop-up should stay open'); + popUp.hidePopup(); + assert_not_equals(document.activeElement, priorFocus, 'focused element is display:none inside the pop-up'); document.body.appendChild(priorFocus); // Put it back }, "Popup corner cases test: " + testName); } - document.querySelectorAll('body > [popup]').forEach(popup => activateAndVerify(popup)); + document.querySelectorAll('body > [popup]').forEach(popUp => activateAndVerify(popUp)); </script>
diff --git a/third_party/blink/web_tests/external/wpt/html/semantics/popups/popup-invoking-attribute.tentative.html b/third_party/blink/web_tests/external/wpt/html/semantics/popups/popup-invoking-attribute.tentative.html index 4a407686..eba8f553 100644 --- a/third_party/blink/web_tests/external/wpt/html/semantics/popups/popup-invoking-attribute.tentative.html +++ b/third_party/blink/web_tests/external/wpt/html/semantics/popups/popup-invoking-attribute.tentative.html
@@ -28,7 +28,7 @@ return {expectedBehavior: (t || s) ? "show" : "none", expectedId: t || s || 1}; }; const noActivationLogic = (t,s,h) => { - // This does not activate any popups. + // This does not activate any pop-ups. return {expectedBehavior: "none", expectedId: 1}; } function activateTextInputFn(arrowChoice) { @@ -83,7 +83,7 @@ name: `<input type="${type}"">`, makeElement: makeElementWithType('input',type), invokeFn: activateTextInputFn('down'), - getExpectedLogic: noActivationLogic, // None of these support popup invocation + getExpectedLogic: noActivationLogic, // None of these support pop-up invocation supported: false, }; }); @@ -117,59 +117,59 @@ s_set.forEach(s => { h_set.forEach(h => { promise_test(async test => { - const popup1 = Object.assign(document.createElement('div'),{popup: type, id: 'popup-1'}); - const popup2 = Object.assign(document.createElement('div'),{popup: type, id: 'popup-2'}); - assert_equals(popup1.popup,type); - assert_equals(popup2.popup,type); - assert_not_equals(popup1.id,popup2.id); + const popUp1 = Object.assign(document.createElement('div'),{popUp: type, id: 'pop-up-1'}); + const popUp2 = Object.assign(document.createElement('div'),{popUp: type, id: 'pop-up-2'}); + assert_equals(popUp1.popUp,type); + assert_equals(popUp2.popUp,type); + assert_not_equals(popUp1.id,popUp2.id); const invoker = testcase.makeElement(test); - if (t) invoker.setAttribute('togglepopup',t===1 ? popup1.id : popup2.id); - if (s) invoker.setAttribute('showpopup',s===1 ? popup1.id : popup2.id); - if (h) invoker.setAttribute('hidepopup',h===1 ? popup1.id : popup2.id); - assert_true(!document.getElementById(popup1.id)); - assert_true(!document.getElementById(popup2.id)); - document.body.appendChild(popup1); - document.body.appendChild(popup2); + if (t) invoker.setAttribute('togglepopup',t===1 ? popUp1.id : popUp2.id); + if (s) invoker.setAttribute('showpopup',s===1 ? popUp1.id : popUp2.id); + if (h) invoker.setAttribute('hidepopup',h===1 ? popUp1.id : popUp2.id); + assert_true(!document.getElementById(popUp1.id)); + assert_true(!document.getElementById(popUp2.id)); + document.body.appendChild(popUp1); + document.body.appendChild(popUp2); test.add_cleanup(() => { - popup1.remove(); - popup2.remove(); + popUp1.remove(); + popUp2.remove(); }); const {expectedBehavior, expectedId} = testcase.getExpectedLogic(t,s,h); const otherId = expectedId !== 1 ? 1 : 2; - function assert_popup(num,state,message) { + function assert_popUp(num,state,message) { assert_true(num>0,`Invalid expectedId ${num}`); - assert_equals((num===1 ? popup1 : popup2).matches(':top-layer'),state,message || ""); + assert_equals((num===1 ? popUp1 : popUp2).matches(':top-layer'),state,message || ""); } - assert_popup(expectedId,false); - assert_popup(otherId,false); + assert_popUp(expectedId,false); + assert_popUp(otherId,false); await testcase.invokeFn(invoker); - assert_popup(otherId,false,'The other popup should never change'); + assert_popUp(otherId,false,'The other pop-up should never change'); switch (expectedBehavior) { case "toggle": case "show": - assert_popup(expectedId,true,'Toggle or show should show the popup'); - (expectedId===1 ? popup1 : popup2).hidePopup(); // Hide the popup + assert_popUp(expectedId,true,'Toggle or show should show the pop-up'); + (expectedId===1 ? popUp1 : popUp2).hidePopup(); // Hide the pop-up break; case "hide": case "none": - assert_popup(expectedId,false,'Hide or none should leave the popup hidden'); + assert_popUp(expectedId,false,'Hide or none should leave the pop-up hidden'); break; default: assert_unreached(); } - (expectedId===1 ? popup1 : popup2).showPopup(); // Show the popup directly - assert_popup(expectedId,true); - assert_popup(otherId,false); + (expectedId===1 ? popUp1 : popUp2).showPopup(); // Show the pop-up directly + assert_popUp(expectedId,true); + assert_popUp(otherId,false); await testcase.invokeFn(invoker); - assert_popup(otherId,false,'The other popup should never change'); + assert_popUp(otherId,false,'The other pop-up should never change'); switch (expectedBehavior) { case "toggle": case "hide": - assert_popup(expectedId,false,'Toggle or hide should hide the popup'); + assert_popUp(expectedId,false,'Toggle or hide should hide the pop-up'); break; case "show": case "none": - assert_popup(expectedId,true,'Show or none should leave the popup showing'); + assert_popUp(expectedId,true,'Show or none should leave the pop-up showing'); break; default: assert_unreached(); @@ -185,7 +185,7 @@ <button togglepopup=p1>Toggle Popup 1</button> -<div popup id=p1 style="border: 5px solid red;top: 100px;left: 100px;">This is popup #1</div> +<div popup id=p1 style="border: 5px solid red;top: 100px;left: 100px;">This is pop-up #1</div> <script> function clickOn(element) { @@ -196,15 +196,15 @@ .send(); } -const popup = document.querySelector('[popup]'); +const popUp = document.querySelector('[popup]'); const button = document.querySelector('button'); let showCount = 0; let hideCount = 0; -popup.addEventListener('show',() => ++showCount); -popup.addEventListener('hide',() => ++hideCount); +popUp.addEventListener('show',() => ++showCount); +popUp.addEventListener('hide',() => ++hideCount); async function assertState(expectOpen,expectShow,expectHide) { - assert_equals(popup.matches(':top-layer'),expectOpen,'Popup open state is incorrect'); + assert_equals(popUp.matches(':top-layer'),expectOpen,'Popup open state is incorrect'); await new Promise(resolve => requestAnimationFrame(resolve)); assert_equals(showCount,expectShow,'Show count is incorrect'); assert_equals(hideCount,expectHide,'Hide count is incorrect'); @@ -215,13 +215,13 @@ await assertState(false,0,0); await clickOn(button); await assertState(true,1,0); - popup.hidePopup(); + popUp.hidePopup(); await assertState(false,1,1); button.click(); await assertState(true,2,1); - popup.hidePopup(); + popUp.hidePopup(); await assertState(false,2,2); -}, "Clicking a togglepopup button opens a closed popup (also check event counts)"); +}, "Clicking a togglepopup button opens a closed pop-up (also check event counts)"); promise_test(async () => { showCount = hideCount = 0; @@ -230,4 +230,4 @@ await assertState(true,1,0); await clickOn(button); await assertState(false,1,1); -}, "Clicking a togglepopup button closes an open popup (also check event counts)"); +}, "Clicking a togglepopup button closes an open pop-up (also check event counts)");
diff --git a/third_party/blink/web_tests/external/wpt/html/semantics/popups/popup-top-layer-interactions.tentative.html b/third_party/blink/web_tests/external/wpt/html/semantics/popups/popup-top-layer-interactions.tentative.html index c8f9ddf6..9a39d9f2 100644 --- a/third_party/blink/web_tests/external/wpt/html/semantics/popups/popup-top-layer-interactions.tentative.html +++ b/third_party/blink/web_tests/external/wpt/html/semantics/popups/popup-top-layer-interactions.tentative.html
@@ -11,22 +11,22 @@ <body> <script> const types = Object.freeze({ - popup: Symbol("Popup API"), + popUp: Symbol("Pop-up API"), modalDialog: Symbol("Modal Dialog"), fullscreen: Symbol("Fullscreen Element"), }); const examples = [ { - type: types.popup, - closes: [types.popup], - createElement: () => Object.assign(document.createElement('div'), {popup: 'auto'}), + type: types.popUp, + closes: [types.popUp], + createElement: () => Object.assign(document.createElement('div'), {popUp: 'auto'}), trigger: function() {this.element.showPopup()}, close: function() {this.element.hidePopup()}, isTopLayer: function() {return this.element.matches(':top-layer')}, }, { type: types.modalDialog, - closes: [types.popup], + closes: [types.popUp], createElement: () => document.createElement('dialog'), trigger: function() {this.element.showModal();this.showing=true;}, close: function() {this.element.close();this.showing=false;}, @@ -34,7 +34,7 @@ }, { type: types.fullscreen, - closes: [types.popup, types.fullscreen], + closes: [types.popUp, types.fullscreen], createElement: () => document.createElement('div'), trigger: async function(visibleElement) {assert_false(this.isTopLayer());await bless(visibleElement);await this.element.requestFullscreen();}, close: function() {assert_equals(this.element,document.fullscreenElement); document.exitFullscreen();}, @@ -62,7 +62,7 @@ // The normal "bless" function doesn't work well when there are top layer // elements blocking clicks. Additionally, since the normal test_driver.bless // function just adds a button to the main document and clicks it, we can't - // call that in the presence of open popups, since that click will close them. + // call that in the presence of open pop-ups, since that click will close them. const button = document.createElement('button'); button.innerHTML = "Click me to activate"; visibleElement.appendChild(button);
diff --git a/third_party/blink/web_tests/external/wpt/html/semantics/scripting-1/the-script-element/execution-timing/080.html b/third_party/blink/web_tests/external/wpt/html/semantics/scripting-1/the-script-element/execution-timing/080.html deleted file mode 100644 index bd983355..0000000 --- a/third_party/blink/web_tests/external/wpt/html/semantics/scripting-1/the-script-element/execution-timing/080.html +++ /dev/null
@@ -1,30 +0,0 @@ -<!DOCTYPE html> -<html><head> - <title>scheduler: IFRAMEs added with DOM (appendChild), javascript: URL</title> - <script src="/resources/testharness.js"></script> - <script src="/resources/testharnessreport.js"></script> - <script src="testlib/testlib.js"></script> -</head> -<body> - - <div id="log">FAILED (This TC requires JavaScript enabled)</div> - <div></div> - <script>log('inline script #1'); - var iframe=document.createElement('iframe'); - iframe.src='javascript:parent.log(\'JS URL\');\'<html><script>parent.log(\\\'frame script\\\')<\/script></html>\''; - document.getElementsByTagName('div')[1].appendChild(iframe); - log('end script #1'); - </script> - - <script type="text/javascript"> - log( 'inline script #2' ); - var t = async_test() - - function test() { - assert_array_equals(eventOrder, ['inline script #1', 'end script #1', 'inline script #2', 'JS URL', 'frame script']); - t.done(); - } - onload = t.step_func(function(){setTimeout(t.step_func(test), 400);}) - </script> - -</body></html>
diff --git a/third_party/blink/web_tests/external/wpt/service-workers/service-worker/resources/about-blank-replacement-blank-nested-frame.html b/third_party/blink/web_tests/external/wpt/service-workers/service-worker/resources/about-blank-replacement-blank-nested-frame.html index 99d07a48..16f7e7c 100644 --- a/third_party/blink/web_tests/external/wpt/service-workers/service-worker/resources/about-blank-replacement-blank-nested-frame.html +++ b/third_party/blink/web_tests/external/wpt/service-workers/service-worker/resources/about-blank-replacement-blank-nested-frame.html
@@ -5,9 +5,7 @@ function nestedLoaded() { parent.postMessage({ type: 'NESTED_LOADED' }, '*'); } -</script> -<iframe id="nested" onload="nestedLoaded()"></iframe> -<script> + // Helper routine to make it slightly easier for our parent to find // the nested frame. function nested() { @@ -18,5 +16,6 @@ // test the case where the initial about:blank document is not // directly accessed before load. </script> +<iframe id="nested" onload="nestedLoaded()"></iframe> </body> </html>
diff --git a/third_party/blink/web_tests/fast/frames/calculate-fixed.html b/third_party/blink/web_tests/fast/frames/calculate-fixed.html index 3b2f2ab..9ad7a988 100644 --- a/third_party/blink/web_tests/fast/frames/calculate-fixed.html +++ b/third_party/blink/web_tests/fast/frames/calculate-fixed.html
@@ -1,4 +1,7 @@ -<html><frameset rows="500,*"> +<html> +<!-- TODO(crbug.com/1338331): Fix frameborders across parser iterations. --> +<style>frame { border: 1px solid black; }</style> +<frameset rows="500,*" frameborder="no"> <frameset cols="*,*,*,*, *,*,*,*,*,*,*,*, *,*,*,*,*, *,*">
diff --git a/third_party/blink/web_tests/fast/frames/calculate-order.html b/third_party/blink/web_tests/fast/frames/calculate-order.html index 64f84d0..4a31f21 100644 --- a/third_party/blink/web_tests/fast/frames/calculate-order.html +++ b/third_party/blink/web_tests/fast/frames/calculate-order.html
@@ -1,4 +1,7 @@ -<html><frameset rows="500,*"> +<html> +<!-- TODO(crbug.com/1338331): Fix frameborders across parser iterations. --> +<style>frame { border: 1px solid black; }</style> +<frameset rows="500,*" frameborder="no"> <frameset cols="*,*, *,*,*">
diff --git a/third_party/blink/web_tests/fast/frames/calculate-percentage.html b/third_party/blink/web_tests/fast/frames/calculate-percentage.html index 4c8ede7..d6cfdad 100644 --- a/third_party/blink/web_tests/fast/frames/calculate-percentage.html +++ b/third_party/blink/web_tests/fast/frames/calculate-percentage.html
@@ -1,4 +1,7 @@ -<html><frameset rows="500,*"> +<html> +<!-- TODO(crbug.com/1338331): Fix frameborders across parser iterations. --> +<style>frame { border: 1px solid black; }</style> +<frameset rows="500,*" frameborder="no"> <frameset cols="*,*,*,*, *,*,*,*, *,*,*,*,*">
diff --git a/third_party/blink/web_tests/fast/frames/calculate-relative.html b/third_party/blink/web_tests/fast/frames/calculate-relative.html index b48643a..b5f5a66 100644 --- a/third_party/blink/web_tests/fast/frames/calculate-relative.html +++ b/third_party/blink/web_tests/fast/frames/calculate-relative.html
@@ -1,4 +1,7 @@ -<html><frameset rows="500,*"> +<html> +<!-- TODO(crbug.com/1338331): Fix frameborders across parser iterations. --> +<style>frame { border: 1px solid black; }</style> +<frameset rows="500,*" frameborder="no"> <frameset cols="*,*,*,*, *,*,*,*, *,*">
diff --git a/third_party/blink/web_tests/fast/frames/calculate-round.html b/third_party/blink/web_tests/fast/frames/calculate-round.html index c646eed..2652541 100644 --- a/third_party/blink/web_tests/fast/frames/calculate-round.html +++ b/third_party/blink/web_tests/fast/frames/calculate-round.html
@@ -1,4 +1,7 @@ -<html><frameset rows="500,*"> +<html> +<!-- TODO(crbug.com/1338331): Fix frameborders across parser iterations. --> +<style>frame { border: 1px solid black; }</style> +<frameset rows="500,*" frameborder="no"> <frameset cols="*,*,*,*,*"> <frameset rows='*,*,*,*,*,*'>
diff --git a/third_party/blink/web_tests/fast/frames/frame-length-fractional.html b/third_party/blink/web_tests/fast/frames/frame-length-fractional.html index 8555fde..994a8d27 100644 --- a/third_party/blink/web_tests/fast/frames/frame-length-fractional.html +++ b/third_party/blink/web_tests/fast/frames/frame-length-fractional.html
@@ -1,5 +1,7 @@ <html> -<frameset cols="*,*,*,*"> +<!-- TODO(crbug.com/1338331): Fix frameborders across parser iterations. --> +<style>frame { border: 1px solid black; }</style> +<frameset cols="*,*,*,*" frameborder="no"> <frameset rows="50%,*"> <frame> <frame>
diff --git a/third_party/blink/web_tests/fast/frames/iframe-no-src-local-origin-allow.html b/third_party/blink/web_tests/fast/frames/iframe-no-src-local-origin-allow.html index 21e4a15..faa4e4a 100644 --- a/third_party/blink/web_tests/fast/frames/iframe-no-src-local-origin-allow.html +++ b/third_party/blink/web_tests/fast/frames/iframe-no-src-local-origin-allow.html
@@ -1,36 +1,26 @@ <html> <head> -<script src="../../resources/js-test.js"></script> +<script src="../../resources/testharness.js"></script> +<script src="../../resources/testharnessreport.js"></script> <script> -if (window.testRunner) { - testRunner.dumpAsText(); - testRunner.waitUntilDone(); -} +var t = async_test("This tests that an iframe with no src attribute uses the parent document's origin when resolving links inserted into the frame via JavaScript."); -var iframeHasLoadedFirstPage = false; - -function runTest() -{ - shouldBe("document.getElementById('theFrame').contentDocument.baseURI", "document.baseURI"); - var frameDoc = document.getElementById('theFrame').contentWindow.document; +function runTest() { + var frame = document.getElementById('theFrame'); + assert_equals(frame.contentDocument.baseURI, document.baseURI); + var frameDoc = frame.contentWindow.document; var innerFrame = frameDoc.createElement("iframe"); innerFrame.src = "resources/iframe-no-src-set-location-pass.html"; innerFrame.id = "innerFrame"; - innerFrame.onload = function() { - shouldBe("document.getElementById('theFrame').contentDocument.getElementById('innerFrame').contentDocument.body.innerHTML", "'PASS\\n'"); - isSuccessfullyParsed(); - if (window.testRunner) - testRunner.notifyDone(); - } + innerFrame.onload = t.step_func_done(function() { + assert_equals(frame.contentDocument.getElementById('innerFrame').contentDocument.body.innerHTML, 'PASS\n'); + }); frameDoc.body.appendChild(innerFrame); } </script> </head> <body> -<script> -description("This tests that an iframe with no src attribute uses the parent document's origin when resolving links inserted into the frame via JavaScript."); -</script> -<iframe id="theFrame" onload="runTest()"></iframe> +<iframe id="theFrame" onload="t.step(runTest)"></iframe> </body> </html>
diff --git a/third_party/blink/web_tests/fast/frames/invalid.html b/third_party/blink/web_tests/fast/frames/invalid.html index 695800d..0f47801c 100644 --- a/third_party/blink/web_tests/fast/frames/invalid.html +++ b/third_party/blink/web_tests/fast/frames/invalid.html
@@ -1,6 +1,8 @@ <html> +<!-- TODO(crbug.com/1338331): Fix frameborders across parser iterations. --> +<style>frame { border: 1px solid black; }</style> -<frameset cols="*,*,*,*,*,*,*,*,*,*,*"> +<frameset cols="*,*,*,*,*,*,*,*,*,*,*" frameborder="no"> <frameset rows="50%*,*"> <frame> @@ -68,4 +70,4 @@ </frameset> -</html> \ No newline at end of file +</html>
diff --git a/third_party/blink/web_tests/fast/frames/valid.html b/third_party/blink/web_tests/fast/frames/valid.html index 4f84b8b8..0a33c8a5 100644 --- a/third_party/blink/web_tests/fast/frames/valid.html +++ b/third_party/blink/web_tests/fast/frames/valid.html
@@ -1,6 +1,8 @@ <html> +<!-- TODO(crbug.com/1338331): Fix frameborders across parser iterations. --> +<style>frame { border: 1px solid black; }</style> -<frameset cols="*,*,*,*,*,*,*,*,*,*,*"> +<frameset cols="*,*,*,*,*,*,*,*,*,*,*" frameborder="no"> <frameset rows="50%,*"> <frame> @@ -68,4 +70,4 @@ </frameset> -</html> \ No newline at end of file +</html>
diff --git a/third_party/blink/web_tests/media/video-play-pause-exception.html b/third_party/blink/web_tests/media/video-play-pause-exception.html index bb495fa..80915ee 100644 --- a/third_party/blink/web_tests/media/video-play-pause-exception.html +++ b/third_party/blink/web_tests/media/video-play-pause-exception.html
@@ -16,7 +16,8 @@ assert_equals(video.networkState, HTMLMediaElement.NETWORK_EMPTY); }); - video.play(); + // Ignore any error that may be thrown from calling pause() immediately. + video.play().catch(function() {}); video.pause(); }); -</script> \ No newline at end of file +</script>
diff --git a/third_party/blink/web_tests/platform/generic/external/wpt/dom/idlharness.window_exclude=Node-expected.txt b/third_party/blink/web_tests/platform/generic/external/wpt/dom/idlharness.window_exclude=Node-expected.txt index 07ec39d..ab05707 100644 --- a/third_party/blink/web_tests/platform/generic/external/wpt/dom/idlharness.window_exclude=Node-expected.txt +++ b/third_party/blink/web_tests/platform/generic/external/wpt/dom/idlharness.window_exclude=Node-expected.txt
@@ -574,7 +574,7 @@ PASS Element interface object name PASS Element interface: existence and properties of interface prototype object PASS Element interface: existence and properties of interface prototype object's "constructor" property -FAIL Element interface: existence and properties of interface prototype object's @@unscopables property assert_not_equals: Element.prototype[Symbol.unscopables] has unexpected property "popup" got disallowed value -1 +FAIL Element interface: existence and properties of interface prototype object's @@unscopables property assert_not_equals: Element.prototype[Symbol.unscopables] has unexpected property "popUp" got disallowed value -1 PASS Element interface: attribute namespaceURI PASS Element interface: attribute prefix PASS Element interface: attribute localName
diff --git a/third_party/blink/web_tests/platform/generic/external/wpt/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-in-sync-event-expected.txt b/third_party/blink/web_tests/platform/generic/external/wpt/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-in-sync-event-expected.txt index 3efca34..eeda1b6a 100644 --- a/third_party/blink/web_tests/platform/generic/external/wpt/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-in-sync-event-expected.txt +++ b/third_party/blink/web_tests/platform/generic/external/wpt/html/semantics/embedded-content/media-elements/loading-the-media-resource/resource-selection-invoke-in-sync-event-expected.txt
@@ -1,4 +1,4 @@ This is a testharness.js-based test. -FAIL await a stable state and sync event handlers assert_equals: networkState in separate script expected 0 but got 3 +FAIL await a stable state and sync event handlers assert_equals: networkState after src removed expected 0 but got 3 Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/platform/generic/fast/frames/calculate-fixed-expected.png b/third_party/blink/web_tests/platform/generic/fast/frames/calculate-fixed-expected.png index 9679eac5..f92a80a 100644 --- a/third_party/blink/web_tests/platform/generic/fast/frames/calculate-fixed-expected.png +++ b/third_party/blink/web_tests/platform/generic/fast/frames/calculate-fixed-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/generic/fast/frames/calculate-order-expected.png b/third_party/blink/web_tests/platform/generic/fast/frames/calculate-order-expected.png index 76f656586..2caf3ae 100644 --- a/third_party/blink/web_tests/platform/generic/fast/frames/calculate-order-expected.png +++ b/third_party/blink/web_tests/platform/generic/fast/frames/calculate-order-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/generic/fast/frames/calculate-percentage-expected.png b/third_party/blink/web_tests/platform/generic/fast/frames/calculate-percentage-expected.png index cf007b8..eb91b25 100644 --- a/third_party/blink/web_tests/platform/generic/fast/frames/calculate-percentage-expected.png +++ b/third_party/blink/web_tests/platform/generic/fast/frames/calculate-percentage-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/generic/fast/frames/calculate-relative-expected.png b/third_party/blink/web_tests/platform/generic/fast/frames/calculate-relative-expected.png index ce338a01..9444263 100644 --- a/third_party/blink/web_tests/platform/generic/fast/frames/calculate-relative-expected.png +++ b/third_party/blink/web_tests/platform/generic/fast/frames/calculate-relative-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/generic/fast/frames/calculate-round-expected.png b/third_party/blink/web_tests/platform/generic/fast/frames/calculate-round-expected.png index 545b6dba..d17d81d 100644 --- a/third_party/blink/web_tests/platform/generic/fast/frames/calculate-round-expected.png +++ b/third_party/blink/web_tests/platform/generic/fast/frames/calculate-round-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/generic/fast/frames/frame-length-fractional-expected.png b/third_party/blink/web_tests/platform/generic/fast/frames/frame-length-fractional-expected.png index 1d8b617..cdecdbb 100644 --- a/third_party/blink/web_tests/platform/generic/fast/frames/frame-length-fractional-expected.png +++ b/third_party/blink/web_tests/platform/generic/fast/frames/frame-length-fractional-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/generic/fast/frames/iframe-no-src-local-origin-allow-expected.txt b/third_party/blink/web_tests/platform/generic/fast/frames/iframe-no-src-local-origin-allow-expected.txt deleted file mode 100644 index 19e075b..0000000 --- a/third_party/blink/web_tests/platform/generic/fast/frames/iframe-no-src-local-origin-allow-expected.txt +++ /dev/null
@@ -1,14 +0,0 @@ -This tests that an iframe with no src attribute uses the parent document's origin when resolving links inserted into the frame via JavaScript. - -On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". - -PASS document.getElementById('theFrame').contentDocument.baseURI is document.baseURI -PASS successfullyParsed is true - -TEST COMPLETE - -PASS document.getElementById('theFrame').contentDocument.getElementById('innerFrame').contentDocument.body.innerHTML is 'PASS\n' -PASS successfullyParsed is true - -TEST COMPLETE -
diff --git a/third_party/blink/web_tests/platform/generic/webexposed/element-instance-property-listing-expected.txt b/third_party/blink/web_tests/platform/generic/webexposed/element-instance-property-listing-expected.txt index 3b0ccac..f301020 100644 --- a/third_party/blink/web_tests/platform/generic/webexposed/element-instance-property-listing-expected.txt +++ b/third_party/blink/web_tests/platform/generic/webexposed/element-instance-property-listing-expected.txt
@@ -287,7 +287,7 @@ property parentElement property parentNode property part - property popup + property popUp property prefix property prepend property previousElementSibling @@ -1506,7 +1506,7 @@ property parentElement property parentNode property part - property popup + property popUp property prefix property prepend property previousElementSibling
diff --git a/third_party/blink/web_tests/platform/generic/webexposed/global-interface-listing-expected.txt b/third_party/blink/web_tests/platform/generic/webexposed/global-interface-listing-expected.txt index 9b1c74a..1f5e627 100644 --- a/third_party/blink/web_tests/platform/generic/webexposed/global-interface-listing-expected.txt +++ b/third_party/blink/web_tests/platform/generic/webexposed/global-interface-listing-expected.txt
@@ -2265,7 +2265,7 @@ getter onwebkitfullscreenerror getter outerHTML getter part - getter popup + getter popUp getter prefix getter previousElementSibling getter role @@ -2398,7 +2398,7 @@ setter onwebkitfullscreenerror setter outerHTML setter part - setter popup + setter popUp setter role setter scrollLeft setter scrollTop
diff --git a/third_party/blink/web_tests/platform/mac/fast/frames/invalid-expected.png b/third_party/blink/web_tests/platform/mac/fast/frames/invalid-expected.png index 053fb27..e17143ce 100644 --- a/third_party/blink/web_tests/platform/mac/fast/frames/invalid-expected.png +++ b/third_party/blink/web_tests/platform/mac/fast/frames/invalid-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/mac/fast/frames/valid-expected.png b/third_party/blink/web_tests/platform/mac/fast/frames/valid-expected.png index 053fb27..e17143ce 100644 --- a/third_party/blink/web_tests/platform/mac/fast/frames/valid-expected.png +++ b/third_party/blink/web_tests/platform/mac/fast/frames/valid-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/fast/frames/invalid-expected.png b/third_party/blink/web_tests/platform/win/fast/frames/invalid-expected.png index 8264aff2..00ef052 100644 --- a/third_party/blink/web_tests/platform/win/fast/frames/invalid-expected.png +++ b/third_party/blink/web_tests/platform/win/fast/frames/invalid-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/platform/win/fast/frames/valid-expected.png b/third_party/blink/web_tests/platform/win/fast/frames/valid-expected.png index 8264aff2..00ef052 100644 --- a/third_party/blink/web_tests/platform/win/fast/frames/valid-expected.png +++ b/third_party/blink/web_tests/platform/win/fast/frames/valid-expected.png Binary files differ
diff --git a/third_party/blink/web_tests/wpt_internal/fenced_frame/payment-handler.https.html b/third_party/blink/web_tests/wpt_internal/fenced_frame/payment-handler.https.html new file mode 100644 index 0000000..36e5e50 --- /dev/null +++ b/third_party/blink/web_tests/wpt_internal/fenced_frame/payment-handler.https.html
@@ -0,0 +1,60 @@ +<!DOCTYPE html> +<title>Test Payment Handler API</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<script src="/common/utils.js"></script> +<script src="/common/dispatcher/dispatcher.js"></script> +<script src="resources/utils.js"></script> + +<body> +<script> +promise_test(async () => { + const frame = attachFencedFrameContext(); + const error_name = await frame.execute(async () => { + navigator.serviceWorker.register( + "empty-worker.js", { scope: location.href }); + const registration = await navigator.serviceWorker.ready; + try { + registration.paymentManager; + } catch (e) { + return e.name; + } + }); + assert_equals(error_name, "NotAllowedError", + "paymentManager is not allowed in fenced frames"); +}, 'paymentManager should fail inside a fenced frame'); + +promise_test(async () => { + const frame = attachFencedFrameContext(); + const error_name = await frame.execute(async () => { + const getController = () => { + if (navigator.serviceWorker.controller) { + return navigator.serviceWorker.controller; + } + return new Promise(resolve => { + navigator.serviceWorker.addEventListener('controllerchange', () => { + resolve(navigator.serviceWorker.controller); + }); + }); + }; + + navigator.serviceWorker.register( + "payment-handler-sw.js", { scope: location.href }); + const ctrl = await getController(); + + return new Promise(resolve => { + ctrl.postMessage("test"); + navigator.serviceWorker.onmessage = e => { + const error = e.data; + resolve(error.name); + }; + }); + }); + assert_equals(error_name, "NotAllowedError", + "paymentManager is not allowed from the service worker " + + "in fenced frames"); +}, 'paymentManager should fail from the service worker inside a fenced frame'); +</script> +</body>
diff --git a/third_party/blink/web_tests/wpt_internal/fenced_frame/payment-request.https.html b/third_party/blink/web_tests/wpt_internal/fenced_frame/payment-request.https.html new file mode 100644 index 0000000..0d1bbb0 --- /dev/null +++ b/third_party/blink/web_tests/wpt_internal/fenced_frame/payment-request.https.html
@@ -0,0 +1,37 @@ +<!DOCTYPE html> +<title>Test Payment Rrequest API</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/resources/testdriver.js"></script> +<script src="/resources/testdriver-vendor.js"></script> +<script src="/common/utils.js"></script> +<script src="/common/dispatcher/dispatcher.js"></script> +<script src="resources/utils.js"></script> + +<body> +<script> +promise_test(async () => { + const frame = attachFencedFrameContext(); + const error_name = await frame.execute(() => { + const methods = [{supportedMethods: ['foo']}]; + const details = { + total: { + label: 'label', + amount: { + currency: 'USD', + value: '5.00' + } + } + }; + + try { + new PaymentRequest(methods, details); + } catch (e) { + return e.name + } + }); + assert_equals(error_name, "SecurityError", + "PaymentRequest is not allowed in fenced frames"); +}, 'new PaymentRequest should fail inside a fenced frame'); +</script> +</body>
diff --git a/third_party/blink/web_tests/wpt_internal/fenced_frame/resources/payment-handler-sw.js b/third_party/blink/web_tests/wpt_internal/fenced_frame/resources/payment-handler-sw.js new file mode 100644 index 0000000..8b5e83c --- /dev/null +++ b/third_party/blink/web_tests/wpt_internal/fenced_frame/resources/payment-handler-sw.js
@@ -0,0 +1,10 @@ +self.addEventListener('install', e => e.waitUntil(skipWaiting())); +self.addEventListener('activate', e => e.waitUntil(clients.claim())); + +self.addEventListener('message', event => { + try { + self.registration.paymentManager; + } catch (e) { + event.source.postMessage(e); + } +});
diff --git a/third_party/blink/web_tests/wpt_internal/shared_storage/combined-setters-and-operations.https.html b/third_party/blink/web_tests/wpt_internal/shared_storage/combined-setters-and-operations.https.html index 00f22232..ac4c4220 100644 --- a/third_party/blink/web_tests/wpt_internal/shared_storage/combined-setters-and-operations.https.html +++ b/third_party/blink/web_tests/wpt_internal/shared_storage/combined-setters-and-operations.https.html
@@ -22,9 +22,9 @@ let uuid1 = await sharedStorage.selectURL( "verify-storage-entries-url-selection-operation", [{url: url0, - reporting_metadata: {'click': "resources/frame0.html"}}, + reportingMetadata: {'click': "resources/frame0.html"}}, {url: url1, - reporting_metadata: + reportingMetadata: {'mouse interaction': "resources/frame1.html", 'click': "resources/frame2.html"}}]);
diff --git a/third_party/blink/web_tests/wpt_internal/shared_storage/run-url-selection-operation-without-add-module.html b/third_party/blink/web_tests/wpt_internal/shared_storage/run-url-selection-operation-without-add-module.html index eacfffc..2b639de 100644 --- a/third_party/blink/web_tests/wpt_internal/shared_storage/run-url-selection-operation-without-add-module.html +++ b/third_party/blink/web_tests/wpt_internal/shared_storage/run-url-selection-operation-without-add-module.html
@@ -42,7 +42,7 @@ try { await sharedStorage.selectURL( "test-url-selection-operation", [{ - reporting_metadata: { + reportingMetadata: { 'click': "https://google.com" } }]); @@ -79,7 +79,7 @@ await sharedStorage.selectURL( "test-url-selection-operation", [{ url: "resources/frame0.html", - reporting_metadata: { + reportingMetadata: { 'click': "https://#" } }]); @@ -98,7 +98,7 @@ await sharedStorage.selectURL( "test-url-selection-operation", [{ url: "resources/frame0.html", - reporting_metadata: { + reportingMetadata: { 'click': "http://google.com" } }]); @@ -116,16 +116,16 @@ await sharedStorage.selectURL( "test-url-selection-operation", [{ url: "resources/frame0.html", - reporting_metadata: {} + reportingMetadata: {} }]); } catch (e) { assert_equals(e.name, 'DataError'); - assert_equals(e.message, 'selectURL could not get reporting_metadata \ + assert_equals(e.message, 'selectURL could not get reportingMetadata \ object attributes'); return; } assert_unreached("did not reject"); -}, 'selectURL() with invalid reporting_metadata'); +}, 'selectURL() with invalid reportingMetadata'); </script> </body>
diff --git a/third_party/blink/web_tests/wpt_internal/shared_storage/select-url-report-event.https.html b/third_party/blink/web_tests/wpt_internal/shared_storage/select-url-report-event.https.html index f7e5a1b..85779f7 100644 --- a/third_party/blink/web_tests/wpt_internal/shared_storage/select-url-report-event.https.html +++ b/third_party/blink/web_tests/wpt_internal/shared_storage/select-url-report-event.https.html
@@ -19,7 +19,7 @@ let uuid0 = await sharedStorage.selectURL( "test-url-selection-operation", [ {url: url0, - reporting_metadata: + reportingMetadata: { 'click': "resources/receiver0.html", 'mouse interaction': "resources/receiver1.html"
diff --git a/third_party/blink/web_tests/wpt_internal/shared_storage/verify-get-undefined.https.html b/third_party/blink/web_tests/wpt_internal/shared_storage/verify-get-undefined.https.html index 72090bf..7425655 100644 --- a/third_party/blink/web_tests/wpt_internal/shared_storage/verify-get-undefined.https.html +++ b/third_party/blink/web_tests/wpt_internal/shared_storage/verify-get-undefined.https.html
@@ -19,9 +19,9 @@ let uuid1 = await sharedStorage.selectURL( "verify-get-undefined-url-selection-operation", [{url: url0, - reporting_metadata: {'click': "resources/frame0.html"}}, + reportingMetadata: {'click': "resources/frame0.html"}}, {url: url1, - reporting_metadata: + reportingMetadata: {'mouse interaction': "resources/frame1.html", 'click': "resources/frame2.html"}}]);
diff --git a/third_party/r8/README.chromium b/third_party/r8/README.chromium index 934151a..b0d4f40 100644 --- a/third_party/r8/README.chromium +++ b/third_party/r8/README.chromium
@@ -22,6 +22,7 @@ Local Modifications: * Refer to commit descriptions within "3pp/patches" directory. * Added "playground" directory for quick "how does this optimize" tests. +* Added "dump_inputs.py" script. * desugar_jdk_libs.json: * Removed references to ConcurrentHashMap to avoid bloat * Removed references to TimeZone#getTimeZone to avoid desugaring of @@ -112,6 +113,7 @@ How to file bugs against R8: * Copy & paste the failing ninja command (starts with proguard.py), and add --dump-inputs. * This also works for dex.py, it produces d8inputs.zip + * As a shortcut: third_party/r8/dump_inputs.py out/Release/apks/ChromePublic.apk.mapping * File bug at go/r8bug * Things to include (use discretion if some are not relevant): * src revision bug reproduces at
diff --git a/third_party/r8/dump_inputs.py b/third_party/r8/dump_inputs.py new file mode 100755 index 0000000..fc050578 --- /dev/null +++ b/third_party/r8/dump_inputs.py
@@ -0,0 +1,45 @@ +#!/usr/bin/env python3 +# Copyright 2022 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. +"""Convenience script for running proguard.py with --dump-inputs.""" + +import argparse +import os +import subprocess +import sys + + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument('mapping_file', + help='Path to .mapping file within out/Release/apks.') + args = parser.parse_args() + + if not args.mapping_file.endswith('.mapping'): + sys.stderr.write('Expected argument to end with .mapping') + sys.exit(1) + + # Find directory with "build.ninja" in it. + build_dir = os.path.dirname(args.mapping_file) or '.' + for _ in range(50): # Prevent infinite loop. + if os.path.exists(os.path.join(build_dir, 'build.ninja')): + break + build_dir = os.path.dirname(build_dir) or '.' + + mapping_file = os.path.relpath(args.mapping_file, build_dir) + + command = subprocess.check_output( + ['ninja', '-C', build_dir, '-t', 'commands', '-s', mapping_file], + encoding='utf8').rstrip() + if 'proguard.py' not in command: + sys.stderr.write('Unexpected: {command}\n') + sys.exit(1) + + command += ' --dump-inputs' + print('Running:', command) + sys.exit(os.system(command)) + + +if __name__ == '__main__': + main()
diff --git a/third_party/rust/Cargo.lock b/third_party/rust/Cargo.lock index 47bcc79a..6517786 100644 --- a/third_party/rust/Cargo.lock +++ b/third_party/rust/Cargo.lock
@@ -817,6 +817,7 @@ name = "toml" version = "0.5.9" dependencies = [ + "indexmap", "serde", ]
diff --git a/third_party/rust/Cargo.toml b/third_party/rust/Cargo.toml index 8eb0194..94298f11 100644 --- a/third_party/rust/Cargo.toml +++ b/third_party/rust/Cargo.toml
@@ -9,15 +9,11 @@ members = ["autocxx_gen/v0_22/crate"] [dependencies] -cxxbridge-cmd = "1" -cxx = "1" autocxx = "0.22" +cxx = "1" +cxxbridge-cmd = "1" serde = "1" -[dependencies.rustversion] -version = "1" -build-script-outputs = ["version.rs"] - [dependencies.autocxx-bindgen] version = "0.59" features = ["static"] @@ -27,6 +23,15 @@ version = "0.22" features = ["static"] +[dependencies.bindgen] +version = "0.59" +features = ["static"] +build-script-outputs = ["host-target.txt"] + +[dependencies.rustversion] +version = "1" +build-script-outputs = ["version.rs"] + [dependencies.serde_json_lenient] version = "0.1" features = ["unbounded_depth", "float_roundtrip"] @@ -35,308 +40,382 @@ version = "0.1" build-script-outputs = ["tables.rs"] -[dependencies.bindgen] -version = "0.59" -features = ["static"] -build-script-outputs = ["host-target.txt"] - [dev-dependencies] -tempfile = "3" -toml = "0.5" cargo-platform = "0.1" cargo_metadata = "0.14" -rstest = "0.12" clap = "3" -small_ctor = "0.1" once_cell = "1" +rstest = "0.12" +small_ctor = "0.1" +tempfile = "3" [dev-dependencies.syn] version = "1" features = ["full"] -[patch.crates-io.libloading_v0_7] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/libloading/v0_7/crate" -package = "libloading" -[patch.crates-io.rustversion_v1] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/rustversion/v1/crate" -package = "rustversion" - -[patch.crates-io.vec_map_v0_8] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/vec_map/v0_8/crate" -package = "vec_map" - -[patch.crates-io.owo-colors_v3] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/owo_colors/v3/crate" -package = "owo-colors" - -[patch.crates-io.toml_v0_5] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/toml/v0_5/crate" -package = "toml" - -[patch.crates-io.autocxx_v0_22] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/autocxx/v0_22/crate" -package = "autocxx" - -[patch.crates-io.strsim_v0_8] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/strsim/v0_8/crate" -package = "strsim" - -[patch.crates-io.tempfile_v3] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/tempfile/v3/crate" -package = "tempfile" - -[patch.crates-io.termcolor_v1] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/termcolor/v1/crate" -package = "termcolor" - -[patch.crates-io.aho-corasick_v0_7] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/aho_corasick/v0_7/crate" -package = "aho-corasick" - -[patch.crates-io.autocxx-macro_v0_22] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/autocxx_macro/v0_22/crate" -package = "autocxx-macro" - -[patch.crates-io.unicode-linebreak_v0_1] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/unicode_linebreak/v0_1/crate" -package = "unicode-linebreak" - -[patch.crates-io.ryu_v1] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/ryu/v1/crate" -package = "ryu" - -[patch.crates-io.winapi_v0_3] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/winapi/v0_3/crate" -package = "winapi" - -[patch.crates-io.winapi-util_v0_1] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/winapi_util/v0_1/crate" -package = "winapi-util" - -[patch.crates-io.link-cplusplus_v1] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/link_cplusplus/v1/crate" -package = "link-cplusplus" - -[patch.crates-io.indoc_v1] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/indoc/v1/crate" -package = "indoc" - -[patch.crates-io.cargo-platform_v0_1] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/cargo_platform/v0_1/crate" -package = "cargo-platform" - -[patch.crates-io.once_cell_v1] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/once_cell/v1/crate" -package = "once_cell" - -[patch.crates-io.proc-macro-error-attr_v1] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/proc_macro_error_attr/v1/crate" -package = "proc-macro-error-attr" - -[patch.crates-io.nom_v7] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/nom/v7/crate" -package = "nom" - -[patch.crates-io.heck_v0_4] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/heck/v0_4/crate" -package = "heck" - -[patch.crates-io.hashbrown_v0_11] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/hashbrown/v0_11/crate" -package = "hashbrown" - -[patch.crates-io.ansi_term_v0_11] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/ansi_term/v0_11/crate" -package = "ansi_term" - -[patch.crates-io.quote_v1] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/quote/v1/crate" -package = "quote" - -[patch.crates-io.miniz_oxide_v0_4] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/miniz_oxide/v0_4/crate" -package = "miniz_oxide" - -[patch.crates-io.cxx_v1] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/cxx/v1/crate" -package = "cxx" - -[patch.crates-io.itoa_v1] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/itoa/v1/crate" -package = "itoa" - -[patch.crates-io.memchr_v2] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/memchr/v2/crate" -package = "memchr" - -[patch.crates-io.rustc-demangle_v0_1] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/rustc_demangle/v0_1/crate" -package = "rustc-demangle" - -[patch.crates-io.bitflags_v1] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/bitflags/v1/crate" -package = "bitflags" - -[patch.crates-io.autocxx-gen_v0_22] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/autocxx_gen/v0_22/crate" -package = "autocxx-gen" - -[patch.crates-io.clap_v3] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/clap/v3/crate" -package = "clap" - -[patch.crates-io.proc-macro2_v1] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/proc_macro2/v1/crate" -package = "proc-macro2" - -[patch.crates-io.rstest_v0_12] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/rstest/v0_12/crate" -package = "rstest" - -[patch.crates-io.rustc_version_v0_4] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/rustc_version/v0_4/crate" -package = "rustc_version" - -[patch.crates-io.autocfg_v1] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/autocfg/v1/crate" -package = "autocfg" - -[patch.crates-io.serde_json_v1] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/serde_json/v1/crate" -package = "serde_json" - -[patch.crates-io.object_v0_27] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/object/v0_27/crate" -package = "object" - -[patch.crates-io.small_ctor_v0_1] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/small_ctor/v0_1/crate" -package = "small_ctor" - -[patch.crates-io.minimal-lexical_v0_2] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/minimal_lexical/v0_2/crate" -package = "minimal-lexical" - -[patch.crates-io.lazycell_v1] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/lazycell/v1/crate" -package = "lazycell" - -[patch.crates-io.semver_v1] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/semver/v1/crate" -package = "semver" - -[patch.crates-io.glob_v0_3] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/glob/v0_3/crate" -package = "glob" - -[patch.crates-io.terminal_size_v0_1] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/terminal_size/v0_1/crate" -package = "terminal_size" +[dev-dependencies.toml] +version = "0.5" +features = ["preserve_order"] +[patch.crates-io.addr2line_v0_17] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/addr2line/v0_17/crate" +package = "addr2line" [patch.crates-io.adler_v1] path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/adler/v1/crate" package = "adler" -[patch.crates-io.unindent_v0_1] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/unindent/v0_1/crate" -package = "unindent" +[patch.crates-io.aho-corasick_v0_7] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/aho_corasick/v0_7/crate" +package = "aho-corasick" -[patch.crates-io.rustc-hash_v1] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/rustc_hash/v1/crate" -package = "rustc-hash" - -[patch.crates-io.humantime_v2] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/humantime/v2/crate" -package = "humantime" - -[patch.crates-io.atty_v0_2] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/atty/v0_2/crate" -package = "atty" - -[patch.crates-io.cxx-gen_v0_7] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/cxx_gen/v0_7/crate" -package = "cxx-gen" - -[patch.crates-io.clap_v2] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/clap/v2/crate" -package = "clap" - -[patch.crates-io.autocxx-parser_v0_22] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/autocxx_parser/v0_22/crate" -package = "autocxx-parser" - -[patch.crates-io.clap_lex_v0_1] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/clap_lex/v0_1/crate" -package = "clap_lex" - -[patch.crates-io.regex_v1] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/regex/v1/crate" -package = "regex" - -[patch.crates-io.autocxx-engine_v0_22] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/autocxx_engine/v0_22/crate" -package = "autocxx-engine" - -[patch.crates-io.cxxbridge-macro_v1] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/cxxbridge_macro/v1/crate" -package = "cxxbridge-macro" - -[patch.crates-io.fastrand_v1] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/fastrand/v1/crate" -package = "fastrand" +[patch.crates-io.ansi_term_v0_11] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/ansi_term/v0_11/crate" +package = "ansi_term" [patch.crates-io.aquamarine_v0_1] path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/aquamarine/v0_1/crate" package = "aquamarine" -[patch.crates-io.gimli_v0_26] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/gimli/v0_26/crate" -package = "gimli" +[patch.crates-io.atty_v0_2] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/atty/v0_2/crate" +package = "atty" -[patch.crates-io.serde_v1] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/serde/v1/crate" -package = "serde" +[patch.crates-io.autocfg_v1] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/autocfg/v1/crate" +package = "autocfg" -[patch.crates-io.indexmap_v1] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/indexmap/v1/crate" -package = "indexmap" +[patch.crates-io.autocxx-bindgen_v0_59] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/autocxx_bindgen/v0_59/crate" +package = "autocxx-bindgen" -[patch.crates-io.peeking_take_while_v0_1] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/peeking_take_while/v0_1/crate" -package = "peeking_take_while" +[patch.crates-io.autocxx-engine_v0_22] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/autocxx_engine/v0_22/crate" +package = "autocxx-engine" -[patch.crates-io.serde_json_lenient_v0_1] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/serde_json_lenient/v0_1/crate" -package = "serde_json_lenient" +[patch.crates-io.autocxx-gen_v0_22] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/autocxx_gen/v0_22/crate" +package = "autocxx-gen" + +[patch.crates-io.autocxx-macro_v0_22] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/autocxx_macro/v0_22/crate" +package = "autocxx-macro" + +[patch.crates-io.autocxx-parser_v0_22] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/autocxx_parser/v0_22/crate" +package = "autocxx-parser" + +[patch.crates-io.autocxx_v0_22] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/autocxx/v0_22/crate" +package = "autocxx" + +[patch.crates-io.backtrace_v0_3] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/backtrace/v0_3/crate" +package = "backtrace" + +[patch.crates-io.bindgen_v0_59] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/bindgen/v0_59/crate" +package = "bindgen" + +[patch.crates-io.bitflags_v1] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/bitflags/v1/crate" +package = "bitflags" + +[patch.crates-io.camino_v1] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/camino/v1/crate" +package = "camino" + +[patch.crates-io.cargo-platform_v0_1] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/cargo_platform/v0_1/crate" +package = "cargo-platform" + +[patch.crates-io.cargo_metadata_v0_14] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/cargo_metadata/v0_14/crate" +package = "cargo_metadata" + +[patch.crates-io.cexpr_v0_6] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/cexpr/v0_6/crate" +package = "cexpr" [patch.crates-io.cfg-if_v1] path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/cfg_if/v1/crate" package = "cfg-if" +[patch.crates-io.clang-sys_v1] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/clang_sys/v1/crate" +package = "clang-sys" + +[patch.crates-io.clap_lex_v0_1] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/clap_lex/v0_1/crate" +package = "clap_lex" + +[patch.crates-io.clap_v2] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/clap/v2/crate" +package = "clap" + +[patch.crates-io.clap_v3] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/clap/v3/crate" +package = "clap" + +[patch.crates-io.codespan-reporting_v0_11] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/codespan_reporting/v0_11/crate" +package = "codespan-reporting" + +[patch.crates-io.cxx-gen_v0_7] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/cxx_gen/v0_7/crate" +package = "cxx-gen" + +[patch.crates-io.cxx_v1] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/cxx/v1/crate" +package = "cxx" + +[patch.crates-io.cxxbridge-cmd_v1] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/cxxbridge_cmd/v1/crate" +package = "cxxbridge-cmd" + +[patch.crates-io.cxxbridge-macro_v1] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/cxxbridge_macro/v1/crate" +package = "cxxbridge-macro" + [patch.crates-io.either_v1] path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/either/v1/crate" package = "either" -[patch.crates-io.shlex_v1] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/shlex/v1/crate" -package = "shlex" +[patch.crates-io.env_logger_v0_9] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/env_logger/v0_9/crate" +package = "env_logger" -[patch.crates-io.remove_dir_all_v0_5] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/remove_dir_all/v0_5/crate" -package = "remove_dir_all" +[patch.crates-io.fastrand_v1] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/fastrand/v1/crate" +package = "fastrand" -[patch.crates-io.smawk_v0_3] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/smawk/v0_3/crate" -package = "smawk" +[patch.crates-io.gimli_v0_26] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/gimli/v0_26/crate" +package = "gimli" + +[patch.crates-io.glob_v0_3] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/glob/v0_3/crate" +package = "glob" + +[patch.crates-io.hashbrown_v0_11] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/hashbrown/v0_11/crate" +package = "hashbrown" + +[patch.crates-io.heck_v0_4] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/heck/v0_4/crate" +package = "heck" + +[patch.crates-io.humantime_v2] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/humantime/v2/crate" +package = "humantime" + +[patch.crates-io.indexmap_v1] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/indexmap/v1/crate" +package = "indexmap" + +[patch.crates-io.indoc_v1] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/indoc/v1/crate" +package = "indoc" + +[patch.crates-io.is_ci_v1] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/is_ci/v1/crate" +package = "is_ci" + +[patch.crates-io.itertools_v0_10] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/itertools/v0_10/crate" +package = "itertools" + +[patch.crates-io.itertools_v0_9] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/itertools/v0_9/crate" +package = "itertools" + +[patch.crates-io.itoa_v0_4] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/itoa/v0_4/crate" +package = "itoa" + +[patch.crates-io.itoa_v1] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/itoa/v1/crate" +package = "itoa" + +[patch.crates-io.lazy_static_v1] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/lazy_static/v1/crate" +package = "lazy_static" + +[patch.crates-io.lazycell_v1] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/lazycell/v1/crate" +package = "lazycell" + +[patch.crates-io.libc_v0_2] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/libc/v0_2/crate" +package = "libc" + +[patch.crates-io.libloading_v0_7] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/libloading/v0_7/crate" +package = "libloading" + +[patch.crates-io.link-cplusplus_v1] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/link_cplusplus/v1/crate" +package = "link-cplusplus" + +[patch.crates-io.log_v0_4] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/log/v0_4/crate" +package = "log" + +[patch.crates-io.memchr_v2] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/memchr/v2/crate" +package = "memchr" [patch.crates-io.miette-derive_v4] path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/miette_derive/v4/crate" package = "miette-derive" +[patch.crates-io.miette_v4] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/miette/v4/crate" +package = "miette" + +[patch.crates-io.minimal-lexical_v0_2] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/minimal_lexical/v0_2/crate" +package = "minimal-lexical" + +[patch.crates-io.miniz_oxide_v0_4] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/miniz_oxide/v0_4/crate" +package = "miniz_oxide" + +[patch.crates-io.moveit_v0_5] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/moveit/v0_5/crate" +package = "moveit" + +[patch.crates-io.nom_v7] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/nom/v7/crate" +package = "nom" + +[patch.crates-io.object_v0_27] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/object/v0_27/crate" +package = "object" + +[patch.crates-io.once_cell_v1] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/once_cell/v1/crate" +package = "once_cell" + +[patch.crates-io.os_str_bytes_v6] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/os_str_bytes/v6/crate" +package = "os_str_bytes" + +[patch.crates-io.owo-colors_v3] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/owo_colors/v3/crate" +package = "owo-colors" + +[patch.crates-io.pathdiff_v0_2] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/pathdiff/v0_2/crate" +package = "pathdiff" + +[patch.crates-io.peeking_take_while_v0_1] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/peeking_take_while/v0_1/crate" +package = "peeking_take_while" + +[patch.crates-io.proc-macro-error-attr_v1] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/proc_macro_error_attr/v1/crate" +package = "proc-macro-error-attr" + +[patch.crates-io.proc-macro-error_v1] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/proc_macro_error/v1/crate" +package = "proc-macro-error" + +[patch.crates-io.proc-macro2_v1] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/proc_macro2/v1/crate" +package = "proc-macro2" + +[patch.crates-io.quote_v1] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/quote/v1/crate" +package = "quote" + +[patch.crates-io.regex-syntax_v0_6] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/regex_syntax/v0_6/crate" +package = "regex-syntax" + +[patch.crates-io.regex_v1] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/regex/v1/crate" +package = "regex" + +[patch.crates-io.remove_dir_all_v0_5] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/remove_dir_all/v0_5/crate" +package = "remove_dir_all" + +[patch.crates-io.rstest_v0_12] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/rstest/v0_12/crate" +package = "rstest" + +[patch.crates-io.rustc-demangle_v0_1] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/rustc_demangle/v0_1/crate" +package = "rustc-demangle" + +[patch.crates-io.rustc-hash_v1] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/rustc_hash/v1/crate" +package = "rustc-hash" + +[patch.crates-io.rustc_version_v0_4] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/rustc_version/v0_4/crate" +package = "rustc_version" + +[patch.crates-io.rustversion_v1] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/rustversion/v1/crate" +package = "rustversion" + +[patch.crates-io.ryu_v1] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/ryu/v1/crate" +package = "ryu" + +[patch.crates-io.semver_v1] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/semver/v1/crate" +package = "semver" + +[patch.crates-io.serde_derive_v1] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/serde_derive/v1/crate" +package = "serde_derive" + +[patch.crates-io.serde_json_lenient_v0_1] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/serde_json_lenient/v0_1/crate" +package = "serde_json_lenient" + +[patch.crates-io.serde_json_v1] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/serde_json/v1/crate" +package = "serde_json" + +[patch.crates-io.serde_v1] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/serde/v1/crate" +package = "serde" + +[patch.crates-io.shlex_v1] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/shlex/v1/crate" +package = "shlex" + +[patch.crates-io.small_ctor_v0_1] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/small_ctor/v0_1/crate" +package = "small_ctor" + +[patch.crates-io.smawk_v0_3] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/smawk/v0_3/crate" +package = "smawk" + +[patch.crates-io.strsim_v0_10] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/strsim/v0_10/crate" +package = "strsim" + +[patch.crates-io.strsim_v0_8] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/strsim/v0_8/crate" +package = "strsim" + +[patch.crates-io.strum_macros_v0_24] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/strum_macros/v0_24/crate" +package = "strum_macros" + [patch.crates-io.supports-color_v1] path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/supports_color/v1/crate" package = "supports-color" +[patch.crates-io.supports-hyperlinks_v1] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/supports_hyperlinks/v1/crate" +package = "supports-hyperlinks" + [patch.crates-io.supports-unicode_v1] path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/supports_unicode/v1/crate" package = "supports-unicode" @@ -345,146 +424,70 @@ path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/syn/v1/crate" package = "syn" -[patch.crates-io.cargo_metadata_v0_14] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/cargo_metadata/v0_14/crate" -package = "cargo_metadata" +[patch.crates-io.tempfile_v3] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/tempfile/v3/crate" +package = "tempfile" -[patch.crates-io.thiserror_v1] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/thiserror/v1/crate" -package = "thiserror" +[patch.crates-io.termcolor_v1] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/termcolor/v1/crate" +package = "termcolor" -[patch.crates-io.libc_v0_2] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/libc/v0_2/crate" -package = "libc" - -[patch.crates-io.thiserror-impl_v1] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/thiserror_impl/v1/crate" -package = "thiserror-impl" - -[patch.crates-io.strsim_v0_10] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/strsim/v0_10/crate" -package = "strsim" - -[patch.crates-io.codespan-reporting_v0_11] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/codespan_reporting/v0_11/crate" -package = "codespan-reporting" - -[patch.crates-io.autocxx-bindgen_v0_59] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/autocxx_bindgen/v0_59/crate" -package = "autocxx-bindgen" - -[patch.crates-io.itertools_v0_9] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/itertools/v0_9/crate" -package = "itertools" - -[patch.crates-io.regex-syntax_v0_6] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/regex_syntax/v0_6/crate" -package = "regex-syntax" - -[patch.crates-io.strum_macros_v0_24] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/strum_macros/v0_24/crate" -package = "strum_macros" - -[patch.crates-io.textwrap_v0_15] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/textwrap/v0_15/crate" -package = "textwrap" - -[patch.crates-io.unicode-width_v0_1] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/unicode_width/v0_1/crate" -package = "unicode-width" - -[patch.crates-io.which_v4] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/which/v4/crate" -package = "which" - -[patch.crates-io.log_v0_4] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/log/v0_4/crate" -package = "log" - -[patch.crates-io.env_logger_v0_9] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/env_logger/v0_9/crate" -package = "env_logger" - -[patch.crates-io.itoa_v0_4] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/itoa/v0_4/crate" -package = "itoa" - -[patch.crates-io.os_str_bytes_v6] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/os_str_bytes/v6/crate" -package = "os_str_bytes" - -[patch.crates-io.pathdiff_v0_2] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/pathdiff/v0_2/crate" -package = "pathdiff" - -[patch.crates-io.bindgen_v0_59] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/bindgen/v0_59/crate" -package = "bindgen" - -[patch.crates-io.unicode-xid_v0_2] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/unicode_xid/v0_2/crate" -package = "unicode-xid" +[patch.crates-io.terminal_size_v0_1] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/terminal_size/v0_1/crate" +package = "terminal_size" [patch.crates-io.textwrap_v0_11] path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/textwrap/v0_11/crate" package = "textwrap" -[patch.crates-io.cexpr_v0_6] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/cexpr/v0_6/crate" -package = "cexpr" +[patch.crates-io.textwrap_v0_15] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/textwrap/v0_15/crate" +package = "textwrap" -[patch.crates-io.moveit_v0_5] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/moveit/v0_5/crate" -package = "moveit" +[patch.crates-io.thiserror-impl_v1] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/thiserror_impl/v1/crate" +package = "thiserror-impl" -[patch.crates-io.clang-sys_v1] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/clang_sys/v1/crate" -package = "clang-sys" +[patch.crates-io.thiserror_v1] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/thiserror/v1/crate" +package = "thiserror" -[patch.crates-io.lazy_static_v1] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/lazy_static/v1/crate" -package = "lazy_static" +[patch.crates-io.toml_v0_5] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/toml/v0_5/crate" +package = "toml" -[patch.crates-io.supports-hyperlinks_v1] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/supports_hyperlinks/v1/crate" -package = "supports-hyperlinks" +[patch.crates-io.unicode-linebreak_v0_1] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/unicode_linebreak/v0_1/crate" +package = "unicode-linebreak" -[patch.crates-io.addr2line_v0_17] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/addr2line/v0_17/crate" -package = "addr2line" +[patch.crates-io.unicode-width_v0_1] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/unicode_width/v0_1/crate" +package = "unicode-width" + +[patch.crates-io.unicode-xid_v0_2] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/unicode_xid/v0_2/crate" +package = "unicode-xid" + +[patch.crates-io.unindent_v0_1] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/unindent/v0_1/crate" +package = "unindent" + +[patch.crates-io.vec_map_v0_8] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/vec_map/v0_8/crate" +package = "vec_map" [patch.crates-io.version_check_v0_9] path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/version_check/v0_9/crate" package = "version_check" -[patch.crates-io.miette_v4] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/miette/v4/crate" -package = "miette" +[patch.crates-io.which_v4] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/which/v4/crate" +package = "which" -[patch.crates-io.proc-macro-error_v1] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/proc_macro_error/v1/crate" -package = "proc-macro-error" +[patch.crates-io.winapi-util_v0_1] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/winapi_util/v0_1/crate" +package = "winapi-util" -[patch.crates-io.itertools_v0_10] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/itertools/v0_10/crate" -package = "itertools" - -[patch.crates-io.camino_v1] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/camino/v1/crate" -package = "camino" - -[patch.crates-io.is_ci_v1] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/is_ci/v1/crate" -package = "is_ci" - -[patch.crates-io.cxxbridge-cmd_v1] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/cxxbridge_cmd/v1/crate" -package = "cxxbridge-cmd" - -[patch.crates-io.backtrace_v0_3] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/backtrace/v0_3/crate" -package = "backtrace" - -[patch.crates-io.serde_derive_v1] -path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/serde_derive/v1/crate" -package = "serde_derive" +[patch.crates-io.winapi_v0_3] +path = "/usr/local/google/home/collinbaker/chromium/src/third_party/rust/winapi/v0_3/crate" +package = "winapi"
diff --git a/third_party/rust/third_party.toml b/third_party/rust/third_party.toml index 078ac11..364e20f 100644 --- a/third_party/rust/third_party.toml +++ b/third_party/rust/third_party.toml
@@ -91,4 +91,4 @@ clap = "3" once_cell = "1" tempfile = "3" -toml = "0.5" +toml = {version = "0.5", features = ["preserve_order"]}
diff --git a/third_party/rust/toml/v0_5/BUILD.gn b/third_party/rust/toml/v0_5/BUILD.gn index 6ad8d11f..5863b97 100644 --- a/third_party/rust/toml/v0_5/BUILD.gn +++ b/third_party/rust/toml/v0_5/BUILD.gn
@@ -17,5 +17,12 @@ cargo_pkg_authors = "Alex Crichton <alex@alexcrichton.com>" cargo_pkg_name = "toml" cargo_pkg_description = "A native Rust encoder and decoder of TOML-formatted files and streams. Providesimplementations of the standard Serialize/Deserialize traits for TOML data tofacilitate deserializing and serializing Rust structures." - deps = [ "//third_party/rust/serde/v1:lib" ] + deps = [ + "//third_party/rust/indexmap/v1:lib", + "//third_party/rust/serde/v1:lib", + ] + features = [ + "indexmap", + "preserve_order", + ] }
diff --git a/tools/crates/gnrt/manifest.rs b/tools/crates/gnrt/manifest.rs index 1efd9b5..2cef9fbb 100644 --- a/tools/crates/gnrt/manifest.rs +++ b/tools/crates/gnrt/manifest.rs
@@ -4,16 +4,18 @@ //! Utilities for parsing and generating Cargo.toml and related manifest files. -use std::collections::HashMap; +use std::collections::BTreeMap; use std::path::PathBuf; use serde::{Deserialize, Serialize}; /// Set of dependencies for a particular usage: final artifacts, tests, or /// build scripts. -pub type DependencySet = HashMap<String, Dependency>; - -pub type CargoPatchSet = HashMap<String, CargoPatch>; +pub type DependencySet = BTreeMap<String, Dependency>; +/// Set of patches to replace upstream dependencies with local crates. Maps +/// arbitrary patch names to `CargoPatch` which includes the actual package name +/// and the local path. +pub type CargoPatchSet = BTreeMap<String, CargoPatch>; /// A crate version in a dependency specification. #[derive(Clone, Debug, Deserialize, Eq, PartialEq, Serialize)] @@ -105,7 +107,7 @@ #[serde(flatten)] pub dependency_spec: DependencySpec, #[serde(default, rename = "patch")] - pub patches: HashMap<String, CargoPatchSet>, + pub patches: BTreeMap<String, CargoPatchSet>, } #[derive(Clone, Debug, Deserialize, Serialize)] @@ -171,7 +173,7 @@ } } - let mut patch_sections: HashMap<String, CargoPatch> = HashMap::new(); + let mut patch_sections = CargoPatchSet::new(); // Generate patch section. for PatchSpecification { package_name, patch_name, path } in patches { patch_sections.insert(
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml index ca31025..8bd314f 100644 --- a/tools/metrics/histograms/enums.xml +++ b/tools/metrics/histograms/enums.xml
@@ -57328,6 +57328,8 @@ <int value="-665514294" label="FontAccess:disabled"/> <int value="-665006585" label="Bento:enabled"/> <int value="-663476391" label="enable-pixel-canvas-recording:enabled"/> + <int value="-662971693" + label="IdentityInCanMakePaymentEventFeature:disabled"/> <int value="-662720891" label="PreviewsCoinFlipHoldback_UKMOnly:enabled"/> <int value="-662314979" label="AutofillEnableSaveCardInfoBarAccountIndicationFooter:disabled"/> @@ -58254,6 +58256,7 @@ <int value="-41254374" label="WebRtcMetronomeTaskQueue:enabled"/> <int value="-40935502" label="ContextualSuggestionsSlimPeekUI:enabled"/> <int value="-37966026" label="PermissionPredictions:enabled"/> + <int value="-37110489" label="IdentityInCanMakePaymentEventFeature:enabled"/> <int value="-36503306" label="HomepageLocationPolicy:enabled"/> <int value="-36234530" label="PluginVmShowMicrophonePermissions:enabled"/> <int value="-36077995" label="SplitCacheByNetworkIsolationKey:disabled"/> @@ -91025,6 +91028,12 @@ <int value="2" label="Valid response received from the server."/> </enum> +<enum name="SuggestTileType"> + <int value="0" label="Other"/> + <int value="1" label="URL"/> + <int value="2" label="Search"/> +</enum> + <enum name="SupervisedUserExtension"> <obsolete> Renamed to SupervisedUserExtension2.
diff --git a/tools/metrics/histograms/metadata/content_creation/histograms.xml b/tools/metrics/histograms/metadata/content_creation/histograms.xml index 9951910..bfc2e2d 100644 --- a/tools/metrics/histograms/metadata/content_creation/histograms.xml +++ b/tools/metrics/histograms/metadata/content_creation/histograms.xml
@@ -334,6 +334,7 @@ <histogram name="SharedHighlights.AndroidShareSheet.SharedState" enum="LinkGenerationSharedStatus" expires_after="2022-12-11"> <owner>sebsg@chromium.org</owner> + <owner>jeffreycohen@chromium.org</owner> <owner>chrome-shared-highlighting@google.com</owner> <summary> Records the status of the link generation when a user shares content using @@ -343,7 +344,7 @@ <histogram name="SharedHighlights.AsyncTask.Iterations" units="iterations" expires_after="2022-10-30"> - <owner>gayane@chromium.org</owner> + <owner>jeffreycohen@chromium.org</owner> <owner>chrome-shared-highlighting@google.com</owner> <summary> Indicates number of iterations it took for AsyncFindBuffer to finish the @@ -354,7 +355,7 @@ <histogram name="SharedHighlights.AsyncTask.SearchDuration" units="ms" expires_after="2022-11-20"> - <owner>gayane@chromium.org</owner> + <owner>jeffreycohen@chromium.org</owner> <owner>chrome-shared-highlighting@google.com</owner> <summary> Time it took in milliseconds for AsyncFindBuffer to finish the search. @@ -366,6 +367,7 @@ <histogram name="SharedHighlights.Desktop.CopiedLinkType" enum="LinkGenerationCopiedLinkType" expires_after="2022-12-11"> <owner>sebsg@chromium.org</owner> + <owner>jeffreycohen@chromium.org</owner> <owner>chrome-shared-highlighting@google.com</owner> <summary> Records the type of shared highlighting link the user copied on desktop. @@ -374,7 +376,7 @@ <histogram name="SharedHighlights.LinkGenerated.Error" enum="LinkGenerationError" expires_after="2022-12-11"> - <owner>gayane@chromium.org</owner> + <owner>jeffreycohen@chromium.org</owner> <owner>chrome-shared-highlighting@google.com</owner> <summary> Records errors that caused text fragment selector generation to fail. @@ -385,7 +387,7 @@ <histogram name="SharedHighlights.LinkGenerated.Error.Iterations" units="iterations" expires_after="2022-11-13"> - <owner>gayane@chromium.org</owner> + <owner>jeffreycohen@chromium.org</owner> <owner>chrome-shared-highlighting@google.com</owner> <summary> Indicates number of iterations it took for the unsuccessful text fragment @@ -395,7 +397,7 @@ <histogram name="SharedHighlights.LinkGenerated.Error.Requested" enum="LinkGenerationError" expires_after="2022-12-18"> - <owner>gayane@chromium.org</owner> + <owner>jeffreycohen@chromium.org</owner> <owner>chrome-shared-highlighting@google.com</owner> <summary> Records errors that caused text fragment selector generation to fail. @@ -405,7 +407,7 @@ <histogram name="SharedHighlights.LinkGenerated.Error.TimeToGenerate" units="ms" expires_after="2022-12-18"> - <owner>gayane@chromium.org</owner> + <owner>jeffreycohen@chromium.org</owner> <owner>chrome-shared-highlighting@google.com</owner> <summary> Time it took in millisecons for a failed text fragment selector generation @@ -415,7 +417,7 @@ <histogram name="SharedHighlights.LinkGenerated.Iterations" units="iterations" expires_after="2022-10-23"> - <owner>gayane@chromium.org</owner> + <owner>jeffreycohen@chromium.org</owner> <owner>chrome-shared-highlighting@google.com</owner> <summary> Indicates number of iterations it took to successfully generate text @@ -425,7 +427,7 @@ <histogram name="SharedHighlights.LinkGenerated.ParamLength" units="characters" expires_after="2022-12-18"> - <owner>gayane@chromium.org</owner> + <owner>jeffreycohen@chromium.org</owner> <owner>chrome-shared-highlighting@google.com</owner> <summary> Number of charaters in successfully generated text fragment selector. For @@ -437,7 +439,7 @@ <histogram name="SharedHighlights.LinkGenerated.SelectionLength" units="characters" expires_after="2022-08-24"> - <owner>gayane@chromium.org</owner> + <owner>jeffreycohen@chromium.org</owner> <owner>chrome-shared-highlighting@google.com</owner> <summary> Number of characters in the user selected text, that text fragment selector @@ -447,7 +449,7 @@ <histogram name="SharedHighlights.LinkGenerated.SelectorParameters" enum="TextFragmentAnchorParameters" expires_after="2022-06-19"> - <owner>gayane@chromium.org</owner> + <owner>jeffreycohen@chromium.org</owner> <owner>chrome-shared-highlighting@google.com</owner> <summary> Indicates which parameters were specified in a text fragment selector. @@ -457,7 +459,7 @@ <histogram name="SharedHighlights.LinkGenerated.StateAtRequest" enum="LinkGenerationState" expires_after="2022-12-18"> - <owner>gayane@chromium.org</owner> + <owner>jeffreycohen@chromium.org</owner> <owner>chrome-shared-highlighting@google.com</owner> <summary> Records the state of the link generation when link to text request is @@ -467,7 +469,7 @@ <histogram name="SharedHighlights.LinkGenerated.TimeToGenerate" units="ms" expires_after="2022-12-11"> - <owner>gayane@chromium.org</owner> + <owner>jeffreycohen@chromium.org</owner> <owner>chrome-shared-highlighting@google.com</owner> <summary> How long it took in milliseconds to successfully generate text fragment @@ -477,7 +479,7 @@ <histogram name="SharedHighlights.LinkGenerated{Requested}" enum="BooleanSuccess" expires_after="2022-08-10"> - <owner>gayane@chromium.org</owner> + <owner>jeffreycohen@chromium.org</owner> <owner>chrome-shared-highlighting@google.com</owner> <summary> Indicates whether text fragment selector generation was successful for @@ -496,7 +498,7 @@ <histogram name="SharedHighlights.LinkToTextDiagnoseStatus" enum="LinkToTextDiagnoseStatus" expires_after="2022-10-23"> - <owner>gayane@chromium.org</owner> + <owner>jeffreycohen@chromium.org</owner> <owner>chrome-shared-highlighting@google.com</owner> <summary> Records the status of link to text flow on Android for diagnostic purposes. @@ -506,7 +508,7 @@ <histogram name="SharedHighlights.ObtainReshareLink.Status" enum="LinkToTextReshareStatus" expires_after="2022-10-09"> - <owner>gayane@chromium.org</owner> + <owner>jeffreycohen@chromium.org</owner> <owner>chrome-shared-highlighting@google.com</owner> <summary> Records if obtaining reshare link was successful. Otherwise, it records the @@ -530,7 +532,7 @@ <histogram name="TextFragmentAnchor.LinkOpenSource" enum="TextFragmentLinkOpenSource" expires_after="2023-06-30"> - <owner>gayane@chromium.org</owner> + <owner>jeffreycohen@chromium.org</owner> <owner>chrome-shared-highlighting@google.com</owner> <summary> Recorded for every navigation to a link with a valid text fragment selector
diff --git a/tools/metrics/histograms/metadata/google/histograms.xml b/tools/metrics/histograms/metadata/google/histograms.xml index 3b9b7e8..a10e4e9a 100644 --- a/tools/metrics/histograms/metadata/google/histograms.xml +++ b/tools/metrics/histograms/metadata/google/histograms.xml
@@ -23,9 +23,9 @@ <histograms> <histogram name="GoogleUpdate.ErrorHresult" enum="Hresult" - expires_after="2022-06-26"> - <owner>grt@chromium.org</owner> - <owner>ydago@chromium.org</owner> + expires_after="2023-06-26"> + <owner>sorin@chromium.org</owner> + <owner>waffles@chromium.org</owner> <summary>The HRESULT for a failed on-demand update check.</summary> </histogram> @@ -120,16 +120,16 @@ </histogram> <histogram name="GoogleUpdate.UpdateErrorCode" enum="GoogleUpdateErrorCode" - expires_after="2022-07-11"> - <owner>grt@chromium.org</owner> - <owner>ydago@chromium.org</owner> + expires_after="2023-06-26"> + <owner>sorin@chromium.org</owner> + <owner>waffles@chromium.org</owner> <summary>The error code for a failed on-demand update check.</summary> </histogram> <histogram name="GoogleUpdate.UpgradeResult" enum="GoogleUpdateUpgradeStatus" - expires_after="2022-06-26"> - <owner>grt@chromium.org</owner> - <owner>ydago@chromium.org</owner> + expires_after="2023-06-26"> + <owner>sorin@chromium.org</owner> + <owner>waffles@chromium.org</owner> <summary>The result of an on-demand update check.</summary> </histogram>
diff --git a/tools/metrics/histograms/metadata/omnibox/histograms.xml b/tools/metrics/histograms/metadata/omnibox/histograms.xml index 90db48b..ca3c578b 100644 --- a/tools/metrics/histograms/metadata/omnibox/histograms.xml +++ b/tools/metrics/histograms/metadata/omnibox/histograms.xml
@@ -1825,6 +1825,80 @@ </summary> </histogram> +<histogram name="Omnibox.SuggestTiles.DeletedTilePosition" units="position" + expires_after="2023-06-01"> + <owner>ender@google.com</owner> + <owner>mahmadi@chromium.org</owner> + <summary> + The index of the item in the MostVisited carousel that the user deleted. + Zero-based: the first item in the carousel is recorded in bucket 0, second + in bucket 1 and so on. Items beyond 16 will be stored in the overflow bucket + (15). + + Recorded every time the user initiates deletion of a suggest tile, even if + the operation is later canceled. + </summary> +</histogram> + +<histogram name="Omnibox.SuggestTiles.DeletedTileType" enum="SuggestTileType" + expires_after="2023-06-01"> + <owner>ender@google.com</owner> + <owner>mahmadi@chromium.org</owner> + <summary> + Records the type of the SuggestTile that the user deleted. Most Visited URLs + record a URL, and Organic Repeatable Queries record a Search type. + + Recorded every time the user initiates deletion of a suggest tile, that + results with tile removal. Not recorded if the user chooses to cancel the + action. + </summary> +</histogram> + +<histogram name="Omnibox.SuggestTiles.SelectedTilePosition" units="position" + expires_after="2023-06-01"> + <owner>ender@google.com</owner> + <owner>mahmadi@chromium.org</owner> + <summary> + The index of the item in the MostVisited carousel that the user opened. + Zero-based: the first item in the carousel is recorded in bucket 0, second + in bucket 1 and so on. Items beyond 16 will be stored in the overflow bucket + (15). + + Recorded every time the user selects the tile to initiate navigation, even + if the navigation could not be completed (eg. target site did not load). + </summary> +</histogram> + +<histogram name="Omnibox.SuggestTiles.SelectedTileType" enum="SuggestTileType" + expires_after="2023-06-01"> + <owner>ender@google.com</owner> + <owner>mahmadi@chromium.org</owner> + <summary> + Records the type of the SuggestTile that the user interacted with. Most + Visited URLs record a URL, and Organic Repeatable Queries record a Search + type. + + Recorded every time the user selects the tile to initiate navigation, even + if the navigation could not be completed (eg. target site did not load). + </summary> +</histogram> + +<histogram name="Omnibox.SuggestTiles.TileTypeCount.{SuggestTileType}" + units="count" expires_after="2023-06-01"> + <owner>ender@google.com</owner> + <owner>mahmadi@chromium.org</owner> + <summary> + Total count of offered {SuggestTileType} tile types. + + Recorded every time the current context is eligible to receive + MostVisitedTiles, even if there were no tiles of any kind to show. + </summary> + <token key="SuggestTileType"> + <variant name="Search"/> + <variant name="URL"/> + </token> +</histogram> + <histogram name="Omnibox.TabMatchTime" units="microseconds" expires_after="2022-10-23"> <owner>gangwu@chromium.org</owner>
diff --git a/tools/metrics/histograms/metadata/page/histograms.xml b/tools/metrics/histograms/metadata/page/histograms.xml index b87f4ad4..f7729e4 100644 --- a/tools/metrics/histograms/metadata/page/histograms.xml +++ b/tools/metrics/histograms/metadata/page/histograms.xml
@@ -402,7 +402,7 @@ </histogram> <histogram - name="PageLoad.Clients.AMP.InteractiveTiming.NumInteractions.SubFrame" + name="PageLoad.Clients.AMP.InteractiveTiming.NumInteractions.Subframe" units="Count" expires_after="2023-03-24"> <owner>sullivan@chromium.org</owner> <owner>speed-metrics-dev@chromium.org</owner> @@ -414,7 +414,7 @@ </histogram> <histogram - name="PageLoad.Clients.AMP.InteractiveTiming.{NormalizedResponsivenessMetric}.{UserInteractionLatency}.SubFrame{FullNavigation}" + name="PageLoad.Clients.AMP.InteractiveTiming.{NormalizedResponsivenessMetric}.{UserInteractionLatency}.Subframe{FullNavigation}" units="ms" expires_after="2023-03-23"> <owner>iclelland@chromium.org</owner> <owner>speed-metrics-dev@chromium.org</owner>
diff --git a/tools/metrics/ukm/ukm.xml b/tools/metrics/ukm/ukm.xml index 6286d1a..a8a802e 100644 --- a/tools/metrics/ukm/ukm.xml +++ b/tools/metrics/ukm/ukm.xml
@@ -18314,7 +18314,7 @@ </event> <event name="SharedHighlights.LinkGenerated"> - <owner>seblalancette@chromium.org</owner> + <owner>jeffreycohen@chromium.org</owner> <owner>chrome-creation@google.com</owner> <summary> Event representing the user action of selecting a piece of text on a page @@ -18336,7 +18336,7 @@ </event> <event name="SharedHighlights.LinkGenerated.Requested"> - <owner>gayane@chromium.org</owner> + <owner>jeffreycohen@chromium.org</owner> <owner>chrome-creation@google.com</owner> <summary> Event representing the user action of selecting a piece of text on a page @@ -18358,7 +18358,7 @@ </event> <event name="SharedHighlights.LinkOpened" singular="true"> - <owner>seblalancette@chromium.org</owner> + <owner>jeffreycohen@chromium.org</owner> <owner>chrome-creation@google.com</owner> <summary> Event representing the browser action of highlighting (incl. scroll-to) text
diff --git a/tools/perf/contrib/privacy_budget_perf/OWNERS b/tools/perf/contrib/privacy_budget_perf/OWNERS deleted file mode 100644 index 7d88b7bb..0000000 --- a/tools/perf/contrib/privacy_budget_perf/OWNERS +++ /dev/null
@@ -1 +0,0 @@ -caraitto@chromium.org
diff --git a/tools/perf/contrib/privacy_budget_perf/__init__.py b/tools/perf/contrib/privacy_budget_perf/__init__.py deleted file mode 100644 index e69de29..0000000 --- a/tools/perf/contrib/privacy_budget_perf/__init__.py +++ /dev/null
diff --git a/tools/perf/contrib/privacy_budget_perf/privacy_budget_perf.py b/tools/perf/contrib/privacy_budget_perf/privacy_budget_perf.py deleted file mode 100644 index 0a405b18..0000000 --- a/tools/perf/contrib/privacy_budget_perf/privacy_budget_perf.py +++ /dev/null
@@ -1,18 +0,0 @@ -# Copyright 2020 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. -from benchmarks import blink_perf -from telemetry import benchmark - - -# pylint: disable=protected-access -@benchmark.Info( - emails=['caraitto@chromium.org', 'asanka@chromium.org'], - documentation_url='https://bit.ly/blink-perf-benchmarks') -class PrivacyBudgetPerf(blink_perf._BlinkPerfBenchmark): - SUBDIR = 'privacy_budget' - TAGS = blink_perf._BlinkPerfBenchmark.TAGS + ['all'] - - @classmethod - def Name(cls): - return 'blink_perf.privacy_budget'
diff --git a/tools/perf/core/perfetto_binary_roller/binary_deps.json b/tools/perf/core/perfetto_binary_roller/binary_deps.json index e9e6d06..b303920f 100644 --- a/tools/perf/core/perfetto_binary_roller/binary_deps.json +++ b/tools/perf/core/perfetto_binary_roller/binary_deps.json
@@ -5,24 +5,24 @@ "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/linux_arm64/49b4b5dcbc312d8d2c3751cf29238b8efeb4e494/trace_processor_shell" }, "win": { - "hash": "c7eea54f488c5df4f905beec98965e6427726d2b", - "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/win/8cafb589b7e414c21a0ef2647fd30c1d1a3a0572/trace_processor_shell.exe" + "hash": "35260c027b108d32894696c0bec1a676f326049f", + "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/win/d3300e34ed8ad844a4f18a9067cac38b0d950dbc/trace_processor_shell.exe" }, "linux_arm": { "hash": "58893933be305d3bfe0a72ebebcacde2ac3ca893", "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/linux_arm/49b4b5dcbc312d8d2c3751cf29238b8efeb4e494/trace_processor_shell" }, "mac": { - "hash": "6a29803a2c5e4602d40d2fdb508c22fdf451219b", - "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/mac/e203cbf28e303aa502f63f046d70fdbf894d4a13/trace_processor_shell" + "hash": "01cb94f5b8bbe4fb86dc4f6b2fe40506a3ba0943", + "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/mac/d3300e34ed8ad844a4f18a9067cac38b0d950dbc/trace_processor_shell" }, "mac_arm64": { "hash": "e1ad4861384b06d911a65f035317914b8cc975c6", "full_remote_path": "perfetto-luci-artifacts/v25.0/mac-arm64/trace_processor_shell" }, "linux": { - "hash": "2723a44176ec3acd25b62574390a8b722ab0c2b4", - "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/linux/8cafb589b7e414c21a0ef2647fd30c1d1a3a0572/trace_processor_shell" + "hash": "a19aa044a96d25ded789bdcd0e7cdf467d2acd0c", + "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/linux/9a4022db03b5b81c164e54183dd4e9ccd6b043e9/trace_processor_shell" } }, "power_profile.sql": {
diff --git a/ui/base/ime/linux/input_method_auralinux.cc b/ui/base/ime/linux/input_method_auralinux.cc index 4b64c49..c48d709f 100644 --- a/ui/base/ime/linux/input_method_auralinux.cc +++ b/ui/base/ime/linux/input_method_auralinux.cc
@@ -474,6 +474,13 @@ if (!text_input_client) return; text_input_client->SetCompositionFromExistingText(range, spans); + + std::u16string text; + if (text_input_client->GetTextFromRange(range, &text)) { + composition_changed_ |= composition_.text != text; + composition_.text = text; + } + last_commit_result_.reset(); } // Overridden from InputMethodBase.
diff --git a/ui/base/ime/linux/input_method_auralinux_unittest.cc b/ui/base/ime/linux/input_method_auralinux_unittest.cc index f26c8eb..20ba206 100644 --- a/ui/base/ime/linux/input_method_auralinux_unittest.cc +++ b/ui/base/ime/linux/input_method_auralinux_unittest.cc
@@ -977,6 +977,62 @@ test_result_->Verify(); } +TEST_F(InputMethodAuraLinuxTest, SetPreeditRegionSingleCharTest) { + std::unique_ptr<TextInputClientForTesting> client( + new TextInputClientForTesting(TEXT_INPUT_TYPE_TEXT)); + input_method_auralinux_->SetFocusedTextInputClient(client.get()); + input_method_auralinux_->OnTextInputTypeChanged(client.get()); + + client->surrounding_text = u"a"; + client->text_range = gfx::Range(0, 1); + client->selection_range = gfx::Range(1, 1); + + input_method_auralinux_->OnCaretBoundsChanged(client.get()); + input_method_auralinux_->OnSetPreeditRegion(client->text_range, + std::vector<ImeTextSpan>()); + + test_result_->ExpectAction("surroundingtext:a"); + test_result_->ExpectAction("selectionrangestart:1"); + test_result_->ExpectAction("selectionrangeend:1"); + + input_method_auralinux_->OnCommit(u"a"); + + // Verifies single char commit under composition mode will call InsertText + // instead of InsertChar. + test_result_->ExpectAction("textinput:a"); + test_result_->Verify(); +} + +TEST_F(InputMethodAuraLinuxTest, SetPreeditRegionCompositionEndTest) { + std::unique_ptr<TextInputClientForTesting> client( + new TextInputClientForTesting(TEXT_INPUT_TYPE_TEXT)); + input_method_auralinux_->SetFocusedTextInputClient(client.get()); + input_method_auralinux_->OnTextInputTypeChanged(client.get()); + + input_method_auralinux_->OnCommit(u"a"); + + test_result_->ExpectAction("keypress:97"); + + client->surrounding_text = u"a"; + client->text_range = gfx::Range(0, 1); + client->selection_range = gfx::Range(1, 1); + + input_method_auralinux_->OnCaretBoundsChanged(client.get()); + input_method_auralinux_->OnSetPreeditRegion(client->text_range, + std::vector<ImeTextSpan>()); + + test_result_->ExpectAction("surroundingtext:a"); + test_result_->ExpectAction("selectionrangestart:1"); + test_result_->ExpectAction("selectionrangeend:1"); + + CompositionText comp; + comp.text = u""; + input_method_auralinux_->OnPreeditChanged(comp); + + test_result_->ExpectAction("compositionend"); + test_result_->Verify(); +} + TEST_F(InputMethodAuraLinuxTest, GetVirtualKeyboardController) { EXPECT_EQ(input_method_auralinux_->GetVirtualKeyboardController(), context_->GetVirtualKeyboardController());
diff --git a/ui/chromeos/strings/network_element_localized_strings_provider.cc b/ui/chromeos/strings/network_element_localized_strings_provider.cc index 799ca8e..ba8d2c0 100644 --- a/ui/chromeos/strings/network_element_localized_strings_provider.cc +++ b/ui/chromeos/strings/network_element_localized_strings_provider.cc
@@ -369,6 +369,8 @@ {"networkSimLockEnableSublabel", IDS_SETTINGS_INTERNET_NETWORK_SIM_LOCK_ENABLE_SUBLABEL}, {"networkSimLockedTitle", IDS_SETTINGS_INTERNET_NETWORK_SIM_LOCKED_TITLE}, + {"networkSimLockPolicyAdminSubtitle", + IDS_SETTINGS_INTERNET_NETWORK_SIM_LOCK_POLICY_ADMIN_SUBTITLE}, {"networkSimPukDialogSubtitle", IDS_SETTINGS_INTERNET_NETWORK_SIM_LOCKED_PUK_SUBTITLE}, {"networkSimPukDialogWarningNoFailures",
diff --git a/ui/chromeos/ui_chromeos_strings.grd b/ui/chromeos/ui_chromeos_strings.grd index 3fd207a..0e7ee836 100644 --- a/ui/chromeos/ui_chromeos_strings.grd +++ b/ui/chromeos/ui_chromeos_strings.grd
@@ -1772,6 +1772,9 @@ <message name="IDS_SETTINGS_INTERNET_NETWORK_SIM_LOCKED_TITLE" desc="Settings > Internet > Network details > Lock/unlock SIM card: Title for SIM locked dialog."> SIM card is locked </message> + <message name="IDS_SETTINGS_INTERNET_NETWORK_SIM_LOCK_POLICY_ADMIN_SUBTITLE" desc="Settings > Internet > Network details > Unlock SIM card: Title for unlocking SIM locked dialog when restrict SIM PIN lock policy is on."> + This will also disable the SIM Lock setting on the device. + </message> <message name="IDS_SETTINGS_INTERNET_NETWORK_SIM_LOCKED_PUK_SUBTITLE" desc="Settings > Internet > Network details > Lock/unlock SIM card: Title informing the user to enter a PIN provided by the carrier in order unlock network."> An incorrect PIN was entered too many times. To set up a new PIN, enter the 8-digit Personal Unblocking Key (PUK) provided by your carrier. </message>
diff --git a/ui/chromeos/ui_chromeos_strings_grd/IDS_SETTINGS_INTERNET_NETWORK_SIM_LOCK_POLICY_ADMIN_SUBTITLE.png.sha1 b/ui/chromeos/ui_chromeos_strings_grd/IDS_SETTINGS_INTERNET_NETWORK_SIM_LOCK_POLICY_ADMIN_SUBTITLE.png.sha1 new file mode 100644 index 0000000..6d1b08c --- /dev/null +++ b/ui/chromeos/ui_chromeos_strings_grd/IDS_SETTINGS_INTERNET_NETWORK_SIM_LOCK_POLICY_ADMIN_SUBTITLE.png.sha1
@@ -0,0 +1 @@ +9a36cae976b34c7de8eafe5cd40cf5666337933f \ No newline at end of file
diff --git a/ui/display/manager/managed_display_info.cc b/ui/display/manager/managed_display_info.cc index 78e7167a..2e8b7a6d 100644 --- a/ui/display/manager/managed_display_info.cc +++ b/ui/display/manager/managed_display_info.cc
@@ -13,6 +13,7 @@ #include "base/format_macros.h" #include "base/logging.h" #include "base/strings/string_number_conversions.h" +#include "base/strings/string_piece_forward.h" #include "base/strings/string_split.h" #include "base/strings/string_util.h" #include "base/strings/stringprintf.h" @@ -26,6 +27,7 @@ #include "ui/gfx/display_color_spaces.h" #include "ui/gfx/geometry/dip_util.h" #include "ui/gfx/geometry/insets_conversions.h" +#include "ui/gfx/geometry/rounded_corners_f.h" #include "ui/gfx/geometry/size_conversions.h" #include "ui/gfx/geometry/size_f.h" @@ -170,9 +172,35 @@ kDefaultHostWindowWidth, kDefaultHostWindowHeight); base::StringPiece main_spec = spec; - float zoom_factor = 1.0f; + gfx::RoundedCornersF rounded_corners_radii; std::vector<base::StringPiece> parts = base::SplitStringPiece( - main_spec, "@", base::KEEP_WHITESPACE, base::SPLIT_WANT_NONEMPTY); + main_spec, "~", base::KEEP_WHITESPACE, base::SPLIT_WANT_NONEMPTY); + if (parts.size() == 2) { + std::vector<base::StringPiece> radii_part = base::SplitStringPiece( + parts[1], "|", base::KEEP_WHITESPACE, base::SPLIT_WANT_NONEMPTY); + + DCHECK(radii_part.size() == 1 || radii_part.size() == 4); + + float radii[4]; + int radius_in_int = 0; + for (size_t idx = 0; idx < radii_part.size(); ++idx) { + const base::StringPiece& radius = radii_part[idx]; + bool conversion_success = base::StringToInt(radius, &radius_in_int); + DCHECK(conversion_success); + radii[idx] = static_cast<float>(radius_in_int); + } + + rounded_corners_radii = + (radii_part.size() == 1) + ? gfx::RoundedCornersF{radii[0]} + : gfx::RoundedCornersF{radii[0], radii[1], radii[2], radii[3]}; + + main_spec = parts[0]; + } + + float zoom_factor = 1.0f; + parts = base::SplitStringPiece(main_spec, "@", base::KEEP_WHITESPACE, + base::SPLIT_WANT_NONEMPTY); if (parts.size() == 2) { double scale_in_double = 0; if (base::StringToDouble(parts[1], &scale_in_double)) @@ -275,6 +303,7 @@ display_info.SetRotation(rotation, Display::RotationSource::USER); display_info.set_zoom_factor(zoom_factor); display_info.SetBounds(bounds_in_native); + display_info.set_rounded_corners_radii(rounded_corners_radii); if (!display_modes.size()) { display_modes.push_back(ManagedDisplayMode( @@ -394,6 +423,7 @@ refresh_rate_ = native_info.refresh_rate_; is_interlaced_ = native_info.is_interlaced_; native_ = native_info.native_; + rounded_corners_radii_ = native_info.rounded_corners_radii_; // Rotation, color_profile and overscan are given by preference, // or unit tests. Don't copy if this native_info came from @@ -482,14 +512,15 @@ std::string result = base::StringPrintf( "ManagedDisplayInfo[%lld] native bounds=%s, size=%s, device-scale=%g, " - "display-zoom=%g, overscan=%s, rotation=%d, touchscreen=%s", + "display-zoom=%g, overscan=%s, rotation=%d, touchscreen=%s, " + "corner_radii=%s", static_cast<long long int>(id_), bounds_in_native_.ToString().c_str(), size_in_pixel_.ToString().c_str(), device_scale_factor_, zoom_factor_, overscan_insets_in_dip_.ToString().c_str(), rotation_degree, - touch_support_ == Display::TouchSupport::AVAILABLE - ? "yes" - : touch_support_ == Display::TouchSupport::UNAVAILABLE ? "no" - : "unknown"); + touch_support_ == Display::TouchSupport::AVAILABLE ? "yes" + : touch_support_ == Display::TouchSupport::UNAVAILABLE ? "no" + : "unknown", + rounded_corners_radii_.ToString().c_str()); return result; }
diff --git a/ui/display/manager/managed_display_info.h b/ui/display/manager/managed_display_info.h index aa26494..42c3e24 100644 --- a/ui/display/manager/managed_display_info.h +++ b/ui/display/manager/managed_display_info.h
@@ -17,6 +17,7 @@ #include "ui/display/types/display_constants.h" #include "ui/gfx/geometry/insets.h" #include "ui/gfx/geometry/rect.h" +#include "ui/gfx/geometry/rounded_corners_f.h" namespace display { @@ -85,7 +86,7 @@ // The format is // // [origin-]widthxheight[*device_scale_factor][#resolutions list] - // [/<properties>][@zoom-factor] + // [/<properties>][@zoom-factor][~rounded-display-radius] // // where [] are optional: // - |origin| is given in x+y- format. @@ -100,21 +101,34 @@ // - |zoom-factor| is floating value, e.g. @1.5 or @1.25. // - |resolution list| is the list of size that is given in // |width x height [% refresh_rate]| separated by '|'. - // + // - |rounded_display_radii| is a list of integer values separated by '|' + // that specifies the radius of each corner of display with format: + // upper_left|upper_right|lower_right|lower_left + // If only one radius is specified, |radius|, it is the radius for all four + // corners. // A couple of examples: // "100x100" // 100x100 window at 0,0 origin. 1x device scale factor. no overscan. - // no rotation. 1.0 zoom factor. + // no rotation. 1.0 zoom factor. no rounded display. + // "100x100~16|16|10|10" + // 100x100 window at 0,0 origin. 1x device scale factor. no overscan. + // no rotation. 1.0 zoom factor. display with rounded + // corners of radii (16,16,10,10). + // "5+5-300x200~18" + // 300x200 window at 5,5 origin. 2x device scale factor. + // no overscan, no rotation. 1.0 zoom factor. display with rounded + // corners of radii (18,18,18,18). // "5+5-300x200*2" // 300x200 window at 5,5 origin. 2x device scale factor. - // no overscan, no rotation. 1.0 zoom factor. + // no overscan, no rotation. 1.0 zoom factor. no rounded display. // "300x200/ol" // 300x200 window at 0,0 origin. 1x device scale factor. // with 5% overscan. rotated to left (90 degree counter clockwise). - // 1.0 zoom factor. + // 1.0 zoom factor. no rounded display. // "10+20-300x200/u@1.5" // 300x200 window at 10,20 origin. 1x device scale factor. // no overscan. flipped upside-down (180 degree) and 1.5 zoom factor. + // no rounded display. // "200x100#300x200|200x100%59.0|100x100%60" // 200x100 window at 0,0 origin, with 3 possible resolutions, // 300x200, 200x100 at 59 Hz, and 100x100 at 60 Hz. @@ -284,6 +298,13 @@ int32_t year_of_manufacture() const { return year_of_manufacture_; } void set_year_of_manufacture(int32_t year) { year_of_manufacture_ = year; } + const gfx::RoundedCornersF& rounded_corners_radii() const { + return rounded_corners_radii_; + } + void set_rounded_corners_radii(const gfx::RoundedCornersF radii) { + rounded_corners_radii_ = radii; + } + // Returns a string representation of the ManagedDisplayInfo, excluding // display modes. std::string ToString() const; @@ -367,6 +388,9 @@ // 0 if EDID says so or if the EDID (retrieval) was faulty. uint32_t bits_per_channel_; + // Radii for the corners of the display. The default radii is (0, 0, 0, 0). + gfx::RoundedCornersF rounded_corners_radii_; + // If you add a new member, you need to update Copy(). };
diff --git a/ui/display/manager/managed_display_info_unittest.cc b/ui/display/manager/managed_display_info_unittest.cc index 77feb13..86048f6b 100644 --- a/ui/display/manager/managed_display_info_unittest.cc +++ b/ui/display/manager/managed_display_info_unittest.cc
@@ -4,10 +4,12 @@ #include "ui/display/manager/managed_display_info.h" +#include "base/test/gtest_util.h" #include "build/chromeos_buildflags.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/display/display_switches.h" #include "ui/gfx/display_color_spaces.h" +#include "ui/gfx/geometry/rounded_corners_f.h" #if BUILDFLAG(IS_CHROMEOS_ASH) #include "ui/display/manager/touch_device_manager.h" @@ -26,6 +28,7 @@ EXPECT_EQ(Display::ROTATE_0, info.GetActiveRotation()); EXPECT_EQ(gfx::DisplayColorSpaces(), info.display_color_spaces()); EXPECT_EQ(gfx::Insets(), info.overscan_insets_in_dip()); + EXPECT_EQ(gfx::RoundedCornersF(0.0), info.rounded_corners_radii()); info = ManagedDisplayInfo::CreateFromSpecWithID("10+20-300x400*2/o", 10); EXPECT_EQ(gfx::Rect(10, 20, 300, 400), info.bounds_in_native()); @@ -33,6 +36,7 @@ EXPECT_EQ(Display::ROTATE_0, info.GetActiveRotation()); EXPECT_EQ(gfx::DisplayColorSpaces(), info.display_color_spaces()); EXPECT_EQ(gfx::Insets::TLBR(5, 3, 5, 3), info.overscan_insets_in_dip()); + EXPECT_EQ(gfx::RoundedCornersF(0.0), info.rounded_corners_radii()); info = ManagedDisplayInfo::CreateFromSpecWithID("10+20-300x400*2/oh", 10); EXPECT_EQ(gfx::Rect(10, 20, 300, 400), info.bounds_in_native()); @@ -58,19 +62,24 @@ // TODO(oshima): This should be rotated too. Fix this. EXPECT_EQ(gfx::Insets::TLBR(5, 3, 5, 3), info.overscan_insets_in_dip()); - info = ManagedDisplayInfo::CreateFromSpecWithID("10+20-300x400*2/or@1.5", 10); + info = + ManagedDisplayInfo::CreateFromSpecWithID("10+20-300x400*2/or@1.5~16", 10); EXPECT_EQ(gfx::Rect(10, 20, 300, 400), info.bounds_in_native()); EXPECT_EQ(gfx::Size(380, 288), info.size_in_pixel()); EXPECT_EQ(Display::ROTATE_90, info.GetActiveRotation()); EXPECT_EQ(gfx::DisplayColorSpaces(), info.display_color_spaces()); EXPECT_EQ(gfx::Insets::TLBR(5, 3, 5, 3), info.overscan_insets_in_dip()); EXPECT_EQ(gfx::Insets::TLBR(10, 6, 10, 6), info.GetOverscanInsetsInPixel()); + EXPECT_EQ(gfx::RoundedCornersF(16.0), info.rounded_corners_radii()); - info = ManagedDisplayInfo::CreateFromSpecWithID("10+20-300x400*2/l@1.5", 10); + info = ManagedDisplayInfo::CreateFromSpecWithID( + "10+20-300x400*2/l@1.5~16|16|10|10", 10); EXPECT_EQ(gfx::Rect(10, 20, 300, 400), info.bounds_in_native()); EXPECT_EQ(Display::ROTATE_270, info.GetActiveRotation()); EXPECT_EQ(1.5f, info.zoom_factor()); EXPECT_EQ(gfx::DisplayColorSpaces(), info.display_color_spaces()); + EXPECT_EQ(gfx::RoundedCornersF(16.0, 16.0, 10.0, 10.0), + info.rounded_corners_radii()); info = ManagedDisplayInfo::CreateFromSpecWithID( "250x200#300x200|250x200%59.9|150x100%60|150x100*2|200x150*1.25%30", 10); @@ -111,6 +120,51 @@ EXPECT_EQ(2.0f, info.display_modes()[0].device_scale_factor()); EXPECT_EQ(2.0f, info.display_modes()[1].device_scale_factor()); EXPECT_EQ(1.25f, info.display_modes()[2].device_scale_factor()); + + info = ManagedDisplayInfo::CreateFromSpecWithID( + "250x200*2#300x200|250x200*1.25|150x100~16|16|10|10", 10); + EXPECT_EQ(gfx::Size(150, 100), info.display_modes()[0].size()); + EXPECT_EQ(gfx::Size(300, 200), info.display_modes()[1].size()); + EXPECT_EQ(gfx::Size(250, 200), info.display_modes()[2].size()); + EXPECT_EQ(2.0f, info.display_modes()[0].device_scale_factor()); + EXPECT_EQ(2.0f, info.display_modes()[1].device_scale_factor()); + EXPECT_EQ(1.25f, info.display_modes()[2].device_scale_factor()); + EXPECT_EQ(gfx::RoundedCornersF(16.0, 16.0, 10.0, 10.0), + info.rounded_corners_radii()); +} + +TEST_F(DisplayInfoTest, ExpectDeathWhenInvalidNumberOfRadiiProvided) { + EXPECT_DCHECK_DEATH( + ManagedDisplayInfo::CreateFromSpecWithID("200x100~10|15", 10)); + + EXPECT_DCHECK_DEATH( + ManagedDisplayInfo::CreateFromSpecWithID("200x100~10|10|15", 10)); +} + +TEST_F(DisplayInfoTest, ExpectDeathWhenInvalidDisplayRadiusProvided) { + EXPECT_DCHECK_DEATH( + ManagedDisplayInfo::CreateFromSpecWithID("200x100~1f", 10)); + + EXPECT_DCHECK_DEATH( + ManagedDisplayInfo::CreateFromSpecWithID("200x100~10.5", 10)); +} + +TEST_F(DisplayInfoTest, TestToStringFormat) { + ManagedDisplayInfo info = + ManagedDisplayInfo::CreateFromSpecWithID("200x100", 10); + + EXPECT_EQ( + info.ToString(), + "ManagedDisplayInfo[10] native bounds=0,0 200x100, size=200x100, " + "device-scale=1, display-zoom=1, overscan=x:0,0 y:0,0, rotation=0, " + "touchscreen=unknown, corner_radii=0.000000,0.000000,0.000000,0.000000"); + + EXPECT_EQ( + info.ToFullString(), + "ManagedDisplayInfo[10] native bounds=0,0 200x100, size=200x100, " + "device-scale=1, display-zoom=1, overscan=x:0,0 y:0,0, rotation=0, " + "touchscreen=unknown, corner_radii=0.000000,0.000000,0.000000,0.000000, " + "display_modes==(200x100@60P(N) 1)"); } } // namespace display
diff --git a/ui/message_center/message_center_impl.cc b/ui/message_center/message_center_impl.cc index fefa121..bb02c85 100644 --- a/ui/message_center/message_center_impl.cc +++ b/ui/message_center/message_center_impl.cc
@@ -510,6 +510,8 @@ } void MessageCenterImpl::ResetPopupTimer(const std::string& id) { + DCHECK(FindPopupNotificationById(id)); + popup_timers_controller_->CancelTimer(id); popup_timers_controller_->StartTimer( id, popup_timers_controller_->GetTimeoutForNotification(
diff --git a/ui/webui/resources/cr_components/chromeos/network/network_list_item.html b/ui/webui/resources/cr_components/chromeos/network/network_list_item.html index 52ed0aa..024a72d8 100644 --- a/ui/webui/resources/cr_components/chromeos/network/network_list_item.html +++ b/ui/webui/resources/cr_components/chromeos/network/network_list_item.html
@@ -228,6 +228,7 @@ </div> <template is="dom-if" if="[[isCellularUnlockDialogOpen_]]" restamp> <sim-lock-dialogs + global-policy="[[globalPolicy]]" is-dialog-open="{{isCellularUnlockDialogOpen_}}" device-state="[[deviceState]]"> </sim-lock-dialogs>
diff --git a/ui/webui/resources/cr_components/chromeos/network/network_siminfo.html b/ui/webui/resources/cr_components/chromeos/network/network_siminfo.html index 2258464..7b52979 100644 --- a/ui/webui/resources/cr_components/chromeos/network/network_siminfo.html +++ b/ui/webui/resources/cr_components/chromeos/network/network_siminfo.html
@@ -102,6 +102,7 @@ <template is="dom-if" if="[[isDialogOpen_]]" restamp> <sim-lock-dialogs + global-policy="[[globalPolicy]]" show-change-pin="[[showChangePin_]]" is-dialog-open="{{isDialogOpen_}}" device-state="[[deviceState]]">
diff --git a/ui/webui/resources/cr_components/chromeos/network/sim_lock_dialogs.html b/ui/webui/resources/cr_components/chromeos/network/sim_lock_dialogs.html index 0615915..eeb5100 100644 --- a/ui/webui/resources/cr_components/chromeos/network/sim_lock_dialogs.html +++ b/ui/webui/resources/cr_components/chromeos/network/sim_lock_dialogs.html
@@ -135,6 +135,11 @@ close-text="[[i18n('close')]]"> <div slot="title">[[i18n('networkSimLockedTitle')]]</div> <div slot="body"> + <template is="dom-if" if="[[isSimPinLockRestricted_]]"> + <div id="adminSubtitle"> + [[i18n('networkSimLockPolicyAdminSubtitle')]] + </div> + </template> <network-password-input id="unlockPin" value="{{pin_}}" on-enter="sendUnlockPin_"
diff --git a/ui/webui/resources/cr_components/chromeos/network/sim_lock_dialogs.js b/ui/webui/resources/cr_components/chromeos/network/sim_lock_dialogs.js index 8e4dc3a4..a817d23a 100644 --- a/ui/webui/resources/cr_components/chromeos/network/sim_lock_dialogs.js +++ b/ui/webui/resources/cr_components/chromeos/network/sim_lock_dialogs.js
@@ -34,6 +34,9 @@ observer: 'deviceStateChanged_', }, + /** @type {!chromeos.networkConfig.mojom.GlobalPolicy|undefined} */ + globalPolicy: Object, + /** * Set to true when there is an open dialog. * @type {boolean} @@ -149,6 +152,23 @@ type: String, observer: 'pinOrPukChange_', }, + + /** @private {boolean} */ + isSimLockPolicyEnabled_: { + type: Boolean, + value() { + return loadTimeData.valueExists('isSimLockPolicyEnabled') && + loadTimeData.getBoolean('isSimLockPolicyEnabled'); + } + }, + + /** @private {boolean} */ + isSimPinLockRestricted_: { + type: Boolean, + value: false, + computed: 'computeIsSimPinLockRestricted_(isSimLockPolicyEnabled_,' + + 'globalPolicy, globalPolicy.*)', + }, }, /** @private {?chromeos.networkConfig.mojom.CrosNetworkConfigRemote} */ @@ -284,6 +304,15 @@ }, /** + * @return {boolean} + * @private + */ + computeIsSimPinLockRestricted_() { + return this.isSimLockPolicyEnabled_ && !!this.globalPolicy && + !this.globalPolicy.allowCellularSimLock; + }, + + /** * Clears error message on user interacion. * @private */