diff --git a/DEPS b/DEPS index b079da2..6ec44be 100644 --- a/DEPS +++ b/DEPS
@@ -116,9 +116,9 @@ # output. 'checkout_js_coverage_modules': True, - # Check out and download nacl by default, unless on Windows or Mac. + # Check out and download nacl for ChromeOS only. # This can be disabled e.g. with custom_vars. - 'checkout_nacl': 'host_os == "linux"', + 'checkout_nacl': 'checkout_chromeos', # By default, do not check out src-internal. This can be overridden e.g. with # custom_vars. @@ -305,19 +305,19 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling V8 # and whatever else without interference from each other. - 'src_internal_revision': '601621ad463530e5e1acc47d248ce98e2f313e42', + 'src_internal_revision': 'f0c9e0d5052fefe2bdc83367fb6eab5893a67138', # 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': '51b8c1cc715ab028802bbb739add0927235cf461', + 'skia_revision': '09311101b293b69c38395ecdaf93ced73a0e1256', # 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': '3bd53fa98e3db67d83a448339a56ee2ee7bf4af0', + 'v8_revision': '618cf8f6d60a45cea451dcf59bcc7d104b106613', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling ANGLE # and whatever else without interference from each other. - 'angle_revision': '32f209b83f782d396d9197744b897af421762726', + 'angle_revision': 'a494c1d6c8131a5316923bcc573f0908b1db4ef8', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling SwiftShader # and whatever else without interference from each other. @@ -824,7 +824,7 @@ 'src/clank': { 'url': Var('chrome_git') + '/clank/internal/apps.git' + '@' + - '99c421b0cdf59c0e49866f025179e694f92fd59e', + 'bf3239c2e98d6cfcf5e40a91a18b7d66245c46c5', 'condition': 'checkout_android and checkout_src_internal', }, @@ -986,7 +986,7 @@ 'packages': [ { 'package': 'chromium/third_party/androidx', - 'version': 'cXQdW2Rk12ZOelEgMeh59Dm0KbBL3vtbIfVW5e3d65QC', + 'version': 'nCsKSFP1wFGTksK5jlXPbxpLnj0SaCUuBsnI2isiVucC', }, ], 'condition': 'checkout_android', @@ -1035,7 +1035,7 @@ 'packages': [ { 'package': 'chromium/third_party/android_build_tools/bundletool', - 'version': 'xOeKyLIaK_RRHU0Qv0EdxTrRlq_22HAwoOr1xn5yoOcC', + 'version': 'XoK0RwIzanpFScg7dU_8th5zMvLgKvk7c_PmhZ5LSEQC', }, ], 'condition': 'checkout_android', @@ -1218,7 +1218,7 @@ }, 'src/third_party/depot_tools': - Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + 'e72395e5f2b481bf91a444bc30c4dc732971ad78', + Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + '197399a8acc768c60f2c7bce8726bb977929de81', 'src/third_party/devtools-frontend/src': Var('chromium_git') + '/devtools/devtools-frontend' + '@' + Var('devtools_frontend_revision'), @@ -1689,7 +1689,7 @@ Var('pdfium_git') + '/pdfium.git' + '@' + Var('pdfium_revision'), 'src/third_party/perfetto': - Var('android_git') + '/platform/external/perfetto.git' + '@' + '7e1ff250095383dbac1d56a8ed4f9e3c04e5dccd', + Var('android_git') + '/platform/external/perfetto.git' + '@' + 'eb35cbb649ff1783255dc348e2340bbd9b58f687', 'src/third_party/perl': { 'url': Var('chromium_git') + '/chromium/deps/perl.git' + '@' + '6f3e5028eb65d0b4c5fdd792106ac4c84eee1eb3', @@ -1723,7 +1723,7 @@ }, 'src/third_party/re2/src': - Var('chromium_git') + '/external/github.com/google/re2.git' + '@' + '24d460a9db6048b9d3e05cfdea13ec9d592545ad', + Var('chromium_git') + '/external/github.com/google/re2.git' + '@' + '974f44c8d45242e710dc0a85a4defffdb3ce07fc', 'src/third_party/r8': { 'packages': [ @@ -1834,7 +1834,7 @@ 'dep_type': 'cipd', }, - 'src/third_party/vulkan-deps': '{chromium_git}/vulkan-deps@04fa239099325005373f80c850175c958b01bdae', + 'src/third_party/vulkan-deps': '{chromium_git}/vulkan-deps@e55b4f78bcf354ebb7d6a4d48d4bd33713f3daba', 'src/third_party/vulkan_memory_allocator': Var('chromium_git') + '/external/github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git' + '@' + '56300b29fbfcc693ee6609ddad3fdd5b7a449a21', @@ -1874,7 +1874,7 @@ Var('chromium_git') + '/external/github.com/gpuweb/cts.git' + '@' + '149e02ab793f6a323a5ea4a3d2f52547aefc1434', 'src/third_party/webrtc': - Var('webrtc_git') + '/src.git' + '@' + 'ad9c4773f46a829945aa4a62d7621543ae0e7242', + Var('webrtc_git') + '/src.git' + '@' + '8ed4b4d314a2dbd80fb83007b25e6e3c60d98330', # Wuffs' canonical repository is at github.com/google/wuffs, but we use # Skia's mirror of Wuffs, the same as in upstream Skia's DEPS file. @@ -3977,7 +3977,7 @@ 'src/components/optimization_guide/internal': { 'url': Var('chrome_git') + '/chrome/components/optimization_guide.git' + '@' + - '8c7276b0b0c1b0aa55e922e6116e314116303e2a', + '2b12e66f237b926fad8f2eb19a5ef0a6d0154a9f', 'condition': 'checkout_src_internal', }, @@ -4031,7 +4031,7 @@ 'src/ios_internal': { 'url': Var('chrome_git') + '/chrome/ios_internal.git' + '@' + - 'ecf8e2050b8a7009150675fc1b259f808bc8be22', + '336634f2246380561870be044ecf8afff386577d', 'condition': 'checkout_ios and checkout_src_internal', },
diff --git a/android_webview/java/src/org/chromium/android_webview/common/ProductionSupportedFlagList.java b/android_webview/java/src/org/chromium/android_webview/common/ProductionSupportedFlagList.java index d587e8e..7f2adda 100644 --- a/android_webview/java/src/org/chromium/android_webview/common/ProductionSupportedFlagList.java +++ b/android_webview/java/src/org/chromium/android_webview/common/ProductionSupportedFlagList.java
@@ -380,10 +380,6 @@ Flag.baseFeature( GpuFeatures.USE_GPU_SCHEDULER_DFS, "Uses the new SchedulerDFS GPU job scheduler."), Flag.baseFeature( - BlinkFeatures.AUTOFILL_SHADOW_DOM, - "Enables Autofill associate form elements with form " - + "control elements across shadow boundaries."), - Flag.baseFeature( BlinkFeatures.UACH_OVERRIDE_BLANK, "Changes behavior of User-Agent Client Hints to send blank headers " + "when the User-Agent string is overriden"),
diff --git a/ash/accelerators/accelerator_tracker.h b/ash/accelerators/accelerator_tracker.h index bd568a6c..b93f58860 100644 --- a/ash/accelerators/accelerator_tracker.h +++ b/ash/accelerators/accelerator_tracker.h
@@ -8,7 +8,7 @@ #include "ash/ash_export.h" #include "base/containers/flat_map.h" #include "base/containers/span.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "ui/base/accelerators/accelerator.h" #include "ui/events/event_handler.h"
diff --git a/ash/accelerators/accelerator_tracker_unittest.cc b/ash/accelerators/accelerator_tracker_unittest.cc index c193a79..052e11e 100644 --- a/ash/accelerators/accelerator_tracker_unittest.cc +++ b/ash/accelerators/accelerator_tracker_unittest.cc
@@ -5,7 +5,7 @@ #include "ash/accelerators/accelerator_tracker.h" #include "ash/test/ash_test_base.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/test/metrics/user_action_tester.h" namespace ash {
diff --git a/ash/accelerators/shortcut_input_handler.cc b/ash/accelerators/shortcut_input_handler.cc index 510b7c0..8cc580c 100644 --- a/ash/accelerators/shortcut_input_handler.cc +++ b/ash/accelerators/shortcut_input_handler.cc
@@ -43,6 +43,10 @@ observer.OnShortcutInputEventReleased(key_event); } } + + if (should_consume_key_events_) { + event->StopPropagation(); + } } void ShortcutInputHandler::AddObserver(Observer* observer) { @@ -53,4 +57,9 @@ observers_.RemoveObserver(observer); } +void ShortcutInputHandler::SetShouldConsumeKeyEvents( + bool should_consume_key_events) { + should_consume_key_events_ = should_consume_key_events; +} + } // namespace ash
diff --git a/ash/accelerators/shortcut_input_handler.h b/ash/accelerators/shortcut_input_handler.h index 028fec55..2692902 100644 --- a/ash/accelerators/shortcut_input_handler.h +++ b/ash/accelerators/shortcut_input_handler.h
@@ -44,10 +44,14 @@ // ui::EventHandler: void OnKeyEvent(ui::KeyEvent* event) override; + void SetShouldConsumeKeyEvents(bool should_consume_key_events); + bool should_consume_key_events() const { return should_consume_key_events_; } + void AddObserver(Observer* observer); void RemoveObserver(Observer* observer); private: + bool should_consume_key_events_ = false; base::ObserverList<Observer> observers_; };
diff --git a/ash/accelerators/shortcut_input_handler_unittest.cc b/ash/accelerators/shortcut_input_handler_unittest.cc index 09733e7..95a83ca 100644 --- a/ash/accelerators/shortcut_input_handler_unittest.cc +++ b/ash/accelerators/shortcut_input_handler_unittest.cc
@@ -67,4 +67,16 @@ EXPECT_EQ(1, observer_->num_input_events_released()); } +TEST_F(ShortcutInputHandlerTest, ConsumeTest) { + ui::KeyEvent pressed_event(ui::ET_KEY_PRESSED, ui::VKEY_0, ui::EF_NONE); + shortcut_input_handler_->OnEvent(&pressed_event); + EXPECT_FALSE(pressed_event.stopped_propagation()); + + shortcut_input_handler_->SetShouldConsumeKeyEvents( + /*should_consume_key_events=*/true); + ui::KeyEvent released_event(ui::ET_KEY_RELEASED, ui::VKEY_0, ui::EF_NONE); + shortcut_input_handler_->OnEvent(&released_event); + EXPECT_TRUE(released_event.stopped_propagation()); +} + } // namespace ash
diff --git a/ash/app_list/views/app_list_item_view_pixeltest.cc b/ash/app_list/views/app_list_item_view_pixeltest.cc index 141f003..d0faa5d 100644 --- a/ash/app_list/views/app_list_item_view_pixeltest.cc +++ b/ash/app_list/views/app_list_item_view_pixeltest.cc
@@ -42,8 +42,7 @@ /*use_dense_ui=*/bool, /*use_rtl=*/bool, /*is_new_install=*/bool, - /*has_notification=*/bool, - /*jelly_enabled=*/bool>> { + /*has_notification=*/bool>> { public: // AshTestBase: absl::optional<pixel_test::InitParams> CreatePixelTestInitParams() @@ -56,8 +55,7 @@ // AshTestBase: void SetUp() override { scoped_feature_list_.InitWithFeatureStates( - {{app_list_features::kDragAndDropRefactor, use_drag_drop_refactor()}, - {chromeos::features::kJelly, jelly_enabled()}}); + {{app_list_features::kDragAndDropRefactor, use_drag_drop_refactor()}}); AshTestBase::SetUp(); @@ -131,9 +129,6 @@ is_new_install() ? "new_install=true" : "new_install=false", has_notification() ? "has_notification=true" : "has_notification=false"}; - if (jelly_enabled()) { - parameters.push_back("jelly_enabled"); - } std::string stringified_params = base::JoinString(parameters, "|"); return base::JoinString({"app_list_item_view", stringified_params}, "."); } @@ -146,20 +141,7 @@ ->GetWidgetForTesting(); } - size_t GetRevisionNumber() { - if (jelly_enabled()) { - // Revision numbers reset with Jelly. - return 5; - } - - size_t base_revision_number = 8; - - if (use_drag_drop_refactor()) { - ++base_revision_number; - } - - return base_revision_number; - } + size_t GetRevisionNumber() { return 5; } bool use_drag_drop_refactor() const { return std::get<0>(GetParam()); } bool use_folder_icon_refresh() const { return std::get<1>(GetParam()); } @@ -168,7 +150,6 @@ bool use_rtl() const { return std::get<4>(GetParam()); } bool is_new_install() const { return std::get<5>(GetParam()); } bool has_notification() const { return std::get<6>(GetParam()); } - bool jelly_enabled() const { return std::get<7>(GetParam()); } private: std::unique_ptr<DragDropControllerTestApi> drag_drop_controller_test_api_; @@ -184,8 +165,7 @@ /*use_dense_ui=*/testing::Bool(), /*use_rtl=*/testing::Bool(), /*is_new_install=*/testing::Bool(), - /*has_notification=*/testing::Bool(), - /*jelly_enabled=*/testing::Bool())); + /*has_notification=*/testing::Bool())); TEST_P(AppListItemViewPixelTest, AppListItemView) { CreateAppListItem("App"); @@ -193,7 +173,7 @@ ShowAppList(); EXPECT_TRUE(GetPixelDiffer()->CompareUiComponentsOnPrimaryScreen( - GenerateScreenshotName(), /*revision_number=*/3, GetItemViewAt(0), + GenerateScreenshotName(), /*revision_number=*/5, GetItemViewAt(0), GetItemViewAt(1))); } @@ -216,17 +196,11 @@ CreateFoldersContainingDifferentNumOfItems(max_items_in_folder); ShowAppList(); - if (jelly_enabled()) { - EXPECT_TRUE(GetPixelDiffer()->CompareUiComponentsOnPrimaryScreen( - GenerateScreenshotName(), /*revision_number=*/4, GetItemViewAt(0), - GetItemViewAt(1), GetItemViewAt(2), GetItemViewAt(3), - GetItemViewAt(4))); - } else { - EXPECT_TRUE(GetPixelDiffer()->CompareUiComponentsOnPrimaryScreen( - GenerateScreenshotName(), /*revision_number=*/5, GetItemViewAt(0), - GetItemViewAt(1), GetItemViewAt(2), GetItemViewAt(3), - GetItemViewAt(4))); - } + // If updating this revision, skip 5 (use 6) as it was used by a previous + // test. Then delete this comment. + EXPECT_TRUE(GetPixelDiffer()->CompareUiComponentsOnPrimaryScreen( + GenerateScreenshotName(), /*revision_number=*/4, GetItemViewAt(0), + GetItemViewAt(1), GetItemViewAt(2), GetItemViewAt(3), GetItemViewAt(4))); } // Verifies the folder icon is extended when an app is dragged upon it. @@ -261,17 +235,11 @@ GetItemViewAt(i)->OnDraggedViewEnter(); } - if (jelly_enabled()) { - EXPECT_TRUE(GetPixelDiffer()->CompareUiComponentsOnPrimaryScreen( - GenerateScreenshotName(), /*revision_number=*/4, GetItemViewAt(0), - GetItemViewAt(1), GetItemViewAt(2), GetItemViewAt(3), - GetItemViewAt(4))); - } else { - EXPECT_TRUE(GetPixelDiffer()->CompareUiComponentsOnPrimaryScreen( - GenerateScreenshotName(), /*revision_number=*/5, GetItemViewAt(0), - GetItemViewAt(1), GetItemViewAt(2), GetItemViewAt(3), - GetItemViewAt(4))); - } + // If updating this revision, skip 5 (use 6) as it was used by a previous + // test. Then delete this comment. + EXPECT_TRUE(GetPixelDiffer()->CompareUiComponentsOnPrimaryScreen( + GenerateScreenshotName(), /*revision_number=*/4, GetItemViewAt(0), + GetItemViewAt(1), GetItemViewAt(2), GetItemViewAt(3), GetItemViewAt(4))); // Reset the states. for (int i = 0; i < max_items_in_folder; ++i) {
diff --git a/ash/app_list/views/assistant/assistant_main_stage.cc b/ash/app_list/views/assistant/assistant_main_stage.cc index d345b86..4760887 100644 --- a/ash/app_list/views/assistant/assistant_main_stage.cc +++ b/ash/app_list/views/assistant/assistant_main_stage.cc
@@ -356,6 +356,7 @@ void AppListAssistantMainStage::AnimateInFooter() { // Set up our pre-animation values. footer_->layer()->SetOpacity(0.f); + footer_->SetVisible(true); // Animate the footer to 100% opacity with delay. footer_->layer()->GetAnimator()->StartAnimation(CreateLayerAnimationSequence( @@ -397,7 +398,7 @@ // ...then fade in. CreateOpacityElement(1.f, kDividerAnimationFadeInDuration))); - MaybeHideZeroState(); + MaybeHideZeroStateAndShowFooter(); } void AppListAssistantMainStage::OnPendingQueryChanged( @@ -421,7 +422,7 @@ CreateOpacityElement(1.f, kQueryAnimationFadeInDuration))); if (!query.Empty()) - MaybeHideZeroState(); + MaybeHideZeroStateAndShowFooter(); } void AppListAssistantMainStage::OnPendingQueryCleared(bool due_to_commit) { @@ -435,7 +436,7 @@ void AppListAssistantMainStage::OnResponseChanged( const scoped_refptr<AssistantResponse>& response) { - MaybeHideZeroState(); + MaybeHideZeroStateAndShowFooter(); // Show the horizontal separator. horizontal_separator_->layer()->GetAnimator()->StartAnimation( @@ -476,12 +477,16 @@ InitializeUIForStartingSession(/*from_search=*/false); } -void AppListAssistantMainStage::MaybeHideZeroState() { +void AppListAssistantMainStage::MaybeHideZeroStateAndShowFooter() { if (!IsShown(zero_state_view_)) return; assistant::util::FadeOutAndHide(zero_state_view_, kZeroStateAnimationFadeOutDuration); + + if (assistant::features::IsAssistantLearnMoreEnabled()) { + AnimateInFooter(); + } } void AppListAssistantMainStage::InitializeUIForStartingSession( @@ -491,13 +496,19 @@ progress_indicator_->layer()->SetOpacity(0.f); horizontal_separator_->layer()->SetOpacity(from_search ? 1.f : 0.f); - if (!from_search) - AnimateInZeroState(); - else - zero_state_view_->SetVisible(false); - footer_->InitializeUIForBubbleView(); - AnimateInFooter(); + if (from_search) { + zero_state_view_->SetVisible(false); + AnimateInFooter(); + } else { + AnimateInZeroState(); + + if (assistant::features::IsAssistantLearnMoreEnabled()) { + footer_->SetVisible(false); + } else { + AnimateInFooter(); + } + } } BEGIN_METADATA(AppListAssistantMainStage, views::View)
diff --git a/ash/app_list/views/assistant/assistant_main_stage.h b/ash/app_list/views/assistant/assistant_main_stage.h index 96ce8cc..285811cf 100644 --- a/ash/app_list/views/assistant/assistant_main_stage.h +++ b/ash/app_list/views/assistant/assistant_main_stage.h
@@ -83,7 +83,7 @@ void AnimateInZeroState(); void AnimateInFooter(); - void MaybeHideZeroState(); + void MaybeHideZeroStateAndShowFooter(); void InitializeUIForStartingSession(bool from_search); const raw_ptr<AssistantViewDelegate, ExperimentalAsh>
diff --git a/ash/app_list/views/assistant/assistant_main_stage_unittest.cc b/ash/app_list/views/assistant/assistant_main_stage_unittest.cc index bd9bee1..181e835 100644 --- a/ash/app_list/views/assistant/assistant_main_stage_unittest.cc +++ b/ash/app_list/views/assistant/assistant_main_stage_unittest.cc
@@ -11,6 +11,8 @@ #include "ash/shell.h" #include "ash/style/ash_color_provider.h" #include "ash/style/dark_light_mode_controller_impl.h" +#include "base/test/scoped_feature_list.h" +#include "chromeos/ash/services/assistant/public/cpp/features.h" #include "third_party/skia/include/core/SkColor.h" #include "ui/color/color_id.h" #include "ui/gfx/canvas.h" @@ -30,18 +32,7 @@ canvas_size.height() / 2); } -class AssistantMainStageTest : public AssistantAshTestBase { - public: - // AssistantAshTestBase: - void TearDown() override { - // NativeTheme instance will be re-used across test cases. Make sure that a - // test case ends with setting ShouldUseDarkColors to false. - ASSERT_FALSE( - ui::NativeTheme::GetInstanceForNativeUi()->ShouldUseDarkColors()); - - AssistantAshTestBase::TearDown(); - } -}; +using AssistantMainStageTest = AssistantAshTestBase; TEST_F(AssistantMainStageTest, DarkAndLightTheme) { auto* dark_light_mode_controller = DarkLightModeControllerImpl::Get(); @@ -71,6 +62,113 @@ // false. See a comment in TearDown about details. Shell::Get()->session_controller()->GetActivePrefService()->SetBoolean( prefs::kDarkModeEnabled, false); + + // NativeTheme instance will be re-used across test cases. Make sure that a + // test case ends with setting ShouldUseDarkColors to false. + ASSERT_FALSE( + ui::NativeTheme::GetInstanceForNativeUi()->ShouldUseDarkColors()); +} + +TEST_F(AssistantMainStageTest, FooterIsVisible) { + base::test::ScopedFeatureList scoped_feature_list; + scoped_feature_list.InitAndDisableFeature( + assistant::features::kEnableAssistantLearnMore); + + ShowAssistantUi(); + + views::View* footer = page_view()->GetViewByID(kFooterView); + EXPECT_TRUE(footer->GetVisible()); +} + +TEST_F(AssistantMainStageTest, FooterIsNotVisible) { + base::test::ScopedFeatureList scoped_feature_list( + assistant::features::kEnableAssistantLearnMore); + + ShowAssistantUi(); + + views::View* footer = page_view()->GetViewByID(kFooterView); + EXPECT_FALSE(footer->GetVisible()); +} + +TEST_F(AssistantMainStageTest, FooterIsVisibleAfterQuery) { + base::test::ScopedFeatureList scoped_feature_list( + assistant::features::kEnableAssistantLearnMore); + + ShowAssistantUi(); + + views::View* footer = page_view()->GetViewByID(kFooterView); + EXPECT_FALSE(footer->GetVisible()); + + MockTextInteraction().WithQuery("The query"); + EXPECT_TRUE(footer->GetVisible()); +} + +TEST_F(AssistantMainStageTest, FooterIsVisibleAfterResponse) { + base::test::ScopedFeatureList scoped_feature_list( + assistant::features::kEnableAssistantLearnMore); + + ShowAssistantUi(); + + views::View* footer = page_view()->GetViewByID(kFooterView); + EXPECT_FALSE(footer->GetVisible()); + + MockTextInteraction().WithTextResponse("The response"); + EXPECT_TRUE(footer->GetVisible()); +} + +TEST_F(AssistantMainStageTest, FooterIsVisible_Tablet) { + base::test::ScopedFeatureList scoped_feature_list; + scoped_feature_list.InitAndDisableFeature( + assistant::features::kEnableAssistantLearnMore); + + SetTabletMode(true); + ShowAssistantUi(); + + views::View* footer = page_view()->GetViewByID(kFooterView); + EXPECT_TRUE(footer->GetVisible()); +} + +TEST_F(AssistantMainStageTest, FooterIsNotVisible_Tablet) { + base::test::ScopedFeatureList scoped_feature_list( + assistant::features::kEnableAssistantLearnMore); + + SetTabletMode(true); + ShowAssistantUi(); + + views::View* footer = page_view()->GetViewByID(kFooterView); + EXPECT_FALSE(footer->GetVisible()); +} + +TEST_F(AssistantMainStageTest, FooterIsVisibleAfterQuery_Tablet) { + base::test::ScopedFeatureList scoped_feature_list( + assistant::features::kEnableAssistantLearnMore); + + SetTabletMode(true); + ShowAssistantUi(); + // Show Assistant UI in text mode, which is required to set text query. + TapOnAndWait(keyboard_input_toggle()); + + views::View* footer = page_view()->GetViewByID(kFooterView); + EXPECT_FALSE(footer->GetVisible()); + + MockTextInteraction().WithQuery("The query"); + EXPECT_TRUE(footer->GetVisible()); +} + +TEST_F(AssistantMainStageTest, FooterIsVisibleAfterResponse_Tablet) { + base::test::ScopedFeatureList scoped_feature_list( + assistant::features::kEnableAssistantLearnMore); + + SetTabletMode(true); + ShowAssistantUi(); + // Show Assistant UI in text mode, which is required to set text query. + TapOnAndWait(keyboard_input_toggle()); + + views::View* footer = page_view()->GetViewByID(kFooterView); + EXPECT_FALSE(footer->GetVisible()); + + MockTextInteraction().WithTextResponse("The response"); + EXPECT_TRUE(footer->GetVisible()); } } // namespace ash
diff --git a/ash/assistant/ui/main_stage/suggestion_container_view.cc b/ash/assistant/ui/main_stage/suggestion_container_view.cc index 74b3e91..9e2049f 100644 --- a/ash/assistant/ui/main_stage/suggestion_container_view.cc +++ b/ash/assistant/ui/main_stage/suggestion_container_view.cc
@@ -178,10 +178,6 @@ return; } - if (assistant::features::IsAssistantLearnMoreEnabled()) { - return; - } - // If we've committed a query we should ignore changes to the cache of // conversation starters as we are past the state in which they should be // presented. To present them now could incorrectly associate the conversation
diff --git a/ash/clipboard/clipboard_history_util.h b/ash/clipboard/clipboard_history_util.h index fbd548d..2851eb6 100644 --- a/ash/clipboard/clipboard_history_util.h +++ b/ash/clipboard/clipboard_history_util.h
@@ -10,7 +10,7 @@ #include <vector> #include "ash/ash_export.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "chromeos/crosapi/mojom/clipboard_history.mojom.h" #include "third_party/abseil-cpp/absl/types/optional.h" #include "ui/base/models/image_model.h"
diff --git a/ash/components/arc/mojom/compatibility_mode.mojom b/ash/components/arc/mojom/compatibility_mode.mojom index 91aea6b..5b68535b 100644 --- a/ash/components/arc/mojom/compatibility_mode.mojom +++ b/ash/components/arc/mojom/compatibility_mode.mojom
@@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // +// Deprecated method IDs: 1 // Next MinVersion: 3 module arc.mojom; @@ -36,9 +37,8 @@ SetResizeLockState@0(string package_name, ArcResizeLockState state); - // DEPRECATED. Use IsOptimizedForCrosApp() instead. - [MinVersion=1] DEPRECATED_IsGioApplicable@1(string package_name) => - (bool is_gio_applicable); + // REMOVED! [MinVersion=1] DEPRECATED_IsGioApplicable@1(string package_name) + // => (bool is_gio_applicable); // Queries whether app of `package_name` is an Optimized-for-Chromebook (O4C) // app. Returns true if `package_name` is an O4C app.
diff --git a/ash/components/arc/test/fake_compatibility_mode_instance.cc b/ash/components/arc/test/fake_compatibility_mode_instance.cc index bd2383b..3004bcf 100644 --- a/ash/components/arc/test/fake_compatibility_mode_instance.cc +++ b/ash/components/arc/test/fake_compatibility_mode_instance.cc
@@ -14,12 +14,6 @@ const std::string& package_name, mojom::ArcResizeLockState state) {} -void FakeCompatibilityModeInstance::DEPRECATED_IsGioApplicable( - const std::string& package_name, - DEPRECATED_IsGioApplicableCallback callback) { - std::move(callback).Run(is_gio_applicable_); -} - void FakeCompatibilityModeInstance::IsOptimizedForCrosApp( const std::string& package_name, IsOptimizedForCrosAppCallback callback) {
diff --git a/ash/components/arc/test/fake_compatibility_mode_instance.h b/ash/components/arc/test/fake_compatibility_mode_instance.h index e3788e1..6fa8dc4 100644 --- a/ash/components/arc/test/fake_compatibility_mode_instance.h +++ b/ash/components/arc/test/fake_compatibility_mode_instance.h
@@ -21,24 +21,14 @@ // mojom::CompatibilityModeInstance overrides: void SetResizeLockState(const std::string& package_name, mojom::ArcResizeLockState state) override; - // TODO(b/308526374): remove the mojom call. - void DEPRECATED_IsGioApplicable( - const std::string& package_name, - DEPRECATED_IsGioApplicableCallback callback) override; void IsOptimizedForCrosApp(const std::string& package_name, IsOptimizedForCrosAppCallback callback) override; - void set_is_gio_applicable(bool is_gio_applicable) { - is_gio_applicable_ = is_gio_applicable; - } - void set_o4c_pkg(std::string_view pkg_name) { o4c_pkgs_.emplace(std::string(pkg_name)); } private: - bool is_gio_applicable_ = false; - // Stores information for serving IsOptimizedForCrosApp calls. base::flat_set<std::string> o4c_pkgs_; };
diff --git a/ash/constants/ash_features.cc b/ash/constants/ash_features.cc index ef858c4..b80d1ba 100644 --- a/ash/constants/ash_features.cc +++ b/ash/constants/ash_features.cc
@@ -1934,7 +1934,7 @@ // enabling this without enabling Lacros flag will have no effect BASE_FEATURE(kOsSyncConsentRevamp, "OsSyncConsentRevamp", - base::FEATURE_DISABLED_BY_DEFAULT); + base::FEATURE_ENABLED_BY_DEFAULT); // If enabled, the os feedback dialog will be used on OOBE and the login // screeen.
diff --git a/ash/display/window_tree_host_manager_unittest.cc b/ash/display/window_tree_host_manager_unittest.cc index 2562bd2..9ee8cec 100644 --- a/ash/display/window_tree_host_manager_unittest.cc +++ b/ash/display/window_tree_host_manager_unittest.cc
@@ -25,7 +25,7 @@ #include "base/command_line.h" #include "base/memory/raw_ptr.h" #include "base/run_loop.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/strings/stringprintf.h" #include "base/test/metrics/histogram_tester.h" #include "base/test/scoped_feature_list.h"
diff --git a/ash/public/cpp/BUILD.gn b/ash/public/cpp/BUILD.gn index e971090..ba171de 100644 --- a/ash/public/cpp/BUILD.gn +++ b/ash/public/cpp/BUILD.gn
@@ -507,6 +507,7 @@ "app_list/app_list_config_provider_unittest.cc", "file_preview/file_preview_factory_unittest.cc", "file_preview/file_preview_unittest.cc", + "holding_space/holding_space_controller_unittest.cc", "holding_space/holding_space_image_unittest.cc", "holding_space/holding_space_item_unittest.cc", "holding_space/holding_space_model_unittest.cc",
diff --git a/ash/public/cpp/assistant/assistant_state_base.cc b/ash/public/cpp/assistant/assistant_state_base.cc index 004afd5f..64e66f8 100644 --- a/ash/public/cpp/assistant/assistant_state_base.cc +++ b/ash/public/cpp/assistant/assistant_state_base.cc
@@ -10,7 +10,7 @@ #include "ash/public/cpp/accelerators.h" #include "base/functional/bind.h" #include "base/strings/string_number_conversions.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "chromeos/ash/components/audio/cras_audio_handler.h" #include "components/prefs/pref_change_registrar.h" #include "components/prefs/pref_service.h"
diff --git a/ash/public/cpp/holding_space/BUILD.gn b/ash/public/cpp/holding_space/BUILD.gn index 944a6af..513c4b6 100644 --- a/ash/public/cpp/holding_space/BUILD.gn +++ b/ash/public/cpp/holding_space/BUILD.gn
@@ -14,6 +14,8 @@ "mock_holding_space_client.h", "mock_holding_space_model_observer.cc", "mock_holding_space_model_observer.h", + "scoped_mock_holding_space_controller_observer.cc", + "scoped_mock_holding_space_controller_observer.h", ] deps = [
diff --git a/ash/public/cpp/holding_space/holding_space_controller.cc b/ash/public/cpp/holding_space/holding_space_controller.cc index 63e0a0b..3cf76c4a 100644 --- a/ash/public/cpp/holding_space/holding_space_controller.cc +++ b/ash/public/cpp/holding_space/holding_space_controller.cc
@@ -7,6 +7,7 @@ #include "ash/public/cpp/holding_space/holding_space_controller_observer.h" #include "ash/public/cpp/session/session_controller.h" #include "base/check.h" +#include "base/check_is_test.h" namespace ash { @@ -47,17 +48,31 @@ CHECK(!g_instance); g_instance = this; - SessionController::Get()->AddObserver(this); + // `SessionController` may not exist during tests. + if (auto* session_controller = SessionController::Get()) { + session_controller->AddObserver(this); + } else { + CHECK_IS_TEST(); + } } HoldingSpaceController::~HoldingSpaceController() { CHECK_EQ(g_instance, this); + for (auto& observer : observers_) { + observer.OnHoldingSpaceControllerDestroying(); + } + SetClient(nullptr); SetModel(nullptr); g_instance = nullptr; - SessionController::Get()->RemoveObserver(this); + // `SessionController` may not exist during tests. + if (auto* session_controller = SessionController::Get()) { + session_controller->RemoveObserver(this); + } else { + CHECK_IS_TEST(); + } } // static
diff --git a/ash/public/cpp/holding_space/holding_space_controller_observer.h b/ash/public/cpp/holding_space/holding_space_controller_observer.h index a6b40bcf..eb2e25a 100644 --- a/ash/public/cpp/holding_space/holding_space_controller_observer.h +++ b/ash/public/cpp/holding_space/holding_space_controller_observer.h
@@ -16,6 +16,9 @@ class ASH_PUBLIC_EXPORT HoldingSpaceControllerObserver : public base::CheckedObserver { public: + // Called when `HoldingSpaceController` is being destroyed. + virtual void OnHoldingSpaceControllerDestroying() {} + // Called when a model gets attached to the HoldingSpaceController. virtual void OnHoldingSpaceModelAttached(HoldingSpaceModel* model) {}
diff --git a/ash/public/cpp/holding_space/holding_space_controller_unittest.cc b/ash/public/cpp/holding_space/holding_space_controller_unittest.cc new file mode 100644 index 0000000..399ea3c --- /dev/null +++ b/ash/public/cpp/holding_space/holding_space_controller_unittest.cc
@@ -0,0 +1,29 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ash/public/cpp/holding_space/holding_space_controller.h" + +#include "ash/public/cpp/holding_space/scoped_mock_holding_space_controller_observer.h" +#include "testing/gtest/include/gtest/gtest.h" + +namespace ash { + +// HoldingSpaceControllerObserverTest ------------------------------------------ + +// Base class for tests of the `HoldingSpaceController` that make sure it fires +// all observer methods as appropriate. +// TODO(http://b/260612195): Add all `HoldingSpaceControllerObserver` methods to +// this test suite. +using HoldingSpaceControllerObserverTest = testing::Test; + +// Tests ----------------------------------------------------------------------- + +TEST_F(HoldingSpaceControllerObserverTest, Destruction) { + auto controller = std::make_unique<HoldingSpaceController>(); + ScopedMockHoldingSpaceControllerObserver observer(controller.get()); + EXPECT_CALL(observer, OnHoldingSpaceControllerDestroying()); + controller.reset(); +} + +} // namespace ash
diff --git a/ash/public/cpp/holding_space/scoped_mock_holding_space_controller_observer.cc b/ash/public/cpp/holding_space/scoped_mock_holding_space_controller_observer.cc new file mode 100644 index 0000000..543912a --- /dev/null +++ b/ash/public/cpp/holding_space/scoped_mock_holding_space_controller_observer.cc
@@ -0,0 +1,20 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ash/public/cpp/holding_space/scoped_mock_holding_space_controller_observer.h" + +#include "ash/public/cpp/holding_space/holding_space_controller.h" + +namespace ash { + +ScopedMockHoldingSpaceControllerObserver:: + ScopedMockHoldingSpaceControllerObserver( + HoldingSpaceController* controller) { + observation_.Observe(controller); +} + +ScopedMockHoldingSpaceControllerObserver:: + ~ScopedMockHoldingSpaceControllerObserver() = default; + +} // namespace ash
diff --git a/ash/public/cpp/holding_space/scoped_mock_holding_space_controller_observer.h b/ash/public/cpp/holding_space/scoped_mock_holding_space_controller_observer.h new file mode 100644 index 0000000..efb1145 --- /dev/null +++ b/ash/public/cpp/holding_space/scoped_mock_holding_space_controller_observer.h
@@ -0,0 +1,41 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef ASH_PUBLIC_CPP_HOLDING_SPACE_SCOPED_MOCK_HOLDING_SPACE_CONTROLLER_OBSERVER_H_ +#define ASH_PUBLIC_CPP_HOLDING_SPACE_SCOPED_MOCK_HOLDING_SPACE_CONTROLLER_OBSERVER_H_ + +#include "ash/public/cpp/holding_space/holding_space_controller_observer.h" + +#include "base/scoped_observation.h" +#include "testing/gmock/include/gmock/gmock.h" + +namespace ash { + +class HoldingSpaceController; + +// An implementation of `HoldingSpaceControllerObserver` that enables its +// methods to be mocked. Observes the given `HoldingSpaceController` with scoped +// semantics. +class ScopedMockHoldingSpaceControllerObserver + : public HoldingSpaceControllerObserver { + public: + explicit ScopedMockHoldingSpaceControllerObserver( + HoldingSpaceController* controller); + ~ScopedMockHoldingSpaceControllerObserver() override; + + // HoldingSpaceControllerObserver: + MOCK_METHOD(void, OnHoldingSpaceControllerDestroying, (), (override)); + MOCK_METHOD(void, + OnHoldingSpaceTrayBubbleVisibilityChanged, + (const HoldingSpaceTray*, bool), + (override)); + + private: + base::ScopedObservation<HoldingSpaceController, + HoldingSpaceControllerObserver> + observation_{this}; +}; +} // namespace ash + +#endif // ASH_PUBLIC_CPP_HOLDING_SPACE_SCOPED_MOCK_HOLDING_SPACE_CONTROLLER_OBSERVER_H_
diff --git a/ash/system/holding_space/holding_space_tray_unittest.cc b/ash/system/holding_space/holding_space_tray_unittest.cc index d461dafe..a850310 100644 --- a/ash/system/holding_space/holding_space_tray_unittest.cc +++ b/ash/system/holding_space/holding_space_tray_unittest.cc
@@ -23,6 +23,7 @@ #include "ash/public/cpp/holding_space/holding_space_test_api.h" #include "ash/public/cpp/holding_space/holding_space_util.h" #include "ash/public/cpp/holding_space/mock_holding_space_client.h" +#include "ash/public/cpp/holding_space/scoped_mock_holding_space_controller_observer.h" #include "ash/public/cpp/test/shell_test_api.h" #include "ash/resources/vector_icons/vector_icons.h" #include "ash/session/session_controller_impl.h" @@ -264,30 +265,6 @@ return nullptr; } -// ScopedMockHoldingSpaceControllerObserver ------------------------------------ - -// An implementation of `HoldingSpaceControllerObserver` that enables its -// methods to be mocked. -class ScopedMockHoldingSpaceControllerObserver - : public HoldingSpaceControllerObserver { - public: - explicit ScopedMockHoldingSpaceControllerObserver( - HoldingSpaceController* controller) { - observation_.Observe(controller); - } - - // HoldingSpaceControllerObserver: - MOCK_METHOD(void, - OnHoldingSpaceTrayBubbleVisibilityChanged, - (const HoldingSpaceTray*, bool), - (override)); - - private: - base::ScopedObservation<HoldingSpaceController, - HoldingSpaceControllerObserver> - observation_{this}; -}; - // ViewVisibilityChangedWaiter ------------------------------------------------- // A class capable of waiting until a view's visibility is changed.
diff --git a/ash/system/holding_space/pinned_files_section.cc b/ash/system/holding_space/pinned_files_section.cc index dfc76ed2..15aa716 100644 --- a/ash/system/holding_space/pinned_files_section.cc +++ b/ash/system/holding_space/pinned_files_section.cc
@@ -73,6 +73,17 @@ return true; } + // If the model is empty and the holding space wallpaper nudge is enabled, + // then we need to show the placeholder so that there is something when the + // user clicks the force-shown tray. + // TODO(http://b/307787722): Replace this with the desired final behavior for + // holding space wallpaper nudge. + if (features::IsHoldingSpaceWallpaperNudgeEnabled() && + HoldingSpaceController::Get()->model() && + !HoldingSpaceController::Get()->model()->items().empty()) { + return true; + } + // The placeholder should only be shown if: // * a holding space item has been added at some point in time, // * a holding space item has *never* been pinned, and
diff --git a/ash/system/input_device_settings/input_device_key_alias_manager.h b/ash/system/input_device_settings/input_device_key_alias_manager.h index 9c924a2..96250f49 100644 --- a/ash/system/input_device_settings/input_device_key_alias_manager.h +++ b/ash/system/input_device_settings/input_device_key_alias_manager.h
@@ -10,7 +10,7 @@ #include "ash/ash_export.h" #include "base/containers/flat_map.h" #include "base/containers/flat_set.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "ui/events/devices/input_device.h" namespace ash {
diff --git a/ash/system/input_device_settings/input_device_settings_metrics_manager.cc b/ash/system/input_device_settings/input_device_settings_metrics_manager.cc index 9272df9..ccb6837 100644 --- a/ash/system/input_device_settings/input_device_settings_metrics_manager.cc +++ b/ash/system/input_device_settings/input_device_settings_metrics_manager.cc
@@ -23,7 +23,7 @@ #include "base/json/values_util.h" #include "base/metrics/histogram_functions.h" #include "base/strings/strcat.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/strings/stringprintf.h" #include "base/time/time.h" #include "components/prefs/pref_service.h"
diff --git a/ash/system/input_device_settings/input_device_tracker.cc b/ash/system/input_device_settings/input_device_tracker.cc index 0198d2fe..f5fba34 100644 --- a/ash/system/input_device_settings/input_device_tracker.cc +++ b/ash/system/input_device_settings/input_device_tracker.cc
@@ -14,7 +14,7 @@ #include "ash/system/input_device_settings/input_device_settings_controller_impl.h" #include "ash/system/input_device_settings/input_device_settings_pref_names.h" #include "base/containers/contains.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "components/prefs/pref_member.h" #include "components/prefs/pref_registry_simple.h" #include "components/prefs/pref_service.h"
diff --git a/ash/system/input_device_settings/input_device_tracker_unittest.cc b/ash/system/input_device_settings/input_device_tracker_unittest.cc index 99209d4..8ae0dd7 100644 --- a/ash/system/input_device_settings/input_device_tracker_unittest.cc +++ b/ash/system/input_device_settings/input_device_tracker_unittest.cc
@@ -11,7 +11,7 @@ #include "ash/system/input_device_settings/input_device_settings_pref_names.h" #include "ash/test/ash_test_base.h" #include "base/containers/contains.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/test/scoped_feature_list.h" #include "components/account_id/account_id.h" #include "components/prefs/pref_service.h"
diff --git a/ash/system/input_device_settings/keyboard_modifier_metrics_recorder.cc b/ash/system/input_device_settings/keyboard_modifier_metrics_recorder.cc index 82be625..7afaf5c 100644 --- a/ash/system/input_device_settings/keyboard_modifier_metrics_recorder.cc +++ b/ash/system/input_device_settings/keyboard_modifier_metrics_recorder.cc
@@ -16,7 +16,7 @@ #include "base/functional/callback_forward.h" #include "base/metrics/histogram_functions.h" #include "base/strings/strcat.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "components/prefs/pref_member.h" #include "components/prefs/pref_registry_simple.h" #include "components/prefs/pref_service.h"
diff --git a/ash/system/input_device_settings/pref_handlers/keyboard_pref_handler_impl.cc b/ash/system/input_device_settings/pref_handlers/keyboard_pref_handler_impl.cc index aacbbe3..098f597 100644 --- a/ash/system/input_device_settings/pref_handlers/keyboard_pref_handler_impl.cc +++ b/ash/system/input_device_settings/pref_handlers/keyboard_pref_handler_impl.cc
@@ -20,7 +20,7 @@ #include "base/containers/flat_map.h" #include "base/json/values_util.h" #include "base/strings/string_number_conversions.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/time/time.h" #include "base/values.h" #include "components/account_id/account_id.h"
diff --git a/ash/system/phonehub/app_stream_launcher_item.cc b/ash/system/phonehub/app_stream_launcher_item.cc index 4e2e405f..74f6def 100644 --- a/ash/system/phonehub/app_stream_launcher_item.cc +++ b/ash/system/phonehub/app_stream_launcher_item.cc
@@ -6,7 +6,7 @@ #include "ash/strings/grit/ash_strings.h" #include "base/hash/hash.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/strings/utf_string_conversions.h" #include "ui/base/l10n/l10n_util.h" #include "ui/gfx/geometry/insets.h"
diff --git a/ash/system/power/battery_saver_controller_unittest.cc b/ash/system/power/battery_saver_controller_unittest.cc index 12ddcb9..64c1ab5 100644 --- a/ash/system/power/battery_saver_controller_unittest.cc +++ b/ash/system/power/battery_saver_controller_unittest.cc
@@ -16,7 +16,7 @@ #include "ash/test/ash_test_base.h" #include "base/memory/raw_ptr.h" #include "base/run_loop.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/test/metrics/histogram_tester.h" #include "base/test/scoped_feature_list.h" #include "chromeos/dbus/power/fake_power_manager_client.h"
diff --git a/ash/system/unified/classroom_bubble_student_view.cc b/ash/system/unified/classroom_bubble_student_view.cc index 54f94e4a..84ee40c 100644 --- a/ash/system/unified/classroom_bubble_student_view.cc +++ b/ash/system/unified/classroom_bubble_student_view.cc
@@ -20,7 +20,7 @@ #include "base/check.h" #include "base/functional/bind.h" #include "base/metrics/user_metrics.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/time/time.h" #include "base/types/cxx23_to_underlying.h" #include "components/prefs/pref_registry_simple.h"
diff --git a/ash/system/unified/classroom_bubble_teacher_view.cc b/ash/system/unified/classroom_bubble_teacher_view.cc index 01bbfb08..e3148d8 100644 --- a/ash/system/unified/classroom_bubble_teacher_view.cc +++ b/ash/system/unified/classroom_bubble_teacher_view.cc
@@ -19,7 +19,7 @@ #include "base/check.h" #include "base/functional/bind.h" #include "base/metrics/user_metrics.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/strings/utf_string_conversions.h" #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/views/controls/combobox/combobox.h"
diff --git a/ash/user_education/holding_space_wallpaper_nudge/holding_space_wallpaper_nudge_controller.cc b/ash/user_education/holding_space_wallpaper_nudge/holding_space_wallpaper_nudge_controller.cc index b884526..66469b6a 100644 --- a/ash/user_education/holding_space_wallpaper_nudge/holding_space_wallpaper_nudge_controller.cc +++ b/ash/user_education/holding_space_wallpaper_nudge/holding_space_wallpaper_nudge_controller.cc
@@ -14,6 +14,7 @@ #include "ash/drag_drop/scoped_drag_drop_observer.h" #include "ash/public/cpp/holding_space/holding_space_client.h" #include "ash/public/cpp/holding_space/holding_space_controller.h" +#include "ash/public/cpp/holding_space/holding_space_controller_observer.h" #include "ash/public/cpp/holding_space/holding_space_model.h" #include "ash/public/cpp/holding_space/holding_space_util.h" #include "ash/public/cpp/wallpaper/wallpaper_controller.h" @@ -221,7 +222,8 @@ // (b) holding space is visible in the shelf on all displays // // While the observed drag-and-drop sequence is in progress. -class DragDropDelegate : public WallpaperDragDropDelegate { +class DragDropDelegate : public WallpaperDragDropDelegate, + public HoldingSpaceControllerObserver { private: // WallpaperDragDropDelegate: void GetDropFormats(int* formats, @@ -252,6 +254,12 @@ return; } + // Begin observing the `HoldingSpaceController` in case holding space is + // opened/closed. This observation will continue until destruction. + if (!holding_space_controller_observer_.IsObserving()) { + holding_space_controller_observer_.Observe(HoldingSpaceController::Get()); + } + // Once the user has dragged a file from the Files app over the wallpaper, // observe the drag-and-drop sequence to ensure that (a) the shelf is // visible on the active display and that (b) holding space is visible in @@ -362,7 +370,7 @@ // sequences and reset the shelf to its natural state. if (!location_in_screen) { drag_drop_observer_.reset(); - force_holding_space_show_in_shelf_.reset(); + force_holding_space_show_in_shelf_for_drag_.reset(); // Reset shelf auto-hide behavior asynchronously so that it won't animate // out and immediately back in again if the user drops a file from the @@ -387,12 +395,12 @@ // Ensure that holding space is visible in the shelf on all displays while // the observed drag-and-drop sequence is in progress. - if (!force_holding_space_show_in_shelf_) { - force_holding_space_show_in_shelf_ = + if (!force_holding_space_show_in_shelf_for_drag_) { + force_holding_space_show_in_shelf_for_drag_ = std::make_unique<HoldingSpaceController::ScopedForceShowInShelf>(); } - if (!NudgeShouldBeShown()) { + if (!NudgeShouldBeShown() || help_bubble_anchor_) { return; } @@ -415,16 +423,22 @@ help_bubble_params.extended_properties = user_education_util::CreateExtendedProperties(HelpBubbleStyle::kNudge); + // `base::AutoReset` is safe here, because this is guaranteed to be + // destroyed before destruction of `this` is complete. + base::AutoReset<uintptr_t> reset_help_bubble_anchor( + &help_bubble_anchor_, /*new_value=*/0, /*expected_old_value=*/0); + // While the help bubble is showing, do not allow either the associated - // `shelf` or `holding_space_tray` to hide. - // TODO(http://b/283171784): Explicitly close the help bubble if the user - // opens holding space or successfully pins a file to holding space. + // `shelf` or `holding_space_tray` to hide. Also reset the pointer to + // the `help_bubble_anchor_` on close. base::OnceClosure close_callback = base::BindOnce( [](Shelf::ScopedDisableAutoHide*, - HoldingSpaceController::ScopedForceShowInShelf*) {}, + HoldingSpaceController::ScopedForceShowInShelf*, + const base::AutoReset<uintptr_t>&) {}, base::Owned(std::make_unique<Shelf::ScopedDisableAutoHide>(shelf)), - base::Owned(std::make_unique< - HoldingSpaceController::ScopedForceShowInShelf>())); + base::Owned( + std::make_unique<HoldingSpaceController::ScopedForceShowInShelf>()), + base::OwnedRef(std::move(reset_help_bubble_anchor))); // Attempt to show the help bubble. if (auto scoped_help_bubble_closer = @@ -442,6 +456,10 @@ // bubbles have already closed. scoped_help_bubble_closer_ = std::move(scoped_help_bubble_closer); + // Store a pointer to the `HoldingSpaceTray` anchoring the help bubble to + // test for potential overlap later. + help_bubble_anchor_ = reinterpret_cast<uintptr_t>(holding_space_tray); + // If successful in showing the help bubble, ping the `holding_space_tray` // to further attract the user's attention. UserEducationPingController::Get()->CreatePing( @@ -449,6 +467,35 @@ } } + // HoldingSpaceControllerObserver: + void OnHoldingSpaceControllerDestroying() override { + holding_space_controller_observer_.Reset(); + } + + void OnHoldingSpaceTrayBubbleVisibilityChanged(const HoldingSpaceTray* tray, + bool visible) override { + if (visible && help_bubble_anchor_) { + force_holding_space_show_in_shelf_for_tray_bubble_ = + std::make_unique<HoldingSpaceController::ScopedForceShowInShelf>(); + + // If the tray that emitted this event is the one that the currently open + // help bubble is anchored to, close the help bubble to avoid overlap + // between the two bubbles. + if (reinterpret_cast<uintptr_t>(tray) == help_bubble_anchor_) { + scoped_help_bubble_closer_.RunAndReset(); + } + } else { + force_holding_space_show_in_shelf_for_tray_bubble_.reset(); + } + } + + // A pointer to the `HoldingSpaceTray` anchoring the currently open help + // bubble. Used to determine if the help bubble should be dismissed to prevent + // overlap between the help bubble and `HoldingSpaceTrayBubble`. NOTE: Do not + // dereference this pointer. It is for comparison only, as there is no + // guarantee that this `HoldingSpaceTray` still exists. + uintptr_t help_bubble_anchor_ = 0; + // Used to observe a single drag-and-drop sequence once the user has dragged // a file from the Files app over the wallpaper. std::unique_ptr<ScopedDragDropObserver> drag_drop_observer_; @@ -460,7 +507,12 @@ // Used to ensure that holding space is visible in the shelf on all displays // while an observed drag-and-drop sequence is in progress. std::unique_ptr<HoldingSpaceController::ScopedForceShowInShelf> - force_holding_space_show_in_shelf_; + force_holding_space_show_in_shelf_for_drag_; + + // Used to ensure that holding space is visible in the shelf on all displays + // while the tray bubble is open. + std::unique_ptr<HoldingSpaceController::ScopedForceShowInShelf> + force_holding_space_show_in_shelf_for_tray_bubble_; // Used to close the help bubble on drop-to-pin. base::ScopedClosureRunner scoped_help_bubble_closer_; @@ -468,6 +520,11 @@ // Used to highlight the wallpaper when data is dragged over it so that the // user better understands the wallpaper is a drop target. std::unique_ptr<Highlight> wallpaper_highlight_; + + // Observes the `HoldingSpaceController` to watch for tray bubble visibility. + base::ScopedObservation<HoldingSpaceController, + HoldingSpaceControllerObserver> + holding_space_controller_observer_{this}; }; } // namespace
diff --git a/ash/user_education/holding_space_wallpaper_nudge/holding_space_wallpaper_nudge_controller_unittest.cc b/ash/user_education/holding_space_wallpaper_nudge/holding_space_wallpaper_nudge_controller_unittest.cc index 31747b4e..13bf7e3 100644 --- a/ash/user_education/holding_space_wallpaper_nudge/holding_space_wallpaper_nudge_controller_unittest.cc +++ b/ash/user_education/holding_space_wallpaper_nudge/holding_space_wallpaper_nudge_controller_unittest.cc
@@ -378,6 +378,113 @@ scoped_animation_duration_scale_mode_; }; +// HoldingSpaceWallpaperNudgeControllerTest ------------------------------------ + +// Base class for tests that verify general Holding Space wallpaper nudge +// behavior. +class HoldingSpaceWallpaperNudgeControllerTest + : public HoldingSpaceWallpaperNudgeControllerTestBase { + public: + HoldingSpaceWallpaperNudgeControllerTest() + : HoldingSpaceWallpaperNudgeControllerTestBase( + /*drop_to_pin_enabled=*/false, + /*rate_limiting_enabled=*/true, + base::test::TaskEnvironment::TimeSource::SYSTEM_TIME) {} +}; + +TEST_F(HoldingSpaceWallpaperNudgeControllerTest, HideBubbleOnHoldingSpaceOpen) { + // The holding space tray is always visible in the shelf when the + // predictability feature is enabled. Force disable it so that we verify that + // holding space visibility is updated by the + // `HoldingSpaceWallpaperNudgeController`. + base::test::ScopedFeatureList scoped_feature_list; + scoped_feature_list.InitAndDisableFeature( + features::kHoldingSpacePredictability); + + // Set up a primary and secondary display and cache IDs. + UpdateDisplay("1024x768,1024x768"); + const int64_t primary_display_id = GetPrimaryDisplay().id(); + const int64_t secondary_display_id = GetSecondaryDisplay().id(); + + // Log in a regular user. + const AccountId& account_id = AccountId::FromUserEmail("user@test"); + SimulateUserLogin(account_id); + + // Register a model and client for holding space. + HoldingSpaceModel holding_space_model; + testing::StrictMock<MockHoldingSpaceClient> holding_space_client; + HoldingSpaceController::Get()->RegisterClientAndModelForUser( + account_id, &holding_space_client, &holding_space_model); + + // Configure the client to crack file system URLs. Note that this is only + // expected to occur when Files app data is dragged over the wallpaper. + EXPECT_CALL(holding_space_client, CrackFileSystemUrl) + .WillRepeatedly(Invoke([](const GURL& file_system_url) { + return base::FilePath(base::StrCat( + {"//path/to/", std::string(&file_system_url.spec().back())})); + })); + + // Needed by the client to create the placeholder. + EXPECT_CALL(holding_space_client, IsDriveDisabled) + .WillRepeatedly(testing::Return(false)); + + // Create and show a widget on the primary display from which data can be + // drag-and-dropped. + auto widget = CreateTestWidgetForDisplayId(primary_display_id); + widget->SetContentsView(std::make_unique<DraggableView>( + base::BindLambdaForTesting([&](ui::OSExchangeData* data) { + data->SetString(u"Payload"); + SetFilesAppData(data, u"file-system:a\nfile-system:b"); + }))); + widget->CenterWindow(gfx::Size(100, 100)); + widget->Show(); + + // Set animation durations to zero to speed things up. + SetAnimationDurationMultiplier( + ui::ScopedAnimationDurationScaleMode::ZERO_DURATION); + + // Mark the holding space feature as available since there is no holding + // space keyed service which would otherwise be responsible for doing so. + holding_space_prefs::MarkTimeOfFirstAvailability( + Shell::Get()->session_controller()->GetLastActiveUserPrefService()); + + // Cache both shelves and holding space trays. + auto* const primary_shelf = GetShelfForDisplayId(primary_display_id); + auto* const secondary_shelf = GetShelfForDisplayId(secondary_display_id); + auto* const primary_tray = GetHoldingSpaceTrayForShelf(primary_shelf); + auto* const secondary_tray = GetHoldingSpaceTrayForShelf(secondary_shelf); + + // Drag data from the `widget` to the wallpaper to show the nudge, then + // cancel the drag immediately. + MoveMouseTo(widget.get()); + PressLeftButton(); + MoveMouseBy(/*x=*/widget->GetWindowBoundsInScreen().width(), /*y=*/0); + PressAndReleaseKey(ui::VKEY_ESCAPE); + ReleaseLeftButton(); + + // Expect only the primary display's holding space tray to have a help bubble. + EXPECT_TRUE(HasHelpBubble(primary_tray)); + EXPECT_FALSE(HasHelpBubble(secondary_tray)); + + // Expect the state not to change at all if the secondary display's holding + // space bubble is opened, as it does not overlap with the help bubble. + secondary_tray->ShowBubble(); + EXPECT_TRUE(HasHelpBubble(primary_tray)); + EXPECT_FALSE(HasHelpBubble(secondary_tray)); + secondary_tray->CloseBubble(); + + // Expect the help bubble to close if the primary display's holding space is + // opened, as that would overlap. + primary_tray->ShowBubble(); + EXPECT_FALSE(HasHelpBubble(primary_tray)); + EXPECT_FALSE(HasHelpBubble(secondary_tray)); + primary_tray->CloseBubble(); + + // Clean up holding space controller. + HoldingSpaceController::Get()->RegisterClientAndModelForUser( + account_id, /*client=*/nullptr, /*model=*/nullptr); +} + // HoldingSpaceWallpaperNudgeControllerDragAndDropTest ------------------------- // Base class for drag-and-drop tests of the @@ -456,6 +563,10 @@ })); } + // Needed by the client to create the placeholder. + EXPECT_CALL(holding_space_client, IsDriveDisabled) + .WillRepeatedly(testing::Return(false)); + // Mark the holding space feature as available since there is no holding // space keyed service which would otherwise be responsible for doing so. holding_space_prefs::MarkTimeOfFirstAvailability( @@ -702,6 +813,10 @@ {"//path/to/", std::string(&file_system_url.spec().back())})); })); + // Needed by the client to create the placeholder. + EXPECT_CALL(holding_space_client, IsDriveDisabled) + .WillRepeatedly(testing::Return(false)); + // Create and show a widget from which data can be drag-and-dropped. auto widget = CreateTestWidgetForDisplayId(display_id); widget->SetContentsView(std::make_unique<DraggableView>(
diff --git a/ash/wallpaper/wallpaper_controller_impl.cc b/ash/wallpaper/wallpaper_controller_impl.cc index 2a31309d..50a18944 100644 --- a/ash/wallpaper/wallpaper_controller_impl.cc +++ b/ash/wallpaper/wallpaper_controller_impl.cc
@@ -62,7 +62,7 @@ #include "base/no_destructor.h" #include "base/rand_util.h" #include "base/ranges/algorithm.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/task/sequenced_task_runner.h" #include "base/task/thread_pool.h" #include "base/types/cxx23_to_underlying.h"
diff --git a/ash/webui/common/backend/shortcut_input_provider.cc b/ash/webui/common/backend/shortcut_input_provider.cc index 16288cd..6cf2af0 100644 --- a/ash/webui/common/backend/shortcut_input_provider.cc +++ b/ash/webui/common/backend/shortcut_input_provider.cc
@@ -27,6 +27,8 @@ if (Shell::HasInstance()) { auto* shortcut_input_handler = Shell::Get()->shortcut_input_handler(); if (shortcut_input_handler) { + shortcut_input_handler->SetShouldConsumeKeyEvents( + /*should_consume_key_events=*/false); shortcut_input_handler->RemoveObserver(this); } Shell::Get()->accelerator_controller()->SetPreventProcessingAccelerators( @@ -123,11 +125,15 @@ void ShortcutInputProvider::AdjustShortcutBlockingIfNeeded() { if (!observing_paused_ && !shortcut_input_observers_.empty()) { + Shell::Get()->shortcut_input_handler()->SetShouldConsumeKeyEvents( + /*should_consume_key_events=*/true); Shell::Get()->accelerator_controller()->SetPreventProcessingAccelerators( /*prevent_processing_accelerators=*/true); return; } + Shell::Get()->shortcut_input_handler()->SetShouldConsumeKeyEvents( + /*should_consume_key_events=*/false); Shell::Get()->accelerator_controller()->SetPreventProcessingAccelerators( /*prevent_processing_accelerators=*/false); }
diff --git a/ash/webui/common/backend/shortcut_input_provider_unittest.cc b/ash/webui/common/backend/shortcut_input_provider_unittest.cc index 8356095..57592d1f 100644 --- a/ash/webui/common/backend/shortcut_input_provider_unittest.cc +++ b/ash/webui/common/backend/shortcut_input_provider_unittest.cc
@@ -104,6 +104,8 @@ EXPECT_FALSE(Shell::Get() ->accelerator_controller() ->ShouldPreventProcessingAccelerators()); + EXPECT_FALSE( + Shell::Get()->shortcut_input_handler()->should_consume_key_events()); } TEST_F(ShortcutInputProviderTest, SimpleEvent) { @@ -120,6 +122,8 @@ EXPECT_TRUE(Shell::Get() ->accelerator_controller() ->ShouldPreventProcessingAccelerators()); + EXPECT_TRUE( + Shell::Get()->shortcut_input_handler()->should_consume_key_events()); } TEST_F(ShortcutInputProviderTest, SimpleEventNoFocus) { @@ -138,6 +142,8 @@ EXPECT_FALSE(Shell::Get() ->accelerator_controller() ->ShouldPreventProcessingAccelerators()); + EXPECT_FALSE( + Shell::Get()->shortcut_input_handler()->should_consume_key_events()); widget_->Show(); @@ -150,6 +156,8 @@ EXPECT_TRUE(Shell::Get() ->accelerator_controller() ->ShouldPreventProcessingAccelerators()); + EXPECT_TRUE( + Shell::Get()->shortcut_input_handler()->should_consume_key_events()); } TEST_F(ShortcutInputProviderTest, StopObservingTest) { @@ -166,6 +174,8 @@ EXPECT_TRUE(Shell::Get() ->accelerator_controller() ->ShouldPreventProcessingAccelerators()); + EXPECT_TRUE( + Shell::Get()->shortcut_input_handler()->should_consume_key_events()); shortcut_input_provider_->StopObservingShortcutInput(); shortcut_input_handler_->OnKeyEvent(&pressed_event); @@ -177,6 +187,8 @@ EXPECT_FALSE(Shell::Get() ->accelerator_controller() ->ShouldPreventProcessingAccelerators()); + EXPECT_FALSE( + Shell::Get()->shortcut_input_handler()->should_consume_key_events()); } TEST_F(ShortcutInputProviderTest, WidgetDestroyedTest) {
diff --git a/ash/webui/connectivity_diagnostics/connectivity_diagnostics_ui.cc b/ash/webui/connectivity_diagnostics/connectivity_diagnostics_ui.cc index 9e7dcd6..6bda209 100644 --- a/ash/webui/connectivity_diagnostics/connectivity_diagnostics_ui.cc +++ b/ash/webui/connectivity_diagnostics/connectivity_diagnostics_ui.cc
@@ -109,8 +109,7 @@ kChromeUIConnectivityDiagnosticsHost); source->OverrideContentSecurityPolicy( network::mojom::CSPDirectiveName::ScriptSrc, - "script-src chrome://resources chrome://test chrome://webui-test " - "'self';"); + "script-src chrome://resources chrome://webui-test 'self';"); ash::EnableTrustedTypesCSP(source); source->UseStringsJs();
diff --git a/ash/webui/diagnostics_ui/backend/input/input_data_provider_keyboard_unittest.cc b/ash/webui/diagnostics_ui/backend/input/input_data_provider_keyboard_unittest.cc index b3598d9..fe6ebec 100644 --- a/ash/webui/diagnostics_ui/backend/input/input_data_provider_keyboard_unittest.cc +++ b/ash/webui/diagnostics_ui/backend/input/input_data_provider_keyboard_unittest.cc
@@ -16,7 +16,7 @@ #include "ash/webui/diagnostics_ui/mojom/input_data_provider.mojom-shared.h" #include "base/command_line.h" #include "base/files/file_path.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "chromeos/ash/components/system/fake_statistics_provider.h" #include "chromeos/ash/components/test/ash_test_suite.h" #include "content/public/test/browser_task_environment.h"
diff --git a/ash/webui/diagnostics_ui/diagnostics_metrics_message_handler.cc b/ash/webui/diagnostics_ui/diagnostics_metrics_message_handler.cc index 56ee033ff..8109b47b6 100644 --- a/ash/webui/diagnostics_ui/diagnostics_metrics_message_handler.cc +++ b/ash/webui/diagnostics_ui/diagnostics_metrics_message_handler.cc
@@ -11,7 +11,7 @@ #include "base/functional/bind.h" #include "base/metrics/histogram_functions.h" #include "base/notreached.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/time/time.h" #include "content/public/browser/web_ui.h"
diff --git a/ash/webui/diagnostics_ui/diagnostics_ui.cc b/ash/webui/diagnostics_ui/diagnostics_ui.cc index e63e6cd..a4ee227 100644 --- a/ash/webui/diagnostics_ui/diagnostics_ui.cc +++ b/ash/webui/diagnostics_ui/diagnostics_ui.cc
@@ -31,7 +31,7 @@ #include "base/files/file_path.h" #include "base/logging.h" #include "base/metrics/histogram_functions.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" #include "base/values.h" @@ -410,8 +410,7 @@ kChromeUIDiagnosticsAppHost); html_source->OverrideContentSecurityPolicy( network::mojom::CSPDirectiveName::ScriptSrc, - "script-src chrome://resources chrome://test chrome://webui-test " - "'self';"); + "script-src chrome://resources chrome://webui-test 'self';"); ash::EnableTrustedTypesCSP(html_source); const auto resources = base::make_span(kAshDiagnosticsAppResources,
diff --git a/ash/webui/firmware_update_ui/firmware_update_app_ui.cc b/ash/webui/firmware_update_ui/firmware_update_app_ui.cc index 3a8d15f..009502f 100644 --- a/ash/webui/firmware_update_ui/firmware_update_app_ui.cc +++ b/ash/webui/firmware_update_ui/firmware_update_app_ui.cc
@@ -84,8 +84,7 @@ kChromeUIFirmwareUpdateAppHost); source->OverrideContentSecurityPolicy( network::mojom::CSPDirectiveName::ScriptSrc, - "script-src chrome://resources chrome://test chrome://webui-test " - "'self';"); + "script-src chrome://resources chrome://webui-test 'self';"); ash::EnableTrustedTypesCSP(source); const auto resources = base::make_span(kAshFirmwareUpdateAppResources,
diff --git a/ash/webui/os_feedback_ui/os_feedback_ui.cc b/ash/webui/os_feedback_ui/os_feedback_ui.cc index 6f65d33a..064dd25 100644 --- a/ash/webui/os_feedback_ui/os_feedback_ui.cc +++ b/ash/webui/os_feedback_ui/os_feedback_ui.cc
@@ -159,8 +159,7 @@ source->OverrideContentSecurityPolicy( network::mojom::CSPDirectiveName::ScriptSrc, - "script-src chrome://resources chrome://test chrome://webui-test " - "'self';"); + "script-src chrome://resources chrome://webui-test 'self';"); ash::EnableTrustedTypesCSP(source); const auto resources =
diff --git a/ash/webui/personalization_app/personalization_app_ui.cc b/ash/webui/personalization_app/personalization_app_ui.cc index 9177c305..bb3ef30 100644 --- a/ash/webui/personalization_app/personalization_app_ui.cc +++ b/ash/webui/personalization_app/personalization_app_ui.cc
@@ -429,8 +429,7 @@ source->OverrideContentSecurityPolicy( network::mojom::CSPDirectiveName::ScriptSrc, - "script-src chrome://resources chrome://test chrome://webui-test " - "'self';"); + "script-src chrome://resources chrome://webui-test 'self';"); ash::EnableTrustedTypesCSP(source);
diff --git a/ash/webui/print_management/print_management_ui.cc b/ash/webui/print_management/print_management_ui.cc index 6d53e05a..2ee5f57 100644 --- a/ash/webui/print_management/print_management_ui.cc +++ b/ash/webui/print_management/print_management_ui.cc
@@ -146,8 +146,7 @@ kChromeUIPrintManagementHost); html_source->OverrideContentSecurityPolicy( network::mojom::CSPDirectiveName::ScriptSrc, - "script-src chrome://resources chrome://test chrome://webui-test " - "'self';"); + "script-src chrome://resources chrome://webui-test 'self';"); ash::EnableTrustedTypesCSP(html_source); const auto resources = base::make_span(kAshPrintManagementResources,
diff --git a/ash/webui/scanning/scanning_ui.cc b/ash/webui/scanning/scanning_ui.cc index 014a6d9..36fb59e 100644 --- a/ash/webui/scanning/scanning_ui.cc +++ b/ash/webui/scanning/scanning_ui.cc
@@ -167,8 +167,7 @@ kChromeUIScanningAppHost); html_source->OverrideContentSecurityPolicy( network::mojom::CSPDirectiveName::ScriptSrc, - "script-src chrome://resources chrome://test chrome://webui-test " - "'self';"); + "script-src chrome://resources chrome://webui-test 'self';"); ash::EnableTrustedTypesCSP(html_source); accessibility_features_ = std::make_unique<AccessibilityFeatures>();
diff --git a/ash/webui/shimless_rma/shimless_rma.cc b/ash/webui/shimless_rma/shimless_rma.cc index bcce805..21ae8ec 100644 --- a/ash/webui/shimless_rma/shimless_rma.cc +++ b/ash/webui/shimless_rma/shimless_rma.cc
@@ -485,8 +485,7 @@ kChromeUIShimlessRMAHost); html_source->OverrideContentSecurityPolicy( network::mojom::CSPDirectiveName::ScriptSrc, - "script-src chrome://resources chrome://test chrome://webui-test " - "'self';"); + "script-src chrome://resources chrome://webui-test 'self';"); ash::EnableTrustedTypesCSP(html_source); const auto resources =
diff --git a/ash/webui/shortcut_customization_ui/shortcut_customization_app_ui.cc b/ash/webui/shortcut_customization_ui/shortcut_customization_app_ui.cc index f428d21..80ade37 100644 --- a/ash/webui/shortcut_customization_ui/shortcut_customization_app_ui.cc +++ b/ash/webui/shortcut_customization_ui/shortcut_customization_app_ui.cc
@@ -241,8 +241,7 @@ kChromeUIShortcutCustomizationAppHost); source->OverrideContentSecurityPolicy( network::mojom::CSPDirectiveName::ScriptSrc, - "script-src chrome://resources chrome://test chrome://webui-test " - "'self';"); + "script-src chrome://resources chrome://webui-test 'self';"); ash::EnableTrustedTypesCSP(source);
diff --git a/ash/webui/status_area_internals/status_area_internals_ui.cc b/ash/webui/status_area_internals/status_area_internals_ui.cc index af3cb9a6..ebf7ab5 100644 --- a/ash/webui/status_area_internals/status_area_internals_ui.cc +++ b/ash/webui/status_area_internals/status_area_internals_ui.cc
@@ -29,8 +29,7 @@ int default_resource) { source->OverrideContentSecurityPolicy( network::mojom::CSPDirectiveName::ScriptSrc, - "script-src chrome://resources chrome://test chrome://webui-test " - "'self';"); + "script-src chrome://resources chrome://webui-test 'self';"); ash::EnableTrustedTypesCSP(source); source->UseStringsJs();
diff --git a/ash/wm/window_state.cc b/ash/wm/window_state.cc index 0ce8093..55ac0ed 100644 --- a/ash/wm/window_state.cc +++ b/ash/wm/window_state.cc
@@ -1092,6 +1092,12 @@ const bool was_pip = old_window_state_type == WindowStateType::kPip; auto* const pip_controller = Shell::Get()->pip_controller(); if (IsPip()) { + // Set this window to `PipController`. + // The window has to be set to the controller before + // `widget->Deactivate()` because this sometimes calls + // `PipController::UpdatePipBounds()`. + pip_controller->SetPipWindow(window_); + CollisionDetectionUtils::MarkWindowPriorityForCollisionDetection( window_, CollisionDetectionUtils::RelativePriority::kPictureInPicture); // widget may not exit in some unit tests. @@ -1105,12 +1111,6 @@ wm::SetWindowVisibilityAnimationType( window_, WINDOW_VISIBILITY_ANIMATION_TYPE_FADE_IN_SLIDE_OUT); - // Add this window to `PipController`. - // `window_state->NotifyPreStateTypeChange()` because that triggers - // `PipController::UpdatePipBounds()` which needs the target to be - // set. - pip_controller->SetPipWindow(window_); - // There may already be a system ui window on the initial position. pip_controller->UpdatePipBounds();
diff --git a/ash/wm/window_state_unittest.cc b/ash/wm/window_state_unittest.cc index 6e6288a..a79dda72 100644 --- a/ash/wm/window_state_unittest.cc +++ b/ash/wm/window_state_unittest.cc
@@ -269,6 +269,25 @@ EXPECT_TRUE(window_state->IsPip()); } +// Test that the PIP window is set to the `PipController` before the +// widget is deactivated. Regression test for http://b/309362942. +TEST_F(WindowStateTest, PipWindowIsSetBeforeWidgetDeactivate) { + // Make `background_widget` to trigger shelf visibility change after + // entering PIP. + auto background_widget = CreateTestWidget(); + auto* window_state = WindowState::Get(background_widget->GetNativeWindow()); + const WMEvent enter_fullscreen(WM_EVENT_FULLSCREEN); + window_state->OnWMEvent(&enter_fullscreen); + + auto pip_widget = CreateTestWidget(); + auto* pip_window_state = WindowState::Get(pip_widget->GetNativeWindow()); + const WMEvent enter_pip(WM_EVENT_PIP); + + // Entering PIP results in shelf visibility change, but it shouldn't + // cause any crash. + pip_window_state->OnWMEvent(&enter_pip); +} + // Test that a PIP window cannot be snapped. TEST_F(WindowStateTest, PipWindowCannotSnap) { std::unique_ptr<aura::Window> window(
diff --git a/base/allocator/partition_alloc_features.cc b/base/allocator/partition_alloc_features.cc index 5918df5d..382618f9 100644 --- a/base/allocator/partition_alloc_features.cc +++ b/base/allocator/partition_alloc_features.cc
@@ -435,5 +435,11 @@ "PartitionAllocDisableBRPInBufferPartition", FEATURE_DISABLED_BY_DEFAULT); +#if BUILDFLAG(USE_FREELIST_POOL_OFFSETS) +BASE_FEATURE(kUsePoolOffsetFreelists, + "PartitionAllocUsePoolOffsetFreelists", + base::FEATURE_DISABLED_BY_DEFAULT); +#endif + } // namespace features } // namespace base
diff --git a/base/allocator/partition_alloc_features.h b/base/allocator/partition_alloc_features.h index 88786d5..a72d35ec 100644 --- a/base/allocator/partition_alloc_features.h +++ b/base/allocator/partition_alloc_features.h
@@ -220,6 +220,13 @@ BASE_EXPORT BASE_DECLARE_FEATURE(kPartitionAllocDisableBRPInBufferPartition); +// This feature is additionally gated behind a buildflag because +// pool offset freelists cannot be represented when PartitionAlloc uses +// 32-bit pointers. +#if BUILDFLAG(USE_FREELIST_POOL_OFFSETS) +BASE_EXPORT BASE_DECLARE_FEATURE(kUsePoolOffsetFreelists); +#endif + } // namespace features } // namespace base
diff --git a/base/allocator/partition_allocator/DEPS b/base/allocator/partition_allocator/DEPS index 98a3aa9..72c0d0f7 100644 --- a/base/allocator/partition_allocator/DEPS +++ b/base/allocator/partition_allocator/DEPS
@@ -2,17 +2,18 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -# PartitionAlloc library must not depend on Chromium -# project in order to be a standalone library. -noparent = True - include_rules = [ - # `partition_alloc` can depends on itself, via the `include_dirs` it declares. - "+partition_alloc", + # The basic rule is that PartitionAlloc library must not depend on Chromium + # project in order to be a standalone library. + "-base", + "-build", + "-build_overrides", + "-testing", + "-third_party", - # Build flags to infer the architecture and operating system in use. - "+build/build_config.h", - "+build/buildflag.h", + "+base/allocator/partition_allocator", + "+build/build_config.h", + "+build/buildflag.h", ] specific_include_rules = {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/address_pool_manager.cc b/base/allocator/partition_allocator/src/partition_alloc/address_pool_manager.cc index d4b6f6af..8b35d2a 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/address_pool_manager.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/address_pool_manager.cc
@@ -2,24 +2,24 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/address_pool_manager.h" +#include "base/allocator/partition_allocator/src/partition_alloc/address_pool_manager.h" #include <algorithm> #include <atomic> #include <cstdint> #include <limits> +#include "base/allocator/partition_allocator/src/partition_alloc/address_space_stats.h" +#include "base/allocator/partition_allocator/src/partition_alloc/page_allocator.h" +#include "base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/notreached.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/reservation_offset_table.h" +#include "base/allocator/partition_allocator/src/partition_alloc/thread_isolation/alignment.h" #include "build/build_config.h" -#include "partition_alloc/address_space_stats.h" -#include "partition_alloc/page_allocator.h" -#include "partition_alloc/page_allocator_constants.h" -#include "partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" -#include "partition_alloc/partition_alloc_base/notreached.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_check.h" -#include "partition_alloc/partition_alloc_constants.h" -#include "partition_alloc/reservation_offset_table.h" -#include "partition_alloc/thread_isolation/alignment.h" #if BUILDFLAG(IS_APPLE) || BUILDFLAG(ENABLE_THREAD_ISOLATION) #include <sys/mman.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/address_pool_manager.h b/base/allocator/partition_allocator/src/partition_alloc/address_pool_manager.h index 27851d2..2fc8ca20 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/address_pool_manager.h +++ b/base/allocator/partition_allocator/src/partition_alloc/address_pool_manager.h
@@ -8,22 +8,22 @@ #include <bitset> #include <limits> +#include "base/allocator/partition_allocator/src/partition_alloc/address_pool_manager_types.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_address_space.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/thread_annotations.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_lock.h" +#include "base/allocator/partition_allocator/src/partition_alloc/thread_isolation/alignment.h" +#include "base/allocator/partition_allocator/src/partition_alloc/thread_isolation/thread_isolation.h" #include "build/build_config.h" -#include "partition_alloc/address_pool_manager_types.h" -#include "partition_alloc/partition_address_space.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" -#include "partition_alloc/partition_alloc_base/thread_annotations.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_check.h" -#include "partition_alloc/partition_alloc_constants.h" -#include "partition_alloc/partition_lock.h" -#include "partition_alloc/thread_isolation/alignment.h" -#include "partition_alloc/thread_isolation/thread_isolation.h" #if !BUILDFLAG(HAS_64_BIT_POINTERS) -#include "partition_alloc/address_pool_manager_bitmap.h" +#include "base/allocator/partition_allocator/src/partition_alloc/address_pool_manager_bitmap.h" #endif namespace partition_alloc {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/address_pool_manager_bitmap.cc b/base/allocator/partition_allocator/src/partition_alloc/address_pool_manager_bitmap.cc index ace3db9..84884ad 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/address_pool_manager_bitmap.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/address_pool_manager_bitmap.cc
@@ -2,10 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/address_pool_manager_bitmap.h" +#include "base/allocator/partition_allocator/src/partition_alloc/address_pool_manager_bitmap.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h" #if !BUILDFLAG(HAS_64_BIT_POINTERS)
diff --git a/base/allocator/partition_allocator/src/partition_alloc/address_pool_manager_bitmap.h b/base/allocator/partition_allocator/src/partition_alloc/address_pool_manager_bitmap.h index a6f4102..ebbe17e7 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/address_pool_manager_bitmap.h +++ b/base/allocator/partition_allocator/src/partition_alloc/address_pool_manager_bitmap.h
@@ -10,13 +10,13 @@ #include <bitset> #include <limits> +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_lock.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_check.h" -#include "partition_alloc/partition_alloc_constants.h" -#include "partition_alloc/partition_lock.h" #if !BUILDFLAG(HAS_64_BIT_POINTERS)
diff --git a/base/allocator/partition_allocator/src/partition_alloc/address_pool_manager_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/address_pool_manager_unittest.cc index 54281ee..f2501f08 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/address_pool_manager_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/address_pool_manager_unittest.cc
@@ -2,16 +2,16 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/address_pool_manager.h" +#include "base/allocator/partition_allocator/src/partition_alloc/address_pool_manager.h" #include <cstdint> +#include "base/allocator/partition_allocator/src/partition_alloc/address_space_stats.h" +#include "base/allocator/partition_allocator/src/partition_alloc/page_allocator.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bits.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h" #include "build/build_config.h" -#include "partition_alloc/address_space_stats.h" -#include "partition_alloc/page_allocator.h" -#include "partition_alloc/partition_alloc_base/bits.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_constants.h" #include "testing/gtest/include/gtest/gtest.h" namespace partition_alloc::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/address_space_randomization.cc b/base/allocator/partition_allocator/src/partition_alloc/address_space_randomization.cc index 1a9aff75..f069c1e 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/address_space_randomization.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/address_space_randomization.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 "partition_alloc/address_space_randomization.h" +#include "base/allocator/partition_allocator/src/partition_alloc/address_space_randomization.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/random.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_check.h" -#include "partition_alloc/random.h" #if BUILDFLAG(IS_WIN) #include <windows.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/address_space_randomization.h b/base/allocator/partition_allocator/src/partition_alloc/address_space_randomization.h index 90882673..c336c54 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/address_space_randomization.h +++ b/base/allocator/partition_allocator/src/partition_alloc/address_space_randomization.h
@@ -7,10 +7,10 @@ #include <cstdint> +#include "base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" #include "build/build_config.h" -#include "partition_alloc/page_allocator_constants.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/component_export.h" namespace partition_alloc {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/address_space_randomization_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/address_space_randomization_unittest.cc index cb920da..afec439c 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/address_space_randomization_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/address_space_randomization_unittest.cc
@@ -2,16 +2,16 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/address_space_randomization.h" +#include "base/allocator/partition_allocator/src/partition_alloc/address_space_randomization.h" #include <cstdint> #include <vector> +#include "base/allocator/partition_allocator/src/partition_alloc/page_allocator.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/random.h" #include "build/build_config.h" -#include "partition_alloc/page_allocator.h" -#include "partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" -#include "partition_alloc/partition_alloc_check.h" -#include "partition_alloc/random.h" #include "testing/gtest/include/gtest/gtest.h" #if BUILDFLAG(IS_WIN)
diff --git a/base/allocator/partition_allocator/src/partition_alloc/address_space_stats.h b/base/allocator/partition_allocator/src/partition_alloc/address_space_stats.h index a580d7b..5b28417 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/address_space_stats.h +++ b/base/allocator/partition_allocator/src/partition_alloc/address_space_stats.h
@@ -7,8 +7,8 @@ #include <cstddef> -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" namespace partition_alloc {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/allocation_guard.cc b/base/allocator/partition_allocator/src/partition_alloc/allocation_guard.cc index c0bbd934..64e9410e 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/allocation_guard.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/allocation_guard.cc
@@ -2,9 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/allocation_guard.h" -#include "partition_alloc/partition_alloc_base/immediate_crash.h" -#include "partition_alloc/partition_alloc_config.h" +#include "base/allocator/partition_allocator/src/partition_alloc/allocation_guard.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/immediate_crash.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h" #if PA_CONFIG(HAS_ALLOCATION_GUARD)
diff --git a/base/allocator/partition_allocator/src/partition_alloc/allocation_guard.h b/base/allocator/partition_allocator/src/partition_alloc/allocation_guard.h index d1ae6081e..1a69198d 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/allocation_guard.h +++ b/base/allocator/partition_allocator/src/partition_alloc/allocation_guard.h
@@ -5,9 +5,9 @@ #ifndef BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_ALLOCATION_GUARD_H_ #define BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_ALLOCATION_GUARD_H_ +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_config.h" namespace partition_alloc {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/compressed_pointer.cc b/base/allocator/partition_allocator/src/partition_alloc/compressed_pointer.cc index b4d9e66..1b2e9d9 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/compressed_pointer.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/compressed_pointer.cc
@@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/compressed_pointer.h" -#include "partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/compressed_pointer.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" #if BUILDFLAG(ENABLE_POINTER_COMPRESSION)
diff --git a/base/allocator/partition_allocator/src/partition_alloc/compressed_pointer.h b/base/allocator/partition_allocator/src/partition_alloc/compressed_pointer.h index af78c06..1802c1d8 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/compressed_pointer.h +++ b/base/allocator/partition_allocator/src/partition_alloc/compressed_pointer.h
@@ -8,11 +8,11 @@ #include <climits> #include <type_traits> -#include "partition_alloc/partition_address_space.h" -#include "partition_alloc/partition_alloc_base/bits.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_address_space.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bits.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" #if BUILDFLAG(ENABLE_POINTER_COMPRESSION)
diff --git a/base/allocator/partition_allocator/src/partition_alloc/compressed_pointer_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/compressed_pointer_unittest.cc index 52de3bf..c009bbb3 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/compressed_pointer_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/compressed_pointer_unittest.cc
@@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/compressed_pointer.h" +#include "base/allocator/partition_allocator/src/partition_alloc/compressed_pointer.h" -#include "partition_alloc/partition_alloc.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_root.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_root.h" #include "testing/gtest/include/gtest/gtest.h" namespace partition_alloc {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/dangling_raw_ptr_checks.cc b/base/allocator/partition_allocator/src/partition_alloc/dangling_raw_ptr_checks.cc index b2d5632..4946b9b 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/dangling_raw_ptr_checks.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/dangling_raw_ptr_checks.cc
@@ -2,10 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/dangling_raw_ptr_checks.h" +#include "base/allocator/partition_allocator/src/partition_alloc/dangling_raw_ptr_checks.h" -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" namespace partition_alloc {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/dangling_raw_ptr_checks.h b/base/allocator/partition_allocator/src/partition_alloc/dangling_raw_ptr_checks.h index 3ee9493..0e118265ba 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/dangling_raw_ptr_checks.h +++ b/base/allocator/partition_allocator/src/partition_alloc/dangling_raw_ptr_checks.h
@@ -7,7 +7,7 @@ #include <cstdint> -#include "partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" // When compiled with build flags `enable_dangling_raw_ptr_checks`, dangling // raw_ptr are reported. Its behavior can be configured here.
diff --git a/base/allocator/partition_allocator/src/partition_alloc/encoded_next_freelist.h b/base/allocator/partition_allocator/src/partition_alloc/encoded_next_freelist.h index 323899b..89f5845 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/encoded_next_freelist.h +++ b/base/allocator/partition_allocator/src/partition_alloc/encoded_next_freelist.h
@@ -8,20 +8,20 @@ #include <cstddef> #include <cstdint> +#include "base/allocator/partition_allocator/src/partition_alloc/freeslot_bitmap.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc-inl.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/immediate_crash.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_ref_count.h" #include "build/build_config.h" -#include "partition_alloc/freeslot_bitmap.h" -#include "partition_alloc/partition_alloc-inl.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" -#include "partition_alloc/partition_alloc_base/immediate_crash.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_check.h" -#include "partition_alloc/partition_alloc_config.h" -#include "partition_alloc/partition_alloc_constants.h" -#include "partition_alloc/partition_ref_count.h" #if !defined(ARCH_CPU_BIG_ENDIAN) -#include "partition_alloc/reverse_bytes.h" +#include "base/allocator/partition_allocator/src/partition_alloc/reverse_bytes.h" #endif // !defined(ARCH_CPU_BIG_ENDIAN) namespace partition_alloc::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/extended_api.cc b/base/allocator/partition_allocator/src/partition_alloc/extended_api.cc index f87f071..5ca0c0f 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/extended_api.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/extended_api.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 "partition_alloc/extended_api.h" +#include "base/allocator/partition_allocator/src/partition_alloc/extended_api.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_config.h" -#include "partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.h" -#include "partition_alloc/thread_cache.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h" +#include "base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.h" +#include "base/allocator/partition_allocator/src/partition_alloc/thread_cache.h" namespace partition_alloc::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/extended_api.h b/base/allocator/partition_allocator/src/partition_alloc/extended_api.h index fd57e63b..7b154b6 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/extended_api.h +++ b/base/allocator/partition_allocator/src/partition_alloc/extended_api.h
@@ -5,10 +5,10 @@ #ifndef BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_EXTENDED_API_H_ #define BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_EXTENDED_API_H_ -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_root.h" -#include "partition_alloc/partition_stats.h" -#include "partition_alloc/thread_cache.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_root.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_stats.h" +#include "base/allocator/partition_allocator/src/partition_alloc/thread_cache.h" namespace partition_alloc::internal { // Get allocation stats for the thread cache partition on the current
diff --git a/base/allocator/partition_allocator/src/partition_alloc/freeslot_bitmap.h b/base/allocator/partition_allocator/src/partition_alloc/freeslot_bitmap.h index 50b0ae21..c11b78d2 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/freeslot_bitmap.h +++ b/base/allocator/partition_allocator/src/partition_alloc/freeslot_bitmap.h
@@ -9,11 +9,11 @@ #include <cstdint> #include <utility> -#include "partition_alloc/freeslot_bitmap_constants.h" -#include "partition_alloc/partition_alloc_base/bits.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/freeslot_bitmap_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bits.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h" #if BUILDFLAG(USE_FREESLOT_BITMAP)
diff --git a/base/allocator/partition_allocator/src/partition_alloc/freeslot_bitmap_constants.h b/base/allocator/partition_allocator/src/partition_alloc/freeslot_bitmap_constants.h index 2b20e72b..00e0a5d 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/freeslot_bitmap_constants.h +++ b/base/allocator/partition_allocator/src/partition_alloc/freeslot_bitmap_constants.h
@@ -7,12 +7,12 @@ #include <cstdint> -#include "partition_alloc/partition_alloc_base/bits.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_constants.h" -#include "partition_alloc/partition_alloc_forward.h" -#include "partition_alloc/reservation_offset_table.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bits.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_forward.h" +#include "base/allocator/partition_allocator/src/partition_alloc/reservation_offset_table.h" namespace partition_alloc::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/freeslot_bitmap_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/freeslot_bitmap_unittest.cc index cbeaa3c..31920e1 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/freeslot_bitmap_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/freeslot_bitmap_unittest.cc
@@ -2,18 +2,18 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/freeslot_bitmap.h" +#include "base/allocator/partition_allocator/src/partition_alloc/freeslot_bitmap.h" #include <cstdint> #include <limits> -#include "partition_alloc/freeslot_bitmap_constants.h" -#include "partition_alloc/partition_alloc.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_constants.h" -#include "partition_alloc/partition_alloc_forward.h" -#include "partition_alloc/partition_page.h" -#include "partition_alloc/partition_root.h" +#include "base/allocator/partition_allocator/src/partition_alloc/freeslot_bitmap_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_forward.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_page.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_root.h" #include "testing/gtest/include/gtest/gtest.h" // This test is disabled when MEMORY_TOOL_REPLACES_ALLOCATOR is defined because
diff --git a/base/allocator/partition_allocator/src/partition_alloc/gwp_asan_support.cc b/base/allocator/partition_allocator/src/partition_alloc/gwp_asan_support.cc index a562e43..31b8569 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/gwp_asan_support.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/gwp_asan_support.cc
@@ -2,20 +2,20 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/gwp_asan_support.h" +#include "base/allocator/partition_allocator/src/partition_alloc/gwp_asan_support.h" #if BUILDFLAG(ENABLE_GWP_ASAN_SUPPORT) +#include "base/allocator/partition_allocator/src/partition_alloc/freeslot_bitmap_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/no_destructor.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_bucket.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_lock.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_page.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_ref_count.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_root.h" #include "build/build_config.h" -#include "partition_alloc/freeslot_bitmap_constants.h" -#include "partition_alloc/page_allocator_constants.h" -#include "partition_alloc/partition_alloc_base/no_destructor.h" -#include "partition_alloc/partition_alloc_check.h" -#include "partition_alloc/partition_bucket.h" -#include "partition_alloc/partition_lock.h" -#include "partition_alloc/partition_page.h" -#include "partition_alloc/partition_ref_count.h" -#include "partition_alloc/partition_root.h" namespace partition_alloc {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/gwp_asan_support.h b/base/allocator/partition_allocator/src/partition_alloc/gwp_asan_support.h index e68bac47..697acbb 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/gwp_asan_support.h +++ b/base/allocator/partition_allocator/src/partition_alloc/gwp_asan_support.h
@@ -5,8 +5,8 @@ #ifndef BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_GWP_ASAN_SUPPORT_H_ #define BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_GWP_ASAN_SUPPORT_H_ -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" #if BUILDFLAG(ENABLE_GWP_ASAN_SUPPORT)
diff --git a/base/allocator/partition_allocator/src/partition_alloc/hardening_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/hardening_unittest.cc index 8a80371..f2a83925 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/hardening_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/hardening_unittest.cc
@@ -6,11 +6,11 @@ #include <string> #include <vector> +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_freelist_entry.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_page.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_root.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_config.h" -#include "partition_alloc/partition_freelist_entry.h" -#include "partition_alloc/partition_page.h" -#include "partition_alloc/partition_root.h" #include "testing/gtest/include/gtest/gtest.h" // With *SAN, PartitionAlloc is rerouted to malloc().
diff --git a/base/allocator/partition_allocator/src/partition_alloc/lightweight_quarantine.cc b/base/allocator/partition_allocator/src/partition_alloc/lightweight_quarantine.cc index 100e316..28bba39e 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/lightweight_quarantine.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/lightweight_quarantine.cc
@@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/lightweight_quarantine.h" +#include "base/allocator/partition_allocator/src/partition_alloc/lightweight_quarantine.h" -#include "partition_alloc/partition_page.h" -#include "partition_alloc/partition_root.h" -#include "partition_alloc/partition_stats.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_page.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_root.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_stats.h" namespace partition_alloc::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/lightweight_quarantine.h b/base/allocator/partition_allocator/src/partition_alloc/lightweight_quarantine.h index a611cec..b34759d29 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/lightweight_quarantine.h +++ b/base/allocator/partition_allocator/src/partition_alloc/lightweight_quarantine.h
@@ -25,11 +25,11 @@ #include <numeric> #include <type_traits> -#include "partition_alloc/partition_alloc_base/bits.h" -#include "partition_alloc/partition_alloc_base/export_template.h" -#include "partition_alloc/partition_alloc_base/rand_util.h" -#include "partition_alloc/partition_alloc_base/thread_annotations.h" -#include "partition_alloc/partition_lock.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bits.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/export_template.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/thread_annotations.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_lock.h" namespace partition_alloc {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/lightweight_quarantine_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/lightweight_quarantine_unittest.cc index c60b8346..89f8b57 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/lightweight_quarantine_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/lightweight_quarantine_unittest.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 "partition_alloc/lightweight_quarantine.h" +#include "base/allocator/partition_allocator/src/partition_alloc/lightweight_quarantine.h" -#include "partition_alloc/partition_alloc_for_testing.h" -#include "partition_alloc/partition_page.h" -#include "partition_alloc/partition_root.h" -#include "partition_alloc/partition_stats.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_for_testing.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_page.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_root.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_stats.h" #include "testing/gtest/include/gtest/gtest.h" namespace partition_alloc {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/memory_reclaimer.cc b/base/allocator/partition_allocator/src/partition_alloc/memory_reclaimer.cc index f6f1acb9..d700cb50 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/memory_reclaimer.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/memory_reclaimer.cc
@@ -2,16 +2,16 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/memory_reclaimer.h" +#include "base/allocator/partition_allocator/src/partition_alloc/memory_reclaimer.h" -#include "partition_alloc/partition_alloc.h" -#include "partition_alloc/partition_alloc_base/no_destructor.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_check.h" -#include "partition_alloc/partition_alloc_config.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/no_destructor.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h" #if BUILDFLAG(USE_STARSCAN) -#include "partition_alloc/starscan/pcscan.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan.h" #endif namespace partition_alloc {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/memory_reclaimer.h b/base/allocator/partition_allocator/src/partition_alloc/memory_reclaimer.h index c793a9b..82a23476 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/memory_reclaimer.h +++ b/base/allocator/partition_allocator/src/partition_alloc/memory_reclaimer.h
@@ -8,12 +8,12 @@ #include <memory> #include <set> -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_base/no_destructor.h" -#include "partition_alloc/partition_alloc_base/thread_annotations.h" -#include "partition_alloc/partition_alloc_base/time/time.h" -#include "partition_alloc/partition_alloc_forward.h" -#include "partition_alloc/partition_lock.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/no_destructor.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/thread_annotations.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_forward.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_lock.h" namespace partition_alloc {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/memory_reclaimer_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/memory_reclaimer_unittest.cc index 742138c1..38b51a7 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/memory_reclaimer_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/memory_reclaimer_unittest.cc
@@ -2,24 +2,24 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/memory_reclaimer.h" +#include "base/allocator/partition_allocator/src/partition_alloc/memory_reclaimer.h" #include <memory> #include <utility> +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_for_testing.h" +#include "base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/logging.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_config.h" -#include "partition_alloc/partition_alloc_for_testing.h" -#include "partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.h" #include "testing/gtest/include/gtest/gtest.h" #if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && \ PA_CONFIG(THREAD_CACHE_SUPPORTED) -#include "partition_alloc/extended_api.h" -#include "partition_alloc/thread_cache.h" +#include "base/allocator/partition_allocator/src/partition_alloc/extended_api.h" +#include "base/allocator/partition_allocator/src/partition_alloc/thread_cache.h" #endif // Otherwise, PartitionAlloc doesn't allocate any memory, and the tests are
diff --git a/base/allocator/partition_allocator/src/partition_alloc/oom.cc b/base/allocator/partition_allocator/src/partition_alloc/oom.cc index f6839ebc..1d695683 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/oom.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/oom.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 "partition_alloc/oom.h" +#include "base/allocator/partition_allocator/src/partition_alloc/oom.h" +#include "base/allocator/partition_allocator/src/partition_alloc/oom_callback.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/alias.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/immediate_crash.h" #include "build/build_config.h" -#include "partition_alloc/oom_callback.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/debug/alias.h" -#include "partition_alloc/partition_alloc_base/immediate_crash.h" #if BUILDFLAG(IS_WIN) #include <windows.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/oom.h b/base/allocator/partition_allocator/src/partition_alloc/oom.h index 7cc20696..a6657f6c 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/oom.h +++ b/base/allocator/partition_allocator/src/partition_alloc/oom.h
@@ -7,13 +7,13 @@ #include <cstddef> +#include "base/allocator/partition_allocator/src/partition_alloc/allocation_guard.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" #include "build/build_config.h" -#include "partition_alloc/allocation_guard.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/component_export.h" #if BUILDFLAG(IS_WIN) -#include "partition_alloc/partition_alloc_base/win/windows_types.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/win/windows_types.h" #endif namespace partition_alloc {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/oom_callback.cc b/base/allocator/partition_allocator/src/partition_alloc/oom_callback.cc index 0db8407..3528489 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/oom_callback.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/oom_callback.cc
@@ -2,9 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/oom_callback.h" +#include "base/allocator/partition_allocator/src/partition_alloc/oom_callback.h" -#include "partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" namespace partition_alloc {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/oom_callback.h b/base/allocator/partition_allocator/src/partition_alloc/oom_callback.h index a8611c0..5f816f4 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/oom_callback.h +++ b/base/allocator/partition_allocator/src/partition_alloc/oom_callback.h
@@ -5,7 +5,7 @@ #ifndef BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_OOM_CALLBACK_H_ #define BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_OOM_CALLBACK_H_ -#include "partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" namespace partition_alloc {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/page_allocator.cc b/base/allocator/partition_allocator/src/partition_alloc/page_allocator.cc index f05060f3..d8134e6 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/page_allocator.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/page_allocator.cc
@@ -2,29 +2,29 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/page_allocator.h" +#include "base/allocator/partition_allocator/src/partition_alloc/page_allocator.h" #include <atomic> #include <cstdint> +#include "base/allocator/partition_allocator/src/partition_alloc/address_space_randomization.h" +#include "base/allocator/partition_allocator/src/partition_alloc/page_allocator_internal.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bits.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/thread_annotations.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_lock.h" #include "build/build_config.h" -#include "partition_alloc/address_space_randomization.h" -#include "partition_alloc/page_allocator_internal.h" -#include "partition_alloc/partition_alloc_base/bits.h" -#include "partition_alloc/partition_alloc_base/thread_annotations.h" -#include "partition_alloc/partition_alloc_check.h" -#include "partition_alloc/partition_lock.h" #if BUILDFLAG(IS_WIN) #include <windows.h> #endif #if BUILDFLAG(IS_WIN) -#include "partition_alloc/page_allocator_internals_win.h" +#include "base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_win.h" #elif BUILDFLAG(IS_POSIX) -#include "partition_alloc/page_allocator_internals_posix.h" +#include "base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.h" #elif BUILDFLAG(IS_FUCHSIA) -#include "partition_alloc/page_allocator_internals_fuchsia.h" +#include "base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_fuchsia.h" #else #error Platform not supported. #endif
diff --git a/base/allocator/partition_allocator/src/partition_alloc/page_allocator.h b/base/allocator/partition_allocator/src/partition_alloc/page_allocator.h index 307735e..17569be 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/page_allocator.h +++ b/base/allocator/partition_allocator/src/partition_alloc/page_allocator.h
@@ -8,12 +8,12 @@ #include <cstddef> #include <cstdint> +#include "base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/thread_isolation/thread_isolation.h" #include "build/build_config.h" -#include "partition_alloc/page_allocator_constants.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/thread_isolation/thread_isolation.h" namespace partition_alloc {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h b/base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h index 8f11cf1..cb6116c 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h +++ b/base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h
@@ -7,9 +7,9 @@ #include <stddef.h> +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/component_export.h" #if BUILDFLAG(IS_APPLE) && defined(ARCH_CPU_64_BITS)
diff --git a/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internal.h b/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internal.h index 0a97ca57..0a2b13c 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internal.h +++ b/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internal.h
@@ -8,7 +8,7 @@ #include <cstddef> #include <cstdint> -#include "partition_alloc/page_allocator.h" +#include "base/allocator/partition_allocator/src/partition_alloc/page_allocator.h" namespace partition_alloc::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_fuchsia.h b/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_fuchsia.h index f9347a6..256d783 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_fuchsia.h +++ b/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_fuchsia.h
@@ -20,11 +20,11 @@ #include <cstdint> -#include "partition_alloc/page_allocator.h" -#include "partition_alloc/partition_alloc_base/fuchsia/fuchsia_logging.h" -#include "partition_alloc/partition_alloc_base/no_destructor.h" -#include "partition_alloc/partition_alloc_base/notreached.h" -#include "partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/page_allocator.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/fuchsia/fuchsia_logging.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/no_destructor.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/notreached.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" namespace partition_alloc::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.cc b/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.cc index 571c2c0c..e96514f 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.cc
@@ -2,9 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/page_allocator.h" -#include "partition_alloc/partition_alloc_base/cpu.h" -#include "partition_alloc/partition_alloc_base/notreached.h" +#include "base/allocator/partition_allocator/src/partition_alloc/page_allocator.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cpu.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/notreached.h" #include <sys/mman.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.h b/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.h index 45c5a30..75b45a1 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.h +++ b/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_posix.h
@@ -13,26 +13,26 @@ #include <sys/mman.h> +#include "base/allocator/partition_allocator/src/partition_alloc/oom.h" +#include "base/allocator/partition_allocator/src/partition_alloc/page_allocator.h" +#include "base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/notreached.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/posix/eintr_wrapper.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/thread_isolation/thread_isolation.h" #include "build/build_config.h" -#include "partition_alloc/oom.h" -#include "partition_alloc/page_allocator.h" -#include "partition_alloc/page_allocator_constants.h" -#include "partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" -#include "partition_alloc/partition_alloc_base/notreached.h" -#include "partition_alloc/partition_alloc_base/posix/eintr_wrapper.h" -#include "partition_alloc/partition_alloc_check.h" -#include "partition_alloc/thread_isolation/thread_isolation.h" #if BUILDFLAG(IS_APPLE) -#include "partition_alloc/partition_alloc_base/apple/foundation_util.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/foundation_util.h" #if BUILDFLAG(IS_IOS) -#include "partition_alloc/partition_alloc_base/ios/ios_util.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/ios/ios_util.h" #elif BUILDFLAG(IS_MAC) -#include "partition_alloc/partition_alloc_base/mac/mac_util.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/mac/mac_util.h" #else #error "Unknown platform" #endif -#include "partition_alloc/partition_alloc_base/apple/scoped_cftyperef.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/scoped_cftyperef.h" #include <Availability.h> #include <Security/Security.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_win.h b/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_win.h index 84beb88..4c5469b 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_win.h +++ b/base/allocator/partition_allocator/src/partition_alloc/page_allocator_internals_win.h
@@ -7,12 +7,12 @@ #include <cstdint> -#include "partition_alloc/oom.h" -#include "partition_alloc/page_allocator.h" -#include "partition_alloc/page_allocator_internal.h" -#include "partition_alloc/partition_alloc_base/notreached.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/oom.h" +#include "base/allocator/partition_allocator/src/partition_alloc/page_allocator.h" +#include "base/allocator/partition_allocator/src/partition_alloc/page_allocator_internal.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/notreached.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" namespace partition_alloc::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/page_allocator_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/page_allocator_unittest.cc index 048cdbb7..772a3d1 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/page_allocator_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/page_allocator_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 "partition_alloc/page_allocator.h" +#include "base/allocator/partition_allocator/src/partition_alloc/page_allocator.h" #include <stdlib.h> #include <string.h> @@ -12,14 +12,14 @@ #include <string> #include <vector> +#include "base/allocator/partition_allocator/src/partition_alloc/address_space_randomization.h" +#include "base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cpu.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/notreached.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h" +#include "base/allocator/partition_allocator/src/partition_alloc/tagging.h" #include "build/build_config.h" -#include "partition_alloc/address_space_randomization.h" -#include "partition_alloc/page_allocator_constants.h" -#include "partition_alloc/partition_alloc_base/cpu.h" -#include "partition_alloc/partition_alloc_base/logging.h" -#include "partition_alloc/partition_alloc_base/notreached.h" -#include "partition_alloc/partition_alloc_config.h" -#include "partition_alloc/tagging.h" #if defined(LINUX_NAME_REGION) #include "base/debug/proc_maps_linux.h" @@ -34,7 +34,7 @@ #include <sys/time.h> #endif // BUILDFLAG(IS_POSIX) -#include "partition_alloc/arm_bti_test_functions.h" +#include "base/allocator/partition_allocator/src/partition_alloc/arm_bti_test_functions.h" #if PA_CONFIG(HAS_MEMORY_TAGGING) #include <arm_acle.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_address_space.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_address_space.cc index 6ad0d1f..8df4cc0 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_address_space.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_address_space.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 "partition_alloc/partition_address_space.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_address_space.h" #include <array> #include <cstddef> @@ -10,18 +10,18 @@ #include <ostream> #include <string> +#include "base/allocator/partition_allocator/src/partition_alloc/address_pool_manager.h" +#include "base/allocator/partition_allocator/src/partition_alloc/compressed_pointer.h" +#include "base/allocator/partition_allocator/src/partition_alloc/page_allocator.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bits.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/alias.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/thread_isolation/thread_isolation.h" #include "build/build_config.h" -#include "partition_alloc/address_pool_manager.h" -#include "partition_alloc/compressed_pointer.h" -#include "partition_alloc/page_allocator.h" -#include "partition_alloc/partition_alloc_base/bits.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/debug/alias.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_check.h" -#include "partition_alloc/partition_alloc_config.h" -#include "partition_alloc/partition_alloc_constants.h" -#include "partition_alloc/thread_isolation/thread_isolation.h" #if BUILDFLAG(IS_IOS) #include <mach-o/dyld.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_address_space.h b/base/allocator/partition_allocator/src/partition_alloc/partition_address_space.h index d6a342b..dec969509 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_address_space.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_address_space.h
@@ -8,22 +8,22 @@ #include <cstddef> #include <utility> +#include "base/allocator/partition_allocator/src/partition_alloc/address_pool_manager_types.h" +#include "base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bits.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/notreached.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_forward.h" +#include "base/allocator/partition_allocator/src/partition_alloc/thread_isolation/alignment.h" #include "build/build_config.h" -#include "partition_alloc/address_pool_manager_types.h" -#include "partition_alloc/page_allocator_constants.h" -#include "partition_alloc/partition_alloc_base/bits.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_base/notreached.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_check.h" -#include "partition_alloc/partition_alloc_config.h" -#include "partition_alloc/partition_alloc_constants.h" -#include "partition_alloc/partition_alloc_forward.h" -#include "partition_alloc/thread_isolation/alignment.h" #if BUILDFLAG(ENABLE_THREAD_ISOLATION) -#include "partition_alloc/thread_isolation/thread_isolation.h" +#include "base/allocator/partition_allocator/src/partition_alloc/thread_isolation/thread_isolation.h" #endif // The feature is not applicable to 32-bit address space.
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc-inl.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc-inl.h index 129b4bc..e808347 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc-inl.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc-inl.h
@@ -8,14 +8,14 @@ #include <algorithm> #include <cstring> +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_ref_count.h" +#include "base/allocator/partition_allocator/src/partition_alloc/random.h" +#include "base/allocator/partition_allocator/src/partition_alloc/tagging.h" +#include "base/allocator/partition_allocator/src/partition_alloc/thread_isolation/thread_isolation.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" -#include "partition_alloc/partition_alloc_config.h" -#include "partition_alloc/partition_ref_count.h" -#include "partition_alloc/random.h" -#include "partition_alloc/tagging.h" -#include "partition_alloc/thread_isolation/thread_isolation.h" // Prefetch *x into memory. #if defined(__clang__) || defined(COMPILER_GCC)
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc.cc index b33d5c8..780aa65 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc.cc
@@ -2,27 +2,27 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/partition_alloc.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc.h" #include <string.h> #include <cstdint> #include <memory> -#include "partition_alloc/address_pool_manager.h" -#include "partition_alloc/memory_reclaimer.h" -#include "partition_alloc/partition_address_space.h" -#include "partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_hooks.h" -#include "partition_alloc/partition_direct_map_extent.h" -#include "partition_alloc/partition_oom.h" -#include "partition_alloc/partition_page.h" -#include "partition_alloc/partition_root.h" -#include "partition_alloc/partition_stats.h" +#include "base/allocator/partition_allocator/src/partition_alloc/address_pool_manager.h" +#include "base/allocator/partition_allocator/src/partition_alloc/memory_reclaimer.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_address_space.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_hooks.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_direct_map_extent.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_oom.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_page.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_root.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_stats.h" #if BUILDFLAG(USE_STARSCAN) -#include "partition_alloc/starscan/pcscan.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan.h" #endif namespace partition_alloc {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc.h index 1e23b94e..c88946f 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc.h
@@ -5,11 +5,11 @@ #ifndef BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_PARTITION_ALLOC_H_ #define BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_PARTITION_ALLOC_H_ -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_forward.h" -#include "partition_alloc/partition_oom.h" -#include "partition_alloc/partition_root.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_forward.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_oom.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_root.h" // *** HOUSEKEEPING RULES *** //
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_allocation_data.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_allocation_data.h index 709d154..ec47adff 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_allocation_data.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_allocation_data.h
@@ -7,9 +7,9 @@ #include <cstdint> -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/tagging.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/tagging.h" namespace partition_alloc {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/foundation_util.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/foundation_util.h index 037d429..516538b2 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/foundation_util.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/foundation_util.h
@@ -7,7 +7,7 @@ #include <CoreFoundation/CoreFoundation.h> -#include "partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" namespace partition_alloc::internal::base::apple {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/foundation_util.mm b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/foundation_util.mm index 7bcafc3..e49906b 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/foundation_util.mm +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/foundation_util.mm
@@ -2,9 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/partition_alloc_base/apple/foundation_util.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/foundation_util.h" -#include "partition_alloc/partition_alloc_base/check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/check.h" namespace partition_alloc::internal::base::apple {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/mach_logging.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/mach_logging.cc index 759fb15..21d6aa27 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/mach_logging.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/mach_logging.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 "partition_alloc/partition_alloc_base/apple/mach_logging.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/mach_logging.h" #include <iomanip> #include <string> -#include "partition_alloc/partition_alloc_base/strings/stringprintf.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/stringprintf.h" namespace {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/mach_logging.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/mach_logging.h index 6b632d6f..2f3b504 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/mach_logging.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/mach_logging.h
@@ -7,10 +7,10 @@ #include <mach/mach.h> +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" -#include "partition_alloc/partition_alloc_base/logging.h" // Use the PA_MACH_LOG family of macros along with a mach_error_t // (kern_return_t) containing a Mach error. The error value will be decoded so
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/scoped_cftyperef.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/scoped_cftyperef.h index 297f1ef1..147386e 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/scoped_cftyperef.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/scoped_cftyperef.h
@@ -7,7 +7,7 @@ #include <CoreFoundation/CoreFoundation.h> -#include "partition_alloc/partition_alloc_base/apple/scoped_typeref.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/scoped_typeref.h" namespace partition_alloc::internal::base::apple {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/scoped_typeref.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/scoped_typeref.h index 3f6dab7f..0df3e7e 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/scoped_typeref.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/scoped_typeref.h
@@ -5,8 +5,8 @@ #ifndef BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_PARTITION_ALLOC_BASE_APPLE_SCOPED_TYPEREF_H_ #define BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_PARTITION_ALLOC_BASE_APPLE_SCOPED_TYPEREF_H_ -#include "partition_alloc/partition_alloc_base/check.h" -#include "partition_alloc/partition_alloc_base/memory/scoped_policy.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/scoped_policy.h" namespace partition_alloc::internal::base::apple {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/augmentations/compiler_specific.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/augmentations/compiler_specific.h index 1310a7d2..29674f3 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/augmentations/compiler_specific.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/augmentations/compiler_specific.h
@@ -7,7 +7,7 @@ // Extensions for PA's copy of `//base/compiler_specific.h`. -#include "partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" // PA_ATTRIBUTE_RETURNS_NONNULL //
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bit_cast.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bit_cast.h index 0918a56..7a0d0b2 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bit_cast.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bit_cast.h
@@ -7,7 +7,7 @@ #include <type_traits> -#include "partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" #if !PA_HAS_BUILTIN(__builtin_bit_cast) #include <string.h> // memcpy
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bits.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bits.h index d9538c3..2af5acd 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bits.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bits.h
@@ -11,9 +11,9 @@ #include <cstdint> #include <type_traits> +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/check.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" namespace partition_alloc::internal::base::bits {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bits_pa_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bits_pa_unittest.cc index 2d052b003..3f595bb 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bits_pa_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bits_pa_unittest.cc
@@ -4,7 +4,7 @@ // This file contains the unit tests for the bit utilities. -#include "partition_alloc/partition_alloc_base/bits.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bits.h" #include <cstddef> #include <limits>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/check.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/check.cc index 9db9470..bc67e1e 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/check.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/check.cc
@@ -2,9 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/partition_alloc_base/check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/check.h" -#include "partition_alloc/partition_alloc_base/logging.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging.h" namespace partition_alloc::internal::logging {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/check.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/check.h index 054ca3d..ff8efa4a 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/check.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/check.h
@@ -7,12 +7,12 @@ #include <iosfwd> -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" -#include "partition_alloc/partition_alloc_base/immediate_crash.h" -#include "partition_alloc/partition_alloc_base/log_message.h" -#include "partition_alloc/partition_alloc_base/strings/cstring_builder.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/immediate_crash.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/log_message.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/cstring_builder.h" #define PA_STRINGIFY_IMPL(s) #s #define PA_STRINGIFY(s) PA_STRINGIFY_IMPL(s)
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export_pa_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export_pa_unittest.cc index 4d205b05..bb4fd2b 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export_pa_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export_pa_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 "partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" #include "testing/gtest/include/gtest/gtest.h" namespace partition_alloc::internal::base {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cpu.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cpu.cc index b24b8936..0000d86a 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cpu.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cpu.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 "partition_alloc/partition_alloc_base/cpu.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cpu.h" #include <inttypes.h> #include <limits.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cpu.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cpu.h index 929f122d0..ec3590c 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cpu.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cpu.h
@@ -5,8 +5,8 @@ #ifndef BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_PARTITION_ALLOC_BASE_CPU_H_ #define BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_PARTITION_ALLOC_BASE_CPU_H_ +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/component_export.h" namespace partition_alloc::internal::base {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cpu_pa_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cpu_pa_unittest.cc index 063159ae..ea168af 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cpu_pa_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cpu_pa_unittest.cc
@@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cpu.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/cpu.h" #include "testing/gtest/include/gtest/gtest.h" namespace partition_alloc {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/alias.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/alias.cc index 842266a..12ac7068 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/alias.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/alias.cc
@@ -2,9 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/partition_alloc_base/debug/alias.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/alias.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" namespace partition_alloc::internal::base::debug {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/alias.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/alias.h index f72d042..2289c39d 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/alias.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/alias.h
@@ -7,7 +7,7 @@ #include <stddef.h> -#include "partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" namespace partition_alloc::internal::base::debug {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace.cc index 28a630c..e789c541 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace.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 "partition_alloc/partition_alloc_base/debug/stack_trace.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/process/process_handle.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/check.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/process/process_handle.h" -#include "partition_alloc/partition_alloc_base/threading/platform_thread.h" #include <stdint.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace.h index 24c1deb4..740529a 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace.h
@@ -8,9 +8,9 @@ #include <stddef.h> #include <stdint.h> +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" namespace partition_alloc::internal::base::debug {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_android.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_android.cc index 65e6e43..bb945a3 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_android.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_android.cc
@@ -2,10 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/partition_alloc_base/debug/stack_trace.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace.h" -#include "partition_alloc/partition_alloc_base/logging.h" -#include "partition_alloc/partition_alloc_base/strings/safe_sprintf.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/safe_sprintf.h" #include <string.h> #include <unistd.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_linux.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_linux.cc index f9dfe86..6c61163 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_linux.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_linux.cc
@@ -2,10 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/partition_alloc_base/debug/stack_trace.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" namespace partition_alloc::internal::base::debug {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_mac.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_mac.cc index 4fc9155..be4678d 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_mac.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_mac.cc
@@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/partition_alloc_base/debug/stack_trace.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_conversions.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" -#include "partition_alloc/partition_alloc_base/numerics/safe_conversions.h" // Surprisingly, uClibc defines __GLIBC__ in some build configs, but // execinfo.h and backtrace(3) are really only present in glibc and in macOS
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_posix.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_posix.cc index 3fed895c..caa5791 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_posix.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_posix.cc
@@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/partition_alloc_base/debug/stack_trace.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace.h" -#include "partition_alloc/partition_alloc_base/logging.h" -#include "partition_alloc/partition_alloc_base/posix/eintr_wrapper.h" -#include "partition_alloc/partition_alloc_base/strings/safe_sprintf.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/posix/eintr_wrapper.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/safe_sprintf.h" #include <fcntl.h> #include <string.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_win.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_win.cc index 00b34f17..dd347d0 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_win.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace_win.cc
@@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/partition_alloc_base/debug/stack_trace.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace.h" -#include "partition_alloc/partition_alloc_base/logging.h" -#include "partition_alloc/partition_alloc_base/process/process_handle.h" -#include "partition_alloc/partition_alloc_base/strings/safe_sprintf.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/process/process_handle.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/safe_sprintf.h" #include <windows.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/file_path.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/file_path.cc index dfa436a..3700c7f 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/file_path.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/file_path.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 "partition_alloc/partition_alloc_base/files/file_path.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/file_path.h" #include <string.h> #include <algorithm> -#include "partition_alloc/partition_alloc_base/check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/check.h" #if BUILDFLAG(IS_WIN) #include <windows.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/file_path.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/file_path.h index 76e98af..609d49cb 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/file_path.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/file_path.h
@@ -106,8 +106,8 @@ #include <iosfwd> #include <string> +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/component_export.h" // Windows-style drive letter support and pathname separator characters can be // enabled and disabled independently, to aid testing. These #defines are
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/file_path_pa_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/file_path_pa_unittest.cc index 43f7296..33cde7b 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/file_path_pa_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/file_path_pa_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 "partition_alloc/partition_alloc_base/files/file_path.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/file_path.h" #include <stddef.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/file_util.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/file_util.h index 89e95d01..cd80918f 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/file_util.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/file_util.h
@@ -12,8 +12,8 @@ #include <stdint.h> #include <stdio.h> +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/component_export.h" #if BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA) #include <sys/stat.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/file_util_posix.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/file_util_posix.cc index ac1795d..ed3754ca 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/file_util_posix.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/file_util_posix.cc
@@ -2,9 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/partition_alloc_base/files/file_util.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/file_util.h" -#include "partition_alloc/partition_alloc_base/posix/eintr_wrapper.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/posix/eintr_wrapper.h" namespace partition_alloc::internal::base {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/fuchsia/fuchsia_logging.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/fuchsia/fuchsia_logging.cc index 3c9e10e..1074ab10b 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/fuchsia/fuchsia_logging.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/fuchsia/fuchsia_logging.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 "partition_alloc/partition_alloc_base/fuchsia/fuchsia_logging.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/fuchsia/fuchsia_logging.h" #include <zircon/status.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/fuchsia/fuchsia_logging.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/fuchsia/fuchsia_logging.h index 879c8fe..0f17854 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/fuchsia/fuchsia_logging.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/fuchsia/fuchsia_logging.h
@@ -8,10 +8,10 @@ #include <lib/fit/function.h> #include <zircon/types.h> +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" -#include "partition_alloc/partition_alloc_base/logging.h" // Use the PA_ZX_LOG family of macros along with a zx_status_t containing a // Zircon error. The error value will be decoded so that logged messages explain
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/fuchsia/fuchsia_logging_pa_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/fuchsia/fuchsia_logging_pa_unittest.cc index 271d4483..f020680 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/fuchsia/fuchsia_logging_pa_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/fuchsia/fuchsia_logging_pa_unittest.cc
@@ -2,14 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/partition_alloc_base/fuchsia/fuchsia_logging.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/fuchsia/fuchsia_logging.h" #include <fuchsia/logger/cpp/fidl.h> #include <lib/fidl/cpp/binding.h> #include <lib/sys/cpp/component_context.h> -#include "partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" -#include "partition_alloc/partition_alloc_base/logging.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/ios/ios_util.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/ios/ios_util.h index cde4453..bdc7b31b 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/ios/ios_util.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/ios/ios_util.h
@@ -7,7 +7,7 @@ #include <stdint.h> -#include "partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" namespace partition_alloc::internal::base::ios {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/ios/ios_util.mm b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/ios/ios_util.mm index 499b892f..1772b46 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/ios/ios_util.mm +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/ios/ios_util.mm
@@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/partition_alloc_base/ios/ios_util.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/ios/ios_util.h" #include <array> -#include "partition_alloc/partition_alloc_base/system/sys_info.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/system/sys_info.h" namespace partition_alloc::internal::base::ios {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/log_message.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/log_message.cc index 5a9aa184..eee763a 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/log_message.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/log_message.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 "partition_alloc/partition_alloc_base/log_message.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/log_message.h" // TODO(1151236): After finishing copying //base files to PA library, remove // defined(BASE_CHECK_H_) from here. @@ -14,15 +14,15 @@ #error "log_message.h should not include check.h" #endif +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/alias.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/stack_trace.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/immediate_crash.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/safe_sprintf.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/string_util.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/stringprintf.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_base/debug/alias.h" -#include "partition_alloc/partition_alloc_base/debug/stack_trace.h" -#include "partition_alloc/partition_alloc_base/immediate_crash.h" -#include "partition_alloc/partition_alloc_base/logging.h" -#include "partition_alloc/partition_alloc_base/strings/safe_sprintf.h" -#include "partition_alloc/partition_alloc_base/strings/string_util.h" -#include "partition_alloc/partition_alloc_base/strings/stringprintf.h" #if BUILDFLAG(IS_WIN) @@ -40,7 +40,7 @@ #endif #if BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA) -#include "partition_alloc/partition_alloc_base/posix/safe_strerror.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/posix/safe_strerror.h" #endif namespace partition_alloc::internal::logging {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/log_message.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/log_message.h index 5751251..3be4c56 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/log_message.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/log_message.h
@@ -7,11 +7,11 @@ #include <stddef.h> +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/scoped_clear_last_error.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/cstring_builder.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" -#include "partition_alloc/partition_alloc_base/scoped_clear_last_error.h" -#include "partition_alloc/partition_alloc_base/strings/cstring_builder.h" namespace partition_alloc::internal::logging {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging.cc index d4fd55d..275d54d 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging.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 "partition_alloc/partition_alloc_base/logging.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging.h" // TODO(1151236): After finishing copying //base files to PA library, remove // defined(BASE_CHECK_H_) from here. @@ -14,10 +14,10 @@ #error "logging.h should not include check.h" #endif +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/alias.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/immediate_crash.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_base/debug/alias.h" -#include "partition_alloc/partition_alloc_base/immediate_crash.h" #include <algorithm> @@ -40,7 +40,7 @@ #include <unistd.h> #endif -#include "partition_alloc/partition_alloc_base/posix/eintr_wrapper.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/posix/eintr_wrapper.h" namespace partition_alloc::internal::logging {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging.h index 6c28fe2..fc641da 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging.h
@@ -10,11 +10,11 @@ #include <cassert> #include <cstdint> +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/log_message.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" -#include "partition_alloc/partition_alloc_base/log_message.h" // TODO(1151236): Need to update the description, because logging for PA // standalone library was minimized.
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging_pa_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging_pa_unittest.cc index 0f97804..5fa8147 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging_pa_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging_pa_unittest.cc
@@ -5,9 +5,9 @@ #include <sstream> #include <string> +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" -#include "partition_alloc/partition_alloc_base/logging.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/mac/mac_util.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/mac/mac_util.h index 0ef49db7..ed79036e 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/mac/mac_util.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/mac/mac_util.h
@@ -8,7 +8,7 @@ #include <AvailabilityMacros.h> #import <CoreGraphics/CoreGraphics.h> -#include "partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" namespace partition_alloc::internal::base::mac {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/mac/mac_util.mm b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/mac/mac_util.mm index e86d162e..94b08d1f 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/mac/mac_util.mm +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/mac/mac_util.mm
@@ -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 "partition_alloc/partition_alloc_base/mac/mac_util.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/mac/mac_util.h" #include <stddef.h> #include <string.h> @@ -10,8 +10,8 @@ #include <sys/types.h> #include <sys/utsname.h> -#include "partition_alloc/partition_alloc_base/check.h" -#include "partition_alloc/partition_alloc_base/logging.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging.h" // This is a simplified version of base::mac. Because // "base/strings/string_split.h" is unavailable, only provide access to the
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/page_size.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/page_size.h index 698eb2a..ffbb707 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/page_size.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/page_size.h
@@ -7,7 +7,7 @@ #include <stddef.h> -#include "partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" namespace partition_alloc::internal::base {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/page_size_posix.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/page_size_posix.cc index 245bc58..b11857d4 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/page_size_posix.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/page_size_posix.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 "partition_alloc/partition_alloc_base/memory/page_size.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/page_size.h" #include <unistd.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/page_size_win.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/page_size_win.cc index e5bfb76e..6f41c08 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/page_size_win.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/page_size_win.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 "partition_alloc/partition_alloc_base/memory/page_size.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/page_size.h" namespace partition_alloc::internal::base {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/ref_counted.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/ref_counted.cc index 8bbff1c6..06594af 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/ref_counted.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/ref_counted.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 "partition_alloc/partition_alloc_base/memory/ref_counted.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/ref_counted.h" #include <limits> #include <ostream> #include <type_traits> -#include "partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" namespace partition_alloc::internal::base::subtle {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/ref_counted.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/ref_counted.h index 78f99c6..5bcd35c 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/ref_counted.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/ref_counted.h
@@ -5,13 +5,13 @@ #ifndef BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_PARTITION_ALLOC_BASE_MEMORY_REF_COUNTED_H_ #define BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_PARTITION_ALLOC_BASE_MEMORY_REF_COUNTED_H_ +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/atomic_ref_count.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/scoped_refptr.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/atomic_ref_count.h" -#include "partition_alloc/partition_alloc_base/check.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" -#include "partition_alloc/partition_alloc_base/memory/scoped_refptr.h" namespace partition_alloc::internal::base { namespace subtle {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/scoped_refptr.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/scoped_refptr.h index fc0a786..f438df4 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/scoped_refptr.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/scoped_refptr.h
@@ -11,8 +11,8 @@ #include <type_traits> #include <utility> -#include "partition_alloc/partition_alloc_base/check.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" namespace partition_alloc::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/native_library.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/native_library.cc index 23ab7a3..461e8cf 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/native_library.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/native_library.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 "partition_alloc/partition_alloc_base/native_library.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/native_library.h" namespace partition_alloc::internal::base {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/native_library.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/native_library.h index ff37c5eb..aa95ecb 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/native_library.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/native_library.h
@@ -10,9 +10,9 @@ #include <string> +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/file_path.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_base/files/file_path.h" #if BUILDFLAG(IS_WIN) #include <windows.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/native_library_pa_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/native_library_pa_unittest.cc index 82d28c1..fd15483 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/native_library_pa_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/native_library_pa_unittest.cc
@@ -2,9 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/partition_alloc_base/native_library.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/native_library.h" -#include "partition_alloc/partition_alloc_base/files/file_path.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/file_path.h" #include "testing/gtest/include/gtest/gtest.h" namespace partition_alloc::internal::base {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/native_library_posix.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/native_library_posix.cc index 54611f9..f410115 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/native_library_posix.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/native_library_posix.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 "partition_alloc/partition_alloc_base/native_library.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/native_library.h" #include <dlfcn.h> +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/file_path.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/check.h" -#include "partition_alloc/partition_alloc_base/files/file_path.h" namespace partition_alloc::internal::base {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/notreached.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/notreached.h index 71655a1e..7bb1cdd69 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/notreached.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/notreached.h
@@ -5,7 +5,7 @@ #ifndef BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_PARTITION_ALLOC_BASE_NOTREACHED_H_ #define BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_PARTITION_ALLOC_BASE_NOTREACHED_H_ -#include "partition_alloc/partition_alloc_base/check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/check.h" // PA_NOTREACHED() annotates paths that are supposed to be unreachable. They // crash if they are ever hit.
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/checked_math.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/checked_math.h index 495594a..3d1c765 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/checked_math.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/checked_math.h
@@ -10,7 +10,7 @@ #include <limits> #include <type_traits> -#include "partition_alloc/partition_alloc_base/numerics/checked_math_impl.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/checked_math_impl.h" namespace partition_alloc::internal::base { namespace internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/checked_math_impl.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/checked_math_impl.h index 12a8c5cb..ea32015 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/checked_math_impl.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/checked_math_impl.h
@@ -14,8 +14,8 @@ #include <limits> #include <type_traits> -#include "partition_alloc/partition_alloc_base/numerics/safe_conversions.h" -#include "partition_alloc/partition_alloc_base/numerics/safe_math_shared_impl.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_conversions.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_math_shared_impl.h" namespace partition_alloc::internal::base::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/clamped_math.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/clamped_math.h index e89480f..ec382b24 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/clamped_math.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/clamped_math.h
@@ -10,7 +10,7 @@ #include <limits> #include <type_traits> -#include "partition_alloc/partition_alloc_base/numerics/clamped_math_impl.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/clamped_math_impl.h" namespace partition_alloc::internal::base { namespace internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/clamped_math_impl.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/clamped_math_impl.h index a0fdf3a7..ef96b9e 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/clamped_math_impl.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/clamped_math_impl.h
@@ -14,9 +14,9 @@ #include <limits> #include <type_traits> -#include "partition_alloc/partition_alloc_base/numerics/checked_math.h" -#include "partition_alloc/partition_alloc_base/numerics/safe_conversions.h" -#include "partition_alloc/partition_alloc_base/numerics/safe_math_shared_impl.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/checked_math.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_conversions.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_math_shared_impl.h" namespace partition_alloc::internal::base::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_conversions.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_conversions.h index 17e4c68..ae069f5e 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_conversions.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_conversions.h
@@ -11,10 +11,10 @@ #include <limits> #include <type_traits> -#include "partition_alloc/partition_alloc_base/numerics/safe_conversions_impl.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_conversions_impl.h" #if defined(__ARMEL__) && !defined(__native_client__) -#include "partition_alloc/partition_alloc_base/numerics/safe_conversions_arm_impl.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_conversions_arm_impl.h" #define PA_BASE_HAS_OPTIMIZED_SAFE_CONVERSIONS (1) #else #define PA_BASE_HAS_OPTIMIZED_SAFE_CONVERSIONS (0)
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_conversions_arm_impl.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_conversions_arm_impl.h index 5e0af67..25c24c9f 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_conversions_arm_impl.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_conversions_arm_impl.h
@@ -9,7 +9,7 @@ #include <limits> #include <type_traits> -#include "partition_alloc/partition_alloc_base/numerics/safe_conversions_impl.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_conversions_impl.h" namespace partition_alloc::internal::base::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_math.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_math.h index d664df5..00a20aa 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_math.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_math.h
@@ -5,8 +5,8 @@ #ifndef BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_PARTITION_ALLOC_BASE_NUMERICS_SAFE_MATH_H_ #define BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_PARTITION_ALLOC_BASE_NUMERICS_SAFE_MATH_H_ -#include "partition_alloc/partition_alloc_base/numerics/checked_math.h" -#include "partition_alloc/partition_alloc_base/numerics/clamped_math.h" -#include "partition_alloc/partition_alloc_base/numerics/safe_conversions.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/checked_math.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/clamped_math.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_conversions.h" #endif // BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_PARTITION_ALLOC_BASE_NUMERICS_SAFE_MATH_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_math_arm_impl.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_math_arm_impl.h index d4ae826c..ea1e053 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_math_arm_impl.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_math_arm_impl.h
@@ -8,7 +8,7 @@ #include <cassert> #include <type_traits> -#include "partition_alloc/partition_alloc_base/numerics/safe_conversions.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_conversions.h" namespace partition_alloc::internal::base::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_math_clang_gcc_impl.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_math_clang_gcc_impl.h index e44cb4fd..49fd9be 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_math_clang_gcc_impl.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_math_clang_gcc_impl.h
@@ -9,10 +9,10 @@ #include <limits> #include <type_traits> -#include "partition_alloc/partition_alloc_base/numerics/safe_conversions.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_conversions.h" #if !defined(__native_client__) && (defined(__ARMEL__) || defined(__arch64__)) -#include "partition_alloc/partition_alloc_base/numerics/safe_math_arm_impl.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_math_arm_impl.h" #define PA_BASE_HAS_ASSEMBLER_SAFE_MATH (1) #else #define PA_BASE_HAS_ASSEMBLER_SAFE_MATH (0)
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_math_shared_impl.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_math_shared_impl.h index ec66088..0d4846ad 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_math_shared_impl.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_math_shared_impl.h
@@ -15,8 +15,8 @@ #include <limits> #include <type_traits> +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_conversions.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/numerics/safe_conversions.h" #if BUILDFLAG(IS_ASMJS) // Optimized safe math instructions are incompatible with asmjs. @@ -27,7 +27,7 @@ ((__clang_major__ > 3) || \ (__clang_major__ == 3 && __clang_minor__ >= 4))) || \ (defined(__GNUC__) && __GNUC__ >= 5)) -#include "partition_alloc/partition_alloc_base/numerics/safe_math_clang_gcc_impl.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_math_clang_gcc_impl.h" #define PA_BASE_HAS_OPTIMIZED_SAFE_MATH (1) #else #define PA_BASE_HAS_OPTIMIZED_SAFE_MATH (0)
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/posix/safe_strerror.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/posix/safe_strerror.cc index 875a3e4..b779ff15 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/posix/safe_strerror.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/posix/safe_strerror.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 "partition_alloc/partition_alloc_base/posix/safe_strerror.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/posix/safe_strerror.h" #include <errno.h> #include <stdio.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/posix/safe_strerror.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/posix/safe_strerror.h index d6d3a02..9af43a81 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/posix/safe_strerror.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/posix/safe_strerror.h
@@ -9,7 +9,7 @@ #include <string> -#include "partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" namespace partition_alloc::internal::base {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/process/process_handle.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/process/process_handle.h index ad90499..f42fb158 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/process/process_handle.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/process/process_handle.h
@@ -8,11 +8,11 @@ #include <stdint.h> #include <sys/types.h> +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/component_export.h" #if BUILDFLAG(IS_WIN) -#include "partition_alloc/partition_alloc_base/win/windows_types.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/win/windows_types.h" #endif #if BUILDFLAG(IS_FUCHSIA)
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/process/process_handle_posix.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/process/process_handle_posix.cc index 8989883..f807f93e 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/process/process_handle_posix.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/process/process_handle_posix.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 "partition_alloc/partition_alloc_base/process/process_handle.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/process/process_handle.h" #include <unistd.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/process/process_handle_win.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/process/process_handle_win.cc index 9fcc809..1eed450 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/process/process_handle_win.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/process/process_handle_win.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 "partition_alloc/partition_alloc_base/process/process_handle.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/process/process_handle.h" #include <windows.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util.cc index d98573f..00f1721 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util.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 "partition_alloc/partition_alloc_base/rand_util.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util.h" #include <limits.h> #include <math.h> @@ -10,7 +10,7 @@ #include <limits> -#include "partition_alloc/partition_alloc_base/check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/check.h" namespace partition_alloc::internal::base {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util.h index fa695be..d4ae730 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util.h
@@ -8,8 +8,8 @@ #include <stddef.h> #include <stdint.h> +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/component_export.h" namespace partition_alloc { class RandomGenerator;
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util_fuchsia.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util_fuchsia.cc index e3e7773..b19fed7 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util_fuchsia.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util_fuchsia.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 "partition_alloc/partition_alloc_base/rand_util.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util.h" #include <zircon/syscalls.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util_pa_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util_pa_unittest.cc index 757c09b..550c00e3 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util_pa_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util_pa_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 "partition_alloc/partition_alloc_base/rand_util.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util.h" #include <stddef.h> #include <stdint.h> @@ -13,9 +13,9 @@ #include <memory> #include <vector> -#include "partition_alloc/partition_alloc_base/check.h" -#include "partition_alloc/partition_alloc_base/logging.h" -#include "partition_alloc/partition_alloc_base/time/time.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time.h" #include "testing/gtest/include/gtest/gtest.h" namespace partition_alloc::internal::base {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util_posix.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util_posix.cc index ede860c8..20d4c66c 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util_posix.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util_posix.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 "partition_alloc/partition_alloc_base/rand_util.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util.h" #include <errno.h> #include <fcntl.h> @@ -12,12 +12,12 @@ #include <unistd.h> #include <sstream> +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/file_util.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/no_destructor.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/posix/eintr_wrapper.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/check.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/files/file_util.h" -#include "partition_alloc/partition_alloc_base/no_destructor.h" -#include "partition_alloc/partition_alloc_base/posix/eintr_wrapper.h" #if BUILDFLAG(IS_MAC) // TODO(crbug.com/995996): Waiting for this header to appear in the iOS SDK.
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util_win.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util_win.cc index 5c26c4c..91271c5d 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util_win.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util_win.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 "partition_alloc/partition_alloc_base/rand_util.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util.h" #include <stddef.h> #include <stdint.h> @@ -11,7 +11,7 @@ #include <algorithm> #include <limits> -#include "partition_alloc/partition_alloc_base/check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/check.h" // Prototype for ProcessPrng. // See: https://learn.microsoft.com/en-us/windows/win32/seccng/processprng
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/scoped_clear_last_error.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/scoped_clear_last_error.h index d1ef631..7c1cef44 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/scoped_clear_last_error.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/scoped_clear_last_error.h
@@ -7,8 +7,8 @@ #include <errno.h> +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/component_export.h" namespace partition_alloc::internal::base {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/scoped_clear_last_error_pa_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/scoped_clear_last_error_pa_unittest.cc index 1856abd1..2bbfee2 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/scoped_clear_last_error_pa_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/scoped_clear_last_error_pa_unittest.cc
@@ -2,10 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/partition_alloc_base/scoped_clear_last_error.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/scoped_clear_last_error.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/logging.h" #include "testing/gtest/include/gtest/gtest.h" #if BUILDFLAG(IS_WIN)
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/scoped_clear_last_error_win.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/scoped_clear_last_error_win.cc index e6ebe6a..a4c9549 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/scoped_clear_last_error_win.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/scoped_clear_last_error_win.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 "partition_alloc/partition_alloc_base/scoped_clear_last_error.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/scoped_clear_last_error.h" #include <windows.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/cstring_builder.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/cstring_builder.cc index 4e8262d..290b77b3 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/cstring_builder.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/cstring_builder.cc
@@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/partition_alloc_base/strings/cstring_builder.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/cstring_builder.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/safe_sprintf.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" -#include "partition_alloc/partition_alloc_base/strings/safe_sprintf.h" #if !BUILDFLAG(IS_WIN) #include <unistd.h> @@ -16,7 +16,7 @@ #include <cstring> #if BUILDFLAG(PA_DCHECK_IS_ON) -#include "partition_alloc/partition_alloc_base/check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/check.h" #define PA_RAW_DCHECK PA_RAW_CHECK #else #define PA_RAW_DCHECK(x) \
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/cstring_builder.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/cstring_builder.h index 457596f3..45cdbe4d 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/cstring_builder.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/cstring_builder.h
@@ -5,8 +5,8 @@ #ifndef BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_PARTITION_ALLOC_BASE_STRINGS_CSTRING_BUILDER_H_ #define BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_PARTITION_ALLOC_BASE_STRINGS_CSTRING_BUILDER_H_ +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/component_export.h" #include <cstddef>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/cstring_builder_pa_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/cstring_builder_pa_unittest.cc index c480242..865fbe7a 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/cstring_builder_pa_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/cstring_builder_pa_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 "partition_alloc/partition_alloc_base/strings/cstring_builder.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/cstring_builder.h" #include <cmath>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/safe_sprintf.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/safe_sprintf.cc index 5a3a948..777089c7 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/safe_sprintf.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/safe_sprintf.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 "partition_alloc/partition_alloc_base/strings/safe_sprintf.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/safe_sprintf.h" #include <errno.h> #include <string.h> @@ -34,7 +34,7 @@ // errno = 13 (Access denied) // In most of the anticipated use cases, that's probably the preferred // behavior. -#include "partition_alloc/partition_alloc_base/check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/check.h" #define DEBUG_CHECK PA_RAW_CHECK #else #define DEBUG_CHECK(x) \
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/safe_sprintf.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/safe_sprintf.h index a2f62ac..723a02a6 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/safe_sprintf.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/safe_sprintf.h
@@ -16,7 +16,7 @@ #include <unistd.h> #endif -#include "partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" namespace partition_alloc::internal::base::strings {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/safe_sprintf_pa_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/safe_sprintf_pa_unittest.cc index 7fca0a6..afef569 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/safe_sprintf_pa_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/safe_sprintf_pa_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 "partition_alloc/partition_alloc_base/strings/safe_sprintf.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/safe_sprintf.h" #include <stddef.h> #include <stdint.h> @@ -12,9 +12,9 @@ #include <limits> #include <memory> +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/check.h" -#include "partition_alloc/partition_alloc_config.h" #include "testing/gtest/include/gtest/gtest.h" // Death tests on Android are currently very flaky. No need to add more flaky
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/string_util.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/string_util.cc index ef124f3..a4b4350 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/string_util.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/string_util.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 "partition_alloc/partition_alloc_base/strings/string_util.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/string_util.h" #include <cstring>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/string_util.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/string_util.h index d3a96c9c..597f74c 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/string_util.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/string_util.h
@@ -5,7 +5,7 @@ #ifndef BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_PARTITION_ALLOC_BASE_STRINGS_STRING_UTIL_H_ #define BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_PARTITION_ALLOC_BASE_STRINGS_STRING_UTIL_H_ -#include "partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" namespace partition_alloc::internal::base::strings {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/string_util_pa_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/string_util_pa_unittest.cc index 5e8175f..d864335 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/string_util_pa_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/string_util_pa_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 "partition_alloc/partition_alloc_base/strings/string_util.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/string_util.h" #include "build/build_config.h" #include "testing/gtest/include/gtest/gtest.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/stringprintf.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/stringprintf.cc index cd17864a..3d290182 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/stringprintf.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/stringprintf.cc
@@ -2,10 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/partition_alloc_base/strings/stringprintf.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/stringprintf.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/scoped_clear_last_error.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/scoped_clear_last_error.h" #include <stdarg.h> #include <stdio.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/stringprintf.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/stringprintf.h index d727a27d..67733c6 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/stringprintf.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/stringprintf.h
@@ -9,9 +9,9 @@ #include <string> +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/component_export.h" namespace partition_alloc::internal::base {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/stringprintf_pa_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/stringprintf_pa_unittest.cc index 45f025c..d3f673d 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/stringprintf_pa_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/stringprintf_pa_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 "partition_alloc/partition_alloc_base/strings/stringprintf.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/stringprintf.h" #include <errno.h> #include <stddef.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/system/sys_info.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/system/sys_info.h index ad1fc37..d9e12ff 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/system/sys_info.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/system/sys_info.h
@@ -7,7 +7,7 @@ #include <cstdint> -#include "partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" namespace partition_alloc::internal::base {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/system/sys_info_ios.mm b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/system/sys_info_ios.mm index 0082bcb13..324af9d9f5 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/system/sys_info_ios.mm +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/system/sys_info_ios.mm
@@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/partition_alloc_base/system/sys_info.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/system/sys_info.h" #import <Foundation/Foundation.h> -#include "partition_alloc/partition_alloc_base/numerics/safe_conversions.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_conversions.h" namespace partition_alloc::internal::base {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/system/sys_info_mac.mm b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/system/sys_info_mac.mm index 20a4205..b420af9 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/system/sys_info_mac.mm +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/system/sys_info_mac.mm
@@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/partition_alloc_base/system/sys_info.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/system/sys_info.h" #import <Foundation/Foundation.h> -#include "partition_alloc/partition_alloc_base/numerics/safe_conversions.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_conversions.h" namespace partition_alloc::internal::base {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/thread_annotations.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/thread_annotations.h index 7d805609..61f1348b 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/thread_annotations.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/thread_annotations.h
@@ -37,8 +37,8 @@ #ifndef BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_PARTITION_ALLOC_BASE_THREAD_ANNOTATIONS_H_ #define BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_PARTITION_ALLOC_BASE_THREAD_ANNOTATIONS_H_ +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" #if defined(__clang__) #define PA_THREAD_ANNOTATION_ATTRIBUTE__(x) __attribute__((x))
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/thread_annotations_pa_nocompile.nc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/thread_annotations_pa_nocompile.nc index 22f2d48..f056a47 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/thread_annotations_pa_nocompile.nc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/thread_annotations_pa_nocompile.nc
@@ -5,7 +5,7 @@ // This is a "No Compile Test" suite. // https://dev.chromium.org/developers/testing/no-compile-tests -#include "partition_alloc/partition_alloc_base/thread_annotations.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/thread_annotations.h" namespace {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/thread_annotations_pa_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/thread_annotations_pa_unittest.cc index 798d363..5384e479 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/thread_annotations_pa_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/thread_annotations_pa_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 "partition_alloc/partition_alloc_base/thread_annotations.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/thread_annotations.h" #include "testing/gtest/include/gtest/gtest.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread.cc index 855deda..8f18536c 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread.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 "partition_alloc/partition_alloc_base/threading/platform_thread.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread.h" namespace partition_alloc::internal::base {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread.h index 3191828..043c4b3 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread.h
@@ -13,13 +13,13 @@ #include <iosfwd> +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_ref.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_base/threading/platform_thread_ref.h" -#include "partition_alloc/partition_alloc_base/time/time.h" #if BUILDFLAG(IS_WIN) -#include "partition_alloc/partition_alloc_base/win/windows_types.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/win/windows_types.h" #elif BUILDFLAG(IS_FUCHSIA) #include <zircon/types.h> #elif BUILDFLAG(IS_APPLE)
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_android_for_testing.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_android_for_testing.cc index 427e3ca..7a846b1 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_android_for_testing.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_android_for_testing.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 "partition_alloc/partition_alloc_base/threading/platform_thread_for_testing.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_for_testing.h" #include <pthread.h> #include <stddef.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_apple_for_testing.mm b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_apple_for_testing.mm index 875f5872..77374bc 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_apple_for_testing.mm +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_apple_for_testing.mm
@@ -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 "partition_alloc/partition_alloc_base/threading/platform_thread_for_testing.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_for_testing.h" #import <Foundation/Foundation.h> #include <mach/mach.h> @@ -15,8 +15,8 @@ #include <algorithm> #include <atomic> +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/check.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/check.h" namespace partition_alloc::internal::base {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_for_testing.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_for_testing.h index e5d8f93..b1fd67d 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_for_testing.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_for_testing.h
@@ -13,8 +13,8 @@ #include <iosfwd> +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/threading/platform_thread.h" namespace partition_alloc::internal::base {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_fuchsia_for_testing.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_fuchsia_for_testing.cc index fa9bb91..8454d37 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_fuchsia_for_testing.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_fuchsia_for_testing.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 "partition_alloc/partition_alloc_base/threading/platform_thread_for_testing.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_for_testing.h" #include <pthread.h> #include <stddef.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_internal_posix.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_internal_posix.h index 90b829f..3c53be4 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_internal_posix.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_internal_posix.h
@@ -5,8 +5,8 @@ #ifndef BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_PARTITION_ALLOC_BASE_THREADING_PLATFORM_THREAD_INTERNAL_POSIX_H_ #define BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_PARTITION_ALLOC_BASE_THREADING_PLATFORM_THREAD_INTERNAL_POSIX_H_ +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/component_export.h" namespace partition_alloc::internal::base::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_linux_for_testing.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_linux_for_testing.cc index 692c31126..0f0e4b40 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_linux_for_testing.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_linux_for_testing.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 "partition_alloc/partition_alloc_base/threading/platform_thread_for_testing.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_for_testing.h" #include <pthread.h> #include <stddef.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_posix.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_posix.cc index e06cc32..eaa6d4a 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_posix.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_posix.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 "partition_alloc/partition_alloc_base/threading/platform_thread.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread.h" #include <errno.h> #include <pthread.h> @@ -12,10 +12,10 @@ #include <sys/types.h> #include <unistd.h> +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_internal_posix.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" -#include "partition_alloc/partition_alloc_base/logging.h" -#include "partition_alloc/partition_alloc_base/threading/platform_thread_internal_posix.h" #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #include <sys/syscall.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_posix_for_testing.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_posix_for_testing.cc index daac1c3..250de61 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_posix_for_testing.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_posix_for_testing.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 "partition_alloc/partition_alloc_base/threading/platform_thread_for_testing.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_for_testing.h" #include <errno.h> #include <pthread.h> @@ -14,11 +14,11 @@ #include <unistd.h> #include <memory> +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_internal_posix.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/check.h" -#include "partition_alloc/partition_alloc_base/logging.h" -#include "partition_alloc/partition_alloc_base/threading/platform_thread_internal_posix.h" -#include "partition_alloc/partition_alloc_buildflags.h" #if BUILDFLAG(IS_FUCHSIA) #include <zircon/process.h> @@ -27,8 +27,8 @@ #endif #if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && BUILDFLAG(USE_STARSCAN) -#include "partition_alloc/starscan/pcscan.h" -#include "partition_alloc/starscan/stack/stack.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/stack/stack.h" #endif namespace partition_alloc::internal::base {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_ref.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_ref.h index 41dc705..47d40a8 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_ref.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_ref.h
@@ -12,11 +12,11 @@ #include <iosfwd> +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/component_export.h" #if BUILDFLAG(IS_WIN) -#include "partition_alloc/partition_alloc_base/win/windows_types.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/win/windows_types.h" #elif BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA) #include <pthread.h> #endif
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_win.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_win.cc index 17caae7..c2e9028e 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_win.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_win.cc
@@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/partition_alloc_base/threading/platform_thread.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread.h" #include <stddef.h> -#include "partition_alloc/partition_alloc_base/time/time_override.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_override.h" #include <windows.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_win_for_testing.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_win_for_testing.cc index 7588139..466ff0e 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_win_for_testing.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_win_for_testing.cc
@@ -2,21 +2,21 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/partition_alloc_base/threading/platform_thread_for_testing.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_for_testing.h" #include <stddef.h> +#include "base/allocator/partition_allocator/src/partition_alloc/oom.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/alias.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" #include "build/build_config.h" -#include "partition_alloc/oom.h" -#include "partition_alloc/partition_alloc_base/check.h" -#include "partition_alloc/partition_alloc_base/debug/alias.h" -#include "partition_alloc/partition_alloc_buildflags.h" #include <windows.h> #if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && BUILDFLAG(USE_STARSCAN) -#include "partition_alloc/starscan/pcscan.h" -#include "partition_alloc/starscan/stack/stack.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/stack/stack.h" #endif namespace partition_alloc::internal::base {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time.cc index 8d4fc033..184c66b 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time.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 "partition_alloc/partition_alloc_base/time/time.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time.h" #include <atomic> #include <cmath> @@ -11,7 +11,7 @@ #include <tuple> #include <utility> -#include "partition_alloc/partition_alloc_base/time/time_override.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_override.h" namespace partition_alloc::internal::base {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time.h index 180132e2..52550a0 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time.h
@@ -68,14 +68,14 @@ #include <iosfwd> #include <limits> +#include "base/allocator/partition_allocator/src/partition_alloc/chromeos_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/clamped_math.h" #include "build/build_config.h" -#include "partition_alloc/chromeos_buildflags.h" -#include "partition_alloc/partition_alloc_base/check.h" -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_base/numerics/clamped_math.h" #if BUILDFLAG(IS_APPLE) -#include "partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" #endif // BUILDFLAG(IS_APPLE) #if BUILDFLAG(IS_FUCHSIA) @@ -99,7 +99,7 @@ #endif #if BUILDFLAG(IS_WIN) -#include "partition_alloc/partition_alloc_base/win/windows_types.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/win/windows_types.h" namespace ABI { namespace Windows {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_android.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_android.cc index 1d36482..52845a5 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_android.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_android.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 "partition_alloc/partition_alloc_base/time/time.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time.h" namespace partition_alloc::internal::base {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_apple.mm b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_apple.mm index 77a95d0..0e05d4b9 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_apple.mm +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_apple.mm
@@ -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 "partition_alloc/partition_alloc_base/time/time.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time.h" #import <Foundation/Foundation.h> #include <mach/mach.h> @@ -18,11 +18,11 @@ #include <errno.h> #endif +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_conversions.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_override.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/check.h" -#include "partition_alloc/partition_alloc_base/logging.h" -#include "partition_alloc/partition_alloc_base/numerics/safe_conversions.h" -#include "partition_alloc/partition_alloc_base/time/time_override.h" namespace partition_alloc::internal::base {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_conversion_posix.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_conversion_posix.cc index 9a734b20..0544c1d 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_conversion_posix.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_conversion_posix.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 "partition_alloc/partition_alloc_base/time/time.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time.h" #include <stdint.h> #include <sys/time.h> @@ -10,7 +10,7 @@ #include <limits> -#include "partition_alloc/partition_alloc_base/check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/check.h" namespace partition_alloc::internal::base {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_fuchsia.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_fuchsia.cc index 475b49d..45f5127c 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_fuchsia.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_fuchsia.cc
@@ -2,14 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/partition_alloc_base/time/time.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time.h" #include <threads.h> #include <zircon/syscalls.h> #include <zircon/threads.h> -#include "partition_alloc/partition_alloc_base/check.h" -#include "partition_alloc/partition_alloc_base/time/time_override.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_override.h" namespace partition_alloc::internal::base {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_now_posix.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_now_posix.cc index da9e7e3..47da2d59 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_now_posix.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_now_posix.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 "partition_alloc/partition_alloc_base/time/time.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time.h" #include <stdint.h> #include <sys/time.h> @@ -14,10 +14,10 @@ #endif #include <unistd.h> -#include "partition_alloc/partition_alloc_base/check.h" -#include "partition_alloc/partition_alloc_base/notreached.h" -#include "partition_alloc/partition_alloc_base/numerics/safe_math.h" -#include "partition_alloc/partition_alloc_base/time/time_override.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/notreached.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_math.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_override.h" // Ensure the Fuchsia and Mac builds do not include this module. Instead, // non-POSIX implementation is used for sampling the system clocks.
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_override.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_override.cc index b1c4c925..f0a1d24 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_override.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_override.cc
@@ -2,9 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/partition_alloc_base/time/time_override.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_override.h" -#include "partition_alloc/partition_alloc_base/check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/check.h" namespace partition_alloc::internal::base::subtle {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_override.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_override.h index 689282a..1763774a 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_override.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_override.h
@@ -7,9 +7,9 @@ #include <atomic> +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_base/time/time.h" namespace partition_alloc::internal::base {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_win.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_win.cc index 0958c37..8c09a3ac 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_win.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_win.cc
@@ -30,7 +30,7 @@ // will only increase the system-wide timer if we're not running on battery // power. -#include "partition_alloc/partition_alloc_base/time/time.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time.h" #include <windows.foundation.h> #include <windows.h> @@ -41,12 +41,12 @@ #include <atomic> +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bit_cast.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cpu.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_override.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/bit_cast.h" -#include "partition_alloc/partition_alloc_base/check.h" -#include "partition_alloc/partition_alloc_base/cpu.h" -#include "partition_alloc/partition_alloc_base/threading/platform_thread.h" -#include "partition_alloc/partition_alloc_base/time/time_override.h" namespace partition_alloc::internal::base {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/win/win_handle_types.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/win/win_handle_types.h index 9a227c97..0783dec4 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/win/win_handle_types.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/win/win_handle_types.h
@@ -10,7 +10,7 @@ #define PA_WINDOWS_HANDLE_TYPE(name) \ struct name##__; \ typedef struct name##__* name; -#include "partition_alloc/partition_alloc_base/win/win_handle_types_list.inc" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/win/win_handle_types_list.inc" #undef PA_WINDOWS_HANDLE_TYPE #endif // BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_PARTITION_ALLOC_BASE_WIN_WIN_HANDLE_TYPES_H_
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h index 918716e4..fae09d7f 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h
@@ -7,14 +7,14 @@ #include <cstdint> +#include "base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/alias.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/immediate_crash.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" #include "build/build_config.h" -#include "partition_alloc/page_allocator_constants.h" -#include "partition_alloc/partition_alloc_base/check.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/debug/alias.h" -#include "partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" -#include "partition_alloc/partition_alloc_base/immediate_crash.h" -#include "partition_alloc/partition_alloc_buildflags.h" // When PartitionAlloc is used as the default allocator, we cannot use the // regular (D)CHECK() macros, as they allocate internally. When an assertion is
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h index 6a4c471..595c713 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h
@@ -5,9 +5,9 @@ #ifndef BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_PARTITION_ALLOC_CONFIG_H_ #define BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_PARTITION_ALLOC_CONFIG_H_ +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" -#include "partition_alloc/partition_alloc_buildflags.h" // PA_CONFIG() uses a similar trick as BUILDFLAG() to allow the compiler catch // typos or a missing #include.
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h index da192f3..57dc1671 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h
@@ -10,21 +10,21 @@ #include <cstddef> #include <limits> +#include "base/allocator/partition_allocator/src/partition_alloc/address_pool_manager_types.h" +#include "base/allocator/partition_allocator/src/partition_alloc/flags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_forward.h" #include "build/build_config.h" -#include "partition_alloc/address_pool_manager_types.h" -#include "partition_alloc/flags.h" -#include "partition_alloc/page_allocator_constants.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_config.h" -#include "partition_alloc/partition_alloc_forward.h" #if BUILDFLAG(IS_APPLE) && defined(ARCH_CPU_64_BITS) #include <mach/vm_page_size.h> #endif #if PA_CONFIG(HAS_MEMORY_TAGGING) -#include "partition_alloc/tagging.h" +#include "base/allocator/partition_allocator/src/partition_alloc/tagging.h" #endif namespace partition_alloc {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_for_testing.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_for_testing.h index a1a4b0082..f62db07 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_for_testing.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_for_testing.h
@@ -5,7 +5,7 @@ #ifndef BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_PARTITION_ALLOC_FOR_TESTING_H_ #define BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_PARTITION_ALLOC_FOR_TESTING_H_ -#include "partition_alloc/partition_alloc.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc.h" namespace partition_alloc { namespace internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_forward.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_forward.h index 89440d4..5087809 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_forward.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_forward.h
@@ -10,11 +10,11 @@ #include <cstdint> #include <type_traits> -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" -#include "partition_alloc/partition_alloc_base/thread_annotations.h" -#include "partition_alloc/partition_alloc_config.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/thread_annotations.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h" namespace partition_alloc {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_hooks.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_hooks.cc index 209ac547..47be84c 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_hooks.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_hooks.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 "partition_alloc/partition_alloc_hooks.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_hooks.h" #include <ostream> -#include "partition_alloc/partition_alloc_check.h" -#include "partition_alloc/partition_lock.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_lock.h" namespace partition_alloc {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_hooks.h b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_hooks.h index 64361a6..4e74b19 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_hooks.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_hooks.h
@@ -8,9 +8,9 @@ #include <atomic> #include <cstddef> -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h" namespace partition_alloc {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_perftest.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_perftest.cc index f4918f3..2c5505f 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_perftest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_perftest.cc
@@ -8,20 +8,20 @@ #include <memory> #include <vector> +#include "base/allocator/partition_allocator/src/partition_alloc/extended_api.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/stringprintf.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_for_testing.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_for_testing.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_root.h" +#include "base/allocator/partition_allocator/src/partition_alloc/thread_cache.h" #include "base/debug/debugging_buildflags.h" #include "base/timer/lap_timer.h" #include "build/build_config.h" -#include "partition_alloc/extended_api.h" -#include "partition_alloc/partition_alloc.h" -#include "partition_alloc/partition_alloc_base/logging.h" -#include "partition_alloc/partition_alloc_base/strings/stringprintf.h" -#include "partition_alloc/partition_alloc_base/threading/platform_thread_for_testing.h" -#include "partition_alloc/partition_alloc_base/time/time.h" -#include "partition_alloc/partition_alloc_check.h" -#include "partition_alloc/partition_alloc_constants.h" -#include "partition_alloc/partition_alloc_for_testing.h" -#include "partition_alloc/partition_root.h" -#include "partition_alloc/thread_cache.h" #include "testing/gtest/include/gtest/gtest.h" #include "testing/perf/perf_result_reporter.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_unittest.cc index 3ba6e9dd..df74aff 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_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 "partition_alloc/partition_alloc_for_testing.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_for_testing.h" #include <algorithm> #include <cstddef> @@ -17,40 +17,40 @@ #include <tuple> #include <vector> +#include "base/allocator/partition_allocator/src/partition_alloc/address_space_randomization.h" +#include "base/allocator/partition_allocator/src/partition_alloc/chromecast_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/dangling_raw_ptr_checks.h" +#include "base/allocator/partition_allocator/src/partition_alloc/freeslot_bitmap.h" +#include "base/allocator/partition_allocator/src/partition_alloc/lightweight_quarantine.h" +#include "base/allocator/partition_allocator/src/partition_alloc/memory_reclaimer.h" +#include "base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_address_space.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bits.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cpu.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/checked_math.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/thread_annotations.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_for_testing.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_forward.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_bucket.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_cookie.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_freelist_entry.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_page.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_ref_count.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_root.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_stats.h" +#include "base/allocator/partition_allocator/src/partition_alloc/reservation_offset_table.h" +#include "base/allocator/partition_allocator/src/partition_alloc/tagging.h" +#include "base/allocator/partition_allocator/src/partition_alloc/thread_isolation/thread_isolation.h" #include "base/system/sys_info.h" #include "base/test/gtest_util.h" #include "build/build_config.h" -#include "partition_alloc/address_space_randomization.h" -#include "partition_alloc/chromecast_buildflags.h" -#include "partition_alloc/dangling_raw_ptr_checks.h" -#include "partition_alloc/freeslot_bitmap.h" -#include "partition_alloc/lightweight_quarantine.h" -#include "partition_alloc/memory_reclaimer.h" -#include "partition_alloc/page_allocator_constants.h" -#include "partition_alloc/partition_address_space.h" -#include "partition_alloc/partition_alloc_base/bits.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/cpu.h" -#include "partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" -#include "partition_alloc/partition_alloc_base/logging.h" -#include "partition_alloc/partition_alloc_base/numerics/checked_math.h" -#include "partition_alloc/partition_alloc_base/rand_util.h" -#include "partition_alloc/partition_alloc_base/thread_annotations.h" -#include "partition_alloc/partition_alloc_base/threading/platform_thread_for_testing.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_config.h" -#include "partition_alloc/partition_alloc_constants.h" -#include "partition_alloc/partition_alloc_forward.h" -#include "partition_alloc/partition_bucket.h" -#include "partition_alloc/partition_cookie.h" -#include "partition_alloc/partition_freelist_entry.h" -#include "partition_alloc/partition_page.h" -#include "partition_alloc/partition_ref_count.h" -#include "partition_alloc/partition_root.h" -#include "partition_alloc/partition_stats.h" -#include "partition_alloc/reservation_offset_table.h" -#include "partition_alloc/tagging.h" -#include "partition_alloc/thread_isolation/thread_isolation.h" #include "testing/gtest/include/gtest/gtest.h" #if defined(__ARM_FEATURE_MEMORY_TAGGING) @@ -74,7 +74,7 @@ #endif #if BUILDFLAG(IS_MAC) -#include "partition_alloc/partition_alloc_base/mac/mac_util.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/mac/mac_util.h" #endif #if BUILDFLAG(ENABLE_PKEYS)
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_bucket.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_bucket.cc index bec02a01..51f2c9b 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_bucket.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_bucket.cc
@@ -2,41 +2,41 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/partition_bucket.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_bucket.h" #include <algorithm> #include <cstdint> #include <tuple> +#include "base/allocator/partition_allocator/src/partition_alloc/address_pool_manager.h" +#include "base/allocator/partition_allocator/src/partition_alloc/freeslot_bitmap.h" +#include "base/allocator/partition_allocator/src/partition_alloc/freeslot_bitmap_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/oom.h" +#include "base/allocator/partition_allocator/src/partition_alloc/page_allocator.h" +#include "base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_address_space.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bits.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/alias.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/immediate_crash.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/thread_annotations.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_forward.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_direct_map_extent.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_oom.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_page.h" +#include "base/allocator/partition_allocator/src/partition_alloc/reservation_offset_table.h" +#include "base/allocator/partition_allocator/src/partition_alloc/tagging.h" #include "build/build_config.h" -#include "partition_alloc/address_pool_manager.h" -#include "partition_alloc/freeslot_bitmap.h" -#include "partition_alloc/freeslot_bitmap_constants.h" -#include "partition_alloc/oom.h" -#include "partition_alloc/page_allocator.h" -#include "partition_alloc/page_allocator_constants.h" -#include "partition_alloc/partition_address_space.h" -#include "partition_alloc/partition_alloc.h" -#include "partition_alloc/partition_alloc_base/bits.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_base/debug/alias.h" -#include "partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" -#include "partition_alloc/partition_alloc_base/immediate_crash.h" -#include "partition_alloc/partition_alloc_base/thread_annotations.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_check.h" -#include "partition_alloc/partition_alloc_config.h" -#include "partition_alloc/partition_alloc_constants.h" -#include "partition_alloc/partition_alloc_forward.h" -#include "partition_alloc/partition_direct_map_extent.h" -#include "partition_alloc/partition_oom.h" -#include "partition_alloc/partition_page.h" -#include "partition_alloc/reservation_offset_table.h" -#include "partition_alloc/tagging.h" #if BUILDFLAG(USE_STARSCAN) -#include "partition_alloc/starscan/pcscan.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan.h" #endif namespace partition_alloc::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_bucket.h b/base/allocator/partition_allocator/src/partition_alloc/partition_bucket.h index 5a32154..ff8fca4 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_bucket.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_bucket.h
@@ -8,13 +8,13 @@ #include <cstddef> #include <cstdint> -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_base/thread_annotations.h" -#include "partition_alloc/partition_alloc_check.h" -#include "partition_alloc/partition_alloc_constants.h" -#include "partition_alloc/partition_alloc_forward.h" -#include "partition_alloc/partition_page_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/thread_annotations.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_forward.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_page_constants.h" namespace partition_alloc::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_bucket_lookup.h b/base/allocator/partition_allocator/src/partition_alloc/partition_bucket_lookup.h index 2c0b74d..0c08630 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_bucket_lookup.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_bucket_lookup.h
@@ -7,11 +7,11 @@ #include <cstdint> -#include "partition_alloc/partition_alloc_base/bits.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_check.h" -#include "partition_alloc/partition_alloc_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bits.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h" namespace partition_alloc::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_cookie.h b/base/allocator/partition_allocator/src/partition_alloc/partition_cookie.h index c8205b1..d031e287 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_cookie.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_cookie.h
@@ -5,9 +5,9 @@ #ifndef BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_PARTITION_COOKIE_H_ #define BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_PARTITION_COOKIE_H_ -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" -#include "partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" namespace partition_alloc::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_dcheck_helper.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_dcheck_helper.cc index b68461a..4ba50c7 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_dcheck_helper.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_dcheck_helper.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 "partition_alloc/partition_dcheck_helper.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_dcheck_helper.h" #include <cstdint> -#include "partition_alloc/partition_bucket.h" -#include "partition_alloc/partition_page.h" -#include "partition_alloc/partition_root.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_bucket.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_page.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_root.h" namespace partition_alloc::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_dcheck_helper.h b/base/allocator/partition_allocator/src/partition_alloc/partition_dcheck_helper.h index e1f368a..2170a67 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_dcheck_helper.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_dcheck_helper.h
@@ -5,10 +5,10 @@ #ifndef BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_PARTITION_DCHECK_HELPER_H_ #define BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_PARTITION_DCHECK_HELPER_H_ -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_forward.h" -#include "partition_alloc/partition_lock.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_forward.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_lock.h" namespace partition_alloc::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_direct_map_extent.h b/base/allocator/partition_allocator/src/partition_alloc/partition_direct_map_extent.h index fd2f1eb..23bac08 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_direct_map_extent.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_direct_map_extent.h
@@ -5,10 +5,10 @@ #ifndef BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_PARTITION_DIRECT_MAP_EXTENT_H_ #define BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_PARTITION_DIRECT_MAP_EXTENT_H_ -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_check.h" -#include "partition_alloc/partition_bucket.h" -#include "partition_alloc/partition_page.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_bucket.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_page.h" namespace partition_alloc::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_freelist_entry.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_freelist_entry.cc index 10ab7c6..ed292d7 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_freelist_entry.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_freelist_entry.cc
@@ -2,10 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/partition_freelist_entry.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_freelist_entry.h" -#include "partition_alloc/partition_alloc_base/immediate_crash.h" -#include "partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/immediate_crash.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" namespace partition_alloc::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_freelist_entry.h b/base/allocator/partition_allocator/src/partition_alloc/partition_freelist_entry.h index 3b3ad56..5a43defa 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_freelist_entry.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_freelist_entry.h
@@ -7,11 +7,11 @@ #include <cstddef> -#include "partition_alloc/partition_alloc_base/bits.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bits.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h" namespace partition_alloc::internal { @@ -21,9 +21,9 @@ } // namespace partition_alloc::internal #if BUILDFLAG(USE_FREELIST_POOL_OFFSETS) -#include "partition_alloc/pool_offset_freelist.h" // IWYU pragma: export +#include "base/allocator/partition_allocator/src/partition_alloc/pool_offset_freelist.h" // IWYU pragma: export #else -#include "partition_alloc/encoded_next_freelist.h" // IWYU pragma: export +#include "base/allocator/partition_allocator/src/partition_alloc/encoded_next_freelist.h" // IWYU pragma: export #endif // BUILDFLAG(USE_FREELIST_POOL_OFFSETS) namespace partition_alloc::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_lock.h b/base/allocator/partition_allocator/src/partition_alloc/partition_lock.h index ff08e2b..b3b28db 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_lock.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_lock.h
@@ -8,15 +8,15 @@ #include <atomic> #include <type_traits> +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/immediate_crash.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/thread_annotations.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/spinning_mutex.h" +#include "base/allocator/partition_allocator/src/partition_alloc/thread_isolation/thread_isolation.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" -#include "partition_alloc/partition_alloc_base/immediate_crash.h" -#include "partition_alloc/partition_alloc_base/thread_annotations.h" -#include "partition_alloc/partition_alloc_base/threading/platform_thread.h" -#include "partition_alloc/partition_alloc_check.h" -#include "partition_alloc/spinning_mutex.h" -#include "partition_alloc/thread_isolation/thread_isolation.h" namespace partition_alloc::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_lock_perftest.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_lock_perftest.cc index 1bf5c01..27503b5 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_lock_perftest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_lock_perftest.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 "partition_alloc/partition_lock.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_lock.h" #include <vector> +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_for_testing.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time.h" #include "base/timer/lap_timer.h" -#include "partition_alloc/partition_alloc_base/threading/platform_thread_for_testing.h" -#include "partition_alloc/partition_alloc_base/time/time.h" #include "testing/gtest/include/gtest/gtest.h" #include "testing/perf/perf_result_reporter.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_lock_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_lock_unittest.cc index 93eb0d8..6d1376e 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_lock_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_lock_unittest.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 "partition_alloc/partition_lock.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_lock.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/thread_annotations.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_for_testing.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" -#include "partition_alloc/partition_alloc_base/thread_annotations.h" -#include "partition_alloc/partition_alloc_base/threading/platform_thread_for_testing.h" -#include "partition_alloc/partition_alloc_base/time/time.h" #include "testing/gtest/include/gtest/gtest.h" namespace partition_alloc::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_oom.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_oom.cc index 17f1d61b..1027801 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_oom.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_oom.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 "partition_alloc/partition_oom.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_oom.h" +#include "base/allocator/partition_allocator/src/partition_alloc/oom.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/alias.h" #include "build/build_config.h" -#include "partition_alloc/oom.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/debug/alias.h" namespace partition_alloc::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_oom.h b/base/allocator/partition_allocator/src/partition_alloc/partition_oom.h index 908d811..640b1ca5 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_oom.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_oom.h
@@ -10,9 +10,9 @@ #include <stddef.h> +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/component_export.h" namespace partition_alloc {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_page.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_page.cc index babdb591..920dc131d 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_page.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_page.cc
@@ -2,27 +2,27 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/partition_page.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_page.h" #include <algorithm> #include <cstdint> -#include "partition_alloc/address_pool_manager.h" -#include "partition_alloc/freeslot_bitmap.h" -#include "partition_alloc/page_allocator.h" -#include "partition_alloc/page_allocator_constants.h" -#include "partition_alloc/partition_address_space.h" -#include "partition_alloc/partition_alloc_base/bits.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_check.h" -#include "partition_alloc/partition_alloc_constants.h" -#include "partition_alloc/partition_alloc_forward.h" -#include "partition_alloc/partition_direct_map_extent.h" -#include "partition_alloc/partition_root.h" -#include "partition_alloc/reservation_offset_table.h" -#include "partition_alloc/tagging.h" +#include "base/allocator/partition_allocator/src/partition_alloc/address_pool_manager.h" +#include "base/allocator/partition_allocator/src/partition_alloc/freeslot_bitmap.h" +#include "base/allocator/partition_allocator/src/partition_alloc/page_allocator.h" +#include "base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_address_space.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bits.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_forward.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_direct_map_extent.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_root.h" +#include "base/allocator/partition_allocator/src/partition_alloc/reservation_offset_table.h" +#include "base/allocator/partition_allocator/src/partition_alloc/tagging.h" namespace partition_alloc::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_page.h b/base/allocator/partition_allocator/src/partition_alloc/partition_page.h index 4f937aa..54803c87 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_page.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_page.h
@@ -7,37 +7,37 @@ #include <cstdint> +#include "base/allocator/partition_allocator/src/partition_alloc/address_pool_manager.h" +#include "base/allocator/partition_allocator/src/partition_alloc/address_pool_manager_types.h" +#include "base/allocator/partition_allocator/src/partition_alloc/freeslot_bitmap_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_address_space.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bits.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/thread_annotations.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_forward.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_bucket.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_dcheck_helper.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_freelist_entry.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_page_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_superpage_extent_entry.h" +#include "base/allocator/partition_allocator/src/partition_alloc/reservation_offset_table.h" #include "build/build_config.h" -#include "partition_alloc/address_pool_manager.h" -#include "partition_alloc/address_pool_manager_types.h" -#include "partition_alloc/freeslot_bitmap_constants.h" -#include "partition_alloc/partition_address_space.h" -#include "partition_alloc/partition_alloc_base/bits.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" -#include "partition_alloc/partition_alloc_base/thread_annotations.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_check.h" -#include "partition_alloc/partition_alloc_constants.h" -#include "partition_alloc/partition_alloc_forward.h" -#include "partition_alloc/partition_bucket.h" -#include "partition_alloc/partition_dcheck_helper.h" -#include "partition_alloc/partition_freelist_entry.h" -#include "partition_alloc/partition_page_constants.h" -#include "partition_alloc/partition_superpage_extent_entry.h" -#include "partition_alloc/reservation_offset_table.h" #if BUILDFLAG(USE_STARSCAN) -#include "partition_alloc/starscan/state_bitmap.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/state_bitmap.h" #endif #if BUILDFLAG(PUT_REF_COUNT_IN_PREVIOUS_SLOT) -#include "partition_alloc/partition_ref_count.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_ref_count.h" #endif #if BUILDFLAG(PA_DCHECK_IS_ON) -#include "partition_alloc/tagging.h" +#include "base/allocator/partition_allocator/src/partition_alloc/tagging.h" #endif namespace partition_alloc::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_page_constants.h b/base/allocator/partition_allocator/src/partition_alloc/partition_page_constants.h index b0707c7..b7b1a81c 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_page_constants.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_page_constants.h
@@ -5,9 +5,9 @@ #ifndef BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_PARTITION_PAGE_CONSTANTS_H_ #define BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_PARTITION_PAGE_CONSTANTS_H_ +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_constants.h" namespace partition_alloc::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_ref_count.h b/base/allocator/partition_allocator/src/partition_alloc/partition_ref_count.h index eef678da2..0db9a26 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_ref_count.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_ref_count.h
@@ -8,22 +8,22 @@ #include <atomic> #include <cstdint> +#include "base/allocator/partition_allocator/src/partition_alloc/dangling_raw_ptr_checks.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/immediate_crash.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_forward.h" +#include "base/allocator/partition_allocator/src/partition_alloc/tagging.h" #include "build/build_config.h" -#include "partition_alloc/dangling_raw_ptr_checks.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" -#include "partition_alloc/partition_alloc_base/immediate_crash.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_check.h" -#include "partition_alloc/partition_alloc_config.h" -#include "partition_alloc/partition_alloc_constants.h" -#include "partition_alloc/partition_alloc_forward.h" -#include "partition_alloc/tagging.h" #if BUILDFLAG(IS_MAC) -#include "partition_alloc/partition_alloc_base/bits.h" -#include "partition_alloc/partition_alloc_base/mac/mac_util.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bits.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/mac/mac_util.h" #endif // BUILDFLAG(IS_MAC) namespace partition_alloc::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_root.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_root.cc index 25160d8..d7ab6b3 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_root.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_root.cc
@@ -2,44 +2,44 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/partition_root.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_root.h" #include <cstdint> +#include "base/allocator/partition_allocator/src/partition_alloc/freeslot_bitmap.h" +#include "base/allocator/partition_allocator/src/partition_alloc/oom.h" +#include "base/allocator/partition_allocator/src/partition_alloc/page_allocator.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_address_space.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc-inl.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bits.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/thread_annotations.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_bucket.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_cookie.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_oom.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_page.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_ref_count.h" +#include "base/allocator/partition_allocator/src/partition_alloc/reservation_offset_table.h" +#include "base/allocator/partition_allocator/src/partition_alloc/tagging.h" +#include "base/allocator/partition_allocator/src/partition_alloc/thread_isolation/thread_isolation.h" #include "build/build_config.h" -#include "partition_alloc/freeslot_bitmap.h" -#include "partition_alloc/oom.h" -#include "partition_alloc/page_allocator.h" -#include "partition_alloc/partition_address_space.h" -#include "partition_alloc/partition_alloc-inl.h" -#include "partition_alloc/partition_alloc_base/bits.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" -#include "partition_alloc/partition_alloc_base/thread_annotations.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_check.h" -#include "partition_alloc/partition_alloc_config.h" -#include "partition_alloc/partition_alloc_constants.h" -#include "partition_alloc/partition_bucket.h" -#include "partition_alloc/partition_cookie.h" -#include "partition_alloc/partition_oom.h" -#include "partition_alloc/partition_page.h" -#include "partition_alloc/partition_ref_count.h" -#include "partition_alloc/reservation_offset_table.h" -#include "partition_alloc/tagging.h" -#include "partition_alloc/thread_isolation/thread_isolation.h" #if BUILDFLAG(IS_MAC) -#include "partition_alloc/partition_alloc_base/mac/mac_util.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/mac/mac_util.h" #endif #if BUILDFLAG(USE_STARSCAN) -#include "partition_alloc/starscan/pcscan.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan.h" #endif #if !BUILDFLAG(HAS_64_BIT_POINTERS) -#include "partition_alloc/address_pool_manager_bitmap.h" +#include "base/allocator/partition_allocator/src/partition_alloc/address_pool_manager_bitmap.h" #endif #if BUILDFLAG(IS_WIN)
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_root.h b/base/allocator/partition_allocator/src/partition_alloc/partition_root.h index 2fc73cd..5bb8016 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_root.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_root.h
@@ -36,47 +36,47 @@ #include <cstdint> #include <limits> +#include "base/allocator/partition_allocator/src/partition_alloc/address_pool_manager_types.h" +#include "base/allocator/partition_allocator/src/partition_alloc/allocation_guard.h" +#include "base/allocator/partition_allocator/src/partition_alloc/chromecast_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/freeslot_bitmap.h" +#include "base/allocator/partition_allocator/src/partition_alloc/lightweight_quarantine.h" +#include "base/allocator/partition_allocator/src/partition_alloc/page_allocator.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_address_space.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc-inl.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_allocation_data.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bits.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/export_template.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/no_destructor.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/notreached.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/thread_annotations.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_forward.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_hooks.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_bucket.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_bucket_lookup.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_cookie.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_direct_map_extent.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_freelist_entry.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_lock.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_oom.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_page.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_ref_count.h" +#include "base/allocator/partition_allocator/src/partition_alloc/reservation_offset_table.h" +#include "base/allocator/partition_allocator/src/partition_alloc/tagging.h" +#include "base/allocator/partition_allocator/src/partition_alloc/thread_cache.h" +#include "base/allocator/partition_allocator/src/partition_alloc/thread_isolation/thread_isolation.h" #include "build/build_config.h" -#include "partition_alloc/address_pool_manager_types.h" -#include "partition_alloc/allocation_guard.h" -#include "partition_alloc/chromecast_buildflags.h" -#include "partition_alloc/freeslot_bitmap.h" -#include "partition_alloc/lightweight_quarantine.h" -#include "partition_alloc/page_allocator.h" -#include "partition_alloc/partition_address_space.h" -#include "partition_alloc/partition_alloc-inl.h" -#include "partition_alloc/partition_alloc_allocation_data.h" -#include "partition_alloc/partition_alloc_base/bits.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" -#include "partition_alloc/partition_alloc_base/export_template.h" -#include "partition_alloc/partition_alloc_base/no_destructor.h" -#include "partition_alloc/partition_alloc_base/notreached.h" -#include "partition_alloc/partition_alloc_base/thread_annotations.h" -#include "partition_alloc/partition_alloc_base/time/time.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_check.h" -#include "partition_alloc/partition_alloc_config.h" -#include "partition_alloc/partition_alloc_constants.h" -#include "partition_alloc/partition_alloc_forward.h" -#include "partition_alloc/partition_alloc_hooks.h" -#include "partition_alloc/partition_bucket.h" -#include "partition_alloc/partition_bucket_lookup.h" -#include "partition_alloc/partition_cookie.h" -#include "partition_alloc/partition_direct_map_extent.h" -#include "partition_alloc/partition_freelist_entry.h" -#include "partition_alloc/partition_lock.h" -#include "partition_alloc/partition_oom.h" -#include "partition_alloc/partition_page.h" -#include "partition_alloc/partition_ref_count.h" -#include "partition_alloc/reservation_offset_table.h" -#include "partition_alloc/tagging.h" -#include "partition_alloc/thread_cache.h" -#include "partition_alloc/thread_isolation/thread_isolation.h" #if BUILDFLAG(USE_STARSCAN) -#include "partition_alloc/starscan/pcscan.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan.h" #endif namespace partition_alloc::internal { @@ -181,6 +181,10 @@ #if BUILDFLAG(ENABLE_THREAD_ISOLATION) ThreadIsolationOption thread_isolation; #endif + +#if BUILDFLAG(USE_FREELIST_POOL_OFFSETS) + EnableToggle use_pool_offset_freelists = kDisabled; +#endif }; // When/if free lists should be "straightened" when calling @@ -266,6 +270,10 @@ ThreadIsolationOption thread_isolation; #endif +#if BUILDFLAG(USE_FREELIST_POOL_OFFSETS) + bool use_pool_offset_freelists = false; +#endif + #if PA_CONFIG(EXTRAS_REQUIRED) uint32_t extras_size = 0; uint32_t extras_offset = 0; @@ -839,6 +847,12 @@ return *scheduler_loop_quarantine; } +#if BUILDFLAG(USE_FREELIST_POOL_OFFSETS) + PA_ALWAYS_INLINE bool uses_pool_offset_freelists() const { + return settings.use_pool_offset_freelists; + } +#endif // BUILDFLAG(USE_FREELIST_POOL_OFFSETS) + private: static inline StraightenLargerSlotSpanFreeListsMode straighten_larger_slot_span_free_lists_ =
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_stats.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_stats.cc index 93a314a..19775e08 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_stats.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_stats.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 "partition_alloc/partition_stats.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_stats.h" #include <cstring>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_stats.h b/base/allocator/partition_allocator/src/partition_alloc/partition_stats.h index 591fc84f..76b8e8c 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_stats.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_stats.h
@@ -8,10 +8,10 @@ #include <cstddef> #include <cstdint> -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_config.h" -#include "partition_alloc/partition_alloc_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h" namespace partition_alloc {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_superpage_extent_entry.h b/base/allocator/partition_allocator/src/partition_alloc/partition_superpage_extent_entry.h index a0cda4c..8a9989f 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_superpage_extent_entry.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_superpage_extent_entry.h
@@ -7,12 +7,12 @@ #include <cstdint> -#include "partition_alloc/address_pool_manager.h" -#include "partition_alloc/address_pool_manager_types.h" -#include "partition_alloc/partition_alloc_constants.h" -#include "partition_alloc/partition_alloc_forward.h" -#include "partition_alloc/partition_dcheck_helper.h" -#include "partition_alloc/reservation_offset_table.h" +#include "base/allocator/partition_allocator/src/partition_alloc/address_pool_manager.h" +#include "base/allocator/partition_allocator/src/partition_alloc/address_pool_manager_types.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_forward.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_dcheck_helper.h" +#include "base/allocator/partition_allocator/src/partition_alloc/reservation_offset_table.h" // Should not include partition_root.h, partition_bucket.h, partition_page.h. // For IsQuarantineAllowed(), use partition_dcheck_helper.h instead of
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_tls.h b/base/allocator/partition_allocator/src/partition_alloc/partition_tls.h index df8a95c2..44ceba2 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_tls.h +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_tls.h
@@ -5,18 +5,18 @@ #ifndef BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_PARTITION_TLS_H_ #define BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_PARTITION_TLS_H_ +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/immediate_crash.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_base/immediate_crash.h" -#include "partition_alloc/partition_alloc_check.h" #if BUILDFLAG(IS_POSIX) #include <pthread.h> #endif #if BUILDFLAG(IS_WIN) -#include "partition_alloc/partition_alloc_base/win/windows_types.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/win/windows_types.h" #endif // Barebones TLS implementation for use in PartitionAlloc. This doesn't use the
diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_tls_win.cc b/base/allocator/partition_allocator/src/partition_alloc/partition_tls_win.cc index e28ffe8..5caf32e 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/partition_tls_win.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_tls_win.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 "partition_alloc/partition_tls.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_tls.h" #include <windows.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr.h b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr.h index fc4ac9b..a70a181 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr.h +++ b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr.h
@@ -13,25 +13,25 @@ #include <type_traits> #include <utility> +#include "base/allocator/partition_allocator/src/partition_alloc/flags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cxx20_is_constant_evaluated.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_forward.h" +#include "base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_exclusion.h" +#include "base/allocator/partition_allocator/src/partition_alloc/raw_ptr_buildflags.h" #include "build/build_config.h" #include "build/buildflag.h" -#include "partition_alloc/flags.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_base/cxx20_is_constant_evaluated.h" -#include "partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_config.h" -#include "partition_alloc/partition_alloc_forward.h" -#include "partition_alloc/pointers/raw_ptr_exclusion.h" -#include "partition_alloc/raw_ptr_buildflags.h" #if BUILDFLAG(IS_WIN) -#include "partition_alloc/partition_alloc_base/win/win_handle_types.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/win/win_handle_types.h" #endif #if BUILDFLAG(USE_PARTITION_ALLOC) -#include "partition_alloc/partition_alloc_base/check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/check.h" // Live implementation of MiraclePtr being built. #if BUILDFLAG(ENABLE_BACKUP_REF_PTR_SUPPORT) || \ BUILDFLAG(USE_ASAN_BACKUP_REF_PTR) @@ -50,13 +50,13 @@ #endif // BUILDFLAG(USE_PARTITION_ALLOC) #if BUILDFLAG(ENABLE_BACKUP_REF_PTR_SUPPORT) -#include "partition_alloc/pointers/raw_ptr_backup_ref_impl.h" +#include "base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_backup_ref_impl.h" #elif BUILDFLAG(USE_ASAN_UNOWNED_PTR) -#include "partition_alloc/pointers/raw_ptr_asan_unowned_impl.h" +#include "base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_asan_unowned_impl.h" #elif BUILDFLAG(USE_HOOKABLE_RAW_PTR) -#include "partition_alloc/pointers/raw_ptr_hookable_impl.h" +#include "base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_hookable_impl.h" #else -#include "partition_alloc/pointers/raw_ptr_noop_impl.h" +#include "base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_noop_impl.h" #endif namespace cc { @@ -213,7 +213,7 @@ struct IsSupportedType<name##__, void> { \ static constexpr bool value = false; \ }; -#include "partition_alloc/partition_alloc_base/win/win_handle_types_list.inc" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/win/win_handle_types_list.inc" #undef PA_WINDOWS_HANDLE_TYPE #endif
diff --git a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_asan_unowned_impl.cc b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_asan_unowned_impl.cc index 2ecddf5..3a43be20 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_asan_unowned_impl.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_asan_unowned_impl.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 "partition_alloc/pointers/raw_ptr_asan_unowned_impl.h" +#include "base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_asan_unowned_impl.h" #include <sanitizer/asan_interface.h> #include <cstdint> -#include "partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" namespace base::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_asan_unowned_impl.h b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_asan_unowned_impl.h index bb63e34..536d7ec3 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_asan_unowned_impl.h +++ b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_asan_unowned_impl.h
@@ -9,10 +9,10 @@ #include <type_traits> -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/cxx20_is_constant_evaluated.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_forward.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cxx20_is_constant_evaluated.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_forward.h" #if !BUILDFLAG(USE_ASAN_UNOWNED_PTR) #error "Included under wrong build option"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_backup_ref_impl.cc b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_backup_ref_impl.cc index ea52bc2..09ba441 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_backup_ref_impl.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_backup_ref_impl.cc
@@ -2,17 +2,17 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/pointers/raw_ptr_backup_ref_impl.h" +#include "base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_backup_ref_impl.h" #include <cstdint> -#include "partition_alloc/dangling_raw_ptr_checks.h" -#include "partition_alloc/partition_alloc.h" -#include "partition_alloc/partition_alloc_base/check.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_ref_count.h" -#include "partition_alloc/partition_root.h" -#include "partition_alloc/reservation_offset_table.h" +#include "base/allocator/partition_allocator/src/partition_alloc/dangling_raw_ptr_checks.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_ref_count.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_root.h" +#include "base/allocator/partition_allocator/src/partition_alloc/reservation_offset_table.h" namespace base::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_backup_ref_impl.h b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_backup_ref_impl.h index 3f08aa7..34fffbfa 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_backup_ref_impl.h +++ b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_backup_ref_impl.h
@@ -9,20 +9,20 @@ #include <type_traits> +#include "base/allocator/partition_allocator/src/partition_alloc/chromeos_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_address_space.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cxx20_is_constant_evaluated.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_forward.h" +#include "base/allocator/partition_allocator/src/partition_alloc/tagging.h" #include "build/build_config.h" -#include "partition_alloc/chromeos_buildflags.h" -#include "partition_alloc/partition_address_space.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_base/cxx20_is_constant_evaluated.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_config.h" -#include "partition_alloc/partition_alloc_constants.h" -#include "partition_alloc/partition_alloc_forward.h" -#include "partition_alloc/tagging.h" #if !BUILDFLAG(HAS_64_BIT_POINTERS) -#include "partition_alloc/address_pool_manager_bitmap.h" +#include "base/allocator/partition_allocator/src/partition_alloc/address_pool_manager_bitmap.h" #endif #if !BUILDFLAG(ENABLE_BACKUP_REF_PTR_SUPPORT)
diff --git a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_counting_impl_for_test.h b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_counting_impl_for_test.h index 4724c959..fa000f4 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_counting_impl_for_test.h +++ b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_counting_impl_for_test.h
@@ -7,8 +7,8 @@ #include <climits> -#include "partition_alloc/pointers/raw_ptr.h" -#include "partition_alloc/pointers/raw_ptr_noop_impl.h" +#include "base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr.h" +#include "base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_noop_impl.h" namespace base::test {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_exclusion.h b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_exclusion.h index 38a4146..4b8eb7b 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_exclusion.h +++ b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_exclusion.h
@@ -7,9 +7,9 @@ // This header will be leakily included even when // `!use_partition_alloc`, which is okay because it's a leaf header. +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" // nogncheck +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" // nogncheck -#include "partition_alloc/partition_alloc_buildflags.h" #if PA_HAS_ATTRIBUTE(annotate) #if defined(OFFICIAL_BUILD) && !BUILDFLAG(FORCE_ENABLE_RAW_PTR_EXCLUSION)
diff --git a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_hookable_impl.cc b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_hookable_impl.cc index e23ee52..9b71004 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_hookable_impl.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_hookable_impl.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 "partition_alloc/pointers/raw_ptr_hookable_impl.h" +#include "base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_hookable_impl.h" #include <atomic> #include <cstdint>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_hookable_impl.h b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_hookable_impl.h index 336ef18..2a1430c 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_hookable_impl.h +++ b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_hookable_impl.h
@@ -9,11 +9,11 @@ #include <type_traits> -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_base/cxx20_is_constant_evaluated.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_forward.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cxx20_is_constant_evaluated.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_forward.h" #if !BUILDFLAG(USE_HOOKABLE_RAW_PTR) #error "Included under wrong build option"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_nocompile.nc b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_nocompile.nc index 41e91f0e..1b589d1 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_nocompile.nc +++ b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_nocompile.nc
@@ -11,8 +11,8 @@ #include "base/functional/bind.h" #include "base/functional/callback.h" -#include "partition_alloc/pointers/raw_ptr.h" -#include "partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" namespace {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_noop_impl.h b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_noop_impl.h index 5280577..2fc12c6 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_noop_impl.h +++ b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_noop_impl.h
@@ -7,8 +7,8 @@ #include <type_traits> -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_forward.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_forward.h" namespace base::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_unittest.cc index a7fd36f..fdf92412f 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_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 "partition_alloc/pointers/raw_ptr.h" +#include "base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr.h" #include <climits> #include <cstddef> @@ -15,6 +15,20 @@ #include "base/allocator/partition_alloc_features.h" #include "base/allocator/partition_alloc_support.h" +#include "base/allocator/partition_allocator/src/partition_alloc/chromeos_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/dangling_raw_ptr_checks.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc-inl.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/checked_math.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_hooks.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_root.h" +#include "base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_counting_impl_for_test.h" +#include "base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_test_support.h" +#include "base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ref.h" +#include "base/allocator/partition_allocator/src/partition_alloc/tagging.h" #include "base/cpu.h" #include "base/cxx20_to_address.h" #include "base/logging.h" @@ -27,20 +41,6 @@ #include "base/test/task_environment.h" #include "build/build_config.h" #include "build/buildflag.h" -#include "partition_alloc/chromeos_buildflags.h" -#include "partition_alloc/dangling_raw_ptr_checks.h" -#include "partition_alloc/partition_alloc-inl.h" -#include "partition_alloc/partition_alloc.h" -#include "partition_alloc/partition_alloc_base/numerics/checked_math.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_config.h" -#include "partition_alloc/partition_alloc_constants.h" -#include "partition_alloc/partition_alloc_hooks.h" -#include "partition_alloc/partition_root.h" -#include "partition_alloc/pointers/raw_ptr_counting_impl_for_test.h" -#include "partition_alloc/pointers/raw_ptr_test_support.h" -#include "partition_alloc/pointers/raw_ref.h" -#include "partition_alloc/tagging.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/abseil-cpp/absl/types/optional.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ref.h b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ref.h index f389761..7a548fc 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ref.h +++ b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ref.h
@@ -9,11 +9,11 @@ #include <type_traits> #include <utility> -#include "partition_alloc/partition_alloc_base/augmentations/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_config.h" -#include "partition_alloc/pointers/raw_ptr.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/augmentations/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h" +#include "base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr.h" namespace base {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ref_nocompile.nc b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ref_nocompile.nc index 8c59a7e4..8f596d5 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ref_nocompile.nc +++ b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ref_nocompile.nc
@@ -5,7 +5,7 @@ // This is a "No Compile Test" suite. // http://dev.chromium.org/developers/testing/no-compile-tests -#include "partition_alloc/pointers/raw_ref.h" +#include "base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ref.h" namespace {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ref_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ref_unittest.cc index 6daaab64..5249ea1 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ref_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ref_unittest.cc
@@ -2,17 +2,17 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/pointers/raw_ref.h" +#include "base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ref.h" #include <functional> #include <type_traits> +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_counting_impl_for_test.h" +#include "base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr_test_support.h" #include "base/memory/raw_ptr.h" #include "base/test/gtest_util.h" -#include "partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/pointers/raw_ptr_counting_impl_for_test.h" -#include "partition_alloc/pointers/raw_ptr_test_support.h" #include "testing/gtest/include/gtest/gtest.h" #if BUILDFLAG(USE_ASAN_BACKUP_REF_PTR) #include "base/debug/asan_service.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/pool_offset_freelist.h b/base/allocator/partition_allocator/src/partition_alloc/pool_offset_freelist.h index c5402c7..c721b91 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/pool_offset_freelist.h +++ b/base/allocator/partition_allocator/src/partition_alloc/pool_offset_freelist.h
@@ -8,9 +8,9 @@ #include <cstddef> #include <cstdint> -#include "partition_alloc/partition_address_space.h" -#include "partition_alloc/partition_alloc-inl.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_address_space.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc-inl.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" namespace partition_alloc::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/random.cc b/base/allocator/partition_allocator/src/partition_alloc/random.cc index 6e7a97d..db5fa4c 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/random.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/random.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 "partition_alloc/random.h" +#include "base/allocator/partition_allocator/src/partition_alloc/random.h" #include <type_traits> -#include "partition_alloc/partition_alloc_base/rand_util.h" -#include "partition_alloc/partition_alloc_base/thread_annotations.h" -#include "partition_alloc/partition_lock.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/thread_annotations.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_lock.h" namespace partition_alloc {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/random.h b/base/allocator/partition_allocator/src/partition_alloc/random.h index 617c2a0..27faccd9 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/random.h +++ b/base/allocator/partition_allocator/src/partition_alloc/random.h
@@ -7,7 +7,7 @@ #include <stdint.h> -#include "partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" namespace partition_alloc {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/reservation_offset_table.cc b/base/allocator/partition_allocator/src/partition_alloc/reservation_offset_table.cc index 656f3a1..5fff5d6 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/reservation_offset_table.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/reservation_offset_table.cc
@@ -2,9 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/reservation_offset_table.h" +#include "base/allocator/partition_allocator/src/partition_alloc/reservation_offset_table.h" -#include "partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" namespace partition_alloc::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/reservation_offset_table.h b/base/allocator/partition_allocator/src/partition_alloc/reservation_offset_table.h index cfad867..5fdd81b 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/reservation_offset_table.h +++ b/base/allocator/partition_allocator/src/partition_alloc/reservation_offset_table.h
@@ -10,17 +10,17 @@ #include <limits> #include <tuple> +#include "base/allocator/partition_allocator/src/partition_alloc/address_pool_manager.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_address_space.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/tagging.h" +#include "base/allocator/partition_allocator/src/partition_alloc/thread_isolation/alignment.h" #include "build/build_config.h" -#include "partition_alloc/address_pool_manager.h" -#include "partition_alloc/partition_address_space.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_check.h" -#include "partition_alloc/partition_alloc_constants.h" -#include "partition_alloc/tagging.h" -#include "partition_alloc/thread_isolation/alignment.h" namespace partition_alloc::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/reverse_bytes.h b/base/allocator/partition_allocator/src/partition_alloc/reverse_bytes.h index a444651..b236ac7 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/reverse_bytes.h +++ b/base/allocator/partition_allocator/src/partition_alloc/reverse_bytes.h
@@ -12,8 +12,8 @@ #include <cstdint> +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_config.h" namespace partition_alloc::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/reverse_bytes_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/reverse_bytes_unittest.cc index 975cef23..32042cd 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/reverse_bytes_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/reverse_bytes_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 "partition_alloc/reverse_bytes.h" +#include "base/allocator/partition_allocator/src/partition_alloc/reverse_bytes.h" #include <cstdint>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_interception_apple.h b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_interception_apple.h index 23791ee5..ed6f98b 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_interception_apple.h +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_interception_apple.h
@@ -7,8 +7,8 @@ #include <stddef.h> -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/third_party/apple_apsl/malloc.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/third_party/apple_apsl/malloc.h" namespace allocator_shim {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_interception_apple.mm b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_interception_apple.mm index 10964071..fde5be38 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_interception_apple.mm +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_interception_apple.mm
@@ -15,7 +15,7 @@ // only reason to intercept these calls is to re-label OOM crashes with slightly // more details. -#include "partition_alloc/shim/allocator_interception_apple.h" +#include "base/allocator/partition_allocator/src/partition_alloc/shim/allocator_interception_apple.h" #include <CoreFoundation/CoreFoundation.h> #import <Foundation/Foundation.h> @@ -27,20 +27,20 @@ #include <algorithm> #include <new> +#include "base/allocator/partition_allocator/src/partition_alloc/oom.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/mach_logging.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bits.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/shim/malloc_zone_functions_apple.h" +#include "base/allocator/partition_allocator/src/partition_alloc/third_party/apple_apsl/CFBase.h" #include "build/build_config.h" -#include "partition_alloc/oom.h" -#include "partition_alloc/partition_alloc_base/apple/mach_logging.h" -#include "partition_alloc/partition_alloc_base/bits.h" -#include "partition_alloc/partition_alloc_base/logging.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_check.h" -#include "partition_alloc/shim/malloc_zone_functions_apple.h" -#include "partition_alloc/third_party/apple_apsl/CFBase.h" #if BUILDFLAG(IS_IOS) -#include "partition_alloc/partition_alloc_base/ios/ios_util.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/ios/ios_util.h" #else -#include "partition_alloc/partition_alloc_base/mac/mac_util.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/mac/mac_util.h" #endif // The patching of Objective-C runtime bits must be done without any
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_interception_apple_unittest.mm b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_interception_apple_unittest.mm index 925b7a6..44d36a6e 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_interception_apple_unittest.mm +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_interception_apple_unittest.mm
@@ -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 "partition_alloc/shim/allocator_interception_apple.h" +#include "base/allocator/partition_allocator/src/partition_alloc/shim/allocator_interception_apple.h" #include <mach/mach.h> -#include "partition_alloc/shim/allocator_shim.h" -#include "partition_alloc/shim/malloc_zone_functions_apple.h" +#include "base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim.h" +#include "base/allocator/partition_allocator/src/partition_alloc/shim/malloc_zone_functions_apple.h" #include "testing/gtest/include/gtest/gtest.h" namespace allocator_shim {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim.cc b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim.cc index 6b8914d..b44a85ea 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim.cc
@@ -2,36 +2,36 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/shim/allocator_shim.h" +#include "base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim.h" #include <errno.h> #include <atomic> #include <new> +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bits.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/page_size.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/notreached.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/bits.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/memory/page_size.h" -#include "partition_alloc/partition_alloc_base/notreached.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_check.h" #if !BUILDFLAG(IS_WIN) #include <unistd.h> #else -#include "partition_alloc/shim/winheap_stubs_win.h" +#include "base/allocator/partition_allocator/src/partition_alloc/shim/winheap_stubs_win.h" #endif #if BUILDFLAG(IS_APPLE) #include <malloc/malloc.h> -#include "partition_alloc/partition_alloc_base/apple/mach_logging.h" -#include "partition_alloc/shim/allocator_interception_apple.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/mach_logging.h" +#include "base/allocator/partition_allocator/src/partition_alloc/shim/allocator_interception_apple.h" #endif #if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) -#include "partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.h" +#include "base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.h" #endif // No calls to malloc / new in this file. They would would cause re-entrancy of @@ -393,24 +393,24 @@ // avoid crashes in case of operator new() noexcept. Thus, operator new() // noexcept needs to be routed to // allocator_shim::internal::PartitionMallocUnchecked through the shim layer. -#include "partition_alloc/shim/allocator_shim_override_cpp_symbols.h" +#include "base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_cpp_symbols.h" #endif #if BUILDFLAG(IS_ANDROID) // Android does not support symbol interposition. The way malloc symbols are // intercepted on Android is by using link-time -wrap flags. -#include "partition_alloc/shim/allocator_shim_override_linker_wrapped_symbols.h" +#include "base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_linker_wrapped_symbols.h" #elif BUILDFLAG(IS_WIN) // On Windows we use plain link-time overriding of the CRT symbols. -#include "partition_alloc/shim/allocator_shim_override_ucrt_symbols_win.h" +#include "base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_ucrt_symbols_win.h" #elif BUILDFLAG(IS_APPLE) #if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) -#include "partition_alloc/shim/allocator_shim_override_apple_default_zone.h" +#include "base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_apple_default_zone.h" #else // BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) -#include "partition_alloc/shim/allocator_shim_override_apple_symbols.h" +#include "base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_apple_symbols.h" #endif // BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) #else -#include "partition_alloc/shim/allocator_shim_override_libc_symbols.h" +#include "base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_libc_symbols.h" #endif // Some glibc versions (until commit 6c444ad6e953dbdf9c7be065308a0a777) @@ -428,7 +428,7 @@ // this mechanism. #if defined(LIBC_GLIBC) && BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) -#include "partition_alloc/shim/allocator_shim_override_glibc_weak_symbols.h" +#include "base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_glibc_weak_symbols.h" #endif #if BUILDFLAG(IS_APPLE)
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim.h b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim.h index bcb630ec..838aa34 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim.h +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim.h
@@ -8,14 +8,14 @@ #include <stddef.h> #include <stdint.h> +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/types/strong_alias.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/tagging.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_base/types/strong_alias.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/tagging.h" #if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && BUILDFLAG(USE_STARSCAN) -#include "partition_alloc/starscan/pcscan.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan.h" #endif namespace allocator_shim {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_apple_zoned_malloc.cc b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_apple_zoned_malloc.cc index 817f3e9..27cf53ec 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_apple_zoned_malloc.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_apple_zoned_malloc.cc
@@ -4,9 +4,9 @@ #include <utility> -#include "partition_alloc/shim/allocator_interception_apple.h" -#include "partition_alloc/shim/allocator_shim.h" -#include "partition_alloc/shim/malloc_zone_functions_apple.h" +#include "base/allocator/partition_allocator/src/partition_alloc/shim/allocator_interception_apple.h" +#include "base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim.h" +#include "base/allocator/partition_allocator/src/partition_alloc/shim/malloc_zone_functions_apple.h" namespace allocator_shim { namespace {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_glibc.cc b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_glibc.cc index e76cca68..9a7501d7 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_glibc.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_glibc.cc
@@ -4,10 +4,10 @@ #include <limits> -#include "partition_alloc/oom.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/numerics/checked_math.h" -#include "partition_alloc/shim/allocator_shim.h" +#include "base/allocator/partition_allocator/src/partition_alloc/oom.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/checked_math.h" +#include "base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim.h" #include <dlfcn.h> #include <malloc.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_linker_wrapped_symbols.cc b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_linker_wrapped_symbols.cc index 03009a44..950b932a 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_linker_wrapped_symbols.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_linker_wrapped_symbols.cc
@@ -4,8 +4,8 @@ #include <malloc.h> +#include "base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim.h" #include "build/build_config.h" -#include "partition_alloc/shim/allocator_shim.h" // This translation unit defines a default dispatch for the allocator shim which // routes allocations to the original libc functions when using the link-time
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.cc b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.cc index 7ab0ec5..a41096c 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.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 "partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.h" +#include "base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.h" #include <atomic> #include <cstddef> @@ -10,23 +10,23 @@ #include <string> #include <tuple> +#include "base/allocator/partition_allocator/src/partition_alloc/allocation_guard.h" +#include "base/allocator/partition_allocator/src/partition_alloc/chromecast_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/memory_reclaimer.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bits.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/no_destructor.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/checked_math.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_conversions.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_root.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_stats.h" +#include "base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_internals.h" +#include "base/allocator/partition_allocator/src/partition_alloc/shim/nonscannable_allocator.h" #include "build/build_config.h" -#include "partition_alloc/allocation_guard.h" -#include "partition_alloc/chromecast_buildflags.h" -#include "partition_alloc/memory_reclaimer.h" -#include "partition_alloc/partition_alloc.h" -#include "partition_alloc/partition_alloc_base/bits.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/no_destructor.h" -#include "partition_alloc/partition_alloc_base/numerics/checked_math.h" -#include "partition_alloc/partition_alloc_base/numerics/safe_conversions.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_check.h" -#include "partition_alloc/partition_alloc_constants.h" -#include "partition_alloc/partition_root.h" -#include "partition_alloc/partition_stats.h" -#include "partition_alloc/shim/allocator_shim_internals.h" -#include "partition_alloc/shim/nonscannable_allocator.h" #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) #include <malloc.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.h b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.h index 0a84f8e..99b88fd9 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.h +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.h
@@ -5,9 +5,9 @@ #ifndef BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_SHIM_ALLOCATOR_SHIM_DEFAULT_DISPATCH_TO_PARTITION_ALLOC_H_ #define BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_SHIM_ALLOCATOR_SHIM_DEFAULT_DISPATCH_TO_PARTITION_ALLOC_H_ -#include "partition_alloc/partition_alloc.h" -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/shim/allocator_shim.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim.h" namespace allocator_shim::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc_unittest.cc index 23a3946..0e75848 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc_unittest.cc
@@ -2,16 +2,16 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.h" +#include "base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.h" #include <cstdlib> #include <cstring> +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/page_size.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/memory/page_size.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_constants.h" #include "testing/gtest/include/gtest/gtest.h" #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_winheap.cc b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_winheap.cc index 5a43df5..8c923cc 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_winheap.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_winheap.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 "partition_alloc/shim/allocator_shim.h" +#include "base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim.h" #include <ostream> -#include "partition_alloc/partition_alloc_check.h" -#include "partition_alloc/shim/winheap_stubs_win.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/shim/winheap_stubs_win.h" namespace {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_apple_default_zone.h b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_apple_default_zone.h index d0d3b0c..f0676a44 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_apple_default_zone.h +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_apple_default_zone.h
@@ -18,18 +18,18 @@ #include <atomic> #include <tuple> -#include "partition_alloc/partition_alloc_base/apple/mach_logging.h" -#include "partition_alloc/partition_alloc_base/bits.h" -#include "partition_alloc/partition_alloc_base/logging.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_check.h" -#include "partition_alloc/partition_alloc_constants.h" -#include "partition_alloc/shim/early_zone_registration_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/apple/mach_logging.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bits.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/shim/early_zone_registration_constants.h" namespace partition_alloc { // Defined in -// partition_alloc/partition_root.cc +// base/allocator/partition_allocator/src/partition_alloc/partition_root.cc void PartitionAllocMallocHookOnBeforeForkInParent(); void PartitionAllocMallocHookOnAfterForkInParent(); void PartitionAllocMallocHookOnAfterForkInChild();
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_apple_symbols.h b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_apple_symbols.h index d288fe10..42ad8be 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_apple_symbols.h +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_apple_symbols.h
@@ -9,8 +9,8 @@ #ifndef BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_SHIM_ALLOCATOR_SHIM_OVERRIDE_APPLE_SYMBOLS_H_ #define BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_SHIM_ALLOCATOR_SHIM_OVERRIDE_APPLE_SYMBOLS_H_ -#include "partition_alloc/shim/malloc_zone_functions_apple.h" -#include "partition_alloc/third_party/apple_apsl/malloc.h" +#include "base/allocator/partition_allocator/src/partition_alloc/shim/malloc_zone_functions_apple.h" +#include "base/allocator/partition_allocator/src/partition_alloc/third_party/apple_apsl/malloc.h" namespace allocator_shim {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_cpp_symbols.h b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_cpp_symbols.h index f10cce46..5ec1625 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_cpp_symbols.h +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_cpp_symbols.h
@@ -15,9 +15,9 @@ #include <new> +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_internals.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/shim/allocator_shim_internals.h" #if !BUILDFLAG(IS_APPLE) #define SHIM_CPP_SYMBOLS_EXPORT SHIM_ALWAYS_EXPORT
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_glibc_weak_symbols.h b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_glibc_weak_symbols.h index a46464f..b1564c7 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_glibc_weak_symbols.h +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_glibc_weak_symbols.h
@@ -26,7 +26,7 @@ #include <new> -#include "partition_alloc/shim/allocator_shim_internals.h" +#include "base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_internals.h" // __MALLOC_HOOK_VOLATILE not defined in all Glibc headers. #if !defined(__MALLOC_HOOK_VOLATILE)
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_libc_symbols.h b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_libc_symbols.h index 3e8059d..624a4461 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_libc_symbols.h +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_libc_symbols.h
@@ -20,7 +20,7 @@ #include <malloc.h> #endif -#include "partition_alloc/shim/allocator_shim_internals.h" +#include "base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_internals.h" extern "C" {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_linker_wrapped_symbols.h b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_linker_wrapped_symbols.h index 9a5df03a..a2413f8 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_linker_wrapped_symbols.h +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_linker_wrapped_symbols.h
@@ -18,7 +18,7 @@ #include <algorithm> #include <cstring> -#include "partition_alloc/shim/allocator_shim_internals.h" +#include "base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_internals.h" extern "C" {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_ucrt_symbols_win.h b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_ucrt_symbols_win.h index d688893..677899f4 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_ucrt_symbols_win.h +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_override_ucrt_symbols_win.h
@@ -16,9 +16,9 @@ #include <windows.h> -#include "partition_alloc/partition_alloc_base/numerics/checked_math.h" -#include "partition_alloc/partition_alloc_check.h" -#include "partition_alloc/shim/allocator_shim_internals.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/checked_math.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_internals.h" // Even though most C++ allocation operators can be left alone since the // interception works at a lower level, these ones should be
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_unittest.cc index 530b0a8..9bc4056 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_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 "partition_alloc/shim/allocator_shim.h" +#include "base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim.h" #include <stdlib.h> #include <string.h> @@ -14,12 +14,12 @@ #include <sstream> #include <vector> +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/page_size.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" #include "base/synchronization/waitable_event.h" #include "base/threading/platform_thread.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc.h" -#include "partition_alloc/partition_alloc_base/memory/page_size.h" -#include "partition_alloc/partition_alloc_buildflags.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" @@ -29,8 +29,8 @@ #elif BUILDFLAG(IS_APPLE) #include <malloc/malloc.h> -#include "partition_alloc/shim/allocator_interception_apple.h" -#include "partition_alloc/third_party/apple_apsl/malloc.h" +#include "base/allocator/partition_allocator/src/partition_alloc/shim/allocator_interception_apple.h" +#include "base/allocator/partition_allocator/src/partition_alloc/third_party/apple_apsl/malloc.h" #else #include <malloc.h> #endif
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/malloc_zone_functions_apple.cc b/base/allocator/partition_allocator/src/partition_alloc/shim/malloc_zone_functions_apple.cc index 5d42dbe..1c786b1 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/malloc_zone_functions_apple.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/malloc_zone_functions_apple.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 "partition_alloc/shim/malloc_zone_functions_apple.h" +#include "base/allocator/partition_allocator/src/partition_alloc/shim/malloc_zone_functions_apple.h" #include <atomic> #include <type_traits> -#include "partition_alloc/partition_alloc_base/check.h" -#include "partition_alloc/partition_lock.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_lock.h" namespace allocator_shim {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/malloc_zone_functions_apple.h b/base/allocator/partition_allocator/src/partition_alloc/shim/malloc_zone_functions_apple.h index f964aac0..92325543 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/malloc_zone_functions_apple.h +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/malloc_zone_functions_apple.h
@@ -8,9 +8,9 @@ #include <malloc/malloc.h> #include <stddef.h> -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_base/immediate_crash.h" -#include "partition_alloc/third_party/apple_apsl/malloc.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/immediate_crash.h" +#include "base/allocator/partition_allocator/src/partition_alloc/third_party/apple_apsl/malloc.h" namespace allocator_shim {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/malloc_zone_functions_apple_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/shim/malloc_zone_functions_apple_unittest.cc index 49e1013..365639373 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/malloc_zone_functions_apple_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/malloc_zone_functions_apple_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 "partition_alloc/shim/malloc_zone_functions_apple.h" +#include "base/allocator/partition_allocator/src/partition_alloc/shim/malloc_zone_functions_apple.h" #include "testing/gtest/include/gtest/gtest.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/nonscannable_allocator.cc b/base/allocator/partition_allocator/src/partition_alloc/shim/nonscannable_allocator.cc index 06046c4..1374476 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/nonscannable_allocator.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/nonscannable_allocator.cc
@@ -2,16 +2,16 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/shim/nonscannable_allocator.h" +#include "base/allocator/partition_allocator/src/partition_alloc/shim/nonscannable_allocator.h" -#include "partition_alloc/partition_root.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_root.h" #if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) -#include "partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.h" +#include "base/allocator/partition_allocator/src/partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.h" #if BUILDFLAG(USE_STARSCAN) -#include "partition_alloc/starscan/metadata_allocator.h" -#include "partition_alloc/starscan/pcscan.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/metadata_allocator.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan.h" #endif #endif // BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/nonscannable_allocator.h b/base/allocator/partition_allocator/src/partition_alloc/shim/nonscannable_allocator.h index 6b1cd219..665143ca 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/nonscannable_allocator.h +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/nonscannable_allocator.h
@@ -9,15 +9,15 @@ #include <cstddef> #include <memory> -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_base/no_destructor.h" -#include "partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/no_destructor.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" #if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) -#include "partition_alloc/partition_alloc.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc.h" #if BUILDFLAG(USE_STARSCAN) -#include "partition_alloc/starscan/metadata_allocator.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/metadata_allocator.h" #endif #endif // BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/winheap_stubs_win.cc b/base/allocator/partition_allocator/src/partition_alloc/shim/winheap_stubs_win.cc index ce16f15..d4a36d4 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/winheap_stubs_win.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/winheap_stubs_win.cc
@@ -15,9 +15,9 @@ #include <algorithm> #include <limits> -#include "partition_alloc/partition_alloc_base/bits.h" -#include "partition_alloc/partition_alloc_base/numerics/safe_conversions.h" -#include "partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bits.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/numerics/safe_conversions.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" namespace allocator_shim {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/winheap_stubs_win.h b/base/allocator/partition_allocator/src/partition_alloc/shim/winheap_stubs_win.h index a91c9b9..dba03a36 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/winheap_stubs_win.h +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/winheap_stubs_win.h
@@ -11,7 +11,7 @@ #include <stdint.h> -#include "partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" namespace allocator_shim {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/shim/winheap_stubs_win_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/shim/winheap_stubs_win_unittest.cc index 25bd2d01..bb37798 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/shim/winheap_stubs_win_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/shim/winheap_stubs_win_unittest.cc
@@ -2,10 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/shim/winheap_stubs_win.h" +#include "base/allocator/partition_allocator/src/partition_alloc/shim/winheap_stubs_win.h" -#include "partition_alloc/partition_alloc_base/bits.h" -#include "partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bits.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" #include "testing/gtest/include/gtest/gtest.h" namespace allocator_shim {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/spinning_mutex.cc b/base/allocator/partition_allocator/src/partition_alloc/spinning_mutex.cc index c5a87f98..7780111a 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/spinning_mutex.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/spinning_mutex.cc
@@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/spinning_mutex.h" +#include "base/allocator/partition_allocator/src/partition_alloc/spinning_mutex.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_check.h" #if BUILDFLAG(IS_WIN) #include <windows.h> @@ -24,7 +24,7 @@ #endif // PA_CONFIG(HAS_LINUX_KERNEL) #if !PA_CONFIG(HAS_FAST_MUTEX) -#include "partition_alloc/partition_alloc_base/threading/platform_thread.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread.h" #if BUILDFLAG(IS_POSIX) #include <sched.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/spinning_mutex.h b/base/allocator/partition_allocator/src/partition_alloc/spinning_mutex.h index 70351ebf..63d8bbe 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/spinning_mutex.h +++ b/base/allocator/partition_allocator/src/partition_alloc/spinning_mutex.h
@@ -8,16 +8,16 @@ #include <algorithm> #include <atomic> +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/thread_annotations.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h" +#include "base/allocator/partition_allocator/src/partition_alloc/yield_processor.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_base/thread_annotations.h" -#include "partition_alloc/partition_alloc_check.h" -#include "partition_alloc/partition_alloc_config.h" -#include "partition_alloc/yield_processor.h" #if BUILDFLAG(IS_WIN) -#include "partition_alloc/partition_alloc_base/win/windows_types.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/win/windows_types.h" #endif #if BUILDFLAG(IS_POSIX)
diff --git a/base/allocator/partition_allocator/src/partition_alloc/starscan/logging.h b/base/allocator/partition_allocator/src/partition_alloc/starscan/logging.h index 3b46a81..5c8169d 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/starscan/logging.h +++ b/base/allocator/partition_allocator/src/partition_alloc/starscan/logging.h
@@ -5,8 +5,8 @@ #ifndef BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_STARSCAN_LOGGING_H_ #define BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_STARSCAN_LOGGING_H_ -#include "partition_alloc/allocation_guard.h" -#include "partition_alloc/partition_alloc_base/logging.h" +#include "base/allocator/partition_allocator/src/partition_alloc/allocation_guard.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging.h" namespace partition_alloc::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/starscan/metadata_allocator.cc b/base/allocator/partition_allocator/src/partition_alloc/starscan/metadata_allocator.cc index e271159..6e2d6cf 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/starscan/metadata_allocator.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/starscan/metadata_allocator.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 "partition_alloc/partition_root.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_root.h" #include <cstring> -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_base/no_destructor.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/no_destructor.h" namespace partition_alloc::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/starscan/metadata_allocator.h b/base/allocator/partition_allocator/src/partition_alloc/starscan/metadata_allocator.h index 09d14a79..93b04b48 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/starscan/metadata_allocator.h +++ b/base/allocator/partition_allocator/src/partition_alloc/starscan/metadata_allocator.h
@@ -7,9 +7,9 @@ #include <utility> -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_constants.h" -#include "partition_alloc/partition_root.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_root.h" namespace partition_alloc::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan.cc b/base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan.cc index 2227eef..504658f 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan.cc
@@ -2,10 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/starscan/pcscan.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/starscan/pcscan_internal.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan_internal.h" namespace partition_alloc::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan.h b/base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan.h index e43070b..0bb7ad3 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan.h +++ b/base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan.h
@@ -7,15 +7,15 @@ #include <atomic> -#include "partition_alloc/page_allocator.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_config.h" -#include "partition_alloc/partition_alloc_forward.h" -#include "partition_alloc/partition_direct_map_extent.h" -#include "partition_alloc/partition_page.h" -#include "partition_alloc/starscan/pcscan_scheduling.h" -#include "partition_alloc/tagging.h" +#include "base/allocator/partition_allocator/src/partition_alloc/page_allocator.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_forward.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_direct_map_extent.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_page.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan_scheduling.h" +#include "base/allocator/partition_allocator/src/partition_alloc/tagging.h" namespace partition_alloc {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan_internal.cc b/base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan_internal.cc index 8b6f478..8b25637 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan_internal.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan_internal.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 "partition_alloc/starscan/pcscan_internal.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan_internal.h" #include <algorithm> #include <array> @@ -17,42 +17,42 @@ #include <unordered_map> #include <vector> +#include "base/allocator/partition_allocator/src/partition_alloc/address_pool_manager.h" +#include "base/allocator/partition_allocator/src/partition_alloc/allocation_guard.h" +#include "base/allocator/partition_allocator/src/partition_alloc/page_allocator.h" +#include "base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_address_space.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bits.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cpu.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/alias.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/immediate_crash.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/ref_counted.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/scoped_refptr.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/no_destructor.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_page.h" +#include "base/allocator/partition_allocator/src/partition_alloc/reservation_offset_table.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/metadata_allocator.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan_scheduling.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/raceful_worklist.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/scan_loop.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/snapshot.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/stack/stack.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/stats_collector.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/stats_reporter.h" +#include "base/allocator/partition_allocator/src/partition_alloc/tagging.h" +#include "base/allocator/partition_allocator/src/partition_alloc/thread_cache.h" #include "build/build_config.h" -#include "partition_alloc/address_pool_manager.h" -#include "partition_alloc/allocation_guard.h" -#include "partition_alloc/page_allocator.h" -#include "partition_alloc/page_allocator_constants.h" -#include "partition_alloc/partition_address_space.h" -#include "partition_alloc/partition_alloc.h" -#include "partition_alloc/partition_alloc_base/bits.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/cpu.h" -#include "partition_alloc/partition_alloc_base/debug/alias.h" -#include "partition_alloc/partition_alloc_base/immediate_crash.h" -#include "partition_alloc/partition_alloc_base/memory/ref_counted.h" -#include "partition_alloc/partition_alloc_base/memory/scoped_refptr.h" -#include "partition_alloc/partition_alloc_base/no_destructor.h" -#include "partition_alloc/partition_alloc_base/threading/platform_thread.h" -#include "partition_alloc/partition_alloc_base/time/time.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_check.h" -#include "partition_alloc/partition_alloc_config.h" -#include "partition_alloc/partition_alloc_constants.h" -#include "partition_alloc/partition_page.h" -#include "partition_alloc/reservation_offset_table.h" -#include "partition_alloc/starscan/metadata_allocator.h" -#include "partition_alloc/starscan/pcscan_scheduling.h" -#include "partition_alloc/starscan/raceful_worklist.h" -#include "partition_alloc/starscan/scan_loop.h" -#include "partition_alloc/starscan/snapshot.h" -#include "partition_alloc/starscan/stack/stack.h" -#include "partition_alloc/starscan/stats_collector.h" -#include "partition_alloc/starscan/stats_reporter.h" -#include "partition_alloc/tagging.h" -#include "partition_alloc/thread_cache.h" #if !BUILDFLAG(HAS_64_BIT_POINTERS) -#include "partition_alloc/address_pool_manager_bitmap.h" +#include "base/allocator/partition_allocator/src/partition_alloc/address_pool_manager_bitmap.h" #endif #if PA_CONFIG(STARSCAN_NOINLINE_SCAN_FUNCTIONS)
diff --git a/base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan_internal.h b/base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan_internal.h index 00c8ac7..fd7f16b 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan_internal.h +++ b/base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan_internal.h
@@ -13,12 +13,12 @@ #include <utility> #include <vector> -#include "partition_alloc/partition_alloc_base/memory/scoped_refptr.h" -#include "partition_alloc/partition_alloc_base/no_destructor.h" -#include "partition_alloc/starscan/metadata_allocator.h" -#include "partition_alloc/starscan/pcscan.h" -#include "partition_alloc/starscan/starscan_fwd.h" -#include "partition_alloc/starscan/write_protector.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/memory/scoped_refptr.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/no_destructor.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/metadata_allocator.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/starscan_fwd.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/write_protector.h" namespace partition_alloc::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan_scheduling.cc b/base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan_scheduling.cc index 1cbc71e..319e016b 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan_scheduling.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan_scheduling.cc
@@ -2,18 +2,18 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/starscan/pcscan_scheduling.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan_scheduling.h" #include <algorithm> #include <atomic> -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/time/time.h" -#include "partition_alloc/partition_alloc_check.h" -#include "partition_alloc/partition_alloc_hooks.h" -#include "partition_alloc/partition_lock.h" -#include "partition_alloc/starscan/logging.h" -#include "partition_alloc/starscan/pcscan.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_hooks.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_lock.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/logging.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan.h" namespace partition_alloc::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan_scheduling.h b/base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan_scheduling.h index c1cfce2..f795535f 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan_scheduling.h +++ b/base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan_scheduling.h
@@ -8,11 +8,11 @@ #include <atomic> #include <cstdint> -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_base/thread_annotations.h" -#include "partition_alloc/partition_alloc_base/time/time.h" -#include "partition_alloc/partition_lock.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/thread_annotations.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_lock.h" namespace partition_alloc::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan_scheduling_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan_scheduling_unittest.cc index d5ee5cd..768080e 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan_scheduling_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan_scheduling_unittest.cc
@@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/starscan/pcscan_scheduling.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan_scheduling.h" -#include "partition_alloc/partition_alloc_base/time/time.h" -#include "partition_alloc/partition_alloc_base/time/time_override.h" -#include "partition_alloc/partition_lock.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time_override.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_lock.h" #include "testing/gtest/include/gtest/gtest.h" namespace partition_alloc::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan_unittest.cc index 133dc315..5e8ad61 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan_unittest.cc
@@ -6,21 +6,21 @@ #if !defined(MEMORY_TOOL_REPLACES_ALLOCATOR) -#include "partition_alloc/starscan/pcscan.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc-inl.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bits.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cpu.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_for_testing.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_root.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/stack/stack.h" +#include "base/allocator/partition_allocator/src/partition_alloc/tagging.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc-inl.h" -#include "partition_alloc/partition_alloc_base/bits.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/cpu.h" -#include "partition_alloc/partition_alloc_base/logging.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_config.h" -#include "partition_alloc/partition_alloc_constants.h" -#include "partition_alloc/partition_alloc_for_testing.h" -#include "partition_alloc/partition_root.h" -#include "partition_alloc/starscan/stack/stack.h" -#include "partition_alloc/tagging.h" #include "testing/gtest/include/gtest/gtest.h" #if BUILDFLAG(USE_STARSCAN)
diff --git a/base/allocator/partition_allocator/src/partition_alloc/starscan/raceful_worklist.h b/base/allocator/partition_allocator/src/partition_alloc/starscan/raceful_worklist.h index 4927a2dc..baa3e05 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/starscan/raceful_worklist.h +++ b/base/allocator/partition_allocator/src/partition_alloc/starscan/raceful_worklist.h
@@ -9,10 +9,10 @@ #include <atomic> #include <vector> -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/rand_util.h" -#include "partition_alloc/partition_alloc_check.h" -#include "partition_alloc/starscan/metadata_allocator.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/rand_util.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/metadata_allocator.h" namespace partition_alloc::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/starscan/scan_loop.h b/base/allocator/partition_allocator/src/partition_alloc/starscan/scan_loop.h index 470a22e..ff11624 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/starscan/scan_loop.h +++ b/base/allocator/partition_allocator/src/partition_alloc/starscan/scan_loop.h
@@ -8,13 +8,13 @@ #include <cstddef> #include <cstdint> +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/starscan_fwd.h" +#include "base/allocator/partition_allocator/src/partition_alloc/tagging.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_check.h" -#include "partition_alloc/partition_alloc_config.h" -#include "partition_alloc/starscan/starscan_fwd.h" -#include "partition_alloc/tagging.h" #if defined(ARCH_CPU_X86_64) // Include order is important, so we disable formatting.
diff --git a/base/allocator/partition_allocator/src/partition_alloc/starscan/scan_loop_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/starscan/scan_loop_unittest.cc index 914be57..dd24490b 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/starscan/scan_loop_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/starscan/scan_loop_unittest.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 "partition_alloc/starscan/scan_loop.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/scan_loop.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cpu.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/cpu.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_config.h" #include "testing/gtest/include/gtest/gtest.h"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/starscan/snapshot.cc b/base/allocator/partition_allocator/src/partition_alloc/starscan/snapshot.cc index 27945360..311aee4 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/starscan/snapshot.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/starscan/snapshot.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 "partition_alloc/starscan/snapshot.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/snapshot.h" #include <memory> #include <mutex> -#include "partition_alloc/partition_alloc_check.h" -#include "partition_alloc/starscan/pcscan_internal.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan_internal.h" namespace partition_alloc::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/starscan/snapshot.h b/base/allocator/partition_allocator/src/partition_alloc/starscan/snapshot.h index 695e66c3..de9bcdc 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/starscan/snapshot.h +++ b/base/allocator/partition_allocator/src/partition_alloc/starscan/snapshot.h
@@ -8,8 +8,8 @@ #include <memory> #include <utility> -#include "partition_alloc/starscan/pcscan_internal.h" -#include "partition_alloc/starscan/raceful_worklist.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan_internal.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/raceful_worklist.h" namespace partition_alloc::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/starscan/stack/stack.cc b/base/allocator/partition_allocator/src/partition_alloc/starscan/stack/stack.cc index 86ce054a..ec6ecbb 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/starscan/stack/stack.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/starscan/stack/stack.cc
@@ -2,15 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/starscan/stack/stack.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/stack/stack.h" #include <cstdint> #include <limits> +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_check.h" #if BUILDFLAG(IS_WIN) #include <windows.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/starscan/stack/stack.h b/base/allocator/partition_allocator/src/partition_alloc/starscan/stack/stack.h index 9f8fea7..74c195e1 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/starscan/stack/stack.h +++ b/base/allocator/partition_allocator/src/partition_alloc/starscan/stack/stack.h
@@ -7,8 +7,8 @@ #include <cstdint> -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" namespace partition_alloc::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/starscan/stack/stack_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/starscan/stack/stack_unittest.cc index b50e9125..ecbcd66 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/starscan/stack/stack_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/starscan/stack/stack_unittest.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 "partition_alloc/starscan/stack/stack.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/stack/stack.h" #include <memory> #include <ostream> +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" #include "testing/gtest/include/gtest/gtest.h" #if !defined(MEMORY_TOOL_REPLACES_ALLOCATOR)
diff --git a/base/allocator/partition_allocator/src/partition_alloc/starscan/state_bitmap.h b/base/allocator/partition_allocator/src/partition_alloc/starscan/state_bitmap.h index 9c4c3be..bdefe3f 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/starscan/state_bitmap.h +++ b/base/allocator/partition_allocator/src/partition_alloc/starscan/state_bitmap.h
@@ -15,9 +15,9 @@ #include <tuple> #include <utility> -#include "partition_alloc/partition_alloc_base/bits.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/bits.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" namespace partition_alloc::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/starscan/state_bitmap_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/starscan/state_bitmap_unittest.cc index ea081d535c..3878944 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/starscan/state_bitmap_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/starscan/state_bitmap_unittest.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 "partition_alloc/starscan/state_bitmap.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/state_bitmap.h" #include <cstdint> -#include "partition_alloc/page_allocator.h" -#include "partition_alloc/partition_alloc_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/page_allocator.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h" #include "testing/gtest/include/gtest/gtest.h" namespace partition_alloc::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/starscan/stats_collector.cc b/base/allocator/partition_allocator/src/partition_alloc/starscan/stats_collector.cc index 36ecf94..af622d1 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/starscan/stats_collector.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/starscan/stats_collector.cc
@@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/starscan/stats_collector.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/stats_collector.h" -#include "partition_alloc/partition_alloc_base/time/time.h" -#include "partition_alloc/starscan/logging.h" -#include "partition_alloc/starscan/stats_reporter.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/logging.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/stats_reporter.h" namespace partition_alloc::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/starscan/stats_collector.h b/base/allocator/partition_allocator/src/partition_alloc/starscan/stats_collector.h index 6de21e92..af060ad 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/starscan/stats_collector.h +++ b/base/allocator/partition_allocator/src/partition_alloc/starscan/stats_collector.h
@@ -14,10 +14,10 @@ #include <unordered_map> #include <utility> -#include "partition_alloc/partition_alloc_base/threading/platform_thread.h" -#include "partition_alloc/partition_alloc_base/time/time.h" -#include "partition_alloc/starscan/metadata_allocator.h" -#include "partition_alloc/starscan/starscan_fwd.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/metadata_allocator.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/starscan_fwd.h" namespace partition_alloc {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/starscan/stats_reporter.h b/base/allocator/partition_allocator/src/partition_alloc/starscan/stats_reporter.h index b2c471f57..8f0f910 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/starscan/stats_reporter.h +++ b/base/allocator/partition_allocator/src/partition_alloc/starscan/stats_reporter.h
@@ -5,8 +5,8 @@ #ifndef BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_STARSCAN_STATS_REPORTER_H_ #define BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_STARSCAN_STATS_REPORTER_H_ -#include "partition_alloc/partition_alloc_base/threading/platform_thread.h" -#include "partition_alloc/starscan/stats_collector.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/stats_collector.h" namespace partition_alloc {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/starscan/write_protector.cc b/base/allocator/partition_allocator/src/partition_alloc/starscan/write_protector.cc index d86e15df..cc00c745 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/starscan/write_protector.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/starscan/write_protector.cc
@@ -2,18 +2,18 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/starscan/write_protector.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/write_protector.h" #include <mutex> #include <thread> +#include "base/allocator/partition_allocator/src/partition_alloc/address_pool_manager.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_address_space.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/logging.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/posix/eintr_wrapper.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" #include "build/build_config.h" -#include "partition_alloc/address_pool_manager.h" -#include "partition_alloc/partition_address_space.h" -#include "partition_alloc/partition_alloc_base/logging.h" -#include "partition_alloc/partition_alloc_base/posix/eintr_wrapper.h" -#include "partition_alloc/partition_alloc_base/threading/platform_thread.h" -#include "partition_alloc/partition_alloc_check.h" #if PA_CONFIG(STARSCAN_UFFD_WRITE_PROTECTOR_SUPPORTED) #include <fcntl.h>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/starscan/write_protector.h b/base/allocator/partition_allocator/src/partition_alloc/starscan/write_protector.h index 6b03e1c..55a095a6 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/starscan/write_protector.h +++ b/base/allocator/partition_allocator/src/partition_alloc/starscan/write_protector.h
@@ -9,10 +9,10 @@ #include <cstdint> #include <mutex> +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/metadata_allocator.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/pcscan.h" +#include "base/allocator/partition_allocator/src/partition_alloc/starscan/raceful_worklist.h" #include "build/build_config.h" -#include "partition_alloc/starscan/metadata_allocator.h" -#include "partition_alloc/starscan/pcscan.h" -#include "partition_alloc/starscan/raceful_worklist.h" namespace partition_alloc::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/tagging.cc b/base/allocator/partition_allocator/src/partition_alloc/tagging.cc index 7590ba05..9b44119 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/tagging.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/tagging.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 "partition_alloc/tagging.h" +#include "base/allocator/partition_allocator/src/partition_alloc/tagging.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cpu.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/cpu.h" -#include "partition_alloc/partition_alloc_check.h" -#include "partition_alloc/partition_alloc_config.h" #if PA_CONFIG(HAS_MEMORY_TAGGING) #include <arm_acle.h> @@ -42,8 +42,8 @@ #endif #if BUILDFLAG(IS_ANDROID) -#include "partition_alloc/partition_alloc_base/files/file_path.h" -#include "partition_alloc/partition_alloc_base/native_library.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/files/file_path.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/native_library.h" #endif // BUILDFLAG(IS_ANDROID) namespace partition_alloc {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/tagging.h b/base/allocator/partition_allocator/src/partition_alloc/tagging.h index 2d3e9e0..12ad5e9f 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/tagging.h +++ b/base/allocator/partition_allocator/src/partition_alloc/tagging.h
@@ -11,10 +11,10 @@ #include <cstddef> #include <cstdint> +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_config.h" #if PA_CONFIG(HAS_MEMORY_TAGGING) && BUILDFLAG(IS_ANDROID) #include <csignal>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/tagging_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/tagging_unittest.cc index 7aa5b9b7..c0d0f84 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/tagging_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/tagging_unittest.cc
@@ -2,14 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/tagging.h" +#include "base/allocator/partition_allocator/src/partition_alloc/tagging.h" #include <cstdint> +#include "base/allocator/partition_allocator/src/partition_alloc/page_allocator.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cpu.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h" #include "build/build_config.h" -#include "partition_alloc/page_allocator.h" -#include "partition_alloc/partition_alloc_base/cpu.h" -#include "partition_alloc/partition_alloc_config.h" #include "testing/gtest/include/gtest/gtest.h" namespace partition_alloc::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/thread_cache.cc b/base/allocator/partition_allocator/src/partition_alloc/thread_cache.cc index fdffd97..130a7abb 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/thread_cache.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/thread_cache.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 "partition_alloc/thread_cache.h" +#include "base/allocator/partition_allocator/src/partition_alloc/thread_cache.h" #include <sys/types.h> @@ -10,17 +10,17 @@ #include <atomic> #include <cstdint> +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc-inl.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/immediate_crash.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_root.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc-inl.h" -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" -#include "partition_alloc/partition_alloc_base/immediate_crash.h" -#include "partition_alloc/partition_alloc_base/time/time.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_check.h" -#include "partition_alloc/partition_alloc_config.h" -#include "partition_alloc/partition_alloc_constants.h" -#include "partition_alloc/partition_root.h" namespace partition_alloc {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/thread_cache.h b/base/allocator/partition_allocator/src/partition_alloc/thread_cache.h index 381245c3..d3a8bea 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/thread_cache.h +++ b/base/allocator/partition_allocator/src/partition_alloc/thread_cache.h
@@ -10,21 +10,21 @@ #include <limits> #include <memory> +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc-inl.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/compiler_specific.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/thread_annotations.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/time/time.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_forward.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_bucket_lookup.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_freelist_entry.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_lock.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_stats.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_tls.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc-inl.h" -#include "partition_alloc/partition_alloc_base/compiler_specific.h" -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" -#include "partition_alloc/partition_alloc_base/thread_annotations.h" -#include "partition_alloc/partition_alloc_base/time/time.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_config.h" -#include "partition_alloc/partition_alloc_forward.h" -#include "partition_alloc/partition_bucket_lookup.h" -#include "partition_alloc/partition_freelist_entry.h" -#include "partition_alloc/partition_lock.h" -#include "partition_alloc/partition_stats.h" -#include "partition_alloc/partition_tls.h" #if defined(ARCH_CPU_X86_64) && BUILDFLAG(HAS_64_BIT_POINTERS) #include <algorithm>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/thread_cache_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/thread_cache_unittest.cc index 83cdaa77..084da9f 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/thread_cache_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/thread_cache_unittest.cc
@@ -2,23 +2,23 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/thread_cache.h" +#include "base/allocator/partition_allocator/src/partition_alloc/thread_cache.h" #include <algorithm> #include <atomic> #include <vector> +#include "base/allocator/partition_allocator/src/partition_alloc/extended_api.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_address_space.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/thread_annotations.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/threading/platform_thread_for_testing.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_for_testing.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_lock.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_root.h" +#include "base/allocator/partition_allocator/src/partition_alloc/tagging.h" #include "build/build_config.h" -#include "partition_alloc/extended_api.h" -#include "partition_alloc/partition_address_space.h" -#include "partition_alloc/partition_alloc_base/thread_annotations.h" -#include "partition_alloc/partition_alloc_base/threading/platform_thread_for_testing.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_config.h" -#include "partition_alloc/partition_alloc_for_testing.h" -#include "partition_alloc/partition_lock.h" -#include "partition_alloc/partition_root.h" -#include "partition_alloc/tagging.h" #include "testing/gtest/include/gtest/gtest.h" // With *SAN, PartitionAlloc is replaced in partition_alloc.h by ASAN, so we
diff --git a/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/alignment.h b/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/alignment.h index d74dcfc..0d72d456 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/alignment.h +++ b/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/alignment.h
@@ -5,11 +5,11 @@ #ifndef BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_THREAD_ISOLATION_ALIGNMENT_H_ #define BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_THREAD_ISOLATION_ALIGNMENT_H_ -#include "partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" #if BUILDFLAG(ENABLE_THREAD_ISOLATION) -#include "partition_alloc/page_allocator_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h" #define PA_THREAD_ISOLATED_ALIGN_SZ partition_alloc::internal::SystemPageSize() #define PA_THREAD_ISOLATED_ALIGN_OFFSET_MASK (PA_THREAD_ISOLATED_ALIGN_SZ - 1)
diff --git a/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/pkey.cc b/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/pkey.cc index c4c46ed..ad0b8ad 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/pkey.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/pkey.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 "partition_alloc/thread_isolation/pkey.h" +#include "base/allocator/partition_allocator/src/partition_alloc/thread_isolation/pkey.h" #if BUILDFLAG(ENABLE_PKEYS) @@ -11,9 +11,9 @@ #include <sys/syscall.h> #include <unistd.h> -#include "partition_alloc/partition_alloc_base/cpu.h" -#include "partition_alloc/partition_alloc_check.h" -#include "partition_alloc/thread_isolation/thread_isolation.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/cpu.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/thread_isolation/thread_isolation.h" #if !BUILDFLAG(IS_LINUX) #error "This pkey code is currently only supported on Linux"
diff --git a/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/pkey.h b/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/pkey.h index 125b200..697779f 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/pkey.h +++ b/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/pkey.h
@@ -5,13 +5,13 @@ #ifndef BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_THREAD_ISOLATION_PKEY_H_ #define BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_THREAD_ISOLATION_PKEY_H_ -#include "partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" #if BUILDFLAG(ENABLE_PKEYS) -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" -#include "partition_alloc/thread_isolation/alignment.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/thread_isolation/alignment.h" #include <cstddef> #include <cstdint>
diff --git a/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/pkey_unittest.cc b/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/pkey_unittest.cc index 78695965..d0b1b9f 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/pkey_unittest.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/pkey_unittest.cc
@@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/address_pool_manager.h" -#include "partition_alloc/partition_alloc_buildflags.h" -#include "partition_alloc/partition_alloc_constants.h" -#include "partition_alloc/partition_root.h" -#include "partition_alloc/thread_isolation/thread_isolation.h" +#include "base/allocator/partition_allocator/src/partition_alloc/address_pool_manager.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_root.h" +#include "base/allocator/partition_allocator/src/partition_alloc/thread_isolation/thread_isolation.h" #if BUILDFLAG(ENABLE_PKEYS) @@ -14,13 +14,13 @@ #include <sys/mman.h> #include <sys/syscall.h> -#include "partition_alloc/address_space_stats.h" -#include "partition_alloc/page_allocator.h" -#include "partition_alloc/page_allocator_constants.h" -#include "partition_alloc/partition_alloc.h" -#include "partition_alloc/partition_alloc_base/no_destructor.h" -#include "partition_alloc/partition_alloc_forward.h" -#include "partition_alloc/thread_isolation/pkey.h" +#include "base/allocator/partition_allocator/src/partition_alloc/address_space_stats.h" +#include "base/allocator/partition_allocator/src/partition_alloc/page_allocator.h" +#include "base/allocator/partition_allocator/src/partition_alloc/page_allocator_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/no_destructor.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_forward.h" +#include "base/allocator/partition_allocator/src/partition_alloc/thread_isolation/pkey.h" #include "testing/gtest/include/gtest/gtest.h" #define ISOLATED_FUNCTION extern "C" __attribute__((used))
diff --git a/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/thread_isolation.cc b/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/thread_isolation.cc index 55491f7..713d55a6 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/thread_isolation.cc +++ b/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/thread_isolation.cc
@@ -2,17 +2,17 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "partition_alloc/thread_isolation/thread_isolation.h" +#include "base/allocator/partition_allocator/src/partition_alloc/thread_isolation/thread_isolation.h" #if BUILDFLAG(ENABLE_THREAD_ISOLATION) -#include "partition_alloc/address_pool_manager.h" -#include "partition_alloc/partition_alloc_check.h" -#include "partition_alloc/partition_alloc_constants.h" -#include "partition_alloc/reservation_offset_table.h" +#include "base/allocator/partition_allocator/src/partition_alloc/address_pool_manager.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_check.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_constants.h" +#include "base/allocator/partition_allocator/src/partition_alloc/reservation_offset_table.h" #if BUILDFLAG(ENABLE_PKEYS) -#include "partition_alloc/thread_isolation/pkey.h" +#include "base/allocator/partition_allocator/src/partition_alloc/thread_isolation/pkey.h" #endif namespace partition_alloc::internal {
diff --git a/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/thread_isolation.h b/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/thread_isolation.h index bf88c39..a734af9 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/thread_isolation.h +++ b/base/allocator/partition_allocator/src/partition_alloc/thread_isolation/thread_isolation.h
@@ -5,18 +5,18 @@ #ifndef BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_THREAD_ISOLATION_THREAD_ISOLATION_H_ #define BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_THREAD_ISOLATION_THREAD_ISOLATION_H_ -#include "partition_alloc/partition_alloc_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_buildflags.h" #if BUILDFLAG(ENABLE_THREAD_ISOLATION) #include <cstddef> #include <cstdint> -#include "partition_alloc/partition_alloc_base/component_export.h" -#include "partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/component_export.h" +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/debug/debugging_buildflags.h" #if BUILDFLAG(ENABLE_PKEYS) -#include "partition_alloc/thread_isolation/pkey.h" +#include "base/allocator/partition_allocator/src/partition_alloc/thread_isolation/pkey.h" #endif #if !BUILDFLAG(HAS_64_BIT_POINTERS)
diff --git a/base/allocator/partition_allocator/src/partition_alloc/yield_processor.h b/base/allocator/partition_allocator/src/partition_alloc/yield_processor.h index 5748cfb..c61ada7 100644 --- a/base/allocator/partition_allocator/src/partition_alloc/yield_processor.h +++ b/base/allocator/partition_allocator/src/partition_alloc/yield_processor.h
@@ -5,8 +5,8 @@ #ifndef BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_YIELD_PROCESSOR_H_ #define BASE_ALLOCATOR_PARTITION_ALLOCATOR_SRC_PARTITION_ALLOC_YIELD_PROCESSOR_H_ +#include "base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h" #include "build/build_config.h" -#include "partition_alloc/partition_alloc_config.h" // The PA_YIELD_PROCESSOR macro wraps an architecture specific-instruction that // informs the processor we're in a busy wait, so it can handle the branch more
diff --git a/base/android/feature_map.h b/base/android/feature_map.h index 2fb6dc2b..fd0ce95 100644 --- a/base/android/feature_map.h +++ b/base/android/feature_map.h
@@ -8,7 +8,7 @@ #include "base/base_export.h" #include "base/containers/flat_map.h" #include "base/feature_list.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" namespace base::android {
diff --git a/base/fuchsia/fuchsia_logging.h b/base/fuchsia/fuchsia_logging.h index c7e20ed..ce2d4e09 100644 --- a/base/fuchsia/fuchsia_logging.h +++ b/base/fuchsia/fuchsia_logging.h
@@ -16,7 +16,7 @@ #include "base/base_export.h" #include "base/check.h" #include "base/logging.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" // Use the ZX_LOG family of macros along with a zx_status_t containing a Zircon // error. The error value will be decoded so that logged messages explain the
diff --git a/base/fuchsia/intl_profile_watcher.h b/base/fuchsia/intl_profile_watcher.h index 67adef8..787368c 100644 --- a/base/fuchsia/intl_profile_watcher.h +++ b/base/fuchsia/intl_profile_watcher.h
@@ -10,7 +10,7 @@ #include "base/base_export.h" #include "base/functional/callback.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" namespace base {
diff --git a/base/fuchsia/mem_buffer_util.h b/base/fuchsia/mem_buffer_util.h index 8e978e1..0c17515 100644 --- a/base/fuchsia/mem_buffer_util.h +++ b/base/fuchsia/mem_buffer_util.h
@@ -10,7 +10,7 @@ #include "base/base_export.h" #include "base/files/file.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "third_party/abseil-cpp/absl/types/optional.h" namespace base {
diff --git a/base/fuchsia/scoped_service_binding.h b/base/fuchsia/scoped_service_binding.h index 3ddc6269..79574240 100644 --- a/base/fuchsia/scoped_service_binding.h +++ b/base/fuchsia/scoped_service_binding.h
@@ -19,7 +19,7 @@ #include "base/base_export.h" #include "base/fuchsia/scoped_service_publisher.h" #include "base/functional/callback.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "third_party/abseil-cpp/absl/types/optional.h" namespace sys {
diff --git a/base/fuchsia/system_product_info_unittest.cc b/base/fuchsia/system_product_info_unittest.cc index 518f2e3..fc65fa7 100644 --- a/base/fuchsia/system_product_info_unittest.cc +++ b/base/fuchsia/system_product_info_unittest.cc
@@ -18,7 +18,7 @@ #include "base/functional/bind.h" #include "base/location.h" #include "base/run_loop.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/test/bind.h" #include "base/test/gtest_util.h" #include "base/test/task_environment.h"
diff --git a/base/ios/scoped_critical_action.h b/base/ios/scoped_critical_action.h index feeab2f..4b26342 100644 --- a/base/ios/scoped_critical_action.h +++ b/base/ios/scoped_critical_action.h
@@ -10,7 +10,7 @@ #include <utility> #include "base/memory/ref_counted.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/synchronization/lock.h" #include "base/time/time.h"
diff --git a/base/logging.h b/base/logging.h index 7e75485b..04b915cd 100644 --- a/base/logging.h +++ b/base/logging.h
@@ -18,7 +18,7 @@ #include "base/dcheck_is_on.h" #include "base/functional/callback_forward.h" #include "base/scoped_clear_last_error.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/strings/utf_ostream_operators.h" #include "build/build_config.h" #include "build/chromeos_buildflags.h"
diff --git a/base/strings/abseil_string_number_conversions.h b/base/strings/abseil_string_number_conversions.h index b343102f..00b0f4e1 100644 --- a/base/strings/abseil_string_number_conversions.h +++ b/base/strings/abseil_string_number_conversions.h
@@ -6,7 +6,7 @@ #define BASE_STRINGS_ABSEIL_STRING_NUMBER_CONVERSIONS_H_ #include "base/base_export.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "third_party/abseil-cpp/absl/numeric/int128.h" namespace base {
diff --git a/base/strings/string_piece_rust.h b/base/strings/string_piece_rust.h index 445ff6c..fc75ffa 100644 --- a/base/strings/string_piece_rust.h +++ b/base/strings/string_piece_rust.h
@@ -8,7 +8,7 @@ #include <stdint.h> #include "base/rust_buildflags.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "third_party/rust/cxx/v1/crate/include/cxx.h" #if !BUILDFLAG(BUILD_RUST_BASE_CONVERSIONS)
diff --git a/base/strings/string_util.h b/base/strings/string_util.h index c3c638dd..53b17281 100644 --- a/base/strings/string_util.h +++ b/base/strings/string_util.h
@@ -96,7 +96,7 @@ } // Explicit instantiations of MakeBasicStringPiece for the BasicStringPiece -// aliases defined in base/strings/string_piece_forward.h +// aliases defined in base/strings/string_piece.h template <typename Iter> constexpr StringPiece MakeStringPiece(Iter begin, Iter end) { return MakeBasicStringPiece<char>(begin, end);
diff --git a/base/token.h b/base/token.h index e67532ba..ebd9749ad 100644 --- a/base/token.h +++ b/base/token.h
@@ -12,7 +12,7 @@ #include "base/base_export.h" #include "base/containers/span.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "third_party/abseil-cpp/absl/types/optional.h" namespace base {
diff --git a/base/win/scoped_hstring.h b/base/win/scoped_hstring.h index 95bc98bc..4f30f72 100644 --- a/base/win/scoped_hstring.h +++ b/base/win/scoped_hstring.h
@@ -10,7 +10,7 @@ #include <string> #include "base/scoped_generic.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" namespace base {
diff --git a/build/toolchain/win/toolchain.gni b/build/toolchain/win/toolchain.gni index 19d1c9212..4ade3ba 100644 --- a/build/toolchain/win/toolchain.gni +++ b/build/toolchain/win/toolchain.gni
@@ -315,15 +315,17 @@ ml_py = rebase_path("//build/toolchain/win/ml.py", root_build_dir) ml = "\"$python_path\" $ml_py $ml" } - } - if (toolchain_args.current_cpu != "arm64" || toolchain_is_clang) { - # TODO(thakis): Stop using asm-wrapper when using clang. - command = "\"$python_path\" $_tool_wrapper_path asm-wrapper $env $ml {{defines}} {{include_dirs}} {{asmflags}} {{source}}" + + if (toolchain_args.current_cpu == "arm64") { + # armasm64.exe does not support definitions passed via the command + # line. (Fortunately, they're not needed for compiling the V8 + # snapshot, which is the only time this assembler is required.) + command = "\"$python_path\" $_tool_wrapper_path asm-wrapper $env $ml {{include_dirs}} {{asmflags}} {{source}}" + } else { + command = "\"$python_path\" $_tool_wrapper_path asm-wrapper $env $ml {{defines}} {{include_dirs}} {{asmflags}} {{source}}" + } } else { - # armasm64.exe does not support definitions passed via the command - # line. (Fortunately, they're not needed for compiling the V8 - # snapshot, which is the only time this assembler is required.) - command = "\"$python_path\" $_tool_wrapper_path asm-wrapper $env $ml {{include_dirs}} {{asmflags}} {{source}}" + command = "$ml {{defines}} {{include_dirs}} {{asmflags}} {{source}}" } description = "ASM {{output}}"
diff --git a/chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/FeedSurfaceCoordinator.java b/chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/FeedSurfaceCoordinator.java index cb4f236..a6e743c3 100644 --- a/chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/FeedSurfaceCoordinator.java +++ b/chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/FeedSurfaceCoordinator.java
@@ -580,7 +580,9 @@ } public void maybeShowWebFeedAwarenessIph() { - if (mWebFeedHasContent && FeedFeatures.shouldUseWebFeedAwarenessIPH()) { + if (mWebFeedHasContent + && FeedFeatures.shouldUseWebFeedAwarenessIPH() + && !ChromeFeatureList.isEnabled(ChromeFeatureList.FEED_FOLLOW_UI_UPDATE)) { UserEducationHelper helper = new UserEducationHelper(mActivity, mHandler); mSectionHeaderView.showWebFeedAwarenessIph( helper, StreamTabId.FOLLOWING, new Scroller());
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java index 930ed1f9..30a07bfd 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
@@ -1842,6 +1842,7 @@ new HubProvider( this, new DefaultPaneOrderController(), + mBackPressManager, new ObservableSupplierImpl<Tab>()); } }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/hub/HubProvider.java b/chrome/android/java/src/org/chromium/chrome/browser/hub/HubProvider.java index 6c3d466..25ad175 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/hub/HubProvider.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/hub/HubProvider.java
@@ -10,6 +10,7 @@ import org.chromium.base.supplier.LazyOneshotSupplier; import org.chromium.base.supplier.ObservableSupplier; +import org.chromium.chrome.browser.back_press.BackPressManager; import org.chromium.chrome.browser.tab.Tab; /** @@ -24,18 +25,20 @@ /** * @param context The Android {@link Context} for the Hub. * @param orderController The {@link PaneOrderController} for the Hub. + * @param backPressManager The {@link BackPressManager} for the activity. * @param tabSupplier The supplier of the current tab in the current tab model. */ public HubProvider( @NonNull Context context, @NonNull PaneOrderController orderController, + @NonNull BackPressManager backPressManager, @NonNull ObservableSupplier<Tab> tabSupplier) { mPaneListBuilder = new PaneListBuilder(orderController); mHubManagerSupplier = LazyOneshotSupplier.fromSupplier( () -> HubManagerFactory.createHubManager( - context, mPaneListBuilder, tabSupplier)); + context, mPaneListBuilder, backPressManager, tabSupplier)); } /** Returns the lazy supplier for {@link HubManager}. */
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/hub/HubProviderUnitTest.java b/chrome/android/java/src/org/chromium/chrome/browser/hub/HubProviderUnitTest.java index 50a038c..8f0e3ac 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/hub/HubProviderUnitTest.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/hub/HubProviderUnitTest.java
@@ -25,6 +25,7 @@ import org.chromium.base.supplier.LazyOneshotSupplier; import org.chromium.base.supplier.ObservableSupplier; import org.chromium.base.test.BaseRobolectricTestRunner; +import org.chromium.chrome.browser.back_press.BackPressManager; import org.chromium.chrome.browser.tab.Tab; import org.chromium.ui.base.TestActivity; @@ -38,6 +39,7 @@ new ActivityScenarioRule<>(TestActivity.class); @Mock private Pane mMockPane; + @Mock private BackPressManager mBackPressManagerMock; @Mock private ObservableSupplier<Tab> mTabSupplierMock; private Activity mActivity; @@ -55,7 +57,11 @@ @SmallTest public void testHubProvider() { HubProvider provider = - new HubProvider(mActivity, new DefaultPaneOrderController(), mTabSupplierMock); + new HubProvider( + mActivity, + new DefaultPaneOrderController(), + mBackPressManagerMock, + mTabSupplierMock); PaneListBuilder builder = provider.getPaneListBuilder();
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/site_settings/WebsitePermissionsFetcherTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/site_settings/WebsitePermissionsFetcherTest.java index 84454b46..36b26f6 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/site_settings/WebsitePermissionsFetcherTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/site_settings/WebsitePermissionsFetcherTest.java
@@ -4,8 +4,6 @@ package org.chromium.chrome.browser.site_settings; -import static org.junit.Assert.assertEquals; - import static org.chromium.components.browser_ui.site_settings.WebsitePreferenceBridge.SITE_WILDCARD; import static java.util.Map.entry; @@ -299,18 +297,10 @@ private static class WebsitePermissionsWaiter extends CallbackHelper implements WebsitePermissionsFetcher.WebsitePermissionsCallback { - - private Collection<Website> mSites; - @Override public void onWebsitePermissionsAvailable(Collection<Website> sites) { - mSites = sites; notifyCalled(); } - - public Collection<Website> getSites() { - return mSites; - } } @After @@ -353,9 +343,9 @@ Assert.assertTrue(map.containsKey(nullOrigin)); Assert.assertTrue(map.containsKey(nullEmbedder)); - assertEquals("nullBoth", map.get(nullBoth)); - assertEquals("nullOrigin", map.get(nullOrigin)); - assertEquals("nullEmbedder", map.get(nullEmbedder)); + Assert.assertEquals("nullBoth", map.get(nullBoth)); + Assert.assertEquals("nullOrigin", map.get(nullOrigin)); + Assert.assertEquals("nullEmbedder", map.get(nullEmbedder)); } @Test @@ -600,7 +590,7 @@ // If the ContentSettingsType.NUM_TYPES value changes *and* a new value has been exposed on // Android, then please update this code block to include a test for your new type. // Otherwise, just update count in the assert. - assertEquals(95, ContentSettingsType.NUM_TYPES); + Assert.assertEquals(95, ContentSettingsType.NUM_TYPES); websitePreferenceBridge.addContentSettingException( new ContentSettingException( ContentSettingsType.COOKIES, @@ -731,7 +721,7 @@ fetcher.fetchAllPreferences( (sites) -> { - assertEquals(1, sites.size()); + Assert.assertEquals(1, sites.size()); Website site = sites.iterator().next(); Assert.assertTrue(site.getAddress().matches(googleOrigin)); @@ -756,92 +746,92 @@ Assert.assertNotNull(site.getPermissionInfo(ContentSettingsType.AR)); // Check content setting exception types. - assertEquals( + Assert.assertEquals( Integer.valueOf(ContentSettingValues.DEFAULT), site.getContentSetting( UNUSED_BROWSER_CONTEXT_HANDLE, ContentSettingsType.COOKIES)); - assertEquals( + Assert.assertEquals( Integer.valueOf(ContentSettingValues.DEFAULT), site.getContentSetting( UNUSED_BROWSER_CONTEXT_HANDLE, ContentSettingsType.POPUPS)); - assertEquals( + Assert.assertEquals( Integer.valueOf(ContentSettingValues.DEFAULT), site.getContentSetting( UNUSED_BROWSER_CONTEXT_HANDLE, ContentSettingsType.ADS)); - assertEquals( + Assert.assertEquals( Integer.valueOf(ContentSettingValues.DEFAULT), site.getContentSetting( UNUSED_BROWSER_CONTEXT_HANDLE, ContentSettingsType.JAVASCRIPT)); - assertEquals( + Assert.assertEquals( Integer.valueOf(ContentSettingValues.DEFAULT), site.getContentSetting( UNUSED_BROWSER_CONTEXT_HANDLE, ContentSettingsType.SOUND)); - assertEquals( + Assert.assertEquals( Integer.valueOf(ContentSettingValues.DEFAULT), site.getContentSetting( UNUSED_BROWSER_CONTEXT_HANDLE, ContentSettingsType.BACKGROUND_SYNC)); - assertEquals( + Assert.assertEquals( Integer.valueOf(ContentSettingValues.DEFAULT), site.getContentSetting( UNUSED_BROWSER_CONTEXT_HANDLE, ContentSettingsType.AUTOMATIC_DOWNLOADS)); - assertEquals( + Assert.assertEquals( Integer.valueOf(ContentSettingValues.DEFAULT), site.getContentSetting( UNUSED_BROWSER_CONTEXT_HANDLE, ContentSettingsType.JAVASCRIPT_JIT)); - assertEquals( + Assert.assertEquals( Integer.valueOf(ContentSettingValues.DEFAULT), site.getContentSetting( UNUSED_BROWSER_CONTEXT_HANDLE, ContentSettingsType.AUTO_DARK_WEB_CONTENT)); - assertEquals( + Assert.assertEquals( Integer.valueOf(ContentSettingValues.DEFAULT), site.getContentSetting( UNUSED_BROWSER_CONTEXT_HANDLE, ContentSettingsType.REQUEST_DESKTOP_SITE)); - assertEquals( + Assert.assertEquals( Integer.valueOf(ContentSettingValues.DEFAULT), site.getContentSetting( UNUSED_BROWSER_CONTEXT_HANDLE, ContentSettingsType.FEDERATED_IDENTITY_API)); - assertEquals( + Assert.assertEquals( Integer.valueOf(ContentSettingValues.DEFAULT), site.getContentSetting( UNUSED_BROWSER_CONTEXT_HANDLE, ContentSettingsType.ANTI_ABUSE)); // Check storage info. ArrayList<StorageInfo> storageInfos = new ArrayList<>(site.getStorageInfo()); - assertEquals(1, storageInfos.size()); + Assert.assertEquals(1, storageInfos.size()); StorageInfo storageInfo = storageInfos.get(0); - assertEquals(googleOrigin, storageInfo.getHost()); - assertEquals(storageSize, storageInfo.getSize()); + Assert.assertEquals(googleOrigin, storageInfo.getHost()); + Assert.assertEquals(storageSize, storageInfo.getSize()); // Check local storage info. LocalStorageInfo localStorageInfo = site.getLocalStorageInfo(); - assertEquals(googleOrigin, localStorageInfo.getOrigin()); - assertEquals(storageSize, localStorageInfo.getSize()); + Assert.assertEquals(googleOrigin, localStorageInfo.getOrigin()); + Assert.assertEquals(storageSize, localStorageInfo.getSize()); Assert.assertFalse(localStorageInfo.isDomainImportant()); // Check shared dictionary info. ArrayList<SharedDictionaryInfo> sharedDictionaryInfos = new ArrayList<>(site.getSharedDictionaryInfo()); - assertEquals(1, sharedDictionaryInfos.size()); + Assert.assertEquals(1, sharedDictionaryInfos.size()); SharedDictionaryInfo sharedDictionaryInfo = sharedDictionaryInfos.get(0); - assertEquals(googleOrigin, sharedDictionaryInfo.getOrigin()); - assertEquals(sharedDictionarySize, sharedDictionaryInfo.getSize()); + Assert.assertEquals(googleOrigin, sharedDictionaryInfo.getOrigin()); + Assert.assertEquals(sharedDictionarySize, sharedDictionaryInfo.getSize()); // Check chooser info types. ArrayList<ChosenObjectInfo> chosenObjectInfos = new ArrayList<>(site.getChosenObjectInfo()); - assertEquals(2, chosenObjectInfos.size()); - assertEquals( + Assert.assertEquals(2, chosenObjectInfos.size()); + Assert.assertEquals( ContentSettingsType.BLUETOOTH_CHOOSER_DATA, chosenObjectInfos.get(0).getContentSettingsType()); - assertEquals( + Assert.assertEquals( ContentSettingsType.USB_CHOOSER_DATA, chosenObjectInfos.get(1).getContentSettingsType()); }); @@ -873,7 +863,7 @@ fetcher.fetchAllPreferences( (sites) -> { - assertEquals(2, sites.size()); + Assert.assertEquals(2, sites.size()); // The order of |sites| is unknown, so check if the array contains a geolocation // permission for each of the sites. @@ -904,7 +894,7 @@ fetcher.fetchAllPreferences( (sites) -> { - assertEquals(3, sites.size()); + Assert.assertEquals(3, sites.size()); ArrayList<Website> siteArray = new ArrayList<>(sites); boolean containsGoogleOriginPermission = false; @@ -931,13 +921,13 @@ public void assertContentSettingExceptionEquals( ContentSettingException expected, ContentSettingException actual) { - assertEquals(expected.getSource(), actual.getSource()); - assertEquals(expected.isEmbargoed(), actual.isEmbargoed()); - assertEquals(expected.getPrimaryPattern(), actual.getPrimaryPattern()); - assertEquals(expected.getSecondaryPattern(), actual.getSecondaryPattern()); - assertEquals(expected.getContentSetting(), actual.getContentSetting()); - assertEquals(expected.getExpirationInDays(), actual.getExpirationInDays()); - assertEquals(expected.hasExpiration(), actual.hasExpiration()); + Assert.assertEquals(expected.getSource(), actual.getSource()); + Assert.assertEquals(expected.isEmbargoed(), actual.isEmbargoed()); + Assert.assertEquals(expected.getPrimaryPattern(), actual.getPrimaryPattern()); + Assert.assertEquals(expected.getSecondaryPattern(), actual.getSecondaryPattern()); + Assert.assertEquals(expected.getContentSetting(), actual.getContentSetting()); + Assert.assertEquals(expected.getExpirationInDays(), actual.getExpirationInDays()); + Assert.assertEquals(expected.hasExpiration(), actual.hasExpiration()); } @Test @@ -974,7 +964,7 @@ SiteSettingsCategory.createFromContentSettingsType( UNUSED_BROWSER_CONTEXT_HANDLE, type), (sites) -> { - assertEquals(1, sites.size()); + Assert.assertEquals(1, sites.size()); Website site = sites.iterator().next(); Assert.assertNotNull(site.getPermissionInfo(type)); @@ -1021,7 +1011,7 @@ SiteSettingsCategory.createFromContentSettingsType( UNUSED_BROWSER_CONTEXT_HANDLE, type), (sites) -> { - assertEquals(1, sites.size()); + Assert.assertEquals(1, sites.size()); Website site = sites.iterator().next(); assertContentSettingExceptionEquals( @@ -1045,7 +1035,7 @@ SiteSettingsCategory.createFromContentSettingsType( UNUSED_BROWSER_CONTEXT_HANDLE, type), (sites) -> { - assertEquals(1, sites.size()); + Assert.assertEquals(1, sites.size()); Website site = sites.iterator().next(); assertContentSettingExceptionEquals( @@ -1100,7 +1090,7 @@ SiteSettingsCategory.createFromContentSettingsType( UNUSED_BROWSER_CONTEXT_HANDLE, contentSettingsType), (sites) -> { - assertEquals(1, sites.size()); + Assert.assertEquals(1, sites.size()); Website site = sites.iterator().next(); assertContentSettingExceptionEquals( @@ -1126,7 +1116,7 @@ SiteSettingsCategory.createFromContentSettingsType( UNUSED_BROWSER_CONTEXT_HANDLE, contentSettingsType), (sites) -> { - assertEquals(1, sites.size()); + Assert.assertEquals(1, sites.size()); Website site = sites.iterator().next(); assertContentSettingExceptionEquals( @@ -1166,29 +1156,30 @@ SiteSettingsCategory.createFromType( UNUSED_BROWSER_CONTEXT_HANDLE, SiteSettingsCategory.Type.USE_STORAGE), (sites) -> { - assertEquals(1, sites.size()); + Assert.assertEquals(1, sites.size()); Website site = sites.iterator().next(); List<StorageInfo> storageInfos = site.getStorageInfo(); - assertEquals(1, storageInfos.size()); + Assert.assertEquals(1, storageInfos.size()); StorageInfo storageInfo = storageInfos.get(0); - assertEquals(fakeStorageInfo.getSize(), storageInfo.getSize()); - assertEquals(fakeStorageInfo.getHost(), storageInfo.getHost()); + Assert.assertEquals(fakeStorageInfo.getSize(), storageInfo.getSize()); + Assert.assertEquals(fakeStorageInfo.getHost(), storageInfo.getHost()); LocalStorageInfo localStorageInfo = site.getLocalStorageInfo(); Assert.assertFalse(localStorageInfo.isDomainImportant()); - assertEquals(fakeLocalStorageInfo.getSize(), localStorageInfo.getSize()); - assertEquals(fakeLocalStorageInfo.getOrigin(), localStorageInfo.getOrigin()); + Assert.assertEquals(fakeLocalStorageInfo.getSize(), localStorageInfo.getSize()); + Assert.assertEquals( + fakeLocalStorageInfo.getOrigin(), localStorageInfo.getOrigin()); List<SharedDictionaryInfo> sharedDictionaryInfos = site.getSharedDictionaryInfo(); - assertEquals(1, sharedDictionaryInfos.size()); + Assert.assertEquals(1, sharedDictionaryInfos.size()); SharedDictionaryInfo sharedDictionaryInfo = sharedDictionaryInfos.get(0); - assertEquals( + Assert.assertEquals( fakeSharedDictionaryInfo.getOrigin(), sharedDictionaryInfo.getOrigin()); - assertEquals( + Assert.assertEquals( fakeSharedDictionaryInfo.getSize(), sharedDictionaryInfo.getSize()); }); @@ -1199,47 +1190,47 @@ SiteSettingsCategory.createFromType( UNUSED_BROWSER_CONTEXT_HANDLE, SiteSettingsCategory.Type.USE_STORAGE), (sites) -> { - assertEquals(2, sites.size()); + Assert.assertEquals(2, sites.size()); for (Website site : sites) { if (site.getAddress().matches(googleOrigin)) { List<StorageInfo> storageInfos = site.getStorageInfo(); - assertEquals(1, storageInfos.size()); + Assert.assertEquals(1, storageInfos.size()); StorageInfo storageInfo = storageInfos.get(0); - assertEquals(fakeStorageInfo.getSize(), storageInfo.getSize()); - assertEquals(fakeStorageInfo.getHost(), storageInfo.getHost()); + Assert.assertEquals(fakeStorageInfo.getSize(), storageInfo.getSize()); + Assert.assertEquals(fakeStorageInfo.getHost(), storageInfo.getHost()); Assert.assertNull(site.getLocalStorageInfo()); List<SharedDictionaryInfo> sharedDictionaryInfos = site.getSharedDictionaryInfo(); - assertEquals(1, sharedDictionaryInfos.size()); + Assert.assertEquals(1, sharedDictionaryInfos.size()); SharedDictionaryInfo sharedDictionaryInfo = sharedDictionaryInfos.get(0); - assertEquals( + Assert.assertEquals( fakeSharedDictionaryInfo.getOrigin(), sharedDictionaryInfo.getOrigin()); - assertEquals( + Assert.assertEquals( fakeSharedDictionaryInfo.getSize(), sharedDictionaryInfo.getSize()); } else if (site.getAddress().matches(chromiumOrigin)) { List<StorageInfo> storageInfos = site.getStorageInfo(); - assertEquals(0, storageInfos.size()); + Assert.assertEquals(0, storageInfos.size()); LocalStorageInfo localStorageInfo = site.getLocalStorageInfo(); Assert.assertTrue(localStorageInfo.isDomainImportant()); - assertEquals( + Assert.assertEquals( fakeImportantLocalStorageInfo.getSize(), localStorageInfo.getSize()); - assertEquals( + Assert.assertEquals( fakeImportantLocalStorageInfo.getOrigin(), localStorageInfo.getOrigin()); List<SharedDictionaryInfo> sharedDictionaryInfos = site.getSharedDictionaryInfo(); - assertEquals(0, sharedDictionaryInfos.size()); + Assert.assertEquals(0, sharedDictionaryInfos.size()); } else { Assert.fail( "The WebsitePermissionsFetcher should only return " @@ -1282,12 +1273,12 @@ fetcher.fetchPreferencesForCategory( SiteSettingsCategory.createFromType(UNUSED_BROWSER_CONTEXT_HANDLE, type), (sites) -> { - assertEquals(1, sites.size()); + Assert.assertEquals(1, sites.size()); List<ChosenObjectInfo> objectInfos = new ArrayList<>(sites.iterator().next().getChosenObjectInfo()); - assertEquals(1, objectInfos.size()); - assertEquals(fakeObjectInfo, objectInfos.get(0)); + Assert.assertEquals(1, objectInfos.size()); + Assert.assertEquals(fakeObjectInfo, objectInfos.get(0)); }); } } @@ -1361,7 +1352,7 @@ (sites) -> { // Verify the number of sites is the same of the origins with // exceptions. - assertEquals(origins.size(), sites.size()); + Assert.assertEquals(origins.size(), sites.size()); ArrayList<Website> siteArray = new ArrayList<>(sites); for (Website site : siteArray) { @@ -1369,68 +1360,29 @@ // members within the group of sites with data. if (site.compareByAddressTo(expectedYoutubeWebsite) == 0) { Assert.assertNotNull(site.getFPSCookieInfo()); - assertEquals( + Assert.assertEquals( "google.com", site.getFPSCookieInfo().getOwner()); - assertEquals(4, site.getFPSCookieInfo().getMembersCount()); + Assert.assertEquals( + 4, site.getFPSCookieInfo().getMembersCount()); } // Verify verizonconnect.com has verizon.com as FPS owner which // has 2 members within the group of sites with data. if (site.compareByAddressTo(expectedVerizonConnectWebsite) == 0) { Assert.assertNotNull(site.getFPSCookieInfo()); - assertEquals( + Assert.assertEquals( "verizon.com", site.getFPSCookieInfo().getOwner()); - assertEquals(2, site.getFPSCookieInfo().getMembersCount()); + Assert.assertEquals( + 2, site.getFPSCookieInfo().getMembersCount()); } // Verify a website with data which is not in a FPS has no FPS // data set. if (site.compareByAddressTo(expectedNoInFPSWebsite) == 0) { - assertEquals(null, site.getFPSCookieInfo()); + Assert.assertEquals(null, site.getFPSCookieInfo()); } } }); }); } - - @Test - @SmallTest - public void testIncognitoFetching() throws TimeoutException { - WebsitePermissionsFetcher fetcher = - new WebsitePermissionsFetcher(UNUSED_BROWSER_CONTEXT_HANDLE); - FakeWebsitePreferenceBridge websitePreferenceBridge = new FakeWebsitePreferenceBridge(); - fetcher.setWebsitePreferenceBridgeForTesting(websitePreferenceBridge); - String origin = "https://example.com"; - final WebsitePermissionsWaiter waiter = new WebsitePermissionsWaiter(); - - // Add a ALLOW exception and a ASK exception for the same pattern to simulate a permission - // from regular mode that was inherited as ASK and a permission from incognito mode. - websitePreferenceBridge.addContentSettingException( - new ContentSettingException( - ContentSettingsType.STORAGE_ACCESS, - origin, - origin, - ContentSettingValues.ALLOW, - "source", - null, - false)); - websitePreferenceBridge.addContentSettingException( - new ContentSettingException( - ContentSettingsType.STORAGE_ACCESS, - origin, - origin, - ContentSettingValues.ASK, - "source", - null, - false)); - fetcher.fetchAllPreferences(waiter); - waiter.waitForFirst(); - - // Check that only the ALLOW exception is fetched. - assertEquals(1, waiter.getSites().size()); - var site = waiter.getSites().iterator().next(); - var permission = site.getEmbeddedPermissions().get(ContentSettingsType.STORAGE_ACCESS); - assertEquals(1, permission.size()); - assertEquals(ContentSettingValues.ALLOW, (int) permission.get(0).getContentSetting()); - } }
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index bd4c17b..85e7781 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd
@@ -10571,6 +10571,9 @@ <message name="IDS_TAB_ORGANIZATION_TIP_ACTION" desc="The actionable text of the tip in the tab organization UI" translateable="false"> Show me how </message> + <message name="IDS_TAB_ORGANIZATION_LEARN_MORE" desc="The actionable text in the tab organization UI results state for getting more information" translateable="false"> + Learn more + </message> <!-- Strings for Window Titles in Menus --> <if expr="not use_titlecase"> @@ -15836,6 +15839,13 @@ <message name="IDS_CHROMEREFRESH2023_WITHOUT_OMNIBOX" desc="Indicates no omnibox design changes in Chrome's desktop UI redesign."> without Omnibox </message> + <!-- ChromeLabs ChromeWebuiRefresh2023--> + <message name="IDS_CHROMEWEBUIREFRESH2023_EXPERIMENT_NAME" desc="The name of the project for Chrome's desktop WebUI redesign."> + Chrome WebUI Refresh 2023 + </message> + <message name="IDS_CHROMEWEBUIREFRESH2023_DESCRIPTION" desc="The description of the project for Chrome's desktop WebUI redesign."> + Enables the new desktop design for WebUI. Chrome Refresh 2023 must also be enabled. + </message> <!-- ChromeLabs Tab Scrolling --> <message name="IDS_TAB_SCROLLING_EXPERIMENT_NAME" desc="Name for Tab Scrolling experiment"> Tab Scrolling @@ -16414,6 +16424,24 @@ <message name="IDS_IWA_INSTALLER_DISABLED_SUBTITLE" desc="Subtitle of the feature disabled screen of the IWA installer. $1 = IDS_IWA_INSTALLER_DISABLED_CHANGE_PREFERENCE"> You security preferences do not allow installations of Isolated Apps. <ph name="CHANGE_PREFERENCE">$1<ex>Change your preferences</ex></ph> </message> + <message name="IDS_IWA_INSTALLER_INSTALL_SUBTITLE" desc="Subtitle of the installing screen of the IWA installer."> + Please wait while installation is in progress + </message> + <message name="IDS_IWA_INSTALLER_INSTALL_PROGRESS" desc="Subtitle of the installation progress bar on the installing screen of the IWA installer."> + Installing... + </message> + <message name="IDS_IWA_INSTALLER_SHOW_METADATA_SUBTITLE" desc="Subtitle of the pre-installation app info summary screen of the Isolated Web App installer"> + This application will be installed on your currently used Chrome profile. <ph name="MANAGE_PROFILES">$1<ex>Manage your Chrome profiles</ex></ph> + </message> + <message name="IDS_IWA_INSTALLER_SHOW_METADATA_MANAGE_PROFILES" desc="Link to a settings page that lets the user manage their active profiles"> + Manage your Chrome profiles + </message> + <message name="IDS_IWA_INSTALLER_SHOW_METADATA_APP_NAME_LABEL" desc="Label before the Isolated Web App name in the pre-install app info summary screen"> + Application: <ph name="APP_NAME">$1<ex>Google Maps</ex></ph> + </message> + <message name="IDS_IWA_INSTALLER_SHOW_METADATA_APP_VERSION_LABEL" desc="Label before the Isolated Web App version in the pre-install app info summary screen"> + Version: <ph name="APP_VERSION">$1<ex>1.0.0</ex></ph> + </message> <message name="IDS_IWA_INSTALLER_VERIFICATION_TITLE" desc="Title of the verification step of the IWA installation"> Chrome is verifying the installation bundle </message>
diff --git a/chrome/app/generated_resources_grd/IDS_CHROMEWEBUIREFRESH2023_DESCRIPTION.png.sha1 b/chrome/app/generated_resources_grd/IDS_CHROMEWEBUIREFRESH2023_DESCRIPTION.png.sha1 new file mode 100644 index 0000000..3ae8439 --- /dev/null +++ b/chrome/app/generated_resources_grd/IDS_CHROMEWEBUIREFRESH2023_DESCRIPTION.png.sha1
@@ -0,0 +1 @@ +51b605540ad6207d836221e0a21ac00ff24300cc \ No newline at end of file
diff --git a/chrome/app/generated_resources_grd/IDS_CHROMEWEBUIREFRESH2023_EXPERIMENT_NAME.png.sha1 b/chrome/app/generated_resources_grd/IDS_CHROMEWEBUIREFRESH2023_EXPERIMENT_NAME.png.sha1 new file mode 100644 index 0000000..67ca4bc1 --- /dev/null +++ b/chrome/app/generated_resources_grd/IDS_CHROMEWEBUIREFRESH2023_EXPERIMENT_NAME.png.sha1
@@ -0,0 +1 @@ +9f608f543ef7bb6d07247c1260e5acb50639da62 \ No newline at end of file
diff --git a/chrome/app/generated_resources_grd/IDS_IWA_INSTALLER_INSTALL_PROGRESS.png.sha1 b/chrome/app/generated_resources_grd/IDS_IWA_INSTALLER_INSTALL_PROGRESS.png.sha1 new file mode 100644 index 0000000..4b70e7f --- /dev/null +++ b/chrome/app/generated_resources_grd/IDS_IWA_INSTALLER_INSTALL_PROGRESS.png.sha1
@@ -0,0 +1 @@ +9dbd16acb773864e8e25e7f80603aa658ab76087 \ No newline at end of file
diff --git a/chrome/app/generated_resources_grd/IDS_IWA_INSTALLER_INSTALL_SUBTITLE.png.sha1 b/chrome/app/generated_resources_grd/IDS_IWA_INSTALLER_INSTALL_SUBTITLE.png.sha1 new file mode 100644 index 0000000..38b59b8 --- /dev/null +++ b/chrome/app/generated_resources_grd/IDS_IWA_INSTALLER_INSTALL_SUBTITLE.png.sha1
@@ -0,0 +1 @@ +e2212c413db006a3b049466b3cc2831dc907b06c \ No newline at end of file
diff --git a/chrome/app/generated_resources_grd/IDS_IWA_INSTALLER_SHOW_METADATA_APP_NAME_LABEL.png.sha1 b/chrome/app/generated_resources_grd/IDS_IWA_INSTALLER_SHOW_METADATA_APP_NAME_LABEL.png.sha1 new file mode 100644 index 0000000..83c615bd --- /dev/null +++ b/chrome/app/generated_resources_grd/IDS_IWA_INSTALLER_SHOW_METADATA_APP_NAME_LABEL.png.sha1
@@ -0,0 +1 @@ +d123ac88b50dfc25b8c5152178afb1620cf2852a \ No newline at end of file
diff --git a/chrome/app/generated_resources_grd/IDS_IWA_INSTALLER_SHOW_METADATA_APP_VERSION_LABEL.png.sha1 b/chrome/app/generated_resources_grd/IDS_IWA_INSTALLER_SHOW_METADATA_APP_VERSION_LABEL.png.sha1 new file mode 100644 index 0000000..42c2e745c --- /dev/null +++ b/chrome/app/generated_resources_grd/IDS_IWA_INSTALLER_SHOW_METADATA_APP_VERSION_LABEL.png.sha1
@@ -0,0 +1 @@ +2c3a1ffbb24fd685be509551d8436383208f4e42 \ No newline at end of file
diff --git a/chrome/app/generated_resources_grd/IDS_IWA_INSTALLER_SHOW_METADATA_MANAGE_PROFILES.png.sha1 b/chrome/app/generated_resources_grd/IDS_IWA_INSTALLER_SHOW_METADATA_MANAGE_PROFILES.png.sha1 new file mode 100644 index 0000000..838f4ab --- /dev/null +++ b/chrome/app/generated_resources_grd/IDS_IWA_INSTALLER_SHOW_METADATA_MANAGE_PROFILES.png.sha1
@@ -0,0 +1 @@ +3957fd916535b10ed204bcccffaf1338b620b8f4 \ No newline at end of file
diff --git a/chrome/app/generated_resources_grd/IDS_IWA_INSTALLER_SHOW_METADATA_SUBTITLE.png.sha1 b/chrome/app/generated_resources_grd/IDS_IWA_INSTALLER_SHOW_METADATA_SUBTITLE.png.sha1 new file mode 100644 index 0000000..38c678f --- /dev/null +++ b/chrome/app/generated_resources_grd/IDS_IWA_INSTALLER_SHOW_METADATA_SUBTITLE.png.sha1
@@ -0,0 +1 @@ +194f8c0363fdcf8fea4d402d30559b6343706e9f \ No newline at end of file
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn index 71c467a..118f0df 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn
@@ -527,8 +527,6 @@ "external_protocol/external_protocol_handler.h", "external_protocol/external_protocol_observer.cc", "external_protocol/external_protocol_observer.h", - "fast_checkout/fast_checkout_features.cc", - "fast_checkout/fast_checkout_features.h", "feature_engagement/tracker_factory.cc", "feature_engagement/tracker_factory.h", "feature_guide/notifications/feature_notification_guide_service_factory.cc",
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc index aec921a5..0a48bed5 100644 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc
@@ -35,7 +35,6 @@ #include "chrome/browser/browser_features.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/companion/core/features.h" -#include "chrome/browser/fast_checkout/fast_checkout_features.h" #include "chrome/browser/feature_guide/notifications/feature_notification_guide_service.h" #include "chrome/browser/file_system_access/file_system_access_features.h" #include "chrome/browser/flag_descriptions.h" @@ -5568,6 +5567,9 @@ {"feed-sports-card", flag_descriptions::kFeedSportsCardName, flag_descriptions::kFeedSportsCardDescription, kOsAndroid, FEATURE_VALUE_TYPE(feed::kFeedSportsCard)}, + {"refresh-feed-on-start", flag_descriptions::kRefreshFeedOnRestartName, + flag_descriptions::kRefreshFeedOnRestartDescription, kOsAndroid, + FEATURE_VALUE_TYPE(feed::kRefreshFeedOnRestart)}, #endif // BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) @@ -8923,7 +8925,7 @@ kChromeRefresh2023Variations, "ChromeRefresh2023")}, - {"chrome-webui-refresh-2023", + {flag_descriptions::kChromeWebuiRefresh2023Id, flag_descriptions::kChromeWebuiRefresh2023Name, flag_descriptions::kChromeWebuiRefresh2023Description, kOsDesktop, FEATURE_VALUE_TYPE(features::kChromeWebuiRefresh2023)}, @@ -9936,6 +9938,13 @@ flag_descriptions::kSafeBrowsingHashPrefixRealTimeLookupsName, flag_descriptions::kSafeBrowsingHashPrefixRealTimeLookupsDescription, kOsAndroid, FEATURE_VALUE_TYPE(safe_browsing::kHashPrefixRealTimeLookups)}, + {"safe-browsing-new-gms-core-api-for-browse-url-database-check", + flag_descriptions::kSafeBrowsingNewGmsApiForBrowseUrlDatabaseCheckName, + flag_descriptions:: + kSafeBrowsingNewGmsApiForBrowseUrlDatabaseCheckDescription, + kOsAndroid, + FEATURE_VALUE_TYPE( + safe_browsing::kSafeBrowsingNewGmsApiForBrowseUrlDatabaseCheck)}, #endif // BUILDFLAG(IS_ANDROID) #if !BUILDFLAG(IS_ANDROID)
diff --git a/chrome/browser/apps/app_service/app_install/app_install_service.cc b/chrome/browser/apps/app_service/app_install/app_install_service.cc index b75b03f..cc868c6 100644 --- a/chrome/browser/apps/app_service/app_install/app_install_service.cc +++ b/chrome/browser/apps/app_service/app_install/app_install_service.cc
@@ -8,6 +8,7 @@ #include "base/functional/callback.h" #include "base/functional/callback_helpers.h" #include "base/logging.h" +#include "base/metrics/histogram_functions.h" #include "chrome/browser/apps/app_service/app_install/app_install.pb.h" #include "chrome/browser/apps/app_service/app_install/app_install_almanac_connector.h" #include "chrome/browser/apps/app_service/app_install/app_install_types.h" @@ -25,7 +26,19 @@ namespace { -void InstallWebApp(Profile& profile, const GURL& install_url) { +// These values are persisted to logs. Entries should not be renumbered and +// numeric values should never be reused. +enum class AppInstallResult { + kUnknown = 0, + kSuccess = 1, + kAlmanacFetchFailed = 2, + kAppDataCorrupted = 3, + kAppProviderNotAvailable = 4, + kAppTypeNotSupported = 5, + kMaxValue = kAppTypeNotSupported, +}; + +AppInstallResult InstallWebApp(Profile& profile, const GURL& install_url) { const GURL& origin_url = install_url; constexpr bool is_renderer_initiated = false; @@ -34,7 +47,7 @@ if (provider) { provider->scheduler().ScheduleNavigateAndTriggerInstallDialog( install_url, origin_url, is_renderer_initiated, base::DoNothing()); - return; + return AppInstallResult::kUnknown; } // No WebAppProvider means web apps are hosted in Lacros (because this code @@ -45,11 +58,11 @@ ->web_app_service_ash() ->GetWebAppProviderBridge(); if (!web_app_provider_bridge) { - // Bridge not ready. - return; + return AppInstallResult::kAppProviderNotAvailable; } web_app_provider_bridge->ScheduleNavigateAndTriggerInstallDialog( install_url, origin_url, is_renderer_initiated); + return AppInstallResult::kUnknown; } } // namespace @@ -78,17 +91,52 @@ void AppInstallService::InstallFromFetchedData( const PackageId& expected_package_id, absl::optional<AppInstallData> data) { - if (!data || data->package_id != expected_package_id) { - return; - } + AppInstallResult result = [&] { + if (!data) { + return AppInstallResult::kAlmanacFetchFailed; + } - if (const auto* web_app_data = - absl::get_if<WebAppInstallData>(&data->app_type_data)) { - // TODO(crbug.com/1488697): Show an install dialog. - // TODO(b/303350800): Delegate to a generic AppPublisher method instead of - // harboring app type specific logic here. - InstallWebApp(*profile_, web_app_data->document_url); - } + if (data->package_id != expected_package_id) { + return AppInstallResult::kAppDataCorrupted; + } + + switch (expected_package_id.app_type()) { + case AppType::kWeb: + if (const auto* web_app_data = + absl::get_if<WebAppInstallData>(&data->app_type_data)) { + // TODO(crbug.com/1488697): Show an install dialog. + // TODO(b/303350800): Delegate to a generic AppPublisher method + // instead of harboring app type specific logic here. + return InstallWebApp(*profile_, web_app_data->document_url); + } + return AppInstallResult::kAppDataCorrupted; + case AppType::kArc: + case AppType::kBorealis: + case AppType::kBruschetta: + case AppType::kBuiltIn: + case AppType::kChromeApp: + case AppType::kCrostini: + case AppType::kExtension: + case AppType::kMacOs: + case AppType::kPluginVm: + case AppType::kRemote: + case AppType::kStandaloneBrowser: + case AppType::kStandaloneBrowserChromeApp: + case AppType::kStandaloneBrowserExtension: + case AppType::kSystemWeb: + case AppType::kUnknown: + return AppInstallResult::kAppTypeNotSupported; + } + }(); + + base::UmaHistogramEnumeration("Apps.AppInstallService.AppInstallResult", + result); + + // New uses must add an install surface parameter to be used as a variant of + // this histogram. + base::UmaHistogramEnumeration( + "Apps.AppInstallService.AppInstallResult.AppInstallNavigationThrottle", + result); } } // namespace apps
diff --git a/chrome/browser/apps/app_service/app_install/app_install_service.h b/chrome/browser/apps/app_service/app_install/app_install_service.h index 6db56df..0f6ba74 100644 --- a/chrome/browser/apps/app_service/app_install/app_install_service.h +++ b/chrome/browser/apps/app_service/app_install/app_install_service.h
@@ -25,7 +25,8 @@ ~AppInstallService(); // TODO(b/304680287): Add completion callback with error reporting. - // TODO(b/304681468): Record metrics for invocations and success/errors. + // New uses must add an install surface parameter to be used as a variant of + // the Apps.AppInstallService.AppInstallResult histogram. void InstallApp(PackageId package_id); private:
diff --git a/chrome/browser/ash/arc/input_overlay/constants.h b/chrome/browser/ash/arc/input_overlay/constants.h index 1342231..3fec0e5 100644 --- a/chrome/browser/ash/arc/input_overlay/constants.h +++ b/chrome/browser/ash/arc/input_overlay/constants.h
@@ -47,6 +47,11 @@ // The offset from the action view list item to the editing list border. constexpr int kEditingListInsideBorderInsets = 16; +// Width of `EditingList`. +constexpr int kEditingListWidth = 296; +// Width of `ButtonOptionsMenu` minus the triangle height. +constexpr int kButtonOptionsMenuWidth = 296; + // Display mode for display overlay. enum class DisplayMode { kNone,
diff --git a/chrome/browser/ash/arc/input_overlay/display_overlay_controller.cc b/chrome/browser/ash/arc/input_overlay/display_overlay_controller.cc index f527908..63e6e16 100644 --- a/chrome/browser/ash/arc/input_overlay/display_overlay_controller.cc +++ b/chrome/browser/ash/arc/input_overlay/display_overlay_controller.cc
@@ -695,7 +695,7 @@ /*accept_events=*/true, /*is_floating=*/true); button_options_widget_->SetContentsView( std::make_unique<ButtonOptionsMenu>(this, action)); - UpdateButtonOptionsMenuWidgetBounds(action); + UpdateButtonOptionsMenuWidgetBounds(); button_options_widget_->ShowInactive(); } @@ -723,7 +723,7 @@ if (is_visible) { if (auto* menu = GetButtonOptionsMenu()) { - UpdateButtonOptionsMenuWidgetBounds(menu->action()); + UpdateButtonOptionsMenuWidgetBounds(); } button_options_widget_->ShowInactive(); } else { @@ -782,7 +782,7 @@ auto* window = delete_edit_shortcut_widget_->GetNativeWindow(); window->parent()->StackChildAtTop(window); - delete_edit_shortcut_widget_->Show(); + delete_edit_shortcut_widget_->ShowInactive(); } void DisplayOverlayController::RemoveDeleteEditShortcutWidget() { @@ -802,21 +802,14 @@ } } -void DisplayOverlayController::UpdateButtonOptionsMenuWidgetBounds( - Action* action) { +void DisplayOverlayController::UpdateButtonOptionsMenuWidgetBounds() { + // There is no `button_options_widget_` in view mode. if (!button_options_widget_) { return; } if (auto* menu = GetButtonOptionsMenu()) { - UpdateWidgetBoundsInRootWindow( - button_options_widget_.get(), - gfx::Rect( - action->action_view()->CalculateAttachViewPositionInRootWindow( - CalculateAvailableBounds( - touch_injector_->window()->GetRootWindow()), - touch_injector_->content_bounds().origin(), menu), - menu->GetPreferredSize())); + menu->UpdateWidget(); } }
diff --git a/chrome/browser/ash/arc/input_overlay/display_overlay_controller.h b/chrome/browser/ash/arc/input_overlay/display_overlay_controller.h index 77f71477..0104565 100644 --- a/chrome/browser/ash/arc/input_overlay/display_overlay_controller.h +++ b/chrome/browser/ash/arc/input_overlay/display_overlay_controller.h
@@ -121,7 +121,7 @@ // Update widget bounds if the view content is changed or the app window // bounds are changed. - void UpdateButtonOptionsMenuWidgetBounds(Action* action); + void UpdateButtonOptionsMenuWidgetBounds(); void UpdateInputMappingWidgetBounds(); void UpdateEditingListWidgetBounds();
diff --git a/chrome/browser/ash/arc/input_overlay/ui/action_edit_view.cc b/chrome/browser/ash/arc/input_overlay/ui/action_edit_view.cc index cb85a2a9..20a2a46 100644 --- a/chrome/browser/ash/arc/input_overlay/ui/action_edit_view.cc +++ b/chrome/browser/ash/arc/input_overlay/ui/action_edit_view.cc
@@ -10,6 +10,7 @@ #include "ash/style/rounded_container.h" #include "ash/style/typography.h" #include "chrome/browser/ash/arc/input_overlay/actions/action.h" +#include "chrome/browser/ash/arc/input_overlay/constants.h" #include "chrome/browser/ash/arc/input_overlay/display_overlay_controller.h" #include "chrome/browser/ash/arc/input_overlay/ui/edit_labels.h" #include "chrome/browser/ash/arc/input_overlay/ui/name_tag.h" @@ -23,12 +24,19 @@ namespace arc::input_overlay { namespace { -constexpr float corner_radius = 16.0f; + +constexpr float kCornerRadius = 16.0f; + +constexpr int kHorizontalInsets = 16; + +constexpr int kNameTagAndLabelsPaddingForButtonOptionsMenu = 20; +constexpr int kNameTagAndLabelsPaddingForEditingList = 12; + } // namespace ActionEditView::ActionEditView(DisplayOverlayController* controller, Action* action, - ash::RoundedContainer::Behavior container_type) + bool is_editing_list) : views::Button(base::BindRepeating(&ActionEditView::OnClicked, base::Unretained(this))), controller_(controller), @@ -39,33 +47,41 @@ SetUseDefaultFillLayout(true); SetNotifyEnterExitOnChild(true); auto* container = AddChildView(std::make_unique<views::TableLayoutView>()); - container->SetBorder(views::CreateEmptyBorder(gfx::Insets::VH(14, 16))); + container->SetBorder( + views::CreateEmptyBorder(gfx::Insets::VH(14, kHorizontalInsets))); container->SetBackground(views::CreateThemedRoundedRectBackground( cros_tokens::kCrosSysSystemOnBase, - /*top_radius=*/container_type == - ash::RoundedContainer::Behavior::kBottomRounded - ? 0.0f - : corner_radius, - /*bottom_radius=*/corner_radius, + /*top_radius=*/is_editing_list ? kCornerRadius : 0.0f, + /*bottom_radius=*/kCornerRadius, /*for_border_thickness=*/0)); - + const int padding_width = is_editing_list + ? kNameTagAndLabelsPaddingForEditingList + : kNameTagAndLabelsPaddingForButtonOptionsMenu; container ->AddColumn(/*h_align=*/views::LayoutAlignment::kStart, /*v_align=*/views::LayoutAlignment::kStart, /*horizontal_resize=*/1.0f, /*size_type=*/views::TableLayout::ColumnSize::kUsePreferred, /*fixed_width=*/0, /*min_width=*/0) + .AddPaddingColumn(/*horizontal_resize=*/views::TableLayout::kFixedSize, + /*width=*/padding_width) .AddColumn(/*h_align=*/views::LayoutAlignment::kEnd, - /*v_align=*/views::LayoutAlignment::kCenter, + /*v_align=*/views::LayoutAlignment::kStart, /*horizontal_resize=*/1.0f, /*size_type=*/views::TableLayout::ColumnSize::kUsePreferred, /*fixed_width=*/0, /*min_width=*/0) .AddRows(1, /*vertical_resize=*/views::TableLayout::kFixedSize); // TODO(b/274690042): Replace placeholder text with localized strings. - name_tag_ = container->AddChildView(NameTag::CreateNameTag(u"Unassigned")); + name_tag_ = container->AddChildView( + NameTag::CreateNameTag(u"Unassigned", is_editing_list)); labels_view_ = container->AddChildView(EditLabels::CreateEditLabels( controller_, action_, name_tag_, /*should_update_title=*/true)); + + name_tag_->SetMaximumWidth( + (is_editing_list ? kEditingListWidth : kButtonOptionsMenuWidth) - + 2 * kEditingListInsideBorderInsets - 2 * kHorizontalInsets - + padding_width - labels_view_->GetPreferredSize().width()); } ActionEditView::~ActionEditView() = default;
diff --git a/chrome/browser/ash/arc/input_overlay/ui/action_edit_view.h b/chrome/browser/ash/arc/input_overlay/ui/action_edit_view.h index 9dc43e9..39a3eb3e 100644 --- a/chrome/browser/ash/arc/input_overlay/ui/action_edit_view.h +++ b/chrome/browser/ash/arc/input_overlay/ui/action_edit_view.h
@@ -7,7 +7,6 @@ #include "base/memory/raw_ptr.h" -#include "ash/style/rounded_container.h" #include "ui/views/controls/button/button.h" namespace arc::input_overlay { @@ -25,7 +24,7 @@ public: ActionEditView(DisplayOverlayController* controller, Action* action, - ash::RoundedContainer::Behavior container_type); + bool is_editing_list); ActionEditView(const ActionEditView&) = delete; ActionEditView& operator=(const ActionEditView&) = delete; ~ActionEditView() override;
diff --git a/chrome/browser/ash/arc/input_overlay/ui/action_view_list_item.cc b/chrome/browser/ash/arc/input_overlay/ui/action_view_list_item.cc index b6243f7..4189ea8 100644 --- a/chrome/browser/ash/arc/input_overlay/ui/action_view_list_item.cc +++ b/chrome/browser/ash/arc/input_overlay/ui/action_view_list_item.cc
@@ -17,7 +17,7 @@ Action* action) : ActionEditView(controller, action, - ash::RoundedContainer::Behavior::kAllRounded) {} + /*is_editing_list=*/true) {} ActionViewListItem::~ActionViewListItem() = default;
diff --git a/chrome/browser/ash/arc/input_overlay/ui/arrow_container.cc b/chrome/browser/ash/arc/input_overlay/ui/arrow_container.cc index a20b41d..9f1727a 100644 --- a/chrome/browser/ash/arc/input_overlay/ui/arrow_container.cc +++ b/chrome/browser/ash/arc/input_overlay/ui/arrow_container.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/ash/arc/input_overlay/ui/arrow_container.h" #include "cc/paint/paint_flags.h" +#include "chrome/browser/ash/arc/input_overlay/constants.h" #include "ui/chromeos/styles/cros_tokens_color_mappings.h" #include "ui/color/color_provider.h" #include "ui/gfx/canvas.h" @@ -13,14 +14,15 @@ namespace arc::input_overlay { namespace { -// Whole menu width with arrow. -constexpr int kMenuWidth = 316; - constexpr int kTriangleLength = 20; constexpr int kTriangleHeight = 14; constexpr int kCornerRadius = 16; constexpr int kBorderThickness = 2; constexpr int kBorderInset = 16; + +// Whole menu width with arrow. +constexpr int kMenuWidth = kButtonOptionsMenuWidth + kTriangleHeight; + // Draws the dialog shape path with round corner. It starts after the corner // radius on line #0 and draws clockwise. //
diff --git a/chrome/browser/ash/arc/input_overlay/ui/button_options_menu.cc b/chrome/browser/ash/arc/input_overlay/ui/button_options_menu.cc index e0522dde..711fb38 100644 --- a/chrome/browser/ash/arc/input_overlay/ui/button_options_menu.cc +++ b/chrome/browser/ash/arc/input_overlay/ui/button_options_menu.cc
@@ -10,7 +10,6 @@ #include "ash/resources/vector_icons/vector_icons.h" #include "ash/strings/grit/ash_strings.h" #include "ash/style/icon_button.h" -#include "ash/style/rounded_container.h" #include "ash/style/style_util.h" #include "ash/style/typography.h" #include "chrome/app/vector_icons/vector_icons.h" @@ -62,11 +61,10 @@ ButtonOptionsActionEdit(DisplayOverlayController* controller, Action* action) : ActionEditView(controller, action, - ash::RoundedContainer::Behavior::kBottomRounded) { + /*is_editing_list=*/false) { // TODO(b/274690042): Replace the hardcoded string with a localized string. - auto* title_string = - (action_->is_new() ? u"Select a key" : u"Selected key"); - name_tag_->SetTitle(title_string); + name_tag_->SetTitle(action_->is_new() ? u"Assign a keyboard a key:" + : u"Assigned keyboard key:"); labels_view_->set_should_update_title(false); } ButtonOptionsActionEdit(const ButtonOptionsActionEdit&) = delete; @@ -77,7 +75,7 @@ void OnActionInputBindingUpdated() override { ActionEditView::OnActionInputBindingUpdated(); // TODO(b/274690042): Replace the hardcoded string with a localized string. - name_tag_->SetTitle(u"Selected key"); + name_tag_->SetTitle(u"Assigned keyboard key:"); } private: @@ -151,6 +149,23 @@ controller_->RemoveTouchInjectorObserver(this); } +void ButtonOptionsMenu::UpdateWidget() { + auto* widget = GetWidget(); + DCHECK(widget); + + controller_->UpdateWidgetBoundsInRootWindow( + widget, + gfx::Rect(action_->action_view()->CalculateAttachViewPositionInRootWindow( + /*available_bounds=*/CalculateAvailableBounds( + /*root_window=*/controller_->touch_injector() + ->window() + ->GetRootWindow()), + /*window_content_origin=*/ + controller_->touch_injector()->content_bounds().origin(), + /*attached_view=*/this), + GetPreferredSize())); +} + void ButtonOptionsMenu::Init() { SetUseDefaultFillLayout(true); SetLayoutManager(std::make_unique<views::BoxLayout>( @@ -269,7 +284,7 @@ RemoveChildViewT(action_edit_); action_edit_ = AddChildViewAt( std::make_unique<ButtonOptionsActionEdit>(controller_, action_), *index); - controller_->UpdateButtonOptionsMenuWidgetBounds(action_); + UpdateWidget(); } void ButtonOptionsMenu::OnActionInputBindingUpdated(const Action& action) {
diff --git a/chrome/browser/ash/arc/input_overlay/ui/button_options_menu.h b/chrome/browser/ash/arc/input_overlay/ui/button_options_menu.h index f8ad07f..42380265c 100644 --- a/chrome/browser/ash/arc/input_overlay/ui/button_options_menu.h +++ b/chrome/browser/ash/arc/input_overlay/ui/button_options_menu.h
@@ -50,6 +50,8 @@ ButtonOptionsMenu& operator=(const ButtonOptionsMenu&) = delete; ~ButtonOptionsMenu() override; + void UpdateWidget(); + Action* action() const { return action_; } private:
diff --git a/chrome/browser/ash/arc/input_overlay/ui/edit_labels.cc b/chrome/browser/ash/arc/input_overlay/ui/edit_labels.cc index 76480a6..899abd6 100644 --- a/chrome/browser/ash/arc/input_overlay/ui/edit_labels.cc +++ b/chrome/browser/ash/arc/input_overlay/ui/edit_labels.cc
@@ -7,12 +7,15 @@ #include "base/check_op.h" #include "chrome/browser/ash/arc/input_overlay/actions/action.h" #include "chrome/browser/ash/arc/input_overlay/display_overlay_controller.h" +#include "chrome/browser/ash/arc/input_overlay/ui/button_options_menu.h" #include "chrome/browser/ash/arc/input_overlay/ui/edit_label.h" +#include "chrome/browser/ash/arc/input_overlay/ui/editing_list.h" #include "chrome/browser/ash/arc/input_overlay/ui/name_tag.h" #include "chrome/browser/ash/arc/input_overlay/ui/ui_utils.h" #include "chrome/grit/generated_resources.h" #include "ui/base/l10n/l10n_util.h" #include "ui/views/layout/table_layout.h" +#include "ui/views/view_utils.h" namespace arc::input_overlay { @@ -170,8 +173,6 @@ key_string = u"unassigned"; } - name_tag_->SetSubtitle(labels_.size() == 1 ? u"Key " + key_string - : u"Keys " + key_string); name_tag_->SetState( // The name tag is not set to be in an error state if it was newly // created.
diff --git a/chrome/browser/ash/arc/input_overlay/ui/name_tag.cc b/chrome/browser/ash/arc/input_overlay/ui/name_tag.cc index e35c45f..4a0f0ddb 100644 --- a/chrome/browser/ash/arc/input_overlay/ui/name_tag.cc +++ b/chrome/browser/ash/arc/input_overlay/ui/name_tag.cc
@@ -8,22 +8,36 @@ #include "ash/bubble/bubble_utils.h" #include "ash/style/typography.h" +#include "chrome/browser/ash/arc/input_overlay/ui/button_options_menu.h" +#include "chrome/browser/ash/arc/input_overlay/ui/editing_list.h" #include "components/vector_icons/vector_icons.h" #include "ui/chromeos/styles/cros_tokens_color_mappings.h" #include "ui/views/controls/image_view.h" #include "ui/views/controls/label.h" -#include "ui/views/layout/flex_layout.h" +#include "ui/views/layout/box_layout.h" +#include "ui/views/view_class_properties.h" +#include "ui/views/view_utils.h" +#include "ui/views/widget/widget.h" namespace arc::input_overlay { +namespace { + +constexpr int kErrorIconSize = 12; +constexpr int kErrorIconSpacing = 12; +constexpr int kHeaderSpacing = 4; + +} // namespace + // static -std::unique_ptr<NameTag> NameTag::CreateNameTag(const std::u16string& title) { - auto name_tag = std::make_unique<NameTag>(); +std::unique_ptr<NameTag> NameTag::CreateNameTag(const std::u16string& title, + bool for_editing_list) { + auto name_tag = std::make_unique<NameTag>(for_editing_list); name_tag->SetTitle(title); return name_tag; } -NameTag::NameTag() { +NameTag::NameTag(bool for_editing_list) : for_editing_list_(for_editing_list) { Init(); } @@ -33,44 +47,93 @@ title_label_->SetText(title); } -void NameTag::SetSubtitle(const std::u16string& subtitle) { - subtitle_label_->SetText(subtitle); -} - void NameTag::SetState(bool is_error, const std::u16string& error_tooltip) { error_icon_->SetTooltipText(error_tooltip); error_icon_->SetVisible(is_error); - SetTextColor(is_error ? cros_tokens::kCrosSysError - : cros_tokens::kCrosSysSecondary); + + subtitle_label_->SetText(error_tooltip); + subtitle_label_->SetVisible(is_error); + + title_label_->SetEnabledColorId(for_editing_list_ && is_error + ? cros_tokens::kCrosSysError + : cros_tokens::kCrosSysOnSurface); + + // The widget may need a resize. + auto* widget = GetWidget(); + // No need to update widget when the view is not added to the widget yet. + if (!widget) { + return; + } + if (auto* editing_list = + views::AsViewClass<EditingList>(widget->GetContentsView())) { + editing_list->UpdateWidget(); + } else if (auto* menu = views::AsViewClass<ButtonOptionsMenu>( + widget->GetContentsView())) { + menu->UpdateWidget(); + } +} + +void NameTag::SetMaximumWidth(int available_width) { + const int shortened_width = + available_width - (kErrorIconSize + kErrorIconSpacing); + title_label_->SetMaximumWidth(for_editing_list_ ? shortened_width + : available_width); + subtitle_label_->SetMaximumWidth(shortened_width); } void NameTag::Init() { - SetLayoutManager(std::make_unique<views::FlexLayout>()) - ->SetOrientation(views::LayoutOrientation::kHorizontal) - .SetMainAxisAlignment(views::LayoutAlignment::kStart); + SetLayoutManager( + std::make_unique<views::BoxLayout>( + for_editing_list_ ? views::BoxLayout::Orientation::kHorizontal + : views::BoxLayout::Orientation::kVertical, + gfx::Insets(), + /*between_child_spacing=*/for_editing_list_ ? 0 : kHeaderSpacing)) + ->set_cross_axis_alignment( + for_editing_list_ ? views::BoxLayout::CrossAxisAlignment::kCenter + : views::BoxLayout::CrossAxisAlignment::kStart); - error_icon_ = AddChildView( + auto title_label = ash::bubble_utils::CreateLabel( + ash::TypographyToken::kCrosButton2, u"", cros_tokens::kCrosSysOnSurface); + auto error_icon = std::make_unique<views::ImageView>(ui::ImageModel::FromVectorIcon( - vector_icons::kErrorOutlineIcon, cros_tokens::kCrosSysError, 12))); - error_icon_->SetProperty(views::kMarginsKey, gfx::Insets::TLBR(0, 0, 0, 12)); + vector_icons::kErrorOutlineIcon, cros_tokens::kCrosSysError, + kErrorIconSize)); + + if (for_editing_list_) { + error_icon_ = AddChildView(std::move(error_icon)); + } else { + title_label_ = AddChildView(std::move(title_label)); + } + + auto* sub_container = AddChildView(std::make_unique<views::View>()); + sub_container + ->SetLayoutManager(std::make_unique<views::BoxLayout>( + for_editing_list_ ? views::BoxLayout::Orientation::kVertical + : views::BoxLayout::Orientation::kHorizontal)) + ->set_main_axis_alignment( + for_editing_list_ ? views::BoxLayout::MainAxisAlignment::kCenter + : views::BoxLayout::MainAxisAlignment::kStart); + + if (for_editing_list_) { + title_label_ = sub_container->AddChildView(std::move(title_label)); + } else { + error_icon_ = sub_container->AddChildView(std::move(error_icon)); + } + + title_label_->SetMultiLine(true); + title_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); + + error_icon_->SetProperty(views::kMarginsKey, + gfx::Insets::TLBR(0, 0, 0, kErrorIconSpacing)); error_icon_->SetVisible(false); - auto* text_container = AddChildView(std::make_unique<views::View>()); - text_container->SetLayoutManager(std::make_unique<views::FlexLayout>()) - ->SetOrientation(views::LayoutOrientation::kVertical) - .SetMainAxisAlignment(views::LayoutAlignment::kStart) - .SetCrossAxisAlignment(views::LayoutAlignment::kStart); - title_label_ = text_container->AddChildView( - ash::bubble_utils::CreateLabel(ash::TypographyToken::kCrosButton1, u"", - cros_tokens::kCrosRefNeutral100)); - subtitle_label_ = text_container->AddChildView( + subtitle_label_ = sub_container->AddChildView( ash::bubble_utils::CreateLabel(ash::TypographyToken::kCrosAnnotation2, u"", cros_tokens::kCrosSysSecondary)); -} - -void NameTag::SetTextColor(ui::ColorId color_id) { - title_label_->SetEnabledColorId(color_id); - subtitle_label_->SetEnabledColorId(color_id); + subtitle_label_->SetEnabledColorId(cros_tokens::kCrosSysError); + subtitle_label_->SetMultiLine(true); + subtitle_label_->SetHorizontalAlignment(gfx::ALIGN_LEFT); + subtitle_label_->SetVisible(false); } } // namespace arc::input_overlay
diff --git a/chrome/browser/ash/arc/input_overlay/ui/name_tag.h b/chrome/browser/ash/arc/input_overlay/ui/name_tag.h index 84da0b9..8285f47 100644 --- a/chrome/browser/ash/arc/input_overlay/ui/name_tag.h +++ b/chrome/browser/ash/arc/input_overlay/ui/name_tag.h
@@ -18,22 +18,31 @@ namespace arc::input_overlay { -// Create name tag with title and sub-title as: +// Create name tag with title and sub-title. +// +// For EditingList (`for_editing_list`=true): // +----------------+ // |icon |Title| | // | |Sub-title|| // +----------------+ +// +// For ButtonOptionsMenu (`for_editing_list`=false): +// +----------------+ +// ||Title| | +// |icon |Sub-title|| +// +----------------+ class NameTag : public views::View { public: - static std::unique_ptr<NameTag> CreateNameTag(const std::u16string& title); + static std::unique_ptr<NameTag> CreateNameTag(const std::u16string& title, + bool for_editing_list); - NameTag(); + explicit NameTag(bool for_editing_list); NameTag(const NameTag&) = delete; NameTag& operator=(const NameTag&) = delete; ~NameTag() override; void SetTitle(const std::u16string& title); - void SetSubtitle(const std::u16string& sub_title); + void SetMaximumWidth(int available_width); // Set state depending on `is_error`. If `is_error` true, `error_tooltip` is // tooltip text for `error_icon_`. @@ -46,11 +55,12 @@ void Init(); - void SetTextColor(ui::ColorId color_id); - raw_ptr<views::ImageView> error_icon_ = nullptr; raw_ptr<views::Label> title_label_ = nullptr; raw_ptr<views::Label> subtitle_label_ = nullptr; + + // True if this view is in EditingList. Otherwise, it is in ButtonOptionsMenu. + bool for_editing_list_; }; } // namespace arc::input_overlay
diff --git a/chrome/browser/ash/events/event_rewriter_unittest.cc b/chrome/browser/ash/events/event_rewriter_unittest.cc index 289d4987..9ce2ded 100644 --- a/chrome/browser/ash/events/event_rewriter_unittest.cc +++ b/chrome/browser/ash/events/event_rewriter_unittest.cc
@@ -187,6 +187,210 @@ return GetKeyEventAsString(*events[0]->AsKeyEvent()); } +// Key representation in test cases. +struct TestKeyEvent { + ui::EventType type; + ui::DomCode code; + ui::DomKey key; + ui::KeyboardCode keycode; + ui::EventFlags flags = ui::EF_NONE; + uint32_t scan_code = kNoScanCode; + + std::string ToString() const; +}; + +// Factory methods of TestKeyEvent for reducing syntax noises in tests. +constexpr TestKeyEvent APressed(ui::EventFlags flags = ui::EF_NONE) { + return {ui::ET_KEY_PRESSED, ui::DomCode::US_A, + ui::DomKey::Constant<'a'>::Character, ui::VKEY_A, flags}; +} + +constexpr TestKeyEvent BPressed(ui::EventFlags flags = ui::EF_NONE) { + return {ui::ET_KEY_PRESSED, ui::DomCode::US_B, + ui::DomKey::Constant<'b'>::Character, ui::VKEY_B, flags}; +} + +constexpr TestKeyEvent LWinPressed(ui::EventFlags flags = ui::EF_NONE) { + return {ui::ET_KEY_PRESSED, ui::DomCode::META_LEFT, ui::DomKey::META, + ui::VKEY_LWIN, flags | ui::EF_COMMAND_DOWN}; +} + +constexpr TestKeyEvent RWinPressed(ui::EventFlags flags = ui::EF_NONE) { + return {ui::ET_KEY_PRESSED, ui::DomCode::META_RIGHT, ui::DomKey::META, + ui::VKEY_RWIN, flags | ui::EF_COMMAND_DOWN}; +} + +constexpr TestKeyEvent LControlPressed(ui::EventFlags flags = ui::EF_NONE) { + return {ui::ET_KEY_PRESSED, ui::DomCode::CONTROL_LEFT, ui::DomKey::CONTROL, + ui::VKEY_CONTROL, flags | ui::EF_CONTROL_DOWN}; +} + +constexpr TestKeyEvent RControlPressed(ui::EventFlags flags = ui::EF_NONE) { + return {ui::ET_KEY_PRESSED, ui::DomCode::CONTROL_RIGHT, ui::DomKey::CONTROL, + ui::VKEY_CONTROL, flags | ui::EF_CONTROL_DOWN}; +} + +std::string EventTypeToString(ui::EventType type) { + switch (type) { +#define CASE(name) \ + case ui::name: \ + return #name + CASE(ET_UNKNOWN); + CASE(ET_MOUSE_PRESSED); + CASE(ET_MOUSE_DRAGGED); + CASE(ET_MOUSE_RELEASED); + CASE(ET_MOUSE_MOVED); + CASE(ET_MOUSE_ENTERED); + CASE(ET_MOUSE_EXITED); + CASE(ET_KEY_PRESSED); + CASE(ET_KEY_RELEASED); + CASE(ET_MOUSEWHEEL); + CASE(ET_MOUSE_CAPTURE_CHANGED); + CASE(ET_TOUCH_RELEASED); + CASE(ET_TOUCH_PRESSED); + CASE(ET_TOUCH_MOVED); + CASE(ET_TOUCH_CANCELLED); + CASE(ET_DROP_TARGET_EVENT); + CASE(ET_GESTURE_SCROLL_BEGIN); + CASE(ET_GESTURE_SCROLL_END); + CASE(ET_GESTURE_SCROLL_UPDATE); + CASE(ET_GESTURE_TAP); + CASE(ET_GESTURE_TAP_DOWN); + CASE(ET_GESTURE_TAP_CANCEL); + CASE(ET_GESTURE_TAP_UNCONFIRMED); + CASE(ET_GESTURE_DOUBLE_TAP); + CASE(ET_GESTURE_BEGIN); + CASE(ET_GESTURE_END); + CASE(ET_GESTURE_TWO_FINGER_TAP); + CASE(ET_GESTURE_PINCH_BEGIN); + CASE(ET_GESTURE_PINCH_END); + CASE(ET_GESTURE_PINCH_UPDATE); + CASE(ET_GESTURE_SHORT_PRESS); + CASE(ET_GESTURE_LONG_PRESS); + CASE(ET_GESTURE_LONG_TAP); + CASE(ET_GESTURE_SWIPE); + CASE(ET_GESTURE_SHOW_PRESS); + CASE(ET_SCROLL); + CASE(ET_SCROLL_FLING_START); + CASE(ET_SCROLL_FLING_CANCEL); + CASE(ET_CANCEL_MODE); + CASE(ET_UMA_DATA); + CASE(ET_LAST); +#undef CASE + } +} + +std::string KeyEventFlagsToString(ui::EventFlags flags) { + if (flags == ui::EF_NONE) { + return "EF_NONE"; + } + + static constexpr struct { + ui::EventFlags flag; + const char* name; + } kFlags[] = { +#define FLAG(flag) {ui::flag, #flag} + FLAG(EF_IS_SYNTHESIZED), FLAG(EF_SHIFT_DOWN), FLAG(EF_CONTROL_DOWN), + FLAG(EF_ALT_DOWN), FLAG(EF_COMMAND_DOWN), FLAG(EF_FUNCTION_DOWN), + FLAG(EF_ALTGR_DOWN), FLAG(EF_MOD3_DOWN), FLAG(EF_NUM_LOCK_ON), + FLAG(EF_CAPS_LOCK_ON), FLAG(EF_SCROLL_LOCK_ON), +#undef FLAG + }; + std::string result; + for (auto [flag, name] : kFlags) { + if (flags & flag) { + if (!result.empty()) { + result.push_back('|'); + } + result += name; + } + flags &= ~flag; + } + if (flags) { + if (!result.empty()) { + result.push_back('|'); + } + result += base::StringPrintf("unknown[0x%X]", flags); + } + return result; +} + +std::string TestKeyEvent::ToString() const { + return base::StringPrintf( + "type=%s(%d) " + "code=%s(0x%06X) " + "key=%s(0x%08X) " + "keycode=0x%02X " + "flags=%s(0x%X) " + "scan_code=0x%08X", + EventTypeToString(type).c_str(), type, + ui::KeycodeConverter::DomCodeToCodeString(code).c_str(), + static_cast<uint32_t>(code), + ui::KeycodeConverter::DomKeyToKeyString(key).c_str(), + static_cast<uint32_t>(key), keycode, KeyEventFlagsToString(flags).c_str(), + flags, scan_code); +} + +inline std::ostream& operator<<(std::ostream& os, const TestKeyEvent& event) { + return os << event.ToString(); +} + +inline bool operator==(const TestKeyEvent& e1, const TestKeyEvent& e2) { + return e1.type == e2.type && e1.code == e2.code && e1.key == e2.key && + e1.keycode == e2.keycode && e1.flags == e2.flags && + e1.scan_code == e2.scan_code; +} + +// Keyboard representation in tests. +struct TestKeyboard { + const char* name; + const char* layout; + ui::InputDeviceType type; + bool has_custom_top_row; +}; +constexpr TestKeyboard kInternalChromeKeyboard = { + "Internal Keyboard", + kKbdTopRowLayoutUnspecified, + ui::INPUT_DEVICE_INTERNAL, + /*has_custom_top_row=*/false, +}; +constexpr TestKeyboard kInternalChromeCustomLayoutKeyboard = { + "Internal Custom Layout Keyboard", + kKbdDefaultCustomTopRowLayout, + ui::INPUT_DEVICE_INTERNAL, + /*has_custom_top_row=*/true, +}; +constexpr TestKeyboard kExternalChromeKeyboard = { + "External Chrome Keyboard", + kKbdTopRowLayout1Tag, + ui::INPUT_DEVICE_UNKNOWN, + /*has_custom_top_row=*/false, +}; +constexpr TestKeyboard kExternalChromeCustomLayoutKeyboard = { + "External Chrome Custom Layout Keyboard", + kKbdDefaultCustomTopRowLayout, + ui::INPUT_DEVICE_UNKNOWN, + /*has_custom_top_row=*/true, +}; +constexpr TestKeyboard kExternalGenericKeyboard = { + "PC Keyboard", + kKbdTopRowLayoutUnspecified, + ui::INPUT_DEVICE_UNKNOWN, + /*has_custom_top_row=*/false, +}; +constexpr TestKeyboard kExternalAppleKeyboard = { + "Apple Keyboard", + kKbdTopRowLayoutUnspecified, + ui::INPUT_DEVICE_UNKNOWN, + /*has_custom_top_row=*/false, +}; + +constexpr TestKeyboard kNonAppleKeyboardVariants[] = { + kInternalChromeKeyboard, kInternalChromeCustomLayoutKeyboard, + kExternalChromeKeyboard, kExternalChromeCustomLayoutKeyboard, + kExternalGenericKeyboard, +}; + // Table entry for simple single key event rewriting tests. struct KeyTestCase { ui::EventType type; @@ -291,6 +495,25 @@ ui::test::TestEventSource& source() { return source_; } protected: + absl::optional<TestKeyEvent> RunRewriter(const TestKeyEvent& test_key_event) { + ui::KeyEvent event(test_key_event.type, test_key_event.keycode, + test_key_event.code, test_key_event.flags, + test_key_event.key, ui::EventTimeForNow()); + event.set_scan_code(test_key_event.scan_code); + event.set_source_device_id(kKeyboardDeviceId); + source().Send(&event); + + auto events = + static_cast<TestEventSink*>(source().GetEventSink())->TakeEvents(); + if (events.empty()) { + return absl::nullopt; + } + auto* key_event = events[0]->AsKeyEvent(); + return {{key_event->type(), key_event->code(), key_event->GetDomKey(), + key_event->key_code(), key_event->flags(), + key_event->scan_code()}}; + } + void TestRewriteNumPadKeys(); void TestRewriteNumPadKeysOnAppleKeyboard(); @@ -331,6 +554,12 @@ keyboard_settings->modifier_remappings[remap_from] = remap_to; } + void SetUpKeyboard(const TestKeyboard& keyboard) { + SetupKeyboard(keyboard.name, keyboard.layout, keyboard.type, + keyboard.has_custom_top_row); + } + + // TODO(crbug.com/1440147): Refactor to merge this into SetUpKeyboard above. ui::KeyboardDevice SetupKeyboard( const std::string& name, const std::string& layout = "", @@ -515,18 +744,10 @@ // publishes a latency metric every time a key is pressed. TEST_F(EventRewriterTest, TestKeyRewriteLatency) { base::HistogramTester histogram_tester; - CheckKeyTestCase(source(), - {ui::ET_KEY_PRESSED, - {ui::VKEY_B, ui::DomCode::US_B, ui::EF_CONTROL_DOWN, - ui::DomKey::Constant<'b'>::Character}, - {ui::VKEY_B, ui::DomCode::US_B, ui::EF_CONTROL_DOWN, - ui::DomKey::Constant<'b'>::Character}}); - CheckKeyTestCase(source(), - {ui::ET_KEY_PRESSED, - {ui::VKEY_B, ui::DomCode::US_B, ui::EF_CONTROL_DOWN, - ui::DomKey::Constant<'b'>::Character}, - {ui::VKEY_B, ui::DomCode::US_B, ui::EF_CONTROL_DOWN, - ui::DomKey::Constant<'b'>::Character}}); + EXPECT_EQ(BPressed(ui::EF_CONTROL_DOWN), + RunRewriter(BPressed(ui::EF_CONTROL_DOWN))); + EXPECT_EQ(BPressed(ui::EF_CONTROL_DOWN), + RunRewriter(BPressed(ui::EF_CONTROL_DOWN))); histogram_tester.ExpectTotalCount( "ChromeOS.Inputs.EventRewriter.KeyRewriteLatency", 2); } @@ -536,120 +757,97 @@ scoped_feature_list_.InitAndDisableFeature( features::kInputDeviceSettingsSplit); + auto UnidentifiedAPressed = [](ui::EventFlags flags) -> TestKeyEvent { + return {ui::ET_KEY_PRESSED, ui::DomCode::US_A, ui::DomKey::UNIDENTIFIED, + ui::VKEY_A, flags}; + }; + // First, test non Apple keyboards, they should all behave the same. - TestNonAppleKeyboardVariants({ - // VKEY_A, Alt modifier. - {ui::ET_KEY_PRESSED, - {ui::VKEY_A, ui::DomCode::US_A, ui::EF_ALT_DOWN, - ui::DomKey::UNIDENTIFIED}, - {ui::VKEY_A, ui::DomCode::US_A, ui::EF_ALT_DOWN, - ui::DomKey::UNIDENTIFIED}}, + for (const auto& keyboard : kNonAppleKeyboardVariants) { + SCOPED_TRACE(keyboard.name); + SetUpKeyboard(keyboard); - // VKEY_A, Win modifier. - {ui::ET_KEY_PRESSED, - {ui::VKEY_A, ui::DomCode::US_A, ui::EF_COMMAND_DOWN, - ui::DomKey::UNIDENTIFIED}, - {ui::VKEY_A, ui::DomCode::US_A, ui::EF_COMMAND_DOWN, - ui::DomKey::UNIDENTIFIED}}, + // VKEY_A, Alt modifier. + EXPECT_EQ(UnidentifiedAPressed(ui::EF_ALT_DOWN), + RunRewriter(UnidentifiedAPressed(ui::EF_ALT_DOWN))); - // VKEY_A, Alt+Win modifier. - {ui::ET_KEY_PRESSED, - {ui::VKEY_A, ui::DomCode::US_A, ui::EF_ALT_DOWN | ui::EF_COMMAND_DOWN, - ui::DomKey::UNIDENTIFIED}, - {ui::VKEY_A, ui::DomCode::US_A, ui::EF_ALT_DOWN | ui::EF_COMMAND_DOWN, - ui::DomKey::UNIDENTIFIED}}, + // VKEY_A, Win modifier. + EXPECT_EQ(UnidentifiedAPressed(ui::EF_COMMAND_DOWN), + RunRewriter(UnidentifiedAPressed(ui::EF_COMMAND_DOWN))); - // VKEY_LWIN (left Windows key), Alt modifier. - {ui::ET_KEY_PRESSED, - {ui::VKEY_LWIN, ui::DomCode::META_LEFT, - ui::EF_ALT_DOWN | ui::EF_COMMAND_DOWN, ui::DomKey::META}, - {ui::VKEY_LWIN, ui::DomCode::META_LEFT, - ui::EF_ALT_DOWN | ui::EF_COMMAND_DOWN, ui::DomKey::META}}, + // VKEY_A, Alt+Win modifier. + EXPECT_EQ(UnidentifiedAPressed(ui::EF_ALT_DOWN | ui::EF_COMMAND_DOWN), + RunRewriter( + UnidentifiedAPressed(ui::EF_ALT_DOWN | ui::EF_COMMAND_DOWN))); - // VKEY_RWIN (right Windows key), Alt modifier. - {ui::ET_KEY_PRESSED, - {ui::VKEY_RWIN, ui::DomCode::META_RIGHT, - ui::EF_ALT_DOWN | ui::EF_COMMAND_DOWN, ui::DomKey::META}, - {ui::VKEY_RWIN, ui::DomCode::META_RIGHT, - ui::EF_ALT_DOWN | ui::EF_COMMAND_DOWN, ui::DomKey::META}}, - }); + // VKEY_LWIN (left Windows key), Alt modifier. + EXPECT_EQ(LWinPressed(ui::EF_ALT_DOWN), + RunRewriter(LWinPressed(ui::EF_ALT_DOWN))); + + // VKEY_RWIN (right Windows key), Alt modifier. + EXPECT_EQ(RWinPressed(ui::EF_ALT_DOWN), + RunRewriter(RWinPressed(ui::EF_ALT_DOWN))); + } // Simulate the default initialization of the Apple Command key remap pref to // Ctrl. Preferences::RegisterProfilePrefs(prefs()->registry()); + { + SCOPED_TRACE(kExternalAppleKeyboard.name); + SetUpKeyboard(kExternalAppleKeyboard); - TestExternalAppleKeyboard({ - // VKEY_A, Alt modifier. - {ui::ET_KEY_PRESSED, - {ui::VKEY_A, ui::DomCode::US_A, ui::EF_ALT_DOWN, - ui::DomKey::UNIDENTIFIED}, - {ui::VKEY_A, ui::DomCode::US_A, ui::EF_ALT_DOWN, - ui::DomKey::UNIDENTIFIED}}, + // VKEY_A, Alt modifier. + EXPECT_EQ(UnidentifiedAPressed(ui::EF_ALT_DOWN), + RunRewriter(UnidentifiedAPressed(ui::EF_ALT_DOWN))); - // VKEY_A, Win modifier. - {ui::ET_KEY_PRESSED, - {ui::VKEY_A, ui::DomCode::US_A, ui::EF_COMMAND_DOWN, - ui::DomKey::UNIDENTIFIED}, - {ui::VKEY_A, ui::DomCode::US_A, ui::EF_CONTROL_DOWN, - ui::DomKey::Constant<'a'>::Character}}, + // VKEY_A, Win modifier. + EXPECT_EQ(APressed(ui::EF_CONTROL_DOWN), + RunRewriter(UnidentifiedAPressed(ui::EF_COMMAND_DOWN))); - // VKEY_A, Alt+Win modifier. - {ui::ET_KEY_PRESSED, - {ui::VKEY_A, ui::DomCode::US_A, ui::EF_ALT_DOWN | ui::EF_COMMAND_DOWN, - ui::DomKey::UNIDENTIFIED}, - {ui::VKEY_A, ui::DomCode::US_A, ui::EF_ALT_DOWN | ui::EF_CONTROL_DOWN, - ui::DomKey::Constant<'a'>::Character}}, + // VKEY_A, Alt+Win modifier. + EXPECT_EQ(APressed(ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN), + RunRewriter( + UnidentifiedAPressed(ui::EF_COMMAND_DOWN | ui::EF_ALT_DOWN))); - // VKEY_LWIN (left Windows key), Alt modifier. - {ui::ET_KEY_PRESSED, - {ui::VKEY_LWIN, ui::DomCode::META_LEFT, - ui::EF_COMMAND_DOWN | ui::EF_ALT_DOWN, ui::DomKey::META}, - {ui::VKEY_CONTROL, ui::DomCode::CONTROL_LEFT, - ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN, ui::DomKey::CONTROL}}, + // VKEY_LWIN (left Windows key), Alt modifier. + EXPECT_EQ(LControlPressed(ui::EF_ALT_DOWN), + RunRewriter(LWinPressed(ui::EF_ALT_DOWN))); - // VKEY_RWIN (right Windows key), Alt modifier. - {ui::ET_KEY_PRESSED, - {ui::VKEY_RWIN, ui::DomCode::META_RIGHT, - ui::EF_COMMAND_DOWN | ui::EF_ALT_DOWN, ui::DomKey::META}, - {ui::VKEY_CONTROL, ui::DomCode::CONTROL_RIGHT, - ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN, ui::DomKey::CONTROL}}, - }); + // VKEY_RWIN (right Windows key), Alt modifier. + EXPECT_EQ(RControlPressed(ui::EF_ALT_DOWN), + RunRewriter(RWinPressed(ui::EF_ALT_DOWN))); + } // Now simulate the user remapped the Command key back to Search. IntegerPrefMember command; InitModifierKeyPref(&command, ::prefs::kLanguageRemapExternalCommandKeyTo, ui::mojom::ModifierKey::kMeta, ui::mojom::ModifierKey::kMeta); + { + SCOPED_TRACE(kExternalAppleKeyboard.name); + SetUpKeyboard(kExternalAppleKeyboard); - TestExternalAppleKeyboard({ - // VKEY_A, Win modifier. - {ui::ET_KEY_PRESSED, - {ui::VKEY_A, ui::DomCode::US_A, ui::EF_COMMAND_DOWN, - ui::DomKey::UNIDENTIFIED}, - {ui::VKEY_A, ui::DomCode::US_A, ui::EF_COMMAND_DOWN, - ui::DomKey::UNIDENTIFIED}}, + // VKEY_A, Alt modifier. + EXPECT_EQ(UnidentifiedAPressed(ui::EF_ALT_DOWN), + RunRewriter(UnidentifiedAPressed(ui::EF_ALT_DOWN))); - // VKEY_A, Alt+Win modifier. - {ui::ET_KEY_PRESSED, - {ui::VKEY_A, ui::DomCode::US_A, ui::EF_ALT_DOWN | ui::EF_COMMAND_DOWN, - ui::DomKey::UNIDENTIFIED}, - {ui::VKEY_A, ui::DomCode::US_A, ui::EF_ALT_DOWN | ui::EF_COMMAND_DOWN, - ui::DomKey::UNIDENTIFIED}}, + // VKEY_A, Win modifier. + EXPECT_EQ(UnidentifiedAPressed(ui::EF_COMMAND_DOWN), + RunRewriter(UnidentifiedAPressed(ui::EF_COMMAND_DOWN))); - // VKEY_LWIN (left Windows key), Alt modifier. - {ui::ET_KEY_PRESSED, - {ui::VKEY_LWIN, ui::DomCode::META_LEFT, - ui::EF_COMMAND_DOWN | ui::EF_ALT_DOWN, ui::DomKey::META}, - {ui::VKEY_LWIN, ui::DomCode::META_LEFT, - ui::EF_COMMAND_DOWN | ui::EF_ALT_DOWN, ui::DomKey::META}}, + // VKEY_A, Alt+Win modifier. + EXPECT_EQ(UnidentifiedAPressed(ui::EF_ALT_DOWN | ui::EF_COMMAND_DOWN), + RunRewriter( + UnidentifiedAPressed(ui::EF_ALT_DOWN | ui::EF_COMMAND_DOWN))); - // VKEY_RWIN (right Windows key), Alt modifier. - {ui::ET_KEY_PRESSED, - {ui::VKEY_RWIN, ui::DomCode::META_RIGHT, - ui::EF_COMMAND_DOWN | ui::EF_ALT_DOWN, ui::DomKey::META}, - {ui::VKEY_RWIN, ui::DomCode::META_RIGHT, - ui::EF_COMMAND_DOWN | ui::EF_ALT_DOWN, ui::DomKey::META}}, - }); + // VKEY_LWIN (left Windows key), Alt modifier. + EXPECT_EQ(LWinPressed(ui::EF_ALT_DOWN), + RunRewriter(LWinPressed(ui::EF_ALT_DOWN))); + + // VKEY_RWIN (right Windows key), Alt modifier. + EXPECT_EQ(RWinPressed(ui::EF_ALT_DOWN), + RunRewriter(RWinPressed(ui::EF_ALT_DOWN))); + } } TEST_F(EventRewriterTest, ModifiersNotRemappedWhenSuppressed) {
diff --git a/chrome/browser/ash/extensions/file_manager/system_notification_manager.cc b/chrome/browser/ash/extensions/file_manager/system_notification_manager.cc index e867ad7..6bfd662 100644 --- a/chrome/browser/ash/extensions/file_manager/system_notification_manager.cc +++ b/chrome/browser/ash/extensions/file_manager/system_notification_manager.cc
@@ -485,9 +485,9 @@ NotificationPtr SystemNotificationManager::MakeBulkPinningErrorNotification( const Event& event) { // Parse the event args as a bulk-pinning progress struct. - fmp::BulkPinProgress progress; DCHECK(!event.event_args.empty()); - if (!fmp::BulkPinProgress::Populate(event.event_args[0], progress)) { + auto progress = fmp::BulkPinProgress::FromValue(event.event_args[0]); + if (!progress) { LOG(ERROR) << "Cannot parse BulkPinProgress from " << event.event_args[0]; return nullptr; } @@ -495,9 +495,9 @@ // Remember the bulk-pinning stage. using enum BulkPinStage; const BulkPinStage old_stage = bulk_pin_stage_; - bulk_pin_stage_ = progress.stage; + bulk_pin_stage_ = progress->stage; - if (!progress.should_pin) { + if (!progress->should_pin) { return nullptr; } @@ -529,7 +529,7 @@ int title_id, message_id; if (bulk_pin_stage_ == BulkPinStage::kNotEnoughSpace) { - if (progress.emptied_queue) { + if (progress->emptied_queue) { title_id = IDS_FILE_BROWSER_DRIVE_SYNC_TURNED_OFF_TITLE; message_id = IDS_FILE_BROWSER_BULK_PINNING_NOT_ENOUGH_SPACE_NOTIFICATION_2; @@ -554,9 +554,9 @@ NotificationPtr SystemNotificationManager::MakeDriveSyncErrorNotification( const Event& event) { - fmp::DriveSyncErrorEvent sync_error; DCHECK(!event.event_args.empty()); - if (!fmp::DriveSyncErrorEvent::Populate(event.event_args[0], sync_error)) { + auto sync_error = fmp::DriveSyncErrorEvent::FromValue(event.event_args[0]); + if (!sync_error) { LOG(ERROR) << "Cannot parse DriveSyncErrorEvent from " << event.event_args[0]; return nullptr; @@ -564,10 +564,10 @@ const std::u16string title = GetStringUTF16(IDS_FILE_BROWSER_DRIVE_DIRECTORY_LABEL); - const std::string id = ToString(sync_error.type); - const GURL file_url(sync_error.file_url); + const std::string id = ToString(sync_error->type); + const GURL file_url(sync_error->file_url); - switch (sync_error.type) { + switch (sync_error->type) { case fmp::DriveSyncErrorType::kDeleteWithoutPermission: return CreateNotification( id, title, @@ -599,7 +599,7 @@ util::GetDisplayableFileName16(file_url))); case fmp::DriveSyncErrorType::kNoSharedDriveSpace: - if (!sync_error.shared_drive.has_value()) { + if (!sync_error->shared_drive.has_value()) { DLOG(WARNING) << "No shared drive provided for error notification"; return nullptr; } @@ -607,14 +607,14 @@ return CreateNotification( id, title, GetStringFUTF16(IDS_FILE_BROWSER_SYNC_ERROR_SHARED_DRIVE_OUT_OF_SPACE, - UTF8ToUTF16(sync_error.shared_drive.value()))); + UTF8ToUTF16(sync_error->shared_drive.value()))); case fmp::DriveSyncErrorType::kNone: break; } LOG(ERROR) << "Unexpected Drive sync error: " - << base::to_underlying(sync_error.type); + << base::to_underlying(sync_error->type); return nullptr; } @@ -641,10 +641,10 @@ NotificationPtr SystemNotificationManager::MakeDriveConfirmDialogNotification( const Event& event) { - fmp::DriveConfirmDialogEvent dialog_event; DCHECK(!event.event_args.empty()); - if (!fmp::DriveConfirmDialogEvent::Populate(event.event_args[0], - dialog_event)) { + auto dialog_event = + fmp::DriveConfirmDialogEvent::FromValue(event.event_args[0]); + if (!dialog_event) { LOG(ERROR) << "Cannot parse DriveConfirmDialogEvent from " << event.event_args[0]; return nullptr; @@ -667,9 +667,9 @@ NotificationPtr SystemNotificationManager::UpdateDriveSyncNotification( const Event& event) { - fmp::FileTransferStatus status; DCHECK(!event.event_args.empty()); - if (!fmp::FileTransferStatus::Populate(event.event_args[0], status)) { + auto status = fmp::FileTransferStatus::FromValue(event.event_args[0]); + if (!status) { LOG(ERROR) << "Cannot parse FileTransferStatus from " << event.event_args[0]; return nullptr; @@ -683,7 +683,7 @@ constexpr char kDrivePinId[] = "swa-drive-pin"; // Close if notifications are disabled for this transfer. - if (!status.show_notification) { + if (!status->show_notification) { GetNotificationDisplayService()->Close( NotificationHandler::Type::TRANSIENT, is_sync_operation ? kDriveSyncId : kDrivePinId); @@ -691,11 +691,11 @@ } using enum fmp::TransferState; - if (status.transfer_state == fmp::TransferState::kCompleted || - status.transfer_state == fmp::TransferState::kFailed) { + if (status->transfer_state == fmp::TransferState::kCompleted || + status->transfer_state == fmp::TransferState::kFailed) { // We only close when there are no jobs left, we could have received // a TRANSFER_STATE_COMPLETED event when there are more jobs to run. - if (status.num_total_jobs == 0) { + if (status->num_total_jobs == 0) { GetNotificationDisplayService()->Close( NotificationHandler::Type::TRANSIENT, is_sync_operation ? kDriveSyncId : kDrivePinId); @@ -705,22 +705,22 @@ } std::u16string message = - status.num_total_jobs == 1 + status->num_total_jobs == 1 ? GetStringFUTF16( is_sync_operation ? IDS_FILE_BROWSER_SYNC_FILE_NAME : IDS_FILE_BROWSER_OFFLINE_PROGRESS_MESSAGE, - util::GetDisplayableFileName16(GURL(status.file_url))) + util::GetDisplayableFileName16(GURL(status->file_url))) : GetStringFUTF16( is_sync_operation ? IDS_FILE_BROWSER_SYNC_FILE_NUMBER : IDS_FILE_BROWSER_OFFLINE_PROGRESS_MESSAGE_PLURAL, - base::NumberToString16(status.num_total_jobs)); + base::NumberToString16(status->num_total_jobs)); return CreateProgressNotification( is_sync_operation ? kDriveSyncId : kDrivePinId, GetStringUTF16(IDS_FILE_BROWSER_GRID_VIEW_FILES_TITLE), std::move(message), - static_cast<int>((status.processed / status.total) * 100.0)); + static_cast<int>((status->processed / status->total) * 100.0)); } void SystemNotificationManager::HandleEvent(const Event& event) {
diff --git a/chrome/browser/ash/file_system_provider/operations/abort_unittest.cc b/chrome/browser/ash/file_system_provider/operations/abort_unittest.cc index 1aa1cca..c12b0b5 100644 --- a/chrome/browser/ash/file_system_provider/operations/abort_unittest.cc +++ b/chrome/browser/ash/file_system_provider/operations/abort_unittest.cc
@@ -68,12 +68,11 @@ const base::Value* options_as_value = &event_args[0]; ASSERT_TRUE(options_as_value->is_dict()); - AbortRequestedOptions options; - ASSERT_TRUE( - AbortRequestedOptions::Populate(options_as_value->GetDict(), options)); - EXPECT_EQ(kFileSystemId, options.file_system_id); - EXPECT_EQ(kRequestId, options.request_id); - EXPECT_EQ(kOperationRequestId, options.operation_request_id); + auto options = AbortRequestedOptions::FromValue(options_as_value->GetDict()); + ASSERT_TRUE(options); + EXPECT_EQ(kFileSystemId, options->file_system_id); + EXPECT_EQ(kRequestId, options->request_id); + EXPECT_EQ(kOperationRequestId, options->operation_request_id); } TEST_F(FileSystemProviderOperationsAbortTest, Execute_NoListener) {
diff --git a/chrome/browser/ash/file_system_provider/operations/add_watcher_unittest.cc b/chrome/browser/ash/file_system_provider/operations/add_watcher_unittest.cc index c4860aa..345277d 100644 --- a/chrome/browser/ash/file_system_provider/operations/add_watcher_unittest.cc +++ b/chrome/browser/ash/file_system_provider/operations/add_watcher_unittest.cc
@@ -72,13 +72,13 @@ const base::Value* options_as_value = &event_args[0]; ASSERT_TRUE(options_as_value->is_dict()); - AddWatcherRequestedOptions options; - ASSERT_TRUE(AddWatcherRequestedOptions::Populate(options_as_value->GetDict(), - options)); - EXPECT_EQ(kFileSystemId, options.file_system_id); - EXPECT_EQ(kRequestId, options.request_id); - EXPECT_EQ(kEntryPath, options.entry_path); - EXPECT_TRUE(options.recursive); + auto options = + AddWatcherRequestedOptions::FromValue(options_as_value->GetDict()); + ASSERT_TRUE(options); + EXPECT_EQ(kFileSystemId, options->file_system_id); + EXPECT_EQ(kRequestId, options->request_id); + EXPECT_EQ(kEntryPath, options->entry_path); + EXPECT_TRUE(options->recursive); } TEST_F(FileSystemProviderOperationsAddWatcherTest, Execute_NoListener) {
diff --git a/chrome/browser/ash/file_system_provider/operations/close_file_unittest.cc b/chrome/browser/ash/file_system_provider/operations/close_file_unittest.cc index 0502b6a..1a6ce8d8 100644 --- a/chrome/browser/ash/file_system_provider/operations/close_file_unittest.cc +++ b/chrome/browser/ash/file_system_provider/operations/close_file_unittest.cc
@@ -69,12 +69,12 @@ const base::Value* options_as_value = &event_args[0]; ASSERT_TRUE(options_as_value->is_dict()); - CloseFileRequestedOptions options; - ASSERT_TRUE(CloseFileRequestedOptions::Populate(options_as_value->GetDict(), - options)); - EXPECT_EQ(kFileSystemId, options.file_system_id); - EXPECT_EQ(kRequestId, options.request_id); - EXPECT_EQ(kOpenRequestId, options.open_request_id); + auto options = + CloseFileRequestedOptions::FromValue(options_as_value->GetDict()); + ASSERT_TRUE(options); + EXPECT_EQ(kFileSystemId, options->file_system_id); + EXPECT_EQ(kRequestId, options->request_id); + EXPECT_EQ(kOpenRequestId, options->open_request_id); } TEST_F(FileSystemProviderOperationsCloseFileTest, Execute_NoListener) {
diff --git a/chrome/browser/ash/file_system_provider/operations/configure_unittest.cc b/chrome/browser/ash/file_system_provider/operations/configure_unittest.cc index 95d5251..6fc646e1 100644 --- a/chrome/browser/ash/file_system_provider/operations/configure_unittest.cc +++ b/chrome/browser/ash/file_system_provider/operations/configure_unittest.cc
@@ -68,11 +68,11 @@ const base::Value* options_as_value = &event_args[0]; ASSERT_TRUE(options_as_value->is_dict()); - ConfigureRequestedOptions options; - ASSERT_TRUE(ConfigureRequestedOptions::Populate(options_as_value->GetDict(), - options)); - EXPECT_EQ(kFileSystemId, options.file_system_id); - EXPECT_EQ(kRequestId, options.request_id); + auto options = + ConfigureRequestedOptions::FromValue(options_as_value->GetDict()); + ASSERT_TRUE(options); + EXPECT_EQ(kFileSystemId, options->file_system_id); + EXPECT_EQ(kRequestId, options->request_id); } TEST_F(FileSystemProviderOperationsConfigureTest, Execute_NoListener) {
diff --git a/chrome/browser/ash/file_system_provider/operations/copy_entry_unittest.cc b/chrome/browser/ash/file_system_provider/operations/copy_entry_unittest.cc index c3df49ea..705db17 100644 --- a/chrome/browser/ash/file_system_provider/operations/copy_entry_unittest.cc +++ b/chrome/browser/ash/file_system_provider/operations/copy_entry_unittest.cc
@@ -74,13 +74,13 @@ const base::Value* options_as_value = &event_args[0]; ASSERT_TRUE(options_as_value->is_dict()); - CopyEntryRequestedOptions options; - ASSERT_TRUE(CopyEntryRequestedOptions::Populate(options_as_value->GetDict(), - options)); - EXPECT_EQ(kFileSystemId, options.file_system_id); - EXPECT_EQ(kRequestId, options.request_id); - EXPECT_EQ(kSourcePath, options.source_path); - EXPECT_EQ(kTargetPath, options.target_path); + auto options = + CopyEntryRequestedOptions::FromValue(options_as_value->GetDict()); + ASSERT_TRUE(options); + EXPECT_EQ(kFileSystemId, options->file_system_id); + EXPECT_EQ(kRequestId, options->request_id); + EXPECT_EQ(kSourcePath, options->source_path); + EXPECT_EQ(kTargetPath, options->target_path); } TEST_F(FileSystemProviderOperationsCopyEntryTest, Execute_NoListener) {
diff --git a/chrome/browser/ash/file_system_provider/operations/create_directory_unittest.cc b/chrome/browser/ash/file_system_provider/operations/create_directory_unittest.cc index 4a2232c..8e15b90 100644 --- a/chrome/browser/ash/file_system_provider/operations/create_directory_unittest.cc +++ b/chrome/browser/ash/file_system_provider/operations/create_directory_unittest.cc
@@ -75,13 +75,13 @@ const base::Value* options_as_value = &event_args[0]; ASSERT_TRUE(options_as_value->is_dict()); - CreateDirectoryRequestedOptions options; - ASSERT_TRUE(CreateDirectoryRequestedOptions::Populate( - options_as_value->GetDict(), options)); - EXPECT_EQ(kFileSystemId, options.file_system_id); - EXPECT_EQ(kRequestId, options.request_id); - EXPECT_EQ(kDirectoryPath, options.directory_path); - EXPECT_TRUE(options.recursive); + auto options = + CreateDirectoryRequestedOptions::FromValue(options_as_value->GetDict()); + ASSERT_TRUE(options); + EXPECT_EQ(kFileSystemId, options->file_system_id); + EXPECT_EQ(kRequestId, options->request_id); + EXPECT_EQ(kDirectoryPath, options->directory_path); + EXPECT_TRUE(options->recursive); } TEST_F(FileSystemProviderOperationsCreateDirectoryTest, Execute_NoListener) {
diff --git a/chrome/browser/ash/file_system_provider/operations/create_file_unittest.cc b/chrome/browser/ash/file_system_provider/operations/create_file_unittest.cc index c78bb0e0..22df6be 100644 --- a/chrome/browser/ash/file_system_provider/operations/create_file_unittest.cc +++ b/chrome/browser/ash/file_system_provider/operations/create_file_unittest.cc
@@ -72,12 +72,12 @@ const base::Value* options_as_value = &event_args[0]; ASSERT_TRUE(options_as_value->is_dict()); - CreateFileRequestedOptions options; - ASSERT_TRUE(CreateFileRequestedOptions::Populate(options_as_value->GetDict(), - options)); - EXPECT_EQ(kFileSystemId, options.file_system_id); - EXPECT_EQ(kRequestId, options.request_id); - EXPECT_EQ(kFilePath, options.file_path); + auto options = + CreateFileRequestedOptions::FromValue(options_as_value->GetDict()); + ASSERT_TRUE(options); + EXPECT_EQ(kFileSystemId, options->file_system_id); + EXPECT_EQ(kRequestId, options->request_id); + EXPECT_EQ(kFilePath, options->file_path); } TEST_F(FileSystemProviderOperationsCreateFileTest, Execute_NoListener) {
diff --git a/chrome/browser/ash/file_system_provider/operations/delete_entry_unittest.cc b/chrome/browser/ash/file_system_provider/operations/delete_entry_unittest.cc index 0d5c8950..eed7044 100644 --- a/chrome/browser/ash/file_system_provider/operations/delete_entry_unittest.cc +++ b/chrome/browser/ash/file_system_provider/operations/delete_entry_unittest.cc
@@ -73,13 +73,13 @@ const base::Value* options_as_value = &event_args[0]; ASSERT_TRUE(options_as_value->is_dict()); - DeleteEntryRequestedOptions options; - ASSERT_TRUE(DeleteEntryRequestedOptions::Populate(options_as_value->GetDict(), - options)); - EXPECT_EQ(kFileSystemId, options.file_system_id); - EXPECT_EQ(kRequestId, options.request_id); - EXPECT_EQ(kEntryPath, options.entry_path); - EXPECT_TRUE(options.recursive); + auto options = + DeleteEntryRequestedOptions::FromValue(options_as_value->GetDict()); + ASSERT_TRUE(options); + EXPECT_EQ(kFileSystemId, options->file_system_id); + EXPECT_EQ(kRequestId, options->request_id); + EXPECT_EQ(kEntryPath, options->entry_path); + EXPECT_TRUE(options->recursive); } TEST_F(FileSystemProviderOperationsDeleteEntryTest, Execute_NoListener) {
diff --git a/chrome/browser/ash/file_system_provider/operations/execute_action_unittest.cc b/chrome/browser/ash/file_system_provider/operations/execute_action_unittest.cc index d88221e..9866b641 100644 --- a/chrome/browser/ash/file_system_provider/operations/execute_action_unittest.cc +++ b/chrome/browser/ash/file_system_provider/operations/execute_action_unittest.cc
@@ -78,15 +78,15 @@ const base::Value* options_as_value = &event_args[0]; ASSERT_TRUE(options_as_value->is_dict()); - ExecuteActionRequestedOptions options; - ASSERT_TRUE(ExecuteActionRequestedOptions::Populate( - options_as_value->GetDict(), options)); - EXPECT_EQ(kFileSystemId, options.file_system_id); - EXPECT_EQ(kRequestId, options.request_id); - ASSERT_EQ(entry_paths_.size(), options.entry_paths.size()); - EXPECT_EQ(entry_paths_[0].value(), options.entry_paths[0]); - EXPECT_EQ(entry_paths_[1].value(), options.entry_paths[1]); - EXPECT_EQ(kActionId, options.action_id); + auto options = + ExecuteActionRequestedOptions::FromValue(options_as_value->GetDict()); + ASSERT_TRUE(options); + EXPECT_EQ(kFileSystemId, options->file_system_id); + EXPECT_EQ(kRequestId, options->request_id); + ASSERT_EQ(entry_paths_.size(), options->entry_paths.size()); + EXPECT_EQ(entry_paths_[0].value(), options->entry_paths[0]); + EXPECT_EQ(entry_paths_[1].value(), options->entry_paths[1]); + EXPECT_EQ(kActionId, options->action_id); } TEST_F(FileSystemProviderOperationsExecuteActionTest, Execute_NoListener) {
diff --git a/chrome/browser/ash/file_system_provider/operations/get_actions_unittest.cc b/chrome/browser/ash/file_system_provider/operations/get_actions_unittest.cc index 84ecf2ff..99e9dc43 100644 --- a/chrome/browser/ash/file_system_provider/operations/get_actions_unittest.cc +++ b/chrome/browser/ash/file_system_provider/operations/get_actions_unittest.cc
@@ -133,14 +133,14 @@ const base::Value* options_as_value = &event_args[0]; ASSERT_TRUE(options_as_value->is_dict()); - GetActionsRequestedOptions options; - ASSERT_TRUE(GetActionsRequestedOptions::Populate(options_as_value->GetDict(), - options)); - EXPECT_EQ(kFileSystemId, options.file_system_id); - EXPECT_EQ(kRequestId, options.request_id); - ASSERT_EQ(entry_paths_.size(), options.entry_paths.size()); - EXPECT_EQ(entry_paths_[0].value(), options.entry_paths[0]); - EXPECT_EQ(entry_paths_[1].value(), options.entry_paths[1]); + auto options = + GetActionsRequestedOptions::FromValue(options_as_value->GetDict()); + ASSERT_TRUE(options); + EXPECT_EQ(kFileSystemId, options->file_system_id); + EXPECT_EQ(kRequestId, options->request_id); + ASSERT_EQ(entry_paths_.size(), options->entry_paths.size()); + EXPECT_EQ(entry_paths_[0].value(), options->entry_paths[0]); + EXPECT_EQ(entry_paths_[1].value(), options->entry_paths[1]); } TEST_F(FileSystemProviderOperationsGetActionsTest, Execute_NoListener) {
diff --git a/chrome/browser/ash/file_system_provider/operations/get_metadata_unittest.cc b/chrome/browser/ash/file_system_provider/operations/get_metadata_unittest.cc index bec441f..2728f62 100644 --- a/chrome/browser/ash/file_system_provider/operations/get_metadata_unittest.cc +++ b/chrome/browser/ash/file_system_provider/operations/get_metadata_unittest.cc
@@ -291,13 +291,13 @@ const base::Value* options_as_value = &event_args[0]; ASSERT_TRUE(options_as_value->is_dict()); - GetMetadataRequestedOptions options; - ASSERT_TRUE(GetMetadataRequestedOptions::Populate(options_as_value->GetDict(), - options)); - EXPECT_EQ(kFileSystemId, options.file_system_id); - EXPECT_EQ(kRequestId, options.request_id); - EXPECT_EQ(kDirectoryPath, options.entry_path); - EXPECT_TRUE(options.thumbnail); + auto options = + GetMetadataRequestedOptions::FromValue(options_as_value->GetDict()); + ASSERT_TRUE(options); + EXPECT_EQ(kFileSystemId, options->file_system_id); + EXPECT_EQ(kRequestId, options->request_id); + EXPECT_EQ(kDirectoryPath, options->entry_path); + EXPECT_TRUE(options->thumbnail); } TEST_F(FileSystemProviderOperationsGetMetadataTest, Execute_NoListener) {
diff --git a/chrome/browser/ash/file_system_provider/operations/move_entry_unittest.cc b/chrome/browser/ash/file_system_provider/operations/move_entry_unittest.cc index 6e74e23..56881f7 100644 --- a/chrome/browser/ash/file_system_provider/operations/move_entry_unittest.cc +++ b/chrome/browser/ash/file_system_provider/operations/move_entry_unittest.cc
@@ -74,13 +74,13 @@ const base::Value* options_as_value = &event_args[0]; ASSERT_TRUE(options_as_value->is_dict()); - MoveEntryRequestedOptions options; - ASSERT_TRUE(MoveEntryRequestedOptions::Populate(options_as_value->GetDict(), - options)); - EXPECT_EQ(kFileSystemId, options.file_system_id); - EXPECT_EQ(kRequestId, options.request_id); - EXPECT_EQ(kSourcePath, options.source_path); - EXPECT_EQ(kTargetPath, options.target_path); + auto options = + MoveEntryRequestedOptions::FromValue(options_as_value->GetDict()); + ASSERT_TRUE(options); + EXPECT_EQ(kFileSystemId, options->file_system_id); + EXPECT_EQ(kRequestId, options->request_id); + EXPECT_EQ(kSourcePath, options->source_path); + EXPECT_EQ(kTargetPath, options->target_path); } TEST_F(FileSystemProviderOperationsMoveEntryTest, Execute_NoListener) {
diff --git a/chrome/browser/ash/file_system_provider/operations/open_file_unittest.cc b/chrome/browser/ash/file_system_provider/operations/open_file_unittest.cc index d2262f1..24d9bce6 100644 --- a/chrome/browser/ash/file_system_provider/operations/open_file_unittest.cc +++ b/chrome/browser/ash/file_system_provider/operations/open_file_unittest.cc
@@ -111,14 +111,14 @@ const base::Value* options_as_value = &event_args[0]; ASSERT_TRUE(options_as_value->is_dict()); - OpenFileRequestedOptions options; - ASSERT_TRUE( - OpenFileRequestedOptions::Populate(options_as_value->GetDict(), options)); - EXPECT_EQ(kFileSystemId, options.file_system_id); - EXPECT_EQ(kRequestId, options.request_id); - EXPECT_EQ(kFilePath, options.file_path); + auto options = + OpenFileRequestedOptions::FromValue(options_as_value->GetDict()); + ASSERT_TRUE(options); + EXPECT_EQ(kFileSystemId, options->file_system_id); + EXPECT_EQ(kRequestId, options->request_id); + EXPECT_EQ(kFilePath, options->file_path); EXPECT_EQ(extensions::api::file_system_provider::OpenFileMode::kRead, - options.mode); + options->mode); } TEST_F(FileSystemProviderOperationsOpenFileTest, Execute_NoListener) {
diff --git a/chrome/browser/ash/file_system_provider/operations/read_directory_unittest.cc b/chrome/browser/ash/file_system_provider/operations/read_directory_unittest.cc index 72f02598..eb4517d 100644 --- a/chrome/browser/ash/file_system_provider/operations/read_directory_unittest.cc +++ b/chrome/browser/ash/file_system_provider/operations/read_directory_unittest.cc
@@ -141,12 +141,12 @@ const base::Value* options_as_value = &event_args[0]; ASSERT_TRUE(options_as_value->is_dict()); - ReadDirectoryRequestedOptions options; - ASSERT_TRUE(ReadDirectoryRequestedOptions::Populate( - options_as_value->GetDict(), options)); - EXPECT_EQ(kFileSystemId, options.file_system_id); - EXPECT_EQ(kRequestId, options.request_id); - EXPECT_EQ(kDirectoryPath, options.directory_path); + auto options = + ReadDirectoryRequestedOptions::FromValue(options_as_value->GetDict()); + ASSERT_TRUE(options); + EXPECT_EQ(kFileSystemId, options->file_system_id); + EXPECT_EQ(kRequestId, options->request_id); + EXPECT_EQ(kDirectoryPath, options->directory_path); } TEST_F(FileSystemProviderOperationsReadDirectoryTest, Execute_NoListener) {
diff --git a/chrome/browser/ash/file_system_provider/operations/read_file_unittest.cc b/chrome/browser/ash/file_system_provider/operations/read_file_unittest.cc index 10ef428..5e68893 100644 --- a/chrome/browser/ash/file_system_provider/operations/read_file_unittest.cc +++ b/chrome/browser/ash/file_system_provider/operations/read_file_unittest.cc
@@ -120,14 +120,14 @@ const base::Value* options_as_value = &event_args[0]; ASSERT_TRUE(options_as_value->is_dict()); - ReadFileRequestedOptions options; - ASSERT_TRUE( - ReadFileRequestedOptions::Populate(options_as_value->GetDict(), options)); - EXPECT_EQ(kFileSystemId, options.file_system_id); - EXPECT_EQ(kRequestId, options.request_id); - EXPECT_EQ(kFileHandle, options.open_request_id); - EXPECT_EQ(kOffset, static_cast<double>(options.offset)); - EXPECT_EQ(kLength, options.length); + auto options = + ReadFileRequestedOptions::FromValue(options_as_value->GetDict()); + ASSERT_TRUE(options); + EXPECT_EQ(kFileSystemId, options->file_system_id); + EXPECT_EQ(kRequestId, options->request_id); + EXPECT_EQ(kFileHandle, options->open_request_id); + EXPECT_EQ(kOffset, static_cast<double>(options->offset)); + EXPECT_EQ(kLength, options->length); } TEST_F(FileSystemProviderOperationsReadFileTest, Execute_NoListener) {
diff --git a/chrome/browser/ash/file_system_provider/operations/remove_watcher_unittest.cc b/chrome/browser/ash/file_system_provider/operations/remove_watcher_unittest.cc index 117d648..6ee9ed7 100644 --- a/chrome/browser/ash/file_system_provider/operations/remove_watcher_unittest.cc +++ b/chrome/browser/ash/file_system_provider/operations/remove_watcher_unittest.cc
@@ -72,13 +72,13 @@ const base::Value* options_as_value = &event_args[0]; ASSERT_TRUE(options_as_value->is_dict()); - RemoveWatcherRequestedOptions options; - ASSERT_TRUE(RemoveWatcherRequestedOptions::Populate( - options_as_value->GetDict(), options)); - EXPECT_EQ(kFileSystemId, options.file_system_id); - EXPECT_EQ(kRequestId, options.request_id); - EXPECT_EQ(kEntryPath, options.entry_path); - EXPECT_TRUE(options.recursive); + auto options = + RemoveWatcherRequestedOptions::FromValue(options_as_value->GetDict()); + ASSERT_TRUE(options); + EXPECT_EQ(kFileSystemId, options->file_system_id); + EXPECT_EQ(kRequestId, options->request_id); + EXPECT_EQ(kEntryPath, options->entry_path); + EXPECT_TRUE(options->recursive); } TEST_F(FileSystemProviderOperationsRemoveWatcherTest, Execute_NoListener) {
diff --git a/chrome/browser/ash/file_system_provider/operations/truncate_unittest.cc b/chrome/browser/ash/file_system_provider/operations/truncate_unittest.cc index 59b9d56..6303e4e 100644 --- a/chrome/browser/ash/file_system_provider/operations/truncate_unittest.cc +++ b/chrome/browser/ash/file_system_provider/operations/truncate_unittest.cc
@@ -75,13 +75,13 @@ const base::Value* options_as_value = &event_args[0]; ASSERT_TRUE(options_as_value->is_dict()); - TruncateRequestedOptions options; - ASSERT_TRUE( - TruncateRequestedOptions::Populate(options_as_value->GetDict(), options)); - EXPECT_EQ(kFileSystemId, options.file_system_id); - EXPECT_EQ(kRequestId, options.request_id); - EXPECT_EQ(kFilePath, options.file_path); - EXPECT_EQ(kTruncateLength, static_cast<double>(options.length)); + auto options = + TruncateRequestedOptions::FromValue(options_as_value->GetDict()); + ASSERT_TRUE(options); + EXPECT_EQ(kFileSystemId, options->file_system_id); + EXPECT_EQ(kRequestId, options->request_id); + EXPECT_EQ(kFilePath, options->file_path); + EXPECT_EQ(kTruncateLength, static_cast<double>(options->length)); } TEST_F(FileSystemProviderOperationsTruncateTest, Execute_NoListener) {
diff --git a/chrome/browser/ash/file_system_provider/operations/unmount_unittest.cc b/chrome/browser/ash/file_system_provider/operations/unmount_unittest.cc index 50123f2..82823435 100644 --- a/chrome/browser/ash/file_system_provider/operations/unmount_unittest.cc +++ b/chrome/browser/ash/file_system_provider/operations/unmount_unittest.cc
@@ -67,11 +67,11 @@ const base::Value* options_as_value = &event_args[0]; ASSERT_TRUE(options_as_value->is_dict()); - UnmountRequestedOptions options; - ASSERT_TRUE( - UnmountRequestedOptions::Populate(options_as_value->GetDict(), options)); - EXPECT_EQ(kFileSystemId, options.file_system_id); - EXPECT_EQ(kRequestId, options.request_id); + auto options = + UnmountRequestedOptions::FromValue(options_as_value->GetDict()); + ASSERT_TRUE(options); + EXPECT_EQ(kFileSystemId, options->file_system_id); + EXPECT_EQ(kRequestId, options->request_id); } TEST_F(FileSystemProviderOperationsUnmountTest, Execute_NoListener) {
diff --git a/chrome/browser/ash/file_system_provider/operations/write_file_unittest.cc b/chrome/browser/ash/file_system_provider/operations/write_file_unittest.cc index 39f9f49c..a8fc171 100644 --- a/chrome/browser/ash/file_system_provider/operations/write_file_unittest.cc +++ b/chrome/browser/ash/file_system_provider/operations/write_file_unittest.cc
@@ -77,16 +77,16 @@ const base::Value* options_as_value = &event_args[0]; ASSERT_TRUE(options_as_value->is_dict()); - WriteFileRequestedOptions options; - ASSERT_TRUE(WriteFileRequestedOptions::Populate(options_as_value->GetDict(), - options)); - EXPECT_EQ(kFileSystemId, options.file_system_id); - EXPECT_EQ(kRequestId, options.request_id); - EXPECT_EQ(kFileHandle, options.open_request_id); - EXPECT_EQ(kOffset, static_cast<double>(options.offset)); + auto options = + WriteFileRequestedOptions::FromValue(options_as_value->GetDict()); + ASSERT_TRUE(options); + EXPECT_EQ(kFileSystemId, options->file_system_id); + EXPECT_EQ(kRequestId, options->request_id); + EXPECT_EQ(kFileHandle, options->open_request_id); + EXPECT_EQ(kOffset, static_cast<double>(options->offset)); std::string write_data(kWriteData); EXPECT_EQ(std::vector<uint8_t>(write_data.begin(), write_data.end()), - options.data); + options->data); } TEST_F(FileSystemProviderOperationsWriteFileTest, Execute_NoListener) {
diff --git a/chrome/browser/autofill/autofill_interactive_uitest.cc b/chrome/browser/autofill/autofill_interactive_uitest.cc index af8af3a..292f97d7 100644 --- a/chrome/browser/autofill/autofill_interactive_uitest.cc +++ b/chrome/browser/autofill/autofill_interactive_uitest.cc
@@ -536,8 +536,7 @@ // "fr" instead of "en"). feature_list_.InitWithFeatures( /*enabled_features=*/ - {blink::features::kAutofillShadowDOM, - features::kAutofillTextAreaChangeEvents}, + {features::kAutofillTextAreaChangeEvents}, /*disabled_features=*/{features::kAutofillPageLanguageDetection}); } ~AutofillInteractiveTestBase() override = default;
diff --git a/chrome/browser/back_press/android/java/src/org/chromium/chrome/browser/back_press/BackPressManager.java b/chrome/browser/back_press/android/java/src/org/chromium/chrome/browser/back_press/BackPressManager.java index a5dee92..364666f 100644 --- a/chrome/browser/back_press/android/java/src/org/chromium/chrome/browser/back_press/BackPressManager.java +++ b/chrome/browser/back_press/android/java/src/org/chromium/chrome/browser/back_press/BackPressManager.java
@@ -43,7 +43,7 @@ private static final SparseIntArray sMetricsMap; private static final int sMetricsMaxValue; static { - // Max value is 21 - 1 obsolete value +1 for 0 indexing = 20 elements. + // Max value is 22 - 1 obsolete value +1 for 0 indexing = 21 elements. SparseIntArray map = new SparseIntArray(20); map.put(Type.TEXT_BUBBLE, 0); map.put(Type.VR_DELEGATE, 1); @@ -68,8 +68,9 @@ // handling logic. map.put(Type.PAGE_INSIGHTS_BOTTOM_SHEET, 19); map.put(Type.BOTTOM_CONTROLS, 20); - sMetricsMaxValue = 21; + map.put(Type.HUB, 21); // Add new one here and update array size. + sMetricsMaxValue = 22; sMetricsMap = map; }
diff --git a/chrome/browser/captive_portal/captive_portal_browsertest.cc b/chrome/browser/captive_portal/captive_portal_browsertest.cc index 381c23f..da82625 100644 --- a/chrome/browser/captive_portal/captive_portal_browsertest.cc +++ b/chrome/browser/captive_portal/captive_portal_browsertest.cc
@@ -61,10 +61,6 @@ #include "content/public/browser/browser_thread.h" #include "content/public/browser/navigation_controller.h" #include "content/public/browser/navigation_entry.h" -#include "content/public/browser/notification_observer.h" -#include "content/public/browser/notification_registrar.h" -#include "content/public/browser/notification_service.h" -#include "content/public/browser/notification_types.h" #include "content/public/browser/render_frame_host.h" #include "content/public/browser/storage_partition.h" #include "content/public/browser/web_contents.h" @@ -91,6 +87,7 @@ using captive_portal::CaptivePortalResult; using content::BrowserThread; using content::WebContents; +using content::WebContentsObserver; namespace { @@ -191,10 +188,38 @@ ->IsLoginTab(); } +// Watch for `DidStopLoading` for one WebContents. +struct LoadObserver : public WebContentsObserver { + public: + class Observer { + public: + virtual ~Observer() = default; + virtual void OnWebContentsDestroyed(WebContents*) = 0; + virtual void OnDidStopLoading(WebContents*) = 0; + }; + + LoadObserver(Observer* observer, WebContents* web_contents) + : WebContentsObserver(web_contents), observer_(observer) {} + + // WebContentsObserver + void WebContentsDestroyed() override { + observer_->OnWebContentsDestroyed(web_contents()); + } + + void DidStopLoading() override { + observer_->OnDidStopLoading(web_contents()); + } + + private: + raw_ptr<Observer> observer_ = nullptr; +}; + // Tracks how many times each tab has been navigated since the Observer was // created. The standard TestNavigationObserver can only watch specific // pre-existing tabs or loads in serial for all tabs. -class MultiNavigationObserver : public content::NotificationObserver { +class MultiNavigationObserver : public TabStripModelObserver, + public BrowserListObserver, + public LoadObserver::Observer { public: MultiNavigationObserver(); @@ -216,39 +241,107 @@ int num_navigations() const { return num_navigations_; } private: - typedef std::map<const WebContents*, int> TabNavigationMap; + // LoadObserver::Observer; + void OnWebContentsDestroyed(WebContents* web_contents) override; + void OnDidStopLoading(WebContents* web_contents) override; - // content::NotificationObserver: - void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + // Record for every tab we're watching. + struct TabNavigationMapEntry { + std::unique_ptr<LoadObserver> load_observer; + int stop_loading_count = 0; + }; + using TabNavigationMap = std::map<const WebContents*, TabNavigationMapEntry>; - int num_navigations_; + // Add all tabs from `browser`, and start watching for changes. + void AddBrowser(Browser* browser); + + // TabStripModelObserver: + void OnTabStripModelChanged( + TabStripModel* tab_strip_model, + const TabStripModelChange& change, + const TabStripSelectionChange& selection) override; + + // BrowserListObserver + void OnBrowserAdded(Browser* browser) override { AddBrowser(browser); } + + // Total number of `DidStopLoading` calls. Might not match the sum of the + // individual loading events in `tab_navigation_map_` if entries have been + // deleted there. + int num_navigations_ = 0; // Map of how many times each tab has navigated since |this| was created. TabNavigationMap tab_navigation_map_; // Total number of navigations to wait for. Value only matters when // |waiting_for_navigation_| is true. - int num_navigations_to_wait_for_; + int num_navigations_to_wait_for_ = 0; // True if WaitForNavigations has been called, until // |num_navigations_to_wait_for_| have been observed. - bool waiting_for_navigation_; + bool waiting_for_navigation_ = false; std::unique_ptr<base::RunLoop> run_loop_; - - content::NotificationRegistrar registrar_; }; -MultiNavigationObserver::MultiNavigationObserver() - : num_navigations_(0), - num_navigations_to_wait_for_(0), - waiting_for_navigation_(false) { - registrar_.Add(this, content::NOTIFICATION_LOAD_STOP, - content::NotificationService::AllSources()); +MultiNavigationObserver::MultiNavigationObserver() { + // Watch all browsers. + for (Browser* browser : *BrowserList::GetInstance()) { + AddBrowser(browser); + } + BrowserList::GetInstance()->AddObserver(this); } MultiNavigationObserver::~MultiNavigationObserver() { + BrowserList::GetInstance()->RemoveObserver(this); + // We're tracking all browsers, so remove us from all of all of them. + for (Browser* browser : *BrowserList::GetInstance()) { + browser->tab_strip_model()->RemoveObserver(this); + } +} + +void MultiNavigationObserver::AddBrowser(Browser* browser) { + browser->tab_strip_model()->AddObserver(this); + + // Add all the tabs. + for (int index = 0; index < browser->tab_strip_model()->count(); index++) { + auto* web_contents = browser->tab_strip_model()->GetWebContentsAt(index); + tab_navigation_map_[web_contents].load_observer = + std::make_unique<LoadObserver>(this, web_contents); + } +} + +void MultiNavigationObserver::OnTabStripModelChanged( + TabStripModel* tab_strip_model, + const TabStripModelChange& change, + const TabStripSelectionChange& selection) { + if (change.type() != TabStripModelChange::kInserted) { + return; + } + + auto* web_contents = change.GetInsert()->contents[0].contents.get(); + tab_navigation_map_[web_contents].load_observer = + std::make_unique<LoadObserver>(this, web_contents); +} + +void MultiNavigationObserver::OnWebContentsDestroyed( + WebContents* web_contents) { + auto iter = tab_navigation_map_.find(web_contents); + CHECK(iter != tab_navigation_map_.end()); + tab_navigation_map_.erase(iter); +} + +void MultiNavigationObserver::OnDidStopLoading(WebContents* web_contents) { + auto iter = tab_navigation_map_.find(web_contents); + CHECK(iter != tab_navigation_map_.end()); + ++(iter->second.stop_loading_count); + ++num_navigations_; + + if (waiting_for_navigation_ && + num_navigations_to_wait_for_ == num_navigations_) { + waiting_for_navigation_ = false; + if (run_loop_) { + run_loop_->Quit(); + } + } } void MultiNavigationObserver::WaitForNavigations( @@ -271,24 +364,7 @@ auto tab_navigations = tab_navigation_map_.find(web_contents); if (tab_navigations == tab_navigation_map_.end()) return 0; - return tab_navigations->second; -} - -void MultiNavigationObserver::Observe( - int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) { - ASSERT_EQ(type, content::NOTIFICATION_LOAD_STOP); - content::NavigationController* controller = - content::Source<content::NavigationController>(source).ptr(); - ++num_navigations_; - ++tab_navigation_map_[controller->DeprecatedGetWebContents()]; - if (waiting_for_navigation_ && - num_navigations_to_wait_for_ == num_navigations_) { - waiting_for_navigation_ = false; - if (run_loop_) - run_loop_->Quit(); - } + return tab_navigations->second.stop_loading_count; } // This observer creates a list of loading tabs, and then waits for them all @@ -297,9 +373,9 @@ // This is for the specific purpose of observing tabs time out after logging in // to a captive portal, which will then cause them to reload. // MultiNavigationObserver is insufficient for this because there may or may not -// be a LOAD_STOP event between the timeout and the reload. +// be a DidStopLoading event between the timeout and the reload. // See bug http://crbug.com/133227 -class FailLoadsAfterLoginObserver : public content::NotificationObserver { +class FailLoadsAfterLoginObserver : public LoadObserver::Observer { public: FailLoadsAfterLoginObserver(); @@ -311,18 +387,20 @@ void WaitForNavigations(); - private: - typedef std::set<const WebContents*> TabSet; + // LoadObserver::Observer; + void OnWebContentsDestroyed(WebContents* web_contents) override {} + void OnDidStopLoading(WebContents* web_contents) override; - // content::NotificationObserver: - void Observe(int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) override; + private: + typedef std::set<WebContents*> TabSet; // The set of tabs that need to be navigated. This is the set of loading // tabs when the observer is created. TabSet tabs_needing_navigation_; + // Observers for each tab we're watching. + std::vector<std::unique_ptr<LoadObserver>> load_observers_; + // Number of tabs that have stopped navigating with the expected title. These // are expected not to be navigated again. TabSet tabs_navigated_to_final_destination_; @@ -331,22 +409,21 @@ // |tabs_navigated_to_final_destination_| equals |tabs_needing_navigation_|. bool waiting_for_navigation_; std::unique_ptr<base::RunLoop> run_loop_; - - content::NotificationRegistrar registrar_; }; FailLoadsAfterLoginObserver::FailLoadsAfterLoginObserver() : waiting_for_navigation_(false) { - registrar_.Add(this, content::NOTIFICATION_LOAD_STOP, - content::NotificationService::AllSources()); base::ranges::copy_if( AllTabContentses(), std::inserter(tabs_needing_navigation_, tabs_needing_navigation_.end()), &content::WebContents::IsLoading); + // Add an observer for each tab. + for (auto* contents : tabs_needing_navigation_) { + load_observers_.push_back(std::make_unique<LoadObserver>(this, contents)); + } } -FailLoadsAfterLoginObserver::~FailLoadsAfterLoginObserver() { -} +FailLoadsAfterLoginObserver::~FailLoadsAfterLoginObserver() = default; void FailLoadsAfterLoginObserver::WaitForNavigations() { // Shouldn't already be waiting for navigations. @@ -362,15 +439,7 @@ tabs_navigated_to_final_destination_.size()); } -void FailLoadsAfterLoginObserver::Observe( - int type, - const content::NotificationSource& source, - const content::NotificationDetails& details) { - ASSERT_EQ(type, content::NOTIFICATION_LOAD_STOP); - content::NavigationController* controller = - content::Source<content::NavigationController>(source).ptr(); - WebContents* contents = controller->DeprecatedGetWebContents(); - +void FailLoadsAfterLoginObserver::OnDidStopLoading(WebContents* contents) { ASSERT_EQ(1u, tabs_needing_navigation_.count(contents)); ASSERT_EQ(0u, tabs_navigated_to_final_destination_.count(contents));
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc index 8bac01d3..3a82aa4 100644 --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc
@@ -83,6 +83,7 @@ #include "chrome/browser/lifetime/browser_shutdown.h" #include "chrome/browser/lookalikes/lookalike_url_navigation_throttle.h" #include "chrome/browser/media/audio_service_util.h" +#include "chrome/browser/media/prefs/capture_device_ranking.h" #include "chrome/browser/media/router/media_router_feature.h" #include "chrome/browser/media/webrtc/audio_debug_recordings_handler.h" #include "chrome/browser/media/webrtc/capture_policy_utils.h" @@ -289,6 +290,7 @@ #include "components/subresource_filter/content/browser/content_subresource_filter_throttle_manager.h" #include "components/supervised_user/core/common/buildflags.h" #include "components/translate/core/common/translate_switches.h" +#include "components/user_prefs/user_prefs.h" #include "components/variations/variations_associated_data.h" #include "components/variations/variations_switches.h" #include "components/webapps/common/web_app_id.h" @@ -8242,3 +8244,25 @@ std::move(video_effects_manager)); } #endif // !BUILDFLAG(IS_ANDROID) + +void ChromeContentBrowserClient::PreferenceRankAudioDeviceInfos( + content::BrowserContext* browser_context, + blink::WebMediaDeviceInfoArray& infos) { + if (!user_prefs::UserPrefs::IsInitialized(browser_context)) { + return; + } + auto* prefs = user_prefs::UserPrefs::Get(browser_context); + CHECK(prefs); + media_prefs::PreferenceRankAudioDeviceInfos(*prefs, infos); +} + +void ChromeContentBrowserClient::PreferenceRankVideoDeviceInfos( + content::BrowserContext* browser_context, + blink::WebMediaDeviceInfoArray& infos) { + if (!user_prefs::UserPrefs::IsInitialized(browser_context)) { + return; + } + auto* prefs = user_prefs::UserPrefs::Get(browser_context); + CHECK(prefs); + media_prefs::PreferenceRankVideoDeviceInfos(*prefs, infos); +}
diff --git a/chrome/browser/chrome_content_browser_client.h b/chrome/browser/chrome_content_browser_client.h index 934cb66..ba5de10 100644 --- a/chrome/browser/chrome_content_browser_client.h +++ b/chrome/browser/chrome_content_browser_client.h
@@ -965,6 +965,13 @@ video_effects_manager) override; #endif // !BUILDFLAG(IS_ANDROID) + void PreferenceRankAudioDeviceInfos( + content::BrowserContext* browser_context, + blink::WebMediaDeviceInfoArray& infos) override; + void PreferenceRankVideoDeviceInfos( + content::BrowserContext* browser_context, + blink::WebMediaDeviceInfoArray& infos) override; + protected: static bool HandleWebUI(GURL* url, content::BrowserContext* browser_context); static bool HandleWebUIReverse(GURL* url,
diff --git a/chrome/browser/chrome_content_browser_client_unittest.cc b/chrome/browser/chrome_content_browser_client_unittest.cc index 6eafb9f8..b116e96 100644 --- a/chrome/browser/chrome_content_browser_client_unittest.cc +++ b/chrome/browser/chrome_content_browser_client_unittest.cc
@@ -29,6 +29,7 @@ #include "chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.h" #include "chrome/browser/captive_portal/captive_portal_service_factory.h" #include "chrome/browser/enterprise/reporting/prefs.h" +#include "chrome/browser/media/prefs/capture_device_ranking.h" #include "chrome/browser/search_engines/template_url_service_factory.h" #include "chrome/browser/web_applications/web_app_helpers.h" #include "chrome/browser/webauthn/webauthn_pref_names.h" @@ -656,6 +657,52 @@ } #endif // !BUILDFLAG(IS_ANDROID) +TEST_F(ChromeContentBrowserClientTest, PreferenceRankAudioDeviceInfos) { + blink::WebMediaDeviceInfoArray infos{ + {/*device_id=*/"0", /*label=*/"0", /*group_id=*/"0"}, + {/*device_id=*/"1", /*label=*/"1", /*group_id=*/"1"}, + }; + + // Initialize the ranking with device 1 being preferred. + TestingProfile profile_with_prefs; + media_prefs::UpdateAudioDevicePreferenceRanking( + *profile_with_prefs.GetPrefs(), infos.begin() + 1, infos); + + TestChromeContentBrowserClient test_content_browser_client; + blink::WebMediaDeviceInfoArray expected_infos{ + infos.back(), // device_id=1 + infos.front(), // device_id=0 + }; + test_content_browser_client.PreferenceRankAudioDeviceInfos( + &profile_with_prefs, infos); + EXPECT_EQ(infos, expected_infos); +} + +TEST_F(ChromeContentBrowserClientTest, PreferenceRankVideoDeviceInfos) { + blink::WebMediaDeviceInfoArray infos{ + blink::WebMediaDeviceInfo{ + media::VideoCaptureDeviceDescriptor{/*display_name=*/"0", + /*device_id=*/"0"}}, + blink::WebMediaDeviceInfo{ + media::VideoCaptureDeviceDescriptor{/*display_name=*/"1", + /*device_id=*/"1"}}, + }; + + // Initialize the ranking with device 1 being preferred. + TestingProfile profile_with_prefs; + media_prefs::UpdateVideoDevicePreferenceRanking( + *profile_with_prefs.GetPrefs(), infos.begin() + 1, infos); + + TestChromeContentBrowserClient test_content_browser_client; + blink::WebMediaDeviceInfoArray expected_infos{ + infos.back(), // device_id=1 + infos.front(), // device_id=0 + }; + test_content_browser_client.PreferenceRankVideoDeviceInfos( + &profile_with_prefs, infos); + EXPECT_EQ(infos, expected_infos); +} + #if BUILDFLAG(IS_CHROMEOS) class ChromeContentSettingsRedirectTest : public ChromeContentBrowserClientTest {
diff --git a/chrome/browser/chromeos/enterprise/incognito_navigation_throttle_browsertest.cc b/chrome/browser/chromeos/enterprise/incognito_navigation_throttle_browsertest.cc index f0e2c52..0fb68a574 100644 --- a/chrome/browser/chromeos/enterprise/incognito_navigation_throttle_browsertest.cc +++ b/chrome/browser/chromeos/enterprise/incognito_navigation_throttle_browsertest.cc
@@ -14,7 +14,7 @@ #include "chrome/browser/extensions/extension_browsertest.h" #include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/extension_util.h" -#include "chrome/browser/extensions/navigation_observer.h" +#include "chrome/browser/extensions/navigation_extension_enabler.h" #include "chrome/browser/sync/test/integration/extensions_helper.h" #include "chrome/common/url_constants.h" #include "chrome/test/base/ui_test_utils.h"
diff --git a/chrome/browser/chromeos/extensions/printing_metrics/printing_metrics_api.cc b/chrome/browser/chromeos/extensions/printing_metrics/printing_metrics_api.cc index 3c950b4..23c6eaf2 100644 --- a/chrome/browser/chromeos/extensions/printing_metrics/printing_metrics_api.cc +++ b/chrome/browser/chromeos/extensions/printing_metrics/printing_metrics_api.cc
@@ -36,7 +36,7 @@ absl::optional<api::printing_metrics::PrintJobInfo> print_job_info = api::printing_metrics::PrintJobInfo::FromValue(print_job); DCHECK(print_job_info); - print_job_infos.emplace_back(std::move(*print_job_info)); + print_job_infos.emplace_back(std::move(print_job_info).value()); } Respond(ArgumentList( api::printing_metrics::GetPrintJobs::Results::Create(print_job_infos)));
diff --git a/chrome/browser/chromeos/extensions/printing_metrics/printing_metrics_api_unittest.cc b/chrome/browser/chromeos/extensions/printing_metrics/printing_metrics_api_unittest.cc index 1ea09c3..96254cfd 100644 --- a/chrome/browser/chromeos/extensions/printing_metrics/printing_metrics_api_unittest.cc +++ b/chrome/browser/chromeos/extensions/printing_metrics/printing_metrics_api_unittest.cc
@@ -135,22 +135,18 @@ ASSERT_TRUE(result); ASSERT_TRUE(result->is_list()); ASSERT_EQ(1u, result->GetList().size()); - std::unique_ptr<api::printing_metrics::PrintJobInfo> print_job_info = - api::printing_metrics::PrintJobInfo::FromValueDeprecated( - result->GetList()[0]); + absl::optional<api::printing_metrics::PrintJobInfo> print_job_info = + api::printing_metrics::PrintJobInfo::FromValue(result->GetList()[0]); + ASSERT_TRUE(print_job_info.has_value()); EXPECT_THAT( print_job_info, - testing::AllOf( - testing::NotNull(), - testing::Pointee(testing::AllOf( - testing::Field(&api::printing_metrics::PrintJobInfo::title, - kTitle1), - testing::Field(&api::printing_metrics::PrintJobInfo::status, - api::printing_metrics::PrintJobStatus::kFailed), - testing::Field( - &api::printing_metrics::PrintJobInfo::number_of_pages, - kPagesNumber))))); + testing::AllOf(testing::Optional(testing::AllOf( + testing::Field(&api::printing_metrics::PrintJobInfo::title, kTitle1), + testing::Field(&api::printing_metrics::PrintJobInfo::status, + api::printing_metrics::PrintJobStatus::kFailed), + testing::Field(&api::printing_metrics::PrintJobInfo::number_of_pages, + kPagesNumber))))); } // Test that calling |printingMetrics.getPrintJobs()| returns both mock print @@ -164,15 +160,13 @@ ASSERT_TRUE(result); ASSERT_TRUE(result->is_list()); ASSERT_EQ(2u, result->GetList().size()); - std::unique_ptr<api::printing_metrics::PrintJobInfo> print_job_info1 = - api::printing_metrics::PrintJobInfo::FromValueDeprecated( - result->GetList()[0]); - EXPECT_TRUE(print_job_info1); + absl::optional<api::printing_metrics::PrintJobInfo> print_job_info1 = + api::printing_metrics::PrintJobInfo::FromValue(result->GetList()[0]); + ASSERT_TRUE(print_job_info1.has_value()); EXPECT_EQ(kTitle1, print_job_info1->title); - std::unique_ptr<api::printing_metrics::PrintJobInfo> print_job_info2 = - api::printing_metrics::PrintJobInfo::FromValueDeprecated( - result->GetList()[1]); - EXPECT_TRUE(print_job_info2); + absl::optional<api::printing_metrics::PrintJobInfo> print_job_info2 = + api::printing_metrics::PrintJobInfo::FromValue(result->GetList()[1]); + ASSERT_TRUE(print_job_info2.has_value()); EXPECT_EQ(kTitle2, print_job_info2->title); }
diff --git a/chrome/browser/chromeos/extensions/printing_metrics/printing_metrics_service.cc b/chrome/browser/chromeos/extensions/printing_metrics/printing_metrics_service.cc index beebe1a..1be93ec 100644 --- a/chrome/browser/chromeos/extensions/printing_metrics/printing_metrics_service.cc +++ b/chrome/browser/chromeos/extensions/printing_metrics/printing_metrics_service.cc
@@ -112,13 +112,13 @@ void PrintingMetricsService::OnPrintJobFinished(base::Value print_job) { absl::optional<api::printing_metrics::PrintJobInfo> print_job_info = api::printing_metrics::PrintJobInfo::FromValue(std::move(print_job)); - DCHECK(print_job_info); + DCHECK(print_job_info.has_value()); auto event = std::make_unique<Event>( events::PRINTING_METRICS_ON_PRINT_JOB_FINISHED, api::printing_metrics::OnPrintJobFinished::kEventName, api::printing_metrics::OnPrintJobFinished::Create( - std::move(*print_job_info))); + std::move(print_job_info).value())); EventRouter::Get(context_)->BroadcastEvent(std::move(event)); }
diff --git a/chrome/browser/chromeos/policy/dlp/dlp_notification_helper.cc b/chrome/browser/chromeos/policy/dlp/dlp_notification_helper.cc index ef1b7dda..d95f61c 100644 --- a/chrome/browser/chromeos/policy/dlp/dlp_notification_helper.cc +++ b/chrome/browser/chromeos/policy/dlp/dlp_notification_helper.cc
@@ -12,6 +12,7 @@ #include "components/strings/grit/components_strings.h" #include "components/vector_icons/vector_icons.h" #include "ui/base/l10n/l10n_util.h" +#include "ui/color/color_id.h" #include "ui/gfx/geometry/insets.h" #include "ui/message_center/public/cpp/notification.h" #include "ui/message_center/public/cpp/notification_types.h" @@ -86,7 +87,7 @@ base::MakeRefCounted<message_center::HandleNotificationClickDelegate>( base::BindRepeating(&OnNotificationClicked, id))); // Set critical warning color. - notification.set_accent_color(gfx::kGoogleRed700); + notification.set_accent_color_id(ui::kColorSysError); #if BUILDFLAG(IS_CHROMEOS_ASH) notification.set_system_notification_warning_level( message_center::SystemNotificationWarningLevel::CRITICAL_WARNING);
diff --git a/chrome/browser/component_updater/commerce_heuristics_component_installer.cc b/chrome/browser/component_updater/commerce_heuristics_component_installer.cc index 3883fce..f3f40a7 100644 --- a/chrome/browser/component_updater/commerce_heuristics_component_installer.cc +++ b/chrome/browser/component_updater/commerce_heuristics_component_installer.cc
@@ -22,7 +22,6 @@ #include "chrome/browser/new_tab_page/new_tab_page_util.h" #include "components/search/ntp_features.h" #else -#include "chrome/browser/fast_checkout/fast_checkout_features.h" #include "components/commerce/core/commerce_feature_list.h" #endif @@ -189,11 +188,9 @@ void RegisterCommerceHeuristicsComponent( component_updater::ComponentUpdateService* cus) { #if !BUILDFLAG(IS_ANDROID) - if (IsCartModuleEnabled()) { -#else - if (base::FeatureList::IsEnabled(commerce::kCommerceHintAndroid) || - base::FeatureList::IsEnabled(features::kFastCheckout)) { + if (IsCartModuleEnabled()) #endif + { VLOG(1) << "Registering Commerce Heuristics component."; auto installer = base::MakeRefCounted<ComponentInstaller>( std::make_unique<CommerceHeuristicsInstallerPolicy>());
diff --git a/chrome/browser/download/bubble/download_bubble_ui_controller.cc b/chrome/browser/download/bubble/download_bubble_ui_controller.cc index 290f512..53bf144 100644 --- a/chrome/browser/download/bubble/download_bubble_ui_controller.cc +++ b/chrome/browser/download/bubble/download_bubble_ui_controller.cc
@@ -295,6 +295,13 @@ DownloadItemWarningData::WarningAction::PROCEED_DEEP_SCAN); commands.ExecuteCommand(command); break; + case DownloadCommands::LEARN_MORE_SCANNING: + case DownloadCommands::LEARN_MORE_DOWNLOAD_BLOCKED: + DownloadItemWarningData::AddWarningActionEvent( + model->GetDownloadItem(), warning_surface, + DownloadItemWarningData::WarningAction::OPEN_LEARN_MORE_LINK); + commands.ExecuteCommand(command); + break; case DownloadCommands::DEEP_SCAN: case DownloadCommands::RESUME: case DownloadCommands::PAUSE: @@ -302,8 +309,6 @@ case DownloadCommands::SHOW_IN_FOLDER: case DownloadCommands::ALWAYS_OPEN_TYPE: case DownloadCommands::CANCEL_DEEP_SCAN: - case DownloadCommands::LEARN_MORE_SCANNING: - case DownloadCommands::LEARN_MORE_DOWNLOAD_BLOCKED: case DownloadCommands::OPEN_SAFE_BROWSING_SETTING: commands.ExecuteCommand(command); break;
diff --git a/chrome/browser/download/download_item_warning_data.cc b/chrome/browser/download/download_item_warning_data.cc index 0264607..274bdae 100644 --- a/chrome/browser/download/download_item_warning_data.cc +++ b/chrome/browser/download/download_item_warning_data.cc
@@ -230,13 +230,17 @@ action.set_action( ClientSafeBrowsingReportRequest::DownloadWarningAction::OPEN_SUBPAGE); break; - case DownloadItemWarningData::WarningAction::SHOWN: - NOTREACHED(); - break; case DownloadItemWarningData::WarningAction::PROCEED_DEEP_SCAN: action.set_action(ClientSafeBrowsingReportRequest::DownloadWarningAction:: PROCEED_DEEP_SCAN); break; + case DownloadItemWarningData::WarningAction::OPEN_LEARN_MORE_LINK: + action.set_action(ClientSafeBrowsingReportRequest::DownloadWarningAction:: + OPEN_LEARN_MORE_LINK); + break; + case DownloadItemWarningData::WarningAction::SHOWN: + NOTREACHED(); + break; } action.set_is_terminal_action(event.is_terminal_action); action.set_interval_msec(event.action_latency_msec);
diff --git a/chrome/browser/download/download_item_warning_data.h b/chrome/browser/download/download_item_warning_data.h index fee7f4e..6c8facff9f 100644 --- a/chrome/browser/download/download_item_warning_data.h +++ b/chrome/browser/download/download_item_warning_data.h
@@ -28,7 +28,7 @@ // Applicable actions: DISCARD, OPEN_SUBPAGE BUBBLE_MAINPAGE = 1, // Applicable actions: PROCEED, DISCARD, DISMISS, CLOSE, BACK, - // PROCEED_DEEP_SCAN + // PROCEED_DEEP_SCAN, OPEN_LEARN_MORE_LINK BUBBLE_SUBPAGE = 2, // Applicable actions: DISCARD, KEEP DOWNLOADS_PAGE = 3, @@ -67,7 +67,9 @@ OPEN_SUBPAGE = 8, // The user clicks proceed on a prompt for deep scanning. PROCEED_DEEP_SCAN = 9, - kMaxValue = PROCEED_DEEP_SCAN + // The user clicks the learn more link on the bubble subpage. + OPEN_LEARN_MORE_LINK = 10, + kMaxValue = OPEN_LEARN_MORE_LINK }; struct WarningActionEvent {
diff --git a/chrome/browser/extensions/BUILD.gn b/chrome/browser/extensions/BUILD.gn index 8084b63..ee2f1bd 100644 --- a/chrome/browser/extensions/BUILD.gn +++ b/chrome/browser/extensions/BUILD.gn
@@ -645,8 +645,8 @@ "menu_manager.h", "menu_manager_factory.cc", "menu_manager_factory.h", - "navigation_observer.cc", - "navigation_observer.h", + "navigation_extension_enabler.cc", + "navigation_extension_enabler.h", "omaha_attributes_handler.cc", "omaha_attributes_handler.h", "pack_extension_job.cc",
diff --git a/chrome/browser/extensions/navigation_observer.cc b/chrome/browser/extensions/navigation_extension_enabler.cc similarity index 81% rename from chrome/browser/extensions/navigation_observer.cc rename to chrome/browser/extensions/navigation_extension_enabler.cc index 99340615..56ad0e0 100644 --- a/chrome/browser/extensions/navigation_observer.cc +++ b/chrome/browser/extensions/navigation_extension_enabler.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 "chrome/browser/extensions/navigation_observer.h" +#include "chrome/browser/extensions/navigation_extension_enabler.h" #include <memory> @@ -15,24 +15,27 @@ namespace extensions { -NavigationObserver::NavigationObserver(content::WebContents* web_contents) +NavigationExtensionEnabler::NavigationExtensionEnabler( + content::WebContents* web_contents) : content::WebContentsObserver(web_contents), - content::WebContentsUserData<NavigationObserver>(*web_contents) { + content::WebContentsUserData<NavigationExtensionEnabler>(*web_contents) { extension_registry_observation_.Observe( ExtensionRegistry::Get(web_contents->GetBrowserContext())); } -NavigationObserver::~NavigationObserver() = default; +NavigationExtensionEnabler::~NavigationExtensionEnabler() = default; -void NavigationObserver::NavigationEntryCommitted( +void NavigationExtensionEnabler::NavigationEntryCommitted( const content::LoadCommittedDetails& load_details) { PromptToEnableExtensionIfNecessary(load_details.entry->GetURL()); } -void NavigationObserver::PromptToEnableExtensionIfNecessary(const GURL& url) { +void NavigationExtensionEnabler::PromptToEnableExtensionIfNecessary( + const GURL& url) { // Bail out if we're already running a prompt. - if (!in_progress_prompt_extension_id_.empty()) + if (!in_progress_prompt_extension_id_.empty()) { return; + } // NOTE: We only consider chrome-extension:// urls, and deliberately don't // consider hosted app urls. This is because it's really annoying to visit the @@ -42,15 +45,17 @@ // the item enabled, we won't show anything. // TODO(devlin): While true, I still wonder how useful this is. We should get // metrics. - if (!url.SchemeIs(kExtensionScheme)) + if (!url.SchemeIs(kExtensionScheme)) { return; + } const Extension* extension = ExtensionRegistry::Get(web_contents()->GetBrowserContext()) ->disabled_extensions() .GetExtensionOrAppByURL(url); - if (!extension) + if (!extension) { return; + } ExtensionPrefs* extension_prefs = ExtensionPrefs::Get(web_contents()->GetBrowserContext()); @@ -70,22 +75,23 @@ ExtensionInstallPrompt::GetReEnablePromptTypeForExtension( web_contents()->GetBrowserContext(), extension); extension_install_prompt_->ShowDialog( - base::BindRepeating(&NavigationObserver::OnInstallPromptDone, + base::BindRepeating(&NavigationExtensionEnabler::OnInstallPromptDone, weak_factory_.GetWeakPtr()), extension, nullptr, std::make_unique<ExtensionInstallPrompt::Prompt>(type), ExtensionInstallPrompt::GetDefaultShowDialogCallback()); } -void NavigationObserver::OnInstallPromptDone( +void NavigationExtensionEnabler::OnInstallPromptDone( ExtensionInstallPrompt::DoneCallbackPayload payload) { // This dialog doesn't support the "withhold permissions" checkbox. DCHECK_NE(payload.result, ExtensionInstallPrompt::Result::ACCEPTED_WITH_WITHHELD_PERMISSIONS); // The extension was already uninstalled. - if (in_progress_prompt_extension_id_.empty()) + if (in_progress_prompt_extension_id_.empty()) { return; + } ExtensionRegistry* extension_registry = ExtensionRegistry::Get(web_contents()->GetBrowserContext()); @@ -106,7 +112,7 @@ extension_install_prompt_.reset(); } -void NavigationObserver::OnExtensionUninstalled( +void NavigationExtensionEnabler::OnExtensionUninstalled( content::BrowserContext* browser_context, const Extension* extension, UninstallReason reason) { @@ -119,6 +125,6 @@ extension_install_prompt_.reset(); } -WEB_CONTENTS_USER_DATA_KEY_IMPL(NavigationObserver); +WEB_CONTENTS_USER_DATA_KEY_IMPL(NavigationExtensionEnabler); } // namespace extensions
diff --git a/chrome/browser/extensions/navigation_observer.h b/chrome/browser/extensions/navigation_extension_enabler.h similarity index 69% rename from chrome/browser/extensions/navigation_observer.h rename to chrome/browser/extensions/navigation_extension_enabler.h index 0ce939b..922c1d0 100644 --- a/chrome/browser/extensions/navigation_observer.h +++ b/chrome/browser/extensions/navigation_extension_enabler.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 CHROME_BROWSER_EXTENSIONS_NAVIGATION_OBSERVER_H_ -#define CHROME_BROWSER_EXTENSIONS_NAVIGATION_OBSERVER_H_ +#ifndef CHROME_BROWSER_EXTENSIONS_NAVIGATION_EXTENSION_ENABLER_H_ +#define CHROME_BROWSER_EXTENSIONS_NAVIGATION_EXTENSION_ENABLER_H_ #include <memory> #include <set> @@ -20,23 +20,24 @@ namespace extensions { -// The NavigationObserver listens to navigation notifications. If the user -// navigates into an extension that has been disabled due to a permission +// The NavigationExtensionEnabler listens to navigation notifications. If the +// user navigates into an extension that has been disabled due to a permission // increase, it prompts the user to accept the new permissions and re-enables // the extension. -class NavigationObserver +class NavigationExtensionEnabler : public content::WebContentsObserver, - public content::WebContentsUserData<NavigationObserver>, + public content::WebContentsUserData<NavigationExtensionEnabler>, public ExtensionRegistryObserver { public: - NavigationObserver(const NavigationObserver&) = delete; - NavigationObserver& operator=(const NavigationObserver&) = delete; + NavigationExtensionEnabler(const NavigationExtensionEnabler&) = delete; + NavigationExtensionEnabler& operator=(const NavigationExtensionEnabler&) = + delete; - ~NavigationObserver() override; + ~NavigationExtensionEnabler() override; private: - explicit NavigationObserver(content::WebContents* web_contents); - friend class content::WebContentsUserData<NavigationObserver>; + explicit NavigationExtensionEnabler(content::WebContents* web_contents); + friend class content::WebContentsUserData<NavigationExtensionEnabler>; // Checks if the WebContents has navigated to an extension's web extent. If it // has and the extension is disabled due to a permissions increase, this @@ -62,10 +63,10 @@ base::ScopedObservation<ExtensionRegistry, ExtensionRegistryObserver> extension_registry_observation_{this}; - base::WeakPtrFactory<NavigationObserver> weak_factory_{this}; + base::WeakPtrFactory<NavigationExtensionEnabler> weak_factory_{this}; WEB_CONTENTS_USER_DATA_KEY_DECL(); }; } // namespace extensions -#endif // CHROME_BROWSER_EXTENSIONS_NAVIGATION_OBSERVER_H_ +#endif // CHROME_BROWSER_EXTENSIONS_NAVIGATION_EXTENSION_ENABLER_H_
diff --git a/chrome/browser/extensions/navigation_observer_browsertest.cc b/chrome/browser/extensions/navigation_extension_enabler_browsertest.cc similarity index 99% rename from chrome/browser/extensions/navigation_observer_browsertest.cc rename to chrome/browser/extensions/navigation_extension_enabler_browsertest.cc index 2ba33158..642d6cc 100644 --- a/chrome/browser/extensions/navigation_observer_browsertest.cc +++ b/chrome/browser/extensions/navigation_extension_enabler_browsertest.cc
@@ -10,7 +10,7 @@ #include "chrome/browser/extensions/chrome_test_extension_loader.h" #include "chrome/browser/extensions/extension_browsertest.h" #include "chrome/browser/extensions/extension_service.h" -#include "chrome/browser/extensions/navigation_observer.h" +#include "chrome/browser/extensions/navigation_extension_enabler.h" #include "chrome/common/url_constants.h" #include "chrome/test/base/ui_test_utils.h" #include "content/public/browser/site_isolation_policy.h"
diff --git a/chrome/browser/fast_checkout/fast_checkout_capabilities_fetcher_impl.cc b/chrome/browser/fast_checkout/fast_checkout_capabilities_fetcher_impl.cc index b48cc71..b1d92850 100644 --- a/chrome/browser/fast_checkout/fast_checkout_capabilities_fetcher_impl.cc +++ b/chrome/browser/fast_checkout/fast_checkout_capabilities_fetcher_impl.cc
@@ -7,7 +7,6 @@ #include <memory> #include "base/metrics/histogram_functions.h" -#include "chrome/browser/fast_checkout/fast_checkout_features.h" #include "services/network/public/cpp/resource_request.h" #include "services/network/public/cpp/shared_url_loader_factory.h" #include "services/network/public/mojom/url_response_head.mojom.h"
diff --git a/chrome/browser/fast_checkout/fast_checkout_client_impl_unittest.cc b/chrome/browser/fast_checkout/fast_checkout_client_impl_unittest.cc index d3bf9b8..acaf124 100644 --- a/chrome/browser/fast_checkout/fast_checkout_client_impl_unittest.cc +++ b/chrome/browser/fast_checkout/fast_checkout_client_impl_unittest.cc
@@ -10,11 +10,9 @@ #include "base/containers/flat_map.h" #include "base/test/metrics/histogram_tester.h" -#include "base/test/scoped_feature_list.h" #include "base/uuid.h" #include "chrome/browser/autofill/personal_data_manager_factory.h" #include "chrome/browser/fast_checkout/fast_checkout_capabilities_fetcher_factory.h" -#include "chrome/browser/fast_checkout/fast_checkout_features.h" #include "chrome/browser/fast_checkout/fast_checkout_trigger_validator.h" #include "chrome/browser/fast_checkout/mock_fast_checkout_capabilities_fetcher.h" #include "chrome/browser/ui/autofill/chrome_autofill_client.h" @@ -246,9 +244,7 @@ public: FastCheckoutClientImplTest() : ChromeRenderViewHostTestHarness( - base::test::TaskEnvironment::TimeSource::MOCK_TIME) { - feature_list_.InitWithFeatures({features::kFastCheckout}, {}); - } + base::test::TaskEnvironment::TimeSource::MOCK_TIME) {} protected: void SetUp() override { @@ -330,7 +326,6 @@ autofill_manager()->fast_checkout_delegate()); } - base::test::ScopedFeatureList feature_list_; ukm::TestAutoSetUkmRecorder ukm_recorder_; // Sets up test data, calls `TryToStart(..)` and `OnOptionsSelected(..)`.
diff --git a/chrome/browser/fast_checkout/fast_checkout_delegate_impl.cc b/chrome/browser/fast_checkout/fast_checkout_delegate_impl.cc index 400aa91..837fc9f 100644 --- a/chrome/browser/fast_checkout/fast_checkout_delegate_impl.cc +++ b/chrome/browser/fast_checkout/fast_checkout_delegate_impl.cc
@@ -7,7 +7,6 @@ #include "base/memory/raw_ptr.h" #include "base/memory/weak_ptr.h" #include "base/metrics/histogram_functions.h" -#include "chrome/browser/fast_checkout/fast_checkout_features.h" #include "chrome/browser/fast_checkout/fast_checkout_trigger_validator.h" #include "components/autofill/core/browser/browser_autofill_manager.h" #include "components/autofill/core/browser/logging/log_manager.h"
diff --git a/chrome/browser/fast_checkout/fast_checkout_features.cc b/chrome/browser/fast_checkout/fast_checkout_features.cc deleted file mode 100644 index 62b758b4..0000000 --- a/chrome/browser/fast_checkout/fast_checkout_features.cc +++ /dev/null
@@ -1,15 +0,0 @@ -// Copyright 2022 The Chromium Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "chrome/browser/fast_checkout/fast_checkout_features.h" - -namespace features { - -#if BUILDFLAG(IS_ANDROID) - -BASE_FEATURE(kFastCheckout, "FastCheckout", base::FEATURE_ENABLED_BY_DEFAULT); - -#endif // BUILDFLAG(IS_ANDROID) - -} // namespace features
diff --git a/chrome/browser/fast_checkout/fast_checkout_features.h b/chrome/browser/fast_checkout/fast_checkout_features.h deleted file mode 100644 index 1a71e19..0000000 --- a/chrome/browser/fast_checkout/fast_checkout_features.h +++ /dev/null
@@ -1,22 +0,0 @@ -// Copyright 2022 The Chromium Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CHROME_BROWSER_FAST_CHECKOUT_FAST_CHECKOUT_FEATURES_H_ -#define CHROME_BROWSER_FAST_CHECKOUT_FAST_CHECKOUT_FEATURES_H_ - -#include "base/feature_list.h" -#include "base/metrics/field_trial_params.h" -#include "build/build_config.h" - -namespace features { - -#if BUILDFLAG(IS_ANDROID) -// Feature that enables Fast Checkout experiences on Android to help users -// speed up the checkout process. -BASE_DECLARE_FEATURE(kFastCheckout); -#endif // BUILDFLAG(IS_ANDROID) - -} // namespace features - -#endif // CHROME_BROWSER_FAST_CHECKOUT_FAST_CHECKOUT_FEATURES_H_
diff --git a/chrome/browser/fast_checkout/fast_checkout_trigger_validator_impl.cc b/chrome/browser/fast_checkout/fast_checkout_trigger_validator_impl.cc index 1d878cc..f796abef 100644 --- a/chrome/browser/fast_checkout/fast_checkout_trigger_validator_impl.cc +++ b/chrome/browser/fast_checkout/fast_checkout_trigger_validator_impl.cc
@@ -5,7 +5,6 @@ #include "chrome/browser/fast_checkout/fast_checkout_trigger_validator_impl.h" #include "chrome/browser/fast_checkout/fast_checkout_capabilities_fetcher.h" -#include "chrome/browser/fast_checkout/fast_checkout_features.h" #include "components/autofill/core/browser/logging/log_manager.h" #include "components/autofill/core/browser/personal_data_manager.h" #include "components/autofill/core/common/autofill_internals/log_message.h" @@ -32,13 +31,6 @@ LogAutofillInternals( "Start of checking whether a Fast Checkout run should be permitted."); - // Trigger only on supported platforms. - if (!base::FeatureList::IsEnabled(::features::kFastCheckout)) { - LogAutofillInternals( - "not triggered because FastCheckout flag is disabled."); - return FastCheckoutTriggerOutcome::kUnsupportedFieldType; - } - // Trigger only if there is no ongoing run. if (is_running) { LogAutofillInternals(
diff --git a/chrome/browser/fast_checkout/fast_checkout_trigger_validator_impl_unittest.cc b/chrome/browser/fast_checkout/fast_checkout_trigger_validator_impl_unittest.cc index 2c9cd13..7cc76fb 100644 --- a/chrome/browser/fast_checkout/fast_checkout_trigger_validator_impl_unittest.cc +++ b/chrome/browser/fast_checkout/fast_checkout_trigger_validator_impl_unittest.cc
@@ -4,8 +4,6 @@ #include "chrome/browser/fast_checkout/fast_checkout_trigger_validator_impl.h" -#include "base/test/scoped_feature_list.h" -#include "chrome/browser/fast_checkout/fast_checkout_features.h" #include "chrome/browser/fast_checkout/fast_checkout_personal_data_helper.h" #include "chrome/browser/fast_checkout/mock_fast_checkout_capabilities_fetcher.h" #include "chrome/test/base/chrome_render_view_host_test_harness.h" @@ -82,11 +80,7 @@ class FastCheckoutTriggerValidatorTest : public ChromeRenderViewHostTestHarness { public: - FastCheckoutTriggerValidatorTest() { - feature_list_.InitWithFeatures( - /*enabled_features=*/{features::kFastCheckout}, - /*disabled_features=*/{}); - } + FastCheckoutTriggerValidatorTest() = default; protected: void SetUp() override { @@ -152,7 +146,6 @@ autofill::AutofillProfile profile_; autofill::CreditCard credit_card_; autofill::FormData form_; - base::test::ScopedFeatureList feature_list_; autofill::TestAutofillClientInjector<MockAutofillClient> autofill_client_injector_; autofill::TestAutofillDriverInjector<autofill::TestContentAutofillDriver> @@ -170,13 +163,6 @@ } TEST_F(FastCheckoutTriggerValidatorTest, - ShouldRun_FeatureDisabled_ReturnsFalse) { - base::test::ScopedFeatureList feature_list; - feature_list.InitAndDisableFeature(::features::kFastCheckout); - EXPECT_EQ(ShouldRun(), FastCheckoutTriggerOutcome::kUnsupportedFieldType); -} - -TEST_F(FastCheckoutTriggerValidatorTest, ShouldRun_AlreadyRunning_ReturnsFalse) { is_running_ = true; EXPECT_EQ(ShouldRun(), FastCheckoutTriggerOutcome::kUnsupportedFieldType);
diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json index 120c66e..27e7c8f 100644 --- a/chrome/browser/flag-metadata.json +++ b/chrome/browser/flag-metadata.json
@@ -6760,6 +6760,11 @@ "expiry_milestone": 90 }, { + "name": "refresh-feed-on-start", + "owners": ["//chrome/android/feed/OWNERS", "jianli@chromium.org"], + "expiry_milestone": 140 + }, + { "name": "related-searches", "owners": [ "gangwu@chromium.org", "related-searches-vteam@google.com" ], "expiry_milestone": 120 @@ -6899,6 +6904,14 @@ "expiry_milestone": 122 }, { + "name": "safe-browsing-new-gms-core-api-for-browse-url-database-check", + "owners": [ + "xinghuilu@chromium.org", + "chrome-counter-abuse-alerts@google.com" + ], + "expiry_milestone": 123 + }, + { "name": "safety-check-extensions", "owners": [ "zackhan@chromium.org",
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc index 8f75019..5b3556f4 100644 --- a/chrome/browser/flag_descriptions.cc +++ b/chrome/browser/flag_descriptions.cc
@@ -764,9 +764,11 @@ const char kChromeRefresh2023Name[] = "Chrome Refresh 2023"; const char kChromeRefresh2023Description[] = "Enables the new desktop design."; +const char kChromeWebuiRefresh2023Id[] = "chrome-webui-refresh-2023"; const char kChromeWebuiRefresh2023Name[] = "Chrome WebUI Refresh 2023"; const char kChromeWebuiRefresh2023Description[] = - "Enables Chrome Refresh 2023 styles for various WebUI surfaces."; + "Enables the new desktop design for WebUI. Chrome Refresh 2023 must also " + "be enabled."; const char kChromeRefresh2023NTBName[] = "Chrome Refresh 2023 New Tab Button"; const char kChromeRefresh2023NTBDescription[] = @@ -4069,6 +4071,10 @@ const char kFeedDynamicColorsDescription[] = "Allows feed to fully respect dynamic colors if supported by the client."; +const char kRefreshFeedOnRestartName[] = "Enable refreshing feed on restart"; +const char kRefreshFeedOnRestartDescription[] = + "Refresh feed when Chrome restarts."; + const char kInfoCardAcknowledgementTrackingName[] = "Info card acknowledgement tracking"; const char kInfoCardAcknowledgementTrackingDescription[] = @@ -4332,6 +4338,12 @@ "Enable checking URLs through Safe Browsing hash-prefix real time " "protocol."; +const char kSafeBrowsingNewGmsApiForBrowseUrlDatabaseCheckName[] = + "Safe Browsing new GMS API for browse URL database check"; +const char kSafeBrowsingNewGmsApiForBrowseUrlDatabaseCheckDescription[] = + "Use the new GMS API when performing Safe Browsing local database checks " + "for browse URLs."; + const char kScreenshotsForAndroidV2Name[] = "Screenshots for Android V2"; const char kScreenshotsForAndroidV2Description[] = "Adds functionality to the share screenshot panel within Chrome Browser"
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h index 861d284..c860a6c3 100644 --- a/chrome/browser/flag_descriptions.h +++ b/chrome/browser/flag_descriptions.h
@@ -445,6 +445,7 @@ extern const char kChromeRefresh2023Name[]; extern const char kChromeRefresh2023Description[]; +extern const char kChromeWebuiRefresh2023Id[]; extern const char kChromeWebuiRefresh2023Name[]; extern const char kChromeWebuiRefresh2023Description[]; @@ -2380,6 +2381,9 @@ extern const char kFeedDiscoFeedEndpointName[]; extern const char kFeedDiscoFeedEndpointDescription[]; +extern const char kRefreshFeedOnRestartName[]; +extern const char kRefreshFeedOnRestartDescription[]; + extern const char kForceOffTextAutosizingName[]; extern const char kForceOffTextAutosizingDescription[]; @@ -2547,6 +2551,9 @@ extern const char kSafeBrowsingHashPrefixRealTimeLookupsName[]; extern const char kSafeBrowsingHashPrefixRealTimeLookupsDescription[]; +extern const char kSafeBrowsingNewGmsApiForBrowseUrlDatabaseCheckName[]; +extern const char kSafeBrowsingNewGmsApiForBrowseUrlDatabaseCheckDescription[]; + extern const char kScreenshotsForAndroidV2Name[]; extern const char kScreenshotsForAndroidV2Description[];
diff --git a/chrome/browser/hub/BUILD.gn b/chrome/browser/hub/BUILD.gn index b54c907..4474026 100644 --- a/chrome/browser/hub/BUILD.gn +++ b/chrome/browser/hub/BUILD.gn
@@ -54,8 +54,10 @@ deps = [ ":java", "//base:base_java", + "//chrome/browser/back_press/android:java", "//chrome/browser/tab:java", "//components/browser_ui/widget/android:java", + "//third_party/androidx:androidx_annotation_annotation_java", ] sources = [
diff --git a/chrome/browser/hub/internal/BUILD.gn b/chrome/browser/hub/internal/BUILD.gn index 38af96b..e3c657a3 100644 --- a/chrome/browser/hub/internal/BUILD.gn +++ b/chrome/browser/hub/internal/BUILD.gn
@@ -43,6 +43,7 @@ deps = [ ":java_resources", "//base:base_java", + "//chrome/browser/back_press/android:java", "//chrome/browser/hub:java", "//chrome/browser/tab:java", "//components/browser_ui/styles/android:java", @@ -71,6 +72,7 @@ ":java", ":java_resources", "//base:base_java_test_support", + "//chrome/browser/back_press/android:java", "//chrome/browser/flags:java", "//chrome/browser/ui/android/night_mode:night_mode_java_test_support", "//chrome/browser/ui/android/strings:ui_strings_grd", @@ -114,6 +116,7 @@ "//base:base_java_test_support", "//base:base_junit_test_support", "//base/test:test_support_java", + "//chrome/browser/back_press/android:java", "//chrome/browser/flags:java", "//chrome/browser/hub:factory_java", "//chrome/browser/hub:java",
diff --git a/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubCoordinator.java b/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubCoordinator.java index 05ea5bf..f0d1aec 100644 --- a/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubCoordinator.java +++ b/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubCoordinator.java
@@ -13,6 +13,7 @@ import org.chromium.base.supplier.ObservableSupplier; import org.chromium.base.supplier.ObservableSupplierImpl; +import org.chromium.base.supplier.TransitiveObservableSupplier; import org.chromium.chrome.browser.tab.Tab; import org.chromium.components.browser_ui.widget.gesture.BackPressHandler; import org.chromium.components.browser_ui.widget.gesture.BackPressHandler.BackPressResult; @@ -25,6 +26,15 @@ private final @NonNull HubPaneHostCoordinator mHubPaneHostCoordinator; private final @NonNull HubLayoutController mHubLayoutController; private final @NonNull ObservableSupplierImpl<Boolean> mHandleBackPressSupplier; + private final @NonNull ObservableSupplier<Pane> mFocusedPaneSupplier; + + /** + * Warning: {@link mFocusedPaneSupplier#get()} may return null if no pane is focused or {@link + * Pane#getHandleBackPressChangedSupplier()} contains null. + */ + private final @NonNull TransitiveObservableSupplier<Pane, Boolean> + mFocusedPaneHandleBackPressSupplier; + private final @NonNull PaneBackStackHandler mPaneBackStackHandler; private final @NonNull ObservableSupplier<Tab> mCurrentTabSupplier; @@ -32,7 +42,7 @@ * Creates the {@link HubCoordinator}. * * @param containerView The view to attach the Hub to. - * @param paneSupplier Used to observe the current pane. + * @param paneManager The {@link PaneManager} for Hub. * @param hubLayoutController The controller of the {@link HubLayout}. * @param currentTabSupplier The supplier of the current {@link Tab}. */ @@ -42,6 +52,13 @@ @NonNull HubLayoutController hubLayoutController, @NonNull ObservableSupplier<Tab> currentTabSupplier) { Context context = containerView.getContext(); + mFocusedPaneSupplier = paneManager.getFocusedPaneSupplier(); + mFocusedPaneHandleBackPressSupplier = + new TransitiveObservableSupplier<>( + mFocusedPaneSupplier, p -> p.getHandleBackPressChangedSupplier()); + mFocusedPaneHandleBackPressSupplier.addObserver( + (handlesBackPress) -> updateHandleBackPressSupplier()); + mContainerView = containerView; mMainHubParent = LayoutInflater.from(context).inflate(R.layout.hub_layout, null); mContainerView.addView(mMainHubParent); @@ -77,11 +94,17 @@ @Override public @BackPressResult int handleBackPress() { // TODO(crbug/1498614): Add support here for in order of priority. - // 1) Delegate to the current Pane. + // 1) Delegate to the current Pane. - DONE // 2) Delegate to PaneBackStackHandler. - DONE // 3) No-op if Start Surface was the previous layout. It should be higher priority and // already handle it, but add verification. - // 4) Hide the Hub to the most recent tab in the current TabModel. - DONE. + // 4) Hide the Hub to the most recent tab in the current TabModel. - DONE + + if (Boolean.TRUE.equals(mFocusedPaneHandleBackPressSupplier.get()) + && mFocusedPaneSupplier.get().handleBackPress() == BackPressResult.SUCCESS) { + return BackPressResult.SUCCESS; + } + if (mPaneBackStackHandler.getHandleBackPressChangedSupplier().get() && mPaneBackStackHandler.handleBackPress() == BackPressResult.SUCCESS) { return BackPressResult.SUCCESS; @@ -103,12 +126,13 @@ private void updateHandleBackPressSupplier() { // TODO(crbug/1498614): See comment in handleBackPress. The conditions to check for each // case are: - // 1) Whether the Pane's getHandleBackPressChangedSupplier is set. + // 1) Whether the Pane's getHandleBackPressChangedSupplier is set. - DONE // 2) Whether the PaneBackStackHandler getHandleBackPressChangeSupplier is set. - DONE // 3) Whether Start Surface was the previous layout and we are not in incognito mode. // 4) Whether the current TabModel has a selected tab. - DONE boolean shouldHandleBackPress = - mPaneBackStackHandler.getHandleBackPressChangedSupplier().get() + Boolean.TRUE.equals(mFocusedPaneHandleBackPressSupplier.get()) + || mPaneBackStackHandler.getHandleBackPressChangedSupplier().get() || mCurrentTabSupplier.get() != null; mHandleBackPressSupplier.set(shouldHandleBackPress); }
diff --git a/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubCoordinatorUnitTest.java b/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubCoordinatorUnitTest.java index 0ee6d7f..5428a60 100644 --- a/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubCoordinatorUnitTest.java +++ b/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubCoordinatorUnitTest.java
@@ -11,6 +11,7 @@ import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.never; +import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; @@ -52,6 +53,10 @@ @Mock private Pane mTabSwitcherPane; @Mock private Pane mIncognitoTabSwitcherPane; + private ObservableSupplierImpl<Boolean> mTabSwitcherBackPressSupplier = + new ObservableSupplierImpl<>(); + private ObservableSupplierImpl<Boolean> mIncognitoTabSwitcherBackPressSupplier = + new ObservableSupplierImpl<>(); private ObservableSupplierImpl<Tab> mTabSupplier = new ObservableSupplierImpl<>(); private PaneManager mPaneManager; private FrameLayout mRootView; @@ -60,7 +65,11 @@ @Before public void setUp() { when(mTabSwitcherPane.getPaneId()).thenReturn(PaneId.TAB_SWITCHER); + when(mTabSwitcherPane.getHandleBackPressChangedSupplier()) + .thenReturn(mTabSwitcherBackPressSupplier); when(mIncognitoTabSwitcherPane.getPaneId()).thenReturn(PaneId.INCOGNITO_TAB_SWITCHER); + when(mIncognitoTabSwitcherPane.getHandleBackPressChangedSupplier()) + .thenReturn(mIncognitoTabSwitcherBackPressSupplier); when(mTab.getId()).thenReturn(TAB_ID); PaneListBuilder builder = @@ -72,6 +81,7 @@ PaneId.INCOGNITO_TAB_SWITCHER, LazyOneshotSupplier.fromValue(mIncognitoTabSwitcherPane)); mPaneManager = new PaneManagerImpl(builder); + assertTrue(mPaneManager.focusPane(PaneId.TAB_SWITCHER)); assertEquals(mTabSwitcherPane, mPaneManager.getFocusedPaneSupplier().get()); mActivityScenarioRule.getScenario().onActivity(this::onActivity); @@ -96,6 +106,64 @@ @Test @SmallTest + public void testFocusedPaneBackPress() { + assertFalse(mHubCoordinator.getHandleBackPressChangedSupplier().get()); + + when(mTabSwitcherPane.handleBackPress()) + .thenReturn(BackPressResult.SUCCESS) + .thenReturn(BackPressResult.FAILURE); + mTabSwitcherBackPressSupplier.set(true); + + assertTrue(mHubCoordinator.getHandleBackPressChangedSupplier().get()); + assertEquals(BackPressResult.SUCCESS, mHubCoordinator.handleBackPress()); + verify(mTabSwitcherPane).handleBackPress(); + + assertTrue(mHubCoordinator.getHandleBackPressChangedSupplier().get()); + assertEquals(BackPressResult.FAILURE, mHubCoordinator.handleBackPress()); + verify(mTabSwitcherPane, times(2)).handleBackPress(); + + mTabSwitcherBackPressSupplier.set(false); + assertFalse(mHubCoordinator.getHandleBackPressChangedSupplier().get()); + } + + @Test + @SmallTest + public void testChangePaneBackPress() { + assertFalse(mHubCoordinator.getHandleBackPressChangedSupplier().get()); + + // Tab switcher pane is focused. + when(mTabSwitcherPane.handleBackPress()).thenReturn(BackPressResult.SUCCESS); + mTabSwitcherBackPressSupplier.set(true); + + assertTrue(mHubCoordinator.getHandleBackPressChangedSupplier().get()); + assertEquals(BackPressResult.SUCCESS, mHubCoordinator.handleBackPress()); + verify(mTabSwitcherPane).handleBackPress(); + + mTabSwitcherBackPressSupplier.set(false); + assertFalse(mHubCoordinator.getHandleBackPressChangedSupplier().get()); + + // Change to incognito tab switcher. + when(mIncognitoTabSwitcherPane.handleBackPress()).thenReturn(BackPressResult.SUCCESS); + mIncognitoTabSwitcherBackPressSupplier.set(true); + + assertTrue(mPaneManager.focusPane(PaneId.INCOGNITO_TAB_SWITCHER)); + assertEquals(mIncognitoTabSwitcherPane, mPaneManager.getFocusedPaneSupplier().get()); + assertTrue(mHubCoordinator.getHandleBackPressChangedSupplier().get()); + assertEquals(BackPressResult.SUCCESS, mHubCoordinator.handleBackPress()); + verify(mIncognitoTabSwitcherPane).handleBackPress(); + + mIncognitoTabSwitcherBackPressSupplier.set(false); + + // Back to tab switcher. + assertTrue(mHubCoordinator.getHandleBackPressChangedSupplier().get()); + assertEquals(BackPressResult.SUCCESS, mHubCoordinator.handleBackPress()); + assertEquals(mTabSwitcherPane, mPaneManager.getFocusedPaneSupplier().get()); + + assertFalse(mHubCoordinator.getHandleBackPressChangedSupplier().get()); + } + + @Test + @SmallTest public void testBackNavigationBetweenPanes() { assertFalse(mHubCoordinator.getHandleBackPressChangedSupplier().get()); @@ -138,12 +206,22 @@ @Test @SmallTest public void testBackNavigationPriority() { + when(mIncognitoTabSwitcherPane.handleBackPress()) + .thenReturn(BackPressResult.SUCCESS) + .thenReturn(BackPressResult.FAILURE); + mIncognitoTabSwitcherBackPressSupplier.set(true); mTabSupplier.set(mTab); + assertTrue(mPaneManager.focusPane(PaneId.INCOGNITO_TAB_SWITCHER)); assertEquals(mIncognitoTabSwitcherPane, mPaneManager.getFocusedPaneSupplier().get()); assertTrue(mHubCoordinator.getHandleBackPressChangedSupplier().get()); - // Between pane naviation + // Pane back navigation. + assertEquals(BackPressResult.SUCCESS, mHubCoordinator.handleBackPress()); + verify(mIncognitoTabSwitcherPane).handleBackPress(); + mIncognitoTabSwitcherBackPressSupplier.set(false); + + // Between pane naviation. assertEquals(BackPressResult.SUCCESS, mHubCoordinator.handleBackPress()); assertEquals(mTabSwitcherPane, mPaneManager.getFocusedPaneSupplier().get()); assertTrue(mHubCoordinator.getHandleBackPressChangedSupplier().get());
diff --git a/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubManagerFactory.java b/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubManagerFactory.java index c44d7675..e325214 100644 --- a/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubManagerFactory.java +++ b/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubManagerFactory.java
@@ -6,7 +6,10 @@ import android.content.Context; +import androidx.annotation.NonNull; + import org.chromium.base.supplier.ObservableSupplier; +import org.chromium.chrome.browser.back_press.BackPressManager; import org.chromium.chrome.browser.tab.Tab; /** Factory for creating {@link HubManager}. */ @@ -16,12 +19,16 @@ * * @param context The {@link Context} hosting the Hub. * @param paneListBuilder The {@link PaneListBuilder} which is consumed to build a {@link - * PaneManager} + * PaneManager}. + * @param backPressManager The {@link BackPressManager} for the activity. * @param tabSupplier The supplier of the current tab in the current tab model. * @return an instance of {@link HubManagerImpl}. */ public static HubManager createHubManager( - Context context, PaneListBuilder paneListBuilder, ObservableSupplier<Tab> tabSupplier) { - return new HubManagerImpl(context, paneListBuilder, tabSupplier); + @NonNull Context context, + @NonNull PaneListBuilder paneListBuilder, + @NonNull BackPressManager backPressManager, + @NonNull ObservableSupplier<Tab> tabSupplier) { + return new HubManagerImpl(context, paneListBuilder, backPressManager, tabSupplier); } }
diff --git a/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubManagerImpl.java b/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubManagerImpl.java index 013c29c9..ad31902 100644 --- a/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubManagerImpl.java +++ b/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubManagerImpl.java
@@ -9,7 +9,9 @@ import androidx.annotation.NonNull; import org.chromium.base.supplier.ObservableSupplier; +import org.chromium.chrome.browser.back_press.BackPressManager; import org.chromium.chrome.browser.tab.Tab; +import org.chromium.components.browser_ui.widget.gesture.BackPressHandler; import org.chromium.components.browser_ui.widget.gesture.BackPressHandler.BackPressResult; /** @@ -22,6 +24,7 @@ private final @NonNull Context mContext; private final @NonNull PaneManagerImpl mPaneManager; private final @NonNull HubContainerView mHubContainerView; + private final @NonNull BackPressManager mBackPressManager; private final @NonNull ObservableSupplier<Tab> mTabSupplier; // This is effectively NonNull and final once the HubLayout is initialized. @@ -33,9 +36,11 @@ public HubManagerImpl( @NonNull Context context, @NonNull PaneListBuilder paneListBuilder, + @NonNull BackPressManager backPressManager, @NonNull ObservableSupplier<Tab> tabSupplier) { mContext = context; mPaneManager = new PaneManagerImpl(paneListBuilder); + mBackPressManager = backPressManager; mTabSupplier = tabSupplier; // TODO(crbug/1487315): Consider making this a xml file so the entire core UI is inflated. @@ -78,6 +83,7 @@ // TODO(crbug/1487315): Consider deferring this destruction till after a timeout. mHubContainerView.removeAllViews(); if (mHubCoordinator != null) { + mBackPressManager.removeHandler(mHubCoordinator); mHubCoordinator.destroy(); mHubCoordinator = null; } @@ -107,6 +113,7 @@ mHubCoordinator = new HubCoordinator( mHubContainerView, mPaneManager, mHubLayoutController, mTabSupplier); + mBackPressManager.addHandler(mHubCoordinator, BackPressHandler.Type.HUB); } HubCoordinator getHubCoordinatorForTesting() {
diff --git a/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubManagerImplUnitTest.java b/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubManagerImplUnitTest.java index 675247e..cb9f72fa 100644 --- a/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubManagerImplUnitTest.java +++ b/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubManagerImplUnitTest.java
@@ -31,7 +31,9 @@ import org.chromium.base.supplier.LazyOneshotSupplier; import org.chromium.base.supplier.ObservableSupplierImpl; import org.chromium.base.test.BaseRobolectricTestRunner; +import org.chromium.chrome.browser.back_press.BackPressManager; import org.chromium.chrome.browser.tab.Tab; +import org.chromium.components.browser_ui.widget.gesture.BackPressHandler; import org.chromium.ui.base.TestActivity; /** Unit tests for {@link PaneManagerImpl}. */ @@ -45,6 +47,7 @@ public ActivityScenarioRule<TestActivity> mActivityScenarioRule = new ActivityScenarioRule<>(TestActivity.class); + @Mock private BackPressManager mBackPressManager; @Mock private Tab mTab; @Mock private Pane mTabSwitcherPane; @Mock private HubLayoutController mHubLayoutController; @@ -75,7 +78,8 @@ PaneId.TAB_SWITCHER, LazyOneshotSupplier.fromValue(mTabSwitcherPane)); HubManager hubManager = - HubManagerFactory.createHubManager(mActivity, builder, mTabSupplier); + HubManagerFactory.createHubManager( + mActivity, builder, mBackPressManager, mTabSupplier); PaneManager paneManager = hubManager.getPaneManager(); assertNotNull(paneManager); @@ -88,13 +92,16 @@ @SmallTest public void testHubController() { PaneListBuilder builder = new PaneListBuilder(new DefaultPaneOrderController()); - HubManagerImpl hubManager = new HubManagerImpl(mActivity, builder, mTabSupplier); + HubManagerImpl hubManager = + new HubManagerImpl(mActivity, builder, mBackPressManager, mTabSupplier); HubController hubController = hubManager.getHubController(); hubController.setHubLayoutController(mHubLayoutController); assertNull(hubManager.getHubCoordinatorForTesting()); hubController.onHubLayoutShow(); - assertNotNull(hubManager.getHubCoordinatorForTesting()); + HubCoordinator coordinator = hubManager.getHubCoordinatorForTesting(); + assertNotNull(coordinator); + verify(mBackPressManager).addHandler(eq(coordinator), eq(BackPressHandler.Type.HUB)); View containerView = hubController.getContainerView(); assertNotNull(containerView); @@ -105,6 +112,7 @@ hubController.onHubLayoutDoneHiding(); assertNull(hubManager.getHubCoordinatorForTesting()); + verify(mBackPressManager).removeHandler(eq(coordinator)); // Container is still attached and will be removed separately. assertEquals(mRootView, containerView.getParent()); @@ -114,7 +122,8 @@ @SmallTest public void testBackNavigation() { PaneListBuilder builder = new PaneListBuilder(new DefaultPaneOrderController()); - HubManagerImpl hubManager = new HubManagerImpl(mActivity, builder, mTabSupplier); + HubManagerImpl hubManager = + new HubManagerImpl(mActivity, builder, mBackPressManager, mTabSupplier); HubController hubController = hubManager.getHubController(); hubController.setHubLayoutController(mHubLayoutController);
diff --git a/chrome/browser/performance_manager/chrome_browser_main_extra_parts_performance_manager.cc b/chrome/browser/performance_manager/chrome_browser_main_extra_parts_performance_manager.cc index a7209ef..6081a2e 100644 --- a/chrome/browser/performance_manager/chrome_browser_main_extra_parts_performance_manager.cc +++ b/chrome/browser/performance_manager/chrome_browser_main_extra_parts_performance_manager.cc
@@ -147,11 +147,10 @@ graph->PassToGraph( std::make_unique< performance_manager::policies::OomScorePolicyChromeOS>()); + graph->PassToGraph( + std::make_unique< + performance_manager::policies::ReportPageProcessesPolicy>()); } - - graph->PassToGraph( - std::make_unique< - performance_manager::policies::ReportPageProcessesPolicy>()); #endif // BUILDFLAG(IS_CHROMEOS_LACROS) #if !BUILDFLAG(IS_ANDROID)
diff --git a/chrome/browser/performance_manager/metrics/page_timeline_monitor.cc b/chrome/browser/performance_manager/metrics/page_timeline_monitor.cc index 8437319..2e730d3 100644 --- a/chrome/browser/performance_manager/metrics/page_timeline_monitor.cc +++ b/chrome/browser/performance_manager/metrics/page_timeline_monitor.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/performance_manager/metrics/page_timeline_monitor.h" #include <stdint.h> +#include <algorithm> #include <array> #include <limits> #include <map> @@ -26,6 +27,7 @@ #include "base/system/sys_info.h" #include "base/time/time.h" #include "base/timer/timer.h" +#include "chrome/browser/performance_manager/metrics/cpu_probe/cpu_probe.h" #include "components/content_settings/core/common/content_settings_types.h" #include "components/performance_manager/public/decorators/page_live_state_decorator.h" #include "components/performance_manager/public/features.h" @@ -80,11 +82,13 @@ } // namespace -PageTimelineMonitor::PageTimelineMonitor() +PageTimelineMonitor::PageTimelineMonitor(bool enable_system_cpu_probe) // These counters are initialized to a random value due to privacy concerns, // so that we cannot tie either the startup time of a specific tab or the // recording time of a specific slice to the browser startup time. - : slice_id_counter_(base::RandInt(1, 32767)) { + : slice_id_counter_(base::RandInt(1, 32767)), + system_cpu_probe_(enable_system_cpu_probe ? CpuProbe::Create() + : nullptr) { collect_slice_timer_.Start( FROM_HERE, performance_manager::features::kPageTimelineStateIntervalTime.Get(), this, @@ -95,6 +99,9 @@ FROM_HERE, base::Minutes(2), base::BindRepeating(&PageTimelineMonitor::CollectPageResourceUsage, weak_factory_.GetWeakPtr(), base::DoNothing())); + if (system_cpu_probe_) { + system_cpu_probe_->StartSampling(); + } } PageTimelineMonitor::~PageTimelineMonitor() = default; @@ -120,14 +127,18 @@ void PageTimelineMonitor::CollectPageResourceUsage( base::OnceClosure done_closure) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); CalculatePageCPUUsage( + /*use_delayed_system_cpu_probe=*/false, base::BindOnce(&PageTimelineMonitor::OnPageResourceUsageResult, weak_factory_.GetWeakPtr()) .Then(std::move(done_closure))); } void PageTimelineMonitor::OnPageResourceUsageResult( - const PageCPUUsageVector& page_cpu_usage) { + const PageCPUUsageVector& page_cpu_usage, + absl::optional<PressureSample> system_cpu) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); // Calculate the overall CPU usage. double total_cpu_usage = 0; for (const auto& [page_node, cpu_usage] : page_cpu_usage) { @@ -152,7 +163,7 @@ #if !BUILDFLAG(IS_ANDROID) if (base::FeatureList::IsEnabled( performance_manager::features::kCPUInterventionEvaluationLogging)) { - LogCPUInterventionMetrics(page_cpu_usage, now, + LogCPUInterventionMetrics(page_cpu_usage, system_cpu, now, CPUInterventionSuffix::kBaseline); bool is_cpu_over_threshold = (100 * total_cpu_usage / base::SysInfo::NumberOfProcessors() > @@ -161,12 +172,20 @@ CHECK(!log_cpu_on_delay_timer_.IsRunning()); if (is_cpu_over_threshold) { time_of_last_cpu_threshold_exceeded_ = now; - LogCPUInterventionMetrics(page_cpu_usage, now, + LogCPUInterventionMetrics(page_cpu_usage, system_cpu, now, CPUInterventionSuffix::kImmediate); // Only logged delayed metrics when using the new CPU monitor. if (performance_manager::features::kUseResourceAttributionCPUMonitor .Get()) { + if (system_cpu_probe_) { + // `system_cpu_probe_` needs to be called at fixed intervals, so + // start a second probe to measure the CPU until the delay timer + // fires. + CHECK(!delayed_system_cpu_probe_); + delayed_system_cpu_probe_ = CpuProbe::Create(); + delayed_system_cpu_probe_->StartSampling(); + } log_cpu_on_delay_timer_.Start( FROM_HERE, performance_manager::features::kDelayBeforeLogging.Get(), this, @@ -187,6 +206,7 @@ } void PageTimelineMonitor::CollectSlice() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); // We only collect a slice randomly every ~20 times this gets called for // privacy purposes. Always fall through when we're in a test. if (!ShouldCollectSlice()) { @@ -284,6 +304,7 @@ } bool PageTimelineMonitor::ShouldCollectSlice() const { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); if (should_collect_slice_callback_) { return should_collect_slice_callback_.Run(); } @@ -293,15 +314,23 @@ } void PageTimelineMonitor::CheckDelayedCPUInterventionMetrics() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); CHECK(performance_manager::features::kUseResourceAttributionCPUMonitor.Get()); - CalculatePageCPUUsage(base::BindOnce( - &PageTimelineMonitor::OnDelayedCPUInterventionMetricsResult, - weak_factory_.GetWeakPtr())); + CalculatePageCPUUsage( + /*use_delayed_system_cpu_probe=*/true, + base::BindOnce( + &PageTimelineMonitor::OnDelayedCPUInterventionMetricsResult, + weak_factory_.GetWeakPtr())); } void PageTimelineMonitor::OnDelayedCPUInterventionMetricsResult( - const PageCPUUsageVector& page_cpu_usage) { + const PageCPUUsageVector& page_cpu_usage, + absl::optional<PressureSample> system_cpu) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); CHECK(performance_manager::features::kUseResourceAttributionCPUMonitor.Get()); + // Now that `system_cpu` is received, stop the delayed CPU probe. This is a + // no-op if it was already nullptr. + delayed_system_cpu_probe_.reset(); double total_cpu_usage = 0; for (const auto& [page_node, cpu_usage] : page_cpu_usage) { total_cpu_usage += cpu_usage; @@ -310,15 +339,18 @@ if (100 * total_cpu_usage / base::SysInfo::NumberOfProcessors() > performance_manager::features::kThresholdChromeCPUPercent.Get()) { // Still over the threshold so we should log .Delayed UMA metrics. - LogCPUInterventionMetrics(page_cpu_usage, base::TimeTicks::Now(), + LogCPUInterventionMetrics(page_cpu_usage, system_cpu, + base::TimeTicks::Now(), CPUInterventionSuffix::kDelayed); } } void PageTimelineMonitor::LogCPUInterventionMetrics( const PageCPUUsageVector& page_cpu_usage, + const absl::optional<PressureSample>& system_cpu, const base::TimeTicks now, CPUInterventionSuffix histogram_suffix) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); std::vector<double> background_cpu_usage; double total_foreground_cpu_usage = 0; @@ -396,6 +428,23 @@ total_foreground_cpu_percent / foreground_tab_count); } + // Log comparisons with system CPU. + if (system_cpu.has_value()) { + const int system_cpu_percent = system_cpu->cpu_utilization * 100; + base::UmaHistogramPercentage( + base::StrCat({"PerformanceManager.PerformanceInterventions.CPU." + "System.", + suffix}), + system_cpu_percent); + base::UmaHistogramPercentage( + base::StrCat({"PerformanceManager.PerformanceInterventions.CPU." + "NonChrome.", + suffix}), + std::max(system_cpu_percent - total_background_cpu_percent - + total_foreground_cpu_percent, + 0)); + } + // Log derived background UMA metrics. if (histogram_suffix == CPUInterventionSuffix::kBaseline) { return; @@ -447,15 +496,21 @@ } void PageTimelineMonitor::CalculatePageCPUUsage( - base::OnceCallback<void(const PageCPUUsageVector&)> callback) { - cpu_monitor_.UpdateCPUMeasurements( - base::BindOnce(&PageTimelineMonitor::OnCPUUsageResult, - weak_factory_.GetWeakPtr(), std::move(callback))); + bool use_delayed_system_cpu_probe, + base::OnceCallback<void(const PageCPUUsageVector&, + absl::optional<PressureSample>)> callback) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + cpu_monitor_.UpdateCPUMeasurements(base::BindOnce( + &PageTimelineMonitor::OnCPUUsageResult, weak_factory_.GetWeakPtr(), + use_delayed_system_cpu_probe, std::move(callback))); } void PageTimelineMonitor::OnCPUUsageResult( - base::OnceCallback<void(const PageCPUUsageVector&)> callback, + bool use_delayed_system_cpu_probe, + base::OnceCallback<void(const PageCPUUsageVector&, + absl::optional<PressureSample>)> callback, const PageTimelineCPUMonitor::CPUUsageMap& cpu_usage_map) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); // Calculate the overall CPU usage. PageCPUUsageVector page_cpu_usage; page_cpu_usage.reserve(page_node_info_map_.size()); @@ -467,10 +522,20 @@ PageTimelineCPUMonitor::EstimatePageCPUUsage(page_node, cpu_usage_map); page_cpu_usage.emplace_back(page_node, cpu_usage); } - std::move(callback).Run(std::move(page_cpu_usage)); + // Also fetch the system CPU usage if available. + CpuProbe* cpu_probe = use_delayed_system_cpu_probe + ? delayed_system_cpu_probe_.get() + : system_cpu_probe_.get(); + if (cpu_probe) { + cpu_probe->RequestSample( + base::BindOnce(std::move(callback), std::move(page_cpu_usage))); + } else { + std::move(callback).Run(std::move(page_cpu_usage), absl::nullopt); + } } void PageTimelineMonitor::SetTriggerCollectionManuallyForTesting() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); collect_slice_timer_.Stop(); collect_page_resource_usage_timer_.Stop(); log_cpu_on_delay_timer_.Stop(); @@ -478,10 +543,30 @@ void PageTimelineMonitor::SetShouldCollectSliceCallbackForTesting( base::RepeatingCallback<bool()> should_collect_slice_callback) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); should_collect_slice_callback_ = should_collect_slice_callback; } +void PageTimelineMonitor::SetCPUMeasurementDelegateFactoryForTesting( + Graph* graph, + PageTimelineCPUMonitor::CPUMeasurementDelegate::Factory* factory) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + // Callback should be installed before `cpu_monitor_` starts + // measuring the graph. + CHECK(graph); + CHECK(!graph_); + cpu_monitor_.SetCPUMeasurementDelegateFactoryForTesting( // IN-TEST + graph, factory); +} + +PageTimelineMonitor::PageNodeInfoMap& +PageTimelineMonitor::GetPageNodeInfoForTesting() { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + return page_node_info_map_; +} + void PageTimelineMonitor::OnPassedToGraph(Graph* graph) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); graph_ = graph; graph_->AddPageNodeObserver(this); graph_->RegisterObject(this); @@ -490,6 +575,7 @@ } void PageTimelineMonitor::OnTakenFromGraph(Graph* graph) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); cpu_monitor_.StopMonitoring(graph_); // GraphOwned object destruction order is undefined, so only remove ourselves @@ -506,6 +592,7 @@ } void PageTimelineMonitor::OnTabAdded(TabPageDecorator::TabHandle* tab_handle) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); page_node_info_map_[tab_handle] = std::make_unique<PageNodeInfo>( base::TimeTicks::Now(), tab_handle->page_node(), slice_id_counter_++); } @@ -513,6 +600,7 @@ void PageTimelineMonitor::OnTabAboutToBeDiscarded( const PageNode* old_page_node, TabPageDecorator::TabHandle* tab_handle) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); auto it = page_node_info_map_.find(tab_handle); CHECK(it != page_node_info_map_.end()); @@ -522,10 +610,12 @@ void PageTimelineMonitor::OnBeforeTabRemoved( TabPageDecorator::TabHandle* tab_handle) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); page_node_info_map_.erase(tab_handle); } void PageTimelineMonitor::OnIsVisibleChanged(const PageNode* page_node) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); if (page_node->GetType() != performance_manager::PageType::kTab) { return; } @@ -569,6 +659,7 @@ void PageTimelineMonitor::OnPageLifecycleStateChanged( const PageNode* page_node) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); if (page_node->GetType() != performance_manager::PageType::kTab) { return; } @@ -592,11 +683,13 @@ } void PageTimelineMonitor::SetBatterySaverEnabled(bool enabled) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); battery_saver_enabled_ = enabled; } void PageTimelineMonitor::CheckPageState(const PageNode* page_node, const PageNodeInfo& info) { + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); // There's a window after OnAboutToBeDiscarded() where a discarded placeholder // page is in the map with type kUnknown, before it's updated to kTab in // OnTypeChanged().
diff --git a/chrome/browser/performance_manager/metrics/page_timeline_monitor.h b/chrome/browser/performance_manager/metrics/page_timeline_monitor.h index 0651f2e..2ed6e74 100644 --- a/chrome/browser/performance_manager/metrics/page_timeline_monitor.h +++ b/chrome/browser/performance_manager/metrics/page_timeline_monitor.h
@@ -14,8 +14,10 @@ #include "base/gtest_prod_util.h" #include "base/memory/raw_ptr.h" #include "base/memory/weak_ptr.h" +#include "base/sequence_checker.h" #include "base/time/time.h" #include "base/timer/timer.h" +#include "chrome/browser/performance_manager/metrics/cpu_probe/pressure_sample.h" #include "chrome/browser/performance_manager/metrics/page_timeline_cpu_monitor.h" #include "components/performance_manager/public/decorators/tab_page_decorator.h" #include "components/performance_manager/public/graph/graph.h" @@ -25,6 +27,7 @@ namespace performance_manager::metrics { +class CpuProbe; class PageTimelineMonitorUnitTest; // Periodically reports tab state via UKM, to enable analysis of usage patterns @@ -59,7 +62,10 @@ kMaxValue = kMixedForegroundBackground, }; - PageTimelineMonitor(); + // If `enable_system_cpu_probe` is false, `system_cpu_probe_` will be left + // null. This is mainly intended for tests. + explicit PageTimelineMonitor(bool enable_system_cpu_probe = true); + ~PageTimelineMonitor() override; PageTimelineMonitor(const PageTimelineMonitor& other) = delete; PageTimelineMonitor& operator=(const PageTimelineMonitor&) = delete; @@ -129,13 +135,17 @@ using PageCPUUsageVector = std::vector<std::pair<const PageNode*, double>>; + using PageNodeInfoMap = std::map<const TabPageDecorator::TabHandle*, + std::unique_ptr<PageNodeInfo>>; + // Asynchronously collects the PageResourceUsage UKM. Calls `done_closure` // when finished. void CollectPageResourceUsage(base::OnceClosure done_closure); // Invoked asynchronously from CollectPageResourceUsage() when measurements // are ready. - void OnPageResourceUsageResult(const PageCPUUsageVector& page_cpu_usage); + void OnPageResourceUsageResult(const PageCPUUsageVector& page_cpu_usage, + absl::optional<PressureSample> system_cpu); // Method collecting a slice for the PageTimelineState UKM. void CollectSlice(); @@ -149,23 +159,35 @@ // Invoked asynchronously from CheckDelayedCPUInterventionMetrics() when // measurements are ready. void OnDelayedCPUInterventionMetricsResult( - const PageCPUUsageVector& page_cpu_usage); + const PageCPUUsageVector& page_cpu_usage, + absl::optional<PressureSample> system_cpu); // Log CPU intervention metrics with the provided suffix. - void LogCPUInterventionMetrics(const PageCPUUsageVector& page_cpu_usage, - const base::TimeTicks now, - CPUInterventionSuffix histogram_suffix); + void LogCPUInterventionMetrics( + const PageCPUUsageVector& page_cpu_usage, + const absl::optional<PressureSample>& system_cpu, + const base::TimeTicks now, + CPUInterventionSuffix histogram_suffix); // Asynchronously calculates per-PageNode CPU usage, converts the results to a - // vector, and passes them to `callback`. + // vector, and passes them to `callback`. Also queries either + // `system_cpu_probe_` or `delayed_system_cpu_probe_`, depending on the value + // of `use_delayed_system_cpu_probe`, for a PressureSample to pass to + // `callback`. void CalculatePageCPUUsage( - base::OnceCallback<void(const PageCPUUsageVector&)> callback); + bool use_delayed_system_cpu_probe, + base::OnceCallback<void(const PageCPUUsageVector&, + absl::optional<PressureSample>)> callback); // Invoked asynchronously from CalculatePageCPUUsage() when measurements are - // ready. Converts the measurements in `cpu_usage_map` to a vector and passes - // them to `callback`. + // ready. Converts the measurements in `cpu_usage_map` to a vector, invokes + // either `system_cpu_probe_` or `delayed_system_cpu_probe_`, depending on the + // value of `use_delayed_system_cpu_probe`, and passes both page and system + // results to `callback`. void OnCPUUsageResult( - base::OnceCallback<void(const PageCPUUsageVector&)> callback, + bool use_delayed_system_cpu_probe, + base::OnceCallback<void(const PageCPUUsageVector&, + absl::optional<PressureSample>)> callback, const PageTimelineCPUMonitor::CPUUsageMap& cpu_usage_map); // If this is called, CollectSlice() and CollectPageResourceUsage() will not @@ -176,48 +198,69 @@ // ShouldCollectSlice(). void SetShouldCollectSliceCallbackForTesting(base::RepeatingCallback<bool()>); + // Passes the given `factory` to PageTimelineCPUMonitor. + void SetCPUMeasurementDelegateFactoryForTesting( + Graph* graph, + PageTimelineCPUMonitor::CPUMeasurementDelegate::Factory* factory); + + // Lets tests examine the contents of `page_node_info_map_`. + PageNodeInfoMap& GetPageNodeInfoForTesting(); + // CHECK's that `page_node` and `info` are in the right state to be // mapped to each other in `page_node_info_map_`. void CheckPageState(const PageNode* page_node, const PageNodeInfo& info); + SEQUENCE_CHECKER(sequence_checker_); + // Monotonically increasing counters for tabs and slices. - int slice_id_counter_; + int slice_id_counter_ GUARDED_BY_CONTEXT(sequence_checker_); // A map in which we store info about PageNodes to keep track of their state, // as well as the timing of their state transitions. - std::map<const TabPageDecorator::TabHandle*, std::unique_ptr<PageNodeInfo>> - page_node_info_map_; + PageNodeInfoMap page_node_info_map_ GUARDED_BY_CONTEXT(sequence_checker_); // Timer which is used to trigger CollectSlice(), which records the UKM. - base::RepeatingTimer collect_slice_timer_; + base::RepeatingTimer collect_slice_timer_ + GUARDED_BY_CONTEXT(sequence_checker_); // Timer which is used to trigger CollectPageResourceUsage(). - base::RepeatingTimer collect_page_resource_usage_timer_; + base::RepeatingTimer collect_page_resource_usage_timer_ + GUARDED_BY_CONTEXT(sequence_checker_); // Timer which handles logging high CPU after a potential delay. - base::OneShotTimer log_cpu_on_delay_timer_; + base::OneShotTimer log_cpu_on_delay_timer_ + GUARDED_BY_CONTEXT(sequence_checker_); // Keeps track of whether the browser has exceeded the CPU threshold. - absl::optional<base::TimeTicks> time_of_last_cpu_threshold_exceeded_ = - absl::nullopt; + absl::optional<base::TimeTicks> time_of_last_cpu_threshold_exceeded_ + GUARDED_BY_CONTEXT(sequence_checker_) = absl::nullopt; // Pointer to this process' graph. - raw_ptr<Graph> graph_ = nullptr; + raw_ptr<Graph> graph_ GUARDED_BY_CONTEXT(sequence_checker_) = nullptr; // Time when last slice was run. - base::TimeTicks time_of_last_slice_{base::TimeTicks::Now()}; + base::TimeTicks time_of_last_slice_ GUARDED_BY_CONTEXT(sequence_checker_) = + base::TimeTicks::Now(); // Time of last PageResourceUsage collection. - base::TimeTicks time_of_last_resource_usage_{base::TimeTicks::Now()}; + base::TimeTicks time_of_last_resource_usage_ + GUARDED_BY_CONTEXT(sequence_checker_) = base::TimeTicks::Now(); // Function which is called to determine whether a PageTimelineState slice // should be collected. Overridden in tests. - base::RepeatingCallback<bool()> should_collect_slice_callback_; + base::RepeatingCallback<bool()> should_collect_slice_callback_ + GUARDED_BY_CONTEXT(sequence_checker_); - bool battery_saver_enabled_ = false; + bool battery_saver_enabled_ GUARDED_BY_CONTEXT(sequence_checker_) = false; // Helper to take CPU measurements for the UKM. - PageTimelineCPUMonitor cpu_monitor_; + PageTimelineCPUMonitor cpu_monitor_ GUARDED_BY_CONTEXT(sequence_checker_); + + // Helpers to take system CPU measurements for UMA. + std::unique_ptr<CpuProbe> system_cpu_probe_ + GUARDED_BY_CONTEXT(sequence_checker_); + std::unique_ptr<CpuProbe> delayed_system_cpu_probe_ + GUARDED_BY_CONTEXT(sequence_checker_) = nullptr; // WeakPtrFactory for the RepeatingTimer to call a method on this object. base::WeakPtrFactory<PageTimelineMonitor> weak_factory_{this};
diff --git a/chrome/browser/performance_manager/metrics/page_timeline_monitor_unittest.cc b/chrome/browser/performance_manager/metrics/page_timeline_monitor_unittest.cc index a631706..e867f77 100644 --- a/chrome/browser/performance_manager/metrics/page_timeline_monitor_unittest.cc +++ b/chrome/browser/performance_manager/metrics/page_timeline_monitor_unittest.cc
@@ -6,12 +6,15 @@ #include <map> #include <memory> +#include <string> #include <utility> #include "base/containers/fixed_flat_map.h" #include "base/functional/bind.h" #include "base/location.h" #include "base/memory/raw_ptr.h" +#include "base/memory/ref_counted.h" +#include "base/memory/scoped_refptr.h" #include "base/run_loop.h" #include "base/strings/strcat.h" #include "base/strings/string_piece.h" @@ -19,6 +22,8 @@ #include "base/test/metrics/histogram_tester.h" #include "base/test/scoped_feature_list.h" #include "base/test/task_environment.h" +#include "base/test/test_timeouts.h" +#include "base/threading/platform_thread.h" #include "build/build_config.h" #include "chrome/browser/performance_manager/metrics/page_timeline_cpu_monitor.h" #include "components/performance_manager/embedder/graph_features.h" @@ -48,6 +53,107 @@ using PageMeasurementBackgroundState = PageTimelineMonitor::PageMeasurementBackgroundState; +// Helper class to repeatedly test a HistogramTester for histograms with a +// common naming pattern. The default pattern is +// PerformanceManager.PerformanceInterventions.CPU.*. +// +// WithSuffix() creates another PatternedHistogramTester that tests the same +// pattern with a suffix. The original PatternedHistogramTester and all others +// created from it WithSuffix() share the same HistogramTester. When they all go +// out of scope, it stops recording histograms. +// +// Usage: +// +// { +// PatternedHistogramTester h1("start"); +// PatternedHistogramTester h2 = h1.WithSuffix("end"); +// // Do things. +// h1.ExpectUniqueSample("foo", 2); // Expects "start.foo::2" has 1 sample. +// h2.ExpectTotalCount("bar", 3); // Expects "start.bar.end" has 3 samples +// // in any bucket(s). +// } +// { +// PatternedHistogramTester h3("start"); +// // Do more things. +// h3.ExpectUniqueSample("foo", 4); // Expects "start.foo::4" has 1 sample +// // since `h3` was created. The samples +// // seen by `h1` and `h2` are ignored. +// } +class PatternedHistogramTester { + public: + explicit PatternedHistogramTester( + base::StringPiece prefix = + "PerformanceManager.PerformanceInterventions.CPU", + base::StringPiece suffix = "") + : prefix_(prefix), suffix_(suffix) {} + + ~PatternedHistogramTester() = default; + + PatternedHistogramTester(const PatternedHistogramTester&) = delete; + PatternedHistogramTester operator=(const PatternedHistogramTester&) = delete; + + // Expects prefix.`name`.suffix to contain exactly 1 sample in the + // `sample_bucket` bucket. + void ExpectUniqueSample( + base::StringPiece name, + int sample_bucket, + const base::Location& location = base::Location::Current()) const { + histogram_tester_->ExpectUniqueSample(HistogramName(name), sample_bucket, 1, + location); + } + + // Expects prefix.`name`.suffix to contain `count` samples in any bucket. + void ExpectTotalCount( + base::StringPiece name, + size_t count, + const base::Location& location = base::Location::Current()) const { + histogram_tester_->ExpectTotalCount(HistogramName(name), count, location); + } + + // Expects prefix.`name`.suffix to contain no samples at all. + void ExpectNone( + base::StringPiece name, + const base::Location& location = base::Location::Current()) const { + ExpectTotalCount(name, 0, location); + } + + // Returns a copy of this object that appends `suffix` to histogram names. + PatternedHistogramTester WithSuffix(base::StringPiece suffix) const { + return PatternedHistogramTester(prefix_, suffix, histogram_tester_); + } + + private: + class RefCountedHistogramTester + : public base::RefCounted<RefCountedHistogramTester>, + public base::HistogramTester { + private: + friend class base::RefCounted<RefCountedHistogramTester>; + ~RefCountedHistogramTester() = default; + }; + + // Internal constructor used by WithSuffix() to use a shared HistogramTester. + PatternedHistogramTester( + base::StringPiece prefix, + base::StringPiece suffix, + scoped_refptr<RefCountedHistogramTester> histogram_tester) + : prefix_(prefix), suffix_(suffix), histogram_tester_(histogram_tester) {} + + std::string HistogramName(base::StringPiece name) const { + return base::StrCat({ + prefix_, + prefix_.empty() ? "" : ".", + name, + suffix_.empty() ? "" : ".", + suffix_, + }); + } + + const std::string prefix_; + const std::string suffix_; + scoped_refptr<RefCountedHistogramTester> histogram_tester_ = + base::MakeRefCounted<RefCountedHistogramTester>(); +}; + } // namespace class PageTimelineMonitorUnitTest : public GraphTestHarness { @@ -69,15 +175,14 @@ cpu_delegate_factory_.SetDefaultCPUUsage(0.5); std::unique_ptr<PageTimelineMonitor> monitor = - std::make_unique<PageTimelineMonitor>(); + std::make_unique<PageTimelineMonitor>(enable_system_cpu_probe_); monitor_ = monitor.get(); monitor_->SetTriggerCollectionManuallyForTesting(); monitor_->SetShouldCollectSliceCallbackForTesting( base::BindRepeating([]() { return true; })); - monitor_->cpu_monitor_.SetCPUMeasurementDelegateFactoryForTesting( + monitor_->SetCPUMeasurementDelegateFactoryForTesting( graph(), &cpu_delegate_factory_); graph()->PassToGraph(std::move(monitor)); - ResetHistogramTester(); ResetUkmRecorder(); } @@ -89,8 +194,6 @@ // To allow tests to call its methods and view its state. raw_ptr<PageTimelineMonitor> monitor_; - std::unique_ptr<base::HistogramTester> histogram_tester_; - // Factory to return CPUMeasurementDelegates. This must be deleted after // `monitor_` to ensure that it outlives all delegates it creates. resource_attribution::SimulatedCPUMeasurementDelegateFactory @@ -105,61 +208,17 @@ void TriggerCollectPageResourceUsage() { base::RunLoop run_loop; monitor_->CollectPageResourceUsage(run_loop.QuitClosure()); + // GraphTestHarness uses ThreadPoolExecutionMode::QUEUED, so RunLoop only + // pumps the main thread. Manually pump ThreadPool threads for CPUProbe. + task_env().FastForwardBy(base::TimeDelta()); run_loop.Run(); } - // Expects PerformanceManager.PerformanceInterventions.CPU.`name`.`suffix` to - // contain exactly 1 sample in the `sample_bucket` bucket. - template <typename T> - void ExpectCPUHistogram( - base::StringPiece name, - base::StringPiece suffix, - T sample_bucket, - const base::Location& location = base::Location::Current()) { - histogram_tester_->ExpectUniqueSample( - base::StrCat({"PerformanceManager.PerformanceInterventions.CPU.", name, - ".", suffix}), - sample_bucket, 1, location); - } - - // Expects PerformanceManager.PerformanceInterventions.CPU.`name` to contain - // exactly 1 sample in the `sample_bucket` bucket. - template <typename T> - void ExpectCPUHistogram( - base::StringPiece name, - T sample_bucket, - const base::Location& location = base::Location::Current()) { - histogram_tester_->ExpectUniqueSample( - base::StrCat( - {"PerformanceManager.PerformanceInterventions.CPU.", name}), - sample_bucket, 1, location); - } - - // Expects PerformanceManager.PerformanceInterventions.CPU.`name`.`suffix` to - // contain no samples at all. - void ExpectNoCPUHistogram( - base::StringPiece name, - base::StringPiece suffix, - const base::Location& location = base::Location::Current()) { - histogram_tester_->ExpectTotalCount( - base::StrCat({"PerformanceManager.PerformanceInterventions.CPU.", name, - ".", suffix}), - 0, location); - } - - // Expects PerformanceManager.PerformanceInterventions.CPU.`name` to contain - // no samples at all. - void ExpectNoCPUHistogram( - base::StringPiece name, - const base::Location& location = base::Location::Current()) { - histogram_tester_->ExpectTotalCount( - base::StrCat( - {"PerformanceManager.PerformanceInterventions.CPU.", name}), - 0, location); - } - - void ResetHistogramTester() { - histogram_tester_ = std::make_unique<base::HistogramTester>(); + // Let an arbitrary amount of time pass so there's some CPU usage to measure. + // Page CPU can use the mock clock, but CPUProbe needs real time to pass. + void LetTimePass() { + task_env().FastForwardBy(base::Minutes(1)); + base::PlatformThread::Sleep(TestTimeouts::tiny_timeout()); } void ResetUkmRecorder() { @@ -172,6 +231,11 @@ void TestBackgroundStates( std::map<ukm::SourceId, PageMeasurementBackgroundState> expected_states); + // Subclasses can override this before calling + // PageTimelineMonitorUnitTest::SetUp() to simulate an environment where + // CPUProbe::Create() returns nullptr. + bool enable_system_cpu_probe_ = true; + private: std::unique_ptr<ukm::TestUkmRecorder> test_ukm_recorder_; }; @@ -231,6 +295,23 @@ PageTimelineMonitorWithFeatureTest, ::testing::Bool()); +// A test of CPU intervention logging when the system CPUProbe is not available. +class PageTimelineMonitorNoCPUProbeTest : public PageTimelineMonitorUnitTest { + public: + PageTimelineMonitorNoCPUProbeTest() { + scoped_feature_list_.InitWithFeaturesAndParameters( + { + {performance_manager::features::kCPUInterventionEvaluationLogging, + {{"threshold_chrome_cpu_percent", "50"}}}, + }, + {}); + enable_system_cpu_probe_ = false; + } + + private: + base::test::ScopedFeatureList scoped_feature_list_; +}; + TEST_F(PageTimelineMonitorUnitTest, TestPageTimeline) { MockSinglePageInSingleProcessGraph mock_graph(graph()); ukm::SourceId mock_source_id = ukm::NoURLSourceId(); @@ -385,7 +466,7 @@ mock_graph.page->SetIsVisible(false); EXPECT_EQ(monitor() - ->page_node_info_map_[TabPageDecorator::FromPageNode( + ->GetPageNodeInfoForTesting()[TabPageDecorator::FromPageNode( mock_graph.page.get())] ->current_lifecycle, mojom::LifecycleState::kFrozen); @@ -621,10 +702,12 @@ TabPageDecorator::TabHandle* tab_handle = TabPageDecorator::FromPageNode(mock_graph.page.get()); - EXPECT_EQ(monitor()->page_node_info_map_[tab_handle]->current_lifecycle, - mojom::LifecycleState::kFrozen); - EXPECT_EQ(monitor()->page_node_info_map_[tab_handle]->currently_visible, - false); + EXPECT_EQ( + monitor()->GetPageNodeInfoForTesting()[tab_handle]->current_lifecycle, + mojom::LifecycleState::kFrozen); + EXPECT_EQ( + monitor()->GetPageNodeInfoForTesting()[tab_handle]->currently_visible, + false); // making sure no DCHECKs are hit TriggerCollectSlice(); @@ -742,54 +825,65 @@ #if !BUILDFLAG(IS_ANDROID) TEST_P(PageTimelineMonitorWithFeatureTest, TestCPUInterventionMetrics) { MockMultiplePagesWithMultipleProcessesGraph mock_graph(graph()); - const ukm::SourceId mock_source_id = ukm::AssignNewSourceId(); + + // Foreground page. mock_graph.page->SetType(performance_manager::PageType::kTab); - mock_graph.page->SetUkmSourceId(mock_source_id); mock_graph.page->SetIsVisible(true); - const ukm::SourceId mock_source_id2 = ukm::AssignNewSourceId(); + // Background page. mock_graph.other_page->SetType(performance_manager::PageType::kTab); - mock_graph.other_page->SetUkmSourceId(mock_source_id2); + mock_graph.other_page->SetIsVisible(false); // Set CPU usage to 0, so only the .Baseline metrics should be logged. cpu_delegate_factory_.GetDelegate(mock_graph.process.get()).SetCPUUsage(0.0); cpu_delegate_factory_.GetDelegate(mock_graph.other_process.get()) .SetCPUUsage(0.0); - // Let an arbitrary amount of time pass so there's some CPU usage to measure. - task_env().FastForwardBy(base::Minutes(1)); - TriggerCollectPageResourceUsage(); + { + PatternedHistogramTester histograms; - ExpectCPUHistogram("AverageBackgroundCPU", "Baseline", 0); - ExpectCPUHistogram("TotalBackgroundCPU", "Baseline", 0); - ExpectCPUHistogram("TotalBackgroundTabCount", "Baseline", 1); - ExpectCPUHistogram("AverageForegroundCPU", "Baseline", 0); - ExpectCPUHistogram("TotalForegroundCPU", "Baseline", 0); - ExpectCPUHistogram("TotalForegroundTabCount", "Baseline", 1); + LetTimePass(); + TriggerCollectPageResourceUsage(); - ExpectNoCPUHistogram("AverageBackgroundCPU", "Immediate"); - ExpectNoCPUHistogram("TotalBackgroundCPU", "Immediate"); - ExpectNoCPUHistogram("TotalBackgroundTabCount", "Immediate"); - ExpectNoCPUHistogram("AverageForegroundCPU", "Immediate"); - ExpectNoCPUHistogram("TotalForegroundCPU", "Immediate"); - ExpectNoCPUHistogram("TotalForegroundTabCount", "Immediate"); - ExpectNoCPUHistogram("BackgroundTabsToGetUnderCPUThreshold", "Immediate"); - ExpectNoCPUHistogram("TopNBackgroundCPU.1", "Immediate"); - ExpectNoCPUHistogram("TopNBackgroundCPU.2", "Immediate"); + auto baseline = histograms.WithSuffix("Baseline"); + baseline.ExpectUniqueSample("AverageBackgroundCPU", 0); + baseline.ExpectUniqueSample("TotalBackgroundCPU", 0); + baseline.ExpectUniqueSample("TotalBackgroundTabCount", 1); + baseline.ExpectUniqueSample("AverageForegroundCPU", 0); + baseline.ExpectUniqueSample("TotalForegroundCPU", 0); + baseline.ExpectUniqueSample("TotalForegroundTabCount", 1); - ExpectNoCPUHistogram("AverageBackgroundCPU", "Delayed"); - ExpectNoCPUHistogram("TotalBackgroundCPU", "Delayed"); - ExpectNoCPUHistogram("TotalBackgroundTabCount", "Delayed"); - ExpectNoCPUHistogram("AverageForegroundCPU", "Delayed"); - ExpectNoCPUHistogram("TotalForegroundCPU", "Delayed"); - ExpectNoCPUHistogram("TotalForegroundTabCount", "Delayed"); - ExpectNoCPUHistogram("BackgroundTabsToGetUnderCPUThreshold", "Delayed"); - ExpectNoCPUHistogram("TopNBackgroundCPU.1", "Delayed"); - ExpectNoCPUHistogram("TopNBackgroundCPU.2", "Delayed"); + baseline.ExpectTotalCount("System", 1); + baseline.ExpectTotalCount("NonChrome", 1); - ExpectNoCPUHistogram("DurationOverThreshold"); + auto immediate = histograms.WithSuffix("Immediate"); + immediate.ExpectNone("AverageBackgroundCPU"); + immediate.ExpectNone("TotalBackgroundCPU"); + immediate.ExpectNone("TotalBackgroundTabCount"); + immediate.ExpectNone("AverageForegroundCPU"); + immediate.ExpectNone("TotalForegroundCPU"); + immediate.ExpectNone("TotalForegroundTabCount"); + immediate.ExpectNone("BackgroundTabsToGetUnderCPUThreshold"); + immediate.ExpectNone("TopNBackgroundCPU.1"); + immediate.ExpectNone("TopNBackgroundCPU.2"); + immediate.ExpectNone("System"); + immediate.ExpectNone("NonChrome"); - ResetHistogramTester(); + auto delayed = histograms.WithSuffix("Delayed"); + delayed.ExpectNone("AverageBackgroundCPU"); + delayed.ExpectNone("TotalBackgroundCPU"); + delayed.ExpectNone("TotalBackgroundTabCount"); + delayed.ExpectNone("AverageForegroundCPU"); + delayed.ExpectNone("TotalForegroundCPU"); + delayed.ExpectNone("TotalForegroundTabCount"); + delayed.ExpectNone("BackgroundTabsToGetUnderCPUThreshold"); + delayed.ExpectNone("TopNBackgroundCPU.1"); + delayed.ExpectNone("TopNBackgroundCPU.2"); + delayed.ExpectNone("System"); + delayed.ExpectNone("NonChrome"); + + histograms.ExpectNone("DurationOverThreshold"); + } // The intervention metrics measure total CPU, not percentage of each core, so // set the measurement delegates to return half of the total available CPU @@ -799,141 +893,178 @@ cpu_delegate_factory_.GetDelegate(mock_graph.other_process.get()) .SetCPUUsage(base::SysInfo::NumberOfProcessors() / 2.0); - // Let an arbitrary amount of time pass so there's some CPU usage to measure. - task_env().FastForwardBy(base::Minutes(1)); - TriggerCollectPageResourceUsage(); + { + PatternedHistogramTester histograms; - // `page` is in the foreground, and gets 50% of the `process` CPU (25% of - // total CPU). `other_page` is in the background, and gets 50% of the - // `process` CPU + all of the `other_process` CPU (75% of total CPU). + LetTimePass(); + TriggerCollectPageResourceUsage(); - ExpectCPUHistogram("AverageBackgroundCPU", "Baseline", 75); - ExpectCPUHistogram("TotalBackgroundCPU", "Baseline", 75); - ExpectCPUHistogram("TotalBackgroundTabCount", "Baseline", 1); - ExpectCPUHistogram("AverageForegroundCPU", "Baseline", 25); - ExpectCPUHistogram("TotalForegroundCPU", "Baseline", 25); - ExpectCPUHistogram("TotalForegroundTabCount", "Baseline", 1); + // `page` is in the foreground, and gets 50% of the `process` CPU (25% of + // total CPU). `other_page` is in the background, and gets 50% of the + // `process` CPU + all of the `other_process` CPU (75% of total CPU). + auto baseline = histograms.WithSuffix("Baseline"); + baseline.ExpectUniqueSample("AverageBackgroundCPU", 75); + baseline.ExpectUniqueSample("TotalBackgroundCPU", 75); + baseline.ExpectUniqueSample("TotalBackgroundTabCount", 1); + baseline.ExpectUniqueSample("AverageForegroundCPU", 25); + baseline.ExpectUniqueSample("TotalForegroundCPU", 25); + baseline.ExpectUniqueSample("TotalForegroundTabCount", 1); + baseline.ExpectTotalCount("System", 1); + baseline.ExpectTotalCount("NonChrome", 1); - ExpectCPUHistogram("AverageBackgroundCPU", "Immediate", 75); - ExpectCPUHistogram("TotalBackgroundCPU", "Immediate", 75); - ExpectCPUHistogram("TotalBackgroundTabCount", "Immediate", 1); - ExpectCPUHistogram("AverageForegroundCPU", "Immediate", 25); - ExpectCPUHistogram("TotalForegroundCPU", "Immediate", 25); - ExpectCPUHistogram("TotalForegroundTabCount", "Immediate", 1); - ExpectCPUHistogram("BackgroundTabsToGetUnderCPUThreshold", "Immediate", 1); - ExpectCPUHistogram("TopNBackgroundCPU.1", "Immediate", 75); - ExpectCPUHistogram("TopNBackgroundCPU.2", "Immediate", 75); + auto immediate = histograms.WithSuffix("Immediate"); + immediate.ExpectUniqueSample("AverageBackgroundCPU", 75); + immediate.ExpectUniqueSample("TotalBackgroundCPU", 75); + immediate.ExpectUniqueSample("TotalBackgroundTabCount", 1); + immediate.ExpectUniqueSample("AverageForegroundCPU", 25); + immediate.ExpectUniqueSample("TotalForegroundCPU", 25); + immediate.ExpectUniqueSample("TotalForegroundTabCount", 1); + immediate.ExpectUniqueSample("BackgroundTabsToGetUnderCPUThreshold", 1); + immediate.ExpectUniqueSample("TopNBackgroundCPU.1", 75); + immediate.ExpectUniqueSample("TopNBackgroundCPU.2", 75); + immediate.ExpectTotalCount("System", 1); + immediate.ExpectTotalCount("NonChrome", 1); - ExpectNoCPUHistogram("AverageBackgroundCPU", "Delayed"); - ExpectNoCPUHistogram("TotalBackgroundCPU", "Delayed"); - ExpectNoCPUHistogram("TotalBackgroundTabCount", "Delayed"); - ExpectNoCPUHistogram("AverageForegroundCPU", "Delayed"); - ExpectNoCPUHistogram("TotalForegroundCPU", "Delayed"); - ExpectNoCPUHistogram("TotalForegroundTabCount", "Delayed"); - ExpectNoCPUHistogram("BackgroundTabsToGetUnderCPUThreshold", "Delayed"); - ExpectNoCPUHistogram("TopNBackgroundCPU.1", "Delayed"); - ExpectNoCPUHistogram("TopNBackgroundCPU.2", "Delayed"); + auto delayed = histograms.WithSuffix("Delayed"); + delayed.ExpectNone("AverageBackgroundCPU"); + delayed.ExpectNone("TotalBackgroundCPU"); + delayed.ExpectNone("TotalBackgroundTabCount"); + delayed.ExpectNone("AverageForegroundCPU"); + delayed.ExpectNone("TotalForegroundCPU"); + delayed.ExpectNone("TotalForegroundTabCount"); + delayed.ExpectNone("BackgroundTabsToGetUnderCPUThreshold"); + delayed.ExpectNone("TopNBackgroundCPU.1"); + delayed.ExpectNone("TopNBackgroundCPU.2"); + delayed.ExpectNone("System"); + delayed.ExpectNone("NonChrome"); - ExpectNoCPUHistogram("DurationOverThreshold"); + histograms.ExpectNone("DurationOverThreshold"); + } - ResetHistogramTester(); + { + PatternedHistogramTester histograms; - // Fast forward for Delayed UMA to be logged. - task_env().FastForwardBy(base::Minutes(1)); + // Fast forward for Delayed UMA to be logged. + LetTimePass(); - ExpectNoCPUHistogram("AverageBackgroundCPU", "Baseline"); - ExpectNoCPUHistogram("TotalBackgroundCPU", "Baseline"); - ExpectNoCPUHistogram("TotalBackgroundTabCount", "Baseline"); - ExpectNoCPUHistogram("AverageForegroundCPU", "Baseline"); - ExpectNoCPUHistogram("TotalForegroundCPU", "Baseline"); - ExpectNoCPUHistogram("TotalForegroundTabCount", "Baseline"); + auto baseline = histograms.WithSuffix("Baseline"); + baseline.ExpectNone("AverageBackgroundCPU"); + baseline.ExpectNone("TotalBackgroundCPU"); + baseline.ExpectNone("TotalBackgroundTabCount"); + baseline.ExpectNone("AverageForegroundCPU"); + baseline.ExpectNone("TotalForegroundCPU"); + baseline.ExpectNone("TotalForegroundTabCount"); + baseline.ExpectNone("System"); + baseline.ExpectNone("NonChrome"); - ExpectNoCPUHistogram("AverageBackgroundCPU", "Immediate"); - ExpectNoCPUHistogram("TotalBackgroundCPU", "Immediate"); - ExpectNoCPUHistogram("TotalBackgroundTabCount", "Immediate"); - ExpectNoCPUHistogram("AverageForegroundCPU", "Immediate"); - ExpectNoCPUHistogram("TotalForegroundCPU", "Immediate"); - ExpectNoCPUHistogram("TotalForegroundTabCount", "Immediate"); - ExpectNoCPUHistogram("BackgroundTabsToGetUnderCPUThreshold", "Immediate"); - ExpectNoCPUHistogram("TopNBackgroundCPU.1", "Immediate"); - ExpectNoCPUHistogram("TopNBackgroundCPU.2", "Immediate"); + auto immediate = histograms.WithSuffix("Immediate"); + immediate.ExpectNone("AverageBackgroundCPU"); + immediate.ExpectNone("TotalBackgroundCPU"); + immediate.ExpectNone("TotalBackgroundTabCount"); + immediate.ExpectNone("AverageForegroundCPU"); + immediate.ExpectNone("TotalForegroundCPU"); + immediate.ExpectNone("TotalForegroundTabCount"); + immediate.ExpectNone("BackgroundTabsToGetUnderCPUThreshold"); + immediate.ExpectNone("TopNBackgroundCPU.1"); + immediate.ExpectNone("TopNBackgroundCPU.2"); + immediate.ExpectNone("System"); + immediate.ExpectNone("NonChrome"); - ExpectNoCPUHistogram("DurationOverThreshold"); + auto delayed = histograms.WithSuffix("Delayed"); + if (GetParam()) { + delayed.ExpectUniqueSample("AverageBackgroundCPU", 75); + delayed.ExpectUniqueSample("TotalBackgroundCPU", 75); + delayed.ExpectUniqueSample("TotalBackgroundTabCount", 1); + delayed.ExpectUniqueSample("AverageForegroundCPU", 25); + delayed.ExpectUniqueSample("TotalForegroundCPU", 25); + delayed.ExpectUniqueSample("TotalForegroundTabCount", 1); + delayed.ExpectUniqueSample("BackgroundTabsToGetUnderCPUThreshold", 1); + delayed.ExpectUniqueSample("TopNBackgroundCPU.1", 75); + delayed.ExpectUniqueSample("TopNBackgroundCPU.2", 75); + delayed.ExpectTotalCount("System", 1); + delayed.ExpectTotalCount("NonChrome", 1); + } else { + delayed.ExpectNone("AverageBackgroundCPU"); + delayed.ExpectNone("TotalBackgroundCPU"); + delayed.ExpectNone("TotalBackgroundTabCount"); + delayed.ExpectNone("AverageForegroundCPU"); + delayed.ExpectNone("TotalForegroundCPU"); + delayed.ExpectNone("TotalForegroundTabCount"); + delayed.ExpectNone("BackgroundTabsToGetUnderCPUThreshold"); + delayed.ExpectNone("TopNBackgroundCPU.1"); + delayed.ExpectNone("TopNBackgroundCPU.2"); + delayed.ExpectNone("System"); + delayed.ExpectNone("NonChrome"); + } + histograms.ExpectNone("DurationOverThreshold"); + } - if (GetParam()) { - ExpectCPUHistogram("AverageBackgroundCPU", "Delayed", 75); - ExpectCPUHistogram("TotalBackgroundCPU", "Delayed", 75); - ExpectCPUHistogram("TotalBackgroundTabCount", "Delayed", 1); - ExpectCPUHistogram("AverageForegroundCPU", "Delayed", 25); - ExpectCPUHistogram("TotalForegroundCPU", "Delayed", 25); - ExpectCPUHistogram("TotalForegroundTabCount", "Delayed", 1); - ExpectCPUHistogram("BackgroundTabsToGetUnderCPUThreshold", "Delayed", 1); - ExpectCPUHistogram("TopNBackgroundCPU.1", "Delayed", 75); - ExpectCPUHistogram("TopNBackgroundCPU.2", "Delayed", 75); - } else { - ExpectNoCPUHistogram("AverageBackgroundCPU", "Delayed"); - ExpectNoCPUHistogram("TotalBackgroundCPU", "Delayed"); - ExpectNoCPUHistogram("TotalBackgroundTabCount", "Delayed"); - ExpectNoCPUHistogram("AverageForegroundCPU", "Delayed"); - ExpectNoCPUHistogram("TotalForegroundCPU", "Delayed"); - ExpectNoCPUHistogram("TotalForegroundTabCount", "Delayed"); - ExpectNoCPUHistogram("BackgroundTabsToGetUnderCPUThreshold", "Delayed"); - ExpectNoCPUHistogram("TopNBackgroundCPU.1", "Delayed"); - ExpectNoCPUHistogram("TopNBackgroundCPU.2", "Delayed"); - + if (!GetParam()) { // The legacy CPU monitor only measures the CPU during - // TriggerCollectPageResourceUsage(), and returns the average CPU since the - // last call. Measure now so the next test doesn't include the last minute - // of CPU in the average. + // TriggerCollectPageResourceUsage(), and returns the average CPU since + // the last call. Measure now so the next test doesn't include the last + // minute of CPU in the average. TriggerCollectPageResourceUsage(); } - ResetHistogramTester(); // Lower CPU measurement so the duration is logged. cpu_delegate_factory_.GetDelegate(mock_graph.process.get()) .SetCPUUsage(base::SysInfo::NumberOfProcessors() / 8.0); cpu_delegate_factory_.GetDelegate(mock_graph.other_process.get()) .SetCPUUsage(base::SysInfo::NumberOfProcessors() / 8.0); - task_env().FastForwardBy(base::Minutes(1)); - TriggerCollectPageResourceUsage(); - ExpectCPUHistogram("DurationOverThreshold", - base::Minutes(2).InMilliseconds()); + { + PatternedHistogramTester histograms; - // `page` is in the foreground, and gets 50% of the `process` CPU (6.25% - // of total CPU). `other_page` is in the background, and gets 50% of the - // `process` CPU + all of the `other_process` CPU (18.75% of total CPU). + LetTimePass(); + TriggerCollectPageResourceUsage(); - ExpectCPUHistogram("AverageBackgroundCPU", "Baseline", 18); - ExpectCPUHistogram("TotalBackgroundCPU", "Baseline", 18); - ExpectCPUHistogram("TotalBackgroundTabCount", "Baseline", 1); - ExpectCPUHistogram("AverageForegroundCPU", "Baseline", 6); - ExpectCPUHistogram("TotalForegroundCPU", "Baseline", 6); - ExpectCPUHistogram("TotalForegroundTabCount", "Baseline", 1); + histograms.ExpectUniqueSample("DurationOverThreshold", + base::Minutes(2).InMilliseconds()); - ExpectNoCPUHistogram("AverageBackgroundCPU", "Immediate"); - ExpectNoCPUHistogram("TotalBackgroundCPU", "Immediate"); - ExpectNoCPUHistogram("TotalBackgroundTabCount", "Immediate"); - ExpectNoCPUHistogram("AverageForegroundCPU", "Immediate"); - ExpectNoCPUHistogram("TotalForegroundCPU", "Immediate"); - ExpectNoCPUHistogram("TotalForegroundTabCount", "Immediate"); - ExpectNoCPUHistogram("BackgroundTabsToGetUnderCPUThreshold", "Immediate"); - ExpectNoCPUHistogram("TopNBackgroundCPU.1", "Immediate"); - ExpectNoCPUHistogram("TopNBackgroundCPU.2", "Immediate"); + // `page` is in the foreground, and gets 50% of the `process` CPU (6.25% + // of total CPU). `other_page` is in the background, and gets 50% of the + // `process` CPU + all of the `other_process` CPU (18.75% of total CPU). + auto baseline = histograms.WithSuffix("Baseline"); + baseline.ExpectUniqueSample("AverageBackgroundCPU", 18); + baseline.ExpectUniqueSample("TotalBackgroundCPU", 18); + baseline.ExpectUniqueSample("TotalBackgroundTabCount", 1); + baseline.ExpectUniqueSample("AverageForegroundCPU", 6); + baseline.ExpectUniqueSample("TotalForegroundCPU", 6); + baseline.ExpectUniqueSample("TotalForegroundTabCount", 1); + baseline.ExpectTotalCount("System", 1); + baseline.ExpectTotalCount("NonChrome", 1); - ExpectNoCPUHistogram("AverageBackgroundCPU", "Delayed"); - ExpectNoCPUHistogram("TotalBackgroundCPU", "Delayed"); - ExpectNoCPUHistogram("TotalBackgroundTabCount", "Delayed"); - ExpectNoCPUHistogram("AverageForegroundCPU", "Delayed"); - ExpectNoCPUHistogram("TotalForegroundCPU", "Delayed"); - ExpectNoCPUHistogram("TotalForegroundTabCount", "Delayed"); - ExpectNoCPUHistogram("BackgroundTabsToGetUnderCPUThreshold", "Delayed"); - ExpectNoCPUHistogram("TopNBackgroundCPU.1", "Delayed"); - ExpectNoCPUHistogram("TopNBackgroundCPU.2", "Delayed"); + auto immediate = histograms.WithSuffix("Immediate"); + immediate.ExpectNone("AverageBackgroundCPU"); + immediate.ExpectNone("TotalBackgroundCPU"); + immediate.ExpectNone("TotalBackgroundTabCount"); + immediate.ExpectNone("AverageForegroundCPU"); + immediate.ExpectNone("TotalForegroundCPU"); + immediate.ExpectNone("TotalForegroundTabCount"); + immediate.ExpectNone("BackgroundTabsToGetUnderCPUThreshold"); + immediate.ExpectNone("TopNBackgroundCPU.1"); + immediate.ExpectNone("TopNBackgroundCPU.2"); + immediate.ExpectNone("System"); + immediate.ExpectNone("NonChrome"); + + auto delayed = histograms.WithSuffix("Delayed"); + delayed.ExpectNone("AverageBackgroundCPU"); + delayed.ExpectNone("TotalBackgroundCPU"); + delayed.ExpectNone("TotalBackgroundTabCount"); + delayed.ExpectNone("AverageForegroundCPU"); + delayed.ExpectNone("TotalForegroundCPU"); + delayed.ExpectNone("TotalForegroundTabCount"); + delayed.ExpectNone("BackgroundTabsToGetUnderCPUThreshold"); + delayed.ExpectNone("TopNBackgroundCPU.1"); + delayed.ExpectNone("TopNBackgroundCPU.2"); + delayed.ExpectNone("System"); + delayed.ExpectNone("NonChrome"); + } } TEST_P(PageTimelineMonitorWithFeatureTest, - TestCPUInterventionMetricsNoForegroundTabs) { + CPUInterventionMetricsNoForegroundTabs) { MockSinglePageInSingleProcessGraph mock_graph(graph()); mock_graph.page->SetType(performance_manager::PageType::kTab); cpu_delegate_factory_.GetDelegate(mock_graph.process.get()) @@ -942,30 +1073,34 @@ // Put the only tab in the background. mock_graph.page->SetIsVisible(false); - // Let an arbitrary amount of time pass so there's some CPU usage to measure. - task_env().FastForwardBy(base::Minutes(1)); + PatternedHistogramTester histograms; + LetTimePass(); TriggerCollectPageResourceUsage(); - ExpectCPUHistogram("AverageBackgroundCPU", "Baseline", 100); - ExpectCPUHistogram("TotalBackgroundCPU", "Baseline", 100); - ExpectCPUHistogram("TotalBackgroundTabCount", "Baseline", 1); + auto baseline = histograms.WithSuffix("Baseline"); + baseline.ExpectUniqueSample("AverageBackgroundCPU", 100); + baseline.ExpectUniqueSample("TotalBackgroundCPU", 100); + baseline.ExpectUniqueSample("TotalBackgroundTabCount", 1); // AverageForegroundCPU would divide by 0. - ExpectCPUHistogram("TotalForegroundCPU", "Baseline", 0); - ExpectCPUHistogram("TotalForegroundTabCount", "Baseline", 0); + baseline.ExpectNone("AverageForegroundCPU"); + baseline.ExpectUniqueSample("TotalForegroundCPU", 0); + baseline.ExpectUniqueSample("TotalForegroundTabCount", 0); - ExpectCPUHistogram("AverageBackgroundCPU", "Immediate", 100); - ExpectCPUHistogram("TotalBackgroundCPU", "Immediate", 100); - ExpectCPUHistogram("TotalBackgroundTabCount", "Immediate", 1); + auto immediate = histograms.WithSuffix("Immediate"); + immediate.ExpectUniqueSample("AverageBackgroundCPU", 100); + immediate.ExpectUniqueSample("TotalBackgroundCPU", 100); + immediate.ExpectUniqueSample("TotalBackgroundTabCount", 1); // AverageForegroundCPU would divide by 0. - ExpectCPUHistogram("TotalForegroundCPU", "Immediate", 0); - ExpectCPUHistogram("TotalForegroundTabCount", "Immediate", 0); - ExpectCPUHistogram("BackgroundTabsToGetUnderCPUThreshold", "Immediate", 1); - ExpectCPUHistogram("TopNBackgroundCPU.1", "Immediate", 100); - ExpectCPUHistogram("TopNBackgroundCPU.2", "Immediate", 100); + immediate.ExpectNone("AverageForegroundCPU"); + immediate.ExpectUniqueSample("TotalForegroundCPU", 0); + immediate.ExpectUniqueSample("TotalForegroundTabCount", 0); + immediate.ExpectUniqueSample("BackgroundTabsToGetUnderCPUThreshold", 1); + immediate.ExpectUniqueSample("TopNBackgroundCPU.1", 100); + immediate.ExpectUniqueSample("TopNBackgroundCPU.2", 100); } TEST_P(PageTimelineMonitorWithFeatureTest, - TestCPUInterventionMetricsNoBackgroundTabs) { + CPUInterventionMetricsNoBackgroundTabs) { MockSinglePageInSingleProcessGraph mock_graph(graph()); mock_graph.page->SetType(performance_manager::PageType::kTab); cpu_delegate_factory_.GetDelegate(mock_graph.process.get()) @@ -974,28 +1109,64 @@ // Put the only tab in the foreground. mock_graph.page->SetIsVisible(true); - // Let an arbitrary amount of time pass so there's some CPU usage to measure. - task_env().FastForwardBy(base::Minutes(1)); + PatternedHistogramTester histograms; + LetTimePass(); TriggerCollectPageResourceUsage(); + auto baseline = histograms.WithSuffix("Baseline"); // AverageBackgroundCPU would divide by 0. - ExpectCPUHistogram("TotalBackgroundCPU", "Baseline", 0); - ExpectCPUHistogram("TotalBackgroundTabCount", "Baseline", 0); - ExpectCPUHistogram("AverageForegroundCPU", "Baseline", 100); - ExpectCPUHistogram("TotalForegroundCPU", "Baseline", 100); - ExpectCPUHistogram("TotalForegroundTabCount", "Baseline", 1); + baseline.ExpectNone("AverageBackgroundCPU"); + baseline.ExpectUniqueSample("TotalBackgroundCPU", 0); + baseline.ExpectUniqueSample("TotalBackgroundTabCount", 0); + baseline.ExpectUniqueSample("AverageForegroundCPU", 100); + baseline.ExpectUniqueSample("TotalForegroundCPU", 100); + baseline.ExpectUniqueSample("TotalForegroundTabCount", 1); + auto immediate = histograms.WithSuffix("Immediate"); // AverageBackgroundCPU would divide by 0. - ExpectCPUHistogram("TotalBackgroundCPU", "Immediate", 0); - ExpectCPUHistogram("TotalBackgroundTabCount", "Immediate", 0); - ExpectCPUHistogram("AverageForegroundCPU", "Immediate", 100); - ExpectCPUHistogram("TotalForegroundCPU", "Immediate", 100); - ExpectCPUHistogram("TotalForegroundTabCount", "Immediate", 1); + immediate.ExpectNone("AverageBackgroundCPU"); + immediate.ExpectUniqueSample("TotalBackgroundCPU", 0); + immediate.ExpectUniqueSample("TotalBackgroundTabCount", 0); + immediate.ExpectUniqueSample("AverageForegroundCPU", 100); + immediate.ExpectUniqueSample("TotalForegroundCPU", 100); + immediate.ExpectUniqueSample("TotalForegroundTabCount", 1); // BackgroundTabsToGetUnderCPUThreshold is basically infinite (goes in the // overflow bucket.) - ExpectCPUHistogram("BackgroundTabsToGetUnderCPUThreshold", "Immediate", 9999); - ExpectCPUHistogram("TopNBackgroundCPU.1", "Immediate", 0); - ExpectCPUHistogram("TopNBackgroundCPU.2", "Immediate", 0); + immediate.ExpectUniqueSample("BackgroundTabsToGetUnderCPUThreshold", 9999); + immediate.ExpectUniqueSample("TopNBackgroundCPU.1", 0); + immediate.ExpectUniqueSample("TopNBackgroundCPU.2", 0); +} + +TEST_F(PageTimelineMonitorNoCPUProbeTest, + CPUInterventionMetricsWithoutSystemCPU) { + MockSinglePageInSingleProcessGraph mock_graph(graph()); + mock_graph.page->SetType(performance_manager::PageType::kTab); + mock_graph.page->SetIsVisible(false); + + cpu_delegate_factory_.GetDelegate(mock_graph.process.get()) + .SetCPUUsage(base::SysInfo::NumberOfProcessors()); + + PatternedHistogramTester histograms; + LetTimePass(); + // Let enough time pass for Delayed histograms to be logged too. + LetTimePass(); + TriggerCollectPageResourceUsage(); + + // Ensure each type of metrics were collected. + auto baseline = histograms.WithSuffix("Baseline"); + baseline.ExpectUniqueSample("TotalBackgroundTabCount", 1); + auto immediate = histograms.WithSuffix("Immediate"); + immediate.ExpectUniqueSample("TotalBackgroundTabCount", 1); + auto delayed = histograms.WithSuffix("Immediate"); + delayed.ExpectUniqueSample("TotalBackgroundTabCount", 1); + + // System CPU should be safely skipped when CPU probe is not available. + baseline.ExpectNone("System"); + baseline.ExpectNone("NonChrome"); + immediate.ExpectNone("System"); + immediate.ExpectNone("NonChrome"); + delayed.ExpectNone("System"); + delayed.ExpectNone("NonChrome"); } #endif
diff --git a/chrome/browser/resource_coordinator/tab_manager_delegate_chromeos.cc b/chrome/browser/resource_coordinator/tab_manager_delegate_chromeos.cc index 5e47007..e3428ae 100644 --- a/chrome/browser/resource_coordinator/tab_manager_delegate_chromeos.cc +++ b/chrome/browser/resource_coordinator/tab_manager_delegate_chromeos.cc
@@ -63,6 +63,9 @@ // The default interval after which to adjust OOM scores. constexpr base::TimeDelta kAdjustmentInterval = base::Seconds(10); +// The minimum interval between ReportProcesses. +constexpr base::TimeDelta kPidsReportMinimalInterval = base::Seconds(3); + // When switching to a new tab the tab's renderer's OOM score needs to be // updated to reflect its front-most status and protect it from discard. // However, doing this immediately might slow down tab switch time, so wait @@ -279,6 +282,8 @@ base::ProcessHandle pid = contents->GetPrimaryMainFrame()->GetProcess()->GetProcess().Handle(); AdjustFocusedTabScore(pid); + + ListProcessesThrottled(); } void TabManagerDelegate::OnWindowActivated( @@ -409,6 +414,7 @@ void TabManagerDelegate::OnRenderProcessHostCreated( content::RenderProcessHost* host) { + ListProcessesThrottled(); if (!host_observation_.IsObservingSource(host)) { host_observation_.AddObservation(host); } @@ -442,6 +448,7 @@ .ptr() ->GetProcess(); AdjustFocusedTabScore(render_host->GetProcess().Handle()); + ListProcessesThrottled(); } // Do not handle the "else" case when it changes to invisible because // 1. The behavior is a bit awkward in that when switching from tab A to @@ -835,4 +842,76 @@ } } +void TabManagerDelegate::ListProcessesThrottled() { + DCHECK_CURRENTLY_ON(BrowserThread::UI); + ++tab_event_sequence_; + base::TimeTicks now = base::TimeTicks::Now(); + if (now - last_pids_report_ > kPidsReportMinimalInterval) { + ListProcesses(); + } else if (!delayed_report_timer_.IsRunning()) { + // If the delay timer is already scheduled, don't have to reschedule it. + base::TimeTicks next_report_time = + last_pids_report_ + kPidsReportMinimalInterval; + delayed_report_timer_.Start(FROM_HERE, /*delay=*/next_report_time - now, + this, + &TabManagerDelegate::ListProcessesDelayed); + } +} + +void TabManagerDelegate::ListProcessesDelayed() { + DCHECK_CURRENTLY_ON(BrowserThread::UI); + if (tab_report_sequence_ != tab_event_sequence_) { + ListProcesses(); + } +} + +void TabManagerDelegate::ListProcesses() { + if (g_browser_process->IsShuttingDown()) { + return; + } + + last_pids_report_ = base::TimeTicks::Now(); + tab_report_sequence_ = tab_event_sequence_; + + std::vector<ash::ResourcedClient::Process> processes; + for (LifecycleUnit* lifecycle_unit : GetLifecycleUnits()) { + base::ProcessHandle pid = lifecycle_unit->GetProcessHandle(); + // lifecycle_units contains entries for already-discarded tabs. If the pid + // is zero, we don't need to report it. + if (pid == base::kNullProcessHandle) { + continue; + } + + DecisionDetails decision_details; + bool is_protected = false; + bool is_visible = false; + bool is_focused = false; + if (!lifecycle_unit->CanDiscard( + ::mojom::LifecycleUnitDiscardReason::EXTERNAL, &decision_details)) { + if (!decision_details.reasons().empty() && + decision_details.FailureReason() == + DecisionFailureReason::LIVE_STATE_VISIBLE) { + is_visible = true; + + if (lifecycle_unit->GetLastFocusedTime() == base::TimeTicks::Max()) { + is_focused = true; + } + } + is_protected = true; + } + processes.emplace_back(pid, is_protected, is_visible, is_focused); + } + + ReportProcesses(processes); +} + +void TabManagerDelegate::ReportProcesses( + const std::vector<ash::ResourcedClient::Process>& processes) { + ash::ResourcedClient* client = ash::ResourcedClient::Get(); + if (client) { + client->ReportBrowserProcesses(ash::ResourcedClient::Component::kAsh, + processes); + } +} + } // namespace resource_coordinator
diff --git a/chrome/browser/resource_coordinator/tab_manager_delegate_chromeos.h b/chrome/browser/resource_coordinator/tab_manager_delegate_chromeos.h index d5124ba2..e6383c5a 100644 --- a/chrome/browser/resource_coordinator/tab_manager_delegate_chromeos.h +++ b/chrome/browser/resource_coordinator/tab_manager_delegate_chromeos.h
@@ -28,6 +28,7 @@ #include "chrome/browser/resource_coordinator/tab_manager.h" #include "chrome/browser/ui/browser_list_observer.h" #include "chromeos/ash/components/dbus/debug_daemon/debug_daemon_client.h" +#include "chromeos/ash/components/dbus/resourced/resourced_client.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" #include "content/public/browser/render_process_host_creation_observer.h" @@ -115,6 +116,10 @@ // Get debugd client instance. Virtual for unit testing. virtual ash::DebugDaemonClient* GetDebugDaemonClient(); + // Report process list of tab mainframes. Virtual for unit testing. + virtual void ReportProcesses( + const std::vector<ash::ResourcedClient::Process>& processes); + private: FRIEND_TEST_ALL_PREFIXES(TabManagerDelegateTest, CandidatesSorted); FRIEND_TEST_ALL_PREFIXES(TabManagerDelegateTest, @@ -127,6 +132,7 @@ FRIEND_TEST_ALL_PREFIXES(TabManagerDelegateTest, KillMultipleProcesses); FRIEND_TEST_ALL_PREFIXES(TabManagerDelegateTest, SetOomScoreAdj); FRIEND_TEST_ALL_PREFIXES(TabManagerDelegateTest, TestDiscardedTabsAreSkipped); + FRIEND_TEST_ALL_PREFIXES(TabManagerDelegateTest, ReportProcesses); using OptionalArcProcessList = arc::ArcProcessService::OptionalArcProcessList; @@ -223,6 +229,15 @@ return base::Seconds(60); } + // The listing is throttled to avoid too frequent reporting. + void ListProcessesThrottled(); + + // Called by |delayed_report_timer_|. + void ListProcessesDelayed(); + + // List the tab processes for reporting. + void ListProcesses(); + // The OOM adjustment score for persistent ARC processes. static const int kPersistentArcAppOomScore; @@ -255,6 +270,17 @@ // Util for getting system memory status. std::unique_ptr<TabManagerDelegate::MemoryStat> mem_stat_; + // For throttling the renderer process list reporting. + base::TimeTicks last_pids_report_ = base::TimeTicks::Now(); + + // Delay the reporting if it's less than the minimum interval since last + // reporting. + base::OneShotTimer delayed_report_timer_; + + // Sequences to check if the last tab event is handled. + uint64_t tab_event_sequence_ = 0; + uint64_t tab_report_sequence_ = 0; + // Weak pointer factory used for posting tasks to other threads. base::WeakPtrFactory<TabManagerDelegate> weak_ptr_factory_{this}; };
diff --git a/chrome/browser/resource_coordinator/tab_manager_delegate_chromeos_unittest.cc b/chrome/browser/resource_coordinator/tab_manager_delegate_chromeos_unittest.cc index b0e2481..9ffab27 100644 --- a/chrome/browser/resource_coordinator/tab_manager_delegate_chromeos_unittest.cc +++ b/chrome/browser/resource_coordinator/tab_manager_delegate_chromeos_unittest.cc
@@ -144,6 +144,10 @@ return TabManagerDelegate::IsRecentlyKilledArcProcess(process_name, now); } + std::vector<ash::ResourcedClient::Process> GetReportedProcesses() { + return processes_; + } + protected: bool KillArcProcess(const int nspid) override { killed_arc_processes_.push_back(nspid); @@ -162,12 +166,18 @@ return &debugd_client_; } + void ReportProcesses( + const std::vector<ash::ResourcedClient::Process>& processes) override { + processes_ = processes; + } + private: LifecycleUnitVector lifecycle_units_; ash::FakeDebugDaemonClient debugd_client_; std::vector<int> killed_arc_processes_; LifecycleUnitVector killed_tabs_; bool always_return_true_from_is_recently_killed_; + std::vector<ash::ResourcedClient::Process> processes_; }; class MockMemoryStat : public TabManagerDelegate::MemoryStat { @@ -457,4 +467,53 @@ ASSERT_EQ(&tab1, killed_tabs[0]); } +TEST_F(TabManagerDelegateTest, ReportProcesses) { + MockTabManagerDelegate tab_manager_delegate; + + // Tab list: + // tab1 pid: 11 + // tab2 pid: 12 + // tab3 pid: 13 + // tab4 pid: 14 + // tab5 pid: 15, protected + // tab6 pid: 16, protected, focused + TestLifecycleUnit tab1(base::TimeTicks(), 11); + tab_manager_delegate.AddLifecycleUnit(&tab1); + TestLifecycleUnit tab2(base::TimeTicks(), 12); + tab_manager_delegate.AddLifecycleUnit(&tab2); + TestLifecycleUnit tab3(base::TimeTicks(), 13); + tab_manager_delegate.AddLifecycleUnit(&tab3); + TestLifecycleUnit tab4(base::TimeTicks(), 14); + tab_manager_delegate.AddLifecycleUnit(&tab4); + TestLifecycleUnit tab5(base::TimeTicks(), 15, false); + tab_manager_delegate.AddLifecycleUnit(&tab5); + TestLifecycleUnit tab6(base::TimeTicks(), 16, false); + tab6.SetDiscardFailureReason(DecisionFailureReason::LIVE_STATE_VISIBLE); + tab6.SetLastFocusedTime(base::TimeTicks::Max()); + tab_manager_delegate.AddLifecycleUnit(&tab6); + + tab_manager_delegate.ListProcesses(); + + auto processes = tab_manager_delegate.GetReportedProcesses(); + EXPECT_EQ(processes[0].pid, 11); + EXPECT_EQ(processes[0].is_protected, false); + EXPECT_EQ(processes[0].is_visible, false); + EXPECT_EQ(processes[1].pid, 12); + EXPECT_EQ(processes[1].is_protected, false); + EXPECT_EQ(processes[1].is_visible, false); + EXPECT_EQ(processes[2].pid, 13); + EXPECT_EQ(processes[2].is_protected, false); + EXPECT_EQ(processes[2].is_visible, false); + EXPECT_EQ(processes[3].pid, 14); + EXPECT_EQ(processes[3].is_protected, false); + EXPECT_EQ(processes[3].is_visible, false); + EXPECT_EQ(processes[4].pid, 15); + EXPECT_EQ(processes[4].is_protected, true); + EXPECT_EQ(processes[4].is_visible, false); + EXPECT_EQ(processes[5].pid, 16); + EXPECT_EQ(processes[5].is_protected, true); + EXPECT_EQ(processes[5].is_visible, true); + EXPECT_EQ(processes[5].is_focused, true); +} + } // namespace resource_coordinator
diff --git a/chrome/browser/resources/ash/settings/os_settings_search_box/os_settings_search_box.html b/chrome/browser/resources/ash/settings/os_settings_search_box/os_settings_search_box.html index 0b8102cf..c45f83cb 100644 --- a/chrome/browser/resources/ash/settings/os_settings_search_box/os_settings_search_box.html +++ b/chrome/browser/resources/ash/settings/os_settings_search_box/os_settings_search_box.html
@@ -37,7 +37,8 @@ cr-toolbar-search-field { --cr-toolbar-search-field-term-margin: 0; - --cr-toolbar-search-field-border-radius: 20px; + --cr-toolbar-search-field-border-radius: + var(--settings-toolbar-search-field-border-radius); --cr-toolbar-search-field-paper-spinner-margin: 0 12px; --cr-toolbar-search-field-input-icon-color: var(--cros-icon-color-primary); @@ -48,6 +49,8 @@ var(--cros-text-color-secondary); --cr-toolbar-icon-button-focus-outline-color: var(--cros-focus-ring-color); + --cr-toolbar-field-max-width: var(--cr-toolbar-field-width); + height: var(--settings-toolbar-search-box-height); font-size: 13px; } @@ -56,7 +59,7 @@ } :host([narrow]:not([showing-search])) cr-toolbar-search-field { - padding-inline-end: 10px; + padding-inline-end: var(--settings-toolbar-padding-inline-end); } :host(:focus-within[showing-search]) cr-toolbar-search-field {
diff --git a/chrome/browser/resources/ash/settings/os_toolbar/os_toolbar.html b/chrome/browser/resources/ash/settings/os_toolbar/os_toolbar.html index 8d49482..5312569 100644 --- a/chrome/browser/resources/ash/settings/os_toolbar/os_toolbar.html +++ b/chrome/browser/resources/ash/settings/os_toolbar/os_toolbar.html
@@ -1,11 +1,11 @@ -<style include="cr-icons cr-hidden-style"> +<style include="cr-icons cr-hidden-style settings-shared"> :host { align-items: center; background-color: var(--cros-sys-app_base_shaded); color: var(--cros-text-color-secondary); display: flex; - height: var(--cr-toolbar-height); - padding-top: var(--cr-toolbar-padding-top); + height: var(--settings-toolbar-height); + padding-top: var(--settings-toolbar-padding-top); } h1 { @@ -18,6 +18,11 @@ padding-inline-end: 12px; } + :host-context(body.revamp-wayfinding-enabled) h1 { + color: var(--cros-sys-primary); + font: var(--cros-title-1-font); + } + #leftContent { position: relative; transition: opacity 100ms; @@ -27,13 +32,13 @@ align-items: center; box-sizing: border-box; display: flex; - /* 8px to match #rightSpacer + 6px to align with icons in menus. */ - padding-inline-start: 14px; + padding-inline-start: var(--settings-toolbar-padding-inline-start); width: var(--settings-menu-width); } :host([narrow]) #leftSpacer { width: 20px; + padding-inline-start: var(--settings-toolbar-padding-inline-start-narrow); } cr-icon-button { @@ -73,18 +78,25 @@ } :host([showing-search_][is-search-box-cutoff_]) os-settings-search-box { - --cr-toolbar-field-width: 80vw; /* Ensures the input is not cutoff. */ - margin-inline-start: 48px; /* No overlap with #leftContent. */ + --cr-toolbar-field-width: min(80vw, + var(--settings-toolbar-search-box-width)); + /* No overlap with #leftContent. */ + margin-inline-start: 48px; + } + + :host([showing-search_][is-search-box-cutoff_][narrow]) os-settings-search-box { + --cr-toolbar-field-width: min(80vw, + var(--settings-toolbar-narrow-search-box-width)); } :host([showing-search_][narrow]:not([is-search-box-cutoff_])) os-settings-search-box { - --cr-toolbar-field-width: 680px; + --cr-toolbar-field-width: var(--settings-toolbar-narrow-search-box-width); } :host(:not([narrow]):not([is-search-box-cutoff_])) os-settings-search-box { - --cr-toolbar-field-width: 480px; + --cr-toolbar-field-width: var(--settings-toolbar-search-box-width); } :host(:not([narrow])) #leftContent {
diff --git a/chrome/browser/resources/ash/settings/os_toolbar/os_toolbar.ts b/chrome/browser/resources/ash/settings/os_toolbar/os_toolbar.ts index c620d80..f2208160 100644 --- a/chrome/browser/resources/ash/settings/os_toolbar/os_toolbar.ts +++ b/chrome/browser/resources/ash/settings/os_toolbar/os_toolbar.ts
@@ -10,6 +10,7 @@ import 'chrome://resources/polymer/v3_0/iron-media-query/iron-media-query.js'; import 'chrome://resources/cr_elements/cr_toolbar/cr_toolbar_search_field.js'; import '../os_settings_search_box/os_settings_search_box.js'; +import '../settings_shared.css.js'; import {CrToolbarSearchFieldElement} from 'chrome://resources/cr_elements/cr_toolbar/cr_toolbar_search_field.js'; import {PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js';
diff --git a/chrome/browser/resources/ash/settings/settings_vars.css b/chrome/browser/resources/ash/settings/settings_vars.css index d6023df..cac05b60 100644 --- a/chrome/browser/resources/ash/settings/settings_vars.css +++ b/chrome/browser/resources/ash/settings/settings_vars.css
@@ -26,6 +26,16 @@ --settings-menu-width: 250px; --settings-menu-item-border-width: 2px; + + --settings-toolbar-height: var(--cr-toolbar-height); + --settings-toolbar-padding-inline-end: 10px; + --settings-toolbar-padding-inline-start: 14px; + --settings-toolbar-padding-inline-start-narrow: 14px; + --settings-toolbar-padding-top: var(--cr-toolbar-padding-top); + --settings-toolbar-search-box-height: 40px; + --settings-toolbar-search-box-width: 480px; + --settings-toolbar-narrow-search-box-width: 680px; + --settings-toolbar-search-field-border-radius: 20px; } /* TODO(b/302374851) Move these vars into the html block above once the feature @@ -33,6 +43,14 @@ */ body.revamp-wayfinding-enabled { --settings-menu-width: 280px; + --settings-toolbar-height: 72px; + --settings-toolbar-padding-inline-end: 16px; + --settings-toolbar-padding-inline-start: 32px; + --settings-toolbar-padding-inline-start-narrow: 16px; + --settings-toolbar-padding-top: 0; + --settings-toolbar-search-box-height: 48px; + --settings-toolbar-narrow-search-box-width: 512px; + --settings-toolbar-search-field-border-radius: 24px; } @media (prefers-color-scheme: dark) {
diff --git a/chrome/browser/resources/chromeos/accessibility/accessibility_common/magnifier/magnifier.js b/chrome/browser/resources/chromeos/accessibility/accessibility_common/magnifier/magnifier.js index 5531cbb..39087070 100644 --- a/chrome/browser/resources/chromeos/accessibility/accessibility_common/magnifier/magnifier.js +++ b/chrome/browser/resources/chromeos/accessibility/accessibility_common/magnifier/magnifier.js
@@ -36,12 +36,6 @@ this.isInitializing_ = true; /** - * Last seen mouse location (cached from event in onMouseMovedOrDragged). - * @private {{x: number, y: number}} - */ - this.mouseLocation_; - - /** * Last time mouse has moved (from last onMouseMovedOrDragged). * @private {Date} */ @@ -295,7 +289,6 @@ */ onMouseMovedOrDragged_(event) { this.lastMouseMovedTime_ = new Date(); - this.mouseLocation_ = {x: event.mouseX, y: event.mouseY}; } /**
diff --git a/chrome/browser/resources/chromeos/accessibility/chromevox/panel/panel.js b/chrome/browser/resources/chromeos/accessibility/chromevox/panel/panel.js index a5f4572..01217ed 100644 --- a/chrome/browser/resources/chromeos/accessibility/chromevox/panel/panel.js +++ b/chrome/browser/resources/chromeos/accessibility/chromevox/panel/panel.js
@@ -306,84 +306,75 @@ await BackgroundBridge.PanelBackground.saveCurrentNode(); this.setMode_(PanelMode.FULLSCREEN_MENUS); - const onFocusDo = async () => { - window.removeEventListener('focus', onFocusDo); - // Clear any existing menus and clear the callback. - this.menuManager_.clearMenus(); - this.pendingCallback_ = null; - - const eventSource = await BackgroundBridge.EventSource.get(); - const touchScreen = (eventSource === EventSourceType.TOUCH_GESTURE); - - // Build the top-level menus. - const searchMenu = this.menuManager_.addSearchMenu('panel_search_menu'); - const jumpMenu = this.menuManager_.addMenu('panel_menu_jump'); - const speechMenu = this.menuManager_.addMenu('panel_menu_speech'); - const touchMenu = touchScreen ? - this.menuManager_.addMenu('panel_menu_touchgestures') : - null; - const chromevoxMenu = this.menuManager_.addMenu('panel_menu_chromevox'); - const actionsMenu = this.menuManager_.addMenu('panel_menu_actions'); - - // Add a menu item that opens the full list of ChromeBook keyboard - // shortcuts. We want this to be at the top of the ChromeVox menu. - await this.menuManager_.addOSKeyboardShortcutsMenuItem(chromevoxMenu); - - // Create a mapping between categories from CommandStore, and our - // top-level menus. Some categories aren't mapped to any menu. - const categoryToMenu = this.menuManager_.makeCategoryMapping( - actionsMenu, chromevoxMenu, jumpMenu, speechMenu); - - // Make a copy of the key bindings, get the localized title of each - // command, and then sort them. - const sortedBindings = await this.menuManager_.getSortedKeyBindings(); - - // Insert items from the bindings into the menus. - const bindingMap = this.menuManager_.makeBindingMap(sortedBindings); - for (const binding of bindingMap.values()) { - const category = CommandStore.categoryForCommand(binding.command); - const menu = category ? categoryToMenu[category] : null; - this.menuManager_.addMenuItemFromKeyBinding(binding, menu, touchScreen); - } - - // Add Touch Gestures menu items. - if (touchMenu) { - this.menuManager_.addTouchGestureMenuItems(touchMenu); - } - - if (this.sessionState_ !== 'IN_SESSION') { - this.menuManager_.denySignedOut(); - } - - // Add a menu item that disables / closes ChromeVox. - chromevoxMenu.addMenuItem( - Msgs.getMsg('disable_chromevox'), 'Ctrl+Alt+Z', '', '', - async () => this.onClose_()); - - for (const menuData of ALL_PANEL_MENU_NODE_DATA) { - this.menuManager_.addNodeMenu(menuData); - } - await BackgroundBridge.PanelBackground.createAllNodeMenuBackgrounds( - opt_activateMenuTitle); - - await this.menuManager_.addActionsMenuItems(actionsMenu, bindingMap); - - // Activate either the specified menu or the search menu. - const selectedMenu = - this.menuManager_.getSelectedMenu(opt_activateMenuTitle); - - const activateFirstItem = (selectedMenu !== this.menuManager_.searchMenu); - this.menuManager_.activateMenu(selectedMenu, activateFirstItem); - }; - // The panel does not get focus immediately when we request to be full // screen (handled in ChromeVoxPanel natively on hash changed). Wait, if // needed, for focus to begin initialization. - if (document.hasFocus()) { - onFocusDo(); - } else { - window.addEventListener('focus', onFocusDo); + if (!document.hasFocus()) { + await waitForWindowFocus(); } + + const eventSource = await BackgroundBridge.EventSource.get(); + const touchScreen = (eventSource === EventSourceType.TOUCH_GESTURE); + + // Build the top-level menus. + const searchMenu = this.menuManager_.addSearchMenu('panel_search_menu'); + const jumpMenu = this.menuManager_.addMenu('panel_menu_jump'); + const speechMenu = this.menuManager_.addMenu('panel_menu_speech'); + const touchMenu = touchScreen ? + this.menuManager_.addMenu('panel_menu_touchgestures') : + null; + const chromevoxMenu = this.menuManager_.addMenu('panel_menu_chromevox'); + const actionsMenu = this.menuManager_.addMenu('panel_menu_actions'); + + // Add a menu item that opens the full list of ChromeBook keyboard + // shortcuts. We want this to be at the top of the ChromeVox menu. + await this.menuManager_.addOSKeyboardShortcutsMenuItem(chromevoxMenu); + + // Create a mapping between categories from CommandStore, and our + // top-level menus. Some categories aren't mapped to any menu. + const categoryToMenu = this.menuManager_.makeCategoryMapping( + actionsMenu, chromevoxMenu, jumpMenu, speechMenu); + + // Make a copy of the key bindings, get the localized title of each + // command, and then sort them. + const sortedBindings = await this.menuManager_.getSortedKeyBindings(); + + // Insert items from the bindings into the menus. + const bindingMap = this.menuManager_.makeBindingMap(sortedBindings); + for (const binding of bindingMap.values()) { + const category = CommandStore.categoryForCommand(binding.command); + const menu = category ? categoryToMenu[category] : null; + this.menuManager_.addMenuItemFromKeyBinding(binding, menu, touchScreen); + } + + // Add Touch Gestures menu items. + if (touchMenu) { + this.menuManager_.addTouchGestureMenuItems(touchMenu); + } + + if (this.sessionState_ !== 'IN_SESSION') { + this.menuManager_.denySignedOut(); + } + + // Add a menu item that disables / closes ChromeVox. + chromevoxMenu.addMenuItem( + Msgs.getMsg('disable_chromevox'), 'Ctrl+Alt+Z', '', '', + async () => this.onClose_()); + + for (const menuData of ALL_PANEL_MENU_NODE_DATA) { + this.menuManager_.addNodeMenu(menuData); + } + await BackgroundBridge.PanelBackground.createAllNodeMenuBackgrounds( + opt_activateMenuTitle); + + await this.menuManager_.addActionsMenuItems(actionsMenu, bindingMap); + + // Activate either the specified menu or the search menu. + const selectedMenu = + this.menuManager_.getSelectedMenu(opt_activateMenuTitle); + + const activateFirstItem = (selectedMenu !== this.menuManager_.searchMenu); + this.menuManager_.activateMenu(selectedMenu, activateFirstItem); } /** @@ -915,6 +906,11 @@ } } +async function waitForWindowFocus() { + return new Promise( + resolve => window.addEventListener('focus', resolve, {once: true})); +} + window.addEventListener('load', async () => await Panel.init(), false); /** @type {Panel} */
diff --git a/chrome/browser/resources/chromeos/emoji_picker/emoji_picker.html b/chrome/browser/resources/chromeos/emoji_picker/emoji_picker.html index efd30089..df502cb7 100644 --- a/chrome/browser/resources/chromeos/emoji_picker/emoji_picker.html +++ b/chrome/browser/resources/chromeos/emoji_picker/emoji_picker.html
@@ -422,6 +422,7 @@ group-id="[[item.groupId]]" active="[[item.active]]" disabled="[[item.disabled]]" + jelly-support$="[[jellySupport]]" name="[[item.name]]" class="tab" on-focus="preventV2TabScrolling" @@ -440,6 +441,7 @@ group-id="[[item.groupId]]" active="[[item.active]]" disabled="[[item.disabled]]" + jelly-support$="[[jellySupport]]" name="[[item.name]]" class="tab" on-focus="preventV2TabScrolling" @@ -493,6 +495,7 @@ group-id="[[dummyTab.groupId]]" active="[[dummyTab.active]]" disabled="[[dummyTab.disabled]]" + jelly-support$="[[jellySupport]]" name="[[dummyTab.name]]" class="tab" on-focus="preventV2TabScrolling"
diff --git a/chrome/browser/resources/chromeos/emoji_picker/emoji_picker.ts b/chrome/browser/resources/chromeos/emoji_picker/emoji_picker.ts index 7eb3dfd..698800be 100644 --- a/chrome/browser/resources/chromeos/emoji_picker/emoji_picker.ts +++ b/chrome/browser/resources/chromeos/emoji_picker/emoji_picker.ts
@@ -74,7 +74,13 @@ return { category: {type: String, value: 'emoji', observer: 'onCategoryChanged'}, emojiGroupTabs: {type: Array}, - dummyTab: {type: Object, value: () => ({})}, + dummyTab: {type: Object, value: () => ({ + name: '', + groupId: '-1', + active: false, + disabled: false, + category: CategoryEnum.GIF, + })}, categoriesData: {type: Array, value: () => ([])}, categoriesGroupElements: {type: Array, value: () => ([])}, activeInfiniteGroupId: {type: String, value: null},
diff --git a/chrome/browser/resources/chromeos/emoji_picker/text_group_button.html b/chrome/browser/resources/chromeos/emoji_picker/text_group_button.html index ef3a148c..6ab4288 100644 --- a/chrome/browser/resources/chromeos/emoji_picker/text_group_button.html +++ b/chrome/browser/resources/chromeos/emoji_picker/text_group_button.html
@@ -40,5 +40,5 @@ on-click="handleClick" custom-tab-index="[[customTabIndex]]" aria-pressed$="[[getAriaPressedState(active)]]"> - [[toUpperCase(name)]] + [[maybeToUpperCase(name, jellySupport)]] </cr-button>
diff --git a/chrome/browser/resources/chromeos/emoji_picker/text_group_button.ts b/chrome/browser/resources/chromeos/emoji_picker/text_group_button.ts index 8562126..03cede4 100644 --- a/chrome/browser/resources/chromeos/emoji_picker/text_group_button.ts +++ b/chrome/browser/resources/chromeos/emoji_picker/text_group_button.ts
@@ -25,6 +25,7 @@ groupId: {type: String, readonly: true}, active: {type: Boolean, value: false}, disabled: {type: Boolean, value: false}, + jellySupport: {type: Boolean, value: false}, customTabIndex: {type: Number, value: -1}, }; } @@ -47,7 +48,12 @@ return active ? 'text-group-active' : ''; } - private toUpperCase(text: string) { + private maybeToUpperCase(text: string, jellySupport: boolean) { + // With Jelly flag on, we do not capitalize texts here. + // TODO(b/263055563): Remove this flag once Jelly is default on. + if (jellySupport) { + return text; + } return text.toUpperCase(); }
diff --git a/chrome/browser/resources/side_panel/read_anything/app.ts b/chrome/browser/resources/side_panel/read_anything/app.ts index 0ed5314..3bf3ace 100644 --- a/chrome/browser/resources/side_panel/read_anything/app.ts +++ b/chrome/browser/resources/side_panel/read_anything/app.ts
@@ -68,18 +68,18 @@ // A two-way map where each key is unique and each value is unique. The keys are // DOM nodes and the values are numbers, representing AXNodeIDs. -class TwoWayMap extends Map { - #reverseMap; +class TwoWayMap<K, V> extends Map<K, V> { + #reverseMap: Map<V, K>; constructor() { super(); this.#reverseMap = new Map(); } - override set(key: Node, value: number) { + override set(key: K, value: V) { super.set(key, value); this.#reverseMap.set(value, key); return this; } - keyFrom(value: number) { + keyFrom(value: V) { return this.#reverseMap.get(value); } override clear() { @@ -172,7 +172,7 @@ // Maps a DOM node to the AXNodeID that was used to create it. DOM nodes and // AXNodeIDs are unique, so this is a two way map where either DOM node or // AXNodeID can be used to access the other. - private domNodeToAxNodeIdMap_: TwoWayMap = new TwoWayMap(); + private domNodeToAxNodeIdMap_: TwoWayMap<Node, number> = new TwoWayMap(); private scrollingOnSelection_: boolean; private hasContent_: boolean;
diff --git a/chrome/browser/resources/side_panel/read_anything/read_anything.d.ts b/chrome/browser/resources/side_panel/read_anything/read_anything.d.ts index f909437e..1003648 100644 --- a/chrome/browser/resources/side_panel/read_anything/read_anything.d.ts +++ b/chrome/browser/resources/side_panel/read_anything/read_anything.d.ts
@@ -4,6 +4,11 @@ /** @fileoverview Definitions for chrome.readingMode API */ +// Add non-standard function to element for TS to compile correctly. +interface Element { + scrollIntoViewIfNeeded: () => void; +} + declare namespace chrome { export namespace readingMode { /////////////////////////////////////////////////////////////////////
diff --git a/chrome/browser/resources/tab_search/tab_organization_page.html b/chrome/browser/resources/tab_search/tab_organization_page.html index b701381a..cc32a5dd 100644 --- a/chrome/browser/resources/tab_search/tab_organization_page.html +++ b/chrome/browser/resources/tab_search/tab_organization_page.html
@@ -3,90 +3,119 @@ --standard-curve: cubic-bezier(0.2, 0.0, 0, 1.0); } - tab-organization-not-started:not([hidden]), - tab-organization-in-progress:not([hidden]), - tab-organization-results:not([hidden]), - tab-organization-failure:not([hidden]) { - animation: fadeIn 200ms linear, - paddingIn 250ms var(--standard-curve); + tab-organization-not-started, + tab-organization-in-progress, + tab-organization-results, + tab-organization-failure { display: flex; } - :host(.changed-state) tab-organization-not-started:not([hidden]), - :host(.changed-state) tab-organization-in-progress:not([hidden]), - :host(.changed-state) tab-organization-results:not([hidden]), - :host(.changed-state) tab-organization-failure:not([hidden]) { - animation: fadeIn 100ms linear 100ms, - displayIn 200ms linear, - paddingIn 250ms var(--standard-curve); - display: flex; + tab-organization-not-started[shown], + tab-organization-in-progress[shown], + tab-organization-results[shown], + tab-organization-failure[shown] { + animation: fadeIn 200ms linear forwards, + paddingIn 250ms var(--standard-curve) forwards; } - tab-organization-not-started[hidden], - tab-organization-in-progress[hidden], - tab-organization-results[hidden], - tab-organization-failure[hidden] { - animation: fadeOut 100ms linear, - displayOut 200ms linear, - marginOut 250ms var(--standard-curve); + :host(.changed-state) tab-organization-not-started[shown], + :host(.changed-state) tab-organization-in-progress[shown], + :host(.changed-state) tab-organization-results[shown], + :host(.changed-state) tab-organization-failure[shown] { + animation: fadeIn 100ms linear 100ms forwards, + displayIn 200ms linear forwards, + paddingIn 250ms var(--standard-curve) forwards; } - .body { + tab-organization-not-started:not([shown]), + tab-organization-in-progress:not([shown]), + tab-organization-results:not([shown]), + tab-organization-failure:not([shown]) { + height: 0px; + position: absolute; + visibility: hidden; + } + + :host(.changed-state.from-not-started) + tab-organization-not-started:not([shown]), + :host(.changed-state.from-in-progress) + tab-organization-in-progress:not([shown]), + :host(.changed-state.from-success) + tab-organization-results:not([shown]), + :host(.changed-state.from-failure) + tab-organization-failure:not([shown]) { + animation: fadeOut 100ms linear forwards, + displayOut 200ms linear forwards, + marginOut 250ms var(--standard-curve) forwards; + } + + #body { margin: 16px var(--mwb-list-item-horizontal-margin); } - .footer { + #contents { + overflow: hidden; + transition: height 250ms var(--standard-curve); + } + + #footer { background-color: var(--color-bubble-footer-background); + display: flex; + flex-direction: column; padding: 16px var(--mwb-list-item-horizontal-margin); } - .footer:not([hidden]) { - animation: fadeIn 200ms linear; + #footer[shown] { + animation: fadeIn 200ms linear forwards; } - :host(.changed-state) .footer:not([hidden]) { - animation: fadeIn 100ms linear 100ms, - displayIn 200ms linear; + :host(.changed-state) #footer[shown] { + animation: fadeIn 100ms linear 100ms forwards, + displayIn 200ms linear forwards; } - .footer[hidden] { - animation: fadeOut 100ms linear, - displayOut 200ms linear; + #footer:not([shown]) { + height: 0px; + position: absolute; + visibility: hidden; } - .link { - color: var(--color-link-foreground-on-bubble-footer); - cursor: pointer; - text-decoration: underline; + :host(.changed-state.from-failure) #footer:not([shown]) { + animation: fadeOut 100ms linear forwards, + displayOut 200ms linear forwards; } </style> -<div class="body"> - <tab-organization-not-started - hidden="[[!isState_(tabOrganizationStateEnum_.kNotStarted, state_)]]" - on-sync-click="onSyncClick_" - on-sign-in-click="onSignInClick_" - on-settings-click="onSettingsClick_" - on-organize-tabs-click="onOrganizeTabsClick_" - show-fre="[[showFRE_]]"> - </tab-organization-not-started> - <tab-organization-in-progress - hidden="[[!isState_(tabOrganizationStateEnum_.kInProgress, state_)]]"> - </tab-organization-in-progress> - <tab-organization-results - hidden="[[!isState_(tabOrganizationStateEnum_.kSuccess, state_)]]" - name="[[name_]]" - tabs="[[tabs_]]" - on-create-group-click="onCreateGroupClick_"> - </tab-organization-results> - <tab-organization-failure - hidden="[[!isState_(tabOrganizationStateEnum_.kFailure, state_)]]" - error="[[error_]]"> - </tab-organization-failure> -</div> -<div class="footer" hidden="[[!showFooter_(state_, showFRE_)]]"> - <div class="tab-organization-body"><b>$i18n{tipTitle}</b> $i18n{tipBody}</div> - <div class="tab-organization-body link" on-click="onTipClick_"> - $i18n{tipAction} +<div id="contents"> + <div id="body"> + <tab-organization-not-started id="notStarted" + shown$="[[isState_(tabOrganizationStateEnum_.kNotStarted, state_)]]" + on-sync-click="onSyncClick_" + on-sign-in-click="onSignInClick_" + on-settings-click="onSettingsClick_" + on-organize-tabs-click="onOrganizeTabsClick_" + show-fre="[[showFRE_]]"> + </tab-organization-not-started> + <tab-organization-in-progress id="inProgress" + shown$="[[isState_(tabOrganizationStateEnum_.kInProgress, state_)]]"> + </tab-organization-in-progress> + <tab-organization-results id="results" + shown$="[[isState_(tabOrganizationStateEnum_.kSuccess, state_)]]" + name="[[name_]]" + tabs="[[tabs_]]" + on-create-group-click="onCreateGroupClick_"> + </tab-organization-results> + <tab-organization-failure id="failure" + shown$="[[isState_(tabOrganizationStateEnum_.kFailure, state_)]]" + error="[[error_]]"> + </tab-organization-failure> + </div> + <div id="footer" shown$="[[showFooter_(state_, showFRE_)]]"> + <div class="tab-organization-body"> + <b>$i18n{tipTitle}</b> $i18n{tipBody} + </div> + <div class="tab-organization-link" on-click="onTipClick_"> + $i18n{tipAction} + </div> </div> </div>
diff --git a/chrome/browser/resources/tab_search/tab_organization_page.ts b/chrome/browser/resources/tab_search/tab_organization_page.ts index 7160c89..772527c 100644 --- a/chrome/browser/resources/tab_search/tab_organization_page.ts +++ b/chrome/browser/resources/tab_search/tab_organization_page.ts
@@ -3,7 +3,6 @@ // found in the LICENSE file. import 'chrome://resources/cr_elements/cr_button/cr_button.js'; -import 'chrome://resources/cr_elements/cr_icon_button/cr_icon_button.js'; import 'chrome://resources/cr_elements/cr_icons.css.js'; import 'chrome://resources/cr_elements/mwb_shared_style.css.js'; import './strings.m.js'; @@ -15,12 +14,26 @@ import {loadTimeData} from 'chrome://resources/js/load_time_data.js'; import {mojoString16ToString} from 'chrome://resources/js/mojo_type_util.js'; -import {PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; +import {afterNextRender, PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; import {getTemplate} from './tab_organization_page.html.js'; import {Tab, TabOrganization, TabOrganizationError, TabOrganizationSession, TabOrganizationState} from './tab_search.mojom-webui.js'; import {TabSearchApiProxy, TabSearchApiProxyImpl} from './tab_search_api_proxy.js'; +const TRAILING_BODY_SPACING: number = 20; +const TRAILING_FOOTER_SPACING: number = 28; + +export interface TabOrganizationPageElement { + $: { + contents: HTMLElement, + notStarted: HTMLElement, + inProgress: HTMLElement, + results: HTMLElement, + failure: HTMLElement, + footer: HTMLElement, + }; +} + export class TabOrganizationPageElement extends PolymerElement { static get is() { return 'tab-organization-page'; @@ -81,7 +94,6 @@ } private setSession_(session: TabOrganizationSession) { - this.setState_(session.state); this.sessionId_ = session.sessionId; this.error_ = session.error; if (session.state === TabOrganizationState.kSuccess) { @@ -92,11 +104,43 @@ } else { this.organizationId_ = -1; } + // Wait for a rendering pass so the new state's scroll height is up to date + // with any new data. + afterNextRender(this, () => this.setState_(session.state)); } private setState_(state: TabOrganizationState) { this.classList.toggle('changed-state', this.state_ !== state); + this.classList.toggle( + 'from-not-started', this.state_ === TabOrganizationState.kNotStarted); + this.classList.toggle( + 'from-in-progress', this.state_ === TabOrganizationState.kInProgress); + this.classList.toggle( + 'from-success', this.state_ === TabOrganizationState.kSuccess); + this.classList.toggle( + 'from-failure', this.state_ === TabOrganizationState.kFailure); this.state_ = state; + + let contentsHeight = 0; + switch (state) { + case TabOrganizationState.kNotStarted: + contentsHeight = this.$.notStarted.scrollHeight + TRAILING_BODY_SPACING; + break; + case TabOrganizationState.kInProgress: + contentsHeight = this.$.inProgress.scrollHeight + TRAILING_BODY_SPACING; + break; + case TabOrganizationState.kSuccess: + contentsHeight = this.$.results.scrollHeight + TRAILING_BODY_SPACING; + break; + case TabOrganizationState.kFailure: + contentsHeight = this.$.failure.scrollHeight + TRAILING_BODY_SPACING; + if (this.showFooter_()) { + contentsHeight += + this.$.footer.scrollHeight + TRAILING_FOOTER_SPACING; + } + break; + } + this.$.contents.style.height = contentsHeight + 'px'; } private isState_(state: TabOrganizationState): boolean {
diff --git a/chrome/browser/resources/tab_search/tab_organization_results.html b/chrome/browser/resources/tab_search/tab_organization_results.html index a31eebf..ce32db8 100644 --- a/chrome/browser/resources/tab_search/tab_organization_results.html +++ b/chrome/browser/resources/tab_search/tab_organization_results.html
@@ -5,6 +5,12 @@ width: fit-content; } + cr-icon-button { + --cr-icon-button-icon-size: 16px; + --cr-icon-button-size: 24px; + margin: 0; + } + cr-input { --cr-input-background-color: transparent; --cr-input-border: 1px solid var(--color-side-panel-textfield-border); @@ -22,6 +28,12 @@ --cr-input-padding-top: 8px; } + .feedback { + align-items: center; + display: flex; + gap: 4px; + } + .mwb-list-item { background-color: transparent; } @@ -33,6 +45,10 @@ flex-direction: column; padding: 16px 0; } + + .tab-organization-link { + flex: 1; + } </style> <div class="tab-organization-container"> @@ -51,4 +67,13 @@ $i18n{createGroup} </cr-button> </div> + <div class="feedback"> + <div class="tab-organization-link" on-click="onLearnMoreClick_"> + $i18n{learnMore} + </div> + <cr-icon-button iron-icon="cr:thumbs-up" on-click="onThumbsUpClick_"> + </cr-icon-button> + <cr-icon-button iron-icon="cr:thumbs-down" on-click="onThumbsDownClick_"> + </cr-icon-button> + </div> </div>
diff --git a/chrome/browser/resources/tab_search/tab_organization_results.ts b/chrome/browser/resources/tab_search/tab_organization_results.ts index 98489fc..34c2d9a 100644 --- a/chrome/browser/resources/tab_search/tab_organization_results.ts +++ b/chrome/browser/resources/tab_search/tab_organization_results.ts
@@ -3,6 +3,7 @@ // found in the LICENSE file. import 'chrome://resources/cr_elements/cr_button/cr_button.js'; +import 'chrome://resources/cr_elements/cr_icon_button/cr_icon_button.js'; import 'chrome://resources/cr_elements/cr_input/cr_input.js'; import 'chrome://resources/cr_elements/cr_shared_vars.css.js'; import 'chrome://resources/cr_elements/mwb_shared_style.css.js'; @@ -78,6 +79,18 @@ detail: {name: this.name, tabs: this.tabs}, })); } + + private onLearnMoreClick_() { + // TODO(emshack): Implement this + } + + private onThumbsUpClick_() { + // TODO(emshack): Implement this + } + + private onThumbsDownClick_() { + // TODO(emshack): Implement this + } } declare global {
diff --git a/chrome/browser/resources/tab_search/tab_organization_shared_style.css b/chrome/browser/resources/tab_search/tab_organization_shared_style.css index ec183b04..867eddf2 100644 --- a/chrome/browser/resources/tab_search/tab_organization_shared_style.css +++ b/chrome/browser/resources/tab_search/tab_organization_shared_style.css
@@ -25,6 +25,14 @@ font-weight: 500; } +.tab-organization-link { + color: var(--color-link-foreground-on-bubble-footer); + cursor: pointer; + font-size: 13px; + font-weight: 400; + text-decoration: underline; +} + .tab-organization-text-container { display: flex; flex-direction: column; @@ -33,23 +41,37 @@ @keyframes displayOut { 0% { - display: block; + height: auto; + visibility: visible; + position: relative; } - 50%, + 50% { + visibility: visible; + } + 100% { - display: none; + height: 0; + visibility: hidden; + position: absolute; } } @keyframes displayIn { - 0%, + 0% { + height: 0; + visibility: hidden; + position: absolute; + } + 50% { - display: none; + visibility: hidden; } 100% { - display: block; + height: auto; + visibility: visible; + position: relative; } }
diff --git a/chrome/browser/touch_to_fill/payments/android/touch_to_fill_delegate_android_impl.cc b/chrome/browser/touch_to_fill/payments/android/touch_to_fill_delegate_android_impl.cc index d485e29..076791a 100644 --- a/chrome/browser/touch_to_fill/payments/android/touch_to_fill_delegate_android_impl.cc +++ b/chrome/browser/touch_to_fill/payments/android/touch_to_fill_delegate_android_impl.cc
@@ -6,7 +6,6 @@ #include "base/feature_list.h" #include "base/metrics/histogram_functions.h" -#include "chrome/browser/fast_checkout/fast_checkout_features.h" #include "components/autofill/core/browser/autofill_browser_util.h" #include "components/autofill/core/browser/autofill_manager.h" #include "components/autofill/core/browser/autofill_suggestion_generator.h" @@ -108,8 +107,7 @@ return {TriggerOutcome::kFieldNotEmptyOrNotFocusable, {}}; } // Trigger only if Fast Checkout was not shown before. - if (base::FeatureList::IsEnabled(::features::kFastCheckout) && - !manager_->client().GetFastCheckoutClient()->IsNotShownYet()) { + if (!manager_->client().GetFastCheckoutClient()->IsNotShownYet()) { return {TriggerOutcome::kFastCheckoutWasShown, {}}; } // Trigger only if there is at least 1 complete valid credit card on file.
diff --git a/chrome/browser/touch_to_fill/payments/android/touch_to_fill_delegate_android_impl_unittest.cc b/chrome/browser/touch_to_fill/payments/android/touch_to_fill_delegate_android_impl_unittest.cc index 6dbca59..043e018 100644 --- a/chrome/browser/touch_to_fill/payments/android/touch_to_fill_delegate_android_impl_unittest.cc +++ b/chrome/browser/touch_to_fill/payments/android/touch_to_fill_delegate_android_impl_unittest.cc
@@ -6,7 +6,6 @@ #include "base/test/metrics/histogram_tester.h" #include "base/test/scoped_feature_list.h" #include "base/test/task_environment.h" -#include "chrome/browser/fast_checkout/fast_checkout_features.h" #include "components/autofill/core/browser/autofill_test_utils.h" #include "components/autofill/core/browser/data_model/credit_card.h" #include "components/autofill/core/browser/form_structure.h" @@ -502,8 +501,6 @@ TEST_F(TouchToFillDelegateAndroidImplUnitTest, TryToShowTouchToFillFailsIfFastCheckoutWasShown) { - base::test::ScopedFeatureList scoped_feature_list; - scoped_feature_list.InitAndEnableFeature(::features::kFastCheckout); ASSERT_FALSE(touch_to_fill_delegate_->IsShowingTouchToFill()); autofill::MockFastCheckoutClient* fast_checkout_client = static_cast<autofill::MockFastCheckoutClient*>(
diff --git a/chrome/browser/ui/autofill/chrome_autofill_client.cc b/chrome/browser/ui/autofill/chrome_autofill_client.cc index 444f1bab..3aacacf 100644 --- a/chrome/browser/ui/autofill/chrome_autofill_client.cc +++ b/chrome/browser/ui/autofill/chrome_autofill_client.cc
@@ -29,7 +29,6 @@ #include "chrome/browser/browser_process.h" #include "chrome/browser/device_reauth/chrome_device_authenticator_factory.h" #include "chrome/browser/fast_checkout/fast_checkout_client_impl.h" -#include "chrome/browser/fast_checkout/fast_checkout_features.h" #include "chrome/browser/password_manager/chrome_password_manager_client.h" #include "chrome/browser/password_manager/password_manager_settings_service_factory.h" #include "chrome/browser/plus_addresses/plus_address_service_factory.h" @@ -1377,9 +1376,7 @@ zoom_observation_.Observe(zoom_controller); } #else - if (base::FeatureList::IsEnabled(::features::kFastCheckout)) { - fast_checkout_client_ = std::make_unique<FastCheckoutClientImpl>(this); - } + fast_checkout_client_ = std::make_unique<FastCheckoutClientImpl>(this); #endif }
diff --git a/chrome/browser/ui/autofill/chrome_autofill_client_unittest.cc b/chrome/browser/ui/autofill/chrome_autofill_client_unittest.cc index 9cd374a6..35f886a 100644 --- a/chrome/browser/ui/autofill/chrome_autofill_client_unittest.cc +++ b/chrome/browser/ui/autofill/chrome_autofill_client_unittest.cc
@@ -9,7 +9,6 @@ #include "build/build_config.h" #include "chrome/browser/autofill/personal_data_manager_factory.h" #include "chrome/browser/fast_checkout/fast_checkout_client_impl.h" -#include "chrome/browser/fast_checkout/fast_checkout_features.h" #include "chrome/browser/plus_addresses/plus_address_service_factory.h" #include "chrome/test/base/chrome_render_view_host_test_harness.h" #include "components/autofill/content/browser/test_autofill_client_injector.h"
diff --git a/chrome/browser/ui/browser_element_identifiers.cc b/chrome/browser/ui/browser_element_identifiers.cc index b1e278746..3c264e7 100644 --- a/chrome/browser/ui/browser_element_identifiers.cc +++ b/chrome/browser/ui/browser_element_identifiers.cc
@@ -18,6 +18,7 @@ DEFINE_ELEMENT_IDENTIFIER_VALUE(kBookmarkStarViewElementId); DEFINE_ELEMENT_IDENTIFIER_VALUE(kBrowserViewElementId); DEFINE_ELEMENT_IDENTIFIER_VALUE(kCookieControlsIconElementId); +DEFINE_ELEMENT_IDENTIFIER_VALUE(kCustomizeChromeSidePanelWebViewElementId); DEFINE_ELEMENT_IDENTIFIER_VALUE(kDeviceSignalsConsentCancelButtonElementId); DEFINE_ELEMENT_IDENTIFIER_VALUE(kDeviceSignalsConsentOkButtonElementId); DEFINE_ELEMENT_IDENTIFIER_VALUE(kEnhancedProtectionSettingElementId);
diff --git a/chrome/browser/ui/browser_element_identifiers.h b/chrome/browser/ui/browser_element_identifiers.h index 5340efab..c4084046 100644 --- a/chrome/browser/ui/browser_element_identifiers.h +++ b/chrome/browser/ui/browser_element_identifiers.h
@@ -27,6 +27,7 @@ DECLARE_ELEMENT_IDENTIFIER_VALUE(kBookmarkStarViewElementId); DECLARE_ELEMENT_IDENTIFIER_VALUE(kBrowserViewElementId); DECLARE_ELEMENT_IDENTIFIER_VALUE(kCookieControlsIconElementId); +DECLARE_ELEMENT_IDENTIFIER_VALUE(kCustomizeChromeSidePanelWebViewElementId); DECLARE_ELEMENT_IDENTIFIER_VALUE(kDeviceSignalsConsentCancelButtonElementId); DECLARE_ELEMENT_IDENTIFIER_VALUE(kDeviceSignalsConsentOkButtonElementId); DECLARE_ELEMENT_IDENTIFIER_VALUE(kEnhancedProtectionSettingElementId);
diff --git a/chrome/browser/ui/tab_helpers.cc b/chrome/browser/ui/tab_helpers.cc index af3091ac2..6b87886 100644 --- a/chrome/browser/ui/tab_helpers.cc +++ b/chrome/browser/ui/tab_helpers.cc
@@ -172,7 +172,6 @@ #include "chrome/browser/android/policy/policy_auditor_bridge.h" #include "chrome/browser/banners/android/chrome_app_banner_manager_android.h" #include "chrome/browser/content_settings/request_desktop_site_web_contents_observer_android.h" -#include "chrome/browser/fast_checkout/fast_checkout_features.h" #include "chrome/browser/fast_checkout/fast_checkout_tab_helper.h" #include "chrome/browser/flags/android/chrome_feature_list.h" #include "chrome/browser/plugins/plugin_observer_android.h" @@ -252,7 +251,7 @@ #if BUILDFLAG(ENABLE_EXTENSIONS) #include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h" -#include "chrome/browser/extensions/navigation_observer.h" +#include "chrome/browser/extensions/navigation_extension_enabler.h" #include "chrome/browser/extensions/tab_helper.h" #include "chrome/browser/ui/extensions/extension_side_panel_utils.h" #include "chrome/browser/ui/web_applications/web_app_metrics.h" @@ -531,9 +530,8 @@ webapps::ChromeAppBannerManagerAndroid::CreateForWebContents(web_contents); } ContextMenuHelper::CreateForWebContents(web_contents); - if (base::FeatureList::IsEnabled(features::kFastCheckout)) { - FastCheckoutTabHelper::CreateForWebContents(web_contents); - } + FastCheckoutTabHelper::CreateForWebContents(web_contents); + javascript_dialogs::TabModalDialogManager::CreateForWebContents( web_contents, std::make_unique<JavaScriptTabModalDialogManagerDelegateAndroid>( @@ -735,7 +733,7 @@ extensions::mojom::ViewType::kTabContents); extensions::TabHelper::CreateForWebContents(web_contents); - extensions::NavigationObserver::CreateForWebContents(web_contents); + extensions::NavigationExtensionEnabler::CreateForWebContents(web_contents); if (base::FeatureList::IsEnabled( extensions_features::kExtensionSidePanelIntegration)) {
diff --git a/chrome/browser/ui/tabs/organization/tab_organization.cc b/chrome/browser/ui/tabs/organization/tab_organization.cc index 5488534..06dd088 100644 --- a/chrome/browser/ui/tabs/organization/tab_organization.cc +++ b/chrome/browser/ui/tabs/organization/tab_organization.cc
@@ -119,6 +119,7 @@ tab_strip_model->GetIndexOfWebContents(tab_data->web_contents())); } } + std::sort(valid_indices.begin(), valid_indices.end()); tab_groups::TabGroupId group_id = tab_strip_model->AddToNewGroup(valid_indices);
diff --git a/chrome/browser/ui/tabs/organization/tab_organization_service.cc b/chrome/browser/ui/tabs/organization/tab_organization_service.cc index 7abe2b59..13a4231 100644 --- a/chrome/browser/ui/tabs/organization/tab_organization_service.cc +++ b/chrome/browser/ui/tabs/organization/tab_organization_service.cc
@@ -92,3 +92,33 @@ session->StartRequest(); } } + +void TabOrganizationService::AcceptTabOrganization( + Browser* browser, + TabOrganization::ID session_id, + TabOrganization::ID organization_id) { + TabOrganizationSession* session = GetSessionForBrowser(browser); + if (!session || session->session_id() != session_id) { + return; + } + + TabOrganization* organization = nullptr; + for (const std::unique_ptr<TabOrganization>& maybe_organization : + session->tab_organizations()) { + if (maybe_organization->organization_id() == organization_id) { + organization = maybe_organization.get(); + break; + } + } + + if (!organization) { + return; + } + + organization->Accept(); + + // if the session is completed, then destroy it. + if (session->IsComplete()) { + browser_session_map_.erase(browser); + } +}
diff --git a/chrome/browser/ui/tabs/organization/tab_organization_service.h b/chrome/browser/ui/tabs/organization/tab_organization_service.h index 05e8f48..517a1b4 100644 --- a/chrome/browser/ui/tabs/organization/tab_organization_service.h +++ b/chrome/browser/ui/tabs/organization/tab_organization_service.h
@@ -53,6 +53,10 @@ // existing session, they should first call GetSessionForBrowser to confirm. TabOrganizationSession* CreateSessionForBrowser(const Browser* browser); + void AcceptTabOrganization(Browser* browser, + TabOrganization::ID session_id, + TabOrganization::ID organization_id); + // Starts a request for the tab organization session that exists for the // browser, creating a new session if one does not already exists. Does not // start a request if one is already started.
diff --git a/chrome/browser/ui/tabs/organization/tab_organization_service_unittest.cc b/chrome/browser/ui/tabs/organization/tab_organization_service_unittest.cc index b6c736e..fa95ce5e4 100644 --- a/chrome/browser/ui/tabs/organization/tab_organization_service_unittest.cc +++ b/chrome/browser/ui/tabs/organization/tab_organization_service_unittest.cc
@@ -159,6 +159,11 @@ session->StartRequest(); EXPECT_NE(session->request()->response(), nullptr); EXPECT_EQ(session->tab_organizations().size(), 1u); + + TabOrganization* organization = session->GetNextTabOrganization(); + EXPECT_TRUE(organization); + + organization->Accept(); EXPECT_EQ(browser1->tab_strip_model()->group_model()->ListTabGroups().size(), 1u); }
diff --git a/chrome/browser/ui/tabs/organization/tab_organization_session.cc b/chrome/browser/ui/tabs/organization/tab_organization_session.cc index 51c62f4..439d21c 100644 --- a/chrome/browser/ui/tabs/organization/tab_organization_session.cc +++ b/chrome/browser/ui/tabs/organization/tab_organization_session.cc
@@ -127,7 +127,7 @@ void TabOrganizationSession::OnRequestResponse( const TabOrganizationResponse* response) { if (response) { - PopulateAndCreate(response); + PopulateOrganizations(response); } NotifyObserversOfUpdate(); }
diff --git a/chrome/browser/ui/tabs/organization/tab_organization_unittest.cc b/chrome/browser/ui/tabs/organization/tab_organization_unittest.cc index f5ed7d8..1373e76 100644 --- a/chrome/browser/ui/tabs/organization/tab_organization_unittest.cc +++ b/chrome/browser/ui/tabs/organization/tab_organization_unittest.cc
@@ -773,14 +773,10 @@ EXPECT_EQ(session->tab_organizations().size(), 1u); - /* - TODO, once completion does not call PopulateAndCreate, the organization must - be accepted for the group to be created. + TabOrganization* next_organization = session->GetNextTabOrganization(); + EXPECT_NE(next_organization, nullptr); + next_organization->Accept(); - TabOrganization* next_organization = session->GetNextTabOrganization(); - EXPECT_NE(next_organization, nullptr); - next_organization->Accept(); - */ EXPECT_EQ(tab_strip_model()->group_model()->ListTabGroups().size(), 1u); const tab_groups::TabGroupId group_id = tab_strip_model()->group_model()->ListTabGroups().at(0);
diff --git a/chrome/browser/ui/toolbar/chrome_labs_model.cc b/chrome/browser/ui/toolbar/chrome_labs_model.cc index d944f9a..4165670 100644 --- a/chrome/browser/ui/toolbar/chrome_labs_model.cc +++ b/chrome/browser/ui/toolbar/chrome_labs_model.cc
@@ -59,6 +59,13 @@ "chrome-refresh", version_info::Channel::BETA, chrome_refresh_variation_descriptions); + // ChromeWebuiRefresh2023. + lab_info.emplace_back( + flag_descriptions::kChromeWebuiRefresh2023Id, + l10n_util::GetStringUTF16(IDS_CHROMEWEBUIREFRESH2023_EXPERIMENT_NAME), + l10n_util::GetStringUTF16(IDS_CHROMEWEBUIREFRESH2023_DESCRIPTION), + "chrome-labs-webui-refresh", version_info::Channel::BETA); + // Tab Scrolling. std::vector<std::u16string> tab_scrolling_variation_descriptions = { l10n_util::GetStringUTF16(IDS_TABS_SHRINK_TO_PINNED_TAB_WIDTH),
diff --git a/chrome/browser/ui/views/omnibox/omnibox_match_cell_view.cc b/chrome/browser/ui/views/omnibox/omnibox_match_cell_view.cc index 81538d2..493edf3 100644 --- a/chrome/browser/ui/views/omnibox/omnibox_match_cell_view.cc +++ b/chrome/browser/ui/views/omnibox/omnibox_match_cell_view.cc
@@ -364,15 +364,20 @@ bool is_journeys_suggestion_row = match.type == AutocompleteMatchType::HISTORY_CLUSTER && OmniboxFieldTrial::IsActionsUISimplificationEnabled(); + bool is_instant_keyword_row = + match.type == AutocompleteMatchType::STARTER_PACK && + OmniboxFieldTrial::IsKeywordModeRefreshEnabled(); if (is_pedal_suggestion_row || is_journeys_suggestion_row || + is_instant_keyword_row || OmniboxFieldTrial::kSquareSuggestIconIcons.Get()) { // When a PEDAL suggestion has been split out to its own row, apply a square // background with a distinctive color to the respective icon. Journeys // suggestion rows should also receive the same treatment. - const auto background_color = - is_pedal_suggestion_row || is_journeys_suggestion_row - ? kColorOmniboxAnswerIconGM3Background - : kColorOmniboxResultsIconGM3Background; + const auto background_color = is_pedal_suggestion_row || + is_journeys_suggestion_row || + is_instant_keyword_row + ? kColorOmniboxAnswerIconGM3Background + : kColorOmniboxResultsIconGM3Background; icon_view_->SetImage( gfx::ImageSkiaOperations::CreateImageWithRoundRectBackground( gfx::SizeF(kUniformRowHeightIconSize, kUniformRowHeightIconSize),
diff --git a/chrome/browser/ui/views/omnibox/omnibox_result_view_unittest.cc b/chrome/browser/ui/views/omnibox/omnibox_result_view_unittest.cc index c1228047..bd276cd 100644 --- a/chrome/browser/ui/views/omnibox/omnibox_result_view_unittest.cc +++ b/chrome/browser/ui/views/omnibox/omnibox_result_view_unittest.cc
@@ -7,6 +7,7 @@ #include <memory> #include "base/memory/raw_ptr.h" +#include "base/test/scoped_feature_list.h" #include "chrome/browser/ui/omnibox/omnibox_theme.h" #include "chrome/browser/ui/views/omnibox/omnibox_popup_view_views.h" #include "chrome/test/views/chrome_views_test_base.h" @@ -277,3 +278,11 @@ EXPECT_FALSE( popup_node_data.HasIntAttribute(ax::mojom::IntAttribute::kPopupForId)); } + +TEST_F(OmniboxResultViewTest, StarterPackMatch) { + base::test::ScopedFeatureList features(omnibox::kOmniboxKeywordModeRefresh); + AutocompleteMatch match(nullptr, 1350, false, + AutocompleteMatchType::STARTER_PACK); + result_view()->SetMatch(match); + // No assertions necessary; just exercising code paths for starter pack match. +}
diff --git a/chrome/browser/ui/views/side_panel/customize_chrome/customize_chrome_side_panel_controller.cc b/chrome/browser/ui/views/side_panel/customize_chrome/customize_chrome_side_panel_controller.cc index daeddf1..b34e09b 100644 --- a/chrome/browser/ui/views/side_panel/customize_chrome/customize_chrome_side_panel_controller.cc +++ b/chrome/browser/ui/views/side_panel/customize_chrome/customize_chrome_side_panel_controller.cc
@@ -8,6 +8,7 @@ #include "base/functional/callback.h" #include "chrome/app/vector_icons/vector_icons.h" #include "chrome/browser/profiles/profile.h" +#include "chrome/browser/ui/browser_element_identifiers.h" #include "chrome/browser/ui/browser_finder.h" #include "chrome/browser/ui/side_panel/customize_chrome/customize_chrome_tab_helper.h" #include "chrome/browser/ui/views/chrome_layout_provider.h" @@ -21,6 +22,7 @@ #include "content/public/browser/web_contents_user_data.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/metadata/metadata_impl_macros.h" +#include "ui/views/view_class_properties.h" using SidePanelWebUIViewT_CustomizeChromeUI = SidePanelWebUIViewT<CustomizeChromeUI>; @@ -129,6 +131,8 @@ IDS_SIDE_PANEL_CUSTOMIZE_CHROME_TITLE, /*webui_resizes_host=*/false, /*esc_closes_ui=*/false)); + customize_chrome_web_view->SetProperty( + views::kElementIdentifierKey, kCustomizeChromeSidePanelWebViewElementId); customize_chrome_web_view->ShowUI(); customize_chrome_ui_ = customize_chrome_web_view->contents_wrapper() ->GetWebUIController()
diff --git a/chrome/browser/ui/views/tab_search_bubble_host.cc b/chrome/browser/ui/views/tab_search_bubble_host.cc index 212a00e..cad9af2c 100644 --- a/chrome/browser/ui/views/tab_search_bubble_host.cc +++ b/chrome/browser/ui/views/tab_search_bubble_host.cc
@@ -70,7 +70,9 @@ if (features::IsTabOrganization()) { auto* const tab_organization_service = TabOrganizationServiceFactory::GetForProfile(profile); - tab_organization_service->AddObserver(this); + if (tab_organization_service) { + tab_organization_service->AddObserver(this); + } } auto menu_button_controller = std::make_unique<views::MenuButtonController>( button,
diff --git a/chrome/browser/ui/views/toolbar/chrome_labs_view_controller.cc b/chrome/browser/ui/views/toolbar/chrome_labs_view_controller.cc index 0a31af13..221488b 100644 --- a/chrome/browser/ui/views/toolbar/chrome_labs_view_controller.cc +++ b/chrome/browser/ui/views/toolbar/chrome_labs_view_controller.cc
@@ -56,7 +56,8 @@ // kTabSearchMediaTabsSelected = 7, kChromeRefresh2023Selected = 8, kTabGroupsSaveSelected = 9, - kMaxValue = kTabGroupsSaveSelected, + kChromeWebuiRefresh2023Selected = 10, + kMaxValue = kChromeWebuiRefresh2023Selected, }; void EmitToHistogram(const std::u16string& selected_lab_state, @@ -84,6 +85,9 @@ if (internal_name == flag_descriptions::kChromeRefresh2023Id) { return ChromeLabsSelectedLab::kChromeRefresh2023Selected; } + if (internal_name == flag_descriptions::kChromeWebuiRefresh2023Id) { + return ChromeLabsSelectedLab::kChromeWebuiRefresh2023Selected; + } if (internal_name == flag_descriptions::kScrollableTabStripFlagId) return ChromeLabsSelectedLab::kTabScrollingSelected; #if BUILDFLAG(ENABLE_WEBUI_TAB_STRIP) && \
diff --git a/chrome/browser/ui/views/web_apps/isolated_web_apps/isolated_web_app_installer_view.cc b/chrome/browser/ui/views/web_apps/isolated_web_apps/isolated_web_app_installer_view.cc index c094191..e37e30a2c 100644 --- a/chrome/browser/ui/views/web_apps/isolated_web_apps/isolated_web_app_installer_view.cc +++ b/chrome/browser/ui/views/web_apps/isolated_web_apps/isolated_web_app_installer_view.cc
@@ -6,11 +6,15 @@ #include <memory> #include <string> +#include <utility> #include <vector> #include "base/memory/raw_ptr.h" +#include "base/strings/utf_string_conversions.h" #include "chrome/app/vector_icons/vector_icons.h" #include "chrome/browser/ui/views/accessibility/non_accessible_image_view.h" +#include "chrome/browser/ui/views/chrome_layout_provider.h" +#include "chrome/browser/ui/views/web_apps/web_app_info_image_source.h" #include "chrome/browser/web_applications/isolated_web_apps/signed_web_bundle_metadata.h" #include "chrome/grit/generated_resources.h" #include "components/vector_icons/vector_icons.h" @@ -22,9 +26,11 @@ #include "ui/base/ui_base_types.h" #include "ui/color/color_id.h" #include "ui/gfx/geometry/insets.h" +#include "ui/gfx/image/image_skia.h" #include "ui/gfx/range/range.h" #include "ui/gfx/vector_icon_types.h" #include "ui/strings/grit/ui_strings.h" +#include "ui/views/background.h" #include "ui/views/bubble/bubble_dialog_delegate_view.h" #include "ui/views/controls/progress_bar.h" #include "ui/views/controls/styled_label.h" @@ -38,6 +44,7 @@ namespace { constexpr int kIconSize = 32; +constexpr int kInfoPaneCornerRadius = 10; constexpr int kProgressViewHorizontalPadding = 45; void ConfigureBoxLayoutView(views::BoxLayoutView* view) { @@ -67,6 +74,46 @@ return ui::ImageModel::FromVectorIcon(vector_icon, color_id, kIconSize); } +ui::ImageModel CreateImageModelFromBundleMetadata( + const SignedWebBundleMetadata& metadata) { + gfx::ImageSkia icon_image( + std::make_unique<WebAppInfoImageSource>(kIconSize, metadata.icons().any), + gfx::Size(kIconSize, kIconSize)); + return ui::ImageModel::FromImageSkia(icon_image); +} + +// A View that displays key/value entries in a pane with a different +// background color and a rounded border. +class InfoPane : public views::BoxLayoutView { + public: + METADATA_HEADER(InfoPane); + + explicit InfoPane( + const std::vector<std::pair<int, std::u16string>>& metadata) { + views::LayoutProvider* provider = views::LayoutProvider::Get(); + SetInsideBorderInsets( + provider->GetInsetsMetric(views::InsetsMetric::INSETS_DIALOG)); + SetOrientation(views::BoxLayout::Orientation::kVertical); + SetBackground(views::CreateThemedRoundedRectBackground( + ui::kColorSubtleEmphasisBackground, kInfoPaneCornerRadius)); + + for (const auto& data : metadata) { + size_t offset; + views::StyledLabel* label = AddChildView(CreateLabelWithContextAndStyle( + views::style::CONTEXT_LABEL, views::style::STYLE_SECONDARY)); + label->SetText( + l10n_util::GetStringFUTF16(data.first, data.second, &offset)); + + views::StyledLabel::RangeStyleInfo style; + style.custom_font = label->GetFontList().Derive( + 0, gfx::Font::FontStyle::NORMAL, gfx::Font::Weight::BOLD); + label->AddStyleRange(gfx::Range(0, offset), style); + } + } +}; +BEGIN_METADATA(InfoPane, views::BoxLayoutView) +END_METADATA + } // namespace // The contents view used for all installer screens. This will handle rendering @@ -83,6 +130,17 @@ int title_id, int subtitle_id, absl::optional<LinkInfo> subtitle_link = absl::nullopt, + std::unique_ptr<views::View> contents_view = nullptr) + : InstallerDialogView(icon_model, + l10n_util::GetStringUTF16(title_id), + subtitle_id, + subtitle_link, + std::move(contents_view)) {} + + InstallerDialogView(const ui::ImageModel& icon_model, + const std::u16string& title, + int subtitle_id, + absl::optional<LinkInfo> subtitle_link = absl::nullopt, std::unique_ptr<views::View> contents_view = nullptr) { ConfigureBoxLayoutView(this); @@ -90,9 +148,10 @@ icon->SetImage(icon_model); icon->SetHorizontalAlignment(views::ImageView::Alignment::kLeading); - views::StyledLabel* title = AddChildView(CreateLabelWithContextAndStyle( - views::style::CONTEXT_DIALOG_TITLE, views::style::STYLE_PRIMARY)); - title->SetText(l10n_util::GetStringUTF16(title_id)); + views::StyledLabel* title_label = + AddChildView(CreateLabelWithContextAndStyle( + views::style::CONTEXT_DIALOG_TITLE, views::style::STYLE_PRIMARY)); + title_label->SetText(title); views::StyledLabel* subtitle = AddChildView(CreateLabelWithContextAndStyle( views::style::CONTEXT_LABEL, views::style::STYLE_SECONDARY)); @@ -187,18 +246,47 @@ void IsolatedWebAppInstallerView::ShowMetadataScreen( const SignedWebBundleMetadata& bundle_metadata) { - // TODO(crbug.com/1479140): Implement - ShowDisabledScreen(); + std::vector<std::pair<int, std::u16string>> info = { + {IDS_IWA_INSTALLER_SHOW_METADATA_APP_NAME_LABEL, + bundle_metadata.app_name()}, + {IDS_IWA_INSTALLER_SHOW_METADATA_APP_VERSION_LABEL, + base::UTF8ToUTF16(bundle_metadata.version().GetString())}, + }; + auto app_info = std::make_unique<InfoPane>(info); + InstallerDialogView::LinkInfo link( + IDS_IWA_INSTALLER_SHOW_METADATA_MANAGE_PROFILES, + base::BindRepeating(&Delegate::OnManageProfilesLinkClicked, + base::Unretained(delegate_))); + ShowScreen(std::make_unique<InstallerDialogView>( + CreateImageModelFromBundleMetadata(bundle_metadata), + bundle_metadata.app_name(), IDS_IWA_INSTALLER_SHOW_METADATA_SUBTITLE, + link, std::move(app_info))); } void IsolatedWebAppInstallerView::ShowInstallScreen( const SignedWebBundleMetadata& bundle_metadata) { - // TODO(crbug.com/1479140): Implement + auto progress_view = std::make_unique<views::BoxLayoutView>(); + ConfigureBoxLayoutView(progress_view.get()); + progress_view->SetInsideBorderInsets( + gfx::Insets::VH(0, kProgressViewHorizontalPadding)); + + views::ProgressBar* progress_bar = + progress_view->AddChildView(std::make_unique<views::ProgressBar>()); + progress_view->AddChildView(CreateLabelWithContextAndStyle( + views::style::CONTEXT_LABEL, views::style::STYLE_SECONDARY, + l10n_util::GetStringUTF16(IDS_IWA_INSTALLER_INSTALL_PROGRESS))); + + ShowScreen(std::make_unique<InstallerDialogView>( + CreateImageModelFromBundleMetadata(bundle_metadata), + bundle_metadata.app_name(), IDS_IWA_INSTALLER_INSTALL_SUBTITLE, + /*subtitle_link=*/absl::nullopt, std::move(progress_view)), + progress_bar); } void IsolatedWebAppInstallerView::UpdateInstallProgress(double percent, int minutes_remaining) { - // TODO(crbug.com/1479140): Implement + CHECK(progress_bar_); + progress_bar_->SetValue(percent / 100.0); } void IsolatedWebAppInstallerView::ShowInstallSuccessScreen( @@ -212,6 +300,7 @@ if (!initialized_) { initialized_ = true; views::LayoutProvider* provider = views::LayoutProvider::Get(); + SetOrientation(views::BoxLayout::Orientation::kVertical); SetInsideBorderInsets( provider->GetInsetsMetric(views::InsetsMetric::INSETS_DIALOG)); } @@ -229,6 +318,9 @@ auto bubble_delegate = std::make_unique<views::BubbleDialogDelegate>( GetWidget()->GetContentsView(), views::BubbleBorder::FLOAT); bubble_delegate->SetModalType(ui::MODAL_TYPE_CHILD); + bubble_delegate->set_fixed_width( + ChromeLayoutProvider::Get()->GetDistanceMetric( + views::DISTANCE_BUBBLE_PREFERRED_WIDTH)); bubble_delegate->set_close_on_deactivate(false); bubble_delegate->SetContentsView(std::make_unique<InstallerDialogView>(
diff --git a/chrome/browser/ui/views/web_apps/isolated_web_apps/isolated_web_app_installer_view.h b/chrome/browser/ui/views/web_apps/isolated_web_apps/isolated_web_app_installer_view.h index a1ade47..b88976b 100644 --- a/chrome/browser/ui/views/web_apps/isolated_web_apps/isolated_web_app_installer_view.h +++ b/chrome/browser/ui/views/web_apps/isolated_web_apps/isolated_web_app_installer_view.h
@@ -49,6 +49,7 @@ class Delegate { public: virtual void OnSettingsLinkClicked() = 0; + virtual void OnManageProfilesLinkClicked() = 0; virtual void OnChildDialogCanceled() = 0; virtual void OnChildDialogAccepted() = 0; };
diff --git a/chrome/browser/ui/views/web_apps/isolated_web_apps/isolated_web_app_installer_view_browsertest.cc b/chrome/browser/ui/views/web_apps/isolated_web_apps/isolated_web_app_installer_view_browsertest.cc index 3f62ecf..1527992a 100644 --- a/chrome/browser/ui/views/web_apps/isolated_web_apps/isolated_web_app_installer_view_browsertest.cc +++ b/chrome/browser/ui/views/web_apps/isolated_web_apps/isolated_web_app_installer_view_browsertest.cc
@@ -9,16 +9,23 @@ #include "base/files/file_path.h" #include "base/functional/callback_helpers.h" #include "base/test/scoped_feature_list.h" +#include "base/version.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/test/pixel_test_configuration_mixin.h" #include "chrome/browser/ui/test/test_browser_dialog.h" #include "chrome/browser/ui/views/web_apps/isolated_web_apps/isolated_web_app_installer_model.h" #include "chrome/browser/ui/views/web_apps/isolated_web_apps/isolated_web_app_installer_view_controller.h" +#include "chrome/browser/web_applications/isolated_web_apps/isolated_web_app_url_info.h" +#include "chrome/browser/web_applications/isolated_web_apps/signed_web_bundle_metadata.h" +#include "chrome/browser/web_applications/test/web_app_icon_test_utils.h" +#include "chrome/browser/web_applications/web_app_install_info.h" #include "chrome/browser/web_applications/web_app_provider.h" #include "chrome/test/base/mixin_based_in_process_browser_test.h" +#include "components/web_package/signed_web_bundles/signed_web_bundle_id.h" #include "content/public/common/content_features.h" #include "content/public/test/browser_test.h" +#include "third_party/skia/include/core/SkColor.h" namespace web_app { @@ -38,9 +45,20 @@ return info.param.test_suffix; } +SignedWebBundleMetadata CreateTestMetadata() { + IconBitmaps icons; + AddGeneratedIcon(&icons.any, 32, SK_ColorBLUE); + return SignedWebBundleMetadata::CreateForTesting( + IsolatedWebAppUrlInfo::CreateFromSignedWebBundleId( + web_package::SignedWebBundleId::CreateRandomForDevelopment()), + u"Test Isolated Web App", base::Version("0.0.1"), icons); +} + const TestParam kTestParam[] = { {.test_suffix = "Disabled", .step = Step::kDisabled}, {.test_suffix = "GetMetadata", .step = Step::kGetMetadata}, + {.test_suffix = "ConfirmInstall", .step = Step::kConfirmInstall}, + {.test_suffix = "Install", .step = Step::kInstall}, }; class IsolatedWebAppInstallerViewUiPixelTest @@ -59,6 +77,7 @@ void ShowUi(const std::string& name) override { IsolatedWebAppInstallerModel model{base::FilePath()}; model.SetStep(GetParam().step); + model.SetSignedWebBundleMetadata(CreateTestMetadata()); Profile* profile = browser()->profile(); IsolatedWebAppInstallerViewController controller{
diff --git a/chrome/browser/ui/views/web_apps/isolated_web_apps/isolated_web_app_installer_view_controller.cc b/chrome/browser/ui/views/web_apps/isolated_web_apps/isolated_web_app_installer_view_controller.cc index 2332a95f..bfe0c79f 100644 --- a/chrome/browser/ui/views/web_apps/isolated_web_apps/isolated_web_app_installer_view_controller.cc +++ b/chrome/browser/ui/views/web_apps/isolated_web_apps/isolated_web_app_installer_view_controller.cc
@@ -14,6 +14,7 @@ #include "chrome/browser/web_applications/isolated_web_apps/signed_web_bundle_metadata.h" #include "chrome/browser/web_applications/web_app_provider.h" #include "chrome/grit/generated_resources.h" +#include "components/strings/grit/components_strings.h" #include "components/webapps/common/web_app_id.h" #include "third_party/abseil-cpp/absl/types/optional.h" #include "ui/base/l10n/l10n_util.h" @@ -167,6 +168,10 @@ // TODO(crbug.com/1479140): Implement } +void IsolatedWebAppInstallerViewController::OnManageProfilesLinkClicked() { + // TODO(crbug.com/1479140): Implement +} + // static bool IsolatedWebAppInstallerViewController::OnAcceptWrapper( base::WeakPtr<IsolatedWebAppInstallerViewController> controller) { @@ -176,17 +181,19 @@ return true; } +// Returns true if the dialog should be closed. bool IsolatedWebAppInstallerViewController::OnAccept() { // TODO(crbug.com/1479140): Implement switch (model_->step()) { - case IsolatedWebAppInstallerModel::Step::kGetMetadata: - return true; + case IsolatedWebAppInstallerModel::Step::kConfirmInstall: + model_->SetStep(IsolatedWebAppInstallerModel::Step::kInstall); + OnModelChanged(); + return false; default: NOTREACHED(); } - OnModelChanged(); - return false; + return true; } void IsolatedWebAppInstallerViewController::OnComplete() { @@ -223,10 +230,15 @@ break; case IsolatedWebAppInstallerModel::Step::kConfirmInstall: + IsolatedWebAppInstallerView::SetDialogButtons( + dialog_delegate_, IDS_APP_CANCEL, IDS_INSTALL); view_->ShowMetadataScreen(model_->bundle_metadata()); break; case IsolatedWebAppInstallerModel::Step::kInstall: + IsolatedWebAppInstallerView::SetDialogButtons( + dialog_delegate_, IDS_APP_CANCEL, + /*accept_button_label_id=*/absl::nullopt); view_->ShowInstallScreen(model_->bundle_metadata()); break;
diff --git a/chrome/browser/ui/views/web_apps/isolated_web_apps/isolated_web_app_installer_view_controller.h b/chrome/browser/ui/views/web_apps/isolated_web_apps/isolated_web_app_installer_view_controller.h index 7de19d1..f2bb0df 100644 --- a/chrome/browser/ui/views/web_apps/isolated_web_apps/isolated_web_app_installer_view_controller.h +++ b/chrome/browser/ui/views/web_apps/isolated_web_apps/isolated_web_app_installer_view_controller.h
@@ -65,6 +65,7 @@ // `IsolatedWebAppInstallerView::Delegate`: void OnSettingsLinkClicked() override; + void OnManageProfilesLinkClicked() override; void OnChildDialogCanceled() override; void OnChildDialogAccepted() override;
diff --git a/chrome/browser/ui/views/web_apps/isolated_web_apps/isolated_web_app_installer_view_controller_unittest.cc b/chrome/browser/ui/views/web_apps/isolated_web_apps/isolated_web_app_installer_view_controller_unittest.cc index 7761ab6..a2cbd63 100644 --- a/chrome/browser/ui/views/web_apps/isolated_web_apps/isolated_web_app_installer_view_controller_unittest.cc +++ b/chrome/browser/ui/views/web_apps/isolated_web_apps/isolated_web_app_installer_view_controller_unittest.cc
@@ -135,6 +135,7 @@ // `IsolatedWebAppInstallerView::Delegate`: MOCK_METHOD(void, OnSettingsLinkClicked, (), (override)); + MOCK_METHOD(void, OnManageProfilesLinkClicked, (), (override)); MOCK_METHOD(void, OnChildDialogCanceled, (), (override)); MOCK_METHOD(void, OnChildDialogAccepted, (), (override)); };
diff --git a/chrome/browser/ui/web_applications/web_app_link_capturing_browsertest.cc b/chrome/browser/ui/web_applications/web_app_link_capturing_browsertest.cc index cf487db..6a60e458 100644 --- a/chrome/browser/ui/web_applications/web_app_link_capturing_browsertest.cc +++ b/chrome/browser/ui/web_applications/web_app_link_capturing_browsertest.cc
@@ -369,17 +369,33 @@ })(); )js"; + // At present we can't create a sandbox srcdoc frame in a top-level + // about:blank frame, so navigate to an empty page. See + // https://crbug.com/1499982 + GURL url = embedded_test_server()->GetURL("/title1.html"); + Navigate(browser(), url); content::WebContents* web_contents = browser()->tab_strip_model()->GetActiveWebContents(); + content::TestNavigationObserver observer(web_contents); ASSERT_TRUE(content::ExecJs( web_contents, base::ReplaceStringPlaceholders(kIframeCaptureJs, {in_scope_1.spec()}, /*offsets=*/nullptr))); + observer.Wait(); + // When the JS code in `kIframeCaptureJs` finishes executing, we should be + // guaranteed that the child frame has been created, but the browser-side + // RenderFrameHost for the child may not have received the hit-testing data + // necessary for the event to propagate properly. + RenderFrameHost* child_frame = + ChildFrameAt(web_contents->GetPrimaryMainFrame(), 0); + ASSERT_NE(nullptr, child_frame); + content::WaitForHitTestData(child_frame); BrowserChangeObserver added_observer( nullptr, BrowserChangeObserver::ChangeType::kAdded); // Click the iframe, which should click the <a> tag and open the app. + // At this point the hit test data for targeting the event should be valid. content::SimulateMouseClickOrTapElementWithId(web_contents, "iframe"); Browser* app_browser = added_observer.Wait();
diff --git a/chrome/browser/ui/webui/settings/settings_interactive_uitest.cc b/chrome/browser/ui/webui/settings/settings_interactive_uitest.cc index 9058e6f..53902e5 100644 --- a/chrome/browser/ui/webui/settings/settings_interactive_uitest.cc +++ b/chrome/browser/ui/webui/settings/settings_interactive_uitest.cc
@@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "base/feature_list.h" #include "base/test/bind.h" #include "chrome/browser/themes/theme_service.h" #include "chrome/browser/themes/theme_service_factory.h" @@ -12,6 +13,7 @@ #include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/interaction/tracked_element_webcontents.h" #include "chrome/test/interaction/webcontents_interaction_test_util.h" +#include "components/content_settings/core/common/features.h" #include "components/privacy_sandbox/privacy_sandbox_features.h" #include "content/public/test/browser_test.h" #include "net/dns/mock_host_resolver.h" @@ -99,27 +101,16 @@ } }; -class CookieSettingsInteractiveUiTest - : public SettingsInteractiveUiTest, - public testing::WithParamInterface<bool> { - public: - CookieSettingsInteractiveUiTest() { - feature_list_.InitWithFeatureState( - privacy_sandbox::kPrivacySandboxSettings4, GetParam()); - } - - private: - base::test::ScopedFeatureList feature_list_; -}; - -IN_PROC_BROWSER_TEST_P(CookieSettingsInteractiveUiTest, +IN_PROC_BROWSER_TEST_F(SettingsInteractiveUiTest, CheckQuestionMarkIsPresentUnderCookiesAndSiteData) { UNCALLED_MOCK_CALLBACK(ui::InteractionSequence::CompletedCallback, completed); UNCALLED_MOCK_CALLBACK(ui::InteractionSequence::AbortedCallback, aborted); + bool is_3pcd = base::FeatureList::IsEnabled( + content_settings::features::kTrackingProtection3pcd); const std::string cookie_row_selector = - GetParam() ? "cr-link-row#thirdPartyCookiesLinkRow" - : "cr-link-row#cookiesLinkRow"; + is_3pcd ? "cr-link-row#trackingProtectionLinkRow" + : "cr-link-row#thirdPartyCookiesLinkRow"; const GURL cookie_setting_url("chrome://settings/privacy"); const WebContentsInteractionTestUtil::DeepQuery cookies_link_row = { "settings-ui", "settings-main", "settings-basic-page", @@ -161,8 +152,14 @@ auto* util = element->AsA<TrackedElementWebContents>()->owner(); auto* const contents = util->web_contents(); - EXPECT_EQ(chrome::kCookiesSettingsHelpCenterURL, - contents->GetURL()); + if (is_3pcd) { + EXPECT_EQ( + contents->GetURL(), + GURL(chrome::kTrackingProtectionHelpCenterURL)); + } else { + EXPECT_EQ(contents->GetURL(), + chrome::kCookiesSettingsHelpCenterURL); + } })) .Build()) .Build(); @@ -170,8 +167,6 @@ EXPECT_CALL_IN_SCOPE(completed, Run, sequence->RunSynchronouslyForTesting()); } -INSTANTIATE_TEST_SUITE_P(All, CookieSettingsInteractiveUiTest, testing::Bool()); - class ThemeSettingsInteractiveUiTest : public SettingsInteractiveUiTest { public: void SetUpCommandLine(base::CommandLine* command_line) override {
diff --git a/chrome/browser/ui/webui/side_panel/customize_chrome/customize_chrome_ui.cc b/chrome/browser/ui/webui/side_panel/customize_chrome/customize_chrome_ui.cc index 604d6e9..09fd529 100644 --- a/chrome/browser/ui/webui/side_panel/customize_chrome/customize_chrome_ui.cc +++ b/chrome/browser/ui/webui/side_panel/customize_chrome/customize_chrome_ui.cc
@@ -7,6 +7,7 @@ #include <string> #include <utility> +#include "base/rand_util.h" #include "chrome/browser/cart/cart_handler.h" #include "chrome/browser/image_fetcher/image_decoder_impl.h" #include "chrome/browser/new_tab_page/modules/new_tab_page_modules.h" @@ -40,6 +41,16 @@ #include "ui/base/webui/web_ui_util.h" #include "ui/webui/color_change_listener/color_change_handler.h" +namespace { + +int64_t RandInt64() { + int64_t number; + base::RandBytes(&number, sizeof(number)); + return number; +} + +} // namespace + DEFINE_CLASS_ELEMENT_IDENTIFIER_VALUE(CustomizeChromeUI, kChangeChromeThemeButtonElementId); DEFINE_CLASS_ELEMENT_IDENTIFIER_VALUE(CustomizeChromeUI, @@ -59,7 +70,8 @@ NewTabPageUI::IsDriveModuleEnabledForProfile(profile_))), page_factory_receiver_(this), wallpaper_search_background_manager_( - std::make_unique<WallpaperSearchBackgroundManager>(profile_)) { + std::make_unique<WallpaperSearchBackgroundManager>(profile_)), + id_(RandInt64()) { content::WebUIDataSource* source = content::WebUIDataSource::CreateAndAdd( profile_, chrome::kChromeUICustomizeChromeSidePanelHost); @@ -253,7 +265,7 @@ pending_receiver) { wallpaper_search_handler_ = std::make_unique<WallpaperSearchHandler>( std::move(pending_receiver), profile_, image_decoder_.get(), - wallpaper_search_background_manager_.get()); + wallpaper_search_background_manager_.get(), id_); } void CustomizeChromeUI::CreatePageHandler(
diff --git a/chrome/browser/ui/webui/side_panel/customize_chrome/customize_chrome_ui.h b/chrome/browser/ui/webui/side_panel/customize_chrome/customize_chrome_ui.h index c056274..e7dc562 100644 --- a/chrome/browser/ui/webui/side_panel/customize_chrome/customize_chrome_ui.h +++ b/chrome/browser/ui/webui/side_panel/customize_chrome/customize_chrome_ui.h
@@ -163,6 +163,7 @@ std::unique_ptr<WallpaperSearchBackgroundManager> wallpaper_search_background_manager_; std::unique_ptr<WallpaperSearchHandler> wallpaper_search_handler_; + const int64_t id_; base::WeakPtrFactory<CustomizeChromeUI> weak_ptr_factory_{this};
diff --git a/chrome/browser/ui/webui/side_panel/customize_chrome/wallpaper_search/wallpaper_search_handler.cc b/chrome/browser/ui/webui/side_panel/customize_chrome/wallpaper_search/wallpaper_search_handler.cc index c626bc5..08d3aa98 100644 --- a/chrome/browser/ui/webui/side_panel/customize_chrome/wallpaper_search/wallpaper_search_handler.cc +++ b/chrome/browser/ui/webui/side_panel/customize_chrome/wallpaper_search/wallpaper_search_handler.cc
@@ -20,6 +20,7 @@ #include "chrome/common/webui_url_constants.h" #include "components/image_fetcher/core/image_decoder.h" #include "components/optimization_guide/core/model_execution/optimization_guide_model_execution_error.h" +#include "components/optimization_guide/core/model_quality/feature_type_map.h" #include "components/optimization_guide/core/optimization_guide_features.h" #include "components/optimization_guide/core/optimization_guide_util.h" #include "components/optimization_guide/proto/features/wallpaper_search.pb.h" @@ -71,12 +72,14 @@ pending_handler, Profile* profile, image_fetcher::ImageDecoder* image_decoder, - WallpaperSearchBackgroundManager* wallpaper_search_background_manager) + WallpaperSearchBackgroundManager* wallpaper_search_background_manager, + int64_t session_id) : profile_(profile), data_decoder_(std::make_unique<data_decoder::DataDecoder>()), image_decoder_(*image_decoder), wallpaper_search_background_manager_( *wallpaper_search_background_manager), + session_id_(session_id), receiver_(this, std::move(pending_handler)) {} WallpaperSearchHandler::~WallpaperSearchHandler() {} @@ -292,6 +295,11 @@ GetWallpaperSearchResultsCallback callback, optimization_guide::OptimizationGuideModelExecutionResult result, std::unique_ptr<optimization_guide::ModelQualityLogEntry> log_entry) { + if (log_entry) { + log_entry->quality_data<optimization_guide::WallpaperSearchFeatureTypeMap>() + ->set_session_id(session_id_); + } + if (!result.has_value()) { if (result.error().error() == optimization_guide::OptimizationGuideModelExecutionError::
diff --git a/chrome/browser/ui/webui/side_panel/customize_chrome/wallpaper_search/wallpaper_search_handler.h b/chrome/browser/ui/webui/side_panel/customize_chrome/wallpaper_search/wallpaper_search_handler.h index 56f81ce..2927b85 100644 --- a/chrome/browser/ui/webui/side_panel/customize_chrome/wallpaper_search/wallpaper_search_handler.h +++ b/chrome/browser/ui/webui/side_panel/customize_chrome/wallpaper_search/wallpaper_search_handler.h
@@ -39,7 +39,8 @@ pending_handler, Profile* profile, image_fetcher::ImageDecoder* image_decoder, - WallpaperSearchBackgroundManager* wallpaper_search_background_manager); + WallpaperSearchBackgroundManager* wallpaper_search_background_manager, + int64_t session_id); WallpaperSearchHandler(const WallpaperSearchHandler&) = delete; WallpaperSearchHandler& operator=(const WallpaperSearchHandler&) = delete; @@ -78,6 +79,7 @@ const raw_ref<WallpaperSearchBackgroundManager> wallpaper_search_background_manager_; base::flat_map<base::Token, SkBitmap> wallpaper_search_results_; + const int64_t session_id_; mojo::Receiver<side_panel::customize_chrome::mojom::WallpaperSearchHandler> receiver_;
diff --git a/chrome/browser/ui/webui/side_panel/customize_chrome/wallpaper_search/wallpaper_search_handler_unittest.cc b/chrome/browser/ui/webui/side_panel/customize_chrome/wallpaper_search/wallpaper_search_handler_unittest.cc index aae9097..f63baa43 100644 --- a/chrome/browser/ui/webui/side_panel/customize_chrome/wallpaper_search/wallpaper_search_handler_unittest.cc +++ b/chrome/browser/ui/webui/side_panel/customize_chrome/wallpaper_search/wallpaper_search_handler_unittest.cc
@@ -24,9 +24,12 @@ #include "chrome/test/base/testing_browser_process.h" #include "chrome/test/base/testing_profile.h" #include "components/image_fetcher/core/mock_image_decoder.h" +#include "components/optimization_guide/core/model_quality/feature_type_map.h" +#include "components/optimization_guide/core/model_quality/model_quality_log_entry.h" #include "components/optimization_guide/core/optimization_guide_features.h" #include "components/optimization_guide/proto/features/wallpaper_search.pb.h" #include "components/optimization_guide/proto/model_execution.pb.h" +#include "components/optimization_guide/proto/model_quality_service.pb.h" #include "components/prefs/testing_pref_service.h" #include "components/search/ntp_features.h" #include "content/public/test/browser_task_environment.h" @@ -51,6 +54,8 @@ using testing::Return; using testing::SaveArg; +constexpr int64_t TEST_SESSION_ID = 123; + class MockWallpaperSearchBackgroundManager : public WallpaperSearchBackgroundManager { public: @@ -75,6 +80,37 @@ return profile; } +class FakeModelQualityLogEntry + : public optimization_guide::ModelQualityLogEntry { + public: + using DestructionCallback = base::OnceCallback<void( + const optimization_guide::proto::WallpaperSearchQuality&)>; + + explicit FakeModelQualityLogEntry(DestructionCallback destruction_callback) + : optimization_guide::ModelQualityLogEntry( + std::make_unique<optimization_guide::proto::LogAiDataRequest>()), + destruction_callback_(std::move(destruction_callback)) {} + + ~FakeModelQualityLogEntry() override { + std::move(destruction_callback_) + .Run( + *quality_data<optimization_guide::WallpaperSearchFeatureTypeMap>()); + } + + private: + DestructionCallback destruction_callback_; +}; + +std::unique_ptr<FakeModelQualityLogEntry> SaveQuality( + optimization_guide::proto::WallpaperSearchQuality* out_quality) { + return std::make_unique<FakeModelQualityLogEntry>(base::BindOnce( + [](optimization_guide::proto::WallpaperSearchQuality* out_quality, + const optimization_guide::proto::WallpaperSearchQuality& quality) { + *out_quality = quality; + }, + out_quality)); +} + } // namespace class WallpaperSearchHandlerTest : public testing::Test { @@ -94,7 +130,8 @@ side_panel::customize_chrome::mojom::WallpaperSearchHandler>(), profile_.get(), &mock_image_decoder_, - &mock_wallpaper_search_background_manager_) {} + &mock_wallpaper_search_background_manager_, + TEST_SESSION_ID) {} void SetUp() override { feature_list_.InitWithFeatures( @@ -413,7 +450,9 @@ EXPECT_CALL(callback, Run(_, _)) .WillOnce(DoAll(SaveArg<0>(&status), MoveArg<1>(&images))); - std::move(done_callback).Run(base::ok(result), nullptr); + optimization_guide::proto::WallpaperSearchQuality quality; + + std::move(done_callback).Run(base::ok(result), SaveQuality(&quality)); std::move(decoder_callback1).Run(gfx::Image::CreateFrom1xBitmap(bitmap1)); std::move(decoder_callback2).Run(gfx::Image::CreateFrom1xBitmap(bitmap2)); @@ -439,6 +478,7 @@ gfx::PNGCodec::EncodeBGRASkBitmap( resized_bitmap2, /*discard_transparency=*/false, &resized_encoded2); EXPECT_EQ(images[1]->image, base::Base64Encode(resized_encoded2)); + EXPECT_EQ(TEST_SESSION_ID, quality.session_id()); } TEST_F(WallpaperSearchHandlerTest, @@ -532,6 +572,8 @@ EXPECT_CALL(callback, Run(_, _)) .WillOnce(DoAll(SaveArg<0>(&status), MoveArg<1>(&images))); + optimization_guide::proto::WallpaperSearchQuality quality; + std::move(done_callback) .Run( base::unexpected( @@ -539,11 +581,12 @@ FromModelExecutionError( optimization_guide::OptimizationGuideModelExecutionError:: ModelExecutionError::kGenericFailure)), - nullptr); + SaveQuality(&quality)); EXPECT_EQ(status, side_panel::customize_chrome::mojom::WallpaperSearchStatus::kError); EXPECT_EQ(images.size(), 0u); + EXPECT_EQ(TEST_SESSION_ID, quality.session_id()); } TEST_F(WallpaperSearchHandlerTest, GetWallpaperSearchResults_NoImages) { @@ -586,11 +629,14 @@ EXPECT_CALL(callback, Run(_, _)) .WillOnce(DoAll(SaveArg<0>(&status), MoveArg<1>(&images))); - std::move(done_callback).Run(base::ok(result), nullptr); + optimization_guide::proto::WallpaperSearchQuality quality; + + std::move(done_callback).Run(base::ok(result), SaveQuality(&quality)); EXPECT_EQ(status, side_panel::customize_chrome::mojom::WallpaperSearchStatus::kError); EXPECT_EQ(static_cast<int>(images.size()), response.images_size()); + EXPECT_EQ(TEST_SESSION_ID, quality.session_id()); } TEST_F(WallpaperSearchHandlerTest, GetWallpaperSearchResults_RequestThrottled) { @@ -626,6 +672,8 @@ EXPECT_CALL(callback, Run(_, _)) .WillOnce(DoAll(SaveArg<0>(&status), MoveArg<1>(&images))); + optimization_guide::proto::WallpaperSearchQuality quality; + std::move(done_callback) .Run( base::unexpected( @@ -633,11 +681,12 @@ FromModelExecutionError( optimization_guide::OptimizationGuideModelExecutionError:: ModelExecutionError::kRequestThrottled)), - nullptr); + SaveQuality(&quality)); EXPECT_EQ(status, side_panel::customize_chrome::mojom::WallpaperSearchStatus:: kRequestThrottled); EXPECT_EQ(images.size(), 0u); + EXPECT_EQ(TEST_SESSION_ID, quality.session_id()); } TEST_F(WallpaperSearchHandlerTest, SetBackgroundToWallpaperSearchResult) { @@ -717,7 +766,9 @@ images; EXPECT_CALL(callback, Run(_, _)).WillOnce(MoveArg<1>(&images)); - std::move(done_callback).Run(base::ok(result), nullptr); + optimization_guide::proto::WallpaperSearchQuality quality; + + std::move(done_callback).Run(base::ok(result), SaveQuality(&quality)); std::move(decoder_callback1).Run(gfx::Image::CreateFrom1xBitmap(bitmap1)); std::move(decoder_callback2).Run(gfx::Image::CreateFrom1xBitmap(bitmap2)); @@ -736,4 +787,5 @@ // 2 bitmaps are different colors. EXPECT_EQ(bitmap.getColor(0, 0), bitmap2.getColor(0, 0)); EXPECT_EQ(token, images[1]->id); + EXPECT_EQ(TEST_SESSION_ID, quality.session_id()); }
diff --git a/chrome/browser/ui/webui/side_panel/customize_chrome/wallpaper_search/wallpaper_search_interactive_uitest.cc b/chrome/browser/ui/webui/side_panel/customize_chrome/wallpaper_search/wallpaper_search_interactive_uitest.cc new file mode 100644 index 0000000..846e865 --- /dev/null +++ b/chrome/browser/ui/webui/side_panel/customize_chrome/wallpaper_search/wallpaper_search_interactive_uitest.cc
@@ -0,0 +1,93 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "base/feature_list.h" +#include "base/test/scoped_feature_list.h" +#include "chrome/browser/ui/browser_element_identifiers.h" +#include "chrome/common/webui_url_constants.h" +#include "chrome/test/interaction/interaction_test_util_browser.h" +#include "chrome/test/interaction/interactive_browser_test.h" +#include "chrome/test/interaction/webcontents_interaction_test_util.h" +#include "components/optimization_guide/core/optimization_guide_features.h" +#include "components/search/ntp_features.h" +#include "content/public/test/browser_test.h" +#include "ui/base/interaction/element_identifier.h" +#include "ui/base/interaction/interaction_sequence.h" +#include "ui/views/interaction/interaction_test_util_views.h" + +namespace { +DEFINE_LOCAL_ELEMENT_IDENTIFIER_VALUE(kCustomizeChromeElementId); +} // namespace + +class WallpaperSearchInteractiveTest : public InteractiveBrowserTest { + public: + WallpaperSearchInteractiveTest() = default; + ~WallpaperSearchInteractiveTest() override = default; + + void SetUp() override { + scoped_feature_list_.InitWithFeatures( + {ntp_features::kCustomizeChromeWallpaperSearch, + optimization_guide::features::kOptimizationGuideModelExecution}, + {}); + InteractiveBrowserTest::SetUp(); + } + + StateChange Visible(const DeepQuery& where) { + DEFINE_LOCAL_CUSTOM_ELEMENT_EVENT_TYPE(kElementVisibleEvent); + StateChange state_change; + state_change.type = StateChange::Type::kExistsAndConditionTrue; + state_change.where = where; + state_change.event = kElementVisibleEvent; + state_change.test_function = "(el) => el.offsetParent !== null"; + return state_change; + } + + InteractiveTestApi::MultiStep ClickElement( + const ui::ElementIdentifier& contents_id, + const DeepQuery& element) { + return Steps(WaitForStateChange(contents_id, Visible(element)), + MoveMouseTo(contents_id, element), ClickMouse()); + } + + InteractiveTestApi::MultiStep OpenCustomizeChrome() { + DEFINE_LOCAL_ELEMENT_IDENTIFIER_VALUE(kNewTabPageElementId); + const DeepQuery kCustomizeChromeButton = {"ntp-app", "#customizeButton"}; + return Steps( + // 1. Load the NTP. + InstrumentTab(kNewTabPageElementId, 0), + NavigateWebContents(kNewTabPageElementId, + GURL(chrome::kChromeUINewTabPageURL)), + WaitForWebContentsReady(kNewTabPageElementId, + GURL(chrome::kChromeUINewTabPageURL)), + // 2. Open Customize Chrome. + ClickElement(kNewTabPageElementId, kCustomizeChromeButton), + WaitForShow(kCustomizeChromeSidePanelWebViewElementId), + // 3. Instrument Customize Chrome's WebUI. + InstrumentNonTabWebView(kCustomizeChromeElementId, + kCustomizeChromeSidePanelWebViewElementId)); + } + + private: + base::test::ScopedFeatureList scoped_feature_list_; +}; + +IN_PROC_BROWSER_TEST_F(WallpaperSearchInteractiveTest, + OpenWallpaperSearchPage) { + const DeepQuery kEditThemeButton = {"customize-chrome-app", + "#appearanceElement", "#editThemeButton"}; + const DeepQuery kWallpaperSearchTile = { + "customize-chrome-app", "#categoriesPage", "#wallpaperSearchTile"}; + const DeepQuery kWallpaperSearchPage = {"customize-chrome-app", + "#wallpaperSearchPage"}; + RunTestSequence( + // 1. Open Customize Chrome. + OpenCustomizeChrome(), + // 2. Open the theme categories page. + ClickElement(kCustomizeChromeElementId, kEditThemeButton), + // 3. Open wallpaper search. + ClickElement(kCustomizeChromeElementId, kWallpaperSearchTile), + // 4. Wallpaper search page should show. + WaitForStateChange(kCustomizeChromeElementId, + Visible(kWallpaperSearchPage))); +}
diff --git a/chrome/browser/ui/webui/signin/dice_web_signin_intercept_ui.cc b/chrome/browser/ui/webui/signin/dice_web_signin_intercept_ui.cc index 8fa0e3a6..b3bd096 100644 --- a/chrome/browser/ui/webui/signin/dice_web_signin_intercept_ui.cc +++ b/chrome/browser/ui/webui/signin/dice_web_signin_intercept_ui.cc
@@ -110,8 +110,7 @@ source->OverrideContentSecurityPolicy( network::mojom::CSPDirectiveName::ScriptSrc, - "script-src chrome://resources chrome://test chrome://webui-test " - "'self';"); + "script-src chrome://resources chrome://webui-test 'self';"); webui::EnableTrustedTypesCSP(source); webui::SetupChromeRefresh2023(source);
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 7b265f9a..607be4a8 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
@@ -33,6 +33,8 @@ #include "chrome/browser/ui/browser_navigator.h" #include "chrome/browser/ui/browser_window.h" #include "chrome/browser/ui/color/chrome_color_id.h" +#include "chrome/browser/ui/tabs/organization/tab_organization_service.h" +#include "chrome/browser/ui/tabs/organization/tab_organization_service_factory.h" #include "chrome/browser/ui/tabs/tab_enums.h" #include "chrome/browser/ui/tabs/tab_renderer_data.h" #include "chrome/browser/ui/tabs/tab_strip_model_observer.h" @@ -115,6 +117,46 @@ provider.GetColor(kColorTabSearchBackground)); } +TabOrganization* GetTabOrganization(Profile* profile, + int32_t session_id, + int32_t organization_id) { + Browser* browser = chrome::FindLastActive(); + if (!browser) { + return nullptr; + } + + TabOrganizationService* service = + TabOrganizationServiceFactory::GetForProfile(profile); + if (!service) { + return nullptr; + } + + TabOrganizationSession* session = service->GetSessionForBrowser(browser); + if (!session || session->session_id() != session_id) { + return nullptr; + } + + TabOrganization* matching_organization = nullptr; + for (const std::unique_ptr<TabOrganization>& organization : + session->tab_organizations()) { + if (organization->organization_id() == organization_id) { + matching_organization = organization.get(); + break; + } + } + + return matching_organization; +} + +tab_search::mojom::TabOrganizationSessionPtr CreateFailedMojoSession() { + tab_search::mojom::TabOrganizationSessionPtr mojo_session = + tab_search::mojom::TabOrganizationSession::New(); + mojo_session->state = tab_search::mojom::TabOrganizationState::kFailure; + mojo_session->error = tab_search::mojom::TabOrganizationError::kGeneric; + + return mojo_session; +} + } // namespace TabSearchPageHandler::TabSearchPageHandler( @@ -170,15 +212,70 @@ int32_t organization_id, const std::u16string& name, std::vector<tab_search::mojom::TabPtr> tabs) { - // TODO(dpenning): Implement this Browser* browser = chrome::FindLastActive(); - browser->profile()->GetPrefs()->SetBoolean( - tab_search_prefs::kTabOrganizationShowFRE, false); + if (!browser) { + return; + } + + Profile* profile = Profile::FromWebUI(web_ui_); + if (browser->profile() != profile) { + return; + } + + profile->GetPrefs()->SetBoolean(tab_search_prefs::kTabOrganizationShowFRE, + false); + + TabOrganizationService* service = + TabOrganizationServiceFactory::GetForProfile(profile); + if (!service) { + return; + } + + TabOrganization* organization = + GetTabOrganization(profile, session_id, organization_id); + if (!organization) { + return; + } + + std::vector<int> tabs_tab_ids; + for (tab_search::mojom::TabPtr& tab : tabs) { + tabs_tab_ids.emplace_back(tab->tab_id); + } + + std::vector<TabData::TabID> tab_ids_to_remove; + for (const auto& tab_data : organization->tab_datas()) { + if (!tab_data->web_contents() || + !base::Contains(tabs_tab_ids, extensions::ExtensionTabUtil::GetTabId( + tab_data->web_contents()))) { + tab_ids_to_remove.emplace_back(tab_data->tab_id()); + } + } + + for (const auto& tab_id : tab_ids_to_remove) { + organization->RemoveTabData(tab_id); + } + + if (organization->GetDisplayName() != name) { + organization->SetCurrentName(name); + } + + service->AcceptTabOrganization(browser, session_id, organization_id); + + auto embedder = webui_controller_->embedder(); + if (embedder) { + embedder->CloseUI(); + } } void TabSearchPageHandler::RejectTabOrganization(int32_t session_id, int32_t organization_id) { - // TODO(dpenning): Implement this + TabOrganization* organization = GetTabOrganization( + Profile::FromWebUI(web_ui_), session_id, organization_id); + if (!organization) { + return; + } + + organization->Reject(); } void TabSearchPageHandler::GetProfileData(GetProfileDataCallback callback) { @@ -209,9 +306,31 @@ void TabSearchPageHandler::GetTabOrganizationSession( GetTabOrganizationSessionCallback callback) { - auto session = tab_search::mojom::TabOrganizationSession::New(); - // TODO(dpenning): Fill out session - std::move(callback).Run(std::move(session)); + Browser* browser = chrome::FindLastActive(); + if (!browser) { + std::move(callback).Run(CreateFailedMojoSession()); + } + + TabOrganizationService* service = + TabOrganizationServiceFactory::GetForProfile(Profile::FromWebUI(web_ui_)); + if (!service) { + std::move(callback).Run(CreateFailedMojoSession()); + } + + TabOrganizationSession* session = service->GetSessionForBrowser(browser); + if (!session) { + session = service->CreateSessionForBrowser(browser); + } + + if (!base::Contains(listened_sessions_, session)) { + session->AddObserver(this); + listened_sessions_.emplace_back(session); + } + + tab_search::mojom::TabOrganizationSessionPtr mojo_session = + GetMojoForTabOrganizationSession(session); + + std::move(callback).Run(std::move(mojo_session)); } absl::optional<TabSearchPageHandler::TabDetails> @@ -274,7 +393,27 @@ } void TabSearchPageHandler::RequestTabOrganization() { - // TODO(dpenning): Implement this + Browser* browser = chrome::FindLastActive(); + if (!browser) { + return; + } + + TabOrganizationService* service = + TabOrganizationServiceFactory::GetForProfile(Profile::FromWebUI(web_ui_)); + if (!service) { + return; + } + + TabOrganizationSession* session = service->GetSessionForBrowser(browser); + if (!session) { + session = service->CreateSessionForBrowser(browser); + } + + if (!base::Contains(listened_sessions_, session)) { + session->AddObserver(this); + listened_sessions_.emplace_back(session); + } + session->StartRequest(); } void TabSearchPageHandler::SaveRecentlyClosedExpandedPref(bool expanded) { @@ -704,13 +843,6 @@ page_->TabUpdated(std::move(tab_update_info)); } -void TabSearchPageHandler::OnTabOrganizationSessionChanged() { - auto session = tab_search::mojom::TabOrganizationSession::New(); - // TODO(dpenning): Fill out session - session->state = tab_search::mojom::TabOrganizationState::kNotStarted; - page_->TabOrganizationSessionUpdated(std::move(session)); -} - void TabSearchPageHandler::ScheduleDebounce() { if (!debounce_timer_->IsRunning()) debounce_timer_->Reset(); @@ -757,15 +889,15 @@ tab_search::mojom::TabOrganizationSessionPtr TabSearchPageHandler::GetMojoForTabOrganizationSession( - const TabOrganizationSession& session) const { + const TabOrganizationSession* session) const { tab_search::mojom::TabOrganizationSessionPtr mojo_session = tab_search::mojom::TabOrganizationSession::New(); - mojo_session->session_id = session.session_id(); + mojo_session->session_id = session->session_id(); mojo_session->error = tab_search::mojom::TabOrganizationError::kNone; std::vector<tab_search::mojom::TabOrganizationPtr> organizations; - TabOrganizationRequest::State state = session.request()->state(); + TabOrganizationRequest::State state = session->request()->state(); switch (state) { case TabOrganizationRequest::State::NOT_STARTED: { mojo_session->state = @@ -778,10 +910,10 @@ break; } case TabOrganizationRequest::State::COMPLETED: { - if (session.tab_organizations().size() > 0) { + if (session->tab_organizations().size() > 0) { mojo_session->state = tab_search::mojom::TabOrganizationState::kSuccess; for (const std::unique_ptr<TabOrganization>& organization : - session.tab_organizations()) { + session->tab_organizations()) { organizations.emplace_back( GetMojoForTabOrganization(organization.get())); } @@ -804,6 +936,31 @@ return mojo_session; } +void TabSearchPageHandler::OnTabOrganizationSessionUpdated( + const TabOrganizationSession* session) { + if (!base::Contains(listened_sessions_, session)) { + return; + } + + tab_search::mojom::TabOrganizationSessionPtr mojo_session = + GetMojoForTabOrganizationSession(session); + + page_->TabOrganizationSessionUpdated(std::move(mojo_session)); +} + +void TabSearchPageHandler::OnTabOrganizationSessionDestroyed( + TabOrganizationSession::ID session_id) { + for (auto session_iter = listened_sessions_.begin(); + session_iter != listened_sessions_.end(); session_iter++) { + if (session_id == (*session_iter)->session_id()) { + listened_sessions_.erase(session_iter); + break; + } + } + + page_->TabOrganizationSessionUpdated(CreateFailedMojoSession()); +} + bool TabSearchPageHandler::ShouldTrackBrowser(Browser* browser) { return browser->profile() == Profile::FromWebUI(web_ui_) && browser->type() == Browser::Type::TYPE_NORMAL;
diff --git a/chrome/browser/ui/webui/tab_search/tab_search_page_handler.h b/chrome/browser/ui/webui/tab_search/tab_search_page_handler.h index fd830149..6c8ef298 100644 --- a/chrome/browser/ui/webui/tab_search/tab_search_page_handler.h +++ b/chrome/browser/ui/webui/tab_search/tab_search_page_handler.h
@@ -47,7 +47,8 @@ class TabSearchPageHandler : public tab_search::mojom::PageHandler, public TabStripModelObserver, - public BrowserTabStripTrackerDelegate { + public BrowserTabStripTrackerDelegate, + public TabOrganizationSession::Observer { public: TabSearchPageHandler( mojo::PendingReceiver<tab_search::mojom::PageHandler> receiver, @@ -92,8 +93,6 @@ int index, TabChangeType change_type) override; - void OnTabOrganizationSessionChanged(); - // BrowserTabStripTrackerDelegate: bool ShouldTrackBrowser(Browser* browser) override; @@ -106,7 +105,13 @@ tab_search::mojom::TabOrganizationPtr GetMojoForTabOrganization( const TabOrganization* organization) const; tab_search::mojom::TabOrganizationSessionPtr GetMojoForTabOrganizationSession( - const TabOrganizationSession& session) const; + const TabOrganizationSession* session) const; + + // TabOrganizationSession::Observer + void OnTabOrganizationSessionUpdated( + const TabOrganizationSession* session) override; + void OnTabOrganizationSessionDestroyed( + TabOrganizationSession::ID session_id) override; protected: void SetTimerForTesting(std::unique_ptr<base::RetainingOneShotTimer> timer); @@ -192,6 +197,9 @@ // Tracks whether the user has evoked |SwitchToTab()| for metric collection // purposes. bool called_switch_to_tab_ = false; + + // Listened TabOrganization sessions. + std::vector<TabOrganizationSession*> listened_sessions_; }; #endif // CHROME_BROWSER_UI_WEBUI_TAB_SEARCH_TAB_SEARCH_PAGE_HANDLER_H_
diff --git a/chrome/browser/ui/webui/tab_search/tab_search_page_handler_unittest.cc b/chrome/browser/ui/webui/tab_search/tab_search_page_handler_unittest.cc index 73e561f..be00bbe 100644 --- a/chrome/browser/ui/webui/tab_search/tab_search_page_handler_unittest.cc +++ b/chrome/browser/ui/webui/tab_search/tab_search_page_handler_unittest.cc
@@ -853,7 +853,7 @@ std::make_unique<TabOrganizationSession>( nullptr, std::make_unique<TabOrganizationRequest>()); tab_search::mojom::TabOrganizationSessionPtr mojo_session_ptr = - handler()->GetMojoForTabOrganizationSession(*session.get()); + handler()->GetMojoForTabOrganizationSession(session.get()); EXPECT_EQ(mojo_session_ptr->session_id, session->session_id()); }
diff --git a/chrome/browser/ui/webui/tab_search/tab_search_ui.cc b/chrome/browser/ui/webui/tab_search/tab_search_ui.cc index 729f5032..22c34e8 100644 --- a/chrome/browser/ui/webui/tab_search/tab_search_ui.cc +++ b/chrome/browser/ui/webui/tab_search/tab_search_ui.cc
@@ -75,6 +75,7 @@ {"failureTitleGeneric", IDS_TAB_ORGANIZATION_FAILURE_TITLE_GENERIC}, {"failureTitleGrouping", IDS_TAB_ORGANIZATION_FAILURE_TITLE_GROUPING}, {"inProgressTitle", IDS_TAB_ORGANIZATION_IN_PROGRESS_TITLE}, + {"learnMore", IDS_TAB_ORGANIZATION_LEARN_MORE}, {"notStartedBody", IDS_TAB_ORGANIZATION_NOT_STARTED_BODY}, {"notStartedBodyFRE", IDS_TAB_ORGANIZATION_NOT_STARTED_BODY_FRE}, {"notStartedBodyUnsynced", @@ -82,19 +83,19 @@ {"notStartedBodyUnsyncedHistory", IDS_TAB_ORGANIZATION_NOT_STARTED_BODY_UNSYNCED_HISTORY}, {"notStartedButton", IDS_TAB_ORGANIZATION_NOT_STARTED_BUTTON}, + {"notStartedButtonSyncPaused", + IDS_TAB_ORGANIZATION_NOT_STARTED_BUTTON_SYNC_PAUSED}, {"notStartedButtonUnsynced", IDS_TAB_ORGANIZATION_NOT_STARTED_BUTTON_UNSYNCED}, {"notStartedButtonUnsyncedHistory", IDS_TAB_ORGANIZATION_NOT_STARTED_BUTTON_UNSYNCED_HISTORY}, - {"notStartedButtonSyncPaused", - IDS_TAB_ORGANIZATION_NOT_STARTED_BUTTON_SYNC_PAUSED}, {"notStartedTitle", IDS_TAB_ORGANIZATION_NOT_STARTED_TITLE}, {"notStartedTitleFRE", IDS_TAB_ORGANIZATION_NOT_STARTED_TITLE_FRE}, {"successTitle", IDS_TAB_ORGANIZATION_SUCCESS_TITLE}, {"tabOrganizationTabName", IDS_TAB_ORGANIZATION_TAB_NAME}, - {"tipTitle", IDS_TAB_ORGANIZATION_TIP_TITLE}, - {"tipBody", IDS_TAB_ORGANIZATION_TIP_BODY}, {"tipAction", IDS_TAB_ORGANIZATION_TIP_ACTION}, + {"tipBody", IDS_TAB_ORGANIZATION_TIP_BODY}, + {"tipTitle", IDS_TAB_ORGANIZATION_TIP_TITLE}, }; webui::SetupChromeRefresh2023(source); source->AddLocalizedStrings(kStrings);
diff --git a/chrome/browser/ui/webui/webui_util.cc b/chrome/browser/ui/webui/webui_util.cc index 46d20731..88e857ab 100644 --- a/chrome/browser/ui/webui/webui_util.cc +++ b/chrome/browser/ui/webui/webui_util.cc
@@ -39,11 +39,7 @@ void SetJSModuleDefaults(content::WebUIDataSource* source) { source->OverrideContentSecurityPolicy( network::mojom::CSPDirectiveName::ScriptSrc, - "script-src chrome://resources chrome://webui-test " -#if BUILDFLAG(IS_CHROMEOS_ASH) - "chrome://test " -#endif - "'self';"); + "script-src chrome://resources chrome://webui-test 'self';"); source->UseStringsJs(); source->EnableReplaceI18nInJS();
diff --git a/chrome/browser/web_applications/commands/install_from_info_command.cc b/chrome/browser/web_applications/commands/install_from_info_command.cc index e5ed5ae5..1efdde3 100644 --- a/chrome/browser/web_applications/commands/install_from_info_command.cc +++ b/chrome/browser/web_applications/commands/install_from_info_command.cc
@@ -140,12 +140,14 @@ const webapps::AppId& app_id, webapps::InstallResultCode code, OsHooksErrors os_hook_errors) { - webapps::InstallableMetrics::TrackInstallResult(webapps::IsSuccess(code)); - if (!webapps::IsSuccess(code)) { + bool was_install_success = webapps::IsSuccess(code); + if (!was_install_success) { Abort(code); return; } + webapps::InstallableMetrics::TrackInstallResult(was_install_success); + uninstall_and_replace_job_.emplace( &profile_.get(), *lock_, std::move(apps_or_extensions_to_uninstall_), app_id,
diff --git a/chrome/browser/web_applications/commands/install_from_info_command_browsertest.cc b/chrome/browser/web_applications/commands/install_from_info_command_browsertest.cc index bf8a701..5d7197d 100644 --- a/chrome/browser/web_applications/commands/install_from_info_command_browsertest.cc +++ b/chrome/browser/web_applications/commands/install_from_info_command_browsertest.cc
@@ -8,6 +8,7 @@ #include "base/run_loop.h" #include "base/test/bind.h" +#include "base/test/metrics/histogram_tester.h" #include "chrome/browser/ui/web_applications/web_app_controller_browsertest.h" #include "chrome/browser/web_applications/os_integration/os_integration_manager.h" #include "chrome/browser/web_applications/test/fake_os_integration_manager.h" @@ -60,6 +61,7 @@ IN_PROC_BROWSER_TEST_F(InstallFromInfoCommandTest, SuccessInstall) { auto info = std::make_unique<WebAppInstallInfo>(); + base::HistogramTester tester; info->title = u"Test name"; info->start_url = GURL("http://test.com/path"); @@ -84,6 +86,10 @@ loop.Run(); EXPECT_TRUE(provider().registrar_unsafe().IsActivelyInstalled(result_app_id)); + + // Ensure histogram is only measured once. + tester.ExpectBucketCount("WebApp.Install.Result", /*sample=*/true, + /*expected_count=*/1); EXPECT_EQ(os_integration_manager()->num_create_shortcuts_calls(), 0u); const WebApp* web_app =
diff --git a/chrome/browser/web_applications/isolated_web_apps/signed_web_bundle_metadata.cc b/chrome/browser/web_applications/isolated_web_apps/signed_web_bundle_metadata.cc index 1a8a5c9..141d76a 100644 --- a/chrome/browser/web_applications/isolated_web_apps/signed_web_bundle_metadata.cc +++ b/chrome/browser/web_applications/isolated_web_apps/signed_web_bundle_metadata.cc
@@ -202,7 +202,10 @@ std::move(callback).Run(install_info.transform( [&url_info](const WebAppInstallInfo& install_info) -> SignedWebBundleMetadata { - return SignedWebBundleMetadata(install_info, url_info); + return SignedWebBundleMetadata( + url_info, install_info.title, + install_info.isolated_web_app_version, + install_info.icon_bitmaps); })); }, url_info, @@ -210,13 +213,24 @@ base::DoNothingWithBoundArgs(std::move(fetcher)))))); } +// static +SignedWebBundleMetadata SignedWebBundleMetadata::CreateForTesting( + const IsolatedWebAppUrlInfo& url_info, + const std::u16string& app_name, + const base::Version& version, + const IconBitmaps& icons) { + return SignedWebBundleMetadata(url_info, app_name, version, icons); +} + SignedWebBundleMetadata::SignedWebBundleMetadata( - const WebAppInstallInfo& install_info, - const IsolatedWebAppUrlInfo& url_info) + const IsolatedWebAppUrlInfo& url_info, + const std::u16string& app_name, + const base::Version& version, + const IconBitmaps& icons) : url_info_(url_info), - app_name_(install_info.title), - version_(install_info.isolated_web_app_version), - icons_(install_info.icon_bitmaps) {} + app_name_(app_name), + version_(version), + icons_(icons) {} SignedWebBundleMetadata::~SignedWebBundleMetadata() = default;
diff --git a/chrome/browser/web_applications/isolated_web_apps/signed_web_bundle_metadata.h b/chrome/browser/web_applications/isolated_web_apps/signed_web_bundle_metadata.h index 6885ac3..9b047ee 100644 --- a/chrome/browser/web_applications/isolated_web_apps/signed_web_bundle_metadata.h +++ b/chrome/browser/web_applications/isolated_web_apps/signed_web_bundle_metadata.h
@@ -38,6 +38,12 @@ const IsolatedWebAppLocation& location, SignedWebBundleMetadataCallback callback); + static SignedWebBundleMetadata CreateForTesting( + const IsolatedWebAppUrlInfo& url_info, + const std::u16string& app_name, + const base::Version& version, + const IconBitmaps& icons); + ~SignedWebBundleMetadata(); SignedWebBundleMetadata(const SignedWebBundleMetadata&); SignedWebBundleMetadata& operator=(const SignedWebBundleMetadata&); @@ -51,8 +57,11 @@ const IconBitmaps& icons() const { return icons_; } private: - SignedWebBundleMetadata(const WebAppInstallInfo& install_info, - const IsolatedWebAppUrlInfo& url_info); + SignedWebBundleMetadata(const IsolatedWebAppUrlInfo& url_info, + const std::u16string& app_name, + const base::Version& version, + const IconBitmaps& icons); + IsolatedWebAppUrlInfo url_info_; std::u16string app_name_; base::Version version_;
diff --git a/chrome/browser/web_applications/jobs/install_from_info_job.cc b/chrome/browser/web_applications/jobs/install_from_info_job.cc index 12aef222..f84afee 100644 --- a/chrome/browser/web_applications/jobs/install_from_info_job.cc +++ b/chrome/browser/web_applications/jobs/install_from_info_job.cc
@@ -104,20 +104,10 @@ return base::Value(debug_value_.Clone()); } -void InstallFromInfoJob::Abort(webapps::InstallResultCode code) { - debug_value_.Set("result_code", base::ToString(code)); - if (!callback_) { - return; - } - webapps::InstallableMetrics::TrackInstallResult(false); - SignalCompletionAndSelfDestruct(code, OsHooksErrors()); -} - void InstallFromInfoJob::OnInstallCompleted(const webapps::AppId& app_id, webapps::InstallResultCode code, OsHooksErrors os_hook_errors) { debug_value_.Set("result_code", base::ToString(code)); - webapps::InstallableMetrics::TrackInstallResult(webapps::IsSuccess(code)); SignalCompletionAndSelfDestruct(code, os_hook_errors); }
diff --git a/chrome/browser/web_applications/jobs/install_from_info_job.h b/chrome/browser/web_applications/jobs/install_from_info_job.h index 6d95f34..1e9a90a0 100644 --- a/chrome/browser/web_applications/jobs/install_from_info_job.h +++ b/chrome/browser/web_applications/jobs/install_from_info_job.h
@@ -58,8 +58,6 @@ base::Value ToDebugValue() const; private: - void Abort(webapps::InstallResultCode code); - void OnInstallCompleted(const webapps::AppId& app_id, webapps::InstallResultCode code, OsHooksErrors os_hooks_errors);
diff --git a/chrome/build/mac-arm.pgo.txt b/chrome/build/mac-arm.pgo.txt index 20f58faa..812a11da 100644 --- a/chrome/build/mac-arm.pgo.txt +++ b/chrome/build/mac-arm.pgo.txt
@@ -1 +1 @@ -chrome-mac-arm-main-1699379996-41fece3bd39c32e5da8772b7e63240c53aaaade6.profdata +chrome-mac-arm-main-1699394372-dce1dd63086578e9d8a568d1b4eaafd925ba1499.profdata
diff --git a/chrome/build/win32.pgo.txt b/chrome/build/win32.pgo.txt index 67e782b..ae727ed 100644 --- a/chrome/build/win32.pgo.txt +++ b/chrome/build/win32.pgo.txt
@@ -1 +1 @@ -chrome-win32-main-1699379996-c29c2d852a177218d76cd49d2c80028e7f253279.profdata +chrome-win32-main-1699390766-eb7ece615184ecd7861faf6aa22d9ce5ce9895d3.profdata
diff --git a/chrome/build/win64.pgo.txt b/chrome/build/win64.pgo.txt index f65476b..32f036e 100644 --- a/chrome/build/win64.pgo.txt +++ b/chrome/build/win64.pgo.txt
@@ -1 +1 @@ -chrome-win64-main-1699379996-52a660d64c886cc0f8672747f947e03c0cbc4db3.profdata +chrome-win64-main-1699390766-d6c52ba234f1ae7f211b5e724be24d792d7bd470.profdata
diff --git a/chrome/installer/linux/BUILD.gn b/chrome/installer/linux/BUILD.gn index 3bacd339..5e1208f2 100644 --- a/chrome/installer/linux/BUILD.gn +++ b/chrome/installer/linux/BUILD.gn
@@ -12,7 +12,6 @@ import("//build/util/lastchange.gni") import("//build/util/process_version.gni") import("//chrome/version.gni") -import("//components/nacl/features.gni") import("//components/optimization_guide/features.gni") import("//third_party/angle/gni/angle.gni") import("//third_party/widevine/cdm/widevine.gni") @@ -42,28 +41,6 @@ ] packaging_files_shlibs = [] -# Don't attempt to package NaCl when building the ARM32-NaCl-on-ARM64 -# configuration. That could be made to work, but it would be somewhat -# difficult, and not worthwhile given that NaCl is deprecated. -package_nacl = enable_nacl && target_cpu != "arm64" - -if (package_nacl) { - packaging_files_executables += [ - "$root_out_dir/nacl_helper", - "$root_out_dir/nacl_helper_bootstrap", - ] - - if (current_cpu == "x86") { - packaging_files_executables += [ "$root_out_dir/nacl_irt_x86_32.nexe" ] - } else if (current_cpu == "x64") { - packaging_files_executables += [ "$root_out_dir/nacl_irt_x86_64.nexe" ] - } else if (current_cpu == "arm") { - packaging_files_executables += [ "$root_out_dir/nacl_irt_arm.nexe" ] - } else if (current_cpu == "mipsel") { - packaging_files_executables += [ "$root_out_dir/nacl_irt_mips32.nexe" ] - } -} - if (bundle_widevine_cdm) { packaging_files_shlibs += [ "$root_out_dir/$widevine_cdm_path/libwidevinecdm.so" ] @@ -225,18 +202,6 @@ deps = [ "//third_party/swiftshader/src/Vulkan:swiftshader_libvulkan" ] } -if (package_nacl) { - strip_binary("strip_nacl_helper") { - binary_input = "$root_out_dir/nacl_helper" - deps = [ "//components/nacl/loader:nacl_helper" ] - } - - strip_binary("strip_nacl_helper_bootstrap") { - binary_input = "$root_out_dir/nacl_helper_bootstrap" - deps = [ "//native_client/src/trusted/service_runtime/linux:bootstrap" ] - } -} - if (build_with_internal_optimization_guide) { strip_binary("strip_optimization_guide") { binary_input = "$root_out_dir/liboptimization_guide_internal.so" @@ -405,18 +370,6 @@ "//components/crash/core/app:chrome_crashpad_handler", "//sandbox/linux:chrome_sandbox", ] - if (package_nacl) { - public_deps += [ - ":strip_nacl_helper", - ":strip_nacl_helper_bootstrap", - "//components/nacl/loader:nacl_helper", - - # These are data_deps of nacl_helper, but that is not enough, - # as explained above. - "//native_client/src/trusted/service_runtime/linux:bootstrap", - "//ppapi/native_client:irt", - ] - } if (bundle_widevine_cdm) { public_deps += [ "//third_party/widevine/cdm" ] }
diff --git a/chrome/installer/linux/common/installer.include b/chrome/installer/linux/common/installer.include index 439ef5c..2b91c3b 100644 --- a/chrome/installer/linux/common/installer.include +++ b/chrome/installer/linux/common/installer.include
@@ -266,29 +266,6 @@ install -m ${SHLIB_PERMS} -s "${OUTPUTDIR}/lib/libc++.so" "${STAGEDIR}/${INSTALLDIR}/lib/" fi - # nacl_helper and nacl_helper_bootstrap - # Don't use "-s" (strip) because this runs binutils "strip", which - # mangles the special ELF program headers of nacl_helper_bootstrap. - # Explicitly use eu-strip instead, because it doesn't have that problem. - for file in nacl_helper nacl_helper_bootstrap; do - buildfile="${OUTPUTDIR}/${file}" - if [ -f "${buildfile}" ]; then - strippedfile="${buildfile}.stripped" - install -m 755 "${strippedfile}" "${STAGEDIR}/${INSTALLDIR}/${file}" - fi - done - # Don't use "-s" (strip) because this would use the Linux toolchain to - # strip the NaCl binary, which has the potential to break it. It - # certainly resets the OSABI and ABIVERSION fields to non-NaCl values, - # although the NaCl IRT loader doesn't care about these fields. In any - # case, the IRT binaries are already stripped by NaCl's build process. - for filename in ${OUTPUTDIR}/nacl_irt_*.nexe; do - # Re-check the filename in case globbing matched nothing. - if [ -f "$filename" ]; then - install -m 644 "$filename" "${STAGEDIR}/${INSTALLDIR}/`basename "$filename"`" - fi - done - # default apps if [ -d "${OUTPUTDIR}/default_apps" ]; then cp -a "${OUTPUTDIR}/default_apps" "${STAGEDIR}/${INSTALLDIR}/" @@ -423,8 +400,6 @@ local expected_perms=755 elif [ "${base_name}" = "chrome-sandbox" ]; then local expected_perms=4755 - elif [[ "${base_name}" = "nacl_irt_"*".nexe" ]]; then - local expected_perms=644 elif [[ "${file_type}" = *"shell script"* ]]; then local expected_perms=755 elif [[ "${file_type}" = ELF* ]]; then
diff --git a/chrome/installer/linux/debian/lint_package.py b/chrome/installer/linux/debian/lint_package.py index a95fd38..807b08da9 100755 --- a/chrome/installer/linux/debian/lint_package.py +++ b/chrome/installer/linux/debian/lint_package.py
@@ -23,9 +23,6 @@ 'embedded-library', # The setuid sandbox is a setuid binary. 'setuid-binary', - # Some nacl binaries are statically linked but don't have "static" - # in their name. - 'statically-linked-binary', # Build configurations with is_official_build=false don't compress # the packages. 'uses-no-compression-for-data-tarball',
diff --git a/chrome/installer/linux/rpm/rpmlint.conf b/chrome/installer/linux/rpm/rpmlint.conf index 8b4cbc45..d760794 100644 --- a/chrome/installer/linux/rpm/rpmlint.conf +++ b/chrome/installer/linux/rpm/rpmlint.conf
@@ -7,6 +7,3 @@ addFilter("E: non-standard-executable-perm*") # The setuid sandbox is a setuid binary. addFilter("E: setuid-binary*") -# Some nacl binaries are statically linked but don't have "static" in -# their name. -addFilter("E: statically-linked-binary*")
diff --git a/chrome/renderer/BUILD.gn b/chrome/renderer/BUILD.gn index 4f0b91f9..83d15f4 100644 --- a/chrome/renderer/BUILD.gn +++ b/chrome/renderer/BUILD.gn
@@ -291,6 +291,7 @@ deps += [ "//components/pdf/common", "//components/pdf/renderer", + "//pdf:features", ] if (is_linux || is_chromeos) {
diff --git a/chrome/renderer/extensions/DEPS b/chrome/renderer/extensions/DEPS index 807fe82..5902be1 100644 --- a/chrome/renderer/extensions/DEPS +++ b/chrome/renderer/extensions/DEPS
@@ -1,5 +1,6 @@ include_rules = [ "+media/audio", + "+pdf/pdf_features.h", "+services/metrics/public/cpp", "+services/network/public/cpp", "+services/network/public/mojom",
diff --git a/chrome/renderer/extensions/resource_request_policy.cc b/chrome/renderer/extensions/resource_request_policy.cc index 869cb1d..155ff9c 100644 --- a/chrome/renderer/extensions/resource_request_policy.cc +++ b/chrome/renderer/extensions/resource_request_policy.cc
@@ -17,6 +17,7 @@ #include "extensions/common/manifest_handlers/webview_info.h" #include "extensions/renderer/dispatcher.h" #include "extensions/renderer/renderer_extension_registry.h" +#include "pdf/buildflags.h" #include "services/metrics/public/cpp/ukm_source_id.h" #include "third_party/blink/public/platform/url_conversion.h" #include "third_party/blink/public/platform/web_string.h" @@ -28,6 +29,11 @@ #include "url/gurl.h" #include "url/origin.h" +#if BUILDFLAG(ENABLE_PDF) +#include "base/feature_list.h" +#include "pdf/pdf_features.h" +#endif // BUILDFLAG(ENABLE_PDF) + namespace extensions { ResourceRequestPolicy::ResourceRequestPolicy(Dispatcher* dispatcher) @@ -123,6 +129,26 @@ if (frame_url == content::kUnreachableWebDataURL) return true; +#if BUILDFLAG(ENABLE_PDF) + // Handle specific cases for the PDF viewer. + if (base::FeatureList::IsEnabled(chrome_pdf::features::kPdfOopif) && + extension_origin.scheme() == kExtensionScheme && + extension_origin.host() == extension_misc::kPdfExtensionId) { + // For OOPIF PDF viewer, `page_origin` doesn't match the `extension_origin`, + // but the PDF extension frame should still be able to request resources + // from itself. The PDF content frame should also be able to request + // resources from the PDF extension. For both cases, the parent origin of + // the current frame matches the extension origin. + blink::WebFrame* parent = frame->Parent(); + if (parent) { + GURL parent_origin = url::Origin(parent->GetSecurityOrigin()).GetURL(); + if (parent_origin == extension_origin) { + return true; + } + } + } +#endif // BUILDFLAG(ENABLE_PDF) + bool is_dev_tools = page_origin.SchemeIs(content::kChromeDevToolsScheme); // Note: we check |web_accessible_ids_| (rather than first looking up the // extension in the registry and checking that) to be more resistant against
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn index e2a7693..d5223c97 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn
@@ -3656,7 +3656,7 @@ "../browser/extensions/manifest_v3_browsertest.cc", "../browser/extensions/mutation_observers_apitest.cc", "../browser/extensions/native_bindings_apitest.cc", - "../browser/extensions/navigation_observer_browsertest.cc", + "../browser/extensions/navigation_extension_enabler_browsertest.cc", "../browser/extensions/offscreen_document_browsertest.cc", "../browser/extensions/options_page_apitest.cc", "../browser/extensions/permissions_manager_browsertest.cc", @@ -6631,6 +6631,7 @@ "//chrome/browser/feature_guide/notifications:unit_tests", "//chrome/browser/first_party_sets", "//chrome/browser/google:unit_tests", + "//chrome/browser/media/prefs", "//chrome/browser/media/prefs:unit_tests", "//chrome/browser/media/router", "//chrome/browser/media/router:media_router_feature", @@ -6903,6 +6904,7 @@ "//components/user_education/common", "//components/user_education/test", "//components/user_manager", + "//components/user_prefs/test:test_support", "//components/variations:test_support", "//components/variations/service:service", "//components/vector_icons", @@ -10611,6 +10613,7 @@ "../browser/ui/webui/access_code_cast/access_code_cast_handler_browsertest.cc", "../browser/ui/webui/settings/performance_settings_interactive_uitest.cc", "../browser/ui/webui/settings/settings_interactive_uitest.cc", + "../browser/ui/webui/side_panel/customize_chrome/wallpaper_search/wallpaper_search_interactive_uitest.cc", "../browser/webapps/web_app_offline_browsertest.cc", "../browser/webauth_interactive_uitest.cc", "../browser/webauthn/chrome_webauthn_autofill_interactive_uitest.cc",
diff --git a/chrome/test/data/webui/settings/cookies_page_test.ts b/chrome/test/data/webui/settings/cookies_page_test.ts index 1ff74b9..ebf91aa7d 100644 --- a/chrome/test/data/webui/settings/cookies_page_test.ts +++ b/chrome/test/data/webui/settings/cookies_page_test.ts
@@ -5,7 +5,7 @@ // clang-format off import {loadTimeData} from 'chrome://resources/js/load_time_data.js'; import {flush} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; -import {CookieControlsMode, ContentSetting, NetworkPredictionOptions, SettingsCollapseRadioButtonElement, ContentSettingsTypes,CookiePrimarySetting, SettingsCookiesPageElement, SITE_EXCEPTION_WILDCARD, SiteSettingsPrefsBrowserProxyImpl} from 'chrome://settings/lazy_load.js'; +import {CookieControlsMode, ContentSetting, NetworkPredictionOptions, SettingsCollapseRadioButtonElement, ContentSettingsTypes, SettingsCookiesPageElement, SITE_EXCEPTION_WILDCARD, SiteSettingsPrefsBrowserProxyImpl} from 'chrome://settings/lazy_load.js'; import {CrLinkRowElement, CrSettingsPrefs, MetricsBrowserProxyImpl, PrivacyElementInteractions, Router, routes, SettingsPrefsElement, SettingsToggleButtonElement} from 'chrome://settings/settings.js'; import {assertEquals, assertFalse, assertTrue} from 'chrome://webui-test/chai_assert.js'; import {isChildVisible} from 'chrome://webui-test/test_util.js'; @@ -354,318 +354,6 @@ }); }); -// TODO(crbug.com/1378703): Remove after crbug/1378703 launched. -suite('PrivacySandboxSettings4Disabled', function() { - let siteSettingsBrowserProxy: TestSiteSettingsPrefsBrowserProxy; - let testMetricsBrowserProxy: TestMetricsBrowserProxy; - let page: SettingsCookiesPageElement; - let settingsPrefs: SettingsPrefsElement; - - function blockAll(): SettingsCollapseRadioButtonElement { - return page.shadowRoot!.querySelector('#blockAll')!; - } - - function blockThirdParty(): SettingsCollapseRadioButtonElement { - return page.shadowRoot!.querySelector('#blockThirdParty')!; - } - - function blockThirdPartyIncognito(): SettingsCollapseRadioButtonElement { - return page.shadowRoot!.querySelector('#blockThirdPartyIncognito')!; - } - - function allowAll(): SettingsCollapseRadioButtonElement { - return page.shadowRoot!.querySelector('#allowAll')!; - } - - suiteSetup(function() { - loadTimeData.overrideValues({ - // <if expr="chromeos_lacros"> - isSecondaryUser: false, - // </if> - isPrivacySandboxSettings4: false, - }); - settingsPrefs = document.createElement('settings-prefs'); - return CrSettingsPrefs.initialized; - }); - - setup(function() { - testMetricsBrowserProxy = new TestMetricsBrowserProxy(); - MetricsBrowserProxyImpl.setInstance(testMetricsBrowserProxy); - siteSettingsBrowserProxy = new TestSiteSettingsPrefsBrowserProxy(); - SiteSettingsPrefsBrowserProxyImpl.setInstance(siteSettingsBrowserProxy); - document.body.innerHTML = window.trustedTypes!.emptyHTML; - page = document.createElement('settings-cookies-page'); - page.prefs = settingsPrefs.prefs!; - page.set('prefs.generated.cookie_session_only', { - value: false, - }); - page.set('prefs.privacy_sandbox.apis_enabled_v2.value', true); - page.set( - 'prefs.generated.cookie_primary_setting.value', - CookiePrimarySetting.ALLOW_ALL); - document.body.appendChild(page); - flush(); - }); - - teardown(function() { - page.remove(); - Router.getInstance().resetRouteForTesting(); - }); - - test('ElementVisibility', async function() { - await flushTasks(); - assertFalse(isChildVisible(page, '#explanationText')); - assertTrue(isChildVisible(page, '#generalControls')); - assertTrue(isChildVisible(page, '#exceptionHeader')); - assertTrue(isChildVisible(page, '#allowExceptionsList')); - assertTrue(isChildVisible(page, '#sessionOnlyExceptionsList')); - assertTrue(isChildVisible(page, '#blockExceptionsList')); - assertTrue(isChildVisible(page, '#clearOnExit')); - assertTrue(isChildVisible(page, '#doNotTrack')); - assertTrue(isChildVisible(page, '#preloadingLinkRow')); - assertTrue(isChildVisible(page, '#blockThirdPartyIncognito')); - }); - - test('CookiesRadioClicksRecorded', async function() { - blockAll().click(); - let result = - await testMetricsBrowserProxy.whenCalled('recordSettingsPageHistogram'); - assertEquals(PrivacyElementInteractions.COOKIES_BLOCK, result); - testMetricsBrowserProxy.reset(); - - blockThirdParty().click(); - result = - await testMetricsBrowserProxy.whenCalled('recordSettingsPageHistogram'); - assertEquals(PrivacyElementInteractions.COOKIES_THIRD, result); - testMetricsBrowserProxy.reset(); - - blockThirdPartyIncognito().click(); - result = - await testMetricsBrowserProxy.whenCalled('recordSettingsPageHistogram'); - assertEquals(PrivacyElementInteractions.COOKIES_INCOGNITO, result); - testMetricsBrowserProxy.reset(); - - allowAll().click(); - result = - await testMetricsBrowserProxy.whenCalled('recordSettingsPageHistogram'); - assertEquals(PrivacyElementInteractions.COOKIES_ALL, result); - testMetricsBrowserProxy.reset(); - }); - - test('CookiesSessionOnlyClickRecorded', async function() { - page.shadowRoot!.querySelector<HTMLElement>('#clearOnExit')!.click(); - const result = - await testMetricsBrowserProxy.whenCalled('recordSettingsPageHistogram'); - assertEquals(PrivacyElementInteractions.COOKIES_SESSION, result); - }); - - // Checks that the sub label for "Clear on Exit" is shown for Lacros primary - // profiles, and desktop platforms. It is not shown on Ash. - // Note: Secondary Lacros profiles are tested in the suite - // `CrSettingsCookiesPageTest_lacrosSecondaryProfile`. - test('CookieSessionSublabel', function() { - const clearOnExitRow = - page.shadowRoot!.querySelector<CrLinkRowElement>('#clearOnExit')!; - let expectedSubLabel = ''; - // <if expr="not chromeos_ash"> - expectedSubLabel = page.i18n('cookiePageClearOnExitDesc'); - // </if> - assertEquals(clearOnExitRow.subLabel, expectedSubLabel); - }); - - test('CookieSettingExceptions_Search', async function() { - while (siteSettingsBrowserProxy.getCallCount('getExceptionList') < 3) { - await flushTasks(); - } - siteSettingsBrowserProxy.resetResolver('getExceptionList'); - - const exceptionPrefs = createSiteSettingsPrefs([], [ - createContentSettingTypeToValuePair( - ContentSettingsTypes.COOKIES, - [ - createRawSiteException('http://foo-block.com', { - embeddingOrigin: '', - setting: ContentSetting.BLOCK, - }), - createRawSiteException('http://foo-allow.com', { - embeddingOrigin: '', - }), - createRawSiteException('http://foo-session.com', { - embeddingOrigin: '', - setting: ContentSetting.SESSION_ONLY, - }), - ]), - ]); - page.searchTerm = 'foo'; - siteSettingsBrowserProxy.setPrefs(exceptionPrefs); - while (siteSettingsBrowserProxy.getCallCount('getExceptionList') < 3) { - await flushTasks(); - } - flush(); - - const exceptionLists = page.shadowRoot!.querySelectorAll('site-list'); - assertEquals(exceptionLists.length, 3); - - for (const list of exceptionLists) { - assertTrue(isChildVisible(list, 'site-list-entry')); - } - - page.searchTerm = 'unrelated.com'; - flush(); - - for (const list of exceptionLists) { - assertFalse(isChildVisible(list, 'site-list-entry')); - } - }); - - test('ExceptionLists_ReadOnly', async function() { - // Check all exception lists are read only when the session only preference - // reports as managed. - page.set('prefs.generated.cookie_session_only', { - value: true, - enforcement: chrome.settingsPrivate.Enforcement.ENFORCED, - }); - let exceptionLists = page.shadowRoot!.querySelectorAll('site-list'); - assertEquals(exceptionLists.length, 3); - for (const list of exceptionLists) { - assertTrue(!!list.readOnlyList); - } - - // Return preference to unmanaged state and check all exception lists - // are no longer read only. - page.set('prefs.generated.cookie_session_only', { - value: true, - }); - exceptionLists = page.shadowRoot!.querySelectorAll('site-list'); - assertEquals(exceptionLists.length, 3); - for (const list of exceptionLists) { - assertFalse(!!list.readOnlyList); - } - }); - - test('ExceptionListsHaveCorrectCookieExceptionType', function() { - for (const listId - of ['#allowExceptionsList', - '#sessionOnlyExceptionsList', - '#blockExceptionsList', - ]) { - const exceptionList = page.shadowRoot!.querySelector(listId); - assertTrue(!!exceptionList); - assertEquals( - 'combined', exceptionList.getAttribute('cookies-exception-type')); - } - }); - - test('BlockAll_ManagementSource', async function() { - // Test that controlledBy for the blockAll_ preference is set to - // the same value as the generated.cookie_session_only preference. - page.set('prefs.generated.cookie_session_only', { - value: true, - enforcement: chrome.settingsPrivate.Enforcement.ENFORCED, - controlledBy: chrome.settingsPrivate.ControlledBy.EXTENSION, - }); - flush(); - assertEquals( - blockAll().pref!.controlledBy, - chrome.settingsPrivate.ControlledBy.EXTENSION); - - page.set('prefs.generated.cookie_session_only', { - value: true, - enforcement: chrome.settingsPrivate.Enforcement.ENFORCED, - controlledBy: chrome.settingsPrivate.ControlledBy.DEVICE_POLICY, - }); - assertEquals( - blockAll().pref!.controlledBy, - chrome.settingsPrivate.ControlledBy.DEVICE_POLICY); - }); - - test('privacySandboxToast', async function() { - assertFalse(page.$.toast.open); - - // Disabling all cookies should display the privacy sandbox toast. - blockAll().click(); - assertEquals( - 'Settings.PrivacySandbox.Block3PCookies', - await testMetricsBrowserProxy.whenCalled('recordAction')); - testMetricsBrowserProxy.resetResolver('recordAction'); - assertTrue(page.$.toast.open); - - // Clicking the toast link should be recorded in UMA and should dismiss - // the toast. - page.$.toast.querySelector('cr-button')!.click(); - assertEquals( - 'Settings.PrivacySandbox.OpenedFromCookiesPageToast', - await testMetricsBrowserProxy.whenCalled('recordAction')); - testMetricsBrowserProxy.resetResolver('recordAction'); - assertFalse(page.$.toast.open); - - // Renabling 3P cookies for regular sessions should not display the toast. - blockThirdPartyIncognito().click(); - await flushTasks(); - assertFalse(page.$.toast.open); - assertEquals(0, testMetricsBrowserProxy.getCallCount('recordAction')); - - // The toast should not be displayed if the user has the privacy sandbox - // APIs disabled. - page.set('prefs.privacy_sandbox.apis_enabled_v2.value', false); - blockAll().click(); - await flushTasks(); - assertFalse(page.$.toast.open); - assertEquals(0, testMetricsBrowserProxy.getCallCount('recordAction')); - - // Disabling only 3P cookies should display the toast. - page.set('prefs.privacy_sandbox.apis_enabled_v2.value', true); - page.set( - 'prefs.generated.cookie_primary_setting.value', - CookiePrimarySetting.ALLOW_ALL); - blockThirdParty().click(); - assertEquals( - 'Settings.PrivacySandbox.Block3PCookies', - await testMetricsBrowserProxy.whenCalled('recordAction')); - assertTrue(page.$.toast.open); - - // Reselecting a non-3P cookie blocking setting should hide the toast. - allowAll().click(); - await flushTasks(); - assertFalse(page.$.toast.open); - - // Navigating away from the page should hide the toast, even if navigated - // back to. - blockAll().click(); - await flushTasks(); - assertTrue(page.$.toast.open); - Router.getInstance().navigateTo(routes.BASIC); - Router.getInstance().navigateTo(routes.COOKIES); - await flushTasks(); - assertFalse(page.$.toast.open); - }); - - test('privacySandboxToast_restrictedSandbox', async function() { - // No toast should be shown if the privacy sandbox is restricted - loadTimeData.overrideValues({ - isPrivacySandboxRestricted: true, - }); - page.set('prefs.privacy_sandbox.apis_enabled_v2.value', true); - blockAll().click(); - assertEquals( - 'Settings.PrivacySandbox.Block3PCookies', - await testMetricsBrowserProxy.whenCalled('recordAction')); - testMetricsBrowserProxy.resetResolver('recordAction'); - assertFalse(page.$.toast.open); - }); - - test('blockThirdPartyIncognitoSecondBulletPointText', function() { - // Confirm the correct string is set. - const cookiesPageBlockThirdPartyIncognitoBulTwoLabel = - page.shadowRoot! - .querySelector<HTMLElement>( - '#cookiesPageBlockThirdPartyIncognitoBulTwo')!.innerText.trim(); - assertEquals( - loadTimeData.getString('cookiePageBlockThirdIncognitoBulTwoFps'), - cookiesPageBlockThirdPartyIncognitoBulTwoLabel); - }); -}); - // TODO(crbug/1349370): Remove after crbug/1349370 is launched. suite('FirstPartySetsUIDisabled', function() { let page: SettingsCookiesPageElement; @@ -701,85 +389,6 @@ }); }); -// TODO(crbug/1378703): Remove after crbug/1378703 or crbug/1349370 are -// launched. -suite( - 'CrSettingsCookiesPageTest_PrivacySandboxSettings4Disabled_FirstPartySetsUIDisabled', - function() { - let page: SettingsCookiesPageElement; - let settingsPrefs: SettingsPrefsElement; - - suiteSetup(function() { - loadTimeData.overrideValues({ - isPrivacySandboxSettings4: false, - firstPartySetsUIEnabled: false, - }); - settingsPrefs = document.createElement('settings-prefs'); - return CrSettingsPrefs.initialized; - }); - - setup(function() { - document.body.innerHTML = window.trustedTypes!.emptyHTML; - page = document.createElement('settings-cookies-page'); - page.prefs = settingsPrefs.prefs!; - document.body.appendChild(page); - flush(); - }); - - teardown(function() { - page.remove(); - }); - - test('blockThirdPartyIncognitoSecondBulletPointText', function() { - // Confirm the correct string is set. - const cookiesPageBlockThirdPartyIncognitoBulTwoLabel = - page.shadowRoot! - .querySelector<HTMLElement>( - '#cookiesPageBlockThirdPartyIncognitoBulTwo')!.innerText - .trim(); - assertEquals( - loadTimeData.getString('cookiePageBlockThirdIncognitoBulTwo'), - cookiesPageBlockThirdPartyIncognitoBulTwoLabel); - }); - }); - -// <if expr="chromeos_lacros"> -// TODO(crbug/1378703): Remove after crbug/1378703 launched. -suite('LacrosSecondaryProfile', function() { - let page: SettingsCookiesPageElement; - let settingsPrefs: SettingsPrefsElement; - - suiteSetup(function() { - loadTimeData.overrideValues({ - isSecondaryUser: true, - isPrivacySandboxSettings4: false, - }); - settingsPrefs = document.createElement('settings-prefs'); - return CrSettingsPrefs.initialized; - }); - - setup(function() { - document.body.innerHTML = window.trustedTypes!.emptyHTML; - page = document.createElement('settings-cookies-page'); - page.prefs = settingsPrefs.prefs!; - document.body.appendChild(page); - flush(); - }); - - teardown(function() { - page.remove(); - }); - - // Checks that the sub label for "Clear on Exit" is not shown for secondary - // Lacros profiles. - test('CookieSessionSublabel', function() { - const clearOnExitRow = - page.shadowRoot!.querySelector<CrLinkRowElement>('#clearOnExit')!; - assertEquals(clearOnExitRow.subLabel, ''); - }); -}); -// </if> - // TODO(b/296212999): Remove after b/296212999 is launched. suite('PreloadingSubpageMovedToPerformanceSettings', function() { let page: SettingsCookiesPageElement;
diff --git a/chrome/test/data/webui/settings/privacy_page_test.ts b/chrome/test/data/webui/settings/privacy_page_test.ts index c1f85b2..f38a60c 100644 --- a/chrome/test/data/webui/settings/privacy_page_test.ts +++ b/chrome/test/data/webui/settings/privacy_page_test.ts
@@ -109,20 +109,6 @@ assertTrue(!!dialog); }); - // TODO(crbug.com/1378703): Remove the test once PrivacySandboxSettings4 - // has been rolled out. - test('cookiesLinkRowLabel', function() { - assertTrue(Boolean(page.shadowRoot!.querySelector<HTMLElement>( - '#thirdPartyCookiesLinkRow'))); - assertFalse(Boolean( - page.shadowRoot!.querySelector<HTMLElement>('#cookiesLinkRow'))); - assertEquals( - page.i18n('thirdPartyCookiesLinkRowLabel'), - page.shadowRoot! - .querySelector<CrLinkRowElement>( - '#thirdPartyCookiesLinkRow')!.label); - }); - test('cookiesLinkRowSublabel', async function() { page.set( 'prefs.profile.cookie_controls_mode.value', CookieControlsMode.OFF); @@ -242,133 +228,6 @@ }); }); -// TODO(crbug.com/1378703): Remove once PrivacySandboxSettings4 has been rolled -// out. -suite(`PrivacySandbox4Disabled`, function() { - let page: SettingsPrivacyPageElement; - let settingsPrefs: SettingsPrefsElement; - let metricsBrowserProxy: TestMetricsBrowserProxy; - let siteSettingsBrowserProxy: TestSiteSettingsPrefsBrowserProxy; - - const testLabels: string[] = ['test label 1', 'test label 2']; - - suiteSetup(function() { - loadTimeData.overrideValues({ - isPrivacySandboxRestricted: false, - isPrivacySandboxSettings4: false, - }); - - settingsPrefs = document.createElement('settings-prefs'); - return CrSettingsPrefs.initialized; - }); - - setup(function() { - siteSettingsBrowserProxy = new TestSiteSettingsPrefsBrowserProxy(); - SiteSettingsPrefsBrowserProxyImpl.setInstance(siteSettingsBrowserProxy); - siteSettingsBrowserProxy.setCookieSettingDescription(testLabels[0]!); - metricsBrowserProxy = new TestMetricsBrowserProxy(); - MetricsBrowserProxyImpl.setInstance(metricsBrowserProxy); - document.body.innerHTML = window.trustedTypes!.emptyHTML; - page = document.createElement('settings-privacy-page'); - page.prefs = settingsPrefs.prefs!; - document.body.appendChild(page); - return flushTasks(); - }); - - test('cookiesLinkRowLabel', function() { - assertTrue(Boolean( - page.shadowRoot!.querySelector<HTMLElement>('#cookiesLinkRow'))); - assertFalse(Boolean(page.shadowRoot!.querySelector<HTMLElement>( - '#thirdPartyCookiesLinkRow'))); - assertEquals( - page.i18n('cookiePageTitle'), - page.shadowRoot!.querySelector<CrLinkRowElement>( - '#cookiesLinkRow')!.label); - }); - - test('cookiesLinkRowSublabel', async function() { - await siteSettingsBrowserProxy.whenCalled('getCookieSettingDescription'); - flush(); - assertEquals( - testLabels[0], - page.shadowRoot!.querySelector<CrLinkRowElement>( - '#cookiesLinkRow')!.subLabel); - - webUIListenerCallback('cookieSettingDescriptionChanged', testLabels[1]); - assertEquals( - testLabels[1], - page.shadowRoot!.querySelector<CrLinkRowElement>( - '#cookiesLinkRow')!.subLabel); - }); - - test('privacySandboxRestricted', function() { - assertTrue(isChildVisible(page, '#privacySandboxLinkRow')); - }); - - test('privacySandboxRowLabel', function() { - const privacySandboxLinkRow = - page.shadowRoot!.querySelector<CrLinkRowElement>( - '#privacySandboxLinkRow')!; - assertEquals( - loadTimeData.getString('privacySandboxTitle'), - privacySandboxLinkRow.label); - }); - - test('privacySandboxRowSublabel', async function() { - page.set('prefs.privacy_sandbox.apis_enabled_v2.value', true); - assertTrue(isChildVisible(page, '#privacySandboxLinkRow')); - const privacySandboxLinkRow = - page.shadowRoot!.querySelector<CrLinkRowElement>( - '#privacySandboxLinkRow')!; - await flushTasks(); - assertEquals( - loadTimeData.getString('privacySandboxTrialsEnabled'), - privacySandboxLinkRow.subLabel); - - page.set('prefs.privacy_sandbox.apis_enabled_v2.value', false); - await flushTasks(); - assertEquals( - loadTimeData.getString('privacySandboxTrialsDisabled'), - privacySandboxLinkRow.subLabel); - }); - - test('privacySandboxExternalLink', function() { - const privacySandboxLinkRow = - page.shadowRoot!.querySelector<CrLinkRowElement>( - '#privacySandboxLinkRow'); - assertTrue(!!privacySandboxLinkRow); - assertTrue(privacySandboxLinkRow.external); - }); - - test('clickPrivacySandboxRow', async function() { - const privacySandboxLinkRow = - page.shadowRoot!.querySelector<HTMLElement>('#privacySandboxLinkRow'); - assertTrue(!!privacySandboxLinkRow); - privacySandboxLinkRow.click(); - // Ensure UMA is logged. - assertEquals( - 'Settings.PrivacySandbox.OpenedFromSettingsParent', - await metricsBrowserProxy.whenCalled('recordAction')); - }); - - test('cookiesSubpageAttributes', async function() { - // The subpage is only in the DOM if the corresponding route is open. - page.shadowRoot!.querySelector<CrLinkRowElement>( - '#cookiesLinkRow')!.click(); - await flushTasks(); - - const cookiesSubpage = - page.shadowRoot!.querySelector<PolymerElement>('#cookies'); - assertTrue(!!cookiesSubpage); - assertEquals( - page.i18n('cookiePageTitle'), - cookiesSubpage.getAttribute('page-title')); - const associatedControl = cookiesSubpage.get('associatedControl'); - assertTrue(!!associatedControl); - assertEquals('cookiesLinkRow', associatedControl.id); - }); -}); - suite(`PrivacySandbox4Enabled`, function() { let page: SettingsPrivacyPageElement; let settingsPrefs: SettingsPrefsElement; @@ -520,7 +379,6 @@ loadTimeData.overrideValues({ isPrivacySandboxRestricted: true, isPrivacySandboxRestrictedNoticeEnabled: true, - isPrivacySandboxSettings4: true, }); settingsPrefs = document.createElement('settings-prefs');
diff --git a/chrome/test/data/webui/settings/settings_browsertest.cc b/chrome/test/data/webui/settings/settings_browsertest.cc index 629d295..6e99e95d 100644 --- a/chrome/test/data/webui/settings/settings_browsertest.cc +++ b/chrome/test/data/webui/settings/settings_browsertest.cc
@@ -560,7 +560,6 @@ SettingsCookiesPageTest() { scoped_feature_list_.InitWithFeatures( { - privacy_sandbox::kPrivacySandboxSettings4, privacy_sandbox::kPrivacySandboxFirstPartySetsUI, }, {features::kPerformanceSettingsPreloadingSubpage}); @@ -587,30 +586,6 @@ "runMochaSuite('FirstPartySetsUIDisabled')"); } -#if BUILDFLAG(IS_CHROMEOS_LACROS) -IN_PROC_BROWSER_TEST_F(SettingsCookiesPageTest, LacrosSecondaryProfile) { - RunTest("settings/cookies_page_test.js", - "runMochaSuite('LacrosSecondaryProfile')"); -} -#endif - -#if (BUILDFLAG(IS_LINUX) && !defined(NDEBUG)) || \ - BUILDFLAG(USE_JAVASCRIPT_COVERAGE) -#define MAYBE_PrivacySandboxSettings4Disabled2 \ - DISABLED_PrivacySandboxSettings4Disabled -#else -#define MAYBE_PrivacySandboxSettings4Disabled2 PrivacySandboxSettings4Disabled -#endif -// TODO(crbug.com/1409653): fix flakiness on Linux debug and Javascript code -// coverage builds and re-enable. -// The "MAYBE..." portion of the test has a 2 at the end because there is -// already a macro with the same name defined in this file. -IN_PROC_BROWSER_TEST_F(SettingsCookiesPageTest, - MAYBE_PrivacySandboxSettings4Disabled2) { - RunTest("settings/cookies_page_test.js", - "runMochaSuite('PrivacySandboxSettings4Disabled')"); -} - IN_PROC_BROWSER_TEST_F(SettingsCookiesPageTest, PreloadingSubpageMovedToPerformanceSettings) { RunTest("settings/cookies_page_test.js", @@ -904,8 +879,7 @@ protected: SettingsPrivacyPageTest() { scoped_feature_list1_.InitWithFeatures( - {privacy_sandbox::kPrivacySandboxSettings4, - permissions::features::kPermissionStorageAccessAPI, + {permissions::features::kPermissionStorageAccessAPI, features::kSafetyCheckNotificationPermissions, features::kSafetyHub}, {}); scoped_feature_list2_.InitAndEnableFeatureWithParameters( @@ -939,13 +913,6 @@ RunTest("settings/privacy_page_test.js", "runMochaSuite('PrivacyPage')"); } -// TODO(crbug.com/1378703): Remove once PrivacySandboxSettings4 has been rolled -// out. -IN_PROC_BROWSER_TEST_F(SettingsPrivacyPageTest, PrivacySandbox4Disabled) { - RunTest("settings/privacy_page_test.js", - "runMochaSuite('PrivacySandbox4Disabled')"); -} - IN_PROC_BROWSER_TEST_F(SettingsPrivacyPageTest, PrivacySandbox4Enabled) { RunTest("settings/privacy_page_test.js", "runMochaSuite('PrivacySandbox4Enabled')"); @@ -998,11 +965,7 @@ "runMochaSuite('EnableWebBluetoothNewPermissionsBackend')"); } -class SettingsPrivacySandboxPageTest : public SettingsBrowserTest { - private: - base::test::ScopedFeatureList scoped_feature_list_{ - privacy_sandbox::kPrivacySandboxSettings4}; -}; +class SettingsPrivacySandboxPageTest : public SettingsBrowserTest {}; IN_PROC_BROWSER_TEST_F(SettingsPrivacySandboxPageTest, PrivacySandboxPage) { RunTest("settings/privacy_sandbox_page_test.js", @@ -1197,11 +1160,7 @@ } #endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) -class SettingsSiteDetailsTest : public SettingsBrowserTest { - private: - base::test::ScopedFeatureList scoped_feature_list_{ - privacy_sandbox::kPrivacySandboxSettings4}; -}; +class SettingsSiteDetailsTest : public SettingsBrowserTest {}; // Dabling on debug due to flaky timeout (crbug.com/825304, // crbug.com/1021219) and win10 x64 (crbug.com/1490294). @@ -1214,11 +1173,7 @@ RunTest("settings/site_details_test.js", "mocha.run()"); } -class SettingsSiteListTest : public SettingsBrowserTest { - private: - base::test::ScopedFeatureList scoped_feature_list_{ - privacy_sandbox::kPrivacySandboxSettings4}; -}; +class SettingsSiteListTest : public SettingsBrowserTest {}; IN_PROC_BROWSER_TEST_F(SettingsSiteListTest, SiteList) { RunTest("settings/site_list_test.js", "runMochaSuite('SiteList')"); @@ -1254,19 +1209,11 @@ RunTest("settings/site_list_test.js", "runMochaSuite('AddExceptionDialog')"); } -// TODO(crbug.com/1378703): Remove after crbug/1378703 launched. -IN_PROC_BROWSER_TEST_F(SettingsSiteListTest, - AddExceptionDialog_PrivacySandbox4Disabled) { - RunTest("settings/site_list_test.js", - "runMochaSuite('AddExceptionDialog_PrivacySandbox4Disabled')"); -} - class SettingsSiteSettingsPageTest : public SettingsBrowserTest { protected: SettingsSiteSettingsPageTest() { scoped_feature_list_.InitWithFeatures( { - privacy_sandbox::kPrivacySandboxSettings4, content_settings::features::kSafetyCheckUnusedSitePermissions, permissions::features::kPermissionStorageAccessAPI, features::kSafetyHub, @@ -1291,19 +1238,6 @@ // TODO(crbug.com/1401833): Flaky. #if BUILDFLAG(IS_LINUX) && !defined(NDEBUG) -#define MAYBE_PrivacySandboxSettings4Disabled \ - DISABLED_PrivacySandboxSettings4Disabled -#else -#define MAYBE_PrivacySandboxSettings4Disabled PrivacySandboxSettings4Disabled -#endif -IN_PROC_BROWSER_TEST_F(SettingsSiteSettingsPageTest, - MAYBE_PrivacySandboxSettings4Disabled) { - RunTest("settings/site_settings_page_test.js", - "runMochaSuite('PrivacySandboxSettings4Disabled')"); -} - -// TODO(crbug.com/1401833): Flaky. -#if BUILDFLAG(IS_LINUX) && !defined(NDEBUG) #define MAYBE_UnusedSitePermissionsReview DISABLED_UnusedSitePermissionsReview #else #define MAYBE_UnusedSitePermissionsReview UnusedSitePermissionsReview
diff --git a/chrome/test/data/webui/settings/site_list_test.ts b/chrome/test/data/webui/settings/site_list_test.ts index 54d9c4a..4af0e5c 100644 --- a/chrome/test/data/webui/settings/site_list_test.ts +++ b/chrome/test/data/webui/settings/site_list_test.ts
@@ -1523,118 +1523,3 @@ assertEquals(secondaryPattern, SITE_EXCEPTION_WILDCARD); }); }); - -// TODO(crbug.com/1378703): Remove after crbug/1378703 launched. -suite('AddExceptionDialog_PrivacySandbox4Disabled', function() { - let dialog: AddSiteDialogElement; - let browserProxy: TestSiteSettingsPrefsBrowserProxy; - - async function inputText(expectedPattern: string) { - const actionButton = dialog.$.add; - assertTrue(!!actionButton); - assertTrue(actionButton.disabled); - - const input = dialog.shadowRoot!.querySelector('cr-input'); - input!.value = expectedPattern; - input!.dispatchEvent( - new CustomEvent('input', {bubbles: true, composed: true})); - - const [pattern, _category] = - await browserProxy.whenCalled('isPatternValidForType'); - assertEquals(expectedPattern, pattern); - assertFalse(actionButton.disabled); - } - - suiteSetup(function() { - loadTimeData.overrideValues({ - isPrivacySandboxSettings4: false, - }); - }); - - setup(function() { - populateTestExceptions(); - - browserProxy = new TestSiteSettingsPrefsBrowserProxy(); - SiteSettingsPrefsBrowserProxyImpl.setInstance(browserProxy); - document.body.innerHTML = window.trustedTypes!.emptyHTML; - dialog = document.createElement('add-site-dialog'); - dialog.category = ContentSettingsTypes.GEOLOCATION; - dialog.contentSetting = ContentSetting.ALLOW; - dialog.hasIncognito = false; - document.body.appendChild(dialog); - }); - - teardown(function() { - dialog.remove(); - }); - - test( - 'add cookie exception for combined cookie exception type', - async function() { - dialog.set('category', ContentSettingsTypes.COOKIES); - dialog.set('cookiesExceptionType', CookiesExceptionType.COMBINED); - flush(); - // Cookie exceptions that support all wildcard patterns (both primary - // and secondary) have a checkbox to control the type of exception. - assertFalse(dialog.$.thirdParties.hidden); - assertFalse(dialog.$.thirdParties.checked); - - // Enter a pattern and click the button. - const expectedPattern = 'foo-bar.com'; - await inputText(expectedPattern); - dialog.$.add.click(); - - // The created exception has secondary pattern wildcard by default - // (created site data cookie exception). - const [primaryPattern, secondaryPattern] = - await browserProxy.whenCalled('setCategoryPermissionForPattern'); - assertEquals(primaryPattern, expectedPattern); - assertEquals(secondaryPattern, SITE_EXCEPTION_WILDCARD); - }); - - test('add third party cookie exception', async function() { - dialog.set('category', ContentSettingsTypes.COOKIES); - dialog.set('cookiesExceptionType', CookiesExceptionType.THIRD_PARTY); - flush(); - // Third party cookies exceptions don't need checkbox to control the - // exception mode. Exceptions with primary pattern wildcard are created. - // CookiesExceptionType.THIRD_PARTY is not used outside of PrivacySandbox4, - // this test is for completeness. - assertTrue(dialog.$.thirdParties.hidden); - - // Enter a pattern and click the button. - const expectedPattern = 'foo-bar.com'; - await inputText(expectedPattern); - dialog.$.add.click(); - - // The created exception has primary pattern wildcard (third party - // exception). - const [primaryPattern, secondaryPattern] = - await browserProxy.whenCalled('setCategoryPermissionForPattern'); - assertEquals(primaryPattern, SITE_EXCEPTION_WILDCARD); - assertEquals(secondaryPattern, expectedPattern); - }); - - test('add site data cookie exception', async function() { - dialog.set('category', ContentSettingsTypes.COOKIES); - dialog.set('cookiesExceptionType', CookiesExceptionType.SITE_DATA); - flush(); - // Site data cookie exceptions don't need checkbox to control the exception - // mode. Exceptions with secondary pattern wildcard are created. - // CookiesExceptionType.SITE_DATA is not used outside of PrivacySandbox4, - // this test is for completeness. - assertTrue(dialog.$.thirdParties.hidden); - - // Enter a pattern and click the button. - const expectedPattern = 'foo-bar.com'; - await inputText(expectedPattern); - dialog.$.add.click(); - - // The created exception has secondary pattern wildcard (site data - // exception). - const [primaryPattern, secondaryPattern] = - await browserProxy.whenCalled('setCategoryPermissionForPattern'); - assertEquals(primaryPattern, expectedPattern); - assertEquals(secondaryPattern, SITE_EXCEPTION_WILDCARD); - }); -});
diff --git a/chrome/test/data/webui/settings/site_settings_page_test.ts b/chrome/test/data/webui/settings/site_settings_page_test.ts index 634c71c..2eb4660 100644 --- a/chrome/test/data/webui/settings/site_settings_page_test.ts +++ b/chrome/test/data/webui/settings/site_settings_page_test.ts
@@ -6,14 +6,13 @@ import {webUIListenerCallback} from 'chrome://resources/js/cr.js'; import {loadTimeData} from 'chrome://resources/js/load_time_data.js'; import {flush} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; -import {ContentSetting, CookieControlsMode, ContentSettingsTypes, defaultSettingLabel, SettingsState, SettingsSiteSettingsPageElement, SafetyHubBrowserProxyImpl, SiteSettingsPrefsBrowserProxyImpl, SafetyHubEvent} from 'chrome://settings/lazy_load.js'; +import {ContentSetting, CookieControlsMode, ContentSettingsTypes, defaultSettingLabel, SettingsState, SettingsSiteSettingsPageElement, SafetyHubBrowserProxyImpl, SafetyHubEvent} from 'chrome://settings/lazy_load.js'; import {CrLinkRowElement, Router, routes, SettingsToggleButtonElement} from 'chrome://settings/settings.js'; import {assertEquals, assertFalse, assertTrue} from 'chrome://webui-test/chai_assert.js'; import {isChildVisible} from 'chrome://webui-test/test_util.js'; import {flushTasks} from 'chrome://webui-test/polymer_test_util.js'; import {TestSafetyHubBrowserProxy} from './test_safety_hub_browser_proxy.js'; -import {TestSiteSettingsPrefsBrowserProxy} from './test_site_settings_prefs_browser_proxy.js'; // clang-format on @@ -87,17 +86,6 @@ page.$.advancedContentList, `#${ContentSettingsTypes.ANTI_ABUSE}`)); }); - // TODO(crbug.com/1378703): Remove the test once PrivacySandboxSettings4 - // has been rolled out. - test('CookiesLinkRowLabel', function() { - const labelExpected = - loadTimeData.getString('thirdPartyCookiesLinkRowLabel'); - const labelActual = - page.shadowRoot!.querySelector('#basicContentList')!.shadowRoot! - .querySelector<CrLinkRowElement>('#cookies')!.label; - assertEquals(labelExpected, labelActual); - }); - test('CookiesLinkRowSublabel', async function() { setupPage(); const cookiesLinkRow = @@ -264,63 +252,6 @@ }); -// TODO(crbug/1378703): Remove after crbug/1378703 launched. -suite('PrivacySandboxSettings4Disabled', function() { - let page: SettingsSiteSettingsPageElement; - let siteSettingsBrowserProxy: TestSiteSettingsPrefsBrowserProxy; - - const testLabels: string[] = ['test label 1', 'test label 2']; - - suiteSetup(function() { - loadTimeData.overrideValues({ - isPrivacySandboxSettings4: false, - }); - }); - - setup(function() { - siteSettingsBrowserProxy = new TestSiteSettingsPrefsBrowserProxy(); - SiteSettingsPrefsBrowserProxyImpl.setInstance(siteSettingsBrowserProxy); - siteSettingsBrowserProxy.setCookieSettingDescription(testLabels[0]!); - - document.body.innerHTML = window.trustedTypes!.emptyHTML; - page = document.createElement('settings-site-settings-page'); - document.body.appendChild(page); - flush(); - }); - - teardown(function() { - page.remove(); - }); - - test('SiteDataLinkRow', function() { - page.shadowRoot!.querySelector<HTMLElement>('#expandContent')!.click(); - flush(); - - assertFalse(isChildVisible( - page.shadowRoot!.querySelector('#advancedContentList')!, '#site-data')); - }); - - test('CookiesLinkRowLabel', function() { - const labelExpected = loadTimeData.getString('siteSettingsCookies'); - const labelActual = - page.shadowRoot!.querySelector('#basicContentList')!.shadowRoot! - .querySelector<CrLinkRowElement>('#cookies')!.label; - assertEquals(labelExpected, labelActual); - }); - - test('CookiesLinkRowSublabel', async function() { - await siteSettingsBrowserProxy.whenCalled('getCookieSettingDescription'); - flush(); - const cookiesLinkRow = - page.shadowRoot!.querySelector('#basicContentList')!.shadowRoot! - .querySelector<CrLinkRowElement>('#cookies')!; - assertEquals(testLabels[0], cookiesLinkRow.subLabel); - - webUIListenerCallback('cookieSettingDescriptionChanged', testLabels[1]); - assertEquals(testLabels[1], cookiesLinkRow.subLabel); - }); -}); - const unusedSitePermissionMockData = [{ origin: 'www.example.com', permissions: [ContentSettingsTypes.CAMERA],
diff --git a/chrome/test/data/webui/tab_search/tab_organization_page_test.ts b/chrome/test/data/webui/tab_search/tab_organization_page_test.ts index ebb25e4..884030d 100644 --- a/chrome/test/data/webui/tab_search/tab_organization_page_test.ts +++ b/chrome/test/data/webui/tab_search/tab_organization_page_test.ts
@@ -299,7 +299,8 @@ assertEquals(0, testApiProxy.getCallCount('startTabGroupTutorial')); const tipAction = - tabOrganizationPage.shadowRoot!.querySelector<HTMLElement>('.link'); + tabOrganizationPage.shadowRoot!.querySelector<HTMLElement>( + '.tab-organization-link'); assertTrue(!!tipAction); tipAction.click(); await flushTasks();
diff --git a/chrome/updater/cleanup_task.cc b/chrome/updater/cleanup_task.cc index 0e5eda0..62d947b 100644 --- a/chrome/updater/cleanup_task.cc +++ b/chrome/updater/cleanup_task.cc
@@ -31,6 +31,15 @@ // Versions up to this version will be uninstalled. constexpr char kCleanupVersionMax[] = "117.0.5859.0"; +// TODO(crbug/5002644): we should remove this once we believe the cache has +// been deleted by the majority of clients. +void TempCleanupCache(UpdaterScope scope) { + absl::optional<base::FilePath> cache_dir = GetCrxDiffCacheDirectory(scope); + if (cache_dir.has_value()) { + base::DeletePathRecursively(cache_dir.value()); + } +} + void CleanupGoogleUpdate(UpdaterScope scope) { #if BUILDFLAG(IS_WIN) // Delete anything other than `GoogleUpdate.exe` under `\Google\Update`. @@ -86,6 +95,7 @@ [](UpdaterScope scope) { CleanupGoogleUpdate(scope); CleanupOldUpdaterVersions(scope); + TempCleanupCache(scope); }, scope_), std::move(callback));
diff --git a/chrome/updater/win/setup/setup_util.cc b/chrome/updater/win/setup/setup_util.cc index 5c1806b..e282623 100644 --- a/chrome/updater/win/setup/setup_util.cc +++ b/chrome/updater/win/setup/setup_util.cc
@@ -281,10 +281,6 @@ const std::wstring typelib_reg_path = GetComTypeLibRegistryPath(iid); for (const auto& key_flag : {KEY_WOW64_32KEY, KEY_WOW64_64KEY}) { - // Delete any old typelib registrations first. The IID is registered to both - // the 32 and 64 bit keys, and does not need to be deleted. - list->AddDeleteRegKeyWorkItem(root, typelib_reg_path, key_flag); - // Registering the Ole Automation marshaler with the CLSID // {00020424-0000-0000-C000-000000000046} as the proxy/stub for the // interfaces. @@ -333,10 +329,8 @@ const std::wstring clsid_reg_path = GetComServerClsidRegistryPath(clsid); // Delete any old registrations first. - for (const auto& reg_path : {clsid_reg_path}) { - for (const auto& key_flag : {KEY_WOW64_32KEY, KEY_WOW64_64KEY}) { - list->AddDeleteRegKeyWorkItem(root, reg_path, key_flag); - } + for (const auto& key_flag : {KEY_WOW64_32KEY, KEY_WOW64_64KEY}) { + list->AddDeleteRegKeyWorkItem(root, clsid_reg_path, key_flag); } list->AddCreateRegKeyWorkItem(root, clsid_reg_path, WorkItem::kWow64Default);
diff --git a/chromecast/media/api/cast_audio_demuxer.h b/chromecast/media/api/cast_audio_demuxer.h index a23b0af..c3f2f4f 100644 --- a/chromecast/media/api/cast_audio_demuxer.h +++ b/chromecast/media/api/cast_audio_demuxer.h
@@ -5,7 +5,7 @@ #ifndef CHROMECAST_MEDIA_API_CAST_AUDIO_DEMUXER_H_ #define CHROMECAST_MEDIA_API_CAST_AUDIO_DEMUXER_H_ -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/time/time.h" #include "chromecast/media/api/decoder_buffer_base.h" #include "chromecast/public/media/decoder_config.h"
diff --git a/chromeos/ash/components/dbus/biod/fake_biod_client.cc b/chromeos/ash/components/dbus/biod/fake_biod_client.cc index 0eb4207..a3db5c3f 100644 --- a/chromeos/ash/components/dbus/biod/fake_biod_client.cc +++ b/chromeos/ash/components/dbus/biod/fake_biod_client.cc
@@ -19,7 +19,7 @@ #include "base/notreached.h" #include "base/path_service.h" #include "base/strings/string_number_conversions.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/strings/string_split.h" #include "base/task/single_thread_task_runner.h" #include "base/threading/thread_restrictions.h"
diff --git a/chromeos/ash/components/fwupd/firmware_update_manager.cc b/chromeos/ash/components/fwupd/firmware_update_manager.cc index 26e1f53..f5bd41a4 100644 --- a/chromeos/ash/components/fwupd/firmware_update_manager.cc +++ b/chromeos/ash/components/fwupd/firmware_update_manager.cc
@@ -389,9 +389,6 @@ } } -// TODO(jimmyxgong): Currently only looks for the local cache for the update -// file. This needs to update to fetch the update file from a server and -// download it to the local cache. void FirmwareUpdateManager::StartInstall(const std::string& device_id, const base::FilePath& filepath, base::OnceCallback<void()> callback) {
diff --git a/chromeos/ash/components/network/metrics/connection_info_metrics_logger.cc b/chromeos/ash/components/network/metrics/connection_info_metrics_logger.cc index 29f92bd..222305f 100644 --- a/chromeos/ash/components/network/metrics/connection_info_metrics_logger.cc +++ b/chromeos/ash/components/network/metrics/connection_info_metrics_logger.cc
@@ -180,7 +180,8 @@ if (curr_info.status == ConnectionInfo::Status::kConnected) { NetworkMetricsHelper::LogAllConnectionResult(curr_info.guid, - !curr_info.is_user_initiated); + !curr_info.is_user_initiated, + /*is_repeated_error=*/false); NotifyConnectionResult(curr_info.guid, /*shill_error=*/absl::nullopt); } @@ -192,7 +193,9 @@ curr_info.status == ConnectionInfo::Status::kDisconnected && NetworkState::ErrorIsValid(curr_info.shill_error)) { NetworkMetricsHelper::LogAllConnectionResult( - curr_info.guid, !curr_info.is_user_initiated, curr_info.shill_error); + curr_info.guid, !curr_info.is_user_initiated, + /*is_repeated_error=*/prev_info->shill_error == curr_info.shill_error, + curr_info.shill_error); NotifyConnectionResult(curr_info.guid, curr_info.shill_error); } }
diff --git a/chromeos/ash/components/network/metrics/network_metrics_helper.cc b/chromeos/ash/components/network/metrics/network_metrics_helper.cc index 462a884..2324b9b 100644 --- a/chromeos/ash/components/network/metrics/network_metrics_helper.cc +++ b/chromeos/ash/components/network/metrics/network_metrics_helper.cc
@@ -7,6 +7,7 @@ #include "base/metrics/histogram_functions.h" #include "base/notreached.h" #include "base/strings/strcat.h" +#include "chromeos/ash/components/network/cellular_metrics_logger.h" #include "chromeos/ash/components/network/metrics/connection_results.h" #include "chromeos/ash/components/network/network_event_log.h" #include "chromeos/ash/components/network/network_handler.h" @@ -20,6 +21,7 @@ const char kNetworkMetricsPrefix[] = "Network.Ash."; const char kAllConnectionResultSuffix[] = ".ConnectionResult.All"; +const char kFilteredConnectionResultSuffix[] = ".ConnectionResult.Filtered"; const char kNonUserInitiatedConnectionResultSuffix[] = ".ConnectionResult.NonUserInitiated"; const char kUserInitiatedConnectionResultSuffix[] = @@ -176,6 +178,7 @@ void NetworkMetricsHelper::LogAllConnectionResult( const std::string& guid, bool is_auto_connect, + bool is_repeated_error, const absl::optional<std::string>& shill_error) { DCHECK(GetNetworkStateHandler()); const NetworkState* network_state = @@ -187,6 +190,9 @@ shill_error ? ShillErrorToConnectResult(*shill_error) : ShillConnectResult::kSuccess; + const bool is_not_repeated_error = + !is_repeated_error || connect_result == ShillConnectResult::kSuccess; + for (const auto& network_type : GetNetworkTypeHistogramNames(network_state)) { base::UmaHistogramEnumeration( base::StrCat( @@ -198,6 +204,13 @@ kNonUserInitiatedConnectionResultSuffix}), connect_result); } + + if (is_not_repeated_error) { + base::UmaHistogramEnumeration( + base::StrCat({kNetworkMetricsPrefix, network_type, + kFilteredConnectionResultSuffix}), + connect_result); + } } }
diff --git a/chromeos/ash/components/network/metrics/network_metrics_helper.h b/chromeos/ash/components/network/metrics/network_metrics_helper.h index aec2826..d7cd568 100644 --- a/chromeos/ash/components/network/metrics/network_metrics_helper.h +++ b/chromeos/ash/components/network/metrics/network_metrics_helper.h
@@ -27,13 +27,16 @@ }; // Logs connection result for network with given |guid| in - // Network.Ash.{NetworkType}.ConnectionResult.All, it will also logs the + // Network.Ash.{NetworkType}.ConnectionResult.All, + // Network.Ash.{NetworkType}.ConnectionResult.All.Filtered and also the // result to Network.Ash.{NetworkType}.ConnectionResult.Auto if - // `is_auto_connect` is set to true. If `shill_error` has no value, a - // connection success is logged. + // `is_auto_connect` is set to true. `is_repeated_error` is true if + // the current shill error is the same as the previous shill error. + // If `shill_error` has no value, a connection success is logged. static void LogAllConnectionResult( const std::string& guid, bool is_auto_connect, + bool is_repeated_error, const absl::optional<std::string>& shill_error = absl::nullopt); // Logs result of a user initiated connection attempt for a network with a
diff --git a/chromeos/ash/components/network/metrics/network_metrics_helper_unittest.cc b/chromeos/ash/components/network/metrics/network_metrics_helper_unittest.cc index 07de5882..474b197 100644 --- a/chromeos/ash/components/network/metrics/network_metrics_helper_unittest.cc +++ b/chromeos/ash/components/network/metrics/network_metrics_helper_unittest.cc
@@ -41,6 +41,16 @@ const char kCellularESimPolicyConnectResultAllHistogram[] = "Network.Ash.Cellular.ESim.Policy.ConnectionResult.All"; +// LogAllConnectionResult() filtered Cellular histograms. +const char kCellularConnectResultFilteredHistogram[] = + "Network.Ash.Cellular.ConnectionResult.Filtered"; +const char kCellularESimConnectResultFilteredHistogram[] = + "Network.Ash.Cellular.ESim.ConnectionResult.Filtered"; +const char kCellularPSimConnectResultFilteredHistogram[] = + "Network.Ash.Cellular.PSim.ConnectionResult.Filtered"; +const char kCellularESimPolicyConnectResultFilteredHistogram[] = + "Network.Ash.Cellular.ESim.Policy.ConnectionResult.Filtered"; + // LogAllConnectionResult() VPN histograms. const char kVpnConnectResultAllHistogram[] = "Network.Ash.VPN.ConnectionResult.All"; @@ -51,6 +61,16 @@ const char kVpnUnknownConnectResultAllHistogram[] = "Network.Ash.VPN.TypeUnknown.ConnectionResult.All"; +// LogAllConnectionResult() filtered VPN histograms. +const char kVpnConnectResultFilteredHistogram[] = + "Network.Ash.VPN.ConnectionResult.Filtered"; +const char kVpnBuiltInConnectResultFilteredHistogram[] = + "Network.Ash.VPN.TypeBuiltIn.ConnectionResult.Filtered"; +const char kVpnThirdPartyConnectResultFilteredHistogram[] = + "Network.Ash.VPN.TypeThirdParty.ConnectionResult.Filtered"; +const char kVpnUnknownConnectResultFilteredHistogram[] = + "Network.Ash.VPN.TypeUnknown.ConnectionResult.Filtered"; + // LogAllConnectionResult() WiFi histograms. const char kWifiConnectResultAllHistogram[] = "Network.Ash.WiFi.ConnectionResult.All"; @@ -61,6 +81,14 @@ const char kWifiPasswordProtectedConnectResultAllHistogram[] = "Network.Ash.WiFi.SecurityPasswordProtected.ConnectionResult.All"; +// LogAllConnectionResult() filtered WiFi histograms. +const char kWifiConnectResultFilteredHistogram[] = + "Network.Ash.WiFi.ConnectionResult.Filtered"; +const char kWifiOpenConnectResultFilteredHistogram[] = + "Network.Ash.WiFi.SecurityOpen.ConnectionResult.Filtered"; +const char kWifiPasswordProtectedConnectResultFilteredHistogram[] = + "Network.Ash.WiFi.SecurityPasswordProtected.ConnectionResult.Filtered"; + // LogAllConnectionResult() Ethernet histograms. const char kEthernetConnectResultAllHistogram[] = "Network.Ash.Ethernet.ConnectionResult.All"; @@ -69,6 +97,14 @@ const char kEthernetNoEapConnectResultAllHistogram[] = "Network.Ash.Ethernet.NoEap.ConnectionResult.All"; +// LogAllConnectionResult() filtered Ethernet histograms. +const char kEthernetConnectResultFilteredHistogram[] = + "Network.Ash.Ethernet.ConnectionResult.Filtered"; +const char kEthernetEapConnectResultFilteredHistogram[] = + "Network.Ash.Ethernet.Eap.ConnectionResult.Filtered"; +const char kEthernetNoEapConnectResultFilteredHistogram[] = + "Network.Ash.Ethernet.NoEap.ConnectionResult.Filtered"; + // LogUserInitiatedConnectionResult() Cellular histograms. const char kCellularConnectResultUserInitiatedHistogram[] = "Network.Ash.Cellular.ConnectionResult.UserInitiated"; @@ -387,7 +423,8 @@ base::RunLoop().RunUntilIdle(); NetworkMetricsHelper::LogAllConnectionResult( - kTestGuid, /*is_auto_connect=*/false, shill::kErrorNotRegistered); + kTestGuid, /*is_auto_connect=*/false, /*is_repeated_error=*/false, + shill::kErrorNotRegistered); histogram_tester_->ExpectTotalCount(kCellularConnectResultAllHistogram, 1); histogram_tester_->ExpectTotalCount(kCellularESimConnectResultAllHistogram, 1); @@ -396,8 +433,16 @@ histogram_tester_->ExpectTotalCount( kCellularESimConnectResultNonUserInitiatedHistogram, 0); + histogram_tester_->ExpectTotalCount(kCellularConnectResultFilteredHistogram, + 1); + histogram_tester_->ExpectTotalCount( + kCellularESimConnectResultFilteredHistogram, 1); + histogram_tester_->ExpectTotalCount( + kCellularPSimConnectResultFilteredHistogram, 0); + NetworkMetricsHelper::LogAllConnectionResult( - kTestGuid, /*is_auto_connect=*/true, shill::kErrorNotRegistered); + kTestGuid, /*is_auto_connect=*/true, /*is_repeated_error=*/true, + shill::kErrorNotRegistered); histogram_tester_->ExpectTotalCount(kCellularConnectResultAllHistogram, 2); histogram_tester_->ExpectTotalCount(kCellularESimConnectResultAllHistogram, 2); @@ -406,6 +451,13 @@ histogram_tester_->ExpectTotalCount( kCellularESimConnectResultNonUserInitiatedHistogram, 1); + histogram_tester_->ExpectTotalCount(kCellularConnectResultFilteredHistogram, + 1); + histogram_tester_->ExpectTotalCount( + kCellularESimConnectResultFilteredHistogram, 1); + histogram_tester_->ExpectTotalCount( + kCellularPSimConnectResultFilteredHistogram, 0); + shill_service_client_->SetServiceProperty( kTestServicePath, shill::kErrorProperty, base::Value(shill::kErrorInvalidAPN)); @@ -482,7 +534,8 @@ base::RunLoop().RunUntilIdle(); NetworkMetricsHelper::LogAllConnectionResult( - kTestGuid, /*is_auto_connect=*/false, shill::kErrorNotRegistered); + kTestGuid, /*is_auto_connect=*/false, /*is_repeated_error=*/false, + shill::kErrorNotRegistered); histogram_tester_->ExpectTotalCount(kCellularConnectResultAllHistogram, 1); histogram_tester_->ExpectTotalCount(kCellularESimConnectResultAllHistogram, 1); @@ -491,6 +544,15 @@ histogram_tester_->ExpectTotalCount(kCellularPSimConnectResultAllHistogram, 0); + histogram_tester_->ExpectTotalCount(kCellularConnectResultFilteredHistogram, + 1); + histogram_tester_->ExpectTotalCount( + kCellularESimConnectResultFilteredHistogram, 1); + histogram_tester_->ExpectTotalCount( + kCellularESimPolicyConnectResultFilteredHistogram, 1); + histogram_tester_->ExpectTotalCount( + kCellularPSimConnectResultFilteredHistogram, 0); + NetworkMetricsHelper::LogUserInitiatedConnectionResult( kTestGuid, shill::kErrorNotRegistered); histogram_tester_->ExpectTotalCount( @@ -554,7 +616,8 @@ base::RunLoop().RunUntilIdle(); NetworkMetricsHelper::LogAllConnectionResult( - kTestGuid, /*is_auto_connect=*/false, shill::kErrorNotRegistered); + kTestGuid, /*is_auto_connect=*/false, /*is_repeated_error=*/false, + shill::kErrorNotRegistered); histogram_tester_->ExpectTotalCount(kCellularConnectResultAllHistogram, 1); histogram_tester_->ExpectTotalCount(kCellularPSimConnectResultAllHistogram, 1); @@ -563,8 +626,16 @@ histogram_tester_->ExpectTotalCount( kCellularPSimConnectResultNonUserInitiatedHistogram, 0); + histogram_tester_->ExpectTotalCount(kCellularConnectResultFilteredHistogram, + 1); + histogram_tester_->ExpectTotalCount( + kCellularPSimConnectResultFilteredHistogram, 1); + histogram_tester_->ExpectTotalCount( + kCellularESimConnectResultFilteredHistogram, 0); + NetworkMetricsHelper::LogAllConnectionResult( - kTestGuid, /*is_auto_connect=*/true, shill::kErrorNotRegistered); + kTestGuid, /*is_auto_connect=*/true, /*is_repeated_error=*/true, + shill::kErrorNotRegistered); histogram_tester_->ExpectTotalCount(kCellularConnectResultAllHistogram, 2); histogram_tester_->ExpectTotalCount(kCellularPSimConnectResultAllHistogram, 2); @@ -573,6 +644,13 @@ histogram_tester_->ExpectTotalCount( kCellularPSimConnectResultNonUserInitiatedHistogram, 1); + histogram_tester_->ExpectTotalCount(kCellularConnectResultFilteredHistogram, + 1); + histogram_tester_->ExpectTotalCount( + kCellularPSimConnectResultFilteredHistogram, 1); + histogram_tester_->ExpectTotalCount( + kCellularESimConnectResultFilteredHistogram, 0); + NetworkMetricsHelper::LogUserInitiatedConnectionResult( kTestGuid, shill::kErrorNotRegistered); histogram_tester_->ExpectTotalCount( @@ -640,15 +718,40 @@ // expectation by |2|. const size_t kConnectionStateCountScale = 2u; - size_t expected_all_count = 0; - size_t expected_user_initiated_count = 0; - size_t expected_built_in_count = 0; - size_t expected_third_party_count = 0; - size_t expected_unknown_count = 0; + size_t expected_all_count = 0u; + size_t expected_user_initiated_count = 0u; + size_t expected_built_in_count = 0u; + size_t expected_built_in_count_user_initiated = 0u; + size_t expected_third_party_count = 0u; + size_t expected_third_party_count_user_initiated = 0u; + size_t expected_unknown_count = 0u; + size_t expected_unknown_count_user_initiated = 0u; - base::RepeatingClosure log_all_connection_result = base::BindRepeating( - &NetworkMetricsHelper::LogAllConnectionResult, kTestGuid, - /*is_auto_connect=*/false, shill::kErrorNotRegistered); + size_t expected_filtered_count = 0u; + size_t expected_built_in_fitered_count = 0u; + size_t expected_third_party_filtered_count = 0u; + size_t expected_unknown_filtered_count = 0u; + + const size_t kTotalCountIncrement = 3u; + const size_t kFilteredCountIncrement = 2u; + const size_t kUserInitiatedCountIncrement = 1u; + + base::RepeatingClosure log_all_connection_result_not_repeated_with_error = + base::BindRepeating( + &NetworkMetricsHelper::LogAllConnectionResult, kTestGuid, + /*is_auto_connect=*/false, /*is_repeated_error=*/false, + shill::kErrorNotRegistered); + base::RepeatingClosure log_all_connection_result_repeated_with_error = + base::BindRepeating(&NetworkMetricsHelper::LogAllConnectionResult, + kTestGuid, + /*is_auto_connect=*/false, /*is_repeated_error=*/true, + shill::kErrorNotRegistered); + base::RepeatingClosure log_all_connection_result_repeated_without_error = + base::BindRepeating(&NetworkMetricsHelper::LogAllConnectionResult, + kTestGuid, + /*is_auto_connect=*/false, /*is_repeated_error=*/true, + /*shill_error=*/absl::nullopt); + base::RepeatingClosure log_user_initiated_connection_result = base::BindRepeating( &NetworkMetricsHelper::LogUserInitiatedConnectionResult, kTestGuid, @@ -676,7 +779,16 @@ base::Value(kTestVpnHost)); base::RunLoop().RunUntilIdle(); - LogVpnResult(provider, log_all_connection_result, &failed_to_log_result); + // We call LogAllConnectionResult() 3 times here to check various + // combinations if connection results and repeated failures. The counts will + // be increased, by 3 or 2 depending on if the failure is repeated. + LogVpnResult(provider, log_all_connection_result_not_repeated_with_error, + &failed_to_log_result); + LogVpnResult(provider, log_all_connection_result_repeated_with_error, + &failed_to_log_result); + LogVpnResult(provider, log_all_connection_result_repeated_without_error, + &failed_to_log_result); + LogVpnResult(provider, log_user_initiated_connection_result, &failed_to_log_result); LogVpnResult(provider, log_connection_state_result, &failed_to_log_result); @@ -686,17 +798,25 @@ if (!failed_to_log_result) { if (provider == shill::kProviderThirdPartyVpn || provider == shill::kProviderArcVpn) { - ++expected_third_party_count; + expected_third_party_count += kTotalCountIncrement; + expected_third_party_count_user_initiated += + kUserInitiatedCountIncrement; + expected_third_party_filtered_count += kFilteredCountIncrement; } else if (provider == shill::kProviderIKEv2 || provider == shill::kProviderL2tpIpsec || provider == shill::kProviderOpenVpn || provider == shill::kProviderWireGuard) { - ++expected_built_in_count; + expected_built_in_count += kTotalCountIncrement; + expected_built_in_count_user_initiated += kUserInitiatedCountIncrement; + expected_built_in_fitered_count += kFilteredCountIncrement; } else { - ++expected_unknown_count; + expected_unknown_count += kTotalCountIncrement; + expected_unknown_count_user_initiated += kUserInitiatedCountIncrement; + expected_unknown_filtered_count += kFilteredCountIncrement; } - ++expected_all_count; - ++expected_user_initiated_count; + expected_all_count += kTotalCountIncrement; + expected_filtered_count += kFilteredCountIncrement; + expected_user_initiated_count += kUserInitiatedCountIncrement; } histogram_tester_->ExpectTotalCount(kVpnConnectResultAllHistogram, @@ -707,17 +827,30 @@ expected_third_party_count); histogram_tester_->ExpectTotalCount(kVpnUnknownConnectResultAllHistogram, expected_unknown_count); - histogram_tester_->ExpectTotalCount(kVpnConnectResultUserInitiatedHistogram, expected_user_initiated_count); + + histogram_tester_->ExpectTotalCount(kVpnConnectResultFilteredHistogram, + expected_filtered_count); + histogram_tester_->ExpectTotalCount( + kVpnBuiltInConnectResultFilteredHistogram, + expected_built_in_fitered_count); + histogram_tester_->ExpectTotalCount( + kVpnThirdPartyConnectResultFilteredHistogram, + expected_third_party_filtered_count); + histogram_tester_->ExpectTotalCount( + kVpnUnknownConnectResultFilteredHistogram, + expected_unknown_filtered_count); + histogram_tester_->ExpectTotalCount( kVpnBuiltInConnectResultUserInitiatedHistogram, - expected_built_in_count); + expected_built_in_count_user_initiated); histogram_tester_->ExpectTotalCount( kVpnThirdPartyConnectResultUserInitiatedHistogram, - expected_third_party_count); + expected_third_party_count_user_initiated); histogram_tester_->ExpectTotalCount( - kVpnUnknownConnectResultUserInitiatedHistogram, expected_unknown_count); + kVpnUnknownConnectResultUserInitiatedHistogram, + expected_unknown_count_user_initiated); histogram_tester_->ExpectTotalCount( kVpnConnectionStateHistogram, @@ -730,31 +863,34 @@ histogram_tester_->ExpectTotalCount( kVpnBuiltInConnectionStateHistogram, - expected_built_in_count * kConnectionStateCountScale); + expected_built_in_count_user_initiated * kConnectionStateCountScale); histogram_tester_->ExpectTotalCount( - kVpnBuiltInConnectionStateShillErrorHistogram, expected_built_in_count); + kVpnBuiltInConnectionStateShillErrorHistogram, + expected_built_in_count_user_initiated); histogram_tester_->ExpectBucketCount( kVpnBuiltInConnectionStateShillErrorHistogram, - ShillConnectResult::kUnknown, expected_built_in_count); + ShillConnectResult::kUnknown, expected_built_in_count_user_initiated); histogram_tester_->ExpectTotalCount( kVpnThirdPartyConnectionStateHistogram, - expected_third_party_count * kConnectionStateCountScale); + expected_third_party_count_user_initiated * kConnectionStateCountScale); histogram_tester_->ExpectTotalCount( kVpnThirdPartyConnectionStateShillErrorHistogram, - expected_third_party_count); + expected_third_party_count_user_initiated); histogram_tester_->ExpectBucketCount( kVpnThirdPartyConnectionStateShillErrorHistogram, - ShillConnectResult::kUnknown, expected_third_party_count); + ShillConnectResult::kUnknown, + expected_third_party_count_user_initiated); histogram_tester_->ExpectTotalCount( kVpnUnknownConnectionStateHistogram, - expected_unknown_count * kConnectionStateCountScale); + expected_unknown_count_user_initiated * kConnectionStateCountScale); histogram_tester_->ExpectTotalCount( - kVpnUnknownConnectionStateShillErrorHistogram, expected_unknown_count); + kVpnUnknownConnectionStateShillErrorHistogram, + expected_unknown_count_user_initiated); histogram_tester_->ExpectBucketCount( kVpnUnknownConnectionStateShillErrorHistogram, - ShillConnectResult::kUnknown, expected_unknown_count); + ShillConnectResult::kUnknown, expected_unknown_count_user_initiated); shill_service_client_->RemoveService(kTestServicePath); base::RunLoop().RunUntilIdle(); @@ -771,7 +907,8 @@ base::RunLoop().RunUntilIdle(); NetworkMetricsHelper::LogAllConnectionResult( - kTestGuid, /*is_auto_connect=*/false, shill::kErrorNotRegistered); + kTestGuid, /*is_auto_connect=*/false, /*is_repeated_error=*/false, + shill::kErrorNotRegistered); histogram_tester_->ExpectTotalCount(kWifiConnectResultAllHistogram, 1); histogram_tester_->ExpectTotalCount( kWifiConnectResultNonUserInitiatedHistogram, 0); @@ -779,8 +916,15 @@ histogram_tester_->ExpectTotalCount( kWifiPasswordProtectedConnectResultAllHistogram, 0); + histogram_tester_->ExpectTotalCount(kWifiConnectResultFilteredHistogram, 1); + histogram_tester_->ExpectTotalCount(kWifiOpenConnectResultFilteredHistogram, + 1); + histogram_tester_->ExpectTotalCount( + kWifiPasswordProtectedConnectResultFilteredHistogram, 0); + NetworkMetricsHelper::LogAllConnectionResult( - kTestGuid, /*is_auto_connect=*/true, shill::kErrorNotRegistered); + kTestGuid, /*is_auto_connect=*/true, /*is_repeated_error=*/true, + shill::kErrorNotRegistered); histogram_tester_->ExpectTotalCount(kWifiConnectResultAllHistogram, 2); histogram_tester_->ExpectTotalCount( kWifiConnectResultNonUserInitiatedHistogram, 1); @@ -788,6 +932,12 @@ histogram_tester_->ExpectTotalCount( kWifiPasswordProtectedConnectResultAllHistogram, 0); + histogram_tester_->ExpectTotalCount(kWifiConnectResultFilteredHistogram, 1); + histogram_tester_->ExpectTotalCount(kWifiOpenConnectResultFilteredHistogram, + 1); + histogram_tester_->ExpectTotalCount( + kWifiPasswordProtectedConnectResultFilteredHistogram, 0); + NetworkMetricsHelper::LogUserInitiatedConnectionResult( kTestGuid, shill::kErrorNotRegistered); histogram_tester_->ExpectTotalCount(kWifiConnectResultUserInitiatedHistogram, @@ -841,7 +991,8 @@ base::RunLoop().RunUntilIdle(); NetworkMetricsHelper::LogAllConnectionResult( - kTestGuid, /*is_auto_connect=*/false, shill::kErrorNotRegistered); + kTestGuid, /*is_auto_connect=*/false, /*is_repeated_error=*/false, + shill::kErrorNotRegistered); histogram_tester_->ExpectTotalCount(kWifiConnectResultAllHistogram, 1); histogram_tester_->ExpectTotalCount( kWifiConnectResultNonUserInitiatedHistogram, 0); @@ -849,8 +1000,15 @@ histogram_tester_->ExpectTotalCount( kWifiPasswordProtectedConnectResultAllHistogram, 1); + histogram_tester_->ExpectTotalCount(kWifiConnectResultFilteredHistogram, 1); + histogram_tester_->ExpectTotalCount(kWifiOpenConnectResultFilteredHistogram, + 0); + histogram_tester_->ExpectTotalCount( + kWifiPasswordProtectedConnectResultFilteredHistogram, 1); + NetworkMetricsHelper::LogAllConnectionResult( - kTestGuid, /*is_auto_connect=*/true, shill::kErrorNotRegistered); + kTestGuid, /*is_auto_connect=*/true, /*is_repeated_error=*/true, + shill::kErrorNotRegistered); histogram_tester_->ExpectTotalCount(kWifiConnectResultAllHistogram, 2); histogram_tester_->ExpectTotalCount( kWifiConnectResultNonUserInitiatedHistogram, 1); @@ -858,6 +1016,12 @@ histogram_tester_->ExpectTotalCount( kWifiPasswordProtectedConnectResultAllHistogram, 2); + histogram_tester_->ExpectTotalCount(kWifiConnectResultFilteredHistogram, 1); + histogram_tester_->ExpectTotalCount(kWifiOpenConnectResultFilteredHistogram, + 0); + histogram_tester_->ExpectTotalCount( + kWifiPasswordProtectedConnectResultFilteredHistogram, 1); + NetworkMetricsHelper::LogUserInitiatedConnectionResult( kTestGuid, shill::kErrorNotRegistered); histogram_tester_->ExpectTotalCount(kWifiConnectResultUserInitiatedHistogram, @@ -911,12 +1075,36 @@ base::RunLoop().RunUntilIdle(); NetworkMetricsHelper::LogAllConnectionResult( - kTestGuid, /*is_auto_connect=*/false, shill::kErrorNotRegistered); + kTestGuid, /*is_auto_connect=*/false, /*is_repeated_error=*/false, + shill::kErrorNotRegistered); histogram_tester_->ExpectTotalCount(kEthernetConnectResultAllHistogram, 1); histogram_tester_->ExpectTotalCount(kEthernetEapConnectResultAllHistogram, 0); histogram_tester_->ExpectTotalCount(kEthernetNoEapConnectResultAllHistogram, 1); + histogram_tester_->ExpectTotalCount(kEthernetConnectResultFilteredHistogram, + 1); + histogram_tester_->ExpectTotalCount( + kEthernetEapConnectResultFilteredHistogram, 0); + histogram_tester_->ExpectTotalCount( + kEthernetNoEapConnectResultFilteredHistogram, 1); + + NetworkMetricsHelper::LogAllConnectionResult( + kTestGuid, /*is_auto_connect=*/false, /*is_repeated_error=*/true, + shill::kErrorNotRegistered); + + histogram_tester_->ExpectTotalCount(kEthernetConnectResultAllHistogram, 2); + histogram_tester_->ExpectTotalCount(kEthernetEapConnectResultAllHistogram, 0); + histogram_tester_->ExpectTotalCount(kEthernetNoEapConnectResultAllHistogram, + 2); + + histogram_tester_->ExpectTotalCount(kEthernetConnectResultFilteredHistogram, + 1); + histogram_tester_->ExpectTotalCount( + kEthernetEapConnectResultFilteredHistogram, 0); + histogram_tester_->ExpectTotalCount( + kEthernetNoEapConnectResultFilteredHistogram, 1); + NetworkMetricsHelper::LogUserInitiatedConnectionResult( kTestGuid, shill::kErrorNotRegistered); histogram_tester_->ExpectTotalCount( @@ -993,12 +1181,28 @@ histogram_tester_->ExpectTotalCount(kEthernetNoEapConnectResultAllHistogram, 0); + histogram_tester_->ExpectTotalCount(kEthernetConnectResultFilteredHistogram, + 0); + histogram_tester_->ExpectTotalCount( + kEthernetEapConnectResultFilteredHistogram, 0); + histogram_tester_->ExpectTotalCount( + kEthernetNoEapConnectResultFilteredHistogram, 0); + NetworkMetricsHelper::LogAllConnectionResult( - kTestGuid, /*is_auto_connect=*/false, shill::kErrorNotRegistered); + kTestGuid, /*is_auto_connect=*/false, + /*is_repeated_error=*/false, shill::kErrorNotRegistered); histogram_tester_->ExpectTotalCount(kEthernetConnectResultAllHistogram, 1); histogram_tester_->ExpectTotalCount(kEthernetEapConnectResultAllHistogram, 1); histogram_tester_->ExpectTotalCount(kEthernetNoEapConnectResultAllHistogram, 0); + + histogram_tester_->ExpectTotalCount(kEthernetConnectResultFilteredHistogram, + 1); + histogram_tester_->ExpectTotalCount( + kEthernetEapConnectResultFilteredHistogram, 1); + histogram_tester_->ExpectTotalCount( + kEthernetNoEapConnectResultFilteredHistogram, 0); + NetworkMetricsHelper::LogUserInitiatedConnectionResult( kTestGuid, shill::kErrorNotRegistered); histogram_tester_->ExpectTotalCount(
diff --git a/chromeos/ash/components/network/onc/onc_translation_tables.h b/chromeos/ash/components/network/onc/onc_translation_tables.h index 2dd6d98..62ef8d1 100644 --- a/chromeos/ash/components/network/onc/onc_translation_tables.h +++ b/chromeos/ash/components/network/onc/onc_translation_tables.h
@@ -9,7 +9,7 @@ #include <vector> #include "base/component_export.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "chromeos/components/onc/onc_signature.h" namespace ash::onc {
diff --git a/chromeos/ash/components/standalone_browser/browser_support.cc b/chromeos/ash/components/standalone_browser/browser_support.cc index 769cfb1..c6a267e1 100644 --- a/chromeos/ash/components/standalone_browser/browser_support.cc +++ b/chromeos/ash/components/standalone_browser/browser_support.cc
@@ -5,6 +5,7 @@ #include "chromeos/ash/components/standalone_browser/browser_support.h" #include "ash/constants/ash_switches.h" +#include "base/check_is_test.h" #include "base/check_op.h" #include "base/command_line.h" #include "base/debug/dump_without_crashing.h" @@ -73,15 +74,7 @@ // TODO(andreaorru): remove the following code once there's no more tests // that rely on it. if (g_instance) { - // We take metrics here to be sure that this code path is not used in - // production, as it should only happen in tests. - // TODO(andreaorru): remove the following code, once we're sure it's never - // used in production. - if (base::SysInfo::IsRunningOnChromeOS()) { - base::UmaHistogramBoolean( - "Ash.BrowserSupport.UnexpectedBrowserSupportInitialize", true); - base::debug::DumpWithoutCrashing(); - } + CHECK_IS_TEST(); Shutdown(); }
diff --git a/chromeos/ash/services/recording/audio_stream_mixer.h b/chromeos/ash/services/recording/audio_stream_mixer.h index 1cbe85c..f8dcd6d 100644 --- a/chromeos/ash/services/recording/audio_stream_mixer.h +++ b/chromeos/ash/services/recording/audio_stream_mixer.h
@@ -9,7 +9,7 @@ #include <vector> #include "base/sequence_checker.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/threading/sequence_bound.h" #include "base/time/time.h" #include "base/types/pass_key.h"
diff --git a/chromeos/ash/services/recording/gif_file_writer.h b/chromeos/ash/services/recording/gif_file_writer.h index 6d0fb06..03075c2 100644 --- a/chromeos/ash/services/recording/gif_file_writer.h +++ b/chromeos/ash/services/recording/gif_file_writer.h
@@ -8,7 +8,7 @@ #include <cstdint> #include "base/files/file.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "chromeos/ash/services/recording/recording_file_io_helper.h" namespace recording {
diff --git a/chromeos/printing/ppd_metadata_parser.h b/chromeos/printing/ppd_metadata_parser.h index 6388553..6806878e 100644 --- a/chromeos/printing/ppd_metadata_parser.h +++ b/chromeos/printing/ppd_metadata_parser.h
@@ -23,7 +23,7 @@ #include "base/component_export.h" #include "base/containers/flat_map.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/version.h" #include "third_party/abseil-cpp/absl/types/optional.h"
diff --git a/chromeos/tast_control.gni b/chromeos/tast_control.gni index 8cfebe41..0a32c52 100644 --- a/chromeos/tast_control.gni +++ b/chromeos/tast_control.gni
@@ -133,6 +133,9 @@ # b/296913657 "secagentd.ProcessEvents@amd64-generic", + # crbug.com/1500320 + "lacros.ShelfLaunch", + # READ COMMENT AT TOP BEFORE ADDING NEW TESTS HERE. ]
diff --git a/chromeos/ui/base/file_icon_util.cc b/chromeos/ui/base/file_icon_util.cc index df830f9..9a11c2b 100644 --- a/chromeos/ui/base/file_icon_util.cc +++ b/chromeos/ui/base/file_icon_util.cc
@@ -11,7 +11,7 @@ #include "base/files/file_path.h" #include "base/memory/raw_ref.h" #include "base/no_destructor.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" #include "chromeos/constants/chromeos_features.h"
diff --git a/clank b/clank index 99c421b..bf3239c 160000 --- a/clank +++ b/clank
@@ -1 +1 @@ -Subproject commit 99c421b0cdf59c0e49866f025179e694f92fd59e +Subproject commit bf3239c2e98d6cfcf5e40a91a18b7d66245c46c5
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 9a51e3b..7bf2ae16 100644 --- a/components/autofill/core/browser/payments/credit_card_access_manager.cc +++ b/components/autofill/core/browser/payments/credit_card_access_manager.cc
@@ -521,8 +521,23 @@ fido_request_options = std::move( virtual_card_unmask_response_details_.fido_request_options.value()); } else { - fido_request_options = - std::move(unmask_details_.fido_request_options.value()); + CHECK_EQ(card_->record_type(), + CreditCard::RecordType::kMaskedServerCard); + if (IsMaskedServerCardRiskBasedAuthAvailable()) { + // If risk-based authentication is available, `context_token` is + // needed for further authentication. `fido_request_options` is + // returned within the risk-based authentication response. + CHECK(!risk_based_authentication_response_.context_token.empty()); + context_token = risk_based_authentication_response_.context_token; + fido_request_options = std::move( + risk_based_authentication_response_.fido_request_options.value()); + } else { + // If risk-based authentication is not available, the response of + // UnmaskDetails preflight call will be used as the resource of + // `fido_request_options`. + fido_request_options = + std::move(unmask_details_.fido_request_options.value()); + } } GetOrCreateFidoAuthenticator()->Authenticate( *card_, weak_ptr_factory_.GetWeakPtr(), @@ -869,11 +884,21 @@ } bool CreditCardAccessManager::IsSelectedCardFidoAuthorized() { + // The selected card is not FIDO authorized if the user has not opted in to + // FIDO auth. + if (!IsUserOptedInToFidoAuth()) { + return false; + } + // If risk-based authentication is available, `fido_request_options` returned + // by the risk-based authentication call will be used as the indicator about + // whether the selected card is FIDO authorized. + if (IsMaskedServerCardRiskBasedAuthAvailable()) { + return risk_based_authentication_response_.fido_request_options.has_value(); + } DCHECK_NE(unmask_details_.unmask_auth_method, AutofillClient::UnmaskAuthMethod::kUnknown); - return IsUserOptedInToFidoAuth() && - unmask_details_.fido_eligible_card_ids.find(card_->server_id()) != - unmask_details_.fido_eligible_card_ids.end(); + return unmask_details_.fido_eligible_card_ids.find(card_->server_id()) != + unmask_details_.fido_eligible_card_ids.end(); } bool CreditCardAccessManager::ShouldRespondImmediately( @@ -1157,54 +1182,54 @@ void CreditCardAccessManager::OnRiskBasedAuthenticationResponseReceived( const CreditCardRiskBasedAuthenticator::RiskBasedAuthenticationResponse& response) { - if (!response.did_succeed) { - client_->CloseAutofillProgressDialog( - /*show_confirmation_before_closing=*/false); - accessor_->OnCreditCardFetched(CreditCardFetchResult::kTransientError, - nullptr); - client_->ShowAutofillErrorDialog(response.error_dialog_context); - Reset(); - return; - } - - // If the card is not empty, then complete card information has been - // fetched from the server (this is ensured in PaymentsClient). Pass the - // unmasked card to `accessor_` and end the session. - CHECK(response.card.has_value()); - card_ = std::make_unique<CreditCard>(response.card.value()); - // Check if the user needs to be authenticated before filling the card. - if (personal_data_manager_->IsPaymentMethodsMandatoryReauthEnabled()) { - // On some operating systems (for example, macOS and Windows), the - // device authentication prompt freezes Chrome. Thus the prompt will only - // be triggered after the progress dialog has been closed, which can be - // done by using the `no_interactive_authentication_callback` parameter in - // `AutofillClient::CloseAutofillProgressDialog()`. - client_->CloseAutofillProgressDialog( - /*show_confirmation_before_closing=*/false, - /*no_interactive_authentication_callback=*/base::BindOnce( - // `StartDeviceAuthenticationForFilling()` will asynchronously - // trigger the re-authentication flow, so calling `Reset()` should - // be avoided until the re-authentication flow is complete. - &CreditCardAccessManager::StartDeviceAuthenticationForFilling, - weak_ptr_factory_.GetWeakPtr(), accessor_, card_.get(), - card_->cvc())); - } else { - client_->CloseAutofillProgressDialog( - /*show_confirmation_before_closing=*/true); - accessor_->OnCreditCardFetched(CreditCardFetchResult::kSuccess, - card_.get()); - - // If the server returned a successful response along with the card's real - // PAN without requiring interactive authentication, set the - // `card_record_type_if_non_interactive_authentication_flow_completed_` - // field in FormDataImporter so that MandatoryReauthManager can decide - // whether to offer mandatory re-auth opt-in for this user. - client_->GetFormDataImporter() - ->SetCardRecordTypeIfNonInteractiveAuthenticationFlowCompleted( - CreditCard::RecordType::kMaskedServerCard); - - // TODO(crbug.com/1470933): Log the unmask result. - Reset(); + switch (response.result) { + case CreditCardRiskBasedAuthenticator::RiskBasedAuthenticationResponse:: + Result::kNoAuthenticationRequired: + // If the response indicates no further authentication is required, then + // complete card information has been fetched from the server (this is + // ensured in CreditCardRiskBasedAuthenticator). Pass the unmasked card to + // `accessor_` and end the session. + CHECK(response.card.has_value()); + card_ = std::make_unique<CreditCard>(response.card.value()); + // Although the card being retrieved is a masked server card, the + // `record_type` was set to kFullServerCard in the + // CreditCardRiskBasedAuthenticator due to the fact that masked server + // cards are treated as full server cards after unmasking. + OnNonInteractiveAuthenticationSuccess( + CreditCard::RecordType::kMaskedServerCard); + break; + case CreditCardRiskBasedAuthenticator::RiskBasedAuthenticationResponse:: + Result::kAuthenticationRequired: + // Authenticates users to unmask the card if the response indicates + // further authentication is required. + client_->CloseAutofillProgressDialog( + /*show_confirmation_before_closing=*/false); + CHECK(!response.context_token.empty()); + risk_based_authentication_response_ = response; + // If `fido_request_options` is present, FIDO auth is offered to the card + // being retrieved. Otherwise, we need to check the returned value of + // GetUnmaskDetails to determine whether the card can be enrolled into + // FIDO. + StartAuthenticationFlow(IsFidoAuthEnabled( + /*fido_auth_offered=*/response.fido_request_options.has_value() || + unmask_details_.unmask_auth_method == + AutofillClient::UnmaskAuthMethod::kFido)); + break; + case CreditCardRiskBasedAuthenticator::RiskBasedAuthenticationResponse:: + Result::kError: + // Shows error dialog to users if the authentication failed. + client_->CloseAutofillProgressDialog( + /*show_confirmation_before_closing=*/false); + accessor_->OnCreditCardFetched(CreditCardFetchResult::kTransientError, + nullptr); + client_->ShowAutofillErrorDialog(response.error_dialog_context); + Reset(); + break; + case CreditCardRiskBasedAuthenticator::RiskBasedAuthenticationResponse:: + Result::kUnknown: + NOTREACHED(); + Reset(); + break; } } @@ -1227,53 +1252,9 @@ /*app_locale=*/std::string()); card_->SetExpirationYearFromString( base::UTF8ToUTF16(response_details.expiration_year)); - // Check if we need to authenticate the user before filling the virtual - // card. - if (personal_data_manager_->IsPaymentMethodsMandatoryReauthEnabled()) { - // On some operating systems (for example, macOS and Windows), the - // device authentication prompt freezes Chrome. Thus we can only trigger - // the prompt after the progress dialog has been closed, which we can do - // by using the `no_interactive_authentication_callback` parameter in - // `AutofillClient::CloseAutofillProgressDialog()`. - // TODO(crbug.com/1427216): Implement this flow for Android as well. - client_->CloseAutofillProgressDialog( - /*show_confirmation_before_closing=*/false, - /*no_interactive_authentication_callback=*/base::BindOnce( - // `StartDeviceAuthenticationForFilling()` will asynchronously - // trigger the re-authentication flow, so we should avoid - // calling `Reset()` until the re-authentication flow is - // complete. - &CreditCardAccessManager::StartDeviceAuthenticationForFilling, - weak_ptr_factory_.GetWeakPtr(), accessor_, card_.get(), - base::UTF8ToUTF16(response_details.dcvv))); - } else { - client_->CloseAutofillProgressDialog( - /*show_confirmation_before_closing=*/true); - card_->set_cvc(base::UTF8ToUTF16(response_details.dcvv)); - accessor_->OnCreditCardFetched(CreditCardFetchResult::kSuccess, - card_.get()); - - // If the server returned a successful response along with the card's - // real PAN without requiring interactive authentication, set the - // `card_record_type_if_non_interactive_authentication_flow_completed_` - // field in FormDataImporter so that MandatoryReauthManager can decide - // whether to offer mandatory re-auth opt-in for this user. It's also - // possible that the server does not provide the real PAN but requests - // an authentication which is handled below. - client_->GetFormDataImporter() - ->SetCardRecordTypeIfNonInteractiveAuthenticationFlowCompleted( - card_->record_type()); - - autofill_metrics::LogServerCardUnmaskResult( - autofill_metrics::ServerCardUnmaskResult::kRiskBasedUnmasked, - AutofillClient::PaymentsRpcCardType::kVirtualCard, - autofill_metrics::VirtualCardUnmaskFlowType::kUnspecified); - // `accessor_->OnCreditCardFetched()` makes a copy of `card` and `cvc` - // before it asynchronously fills them into the form. Thus we can safely - // call `Reset()` here, and we should as from this class' point of view - // the authentication flow is complete. - Reset(); - } + card_->set_cvc(base::UTF8ToUTF16(response_details.dcvv)); + OnNonInteractiveAuthenticationSuccess( + CreditCard::RecordType::kVirtualCard); return; } @@ -1332,6 +1313,55 @@ Reset(); } +void CreditCardAccessManager::OnNonInteractiveAuthenticationSuccess( + CreditCard::RecordType record_type) { + if (personal_data_manager_->IsPaymentMethodsMandatoryReauthEnabled()) { + // On some operating systems (for example, macOS and Windows), the + // device authentication prompt freezes Chrome. Thus we can only trigger + // the prompt after the progress dialog has been closed, which we can do + // by using the `no_interactive_authentication_callback` parameter in + // `AutofillClient::CloseAutofillProgressDialog()`. + client_->CloseAutofillProgressDialog( + /*show_confirmation_before_closing=*/false, + /*no_interactive_authentication_callback=*/base::BindOnce( + // `StartDeviceAuthenticationForFilling()` will asynchronously + // trigger the re-authentication flow, so we should avoid + // calling `Reset()` until the re-authentication flow is + // complete. + &CreditCardAccessManager::StartDeviceAuthenticationForFilling, + weak_ptr_factory_.GetWeakPtr(), accessor_, card_.get(), + card_->cvc())); + } else { + client_->CloseAutofillProgressDialog( + /*show_confirmation_before_closing=*/true); + accessor_->OnCreditCardFetched(CreditCardFetchResult::kSuccess, + card_.get()); + + // If the server returned a successful response along with the card's + // real PAN without requiring interactive authentication, set the + // `card_record_type_if_non_interactive_authentication_flow_completed_` + // field in FormDataImporter so that MandatoryReauthManager can decide + // whether to offer mandatory re-auth opt-in for this user. + client_->GetFormDataImporter() + ->SetCardRecordTypeIfNonInteractiveAuthenticationFlowCompleted( + record_type); + + // TODO(crbug.com/1470933): Log the unmask result for masked server card. + if (record_type == CreditCard::RecordType::kVirtualCard) { + autofill_metrics::LogServerCardUnmaskResult( + autofill_metrics::ServerCardUnmaskResult::kRiskBasedUnmasked, + AutofillClient::PaymentsRpcCardType::kVirtualCard, + autofill_metrics::VirtualCardUnmaskFlowType::kUnspecified); + } + + // `accessor_->OnCreditCardFetched()` makes a copy of `card` and `cvc` + // before it asynchronously fills them into the form. Thus we can safely + // call `Reset()` here, and we should as from this class' point of view + // the authentication flow is complete. + Reset(); + } +} + void CreditCardAccessManager::OnStopWaitingForUnmaskDetails( bool get_unmask_details_returned) { // If the user had to wait for Unmask Details, log the latency.
diff --git a/components/autofill/core/browser/payments/credit_card_access_manager.h b/components/autofill/core/browser/payments/credit_card_access_manager.h index ed8e6659..80f8e62 100644 --- a/components/autofill/core/browser/payments/credit_card_access_manager.h +++ b/components/autofill/core/browser/payments/credit_card_access_manager.h
@@ -204,10 +204,19 @@ #endif private: - // TODO(crbug.com/1249665): Remove FRIEND and change everything to _ForTesting - // or public. + // TODO(crbug.com/1249665): Remove FRIEND and create test_api class to access + // private methods and variables. FRIEND_TEST_ALL_PREFIXES(CreditCardAccessManagerBrowserTest, NavigateFromPage_UnmaskedCardCacheResets); + FRIEND_TEST_ALL_PREFIXES( + CreditCardAccessManagerRiskBasedMaskedServerCardUnmaskingTest, + RiskBasedMaskedServerCardUnmasking_AuthenticationRequired_FidoOnly); + FRIEND_TEST_ALL_PREFIXES( + CreditCardAccessManagerRiskBasedMaskedServerCardUnmaskingTest, + RiskBasedMaskedServerCardUnmasking_AuthenticationRequired_CvcThenFido); + FRIEND_TEST_ALL_PREFIXES( + CreditCardAccessManagerRiskBasedMaskedServerCardUnmaskingTest, + RiskBasedMaskedServerCardUnmasking_AuthenticationRequired_PreflightCallNotFinished); FRIEND_TEST_ALL_PREFIXES(CreditCardAccessManagerTest, PreflightCallRateLimited); FRIEND_TEST_ALL_PREFIXES(CreditCardAccessManagerTest, @@ -363,6 +372,12 @@ // Helper function to fetch local or full server cards. void FetchLocalOrFullServerCard(); + // Checks if Mandatory Re-auth is needed after the card has been returned. If + // needed, starts the device authentication flow before filling the form. + // Otherwise, directly fills the form. + void OnNonInteractiveAuthenticationSuccess( + CreditCard::RecordType record_type); + // Invoked when CreditCardAccessManager stops waiting for UnmaskDetails to // return. If OnDidGetUnmaskDetails() has been invoked, // |get_unmask_details_returned| should be set to true. @@ -488,6 +503,10 @@ payments::PaymentsClient::UnmaskResponseDetails virtual_card_unmask_response_details_; + // Struct to store response returned by CreditCardRiskBasedAuthenticator. + CreditCardRiskBasedAuthenticator::RiskBasedAuthenticationResponse + risk_based_authentication_response_; + // Resets when PrepareToFetchCreditCard() is called, if not already reset. // Signaled when OnDidGetUnmaskDetails() is called or after timeout. // Authenticate() is called when signaled.
diff --git a/components/autofill/core/browser/payments/credit_card_access_manager_unittest.cc b/components/autofill/core/browser/payments/credit_card_access_manager_unittest.cc index 3061c99..99ee8fa4 100644 --- a/components/autofill/core/browser/payments/credit_card_access_manager_unittest.cc +++ b/components/autofill/core/browser/payments/credit_card_access_manager_unittest.cc
@@ -217,10 +217,10 @@ personal_data().AddCreditCard(local_card); } - void CreateServerCard(std::string guid, - std::string number = std::string(), - bool masked = true, - std::string server_id = std::string()) { + CreditCard* CreateServerCard(std::string guid, + std::string number = std::string(), + bool masked = true, + std::string server_id = std::string()) { CreditCard server_card = CreditCard(); test::SetCreditCardInfo(&server_card, "Elvis Presley", number.c_str(), test::NextMonth().c_str(), test::NextYear().c_str(), @@ -231,6 +231,7 @@ : CreditCard::RecordType::kFullServerCard); server_card.set_server_id(server_id); personal_data().AddServerCreditCard(server_card); + return personal_data().GetCreditCardByGUID(guid); } CreditCardCvcAuthenticator* GetCvcAuthenticator() { @@ -531,6 +532,18 @@ return *autofill_client_.GetPersonalDataManager(); } +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) + void OptUserInToFido() { + std::string other_server_id = "00000000-0000-0000-0000-000000000034"; + // Add a random FIDO eligible card, it will return RequestOptions in unmask + // details. + payments_client().AddFidoEligibleCard(other_server_id, kCredentialId, + kGooglePaymentsRpid); + GetFIDOAuthenticator()->SetUserVerifiable(true); + SetCreditCardFIDOAuthEnabled(true); + } +#endif + std::unique_ptr<TestAccessor> accessor_; base::test::TaskEnvironment task_environment_; variations::ScopedVariationsIdsProvider scoped_variations_ids_provider_{ @@ -840,7 +853,9 @@ SetUpDeviceAuthenticatorResponseMock(); credit_card_access_manager().OnRiskBasedAuthenticationResponseReceived( CreditCardRiskBasedAuthenticator::RiskBasedAuthenticationResponse() - .with_did_succeed(true) + .with_result(CreditCardRiskBasedAuthenticator:: + RiskBasedAuthenticationResponse::Result:: + kNoAuthenticationRequired) .with_card(card)); // Ensure the accessor received the correct response. @@ -1557,8 +1572,8 @@ } } -// Ensures that use of new card invokes authorization flow when user is -// opted-in. +// Ensures that use of a server card that is not enrolled into FIDO invokes +// authorization flow when user is opted-in. TEST_F(CreditCardAccessManagerTest, FIDONewCardAuthorization) { base::HistogramTester histogram_tester; std::string unmask_decision_histogram_name = @@ -1570,14 +1585,7 @@ CreateServerCard(kTestGUID, kTestNumber); CreditCard* card = personal_data().GetCreditCardByGUID(kTestGUID); - // Opt the user in, but don't include the card above. - std::string other_server_id = "00000000-0000-0000-0000-000000000034"; - // Add other FIDO eligible card, it will return RequestOptions in unmask - // details. - payments_client().AddFidoEligibleCard(other_server_id, kCredentialId, - kGooglePaymentsRpid); - GetFIDOAuthenticator()->SetUserVerifiable(true); - SetCreditCardFIDOAuthEnabled(true); + OptUserInToFido(); credit_card_access_manager().PrepareToFetchCreditCard(); WaitForCallbacks(); @@ -1595,7 +1603,7 @@ kTestNumber, /*fido_opt_in=*/false, /*follow_with_fido_auth=*/false)); - // Ensure that form is not filled yet (OnCreditCardFetched is not called). + // Ensure that the form is not filled yet (OnCreditCardFetched is not called). EXPECT_EQ(accessor_->number(), std::u16string()); EXPECT_EQ(accessor_->cvc(), std::u16string()); @@ -1604,8 +1612,8 @@ GetFIDOAuthenticator()->current_flow()); TestCreditCardFidoAuthenticator::GetAssertion(GetFIDOAuthenticator(), /*did_succeed=*/true); - // Ensure that form is filled after user verification (OnCreditCardFetched is - // called). + // Ensure that the form is filled after user verification (OnCreditCardFetched + // is called). EXPECT_EQ(kTestNumber16, accessor_->number()); EXPECT_EQ(kTestCvc16, accessor_->cvc()); @@ -1677,15 +1685,15 @@ // called and correct flow is set. EXPECT_EQ(CreditCardFidoAuthenticator::Flow::OPT_IN_WITH_CHALLENGE_FLOW, GetFIDOAuthenticator()->current_flow()); - // Ensure that form is not filled yet (OnCreditCardFetched is not called). + // Ensure that the form is not filled yet (OnCreditCardFetched is not called). EXPECT_EQ(accessor_->number(), std::u16string()); EXPECT_EQ(accessor_->cvc(), std::u16string()); // Mock user response. TestCreditCardFidoAuthenticator::GetAssertion(GetFIDOAuthenticator(), /*did_succeed=*/true); - // Ensure that form is filled after user verification (OnCreditCardFetched is - // called). + // Ensure that the form is filled after user verification (OnCreditCardFetched + // is called). EXPECT_EQ(kTestNumber16, accessor_->number()); EXPECT_EQ(kTestCvc16, accessor_->cvc()); @@ -1727,7 +1735,7 @@ // called and correct flow is set. EXPECT_EQ(CreditCardFidoAuthenticator::Flow::OPT_IN_WITH_CHALLENGE_FLOW, GetFIDOAuthenticator()->current_flow()); - // Ensure that form is not filled yet (OnCreditCardFetched is not called). + // Ensure that the form is not filled yet (OnCreditCardFetched is not called). EXPECT_EQ(accessor_->number(), std::u16string()); EXPECT_EQ(accessor_->cvc(), std::u16string()); @@ -1768,15 +1776,15 @@ // called and correct flow is set. EXPECT_EQ(CreditCardFidoAuthenticator::Flow::OPT_IN_WITH_CHALLENGE_FLOW, GetFIDOAuthenticator()->current_flow()); - // Ensure that form is not filled yet (OnCreditCardFetched is not called). + // Ensure that the form is not filled yet (OnCreditCardFetched is not called). EXPECT_EQ(accessor_->number(), std::u16string()); EXPECT_EQ(accessor_->cvc(), std::u16string()); // Mock user response and OptChange payments call. TestCreditCardFidoAuthenticator::GetAssertion(GetFIDOAuthenticator(), /*did_succeed=*/true); - // Ensure that form is filled after user verification (OnCreditCardFetched is - // called). + // Ensure that the form is filled after user verification (OnCreditCardFetched + // is called). EXPECT_EQ(kTestNumber16, accessor_->number()); EXPECT_EQ(kTestCvc16, accessor_->cvc()); OptChange(AutofillClient::PaymentsRpcResult::kPermanentFailure, false); @@ -2653,6 +2661,25 @@ base::test::ScopedFeatureList feature_list_{ features::kAutofillEnableFpanRiskBasedAuthentication}; + + void MockRiskBasedAuthSucceedsWithoutPanReturned(CreditCard* card) { + credit_card_access_manager().FetchCreditCard(card, accessor_->GetWeakPtr()); + + // Ensures CreditCardRiskBasedAuthenticator::Authenticate is successfully + // invoked. + EXPECT_TRUE(autofill_client_.risk_based_authentication_invoked()); + EXPECT_TRUE(autofill_client_.autofill_progress_dialog_shown()); + + // Mock that + // CreditCardRiskBasedAuthenticator::RiskBasedAuthenticationResponse + // indicates a yellow path with context token returned. + credit_card_access_manager().OnRiskBasedAuthenticationResponseReceived( + CreditCardRiskBasedAuthenticator::RiskBasedAuthenticationResponse() + .with_result(CreditCardRiskBasedAuthenticator:: + RiskBasedAuthenticationResponse::Result:: + kAuthenticationRequired) + .with_context_token("fake_context_token")); + } }; // Test the flow when the masked server card is successfully returned from @@ -2660,9 +2687,8 @@ TEST_F(CreditCardAccessManagerRiskBasedMaskedServerCardUnmaskingTest, RiskBasedMaskedServerCardUnmasking_Success) { std::string test_number = "4444333322221111"; - CreateServerCard(kTestGUID, test_number, /*masked=*/true, kTestServerId); CreditCard* masked_server_card = - personal_data().GetCreditCardByGUID(kTestGUID); + CreateServerCard(kTestGUID, test_number, /*masked=*/true, kTestServerId); credit_card_access_manager().FetchCreditCard(masked_server_card, accessor_->GetWeakPtr()); @@ -2674,11 +2700,13 @@ CreditCard card = *masked_server_card; card.set_record_type(CreditCard::RecordType::kFullServerCard); - // Mock CreditCardRiskBasedAuthenticator::RiskBasedAuthenticationResponse to - // successfully return the valid card number. + // Mock that CreditCardRiskBasedAuthenticator::RiskBasedAuthenticationResponse + // indicates a green path with valid card number returned. credit_card_access_manager().OnRiskBasedAuthenticationResponseReceived( CreditCardRiskBasedAuthenticator::RiskBasedAuthenticationResponse() - .with_did_succeed(true) + .with_result(CreditCardRiskBasedAuthenticator:: + RiskBasedAuthenticationResponse::Result:: + kNoAuthenticationRequired) .with_card(card)); // Ensure the accessor received the correct response. @@ -2698,9 +2726,8 @@ // handled correctly if the retrieval failed. TEST_F(CreditCardAccessManagerRiskBasedMaskedServerCardUnmaskingTest, RiskBasedMaskedServerCardUnmasking_RetrievalError) { - CreateServerCard(kTestGUID, kTestNumber, /*masked=*/true, kTestServerId); CreditCard* masked_server_card = - personal_data().GetCreditCardByGUID(kTestGUID); + CreateServerCard(kTestGUID, kTestNumber, /*masked=*/true, kTestServerId); credit_card_access_manager().FetchCreditCard(masked_server_card, accessor_->GetWeakPtr()); @@ -2710,10 +2737,12 @@ EXPECT_TRUE(autofill_client_.risk_based_authentication_invoked()); EXPECT_TRUE(autofill_client_.autofill_progress_dialog_shown()); - // Mock an error being returned from the server side. + // Mock that CreditCardRiskBasedAuthenticator::RiskBasedAuthenticationResponse + // indicates a red path. credit_card_access_manager().OnRiskBasedAuthenticationResponseReceived( CreditCardRiskBasedAuthenticator::RiskBasedAuthenticationResponse() - .with_did_succeed(false)); + .with_result(CreditCardRiskBasedAuthenticator:: + RiskBasedAuthenticationResponse::Result::kError)); // Expect the CreditCardAccessManager to end the session. EXPECT_EQ(accessor_->result(), CreditCardFetchResult::kTransientError); @@ -2724,9 +2753,8 @@ // handled correctly if the flow is cancelled. TEST_F(CreditCardAccessManagerRiskBasedMaskedServerCardUnmaskingTest, RiskBasedMaskedServerCardUnmasking_FlowCancelled) { - CreateServerCard(kTestGUID, kTestNumber, /*masked=*/true, kTestServerId); CreditCard* masked_server_card = - personal_data().GetCreditCardByGUID(kTestGUID); + CreateServerCard(kTestGUID, kTestNumber, /*masked=*/true, kTestServerId); credit_card_access_manager().FetchCreditCard(masked_server_card, accessor_->GetWeakPtr()); @@ -2762,6 +2790,177 @@ ASSERT_FALSE(autofill_client_.risk_based_authentication_invoked()); } +// Ensures the authentication is delegated to the CVC authenticator when +// `fido_request_options` is not returned. +TEST_F(CreditCardAccessManagerRiskBasedMaskedServerCardUnmaskingTest, + RiskBasedMaskedServerCardUnmasking_AuthenticationRequired_CvcOnly) { + base::HistogramTester histogram_tester; + + std::string test_number = "4444333322221111"; + CreditCard* masked_server_card = + CreateServerCard(kTestGUID, test_number, /*masked=*/true, kTestServerId); + + MockRiskBasedAuthSucceedsWithoutPanReturned(masked_server_card); + histogram_tester.ExpectUniqueSample( + "Autofill.BetterAuth.FlowEvents.Cvc", + CreditCardFormEventLogger::UnmaskAuthFlowEvent::kPromptShown, 1); + + // Expect CVC prompt to be invoked. + EXPECT_TRUE(GetRealPanForCVCAuth(AutofillClient::PaymentsRpcResult::kSuccess, + test_number)); + // Ensure that the form is filled. + EXPECT_EQ(base::UTF8ToUTF16(test_number), accessor_->number()); + EXPECT_EQ(kTestCvc16, accessor_->cvc()); + + // Expect that we did not signal that there was no interactive authentication. + EXPECT_FALSE( + autofill_client_.GetFormDataImporter() + ->GetCardRecordTypeIfNonInteractiveAuthenticationFlowCompleted() + .has_value()); +} + +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) +// Ensures the masked server card risk-based unmasking response is handled +// correctly and authentication is delegated to the FIDO authenticator, when +// `fido_request_options` is returned. +TEST_F(CreditCardAccessManagerRiskBasedMaskedServerCardUnmaskingTest, + RiskBasedMaskedServerCardUnmasking_AuthenticationRequired_FidoOnly) { + base::HistogramTester histogram_tester; + + std::string test_number = "4444333322221111"; + CreditCard* masked_server_card = + CreateServerCard(kTestGUID, test_number, /*masked=*/true, kTestServerId); + credit_card_access_manager().is_user_verifiable_ = true; + fido_authenticator().set_is_user_opted_in(true); + + credit_card_access_manager().FetchCreditCard(masked_server_card, + accessor_->GetWeakPtr()); + + // Ensures CreditCardRiskBasedAuthenticator::Authenticate is successfully + // invoked. + EXPECT_TRUE(autofill_client_.risk_based_authentication_invoked()); + EXPECT_TRUE(autofill_client_.autofill_progress_dialog_shown()); + + // Mock that CreditCardRiskBasedAuthenticator::RiskBasedAuthenticationResponse + // indicates a yellow path when `fido_request_options` and `context_token` are + // returned. + credit_card_access_manager().OnRiskBasedAuthenticationResponseReceived( + CreditCardRiskBasedAuthenticator::RiskBasedAuthenticationResponse() + .with_result(CreditCardRiskBasedAuthenticator:: + RiskBasedAuthenticationResponse::Result:: + kAuthenticationRequired) + .with_fido_request_options(GetTestRequestOptions()) + .with_context_token("fake_context_token")); + + histogram_tester.ExpectUniqueSample( + "Autofill.BetterAuth.FlowEvents.Fido", + CreditCardFormEventLogger::UnmaskAuthFlowEvent::kPromptShown, 1); + + // Expect the CreditCardAccessManager invokes the FIDO authenticator. + ASSERT_TRUE(fido_authenticator().authenticate_invoked()); + EXPECT_EQ(fido_authenticator().card().number(), + base::UTF8ToUTF16(test_number)); + EXPECT_EQ(fido_authenticator().card().record_type(), + CreditCard::RecordType::kMaskedServerCard); + ASSERT_TRUE(fido_authenticator().context_token().has_value()); + EXPECT_EQ(fido_authenticator().context_token().value(), "fake_context_token"); + + // Expect that we did not signal that there was no interactive authentication. + EXPECT_FALSE( + autofill_client_.GetFormDataImporter() + ->GetCardRecordTypeIfNonInteractiveAuthenticationFlowCompleted() + .has_value()); + + histogram_tester.ExpectUniqueSample( + "Autofill.BetterAuth.CardUnmaskTypeDecision", + autofill_metrics::CardUnmaskTypeDecisionMetric::kFidoOnly, 1); +} + +// Ensures that use of new card invokes authorization flow when user is +// opted-in to FIDO. +TEST_F(CreditCardAccessManagerRiskBasedMaskedServerCardUnmaskingTest, + RiskBasedMaskedServerCardUnmasking_AuthenticationRequired_CvcThenFido) { + base::HistogramTester histogram_tester; + + OptUserInToFido(); + std::string test_number = "4444333322221111"; + CreditCard* masked_server_card = + CreateServerCard(kTestGUID, test_number, /*masked=*/true, kTestServerId); + + credit_card_access_manager().PrepareToFetchCreditCard(); + WaitForCallbacks(); + + MockRiskBasedAuthSucceedsWithoutPanReturned(masked_server_card); + + histogram_tester.ExpectUniqueSample( + "Autofill.BetterAuth.FlowEvents.CvcThenFido", + CreditCardFormEventLogger::UnmaskAuthFlowEvent::kPromptShown, 1); + + // Expect CVC prompt to be invoked. + EXPECT_TRUE(GetRealPanForCVCAuth(AutofillClient::PaymentsRpcResult::kSuccess, + test_number, /*fido_opt_in=*/false, + /*follow_with_fido_auth=*/false)); + // Ensure that the form is not filled yet (OnCreditCardFetched is not called). + EXPECT_EQ(accessor_->number(), std::u16string()); + EXPECT_EQ(accessor_->cvc(), std::u16string()); + + // Mock user response. + EXPECT_EQ(CreditCardFidoAuthenticator::Flow::FOLLOWUP_AFTER_CVC_AUTH_FLOW, + GetFIDOAuthenticator()->current_flow()); + TestCreditCardFidoAuthenticator::GetAssertion(GetFIDOAuthenticator(), + /*did_succeed=*/true); + // Ensure that the form is filled after user verification (OnCreditCardFetched + // is called). + EXPECT_EQ(base::UTF8ToUTF16(test_number), accessor_->number()); + EXPECT_EQ(kTestCvc16, accessor_->cvc()); + + // Mock OptChange payments call. + OptChange(AutofillClient::PaymentsRpcResult::kSuccess, true); + + histogram_tester.ExpectUniqueSample( + "Autofill.BetterAuth.CardUnmaskTypeDecision", + autofill_metrics::CardUnmaskTypeDecisionMetric::kCvcThenFido, 1); + histogram_tester.ExpectUniqueSample( + "Autofill.BetterAuth.WebauthnResult.AuthenticationAfterCVC", + autofill_metrics::WebauthnResultMetric::kSuccess, 1); + histogram_tester.ExpectBucketCount( + "Autofill.BetterAuth.FlowEvents.CvcThenFido", + CreditCardFormEventLogger::UnmaskAuthFlowEvent::kPromptCompleted, 1); +} + +// Ensures that the kCvc instead of kCvcThenFido flow is invoked if +// GetUnmaskDetails preflight call is not finished. +TEST_F( + CreditCardAccessManagerRiskBasedMaskedServerCardUnmaskingTest, + RiskBasedMaskedServerCardUnmasking_AuthenticationRequired_PreflightCallNotFinished) { + base::HistogramTester histogram_tester; + + OptUserInToFido(); + std::string test_number = "4444333322221111"; + CreditCard* masked_server_card = + CreateServerCard(kTestGUID, test_number, /*masked=*/true, kTestServerId); + + MockRiskBasedAuthSucceedsWithoutPanReturned(masked_server_card); + histogram_tester.ExpectUniqueSample( + "Autofill.BetterAuth.FlowEvents.Cvc", + CreditCardFormEventLogger::UnmaskAuthFlowEvent::kPromptShown, 1); + + // Expect CVC prompt to be invoked. + EXPECT_TRUE(GetRealPanForCVCAuth(AutofillClient::PaymentsRpcResult::kSuccess, + test_number)); + // Ensure that the form is filled. + EXPECT_EQ(base::UTF8ToUTF16(test_number), accessor_->number()); + EXPECT_EQ(kTestCvc16, accessor_->cvc()); + + // Expect that we did not signal that there was no interactive authentication. + EXPECT_FALSE( + autofill_client_.GetFormDataImporter() + ->GetCardRecordTypeIfNonInteractiveAuthenticationFlowCompleted() + .has_value()); +} + +#endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_ANDROID) + TEST_F(CreditCardAccessManagerTest, IsVirtualCardPresentInUnmaskedCache) { CreateServerCard(kTestGUID, kTestNumber, /*masked=*/false, kTestServerId); CreditCard* unmasked_card = personal_data().GetCreditCardByGUID(kTestGUID);
diff --git a/components/autofill/core/browser/payments/credit_card_risk_based_authenticator.cc b/components/autofill/core/browser/payments/credit_card_risk_based_authenticator.cc index 9c42ba60..13f69eef 100644 --- a/components/autofill/core/browser/payments/credit_card_risk_based_authenticator.cc +++ b/components/autofill/core/browser/payments/credit_card_risk_based_authenticator.cc
@@ -13,6 +13,21 @@ CreditCardRiskBasedAuthenticator::RiskBasedAuthenticationResponse:: RiskBasedAuthenticationResponse() = default; +CreditCardRiskBasedAuthenticator::RiskBasedAuthenticationResponse& +CreditCardRiskBasedAuthenticator::RiskBasedAuthenticationResponse::operator=( + const CreditCardRiskBasedAuthenticator::RiskBasedAuthenticationResponse& + other) { + result = other.result; + error_dialog_context = other.error_dialog_context; + card = other.card; + if (other.fido_request_options.has_value()) { + fido_request_options = other.fido_request_options->Clone(); + } else { + fido_request_options.reset(); + } + context_token = other.context_token; + return *this; +} CreditCardRiskBasedAuthenticator::RiskBasedAuthenticationResponse:: ~RiskBasedAuthenticationResponse() = default; @@ -84,24 +99,24 @@ RiskBasedAuthenticationResponse response; if (result == AutofillClient::PaymentsRpcResult::kSuccess) { - response.did_succeed = true; if (!response_details.real_pan.empty()) { - // The Payments server indicates a green path with real pan returned. + // The Payments server indicates no further authentication is required. + response.result = + RiskBasedAuthenticationResponse::Result::kNoAuthenticationRequired; card_.SetNumber(base::UTF8ToUTF16(response_details.real_pan)); card_.set_record_type(CreditCard::RecordType::kFullServerCard); response.card = card_; } else { - // The Payments server indicates a yellow path with necessary fields - // returned for further authentication. + // The Payments server indicates further authentication is required. + response.result = + RiskBasedAuthenticationResponse::Result::kAuthenticationRequired; response.fido_request_options = std::move(response_details.fido_request_options); - response.card_unmask_challenge_options = - response_details.card_unmask_challenge_options; response.context_token = response_details.context_token; } } else { // We received an error when attempting to unmask the card. - response.did_succeed = false; + response.result = RiskBasedAuthenticationResponse::Result::kError; CHECK(card_.record_type() == CreditCard::RecordType::kMaskedServerCard); response.error_dialog_context.type = result == AutofillClient::PaymentsRpcResult::kNetworkError
diff --git a/components/autofill/core/browser/payments/credit_card_risk_based_authenticator.h b/components/autofill/core/browser/payments/credit_card_risk_based_authenticator.h index a763570..4a2387d1 100644 --- a/components/autofill/core/browser/payments/credit_card_risk_based_authenticator.h +++ b/components/autofill/core/browser/payments/credit_card_risk_based_authenticator.h
@@ -22,19 +22,45 @@ public: struct RiskBasedAuthenticationResponse { RiskBasedAuthenticationResponse(); + RiskBasedAuthenticationResponse& operator=( + const RiskBasedAuthenticationResponse& other); ~RiskBasedAuthenticationResponse(); - RiskBasedAuthenticationResponse& with_did_succeed(bool b) { - did_succeed = b; + // The outcome of the risk-based authentication. + enum class Result { + // Default value, should never be used. + kUnknown = 0, + // No further authentication is required. Also known as green path. + kNoAuthenticationRequired = 1, + // The user needs to complete further authentication to retrieve the card. + // Also known as yellow path. + kAuthenticationRequired = 2, + // The authentication failed. Also known as red path. + kError = 3, + kMaxValue = kError, + }; + + RiskBasedAuthenticationResponse& with_result(Result r) { + result = r; return *this; } RiskBasedAuthenticationResponse& with_card(CreditCard c) { - card = c; + card = std::move(c); + return *this; + } + RiskBasedAuthenticationResponse& with_fido_request_options( + base::Value::Dict v) { + fido_request_options = std::move(v); + return *this; + } + RiskBasedAuthenticationResponse& with_context_token(std::string s) { + context_token = std::move(s); return *this; } - // Whether the RPC call was successful. - bool did_succeed = false; + // The `result` will be used to notify requesters of the outcome of the + // risk-based authentication. + Result result = Result::kUnknown; // The `error_dialog_context` will be set if the RPC call fails, and is used // to render the error dialog in CreditCardAccessManager. AutofillErrorDialogContext error_dialog_context; @@ -45,8 +71,6 @@ // the card's real pan was not returned from the server side. // FIDO request options will be present only when FIDO is available. absl::optional<base::Value::Dict> fido_request_options; - // Challenge options returned by the server side for further authentication. - std::vector<CardUnmaskChallengeOption> card_unmask_challenge_options; // Stores the latest version of the context token, passed between Payments // calls and unmodified by Chrome. std::string context_token;
diff --git a/components/autofill/core/browser/payments/credit_card_risk_based_authenticator_unittest.cc b/components/autofill/core/browser/payments/credit_card_risk_based_authenticator_unittest.cc index 6b72dbce..4b83b463 100644 --- a/components/autofill/core/browser/payments/credit_card_risk_based_authenticator_unittest.cc +++ b/components/autofill/core/browser/payments/credit_card_risk_based_authenticator_unittest.cc
@@ -20,6 +20,12 @@ namespace { constexpr std::string_view kTestNumber = "4234567890123456"; +// Base64 encoding of "This is a test challenge". +constexpr std::string_view kTestChallenge = "VGhpcyBpcyBhIHRlc3QgY2hhbGxlbmdl"; +// Base64 encoding of "This is a test Credential ID". +constexpr std::string_view kCredentialId = + "VGhpcyBpcyBhIHRlc3QgQ3JlZGVudGlhbCBJRC4="; +constexpr std::string_view kGooglePaymentsRpid = "google.com"; } // namespace class CreditCardRiskBasedAuthenticatorTest : public testing::Test { @@ -38,15 +44,16 @@ card_ = test::GetMaskedServerCard(); } - void OnUnmaskResponseReceived(AutofillClient::PaymentsRpcResult result, - absl::string_view real_pan, - AutofillClient::PaymentsRpcCardType card_type) { - payments::PaymentsClient::UnmaskResponseDetails response; - if (result == AutofillClient::PaymentsRpcResult::kSuccess) { - response.real_pan = real_pan; - response.card_type = card_type; - } - authenticator_->OnUnmaskResponseReceivedForTesting(result, response); + base::Value::Dict GetTestRequestOptions() { + base::Value::Dict request_options; + request_options.Set("challenge", base::Value(kTestChallenge)); + request_options.Set("relying_party_id", base::Value(kGooglePaymentsRpid)); + + base::Value::Dict key_info; + key_info.Set("credential_id", base::Value(kCredentialId)); + request_options.Set("key_info", base::Value(base::Value::Type::LIST)); + request_options.FindList("key_info")->Append(std::move(key_info)); + return request_options; } protected: @@ -76,13 +83,20 @@ TEST_F(CreditCardRiskBasedAuthenticatorTest, AuthenticateServerCardSuccess) { authenticator_->Authenticate(card_, requester_->GetWeakPtr()); - // Simulate server returns success with card returned and invoke the callback. - OnUnmaskResponseReceived(AutofillClient::PaymentsRpcResult::kSuccess, - kTestNumber, - AutofillClient::PaymentsRpcCardType::kServerCard); - ASSERT_TRUE(requester_->did_succeed().has_value()); - EXPECT_TRUE(requester_->did_succeed().value()); - EXPECT_EQ(kTestNumber, base::UTF16ToUTF8(requester_->number())); + // Mock server response with valid masked server card information. + payments::PaymentsClient::UnmaskResponseDetails response; + response.card_type = AutofillClient::PaymentsRpcCardType::kServerCard; + response.real_pan = kTestNumber; + + authenticator_->OnUnmaskResponseReceivedForTesting( + AutofillClient::PaymentsRpcResult::kSuccess, response); + EXPECT_EQ(requester_->risk_based_authentication_response().result, + CreditCardRiskBasedAuthenticator::RiskBasedAuthenticationResponse:: + Result::kNoAuthenticationRequired); + EXPECT_EQ( + kTestNumber, + base::UTF16ToUTF8( + requester_->risk_based_authentication_response().card->number())); } // Test that risk-based authentication doesn't return the full PAN when the @@ -90,13 +104,54 @@ TEST_F(CreditCardRiskBasedAuthenticatorTest, AuthenticateServerCardFailure) { authenticator_->Authenticate(card_, requester_->GetWeakPtr()); - // Simulate server returns failure and invoke the callback. - OnUnmaskResponseReceived(AutofillClient::PaymentsRpcResult::kPermanentFailure, - kTestNumber, - AutofillClient::PaymentsRpcCardType::kServerCard); - ASSERT_TRUE(requester_->did_succeed().has_value()); - EXPECT_FALSE(requester_->did_succeed().value()); - EXPECT_TRUE(requester_->number().empty()); + // Payment server response when unmask request fails is empty. + payments::PaymentsClient::UnmaskResponseDetails response; + + authenticator_->OnUnmaskResponseReceivedForTesting( + AutofillClient::PaymentsRpcResult::kPermanentFailure, response); + EXPECT_EQ(requester_->risk_based_authentication_response().result, + CreditCardRiskBasedAuthenticator::RiskBasedAuthenticationResponse:: + Result::kError); +} + +// Test that risk-based authentication determines authentication is required +// when the server call succeeds and the PAN is not returned. +TEST_F(CreditCardRiskBasedAuthenticatorTest, + AuthenticateServerCardSuccess_PanNotReturned) { + authenticator_->Authenticate(card_, requester_->GetWeakPtr()); + + // Mock server response with context token. + payments::PaymentsClient::UnmaskResponseDetails response; + response.context_token = "fake_context_token"; + + authenticator_->OnUnmaskResponseReceivedForTesting( + AutofillClient::PaymentsRpcResult::kSuccess, response); + EXPECT_EQ(requester_->risk_based_authentication_response().result, + CreditCardRiskBasedAuthenticator::RiskBasedAuthenticationResponse:: + Result::kAuthenticationRequired); + EXPECT_FALSE( + requester_->risk_based_authentication_response().card.has_value()); +} + +// Test that risk-based authentication determines authentication is required +// when the server call succeeds and the `fido_request_options` is returned. +TEST_F(CreditCardRiskBasedAuthenticatorTest, + AuthenticateServerCardSuccess_FidoReturned) { + authenticator_->Authenticate(card_, requester_->GetWeakPtr()); + + // Mock server response with FIDO request options. + payments::PaymentsClient::UnmaskResponseDetails response; + response.fido_request_options = GetTestRequestOptions(); + + authenticator_->OnUnmaskResponseReceivedForTesting( + AutofillClient::PaymentsRpcResult::kSuccess, response); + EXPECT_EQ(requester_->risk_based_authentication_response().result, + CreditCardRiskBasedAuthenticator::RiskBasedAuthenticationResponse:: + Result::kAuthenticationRequired); + EXPECT_FALSE( + requester_->risk_based_authentication_response().card.has_value()); + EXPECT_TRUE(requester_->risk_based_authentication_response() + .fido_request_options.has_value()); } // Test a success risk based virtual card unmask request.
diff --git a/components/autofill/core/browser/payments/payments_requests/unmask_card_request.cc b/components/autofill/core/browser/payments/payments_requests/unmask_card_request.cc index c1e3f2b..7b8b8daa 100644 --- a/components/autofill/core/browser/payments/payments_requests/unmask_card_request.cc +++ b/components/autofill/core/browser/payments/payments_requests/unmask_card_request.cc
@@ -425,11 +425,15 @@ case AutofillClient::PaymentsRpcCardType::kUnknown: return false; case AutofillClient::PaymentsRpcCardType::kServerCard: - return !response_details_.real_pan.empty(); + // When PAN is returned, the response is complete and no further + // authentication is needed. When PAN is not returned, the response has to + // contain context token in order to be considered a success. + return !response_details_.real_pan.empty() || + !response_details_.context_token.empty(); case AutofillClient::PaymentsRpcCardType::kVirtualCard: - // When pan is returned, it has to contain pan + expiry + cvv. - // When pan is not returned, it has to contain context token to indicate - // success. + // When the response contains a PAN, it must also contain expiration and + // CVV to be considered a success. When the response does not contain PAN, + // it must contain a context token instead. return IsAllCardInformationValidIncludingDcvv() || CanPerformVirtualCardAuth(); }
diff --git a/components/autofill/core/browser/payments/payments_requests/unmask_card_request_unittest.cc b/components/autofill/core/browser/payments/payments_requests/unmask_card_request_unittest.cc index 385cbcea..f34c07c 100644 --- a/components/autofill/core/browser/payments/payments_requests/unmask_card_request_unittest.cc +++ b/components/autofill/core/browser/payments/payments_requests/unmask_card_request_unittest.cc
@@ -137,6 +137,49 @@ EXPECT_FALSE(IsIncludedInRequestContent("merchant_domain")); } +// Test to ensure response is correctly parsed when the FIDO challenge is +// returned with context token. +TEST_F(UnmaskCardRequestTest, FidoChallengeReturned_ParseResponse) { + absl::optional<base::Value> response = base::JSONReader::Read( + "{\"fido_request_options\":{\"challenge\":\"fake_fido_challenge\"}," + "\"context_token\":\"fake_context_token\"}"); + ASSERT_TRUE(response.has_value()); + GetRequest()->ParseResponse(response->GetDict()); + + const PaymentsClient::UnmaskResponseDetails& response_details = + GetParsedResponse(); + EXPECT_EQ("fake_context_token", response_details.context_token); + // Verify the FIDO request challenge is correctly parsed. + EXPECT_EQ("fake_fido_challenge", + *response_details.fido_request_options->FindString("challenge")); + + // Verify that the response is considered complete. + EXPECT_TRUE(GetRequest()->IsResponseComplete()); +} + +// Test to ensure the response is complete when context token is returned but +// PAN is not. +TEST_F(UnmaskCardRequestTest, ContextTokenReturned) { + absl::optional<base::Value> response = + base::JSONReader::Read("{\"context_token\":\"fake_context_token\"}"); + ASSERT_TRUE(response.has_value()); + GetRequest()->ParseResponse(response->GetDict()); + + // Verify that the response is considered complete. + EXPECT_TRUE(GetRequest()->IsResponseComplete()); +} + +// Test that the response is not complete when both context token and real PAN +// are not returned. +TEST_F(UnmaskCardRequestTest, ContextTokenAndPanNotReturned) { + absl::optional<base::Value> response = base::JSONReader::Read("{}"); + ASSERT_TRUE(response.has_value()); + GetRequest()->ParseResponse(response->GetDict()); + + // Verify that the response is considered incomplete. + EXPECT_FALSE(GetRequest()->IsResponseComplete()); +} + // Params of the VirtualCardUnmaskCardRequestTest: // -- autofill::CardUnmaskChallengeOptionType challenge_option_type // -- bool autofill_enable_email_otp_for_vcn_yellow_path
diff --git a/components/autofill/core/browser/payments/test_authentication_requester.cc b/components/autofill/core/browser/payments/test_authentication_requester.cc index 59825dc3c..0b5a26f 100644 --- a/components/autofill/core/browser/payments/test_authentication_requester.cc +++ b/components/autofill/core/browser/payments/test_authentication_requester.cc
@@ -76,10 +76,7 @@ void TestAuthenticationRequester::OnRiskBasedAuthenticationResponseReceived( const CreditCardRiskBasedAuthenticator::RiskBasedAuthenticationResponse& response) { - did_succeed_ = response.did_succeed; - if (response.card.has_value()) { - number_ = response.card->number(); - } + risk_based_authentication_response_ = response; } void TestAuthenticationRequester::
diff --git a/components/autofill/core/browser/payments/test_authentication_requester.h b/components/autofill/core/browser/payments/test_authentication_requester.h index 836b784d..eb3ef230 100644 --- a/components/autofill/core/browser/payments/test_authentication_requester.h +++ b/components/autofill/core/browser/payments/test_authentication_requester.h
@@ -82,6 +82,11 @@ return response_details_; } + CreditCardRiskBasedAuthenticator::RiskBasedAuthenticationResponse& + risk_based_authentication_response() { + return risk_based_authentication_response_; + } + payments::FullCardRequest::FailureType failure_type() { return failure_type_; } @@ -104,6 +109,10 @@ // Unmask response returned from UnmaskCard request. payments::PaymentsClient::UnmaskResponseDetails response_details_; + // Authentication response returned from CreditCardRiskBasedAuthenticator. + CreditCardRiskBasedAuthenticator::RiskBasedAuthenticationResponse + risk_based_authentication_response_; + base::WeakPtrFactory<TestAuthenticationRequester> weak_ptr_factory_{this}; };
diff --git a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/Website.java b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/Website.java index 7ced1c115..7b2b900 100644 --- a/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/Website.java +++ b/components/browser_ui/site_settings/android/java/src/org/chromium/components/browser_ui/site_settings/Website.java
@@ -179,15 +179,6 @@ assert !info.getSecondaryPattern().equals("*"); var list = mEmbeddedPermissionInfos.computeIfAbsent( info.getContentSettingType(), k -> new ArrayList<>()); - for (var existing_info : list) { - if (existing_info.getContentSettingType() == info.getContentSettingType() - && existing_info.getPrimaryPattern().equals(info.getPrimaryPattern()) - && existing_info.getSecondaryPattern().equals(info.getSecondaryPattern())) { - // In incognito mode we can have two exceptions with the same pattern. Only keep - // the first one. - return; - } - } list.add(info); }
diff --git a/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/gesture/BackPressHandler.java b/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/gesture/BackPressHandler.java index 813c20fb..4873eb4a 100644 --- a/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/gesture/BackPressHandler.java +++ b/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/gesture/BackPressHandler.java
@@ -35,6 +35,7 @@ Type.MANUAL_FILLING, Type.TAB_MODAL_HANDLER, Type.FULLSCREEN, + Type.HUB, Type.TAB_SWITCHER, Type.CLOSE_WATCHER, Type.FIND_TOOLBAR, @@ -58,20 +59,21 @@ // handling logic. int PAGE_INSIGHTS_BOTTOM_SHEET = 5; int START_SURFACE = 6; - int TAB_SWITCHER = 7; + int HUB = 7; + int TAB_SWITCHER = 8; // Fullscreen must be before selection popup. crbug.com/1454817. - int FULLSCREEN = 8; - int SELECTION_POPUP = 9; - int MANUAL_FILLING = 10; - int LOCATION_BAR = 11; - int TAB_MODAL_HANDLER = 12; - int CLOSE_WATCHER = 13; - int FIND_TOOLBAR = 14; - int BOTTOM_CONTROLS = 15; - int TAB_HISTORY = 16; - int TAB_RETURN_TO_CHROME_START_SURFACE = 17; - int SHOW_READING_LIST = 18; - int MINIMIZE_APP_AND_CLOSE_TAB = 19; + int FULLSCREEN = 9; + int SELECTION_POPUP = 10; + int MANUAL_FILLING = 11; + int LOCATION_BAR = 12; + int TAB_MODAL_HANDLER = 13; + int CLOSE_WATCHER = 14; + int FIND_TOOLBAR = 15; + int BOTTOM_CONTROLS = 16; + int TAB_HISTORY = 17; + int TAB_RETURN_TO_CHROME_START_SURFACE = 18; + int SHOW_READING_LIST = 19; + int MINIMIZE_APP_AND_CLOSE_TAB = 20; int NUM_TYPES = MINIMIZE_APP_AND_CLOSE_TAB + 1; }
diff --git a/components/commerce/content/browser/web_contents_wrapper.cc b/components/commerce/content/browser/web_contents_wrapper.cc index dce3cc1..d1ec4d9 100644 --- a/components/commerce/content/browser/web_contents_wrapper.cc +++ b/components/commerce/content/browser/web_contents_wrapper.cc
@@ -50,6 +50,13 @@ script, std::move(callback), js_world_id_); } +ukm::SourceId WebContentsWrapper::GetPageUkmSourceId() { + if (!web_contents_ || !web_contents_->GetPrimaryMainFrame()) { + return ukm::kInvalidSourceId; + } + return web_contents_->GetPrimaryMainFrame()->GetPageUkmSourceId(); +} + void WebContentsWrapper::ClearWebContentsPointer() { web_contents_ = nullptr; }
diff --git a/components/commerce/content/browser/web_contents_wrapper.h b/components/commerce/content/browser/web_contents_wrapper.h index 68034034..7b4901b 100644 --- a/components/commerce/content/browser/web_contents_wrapper.h +++ b/components/commerce/content/browser/web_contents_wrapper.h
@@ -45,6 +45,8 @@ const std::u16string& script, base::OnceCallback<void(const base::Value)> callback) override; + ukm::SourceId GetPageUkmSourceId() override; + void ClearWebContentsPointer(); content::RenderFrameHost* GetPrimaryMainFrame();
diff --git a/components/commerce/core/BUILD.gn b/components/commerce/core/BUILD.gn index 2528592..eabe0480 100644 --- a/components/commerce/core/BUILD.gn +++ b/components/commerce/core/BUILD.gn
@@ -64,6 +64,8 @@ "//components/optimization_guide/core", "//components/optimization_guide/proto:optimization_guide_proto", "//components/prefs", + "//services/metrics/public/cpp:metrics_cpp", + "//services/metrics/public/cpp:ukm_builders", ] } @@ -232,6 +234,7 @@ "//components/strings:components_strings_grit", "//components/sync/service", "//components/unified_consent", + "//services/metrics/public/cpp:metrics_cpp", "//services/network/public/cpp:cpp", "//ui/base", "//url:url", @@ -320,6 +323,8 @@ "webui:unit_tests", "//components/history/core/browser", "//components/search", + "//components/ukm:test_support", + "//services/metrics/public/cpp:ukm_builders", ] }
diff --git a/components/commerce/core/DEPS b/components/commerce/core/DEPS index e1e3406..557ad286 100644 --- a/components/commerce/core/DEPS +++ b/components/commerce/core/DEPS
@@ -16,6 +16,7 @@ "+components/signin/public/identity_manager", "+components/strings", "+components/sync", + "+components/ukm", "+components/unified_consent", "+components/url_formatter", "+components/variations", @@ -26,6 +27,7 @@ "+net/base", "+net/traffic_annotation", "+services/data_decoder/public", + "+services/metrics/public/cpp", "+services/network/public/cpp", "+services/network/test", "+third_party/re2",
diff --git a/components/commerce/core/metrics/DEPS b/components/commerce/core/metrics/DEPS new file mode 100644 index 0000000..28be8dd --- /dev/null +++ b/components/commerce/core/metrics/DEPS
@@ -0,0 +1 @@ +include_rules = ["+services/metrics/public/cpp"] \ No newline at end of file
diff --git a/components/commerce/core/metrics/metrics_utils.cc b/components/commerce/core/metrics/metrics_utils.cc index 5e03baf..6b72f60 100644 --- a/components/commerce/core/metrics/metrics_utils.cc +++ b/components/commerce/core/metrics/metrics_utils.cc
@@ -10,6 +10,8 @@ #include "components/commerce/core/proto/price_tracking.pb.h" #include "components/optimization_guide/core/optimization_guide_decision.h" #include "components/optimization_guide/core/optimization_guide_permissions_util.h" +#include "services/metrics/public/cpp/ukm_builders.h" +#include "services/metrics/public/cpp/ukm_recorder.h" namespace commerce::metrics { @@ -80,7 +82,8 @@ } void RecordPDPStateWithLocalMeta(bool detected_by_server, - bool detected_by_client) { + bool detected_by_client, + ukm::SourceId source_id) { ShoppingPDPDetectionMethod detection_method = ShoppingPDPDetectionMethod::kNotPDP; if (detected_by_server && detected_by_client) { @@ -92,6 +95,10 @@ } base::UmaHistogramEnumeration(kPDPStateWithLocalMetaName, detection_method); + + ukm::builders::Shopping_PDPStateWithLocalInfo(source_id) + .SetPDPState(static_cast<int64_t>(detection_method)) + .Record(ukm::UkmRecorder::Get()); } void RecordShoppingListIneligibilityReasons(
diff --git a/components/commerce/core/metrics/metrics_utils.h b/components/commerce/core/metrics/metrics_utils.h index 3bda33f..76ab704 100644 --- a/components/commerce/core/metrics/metrics_utils.h +++ b/components/commerce/core/metrics/metrics_utils.h
@@ -9,6 +9,7 @@ #include "components/optimization_guide/core/optimization_metadata.h" #include "components/optimization_guide/proto/hints.pb.h" #include "components/prefs/pref_service.h" +#include "services/metrics/public/cpp/ukm_source_id.h" namespace commerce { class AccountChecker; @@ -75,7 +76,8 @@ // Record how a PDP was detected. void RecordPDPStateWithLocalMeta(bool detected_by_server, - bool detected_by_client); + bool detected_by_client, + ukm::SourceId source_id); // Record reasons why a user was ineligible for the shopping list feature. void RecordShoppingListIneligibilityReasons(PrefService* pref_service,
diff --git a/components/commerce/core/shopping_service.cc b/components/commerce/core/shopping_service.cc index 7b9921c..2db62ea 100644 --- a/components/commerce/core/shopping_service.cc +++ b/components/commerce/core/shopping_service.cc
@@ -342,7 +342,7 @@ // If there is both an entry in the cache and the local extraction fallback // needs to run, run it. if (it != product_info_cache_.end() && - it->second->needs_local_extraction_run && web_extractor_) { + it->second->needs_local_extraction_run && web_extractor_ && web.get()) { // Since we're about to run the JS, flip the flag in the cache. it->second->needs_local_extraction_run = false; @@ -352,12 +352,15 @@ web.get(), base::BindOnce(&ShoppingService::OnProductInfoLocalExtractionResult, weak_ptr_factory_.GetWeakPtr(), - GURL(web->GetLastCommittedURL()))); + GURL(web->GetLastCommittedURL()), + web.get()->GetPageUkmSourceId())); } } -void ShoppingService::OnProductInfoLocalExtractionResult(const GURL url, - base::Value result) { +void ShoppingService::OnProductInfoLocalExtractionResult( + const GURL url, + ukm::SourceId source_id, + base::Value result) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); // We should only ever get a dict result from the script execution. @@ -395,7 +398,7 @@ if (base::FeatureList::IsEnabled(kCommerceLocalPDPDetection)) { metrics::RecordPDPStateWithLocalMeta(pdp_detected_by_server, - pdp_detected_by_client); + pdp_detected_by_client, source_id); } }
diff --git a/components/commerce/core/shopping_service.h b/components/commerce/core/shopping_service.h index b5a09e0..214f60c 100644 --- a/components/commerce/core/shopping_service.h +++ b/components/commerce/core/shopping_service.h
@@ -34,6 +34,7 @@ #include "components/sync/service/sync_service_observer.h" #include "components/unified_consent/consent_throttle.h" #include "services/data_decoder/public/cpp/data_decoder.h" +#include "services/metrics/public/cpp/ukm_source_id.h" class GURL; class PrefService; @@ -537,7 +538,9 @@ // Handle the result of running the local extraction fallback for product // info. - void OnProductInfoLocalExtractionResult(const GURL url, base::Value result); + void OnProductInfoLocalExtractionResult(const GURL url, + ukm::SourceId source_id, + base::Value result); // Tries to determine whether a page is a PDP only from information in meta // tags extracted from the page. If enough information is present to call the
diff --git a/components/commerce/core/shopping_service_metrics_unittest.cc b/components/commerce/core/shopping_service_metrics_unittest.cc index 50e231f..9e35b6d 100644 --- a/components/commerce/core/shopping_service_metrics_unittest.cc +++ b/components/commerce/core/shopping_service_metrics_unittest.cc
@@ -16,6 +16,8 @@ #include "components/optimization_guide/core/optimization_guide_decision.h" #include "components/optimization_guide/core/optimization_metadata.h" #include "components/optimization_guide/proto/hints.pb.h" +#include "components/ukm/test_ukm_recorder.h" +#include "services/metrics/public/cpp/ukm_builders.h" #include "testing/gtest/include/gtest/gtest.h" using optimization_guide::OptimizationGuideDecision; @@ -23,6 +25,7 @@ using optimization_guide::OptimizationMetadata; using optimization_guide::proto::Any; using optimization_guide::proto::OptimizationType; +using UkmEntry = ukm::builders::Shopping_PDPStateWithLocalInfo; namespace { const char kProductUrl[] = "http://example.com/"; @@ -49,9 +52,18 @@ void SetUp() override { ShoppingServiceTestBase::SetUp(); histogram_tester_ = std::make_unique<base::HistogramTester>(); + ukm_recorder_ = std::make_unique<ukm::TestAutoSetUkmRecorder>(); + } + + void CheckUkmEvent(metrics::ShoppingPDPDetectionMethod method) { + const auto& entries = ukm_recorder_->GetEntriesByName(UkmEntry::kEntryName); + EXPECT_EQ(1u, entries.size()); + ukm_recorder_->ExpectEntryMetric(entries[0], UkmEntry::kPDPStateName, + static_cast<int64_t>(method)); } std::unique_ptr<base::HistogramTester> histogram_tester_; + std::unique_ptr<ukm::TestAutoSetUkmRecorder> ukm_recorder_; OptimizationMetadata og_response_with_image_; OptimizationMetadata og_response_no_image_; @@ -242,6 +254,8 @@ metrics::kPDPStateWithLocalMetaName, metrics::ShoppingPDPDetectionMethod::kPDPServerOnly, 1); histogram_tester_->ExpectTotalCount(metrics::kPDPStateWithLocalMetaName, 1); + + CheckUkmEvent(metrics::ShoppingPDPDetectionMethod::kPDPServerOnly); } TEST_F(ShoppingServiceMetricsTest, TestLocalPDPDetection_BothServerAndLocal) { @@ -265,6 +279,8 @@ metrics::kPDPStateWithLocalMetaName, metrics::ShoppingPDPDetectionMethod::kPDPServerAndLocalMeta, 1); histogram_tester_->ExpectTotalCount(metrics::kPDPStateWithLocalMetaName, 1); + + CheckUkmEvent(metrics::ShoppingPDPDetectionMethod::kPDPServerAndLocalMeta); } TEST_F(ShoppingServiceMetricsTest, TestLocalPDPDetection_NoServer) { @@ -288,6 +304,8 @@ metrics::kPDPStateWithLocalMetaName, metrics::ShoppingPDPDetectionMethod::kPDPLocalMetaOnly, 1); histogram_tester_->ExpectTotalCount(metrics::kPDPStateWithLocalMetaName, 1); + + CheckUkmEvent(metrics::ShoppingPDPDetectionMethod::kPDPLocalMetaOnly); } TEST_F(ShoppingServiceMetricsTest, TestLocalPDPDetection_IllegalScheme) {
diff --git a/components/commerce/core/shopping_service_test_base.cc b/components/commerce/core/shopping_service_test_base.cc index 94317f954..2d6f101 100644 --- a/components/commerce/core/shopping_service_test_base.cc +++ b/components/commerce/core/shopping_service_test_base.cc
@@ -392,6 +392,11 @@ FROM_HERE, base::BindOnce(std::move(callback), mock_js_result_->Clone())); } +ukm::SourceId MockWebWrapper::GetPageUkmSourceId() { + // Return a UKM source ID that is valid. + return 0x1234; +} + base::Value* MockWebWrapper::GetMockExtractionResult() { return mock_js_result_; }
diff --git a/components/commerce/core/shopping_service_test_base.h b/components/commerce/core/shopping_service_test_base.h index 7cde429..6e78131 100644 --- a/components/commerce/core/shopping_service_test_base.h +++ b/components/commerce/core/shopping_service_test_base.h
@@ -170,6 +170,8 @@ const std::u16string& script, base::OnceCallback<void(const base::Value)> callback) override; + ukm::SourceId GetPageUkmSourceId() override; + base::Value* GetMockExtractionResult(); private:
diff --git a/components/commerce/core/web_wrapper.h b/components/commerce/core/web_wrapper.h index 6009299c..0ba318e 100644 --- a/components/commerce/core/web_wrapper.h +++ b/components/commerce/core/web_wrapper.h
@@ -9,6 +9,7 @@ #include "base/functional/callback.h" #include "base/memory/weak_ptr.h" +#include "services/metrics/public/cpp/ukm_source_id.h" #include "url/gurl.h" namespace base { @@ -41,6 +42,9 @@ const std::u16string& script, base::OnceCallback<void(const base::Value)> callback) = 0; + // Get the source ID for the current page. + virtual ukm::SourceId GetPageUkmSourceId() = 0; + // Gets a weak pointer for use in callbacks. base::WeakPtr<WebWrapper> GetWeakPtr();
diff --git a/components/commerce/ios/DEPS b/components/commerce/ios/DEPS index 6e52228..d0e62f4 100644 --- a/components/commerce/ios/DEPS +++ b/components/commerce/ios/DEPS
@@ -1,5 +1,6 @@ include_rules = [ "+components/grit", + "+components/ukm/ios", "+ios/web/public", "+services/data_decoder/public/cpp", "+ui/base",
diff --git a/components/commerce/ios/browser/BUILD.gn b/components/commerce/ios/browser/BUILD.gn index 248d3ee3..7ffd4c6 100644 --- a/components/commerce/ios/browser/BUILD.gn +++ b/components/commerce/ios/browser/BUILD.gn
@@ -18,6 +18,7 @@ "//base", "//components/commerce/core:shopping_service", "//components/resources:components_resources_grit", + "//components/ukm/ios:ukm_url_recorder", "//ios/web", "//ios/web/public", "//ios/web/public/js_messaging",
diff --git a/components/commerce/ios/browser/web_state_wrapper.h b/components/commerce/ios/browser/web_state_wrapper.h index 0f0fac0..a246780 100644 --- a/components/commerce/ios/browser/web_state_wrapper.h +++ b/components/commerce/ios/browser/web_state_wrapper.h
@@ -40,6 +40,8 @@ const std::u16string& script, base::OnceCallback<void(const base::Value)> callback) override; + ukm::SourceId GetPageUkmSourceId() override; + base::WeakPtr<WebWrapper> GetWeakPtr(); void ClearWebStatePointer();
diff --git a/components/commerce/ios/browser/web_state_wrapper.mm b/components/commerce/ios/browser/web_state_wrapper.mm index dd1a6b4d..a4e169c 100644 --- a/components/commerce/ios/browser/web_state_wrapper.mm +++ b/components/commerce/ios/browser/web_state_wrapper.mm
@@ -6,6 +6,7 @@ #include "base/functional/bind.h" #include "base/values.h" +#include "components/ukm/ios/ukm_url_recorder.h" #include "ios/web/public/browser_state.h" #include "ios/web/public/js_messaging/web_frame.h" #include "ios/web/public/js_messaging/web_frames_manager.h" @@ -63,6 +64,11 @@ std::move(callback))); } +ukm::SourceId WebStateWrapper::GetPageUkmSourceId() { + return web_state_ ? ukm::GetSourceIdForWebStateDocument(web_state_) + : ukm::kInvalidSourceId; +} + void WebStateWrapper::ClearWebStatePointer() { web_state_ = nullptr; }
diff --git a/components/content_settings/renderer/content_settings_agent_impl.cc b/components/content_settings/renderer/content_settings_agent_impl.cc index 69204fe..c2813e9 100644 --- a/components/content_settings/renderer/content_settings_agent_impl.cc +++ b/components/content_settings/renderer/content_settings_agent_impl.cc
@@ -382,6 +382,17 @@ return false; } +bool ContentSettingsAgentImpl::AllowPopupsAndRedirects(bool default_value) { + if (!content_setting_rules_) { + return default_value; + } + blink::WebLocalFrame* frame = render_frame()->GetWebFrame(); + return GetContentSettingFromRules( + content_setting_rules_->popup_redirect_rules, + url::Origin(frame->GetDocument().GetSecurityOrigin()).GetURL()) == + CONTENT_SETTING_ALLOW; +} + bool ContentSettingsAgentImpl::ShouldAutoupgradeMixedContent() { if (mixed_content_autoupgrades_disabled_) return false; @@ -408,10 +419,6 @@ DidBlockContentType(ContentSettingsType::JAVASCRIPT); } -void ContentSettingsAgentImpl::DidNotAllowImage() { - DidBlockContentType(ContentSettingsType::IMAGES); -} - void ContentSettingsAgentImpl::ClearBlockedContentSettings() { content_blocked_.clear(); cached_storage_permissions_.clear();
diff --git a/components/content_settings/renderer/content_settings_agent_impl.h b/components/content_settings/renderer/content_settings_agent_impl.h index 28f178b..6073047e 100644 --- a/components/content_settings/renderer/content_settings_agent_impl.h +++ b/components/content_settings/renderer/content_settings_agent_impl.h
@@ -88,10 +88,10 @@ bool AllowReadFromClipboard(bool default_value) override; bool AllowWriteToClipboard(bool default_value) override; bool AllowMutationEvents(bool default_value) override; - void DidNotAllowImage() override; void DidNotAllowScript() override; bool AllowRunningInsecureContent(bool allowed_per_settings, const blink::WebURL& url) override; + bool AllowPopupsAndRedirects(bool default_value) override; bool ShouldAutoupgradeMixedContent() override; bool allow_running_insecure_content() const {
diff --git a/components/content_settings/renderer/content_settings_agent_impl_browsertest.cc b/components/content_settings/renderer/content_settings_agent_impl_browsertest.cc index f832595..a411e4d 100644 --- a/components/content_settings/renderer/content_settings_agent_impl_browsertest.cc +++ b/components/content_settings/renderer/content_settings_agent_impl_browsertest.cc
@@ -452,6 +452,28 @@ EXPECT_EQ(1, mock_agent.on_content_blocked_count()); } +TEST_P(ContentSettingsAgentImplBrowserTest, ContentSettingsAllowScripts) { + MockContentSettingsAgentImpl mock_agent(GetMainRenderFrame()); + // Set the content settings for scripts. + RendererContentSettingRules content_setting_rules; + ContentSettingsForOneType& script_setting_rules = + content_setting_rules.script_rules; + script_setting_rules.push_back(ContentSettingPatternSource( + ContentSettingsPattern::Wildcard(), ContentSettingsPattern::Wildcard(), + content_settings::ContentSettingToValue(CONTENT_SETTING_ALLOW), + std::string(), false)); + + ContentSettingsAgentImpl* agent = + ContentSettingsAgentImpl::Get(GetMainRenderFrame()); + agent->SetRendererContentSettingRulesForTest(content_setting_rules); + + // Load a page which contains a script. + LoadHTML(kScriptHtml); + + // Verify that the script was not blocked. + EXPECT_EQ(0, mock_agent.on_content_blocked_count()); +} + TEST_P(ContentSettingsAgentImplBrowserTest, ContentSettingsAllowScriptsWithSrc) { MockContentSettingsAgentImpl mock_agent(GetMainRenderFrame()); @@ -475,6 +497,103 @@ EXPECT_EQ(0, mock_agent.on_content_blocked_count()); } +// Regression test for crbug.com/232410: Load a page with JS blocked. Then, +// allow JS and reload the page. In each case, only one of noscript or script +// tags should be enabled, but never both. +TEST_P(ContentSettingsAgentImplBrowserTest, ContentSettingsNoscriptTag) { + MockContentSettingsAgentImpl mock_agent(GetMainRenderFrame()); + + // 1. Block JavaScript. + RendererContentSettingRules content_setting_rules; + ContentSettingsForOneType& script_setting_rules = + content_setting_rules.script_rules; + script_setting_rules.push_back(ContentSettingPatternSource( + ContentSettingsPattern::Wildcard(), ContentSettingsPattern::Wildcard(), + content_settings::ContentSettingToValue(CONTENT_SETTING_BLOCK), + std::string(), false)); + + ContentSettingsAgentImpl* agent = + ContentSettingsAgentImpl::Get(GetMainRenderFrame()); + agent->SetRendererContentSettingRulesForTest(content_setting_rules); + + // 2. Load a page which contains a noscript tag and a script tag. Note that + // the page doesn't have a body tag. + const char kHtml[] = + "<html>" + "<noscript>JS_DISABLED</noscript>" + "<script>document.write('JS_ENABLED');</script>" + "</html>"; + LoadHTML(kHtml); + EXPECT_NE( + std::string::npos, + blink::TestWebFrameContentDumper::DumpLayoutTreeAsText( + GetMainFrame(), blink::TestWebFrameContentDumper::kLayoutAsTextNormal) + .Utf8() + .find("JS_DISABLED")); + EXPECT_EQ( + std::string::npos, + blink::TestWebFrameContentDumper::DumpLayoutTreeAsText( + GetMainFrame(), blink::TestWebFrameContentDumper::kLayoutAsTextNormal) + .Utf8() + .find("JS_ENABLED")); + + // 3. Allow JavaScript. + script_setting_rules.clear(); + script_setting_rules.push_back(ContentSettingPatternSource( + ContentSettingsPattern::Wildcard(), ContentSettingsPattern::Wildcard(), + content_settings::ContentSettingToValue(CONTENT_SETTING_ALLOW), + std::string(), false)); + agent->SetRendererContentSettingRulesForTest(content_setting_rules); + + // 4. Reload the page. + std::string url_str = "data:text/html;charset=utf-8,"; + url_str.append(kHtml); + GURL url(url_str); + Reload(url); + EXPECT_NE( + std::string::npos, + blink::TestWebFrameContentDumper::DumpLayoutTreeAsText( + GetMainFrame(), blink::TestWebFrameContentDumper::kLayoutAsTextNormal) + .Utf8() + .find("JS_ENABLED")); + EXPECT_EQ( + std::string::npos, + blink::TestWebFrameContentDumper::DumpLayoutTreeAsText( + GetMainFrame(), blink::TestWebFrameContentDumper::kLayoutAsTextNormal) + .Utf8() + .find("JS_DISABLED")); +} + +// Checks that same document navigations don't update content settings for the +// page. +TEST_P(ContentSettingsAgentImplBrowserTest, + ContentSettingsSameDocumentNavigation) { + MockContentSettingsAgentImpl mock_agent(GetMainRenderFrame()); + // Load a page which contains a script. + LoadHTML(kScriptHtml); + + // Verify that the script was not blocked. + EXPECT_EQ(0, mock_agent.on_content_blocked_count()); + + // Block JavaScript. + RendererContentSettingRules content_setting_rules; + ContentSettingsForOneType& script_setting_rules = + content_setting_rules.script_rules; + script_setting_rules.push_back(ContentSettingPatternSource( + ContentSettingsPattern::Wildcard(), ContentSettingsPattern::Wildcard(), + content_settings::ContentSettingToValue(CONTENT_SETTING_BLOCK), + std::string(), false)); + + ContentSettingsAgentImpl* agent = + ContentSettingsAgentImpl::Get(GetMainRenderFrame()); + agent->SetRendererContentSettingRulesForTest(content_setting_rules); + + // The page shouldn't see the change to script blocking setting after a + // same document navigation. + OnSameDocumentNavigation(GetMainFrame(), true); + EXPECT_TRUE(agent->AllowScript(true)); +} + TEST_P(ContentSettingsAgentImplBrowserTest, MixedAutoupgradesDisabledByRules) { MockContentSettingsAgentImpl mock_agent(GetMainRenderFrame());
diff --git a/components/feed/core/v2/api_test/feed_api_stream_unittest.cc b/components/feed/core/v2/api_test/feed_api_stream_unittest.cc index 10dfe19..a6f6fcf 100644 --- a/components/feed/core/v2/api_test/feed_api_stream_unittest.cc +++ b/components/feed/core/v2/api_test/feed_api_stream_unittest.cc
@@ -4192,6 +4192,33 @@ EXPECT_FALSE(on_clear_all.called()); } +TEST_F(FeedApiTest, RefreshFeedOnStartWithFlag) { + base::test::ScopedFeatureList features; + features.InitAndEnableFeature(kRefreshFeedOnRestart); + + stream_->SetChainedWebFeedRefreshEnabledForTesting(false); + store_->OverwriteStream(StreamType(StreamKind::kForYou), + MakeTypicalInitialModelState(), base::DoNothing()); + + response_translator_.InjectResponse(MakeTypicalRefreshModelState()); + TestForYouSurface surface(stream_.get()); + WaitForIdleTaskQueue(); + EXPECT_TRUE(network_.query_request_sent); + EXPECT_TRUE(response_translator_.InjectedResponseConsumed()); +} + +TEST_F(FeedApiTest, DoNotRefreshFeedOnStartWithoutFlag) { + stream_->SetChainedWebFeedRefreshEnabledForTesting(false); + store_->OverwriteStream(StreamType(StreamKind::kForYou), + MakeTypicalInitialModelState(), base::DoNothing()); + + response_translator_.InjectResponse(MakeTypicalRefreshModelState()); + TestForYouSurface surface(stream_.get()); + WaitForIdleTaskQueue(); + EXPECT_FALSE(network_.query_request_sent); + EXPECT_FALSE(response_translator_.InjectedResponseConsumed()); +} + class SignedOutViewDemotionTest : public FeedApiTest { public: void SetUp() override {
diff --git a/components/feed/core/v2/feed_stream.cc b/components/feed/core/v2/feed_stream.cc index 60e2b33d..2beb82e 100644 --- a/components/feed/core/v2/feed_stream.cc +++ b/components/feed/core/v2/feed_stream.cc
@@ -276,6 +276,10 @@ LoadStreamTask::Options options; options.stream_type = stream_type; options.single_feed_entry_point = entry_point; + if (!loaded_after_start_ && + base::FeatureList::IsEnabled(kRefreshFeedOnRestart)) { + options.refresh_even_when_not_stale = true; + } task_queue_.AddTask(FROM_HERE, std::make_unique<LoadStreamTask>( options, this, @@ -324,6 +328,8 @@ DCHECK(result.load_type == LoadType::kInitialLoad || result.load_type == LoadType::kManualRefresh); + loaded_after_start_ = true; + Stream& stream = GetStream(result.stream_type); if (result.load_type == LoadType::kManualRefresh) UnloadModel(result.stream_type);
diff --git a/components/feed/core/v2/feed_stream.h b/components/feed/core/v2/feed_stream.h index 6405b35..20b1ae2f 100644 --- a/components/feed/core/v2/feed_stream.h +++ b/components/feed/core/v2/feed_stream.h
@@ -534,6 +534,10 @@ bool chained_web_feed_refresh_enabled_ = true; + // True if the stream with any stream type has been loaded at least once since + // the start. + bool loaded_after_start_ = false; + base::WeakPtrFactory<FeedStream> weak_ptr_factory_{this}; };
diff --git a/components/feed/feed_feature_list.cc b/components/feed/feed_feature_list.cc index 0a42abcf..d1e1163 100644 --- a/components/feed/feed_feature_list.cc +++ b/components/feed/feed_feature_list.cc
@@ -165,4 +165,8 @@ "FeedSportsCard", base::FEATURE_DISABLED_BY_DEFAULT); +BASE_FEATURE(kRefreshFeedOnRestart, + "RefreshFeedOnRestart", + base::FEATURE_DISABLED_BY_DEFAULT); + } // namespace feed
diff --git a/components/feed/feed_feature_list.h b/components/feed/feed_feature_list.h index dabdd4f..bd0a554 100644 --- a/components/feed/feed_feature_list.h +++ b/components/feed/feed_feature_list.h
@@ -140,6 +140,9 @@ // Feature that enables sports card in the feed. BASE_DECLARE_FEATURE(kFeedSportsCard); +// Feature that enables refreshing feed when Chrome restarts. +BASE_DECLARE_FEATURE(kRefreshFeedOnRestart); + } // namespace feed #endif // COMPONENTS_FEED_FEED_FEATURE_LIST_H_
diff --git a/components/nacl/features.gni b/components/nacl/features.gni index fecb7951..6f83c814 100644 --- a/components/nacl/features.gni +++ b/components/nacl/features.gni
@@ -23,9 +23,8 @@ declare_args() { # Enables Native Client support. # - # Intentionally and permanently disable nacl on Windows and Mac. - enable_nacl = checkout_nacl && _cpu_is_supported && target_os != "ios" && - !is_android && !is_fuchsia && !is_castos && !is_win && !is_mac + # NaCl is only supported on ChromeOS. + enable_nacl = checkout_nacl && _cpu_is_supported && target_os == "chromeos" } assert(!enable_nacl || checkout_nacl)
diff --git a/components/omnibox/browser/autocomplete_controller.cc b/components/omnibox/browser/autocomplete_controller.cc index 0949a61f..f8922ab 100644 --- a/components/omnibox/browser/autocomplete_controller.cc +++ b/components/omnibox/browser/autocomplete_controller.cc
@@ -1109,7 +1109,7 @@ UpdateAssistedQueryStats(&internal_result_); UpdateTailSuggestPrefix(&internal_result_); MaybeRemoveCompanyEntityImages(&internal_result_); - MaybeCleanDefaultSuggestionForKeywordMode(input_.text(), &internal_result_); + MaybeCleanSuggestionsForKeywordMode(input_.text(), &internal_result_); if (search_provider_) search_provider_->RegisterDisplayedAnswers(internal_result_); @@ -1902,19 +1902,36 @@ } } -void AutocompleteController::MaybeCleanDefaultSuggestionForKeywordMode( +void AutocompleteController::MaybeCleanSuggestionsForKeywordMode( const std::u16string& input, AutocompleteResult* result) { - // Intentionally avoid actions and remove button on first suggestion - // which may interfere with keyword mode refresh. if (OmniboxFieldTrial::IsKeywordModeRefreshEnabled() && - input.starts_with(u'@') && result->size() > 1 && - result->match_at(1)->type == AutocompleteMatchType::STARTER_PACK) { - result->match_at(0)->actions.clear(); - result->match_at(0)->deletable = false; - for (AutocompleteMatch& duplicate : - result->match_at(0)->duplicate_matches) { - duplicate.deletable = false; + input.starts_with(u'@')) { + // Intentionally avoid actions and remove button on first suggestion + // which may interfere with keyword mode refresh. + if (result->size() > 1 && + result->match_at(1)->type == AutocompleteMatchType::STARTER_PACK) { + result->match_at(0)->actions.clear(); + result->match_at(0)->deletable = false; + for (AutocompleteMatch& duplicate : + result->match_at(0)->duplicate_matches) { + duplicate.deletable = false; + } + } + + // Clear help text that is repeated across consecutive instant keyword + // matches. + size_t instant_counter = 0; + for (size_t i = 0; i < result->size(); i++) { + if (result->match_at(i)->HasInstantKeyword(template_url_service_)) { + instant_counter++; + if (instant_counter > 1) { + result->match_at(i)->contents.clear(); + result->match_at(i)->contents_class = {{}}; + } + } else { + instant_counter = 0; + } } } }
diff --git a/components/omnibox/browser/autocomplete_controller.h b/components/omnibox/browser/autocomplete_controller.h index 6fff608..f29e68c 100644 --- a/components/omnibox/browser/autocomplete_controller.h +++ b/components/omnibox/browser/autocomplete_controller.h
@@ -434,9 +434,10 @@ void MaybeRemoveCompanyEntityImages(AutocompleteResult* result); // May remove actions from default suggestion to avoid interference with - // keyword mode refresh interaction. - void MaybeCleanDefaultSuggestionForKeywordMode(const std::u16string& input, - AutocompleteResult* result); + // keyword mode refresh interaction. May clear some match text that is + // repeated across multiple consecutive matches. + void MaybeCleanSuggestionsForKeywordMode(const std::u16string& input, + AutocompleteResult* result); base::ObserverList<Observer> observers_;
diff --git a/components/omnibox/browser/builtin_provider.cc b/components/omnibox/browser/builtin_provider.cc index c183bc4a..874f00c 100644 --- a/components/omnibox/browser/builtin_provider.cc +++ b/components/omnibox/browser/builtin_provider.cc
@@ -21,9 +21,11 @@ #include "components/search_engines/template_url_data.h" #include "components/search_engines/template_url_service.h" #include "components/search_engines/template_url_starter_pack_data.h" +#include "components/strings/grit/components_strings.h" #include "components/url_formatter/url_fixer.h" #include "third_party/metrics_proto/omnibox_focus_type.pb.h" #include "third_party/metrics_proto/omnibox_input_type.pb.h" +#include "ui/base/l10n/l10n_util.h" #include "ui/base/page_transition_types.h" #include "url/url_constants.h" @@ -225,14 +227,20 @@ match.inline_autocompletion = match.fill_into_edit.substr(input.text().length()); match.destination_url = GURL(destination_url); - match.contents = destination_url; - match.contents_class.emplace_back(0, ACMatchClassification::URL); - match.description = template_url.short_name(); - match.description_class.emplace_back(0, ACMatchClassification::NONE); match.transition = ui::PAGE_TRANSITION_GENERATED; if (OmniboxFieldTrial::IsKeywordModeRefreshEnabled()) { + match.description = l10n_util::GetStringFUTF16( + IDS_OMNIBOX_INSTANT_KEYWORD_SEARCH_TEXT, template_url.short_name()); + match.description_class.emplace_back(0, ACMatchClassification::NONE); + match.contents = + l10n_util::GetStringUTF16(IDS_OMNIBOX_INSTANT_KEYWORD_HELP); + match.contents_class.emplace_back(0, ACMatchClassification::DIM); match.allowed_to_be_default_match = false; } else { + match.description = template_url.short_name(); + match.description_class.emplace_back(0, ACMatchClassification::NONE); + match.contents = destination_url; + match.contents_class.emplace_back(0, ACMatchClassification::URL); match.SetAllowedToBeDefault(input); } matches_.push_back(match);
diff --git a/components/omnibox_strings.grdp b/components/omnibox_strings.grdp index 14b5b7f..9a0857a9 100644 --- a/components/omnibox_strings.grdp +++ b/components/omnibox_strings.grdp
@@ -277,6 +277,12 @@ <message name="IDS_SEARCH_ENGINES_STARTER_PACK_TABS_KEYWORD" desc = "The keyword required to trigger tab search in keyword mode. This will be prepended with an '@'."> Tabs </message> + <message name="IDS_OMNIBOX_INSTANT_KEYWORD_SEARCH_TEXT" desc="Text shown in an omnibox suggestion ready for instant keyword search. For example, starter pack suggestions like @bookmarks will search Bookmarks."> + Search <ph name="KEYWORD_SHORT_NAME">$1<ex>Bookmarks</ex></ph> + </message> + <message name="IDS_OMNIBOX_INSTANT_KEYWORD_HELP" desc = "Helper text shown with instant keyword search suggestions."> + Select to type your search directly in the address bar + </message> <!-- No results description for the Starter Pack's Tab search feature (@tabs). This appears as the first suggestion when no matching tabs are found. --> <message name="IDS_OMNIBOX_TAB_SEARCH_NO_RESULTS_FOUND" desc = "The string displayed as the first row in the Omnibox when no results are found in Tab Search mode.">
diff --git a/components/omnibox_strings_grdp/IDS_OMNIBOX_INSTANT_KEYWORD_HELP.png.sha1 b/components/omnibox_strings_grdp/IDS_OMNIBOX_INSTANT_KEYWORD_HELP.png.sha1 new file mode 100644 index 0000000..76dddfb --- /dev/null +++ b/components/omnibox_strings_grdp/IDS_OMNIBOX_INSTANT_KEYWORD_HELP.png.sha1
@@ -0,0 +1 @@ +d1d2a5bc15a2ec5b9b0d496e071cdfa1e3647445 \ No newline at end of file
diff --git a/components/omnibox_strings_grdp/IDS_OMNIBOX_INSTANT_KEYWORD_SEARCH_TEXT.png.sha1 b/components/omnibox_strings_grdp/IDS_OMNIBOX_INSTANT_KEYWORD_SEARCH_TEXT.png.sha1 new file mode 100644 index 0000000..76dddfb --- /dev/null +++ b/components/omnibox_strings_grdp/IDS_OMNIBOX_INSTANT_KEYWORD_SEARCH_TEXT.png.sha1
@@ -0,0 +1 @@ +d1d2a5bc15a2ec5b9b0d496e071cdfa1e3647445 \ No newline at end of file
diff --git a/components/optimization_guide/core/model_quality/model_quality_log_entry.h b/components/optimization_guide/core/model_quality/model_quality_log_entry.h index 552da4b..a13e459c 100644 --- a/components/optimization_guide/core/model_quality/model_quality_log_entry.h +++ b/components/optimization_guide/core/model_quality/model_quality_log_entry.h
@@ -18,16 +18,16 @@ explicit ModelQualityLogEntry( std::unique_ptr<proto::LogAiDataRequest> log_ai_data_request); - ~ModelQualityLogEntry(); + virtual ~ModelQualityLogEntry(); proto::LoggingMetadata* logging_metadata() { return log_ai_data_request_.get()->mutable_logging_metadata(); } template <typename FeatureType> - FeatureType::ModelQualityData* quality_data() { - return FeatureType::GetLoggingData(log_ai_data_request_) - .mutable_quality_data(); + FeatureType::Quality* quality_data() { + return FeatureType::GetLoggingData(*log_ai_data_request_) + ->mutable_quality_data(); } private:
diff --git a/components/optimization_guide/internal b/components/optimization_guide/internal index 8c7276b..2b12e66 160000 --- a/components/optimization_guide/internal +++ b/components/optimization_guide/internal
@@ -1 +1 @@ -Subproject commit 8c7276b0b0c1b0aa55e922e6116e314116303e2a +Subproject commit 2b12e66f237b926fad8f2eb19a5ef0a6d0154a9f
diff --git a/components/policy_strings.grdp b/components/policy_strings.grdp index 33f84fd..3d8abf40 100644 --- a/components/policy_strings.grdp +++ b/components/policy_strings.grdp
@@ -400,7 +400,9 @@ <message name="IDS_POLICY_SITE_SEARCH_SETTINGS_SHORTCUT_EQUALS_DSP_KEYWORD" desc="The text displayed in the status column of the SiteSearchSettings policy when a shortcut is the same as the keyword defined by the DefaultSearchProviderKeyword policy."> Shortcut can't be the same as the default search provider keyword defined by <ph name="DEFAULT_SEARCH_PROVIDER_KEYWORD_POLICY_NAME">DefaultSearchProviderKeyword</ph>: <ph name="SHORTCUT_NAME">$1<ex>shortcut</ex></ph> </message> - + <message name="IDS_POLICY_SITE_SEARCH_SETTINGS_URL_NOT_HTTPS" desc="The text displayed in the status column of the SiteSearchSettings policy when a URL scheme is not HTTPS."> + HTTPS scheme recommended for search URL: <ph name="SEARCH_URL">$1<ex>https://www.example.com</ex></ph> + </message> <!-- chrome://policy --> <message name="IDS_POLICY_TITLE" desc="Page title and the title of the section that lists policies.">
diff --git a/components/policy_strings_grdp/IDS_POLICY_SITE_SEARCH_SETTINGS_URL_NOT_HTTPS.png.sha1 b/components/policy_strings_grdp/IDS_POLICY_SITE_SEARCH_SETTINGS_URL_NOT_HTTPS.png.sha1 new file mode 100644 index 0000000..36de9a9 --- /dev/null +++ b/components/policy_strings_grdp/IDS_POLICY_SITE_SEARCH_SETTINGS_URL_NOT_HTTPS.png.sha1
@@ -0,0 +1 @@ +15db1472cc8e7a2ecca44fda137f5067ba0b7e3e \ No newline at end of file
diff --git a/components/reporting/util/BUILD.gn b/components/reporting/util/BUILD.gn index 82eb45ae..e4d67d8 100644 --- a/components/reporting/util/BUILD.gn +++ b/components/reporting/util/BUILD.gn
@@ -3,6 +3,7 @@ # found in the LICENSE file. import("//build/config/features.gni") +import("//build/nocompile.gni") import("//third_party/libprotobuf-mutator/fuzzable_proto_library.gni") import("//third_party/protobuf/proto_library.gni") @@ -180,3 +181,10 @@ "//testing/gtest", ] } + +if (enable_nocompile_tests_new) { + nocompile_source_set("reporting_nocompile_tests") { + sources = [ "status_macros_nocompile.nc" ] + deps = [ ":status_macros" ] + } +}
diff --git a/components/reporting/util/status_macros.h b/components/reporting/util/status_macros.h index eb213a4..6741f40 100644 --- a/components/reporting/util/status_macros.h +++ b/components/reporting/util/status_macros.h
@@ -5,6 +5,7 @@ #ifndef COMPONENTS_REPORTING_UTIL_STATUS_MACROS_H_ #define COMPONENTS_REPORTING_UTIL_STATUS_MACROS_H_ +#include "base/types/always_false.h" #include "base/types/expected.h" #include "components/reporting/util/status.h" #include "third_party/abseil-cpp/absl/types/optional.h" @@ -20,17 +21,11 @@ absl::optional<base::unexpected<Status>> ShouldReturnStatus( base::unexpected<Status>&& status); -// Helper struct to display T in error message for the static_assert -// failure. -template <typename...> -struct always_false { - static constexpr bool value = false; -}; - template <typename T> void ShouldReturnStatus(T) { - static_assert(always_false<T>::value, - "T must be either Status or base::expected<Status>"); + static_assert( + base::AlwaysFalse<T>, + "RETURN_IF_ERROR_STATUS only accepts either Status or StatusOr"); } } // namespace reporting::internal
diff --git a/components/reporting/util/status_macros_nocompile.nc b/components/reporting/util/status_macros_nocompile.nc new file mode 100644 index 0000000..808ac8f0 --- /dev/null +++ b/components/reporting/util/status_macros_nocompile.nc
@@ -0,0 +1,20 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// This is a "No Compile Test" suite. +// http://dev.chromium.org/developers/testing/no-compile-tests + +#include "components/reporting/util/status_macros.h" + +namespace reporting { +namespace { +int ReturnIfOtherTypes(int foo) { + // Should fail because foo is not neither Status or StatusOr. + RETURN_IF_ERROR_STATUS(foo); // expected-error {{variable has incomplete type 'void'}} + // expected-error@components/reporting/util/status_macros.h:* {{RETURN_IF_ERROR_STATUS only accepts either Status or StatusOr}} + + return 0; +} +} // namespace +} // namespace reporting \ No newline at end of file
diff --git a/components/safe_browsing/content/browser/web_ui/safe_browsing_ui.cc b/components/safe_browsing/content/browser/web_ui/safe_browsing_ui.cc index 5fd5698..b04ffa0b 100644 --- a/components/safe_browsing/content/browser/web_ui/safe_browsing_ui.cc +++ b/components/safe_browsing/content/browser/web_ui/safe_browsing_ui.cc
@@ -1528,6 +1528,10 @@ PROCEED_DEEP_SCAN: action = "PROCEED_DEEP_SCAN"; break; + case ClientSafeBrowsingReportRequest::DownloadWarningAction:: + OPEN_LEARN_MORE_LINK: + action = "OPEN_LEARN_MORE_LINK"; + break; } action_dict.Set("action", action); action_dict.Set("is_terminal_action",
diff --git a/components/safe_browsing/core/common/proto/csd.proto b/components/safe_browsing/core/common/proto/csd.proto index 3a9701d..871251c 100644 --- a/components/safe_browsing/core/common/proto/csd.proto +++ b/components/safe_browsing/core/common/proto/csd.proto
@@ -1703,7 +1703,7 @@ // Applicable actions: DISCARD, OPEN_SUBPAGE BUBBLE_MAINPAGE = 1; // Applicable actions: PROCEED, DISCARD, DISMISS, CLOSE, BACK, - // PROCEED_DEEP_SCAN + // PROCEED_DEEP_SCAN, OPEN_LEARN_MORE_LINK BUBBLE_SUBPAGE = 2; // Applicable actions: DISCARD, KEEP DOWNLOADS_PAGE = 3; @@ -1736,6 +1736,8 @@ OPEN_SUBPAGE = 8; // The user bypassed a deep scanning prompt PROCEED_DEEP_SCAN = 9; + // The user clicks the learn more link on the bubble subpage. + OPEN_LEARN_MORE_LINK = 10; } optional Action action = 2;
diff --git a/components/search_engines/site_search_policy_handler.cc b/components/search_engines/site_search_policy_handler.cc index 9b4dc43d..6c98c22f 100644 --- a/components/search_engines/site_search_policy_handler.cc +++ b/components/search_engines/site_search_policy_handler.cc
@@ -196,6 +196,16 @@ return true; } +void WarnIfNonHttpsUrl(const std::string& policy_name, + const std::string& url, + PolicyErrorMap* errors) { + GURL gurl(url); + if (!gurl.SchemeIs(url::kHttpsScheme)) { + errors->AddError(policy_name, IDS_POLICY_SITE_SEARCH_SETTINGS_URL_NOT_HTTPS, + url); + } +} + bool ShortcutAlreadySeen( const std::string& policy_name, const std::string& shortcut, @@ -265,7 +275,8 @@ const std::string& shortcut = GetShortcut(provider); const std::string& url = GetUrl(provider); - if (ShortcutIsEmpty(policy_name(), shortcut, errors) || + bool invalid_entry = + ShortcutIsEmpty(policy_name(), shortcut, errors) || NameIsEmpty(policy_name(), GetName(provider), errors) || UrlIsEmpty(policy_name(), url, errors) || ShortcutHasWhitespace(policy_name(), shortcut, errors) || @@ -274,8 +285,12 @@ policies, errors) || ShortcutAlreadySeen(policy_name(), shortcut, shortcuts_already_seen, errors, &duplicated_shortcuts) || - ReplacementStringIsMissingFromUrl(policy_name(), url, errors)) { + ReplacementStringIsMissingFromUrl(policy_name(), url, errors); + + if (invalid_entry) { ignored_shortcuts_.insert(shortcut); + } else { + WarnIfNonHttpsUrl(policy_name(), url, errors); } shortcuts_already_seen.insert(shortcut);
diff --git a/components/search_engines/site_search_policy_handler_unittest.cc b/components/search_engines/site_search_policy_handler_unittest.cc index ca664262..816949fd 100644 --- a/components/search_engines/site_search_policy_handler_unittest.cc +++ b/components/search_engines/site_search_policy_handler_unittest.cc
@@ -182,6 +182,14 @@ .favicon = "https://work.com/favicon.ico"}, }; +// Used for tests that require a provider with non-HTTPS URL. +TestProvider kNonHttpsUrlTestProviders[] = { + {.name = "work name", + .shortcut = "work", + .url = "http://work.com/q={searchTerms}", + .favicon = "http://work.com/favicon.ico"}, +}; + // Creates a simple list item for the site search policy. base::Value::Dict GenerateSiteSearchPolicyEntry(const std::string& name, const std::string& shortcut, @@ -791,6 +799,41 @@ kShortcutSameAsDSPKeywordTestProviders[1]))); } +TEST(SiteSearchPolicyHandlerTest, NonHttpsUrl) { + base::test::ScopedFeatureList scoped_feature_list; + scoped_feature_list.InitAndEnableFeature(omnibox::kSiteSearchSettingsPolicy); + + SiteSearchPolicyHandler handler( + policy::Schema::Wrap(policy::GetChromeSchemaData())); + + policy::PolicyMap policies; + PolicyErrorMap errors; + PrefValueMap prefs; + + base::Value::List policy_value; + policy_value.Append( + GenerateSiteSearchPolicyEntry(kNonHttpsUrlTestProviders[0])); + + policies.Set(key::kSiteSearchSettings, policy::POLICY_LEVEL_MANDATORY, + policy::POLICY_SCOPE_USER, policy::POLICY_SOURCE_CLOUD, + base::Value(std::move(policy_value)), nullptr); + + ASSERT_TRUE(handler.CheckPolicySettings(policies, &errors)); + EXPECT_THAT(&errors, + HasValidationError(l10n_util::GetStringFUTF16( + IDS_POLICY_SITE_SEARCH_SETTINGS_URL_NOT_HTTPS, + base::UTF8ToUTF16(kNonHttpsUrlTestProviders[0].url)))); + + handler.ApplyPolicySettings(policies, &prefs); + base::Value* providers = nullptr; + ASSERT_TRUE(prefs.GetValue( + EnterpriseSiteSearchManager::kSiteSearchSettingsPrefName, &providers)); + ASSERT_NE(providers, nullptr); + ASSERT_TRUE(providers->is_list()); + EXPECT_THAT(providers->GetList(), + ElementsAre(IsSiteSearchEntry(kNonHttpsUrlTestProviders[0]))); +} + TEST(SiteSearchPolicyHandlerTest, NoValidEntry) { base::test::ScopedFeatureList scoped_feature_list; scoped_feature_list.InitAndEnableFeature(omnibox::kSiteSearchSettingsPolicy);
diff --git a/components/segmentation_platform/internal/database/signal_database_impl.cc b/components/segmentation_platform/internal/database/signal_database_impl.cc index 54ee5127..124a2fb5 100644 --- a/components/segmentation_platform/internal/database/signal_database_impl.cc +++ b/components/segmentation_platform/internal/database/signal_database_impl.cc
@@ -16,6 +16,7 @@ #include "base/functional/bind.h" #include "base/functional/callback_forward.h" #include "base/memory/weak_ptr.h" +#include "base/task/sequenced_task_runner.h" #include "base/time/clock.h" #include "base/time/time.h" #include "base/trace_event/typed_macros.h" @@ -80,9 +81,12 @@ } // namespace -SignalDatabaseImpl::SignalDatabaseImpl(std::unique_ptr<SignalProtoDb> database, - base::Clock* clock) +SignalDatabaseImpl::SignalDatabaseImpl( + std::unique_ptr<SignalProtoDb> database, + base::Clock* clock, + scoped_refptr<base::SequencedTaskRunner> task_runner) : database_(std::move(database)), + task_runner_(task_runner), clock_(clock), should_fix_compaction_( base::FeatureList::IsEnabled(kSegmentationCompactionFix)) {} @@ -163,6 +167,7 @@ base::Time end_time, bool success, std::unique_ptr<std::map<std::string, proto::SignalData>> entries, + scoped_refptr<base::SequencedTaskRunner> task_runner, VisitSample visit_sample) { TRACE_EVENT("segmentation_platform", "IterateOverAllSamples"); if (!success || !entries) { @@ -193,6 +198,7 @@ } stats::RecordSignalDatabaseGetSamplesSampleCount(sample_count); + task_runner->DeleteSoon(FROM_HERE, std::move(entries)); } void SignalDatabaseImpl::OnGetSamples( @@ -203,7 +209,7 @@ std::unique_ptr<std::map<std::string, proto::SignalData>> entries) { std::vector<Sample> out; IterateOverAllSamples( - start_time, end_time, success, std::move(entries), + start_time, end_time, success, std::move(entries), task_runner_, base::BindRepeating( [](std::vector<Sample>* out, const SignalKey&, base::Time timestamp, const proto::Sample& sample) { @@ -226,6 +232,7 @@ std::unique_ptr<std::map<std::string, proto::SignalData>> entries) { IterateOverAllSamples( base::Time::Min(), base::Time::Max(), success, std::move(entries), + task_runner_, base::BindRepeating( [](std::vector<DbEntry>* out, const SignalKey& key, base::Time timestamp, const proto::Sample& sample) {
diff --git a/components/segmentation_platform/internal/database/signal_database_impl.h b/components/segmentation_platform/internal/database/signal_database_impl.h index 3dec74b..3383b67 100644 --- a/components/segmentation_platform/internal/database/signal_database_impl.h +++ b/components/segmentation_platform/internal/database/signal_database_impl.h
@@ -12,6 +12,7 @@ #include "base/memory/raw_ptr.h" #include "base/memory/weak_ptr.h" +#include "base/task/sequenced_task_runner.h" #include "base/time/time.h" #include "components/leveldb_proto/public/proto_database.h" #include "components/segmentation_platform/internal/database/signal_database.h" @@ -34,7 +35,8 @@ using SignalProtoDb = leveldb_proto::ProtoDatabase<proto::SignalData>; SignalDatabaseImpl(std::unique_ptr<SignalProtoDb> database, - base::Clock* clock); + base::Clock* clock, + scoped_refptr<base::SequencedTaskRunner> task_runner); ~SignalDatabaseImpl() override; // Disallow copy/assign. @@ -96,6 +98,8 @@ // The backing LevelDB proto database. std::unique_ptr<SignalProtoDb> database_; + scoped_refptr<base::SequencedTaskRunner> task_runner_; + // Used for getting current time. raw_ptr<base::Clock> clock_;
diff --git a/components/segmentation_platform/internal/database/signal_database_impl_unittest.cc b/components/segmentation_platform/internal/database/signal_database_impl_unittest.cc index c0498bf..b296804 100644 --- a/components/segmentation_platform/internal/database/signal_database_impl_unittest.cc +++ b/components/segmentation_platform/internal/database/signal_database_impl_unittest.cc
@@ -77,8 +77,9 @@ auto db = std::make_unique<leveldb_proto::test::FakeDB<proto::SignalData>>( &db_entries_); db_ = db.get(); - signal_db_ = - std::make_unique<SignalDatabaseImpl>(std::move(db), &test_clock_); + signal_db_ = std::make_unique<SignalDatabaseImpl>( + std::move(db), &test_clock_, + task_environment_.GetMainThreadTaskRunner()); signal_db_->Initialize(base::DoNothing()); db_->InitStatusCallback(leveldb_proto::Enums::InitStatus::kOK); @@ -91,6 +92,7 @@ db_entries_.clear(); db_ = nullptr; signal_db_.reset(); + task_environment_.RunUntilIdle(); } void ExpectGetSamples(
diff --git a/components/segmentation_platform/internal/database/storage_service.cc b/components/segmentation_platform/internal/database/storage_service.cc index c9bd07a6c..d0509b0 100644 --- a/components/segmentation_platform/internal/database/storage_service.cc +++ b/components/segmentation_platform/internal/database/storage_service.cc
@@ -50,6 +50,7 @@ leveldb_proto::ProtoDbType::SIGNAL_STORAGE_CONFIG_DATABASE, storage_dir.Append(kSignalStorageConfigDBName), task_runner), + task_runner, clock, ukm_data_manager, std::move(configs), @@ -63,6 +64,7 @@ std::unique_ptr<leveldb_proto::ProtoDatabase<proto::SignalData>> signal_db, std::unique_ptr<leveldb_proto::ProtoDatabase<proto::SignalStorageConfigs>> signal_storage_config_db, + scoped_refptr<base::SequencedTaskRunner> task_runner, base::Clock* clock, UkmDataManager* ukm_data_manager, std::vector<std::unique_ptr<Config>> configs, @@ -81,7 +83,9 @@ std::move(segment_db), std::make_unique<SegmentInfoCache>())), signal_database_( - std::make_unique<SignalDatabaseImpl>(std::move(signal_db), clock)), + std::make_unique<SignalDatabaseImpl>(std::move(signal_db), + clock, + task_runner)), signal_storage_config_(std::make_unique<SignalStorageConfig>( std::move(signal_storage_config_db), clock)),
diff --git a/components/segmentation_platform/internal/database/storage_service.h b/components/segmentation_platform/internal/database/storage_service.h index 5583d29..ef264f6 100644 --- a/components/segmentation_platform/internal/database/storage_service.h +++ b/components/segmentation_platform/internal/database/storage_service.h
@@ -87,6 +87,7 @@ signal_db, std::unique_ptr<leveldb_proto::ProtoDatabase<proto::SignalStorageConfigs>> signal_storage_config_db, + scoped_refptr<base::SequencedTaskRunner> task_runner, base::Clock* clock, UkmDataManager* ukm_data_manager, std::vector<std::unique_ptr<Config>> configs,
diff --git a/components/segmentation_platform/internal/execution/processing/uma_feature_processor_unittest.cc b/components/segmentation_platform/internal/execution/processing/uma_feature_processor_unittest.cc index a65b26f..66c774c 100644 --- a/components/segmentation_platform/internal/execution/processing/uma_feature_processor_unittest.cc +++ b/components/segmentation_platform/internal/execution/processing/uma_feature_processor_unittest.cc
@@ -87,7 +87,7 @@ leveldb_proto::ProtoDbType::SIGNAL_DATABASE, temp_dir_.GetPath().Append(FILE_PATH_LITERAL("signaldb")), task_env_.GetMainThreadTaskRunner()), - &clock_); + &clock_, task_env_.GetMainThreadTaskRunner()); base::RunLoop wait_for_init; signal_database_->Initialize(base::BindOnce(
diff --git a/components/segmentation_platform/internal/segmentation_platform_service_test_base.cc b/components/segmentation_platform/internal/segmentation_platform_service_test_base.cc index 303c470d..ca748857 100644 --- a/components/segmentation_platform/internal/segmentation_platform_service_test_base.cc +++ b/components/segmentation_platform/internal/segmentation_platform_service_test_base.cc
@@ -124,9 +124,9 @@ } auto storage_service = std::make_unique<StorageService>( std::move(segment_db), std::move(signal_db), - std::move(segment_storage_config_db), &test_clock_, ukm_data_manager, - std::move(configs), model_provider_factory.get(), &pref_service_, - base::DoNothing()); + std::move(segment_storage_config_db), task_runner_, &test_clock_, + ukm_data_manager, std::move(configs), model_provider_factory.get(), + &pref_service_, base::DoNothing()); auto params = std::make_unique<SegmentationPlatformServiceImpl::InitParams>(); params->storage_service = std::move(storage_service);
diff --git a/components/sync/base/features.cc b/components/sync/base/features.cc index effa256..451145c4 100644 --- a/components/sync/base/features.cc +++ b/components/sync/base/features.cc
@@ -58,7 +58,7 @@ BASE_FEATURE(kSyncChromeOSAppsToggleSharing, "SyncChromeOSAppsToggleSharing", - base::FEATURE_DISABLED_BY_DEFAULT); + base::FEATURE_ENABLED_BY_DEFAULT); BASE_FEATURE(kChromeOSSyncedSessionSharing, "ChromeOSSyncedSessionSharing",
diff --git a/components/update_client/background_downloader_mac.mm b/components/update_client/background_downloader_mac.mm index 96ac99551..057d5565 100644 --- a/components/update_client/background_downloader_mac.mm +++ b/components/update_client/background_downloader_mac.mm
@@ -16,6 +16,7 @@ #include "base/base_paths.h" #include "base/check.h" #include "base/containers/flat_map.h" +#include "base/files/file_enumerator.h" #include "base/files/file_path.h" #include "base/files/file_util.h" #include "base/functional/bind.h" @@ -37,7 +38,6 @@ #include "base/thread_annotations.h" #include "base/threading/sequence_bound.h" #include "base/time/time.h" -#include "base/timer/timer.h" #include "components/update_client/crx_downloader.h" #include "components/update_client/task_traits.h" #include "components/update_client/update_client_errors.h" @@ -63,6 +63,9 @@ base::HexEncode(reinterpret_cast<uint8_t*>(&hash), sizeof(hash))); } +// The age at which unclaimed downloads should be evicted from the cache. +constexpr base::TimeDelta kMaxCachedDownloadAge = base::Days(2); + // These methods have been copied from //net/base/mac/url_conversions.h to // avoid introducing a dependancy on //net. NSURL* NSURLWithGURL(const GURL& url) { @@ -104,6 +107,18 @@ return GURL(); } +// Detects and removes old files from the download cache. +void CleanDownloadCache(const base::FilePath& download_cache) { + base::FileEnumerator(download_cache, false, base::FileEnumerator::FILES) + .ForEach([](const base::FilePath& download) { + base::File::Info info; + if (base::GetFileInfo(download, &info) && + base::Time::Now() - info.creation_time > kMaxCachedDownloadAge) { + base::DeleteFile(download); + } + }); +} + } // namespace @interface DownloadDelegate : NSObject <NSURLSessionDownloadDelegate> @@ -255,6 +270,10 @@ void DoStartDownload(const GURL& url, OnDownloadCompleteCallback callback) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + base::SequencedTaskRunner::GetCurrentDefault()->PostDelayedTask( + FROM_HERE, base::BindRepeating(&CleanDownloadCache, download_cache_), + base::Minutes(10)); + if (!session_) { CrxDownloader::DownloadMetrics metrics = GetDefaultMetrics(url); metrics.error =
diff --git a/components/update_client/background_downloader_mac_unittest.cc b/components/update_client/background_downloader_mac_unittest.cc index f1455ce1..5368684d 100644 --- a/components/update_client/background_downloader_mac_unittest.cc +++ b/components/update_client/background_downloader_mac_unittest.cc
@@ -34,6 +34,7 @@ #include "base/test/task_environment.h" #include "base/test/test_file_util.h" #include "base/test/test_timeouts.h" +#include "base/time/time.h" #include "base/unguessable_token.h" #include "components/update_client/crx_downloader.h" #include "components/update_client/task_traits.h" @@ -76,6 +77,7 @@ class BackgroundDownloaderTest : public testing::Test { public: void SetUp() override { + environment_ = CreateTaskEnvironment(); background_sequence_ = base::ThreadPool::CreateSequencedTaskRunner( kTaskTraitsBackgroundDownloader); @@ -100,6 +102,10 @@ } protected: + virtual std::unique_ptr<base::test::TaskEnvironment> CreateTaskEnvironment() { + return std::make_unique<base::test::TaskEnvironment>(); + } + void DoStartDownload( const GURL& url, BackgroundDownloaderSharedSession::OnDownloadCompleteCallback @@ -157,6 +163,7 @@ base::RepeatingCallback<std::unique_ptr<HttpResponse>( const HttpRequest& request)> request_handler_; + std::unique_ptr<base::test::TaskEnvironment> environment_; private: std::unique_ptr<HttpResponse> HandleRequest(const HttpRequest& request) { @@ -164,7 +171,6 @@ return request_handler_.Run(request); } - base::test::TaskEnvironment environment_; std::unique_ptr<net::test_server::EmbeddedTestServer> test_server_; EmbeddedTestServerHandle test_server_handle_; }; @@ -382,6 +388,52 @@ run_loop.Run(); } +class BackgroundDownloaderCacheCleanTest : public BackgroundDownloaderTest { + public: + std::unique_ptr<base::test::TaskEnvironment> CreateTaskEnvironment() + override { + // Configure the task environment to use mocked time that starts at the + // current real time. This is important for tests which rely on cached file + // ages, which are irrespective of mocked time. + base::Time now = base::Time::NowFromSystemTime(); + auto environment = std::make_unique<base::test::TaskEnvironment>( + base::test::TaskEnvironment::TimeSource::MOCK_TIME); + environment->AdvanceClock(now - base::Time::Now()); + return environment; + } +}; + +TEST_F(BackgroundDownloaderCacheCleanTest, CleansStaleDownloads) { + request_handler_ = base::BindLambdaForTesting([&](const HttpRequest&) { + std::unique_ptr<BasicHttpResponse> response = + std::make_unique<BasicHttpResponse>(); + response->set_code(net::HTTP_OK); + response->set_content(kSmallDownloadData); + response->set_content_type("text/plain"); + return base::WrapUnique<HttpResponse>(response.release()); + }); + + ASSERT_TRUE(base::WriteFile(download_cache_.AppendASCII("file1"), + kSmallDownloadData)); + ASSERT_TRUE(base::WriteFile(download_cache_.AppendASCII("file2"), + kSmallDownloadData)); + environment_->FastForwardBy(base::Days(3)); + + base::RunLoop run_loop; + DoStartDownload(GetURL(), + base::BindLambdaForTesting( + [](bool is_handled, const CrxDownloader::Result& result, + const CrxDownloader::DownloadMetrics& metrics) {}) + .Then(run_loop.QuitClosure())); + run_loop.Run(); + + environment_->FastForwardBy(base::Minutes(30)); + environment_->RunUntilIdle(); + + EXPECT_FALSE(base::PathExists(download_cache_.AppendASCII("file1"))); + EXPECT_FALSE(base::PathExists(download_cache_.AppendASCII("file2"))); +} + class BackgroundDownloaderCrashingClientTest : public testing::Test { public: void SetUp() override {
diff --git a/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc b/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc index 1efe409e..83d28dd 100644 --- a/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc +++ b/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc
@@ -935,7 +935,7 @@ std::vector<GrBackendSemaphore> end_semaphores; auto scoped_write = representation->BeginScopedWriteAccess( - /*final_msaa_count=*/1, surface_props, gfx::Rect(), &begin_semaphores, + /*final_msaa_count=*/1, surface_props, &begin_semaphores, &end_semaphores, gpu::SharedImageRepresentation::AllowUnclearedAccess::kYes); @@ -1670,7 +1670,7 @@ SkSurfaceProps surface_props{0, kUnknown_SkPixelGeometry}; // TODO(https://crbug.com/1226672): Use BeginScopedReadAccess instead scoped_access = backing_representation->BeginScopedWriteAccess( - /*final_msaa_count=*/1, surface_props, gfx::Rect(), &begin_semaphores, + /*final_msaa_count=*/1, surface_props, &begin_semaphores, &end_semaphores, gpu::SharedImageRepresentation::AllowUnclearedAccess::kNo); surface = scoped_access->surface();
diff --git a/content/browser/aggregation_service/aggregation_service_storage_sql.h b/content/browser/aggregation_service/aggregation_service_storage_sql.h index e051d0b3..1534776 100644 --- a/content/browser/aggregation_service/aggregation_service_storage_sql.h +++ b/content/browser/aggregation_service/aggregation_service_storage_sql.h
@@ -13,7 +13,7 @@ #include "base/files/file_path.h" #include "base/memory/raw_ref.h" #include "base/sequence_checker.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/thread_annotations.h" #include "base/time/time.h" #include "content/browser/aggregation_service/aggregation_service.h"
diff --git a/content/browser/back_forward_cache_browsertest.cc b/content/browser/back_forward_cache_browsertest.cc index ab3a804..0a0e076 100644 --- a/content/browser/back_forward_cache_browsertest.cc +++ b/content/browser/back_forward_cache_browsertest.cc
@@ -14,7 +14,7 @@ #include "base/memory/raw_ptr.h" #include "base/metrics/metrics_hashes.h" #include "base/run_loop.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/system/sys_info.h" #include "base/task/common/task_annotator.h" #include "base/task/single_thread_task_runner.h"
diff --git a/content/browser/direct_sockets/direct_sockets_test_utils.h b/content/browser/direct_sockets/direct_sockets_test_utils.h index c1ef55f..8aa432a 100644 --- a/content/browser/direct_sockets/direct_sockets_test_utils.h +++ b/content/browser/direct_sockets/direct_sockets_test_utils.h
@@ -11,7 +11,7 @@ #include "base/containers/span.h" #include "base/functional/callback_forward.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/test/test_future.h" #include "base/token.h" #include "content/public/browser/web_contents.h"
diff --git a/content/browser/first_party_sets/first_party_set_parser.h b/content/browser/first_party_sets/first_party_set_parser.h index ed3bd3a..56e3590 100644 --- a/content/browser/first_party_sets/first_party_set_parser.h +++ b/content/browser/first_party_sets/first_party_set_parser.h
@@ -9,7 +9,7 @@ #include <utility> #include "base/containers/flat_map.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/types/expected.h" #include "base/values.h" #include "content/common/content_export.h"
diff --git a/content/browser/interest_group/auction_url_loader_factory_proxy.h b/content/browser/interest_group/auction_url_loader_factory_proxy.h index 0c62171a..672dc50 100644 --- a/content/browser/interest_group/auction_url_loader_factory_proxy.h +++ b/content/browser/interest_group/auction_url_loader_factory_proxy.h
@@ -8,7 +8,7 @@ #include <stdint.h> #include "base/functional/callback_forward.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "content/browser/interest_group/subresource_url_authorizations.h" #include "content/common/content_export.h" #include "content/services/auction_worklet/public/mojom/auction_network_events_handler.mojom.h"
diff --git a/content/browser/media/media_license_manager_unittest.cc b/content/browser/media/media_license_manager_unittest.cc index f4adb90..c1969f2f 100644 --- a/content/browser/media/media_license_manager_unittest.cc +++ b/content/browser/media/media_license_manager_unittest.cc
@@ -11,7 +11,7 @@ #include "base/files/file_util.h" #include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_refptr.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/task/single_thread_task_runner.h" #include "base/test/gmock_expected_support.h" #include "base/test/task_environment.h"
diff --git a/content/browser/mojo_binder_policy_map_impl.h b/content/browser/mojo_binder_policy_map_impl.h index b264f321..073ce9a6 100644 --- a/content/browser/mojo_binder_policy_map_impl.h +++ b/content/browser/mojo_binder_policy_map_impl.h
@@ -8,7 +8,7 @@ #include <string> #include "base/containers/flat_map.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "content/common/content_export.h" #include "content/public/browser/mojo_binder_policy_map.h"
diff --git a/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate_unittest.cc b/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate_unittest.cc index efcef66..bdc7e10 100644 --- a/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate_unittest.cc +++ b/content/browser/ppapi_plugin_sandboxed_process_launcher_delegate_unittest.cc
@@ -4,34 +4,17 @@ #include "content/browser/ppapi_plugin_sandboxed_process_launcher_delegate.h" -#include "base/test/scoped_feature_list.h" -#include "build/build_config.h" -#include "sandbox/policy/features.h" #include "sandbox/policy/switches.h" -#include "testing/gmock/include/gmock/gmock.h" -#include "testing/gtest/include/gtest/gtest.h" - -#if BUILDFLAG(IS_WIN) -#include "base/win/windows_version.h" #include "sandbox/policy/win/sandbox_policy_feature_test.h" #include "sandbox/policy/win/sandbox_win.h" #include "sandbox/win/src/app_container_base.h" #include "sandbox/win/src/sandbox_factory.h" #include "sandbox/win/src/sandbox_policy.h" #include "sandbox/win/src/sandbox_policy_base.h" -#endif +#include "testing/gtest/include/gtest/gtest.h" -using ::testing::_; -using ::testing::Return; +namespace content::sandbox::policy { -using ::testing::ElementsAre; -using ::testing::Pair; - -namespace content { -namespace sandbox { -namespace policy { - -#if BUILDFLAG(IS_WIN) class PpapiPluginFeatureSandboxWinTest : public ::sandbox::policy::SandboxFeatureTest { public: @@ -43,8 +26,6 @@ ::sandbox::MITIGATION_DYNAMIC_CODE_DISABLE; return flags; } - - base::test::ScopedFeatureList feature_list_; }; TEST_P(PpapiPluginFeatureSandboxWinTest, PpapiGeneratedPolicyTest) { @@ -74,8 +55,5 @@ ::testing::Combine( /* renderer app container feature */ ::testing::Bool(), /* ktm mitigation feature */ ::testing::Bool())); -#endif -} // namespace policy -} // namespace sandbox -} // namespace content +} // namespace content::sandbox::policy
diff --git a/content/browser/preloading/prefetch/no_vary_search_helper.h b/content/browser/preloading/prefetch/no_vary_search_helper.h index 1eeefc2..292aacab 100644 --- a/content/browser/preloading/prefetch/no_vary_search_helper.h +++ b/content/browser/preloading/prefetch/no_vary_search_helper.h
@@ -84,12 +84,11 @@ // 1. Exact match (`MatchType::kExact`). // 2. No-Vary-Search matches (`MatchType::kNoVarySearch`), or // URLs with the same non-ref/query part as `url` (`MatchType::kOther`). -template <typename PrefetchKey> +template <typename PrefetchKey, typename Value> void IterateCandidates( const PrefetchKey& key, - const std::map<PrefetchKey, base::WeakPtr<PrefetchContainer>>& prefetches, - base::RepeatingCallback< - IterateCandidateResult(base::WeakPtr<PrefetchContainer>, MatchType)> + const std::map<PrefetchKey, Value>& prefetches, + base::RepeatingCallback<IterateCandidateResult(const Value&, MatchType)> callback) { auto it_exact_match = prefetches.find(key); if (it_exact_match != prefetches.end() && it_exact_match->second) { @@ -177,42 +176,41 @@ // - Via exact match, or // - Via No-Vary-Search information if exact match is not found, the feature is // enabled and `SetNoVarySearchData()` is called for such `PrefetchContainer`s. -template <typename PrefetchKey> +template <typename PrefetchKey, typename Value> base::WeakPtr<PrefetchContainer> MatchUrl( const PrefetchKey& key, - const std::map<PrefetchKey, base::WeakPtr<PrefetchContainer>>& prefetches) { + const std::map<PrefetchKey, Value>& prefetches) { base::WeakPtr<PrefetchContainer> result = nullptr; - IterateCandidates(key, prefetches, - base::BindRepeating( - [](base::WeakPtr<PrefetchContainer>* result, - base::WeakPtr<PrefetchContainer> prefetch_container, - MatchType match_type) { - switch (match_type) { - case MatchType::kExact: - case MatchType::kNoVarySearch: - // TODO(crbug.com/1449360): Revisit which - // PrefetchContainer to return when there are - // multiple candidates. Currently we return the - // first PrefetchContainer in URL lexicographic - // order. - *result = std::move(prefetch_container); - return IterateCandidateResult::kFinish; - case MatchType::kOther: - return IterateCandidateResult::kContinue; - } - }, - base::Unretained(&result))); + IterateCandidates( + key, prefetches, + base::BindRepeating( + [](base::WeakPtr<PrefetchContainer>* result, + const Value& prefetch_container, MatchType match_type) { + switch (match_type) { + case MatchType::kExact: + case MatchType::kNoVarySearch: + // TODO(crbug.com/1449360): Revisit which PrefetchContainer to + // return when there are multiple candidates. Currently we + // return the first PrefetchContainer in URL lexicographic + // order. + *result = prefetch_container->GetWeakPtr(); + return IterateCandidateResult::kFinish; + case MatchType::kOther: + return IterateCandidateResult::kContinue; + } + }, + base::Unretained(&result))); return result; } // Return the (URL,PrefetchContainer) pairs for a specific Url without // query and reference. Allow as input urls with query and/or reference // for ease of use (remove query/reference during lookup). -template <typename PrefetchKey> +template <typename PrefetchKey, typename Value> std::vector<std::pair<GURL, base::WeakPtr<PrefetchContainer>>> GetAllForUrlWithoutRefAndQueryForTesting( const PrefetchKey& key, - const std::map<PrefetchKey, base::WeakPtr<PrefetchContainer>>& prefetches) { + const std::map<PrefetchKey, Value>& prefetches) { std::vector<std::pair<GURL, base::WeakPtr<PrefetchContainer>>> result; IterateCandidates( @@ -220,10 +218,9 @@ base::BindRepeating( [](std::vector<std::pair<GURL, base::WeakPtr<PrefetchContainer>>>* result, - base::WeakPtr<PrefetchContainer> prefetch_container, - MatchType match_type) { + const Value& prefetch_container, MatchType match_type) { result->emplace_back(prefetch_container->GetURL(), - prefetch_container); + prefetch_container->GetWeakPtr()); return IterateCandidateResult::kContinue; }, base::Unretained(&result)));
diff --git a/content/browser/preloading/prefetch/prefetch_document_manager.cc b/content/browser/preloading/prefetch/prefetch_document_manager.cc index 5bcb4dc..68167767 100644 --- a/content/browser/preloading/prefetch/prefetch_document_manager.cc +++ b/content/browser/preloading/prefetch/prefetch_document_manager.cc
@@ -200,7 +200,18 @@ } } for (const auto& prefetch : prefetches_to_evict) { - EvictPrefetch(prefetch); + all_prefetches_.erase(prefetch->GetURL()); + switch (prefetch->GetLoadState()) { + case PrefetchContainer::LoadState::kNotStarted: + case PrefetchContainer::LoadState::kEligible: + case PrefetchContainer::LoadState::kFailedIneligible: + case PrefetchContainer::LoadState::kFailedHeldback: + break; + case PrefetchContainer::LoadState::kStarted: + prefetch->SetPrefetchStatus(PrefetchStatus::kPrefetchEvicted); + break; + } + GetPrefetchService()->ResetPrefetch(prefetch); } } @@ -441,24 +452,6 @@ } } -void PrefetchDocumentManager::EvictPrefetch( - base::WeakPtr<PrefetchContainer> prefetch) { - DCHECK(prefetch); - all_prefetches_.erase(prefetch->GetURL()); - switch (prefetch->GetLoadState()) { - case PrefetchContainer::LoadState::kNotStarted: - case PrefetchContainer::LoadState::kEligible: - case PrefetchContainer::LoadState::kFailedIneligible: - case PrefetchContainer::LoadState::kFailedHeldback: - break; - case PrefetchContainer::LoadState::kStarted: - prefetch->SetPrefetchStatus(PrefetchStatus::kPrefetchEvicted); - break; - } - DCHECK(GetPrefetchService()); - GetPrefetchService()->ResetPrefetch(prefetch); -} - DOCUMENT_USER_DATA_KEY_IMPL(PrefetchDocumentManager); } // namespace content
diff --git a/content/browser/preloading/prefetch/prefetch_document_manager.h b/content/browser/preloading/prefetch/prefetch_document_manager.h index fc07531..52748cec 100644 --- a/content/browser/preloading/prefetch/prefetch_document_manager.h +++ b/content/browser/preloading/prefetch/prefetch_document_manager.h
@@ -124,10 +124,6 @@ // Called when a PrefetchContainer started by |this| is being destroyed. void PrefetchWillBeDestroyed(PrefetchContainer* prefetch); - // Destroys |prefetch|. |prefetch| could either be owned by |this| or by - // PrefetchService. - void EvictPrefetch(base::WeakPtr<PrefetchContainer> prefetch); - base::WeakPtr<PrefetchDocumentManager> GetWeakPtr() { return weak_method_factory_.GetWeakPtr(); }
diff --git a/content/browser/preloading/prefetch/prefetch_service.cc b/content/browser/preloading/prefetch/prefetch_service.cc index 8ed66c4d..433ccbe 100644 --- a/content/browser/preloading/prefetch/prefetch_service.cc +++ b/content/browser/preloading/prefetch/prefetch_service.cc
@@ -362,7 +362,7 @@ RecordExistingPrefetchWithMatchingURL(prefetch_container); - // A newly submitted prefetch could already be in |all_prefetches_| if and + // A newly submitted prefetch could already be in |owned_prefetches_| if and // only if: // 1) There was a same origin navigaition that used the same renderer. // 2) Both pages requested a prefetch for the same URL. @@ -370,15 +370,14 @@ // request (which would mean that it is in |owned_prefetches_| and owned // by the prefetch service). // If this happens, then we just delete the old prefetch and add the new - // prefetch to |all_prefetches_|. - auto prefetch_iter = all_prefetches_.find(prefetch_container_key); - if (prefetch_iter != all_prefetches_.end() && prefetch_iter->second) { - ResetPrefetch(prefetch_iter->second); + // prefetch to |owned_prefetches_|. + auto prefetch_iter = owned_prefetches_.find(prefetch_container_key); + if (prefetch_iter != owned_prefetches_.end()) { + ResetPrefetch(prefetch_iter->second->GetWeakPtr()); } owned_prefetches_[prefetch_container_key] = std::move(owned_prefetch_container); - all_prefetches_[prefetch_container_key] = prefetch_container; PrefetchUrl(std::move(prefetch_container)); } @@ -875,7 +874,7 @@ #endif if (PrefetchCloseIdleSockets()) { - for (const auto& iter : all_prefetches_) { + for (const auto& iter : owned_prefetches_) { if (iter.second) { iter.second->CloseIdleConnections(); } @@ -952,12 +951,11 @@ void PrefetchService::ResetPrefetch( base::WeakPtr<PrefetchContainer> prefetch_container) { - DCHECK(prefetch_container); - DCHECK( - owned_prefetches_.find(prefetch_container->GetPrefetchContainerKey()) != - owned_prefetches_.end()); - - RemovePrefetch(prefetch_container->GetPrefetchContainerKey()); + CHECK(prefetch_container); + auto it = + owned_prefetches_.find(prefetch_container->GetPrefetchContainerKey()); + CHECK(it != owned_prefetches_.end()); + CHECK_EQ(it->second.get(), prefetch_container.get()); auto active_prefetch_iter = active_prefetches_.find(prefetch_container->GetPrefetchContainerKey()); @@ -965,27 +963,7 @@ active_prefetches_.erase(active_prefetch_iter); } - owned_prefetches_.erase( - owned_prefetches_.find(prefetch_container->GetPrefetchContainerKey())); -} - -void PrefetchService::RemovePrefetch( - const PrefetchContainer::Key& prefetch_container_key) { - const auto prefetch_iter = all_prefetches_.find(prefetch_container_key); - if (prefetch_iter != all_prefetches_.end()) { - all_prefetches_.erase(prefetch_iter); - } -} - -void PrefetchService::EvictPrefetch( - const PrefetchContainer::Key& prefetch_container_key) { - DCHECK(PrefetchNewLimitsEnabled()); - DCHECK(base::Contains(owned_prefetches_, prefetch_container_key)); - base::WeakPtr<PrefetchContainer> prefetch_container = - owned_prefetches_[prefetch_container_key]->GetWeakPtr(); - DCHECK(prefetch_container); - prefetch_container->SetPrefetchStatus(PrefetchStatus::kPrefetchEvicted); - ResetPrefetch(prefetch_container); + owned_prefetches_.erase(it); } void PrefetchService::OnCandidatesUpdated() { @@ -1038,7 +1016,9 @@ } if (prefetch_to_evict) { - EvictPrefetch(prefetch_to_evict->GetPrefetchContainerKey()); + DCHECK(PrefetchNewLimitsEnabled()); + prefetch_to_evict->SetPrefetchStatus(PrefetchStatus::kPrefetchEvicted); + ResetPrefetch(prefetch_to_evict); } active_prefetches_.insert(prefetch_container->GetPrefetchContainerKey()); @@ -1412,11 +1392,6 @@ ss << *entry.second << std::endl; } - ss << "All:" << std::endl; - for (const auto& entry : all_prefetches_) { - ss << *entry.second << std::endl; - } - DVLOG(1) << ss.str(); #endif // DCHECK_IS_ON() } @@ -1430,12 +1405,12 @@ DVLOG(1) << "PrefetchService::FindPrefetchContainerToServe(" << key << ")"; // Search for an exact or No-Vary-Search match first. no_vary_search::IterateCandidates( - key, all_prefetches_, + key, owned_prefetches_, base::BindRepeating( [](const PrefetchContainer::Key& key, std::vector<PrefetchContainer*>* matches, std::vector<PrefetchContainer*>* hint_matches, - base::WeakPtr<PrefetchContainer> prefetch_container, + const std::unique_ptr<PrefetchContainer>& prefetch_container, no_vary_search::MatchType match_type) { switch (match_type) { case no_vary_search::MatchType::kExact: @@ -1493,14 +1468,14 @@ base::WeakPtr<PrefetchContainer> PrefetchService::MatchUrl( const PrefetchContainer::Key& key) const { - return no_vary_search::MatchUrl(key, all_prefetches_); + return no_vary_search::MatchUrl(key, owned_prefetches_); } std::vector<std::pair<GURL, base::WeakPtr<PrefetchContainer>>> PrefetchService::GetAllForUrlWithoutRefAndQueryForTesting( const PrefetchContainer::Key& key) const { return no_vary_search::GetAllForUrlWithoutRefAndQueryForTesting( - key, all_prefetches_); + key, owned_prefetches_); } PrefetchService::HandlePrefetchContainerResult @@ -1794,7 +1769,7 @@ int num_matching_prefetch_same_referrer = 0; int num_matching_prefetch_same_rfh = 0; - for (const auto& prefetch_iter : all_prefetches_) { + for (const auto& prefetch_iter : owned_prefetches_) { if (prefetch_iter.second && prefetch_iter.second->GetURL() == prefetch_container->GetURL()) { matching_prefetch = true;
diff --git a/content/browser/preloading/prefetch/prefetch_service.h b/content/browser/preloading/prefetch/prefetch_service.h index 7510d9f7..a7ca74f 100644 --- a/content/browser/preloading/prefetch/prefetch_service.h +++ b/content/browser/preloading/prefetch/prefetch_service.h
@@ -109,16 +109,6 @@ void AddPrefetchContainer( std::unique_ptr<PrefetchContainer> prefetch_container); - // Removes the prefetch with the given |prefetch_container_key| from - // |all_prefetches_|. - void RemovePrefetch(const PrefetchContainer::Key& prefetch_container_key); - - // Destroys the prefetch with the given |prefetch_container_key|. Called - // to remove a prefetch when making room for a new prefetch, and sets the - // status to |PrefetchStatus::kPrefetchEvicted| before destruction to record - // this. - void EvictPrefetch(const PrefetchContainer::Key& prefetch_container_key); - void ResetPrefetch(base::WeakPtr<PrefetchContainer> prefetch_container); // Called by PrefetchDocumentManager when it finishes processing the latest @@ -341,7 +331,7 @@ PrefetchContainer& prefetch_container, PrefetchMatchResolver& prefetch_match_resolver); - // Checks if there is a prefetch in |all_prefetches_| with the same URL as + // Checks if there is a prefetch in |owned_prefetches_| with the same URL as // |prefetch_container| but from a different referring RenderFrameHost. // Records the result to a UMA histogram. void RecordExistingPrefetchWithMatchingURL( @@ -362,10 +352,6 @@ // The origin prober class which manages all logic for origin probing. std::unique_ptr<PrefetchOriginProber> origin_prober_; - // All prefetches associated with |this| regardless of ownership. - std::map<PrefetchContainer::Key, base::WeakPtr<PrefetchContainer>> - all_prefetches_; - // A FIFO queue of prefetches that have been confirmed to be eligible but have // not started yet. std::vector<base::WeakPtr<PrefetchContainer>> prefetch_queue_;
diff --git a/content/browser/preloading/preloading_config.h b/content/browser/preloading/preloading_config.h index 8d40411b..e72938bc 100644 --- a/content/browser/preloading/preloading_config.h +++ b/content/browser/preloading/preloading_config.h
@@ -8,7 +8,7 @@ #include <base/no_destructor.h> #include "base/containers/flat_map.h" #include "base/feature_list.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/values.h" #include "content/public/browser/preloading.h"
diff --git a/content/browser/renderer_host/media/media_devices_manager.cc b/content/browser/renderer_host/media/media_devices_manager.cc index d9a419b3..d2953f3 100644 --- a/content/browser/renderer_host/media/media_devices_manager.cc +++ b/content/browser/renderer_host/media/media_devices_manager.cc
@@ -29,6 +29,7 @@ #include "content/browser/media/media_devices_permission_checker.h" #include "content/browser/renderer_host/media/media_stream_manager.h" #include "content/browser/renderer_host/media/video_capture_manager.h" +#include "content/browser/renderer_host/render_frame_host_impl.h" #include "content/common/features.h" #include "content/public/browser/audio_service.h" #include "content/public/browser/browser_task_traits.h" @@ -174,6 +175,46 @@ "Media.MediaDevicesManager.VideoDeviceEnumeration.Result", result_code); } +BrowserContext* GetBrowserContextOnUIThread( + GlobalRenderFrameHostId render_frame_host_id) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); + auto* rfh = RenderFrameHostImpl::FromID(render_frame_host_id); + if (!rfh) { + return nullptr; + } + return rfh->GetBrowserContext(); +} + +void RankDevices(GlobalRenderFrameHostId render_frame_host_id, + const MediaDevicesManager::BoolDeviceTypes& requested_types, + const MediaDeviceEnumeration& enumeration, + base::OnceCallback<void(MediaDeviceEnumeration)> callback) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); + + auto* browser_context = GetBrowserContextOnUIThread(render_frame_host_id); + if (!browser_context) { + std::move(callback).Run(enumeration); + return; + } + + ContentBrowserClient* content_client_browser = GetContentClient()->browser(); + auto ranked_enumeration = enumeration; + + if (requested_types[static_cast<size_t>(MediaDeviceType::kMediaAudioInput)]) { + content_client_browser->PreferenceRankAudioDeviceInfos( + browser_context, ranked_enumeration[static_cast<size_t>( + MediaDeviceType::kMediaAudioInput)]); + } + + if (requested_types[static_cast<size_t>(MediaDeviceType::kMediaVideoInput)]) { + content_client_browser->PreferenceRankVideoDeviceInfos( + browser_context, ranked_enumeration[static_cast<size_t>( + MediaDeviceType::kMediaVideoInput)]); + } + + std::move(callback).Run(ranked_enumeration); +} + } // namespace std::string GuessVideoGroupID(const blink::WebMediaDeviceInfoArray& audio_infos, @@ -682,13 +723,14 @@ requested_types, render_frame_host_id.child_id, render_frame_host_id.frame_routing_id, base::BindOnce(&MediaDevicesManager::OnPermissionsCheckDone, - weak_factory_.GetWeakPtr(), requested_types, - request_video_input_capabilities, + weak_factory_.GetWeakPtr(), render_frame_host_id, + requested_types, request_video_input_capabilities, request_audio_input_capabilities, std::move(callback), std::move(salt_and_origin))); } void MediaDevicesManager::OnPermissionsCheckDone( + GlobalRenderFrameHostId render_frame_host_id, const MediaDevicesManager::BoolDeviceTypes& requested_types, bool request_video_input_capabilities, bool request_audio_input_capabilities, @@ -717,13 +759,14 @@ EnumerateDevices( internal_requested_types, base::BindOnce(&MediaDevicesManager::OnDevicesEnumerated, - weak_factory_.GetWeakPtr(), requested_types, - request_video_input_capabilities, + weak_factory_.GetWeakPtr(), render_frame_host_id, + requested_types, request_video_input_capabilities, request_audio_input_capabilities, std::move(callback), std::move(salt_and_origin), has_permissions)); } void MediaDevicesManager::OnDevicesEnumerated( + GlobalRenderFrameHostId render_frame_host_id, const MediaDevicesManager::BoolDeviceTypes& requested_types, bool request_video_input_capabilities, bool request_audio_input_capabilities, @@ -733,6 +776,27 @@ const MediaDeviceEnumeration& enumeration) { DCHECK_CURRENTLY_ON(BrowserThread::IO); + GetUIThreadTaskRunner()->PostTask( + FROM_HERE, + base::BindOnce( + &RankDevices, render_frame_host_id, requested_types, enumeration, + base::BindPostTaskToCurrentDefault(base::BindOnce( + &MediaDevicesManager::OnDevicesRanked, weak_factory_.GetWeakPtr(), + requested_types, request_video_input_capabilities, + request_audio_input_capabilities, std::move(callback), + std::move(salt_and_origin), has_permissions)))); +} + +void MediaDevicesManager::OnDevicesRanked( + const MediaDevicesManager::BoolDeviceTypes& requested_types, + bool request_video_input_capabilities, + bool request_audio_input_capabilities, + EnumerateDevicesCallback callback, + const MediaDeviceSaltAndOrigin& salt_and_origin, + const MediaDevicesManager::BoolDeviceTypes& has_permissions, + MediaDeviceEnumeration ranked_enumeration) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + const bool video_input_capabilities_requested = has_permissions[static_cast<size_t>(MediaDeviceType::kMediaVideoInput)] && request_video_input_capabilities; @@ -747,7 +811,7 @@ if (!requested_types[i]) continue; - for (const auto& device_info : enumeration[i]) { + for (const auto& device_info : ranked_enumeration[i]) { if (!has_permissions[i] && !translation[i].empty()) { break; } @@ -757,9 +821,9 @@ } } - GetAudioInputCapabilities(video_input_capabilities_requested, - audio_input_capabilities_requested, - std::move(callback), enumeration, translation); + GetAudioInputCapabilities( + video_input_capabilities_requested, audio_input_capabilities_requested, + std::move(callback), ranked_enumeration, translation); } void MediaDevicesManager::GetAudioInputCapabilities( @@ -1219,17 +1283,41 @@ permission_checker_->CheckPermission( type, render_frame_host_id.child_id, render_frame_host_id.frame_routing_id, - base::BindOnce(&MediaDevicesManager::NotifyDeviceChange, - weak_factory_.GetWeakPtr(), subscription_id, type, - device_infos, salt_and_origin)); + base::BindOnce(&MediaDevicesManager::OnCheckedPermissionForDeviceChange, + weak_factory_.GetWeakPtr(), subscription_id, + render_frame_host_id, type, device_infos, + salt_and_origin)); +} + +void MediaDevicesManager::OnCheckedPermissionForDeviceChange( + uint32_t subscription_id, + GlobalRenderFrameHostId render_frame_host_id, + MediaDeviceType type, + const blink::WebMediaDeviceInfoArray& device_infos, + const MediaDeviceSaltAndOrigin& salt_and_origin, + bool has_permission) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + MediaDevicesManager::BoolDeviceTypes requested_types; + requested_types[static_cast<size_t>(type)] = true; + MediaDeviceEnumeration enumeration; + enumeration[static_cast<size_t>(type)] = device_infos; + + GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, + base::BindOnce(&RankDevices, render_frame_host_id, requested_types, + enumeration, + base::BindPostTaskToCurrentDefault(base::BindOnce( + &MediaDevicesManager::NotifyDeviceChange, + weak_factory_.GetWeakPtr(), subscription_id, type, + salt_and_origin, has_permission)))); } void MediaDevicesManager::NotifyDeviceChange( uint32_t subscription_id, MediaDeviceType type, - const blink::WebMediaDeviceInfoArray& device_infos, const MediaDeviceSaltAndOrigin& salt_and_origin, - bool has_permission) { + bool has_permission, + MediaDeviceEnumeration enumeration) { DCHECK_CURRENTLY_ON(BrowserThread::IO); DCHECK(blink::IsValidMediaDeviceType(type)); auto it = subscriptions_.find(subscription_id); @@ -1241,8 +1329,9 @@ const SubscriptionRequest& request = it->second; request.listener_->OnDevicesChanged( - type, TranslateMediaDeviceInfoArray(has_permission, salt_and_origin, - device_infos)); + type, + TranslateMediaDeviceInfoArray(has_permission, salt_and_origin, + enumeration[static_cast<size_t>(type)])); } MediaDevicesManager::EnumerationState::EnumerationState() = default;
diff --git a/content/browser/renderer_host/media/media_devices_manager.h b/content/browser/renderer_host/media/media_devices_manager.h index 5ae7d630..5cc57b6 100644 --- a/content/browser/renderer_host/media/media_devices_manager.h +++ b/content/browser/renderer_host/media/media_devices_manager.h
@@ -231,6 +231,7 @@ EnumerateDevicesCallback callback, const MediaDeviceSaltAndOrigin& salt_and_origin); void OnPermissionsCheckDone( + GlobalRenderFrameHostId render_frame_host_id, const MediaDevicesManager::BoolDeviceTypes& requested_types, bool request_video_input_capabilities, bool request_audio_input_capabilities, @@ -238,6 +239,7 @@ const MediaDeviceSaltAndOrigin& salt_and_origin, const MediaDevicesManager::BoolDeviceTypes& has_permissions); void OnDevicesEnumerated( + GlobalRenderFrameHostId render_frame_host_id, const MediaDevicesManager::BoolDeviceTypes& requested_types, bool request_video_input_capabilities, bool request_audio_input_capabilities, @@ -245,6 +247,14 @@ const MediaDeviceSaltAndOrigin& salt_and_origin, const MediaDevicesManager::BoolDeviceTypes& has_permissions, const MediaDeviceEnumeration& enumeration); + void OnDevicesRanked( + const MediaDevicesManager::BoolDeviceTypes& requested_types, + bool request_video_input_capabilities, + bool request_audio_input_capabilities, + EnumerateDevicesCallback callback, + const MediaDeviceSaltAndOrigin& salt_and_origin, + const MediaDevicesManager::BoolDeviceTypes& has_permissions, + MediaDeviceEnumeration ranked_enumeration); void GetAudioInputCapabilities( bool request_video_input_capabilities, bool request_audio_input_capabilities, @@ -305,11 +315,18 @@ MediaDeviceType type, const blink::WebMediaDeviceInfoArray& device_infos, const MediaDeviceSaltAndOrigin& salt_and_origin); + void OnCheckedPermissionForDeviceChange( + uint32_t subscription_id, + GlobalRenderFrameHostId render_frame_host_id, + MediaDeviceType type, + const blink::WebMediaDeviceInfoArray& device_infos, + const MediaDeviceSaltAndOrigin& salt_and_origin, + bool has_permission); void NotifyDeviceChange(uint32_t subscription_id, MediaDeviceType type, - const blink::WebMediaDeviceInfoArray& device_infos, const MediaDeviceSaltAndOrigin& salt_and_origin, - bool has_permission); + bool has_permission, + MediaDeviceEnumeration enumeration); #if BUILDFLAG(IS_MAC) void StartMonitoringOnUIThread();
diff --git a/content/browser/renderer_host/media/media_devices_manager_unittest.cc b/content/browser/renderer_host/media/media_devices_manager_unittest.cc index 9c0cf69..3f18975 100644 --- a/content/browser/renderer_host/media/media_devices_manager_unittest.cc +++ b/content/browser/renderer_host/media/media_devices_manager_unittest.cc
@@ -15,6 +15,7 @@ #include "base/run_loop.h" #include "base/strings/string_number_conversions.h" #include "base/task/single_thread_task_runner.h" +#include "base/test/bind.h" #include "base/test/metrics/histogram_tester.h" #include "build/build_config.h" #include "content/browser/media/media_devices_permission_checker.h" @@ -22,6 +23,8 @@ #include "content/browser/renderer_host/media/mock_video_capture_provider.h" #include "content/browser/renderer_host/media/video_capture_manager.h" #include "content/public/test/browser_task_environment.h" +#include "content/public/test/test_browser_context.h" +#include "content/test/test_web_contents.h" #include "media/audio/audio_device_name.h" #include "media/audio/audio_system_impl.h" #include "media/audio/fake_audio_log_factory.h" @@ -73,6 +76,22 @@ /*has_focus=*/true, /*is_background=*/false)); } +std::string GetAudioDeviceName(size_t suffix) { + return "fake_device_name_" + base::NumberToString(suffix); +} + +std::string GetAudioDeviceId(size_t suffix) { + return "fake_device_id_" + base::NumberToString(suffix); +} + +std::string GetVideoDeviceName(size_t suffix) { + return "fake_device_" + base::NumberToString(suffix); +} + +std::string GetVideoDeviceId(size_t suffix) { + return "/dev/video" + base::NumberToString(suffix); +} + // This class mocks the audio manager and overrides some methods to ensure that // we can run simulate device changes. class MockAudioManager : public media::FakeAudioManager { @@ -114,7 +133,7 @@ size_t num_devices_to_create = num_input_devices_; size_t start_id_trailer = 0; while (num_devices_to_create > 0) { - size_t trailer = ++start_id_trailer; + size_t trailer = start_id_trailer++; std::string id("fake_device_id_" + base::NumberToString(trailer)); if (base::Contains(removed_input_audio_device_ids_, id)) continue; @@ -281,12 +300,26 @@ #endif }; +class MockBrowserClient : public ContentBrowserClient { + public: + MOCK_METHOD(void, + PreferenceRankAudioDeviceInfos, + (BrowserContext * browser_context, + blink::WebMediaDeviceInfoArray& infos), + (override)); + MOCK_METHOD(void, + PreferenceRankVideoDeviceInfos, + (BrowserContext * browser_context, + blink::WebMediaDeviceInfoArray& infos), + (override)); +}; + } // namespace class MediaDevicesManagerTest : public ::testing::Test { public: MediaDevicesManagerTest() - : task_environment_(content::BrowserTaskEnvironment::IO_MAINLOOP) {} + : task_environment_(BrowserTaskEnvironment::IO_MAINLOOP) {} MediaDevicesManagerTest(const MediaDevicesManagerTest&) = delete; MediaDevicesManagerTest& operator=(const MediaDevicesManagerTest&) = delete; @@ -360,6 +393,7 @@ protected: void SetUp() override { + SetBrowserClientForTesting(&browser_client_); audio_manager_ = std::make_unique<MockAudioManager>(); audio_system_ = std::make_unique<media::AudioSystemImpl>(audio_manager_.get()); @@ -421,6 +455,12 @@ DeviceEnumerationResult::kUnknownError, error_count); } + void InitializeRenderFrameHost() { + web_contents_ = TestWebContents::Create( + &browser_context_, SiteInstanceImpl::Create(&browser_context_)); + render_frame_host_ = web_contents_->GetPrimaryMainFrame(); + } + // Must outlive MediaDevicesManager as ~MediaDevicesManager() verifies it's // running on the IO thread. BrowserTaskEnvironment task_environment_; @@ -438,6 +478,11 @@ std::unique_ptr<InProcessVideoCaptureProvider> in_process_video_capture_provider_; HistogramTester histogram_tester_; + RenderViewHostTestEnabler rvh_test_enabler_; + TestBrowserContext browser_context_; + std::unique_ptr<TestWebContents> web_contents_; + raw_ptr<TestRenderFrameHost> render_frame_host_; + MockBrowserClient browser_client_; }; TEST_F(MediaDevicesManagerTest, EnumerateNoCacheAudioInput) { @@ -523,6 +568,89 @@ } } +TEST_F(MediaDevicesManagerTest, EnumerateNoCacheAudioInputRanked) { + InitializeRenderFrameHost(); + EXPECT_CALL(*audio_manager_, MockGetAudioInputDeviceNames(_)) + .Times(kNumCalls); + EXPECT_CALL(media_devices_manager_client_, InputDevicesChangedUI(_, _)); + const size_t kNumDevices = 3; + audio_manager_->SetNumAudioInputDevices(kNumDevices); + MediaDevicesManager::BoolDeviceTypes devices_to_enumerate; + devices_to_enumerate[static_cast<size_t>(MediaDeviceType::kMediaAudioInput)] = + true; + + blink::WebMediaDeviceInfoArray audio_devices; + for (size_t i = 0; i < kNumDevices; ++i) { + audio_devices.emplace_back(GetAudioDeviceId(i), GetAudioDeviceName(i), + /*group_id=*/""); + } + + for (int i = 0; i < kNumCalls; i++) { + EXPECT_CALL(browser_client_, PreferenceRankAudioDeviceInfos( + &browser_context_, audio_devices)); + base::RunLoop run_loop; + media_devices_manager_->EnumerateDevices( + render_frame_host_->GetGlobalId(), devices_to_enumerate, + /*request_video_input_capabilities=*/false, + /*request_audio_input_capabilities=*/true, + base::BindLambdaForTesting( + [&run_loop, kNumDevices]( + const std::vector<blink::WebMediaDeviceInfoArray>& devices, + std::vector<VideoInputDeviceCapabilitiesPtr> video_capabilities, + std::vector<AudioInputDeviceCapabilitiesPtr> + audio_capabilities) { + ASSERT_EQ(kNumDevices, + devices[static_cast<size_t>( + MediaDeviceType::kMediaAudioInput)] + .size()); + + run_loop.Quit(); + })); + run_loop.Run(); + } +} + +TEST_F(MediaDevicesManagerTest, EnumerateNoCacheVideoInputRanked) { + InitializeRenderFrameHost(); + EXPECT_CALL(*video_capture_device_factory_, MockGetDevicesInfo()) + .Times(kNumCalls); + EXPECT_CALL(media_devices_manager_client_, InputDevicesChangedUI(_, _)) + .Times(2); + const size_t kNumDevices = 3; + video_capture_device_factory_->SetToDefaultDevicesConfig(kNumDevices); + MediaDevicesManager::BoolDeviceTypes devices_to_enumerate; + devices_to_enumerate[static_cast<size_t>(MediaDeviceType::kMediaVideoInput)] = + true; + + blink::WebMediaDeviceInfoArray video_devices; + for (size_t i = 0; i < kNumDevices; ++i) { + video_devices.emplace_back(media::VideoCaptureDeviceDescriptor{ + GetVideoDeviceName(i), GetVideoDeviceId(i)}); + } + + for (int i = 0; i < kNumCalls; i++) { + base::RunLoop run_loop; + EXPECT_CALL(browser_client_, PreferenceRankVideoDeviceInfos( + &browser_context_, video_devices)); + media_devices_manager_->EnumerateDevices( + render_frame_host_->GetGlobalId(), devices_to_enumerate, true, false, + base::BindLambdaForTesting( + [&run_loop, kNumDevices]( + const std::vector<blink::WebMediaDeviceInfoArray>& devices, + std::vector<VideoInputDeviceCapabilitiesPtr> video_capabilities, + std::vector<AudioInputDeviceCapabilitiesPtr> + audio_capabilities) { + ASSERT_EQ(kNumDevices, + devices[static_cast<size_t>( + MediaDeviceType::kMediaVideoInput)] + .size()); + + run_loop.Quit(); + })); + run_loop.Run(); + } +} + TEST_F(MediaDevicesManagerTest, EnumerateCacheAudio) { EXPECT_CALL(*audio_manager_, MockGetAudioInputDeviceNames(_)).Times(1); EXPECT_CALL(*video_capture_device_factory_, MockGetDevicesInfo()).Times(0); @@ -871,6 +999,8 @@ base::Unretained(this), &run_loop)); run_loop.Run(); + InitializeRenderFrameHost(); + // Add device-change event listeners. MockMediaDevicesListener listener_audio_input; MediaDevicesManager::BoolDeviceTypes audio_input_devices_to_subscribe; @@ -1052,6 +1182,9 @@ true; devices_to_enumerate[static_cast<size_t>(MediaDeviceType::kMediaAudioInput)] = true; + + InitializeRenderFrameHost(); + base::RunLoop run_loop; media_devices_manager_->EnumerateDevices( {-1, -1}, devices_to_enumerate, true, true, @@ -1294,6 +1427,8 @@ base::Unretained(this), &run_loop)); run_loop.Run(); + InitializeRenderFrameHost(); + // Add device-change event listener. MockMediaDevicesListener listener_video_input; MediaDevicesManager::BoolDeviceTypes video_input_devices_to_subscribe;
diff --git a/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate_unittest.cc b/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate_unittest.cc index 8b18ea7e..a533c73 100644 --- a/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate_unittest.cc +++ b/content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate_unittest.cc
@@ -4,34 +4,19 @@ #include "content/browser/renderer_host/renderer_sandboxed_process_launcher_delegate.h" -#include "base/test/scoped_feature_list.h" -#include "build/build_config.h" +#include "base/win/windows_version.h" #include "sandbox/policy/features.h" #include "sandbox/policy/switches.h" -#include "testing/gmock/include/gmock/gmock.h" -#include "testing/gtest/include/gtest/gtest.h" - -#if BUILDFLAG(IS_WIN) -#include "base/win/windows_version.h" #include "sandbox/policy/win/sandbox_policy_feature_test.h" #include "sandbox/policy/win/sandbox_win.h" #include "sandbox/win/src/app_container_base.h" #include "sandbox/win/src/sandbox_factory.h" #include "sandbox/win/src/sandbox_policy.h" #include "sandbox/win/src/sandbox_policy_base.h" -#endif +#include "testing/gtest/include/gtest/gtest.h" -using ::testing::_; -using ::testing::Return; +namespace content::sandbox::policy { -using ::testing::ElementsAre; -using ::testing::Pair; - -namespace content { -namespace sandbox { -namespace policy { - -#if BUILDFLAG(IS_WIN) class RendererFeatureSandboxWinTest : public ::sandbox::policy::SandboxFeatureTest { public: @@ -51,8 +36,6 @@ return SandboxFeatureTest::GetExpectedMitigationFlags() | ::sandbox::MITIGATION_CET_DISABLED; } - - base::test::ScopedFeatureList feature_list_; }; TEST_P(RendererFeatureSandboxWinTest, RendererGeneratedPolicyTest) { @@ -83,8 +66,5 @@ ::testing::Combine( /* renderer app container feature */ ::testing::Bool(), /* ktm mitigation feature */ ::testing::Bool())); -#endif -} // namespace policy -} // namespace sandbox -} // namespace content +} // namespace content::sandbox::policy
diff --git a/content/browser/screen_details/screen_details_browsertest.cc b/content/browser/screen_details/screen_details_browsertest.cc index f189b71d..868db4ab 100644 --- a/content/browser/screen_details/screen_details_browsertest.cc +++ b/content/browser/screen_details/screen_details_browsertest.cc
@@ -72,12 +72,17 @@ test_shell_ = CreateBrowser(); } + void TearDownOnMainThread() override { + test_shell_ = nullptr; + ScreenDetailsTest::TearDownOnMainThread(); + } + display::ScreenBase* screen() { return &screen_; } Shell* test_shell() { return test_shell_; } private: display::ScreenBase screen_; - raw_ptr<Shell, DanglingUntriaged> test_shell_ = nullptr; + raw_ptr<Shell> test_shell_ = nullptr; }; // TODO(crbug.com/1042990): Windows crashes static casting to ScreenWin.
diff --git a/content/browser/shared_storage/shared_storage_url_loader_factory_proxy.h b/content/browser/shared_storage/shared_storage_url_loader_factory_proxy.h index 06f117c..dcc9e7f 100644 --- a/content/browser/shared_storage/shared_storage_url_loader_factory_proxy.h +++ b/content/browser/shared_storage/shared_storage_url_loader_factory_proxy.h
@@ -8,7 +8,7 @@ #include <stdint.h> #include "base/functional/callback_forward.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "content/common/content_export.h" #include "mojo/public/cpp/bindings/pending_receiver.h" #include "mojo/public/cpp/bindings/pending_remote.h"
diff --git a/content/browser/startup_helper.cc b/content/browser/startup_helper.cc index 6255fde..8b887900 100644 --- a/content/browser/startup_helper.cc +++ b/content/browser/startup_helper.cc
@@ -24,8 +24,10 @@ std::unique_ptr<base::FieldTrialList> SetUpFieldTrialsAndFeatureList() { std::unique_ptr<base::FieldTrialList> field_trial_list; - if (!base::FieldTrialList::GetInstance()) + if (!base::FieldTrialList::GetInstance()) { field_trial_list = std::make_unique<base::FieldTrialList>(); + } + const base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc index 42dd8d0a247..da43973 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc
@@ -36,7 +36,7 @@ #include "base/observer_list.h" #include "base/process/process.h" #include "base/ranges/algorithm.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/strings/string_split.h" #include "base/strings/string_util.h" #include "base/strings/stringprintf.h"
diff --git a/content/browser/web_package/signed_exchange_certificate_chain.h b/content/browser/web_package/signed_exchange_certificate_chain.h index 17079c28..e3fa9465 100644 --- a/content/browser/web_package/signed_exchange_certificate_chain.h +++ b/content/browser/web_package/signed_exchange_certificate_chain.h
@@ -10,7 +10,7 @@ #include "base/containers/span.h" #include "base/gtest_prod_util.h" #include "base/memory/scoped_refptr.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "content/browser/web_package/signed_exchange_consts.h" #include "content/common/content_export.h" #include "services/network/public/cpp/spki_hash_set.h"
diff --git a/content/browser/xr/service/xr_runtime_manager_unittest.cc b/content/browser/xr/service/xr_runtime_manager_unittest.cc index 2fafc83..0779480 100644 --- a/content/browser/xr/service/xr_runtime_manager_unittest.cc +++ b/content/browser/xr/service/xr_runtime_manager_unittest.cc
@@ -43,6 +43,7 @@ } void TearDown() override { + ClearProvider(); DropRuntimeManagerRef(); EXPECT_EQ(XRRuntimeManager::GetInstanceIfCreated(), nullptr); } @@ -84,8 +85,10 @@ // reference counting behavior of the XRRuntimeManagerImpl singleton. void DropRuntimeManagerRef() { xr_runtime_manager_ = nullptr; } + void ClearProvider() { provider_ = nullptr; } + private: - raw_ptr<device::FakeVRDeviceProvider, DanglingUntriaged> provider_ = nullptr; + raw_ptr<device::FakeVRDeviceProvider> provider_ = nullptr; scoped_refptr<XRRuntimeManagerImpl> xr_runtime_manager_; }; @@ -124,6 +127,7 @@ EXPECT_EQ(1u, ServiceCount()); service_2.reset(); + ClearProvider(); DropRuntimeManagerRef(); EXPECT_EQ(XRRuntimeManager::GetInstanceIfCreated(), nullptr); }
diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc index 06027ff..2f996a2 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc
@@ -1654,4 +1654,11 @@ video_effects_manager) {} #endif // !BUILDFLAG(IS_ANDROID) +void ContentBrowserClient::PreferenceRankAudioDeviceInfos( + BrowserContext* browser_context, + blink::WebMediaDeviceInfoArray& infos) {} +void ContentBrowserClient::PreferenceRankVideoDeviceInfos( + BrowserContext* browser_context, + blink::WebMediaDeviceInfoArray& infos) {} + } // namespace content
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h index 8b94386..ab361d0 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h
@@ -17,7 +17,7 @@ #include "base/containers/flat_set.h" #include "base/functional/callback_forward.h" #include "base/memory/scoped_refptr.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/time/time.h" #include "base/types/strong_alias.h" #include "base/values.h" @@ -63,6 +63,7 @@ #include "services/network/public/mojom/websocket.mojom-forward.h" #include "storage/browser/file_system/file_system_context.h" #include "third_party/abseil-cpp/absl/types/optional.h" +#include "third_party/blink/public/common/mediastream/media_devices.h" #include "third_party/blink/public/common/permissions_policy/permissions_policy.h" #include "third_party/blink/public/common/user_agent/user_agent_metadata.h" #include "third_party/blink/public/mojom/browsing_topics/browsing_topics.mojom-forward.h" @@ -2727,6 +2728,18 @@ mojo::PendingReceiver<video_capture::mojom::VideoEffectsManager> video_effects_manager); #endif // !BUILDFLAG(IS_ANDROID) + + // Re-order audio device `infos` based on user preference. The ordering will + // be from most preferred to least preferred. + virtual void PreferenceRankVideoDeviceInfos( + BrowserContext* browser_context, + blink::WebMediaDeviceInfoArray& infos); + + // Re-order video device `infos` based on user preference. The ordering will + // be from most preferred to least preferred. + virtual void PreferenceRankAudioDeviceInfos( + BrowserContext* browser_context, + blink::WebMediaDeviceInfoArray& infos); }; } // namespace content
diff --git a/content/public/browser/mojo_binder_policy_map.h b/content/public/browser/mojo_binder_policy_map.h index fa01509a..1c92eed 100644 --- a/content/public/browser/mojo_binder_policy_map.h +++ b/content/public/browser/mojo_binder_policy_map.h
@@ -6,7 +6,7 @@ #define CONTENT_PUBLIC_BROWSER_MOJO_BINDER_POLICY_MAP_H_ #include "base/check_op.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "content/common/content_export.h" namespace content {
diff --git a/content/renderer/render_frame_impl_browsertest.cc b/content/renderer/render_frame_impl_browsertest.cc index db6b9397..3825fd0a 100644 --- a/content/renderer/render_frame_impl_browsertest.cc +++ b/content/renderer/render_frame_impl_browsertest.cc
@@ -56,7 +56,6 @@ #include "third_party/blink/public/platform/web_string.h" #include "third_party/blink/public/platform/web_url.h" #include "third_party/blink/public/platform/web_url_request.h" -#include "third_party/blink/public/test/test_web_frame_content_dumper.h" #include "third_party/blink/public/web/web_frame_widget.h" #include "third_party/blink/public/web/web_history_item.h" #include "third_party/blink/public/web/web_local_frame.h" @@ -1123,105 +1122,4 @@ EXPECT_FALSE(main_frame->delayed_state_sync_timer_.IsRunning()); } -namespace { - -// All content setting tests use the same data url, which contains html which -// has different behavior depending on whether script is enabled or disabled. -blink::mojom::CommonNavigationParamsPtr -GetCommonParamsForContentSettingsTest() { - const char kHtml[] = - "<html>" - "<noscript>JS_DISABLED</noscript>" - "<script>document.write('JS_ENABLED');</script>" - "</html>"; - std::string data_url_contents = "data:text/html,"; - data_url_contents += kHtml; - - auto common_params = blink::CreateCommonNavigationParams(); - common_params->url = GURL(data_url_contents); - return common_params; -} - -// Dump the layout tree and see whether it contains "text". -bool HasText(blink::WebLocalFrame* frame, const std::string& text) { - std::string layout_tree = - blink::TestWebFrameContentDumper::DumpLayoutTreeAsText( - frame, blink::TestWebFrameContentDumper::kLayoutAsTextNormal) - .Utf8(); - - return base::Contains(layout_tree, text); -} - -// Waits for the navigation to finish. -void NavigateAndWait(content::TestRenderFrame* frame, - blink::mojom::CommonNavigationParamsPtr common_params, - blink::mojom::CommitNavigationParamsPtr commit_params, - blink::WebView* web_view) { - FrameLoadWaiter waiter(frame); - frame->Navigate(std::move(common_params), std::move(commit_params)); - waiter.Wait(); -} - -} // namespace - -// Regression test for crbug.com/232410: Load a page with JS blocked. Then, -// allow JS and reload the page. In each case, only one of noscript or script -// tags should be enabled, but never both. -TEST_F(RenderFrameImplTest, ContentSettingsNoscriptTag) { - // Navigate to a URL with script disabled. - auto common_params = GetCommonParamsForContentSettingsTest(); - common_params->navigation_type = - blink::mojom::NavigationType::DIFFERENT_DOCUMENT; - blink::mojom::CommitNavigationParamsPtr commit_params = - blink::CreateCommitNavigationParams(); - commit_params->content_settings->allow_script = false; - content::TestRenderFrame* frame = - static_cast<TestRenderFrame*>(GetMainRenderFrame()); - - NavigateAndWait(frame, common_params->Clone(), commit_params->Clone(), - web_view_); - EXPECT_TRUE(HasText(GetMainFrame(), "JS_DISABLED")); - EXPECT_FALSE(HasText(GetMainFrame(), "JS_ENABLED")); - - // Reload the page but allow Javascript. - common_params->navigation_type = blink::mojom::NavigationType::RELOAD; - commit_params->content_settings->allow_script = true; - NavigateAndWait(frame, common_params->Clone(), commit_params->Clone(), - web_view_); - EXPECT_FALSE(HasText(GetMainFrame(), "JS_DISABLED")); - EXPECT_TRUE(HasText(GetMainFrame(), "JS_ENABLED")); -} - -// Checks that same document navigations don't update content settings for the -// page. -TEST_F(RenderFrameImplTest, ContentSettingsSameDocumentNavigation) { - // Load a page which contains a script. - auto common_params = GetCommonParamsForContentSettingsTest(); - common_params->navigation_type = - blink::mojom::NavigationType::DIFFERENT_DOCUMENT; - blink::mojom::CommitNavigationParamsPtr commit_params = - blink::CreateCommitNavigationParams(); - content::TestRenderFrame* frame = - static_cast<TestRenderFrame*>(GetMainRenderFrame()); - - NavigateAndWait(frame, common_params->Clone(), commit_params->Clone(), - web_view_); - - // Verify that the script was not blocked. - EXPECT_FALSE(HasText(GetMainFrame(), "JS_DISABLED")); - EXPECT_TRUE(HasText(GetMainFrame(), "JS_ENABLED")); - - RenderFrameImpl* main_frame = GetMainRenderFrame(); - - main_frame->DidFinishSameDocumentNavigation( - blink::kWebStandardCommit, - /*is_synchronously_committed=*/true, - blink::mojom::SameDocumentNavigationType::kFragment, - /*is_client_redirect=*/false); - - // Verify that the script was not blocked. - EXPECT_FALSE(HasText(GetMainFrame(), "JS_DISABLED")); - EXPECT_TRUE(HasText(GetMainFrame(), "JS_ENABLED")); -} - } // namespace content
diff --git a/content/shell/app/ios/web_tests_support_ios.mm b/content/shell/app/ios/web_tests_support_ios.mm index 10b2b32..b8dfd8e0 100644 --- a/content/shell/app/ios/web_tests_support_ios.mm +++ b/content/shell/app/ios/web_tests_support_ios.mm
@@ -18,6 +18,43 @@ static std::unique_ptr<content::ContentMainRunner> g_main_runner; static std::unique_ptr<content::ShellMainDelegate> g_main_delegate; +namespace { + +void PopulateUIWindow(UIWindow* window) { + window.backgroundColor = UIColor.whiteColor; + [window makeKeyAndVisible]; + CGRect bounds = UIScreen.mainScreen.bounds; + // Add a label to show the web test is running. + UILabel* label = [[UILabel alloc] initWithFrame:bounds]; + label.text = @"Running the web tests..."; + label.textAlignment = NSTextAlignmentCenter; + [window addSubview:label]; + + // An NSInternalInconsistencyException is thrown if the app doesn't have a + // root view controller. Set an empty one here. + window.rootViewController = [[UIViewController alloc] init]; +} + +} // namespace + +@interface WebTestAppSceneDelegate : UIResponder <UIWindowSceneDelegate> { + UIWindow* __strong _window; +} + +@end + +@implementation WebTestAppSceneDelegate + +- (void)scene:(UIScene*)scene + willConnectToSession:(UISceneSession*)session + options:(UISceneConnectionOptions*)connectionOptions { + _window = + [[UIWindow alloc] initWithWindowScene:static_cast<UIWindowScene*>(scene)]; + PopulateUIWindow(_window); +} + +@end + @interface WebTestApplication : UIApplication - (BOOL)isRunningTests; @end @@ -30,7 +67,9 @@ } @end -@interface WebTestDelegate : UIResponder <UIApplicationDelegate> +@interface WebTestDelegate : UIResponder <UIApplicationDelegate> { + UIWindow* __strong _window; +} @end @implementation WebTestDelegate @@ -42,6 +81,7 @@ UISceneConfiguration* configuration = [[UISceneConfiguration alloc] initWithName:nil sessionRole:connectingSceneSession.role]; + configuration.delegateClass = WebTestAppSceneDelegate.class; return configuration; }
diff --git a/content/shell/browser/shell_content_browser_client.cc b/content/shell/browser/shell_content_browser_client.cc index 35b1675..d667fad 100644 --- a/content/shell/browser/shell_content_browser_client.cc +++ b/content/shell/browser/shell_content_browser_client.cc
@@ -24,7 +24,7 @@ #include "base/no_destructor.h" #include "base/path_service.h" #include "base/strings/string_number_conversions.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/strings/string_split.h" #include "base/strings/utf_string_conversions.h" #include "base/threading/sequence_local_storage_slot.h"
diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn index 36c7885f..401517d9 100644 --- a/content/test/BUILD.gn +++ b/content/test/BUILD.gn
@@ -2651,7 +2651,6 @@ "../browser/renderer_host/render_widget_host_view_aura_unittest.cc", "../browser/renderer_host/render_widget_host_view_base_unittest.cc", "../browser/renderer_host/render_widget_host_view_child_frame_unittest.cc", - "../browser/renderer_host/renderer_sandboxed_process_launcher_delegate_unittest.cc", "../browser/renderer_host/transient_allow_popup_unittest.cc", "../browser/renderer_host/view_transition_commit_deferring_condition_unittest.cc", "../browser/renderer_host/visible_time_request_trigger_unittest.cc", @@ -2893,6 +2892,7 @@ if (is_win) { sources += [ "../browser/media/web_app_system_media_controls_manager_unittest.cc", + "../browser/renderer_host/renderer_sandboxed_process_launcher_delegate_unittest.cc", "../renderer/media/win/overlay_state_observer_impl_unittest.cc", ] } @@ -3127,7 +3127,6 @@ if (enable_ppapi) { sources += [ - "../browser/ppapi_plugin_sandboxed_process_launcher_delegate_unittest.cc", "../browser/renderer_host/pepper/browser_ppapi_host_test.cc", "../browser/renderer_host/pepper/browser_ppapi_host_test.h", "../browser/renderer_host/pepper/pepper_file_system_browser_host_unittest.cc", @@ -3140,6 +3139,9 @@ "../renderer/pepper/mock_resource.h", "../renderer/pepper/v8_var_converter_unittest.cc", ] + if (is_win) { + sources += [ "../browser/ppapi_plugin_sandboxed_process_launcher_delegate_unittest.cc" ] + } deps += [ "//ppapi/c", "//ppapi/host",
diff --git a/device/bluetooth/bluetooth_device.h b/device/bluetooth/bluetooth_device.h index c1d8dfe..8018776 100644 --- a/device/bluetooth/bluetooth_device.h +++ b/device/bluetooth/bluetooth_device.h
@@ -21,7 +21,7 @@ #include "base/gtest_prod_util.h" #include "base/memory/raw_ptr_exclusion.h" #include "base/memory/scoped_refptr.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/time/time.h" #include "build/build_config.h" #include "device/bluetooth/bluetooth_common.h"
diff --git a/device/bluetooth/bluetooth_pairing_winrt.h b/device/bluetooth/bluetooth_pairing_winrt.h index 202f964b..093ab41 100644 --- a/device/bluetooth/bluetooth_pairing_winrt.h +++ b/device/bluetooth/bluetooth_pairing_winrt.h
@@ -12,7 +12,7 @@ #include "base/memory/raw_ptr.h" #include "base/memory/weak_ptr.h" #include "base/sequence_checker.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "device/bluetooth/bluetooth_device.h" #include "third_party/abseil-cpp/absl/types/optional.h"
diff --git a/device/bluetooth/floss/bluetooth_adapter_floss.cc b/device/bluetooth/floss/bluetooth_adapter_floss.cc index 07454fd2b..755509ea 100644 --- a/device/bluetooth/floss/bluetooth_adapter_floss.cc +++ b/device/bluetooth/floss/bluetooth_adapter_floss.cc
@@ -688,6 +688,19 @@ // If default adapter isn't present, we need to clean up the dbus manager if (!present) { RemoveAdapter(); + return; + } + + if (FlossDBusManager::Get()->GetManagerClient()->GetAdapterEnabled(adapter) && + adapter != FlossDBusManager::Get()->GetActiveAdapter()) { + // If the adapter is already enabled in platform layer, defer the present + // changed until the clients are ready, so the observers could get the + // correct power state right after present. + FlossDBusManager::Get()->SwitchAdapter( + adapter, + base::BindOnce(&BluetoothAdapterFloss::OnAdapterClientsReady, + weak_ptr_factory_.GetWeakPtr(), /* enabled = */ true, + /* is_newly_present = */ true)); } else { // Notify observers PresentChanged(present); @@ -703,19 +716,22 @@ return; } - if (enabled && !FlossDBusManager::Get()->HasActiveAdapter()) { + if (enabled && adapter != FlossDBusManager::Get()->GetActiveAdapter()) { FlossDBusManager::Get()->SwitchAdapter( adapter, base::BindOnce(&BluetoothAdapterFloss::OnAdapterClientsReady, - weak_ptr_factory_.GetWeakPtr(), enabled)); + weak_ptr_factory_.GetWeakPtr(), enabled, + /* is_newly_present = */ false)); } else if (!enabled && FlossDBusManager::Get()->HasActiveAdapter()) { FlossDBusManager::Get()->SwitchAdapter( FlossDBusManager::kInvalidAdapter, base::BindOnce(&BluetoothAdapterFloss::OnAdapterClientsReady, - weak_ptr_factory_.GetWeakPtr(), enabled)); + weak_ptr_factory_.GetWeakPtr(), enabled, + /* is_newly_present = */ false)); } } -void BluetoothAdapterFloss::OnAdapterClientsReady(bool enabled) { +void BluetoothAdapterFloss::OnAdapterClientsReady(bool enabled, + bool is_newly_present) { if (enabled) { AddAdapterObservers(); PopulateInitialDevices(); @@ -734,6 +750,10 @@ RemoveAdapterObservers(); } + if (is_newly_present) { + PresentChanged(true); + } + NotifyAdapterPoweredChanged(enabled); }
diff --git a/device/bluetooth/floss/bluetooth_adapter_floss.h b/device/bluetooth/floss/bluetooth_adapter_floss.h index 46a9762..cc5b27c 100644 --- a/device/bluetooth/floss/bluetooth_adapter_floss.h +++ b/device/bluetooth/floss/bluetooth_adapter_floss.h
@@ -258,8 +258,10 @@ void AdapterPresent(int adapter, bool present) override; void AdapterEnabledChanged(int adapter, bool enabled) override; - // Complete adapter power changes after adapter clients are ready. - void OnAdapterClientsReady(bool enabled); + // Complete adapter present/enabled changes after adapter clients are ready. + // Invoke PresentChanged to the observers only when |is_newly_present| is + // true. + void OnAdapterClientsReady(bool enabled, bool is_newly_present); // Initialize observers for adapter dependent clients. We need to add + remove // these observers whenever we get a powered notification.
diff --git a/device/bluetooth/floss/floss_dbus_client.h b/device/bluetooth/floss/floss_dbus_client.h index 048ccde..fc34322 100644 --- a/device/bluetooth/floss/floss_dbus_client.h +++ b/device/bluetooth/floss/floss_dbus_client.h
@@ -151,6 +151,7 @@ namespace manager { inline constexpr char kStart[] = "Start"; inline constexpr char kStop[] = "Stop"; +inline constexpr char kGetAdapterEnabled[] = "GetAdapterEnabled"; inline constexpr char kGetFlossEnabled[] = "GetFlossEnabled"; inline constexpr char kSetFlossEnabled[] = "SetFlossEnabled"; inline constexpr char kGetState[] = "GetState";
diff --git a/device/bluetooth/floss/floss_manager_client.cc b/device/bluetooth/floss/floss_manager_client.cc index c29b30ad..f27b3d2 100644 --- a/device/bluetooth/floss/floss_manager_client.cc +++ b/device/bluetooth/floss/floss_manager_client.cc
@@ -181,7 +181,7 @@ } void FlossManagerClient::OnSetAdapterEnabled(DBusResult<Void> response) { - // Only handle error cases since non-error called in OnHciEnabledChange + // Only handle error cases since non-error called in OnHciEnabledChanged if (adapter_enabled_callback_ && !response.has_value()) { adapter_enabled_callback_->Run( base::unexpected(Error(kErrorNoResponse, ""))); @@ -237,6 +237,7 @@ // Make copy of old adapters and clear existing ones. auto previous_adapters = std::move(adapter_to_enabled_); adapter_to_enabled_.clear(); + adapter_present_pending_.clear(); // All old adapters need to be sent a `present = false` notification. for (auto& [adapter, enabled] : previous_adapters) { @@ -346,6 +347,7 @@ // Clear existing adapters. adapter_to_enabled_.clear(); + adapter_present_pending_.clear(); for (auto v : adapters.value()) { adapter_to_enabled_.insert({v.adapter, v.enabled}); } @@ -386,23 +388,82 @@ } } -void FlossManagerClient::OnHciDeviceChanged(int32_t adapter, bool present) { - for (auto& observer : observers_) { - observer.AdapterPresent(adapter, present); +void FlossManagerClient::HandleGetAdapterEnabledAfterPresent( + int32_t adapter, + DBusResult<bool> response) { + if (!base::Contains(adapter_present_pending_, adapter)) { + // We may have cleared the pending list in OnHciEnabledChanged. + return; + } + adapter_present_pending_.erase(adapter); + + if (!response.has_value()) { + LOG(ERROR) << "Floss manager GetAdapterEnabled returned error: " + << response.error(); + // Default to disabled if the call failed. + adapter_to_enabled_[adapter] = false; + } else { + adapter_to_enabled_[adapter] = response.value(); } - // Update the cached list of available adapters. - auto iter = adapter_to_enabled_.find(adapter); - if (present && iter == adapter_to_enabled_.end()) { - adapter_to_enabled_.insert({adapter, false}); - } else if (!present && iter != adapter_to_enabled_.end()) { - adapter_to_enabled_.erase(iter); + // Don't need to send out AdapterEnabledChanged as BluetoothAdapterFloss + // should query the state proactively. + for (auto& observer : observers_) { + // Always true because this function is only called when present is true. + observer.AdapterPresent(adapter, true); + } +} + +void FlossManagerClient::OnHciDeviceChanged(int32_t adapter, bool present) { + auto was_present = base::Contains(adapter_to_enabled_, adapter); + // Newly present + if (!was_present && present) { + if (!base::Contains(adapter_present_pending_, adapter)) { + // Defer the AdapterPresent event until we know the actual state. + adapter_present_pending_.insert(adapter); + CallManagerMethod<bool>( + base::BindOnce( + &FlossManagerClient::HandleGetAdapterEnabledAfterPresent, + weak_ptr_factory_.GetWeakPtr(), adapter), + manager::kGetAdapterEnabled, adapter); + } else { + LOG(WARNING) << "Unexpected OnHciDeviceChanged: adapter " << adapter + << " already pending"; + } + } + // Adapter disappeared + else if (was_present && !present) { + adapter_to_enabled_.erase(adapter); + for (auto& observer : observers_) { + observer.AdapterPresent(adapter, present); + } + } + // Adapter disappeared while pending, only need to clean up pending list + else if (!was_present && !present) { + auto res = adapter_present_pending_.erase(adapter); + if (res == 0) { + LOG(WARNING) << "Unexpected OnHciDeviceChanged: adapter " << adapter + << " present=" << present << " but not pending"; + } + } + // Already present + else if (was_present && present) { + LOG(WARNING) << "Unexpected OnHciDeviceChanged: adapter " << adapter + << " already present"; } } void FlossManagerClient::OnHciEnabledChanged(int32_t adapter, bool enabled) { adapter_to_enabled_[adapter] = enabled; + if (base::Contains(adapter_present_pending_, adapter)) { + // We haven't notified the presence for this adapter. Notify now. + adapter_present_pending_.erase(adapter); + for (auto& observer : observers_) { + observer.AdapterPresent(adapter, true); + } + } + for (auto& observer : observers_) { observer.AdapterEnabledChanged(adapter, enabled); }
diff --git a/device/bluetooth/floss/floss_manager_client.h b/device/bluetooth/floss/floss_manager_client.h index 317f2a12..c1cfd358 100644 --- a/device/bluetooth/floss/floss_manager_client.h +++ b/device/bluetooth/floss/floss_manager_client.h
@@ -9,6 +9,7 @@ #include <vector> #include "base/containers/flat_map.h" +#include "base/containers/flat_set.h" #include "base/functional/callback.h" #include "base/memory/raw_ptr.h" #include "base/memory/weak_ptr.h" @@ -175,6 +176,12 @@ void HandleGetAvailableAdapters( DBusResult<std::vector<internal::AdapterWithEnabled>> adapters); + // Handle response to |GetAdapterEnabled| DBus method call. + // Currently we only expect to handle |GetAdapterEnabled| calls when we get a + // notification that an adapter is present. + void HandleGetAdapterEnabledAfterPresent(int32_t adapter, + DBusResult<bool> response); + // Handle response to |RegisterCallback| DBus method call. void HandleRegisterCallback(DBusResult<Void> result); @@ -235,6 +242,9 @@ // index. base::flat_map<int, bool> adapter_to_enabled_; + // List of adapters that the enabled state is unknown, pending querying. + base::flat_set<int> adapter_present_pending_; + // Name of service that implements manager interface. std::string service_name_;
diff --git a/device/bluetooth/floss/floss_manager_client_unittest.cc b/device/bluetooth/floss/floss_manager_client_unittest.cc index fabc0c01..fdfba4f 100644 --- a/device/bluetooth/floss/floss_manager_client_unittest.cc +++ b/device/bluetooth/floss/floss_manager_client_unittest.cc
@@ -140,6 +140,8 @@ ::dbus::ObjectProxy::ResponseOrErrorCallback* cb) { if (method_call->GetMember() == manager::kGetAvailableAdapters) { HandleGetAvailableAdapters(method_call, timeout_ms, cb); + } else if (method_call->GetMember() == manager::kGetAdapterEnabled) { + HandleGetAdapterEnabled(method_call, timeout_ms, cb); } else if (method_call->GetMember() == manager::kSetFlossEnabled) { HandleSetFlossEnabled(method_call, timeout_ms, cb); } else if (method_call->GetMember() == manager::kGetFlossEnabled) { @@ -240,6 +242,16 @@ std::move(*cb).Run(response.get(), nullptr); } + void HandleGetAdapterEnabled( + ::dbus::MethodCall* method_call, + int timeout_ms, + ::dbus::ObjectProxy::ResponseOrErrorCallback* cb) { + auto response = ::dbus::Response::CreateEmpty(); + ::dbus::MessageWriter writer(response.get()); + writer.AppendBool(get_adapter_enabled_return_); + std::move(*cb).Run(response.get(), nullptr); + } + void HandleSetFlossEnabled(::dbus::MethodCall* method_call, int timeout_ms, ::dbus::ObjectProxy::ResponseOrErrorCallback* cb) { @@ -351,6 +363,8 @@ bool floss_enabled_target_ = true; uint32_t floss_api_version_ = 0x1234abcd; + bool get_adapter_enabled_return_ = false; + dbus::ExportedObject::MethodCallCallback on_hci_device_changed_; dbus::ExportedObject::MethodCallCallback on_hci_enabled_changed_; @@ -408,6 +422,47 @@ EXPECT_EQ(observer.adapter_enabled_changed_count_, 2); } +// Make sure we query the enabled state when adapter presents +TEST_F(FlossManagerClientTest, VerifyAdapterPresentEnabled) { + TestManagerObserver observer(client_.get()); + client_->Init(bus_.get(), kManagerInterface, /*adapter_index=*/-1, + GetCurrVersion(), base::DoNothing()); + + EXPECT_EQ(method_called_[manager::kGetAdapterEnabled], 0); + EXPECT_EQ(observer.adapter_present_count_, 2); + + // A disabled adapter presents + SendHciDeviceCallback( + 1, true, + base::BindOnce(&FlossManagerClientTest::ExpectNormalResponse, + weak_ptr_factory_.GetWeakPtr())); + + EXPECT_EQ(method_called_[manager::kGetAdapterEnabled], 1); + EXPECT_EQ(observer.adapter_present_count_, 3); + EXPECT_FALSE(client_->GetAdapterEnabled(1)); + + // An enabled adapter presents + get_adapter_enabled_return_ = true; + SendHciDeviceCallback( + 2, true, + base::BindOnce(&FlossManagerClientTest::ExpectNormalResponse, + weak_ptr_factory_.GetWeakPtr())); + + EXPECT_EQ(method_called_[manager::kGetAdapterEnabled], 2); + EXPECT_EQ(observer.adapter_present_count_, 4); + EXPECT_TRUE(client_->GetAdapterEnabled(2)); + + // Presenting twice should be no-op + SendHciDeviceCallback( + 2, true, + base::BindOnce(&FlossManagerClientTest::ExpectNormalResponse, + weak_ptr_factory_.GetWeakPtr())); + + EXPECT_EQ(method_called_[manager::kGetAdapterEnabled], 2); + EXPECT_EQ(observer.adapter_present_count_, 4); + EXPECT_TRUE(client_->GetAdapterEnabled(2)); +} + // Make sure adapter powered is plumbed through callbacks TEST_F(FlossManagerClientTest, VerifyAdapterEnabled) { TestManagerObserver observer(client_.get()); @@ -493,6 +548,7 @@ 1, true, base::BindOnce(&FlossManagerClientTest::ExpectNormalResponse, weak_ptr_factory_.GetWeakPtr())); + EXPECT_TRUE(method_called_[manager::kGetAdapterEnabled] > 0); EXPECT_TRUE(client_->GetAdapterPresent(1)); TriggerObjectAdded(opath, kManagerInterface); EXPECT_EQ(observer.manager_present_count_, 0);
diff --git a/device/bluetooth/public/cpp/bluetooth_address.h b/device/bluetooth/public/cpp/bluetooth_address.h index 41e066a..40bdfc2 100644 --- a/device/bluetooth/public/cpp/bluetooth_address.h +++ b/device/bluetooth/public/cpp/bluetooth_address.h
@@ -11,7 +11,7 @@ #include <string> #include "base/containers/span.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" namespace device {
diff --git a/device/bluetooth/public/cpp/bluetooth_uuid.h b/device/bluetooth/public/cpp/bluetooth_uuid.h index df51649..c5fd1e9 100644 --- a/device/bluetooth/public/cpp/bluetooth_uuid.h +++ b/device/bluetooth/public/cpp/bluetooth_uuid.h
@@ -14,7 +14,7 @@ #include "build/build_config.h" #if BUILDFLAG(IS_WIN) -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/win/windows_types.h" #endif // BUILDFLAG(IS_WIN)
diff --git a/device/bluetooth/test/fake_bluetooth_adapter_winrt.h b/device/bluetooth/test/fake_bluetooth_adapter_winrt.h index 97852d3..a205c607 100644 --- a/device/bluetooth/test/fake_bluetooth_adapter_winrt.h +++ b/device/bluetooth/test/fake_bluetooth_adapter_winrt.h
@@ -12,7 +12,7 @@ #include <stdint.h> -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" namespace device {
diff --git a/device/bluetooth/test/fake_bluetooth_le_advertisement_received_event_args_winrt.h b/device/bluetooth/test/fake_bluetooth_le_advertisement_received_event_args_winrt.h index 4eb7ee7..3d511f5 100644 --- a/device/bluetooth/test/fake_bluetooth_le_advertisement_received_event_args_winrt.h +++ b/device/bluetooth/test/fake_bluetooth_le_advertisement_received_event_args_winrt.h
@@ -10,7 +10,7 @@ #include <stdint.h> -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" namespace device {
diff --git a/device/bluetooth/test/fake_device_information_pairing_winrt.h b/device/bluetooth/test/fake_device_information_pairing_winrt.h index 0f22aea0..7bb4c387 100644 --- a/device/bluetooth/test/fake_device_information_pairing_winrt.h +++ b/device/bluetooth/test/fake_device_information_pairing_winrt.h
@@ -11,7 +11,7 @@ #include <string> -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" namespace device {
diff --git a/device/bluetooth/test/fake_gatt_characteristic_winrt.h b/device/bluetooth/test/fake_gatt_characteristic_winrt.h index 5df270d..bc80127e 100644 --- a/device/bluetooth/test/fake_gatt_characteristic_winrt.h +++ b/device/bluetooth/test/fake_gatt_characteristic_winrt.h
@@ -16,7 +16,7 @@ #include "base/functional/callback.h" #include "base/memory/raw_ptr.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "device/bluetooth/bluetooth_gatt_service.h" namespace device {
diff --git a/device/bluetooth/test/fake_gatt_descriptor_winrt.h b/device/bluetooth/test/fake_gatt_descriptor_winrt.h index 51f2036..e820bd62 100644 --- a/device/bluetooth/test/fake_gatt_descriptor_winrt.h +++ b/device/bluetooth/test/fake_gatt_descriptor_winrt.h
@@ -15,7 +15,7 @@ #include "base/functional/callback.h" #include "base/memory/raw_ptr.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "device/bluetooth/bluetooth_gatt_service.h" namespace device {
diff --git a/device/bluetooth/test/fake_gatt_device_service_winrt.h b/device/bluetooth/test/fake_gatt_device_service_winrt.h index 5e4d75e..996dfcbb 100644 --- a/device/bluetooth/test/fake_gatt_device_service_winrt.h +++ b/device/bluetooth/test/fake_gatt_device_service_winrt.h
@@ -14,7 +14,7 @@ #include <vector> #include "base/memory/raw_ptr.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" namespace device {
diff --git a/device/fido/fido_request_handler_base.h b/device/fido/fido_request_handler_base.h index 0fe51302..81e58665c 100644 --- a/device/fido/fido_request_handler_base.h +++ b/device/fido/fido_request_handler_base.h
@@ -19,7 +19,7 @@ #include "base/functional/callback.h" #include "base/memory/raw_ptr.h" #include "base/memory/weak_ptr.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "build/build_config.h" #include "device/fido/fido_constants.h" #include "device/fido/fido_discovery_base.h"
diff --git a/device/fido/mac/authenticator.h b/device/fido/mac/authenticator.h index b1c56d79..ef8f4f9 100644 --- a/device/fido/mac/authenticator.h +++ b/device/fido/mac/authenticator.h
@@ -11,7 +11,7 @@ #include "base/component_export.h" #include "base/functional/callback.h" #include "base/memory/weak_ptr.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "device/fido/ctap_make_credential_request.h" #include "device/fido/fido_authenticator.h" #include "device/fido/fido_transport_protocol.h"
diff --git a/device/fido/mac/credential_metadata.h b/device/fido/mac/credential_metadata.h index 41affbe..fb426b9 100644 --- a/device/fido/mac/credential_metadata.h +++ b/device/fido/mac/credential_metadata.h
@@ -15,7 +15,7 @@ #include "base/component_export.h" #include "base/containers/span.h" #include "base/feature_list.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "crypto/aead.h" #include "crypto/hmac.h" #include "crypto/symmetric_key.h"
diff --git a/device/fido/win/fake_webauthn_api.cc b/device/fido/win/fake_webauthn_api.cc index cff6e96..1ecb3bfd6 100644 --- a/device/fido/win/fake_webauthn_api.cc +++ b/device/fido/win/fake_webauthn_api.cc
@@ -13,7 +13,7 @@ #include "base/containers/span.h" #include "base/memory/raw_ptr_exclusion.h" #include "base/notreached.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/strings/string_util_win.h" #include "base/strings/utf_string_conversions.h" #include "components/cbor/values.h"
diff --git a/device/fido/win/logging.cc b/device/fido/win/logging.cc index 41700a9..88df573c 100644 --- a/device/fido/win/logging.cc +++ b/device/fido/win/logging.cc
@@ -7,7 +7,7 @@ #include <string> #include "base/strings/string_number_conversions.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/strings/string_util.h" #include "components/device_event_log/device_event_log.h"
diff --git a/device/gamepad/test_support/fake_igamepad_statics.cc b/device/gamepad/test_support/fake_igamepad_statics.cc index 2262093..c0435d0d 100644 --- a/device/gamepad/test_support/fake_igamepad_statics.cc +++ b/device/gamepad/test_support/fake_igamepad_statics.cc
@@ -6,7 +6,7 @@ #include "base/notreached.h" #include "base/run_loop.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/task/sequenced_task_runner.h" #include "base/task/thread_pool.h" #include "device/gamepad/test_support/fake_igamepad.h"
diff --git a/device/gamepad/test_support/fake_igamepad_statics.h b/device/gamepad/test_support/fake_igamepad_statics.h index 40197e3..9612061 100644 --- a/device/gamepad/test_support/fake_igamepad_statics.h +++ b/device/gamepad/test_support/fake_igamepad_statics.h
@@ -14,7 +14,7 @@ #include "base/containers/flat_map.h" #include "base/functional/callback_forward.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "device/gamepad/test_support/fake_igamepad.h" #include "device/gamepad/test_support/fake_iraw_game_controller.h"
diff --git a/device/gamepad/test_support/fake_iraw_game_controller.cc b/device/gamepad/test_support/fake_iraw_game_controller.cc index 8a8ffa0..374e99b 100644 --- a/device/gamepad/test_support/fake_iraw_game_controller.cc +++ b/device/gamepad/test_support/fake_iraw_game_controller.cc
@@ -6,7 +6,6 @@ #include "base/notreached.h" #include "base/strings/string_piece.h" -#include "base/strings/string_piece_forward.h" #include "base/win/scoped_hstring.h" #include "device/gamepad/test_support/fake_winrt_wgi_environment.h"
diff --git a/docs/clangd.md b/docs/clangd.md index 78bb352..3952a5e 100644 --- a/docs/clangd.md +++ b/docs/clangd.md
@@ -119,8 +119,7 @@ * Optional: You may want to add `--header-insertion=never` to the clangd flags, so that your editor doesn't automatically add incorrect #include lines. The feature doesn't correctly handle some common Chromium headers - like `base/strings/string_piece_forward.h` and - `base/functional/callback_forward.h` + like `base/functional/callback_forward.h`. ## Background Indexing
diff --git a/docs/wmax_tokens.md b/docs/wmax_tokens.md index 1b66494..23b694d 100644 --- a/docs/wmax_tokens.md +++ b/docs/wmax_tokens.md
@@ -46,9 +46,7 @@ using techniques such as forward declarations to avoid increasing the header size. Even complex classes may have forward declarations available, see for example - [https://source.chromium.org/chromium/chromium/src/+/HEAD:base/functional/callback_forward.h](callback_forward.h) - and - [https://source.chromium.org/chromium/chromium/src/+/HEAD:base/strings/string_piece_forward.h](string_piece_forward.h). + [https://source.chromium.org/chromium/chromium/src/+/HEAD:base/functional/callback_forward.h](callback_forward.h). Many types defined in .mojom.h files have forward declarations in a corresponding .mojom-forward.h file. If the size increase is unavoidable, raise the limit.
diff --git a/extensions/browser/api/media_perception_private/conversion_utils.cc b/extensions/browser/api/media_perception_private/conversion_utils.cc index 20abba2..662b54b 100644 --- a/extensions/browser/api/media_perception_private/conversion_utils.cc +++ b/extensions/browser/api/media_perception_private/conversion_utils.cc
@@ -560,9 +560,9 @@ base::Value value = NamedTemplateArgumentValueProtoToValue(named_template_argument_proto); - named_template_argument->value.emplace(); - if (!NamedTemplateArgument::Value::Populate( - value, *named_template_argument->value)) { + named_template_argument->value = + NamedTemplateArgument::Value::FromValue(value); + if (!named_template_argument->value) { return false; }
diff --git a/extensions/browser/api/media_perception_private/conversion_utils_unittest.cc b/extensions/browser/api/media_perception_private/conversion_utils_unittest.cc index 995acf5..c087adc7 100644 --- a/extensions/browser/api/media_perception_private/conversion_utils_unittest.cc +++ b/extensions/browser/api/media_perception_private/conversion_utils_unittest.cc
@@ -593,9 +593,7 @@ // Empty. EXPECT_EQ(*state_result.named_template_arguments->at(1).name, ""); - EXPECT_FALSE(state_result.named_template_arguments->at(1).value->as_string); - EXPECT_THAT(state_result.named_template_arguments->at(1).value->as_number, - Eq(absl::nullopt)); + EXPECT_FALSE(state_result.named_template_arguments->at(1).value); // String. EXPECT_EQ(*state_result.named_template_arguments->at(2).name, @@ -656,16 +654,14 @@ state.named_template_arguments->at(0).name = kNumericalTemplateArgumentName; - state.named_template_arguments->at(0).value.emplace(); - media_perception::NamedTemplateArgument::Value::Populate( - base::Value(kNumericalTemplateArgumentValue), - *state.named_template_arguments->at(0).value); + state.named_template_arguments->at(0).value = + media_perception::NamedTemplateArgument::Value::FromValue( + base::Value(kNumericalTemplateArgumentValue)); state.named_template_arguments->at(2).name = kStringTemplateArgumentName; - state.named_template_arguments->at(2).value.emplace(); - media_perception::NamedTemplateArgument::Value::Populate( - base::Value(kStringTemplateArgumentValue), - *state.named_template_arguments->at(2).value); + state.named_template_arguments->at(2).value = + media_perception::NamedTemplateArgument::Value::FromValue( + base::Value(kStringTemplateArgumentValue)); state_proto = StateIdlToProto(state); EXPECT_EQ(state_proto.status(), mri::State::RUNNING);
diff --git a/extensions/browser/api/networking_private/networking_private_api.cc b/extensions/browser/api/networking_private/networking_private_api.cc index 6dd429b6..34dda3d 100644 --- a/extensions/browser/api/networking_private/networking_private_api.cc +++ b/extensions/browser/api/networking_private/networking_private_api.cc
@@ -826,9 +826,8 @@ absl::optional<base::Value::Dict> policy_dict) { // private_api::GlobalPolicy is a subset of the global policy dictionary // (by definition), so use the api setter/getter to generate the subset. - std::unique_ptr<private_api::GlobalPolicy> policy( - private_api::GlobalPolicy::FromValueDeprecated( - base::Value(std::move(policy_dict.value())))); + absl::optional<private_api::GlobalPolicy> policy = + private_api::GlobalPolicy::FromValue(policy_dict.value()); DCHECK(policy); return Respond( ArgumentList(private_api::GetGlobalPolicy::Results::Create(*policy)));
diff --git a/extensions/browser/api/printer_provider/printer_provider_api.cc b/extensions/browser/api/printer_provider/printer_provider_api.cc index aaa4018..5bee0f1 100644 --- a/extensions/browser/api/printer_provider/printer_provider_api.cc +++ b/extensions/browser/api/printer_provider/printer_provider_api.cc
@@ -623,11 +623,14 @@ api::printer_provider::PrintJob print_job; print_job.printer_id = internal_printer_id; - if (!api::printer_provider::PrintJob::Ticket::Populate(job.ticket, - print_job.ticket)) { + if (auto ticket = + api::printer_provider::PrintJob::Ticket::FromValue(job.ticket); + !ticket) { std::move(callback).Run(base::Value(api::printer_provider::ToString( api::printer_provider::PrintError::kInvalidTicket))); return; + } else { + print_job.ticket = std::move(ticket).value(); } print_job.content_type = job.content_type;
diff --git a/extensions/browser/extension_prefs.h b/extensions/browser/extension_prefs.h index 3a3526f..9262d1c6 100644 --- a/extensions/browser/extension_prefs.h +++ b/extensions/browser/extension_prefs.h
@@ -12,7 +12,7 @@ #include "base/memory/raw_ptr.h" #include "base/observer_list.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/time/time.h" #include "base/values.h" #include "components/keyed_service/core/keyed_service.h"
diff --git a/extensions/common/constants.h b/extensions/common/constants.h index 30e4e96..9aab221c 100644 --- a/extensions/common/constants.h +++ b/extensions/common/constants.h
@@ -9,7 +9,7 @@ #include <cstdint> #include "base/files/file_path.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "build/chromeos_buildflags.h" #include "extensions/common/extensions_export.h"
diff --git a/extensions/common/csp_validator.h b/extensions/common/csp_validator.h index 9a6f7a3..6a1458d 100644 --- a/extensions/common/csp_validator.h +++ b/extensions/common/csp_validator.h
@@ -8,7 +8,7 @@ #include <string> #include <vector> -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "extensions/common/manifest.h" namespace extensions {
diff --git a/extensions/common/extensions_api_provider.h b/extensions/common/extensions_api_provider.h index 1e29129e..301b817 100644 --- a/extensions/common/extensions_api_provider.h +++ b/extensions/common/extensions_api_provider.h
@@ -7,7 +7,7 @@ #include <string> -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" namespace extensions { class FeatureProvider;
diff --git a/extensions/common/manifest_handlers/csp_info.h b/extensions/common/manifest_handlers/csp_info.h index de4df56f..76e7a5b 100644 --- a/extensions/common/manifest_handlers/csp_info.h +++ b/extensions/common/manifest_handlers/csp_info.h
@@ -7,7 +7,7 @@ #include <string> -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "extensions/common/extension.h" #include "extensions/common/manifest_handler.h"
diff --git a/extensions/common/utils/content_script_utils.cc b/extensions/common/utils/content_script_utils.cc index e74e623..41143d09 100644 --- a/extensions/common/utils/content_script_utils.cc +++ b/extensions/common/utils/content_script_utils.cc
@@ -11,7 +11,7 @@ #include "base/files/file_util.h" #include "base/strings/string_number_conversions.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" #include "content/public/common/url_constants.h"
diff --git a/extensions/renderer/scripts_run_info.cc b/extensions/renderer/scripts_run_info.cc index ad103112..d42fe8f4 100644 --- a/extensions/renderer/scripts_run_info.cc +++ b/extensions/renderer/scripts_run_info.cc
@@ -18,7 +18,7 @@ : num_css(0u), num_js(0u), num_blocking_js(0u), - routing_id_(render_frame->GetRoutingID()), + frame_token_(render_frame->GetWebFrame()->GetLocalFrameToken()), run_location_(location), frame_url_(ScriptContext::GetDocumentLoaderURLForFrame( render_frame->GetWebFrame())) {} @@ -29,8 +29,10 @@ void ScriptsRunInfo::LogRun(bool send_script_activity) { // Notify the browser if any extensions are now executing scripts. if (!executing_scripts.empty() && send_script_activity) { - content::RenderFrame* frame = - content::RenderFrame::FromRoutingID(routing_id_); + content::RenderFrame* frame = nullptr; + if (auto* web_frame = blink::WebLocalFrame::FromFrameToken(frame_token_)) { + frame = content::RenderFrame::FromWebFrame(web_frame); + } if (!frame) { // We can't convert a map of sets into a flat_map of vectors with mojo // bindings so we need to do it manually. The set property is useful for
diff --git a/extensions/renderer/scripts_run_info.h b/extensions/renderer/scripts_run_info.h index 44878035..5283e2c 100644 --- a/extensions/renderer/scripts_run_info.h +++ b/extensions/renderer/scripts_run_info.h
@@ -14,6 +14,7 @@ #include "base/timer/elapsed_timer.h" #include "extensions/common/mojom/run_location.mojom-shared.h" #include "extensions/common/user_script.h" +#include "third_party/blink/public/common/tokens/tokens.h" namespace content { class RenderFrame; @@ -55,10 +56,10 @@ const base::TimeDelta& elapsed); private: - // The routinig id to use to notify the browser of any injections. Since the + // The frame token to use to notify the browser of any injections. Since the // frame may be deleted in injection, we don't hold on to a reference to it // directly. - int routing_id_; + blink::LocalFrameToken frame_token_; // The run location at which injection is happening. mojom::RunLocation run_location_;
diff --git a/fuchsia_web/common/init_logging.h b/fuchsia_web/common/init_logging.h index b461e5a0..cc5df4b 100644 --- a/fuchsia_web/common/init_logging.h +++ b/fuchsia_web/common/init_logging.h
@@ -5,7 +5,7 @@ #ifndef FUCHSIA_WEB_COMMON_INIT_LOGGING_H_ #define FUCHSIA_WEB_COMMON_INIT_LOGGING_H_ -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" namespace base { class CommandLine;
diff --git a/fuchsia_web/webengine/browser/fake_semantic_tree.h b/fuchsia_web/webengine/browser/fake_semantic_tree.h index 74bd6fb9..ea1ba40 100644 --- a/fuchsia_web/webengine/browser/fake_semantic_tree.h +++ b/fuchsia_web/webengine/browser/fake_semantic_tree.h
@@ -11,7 +11,7 @@ #include <unordered_map> #include "base/functional/callback.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" class FakeSemanticTree : public fuchsia::accessibility::semantics::testing::SemanticTree_TestBase {
diff --git a/fuchsia_web/webengine/common/cast_streaming.h b/fuchsia_web/webengine/common/cast_streaming.h index b14009d1..55b6705 100644 --- a/fuchsia_web/webengine/common/cast_streaming.h +++ b/fuchsia_web/webengine/common/cast_streaming.h
@@ -7,7 +7,7 @@ #include <fuchsia/web/cpp/fidl.h> -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" // Returns true if Cast Streaming is enabled for this process. bool IsCastStreamingEnabled();
diff --git a/fuchsia_web/webengine/web_engine_integration_test_base.h b/fuchsia_web/webengine/web_engine_integration_test_base.h index 49fa5da..c718c48 100644 --- a/fuchsia_web/webengine/web_engine_integration_test_base.h +++ b/fuchsia_web/webengine/web_engine_integration_test_base.h
@@ -13,7 +13,7 @@ #include "base/command_line.h" #include "base/fuchsia/filtered_service_directory.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/test/task_environment.h" #include "fuchsia_web/common/test/test_navigation_listener.h" #include "net/test/embedded_test_server/embedded_test_server.h"
diff --git a/fuchsia_web/webinstance_host/web_instance_host.h b/fuchsia_web/webinstance_host/web_instance_host.h index cc6b42b..bcd5429 100644 --- a/fuchsia_web/webinstance_host/web_instance_host.h +++ b/fuchsia_web/webinstance_host/web_instance_host.h
@@ -18,7 +18,7 @@ #include "base/memory/raw_ptr.h" #include "base/memory/raw_ref.h" #include "base/sequence_checker.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/uuid.h" #include "fuchsia_web/webinstance_host/fuchsia_web_debug_proxy.h"
diff --git a/fuchsia_web/webinstance_host/web_instance_host_internal.h b/fuchsia_web/webinstance_host/web_instance_host_internal.h index 252ff1a4..5140ab6b 100644 --- a/fuchsia_web/webinstance_host/web_instance_host_internal.h +++ b/fuchsia_web/webinstance_host/web_instance_host_internal.h
@@ -11,7 +11,7 @@ #include <string> #include <vector> -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" namespace base { class CommandLine;
diff --git a/google_apis/gaia/gaia_config.h b/google_apis/gaia/gaia_config.h index 5fcc8cb..49fad3e 100644 --- a/google_apis/gaia/gaia_config.h +++ b/google_apis/gaia/gaia_config.h
@@ -10,7 +10,7 @@ #include "base/component_export.h" #include "base/gtest_prod_util.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/values.h" #include "google_apis/google_api_keys.h"
diff --git a/google_apis/tasks/tasks_api_task_status.cc b/google_apis/tasks/tasks_api_task_status.cc index d353197..10830ffe 100644 --- a/google_apis/tasks/tasks_api_task_status.cc +++ b/google_apis/tasks/tasks_api_task_status.cc
@@ -7,7 +7,7 @@ #include <string> #include "base/notreached.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" namespace google_apis::tasks { namespace {
diff --git a/google_apis/tasks/tasks_api_task_status.h b/google_apis/tasks/tasks_api_task_status.h index fb0395c9..91fe0ab3 100644 --- a/google_apis/tasks/tasks_api_task_status.h +++ b/google_apis/tasks/tasks_api_task_status.h
@@ -7,7 +7,7 @@ #include <string> -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" namespace google_apis::tasks {
diff --git a/gpu/command_buffer/service/shared_image/shared_image_representation.cc b/gpu/command_buffer/service/shared_image/shared_image_representation.cc index 33c494b..3f5a72f 100644 --- a/gpu/command_buffer/service/shared_image/shared_image_representation.cc +++ b/gpu/command_buffer/service/shared_image/shared_image_representation.cc
@@ -822,9 +822,14 @@ wgpu::Texture DawnImageRepresentation::BeginAccess( wgpu::TextureUsage usage, const gfx::Rect& update_rect) { - // If the implementation doesn't support partial updates, we need to update - // the whole image. +#if BUILDFLAG(IS_WIN) + // The `update_rect` is a hint to update only certain portion + // of shared image but it doesn't have to match the size of shared image for + // eg. CopyOutput cases where an empty rect is passed to as there is no intent + // to update the shared image. Keeping this windows only for helping compare + // with DComp/DXGI cases. DCHECK_EQ(update_rect, gfx::Rect(size())); +#endif return this->BeginAccess(usage); }
diff --git a/gpu/config/gpu_blocklist.cc b/gpu/config/gpu_blocklist.cc index 64766d4..e3243d5b 100644 --- a/gpu/config/gpu_blocklist.cc +++ b/gpu/config/gpu_blocklist.cc
@@ -9,21 +9,20 @@ namespace gpu { -GpuBlocklist::GpuBlocklist(const GpuControlListData& data) +GpuBlocklist::GpuBlocklist(base::span<const GpuControlList::Entry> data) : GpuControlList(data) {} GpuBlocklist::~GpuBlocklist() = default; // static std::unique_ptr<GpuBlocklist> GpuBlocklist::Create() { - GpuControlListData data(kSoftwareRenderingListEntryCount, - kSoftwareRenderingListEntries); - return Create(data); + return Create(base::make_span(kSoftwareRenderingListEntries, + kSoftwareRenderingListEntryCount)); } // static std::unique_ptr<GpuBlocklist> GpuBlocklist::Create( - const GpuControlListData& data) { + base::span<const GpuControlList::Entry> data) { std::unique_ptr<GpuBlocklist> list(new GpuBlocklist(data)); list->AddSupportedFeature("accelerated_2d_canvas", GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS);
diff --git a/gpu/config/gpu_blocklist.h b/gpu/config/gpu_blocklist.h index 3f43b7f..1ba15b4 100644 --- a/gpu/config/gpu_blocklist.h +++ b/gpu/config/gpu_blocklist.h
@@ -7,6 +7,7 @@ #include <memory> +#include "base/containers/span.h" #include "gpu/config/gpu_control_list.h" namespace gpu { @@ -19,12 +20,13 @@ ~GpuBlocklist() override; static std::unique_ptr<GpuBlocklist> Create(); - static std::unique_ptr<GpuBlocklist> Create(const GpuControlListData& data); + static std::unique_ptr<GpuBlocklist> Create( + base::span<const GpuControlList::Entry> data); static bool AreEntryIndicesValid(const std::vector<uint32_t>& entry_indices); private: - explicit GpuBlocklist(const GpuControlListData& data); + explicit GpuBlocklist(base::span<const GpuControlList::Entry> data); }; } // namespace gpu
diff --git a/gpu/config/gpu_blocklist_unittest.cc b/gpu/config/gpu_blocklist_unittest.cc index 3d0ee17..69ae310 100644 --- a/gpu/config/gpu_blocklist_unittest.cc +++ b/gpu/config/gpu_blocklist_unittest.cc
@@ -58,8 +58,8 @@ 0, // exceptions count nullptr, // exceptions }}; - GpuControlListData data(1, kTestEntries); - std::unique_ptr<GpuBlocklist> blocklist = GpuBlocklist::Create(data); + std::unique_ptr<GpuBlocklist> blocklist = + GpuBlocklist::Create(kTestEntries); std::set<int> type = blocklist->MakeDecision(GpuBlocklist::kOsMacosx, "10.12.3", gpu_info()); EXPECT_EQ(1u, type.size());
diff --git a/gpu/config/gpu_control_list.cc b/gpu/config/gpu_control_list.cc index 0b9d50a..c98ea10ae 100644 --- a/gpu/config/gpu_control_list.cc +++ b/gpu/config/gpu_control_list.cc
@@ -654,15 +654,10 @@ return feature_names; } -GpuControlList::GpuControlList(const GpuControlListData& data) - : entry_count_(data.entry_count), - entries_(data.entries), - max_entry_id_(0), - needs_more_info_(false), - control_list_logging_enabled_(false) { - DCHECK_LT(0u, entry_count_); +GpuControlList::GpuControlList(base::span<const Entry> data) : entries_(data) { + DCHECK(!entries_.empty()); // Assume the newly last added entry has the largest ID. - max_entry_id_ = entries_[entry_count_ - 1].id; + max_entry_id_ = entries_.back().id; } GpuControlList::~GpuControlList() = default; @@ -699,7 +694,7 @@ if (pos != std::string::npos) processed_os_version = processed_os_version.substr(0, pos); - for (size_t ii = 0; ii < entry_count_; ++ii) { + for (size_t ii = 0; ii < entries_.size(); ++ii) { const Entry& entry = entries_[ii]; DCHECK_NE(0u, entry.id); if (!entry.AppliesToTestGroup(target_test_group)) @@ -744,7 +739,6 @@ const std::vector<uint32_t>& entry_indices) const { std::vector<uint32_t> ids; for (auto index : entry_indices) { - DCHECK_LT(index, entry_count_); ids.push_back(entries_[index].id); } return ids; @@ -753,7 +747,6 @@ std::vector<std::string> GpuControlList::GetDisabledExtensions() { std::set<std::string> disabled_extensions; for (auto index : active_entries_) { - DCHECK_LT(index, entry_count_); const Entry& entry = entries_[index]; for (size_t ii = 0; ii < entry.disabled_extension_size; ++ii) { disabled_extensions.insert(entry.disabled_extensions[ii]); @@ -766,7 +759,6 @@ std::vector<std::string> GpuControlList::GetDisabledWebGLExtensions() { std::set<std::string> disabled_webgl_extensions; for (auto index : active_entries_) { - DCHECK_LT(index, entry_count_); const Entry& entry = entries_[index]; for (size_t ii = 0; ii < entry.disabled_webgl_extension_size; ++ii) { disabled_webgl_extensions.insert(entry.disabled_webgl_extensions[ii]); @@ -780,7 +772,6 @@ const std::string& tag, const std::vector<uint32_t>& entries) const { for (auto index : entries) { - DCHECK_LT(index, entry_count_); const Entry& entry = entries_[index]; base::Value::Dict problem; @@ -803,7 +794,7 @@ } size_t GpuControlList::num_entries() const { - return entry_count_; + return entries_.size(); } uint32_t GpuControlList::max_entry_id() const {
diff --git a/gpu/config/gpu_control_list.h b/gpu/config/gpu_control_list.h index 0d90ec1..df72b268 100644 --- a/gpu/config/gpu_control_list.h +++ b/gpu/config/gpu_control_list.h
@@ -12,14 +12,13 @@ #include <unordered_map> #include <vector> -#include "base/memory/raw_ptr.h" +#include "base/containers/span.h" #include "base/memory/raw_ptr_exclusion.h" #include "base/values.h" #include "gpu/config/gpu_info.h" #include "gpu/gpu_export.h" namespace gpu { -struct GpuControlListData; struct GPUInfo; class GPU_EXPORT GpuControlList { @@ -275,7 +274,7 @@ const std::string& control_list_logging_name) const; }; - explicit GpuControlList(const GpuControlListData& data); + explicit GpuControlList(base::span<const GpuControlList::Entry> data); virtual ~GpuControlList(); // Collects system information and combines them with gpu_info and control @@ -349,35 +348,26 @@ // Gets the current OS type. static OsType GetOsType(); - size_t entry_count_; - raw_ptr<const Entry, AllowPtrArithmetic> entries_; + // These always point to built-in arrays of constants, so raw_ptr doesn't + // add any protection but costs some overhead. + base::span<const Entry> entries_; + // This records all the entries that are applicable to the current user // machine. It is updated everytime MakeDecision() is called and is used // later by GetDecisionEntries(). std::vector<uint32_t> active_entries_; - uint32_t max_entry_id_; + uint32_t max_entry_id_ = 0; - bool needs_more_info_; + bool needs_more_info_ = false; // The features a GpuControlList recognizes and handles. FeatureMap feature_map_; - bool control_list_logging_enabled_; + bool control_list_logging_enabled_ = false; std::string control_list_logging_name_; }; -struct GPU_EXPORT GpuControlListData { - size_t entry_count; - raw_ptr<const GpuControlList::Entry, AllowPtrArithmetic> entries; - - GpuControlListData() : entry_count(0u), entries(nullptr) {} - - GpuControlListData(size_t a_entry_count, - const GpuControlList::Entry* a_entries) - : entry_count(a_entry_count), entries(a_entries) {} -}; - } // namespace gpu #endif // GPU_CONFIG_GPU_CONTROL_LIST_H_
diff --git a/gpu/config/gpu_control_list_unittest.cc b/gpu/config/gpu_control_list_unittest.cc index 5ba644b..5a7ba311 100644 --- a/gpu/config/gpu_control_list_unittest.cc +++ b/gpu/config/gpu_control_list_unittest.cc
@@ -36,10 +36,8 @@ return gpu_info_; } - std::unique_ptr<GpuControlList> Create(size_t entry_count, - const Entry* entries) { - GpuControlListData data(entry_count, entries); - std::unique_ptr<GpuControlList> rt(new GpuControlList(data)); + std::unique_ptr<GpuControlList> Create(base::span<const Entry> entries) { + std::unique_ptr<GpuControlList> rt(new GpuControlList(entries)); rt->AddSupportedFeature("test_feature_0", TEST_FEATURE_0); rt->AddSupportedFeature("test_feature_1", TEST_FEATURE_1); rt->AddSupportedFeature("test_feature_2", TEST_FEATURE_2); @@ -81,7 +79,7 @@ TEST_P(GpuControlListTest, NeedsMoreInfo) { const Entry kEntries[1] = { kGpuControlListTestingEntries[kGpuControlListTest_NeedsMoreInfo]}; - std::unique_ptr<GpuControlList> control_list = Create(1, kEntries); + std::unique_ptr<GpuControlList> control_list = Create(kEntries); GPUInfo gpu_info; gpu_info.gpu.vendor_id = kNvidiaVendorId; @@ -112,7 +110,7 @@ const Entry kEntries[1] = { kGpuControlListTestingEntries [kGpuControlListTest_NeedsMoreInfoForExceptions]}; - std::unique_ptr<GpuControlList> control_list = Create(1, kEntries); + std::unique_ptr<GpuControlList> control_list = Create(kEntries); GPUInfo gpu_info; gpu_info.gpu.vendor_id = kIntelVendorId; @@ -153,7 +151,7 @@ const Entry kEntries[2] = { kGpuControlListTestingEntries[kGpuControlListTest_IgnorableEntries_0], kGpuControlListTestingEntries[kGpuControlListTest_IgnorableEntries_1]}; - std::unique_ptr<GpuControlList> control_list = Create(2, kEntries); + std::unique_ptr<GpuControlList> control_list = Create(kEntries); GPUInfo gpu_info; gpu_info.gpu.vendor_id = kIntelVendorId; @@ -170,7 +168,7 @@ [kGpuControlListTest_DisabledExtensionTest_0], kGpuControlListTestingEntries [kGpuControlListTest_DisabledExtensionTest_1]}; - std::unique_ptr<GpuControlList> control_list = Create(2, kEntries); + std::unique_ptr<GpuControlList> control_list = Create(kEntries); GPUInfo gpu_info; control_list->MakeDecision(GpuControlList::kOsWin, kOsVersion, gpu_info); @@ -187,7 +185,7 @@ TEST_P(GpuControlListTest, LinuxKernelVersion) { const Entry kEntries[1] = { kGpuControlListTestingEntries[kGpuControlListTest_LinuxKernelVersion]}; - std::unique_ptr<GpuControlList> control_list = Create(1, kEntries); + std::unique_ptr<GpuControlList> control_list = Create(kEntries); GPUInfo gpu_info; gpu_info.gpu.vendor_id = 0x8086; @@ -206,7 +204,7 @@ kGpuControlListTestingEntries[kGpuControlListTest_LinuxKernelVersion], kGpuControlListTestingEntries[kGpuControlListTest_TestGroup_0], kGpuControlListTestingEntries[kGpuControlListTest_TestGroup_1]}; - std::unique_ptr<GpuControlList> control_list = Create(3, kEntries); + std::unique_ptr<GpuControlList> control_list = Create(kEntries); GPUInfo gpu_info; // Default test group.
diff --git a/gpu/config/gpu_driver_bug_list.cc b/gpu/config/gpu_driver_bug_list.cc index 4d2c35fe..d5385c50 100644 --- a/gpu/config/gpu_driver_bug_list.cc +++ b/gpu/config/gpu_driver_bug_list.cc
@@ -27,21 +27,20 @@ } // namespace anonymous -GpuDriverBugList::GpuDriverBugList(const GpuControlListData& data) +GpuDriverBugList::GpuDriverBugList(base::span<const GpuControlList::Entry> data) : GpuControlList(data) {} GpuDriverBugList::~GpuDriverBugList() = default; // static std::unique_ptr<GpuDriverBugList> GpuDriverBugList::Create() { - GpuControlListData data(kGpuDriverBugListEntryCount, - kGpuDriverBugListEntries); - return Create(data); + return Create( + base::make_span(kGpuDriverBugListEntries, kGpuDriverBugListEntryCount)); } // static std::unique_ptr<GpuDriverBugList> GpuDriverBugList::Create( - const GpuControlListData& data) { + base::span<const GpuControlList::Entry> data) { std::unique_ptr<GpuDriverBugList> list(new GpuDriverBugList(data)); DCHECK_EQ(static_cast<int>(std::size(kFeatureList)),
diff --git a/gpu/config/gpu_driver_bug_list.h b/gpu/config/gpu_driver_bug_list.h index 6e84513..6091dc9 100644 --- a/gpu/config/gpu_driver_bug_list.h +++ b/gpu/config/gpu_driver_bug_list.h
@@ -9,6 +9,7 @@ #include <set> #include "base/command_line.h" +#include "base/containers/span.h" #include "gpu/config/gpu_control_list.h" #include "gpu/gpu_export.h" @@ -23,7 +24,7 @@ static std::unique_ptr<GpuDriverBugList> Create(); static std::unique_ptr<GpuDriverBugList> Create( - const GpuControlListData& data); + base::span<const GpuControlList::Entry> data); // Append |workarounds| with these passed in through the // |command_line|. @@ -39,7 +40,7 @@ static bool AreEntryIndicesValid(const std::vector<uint32_t>& entry_indices); private: - explicit GpuDriverBugList(const GpuControlListData& data); + explicit GpuDriverBugList(base::span<const GpuControlList::Entry> data); }; } // namespace gpu
diff --git a/gpu/vulkan/tests/basic_vulkan_test.cc b/gpu/vulkan/tests/basic_vulkan_test.cc index aebdd17..42c0966 100644 --- a/gpu/vulkan/tests/basic_vulkan_test.cc +++ b/gpu/vulkan/tests/basic_vulkan_test.cc
@@ -5,7 +5,7 @@ #include "gpu/vulkan/tests/basic_vulkan_test.h" #include "base/command_line.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "build/build_config.h" #include "gpu/vulkan/init/vulkan_factory.h" #include "gpu/vulkan/tests/native_window.h"
diff --git a/headless/test/headless_browser_browsertest.cc b/headless/test/headless_browser_browsertest.cc index 7998808..3bf7ec6 100644 --- a/headless/test/headless_browser_browsertest.cc +++ b/headless/test/headless_browser_browsertest.cc
@@ -279,7 +279,9 @@ if (base::mac::GetCPUType() == base::mac::CPUType::kArm) { expected_support = false; } -#endif +#elif BUILDFLAG(IS_WIN) && defined(ARCH_CPU_ARM64) + expected_support = false; +#endif // BUILDFLAG(IS_APPLE) EXPECT_THAT( EvaluateScript(web_contents,
diff --git a/infra/archive_config/linux-archive-rel.json b/infra/archive_config/linux-archive-rel.json index d42367b..6f2de436 100644 --- a/infra/archive_config/linux-archive-rel.json +++ b/infra/archive_config/linux-archive-rel.json
@@ -15,9 +15,6 @@ "libvulkan.so.1", "MEIPreload/manifest.json", "MEIPreload/preloaded_data.pb", - "nacl_helper", - "nacl_helper_bootstrap", - "nacl_irt_x86_64.nexe", "product_logo_48.png", "resources.pak", "v8_context_snapshot.bin", @@ -142,15 +139,6 @@ "archive_type": "ARCHIVE_TYPE_ZIP" }, { - "dirs": ["pnacl"], - "rename_dirs": [ - {"from_dir": ".", "to_dir": "pnacl"} - ], - "gcs_bucket": "chromium-browser-snapshots", - "gcs_path": "Linux_x64/{%position%}/pnacl.zip", - "archive_type": "ARCHIVE_TYPE_ZIP" - }, - { "files": [ "updater.zip" ],
diff --git a/infra/config/generated/testing/test_suites.pyl b/infra/config/generated/testing/test_suites.pyl index 4491776..f1f48c8 100644 --- a/infra/config/generated/testing/test_suites.pyl +++ b/infra/config/generated/testing/test_suites.pyl
@@ -5832,7 +5832,7 @@ 'gl_gtests_passthrough', 'gpu_fyi_vulkan_swiftshader_gtests', 'non_android_and_cast_and_chromeos_chromium_gtests', - 'non_android_chromium_gtests', + 'non_android_chromium_gtests_no_nacl', 'vr_platform_specific_chromium_gtests', ], @@ -5848,7 +5848,7 @@ 'linux_specific_xr_gtests', 'gl_gtests_passthrough', 'non_android_and_cast_and_chromeos_chromium_gtests', - 'non_android_chromium_gtests', + 'non_android_chromium_gtests_no_nacl', 'vr_platform_specific_chromium_gtests', ], @@ -5889,7 +5889,7 @@ 'linux_flavor_specific_chromium_gtests', 'linux_specific_xr_gtests', 'non_android_and_cast_and_chromeos_chromium_gtests', - 'non_android_chromium_gtests', + 'non_android_chromium_gtests_no_nacl', 'vr_platform_specific_chromium_gtests', ], @@ -5905,7 +5905,7 @@ 'linux_flavor_specific_chromium_gtests', 'linux_specific_xr_gtests', 'non_android_and_cast_and_chromeos_chromium_gtests', - 'non_android_chromium_gtests', + 'non_android_chromium_gtests_no_nacl', 'vr_platform_specific_chromium_gtests', ],
diff --git a/infra/config/generated/testing/variants.pyl b/infra/config/generated/testing/variants.pyl index 2e54145..fe662f5 100644 --- a/infra/config/generated/testing/variants.pyl +++ b/infra/config/generated/testing/variants.pyl
@@ -102,16 +102,16 @@ }, 'LACROS_VERSION_SKEW_BETA': { 'identifier': 'Lacros version skew testing ash beta', - 'description': 'Run with ash-chrome version 119.0.6045.104', + 'description': 'Run with ash-chrome version 119.0.6045.116', 'args': [ - '--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6045.104/test_ash_chrome', + '--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6045.116/test_ash_chrome', ], 'swarming': { 'cipd_packages': [ { 'cipd_package': 'chromium/testing/linux-ash-chromium/x86_64/ash.zip', - 'location': 'lacros_version_skew_tests_v119.0.6045.104', - 'revision': 'version:119.0.6045.104', + 'location': 'lacros_version_skew_tests_v119.0.6045.116', + 'revision': 'version:119.0.6045.116', }, ], },
diff --git a/infra/config/targets/compound_suites.star b/infra/config/targets/compound_suites.star index 20c3f8b..f017a7e 100644 --- a/infra/config/targets/compound_suites.star +++ b/infra/config/targets/compound_suites.star
@@ -240,7 +240,7 @@ "gl_gtests_passthrough", "gpu_fyi_vulkan_swiftshader_gtests", "non_android_and_cast_and_chromeos_chromium_gtests", - "non_android_chromium_gtests", + "non_android_chromium_gtests_no_nacl", "vr_platform_specific_chromium_gtests", ], ) @@ -261,7 +261,7 @@ "linux_specific_xr_gtests", "gl_gtests_passthrough", "non_android_and_cast_and_chromeos_chromium_gtests", - "non_android_chromium_gtests", + "non_android_chromium_gtests_no_nacl", "vr_platform_specific_chromium_gtests", ], ) @@ -320,7 +320,7 @@ "linux_flavor_specific_chromium_gtests", "linux_specific_xr_gtests", "non_android_and_cast_and_chromeos_chromium_gtests", - "non_android_chromium_gtests", + "non_android_chromium_gtests_no_nacl", "vr_platform_specific_chromium_gtests", ], ) @@ -346,7 +346,7 @@ "linux_flavor_specific_chromium_gtests", "linux_specific_xr_gtests", "non_android_and_cast_and_chromeos_chromium_gtests", - "non_android_chromium_gtests", + "non_android_chromium_gtests_no_nacl", "vr_platform_specific_chromium_gtests", ], )
diff --git a/infra/config/targets/lacros-version-skew-variants.json b/infra/config/targets/lacros-version-skew-variants.json index 141150f9..b45e58d 100644 --- a/infra/config/targets/lacros-version-skew-variants.json +++ b/infra/config/targets/lacros-version-skew-variants.json
@@ -33,16 +33,16 @@ }, "LACROS_VERSION_SKEW_BETA": { "args": [ - "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6045.104/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6045.116/test_ash_chrome" ], - "description": "Run with ash-chrome version 119.0.6045.104", + "description": "Run with ash-chrome version 119.0.6045.116", "identifier": "Lacros version skew testing ash beta", "swarming": { "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v119.0.6045.104", - "revision": "version:119.0.6045.104" + "location": "lacros_version_skew_tests_v119.0.6045.116", + "revision": "version:119.0.6045.116" } ] }
diff --git a/internal b/internal index 601621a..f0c9e0d 160000 --- a/internal +++ b/internal
@@ -1 +1 @@ -Subproject commit 601621ad463530e5e1acc47d248ce98e2f313e42 +Subproject commit f0c9e0d5052fefe2bdc83367fb6eab5893a67138
diff --git a/ios/chrome/browser/device_reauth/ios_device_authenticator.mm b/ios/chrome/browser/device_reauth/ios_device_authenticator.mm index dfe8bb1..a710a7a7 100644 --- a/ios/chrome/browser/device_reauth/ios_device_authenticator.mm +++ b/ios/chrome/browser/device_reauth/ios_device_authenticator.mm
@@ -19,10 +19,7 @@ IOSDeviceAuthenticator::~IOSDeviceAuthenticator() = default; bool IOSDeviceAuthenticator::CanAuthenticateWithBiometrics() { - // Currently ReauthenticationModule does not support checking for only the - // Biometric auth. Considering support that in the future if needed. - NOTIMPLEMENTED(); - return false; + return [authentication_module_ canAttemptReauthWithBiometrics]; } bool IOSDeviceAuthenticator::CanAuthenticateWithBiometricOrScreenLock() {
diff --git a/ios/chrome/browser/passwords/model/password_controller_unittest.mm b/ios/chrome/browser/passwords/model/password_controller_unittest.mm index 4048a61..1450a14 100644 --- a/ios/chrome/browser/passwords/model/password_controller_unittest.mm +++ b/ios/chrome/browser/passwords/model/password_controller_unittest.mm
@@ -1701,12 +1701,6 @@ // Tests that the user is prompted to save or update password on a succesful // form submission. TEST_F(PasswordControllerTest, ShowingSavingPromptOnSuccessfulSubmission) { - // TODO(crbug.com/1404697): Re-enable on iOS 14. This test is flaky on iOS 14, - // sometimes failing to finish loading the HTML. - if (!base::ios::IsRunningOnIOS15OrLater()) { - return; - } - const char* kHtml = {"<html><body>" "<form name='login_form' id='login_form'>" " <input type='text' name='username'>" @@ -1772,12 +1766,6 @@ // Tests that the user is not prompted to save or update password on a // succesful form submission while saving is disabled. TEST_F(PasswordControllerTest, NotShowingSavingPromptWhileSavingIsDisabled) { - // TODO(crbug.com/1404697): Re-enable on iOS 14. This test is flaky on iOS 14, - // sometimes failing to finish loading the HTML. - if (!base::ios::IsRunningOnIOS15OrLater()) { - return; - } - const char* kHtml = {"<html><body>" "<form name='login_form' id='login_form'>" " <input type='text' name='username'>" @@ -1805,12 +1793,6 @@ // form submission when there's already a credential with the same // username in the store. TEST_F(PasswordControllerTest, ShowingUpdatePromptOnSuccessfulSubmission) { - // TODO(crbug.com/1404697): Re-enable on iOS 14. This test is flaky on iOS 14, - // sometimes failing to finish loading the HTML. - if (!base::ios::IsRunningOnIOS15OrLater()) { - return; - } - PasswordForm form(MakeSimpleForm()); ON_CALL(*store_, GetLogins) .WillByDefault(WithArg<1>(InvokeConsumer(store_.get(), form))); @@ -2204,12 +2186,6 @@ } TEST_F(PasswordControllerTest, PasswordMetricsNoSavedCredentials) { - // TODO(crbug.com/1404697): Re-enable on iOS 14. This test is flaky on iOS 14, - // sometimes failing to finish loading the HTML. - if (!base::ios::IsRunningOnIOS15OrLater()) { - return; - } - base::HistogramTester histogram_tester; { ON_CALL(*store_, GetLogins)
diff --git a/ios/chrome/browser/ui/incognito_reauth/incognito_reauth_scene_agent_unittest.mm b/ios/chrome/browser/ui/incognito_reauth/incognito_reauth_scene_agent_unittest.mm index bf0be4e6..1161dc7 100644 --- a/ios/chrome/browser/ui/incognito_reauth/incognito_reauth_scene_agent_unittest.mm +++ b/ios/chrome/browser/ui/incognito_reauth/incognito_reauth_scene_agent_unittest.mm
@@ -25,6 +25,7 @@ @interface StubReauthenticationModule : NSObject <ReauthenticationProtocol> +@property(nonatomic, assign) BOOL canAttemptReauthWithBiometrics; @property(nonatomic, assign) BOOL canAttemptReauth; @property(nonatomic, assign) ReauthenticationResult returnedResult; @@ -87,6 +88,7 @@ void SetUp() override { // Set up default stub reauth module behavior. + stub_reauth_module_.canAttemptReauthWithBiometrics = YES; stub_reauth_module_.canAttemptReauth = YES; stub_reauth_module_.returnedResult = ReauthenticationResult::kSuccess; }
diff --git a/ios/chrome/browser/ui/settings/password/password_settings/BUILD.gn b/ios/chrome/browser/ui/settings/password/password_settings/BUILD.gn index 3c59a2a..bf6764c 100644 --- a/ios/chrome/browser/ui/settings/password/password_settings/BUILD.gn +++ b/ios/chrome/browser/ui/settings/password/password_settings/BUILD.gn
@@ -26,6 +26,7 @@ "//components/strings", "//ios/chrome/app/strings", "//ios/chrome/browser/passwords/model:store_factory", + "//ios/chrome/browser/passwords/model/metrics", "//ios/chrome/browser/shared/coordinator/chrome_coordinator", "//ios/chrome/browser/shared/model/application_context", "//ios/chrome/browser/shared/model/browser", @@ -108,6 +109,7 @@ "//components/password_manager/core/common:features", "//components/signin/public/identity_manager/objc", "//ios/chrome/browser/passwords/model:store_factory", + "//ios/chrome/browser/passwords/model/metrics", "//ios/chrome/browser/shared/coordinator/scene:scene_state_browser_agent", "//ios/chrome/browser/shared/coordinator/scene:scene_state_header", "//ios/chrome/browser/shared/model/browser/test:test_support",
diff --git a/ios/chrome/browser/ui/settings/password/password_settings/password_settings_coordinator.mm b/ios/chrome/browser/ui/settings/password/password_settings/password_settings_coordinator.mm index 76aee7f..23fe6bd 100644 --- a/ios/chrome/browser/ui/settings/password/password_settings/password_settings_coordinator.mm +++ b/ios/chrome/browser/ui/settings/password/password_settings/password_settings_coordinator.mm
@@ -17,6 +17,7 @@ #import "ios/chrome/browser/passwords/model/ios_chrome_account_password_store_factory.h" #import "ios/chrome/browser/passwords/model/ios_chrome_affiliation_service_factory.h" #import "ios/chrome/browser/passwords/model/ios_chrome_profile_password_store_factory.h" +#import "ios/chrome/browser/passwords/model/metrics/ios_password_manager_metrics.h" #import "ios/chrome/browser/shared/model/application_context/application_context.h" #import "ios/chrome/browser/shared/model/browser/browser.h" #import "ios/chrome/browser/shared/model/browser_state/chrome_browser_state.h" @@ -151,6 +152,11 @@ // Alert informing the user that passwords are being prepared for // export. UIAlertController* _preparingPasswordsAlert; + + // Whether the metric counting visits to the page was already recorded. + // Used to avoid over-recording the metric after each successful + // authentication. + BOOL _visitRecorded; } #pragma mark - ChromeCoordinator @@ -195,6 +201,12 @@ _mediator.consumer = _passwordSettingsViewController; _passwordSettingsViewController.delegate = _mediator; + // Only record visit if no auth is required, otherwise wait for successful + // auth. + if (_skipAuthenticationOnStart) { + [self maybeRecordVisitMetric]; + } + [self startReauthCoordinatorWithAuthOnStart:!_skipAuthenticationOnStart]; [self.baseViewController presentViewController:_settingsNavigationController @@ -540,7 +552,7 @@ - (void)successfulReauthenticationWithCoordinator: (ReauthenticationCoordinator*)coordinator { - // No-op. + [self maybeRecordVisitMetric]; } - (void)willPushReauthenticationViewController { @@ -691,4 +703,16 @@ [_mediator exportFlowCanceled]; } +// Logs a Password Settings visit. Only logs the first time it is invoked, no-op +// after that. +- (void)maybeRecordVisitMetric { + if (_visitRecorded) { + return; + } + + _visitRecorded = YES; + password_manager::LogPasswordManagerSurfaceVisit( + password_manager::PasswordManagerSurface::kPasswordSettings); +} + @end
diff --git a/ios/chrome/browser/ui/settings/password/password_settings/password_settings_coordinator_unittest.mm b/ios/chrome/browser/ui/settings/password/password_settings/password_settings_coordinator_unittest.mm index aa13b0f..685b3353 100644 --- a/ios/chrome/browser/ui/settings/password/password_settings/password_settings_coordinator_unittest.mm +++ b/ios/chrome/browser/ui/settings/password/password_settings/password_settings_coordinator_unittest.mm
@@ -8,10 +8,12 @@ #import "base/apple/foundation_util.h" #import "base/test/bind.h" #import "base/test/ios/wait_util.h" +#import "base/test/metrics/histogram_tester.h" #import "base/test/scoped_feature_list.h" #import "components/password_manager/core/browser/password_manager_test_utils.h" #import "components/password_manager/core/browser/password_store/test_password_store.h" #import "ios/chrome/browser/passwords/model/ios_chrome_profile_password_store_factory.h" +#import "ios/chrome/browser/passwords/model/metrics/ios_password_manager_metrics.h" #import "ios/chrome/browser/shared/coordinator/scene/scene_state.h" #import "ios/chrome/browser/shared/coordinator/scene/scene_state_browser_agent.h" #import "ios/chrome/browser/shared/model/browser/test/test_browser.h" @@ -123,6 +125,15 @@ isKindOfClass:[PasswordSettingsViewController class]]; } + // Verifies that a given number of password settings visits have been + // recorded. + void CheckPasswordSettingsVisitMetricsCount(int count) { + histogram_tester_.ExpectUniqueSample( + /*name=*/password_manager::kPasswordManagerSurfaceVisitHistogramName, + /*sample=*/password_manager::PasswordManagerSurface::kPasswordSettings, + /*count=*/count); + } + web::WebTaskEnvironment task_environment_; std::unique_ptr<ChromeBrowserState> browser_state_; std::unique_ptr<TestBrowser> browser_; @@ -133,28 +144,70 @@ std::unique_ptr<ScopedPasswordSettingsReauthModuleOverride> scoped_reauth_override_; base::test::ScopedFeatureList scoped_feature_list_; + base::HistogramTester histogram_tester_; PasswordSettingsCoordinator* coordinator_ = nil; ProtocolFake* fake_command_endpoint_ = nil; }; // Tests that Password Settings is presented without authentication required. TEST_F(PasswordSettingsCoordinatorTest, PasswordSettingsPresentedWithoutAuth) { + CheckPasswordSettingsVisitMetricsCount(0); + StartCoordinatorSkippingAuth(/*skip_auth_on_start=*/YES); ASSERT_TRUE(IsPasswordSettingsPresented()); + CheckPasswordSettingsVisitMetricsCount(1); } // Tests that Password Settings is presented only after passing authentication TEST_F(PasswordSettingsCoordinatorTest, PasswordSettingsPresentedWithAuth) { + CheckPasswordSettingsVisitMetricsCount(0); + StartCoordinatorSkippingAuth(/*skip_auth_on_start=*/NO); // Password Settings should be covered until auth is passed. ASSERT_FALSE(IsPasswordSettingsPresented()); + // No visits logged until auth is passed and the surface is uncovered. + CheckPasswordSettingsVisitMetricsCount(0); + [mock_reauth_module_ returnMockedReauthenticationResult]; // Successful auth should leave Password Settings visible. ASSERT_TRUE(IsPasswordSettingsPresented()); + CheckPasswordSettingsVisitMetricsCount(1); +} + +// Tests that Password Settings visits are only logged once after the first +// successful authentication. +TEST_F(PasswordSettingsCoordinatorTest, PasswordSettingsVisitRecordedOnlyOnce) { + CheckPasswordSettingsVisitMetricsCount(0); + + StartCoordinatorSkippingAuth(/*skip_auth_on_start=*/NO); + + // Password Settings should be covered until auth is passed. + ASSERT_FALSE(IsPasswordSettingsPresented()); + + // No visits logged until auth is passed and the surface is uncovered. + CheckPasswordSettingsVisitMetricsCount(0); + + [mock_reauth_module_ returnMockedReauthenticationResult]; + + // Successful auth should leave Password Settings visible. + ASSERT_TRUE(IsPasswordSettingsPresented()); + CheckPasswordSettingsVisitMetricsCount(1); + + // Simulate scene transitioning to the background and back to foreground. + // This should trigger an auth request. + scene_state_.activationLevel = SceneActivationLevelForegroundInactive; + scene_state_.activationLevel = SceneActivationLevelBackground; + scene_state_.activationLevel = SceneActivationLevelForegroundInactive; + scene_state_.activationLevel = SceneActivationLevelForegroundActive; + + [mock_reauth_module_ returnMockedReauthenticationResult]; + + // Validate no new visits were recorded. + CheckPasswordSettingsVisitMetricsCount(1); } } // namespace password_manager
diff --git a/ios/chrome/common/ui/reauthentication/reauthentication_module.mm b/ios/chrome/common/ui/reauthentication/reauthentication_module.mm index be0ed1c..25b7ee0 100644 --- a/ios/chrome/common/ui/reauthentication/reauthentication_module.mm +++ b/ios/chrome/common/ui/reauthentication/reauthentication_module.mm
@@ -46,6 +46,14 @@ return self; } +- (BOOL)canAttemptReauthWithBiometrics { + LAContext* context = _createLAContext(); + // The authentication method is Touch ID or Face ID. + return + [context canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics + error:nil]; +} + - (BOOL)canAttemptReauth { LAContext* context = _createLAContext(); // The authentication method is Touch ID, Face ID or passcode.
diff --git a/ios/chrome/common/ui/reauthentication/reauthentication_protocol.h b/ios/chrome/common/ui/reauthentication/reauthentication_protocol.h index 78ab00a..c540621e 100644 --- a/ios/chrome/common/ui/reauthentication/reauthentication_protocol.h +++ b/ios/chrome/common/ui/reauthentication/reauthentication_protocol.h
@@ -18,6 +18,9 @@ // Protocol for implementor of hardware reauthentication check. @protocol ReauthenticationProtocol <NSObject> +// Checks whether biometric authentication is enabled for the device. +- (BOOL)canAttemptReauthWithBiometrics; + // Checks whether Touch ID and/or passcode is enabled for the device. - (BOOL)canAttemptReauth;
diff --git a/ios/chrome/test/app/mock_reauthentication_module.h b/ios/chrome/test/app/mock_reauthentication_module.h index 17407e95..d21868f 100644 --- a/ios/chrome/test/app/mock_reauthentication_module.h +++ b/ios/chrome/test/app/mock_reauthentication_module.h
@@ -14,11 +14,16 @@ // Localized string containing the reason why reauthentication is requested. @property(nonatomic, copy) NSString* localizedReasonForAuthentication; +// Indicates whether the device is capable of reauthenticating the user with +// Biometric auth. +@property(nonatomic, assign) BOOL canAttemptWithBiometrics; + // Indicates whether the device is capable of reauthenticating the user. @property(nonatomic, assign) BOOL canAttempt; // Indicates whether (mock) authentication should succeed or not. Setting -// `shouldSucceed` to any value sets `canAttempt` to YES. +// `shouldSucceed` to any value sets `canAttemptWithBiometrics` and `canAttempt` +// to YES. @property(nonatomic, assign) ReauthenticationResult expectedResult; // Whether the mock module should return the mocked result when the
diff --git a/ios/chrome/test/app/mock_reauthentication_module.mm b/ios/chrome/test/app/mock_reauthentication_module.mm index 516ea59..f841253 100644 --- a/ios/chrome/test/app/mock_reauthentication_module.mm +++ b/ios/chrome/test/app/mock_reauthentication_module.mm
@@ -24,6 +24,7 @@ @synthesize localizedReasonForAuthentication = _localizedReasonForAuthentication; @synthesize expectedResult = _expectedResult; +@synthesize canAttemptWithBiometrics = _canAttemptWithBiometrics; @synthesize canAttempt = _canAttempt; - (instancetype)init { @@ -35,10 +36,15 @@ } - (void)setExpectedResult:(ReauthenticationResult)expectedResult { + _canAttemptWithBiometrics = YES; _canAttempt = YES; _expectedResult = expectedResult; } +- (BOOL)canAttemptReauthWithBiometrics { + return _canAttemptWithBiometrics; +} + - (BOOL)canAttemptReauth { return _canAttempt; }
diff --git a/ios_internal b/ios_internal index ecf8e20..336634f 160000 --- a/ios_internal +++ b/ios_internal
@@ -1 +1 @@ -Subproject commit ecf8e2050b8a7009150675fc1b259f808bc8be22 +Subproject commit 336634f2246380561870be044ecf8afff386577d
diff --git a/ipc/ipc_channel_mojo_unittest.cc b/ipc/ipc_channel_mojo_unittest.cc index 0074d4a..712c222 100644 --- a/ipc/ipc_channel_mojo_unittest.cc +++ b/ipc/ipc_channel_mojo_unittest.cc
@@ -28,6 +28,7 @@ #include "base/message_loop/message_pump_type.h" #include "base/path_service.h" #include "base/pickle.h" +#include "base/process/process.h" #include "base/run_loop.h" #include "base/synchronization/waitable_event.h" #include "base/task/single_thread_task_runner.h" @@ -53,6 +54,7 @@ #include "mojo/public/cpp/bindings/associated_remote.h" #include "mojo/public/cpp/bindings/lib/validation_errors.h" #include "mojo/public/cpp/bindings/pending_associated_receiver.h" +#include "mojo/public/cpp/bindings/self_owned_associated_receiver.h" #include "mojo/public/cpp/bindings/urgent_message_scope.h" #include "mojo/public/cpp/system/functions.h" #include "mojo/public/cpp/system/wait.h" @@ -1252,7 +1254,9 @@ void set_driver(IPC::mojom::SimpleTestDriver* driver) { driver_ = driver; } void set_sync_sender(IPC::Sender* sync_sender) { sync_sender_ = sync_sender; } - void WaitForValueRequest() { + void WaitForValueRequest() { Run(); } + + void Run() { run_loop_ = std::make_unique<base::RunLoop>(); run_loop_->Run(); } @@ -1281,6 +1285,32 @@ run_loop_->Quit(); } + // No implementation needed. Only called on an endpoint which never binds its + // receiver. + void BindSync( + mojo::PendingAssociatedReceiver<IPC::mojom::SimpleTestClient> receiver, + BindSyncCallback callback) override { + NOTREACHED(); + } + + void GetReceiverWithQueuedSyncMessage( + GetReceiverWithQueuedSyncMessageCallback callback) override { + // Immediately send back a sync IPC over the new pipe and expect the call to + // be interrupted without a reply. Note that we also reply *before* issuing + // the sync call to allow the main test process to make progress. + mojo::AssociatedRemote<IPC::mojom::SimpleTestClient> remote; + mojo::PendingAssociatedReceiver<IPC::mojom::SimpleTestClient> + queued_receiver; + { + // The nested receiver we send will already know its peer is closed when + // it arrives. + mojo::AssociatedRemote<IPC::mojom::SimpleTestClient> unused; + queued_receiver = unused.BindNewEndpointAndPassReceiver(); + } + std::move(callback).Run(remote.BindNewEndpointAndPassReceiver()); + EXPECT_FALSE(remote->BindSync(std::move(queued_receiver))); + } + // IPC::Listener: bool OnMessageReceived(const IPC::Message& message) override { int32_t response; @@ -1351,6 +1381,92 @@ DestroyProxy(); } +TEST_F(IPCChannelProxyMojoTest, SyncAssociatedInterfacePipeError) { + // Regression test for https://crbug.com/1494461. + + Init("SyncAssociatedInterfacePipeError"); + + ListenerWithSyncAssociatedInterface listener; + CreateProxy(&listener); + listener.set_sync_sender(proxy()); + RunProxy(); + + mojo::AssociatedRemote<IPC::mojom::SimpleTestClient> client; + proxy()->GetRemoteAssociatedInterface( + client.BindNewEndpointAndPassReceiver()); + + mojo::AssociatedRemote<IPC::mojom::Terminator> terminator; + proxy()->GetRemoteAssociatedInterface( + terminator.BindNewEndpointAndPassReceiver()); + + // The setup here is to have the client process add a new associated endpoint + // with a sync message queued on it, towards us. As soon as we receive the + // endpoint we close it, but its state (including its inbound sync message + // queue) isn't actually destroyed until the peer is closed too. + // + // Note that the client creates the endpoint rather than us, because client + // endpoints are assigned lower interface IDs and will thus elicit the + // necessary endpoint ordering to trigger https://crbug.com/1494461 below. + { + base::RunLoop loop; + client->GetReceiverWithQueuedSyncMessage(base::BindLambdaForTesting( + [&loop](mojo::PendingAssociatedReceiver<IPC::mojom::SimpleTestClient> + receiver) { loop.Quit(); })); + loop.Run(); + } + + // If https://crbug.com/1494461 is present, it should be hit within this call, + // as soon as client termination signals a local pipe error and marks the + // above endpoint's peer as closed. + EXPECT_FALSE(terminator->Terminate()); + +#if BUILDFLAG(IS_ANDROID) + // NOTE: On Android, the client's forced termination will look like an error, + // but it is not. + WaitForClientShutdown(); +#else + EXPECT_TRUE(WaitForClientShutdown()); +#endif + + DestroyProxy(); +} + +class TerminatorImpl : public IPC::mojom::Terminator { + public: + TerminatorImpl() = default; + ~TerminatorImpl() override = default; + + static void Create( + mojo::PendingAssociatedReceiver<IPC::mojom::Terminator> receiver) { + mojo::MakeSelfOwnedAssociatedReceiver(std::make_unique<TerminatorImpl>(), + std::move(receiver)); + } + + // IPC::mojom::Terminator: + void Terminate(TerminateCallback callback) override { + base::Process::TerminateCurrentProcessImmediately(0); + } +}; + +DEFINE_IPC_CHANNEL_MOJO_TEST_CLIENT_WITH_CUSTOM_FIXTURE( + SyncAssociatedInterfacePipeError, + ChannelProxyClient) { + SimpleTestClientImpl client_impl; + CreateProxy(&client_impl); + + // Let the IO thread receive a message to self-terminate this process. This + // is used to forcibly shut down the client on the test's request. Without + // doing this (and doing a clean shutdown instead) the client will clean up + // interfaces and make it impossible to trigger the regression path for + // https://crbug.com/1494461. + proxy()->AddAssociatedInterfaceForIOThread( + base::BindRepeating(&TerminatorImpl::Create)); + + RunProxy(); + client_impl.Run(); + DestroyProxy(); +} + TEST_F(IPCChannelProxyMojoTest, Pause) { // Ensures that pausing a channel elicits the expected behavior when sending // messages, unpausing, sending more messages, and then manually flushing.
diff --git a/ipc/ipc_mojo_bootstrap.cc b/ipc/ipc_mojo_bootstrap.cc index 558f2ea3..360901a 100644 --- a/ipc/ipc_mojo_bootstrap.cc +++ b/ipc/ipc_mojo_bootstrap.cc
@@ -827,13 +827,12 @@ // handle. DCHECK(!endpoint->client()); DCHECK(endpoint->peer_closed()); - MarkClosedAndMaybeRemove(endpoint); + MarkClosed(endpoint); } else { - MarkPeerClosedAndMaybeRemove(endpoint); + MarkPeerClosed(endpoint); } } - - DCHECK(endpoints_.empty()); + endpoints_.clear(); GetMemoryDumpProvider().RemoveController(this); } @@ -878,15 +877,19 @@ base::AutoLock locker(lock_); encountered_error_ = true; + std::vector<uint32_t> endpoints_to_remove; std::vector<scoped_refptr<Endpoint>> endpoints_to_notify; for (auto iter = endpoints_.begin(); iter != endpoints_.end();) { Endpoint* endpoint = iter->second.get(); ++iter; - if (endpoint->client()) + if (endpoint->client()) { endpoints_to_notify.push_back(endpoint); + } - MarkPeerClosedAndMaybeRemove(endpoint); + if (MarkPeerClosed(endpoint)) { + endpoints_to_remove.push_back(endpoint->id()); + } } for (auto& endpoint : endpoints_to_notify) { @@ -895,6 +898,10 @@ if (endpoint->client()) NotifyEndpointOfError(endpoint.get(), false /* force_async */); } + + for (uint32_t id : endpoints_to_remove) { + endpoints_.erase(id); + } } void NotifyEndpointOfError(Endpoint* endpoint, bool force_async) { @@ -933,19 +940,33 @@ NotifyEndpointOfError(endpoint, false /* force_async */); } - void MarkClosedAndMaybeRemove(Endpoint* endpoint) { + // Marks `endpoint` as closed and returns true if and only if its peer was + // also already closed. + bool MarkClosed(Endpoint* endpoint) { lock_.AssertAcquired(); endpoint->set_closed(); - if (endpoint->closed() && endpoint->peer_closed()) - endpoints_.erase(endpoint->id()); + return endpoint->peer_closed(); } - void MarkPeerClosedAndMaybeRemove(Endpoint* endpoint) { + // Marks `endpoint` as having a closed peer and returns true if and only if + // `endpoint` itself was also already closed. + bool MarkPeerClosed(Endpoint* endpoint) { lock_.AssertAcquired(); endpoint->set_peer_closed(); endpoint->SignalSyncMessageEvent(); - if (endpoint->closed() && endpoint->peer_closed()) + return endpoint->closed(); + } + + void MarkClosedAndMaybeRemove(Endpoint* endpoint) { + if (MarkClosed(endpoint)) { endpoints_.erase(endpoint->id()); + } + } + + void MarkPeerClosedAndMaybeRemove(Endpoint* endpoint) { + if (MarkPeerClosed(endpoint)) { + endpoints_.erase(endpoint->id()); + } } Endpoint* FindOrInsertEndpoint(mojo::InterfaceId id, bool* inserted) {
diff --git a/ipc/ipc_test.mojom b/ipc/ipc_test.mojom index 3d22218..f20aaea 100644 --- a/ipc/ipc_test.mojom +++ b/ipc/ipc_test.mojom
@@ -16,9 +16,19 @@ RequestQuit() => (); }; +interface Terminator { + [Sync] Terminate() => (); +}; + interface SimpleTestClient { [Sync] RequestValue() => (int32 value); + + [Sync] + BindSync(pending_associated_receiver<SimpleTestClient> receiver) => (); + + GetReceiverWithQueuedSyncMessage() => + (pending_associated_receiver<SimpleTestClient> receiver); }; interface PingReceiver {
diff --git a/media/base/mime_util.h b/media/base/mime_util.h index 4f23e22..e536fc0 100644 --- a/media/base/mime_util.h +++ b/media/base/mime_util.h
@@ -8,7 +8,7 @@ #include <string> #include <vector> -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "media/base/audio_codecs.h" #include "media/base/media_export.h" #include "media/base/video_codecs.h"
diff --git a/media/base/mime_util_internal.h b/media/base/mime_util_internal.h index 646c15d0..8b77c5e 100644 --- a/media/base/mime_util_internal.h +++ b/media/base/mime_util_internal.h
@@ -10,7 +10,7 @@ #include "base/containers/flat_map.h" #include "base/containers/flat_set.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "build/build_config.h" #include "media/base/media_export.h" #include "media/base/mime_util.h"
diff --git a/media/base/video_codecs.h b/media/base/video_codecs.h index d544897..d38d37f 100644 --- a/media/base/video_codecs.h +++ b/media/base/video_codecs.h
@@ -8,7 +8,7 @@ #include <stdint.h> #include <string> -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "media/base/media_export.h" #include "media/media_buildflags.h"
diff --git a/media/filters/hls_data_source_provider.h b/media/filters/hls_data_source_provider.h index d5cdf37..9270244 100644 --- a/media/filters/hls_data_source_provider.h +++ b/media/filters/hls_data_source_provider.h
@@ -9,7 +9,7 @@ #include <memory> #include "base/functional/callback.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/types/id_type.h" #include "media/base/media_export.h" #include "media/base/status.h"
diff --git a/media/filters/stream_parser_factory.h b/media/filters/stream_parser_factory.h index 14a550b..6361cd0 100644 --- a/media/filters/stream_parser_factory.h +++ b/media/filters/stream_parser_factory.h
@@ -10,7 +10,7 @@ #include <vector> #include "base/containers/span.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "media/base/media_export.h" #include "media/base/media_log.h" #include "media/base/mime_util.h"
diff --git a/media/formats/hls/media_playlist_fuzzer.cc b/media/formats/hls/media_playlist_fuzzer.cc index f05c8cfc..2afddee9 100644 --- a/media/formats/hls/media_playlist_fuzzer.cc +++ b/media/formats/hls/media_playlist_fuzzer.cc
@@ -11,7 +11,6 @@ #include "base/i18n/icu_util.h" #include "base/memory/scoped_refptr.h" #include "base/strings/string_piece.h" -#include "base/strings/string_piece_forward.h" #include "media/formats/hls/media_playlist.h" #include "media/formats/hls/multivariant_playlist.h" #include "media/formats/hls/playlist.h"
diff --git a/media/formats/hls/playlist_unittest.cc b/media/formats/hls/playlist_unittest.cc index e9df946..6546284 100644 --- a/media/formats/hls/playlist_unittest.cc +++ b/media/formats/hls/playlist_unittest.cc
@@ -5,7 +5,7 @@ #include "media/formats/hls/playlist.h" #include "base/location.h" #include "base/strings/string_number_conversions.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "media/formats/hls/parse_status.h" #include "media/formats/hls/tag_name.h" #include "media/formats/hls/types.h"
diff --git a/media/formats/mp4/writable_box_definitions.h b/media/formats/mp4/writable_box_definitions.h index 2624551d7..3898567 100644 --- a/media/formats/mp4/writable_box_definitions.h +++ b/media/formats/mp4/writable_box_definitions.h
@@ -129,7 +129,7 @@ SampleDescription(const SampleDescription&); SampleDescription& operator=(const SampleDescription&); - uint32_t entry_count; + uint32_t entry_count = 0; #if BUILDFLAG(USE_PROPRIETARY_CODECS) absl::optional<VisualSampleEntry> visual_sample_entry; @@ -209,7 +209,7 @@ struct MEDIA_EXPORT MediaHeader : FullBox { base::Time creation_time; base::Time modification_time; - uint32_t timescale; + uint32_t timescale = 0; base::TimeDelta duration; std::string language; // 3 letters code ISO-639-2/T language. }; @@ -239,10 +239,10 @@ // Track Extends (`trex`) box. struct MEDIA_EXPORT TrackExtends : FullBox { - uint32_t track_id; - uint32_t default_sample_description_index; + uint32_t track_id = 0; + uint32_t default_sample_description_index = 0; base::TimeDelta default_sample_duration; - uint32_t default_sample_size; + uint32_t default_sample_size = 0; // The sample flags field in sample fragments is coded as a 32-bit value. // bit(4) reserved=0; @@ -253,7 +253,7 @@ // bit(3) sample_padding_value; // bit(1) sample_is_non_sync_sample; // unsigned int(16) sample_degradation_priority; - uint32_t default_sample_flags; + uint32_t default_sample_flags = 0; }; // Movie Extends (`mvex`) box. @@ -274,9 +274,9 @@ base::Time modification_time; // This is the number of time units that pass in one second. - uint32_t timescale; + uint32_t timescale = 0; base::TimeDelta duration; - uint32_t next_track_id; + uint32_t next_track_id = 0; }; // Movie (`moov`) box. @@ -368,10 +368,10 @@ // Movie Track Fragment Random Access Box Entry. struct TrackFragmentRandomAccessEntry { base::TimeDelta time; - uint64_t moof_offset; - uint32_t traf_number; - uint32_t trun_number; - uint32_t sample_number; + uint64_t moof_offset = 0; + uint32_t traf_number = 0; + uint32_t trun_number = 0; + uint32_t sample_number = 0; }; // Movie Track Fragment Random Access Box (`tfra`) box.
diff --git a/media/gpu/mac/video_toolbox_vp9_accelerator.cc b/media/gpu/mac/video_toolbox_vp9_accelerator.cc index 6b30709..ee154e7 100644 --- a/media/gpu/mac/video_toolbox_vp9_accelerator.cc +++ b/media/gpu/mac/video_toolbox_vp9_accelerator.cc
@@ -78,14 +78,6 @@ return false; } -bool VideoToolboxVP9Accelerator::GetFrameContext(scoped_refptr<VP9Picture> pic, - Vp9FrameContext* frame_ctx) { - DVLOG(4) << __func__; - DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); - // Not called because SupportsContextProbabilityReadback() returns false. - NOTREACHED_NORETURN(); -} - bool VideoToolboxVP9Accelerator::ProcessFrame(scoped_refptr<VP9Picture> pic) { DVLOG(4) << __func__; DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
diff --git a/media/gpu/mac/video_toolbox_vp9_accelerator.h b/media/gpu/mac/video_toolbox_vp9_accelerator.h index 33f0941..98f4525 100644 --- a/media/gpu/mac/video_toolbox_vp9_accelerator.h +++ b/media/gpu/mac/video_toolbox_vp9_accelerator.h
@@ -56,8 +56,6 @@ const Vp9ReferenceFrameVector& reference_frames) override; bool OutputPicture(scoped_refptr<VP9Picture> pic) override; bool NeedsCompressedHeaderParsed() const override; - bool GetFrameContext(scoped_refptr<VP9Picture> pic, - Vp9FrameContext* frame_ctx) override; private: // Grow the current superframe.
diff --git a/media/gpu/v4l2/stateless/device.cc b/media/gpu/v4l2/stateless/device.cc index f59fa281..6f2635e 100644 --- a/media/gpu/v4l2/stateless/device.cc +++ b/media/gpu/v4l2/stateless/device.cc
@@ -155,6 +155,44 @@ return VideoCodec::kUnknown; } +absl::optional<BufferFormat> V4L2FormatToBufferFormat( + const struct v4l2_format& format) { + const auto fourcc = Fourcc::FromV4L2PixFmt(format.fmt.pix_mp.pixelformat); + if (!fourcc) { + return absl::nullopt; + } + + const gfx::Size resolution = + gfx::Size(format.fmt.pix_mp.width, format.fmt.pix_mp.height); + BufferFormat buffer_format = + BufferFormat(fourcc.value(), resolution, V4L2ToBufferType(format.type)); + + if (buffer_format.buffer_type == BufferType::kInvalid) { + DVLOGF(1) << "Invalid V4L2 buffer type (" << format.type << ")."; + } + for (size_t i = 0; i < format.fmt.pix_mp.num_planes; ++i) { + const v4l2_plane_pix_format& plane_format = format.fmt.pix_mp.plane_fmt[i]; + buffer_format.planes.emplace_back(plane_format.bytesperline, + plane_format.sizeimage); + } + return buffer_format; +} + +void BufferFormatToV4L2Format(struct v4l2_format& v_format, + const BufferFormat& b_format) { + memset(&v_format, 0, sizeof(v_format)); + + v_format.type = BufferTypeToV4L2(b_format.buffer_type); + v_format.fmt.pix_mp.pixelformat = b_format.fourcc.ToV4L2PixFmt(); + v_format.fmt.pix_mp.width = b_format.resolution.width(); + v_format.fmt.pix_mp.height = b_format.resolution.height(); + uint32_t i = 0; + for (const auto& plane : b_format.planes) { + v_format.fmt.pix_mp.plane_fmt[i].bytesperline = plane.stride; + v_format.fmt.pix_mp.plane_fmt[i].sizeimage = plane.image_size; + ++i; + } +} } // namespace Device::Device() {} @@ -203,6 +241,15 @@ Buffer::~Buffer() {} +BufferFormat::BufferFormat(Fourcc fourcc, + gfx::Size resolution, + BufferType buffer_type) + : fourcc(fourcc), resolution(resolution), buffer_type(buffer_type) {} + +BufferFormat::BufferFormat(const BufferFormat& other) = default; + +BufferFormat::~BufferFormat() {} + void Device::Close() { device_fd_.reset(); } @@ -212,7 +259,7 @@ std::set<VideoCodec> pix_fmts; v4l2_fmtdesc fmtdesc = {.type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE}; for (; IoctlDevice(VIDIOC_ENUM_FMT, &fmtdesc) == kIoctlOk; ++fmtdesc.index) { - DVLOGF(4) << "Enumerated codec: " + DVLOGF(4) << "Enumerated input format: " << media::FourccToString(fmtdesc.pixelformat) << " (" << fmtdesc.description << ")"; VideoCodec enumerated_codec = V4L2PixFmtToVideoCodec(fmtdesc.pixelformat); @@ -226,6 +273,52 @@ return pix_fmts; } +// VIDIOC_G_FMT +absl::optional<BufferFormat> Device::GetOutputFormat() { + DVLOGF(4); + struct v4l2_format format; + memset(&format, 0, sizeof(format)); + format.type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; + + if (IoctlDevice(VIDIOC_G_FMT, &format) != kIoctlOk) { + return absl::nullopt; + } + + return V4L2FormatToBufferFormat(format); +} + +absl::optional<BufferFormat> Device::TrySetOutputFormat( + int request, + const BufferFormat& format) { + DVLOGF(4); + struct v4l2_format v_format; + + BufferFormatToV4L2Format(v_format, format); + + if (IoctlDevice(request, &v_format) != kIoctlOk) { + return absl::nullopt; + } + + if (format.fourcc.ToV4L2PixFmt() != v_format.fmt.pix_mp.pixelformat) { + DVLOGF(1) << "Format tried is not the format returned."; + return absl::nullopt; + } + + return V4L2FormatToBufferFormat(v_format); +} + +absl::optional<BufferFormat> Device::TryOutputFormat( + const BufferFormat& format) { + DVLOGF(4); + return TrySetOutputFormat(VIDIOC_TRY_FMT, format); +} + +absl::optional<BufferFormat> Device::SetOutputFormat( + const BufferFormat& format) { + DVLOGF(4); + return TrySetOutputFormat(VIDIOC_S_FMT, format); +} + // VIDIOC_S_FMT bool Device::SetInputFormat(VideoCodec codec, gfx::Size resolution,
diff --git a/media/gpu/v4l2/stateless/device.h b/media/gpu/v4l2/stateless/device.h index 988a814..1eb0041 100644 --- a/media/gpu/v4l2/stateless/device.h +++ b/media/gpu/v4l2/stateless/device.h
@@ -14,6 +14,7 @@ #include "base/memory/raw_ptr.h" #include "base/memory/ref_counted.h" #include "media/base/video_codecs.h" +#include "media/gpu/chromeos/fourcc.h" #include "media/gpu/media_gpu_export.h" #include "third_party/abseil-cpp/absl/types/optional.h" #include "ui/gfx/geometry/size.h" @@ -74,6 +75,34 @@ std::vector<Plane> planes_; }; +class PlaneFormat { + public: + PlaneFormat(uint32_t stride, uint32_t image_size) + : stride(stride), image_size(image_size) {} + // Width of decompressed frame in bytes. It must be equal to or larger than + // the size of the displayed image. This allows the internal buffers to be + // better aligned for reading/writing/caching, etc. + uint32_t stride; + // Size of the buffer to hold the data passed back and forth to the driver. + // When the buffer is compressed this will be the size of the compressed data + // in bytes. When the buffer is uncompressed this will be stride * height + // of the plane. + uint32_t image_size; +}; + +class BufferFormat { + public: + BufferFormat(Fourcc fourcc, gfx::Size resolution, BufferType buffer_type); + BufferFormat(const BufferFormat& other); + ~BufferFormat(); + + uint32_t NumPlanes() const { return planes.size(); } + Fourcc fourcc; + gfx::Size resolution; + std::vector<PlaneFormat> planes; + BufferType buffer_type; +}; + // Encapsulates the v4l2 subsystem and prevents <linux/videodev2.h> from // being included elsewhere with the possible exception of the codec specific // delegates. This keeps all of the v4l2 driver specific structures in one @@ -94,6 +123,14 @@ gfx::Size resolution, size_t encoded_buffer_size); + // To negotiate an output format the format must first be retrieved from + // the driver via |GetOutputFormat|. If the desired format does not match + // up with the retrieved format, |TryOutputFormat| and |SetOutputFormat| are + // used. + absl::optional<BufferFormat> GetOutputFormat(); + absl::optional<BufferFormat> TryOutputFormat(const BufferFormat& format); + absl::optional<BufferFormat> SetOutputFormat(const BufferFormat& format); + // Stops streaming on the |type| of buffer using the VIDIOC_STREAMOFF ioctl. bool StreamOff(BufferType type); @@ -142,6 +179,12 @@ // The actual device fd. base::ScopedFD device_fd_; + // |TryOutputFormat| and |SetOutputFormat| are identical calls, with the + // difference being that |TryOutputFormat| does not change the state of the + // driver while |SetOutputFormat| does. + absl::optional<BufferFormat> TrySetOutputFormat(int request, + const BufferFormat& format); + protected: virtual ~Device(); int Ioctl(const base::ScopedFD& fd, uint64_t request, void* arg);
diff --git a/media/gpu/v4l2/stateless/queue.cc b/media/gpu/v4l2/stateless/queue.cc index d77c7b8..901a04dc 100644 --- a/media/gpu/v4l2/stateless/queue.cc +++ b/media/gpu/v4l2/stateless/queue.cc
@@ -148,4 +148,79 @@ // performance tuning is done. return 8; } + +std::unique_ptr<OutputQueue> OutputQueue::Create( + scoped_refptr<StatelessDevice> device) { + std::unique_ptr<OutputQueue> queue = std::make_unique<OutputQueue>(device); + + if (!queue->NegotiateFormat()) { + return nullptr; + } + + return queue; +} + +OutputQueue::OutputQueue(scoped_refptr<StatelessDevice> device) + : BaseQueue(device, BufferType::kRawFrames, MemoryType::kMemoryMapped), + buffer_format_(BufferFormat(Fourcc(Fourcc::UNDEFINED), + gfx::Size(0, 0), + BufferType::kRawFrames)) {} + +bool OutputQueue::NegotiateFormat() { + DVLOGF(4); + CHECK(device_); + + // should also have associated number of planes, or are they all 2? + constexpr Fourcc kPreferredFormats[] = { + Fourcc(Fourcc::NV12), Fourcc(Fourcc::MM21), Fourcc(Fourcc::MT2T)}; + + const auto initial_format = device_->GetOutputFormat(); + if (!initial_format) { + return false; + } + + if (!base::Contains(kPreferredFormats, initial_format->fourcc)) { + for (const auto& preferred_fourcc : kPreferredFormats) { + BufferFormat try_format = *initial_format; + try_format.fourcc = preferred_fourcc; + if (device_->TryOutputFormat(try_format)) { + auto chosen_format = device_->SetOutputFormat(try_format); + if (chosen_format) { + DVLOGF(2) << "Preferred format " << chosen_format->fourcc.ToString() + << " choosen for output queue through negotiation. " + << "Initial format was " + << initial_format->fourcc.ToString() << "."; + buffer_format_ = *chosen_format; + return true; + } else { + return false; + } + } + } + } else { + DVLOGF(2) << "Initial format " << initial_format->fourcc.ToString() + << " choosen for output queue."; + auto chosen_format = device_->SetOutputFormat(*initial_format); + if (chosen_format) { + buffer_format_ = *chosen_format; + return true; + } + } + + return false; +} + +bool OutputQueue::PrepareBuffers() { + DVLOGF(4); + return AllocateBuffers(buffer_format_.NumPlanes()); +} + +std::string OutputQueue::Description() { + return "output"; +} + +uint32_t OutputQueue::BufferMinimumCount() { + return 4; +} + } // namespace media
diff --git a/media/gpu/v4l2/stateless/queue.h b/media/gpu/v4l2/stateless/queue.h index 266f4ab..e317e6e9 100644 --- a/media/gpu/v4l2/stateless/queue.h +++ b/media/gpu/v4l2/stateless/queue.h
@@ -69,5 +69,21 @@ VideoCodec codec_; }; +class MEDIA_GPU_EXPORT OutputQueue : public BaseQueue { + public: + static std::unique_ptr<OutputQueue> Create( + scoped_refptr<StatelessDevice> device); + + OutputQueue(scoped_refptr<StatelessDevice> device); + bool NegotiateFormat(); + bool PrepareBuffers() override; + + private: + std::string Description() override; + uint32_t BufferMinimumCount() override; + + BufferFormat buffer_format_; +}; + } // namespace media #endif // MEDIA_GPU_V4L2_STATELESS_QUEUE_H_
diff --git a/media/gpu/v4l2/stateless/v4l2_stateless_video_decoder.cc b/media/gpu/v4l2/stateless/v4l2_stateless_video_decoder.cc index 48850ab..300f2f8 100644 --- a/media/gpu/v4l2/stateless/v4l2_stateless_video_decoder.cc +++ b/media/gpu/v4l2/stateless/v4l2_stateless_video_decoder.cc
@@ -170,15 +170,28 @@ size_t size, int32_t bitstream_id) { DVLOGF(4); - if (!input_queue_->PrepareBuffers()) { - return false; - } - input_queue_->StartStreaming(); + if (!output_queue_) { + if (!input_queue_->PrepareBuffers()) { + return false; + } + input_queue_->StartStreaming(); - // The header needs to be parsed before the video resolution and format - // can be decided. - if (!device_->SetHeaders(ctrls, base::ScopedFD(-1))) { - return false; + // The header needs to be parsed before the video resolution and format + // can be decided. + if (!device_->SetHeaders(ctrls, base::ScopedFD(-1))) { + return false; + } + + output_queue_ = OutputQueue::Create(device_); + if (!output_queue_) { + return false; + } + + if (!output_queue_->PrepareBuffers()) { + return false; + } + + output_queue_->StartStreaming(); } return true;
diff --git a/media/gpu/v4l2/stateless/v4l2_stateless_video_decoder.h b/media/gpu/v4l2/stateless/v4l2_stateless_video_decoder.h index ded9ffc..9793d52 100644 --- a/media/gpu/v4l2/stateless/v4l2_stateless_video_decoder.h +++ b/media/gpu/v4l2/stateless/v4l2_stateless_video_decoder.h
@@ -102,7 +102,10 @@ // Video decoder used to parse stream headers by software. std::unique_ptr<AcceleratedVideoDecoder> decoder_; + // Queue to hold compressed bitstream buffers to be submitted to the hardware std::unique_ptr<InputQueue> input_queue_; + // Queue to hold uncompressed image buffers returned by the hardware + std::unique_ptr<OutputQueue> output_queue_; // Int32 safe ID generator, starting at 0. Generated IDs are used to uniquely // identify a Decode() request for stateless backends. BitstreamID is just
diff --git a/media/gpu/v4l2/stateless/vp9_delegate.cc b/media/gpu/v4l2/stateless/vp9_delegate.cc index 1ef2e4d..8403493d 100644 --- a/media/gpu/v4l2/stateless/vp9_delegate.cc +++ b/media/gpu/v4l2/stateless/vp9_delegate.cc
@@ -300,12 +300,6 @@ return true; } -bool VP9Delegate::GetFrameContext(scoped_refptr<VP9Picture> pic, - Vp9FrameContext* frame_ctx) { - NOTIMPLEMENTED() << "Frame context update not supported"; - return false; -} - bool VP9Delegate::NeedsCompressedHeaderParsed() const { return supports_compressed_header_; }
diff --git a/media/gpu/v4l2/stateless/vp9_delegate.h b/media/gpu/v4l2/stateless/vp9_delegate.h index 6a6db22..6eb04ec 100644 --- a/media/gpu/v4l2/stateless/vp9_delegate.h +++ b/media/gpu/v4l2/stateless/vp9_delegate.h
@@ -30,8 +30,6 @@ const Vp9LoopFilterParams& lf_params, const Vp9ReferenceFrameVector& reference_frames) override; bool OutputPicture(scoped_refptr<VP9Picture> pic) override; - bool GetFrameContext(scoped_refptr<VP9Picture> pic, - Vp9FrameContext* frame_ctx) override; bool NeedsCompressedHeaderParsed() const override; private:
diff --git a/media/gpu/v4l2/v4l2_video_decoder_delegate_vp9.cc b/media/gpu/v4l2/v4l2_video_decoder_delegate_vp9.cc index 953a2ca..9716e60 100644 --- a/media/gpu/v4l2/v4l2_video_decoder_delegate_vp9.cc +++ b/media/gpu/v4l2/v4l2_video_decoder_delegate_vp9.cc
@@ -331,12 +331,6 @@ return true; } -bool V4L2VideoDecoderDelegateVP9::GetFrameContext(scoped_refptr<VP9Picture> pic, - Vp9FrameContext* frame_ctx) { - NOTIMPLEMENTED() << "Frame context update not supported"; - return false; -} - bool V4L2VideoDecoderDelegateVP9::NeedsCompressedHeaderParsed() const { return supports_compressed_header_; }
diff --git a/media/gpu/v4l2/v4l2_video_decoder_delegate_vp9.h b/media/gpu/v4l2/v4l2_video_decoder_delegate_vp9.h index 125c0af8..304060f 100644 --- a/media/gpu/v4l2/v4l2_video_decoder_delegate_vp9.h +++ b/media/gpu/v4l2/v4l2_video_decoder_delegate_vp9.h
@@ -33,8 +33,6 @@ const Vp9LoopFilterParams& lf_params, const Vp9ReferenceFrameVector& reference_frames) override; bool OutputPicture(scoped_refptr<VP9Picture> pic) override; - bool GetFrameContext(scoped_refptr<VP9Picture> pic, - Vp9FrameContext* frame_ctx) override; bool NeedsCompressedHeaderParsed() const override; private:
diff --git a/media/gpu/vaapi/vp9_vaapi_video_decoder_delegate.cc b/media/gpu/vaapi/vp9_vaapi_video_decoder_delegate.cc index 4614157e..c00a91016 100644 --- a/media/gpu/vaapi/vp9_vaapi_video_decoder_delegate.cc +++ b/media/gpu/vaapi/vp9_vaapi_video_decoder_delegate.cc
@@ -302,14 +302,6 @@ return false; } -bool VP9VaapiVideoDecoderDelegate::GetFrameContext( - scoped_refptr<VP9Picture> pic, - Vp9FrameContext* frame_ctx) { - DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); - NOTIMPLEMENTED() << "Frame context update not supported"; - return false; -} - void VP9VaapiVideoDecoderDelegate::OnVAContextDestructionSoon() { // Destroy the member ScopedVABuffers below since they refer to a VAContextID // that will be destroyed soon.
diff --git a/media/gpu/vaapi/vp9_vaapi_video_decoder_delegate.h b/media/gpu/vaapi/vp9_vaapi_video_decoder_delegate.h index 33986fc..8fd2931 100644 --- a/media/gpu/vaapi/vp9_vaapi_video_decoder_delegate.h +++ b/media/gpu/vaapi/vp9_vaapi_video_decoder_delegate.h
@@ -43,8 +43,6 @@ bool OutputPicture(scoped_refptr<VP9Picture> pic) override; bool NeedsCompressedHeaderParsed() const override; - bool GetFrameContext(scoped_refptr<VP9Picture> pic, - Vp9FrameContext* frame_ctx) override; // VaapiVideoDecoderDelegate impl. void OnVAContextDestructionSoon() override;
diff --git a/media/gpu/vp9_decoder.cc b/media/gpu/vp9_decoder.cc index f6e2506..c08be08a 100644 --- a/media/gpu/vp9_decoder.cc +++ b/media/gpu/vp9_decoder.cc
@@ -361,21 +361,6 @@ } } -void VP9Decoder::UpdateFrameContext( - scoped_refptr<VP9Picture> pic, - Vp9Parser::ContextRefreshCallback context_refresh_cb) { - DCHECK(context_refresh_cb); - Vp9FrameContext frame_ctx; - memset(&frame_ctx, 0, sizeof(frame_ctx)); - - if (!accelerator_->GetFrameContext(std::move(pic), &frame_ctx)) { - SetError(); - return; - } - - std::move(context_refresh_cb).Run(frame_ctx); -} - VP9Decoder::VP9Accelerator::Status VP9Decoder::DecodeAndOutputPicture( scoped_refptr<VP9Picture> pic) { DCHECK(!pic_size_.IsEmpty());
diff --git a/media/gpu/vp9_decoder.h b/media/gpu/vp9_decoder.h index 83ce5fd..f6870de 100644 --- a/media/gpu/vp9_decoder.h +++ b/media/gpu/vp9_decoder.h
@@ -106,11 +106,6 @@ // Return true if the accelerator requires us to provide the compressed // header fully parsed. virtual bool NeedsCompressedHeaderParsed() const = 0; - - // Set |frame_ctx| to the state after decoding |pic|, returning true on - // success, false otherwise. - virtual bool GetFrameContext(scoped_refptr<VP9Picture> pic, - Vp9FrameContext* frame_ctx) = 0; }; explicit VP9Decoder( @@ -148,11 +143,6 @@ // next Decode call, and kFail otherwise. VP9Accelerator::Status DecodeAndOutputPicture(scoped_refptr<VP9Picture> pic); - // Get frame context state after decoding |pic| from the accelerator, and call - // |context_refresh_cb| with the acquired state. - void UpdateFrameContext(scoped_refptr<VP9Picture> pic, - Vp9Parser::ContextRefreshCallback context_refresh_cb); - // Called on error, when decoding cannot continue. Sets state_ to kError and // releases current state. void SetError();
diff --git a/media/gpu/windows/d3d11_vp9_accelerator.cc b/media/gpu/windows/d3d11_vp9_accelerator.cc index a65015c..6ce14e6 100644 --- a/media/gpu/windows/d3d11_vp9_accelerator.cc +++ b/media/gpu/windows/d3d11_vp9_accelerator.cc
@@ -265,9 +265,4 @@ return false; } -bool D3D11VP9Accelerator::GetFrameContext(scoped_refptr<VP9Picture> picture, - Vp9FrameContext* frame_context) { - return false; -} - } // namespace media
diff --git a/media/gpu/windows/d3d11_vp9_accelerator.h b/media/gpu/windows/d3d11_vp9_accelerator.h index f796a37c..e96942a1 100644 --- a/media/gpu/windows/d3d11_vp9_accelerator.h +++ b/media/gpu/windows/d3d11_vp9_accelerator.h
@@ -38,9 +38,6 @@ bool NeedsCompressedHeaderParsed() const override; - bool GetFrameContext(scoped_refptr<VP9Picture> picture, - Vp9FrameContext* frame_context) override; - private: // Helper methods for SubmitDecode bool BeginFrame(const D3D11VP9Picture& pic);
diff --git a/media/muxers/muxer_timestamp_adapter_unittest.cc b/media/muxers/muxer_timestamp_adapter_unittest.cc index ef5ff3b..9515c6b 100644 --- a/media/muxers/muxer_timestamp_adapter_unittest.cc +++ b/media/muxers/muxer_timestamp_adapter_unittest.cc
@@ -6,7 +6,7 @@ #include <map> #include <memory> -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/test/task_environment.h" #include "base/time/time.h" #include "media/base/audio_parameters.h"
diff --git a/mojo/core/dispatcher.h b/mojo/core/dispatcher.h index 40184dc5..82dc60a 100644 --- a/mojo/core/dispatcher.h +++ b/mojo/core/dispatcher.h
@@ -13,7 +13,7 @@ #include <vector> #include "base/memory/ref_counted.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "mojo/core/handle_signals_state.h" #include "mojo/core/system_impl_export.h" #include "mojo/core/watch.h"
diff --git a/mojo/public/cpp/bindings/interface_endpoint_client.h b/mojo/public/cpp/bindings/interface_endpoint_client.h index 9520da44..6154a68 100644 --- a/mojo/public/cpp/bindings/interface_endpoint_client.h +++ b/mojo/public/cpp/bindings/interface_endpoint_client.h
@@ -20,7 +20,7 @@ #include "base/memory/scoped_refptr.h" #include "base/memory/weak_ptr.h" #include "base/sequence_checker.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/synchronization/lock.h" #include "base/task/sequenced_task_runner.h" #include "base/thread_annotations.h"
diff --git a/net/base/backoff_entry_serializer_fuzzer.cc b/net/base/backoff_entry_serializer_fuzzer.cc index 1039604..85ec8b1 100644 --- a/net/base/backoff_entry_serializer_fuzzer.cc +++ b/net/base/backoff_entry_serializer_fuzzer.cc
@@ -10,7 +10,7 @@ #include "base/json/json_reader.h" #include "base/logging.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/time/tick_clock.h" #include "base/time/time.h" #include "net/base/backoff_entry.h"
diff --git a/net/base/net_string_util.h b/net/base/net_string_util.h index e65baca..22073cc 100644 --- a/net/base/net_string_util.h +++ b/net/base/net_string_util.h
@@ -7,7 +7,7 @@ #include <string> -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "net/base/net_export.h" // String conversion functions. By default, they're implemented with ICU, but
diff --git a/net/cert/internal/revocation_checker.h b/net/cert/internal/revocation_checker.h index 25bf4ca..b2ba715 100644 --- a/net/cert/internal/revocation_checker.h +++ b/net/cert/internal/revocation_checker.h
@@ -5,7 +5,7 @@ #ifndef NET_CERT_INTERNAL_REVOCATION_CHECKER_H_ #define NET_CERT_INTERNAL_REVOCATION_CHECKER_H_ -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/time/time.h" #include "net/base/net_export.h" #include "net/cert/crl_set.h"
diff --git a/net/disk_cache/simple/simple_synchronous_entry.h b/net/disk_cache/simple/simple_synchronous_entry.h index 3e6aa2d..112b5f8 100644 --- a/net/disk_cache/simple/simple_synchronous_entry.h +++ b/net/disk_cache/simple/simple_synchronous_entry.h
@@ -20,7 +20,7 @@ #include "base/gtest_prod_util.h" #include "base/memory/raw_ptr.h" #include "base/memory/scoped_refptr.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/time/time.h" #include "net/base/cache_type.h" #include "net/base/net_errors.h"
diff --git a/net/dns/dns_config_service_win.h b/net/dns/dns_config_service_win.h index 5a711bb..d96729cc 100644 --- a/net/dns/dns_config_service_win.h +++ b/net/dns/dns_config_service_win.h
@@ -16,7 +16,7 @@ #include <vector> #include "base/memory/free_deleter.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "net/base/net_export.h" #include "net/dns/dns_config_service.h" #include "net/dns/public/win_dns_system_settings.h"
diff --git a/net/dns/host_cache_fuzzer.cc b/net/dns/host_cache_fuzzer.cc index 9917f71..4f01fdb 100644 --- a/net/dns/host_cache_fuzzer.cc +++ b/net/dns/host_cache_fuzzer.cc
@@ -10,7 +10,7 @@ #include "base/logging.h" #include "base/numerics/clamped_math.h" #include "base/numerics/ostream_operators.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "net/dns/host_cache.h" #include "net/dns/host_cache_fuzzer.pb.h" #include "testing/libfuzzer/proto/json.pb.h"
diff --git a/net/dns/mock_host_resolver.h b/net/dns/mock_host_resolver.h index 3147270..14187f2 100644 --- a/net/dns/mock_host_resolver.h +++ b/net/dns/mock_host_resolver.h
@@ -18,7 +18,6 @@ #include "base/memory/raw_ptr.h" #include "base/memory/weak_ptr.h" #include "base/strings/string_piece.h" -#include "base/strings/string_piece_forward.h" #include "base/synchronization/lock.h" #include "base/synchronization/waitable_event.h" #include "base/thread_annotations.h"
diff --git a/net/dns/public/win_dns_system_settings.h b/net/dns/public/win_dns_system_settings.h index c540e599..9dadf02 100644 --- a/net/dns/public/win_dns_system_settings.h +++ b/net/dns/public/win_dns_system_settings.h
@@ -14,7 +14,7 @@ #include <vector> #include "base/memory/free_deleter.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "net/base/ip_endpoint.h" #include "net/base/net_export.h" #include "third_party/abseil-cpp/absl/types/optional.h"
diff --git a/net/http/http_auth_gssapi_posix.h b/net/http/http_auth_gssapi_posix.h index bc3077b..71d692692 100644 --- a/net/http/http_auth_gssapi_posix.h +++ b/net/http/http_auth_gssapi_posix.h
@@ -10,7 +10,7 @@ #include "base/gtest_prod_util.h" #include "base/memory/raw_ptr.h" #include "base/native_library.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/values.h" #include "build/build_config.h" #include "net/base/completion_once_callback.h"
diff --git a/net/http/http_auth_handler_digest.h b/net/http/http_auth_handler_digest.h index d8c23ddd..f15b56c 100644 --- a/net/http/http_auth_handler_digest.h +++ b/net/http/http_auth_handler_digest.h
@@ -10,7 +10,7 @@ #include "base/gtest_prod_util.h" #include "base/memory/raw_ptr.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "net/base/completion_once_callback.h" #include "net/base/net_export.h" #include "net/http/http_auth_handler.h"
diff --git a/net/log/net_log_values.h b/net/log/net_log_values.h index 71eb4c5..fcf4c5ad2 100644 --- a/net/log/net_log_values.h +++ b/net/log/net_log_values.h
@@ -9,7 +9,7 @@ #include <stdint.h> #include "base/containers/span.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/values.h" #include "net/base/net_export.h"
diff --git a/net/proxy_resolution/proxy_bypass_rules.h b/net/proxy_resolution/proxy_bypass_rules.h index 8db3323..afea1a4 100644 --- a/net/proxy_resolution/proxy_bypass_rules.h +++ b/net/proxy_resolution/proxy_bypass_rules.h
@@ -9,7 +9,7 @@ #include <string> #include <vector> -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "net/base/net_export.h" #include "net/base/scheme_host_port_matcher.h" #include "net/base/scheme_host_port_matcher_rule.h"
diff --git a/net/test/cert_builder.h b/net/test/cert_builder.h index 4143f4a..6bb4927 100644 --- a/net/test/cert_builder.h +++ b/net/test/cert_builder.h
@@ -10,7 +10,7 @@ #include "base/memory/raw_ptr.h" #include "base/rand_util.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "net/base/ip_address.h" #include "net/cert/x509_certificate.h" #include "third_party/boringssl/src/include/openssl/base.h"
diff --git a/pdf/pdf_view_web_plugin.h b/pdf/pdf_view_web_plugin.h index 354af6b..e4a1818 100644 --- a/pdf/pdf_view_web_plugin.h +++ b/pdf/pdf_view_web_plugin.h
@@ -17,7 +17,7 @@ #include "base/i18n/rtl.h" #include "base/memory/raw_ptr.h" #include "base/memory/weak_ptr.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/values.h" #include "cc/paint/paint_image.h" #include "mojo/public/cpp/bindings/associated_remote.h"
diff --git a/printing/common/metafile_utils.h b/printing/common/metafile_utils.h index df39009..8b385ab 100644 --- a/printing/common/metafile_utils.h +++ b/printing/common/metafile_utils.h
@@ -9,7 +9,7 @@ #include "base/containers/flat_map.h" #include "base/containers/flat_set.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/unguessable_token.h" #include "third_party/skia/include/core/SkDocument.h" #include "third_party/skia/include/core/SkRefCnt.h"
diff --git a/remoting/base/protobuf_http_stream_parser.h b/remoting/base/protobuf_http_stream_parser.h index e1cb2caf2..82f69da 100644 --- a/remoting/base/protobuf_http_stream_parser.h +++ b/remoting/base/protobuf_http_stream_parser.h
@@ -8,7 +8,7 @@ #include "base/functional/callback.h" #include "base/memory/scoped_refptr.h" #include "base/memory/weak_ptr.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" namespace google { namespace protobuf {
diff --git a/remoting/host/chromeos/remote_support_host_ash_unittest.cc b/remoting/host/chromeos/remote_support_host_ash_unittest.cc index ac23681..1b7ae3be 100644 --- a/remoting/host/chromeos/remote_support_host_ash_unittest.cc +++ b/remoting/host/chromeos/remote_support_host_ash_unittest.cc
@@ -71,6 +71,19 @@ } void Disconnect() override {} + absl::optional<ReconnectParams> CreateReconnectParams() const override { + if (is_enterprise_session() && enterprise_params().allow_reconnections) { + ReconnectParams reconnect_params; + reconnect_params.support_id = "1234567"; + reconnect_params.host_secret = "12345"; + reconnect_params.private_key = std::string(384, 'a'); + reconnect_params.ftl_device_registration_id = + "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"; + return reconnect_params; + } + return absl::nullopt; + } + bool WaitForConnectCall() { bool success = connect_waiter_.Wait(); connect_waiter_.Clear();
diff --git a/remoting/host/it2me/it2me_host.cc b/remoting/host/it2me/it2me_host.cc index af21853..6593913 100644 --- a/remoting/host/it2me/it2me_host.cc +++ b/remoting/host/it2me/it2me_host.cc
@@ -105,6 +105,36 @@ authorized_helper_ = authorized_helper; } +void It2MeHost::set_reconnect_params(ReconnectParams reconnect_params) { +#if BUILDFLAG(IS_CHROMEOS_ASH) || !defined(NDEBUG) + reconnect_params_.emplace(std::move(reconnect_params)); +#else + NOTREACHED() << "It2MeHost::set_reconnect_params is only supported on CrOS"; +#endif +} + +absl::optional<ReconnectParams> It2MeHost::CreateReconnectParams() const { + absl::optional<ReconnectParams> reconnect_params; +#if BUILDFLAG(IS_CHROMEOS_ASH) || !defined(NDEBUG) + if (!is_enterprise_session() || + !chrome_os_enterprise_params_->allow_reconnections) { + return reconnect_params; + } + // This function is meant to be queried just after the remote client connects, + // otherwise the required fields will not be set. + CHECK_EQ(state_, It2MeHostState::kConnected); + + reconnect_params.emplace(); + reconnect_params->support_id = support_id_; + reconnect_params->host_secret = host_secret_; + reconnect_params->private_key = host_key_pair_->ToString(); + signal_strategy_->GetLocalAddress().GetFtlInfo( + nullptr, &reconnect_params->ftl_device_registration_id); +#endif + + return reconnect_params; +} + void It2MeHost::Connect( std::unique_ptr<ChromotingHostContext> host_context, base::Value::Dict policies, @@ -201,16 +231,39 @@ } } - // Generate a key pair for the Host to use. - // TODO(wez): Move this to the worker thread. - host_key_pair_ = RsaKeyPair::Generate(); + if (!reconnect_params_.has_value()) { + // Generate a key pair for the Host to use. + host_key_pair_ = RsaKeyPair::Generate(); - // Request registration of the host for support. - register_request_ = std::move(connection_context->register_request); - register_request_->StartRequest( - signal_strategy_.get(), host_key_pair_, authorized_helper_, - std::move(chrome_os_enterprise_params_), - base::BindOnce(&It2MeHost::OnReceivedSupportID, base::Unretained(this))); + // Generate a new host secret for this instance. + host_secret_ = GenerateSupportHostSecret(); + + // Request registration of the host for support. + register_request_ = std::move(connection_context->register_request); + register_request_->StartRequest( + signal_strategy_.get(), host_key_pair_, authorized_helper_, + std::move(chrome_os_enterprise_params_), + base::BindOnce(&It2MeHost::OnReceivedSupportID, + base::Unretained(this))); + } else { + // Reconnections are only allowed for Chrome OS enterprise sessions. + CHECK(is_enterprise_session()); + CHECK(chrome_os_enterprise_params_->allow_reconnections); + + // Regenerate the key pair from the private key. + host_key_pair_ = RsaKeyPair::FromString(reconnect_params_->private_key); + + // Restore the host_secret from the previous connection. + host_secret_ = reconnect_params_->host_secret; + + // Skip the registration service call as the entry will be retrievable by + // the `authorized_helper` for ~24 hours when 'allow_reconnections' is set. + host_context_->network_task_runner()->PostTask( + FROM_HERE, base::BindOnce(&It2MeHost::OnReceivedSupportID, + weak_factory_.GetWeakPtr(), + reconnect_params_->support_id, + base::Minutes(5), ErrorCode::OK)); + } HOST_LOG << "NAT traversal enabled: " << nat_traversal_enabled_; HOST_LOG << "Relay connections allowed: " << relay_connections_allowed_; @@ -605,10 +658,10 @@ return; } - std::string host_secret = GenerateSupportHostSecret(); - std::string access_code = support_id + host_secret; + support_id_ = support_id; + std::string access_code = support_id_ + host_secret_; std::string access_code_hash = - protocol::GetSharedSecretHash(support_id, access_code); + protocol::GetSharedSecretHash(support_id_, access_code); std::string local_certificate = host_key_pair_->GenerateCertificate(); if (local_certificate.empty()) { @@ -653,6 +706,7 @@ host_status_logger_ = nullptr; log_to_server_ = nullptr; ftl_signaling_connector_ = nullptr; + reconnect_params_.reset(); if (signal_strategy_) { // Delay destruction of the signaling strategy by a few seconds to give it
diff --git a/remoting/host/it2me/it2me_host.h b/remoting/host/it2me/it2me_host.h index 7c70e5ff..9d46ddd 100644 --- a/remoting/host/it2me/it2me_host.h +++ b/remoting/host/it2me/it2me_host.h
@@ -19,6 +19,7 @@ #include "remoting/host/it2me/it2me_confirmation_dialog.h" #include "remoting/host/it2me/it2me_confirmation_dialog_proxy.h" #include "remoting/host/it2me/it2me_constants.h" +#include "remoting/host/it2me/reconnect_params.h" #include "remoting/host/register_support_host_request.h" #include "remoting/protocol/errors.h" #include "remoting/protocol/port_range.h" @@ -109,6 +110,14 @@ void set_authorized_helper(const std::string& authorized_helper); const std::string& authorized_helper() const { return authorized_helper_; } + // If set, the host will use `reconnect_params` instead of registering with + // the Directory service and generating new IDs and such. + void set_reconnect_params(ReconnectParams reconnect_params); + + // Creates a new ReconnectParams struct if reconnections are allowed and the + // remote client has connected, otherwise an empty optional is returned. + virtual absl::optional<ReconnectParams> CreateReconnectParams() const; + // Creates It2Me host structures and starts the host. virtual void Connect( std::unique_ptr<ChromotingHostContext> context, @@ -208,6 +217,10 @@ It2MeHostState state_ = It2MeHostState::kDisconnected; + absl::optional<ReconnectParams> reconnect_params_; + + std::string support_id_; + std::string host_secret_; scoped_refptr<RsaKeyPair> host_key_pair_; std::unique_ptr<RegisterSupportHostRequest> register_request_; std::unique_ptr<HostStatusLogger> host_status_logger_; @@ -257,6 +270,8 @@ // Tracks the JID of the remote user when in a connecting state. std::string connecting_jid_; + + base::WeakPtrFactory<It2MeHost> weak_factory_{this}; }; // Having a factory interface makes it possible for the test to provide a mock
diff --git a/remoting/host/it2me/it2me_native_messaging_host.cc b/remoting/host/it2me/it2me_native_messaging_host.cc index a1c7237..c543433 100644 --- a/remoting/host/it2me/it2me_native_messaging_host.cc +++ b/remoting/host/it2me/it2me_native_messaging_host.cc
@@ -135,14 +135,19 @@ CreateNativeSignalingDeferredConnectContext( const std::string& username, const std::string& access_token, + const std::string& ftl_device_registration_id, ChromotingHostContext* host_context) { + auto device_id_provider = + ftl_device_registration_id.empty() + ? std::make_unique<FtlClientUuidDeviceIdProvider>() + : std::make_unique<FtlClientUuidDeviceIdProvider>( + ftl_device_registration_id); auto connection_context = std::make_unique<It2MeHost::DeferredConnectContext>(); connection_context->use_ftl_signaling = true; connection_context->signal_strategy = std::make_unique<FtlSignalStrategy>( std::make_unique<PassthroughOAuthTokenGetter>(username, access_token), - host_context->url_loader_factory(), - std::make_unique<FtlClientUuidDeviceIdProvider>()); + host_context->url_loader_factory(), std::move(device_id_provider)); connection_context->register_request = std::make_unique<RemotingRegisterSupportHostRequest>( std::make_unique<PassthroughOAuthTokenGetter>(username, access_token), @@ -323,6 +328,20 @@ } } + absl::optional<ReconnectParams> reconnect_params; +#if BUILDFLAG(IS_CHROMEOS_ASH) || !defined(NDEBUG) + bool is_enterprise_admin_user = + message.FindBool(kIsEnterpriseAdminUser).value_or(false); + if (is_enterprise_admin_user) { + const auto* reconnect_params_ptr = message.FindDict(kReconnectParamsDict); + if (reconnect_params_ptr) { + CHECK(message.FindBool(kAllowReconnections).value_or(false)); + reconnect_params.emplace( + ReconnectParams::FromDict(*reconnect_params_ptr)); + } + } +#endif + It2MeHost::CreateDeferredConnectContext create_connection_context; if (use_signaling_proxy) { if (username.empty()) { @@ -338,8 +357,14 @@ } else { if (!username.empty()) { std::string access_token = ExtractAccessToken(message); - create_connection_context = base::BindOnce( - &CreateNativeSignalingDeferredConnectContext, username, access_token); + std::string ftl_device_registration_id; + if (reconnect_params.has_value()) { + ftl_device_registration_id = + reconnect_params->ftl_device_registration_id; + } + create_connection_context = + base::BindOnce(&CreateNativeSignalingDeferredConnectContext, username, + access_token, ftl_device_registration_id); } else { LOG(ERROR) << kUserName << " not found in request."; } @@ -365,19 +390,20 @@ return; } - // Create the It2Me host and start connecting. Note that disabling dialogs is - // only supported on ChromeOS. + // Create the It2Me host and start connecting. it2me_host_ = factory_->CreateIt2MeHost(); it2me_host_->set_authorized_helper(authorized_helper); auto dialog_style = It2MeConfirmationDialog::DialogStyle::kConsumer; #if BUILDFLAG(IS_CHROMEOS_ASH) || !defined(NDEBUG) - bool is_enterprise_admin_user = - message.FindBool(kIsEnterpriseAdminUser).value_or(false); if (is_enterprise_admin_user) { dialog_style = It2MeConfirmationDialog::DialogStyle::kEnterprise; it2me_host_->set_chrome_os_enterprise_params( BuildEnterpriseParams(message)); + + if (reconnect_params.has_value()) { + it2me_host_->set_reconnect_params(std::move(*reconnect_params)); + } } #endif @@ -497,19 +523,10 @@ case It2MeHostState::kConnected: { message.Set(kClient, client_username_); - - if (it2me_host_->is_enterprise_session() && - it2me_host_->chrome_os_enterprise_params().allow_reconnections) { - // These test values are needed so the impl CL can be broken up into - // smaller patchsets. - // TODO(joedow): Replace them with real values. + auto reconnect_params = it2me_host_->CreateReconnectParams(); + if (reconnect_params.has_value()) { message.Set(kReconnectParamsDict, - base::Value::Dict() - .Set(kReconnectSupportId, "1234567") - .Set(kReconnectHostSecret, "12345") - .Set(kReconnectPrivateKey, std::string(384, 'a')) - .Set(kReconnectFtlDeviceRegistrationId, - "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee")); + ReconnectParams::ToDict(std::move(*reconnect_params))); } break; }
diff --git a/remoting/host/it2me/it2me_native_messaging_host_ash.cc b/remoting/host/it2me/it2me_native_messaging_host_ash.cc index 3edceec..4788ffa 100644 --- a/remoting/host/it2me/it2me_native_messaging_host_ash.cc +++ b/remoting/host/it2me/it2me_native_messaging_host_ash.cc
@@ -330,15 +330,8 @@ absl::optional<ReconnectParams> reconnect_params; const auto* reconnect_params_ptr = message.FindDict(kReconnectParamsDict); if (reconnect_params_ptr) { - reconnect_params.emplace(); - reconnect_params->support_id = - *reconnect_params_ptr->FindString(kReconnectSupportId); - reconnect_params->host_secret = - *reconnect_params_ptr->FindString(kReconnectHostSecret); - reconnect_params->private_key = - *reconnect_params_ptr->FindString(kReconnectPrivateKey); - reconnect_params->ftl_device_registration_id = - *reconnect_params_ptr->FindString(kReconnectFtlDeviceRegistrationId); + reconnect_params.emplace( + ReconnectParams::FromDict(*reconnect_params_ptr)); } std::move(host_state_connected_callback_).Run(std::move(reconnect_params));
diff --git a/remoting/host/webauthn/remote_webauthn_caller_security_utils.cc b/remoting/host/webauthn/remote_webauthn_caller_security_utils.cc index 37a6823..033a4d44 100644 --- a/remoting/host/webauthn/remote_webauthn_caller_security_utils.cc +++ b/remoting/host/webauthn/remote_webauthn_caller_security_utils.cc
@@ -5,7 +5,7 @@ #include "remoting/host/webauthn/remote_webauthn_caller_security_utils.h" #include "base/environment.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/strings/utf_string_conversions.h" #include "build/build_config.h"
diff --git a/remoting/signaling/ftl_client_uuid_device_id_provider.cc b/remoting/signaling/ftl_client_uuid_device_id_provider.cc index bde5341..8415852 100644 --- a/remoting/signaling/ftl_client_uuid_device_id_provider.cc +++ b/remoting/signaling/ftl_client_uuid_device_id_provider.cc
@@ -9,7 +9,12 @@ namespace remoting { FtlClientUuidDeviceIdProvider::FtlClientUuidDeviceIdProvider() - : client_uuid_(base::Uuid::GenerateRandomV4().AsLowercaseString()) {} + : FtlClientUuidDeviceIdProvider( + base::Uuid::GenerateRandomV4().AsLowercaseString()) {} + +FtlClientUuidDeviceIdProvider::FtlClientUuidDeviceIdProvider( + const std::string& device_id) + : client_uuid_(device_id) {} FtlClientUuidDeviceIdProvider::~FtlClientUuidDeviceIdProvider() = default;
diff --git a/remoting/signaling/ftl_client_uuid_device_id_provider.h b/remoting/signaling/ftl_client_uuid_device_id_provider.h index d7af1666..b18b30e 100644 --- a/remoting/signaling/ftl_client_uuid_device_id_provider.h +++ b/remoting/signaling/ftl_client_uuid_device_id_provider.h
@@ -16,6 +16,7 @@ class FtlClientUuidDeviceIdProvider : public FtlDeviceIdProvider { public: FtlClientUuidDeviceIdProvider(); + explicit FtlClientUuidDeviceIdProvider(const std::string&); ~FtlClientUuidDeviceIdProvider() override; ftl::DeviceId GetDeviceId() override;
diff --git a/sandbox/policy/win/sandbox_policy_feature_test.cc b/sandbox/policy/win/sandbox_policy_feature_test.cc index de7381f0..a4bf943 100644 --- a/sandbox/policy/win/sandbox_policy_feature_test.cc +++ b/sandbox/policy/win/sandbox_policy_feature_test.cc
@@ -4,6 +4,8 @@ #include "sandbox/policy/win/sandbox_policy_feature_test.h" +#include "sandbox/policy/features.h" + namespace sandbox { namespace policy { @@ -34,20 +36,16 @@ MitigationFlags SandboxFeatureTest::GetExpectedMitigationFlags() { // Mitigation flags are set on the policy regardless of the OS version ::sandbox::MitigationFlags flags = - ::sandbox::MITIGATION_HEAP_TERMINATE | ::sandbox::MITIGATION_BOTTOM_UP_ASLR | ::sandbox::MITIGATION_DEP | ::sandbox::MITIGATION_DEP_NO_ATL_THUNK | ::sandbox::MITIGATION_EXTENSION_POINT_DISABLE | - ::sandbox::MITIGATION_SEHOP | - ::sandbox::MITIGATION_NONSYSTEM_FONT_DISABLE | - ::sandbox::MITIGATION_IMAGE_LOAD_NO_REMOTE | + ::sandbox::MITIGATION_HEAP_TERMINATE | ::sandbox::MITIGATION_IMAGE_LOAD_NO_LOW_LABEL | + ::sandbox::MITIGATION_IMAGE_LOAD_NO_REMOTE | + ::sandbox::MITIGATION_KTM_COMPONENT | + ::sandbox::MITIGATION_NONSYSTEM_FONT_DISABLE | ::sandbox::MITIGATION_RESTRICT_INDIRECT_BRANCH_PREDICTION | - ::sandbox::MITIGATION_KTM_COMPONENT; - -#if !defined(NACL_WIN64) - flags = flags | ::sandbox::MITIGATION_WIN32K_DISABLE; -#endif + ::sandbox::MITIGATION_SEHOP | ::sandbox::MITIGATION_WIN32K_DISABLE; return flags; }
diff --git a/sandbox/policy/win/sandbox_policy_feature_test.h b/sandbox/policy/win/sandbox_policy_feature_test.h index 39b15f7..dfb6439b 100644 --- a/sandbox/policy/win/sandbox_policy_feature_test.h +++ b/sandbox/policy/win/sandbox_policy_feature_test.h
@@ -6,22 +6,13 @@ #define SANDBOX_POLICY_WIN_SANDBOX_POLICY_FEATURE_TEST_H_ #include "base/test/scoped_feature_list.h" -#include "build/build_config.h" -#include "sandbox/policy/features.h" -#include "sandbox/policy/switches.h" -#include "testing/gmock/include/gmock/gmock.h" +#include "base/win/sid.h" +#include "sandbox/win/src/app_container.h" +#include "sandbox/win/src/sandbox_policy.h" +#include "sandbox/win/src/security_level.h" #include "testing/gtest/include/gtest/gtest.h" -#if BUILDFLAG(IS_WIN) -#include "sandbox/policy/win/sandbox_win.h" -#include "sandbox/win/src/app_container_base.h" -#include "sandbox/win/src/sandbox_factory.h" -#include "sandbox/win/src/sandbox_policy.h" -#include "sandbox/win/src/sandbox_policy_base.h" -#endif - -namespace sandbox { -namespace policy { +namespace sandbox::policy { class SandboxFeatureTest : public ::testing::Test, @@ -49,7 +40,7 @@ base::test::ScopedFeatureList feature_list_; }; -} // namespace policy -} // namespace sandbox + +} // namespace sandbox::policy #endif // SANDBOX_POLICY_WIN_SANDBOX_POLICY_FEATURE_TEST_H_
diff --git a/sandbox/win/src/process_mitigations_deathtest.cc b/sandbox/win/src/process_mitigations_deathtest.cc index b00b748..39405bf 100644 --- a/sandbox/win/src/process_mitigations_deathtest.cc +++ b/sandbox/win/src/process_mitigations_deathtest.cc
@@ -7,7 +7,6 @@ #include "base/strings/string_number_conversions.h" #include "base/strings/string_number_conversions_win.h" #include "base/strings/string_piece.h" -#include "base/strings/string_piece_forward.h" #include "sandbox/win/tests/common/controller.h" #include "testing/gtest/include/gtest/gtest.h"
diff --git a/services/data_decoder/gzipper.cc b/services/data_decoder/gzipper.cc index efcd8f9..23e2667a 100644 --- a/services/data_decoder/gzipper.cc +++ b/services/data_decoder/gzipper.cc
@@ -6,7 +6,7 @@ #include "base/bit_cast.h" #include "base/containers/span.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "mojo/public/cpp/base/big_buffer.h" #include "third_party/zlib/google/compression_utils.h" #include "third_party/zlib/google/compression_utils_portable.h"
diff --git a/services/device/compute_pressure/procfs_stat_cpu_parser_unittest.cc b/services/device/compute_pressure/procfs_stat_cpu_parser_unittest.cc index 3847abd..2e650ff 100644 --- a/services/device/compute_pressure/procfs_stat_cpu_parser_unittest.cc +++ b/services/device/compute_pressure/procfs_stat_cpu_parser_unittest.cc
@@ -11,7 +11,7 @@ #include "base/files/file.h" #include "base/files/file_util.h" #include "base/files/scoped_temp_dir.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h"
diff --git a/services/device/time_zone_monitor/time_zone_monitor.h b/services/device/time_zone_monitor/time_zone_monitor.h index 49e1709..15ac0f5 100644 --- a/services/device/time_zone_monitor/time_zone_monitor.h +++ b/services/device/time_zone_monitor/time_zone_monitor.h
@@ -8,7 +8,7 @@ #include <memory> #include <string> -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/threading/thread_checker.h" #include "mojo/public/cpp/bindings/pending_receiver.h" #include "mojo/public/cpp/bindings/pending_remote.h"
diff --git a/services/device/usb/usb_service_win.cc b/services/device/usb/usb_service_win.cc index 06f5728..3dee7e03 100644 --- a/services/device/usb/usb_service_win.cc +++ b/services/device/usb/usb_service_win.cc
@@ -22,7 +22,7 @@ #include "base/memory/ptr_util.h" #include "base/scoped_generic.h" #include "base/strings/string_number_conversions.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/strings/string_split.h" #include "base/strings/string_util.h" #include "base/strings/sys_string_conversions.h"
diff --git a/services/network/attribution/attribution_test_utils.cc b/services/network/attribution/attribution_test_utils.cc index 3300b5c..4b58f2c 100644 --- a/services/network/attribution/attribution_test_utils.cc +++ b/services/network/attribution/attribution_test_utils.cc
@@ -12,7 +12,7 @@ #include "base/ranges/algorithm.h" #include "base/strings/strcat.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/strings/string_util.h" #include "net/http/structured_headers.h" #include "net/test/embedded_test_server/http_request.h"
diff --git a/services/network/attribution/attribution_test_utils.h b/services/network/attribution/attribution_test_utils.h index 80df25e..331ea6cb 100644 --- a/services/network/attribution/attribution_test_utils.h +++ b/services/network/attribution/attribution_test_utils.h
@@ -9,7 +9,7 @@ #include <set> #include <string> -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "services/network/attribution/attribution_verification_mediator.h" #include "services/network/public/mojom/trust_tokens.mojom-shared.h" #include "services/network/trust_tokens/trust_token_key_commitments.h"
diff --git a/services/network/attribution/attribution_verification_mediator.h b/services/network/attribution/attribution_verification_mediator.h index 1632bb91..2421b319 100644 --- a/services/network/attribution/attribution_verification_mediator.h +++ b/services/network/attribution/attribution_verification_mediator.h
@@ -11,7 +11,7 @@ #include "base/memory/raw_ptr.h" #include "base/memory/weak_ptr.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "net/http/http_request_headers.h" #include "net/http/http_response_headers.h" #include "services/network/public/mojom/trust_tokens.mojom-forward.h"
diff --git a/services/network/attribution/attribution_verification_mediator_metrics_recorder.cc b/services/network/attribution/attribution_verification_mediator_metrics_recorder.cc index 6150f0f..76cf2e2 100644 --- a/services/network/attribution/attribution_verification_mediator_metrics_recorder.cc +++ b/services/network/attribution/attribution_verification_mediator_metrics_recorder.cc
@@ -5,7 +5,7 @@ #include "services/network/attribution/attribution_verification_mediator_metrics_recorder.h" #include "base/check.h" #include "base/metrics/histogram_functions.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/strings/string_util.h" #include "base/time/time.h" #include "services/network/attribution/attribution_verification_mediator.h"
diff --git a/services/network/attribution/attribution_verification_mediator_unittest.cc b/services/network/attribution/attribution_verification_mediator_unittest.cc index 592c4e4e3..c5fd8d9 100644 --- a/services/network/attribution/attribution_verification_mediator_unittest.cc +++ b/services/network/attribution/attribution_verification_mediator_unittest.cc
@@ -9,7 +9,7 @@ #include <string> #include "base/run_loop.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/test/bind.h" #include "base/test/metrics/histogram_tester.h" #include "base/test/task_environment.h"
diff --git a/services/network/public/cpp/content_security_policy/content_security_policy.h b/services/network/public/cpp/content_security_policy/content_security_policy.h index 6702288..fc258f4 100644 --- a/services/network/public/cpp/content_security_policy/content_security_policy.h +++ b/services/network/public/cpp/content_security_policy/content_security_policy.h
@@ -6,7 +6,7 @@ #define SERVICES_NETWORK_PUBLIC_CPP_CONTENT_SECURITY_POLICY_CONTENT_SECURITY_POLICY_H_ #include "base/component_export.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "services/network/public/mojom/content_security_policy.mojom.h" class GURL;
diff --git a/services/network/public/cpp/corb/corb_api.h b/services/network/public/cpp/corb/corb_api.h index d0c80f2..59f26902 100644 --- a/services/network/public/cpp/corb/corb_api.h +++ b/services/network/public/cpp/corb/corb_api.h
@@ -9,7 +9,7 @@ #include <set> #include "base/component_export.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "services/network/public/mojom/fetch_api.mojom.h" #include "services/network/public/mojom/url_response_head.mojom-forward.h" #include "third_party/abseil-cpp/absl/types/optional.h"
diff --git a/services/network/public/cpp/corb/corb_impl.h b/services/network/public/cpp/corb/corb_impl.h index cf61ce8..ad317b3 100644 --- a/services/network/public/cpp/corb/corb_impl.h +++ b/services/network/public/cpp/corb/corb_impl.h
@@ -11,7 +11,7 @@ #include "base/component_export.h" #include "base/gtest_prod_util.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "services/network/public/cpp/corb/corb_api.h" #include "services/network/public/mojom/fetch_api.mojom.h" #include "services/network/public/mojom/url_response_head.mojom-forward.h"
diff --git a/services/network/public/cpp/crash_keys.h b/services/network/public/cpp/crash_keys.h index de94b2b60..d70e0fc 100644 --- a/services/network/public/cpp/crash_keys.h +++ b/services/network/public/cpp/crash_keys.h
@@ -6,7 +6,7 @@ #define SERVICES_NETWORK_PUBLIC_CPP_CRASH_KEYS_H_ #include "base/component_export.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" namespace network { namespace debug {
diff --git a/services/network/public/cpp/ip_address_space_util.h b/services/network/public/cpp/ip_address_space_util.h index 7c37e21..3d9b753a 100644 --- a/services/network/public/cpp/ip_address_space_util.h +++ b/services/network/public/cpp/ip_address_space_util.h
@@ -9,7 +9,7 @@ #include "base/component_export.h" #include "base/memory/raw_ptr_exclusion.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "services/network/public/mojom/ip_address_space.mojom-forward.h" #include "services/network/public/mojom/parsed_headers.mojom-forward.h" #include "third_party/abseil-cpp/absl/types/optional.h"
diff --git a/services/network/public/cpp/private_network_access_check_result.h b/services/network/public/cpp/private_network_access_check_result.h index 3d1219d..d568883 100644 --- a/services/network/public/cpp/private_network_access_check_result.h +++ b/services/network/public/cpp/private_network_access_check_result.h
@@ -8,7 +8,7 @@ #include <iosfwd> #include "base/component_export.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "services/network/public/mojom/cors.mojom-forward.h" #include "third_party/abseil-cpp/absl/types/optional.h"
diff --git a/services/network/public/cpp/supports_loading_mode/supports_loading_mode_parser.h b/services/network/public/cpp/supports_loading_mode/supports_loading_mode_parser.h index a50db232..4dbf42d5 100644 --- a/services/network/public/cpp/supports_loading_mode/supports_loading_mode_parser.h +++ b/services/network/public/cpp/supports_loading_mode/supports_loading_mode_parser.h
@@ -6,7 +6,7 @@ #define SERVICES_NETWORK_PUBLIC_CPP_SUPPORTS_LOADING_MODE_SUPPORTS_LOADING_MODE_PARSER_H_ #include "base/component_export.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "services/network/public/mojom/supports_loading_mode.mojom-forward.h" namespace net {
diff --git a/services/network/public/cpp/trust_token_http_headers.h b/services/network/public/cpp/trust_token_http_headers.h index 4983087..19c9cdf 100644 --- a/services/network/public/cpp/trust_token_http_headers.h +++ b/services/network/public/cpp/trust_token_http_headers.h
@@ -8,7 +8,7 @@ #include <vector> #include "base/component_export.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" namespace network {
diff --git a/services/network/public/cpp/web_sandbox_flags.h b/services/network/public/cpp/web_sandbox_flags.h index 9e5f121..680f60a 100644 --- a/services/network/public/cpp/web_sandbox_flags.h +++ b/services/network/public/cpp/web_sandbox_flags.h
@@ -8,7 +8,7 @@ #include <cstdint> #include <string> #include "base/component_export.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" namespace network { namespace mojom {
diff --git a/services/network/trust_tokens/trust_token_key_commitment_controller.h b/services/network/trust_tokens/trust_token_key_commitment_controller.h index b9eeb05..66ba4d5 100644 --- a/services/network/trust_tokens/trust_token_key_commitment_controller.h +++ b/services/network/trust_tokens/trust_token_key_commitment_controller.h
@@ -10,7 +10,7 @@ #include "base/functional/callback.h" #include "base/memory/weak_ptr.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "services/network/public/cpp/simple_url_loader.h" #include "services/network/public/mojom/trust_tokens.mojom-forward.h" #include "url/gurl.h"
diff --git a/services/network/trust_tokens/trust_token_key_commitment_parser.h b/services/network/trust_tokens/trust_token_key_commitment_parser.h index b747e01b..691b568c 100644 --- a/services/network/trust_tokens/trust_token_key_commitment_parser.h +++ b/services/network/trust_tokens/trust_token_key_commitment_parser.h
@@ -7,7 +7,7 @@ #include <memory> -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "services/network/public/mojom/trust_tokens.mojom-forward.h" #include "services/network/trust_tokens/suitable_trust_token_origin.h" #include "services/network/trust_tokens/trust_token_key_commitment_controller.h"
diff --git a/services/network/trust_tokens/trust_token_request_issuance_helper.h b/services/network/trust_tokens/trust_token_request_issuance_helper.h index acda28a..df34fea 100644 --- a/services/network/trust_tokens/trust_token_request_issuance_helper.h +++ b/services/network/trust_tokens/trust_token_request_issuance_helper.h
@@ -13,7 +13,7 @@ #include "base/functional/callback_forward.h" #include "base/memory/raw_ptr.h" #include "base/memory/weak_ptr.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "net/log/net_log_with_source.h" #include "services/network/public/mojom/trust_tokens.mojom-shared.h" #include "services/network/trust_tokens/proto/public.pb.h"
diff --git a/services/network/trust_tokens/trust_token_request_redemption_helper.h b/services/network/trust_tokens/trust_token_request_redemption_helper.h index c38a657..a0a763b 100644 --- a/services/network/trust_tokens/trust_token_request_redemption_helper.h +++ b/services/network/trust_tokens/trust_token_request_redemption_helper.h
@@ -11,7 +11,7 @@ #include "base/functional/callback_forward.h" #include "base/memory/raw_ptr.h" #include "base/memory/weak_ptr.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "net/log/net_log_with_source.h" #include "services/network/public/mojom/trust_tokens.mojom.h" #include "services/network/trust_tokens/proto/public.pb.h"
diff --git a/services/network/trust_tokens/types.h b/services/network/trust_tokens/types.h index 885544d5..42664f1 100644 --- a/services/network/trust_tokens/types.h +++ b/services/network/trust_tokens/types.h
@@ -7,7 +7,7 @@ #include <string> -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/time/time.h" #include "services/network/public/mojom/trust_tokens.mojom-shared.h" #include "services/network/trust_tokens/proto/public.pb.h"
diff --git a/sql/meta_table.h b/sql/meta_table.h index daa8d1e..611ed12 100644 --- a/sql/meta_table.h +++ b/sql/meta_table.h
@@ -10,7 +10,7 @@ #include "base/component_export.h" #include "base/memory/raw_ptr.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" namespace sql {
diff --git a/sql/statement.h b/sql/statement.h index 033237a..8eacfa56 100644 --- a/sql/statement.h +++ b/sql/statement.h
@@ -15,7 +15,7 @@ #include "base/dcheck_is_on.h" #include "base/memory/ref_counted.h" #include "base/sequence_checker.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/thread_annotations.h" #include "base/time/time.h" #include "sql/database.h"
diff --git a/sql/statement_unittest.cc b/sql/statement_unittest.cc index 2c9c205b..ea7f1853 100644 --- a/sql/statement_unittest.cc +++ b/sql/statement_unittest.cc
@@ -9,7 +9,7 @@ #include "base/files/file_util.h" #include "base/files/scoped_temp_dir.h" #include "base/functional/bind.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/test/bind.h" #include "sql/database.h" #include "sql/statement.h"
diff --git a/sql/test/test_helpers.h b/sql/test/test_helpers.h index dacbf0a..459a9e2 100644 --- a/sql/test/test_helpers.h +++ b/sql/test/test_helpers.h
@@ -10,7 +10,7 @@ #include <string> -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "third_party/abseil-cpp/absl/types/optional.h" // Collection of test-only convenience functions.
diff --git a/testing/buildbot/chromium.cft.json b/testing/buildbot/chromium.cft.json index ed8bb6a8..97037be 100644 --- a/testing/buildbot/chromium.cft.json +++ b/testing/buildbot/chromium.cft.json
@@ -980,22 +980,6 @@ "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "ppapi_unittests", - "swarming": { - "dimensions": { - "cpu": "arm64", - "os": "Ubuntu-20.04" - }, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "ppapi_unittests", - "test_id_prefix": "ninja://ppapi:ppapi_unittests/" - }, - { - "isolate_profile_data": true, - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, "name": "printing_unittests", "swarming": { "dimensions": { @@ -2769,21 +2753,6 @@ "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "nacl_loader_unittests", - "swarming": { - "dimensions": { - "os": "Ubuntu-22.04" - }, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "nacl_loader_unittests", - "test_id_prefix": "ninja://components/nacl/loader:nacl_loader_unittests/" - }, - { - "isolate_profile_data": true, - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, "name": "native_theme_unittests", "swarming": { "dimensions": { @@ -2889,21 +2858,6 @@ "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "ppapi_unittests", - "swarming": { - "dimensions": { - "os": "Ubuntu-22.04" - }, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "ppapi_unittests", - "test_id_prefix": "ninja://ppapi:ppapi_unittests/" - }, - { - "isolate_profile_data": true, - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, "name": "printing_unittests", "swarming": { "dimensions": {
diff --git a/testing/buildbot/chromium.chromiumos.json b/testing/buildbot/chromium.chromiumos.json index 1d7670c9..e15cac42 100644 --- a/testing/buildbot/chromium.chromiumos.json +++ b/testing/buildbot/chromium.chromiumos.json
@@ -6068,9 +6068,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_v119.0.6045.104/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6045.116/test_ash_chrome" ], - "description": "Run with ash-chrome version 119.0.6045.104", + "description": "Run with ash-chrome version 119.0.6045.116", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -6080,8 +6080,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v119.0.6045.104", - "revision": "version:119.0.6045.104" + "location": "lacros_version_skew_tests_v119.0.6045.116", + "revision": "version:119.0.6045.116" } ], "dimensions": { @@ -6218,9 +6218,9 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.filter;../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6045.104/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6045.116/test_ash_chrome" ], - "description": "Run with ash-chrome version 119.0.6045.104", + "description": "Run with ash-chrome version 119.0.6045.116", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -6230,8 +6230,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v119.0.6045.104", - "revision": "version:119.0.6045.104" + "location": "lacros_version_skew_tests_v119.0.6045.116", + "revision": "version:119.0.6045.116" } ], "dimensions": {
diff --git a/testing/buildbot/chromium.coverage.json b/testing/buildbot/chromium.coverage.json index 9c9846b..e22defe 100644 --- a/testing/buildbot/chromium.coverage.json +++ b/testing/buildbot/chromium.coverage.json
@@ -18714,21 +18714,6 @@ "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "nacl_loader_unittests", - "swarming": { - "dimensions": { - "os": "Ubuntu-22.04" - }, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "nacl_loader_unittests", - "test_id_prefix": "ninja://components/nacl/loader:nacl_loader_unittests/" - }, - { - "isolate_profile_data": true, - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, "name": "native_theme_unittests", "swarming": { "dimensions": { @@ -18834,21 +18819,6 @@ "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "ppapi_unittests", - "swarming": { - "dimensions": { - "os": "Ubuntu-22.04" - }, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "ppapi_unittests", - "test_id_prefix": "ninja://ppapi:ppapi_unittests/" - }, - { - "isolate_profile_data": true, - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, "name": "printing_unittests", "swarming": { "dimensions": { @@ -20422,9 +20392,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_v119.0.6045.104/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6045.116/test_ash_chrome" ], - "description": "Run with ash-chrome version 119.0.6045.104", + "description": "Run with ash-chrome version 119.0.6045.116", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -20434,8 +20404,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v119.0.6045.104", - "revision": "version:119.0.6045.104" + "location": "lacros_version_skew_tests_v119.0.6045.116", + "revision": "version:119.0.6045.116" } ], "dimensions": { @@ -20572,9 +20542,9 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.filter;../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6045.104/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6045.116/test_ash_chrome" ], - "description": "Run with ash-chrome version 119.0.6045.104", + "description": "Run with ash-chrome version 119.0.6045.116", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -20584,8 +20554,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v119.0.6045.104", - "revision": "version:119.0.6045.104" + "location": "lacros_version_skew_tests_v119.0.6045.116", + "revision": "version:119.0.6045.116" } ], "dimensions": {
diff --git a/testing/buildbot/chromium.fyi.json b/testing/buildbot/chromium.fyi.json index 8962ecb..4e801af 100644 --- a/testing/buildbot/chromium.fyi.json +++ b/testing/buildbot/chromium.fyi.json
@@ -43422,9 +43422,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_v119.0.6045.104/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6045.116/test_ash_chrome" ], - "description": "Run with ash-chrome version 119.0.6045.104", + "description": "Run with ash-chrome version 119.0.6045.116", "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -43433,8 +43433,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v119.0.6045.104", - "revision": "version:119.0.6045.104" + "location": "lacros_version_skew_tests_v119.0.6045.116", + "revision": "version:119.0.6045.116" } ], "dimensions": { @@ -43572,9 +43572,9 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.filter;../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6045.104/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6045.116/test_ash_chrome" ], - "description": "Run with ash-chrome version 119.0.6045.104", + "description": "Run with ash-chrome version 119.0.6045.116", "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -43583,8 +43583,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v119.0.6045.104", - "revision": "version:119.0.6045.104" + "location": "lacros_version_skew_tests_v119.0.6045.116", + "revision": "version:119.0.6045.116" } ], "dimensions": { @@ -44881,9 +44881,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_v119.0.6045.104/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6045.116/test_ash_chrome" ], - "description": "Run with ash-chrome version 119.0.6045.104", + "description": "Run with ash-chrome version 119.0.6045.116", "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -44892,8 +44892,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v119.0.6045.104", - "revision": "version:119.0.6045.104" + "location": "lacros_version_skew_tests_v119.0.6045.116", + "revision": "version:119.0.6045.116" } ], "dimensions": { @@ -45031,9 +45031,9 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.filter;../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6045.104/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6045.116/test_ash_chrome" ], - "description": "Run with ash-chrome version 119.0.6045.104", + "description": "Run with ash-chrome version 119.0.6045.116", "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -45042,8 +45042,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v119.0.6045.104", - "revision": "version:119.0.6045.104" + "location": "lacros_version_skew_tests_v119.0.6045.116", + "revision": "version:119.0.6045.116" } ], "dimensions": { @@ -45727,9 +45727,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_v119.0.6045.104/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6045.116/test_ash_chrome" ], - "description": "Run with ash-chrome version 119.0.6045.104", + "description": "Run with ash-chrome version 119.0.6045.116", "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -45738,8 +45738,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v119.0.6045.104", - "revision": "version:119.0.6045.104" + "location": "lacros_version_skew_tests_v119.0.6045.116", + "revision": "version:119.0.6045.116" } ], "dimensions": { @@ -46945,23 +46945,6 @@ "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "nacl_loader_unittests", - "swarming": { - "dimensions": { - "os": "Ubuntu-22.04", - "pool": "chromium.tests.no-external-ip" - }, - "expiration": 43200, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "nacl_loader_unittests", - "test_id_prefix": "ninja://components/nacl/loader:nacl_loader_unittests/" - }, - { - "isolate_profile_data": true, - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, "name": "native_theme_unittests", "swarming": { "dimensions": { @@ -47081,23 +47064,6 @@ "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "ppapi_unittests", - "swarming": { - "dimensions": { - "os": "Ubuntu-22.04", - "pool": "chromium.tests.no-external-ip" - }, - "expiration": 43200, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "ppapi_unittests", - "test_id_prefix": "ninja://ppapi:ppapi_unittests/" - }, - { - "isolate_profile_data": true, - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, "name": "printing_unittests", "swarming": { "dimensions": {
diff --git a/testing/buildbot/chromium.linux.json b/testing/buildbot/chromium.linux.json index 8db8ad57..f4b012b 100644 --- a/testing/buildbot/chromium.linux.json +++ b/testing/buildbot/chromium.linux.json
@@ -2506,21 +2506,6 @@ "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "nacl_loader_unittests", - "swarming": { - "dimensions": { - "os": "Ubuntu-22.04" - }, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "nacl_loader_unittests", - "test_id_prefix": "ninja://components/nacl/loader:nacl_loader_unittests/" - }, - { - "isolate_profile_data": true, - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, "name": "native_theme_unittests", "swarming": { "dimensions": { @@ -2626,21 +2611,6 @@ "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "ppapi_unittests", - "swarming": { - "dimensions": { - "os": "Ubuntu-22.04" - }, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "ppapi_unittests", - "test_id_prefix": "ninja://ppapi:ppapi_unittests/" - }, - { - "isolate_profile_data": true, - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, "name": "printing_unittests", "swarming": { "dimensions": { @@ -4682,26 +4652,6 @@ "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "nacl_loader_unittests", - "swarming": { - "dimensions": { - "os": "Ubuntu-22.04" - }, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "nacl_loader_unittests", - "test_id_prefix": "ninja://components/nacl/loader:nacl_loader_unittests/" - }, - { - "args": [ - "--no-xvfb", - "--use-weston", - "--ozone-platform=wayland" - ], - "isolate_profile_data": true, - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, "name": "native_theme_unittests", "swarming": { "dimensions": { @@ -4822,26 +4772,6 @@ "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "ppapi_unittests", - "swarming": { - "dimensions": { - "os": "Ubuntu-22.04" - }, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "ppapi_unittests", - "test_id_prefix": "ninja://ppapi:ppapi_unittests/" - }, - { - "args": [ - "--no-xvfb", - "--use-weston", - "--ozone-platform=wayland" - ], - "isolate_profile_data": true, - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, "name": "printing_unittests", "swarming": { "dimensions": { @@ -6076,20 +6006,6 @@ "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "nacl_loader_unittests", - "swarming": { - "dimensions": { - "os": "Ubuntu-22.04" - }, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "nacl_loader_unittests", - "test_id_prefix": "ninja://components/nacl/loader:nacl_loader_unittests/" - }, - { - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, "name": "native_theme_unittests", "swarming": { "dimensions": { @@ -6189,20 +6105,6 @@ "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "ppapi_unittests", - "swarming": { - "dimensions": { - "os": "Ubuntu-22.04" - }, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "ppapi_unittests", - "test_id_prefix": "ninja://ppapi:ppapi_unittests/" - }, - { - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, "name": "printing_unittests", "swarming": { "dimensions": {
diff --git a/testing/buildbot/chromium.memory.fyi.json b/testing/buildbot/chromium.memory.fyi.json index 42e86db..667ec77 100644 --- a/testing/buildbot/chromium.memory.fyi.json +++ b/testing/buildbot/chromium.memory.fyi.json
@@ -944,23 +944,6 @@ "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "nacl_loader_unittests", - "swarming": { - "dimensions": { - "os": "Ubuntu-22.04" - }, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "nacl_loader_unittests", - "test_id_prefix": "ninja://components/nacl/loader:nacl_loader_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, "name": "native_theme_unittests", "swarming": { "dimensions": { @@ -1081,23 +1064,6 @@ "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "ppapi_unittests", - "swarming": { - "dimensions": { - "os": "Ubuntu-22.04" - }, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "ppapi_unittests", - "test_id_prefix": "ninja://ppapi:ppapi_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, "name": "printing_unittests", "swarming": { "dimensions": { @@ -2475,24 +2441,6 @@ "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "nacl_loader_unittests", - "swarming": { - "dimensions": { - "cpu": "x86-64", - "os": "Ubuntu-20.04" - }, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "nacl_loader_unittests", - "test_id_prefix": "ninja://components/nacl/loader:nacl_loader_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, "name": "native_theme_unittests", "swarming": { "dimensions": { @@ -2619,24 +2567,6 @@ "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "ppapi_unittests", - "swarming": { - "dimensions": { - "cpu": "x86-64", - "os": "Ubuntu-20.04" - }, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "ppapi_unittests", - "test_id_prefix": "ninja://ppapi:ppapi_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, "name": "printing_unittests", "swarming": { "dimensions": { @@ -5338,21 +5268,6 @@ "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "nacl_loader_unittests", - "swarming": { - "dimensions": { - "os": "Ubuntu-22.04" - }, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "nacl_loader_unittests", - "test_id_prefix": "ninja://components/nacl/loader:nacl_loader_unittests/" - }, - { - "isolate_profile_data": true, - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, "name": "native_theme_unittests", "swarming": { "dimensions": { @@ -5458,21 +5373,6 @@ "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "ppapi_unittests", - "swarming": { - "dimensions": { - "os": "Ubuntu-22.04" - }, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "ppapi_unittests", - "test_id_prefix": "ninja://ppapi:ppapi_unittests/" - }, - { - "isolate_profile_data": true, - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, "name": "printing_unittests", "swarming": { "dimensions": {
diff --git a/testing/buildbot/chromium.memory.json b/testing/buildbot/chromium.memory.json index d23ee6a..773195c 100644 --- a/testing/buildbot/chromium.memory.json +++ b/testing/buildbot/chromium.memory.json
@@ -945,23 +945,6 @@ "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "nacl_loader_unittests", - "swarming": { - "dimensions": { - "os": "Ubuntu-22.04" - }, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "nacl_loader_unittests", - "test_id_prefix": "ninja://components/nacl/loader:nacl_loader_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, "name": "native_theme_unittests", "swarming": { "dimensions": { @@ -1082,23 +1065,6 @@ "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "ppapi_unittests", - "swarming": { - "dimensions": { - "os": "Ubuntu-22.04" - }, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "ppapi_unittests", - "test_id_prefix": "ninja://ppapi:ppapi_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, "name": "printing_unittests", "swarming": { "dimensions": { @@ -2286,20 +2252,6 @@ "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "nacl_loader_unittests", - "swarming": { - "dimensions": { - "os": "Ubuntu-22.04" - }, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "nacl_loader_unittests", - "test_id_prefix": "ninja://components/nacl/loader:nacl_loader_unittests/" - }, - { - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, "name": "native_theme_unittests", "swarming": { "dimensions": { @@ -2398,20 +2350,6 @@ "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "ppapi_unittests", - "swarming": { - "dimensions": { - "os": "Ubuntu-22.04" - }, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "ppapi_unittests", - "test_id_prefix": "ninja://ppapi:ppapi_unittests/" - }, - { - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, "name": "printing_unittests", "swarming": { "dimensions": { @@ -6999,24 +6937,6 @@ "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "nacl_loader_unittests", - "swarming": { - "dimensions": { - "cpu": "x86-64", - "os": "Ubuntu-20.04" - }, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "nacl_loader_unittests", - "test_id_prefix": "ninja://components/nacl/loader:nacl_loader_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, "name": "native_theme_unittests", "swarming": { "dimensions": { @@ -7143,24 +7063,6 @@ "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "ppapi_unittests", - "swarming": { - "dimensions": { - "cpu": "x86-64", - "os": "Ubuntu-20.04" - }, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "ppapi_unittests", - "test_id_prefix": "ninja://ppapi:ppapi_unittests/" - }, - { - "args": [ - "--test-launcher-print-test-stdio=always" - ], - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, "name": "printing_unittests", "swarming": { "dimensions": { @@ -16217,12 +16119,12 @@ { "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_v119.0.6045.104/test_ash_chrome", + "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6045.116/test_ash_chrome", "--test-launcher-print-test-stdio=always", "--combine-ash-logs-on-bots", "--asan-symbolize-output" ], - "description": "Run with ash-chrome version 119.0.6045.104", + "description": "Run with ash-chrome version 119.0.6045.116", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -16232,8 +16134,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v119.0.6045.104", - "revision": "version:119.0.6045.104" + "location": "lacros_version_skew_tests_v119.0.6045.116", + "revision": "version:119.0.6045.116" } ], "dimensions": { @@ -16387,12 +16289,12 @@ { "args": [ "--test-launcher-filter-file=../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.filter;../../testing/buildbot/filters/linux-lacros.lacros_chrome_browsertests.skew.filter", - "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6045.104/test_ash_chrome", + "--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6045.116/test_ash_chrome", "--test-launcher-print-test-stdio=always", "--combine-ash-logs-on-bots", "--asan-symbolize-output" ], - "description": "Run with ash-chrome version 119.0.6045.104", + "description": "Run with ash-chrome version 119.0.6045.116", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -16402,8 +16304,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v119.0.6045.104", - "revision": "version:119.0.6045.104" + "location": "lacros_version_skew_tests_v119.0.6045.116", + "revision": "version:119.0.6045.116" } ], "dimensions": { @@ -18035,20 +17937,6 @@ "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "nacl_loader_unittests", - "swarming": { - "dimensions": { - "os": "Ubuntu-22.04" - }, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "nacl_loader_unittests", - "test_id_prefix": "ninja://components/nacl/loader:nacl_loader_unittests/" - }, - { - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, "name": "native_theme_unittests", "swarming": { "dimensions": { @@ -18147,20 +18035,6 @@ "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, - "name": "ppapi_unittests", - "swarming": { - "dimensions": { - "os": "Ubuntu-22.04" - }, - "service_account": "chromium-tester@chops-service-accounts.iam.gserviceaccount.com" - }, - "test": "ppapi_unittests", - "test_id_prefix": "ninja://ppapi:ppapi_unittests/" - }, - { - "merge": { - "script": "//testing/merge_scripts/standard_gtest_merge.py" - }, "name": "printing_unittests", "swarming": { "dimensions": {
diff --git a/testing/buildbot/test_suites.pyl b/testing/buildbot/test_suites.pyl index 4491776..f1f48c8 100644 --- a/testing/buildbot/test_suites.pyl +++ b/testing/buildbot/test_suites.pyl
@@ -5832,7 +5832,7 @@ 'gl_gtests_passthrough', 'gpu_fyi_vulkan_swiftshader_gtests', 'non_android_and_cast_and_chromeos_chromium_gtests', - 'non_android_chromium_gtests', + 'non_android_chromium_gtests_no_nacl', 'vr_platform_specific_chromium_gtests', ], @@ -5848,7 +5848,7 @@ 'linux_specific_xr_gtests', 'gl_gtests_passthrough', 'non_android_and_cast_and_chromeos_chromium_gtests', - 'non_android_chromium_gtests', + 'non_android_chromium_gtests_no_nacl', 'vr_platform_specific_chromium_gtests', ], @@ -5889,7 +5889,7 @@ 'linux_flavor_specific_chromium_gtests', 'linux_specific_xr_gtests', 'non_android_and_cast_and_chromeos_chromium_gtests', - 'non_android_chromium_gtests', + 'non_android_chromium_gtests_no_nacl', 'vr_platform_specific_chromium_gtests', ], @@ -5905,7 +5905,7 @@ 'linux_flavor_specific_chromium_gtests', 'linux_specific_xr_gtests', 'non_android_and_cast_and_chromeos_chromium_gtests', - 'non_android_chromium_gtests', + 'non_android_chromium_gtests_no_nacl', 'vr_platform_specific_chromium_gtests', ],
diff --git a/testing/buildbot/variants.pyl b/testing/buildbot/variants.pyl index 2e54145..fe662f5 100644 --- a/testing/buildbot/variants.pyl +++ b/testing/buildbot/variants.pyl
@@ -102,16 +102,16 @@ }, 'LACROS_VERSION_SKEW_BETA': { 'identifier': 'Lacros version skew testing ash beta', - 'description': 'Run with ash-chrome version 119.0.6045.104', + 'description': 'Run with ash-chrome version 119.0.6045.116', 'args': [ - '--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6045.104/test_ash_chrome', + '--ash-chrome-path-override=../../lacros_version_skew_tests_v119.0.6045.116/test_ash_chrome', ], 'swarming': { 'cipd_packages': [ { 'cipd_package': 'chromium/testing/linux-ash-chromium/x86_64/ash.zip', - 'location': 'lacros_version_skew_tests_v119.0.6045.104', - 'revision': 'version:119.0.6045.104', + 'location': 'lacros_version_skew_tests_v119.0.6045.116', + 'revision': 'version:119.0.6045.116', }, ], },
diff --git a/testing/flake_suppressor_common/common_typing.py b/testing/flake_suppressor_common/common_typing.py index ccbc060..4f37c15 100644 --- a/testing/flake_suppressor_common/common_typing.py +++ b/testing/flake_suppressor_common/common_typing.py
@@ -22,12 +22,13 @@ TestToTagsType = Dict[str, TagsToUrlsType] AggregatedResultsType = Dict[str, TestToTagsType] -# Sample: +# Sample of AggregatedStatusResultsType: # { # 'test_suite': { # 'test_name': { # ('typ', 'tags', 'as', 'tuple'): -# [ (status, url, date), (status, url, date) ], +# [ (status, url, date, is_slow, typ_expectations), +# (status, url, date, is_slow, typ_expectations) ], # }, # }, # } @@ -35,6 +36,8 @@ status: str build_url: str date: datetime.date + is_slow: bool + typ_expectations: List[str] TagsToResultType = Dict[TagTupleType, List[ResultTupleType]]
diff --git a/testing/flake_suppressor_common/data_types.py b/testing/flake_suppressor_common/data_types.py index dc601f9..3e737cf 100644 --- a/testing/flake_suppressor_common/data_types.py +++ b/testing/flake_suppressor_common/data_types.py
@@ -4,11 +4,9 @@ """Module for custom data types.""" import datetime -from typing import Any -from typing import Optional +from typing import Any, List, Optional from flake_suppressor_common import common_typing as ct - from unexpected_passes_common import data_types as unexpected_dt @@ -35,13 +33,17 @@ for the purposes of the flake finder. """ + # TODO(crbug.com/1358735): Refactor this Class to take ResultTupleType as an + # input. def __init__(self, suite: str, test: str, tags: ct.TagTupleType, build_id: str, status: Optional[str] = None, - date: Optional[datetime.date] = None): + date: Optional[datetime.date] = None, + is_slow: Optional[bool] = None, + typ_expectations: Optional[List[str]] = None): assert isinstance(tags, tuple), 'Tags must be in tuple form to be hashable' # Results should not have any globs. assert '*' not in test @@ -51,13 +53,17 @@ self.build_id = build_id self.status = status or '' self.date = date or datetime.date.min + self.is_slow = is_slow or False + self.typ_expectations = typ_expectations or [] + self.typ_expectations.sort() def __eq__(self, other: Any) -> bool: return (isinstance(other, Result) and self.suite == other.suite and self.test == other.test and self.tags == other.tags and self.build_id == other.build_id and self.status == other.status - and self.date == other.date) + and self.date == other.date and self.is_slow == other.is_slow + and self.typ_expectations == other.typ_expectations) def __hash__(self) -> int: return hash((self.suite, self.test, self.tags, self.build_id, self.status, - self.date)) + self.date, self.is_slow, tuple(self.typ_expectations)))
diff --git a/testing/flake_suppressor_common/data_types_unittest.py b/testing/flake_suppressor_common/data_types_unittest.py index 4d2c48c..9a8f1283 100755 --- a/testing/flake_suppressor_common/data_types_unittest.py +++ b/testing/flake_suppressor_common/data_types_unittest.py
@@ -33,6 +33,18 @@ 'id', date=datetime.date(2023, 3, 8)) self.assertTrue(e.AppliesToResult(r)) + # With is_slow + r = data_types.Result('suite', + 'test', ('win', 'nvidia'), + 'id', + is_slow=True) + self.assertTrue(e.AppliesToResult(r)) + # With typ_expectations + r = data_types.Result('suite', + 'test', ('win', 'nvidia'), + 'id', + typ_expectations=['Pass']) + self.assertTrue(e.AppliesToResult(r)) # Tag subset r = data_types.Result('suite', 'test', ('win', 'nvidia', 'release'), 'id') self.assertTrue(e.AppliesToResult(r)) @@ -55,6 +67,18 @@ 'id', date=datetime.date(2023, 3, 8)) self.assertFalse(e.AppliesToResult(r)) + # With is_slow + r = data_types.Result('suite', + 'notatest', ('win', 'nvidia'), + 'id', + is_slow=True) + self.assertFalse(e.AppliesToResult(r)) + # With typ_expectations + r = data_types.Result('suite', + 'notatest', ('win', 'nvidia'), + 'id', + typ_expectations=['Pass']) + self.assertFalse(e.AppliesToResult(r)) # Tag superset r = data_types.Result('suite', 'test', tuple(['win']), 'id') self.assertFalse(e.AppliesToResult(r)) @@ -111,6 +135,22 @@ datetime.date(2023, 3, 8)) self.assertNotEqual(r, other) + other = data_types.Result('suite', 'test', ('win', 'nvidia'), 'id', '', + datetime.date.min, False) + self.assertEqual(r, other) + + other = data_types.Result('suite', 'test', ('win', 'nvidia'), 'id', '', + datetime.date.min, True) + self.assertNotEqual(r, other) + + other = data_types.Result('suite', 'test', ('win', 'nvidia'), 'id', '', + datetime.date.min, False, []) + self.assertEqual(r, other) + + other = data_types.Result('suite', 'test', ('win', 'nvidia'), 'id', '', + datetime.date.min, False, ['Pass']) + self.assertNotEqual(r, other) + if __name__ == '__main__': unittest.main(verbosity=2)
diff --git a/testing/flake_suppressor_common/expectations.py b/testing/flake_suppressor_common/expectations.py index 1989057..18a27f1f 100644 --- a/testing/flake_suppressor_common/expectations.py +++ b/testing/flake_suppressor_common/expectations.py
@@ -221,6 +221,7 @@ for test, tag_map in test_map.items(): for typ_tags, result_tuple_list in tag_map.items(): status = set() + slow_test = False for test_result in tag_map[typ_tags]: if test_result.status == ct.ResultStatus.CRASH: status.add('Crash') @@ -228,11 +229,17 @@ status.add('Failure') elif test_result.status == ct.ResultStatus.ABORT: status.add('Timeout') + # Mark the test as a Slow test. + if 'Slow' in test_result.typ_expectations: + slow_test = True # Failed tests result must be over all threshold requirement. if (status and OverFailedBuildThreshold( result_tuple_list, build_fail_total_number_threshold) and OverFailedBuildByDayThreshold( result_tuple_list, build_fail_consecutive_day_threshold)): + # Only skip slow web tests that are consistently timing out. + if slow_test and len(status) == 1 and list(status)[0] == 'Timeout': + status.add('Skip') status_list = list(status) status_list.sort() self.ModifyFileForResult(suite, test, typ_tags, '',
diff --git a/testing/flake_suppressor_common/expectations_unittest.py b/testing/flake_suppressor_common/expectations_unittest.py index aee6998..38bb291 100755 --- a/testing/flake_suppressor_common/expectations_unittest.py +++ b/testing/flake_suppressor_common/expectations_unittest.py
@@ -324,37 +324,46 @@ tuple(['win']): [ ct.ResultTupleType(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/1111', - datetime.date(2022, 1, 2)), + datetime.date(2022, 1, + 2), False, ['Pass']), ct.ResultTupleType(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/2222', - datetime.date(2022, 1, 1)), + datetime.date(2022, 1, + 1), False, ['Pass']), ct.ResultTupleType(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/3333', - datetime.date(2022, 1, 4)), + datetime.date(2022, 1, + 4), False, ['Pass']), ], tuple(['mac']): [ ct.ResultTupleType(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/1111', - datetime.date(2022, 1, 5)), + datetime.date(2022, 1, + 5), False, ['Pass']), ct.ResultTupleType(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/2222', - datetime.date(2022, 1, 6)), + datetime.date(2022, 1, + 6), False, ['Pass']), ct.ResultTupleType(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/3333', - datetime.date(2022, 1, 3)), + datetime.date(2022, 1, + 3), False, ['Pass']), ], }, 'bar_test': { tuple(['win']): [ ct.ResultTupleType(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/4444', - datetime.date(2022, 1, 9)), + datetime.date(2022, 1, + 9), False, ['Pass']), ct.ResultTupleType(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/5555', - datetime.date(2022, 1, 8)), + datetime.date(2022, 1, + 8), False, ['Pass']), ct.ResultTupleType(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/6666', - datetime.date(2022, 1, 7)), + datetime.date(2022, 1, + 7), False, ['Pass']), ], }, 'baz_test': { @@ -363,23 +372,28 @@ tuple(['win']): [ ct.ResultTupleType(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/7777', - datetime.date(2021, 1, 10)), + datetime.date(2021, 1, + 10), False, ['Pass']), ct.ResultTupleType(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/8888', - datetime.date(2022, 1, 10)), + datetime.date(2022, 1, + 10), False, ['Pass']), ct.ResultTupleType(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/9999', - datetime.date(2023, 1, 10)), + datetime.date(2023, 1, + 10), False, ['Pass']), ], # This test config has less than 3 failed build, and thus should # not exist in the output. tuple(['mac']): [ ct.ResultTupleType(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/7777', - datetime.date(2022, 1, 10)), + datetime.date(2022, 1, + 10), False, ['Pass']), ct.ResultTupleType(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/8888', - datetime.date(2022, 1, 11)), + datetime.date(2022, 1, + 11), False, ['Pass']), ], }, }, @@ -444,37 +458,46 @@ tuple(['win', 'win10']): [ ct.ResultTupleType(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/1111', - datetime.date(2022, 1, 2)), + datetime.date(2022, 1, + 2), False, ['Pass']), ct.ResultTupleType(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/2222', - datetime.date(2022, 1, 1)), + datetime.date(2022, 1, + 1), False, ['Pass']), ct.ResultTupleType(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/3333', - datetime.date(2022, 1, 4)), + datetime.date(2022, 1, + 4), False, ['Pass']), ], tuple(['mac']): [ ct.ResultTupleType(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/1111', - datetime.date(2022, 1, 5)), + datetime.date(2022, 1, + 5), False, ['Pass']), ct.ResultTupleType(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/2222', - datetime.date(2022, 1, 6)), + datetime.date(2022, 1, + 6), False, ['Pass']), ct.ResultTupleType(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/3333', - datetime.date(2022, 1, 3)), + datetime.date(2022, 1, + 3), False, ['Pass']), ], }, 'bar_test': { tuple(['win', 'win10']): [ ct.ResultTupleType(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/4444', - datetime.date(2022, 1, 9)), + datetime.date(2022, 1, + 9), False, ['Pass']), ct.ResultTupleType(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/5555', - datetime.date(2022, 1, 8)), + datetime.date(2022, 1, + 8), False, ['Pass']), ct.ResultTupleType(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/6666', - datetime.date(2022, 1, 7)), + datetime.date(2022, 1, + 7), False, ['Pass']), ], }, 'baz_test': { @@ -483,23 +506,28 @@ tuple(['win']): [ ct.ResultTupleType(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/7777', - datetime.date(2021, 1, 10)), + datetime.date(2021, 1, + 10), False, ['Pass']), ct.ResultTupleType(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/8888', - datetime.date(2022, 1, 10)), + datetime.date(2022, 1, + 10), False, ['Pass']), ct.ResultTupleType(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/9999', - datetime.date(2023, 1, 10)), + datetime.date(2023, 1, + 10), False, ['Pass']), ], # This test config has less than 3 failed build, and thus should # not exist in the output. tuple(['mac']): [ ct.ResultTupleType(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/7777', - datetime.date(2022, 1, 10)), + datetime.date(2022, 1, + 10), False, ['Pass']), ct.ResultTupleType(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/8888', - datetime.date(2022, 1, 11)), + datetime.date(2022, 1, + 11), False, ['Pass']), ], }, }, @@ -838,13 +866,13 @@ result_tuple_list = [ ct.ResultTupleType(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/1111', - datetime.date(2021, 1, 1)), + datetime.date(2021, 1, 1), False, ['Pass']), ct.ResultTupleType(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/2222', - datetime.date(2022, 1, 1)), + datetime.date(2022, 1, 1), False, ['Pass']), ct.ResultTupleType(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/3333', - datetime.date(2023, 1, 1)), + datetime.date(2023, 1, 1), False, ['Pass']), ] self.assertTrue( expectations.OverFailedBuildThreshold( @@ -859,10 +887,10 @@ result_tuple_list = [ ct.ResultTupleType(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/1111', - datetime.date(2022, 1, 1)), + datetime.date(2022, 1, 1), False, ['Pass']), ct.ResultTupleType(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/2222', - datetime.date(2022, 1, 2)), + datetime.date(2022, 1, 2), False, ['Pass']), ] self.assertFalse( expectations.OverFailedBuildThreshold( @@ -871,13 +899,13 @@ result_tuple_list = [ ct.ResultTupleType(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/1111', - datetime.date(2022, 1, 1)), + datetime.date(2022, 1, 1), False, ['Pass']), ct.ResultTupleType(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/2222', - datetime.date(2022, 1, 2)), + datetime.date(2022, 1, 2), False, ['Pass']), ct.ResultTupleType(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/2222', - datetime.date(2022, 1, 3)), + datetime.date(2022, 1, 3), False, ['Pass']), ] self.assertFalse( expectations.OverFailedBuildThreshold( @@ -897,13 +925,13 @@ result_tuple_list = [ ct.ResultTupleType(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/1111', - datetime.date(2022, 1, 2)), + datetime.date(2022, 1, 2), False, ['Pass']), ct.ResultTupleType(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/2222', - datetime.date(2022, 1, 1)), + datetime.date(2022, 1, 1), False, ['Pass']), ct.ResultTupleType(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/3333', - datetime.date(2022, 1, 3)), + datetime.date(2022, 1, 3), False, ['Pass']), ] self.assertTrue( expectations.OverFailedBuildByDayThreshold( @@ -918,13 +946,13 @@ result_tuple_list = [ ct.ResultTupleType(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/1111', - datetime.date(2022, 1, 1)), + datetime.date(2022, 1, 1), False, ['Pass']), ct.ResultTupleType(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/2222', - datetime.date(2022, 1, 1)), + datetime.date(2022, 1, 1), False, ['Pass']), ct.ResultTupleType(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/3333', - datetime.date(2022, 1, 1)), + datetime.date(2022, 1, 1), False, ['Pass']), ] self.assertFalse( expectations.OverFailedBuildByDayThreshold( @@ -933,10 +961,10 @@ result_tuple_list = [ ct.ResultTupleType(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/1111', - datetime.date(2022, 1, 1)), + datetime.date(2022, 1, 1), False, ['Pass']), ct.ResultTupleType(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/2222', - datetime.date(2022, 1, 2)), + datetime.date(2022, 1, 2), False, ['Pass']), ] self.assertFalse( expectations.OverFailedBuildByDayThreshold( @@ -945,13 +973,13 @@ result_tuple_list = [ ct.ResultTupleType(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/1111', - datetime.date(2022, 1, 1)), + datetime.date(2022, 1, 1), False, ['Pass']), ct.ResultTupleType(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/2222', - datetime.date(2022, 1, 2)), + datetime.date(2022, 1, 2), False, ['Pass']), ct.ResultTupleType(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/3333', - datetime.date(2022, 1, 4)), + datetime.date(2022, 1, 4), False, ['Pass']), ] self.assertFalse( expectations.OverFailedBuildByDayThreshold(
diff --git a/testing/flake_suppressor_common/results.py b/testing/flake_suppressor_common/results.py index b1e08d3..92547255 100644 --- a/testing/flake_suppressor_common/results.py +++ b/testing/flake_suppressor_common/results.py
@@ -66,7 +66,8 @@ 'test_suite': { 'test_name': { ('typ', 'tags', 'as', 'tuple'): - [ (status, url, date), (status, url, date) ], + [ (status, url, date, is_slow, typ_expectations), + (status, url, date, is_slow, typ_expectations) ], }, }, } @@ -78,7 +79,8 @@ for r in results: build_url = 'http://ci.chromium.org/b/%s' % r.build_id aggregated_results[r.suite][r.test][r.tags].append( - ct.ResultTupleType(r.status, build_url, r.date)) + ct.ResultTupleType(r.status, build_url, r.date, r.is_slow, + r.typ_expectations)) return aggregated_results def _ConvertJsonResultsToResultObjects(self, results: ct.QueryJsonType @@ -98,12 +100,19 @@ typ_tags = tuple(tag_utils.TagUtils.RemoveIgnoredTags(r['typ_tags'])) status = None date = None + is_slow = None + typ_expectations = None if 'status' in r: status = r['status'] if 'date' in r: date = datetime.date.fromisoformat(r['date']) + if 'is_slow' in r: + is_slow = r['is_slow'] + if 'status' in r: + typ_expectations = r['typ_expectations'] object_results.append( - data_types.Result(suite, test_name, typ_tags, build_id, status, date)) + data_types.Result(suite, test_name, typ_tags, build_id, status, date, + is_slow, typ_expectations)) return object_results def _FilterOutSuppressedResults(self, results: List[data_types.Result]
diff --git a/testing/flake_suppressor_common/results_unittest.py b/testing/flake_suppressor_common/results_unittest.py index 04923bb2..c6ff083 100755 --- a/testing/flake_suppressor_common/results_unittest.py +++ b/testing/flake_suppressor_common/results_unittest.py
@@ -135,6 +135,9 @@ ct.ResultStatus.FAIL, 'date': '2023-03-01', + 'is_slow': + False, + 'typ_expectations': ['Pass'], }, { 'name': ('gpu_tests.webgl_conformance_integration_test.' @@ -147,6 +150,9 @@ ct.ResultStatus.CRASH, 'date': '2023-03-02', + 'is_slow': + False, + 'typ_expectations': ['Pass'], }, { 'name': ('gpu_tests.webgl_conformance_integration_test.' @@ -159,6 +165,9 @@ ct.ResultStatus.FAIL, 'date': '2023-03-03', + 'is_slow': + True, + 'typ_expectations': ['Pass', 'Slow'], }, { 'name': ('gpu_tests.webgl_conformance_integration_test.' @@ -171,6 +180,9 @@ ct.ResultStatus.FAIL, 'date': '2023-03-04', + 'is_slow': + True, + 'typ_expectations': ['Pass', 'Slow'], }, { 'name': ('gpu_tests.pixel_integration_test.PixelIntegrationTest.' @@ -182,6 +194,9 @@ ct.ResultStatus.FAIL, 'date': '2023-03-05', + 'is_slow': + False, + 'typ_expectations': ['Pass'], }, ] expected_output = { @@ -189,26 +204,30 @@ 'conformance/textures/misc/video-rotation.html': { ('nvidia', 'win'): [ (ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/1111', - datetime.date.fromisoformat('2023-03-01')), + datetime.date.fromisoformat('2023-03-01'), False, ['Pass' + ]), (ct.ResultStatus.CRASH, 'http://ci.chromium.org/b/2222', - datetime.date.fromisoformat('2023-03-02')), + datetime.date.fromisoformat('2023-03-02'), False, ['Pass' + ]), ], ('amd', 'win'): [ (ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/3333', - datetime.date.fromisoformat('2023-03-03')), + datetime.date.fromisoformat('2023-03-03'), True, + ['Pass', 'Slow']), ], }, 'conformance/textures/misc/texture-npot-video.html': { ('nvidia', 'win'): [(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/4444', - datetime.date.fromisoformat('2023-03-04'))], + datetime.date.fromisoformat('2023-03-04'), True, + ['Pass', 'Slow'])], }, }, 'pixel_integration_test': { 'Pixel_CSS3DBlueBox': { ('nvidia', 'win'): [(ct.ResultStatus.FAIL, 'http://ci.chromium.org/b/5555', - datetime.date.fromisoformat('2023-03-05'))], + datetime.date.fromisoformat('2023-03-05'), False, ['Pass'])], }, }, } @@ -253,8 +272,8 @@ self.assertEqual(self._results._ConvertJsonResultsToResultObjects(r), expected_results) - def testOnQueryResultWithStatusAndDate(self) -> None: - """Functionality test on query result with status and date attribute.""" + def testOnQueryResultWithOptionalAttributes(self) -> None: + """Functionality test on query result with optional attributes.""" r = [ { 'name': ('gpu_tests.webgl_conformance_integration_test.' @@ -269,6 +288,9 @@ ct.ResultStatus.FAIL, 'date': '2023-03-01', + 'is_slow': + False, + 'typ_expectations': ['Pass'], }, { 'name': ('gpu_tests.webgl_conformance_integration_test.' @@ -281,17 +303,22 @@ ct.ResultStatus.CRASH, 'date': '2023-03-02', + 'is_slow': + True, + 'typ_expectations': ['Pass', 'Slow'], }, ] expected_results = [ data_types.Result('webgl_conformance_integration_test', 'conformance/textures/misc/video-rotation.html', ('nvidia', 'win'), '1111', ct.ResultStatus.FAIL, - datetime.date.fromisoformat('2023-03-01')), + datetime.date.fromisoformat('2023-03-01'), False, + ['Pass']), data_types.Result('webgl_conformance_integration_test', 'conformance/textures/misc/video-rotation.html', ('nvidia', 'win'), '2222', ct.ResultStatus.CRASH, - datetime.date.fromisoformat('2023-03-02')), + datetime.date.fromisoformat('2023-03-02'), True, + ['Pass', 'Slow']), ] self.assertEqual(self._results._ConvertJsonResultsToResultObjects(r), expected_results)
diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json index 25f045c..b3fd44b 100644 --- a/testing/variations/fieldtrial_testing_config.json +++ b/testing/variations/fieldtrial_testing_config.json
@@ -1,19 +1,4 @@ { - "AAudioInputStudy": [ - { - "platforms": [ - "android" - ], - "experiments": [ - { - "name": "Enabled", - "enable_features": [ - "UseAAudioInput" - ] - } - ] - } - ], "AccessibilityIncludeLongClickAction": [ { "platforms": [ @@ -4137,6 +4122,27 @@ ] } ], + "CommerceLocalPDPDetection": [ + { + "platforms": [ + "android", + "chromeos", + "chromeos_lacros", + "ios", + "linux", + "mac", + "windows" + ], + "experiments": [ + { + "name": "Enabled", + "enable_features": [ + "CommerceLocalPDPDetection" + ] + } + ] + } + ], "CommercePriceInsights": [ { "platforms": [ @@ -11147,6 +11153,24 @@ ] } ], + "OmniboxKeywordModeRefresh": [ + { + "platforms": [ + "chromeos", + "linux", + "mac", + "windows" + ], + "experiments": [ + { + "name": "Enabled", + "enable_features": [ + "OmniboxKeywordModeRefresh" + ] + } + ] + } + ], "OmniboxMatchToolbarAndStatusBarColor": [ { "platforms": [ @@ -17276,28 +17300,6 @@ ] } ], - "SolidColorLayers": [ - { - "platforms": [ - "android", - "android_webview", - "chromeos", - "chromeos_lacros", - "fuchsia", - "linux", - "mac", - "windows" - ], - "experiments": [ - { - "name": "Enabled", - "enable_features": [ - "SolidColorLayers" - ] - } - ] - } - ], "SparseObjectPaintProperties": [ { "platforms": [
diff --git a/third_party/angle b/third_party/angle index 32f209b..a494c1d 160000 --- a/third_party/angle +++ b/third_party/angle
@@ -1 +1 @@ -Subproject commit 32f209b83f782d396d9197744b897af421762726 +Subproject commit a494c1d6c8131a5316923bcc573f0908b1db4ef8
diff --git a/third_party/blink/common/features.cc b/third_party/blink/common/features.cc index d15c5c5..5d11d36 100644 --- a/third_party/blink/common/features.cc +++ b/third_party/blink/common/features.cc
@@ -1118,11 +1118,12 @@ "LCPPLazyLoadImagePreload", base::FEATURE_DISABLED_BY_DEFAULT); -const base::FeatureParam<LcppPreloadLazyLoadImageType>::Option - lcpp_preload_lazy_load_image[] = { - {LcppPreloadLazyLoadImageType::kNone, "none"}, - {LcppPreloadLazyLoadImageType::kNativeLazyLoading, - "native_lazy_loading"}, +const base::FeatureParam< + LcppPreloadLazyLoadImageType>::Option lcpp_preload_lazy_load_image[] = { + {LcppPreloadLazyLoadImageType::kNone, "none"}, + {LcppPreloadLazyLoadImageType::kNativeLazyLoading, "native_lazy_loading"}, + {LcppPreloadLazyLoadImageType::kCustomLazyLoading, "custom_lazy_loading"}, + {LcppPreloadLazyLoadImageType::kAll, "all"}, }; const base::FeatureParam<LcppPreloadLazyLoadImageType> kLCPCriticalPathPredictorPreloadLazyLoadImageType{
diff --git a/third_party/blink/common/privacy_budget/identifiability_metrics_unittest.cc b/third_party/blink/common/privacy_budget/identifiability_metrics_unittest.cc index f6ffb389..7a277d68 100644 --- a/third_party/blink/common/privacy_budget/identifiability_metrics_unittest.cc +++ b/third_party/blink/common/privacy_budget/identifiability_metrics_unittest.cc
@@ -7,7 +7,7 @@ #include <cstdint> #include <vector> -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "testing/gtest/include/gtest/gtest.h" namespace blink {
diff --git a/third_party/blink/public/common/custom_handlers/protocol_handler_utils.h b/third_party/blink/public/common/custom_handlers/protocol_handler_utils.h index f832dc00..86a4240 100644 --- a/third_party/blink/public/common/custom_handlers/protocol_handler_utils.h +++ b/third_party/blink/public/common/custom_handlers/protocol_handler_utils.h
@@ -5,7 +5,7 @@ #ifndef THIRD_PARTY_BLINK_PUBLIC_COMMON_CUSTOM_HANDLERS_PROTOCOL_HANDLER_UTILS_H_ #define THIRD_PARTY_BLINK_PUBLIC_COMMON_CUSTOM_HANDLERS_PROTOCOL_HANDLER_UTILS_H_ -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "third_party/blink/public/common/common_export.h" #include "third_party/blink/public/common/security/protocol_handler_security_level.h"
diff --git a/third_party/blink/public/common/features.h b/third_party/blink/public/common/features.h index 5b7a9269..f176b54 100644 --- a/third_party/blink/public/common/features.h +++ b/third_party/blink/public/common/features.h
@@ -641,7 +641,15 @@ // crbug.com/1498777 for more details. enum class LcppPreloadLazyLoadImageType { kNone, + // Browser-level lazy loading via loading attributes. + // https://html.spec.whatwg.org/#lazy-loading-attributes kNativeLazyLoading, + // Lazy loading via JavaScript, which is usually provided with the dynamic src + // URL insersion via IntersectionObserver. Image URLs are typically located + // in data-src attributes, and this option creates preload requests to that + // URLs. + kCustomLazyLoading, + kAll, }; BLINK_COMMON_EXPORT extern const base::FeatureParam< LcppPreloadLazyLoadImageType>
diff --git a/third_party/blink/public/common/shared_storage/shared_storage_utils.h b/third_party/blink/public/common/shared_storage/shared_storage_utils.h index b69265b4..19e2b336 100644 --- a/third_party/blink/public/common/shared_storage/shared_storage_utils.h +++ b/third_party/blink/public/common/shared_storage/shared_storage_utils.h
@@ -7,7 +7,7 @@ #include <cstdlib> -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "third_party/blink/public/common/common_export.h" namespace blink {
diff --git a/third_party/blink/public/common/storage_key/storage_key.h b/third_party/blink/public/common/storage_key/storage_key.h index 7993f65..ce1fc929 100644 --- a/third_party/blink/public/common/storage_key/storage_key.h +++ b/third_party/blink/public/common/storage_key/storage_key.h
@@ -8,7 +8,7 @@ #include <iosfwd> #include <string> -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/unguessable_token.h" #include "net/base/isolation_info.h" #include "net/base/schemeful_site.h"
diff --git a/third_party/blink/public/platform/web_content_settings_client.h b/third_party/blink/public/platform/web_content_settings_client.h index 096cd6eb..99f89fa 100644 --- a/third_party/blink/public/platform/web_content_settings_client.h +++ b/third_party/blink/public/platform/web_content_settings_client.h
@@ -11,7 +11,6 @@ #include "base/functional/callback.h" #include "base/time/time.h" #include "third_party/blink/public/common/client_hints/enabled_client_hints.h" -#include "third_party/blink/public/mojom/navigation/renderer_content_settings.mojom.h" namespace blink { @@ -93,6 +92,10 @@ // interface. virtual bool AllowMutationEvents(bool default_value) { return default_value; } + virtual bool AllowPopupsAndRedirects(bool default_value) { + return default_value; + } + // Reports that passive mixed content was found at the provided URL. virtual void PassiveInsecureContentFound(const WebURL&) {} @@ -100,10 +103,6 @@ // were enabled. virtual void DidNotAllowScript() {} - // Notifies the client that the frame would have loaded an image if image were - // enabled. - virtual void DidNotAllowImage() {} - // Called to persist the received client hint preferences when |url| was // fetched. The preferences should be persisted for |duration|. virtual void PersistClientHints(
diff --git a/third_party/blink/renderer/core/animation/compositor_animations_test.cc b/third_party/blink/renderer/core/animation/compositor_animations_test.cc index 47f18fe..82ce5ba 100644 --- a/third_party/blink/renderer/core/animation/compositor_animations_test.cc +++ b/third_party/blink/renderer/core/animation/compositor_animations_test.cc
@@ -148,9 +148,6 @@ timing_ = CreateCompositableTiming(); compositor_timing_ = CompositorAnimations::CompositorTiming(); - // Make sure the CompositableTiming is really compositable, otherwise - // most other tests will fail. - ASSERT_TRUE(ConvertTimingForCompositor(timing_, compositor_timing_)); keyframe_vector2_ = CreateCompositableFloatKeyframeVector(2); keyframe_animation_effect2_ = @@ -165,6 +162,10 @@ timeline_ = GetDocument().Timeline(); timeline_->ResetForTesting(); + // Make sure the CompositableTiming is really compositable, otherwise + // most other tests will fail. + ASSERT_TRUE(ConvertTimingForCompositor(timing_, compositor_timing_)); + // Using will-change ensures that this object will need paint properties. // Having an animation would normally ensure this but these tests don't // explicitly construct a full animation on the element.
diff --git a/third_party/blink/renderer/core/frame/local_dom_window.cc b/third_party/blink/renderer/core/frame/local_dom_window.cc index 2f558c4..eac9ed0 100644 --- a/third_party/blink/renderer/core/frame/local_dom_window.cc +++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
@@ -456,16 +456,14 @@ return false; } - bool allow_script_renderer = GetFrame()->GetSettings()->GetScriptEnabled(); - bool allow_script_content_setting = - GetFrame()->GetContentSettings()->allow_script; - bool script_enabled = allow_script_renderer && allow_script_content_setting; - if (!script_enabled && reason == kAboutToExecuteScript) { - WebContentSettingsClient* settings_client = - GetFrame()->GetContentSettingsClient(); - if (settings_client) { - settings_client->DidNotAllowScript(); - } + WebContentSettingsClient* settings_client = + GetFrame()->GetContentSettingsClient(); + bool script_enabled = GetFrame()->GetSettings()->GetScriptEnabled(); + if (settings_client) { + script_enabled = settings_client->AllowScript(script_enabled); + } + if (!script_enabled && reason == kAboutToExecuteScript && settings_client) { + settings_client->DidNotAllowScript(); } return script_enabled; }
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc index 827d2bf..f6e4c60 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -2001,8 +2001,10 @@ return true; } - if (GetContentSettings()->allow_popup) { - return true; + if (auto* settings_client = Client()->GetContentSettingsClient()) { + if (settings_client->AllowPopupsAndRedirects(false /* default_value*/)) { + return true; + } } PrintNavigationErrorMessage( target_frame, @@ -3724,9 +3726,4 @@ return security_origin->IsSameOriginWith(top_security_origin); } -const mojom::RendererContentSettingsPtr& LocalFrame::GetContentSettings() { - DCHECK(!IsDetached()); - return loader_.GetDocumentLoader()->GetContentSettings(); -} - } // namespace blink
diff --git a/third_party/blink/renderer/core/frame/local_frame.h b/third_party/blink/renderer/core/frame/local_frame.h index 9f6bf1ba..85f8e32 100644 --- a/third_party/blink/renderer/core/frame/local_frame.h +++ b/third_party/blink/renderer/core/frame/local_frame.h
@@ -62,7 +62,6 @@ #include "third_party/blink/public/mojom/link_to_text/link_to_text.mojom-blink-forward.h" #include "third_party/blink/public/mojom/loader/pause_subresource_loading_handle.mojom-blink-forward.h" #include "third_party/blink/public/mojom/loader/resource_cache.mojom-blink-forward.h" -#include "third_party/blink/public/mojom/navigation/renderer_content_settings.mojom.h" #include "third_party/blink/public/mojom/navigation/renderer_eviction_reason.mojom-blink-forward.h" #include "third_party/blink/public/mojom/reporting/reporting.mojom-blink-forward.h" #include "third_party/blink/public/mojom/script/script_evaluation_params.mojom-blink-forward.h" @@ -903,10 +902,6 @@ return *v8_local_compile_hints_producer_; } - // Gets the content settings associated with the current navigation commit. - // Can only be called while the frame is not detached. - const mojom::RendererContentSettingsPtr& GetContentSettings(); - private: friend class FrameNavigationDisabler; // LocalFrameMojoHandler is a part of LocalFrame.
diff --git a/third_party/blink/renderer/core/html/forms/html_form_element.cc b/third_party/blink/renderer/core/html/forms/html_form_element.cc index 61f4f767..a93000854 100644 --- a/third_party/blink/renderer/core/html/forms/html_form_element.cc +++ b/third_party/blink/renderer/core/html/forms/html_form_element.cc
@@ -677,8 +677,7 @@ attributes_.SetAcceptCharset(params.new_value); } else if (name == html_names::kDisabledAttr) { UseCounter::Count(GetDocument(), WebFeature::kFormDisabledAttributePresent); - } else if (name == html_names::kRelAttr && - RuntimeEnabledFeatures::FormRelAttributeEnabled()) { + } else if (name == html_names::kRelAttr) { rel_attribute_ = RelAttribute::kNone; rel_list_->DidUpdateAttributeValue(params.old_value, params.new_value); if (rel_list_->contains(AtomicString("noreferrer"))) @@ -779,8 +778,6 @@ // because of lazy evaluation. const ListedElement::List& HTMLFormElement::ListedElements( bool include_shadow_trees) const { - if (!RuntimeEnabledFeatures::AutofillShadowDOMEnabled()) - include_shadow_trees = false; bool collect_shadow_inputs = include_shadow_trees && listed_elements_including_shadow_trees_are_dirty_;
diff --git a/third_party/blink/renderer/core/html/forms/html_form_element.idl b/third_party/blink/renderer/core/html/forms/html_form_element.idl index 5306b36..9d5e25b 100644 --- a/third_party/blink/renderer/core/html/forms/html_form_element.idl +++ b/third_party/blink/renderer/core/html/forms/html_form_element.idl
@@ -34,8 +34,8 @@ [CEReactions, Reflect] attribute DOMString name; [CEReactions, Reflect] attribute boolean noValidate; [CEReactions, Reflect] attribute DOMString target; - [RuntimeEnabled=FormRelAttribute, CEReactions, Reflect] attribute DOMString rel; - [RuntimeEnabled=FormRelAttribute, SameObject, PutForwards=value] readonly attribute DOMTokenList relList; + [CEReactions, Reflect] attribute DOMString rel; + [SameObject, PutForwards=value] readonly attribute DOMTokenList relList; readonly attribute HTMLFormControlsCollection elements; readonly attribute long length;
diff --git a/third_party/blink/renderer/core/html/forms/listed_element.cc b/third_party/blink/renderer/core/html/forms/listed_element.cc index 5ee5c9b..aa73485 100644 --- a/third_party/blink/renderer/core/html/forms/listed_element.cc +++ b/third_party/blink/renderer/core/html/forms/listed_element.cc
@@ -55,9 +55,6 @@ namespace { void InvalidateShadowIncludingAncestorForms(ContainerNode& insertion_point) { - if (!RuntimeEnabledFeatures::AutofillShadowDOMEnabled()) - return; - // Let any forms in the shadow including ancestors know that this // ListedElement has changed. Don't include any forms inside the same // TreeScope know because that relationship isn't tracked by listed elements
diff --git a/third_party/blink/renderer/core/html/html_attribute_names.json5 b/third_party/blink/renderer/core/html/html_attribute_names.json5 index 45a3310..68336e4 100644 --- a/third_party/blink/renderer/core/html/html_attribute_names.json5 +++ b/third_party/blink/renderer/core/html/html_attribute_names.json5
@@ -65,6 +65,7 @@ "crossorigin", "csp", "data", + "data-src", "datetime", "declare", "decoding",
diff --git a/third_party/blink/renderer/core/html/image_document.cc b/third_party/blink/renderer/core/html/image_document.cc index 397962e6..e881661 100644 --- a/third_party/blink/renderer/core/html/image_document.cc +++ b/third_party/blink/renderer/core/html/image_document.cc
@@ -138,14 +138,11 @@ LocalFrame* frame = GetDocument()->GetFrame(); Settings* settings = frame->GetSettings(); - bool allow_image_renderer = !settings || settings->GetImagesEnabled(); - bool allow_image_content_setting = frame->GetContentSettings()->allow_image; - bool allow_image = allow_image_renderer && allow_image_content_setting; + bool allow_image = !settings || settings->GetImagesEnabled(); + if (auto* client = frame->GetContentSettingsClient()) { + allow_image = client->AllowImage(allow_image, GetDocument()->Url()); + } if (!allow_image) { - auto* client = frame->GetContentSettingsClient(); - if (client) { - client->DidNotAllowImage(); - } return; }
diff --git a/third_party/blink/renderer/core/html/parser/html_preload_scanner.cc b/third_party/blink/renderer/core/html/parser/html_preload_scanner.cc index 16d0f4e..9d09143 100644 --- a/third_party/blink/renderer/core/html/parser/html_preload_scanner.cc +++ b/third_party/blink/renderer/core/html/parser/html_preload_scanner.cc
@@ -169,16 +169,29 @@ STACK_ALLOCATED(); public: - StartTagScanner(const StringImpl* tag_impl, - MediaValuesCached* media_values, - SubresourceIntegrity::IntegrityFeatures features, - TokenPreloadScanner::ScannerType scanner_type, - const HashSet<String>* disabled_image_types) + StartTagScanner( + const StringImpl* tag_impl, + MediaValuesCached* media_values, + SubresourceIntegrity::IntegrityFeatures features, + TokenPreloadScanner::ScannerType scanner_type, + const HashSet<String>* disabled_image_types, + features::LcppPreloadLazyLoadImageType preload_lazy_load_image_type) : tag_impl_(tag_impl), media_values_(media_values), integrity_features_(features), scanner_type_(scanner_type), - disabled_image_types_(disabled_image_types) { + disabled_image_types_(disabled_image_types), + preload_lazy_load_image_type_(preload_lazy_load_image_type) { + switch (preload_lazy_load_image_type_) { + case features::LcppPreloadLazyLoadImageType::kCustomLazyLoading: + case features::LcppPreloadLazyLoadImageType::kAll: + use_data_src_attr_match_for_image_ = true; + break; + case features::LcppPreloadLazyLoadImageType::kNone: + case features::LcppPreloadLazyLoadImageType::kNativeLazyLoading: + use_data_src_attr_match_for_image_ = false; + break; + } if (Match(tag_impl_, html_names::kImgTag) || Match(tag_impl_, html_names::kSourceTag) || Match(tag_impl_, html_names::kLinkTag)) { @@ -434,6 +447,10 @@ attributionsrc_attr_set_ = true; } else if (Match(attribute_name, html_names::kSharedstoragewritableAttr)) { shared_storage_writable_ = true; + } else if (use_data_src_attr_match_for_image_ && + Match(attribute_name, html_names::kDataSrcAttr) && + img_src_url_.IsNull()) { + img_src_url_ = attribute_value; } } @@ -578,10 +595,19 @@ return false; } - if (is_potentially_lcp_element && - document_parameters.preload_lazy_load_image_type == - features::LcppPreloadLazyLoadImageType::kNativeLazyLoading) { - return false; + // LCPP experiment in crbug.com/1498777. If the image is potentially a LCP + // element, the scanner doesn't mark it as a deferable image regardless of + // whether it has loading="lazy" attribute or not, in order to make the LCP + // image load completion faster. + if (is_potentially_lcp_element) { + switch (document_parameters.preload_lazy_load_image_type) { + case features::LcppPreloadLazyLoadImageType::kNativeLazyLoading: + case features::LcppPreloadLazyLoadImageType::kCustomLazyLoading: + case features::LcppPreloadLazyLoadImageType::kAll: + return false; + case features::LcppPreloadLazyLoadImageType::kNone: + break; + } } return loading_attr_value_ == LoadingAttributeValue::kLazy; @@ -782,6 +808,8 @@ bool shared_storage_writable_ = false; absl::optional<float> resource_width_; absl::optional<float> resource_height_; + features::LcppPreloadLazyLoadImageType preload_lazy_load_image_type_; + bool use_data_src_attr_match_for_image_ = false; }; TokenPreloadScanner::TokenPreloadScanner( @@ -1035,7 +1063,8 @@ MediaValuesCached* media_values = EnsureMediaValues(); StartTagScanner scanner( tag_impl, media_values, document_parameters_->integrity_features, - scanner_type_, &document_parameters_->disabled_image_types); + scanner_type_, &document_parameters_->disabled_image_types, + document_parameters_->preload_lazy_load_image_type); scanner.ProcessAttributes(token.Attributes()); if (in_picture_ && media_values->Width()) {
diff --git a/third_party/blink/renderer/core/html/parser/html_preload_scanner_test.cc b/third_party/blink/renderer/core/html/parser/html_preload_scanner_test.cc index 8693388..144f1ed 100644 --- a/third_party/blink/renderer/core/html/parser/html_preload_scanner_test.cc +++ b/third_party/blink/renderer/core/html/parser/html_preload_scanner_test.cc
@@ -1722,36 +1722,99 @@ } } -class HTMLPreloadScannerLCPPLazyLoadImageTest : public HTMLPreloadScannerTest { +enum class LcppPreloadLazyLoadImageType { + kNativeLazyLoad, + kCustomLazyLoad, + kAll, +}; + +class HTMLPreloadScannerLCPPLazyLoadImageTest + : public HTMLPreloadScannerTest, + public testing::WithParamInterface<LcppPreloadLazyLoadImageType> { public: HTMLPreloadScannerLCPPLazyLoadImageTest() { - scoped_feature_list_.InitAndEnableFeatureWithParameters( - blink::features::kLCPPLazyLoadImagePreload, - {{blink::features::kLCPCriticalPathPredictorPreloadLazyLoadImageType - .name, - "native_lazy_loading"}}); + switch (GetParam()) { + case LcppPreloadLazyLoadImageType::kNativeLazyLoad: + scoped_feature_list_.InitAndEnableFeatureWithParameters( + blink::features::kLCPPLazyLoadImagePreload, + {{blink::features::kLCPCriticalPathPredictorPreloadLazyLoadImageType + .name, + "native_lazy_loading"}}); + break; + case LcppPreloadLazyLoadImageType::kCustomLazyLoad: + scoped_feature_list_.InitAndEnableFeatureWithParameters( + blink::features::kLCPPLazyLoadImagePreload, + {{blink::features::kLCPCriticalPathPredictorPreloadLazyLoadImageType + .name, + "custom_lazy_loading"}}); + break; + case LcppPreloadLazyLoadImageType::kAll: + scoped_feature_list_.InitAndEnableFeatureWithParameters( + blink::features::kLCPPLazyLoadImagePreload, + {{blink::features::kLCPCriticalPathPredictorPreloadLazyLoadImageType + .name, + "all"}}); + break; + } } private: base::test::ScopedFeatureList scoped_feature_list_; }; -TEST_F(HTMLPreloadScannerLCPPLazyLoadImageTest, +INSTANTIATE_TEST_SUITE_P( + All, + HTMLPreloadScannerLCPPLazyLoadImageTest, + ::testing::Values(LcppPreloadLazyLoadImageType::kNativeLazyLoad, + LcppPreloadLazyLoadImageType::kCustomLazyLoad, + LcppPreloadLazyLoadImageType::kAll)); + +TEST_P(HTMLPreloadScannerLCPPLazyLoadImageTest, TokenStreamMatcherWithLoadingLazy) { ElementLocator locator; auto* c = locator.add_components()->mutable_id(); c->set_id_attr("target"); - TokenStreamMatcherTestCase test_case = {locator, - R"HTML( - <div> - <img src="not-interesting.jpg"> - <img src="super-interesting.jpg" id="target" loading="lazy"> - <img src="not-interesting2.jpg"> - </div> - )HTML", - "super-interesting.jpg"}; - Test(test_case); + switch (GetParam()) { + case LcppPreloadLazyLoadImageType::kNativeLazyLoad: + Test(TokenStreamMatcherTestCase{locator, R"HTML( + <div> + <img src="not-interesting.jpg"> + <img src="super-interesting.jpg" id="target" loading="lazy"> + <img src="not-interesting2.jpg"> + </div> + )HTML", + "super-interesting.jpg"}); + break; + case LcppPreloadLazyLoadImageType::kCustomLazyLoad: + Test(TokenStreamMatcherTestCase{locator, R"HTML( + <div> + <img src="not-interesting.jpg"> + <img data-src="super-interesting.jpg" id="target"> + <img src="not-interesting2.jpg"> + </div> + )HTML", + "super-interesting.jpg"}); + break; + case LcppPreloadLazyLoadImageType::kAll: + Test(TokenStreamMatcherTestCase{locator, R"HTML( + <div> + <img src="not-interesting.jpg"> + <img src="super-interesting.jpg" id="target" loading="lazy"> + <img src="not-interesting2.jpg"> + </div> + )HTML", + "super-interesting.jpg"}); + Test(TokenStreamMatcherTestCase{locator, R"HTML( + <div> + <img src="not-interesting.jpg"> + <img data-src="super-interesting.jpg" id="target"> + <img src="not-interesting2.jpg"> + </div> + )HTML", + "super-interesting.jpg"}); + break; + } } } // namespace blink
diff --git a/third_party/blink/renderer/core/loader/document_loader.cc b/third_party/blink/renderer/core/loader/document_loader.cc index c4c3b932..5d38566 100644 --- a/third_party/blink/renderer/core/loader/document_loader.cc +++ b/third_party/blink/renderer/core/loader/document_loader.cc
@@ -333,7 +333,6 @@ const base::flat_map<mojom::blink::RuntimeFeature, bool> modified_runtime_features; AtomicString cookie_deprecation_label; - mojom::RendererContentSettingsPtr content_settings; }; // Asserts size of DocumentLoader, so that whenever a new attribute is added to @@ -537,8 +536,7 @@ load_with_storage_access_(params_->load_with_storage_access), browsing_context_group_info_(params_->browsing_context_group_info), modified_runtime_features_(std::move(params_->modified_runtime_features)), - cookie_deprecation_label_(params_->cookie_deprecation_label), - content_settings_(std::move(params_->content_settings)) { + cookie_deprecation_label_(params_->cookie_deprecation_label) { DCHECK(frame_); DCHECK(params_); @@ -689,7 +687,6 @@ params->load_with_storage_access = load_with_storage_access_; params->modified_runtime_features = modified_runtime_features_; params->cookie_deprecation_label = cookie_deprecation_label_; - params->content_settings = content_settings_->Clone(); return params; } @@ -3503,10 +3500,6 @@ GetLocalFrameClient().DidObserveSubresourceLoad(subresource_load_metrics); } -const mojom::RendererContentSettingsPtr& DocumentLoader::GetContentSettings() { - return content_settings_; -} - DEFINE_WEAK_IDENTIFIER_MAP(DocumentLoader) } // namespace blink
diff --git a/third_party/blink/renderer/core/loader/document_loader.h b/third_party/blink/renderer/core/loader/document_loader.h index 1f85fd2..509bda9 100644 --- a/third_party/blink/renderer/core/loader/document_loader.h +++ b/third_party/blink/renderer/core/loader/document_loader.h
@@ -476,9 +476,6 @@ return cookie_deprecation_label_; } - // Gets the content settings for the current {frame, navigation commit} tuple. - const mojom::RendererContentSettingsPtr& GetContentSettings(); - protected: // Based on its MIME type, if the main document's response corresponds to an // MHTML archive, then every resources will be loaded from this archive. @@ -851,9 +848,6 @@ // Will be used in // //third_party/blink/renderer/modules/cookie_deprecation_label. const AtomicString cookie_deprecation_label_; - - // Renderer-enforced content settings are stored on a per-document basis. - mojom::RendererContentSettingsPtr content_settings_; }; DECLARE_WEAK_IDENTIFIER_MAP(DocumentLoader);
diff --git a/third_party/blink/renderer/core/loader/form_submission.cc b/third_party/blink/renderer/core/loader/form_submission.cc index dbb329d..ae81c4f 100644 --- a/third_party/blink/renderer/core/loader/form_submission.cc +++ b/third_party/blink/renderer/core/loader/form_submission.cc
@@ -338,20 +338,18 @@ copied_attributes.Target().empty() ? document.BaseTarget() : copied_attributes.Target()); - if (RuntimeEnabledFeatures::FormRelAttributeEnabled() && - form->HasRel(HTMLFormElement::kNoReferrer)) { + if (form->HasRel(HTMLFormElement::kNoReferrer)) { frame_request.SetNoReferrer(); frame_request.SetNoOpener(); } - if (RuntimeEnabledFeatures::FormRelAttributeEnabled() && - (form->HasRel(HTMLFormElement::kNoOpener) || - (EqualIgnoringASCIICase(target_or_base_target, "_blank") && - !form->HasRel(HTMLFormElement::kOpener) && - form->GetDocument() - .domWindow() - ->GetFrame() - ->GetSettings() - ->GetTargetBlankImpliesNoOpenerEnabledWillBeRemoved()))) { + if (form->HasRel(HTMLFormElement::kNoOpener) || + (EqualIgnoringASCIICase(target_or_base_target, "_blank") && + !form->HasRel(HTMLFormElement::kOpener) && + form->GetDocument() + .domWindow() + ->GetFrame() + ->GetSettings() + ->GetTargetBlankImpliesNoOpenerEnabledWillBeRemoved())) { frame_request.SetNoOpener(); }
diff --git a/third_party/blink/renderer/core/timing/performance_event_timing.cc b/third_party/blink/renderer/core/timing/performance_event_timing.cc index 4c19145..f0cfa79f 100644 --- a/third_party/blink/renderer/core/timing/performance_event_timing.cc +++ b/third_party/blink/renderer/core/timing/performance_event_timing.cc
@@ -125,7 +125,8 @@ traced_value->SetBoolean("cancelable", cancelable()); // If int overflows occurs, the static_cast may not work correctly. traced_value->SetInteger("interactionId", static_cast<int>(interactionId())); - traced_value->SetInteger("nodeId", target_->GetDomNodeId()); + traced_value->SetInteger( + "nodeId", target_ ? target_->GetDomNodeId() : kInvalidDOMNodeId); traced_value->SetString("frame", String::FromUTF8(GetFrameIdForTracing(frame))); return traced_value;
diff --git a/third_party/blink/renderer/core/typed_arrays/dom_array_buffer.h b/third_party/blink/renderer/core/typed_arrays/dom_array_buffer.h index 17d75fe..0abbb8a0 100644 --- a/third_party/blink/renderer/core/typed_arrays/dom_array_buffer.h +++ b/third_party/blink/renderer/core/typed_arrays/dom_array_buffer.h
@@ -5,6 +5,8 @@ #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_TYPED_ARRAYS_DOM_ARRAY_BUFFER_H_ #define THIRD_PARTY_BLINK_RENDERER_CORE_TYPED_ARRAYS_DOM_ARRAY_BUFFER_H_ +#include <algorithm> + #include "base/allocator/partition_allocator/src/partition_alloc/oom.h" #include "base/containers/span.h" #include "third_party/blink/renderer/core/core_export.h" @@ -40,7 +42,9 @@ if (UNLIKELY(!contents.Data())) { OOM_CRASH(byte_length); } - memcpy(contents.Data(), source, byte_length); + const uint8_t* source_bytes = static_cast<const uint8_t*>(source); + std::copy(source_bytes, source_bytes + byte_length, + static_cast<uint8_t*>(contents.Data())); return Create(std::move(contents)); }
diff --git a/third_party/blink/renderer/modules/accessibility/ax_debug_utils.cc b/third_party/blink/renderer/modules/accessibility/ax_debug_utils.cc index 2e47f06..d9c6fcb 100644 --- a/third_party/blink/renderer/modules/accessibility/ax_debug_utils.cc +++ b/third_party/blink/renderer/modules/accessibility/ax_debug_utils.cc
@@ -20,7 +20,7 @@ } // namespace -std::string TreeToStringHelper(const AXObject* obj, int indent, bool verbose) { +std::string TreeToStringHelper(const AXObject* obj, bool verbose) { return TreeToStringWithMarkedObjectHelper(obj, nullptr, verbose); }
diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 index c9d526f..8c84a87a 100644 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
@@ -376,12 +376,6 @@ public: true, }, { - // Makes autofill look across shadow boundaries when collecting form - // controls to fill. - name: "AutofillShadowDOM", - status: "stable", - }, - { name: "AutomationControlled", base_feature: "none", public: true, @@ -1973,10 +1967,6 @@ status: "experimental", }, { - name: "FormRelAttribute", - status: "stable", - }, - { // Bug fix for crbug.com/1429585 name: "FormStateRestoreCallbackCallWithState", status: "stable", @@ -3597,7 +3587,7 @@ }, { name: "SolidColorLayers", - status: "experimental", + status: "stable", }, { name: "SparseObjectPaintProperties",
diff --git a/third_party/blink/tools/blinkpy/common/checkout/baseline_optimizer.py b/third_party/blink/tools/blinkpy/common/checkout/baseline_optimizer.py index 3f9ff89..d534557 100644 --- a/third_party/blink/tools/blinkpy/common/checkout/baseline_optimizer.py +++ b/third_party/blink/tools/blinkpy/common/checkout/baseline_optimizer.py
@@ -221,12 +221,12 @@ nonvirtual_locations = [ self.location(path) for path in search_path ] - if not self._skips_test(port, nonvirtual_test): + if not self.skips_test(port, nonvirtual_test): yield nonvirtual_locations else: skipped_ports_by_test[nonvirtual_test].append(port) for virtual_test in virtual_tests: - if self._skips_test(port, virtual_test): + if self.skips_test(port, virtual_test): skipped_ports_by_test[virtual_test].append(port) continue virtual_locations = [ @@ -252,7 +252,7 @@ _log.debug('Excluding ports that skip "%s": %s', test, ', '.join(port_names)) - def _skips_test(self, port: Port, test: str) -> bool: + def skips_test(self, port: Port, test: str) -> bool: expectations = self._exp_cache.load(port) results = expectations.get_expectations(test).results return ResultType.Skip in results or port.skips_test(test)
diff --git a/third_party/blink/tools/blinkpy/tool/commands/optimize_baselines.py b/third_party/blink/tools/blinkpy/tool/commands/optimize_baselines.py index 965cd37..e62a80ae 100644 --- a/third_party/blink/tools/blinkpy/tool/commands/optimize_baselines.py +++ b/third_party/blink/tools/blinkpy/tool/commands/optimize_baselines.py
@@ -6,7 +6,7 @@ import itertools import logging import optparse -from typing import Collection, List, Optional, Set, Tuple +from typing import Collection, List, Set, Tuple from blinkpy.common.checkout.baseline_optimizer import BaselineOptimizer from blinkpy.common.net.web_test_results import BaselineSuffix @@ -90,26 +90,10 @@ suffixes: Collection[BaselineSuffix]) -> List[OptimizationTask]: tasks = [] for test_name, suffix in itertools.product(sorted(test_set), suffixes): - wpt_type = self._get_wpt_type(test_name) - if (not wpt_type or - # Only legacy reftests can dump text output, not WPT - # reftests. - wpt_type in {'testharness', 'wdspec'} and suffix == 'txt' - # Some manual tests are run as pixel tests (crbug.com/1114920), - # so `png` is allowed in that case. - or wpt_type == 'manual' and suffix == 'png'): + if self._test_can_have_suffix(test_name, suffix): tasks.append((self.name, test_name, suffix)) return tasks - def _get_wpt_type(self, test_name: str) -> Optional[str]: - for wpt_dir, url_base in self._host_port.WPT_DIRS.items(): - if test_name.startswith(wpt_dir): - manifest = self._host_port.wpt_manifest(wpt_dir) - return manifest.get_test_type( - manifest.file_path_for_test_url( - test_name[len(f'{wpt_dir}/'):])) - return None # Not a WPT. - def _get_test_set(self, options, args): if options.all_tests: test_set = set(self._host_port.tests())
diff --git a/third_party/blink/tools/blinkpy/tool/commands/rebaseline.py b/third_party/blink/tools/blinkpy/tool/commands/rebaseline.py index 831e948c..e3603af7 100644 --- a/third_party/blink/tools/blinkpy/tool/commands/rebaseline.py +++ b/third_party/blink/tools/blinkpy/tool/commands/rebaseline.py
@@ -150,6 +150,30 @@ return self._host_port.output_filename( test_name, test_failures.FILENAME_SUFFIX_EXPECTED, '.' + suffix) + def _test_can_have_suffix(self, test_name: str, + suffix: BaselineSuffix) -> bool: + wpt_type = self._get_wpt_type(test_name) + # Only legacy reftests can dump text output, not WPT reftests. + if wpt_type in {'testharness', 'wdspec'} and suffix == 'txt': + return True + # Some manual tests are run as pixel tests (crbug.com/1114920), so + # `png` is allowed in that case. + elif wpt_type == 'manual' and suffix == 'png': + return True + elif self._host_port.reference_files(test_name) and suffix == 'png': + return False + # No other WPT-suffix combinations are allowed. + return not wpt_type + + def _get_wpt_type(self, test_name: str) -> Optional[str]: + for wpt_dir, url_base in self._host_port.WPT_DIRS.items(): + if test_name.startswith(wpt_dir): + manifest = self._host_port.wpt_manifest(wpt_dir) + return manifest.get_test_type( + manifest.file_path_for_test_url( + test_name[len(f'{wpt_dir}/'):])) + return None # Not a WPT. + class ChangeSet(object): """A record of TestExpectation lines to remove. @@ -376,10 +400,14 @@ | set(build_steps_to_fallback_paths[False])) def _copy_baselines(self, groups: Dict[str, TestBaselineSet]) -> None: + commands = [] + for base_test, group in groups.items(): + for suffix in self._suffixes_for_group(group): + if self._test_can_have_suffix(base_test, suffix): + commands.append( + ('copy_baselines', base_test, suffix, group)) with self._message_pool(self._worker_factory) as pool: - pool.run([('copy_baselines', test, suffix, group) - for test, group in groups.items() - for suffix in self._suffixes_for_group(group)]) + pool.run(commands) def _group_tests_by_base( self, @@ -803,7 +831,7 @@ return contents def choose_valid_baseline(self, artifacts: List[Artifact], test_name: str, - suffix: str) -> bytes: + suffix: BaselineSuffix) -> bytes: """Choose a baseline that would have allowed the observed runs to pass. Usually, this means returning the contents of a non-flaky artifact @@ -943,12 +971,14 @@ else: self._connection.post(name) - def _copy_baselines(self, test_name: str, suffix: str, + def _copy_baselines(self, test_name: str, suffix: BaselineSuffix, group: TestBaselineSet): copies = list( self._copier.find_baselines_to_copy(test_name, suffix, group)) if self._dry_run: for source, dest in sorted(copies, key=lambda copy: copy[1]): + assert source or suffix == 'txt', ( + 'non-txt baselines cannot be all-pass') _log.debug('Would have copied %s -> %s', source or '<all-pass>', dest) else: @@ -969,8 +999,8 @@ rebaseline_failures[task] = error.reason return rebaseline_failures - def _write_baseline(self, task: RebaselineTask, suffix: str, source: str, - contents: bytes): + def _write_baseline(self, task: RebaselineTask, suffix: BaselineSuffix, + source: str, contents: bytes): port = self._host.port_factory.get(task.port_name) flag_spec_option = self._host.builders.flag_specific_option( task.build.builder_name, task.step_name)
diff --git a/third_party/blink/tools/blinkpy/tool/commands/rebaseline_cl.py b/third_party/blink/tools/blinkpy/tool/commands/rebaseline_cl.py index 7695da42..b964d70 100644 --- a/third_party/blink/tools/blinkpy/tool/commands/rebaseline_cl.py +++ b/third_party/blink/tools/blinkpy/tool/commands/rebaseline_cl.py
@@ -13,6 +13,7 @@ from concurrent.futures import Executor from typing import Dict, List, Optional +from blinkpy.common.checkout.baseline_optimizer import BaselineOptimizer from blinkpy.common.net.git_cl import GitCL, TryJobStatus from blinkpy.common.net.rpc import Build, RPCError from blinkpy.common.net.web_test_results import WebTestResults @@ -385,6 +386,8 @@ tasks_by_step = collections.defaultdict(set) for task in test_baseline_set: tasks_by_step[task.step_name].add(task) + optimizer = BaselineOptimizer(self._tool, self._host_port, + self._tool.builders.all_port_names()) for step_name, tasks in tasks_by_step.items(): all_ports = { self._tool.builders.port_name_for_builder_name(builder) @@ -397,16 +400,21 @@ (task.build, task.port_name)) for test in sorted(build_ports_by_test): build_port_pairs = build_ports_by_test[test] - missing_ports = all_ports - { - port - for _, port in build_port_pairs + # Don't fill results for skipped port and test pairs. Otherwise, + # the baselines will be downloaded but not cleaned up. + missing_ports = { + port_name + for port_name in all_ports if + not optimizer.skips_test(optimizer.port(port_name), test) } + missing_ports -= {port for _, port in build_port_pairs} if not missing_ports: continue _log.info('For %s:', test) for port in sorted(missing_ports): - build = self._choose_fill_in_build(port, build_port_pairs) - _log.info('Using "%s" build %d for %s.', + build = self._choose_fill_in_build(optimizer, port, + build_port_pairs) + _log.info(' Using "%s" build %d for %s.', build.builder_name, build.build_number, port) test_baseline_set.add(test, build, @@ -414,7 +422,8 @@ port_name=port) return test_baseline_set - def _choose_fill_in_build(self, target_port, build_port_pairs): + def _choose_fill_in_build(self, optimizer: BaselineOptimizer, target_port, + build_port_pairs): """Returns a Build to use to supply results for the given port. Ideally, this should return a build for a similar port so that the @@ -425,10 +434,8 @@ # for example "win-win11", or "mac-mac13-arm64". For the test port used # in unit tests, though, the full port name may be # "test-<os>-<version>". - def os_name(port): - if '-' not in port: - return port - return port[:port.rfind('-')] + def os_name(port_name: str) -> str: + return optimizer.port(port_name).operating_system() # If any Build exists with the same OS, use the first one. target_os = os_name(target_port)
diff --git a/third_party/blink/tools/blinkpy/tool/commands/rebaseline_cl_unittest.py b/third_party/blink/tools/blinkpy/tool/commands/rebaseline_cl_unittest.py index 2a41ac1..b785d92 100644 --- a/third_party/blink/tools/blinkpy/tool/commands/rebaseline_cl_unittest.py +++ b/third_party/blink/tools/blinkpy/tool/commands/rebaseline_cl_unittest.py
@@ -681,7 +681,7 @@ 'This is generally not suggested unless the results are ' 'platform agnostic.\n', 'INFO: For one/flaky-fail.html:\n', - 'INFO: Using "MOCK Try Linux" build 6000 for test-win-win7.\n', + 'INFO: Using "MOCK Try Linux" build 6000 for test-win-win7.\n', 'INFO: Rebaselining one/flaky-fail.html\n', ]) @@ -851,38 +851,62 @@ ]) self.assertLog([ 'INFO: For one/flaky-fail.html:\n', - 'INFO: Using "MOCK Try Linux" build 100 for test-mac-mac10.11.\n', + 'INFO: Using "MOCK Try Linux" build 100 for test-mac-mac10.11.\n', + ]) + + def test_fill_in_missing_results_with_skipped_test(self): + test_baseline_set = TestBaselineSet(self.tool.builders) + test_baseline_set.add('one/flaky-fail.html', + Build('MOCK Try Linux', 100), + 'blink_web_tests (with patch)') + self.tool.filesystem.write_text_file( + self.mac_port.path_to_never_fix_tests_file(), + textwrap.dedent("""\ + # tags: [ Linux Mac Win ] + # results: [ Skip ] + [ Win ] one/flaky-fail.html [ Skip ] + """)) + self.command.fill_in_missing_results(test_baseline_set) + + self.assertEqual( + test_baseline_set.build_port_pairs('one/flaky-fail.html'), [ + (Build('MOCK Try Linux', 100), 'test-linux-trusty'), + (Build('MOCK Try Linux', 100), 'test-mac-mac10.11'), + ]) + self.assertLog([ + 'INFO: For one/flaky-fail.html:\n', + 'INFO: Using "MOCK Try Linux" build 100 for test-mac-mac10.11.\n', ]) def test_fill_in_missing_results_prefers_build_with_same_os_type(self): self.tool.builders = BuilderList({ - 'MOCK Foo12': { - 'port_name': 'foo-foo12', - 'specifiers': ['Foo12', 'Release'], + 'MOCK Linux Trusty': { + 'port_name': 'test-linux-trusty', + 'specifiers': ['Trusty', 'Release'], 'is_try_builder': True, 'steps': { 'blink_web_tests (with patch)': {}, }, }, - 'MOCK Foo45': { - 'port_name': 'foo-foo45', - 'specifiers': ['Foo45', 'Release'], + 'MOCK Linux Precise': { + 'port_name': 'test-linux-precise', + 'specifiers': ['Precise', 'Release'], 'is_try_builder': True, 'steps': { 'blink_web_tests (with patch)': {}, }, }, - 'MOCK Bar3': { - 'port_name': 'bar-bar3', - 'specifiers': ['Bar3', 'Release'], + 'MOCK Mac10.11': { + 'port_name': 'test-mac-mac10.11', + 'specifiers': ['Mac10.11', 'Release'], 'is_try_builder': True, 'steps': { 'blink_web_tests (with patch)': {}, }, }, - 'MOCK Bar4': { - 'port_name': 'bar-bar4', - 'specifiers': ['Bar4', 'Release'], + 'MOCK Mac10.10': { + 'port_name': 'test-mac-mac10.10', + 'specifiers': ['Mac10.10', 'Release'], 'is_try_builder': True, 'steps': { 'blink_web_tests (with patch)': {}, @@ -890,39 +914,41 @@ }, }) test_baseline_set = TestBaselineSet(self.tool.builders) - test_baseline_set.add('one/flaky-fail.html', Build('MOCK Foo12', 100), + test_baseline_set.add('one/flaky-fail.html', + Build('MOCK Linux Trusty', 100), 'blink_web_tests (with patch)') - test_baseline_set.add('one/flaky-fail.html', Build('MOCK Bar4', 200), - 'blink_web_tests (with patch)') + test_baseline_set.add('one/flaky-fail.html', + Build('MOCK Mac10.10', + 200), 'blink_web_tests (with patch)') self.command.fill_in_missing_results(test_baseline_set) self.assertEqual( sorted(test_baseline_set.build_port_pairs('one/flaky-fail.html')), [ - (Build('MOCK Bar4', 200), 'bar-bar3'), - (Build('MOCK Bar4', 200), 'bar-bar4'), - (Build('MOCK Foo12', 100), 'foo-foo12'), - (Build('MOCK Foo12', 100), 'foo-foo45'), + (Build('MOCK Linux Trusty', 100), 'test-linux-precise'), + (Build('MOCK Linux Trusty', 100), 'test-linux-trusty'), + (Build('MOCK Mac10.10', 200), 'test-mac-mac10.10'), + (Build('MOCK Mac10.10', 200), 'test-mac-mac10.11'), ]) self.assertLog([ 'INFO: For one/flaky-fail.html:\n', - 'INFO: Using "MOCK Bar4" build 200 for bar-bar3.\n', - 'INFO: Using "MOCK Foo12" build 100 for foo-foo45.\n', + 'INFO: Using "MOCK Linux Trusty" build 100 for test-linux-precise.\n', + 'INFO: Using "MOCK Mac10.10" build 200 for test-mac-mac10.11.\n', ]) def test_fill_in_missing_results_partition_by_steps(self): self.tool.builders = BuilderList({ - 'MOCK Foo12': { - 'port_name': 'foo-foo12', - 'specifiers': ['Foo12', 'Release'], + 'MOCK Linux Trusty': { + 'port_name': 'test-linux-trusty', + 'specifiers': ['Trusty', 'Release'], 'is_try_builder': True, 'steps': { 'blink_web_tests (with patch)': {}, 'blink_wpt_tests (with patch)': {}, }, }, - 'MOCK Foo45': { - 'port_name': 'foo-foo45', - 'specifiers': ['Foo45', 'Release'], + 'MOCK Linux Precise': { + 'port_name': 'test-linux-precise', + 'specifiers': ['Precise', 'Release'], 'is_try_builder': True, 'steps': { 'blink_web_tests (with patch)': {}, @@ -931,34 +957,36 @@ }, }) test_baseline_set = TestBaselineSet(self.tool.builders) - test_baseline_set.add('one/flaky-fail.html', Build('MOCK Foo12', 100), + test_baseline_set.add('one/flaky-fail.html', + Build('MOCK Linux Trusty', 100), 'blink_web_tests (with patch)') - test_baseline_set.add('two/image-fail.html', Build('MOCK Foo45', 200), + test_baseline_set.add('two/image-fail.html', + Build('MOCK Linux Precise', 200), 'blink_wpt_tests (with patch)') self.command.fill_in_missing_results(test_baseline_set) self.assertEqual( sorted(test_baseline_set.runs_for_test('one/flaky-fail.html')), [ # Do not add this test to `blink_wpt_tests`. - (Build('MOCK Foo12', - 100), 'blink_web_tests (with patch)', 'foo-foo12'), - (Build('MOCK Foo12', - 100), 'blink_web_tests (with patch)', 'foo-foo45'), + (Build('MOCK Linux Trusty', 100), + 'blink_web_tests (with patch)', 'test-linux-precise'), + (Build('MOCK Linux Trusty', 100), + 'blink_web_tests (with patch)', 'test-linux-trusty'), ]) self.assertEqual( sorted(test_baseline_set.runs_for_test('two/image-fail.html')), [ # Do not add this test to `blink_web_tests`. - (Build('MOCK Foo45', - 200), 'blink_wpt_tests (with patch)', 'foo-foo12'), - (Build('MOCK Foo45', - 200), 'blink_wpt_tests (with patch)', 'foo-foo45'), + (Build('MOCK Linux Precise', 200), + 'blink_wpt_tests (with patch)', 'test-linux-precise'), + (Build('MOCK Linux Precise', 200), + 'blink_wpt_tests (with patch)', 'test-linux-trusty'), ]) self.assertLog([ 'INFO: For one/flaky-fail.html:\n', - 'INFO: Using "MOCK Foo12" build 100 for foo-foo45.\n', + 'INFO: Using "MOCK Linux Trusty" build 100 for test-linux-precise.\n', 'INFO: For two/image-fail.html:\n', - 'INFO: Using "MOCK Foo45" build 200 for foo-foo12.\n', + 'INFO: Using "MOCK Linux Precise" build 200 for test-linux-trusty.\n', ]) def test_explicit_builder_list(self):
diff --git a/third_party/blink/tools/blinkpy/tool/commands/rebaseline_unittest.py b/third_party/blink/tools/blinkpy/tool/commands/rebaseline_unittest.py index 1386333..bbcda67 100644 --- a/third_party/blink/tools/blinkpy/tool/commands/rebaseline_unittest.py +++ b/third_party/blink/tools/blinkpy/tool/commands/rebaseline_unittest.py
@@ -519,6 +519,8 @@ 'blink_web_tests (with patch)') self.command.rebaseline(self.options(), test_baseline_set) + self._mock_copier.find_baselines_to_copy.assert_called_once_with( + 'reftest.html', 'txt', test_baseline_set) self._assert_baseline_downloaded( 'https://results.api.cr.dev/reftest-actual.txt', 'platform/test-win-win7/reftest-expected.txt')
diff --git a/third_party/blink/web_tests/NeverFixTests b/third_party/blink/web_tests/NeverFixTests index 9cd41a56..186a5deb 100644 --- a/third_party/blink/web_tests/NeverFixTests +++ b/third_party/blink/web_tests/NeverFixTests
@@ -2098,3 +2098,6 @@ crbug.com/1499775 [ Chrome ] wpt_internal/webmidi/loopback-receive.https.html [ Skip ] crbug.com/1499775 [ Chrome ] wpt_internal/webmidi/loopback-with-timestamp.https.html [ Skip ] crbug.com/1499775 [ Chrome ] wpt_internal/webmidi/requestmidiaccess-upgrade.https.html [ Skip ] + +# WebNN GPU backend is supported on Win11 by default. +crbug.com/1500120 [ Win10.20h2 ] virtual/webnn-service-enabled/external/wpt/webnn/gpu/* [ Skip ]
diff --git a/third_party/blink/web_tests/TestExpectations b/third_party/blink/web_tests/TestExpectations index 1e0f2ed..cf0bff9a 100644 --- a/third_party/blink/web_tests/TestExpectations +++ b/third_party/blink/web_tests/TestExpectations
@@ -2619,6 +2619,8 @@ external/wpt/webdriver/tests/bidi/network/response_started/response_started_cached.py [ Timeout ] # ====== Test expectations added to unblock wpt-importer ====== +crbug.com/626703 external/wpt/css/css-ui/outline-auto-width-001.html [ Failure ] +crbug.com/626703 virtual/fedcm-login-status/external/wpt/credential-management/fedcm-login-status/confirm-idp-login.https.html [ Failure ] crbug.com/626703 external/wpt/css/css-text/text-align/text-align-justify-tabs-001.html [ Failure ] crbug.com/626703 external/wpt/css/css-text/text-align/text-align-justify-tabs-002.html [ Failure ] crbug.com/626703 external/wpt/css/css-text/text-align/text-align-justify-tabs-003.html [ Failure ] @@ -3034,7 +3036,7 @@ crbug.com/626703 [ Mac13-arm64 ] external/wpt/css/css-overflow/scrollbar-gutter-vertical-lr-002.html [ Failure ] crbug.com/626703 [ Mac13-arm64 ] external/wpt/css/css-overflow/scrollbar-gutter-vertical-rl-002.html [ Failure ] crbug.com/626703 external/wpt/css/css-cascade/import-conditional-002.html [ Failure ] -crbug.com/626703 [ Linux ] external/wpt/mediacapture-record/passthrough/MediaRecorder-passthrough.https.html [ Timeout ] +crbug.com/626703 [ Linux ] external/wpt/mediacapture-record/passthrough/MediaRecorder-passthrough.https.html [ Failure Timeout ] crbug.com/626703 [ Mac10.15 ] external/wpt/mediacapture-record/passthrough/MediaRecorder-passthrough.https.html [ Timeout ] crbug.com/626703 [ Mac11 ] external/wpt/mediacapture-record/passthrough/MediaRecorder-passthrough.https.html [ Timeout ] crbug.com/626703 [ Mac12 ] external/wpt/mediacapture-record/passthrough/MediaRecorder-passthrough.https.html [ Timeout ]
diff --git a/third_party/blink/web_tests/VirtualTestSuites b/third_party/blink/web_tests/VirtualTestSuites index f739a10..7737221 100644 --- a/third_party/blink/web_tests/VirtualTestSuites +++ b/third_party/blink/web_tests/VirtualTestSuites
@@ -2653,5 +2653,16 @@ ], "args": ["--enable-features=GenericSensorExtraClasses"], "expires": "never" + }, + { + "prefix": "webnn-service-enabled", + "platforms": ["Win"], + "bases": [ + "external/wpt/webnn/gpu" + ], + "exclusive_tests": "ALL", + "args": ["--use-gpu-in-tests", "--enable-features=MachineLearningNeuralNetworkService"], + "expires": "Jun 1, 2024", + "owners": ["rafael.cintron@microsoft.com", "ningxin.hu@intel.com", "kbr@chromium.org"] } ]
diff --git a/third_party/blink/web_tests/external/wpt/webnn/batch_normalization.https.any.js b/third_party/blink/web_tests/external/wpt/webnn/batch_normalization.https.any.js index 6644a92..15e66a8 100644 --- a/third_party/blink/web_tests/external/wpt/webnn/batch_normalization.https.any.js +++ b/third_party/blink/web_tests/external/wpt/webnn/batch_normalization.https.any.js
@@ -7,25 +7,4 @@ // https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-batchnorm -const buildBatchNorm = (operationName, builder, resources) => { - // MLOperand batchNormalization(MLOperand input, MLOperand mean, MLOperand variance, - // optional MLBatchNormalizationOptions options = {}); - const namedOutputOperand = {}; - const [inputOperand, meanOperand, varianceOperand] = createMultiInputOperands(builder, resources); - const batchNormOptions = {...resources.options}; - if (batchNormOptions.scale) { - batchNormOptions.scale = createConstantOperand(builder, batchNormOptions.scale); - } - if (batchNormOptions.bias) { - batchNormOptions.bias = createConstantOperand(builder, batchNormOptions.bias); - } - if (batchNormOptions.activation) { - batchNormOptions.activation = builder[batchNormOptions.activation](); - } - // invoke builder.batchNormalization() - namedOutputOperand[resources.expected.name] = - builder[operationName](inputOperand, meanOperand, varianceOperand, batchNormOptions); - return namedOutputOperand; -}; - testWebNNOperation('batchNormalization', buildBatchNorm); \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/webnn/concat.https.any.js b/third_party/blink/web_tests/external/wpt/webnn/concat.https.any.js index b91e99e..cce43e49 100644 --- a/third_party/blink/web_tests/external/wpt/webnn/concat.https.any.js +++ b/third_party/blink/web_tests/external/wpt/webnn/concat.https.any.js
@@ -7,16 +7,4 @@ // https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-concat -const buildConcat = (operationName, builder, resources) => { - // MLOperand concat(sequence<MLOperand> inputs, unsigned long axis); - const namedOutputOperand = {}; - const inputOperands = []; - for (let input of resources.inputs) { - inputOperands.push(builder.input(input.name, {type: input.type, dimensions: input.shape})); - } - // invoke builder.concat() - namedOutputOperand[resources.expected.name] = builder[operationName](inputOperands, resources.axis); - return namedOutputOperand; -}; - testWebNNOperation('concat', buildConcat); \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/webnn/conv2d.https.any.js b/third_party/blink/web_tests/external/wpt/webnn/conv2d.https.any.js index 52e267a..b26b35e 100644 --- a/third_party/blink/web_tests/external/wpt/webnn/conv2d.https.any.js +++ b/third_party/blink/web_tests/external/wpt/webnn/conv2d.https.any.js
@@ -7,19 +7,4 @@ // https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-conv2d -const buildConv2d= (operationName, builder, resources) => { - // MLOperand conv2d(MLOperand input, MLOperand filter, optional MLConv2dOptions options = {}); - const namedOutputOperand = {}; - const [inputOperand, filterOperand] = createMultiInputOperands(builder, resources); - let conv2dOptions = {...resources.options}; - if (conv2dOptions.bias) { - conv2dOptions.bias = createConstantOperand(builder, conv2dOptions.bias); - } - if (conv2dOptions.activation) { - conv2dOptions.activation = builder[conv2dOptions.activation](); - } - namedOutputOperand[resources.expected.name] = builder[operationName](inputOperand, filterOperand, conv2dOptions); - return namedOutputOperand; -}; - testWebNNOperation('conv2d', buildConv2d); \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/webnn/conv_transpose2d.https.any.js b/third_party/blink/web_tests/external/wpt/webnn/conv_transpose2d.https.any.js index 8a1f30d..99e76b8 100644 --- a/third_party/blink/web_tests/external/wpt/webnn/conv_transpose2d.https.any.js +++ b/third_party/blink/web_tests/external/wpt/webnn/conv_transpose2d.https.any.js
@@ -7,19 +7,4 @@ // https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-convtranspose2d -const buildConvTranspose2d = (operationName, builder, resources) => { - // MLOperand convTranspose2d(MLOperand input, MLOperand filter, optional MLConvTranspose2dOptions options = {}); - const namedOutputOperand = {}; - const [inputOperand, filterOperand] = createMultiInputOperands(builder, resources); - let convTranspose2dOptions = {...resources.options}; - if (convTranspose2dOptions.bias) { - convTranspose2dOptions.bias = createConstantOperand(builder, convTranspose2dOptions.bias); - } - if (convTranspose2dOptions.activation) { - convTranspose2dOptions.activation = builder[convTranspose2dOptions.activation](); - } - namedOutputOperand[resources.expected.name] = builder[operationName](inputOperand, filterOperand, convTranspose2dOptions); - return namedOutputOperand; -}; - testWebNNOperation('convTranspose2d', buildConvTranspose2d); \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/webnn/gemm.https.any.js b/third_party/blink/web_tests/external/wpt/webnn/gemm.https.any.js index 179a164..e5de952 100644 --- a/third_party/blink/web_tests/external/wpt/webnn/gemm.https.any.js +++ b/third_party/blink/web_tests/external/wpt/webnn/gemm.https.any.js
@@ -7,22 +7,4 @@ // https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-gemm -const buildGemm= (operationName, builder, resources) => { - // MLOperand gemm(MLOperand a, MLOperand b, optional MLGemmOptions options = {}); - const namedOutputOperand = {}; - const [inputOperandA, inputOperandB] = createMultiInputOperands(builder, resources); - let gemmOptions = {...resources.options}; - if (gemmOptions.c) { - if (gemmOptions.c.shape) { - gemmOptions.c = createConstantOperand(builder, gemmOptions.c); - } else { - // MLOperand c; - // Create a single-value operand when c is a scalar - gemmOptions.c = builder.constant(gemmOptions.c); - } - } - namedOutputOperand[resources.expected.name] = builder[operationName](inputOperandA, inputOperandB, gemmOptions); - return namedOutputOperand; -}; - testWebNNOperation('gemm', buildGemm); \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/webnn/gpu/batch_normalization.https.any.js b/third_party/blink/web_tests/external/wpt/webnn/gpu/batch_normalization.https.any.js new file mode 100644 index 0000000..90b6def --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/webnn/gpu/batch_normalization.https.any.js
@@ -0,0 +1,10 @@ +// META: title=test WebNN API batchNormalization operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-batchnorm + +testWebNNOperation('batchNormalization', buildBatchNorm, 'gpu'); \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/webnn/gpu/clamp.https.any.js b/third_party/blink/web_tests/external/wpt/webnn/gpu/clamp.https.any.js new file mode 100644 index 0000000..9831386 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/webnn/gpu/clamp.https.any.js
@@ -0,0 +1,10 @@ +// META: title=test WebNN API clamp operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-clamp + +testWebNNOperation('clamp', buildOperationWithSingleInput, 'gpu'); \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/webnn/gpu/concat.https.any.js b/third_party/blink/web_tests/external/wpt/webnn/gpu/concat.https.any.js new file mode 100644 index 0000000..0707372 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/webnn/gpu/concat.https.any.js
@@ -0,0 +1,10 @@ +// META: title=test WebNN API concat operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-concat + +testWebNNOperation('concat', buildConcat, 'gpu'); \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/webnn/gpu/conv2d.https.any.js b/third_party/blink/web_tests/external/wpt/webnn/gpu/conv2d.https.any.js new file mode 100644 index 0000000..b3986b65 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/webnn/gpu/conv2d.https.any.js
@@ -0,0 +1,10 @@ +// META: title=test WebNN API conv2d operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-conv2d + +testWebNNOperation('conv2d', buildConv2d, 'gpu'); \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/webnn/gpu/conv_transpose2d.https.any.js b/third_party/blink/web_tests/external/wpt/webnn/gpu/conv_transpose2d.https.any.js new file mode 100644 index 0000000..020bfa9 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/webnn/gpu/conv_transpose2d.https.any.js
@@ -0,0 +1,10 @@ +// META: title=test WebNN API convTranspose2d operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-convtranspose2d + +testWebNNOperation('convTranspose2d', buildConvTranspose2d, 'gpu'); \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/webnn/gpu/elementwise_binary.https.any.js b/third_party/blink/web_tests/external/wpt/webnn/gpu/elementwise_binary.https.any.js new file mode 100644 index 0000000..035d0c77 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/webnn/gpu/elementwise_binary.https.any.js
@@ -0,0 +1,10 @@ +// META: title=test WebNN API element-wise binary operations +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-binary + +testWebNNOperation(['add', 'sub', 'mul', 'div', 'max', 'min', 'pow'], buildOperationWithTwoInputs, 'gpu'); \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/webnn/gpu/elementwise_unary.https.any.js b/third_party/blink/web_tests/external/wpt/webnn/gpu/elementwise_unary.https.any.js new file mode 100644 index 0000000..bd4e927 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/webnn/gpu/elementwise_unary.https.any.js
@@ -0,0 +1,13 @@ +// META: title=test WebNN API element-wise unary operations +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-unary + +testWebNNOperation( + ['abs', 'ceil', 'cos', 'exp', 'floor', 'log', 'neg', 'sin', 'tan'], + buildOperationWithSingleInput, 'gpu' +); \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/webnn/gpu/elu.https.any.js b/third_party/blink/web_tests/external/wpt/webnn/gpu/elu.https.any.js new file mode 100644 index 0000000..965bb4d --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/webnn/gpu/elu.https.any.js
@@ -0,0 +1,10 @@ +// META: title=test WebNN API elu operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-elu + +testWebNNOperation('elu', buildOperationWithSingleInput, 'gpu'); \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/webnn/gpu/gemm.https.any.js b/third_party/blink/web_tests/external/wpt/webnn/gpu/gemm.https.any.js new file mode 100644 index 0000000..a19dc39b --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/webnn/gpu/gemm.https.any.js
@@ -0,0 +1,10 @@ +// META: title=test WebNN API gemm operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-gemm + +testWebNNOperation('gemm', buildGemm, 'gpu'); \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/webnn/gpu/hard_sigmoid.https.any.js b/third_party/blink/web_tests/external/wpt/webnn/gpu/hard_sigmoid.https.any.js new file mode 100644 index 0000000..b6f2f53b --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/webnn/gpu/hard_sigmoid.https.any.js
@@ -0,0 +1,10 @@ +// META: title=test WebNN API hardSigmoid operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-hard-sigmoid + +testWebNNOperation('hardSigmoid', buildOperationWithSingleInput, 'gpu'); \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/webnn/gpu/hard_swish.https.any.js b/third_party/blink/web_tests/external/wpt/webnn/gpu/hard_swish.https.any.js new file mode 100644 index 0000000..a173149 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/webnn/gpu/hard_swish.https.any.js
@@ -0,0 +1,10 @@ +// META: title=test WebNN API tanh operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-hard-swish + +testWebNNOperation('hardSwish', buildOperationWithSingleInput, 'gpu'); \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/webnn/gpu/leaky_relu.https.any.js b/third_party/blink/web_tests/external/wpt/webnn/gpu/leaky_relu.https.any.js new file mode 100644 index 0000000..f3a7bd8b --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/webnn/gpu/leaky_relu.https.any.js
@@ -0,0 +1,10 @@ +// META: title=test WebNN API leakyRelu operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-leakyrelu + +testWebNNOperation('leakyRelu', buildOperationWithSingleInput, 'gpu'); \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/webnn/gpu/linear.https.any.js b/third_party/blink/web_tests/external/wpt/webnn/gpu/linear.https.any.js new file mode 100644 index 0000000..48b8d82c --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/webnn/gpu/linear.https.any.js
@@ -0,0 +1,10 @@ +// META: title=test WebNN API linear operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-linear + +testWebNNOperation('linear', buildOperationWithSingleInput, 'gpu'); \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/webnn/gpu/matmul.https.any.js b/third_party/blink/web_tests/external/wpt/webnn/gpu/matmul.https.any.js new file mode 100644 index 0000000..01fed04 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/webnn/gpu/matmul.https.any.js
@@ -0,0 +1,10 @@ +// META: title=test WebNN API matmul operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-matmul + +testWebNNOperation('matmul', buildOperationWithTwoInputs, 'gpu'); \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/webnn/gpu/pad.https.any.js b/third_party/blink/web_tests/external/wpt/webnn/gpu/pad.https.any.js new file mode 100644 index 0000000..26d1bf0f --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/webnn/gpu/pad.https.any.js
@@ -0,0 +1,10 @@ +// META: title=test WebNN API pad operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-pad + +testWebNNOperation('pad', buildPad, 'gpu'); \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/webnn/gpu/pooling.https.any.js b/third_party/blink/web_tests/external/wpt/webnn/gpu/pooling.https.any.js new file mode 100644 index 0000000..ab128818 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/webnn/gpu/pooling.https.any.js
@@ -0,0 +1,10 @@ +// META: title=test WebNN API pooling operations +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-pool2d + +testWebNNOperation(['averagePool2d', 'maxPool2d'], buildOperationWithSingleInput, 'gpu'); \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/webnn/gpu/prelu.https.any.js b/third_party/blink/web_tests/external/wpt/webnn/gpu/prelu.https.any.js new file mode 100644 index 0000000..5a1580e --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/webnn/gpu/prelu.https.any.js
@@ -0,0 +1,10 @@ +// META: title=test WebNN API prelu operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-prelu + +testWebNNOperation('prelu', buildOperationWithTwoInputs, 'gpu'); \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/webnn/gpu/reduction.https.any.js b/third_party/blink/web_tests/external/wpt/webnn/gpu/reduction.https.any.js new file mode 100644 index 0000000..69f9b64 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/webnn/gpu/reduction.https.any.js
@@ -0,0 +1,24 @@ +// META: title=test WebNN API reduction operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-reduce + +testWebNNOperation( + [ + 'reduceL1', + 'reduceL2', + 'reduceLogSum', + 'reduceLogSumExp', + 'reduceMax', + 'reduceMean', + 'reduceMin', + 'reduceProduct', + 'reduceSum', + 'reduceSumSquare', + ], + buildOperationWithSingleInput, 'gpu' +); \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/webnn/gpu/relu.https.any.js b/third_party/blink/web_tests/external/wpt/webnn/gpu/relu.https.any.js new file mode 100644 index 0000000..dc09846 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/webnn/gpu/relu.https.any.js
@@ -0,0 +1,10 @@ +// META: title=test WebNN API relu operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-relu + +testWebNNOperation('relu', buildOperationWithSingleInput, 'gpu'); \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/webnn/gpu/reshape.https.any.js b/third_party/blink/web_tests/external/wpt/webnn/gpu/reshape.https.any.js new file mode 100644 index 0000000..e5145e2 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/webnn/gpu/reshape.https.any.js
@@ -0,0 +1,11 @@ +// META: title=test WebNN API reshape operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-reshape + +testWebNNOperation('reshape', buildReshape, 'gpu'); +
diff --git a/third_party/blink/web_tests/external/wpt/webnn/gpu/sigmoid.https.any.js b/third_party/blink/web_tests/external/wpt/webnn/gpu/sigmoid.https.any.js new file mode 100644 index 0000000..6c85f5b --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/webnn/gpu/sigmoid.https.any.js
@@ -0,0 +1,10 @@ +// META: title=test WebNN API sigmoid operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-sigmoid + +testWebNNOperation('sigmoid', buildOperationWithSingleInput, 'gpu'); \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/webnn/gpu/slice.https.any.js b/third_party/blink/web_tests/external/wpt/webnn/gpu/slice.https.any.js new file mode 100644 index 0000000..98e5f422 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/webnn/gpu/slice.https.any.js
@@ -0,0 +1,10 @@ +// META: title=test WebNN API slice operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-slice + +testWebNNOperation('slice', buildSlice, 'gpu'); \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/webnn/gpu/softmax.https.any.js b/third_party/blink/web_tests/external/wpt/webnn/gpu/softmax.https.any.js new file mode 100644 index 0000000..9170dd0 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/webnn/gpu/softmax.https.any.js
@@ -0,0 +1,10 @@ +// META: title=test WebNN API softmax operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-softmax + +testWebNNOperation('softmax', buildOperationWithSingleInput, 'gpu'); \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/webnn/gpu/softplus.https.any.js b/third_party/blink/web_tests/external/wpt/webnn/gpu/softplus.https.any.js new file mode 100644 index 0000000..a61e5be --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/webnn/gpu/softplus.https.any.js
@@ -0,0 +1,10 @@ +// META: title=test WebNN API softplus operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-softplus + +testWebNNOperation('softplus', buildOperationWithSingleInput, 'gpu'); \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/webnn/gpu/softsign.https.any.js b/third_party/blink/web_tests/external/wpt/webnn/gpu/softsign.https.any.js new file mode 100644 index 0000000..f598cbf --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/webnn/gpu/softsign.https.any.js
@@ -0,0 +1,10 @@ +// META: title=test WebNN API softsign operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-softsign + +testWebNNOperation('softsign', buildOperationWithSingleInput, 'gpu'); \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/webnn/gpu/split.https.any.js b/third_party/blink/web_tests/external/wpt/webnn/gpu/split.https.any.js new file mode 100644 index 0000000..8eecd76fa --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/webnn/gpu/split.https.any.js
@@ -0,0 +1,10 @@ +// META: title=test WebNN API split operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-split + +testWebNNOperation('split', buildSplit, 'gpu'); \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/webnn/gpu/squeeze.https.any.js b/third_party/blink/web_tests/external/wpt/webnn/gpu/squeeze.https.any.js new file mode 100644 index 0000000..29ce3e4 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/webnn/gpu/squeeze.https.any.js
@@ -0,0 +1,10 @@ +// META: title=test WebNN API squeeze operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-squeeze + +testWebNNOperation('squeeze', buildOperationWithSingleInput, 'gpu'); \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/webnn/gpu/tanh.https.any.js b/third_party/blink/web_tests/external/wpt/webnn/gpu/tanh.https.any.js new file mode 100644 index 0000000..15a9eeb0 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/webnn/gpu/tanh.https.any.js
@@ -0,0 +1,10 @@ +// META: title=test WebNN API tanh operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-tanh + +testWebNNOperation('tanh', buildOperationWithSingleInput, 'gpu'); \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/webnn/gpu/transpose.https.any.js b/third_party/blink/web_tests/external/wpt/webnn/gpu/transpose.https.any.js new file mode 100644 index 0000000..074e18a --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/webnn/gpu/transpose.https.any.js
@@ -0,0 +1,10 @@ +// META: title=test WebNN API transpose operation +// META: global=window,dedicatedworker +// META: script=../resources/utils.js +// META: timeout=long + +'use strict'; + +// https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-transpose + +testWebNNOperation('transpose', buildOperationWithSingleInput, 'gpu'); \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/webnn/pad.https.any.js b/third_party/blink/web_tests/external/wpt/webnn/pad.https.any.js index f9d13d4..05eec653 100644 --- a/third_party/blink/web_tests/external/wpt/webnn/pad.https.any.js +++ b/third_party/blink/web_tests/external/wpt/webnn/pad.https.any.js
@@ -7,13 +7,4 @@ // https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-pad -const buildPad = (operationName, builder, resources) => { - // MLOperand pad(MLOperand input, sequence<unsigned long> beginningPadding, sequence<unsigned long> endingPadding, optional MLPadOptions options = {}); - const namedOutputOperand = {}; - const inputOperand = createSingleInputOperand(builder, resources); - // invoke builder.pad() - namedOutputOperand[resources.expected.name] = builder[operationName](inputOperand, resources.beginningPadding, resources.endingPadding, resources.options); - return namedOutputOperand; -}; - testWebNNOperation('pad', buildPad); \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/webnn/reshape.https.any.js b/third_party/blink/web_tests/external/wpt/webnn/reshape.https.any.js index a7126e6..e073363 100644 --- a/third_party/blink/web_tests/external/wpt/webnn/reshape.https.any.js +++ b/third_party/blink/web_tests/external/wpt/webnn/reshape.https.any.js
@@ -7,14 +7,5 @@ // https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-reshape -const buildReshape = (operationName, builder, resources) => { - // MLOperand reshape(MLOperand input, sequence<unsigned long?> newShape); - const namedOutputOperand = {}; - const inputOperand = createSingleInputOperand(builder, resources); - // invoke builder.reshape() - namedOutputOperand[resources.expected.name] = builder[operationName](inputOperand, resources.newShape); - return namedOutputOperand; -}; - testWebNNOperation('reshape', buildReshape);
diff --git a/third_party/blink/web_tests/external/wpt/webnn/resources/utils.js b/third_party/blink/web_tests/external/wpt/webnn/resources/utils.js index 9204592..41da416 100644 --- a/third_party/blink/web_tests/external/wpt/webnn/resources/utils.js +++ b/third_party/blink/web_tests/external/wpt/webnn/resources/utils.js
@@ -535,6 +535,128 @@ return namedOutputOperand; }; +const buildBatchNorm = (operationName, builder, resources) => { + // MLOperand batchNormalization(MLOperand input, MLOperand mean, MLOperand variance, + // optional MLBatchNormalizationOptions options = {}); + const namedOutputOperand = {}; + const [inputOperand, meanOperand, varianceOperand] = createMultiInputOperands(builder, resources); + const batchNormOptions = {...resources.options}; + if (batchNormOptions.scale) { + batchNormOptions.scale = createConstantOperand(builder, batchNormOptions.scale); + } + if (batchNormOptions.bias) { + batchNormOptions.bias = createConstantOperand(builder, batchNormOptions.bias); + } + if (batchNormOptions.activation) { + batchNormOptions.activation = builder[batchNormOptions.activation](); + } + // invoke builder.batchNormalization() + namedOutputOperand[resources.expected.name] = + builder[operationName](inputOperand, meanOperand, varianceOperand, batchNormOptions); + return namedOutputOperand; +}; + +const buildConcat = (operationName, builder, resources) => { + // MLOperand concat(sequence<MLOperand> inputs, unsigned long axis); + const namedOutputOperand = {}; + const inputOperands = []; + for (let input of resources.inputs) { + inputOperands.push(builder.input(input.name, {type: input.type, dimensions: input.shape})); + } + // invoke builder.concat() + namedOutputOperand[resources.expected.name] = builder[operationName](inputOperands, resources.axis); + return namedOutputOperand; +}; + +const buildConvTranspose2d = (operationName, builder, resources) => { + // MLOperand convTranspose2d(MLOperand input, MLOperand filter, optional MLConvTranspose2dOptions options = {}); + const namedOutputOperand = {}; + const [inputOperand, filterOperand] = createMultiInputOperands(builder, resources); + let convTranspose2dOptions = {...resources.options}; + if (convTranspose2dOptions.bias) { + convTranspose2dOptions.bias = createConstantOperand(builder, convTranspose2dOptions.bias); + } + if (convTranspose2dOptions.activation) { + convTranspose2dOptions.activation = builder[convTranspose2dOptions.activation](); + } + namedOutputOperand[resources.expected.name] = builder[operationName](inputOperand, filterOperand, convTranspose2dOptions); + return namedOutputOperand; +}; + +const buildConv2d= (operationName, builder, resources) => { + // MLOperand conv2d(MLOperand input, MLOperand filter, optional MLConv2dOptions options = {}); + const namedOutputOperand = {}; + const [inputOperand, filterOperand] = createMultiInputOperands(builder, resources); + let conv2dOptions = {...resources.options}; + if (conv2dOptions.bias) { + conv2dOptions.bias = createConstantOperand(builder, conv2dOptions.bias); + } + if (conv2dOptions.activation) { + conv2dOptions.activation = builder[conv2dOptions.activation](); + } + namedOutputOperand[resources.expected.name] = builder[operationName](inputOperand, filterOperand, conv2dOptions); + return namedOutputOperand; +}; + +const buildGemm= (operationName, builder, resources) => { + // MLOperand gemm(MLOperand a, MLOperand b, optional MLGemmOptions options = {}); + const namedOutputOperand = {}; + const [inputOperandA, inputOperandB] = createMultiInputOperands(builder, resources); + let gemmOptions = {...resources.options}; + if (gemmOptions.c) { + if (gemmOptions.c.shape) { + gemmOptions.c = createConstantOperand(builder, gemmOptions.c); + } else { + // MLOperand c; + // Create a single-value operand when c is a scalar + gemmOptions.c = builder.constant(gemmOptions.c); + } + } + namedOutputOperand[resources.expected.name] = builder[operationName](inputOperandA, inputOperandB, gemmOptions); + return namedOutputOperand; +}; + +const buildPad = (operationName, builder, resources) => { + // MLOperand pad(MLOperand input, sequence<unsigned long> beginningPadding, sequence<unsigned long> endingPadding, optional MLPadOptions options = {}); + const namedOutputOperand = {}; + const inputOperand = createSingleInputOperand(builder, resources); + // invoke builder.pad() + namedOutputOperand[resources.expected.name] = builder[operationName](inputOperand, resources.beginningPadding, resources.endingPadding, resources.options); + return namedOutputOperand; +}; + +const buildReshape = (operationName, builder, resources) => { + // MLOperand reshape(MLOperand input, sequence<unsigned long?> newShape); + const namedOutputOperand = {}; + const inputOperand = createSingleInputOperand(builder, resources); + // invoke builder.reshape() + namedOutputOperand[resources.expected.name] = builder[operationName](inputOperand, resources.newShape); + return namedOutputOperand; +}; + +const buildSlice = (operationName, builder, resources) => { + // MLOperand slice(MLOperand input, sequence<unsigned long> starts, sequence<unsigned long> sizes); + const namedOutputOperand = {}; + const inputOperand = createSingleInputOperand(builder, resources); + // invoke builder.slice() + namedOutputOperand[resources.expected.name] = builder[operationName](inputOperand, resources.starts, resources.sizes); + return namedOutputOperand; +}; + +const buildSplit = (operationName, builder, resources) => { + // sequence<MLOperand> split(MLOperand input, + // (unsigned long or sequence<unsigned long>) splits, + // optional MLSplitOptions options = {}); + const namedOutputOperand = {}; + const inputOperand = createSingleInputOperand(builder, resources); + // invoke builder.split() + const outputOperands = builder[operationName](inputOperand, resources.splits, resources.options); + resources.expected.forEach((resourceDict, index) => { + namedOutputOperand[resourceDict.name] = outputOperands[index]; + }); + return namedOutputOperand; +}; + /** * Build a graph. * @param {String} operationName - An operation name @@ -616,8 +738,9 @@ * Run WebNN operation tests. * @param {(String[]|String)} operationName - An operation name array or an operation name * @param {Function} buildFunc - A build function for an operation + * @param {String} deviceType - The execution device type for this test */ -const testWebNNOperation = (operationName, buildFunc) => { +const testWebNNOperation = (operationName, buildFunc, deviceType = 'cpu') => { let operationNameArray; if (typeof operationName === 'string') { operationNameArray = [operationName]; @@ -637,7 +760,7 @@ operationNameArray.forEach((subOperationName) => { const tests = loadTests(subOperationName); setup(() => { - context = navigator.ml.createContextSync(); + context = navigator.ml.createContextSync({deviceType}); builder = new MLGraphBuilder(context); }); for (const subTest of tests) { @@ -651,7 +774,7 @@ operationNameArray.forEach((subOperationName) => { const tests = loadTests(subOperationName); promise_setup(async () => { - context = await navigator.ml.createContext(); + context = await navigator.ml.createContext({deviceType}); builder = new MLGraphBuilder(context); }); for (const subTest of tests) {
diff --git a/third_party/blink/web_tests/external/wpt/webnn/slice.https.any.js b/third_party/blink/web_tests/external/wpt/webnn/slice.https.any.js index 5e188af..cb7acef 100644 --- a/third_party/blink/web_tests/external/wpt/webnn/slice.https.any.js +++ b/third_party/blink/web_tests/external/wpt/webnn/slice.https.any.js
@@ -7,13 +7,4 @@ // https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-slice -const buildSlice = (operationName, builder, resources) => { - // MLOperand slice(MLOperand input, sequence<unsigned long> starts, sequence<unsigned long> sizes); - const namedOutputOperand = {}; - const inputOperand = createSingleInputOperand(builder, resources); - // invoke builder.slice() - namedOutputOperand[resources.expected.name] = builder[operationName](inputOperand, resources.starts, resources.sizes); - return namedOutputOperand; -}; - testWebNNOperation('slice', buildSlice); \ No newline at end of file
diff --git a/third_party/blink/web_tests/external/wpt/webnn/split.https.any.js b/third_party/blink/web_tests/external/wpt/webnn/split.https.any.js index bb1c995..b6fc5b4 100644 --- a/third_party/blink/web_tests/external/wpt/webnn/split.https.any.js +++ b/third_party/blink/web_tests/external/wpt/webnn/split.https.any.js
@@ -7,18 +7,4 @@ // https://webmachinelearning.github.io/webnn/#api-mlgraphbuilder-split -const buildSplit = (operationName, builder, resources) => { - // sequence<MLOperand> split(MLOperand input, - // (unsigned long or sequence<unsigned long>) splits, - // optional MLSplitOptions options = {}); - const namedOutputOperand = {}; - const inputOperand = createSingleInputOperand(builder, resources); - // invoke builder.split() - const outputOperands = builder[operationName](inputOperand, resources.splits, resources.options); - resources.expected.forEach((resourceDict, index) => { - namedOutputOperand[resourceDict.name] = outputOperands[index]; - }); - return namedOutputOperand; -}; - testWebNNOperation('split', buildSplit); \ No newline at end of file
diff --git a/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/batch_normalization.https.any-expected.txt b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/batch_normalization.https.any-expected.txt new file mode 100644 index 0000000..886ad038 --- /dev/null +++ b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/batch_normalization.https.any-expected.txt
@@ -0,0 +1,27 @@ +This is a testharness.js-based test. +[FAIL] batchNormalization float32 2D tensor (mean and variance are non-constant) default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] batchNormalization float32 2D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] batchNormalization float32 3D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] batchNormalization float32 4D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] batchNormalization float32 5D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] batchNormalization float32 4D NCHW tensor options.axis=1 / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] batchNormalization float32 4D NHWC tensor options.axis=3 / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] batchNormalization float32 4D NCHW tensor options.scale / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] batchNormalization float32 4D NCHW tensor options.bias / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] batchNormalization float32 4D NCHW tensor options.epsilon / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] batchNormalization float32 4D NCHW tensor options.activation relu / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] batchNormalization float32 4D NHWC tensor all options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/batch_normalization.https.any.worker-expected.txt b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/batch_normalization.https.any.worker-expected.txt new file mode 100644 index 0000000..dbff80c --- /dev/null +++ b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/batch_normalization.https.any.worker-expected.txt
@@ -0,0 +1,51 @@ +This is a testharness.js-based test. +[FAIL] batchNormalization float32 2D tensor (mean and variance are non-constant) default options / sync + builder[operationName] is not a function +[FAIL] batchNormalization float32 2D tensor default options / sync + builder[operationName] is not a function +[FAIL] batchNormalization float32 3D tensor default options / sync + builder[operationName] is not a function +[FAIL] batchNormalization float32 4D tensor default options / sync + builder[operationName] is not a function +[FAIL] batchNormalization float32 5D tensor default options / sync + builder[operationName] is not a function +[FAIL] batchNormalization float32 4D NCHW tensor options.axis=1 / sync + builder[operationName] is not a function +[FAIL] batchNormalization float32 4D NHWC tensor options.axis=3 / sync + builder[operationName] is not a function +[FAIL] batchNormalization float32 4D NCHW tensor options.scale / sync + builder[operationName] is not a function +[FAIL] batchNormalization float32 4D NCHW tensor options.bias / sync + builder[operationName] is not a function +[FAIL] batchNormalization float32 4D NCHW tensor options.epsilon / sync + builder[operationName] is not a function +[FAIL] batchNormalization float32 4D NCHW tensor options.activation relu / sync + builder[operationName] is not a function +[FAIL] batchNormalization float32 4D NHWC tensor all options / sync + builder[operationName] is not a function +[FAIL] batchNormalization float32 2D tensor (mean and variance are non-constant) default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] batchNormalization float32 2D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] batchNormalization float32 3D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] batchNormalization float32 4D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] batchNormalization float32 5D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] batchNormalization float32 4D NCHW tensor options.axis=1 / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] batchNormalization float32 4D NHWC tensor options.axis=3 / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] batchNormalization float32 4D NCHW tensor options.scale / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] batchNormalization float32 4D NCHW tensor options.bias / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] batchNormalization float32 4D NCHW tensor options.epsilon / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] batchNormalization float32 4D NCHW tensor options.activation relu / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] batchNormalization float32 4D NHWC tensor all options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/clamp.https.any.worker-expected.txt b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/clamp.https.any.worker-expected.txt new file mode 100644 index 0000000..28e729cf --- /dev/null +++ b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/clamp.https.any.worker-expected.txt
@@ -0,0 +1,67 @@ +This is a testharness.js-based test. +[FAIL] clamp float32 1D tensor default options / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] clamp float32 2D tensor default options / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] clamp float32 3D tensor default options / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] clamp float32 4D tensor default options / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] clamp float32 5D tensor default options / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] clamp float32 4D tensor default options.maxValue and specified negative options.minValue / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] clamp float32 3D tensor default options.maxValue and specified options.minValue=0.0 / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] clamp float32 2D tensor default options.maxValue and specified positive options.minValue / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] clamp float32 5D tensor default options.minValue and specified negative options.maxValue / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] clamp float32 1D tensor default options.minValue and specified options.maxValue=0.0 / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] clamp float32 3D tensor default options.minValue and specified positive options.maxValue / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] clamp float32 5D tensor specified both negative options.minValue and options.maxValue / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] clamp float32 4D tensor specified negative options.minValue and options.maxValue=0.0 / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] clamp float32 3D tensor specified negative options.minValue and positive options.maxValue / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] clamp float32 2D tensor specified options.minValue=0.0 and positive options.maxValue / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] clamp float32 1D tensor specified both positive options.minValue and options.maxValue / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] clamp float32 1D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] clamp float32 2D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] clamp float32 3D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] clamp float32 4D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] clamp float32 5D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] clamp float32 4D tensor default options.maxValue and specified negative options.minValue / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] clamp float32 3D tensor default options.maxValue and specified options.minValue=0.0 / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] clamp float32 2D tensor default options.maxValue and specified positive options.minValue / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] clamp float32 5D tensor default options.minValue and specified negative options.maxValue / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] clamp float32 1D tensor default options.minValue and specified options.maxValue=0.0 / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] clamp float32 3D tensor default options.minValue and specified positive options.maxValue / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] clamp float32 5D tensor specified both negative options.minValue and options.maxValue / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] clamp float32 4D tensor specified negative options.minValue and options.maxValue=0.0 / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] clamp float32 3D tensor specified negative options.minValue and positive options.maxValue / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] clamp float32 2D tensor specified options.minValue=0.0 and positive options.maxValue / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] clamp float32 1D tensor specified both positive options.minValue and options.maxValue / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/concat.https.any.worker-expected.txt b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/concat.https.any.worker-expected.txt new file mode 100644 index 0000000..2f1586d9 --- /dev/null +++ b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/concat.https.any.worker-expected.txt
@@ -0,0 +1,91 @@ +This is a testharness.js-based test. +[FAIL] concat two float32 1D tensors of same shape along axis 0 / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] concat three float32 1D tensors of different 1st dimension along axis 0 / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (3) of the array buffer views doesn't match the expectation (0). +[FAIL] concat four float32 1D tensors of same 1st dimension along axis 0 / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (4) of the array buffer views doesn't match the expectation (0). +[FAIL] concat four float32 1D tensors of different 1st dimension along axis 0 / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (4) of the array buffer views doesn't match the expectation (0). +[FAIL] concat two float32 2D tensors of same shape along axis 0 / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] concat two float32 2D tensors of same others dimensions except different 1st dimension along axis 0 / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] concat four float32 2D tensors of same shape along axis 0 / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (4) of the array buffer views doesn't match the expectation (0). +[FAIL] concat two float32 2D tensors of same others dimensions except different 2nd dimension along axis 1 / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] concat three float32 2D tensors of same shape along axis 1 / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (3) of the array buffer views doesn't match the expectation (0). +[FAIL] concat four float32 2D tensors of same others dimensions except different 2nd dimension along axis 1 / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (4) of the array buffer views doesn't match the expectation (0). +[FAIL] concat two float32 3D tensors of same others dimensions except different 1st dimension along axis 0 / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] concat four float32 3D tensors of same others dimensions except different 2nd dimension along axis 1 / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (4) of the array buffer views doesn't match the expectation (0). +[FAIL] concat three float32 3D tensors of same shape along axis 2 / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (3) of the array buffer views doesn't match the expectation (0). +[FAIL] concat two float32 4D tensors of same others dimensions except different 1st dimension along axis 0 / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] concat three float32 4D tensors of same shape along axis 1 / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (3) of the array buffer views doesn't match the expectation (0). +[FAIL] concat three float32 4D tensors of same others dimensions except different 3rd dimension along axis 2 / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (3) of the array buffer views doesn't match the expectation (0). +[FAIL] concat four float32 4D tensors of same others dimensions except different 4th dimension along axis 3 / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (4) of the array buffer views doesn't match the expectation (0). +[FAIL] concat four float32 5D tensors of same shape along axis 0 / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (4) of the array buffer views doesn't match the expectation (0). +[FAIL] concat two float32 5D tensors of same others dimensions except different 2nd dimension along axis 1 / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] concat three float32 5D tensors of same others dimensions except different 3rd dimension along axis 2 / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (3) of the array buffer views doesn't match the expectation (0). +[FAIL] concat two float32 5D tensors of same others dimensions except different 4th dimension along axis 3 / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] concat two float32 5D tensors of same others dimensions except different 5th dimension along axis 4 / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] concat two float32 1D tensors of same shape along axis 0 / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] concat three float32 1D tensors of different 1st dimension along axis 0 / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] concat four float32 1D tensors of same 1st dimension along axis 0 / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] concat four float32 1D tensors of different 1st dimension along axis 0 / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] concat two float32 2D tensors of same shape along axis 0 / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] concat two float32 2D tensors of same others dimensions except different 1st dimension along axis 0 / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] concat four float32 2D tensors of same shape along axis 0 / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] concat two float32 2D tensors of same others dimensions except different 2nd dimension along axis 1 / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] concat three float32 2D tensors of same shape along axis 1 / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] concat four float32 2D tensors of same others dimensions except different 2nd dimension along axis 1 / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] concat two float32 3D tensors of same others dimensions except different 1st dimension along axis 0 / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] concat four float32 3D tensors of same others dimensions except different 2nd dimension along axis 1 / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] concat three float32 3D tensors of same shape along axis 2 / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] concat two float32 4D tensors of same others dimensions except different 1st dimension along axis 0 / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] concat three float32 4D tensors of same shape along axis 1 / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] concat three float32 4D tensors of same others dimensions except different 3rd dimension along axis 2 / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] concat four float32 4D tensors of same others dimensions except different 4th dimension along axis 3 / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] concat four float32 5D tensors of same shape along axis 0 / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] concat two float32 5D tensors of same others dimensions except different 2nd dimension along axis 1 / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] concat three float32 5D tensors of same others dimensions except different 3rd dimension along axis 2 / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] concat two float32 5D tensors of same others dimensions except different 4th dimension along axis 3 / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] concat two float32 5D tensors of same others dimensions except different 5th dimension along axis 4 / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/conv2d.https.any-expected.txt b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/conv2d.https.any-expected.txt new file mode 100644 index 0000000..0fade98 --- /dev/null +++ b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/conv2d.https.any-expected.txt
@@ -0,0 +1,37 @@ +This is a testharness.js-based test. +[PASS] conv2d float32 4D input and filter(non-constant) tensors default options / async +[PASS] conv2d float32 4D input and filter tensors default options / async +[PASS] conv2d float32 4D input and filter tensors options.padding / async +[PASS] conv2d float32 4D input and filter tensors options.strides / async +[PASS] conv2d float32 4D input and filter tensors options.dilations / async +[PASS] conv2d float32 4D input and filter tensors options.padding and options.autoPad='explicit' / async +[PASS] conv2d float32 4D input and filter tensors options.autoPad='same-upper' / async +[PASS] conv2d float32 4D input and filter tensors options.autoPad='same-upper' ignores options.padding / async +[PASS] conv2d float32 4D input and filter tensors options.autoPad='same-lower' / async +[PASS] conv2d float32 4D input and filter tensors options.autoPad='same-lower' ignores options.padding / async +[PASS] depthwise conv2d float32 4D input and filter tensors options.groups= input_channels / async +[PASS] conv2d float32 4D input and filter tensors options.inputLayout='nchw' / async +[PASS] conv2d float32 4D input and filter tensors options.inputLayout='nhwc' / async +[PASS] conv2d float32 4D input and filter tensors options.filterLayout='oihw' / async +[FAIL] conv2d float32 4D input and filter tensors options.filterLayout='hwio' / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: The filter layout hwio is not supported." +[FAIL] conv2d float32 4D input and filter tensors options.filterLayout='ohwi' / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: The filter layout ohwi is not supported." +[FAIL] conv2d float32 4D input and filter tensors options.filterLayout='ihwo' / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: The filter layout ihwo is not supported." +[PASS] conv2d float32 4D input and filter tensors options.inputLayout='nhwc' and options.filterLayout='oihw' / async +[FAIL] conv2d float32 4D input and filter tensors options.inputLayout='nhwc' and options.filterLayout='hwio' / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: The filter layout hwio is not supported." +[FAIL] conv2d float32 4D input and filter tensors options.inputLayout='nhwc' and options.filterLayout='ohwi' / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: The filter layout ohwi is not supported." +[FAIL] conv2d float32 4D input and filter tensors options.inputLayout='nhwc' and options.filterLayout='ihwo' / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: The filter layout ihwo is not supported." +[PASS] conv2d float32 4D input and filter tensors 1D options.bias / async +[PASS] conv2d float32 4D input and filter tensors options.activation=relu / async +[PASS] conv2d float32 4D input and filter tensors options.activation=sigmoid / async +[FAIL] conv2d float32 4D input and filter tensors all options / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: The filter layout hwio is not supported." +[FAIL] conv2d float32 4D input and filter tensors, both negative input tensor and options.bias / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: The filter layout hwio is not supported." +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/conv2d.https.any.worker-expected.txt b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/conv2d.https.any.worker-expected.txt new file mode 100644 index 0000000..c9129c0 --- /dev/null +++ b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/conv2d.https.any.worker-expected.txt
@@ -0,0 +1,108 @@ +This is a testharness.js-based test. +Found 52 tests; 0 PASS, 52 FAIL, 0 TIMEOUT, 0 NOTRUN. +[FAIL] conv2d float32 4D input and filter(non-constant) tensors default options / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] conv2d float32 4D input and filter tensors default options / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] conv2d float32 4D input and filter tensors options.padding / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] conv2d float32 4D input and filter tensors options.strides / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] conv2d float32 4D input and filter tensors options.dilations / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] conv2d float32 4D input and filter tensors options.padding and options.autoPad='explicit' / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] conv2d float32 4D input and filter tensors options.autoPad='same-upper' / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] conv2d float32 4D input and filter tensors options.autoPad='same-upper' ignores options.padding / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] conv2d float32 4D input and filter tensors options.autoPad='same-lower' / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] conv2d float32 4D input and filter tensors options.autoPad='same-lower' ignores options.padding / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] depthwise conv2d float32 4D input and filter tensors options.groups= input_channels / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] conv2d float32 4D input and filter tensors options.inputLayout='nchw' / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] conv2d float32 4D input and filter tensors options.inputLayout='nhwc' / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] conv2d float32 4D input and filter tensors options.filterLayout='oihw' / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] conv2d float32 4D input and filter tensors options.filterLayout='hwio' / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: The filter layout hwio is not supported. +[FAIL] conv2d float32 4D input and filter tensors options.filterLayout='ohwi' / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: The filter layout ohwi is not supported. +[FAIL] conv2d float32 4D input and filter tensors options.filterLayout='ihwo' / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: The filter layout ihwo is not supported. +[FAIL] conv2d float32 4D input and filter tensors options.inputLayout='nhwc' and options.filterLayout='oihw' / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] conv2d float32 4D input and filter tensors options.inputLayout='nhwc' and options.filterLayout='hwio' / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: The filter layout hwio is not supported. +[FAIL] conv2d float32 4D input and filter tensors options.inputLayout='nhwc' and options.filterLayout='ohwi' / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: The filter layout ohwi is not supported. +[FAIL] conv2d float32 4D input and filter tensors options.inputLayout='nhwc' and options.filterLayout='ihwo' / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: The filter layout ihwo is not supported. +[FAIL] conv2d float32 4D input and filter tensors 1D options.bias / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] conv2d float32 4D input and filter tensors options.activation=relu / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] conv2d float32 4D input and filter tensors options.activation=sigmoid / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] conv2d float32 4D input and filter tensors all options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: The filter layout hwio is not supported. +[FAIL] conv2d float32 4D input and filter tensors, both negative input tensor and options.bias / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: The filter layout hwio is not supported. +[FAIL] conv2d float32 4D input and filter(non-constant) tensors default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] conv2d float32 4D input and filter tensors default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] conv2d float32 4D input and filter tensors options.padding / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] conv2d float32 4D input and filter tensors options.strides / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] conv2d float32 4D input and filter tensors options.dilations / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] conv2d float32 4D input and filter tensors options.padding and options.autoPad='explicit' / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] conv2d float32 4D input and filter tensors options.autoPad='same-upper' / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] conv2d float32 4D input and filter tensors options.autoPad='same-upper' ignores options.padding / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] conv2d float32 4D input and filter tensors options.autoPad='same-lower' / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] conv2d float32 4D input and filter tensors options.autoPad='same-lower' ignores options.padding / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] depthwise conv2d float32 4D input and filter tensors options.groups= input_channels / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] conv2d float32 4D input and filter tensors options.inputLayout='nchw' / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] conv2d float32 4D input and filter tensors options.inputLayout='nhwc' / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] conv2d float32 4D input and filter tensors options.filterLayout='oihw' / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] conv2d float32 4D input and filter tensors options.filterLayout='hwio' / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] conv2d float32 4D input and filter tensors options.filterLayout='ohwi' / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] conv2d float32 4D input and filter tensors options.filterLayout='ihwo' / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] conv2d float32 4D input and filter tensors options.inputLayout='nhwc' and options.filterLayout='oihw' / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] conv2d float32 4D input and filter tensors options.inputLayout='nhwc' and options.filterLayout='hwio' / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] conv2d float32 4D input and filter tensors options.inputLayout='nhwc' and options.filterLayout='ohwi' / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] conv2d float32 4D input and filter tensors options.inputLayout='nhwc' and options.filterLayout='ihwo' / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] conv2d float32 4D input and filter tensors 1D options.bias / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] conv2d float32 4D input and filter tensors options.activation=relu / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] conv2d float32 4D input and filter tensors options.activation=sigmoid / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] conv2d float32 4D input and filter tensors all options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] conv2d float32 4D input and filter tensors, both negative input tensor and options.bias / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/conv_transpose2d.https.any-expected.txt b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/conv_transpose2d.https.any-expected.txt new file mode 100644 index 0000000..647277c --- /dev/null +++ b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/conv_transpose2d.https.any-expected.txt
@@ -0,0 +1,49 @@ +This is a testharness.js-based test. +[FAIL] convTranspose2d float32 4D input and filter(non-constant) tensors default options / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: convTranspose2d is not implemented." +[FAIL] convTranspose2d float32 4D input and filter tensors default options / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: convTranspose2d is not implemented." +[FAIL] convTranspose2d float32 4D input and filter tensors options.padding / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: convTranspose2d is not implemented." +[FAIL] convTranspose2d float32 4D input and filter tensors options.strides / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: convTranspose2d is not implemented." +[FAIL] convTranspose2d float32 4D input and filter tensors options.dilations / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: convTranspose2d is not implemented." +[FAIL] convTranspose2d float32 4D input and filter tensors options.outputPadding / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: convTranspose2d is not implemented." +[FAIL] convTranspose2d float32 4D input and filter tensors options.outputSizes / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: convTranspose2d is not implemented." +[FAIL] convTranspose2d float32 4D input and filter tensors options.autoPad=explicit options.padding / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: convTranspose2d is not implemented." +[FAIL] convTranspose2d float32 4D input and filter tensors options.autoPad=same-upper / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: convTranspose2d is not implemented." +[FAIL] convTranspose2d float32 4D input and filter tensors options.autoPad=same-upper ignored options.padding / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: convTranspose2d is not implemented." +[FAIL] convTranspose2d float32 4D input and filter tensors options.autoPad=same-lower / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: convTranspose2d is not implemented." +[FAIL] convTranspose2d float32 4D input and filter tensors options.autoPad=same-lower ignored options.padding / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: convTranspose2d is not implemented." +[FAIL] convTranspose2d float32 4D input and filter tensors options.inputLayout=nchw / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: convTranspose2d is not implemented." +[FAIL] convTranspose2d float32 4D input and filter tensors options.inputLayout=nhwc / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: convTranspose2d is not implemented." +[FAIL] convTranspose2d float32 4D input and filter tensors options.filterLayout=iohw / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: convTranspose2d is not implemented." +[FAIL] convTranspose2d float32 4D input and filter tensors options.filterLayout=hwoi / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: convTranspose2d is not implemented." +[FAIL] convTranspose2d float32 4D input and filter tensors options.filterLayout=ohwi / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: convTranspose2d is not implemented." +[FAIL] convTranspose2d float32 4D input and filter tensors options.inputLayout=nhwc options.filterLayout=iohw / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: convTranspose2d is not implemented." +[FAIL] convTranspose2d float32 4D input and filter tensors options.inputLayout=nhwc options.filterLayout=hwoi / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: convTranspose2d is not implemented." +[FAIL] convTranspose2d float32 4D input and filter tensors options.inputLayout=nhwc options.filterLayout=ohwi / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: convTranspose2d is not implemented." +[FAIL] convTranspose2d float32 4D input and filter tensors options.bias / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: convTranspose2d is not implemented." +[FAIL] convTranspose2d float32 4D input and filter tensors, both negative input tensor and options.bias / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: convTranspose2d is not implemented." +[FAIL] convTranspose2d float32 4D input and filter tensors options.activation=relu / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: convTranspose2d is not implemented." +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/conv_transpose2d.https.any.worker-expected.txt b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/conv_transpose2d.https.any.worker-expected.txt new file mode 100644 index 0000000..287c880 --- /dev/null +++ b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/conv_transpose2d.https.any.worker-expected.txt
@@ -0,0 +1,95 @@ +This is a testharness.js-based test. +[FAIL] convTranspose2d float32 4D input and filter(non-constant) tensors default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: convTranspose2d is not implemented. +[FAIL] convTranspose2d float32 4D input and filter tensors default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: convTranspose2d is not implemented. +[FAIL] convTranspose2d float32 4D input and filter tensors options.padding / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: convTranspose2d is not implemented. +[FAIL] convTranspose2d float32 4D input and filter tensors options.strides / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: convTranspose2d is not implemented. +[FAIL] convTranspose2d float32 4D input and filter tensors options.dilations / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: convTranspose2d is not implemented. +[FAIL] convTranspose2d float32 4D input and filter tensors options.outputPadding / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: convTranspose2d is not implemented. +[FAIL] convTranspose2d float32 4D input and filter tensors options.outputSizes / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: convTranspose2d is not implemented. +[FAIL] convTranspose2d float32 4D input and filter tensors options.autoPad=explicit options.padding / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: convTranspose2d is not implemented. +[FAIL] convTranspose2d float32 4D input and filter tensors options.autoPad=same-upper / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: convTranspose2d is not implemented. +[FAIL] convTranspose2d float32 4D input and filter tensors options.autoPad=same-upper ignored options.padding / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: convTranspose2d is not implemented. +[FAIL] convTranspose2d float32 4D input and filter tensors options.autoPad=same-lower / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: convTranspose2d is not implemented. +[FAIL] convTranspose2d float32 4D input and filter tensors options.autoPad=same-lower ignored options.padding / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: convTranspose2d is not implemented. +[FAIL] convTranspose2d float32 4D input and filter tensors options.inputLayout=nchw / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: convTranspose2d is not implemented. +[FAIL] convTranspose2d float32 4D input and filter tensors options.inputLayout=nhwc / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: convTranspose2d is not implemented. +[FAIL] convTranspose2d float32 4D input and filter tensors options.filterLayout=iohw / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: convTranspose2d is not implemented. +[FAIL] convTranspose2d float32 4D input and filter tensors options.filterLayout=hwoi / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: convTranspose2d is not implemented. +[FAIL] convTranspose2d float32 4D input and filter tensors options.filterLayout=ohwi / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: convTranspose2d is not implemented. +[FAIL] convTranspose2d float32 4D input and filter tensors options.inputLayout=nhwc options.filterLayout=iohw / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: convTranspose2d is not implemented. +[FAIL] convTranspose2d float32 4D input and filter tensors options.inputLayout=nhwc options.filterLayout=hwoi / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: convTranspose2d is not implemented. +[FAIL] convTranspose2d float32 4D input and filter tensors options.inputLayout=nhwc options.filterLayout=ohwi / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: convTranspose2d is not implemented. +[FAIL] convTranspose2d float32 4D input and filter tensors options.bias / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: convTranspose2d is not implemented. +[FAIL] convTranspose2d float32 4D input and filter tensors, both negative input tensor and options.bias / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: convTranspose2d is not implemented. +[FAIL] convTranspose2d float32 4D input and filter tensors options.activation=relu / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: convTranspose2d is not implemented. +[FAIL] convTranspose2d float32 4D input and filter(non-constant) tensors default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] convTranspose2d float32 4D input and filter tensors default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] convTranspose2d float32 4D input and filter tensors options.padding / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] convTranspose2d float32 4D input and filter tensors options.strides / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] convTranspose2d float32 4D input and filter tensors options.dilations / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] convTranspose2d float32 4D input and filter tensors options.outputPadding / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] convTranspose2d float32 4D input and filter tensors options.outputSizes / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] convTranspose2d float32 4D input and filter tensors options.autoPad=explicit options.padding / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] convTranspose2d float32 4D input and filter tensors options.autoPad=same-upper / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] convTranspose2d float32 4D input and filter tensors options.autoPad=same-upper ignored options.padding / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] convTranspose2d float32 4D input and filter tensors options.autoPad=same-lower / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] convTranspose2d float32 4D input and filter tensors options.autoPad=same-lower ignored options.padding / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] convTranspose2d float32 4D input and filter tensors options.inputLayout=nchw / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] convTranspose2d float32 4D input and filter tensors options.inputLayout=nhwc / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] convTranspose2d float32 4D input and filter tensors options.filterLayout=iohw / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] convTranspose2d float32 4D input and filter tensors options.filterLayout=hwoi / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] convTranspose2d float32 4D input and filter tensors options.filterLayout=ohwi / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] convTranspose2d float32 4D input and filter tensors options.inputLayout=nhwc options.filterLayout=iohw / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] convTranspose2d float32 4D input and filter tensors options.inputLayout=nhwc options.filterLayout=hwoi / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] convTranspose2d float32 4D input and filter tensors options.inputLayout=nhwc options.filterLayout=ohwi / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] convTranspose2d float32 4D input and filter tensors options.bias / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] convTranspose2d float32 4D input and filter tensors, both negative input tensor and options.bias / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] convTranspose2d float32 4D input and filter tensors options.activation=relu / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/elementwise_binary.https.any.worker-expected.txt b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/elementwise_binary.https.any.worker-expected.txt new file mode 100644 index 0000000..0a9e856 --- /dev/null +++ b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/elementwise_binary.https.any.worker-expected.txt
@@ -0,0 +1,256 @@ +This is a testharness.js-based test. +Found 126 tests; 0 PASS, 126 FAIL, 0 TIMEOUT, 0 NOTRUN. +[FAIL] add float32 1D tensors / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] add float32 2D tensors / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] add float32 3D tensors / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] add float32 4D tensors / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] add float32 5D tensors / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] add float32 broadcast 1D to 4D / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] add float32 broadcast 2D to 4D / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] add float32 broadcast 3D to 4D / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] add float32 broadcast 4D to 4D / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] sub float32 1D tensors / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] sub float32 2D tensors / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] sub float32 3D tensors / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] sub float32 4D tensors / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] sub float32 5D tensors / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] sub float32 broadcast 1D to 4D / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] sub float32 broadcast 2D to 4D / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] sub float32 broadcast 3D to 4D / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] sub float32 broadcast 4D to 4D / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] mul float32 1D tensors / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] mul float32 2D tensors / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] mul float32 3D tensors / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] mul float32 4D tensors / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] mul float32 5D tensors / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] mul float32 broadcast 1D to 4D / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] mul float32 broadcast 2D to 4D / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] mul float32 broadcast 3D to 4D / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] mul float32 broadcast 4D to 4D / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] div float32 1D tensors / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] div float32 2D tensors / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] div float32 3D tensors / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] div float32 4D tensors / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] div float32 5D tensors / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] div float32 broadcast 1D to 4D / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] div float32 broadcast 2D to 4D / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] div float32 broadcast 3D to 4D / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] div float32 broadcast 4D to 4D / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] max float32 1D tensors / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] max float32 2D tensors / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] max float32 3D tensors / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] max float32 4D tensors / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] max float32 5D tensors / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] max float32 broadcast 1D to 4D / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] max float32 broadcast 2D to 4D / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] max float32 broadcast 3D to 4D / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] max float32 broadcast 4D to 4D / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] min float32 1D tensors / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] min float32 2D tensors / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] min float32 3D tensors / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] min float32 4D tensors / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] min float32 5D tensors / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] min float32 broadcast 1D to 4D / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] min float32 broadcast 2D to 4D / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] min float32 broadcast 3D to 4D / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] min float32 broadcast 4D to 4D / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] pow float32 1D base tensor and 1D integer exponent tensor / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] pow float32 2D base tensor and 2D integer exponent tensor / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] pow float32 3D base tensor and 3D integer exponent tensor / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] pow float32 4D base tensor and 4D integer exponent tensor / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] pow float32 5D base tensor and 5D integer exponent tensor / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] pow (square) float32 4D base tensor and broadcastable 1D integer exponent tensor / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] pow (sqrt) float32 4D positive base tensor and broadcastable 1D integer exponent tensor / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] pow float32 4D base tensor and broadcastable 2D integer exponent tensor / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] pow float32 4D base tensor and broadcastable 3D integer exponent tensor / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] add float32 1D tensors / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] add float32 2D tensors / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] add float32 3D tensors / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] add float32 4D tensors / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] add float32 5D tensors / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] add float32 broadcast 1D to 4D / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] add float32 broadcast 2D to 4D / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] add float32 broadcast 3D to 4D / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] add float32 broadcast 4D to 4D / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] sub float32 1D tensors / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] sub float32 2D tensors / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] sub float32 3D tensors / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] sub float32 4D tensors / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] sub float32 5D tensors / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] sub float32 broadcast 1D to 4D / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] sub float32 broadcast 2D to 4D / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] sub float32 broadcast 3D to 4D / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] sub float32 broadcast 4D to 4D / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] mul float32 1D tensors / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] mul float32 2D tensors / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] mul float32 3D tensors / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] mul float32 4D tensors / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] mul float32 5D tensors / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] mul float32 broadcast 1D to 4D / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] mul float32 broadcast 2D to 4D / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] mul float32 broadcast 3D to 4D / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] mul float32 broadcast 4D to 4D / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] div float32 1D tensors / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] div float32 2D tensors / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] div float32 3D tensors / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] div float32 4D tensors / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] div float32 5D tensors / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] div float32 broadcast 1D to 4D / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] div float32 broadcast 2D to 4D / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] div float32 broadcast 3D to 4D / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] div float32 broadcast 4D to 4D / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] max float32 1D tensors / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] max float32 2D tensors / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] max float32 3D tensors / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] max float32 4D tensors / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] max float32 5D tensors / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] max float32 broadcast 1D to 4D / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] max float32 broadcast 2D to 4D / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] max float32 broadcast 3D to 4D / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] max float32 broadcast 4D to 4D / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] min float32 1D tensors / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] min float32 2D tensors / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] min float32 3D tensors / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] min float32 4D tensors / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] min float32 5D tensors / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] min float32 broadcast 1D to 4D / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] min float32 broadcast 2D to 4D / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] min float32 broadcast 3D to 4D / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] min float32 broadcast 4D to 4D / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] pow float32 1D base tensor and 1D integer exponent tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] pow float32 2D base tensor and 2D integer exponent tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] pow float32 3D base tensor and 3D integer exponent tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] pow float32 4D base tensor and 4D integer exponent tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] pow float32 5D base tensor and 5D integer exponent tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] pow (square) float32 4D base tensor and broadcastable 1D integer exponent tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] pow (sqrt) float32 4D positive base tensor and broadcastable 1D integer exponent tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] pow float32 4D base tensor and broadcastable 2D integer exponent tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] pow float32 4D base tensor and broadcastable 3D integer exponent tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/elementwise_unary.https.any-expected.txt b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/elementwise_unary.https.any-expected.txt new file mode 100644 index 0000000..47982c5 --- /dev/null +++ b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/elementwise_unary.https.any-expected.txt
@@ -0,0 +1,93 @@ +This is a testharness.js-based test. +[FAIL] abs float32 1D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: abs is not implemented." +[FAIL] abs float32 2D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: abs is not implemented." +[FAIL] abs float32 3D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: abs is not implemented." +[FAIL] abs float32 4D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: abs is not implemented." +[FAIL] abs float32 5D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: abs is not implemented." +[FAIL] ceil float32 1D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: ceil is not implemented." +[FAIL] ceil float32 2D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: ceil is not implemented." +[FAIL] ceil float32 3D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: ceil is not implemented." +[FAIL] ceil float32 4D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: ceil is not implemented." +[FAIL] ceil float32 5D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: ceil is not implemented." +[FAIL] cos float32 1D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: cos is not implemented." +[FAIL] cos float32 2D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: cos is not implemented." +[FAIL] cos float32 3D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: cos is not implemented." +[FAIL] cos float32 4D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: cos is not implemented." +[FAIL] cos float32 5D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: cos is not implemented." +[FAIL] exp float32 1D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: exp is not implemented." +[FAIL] exp float32 2D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: exp is not implemented." +[FAIL] exp float32 3D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: exp is not implemented." +[FAIL] exp float32 4D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: exp is not implemented." +[FAIL] exp float32 5D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: exp is not implemented." +[FAIL] floor float32 1D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: floor is not implemented." +[FAIL] floor float32 2D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: floor is not implemented." +[FAIL] floor float32 3D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: floor is not implemented." +[FAIL] floor float32 4D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: floor is not implemented." +[FAIL] floor float32 5D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: floor is not implemented." +[FAIL] log float32 positive 1D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: log is not implemented." +[FAIL] log float32 positive 2D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: log is not implemented." +[FAIL] log float32 positive 3D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: log is not implemented." +[FAIL] log float32 positive 4D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: log is not implemented." +[FAIL] log float32 positive 5D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: log is not implemented." +[FAIL] neg float32 1D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: neg is not implemented." +[FAIL] neg float32 2D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: neg is not implemented." +[FAIL] neg float32 3D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: neg is not implemented." +[FAIL] neg float32 4D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: neg is not implemented." +[FAIL] neg float32 5D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: neg is not implemented." +[FAIL] sin float32 1D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: sin is not implemented." +[FAIL] sin float32 2D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: sin is not implemented." +[FAIL] sin float32 3D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: sin is not implemented." +[FAIL] sin float32 4D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: sin is not implemented." +[FAIL] sin float32 5D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: sin is not implemented." +[FAIL] tan float32 1D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: tan is not implemented." +[FAIL] tan float32 2D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: tan is not implemented." +[FAIL] tan float32 3D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: tan is not implemented." +[FAIL] tan float32 4D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: tan is not implemented." +[FAIL] tan float32 5D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: tan is not implemented." +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/elementwise_unary.https.any.worker-expected.txt b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/elementwise_unary.https.any.worker-expected.txt new file mode 100644 index 0000000..13c74e8 --- /dev/null +++ b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/elementwise_unary.https.any.worker-expected.txt
@@ -0,0 +1,184 @@ +This is a testharness.js-based test. +Found 90 tests; 0 PASS, 90 FAIL, 0 TIMEOUT, 0 NOTRUN. +[FAIL] abs float32 1D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: abs is not implemented. +[FAIL] abs float32 2D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: abs is not implemented. +[FAIL] abs float32 3D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: abs is not implemented. +[FAIL] abs float32 4D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: abs is not implemented. +[FAIL] abs float32 5D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: abs is not implemented. +[FAIL] ceil float32 1D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: ceil is not implemented. +[FAIL] ceil float32 2D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: ceil is not implemented. +[FAIL] ceil float32 3D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: ceil is not implemented. +[FAIL] ceil float32 4D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: ceil is not implemented. +[FAIL] ceil float32 5D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: ceil is not implemented. +[FAIL] cos float32 1D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: cos is not implemented. +[FAIL] cos float32 2D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: cos is not implemented. +[FAIL] cos float32 3D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: cos is not implemented. +[FAIL] cos float32 4D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: cos is not implemented. +[FAIL] cos float32 5D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: cos is not implemented. +[FAIL] exp float32 1D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: exp is not implemented. +[FAIL] exp float32 2D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: exp is not implemented. +[FAIL] exp float32 3D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: exp is not implemented. +[FAIL] exp float32 4D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: exp is not implemented. +[FAIL] exp float32 5D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: exp is not implemented. +[FAIL] floor float32 1D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: floor is not implemented. +[FAIL] floor float32 2D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: floor is not implemented. +[FAIL] floor float32 3D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: floor is not implemented. +[FAIL] floor float32 4D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: floor is not implemented. +[FAIL] floor float32 5D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: floor is not implemented. +[FAIL] log float32 positive 1D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: log is not implemented. +[FAIL] log float32 positive 2D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: log is not implemented. +[FAIL] log float32 positive 3D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: log is not implemented. +[FAIL] log float32 positive 4D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: log is not implemented. +[FAIL] log float32 positive 5D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: log is not implemented. +[FAIL] neg float32 1D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: neg is not implemented. +[FAIL] neg float32 2D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: neg is not implemented. +[FAIL] neg float32 3D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: neg is not implemented. +[FAIL] neg float32 4D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: neg is not implemented. +[FAIL] neg float32 5D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: neg is not implemented. +[FAIL] sin float32 1D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: sin is not implemented. +[FAIL] sin float32 2D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: sin is not implemented. +[FAIL] sin float32 3D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: sin is not implemented. +[FAIL] sin float32 4D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: sin is not implemented. +[FAIL] sin float32 5D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: sin is not implemented. +[FAIL] tan float32 1D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: tan is not implemented. +[FAIL] tan float32 2D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: tan is not implemented. +[FAIL] tan float32 3D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: tan is not implemented. +[FAIL] tan float32 4D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: tan is not implemented. +[FAIL] tan float32 5D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: tan is not implemented. +[FAIL] abs float32 1D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] abs float32 2D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] abs float32 3D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] abs float32 4D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] abs float32 5D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] ceil float32 1D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] ceil float32 2D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] ceil float32 3D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] ceil float32 4D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] ceil float32 5D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] cos float32 1D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] cos float32 2D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] cos float32 3D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] cos float32 4D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] cos float32 5D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] exp float32 1D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] exp float32 2D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] exp float32 3D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] exp float32 4D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] exp float32 5D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] floor float32 1D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] floor float32 2D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] floor float32 3D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] floor float32 4D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] floor float32 5D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] log float32 positive 1D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] log float32 positive 2D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] log float32 positive 3D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] log float32 positive 4D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] log float32 positive 5D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] neg float32 1D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] neg float32 2D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] neg float32 3D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] neg float32 4D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] neg float32 5D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] sin float32 1D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] sin float32 2D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] sin float32 3D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] sin float32 4D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] sin float32 5D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] tan float32 1D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] tan float32 2D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] tan float32 3D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] tan float32 4D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] tan float32 5D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/elu.https.any-expected.txt b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/elu.https.any-expected.txt new file mode 100644 index 0000000..9f7bf1fa --- /dev/null +++ b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/elu.https.any-expected.txt
@@ -0,0 +1,11 @@ +This is a testharness.js-based test. +[PASS] elu float32 1D tensor default options / async +[PASS] elu float32 2D tensor default options / async +[PASS] elu float32 3D tensor default options / async +[PASS] elu float32 4D tensor default options / async +[PASS] elu float32 5D tensor default options / async +[PASS] elu float32 4D tensor positive options.alpha / async +[FAIL] elu float32 4D tensor negative options.alpha / async + promise_test: Unhandled rejection with value: object "DataError: Failed to execute 'elu' on 'MLGraphBuilder': The value of alpha must be greater than 0." +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/elu.https.any.worker-expected.txt b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/elu.https.any.worker-expected.txt new file mode 100644 index 0000000..2f72baf --- /dev/null +++ b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/elu.https.any.worker-expected.txt
@@ -0,0 +1,31 @@ +This is a testharness.js-based test. +[FAIL] elu float32 1D tensor default options / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] elu float32 2D tensor default options / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] elu float32 3D tensor default options / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] elu float32 4D tensor default options / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] elu float32 5D tensor default options / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] elu float32 4D tensor positive options.alpha / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] elu float32 4D tensor negative options.alpha / sync + Failed to execute 'elu' on 'MLGraphBuilder': The value of alpha must be greater than 0. +[FAIL] elu float32 1D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] elu float32 2D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] elu float32 3D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] elu float32 4D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] elu float32 5D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] elu float32 4D tensor positive options.alpha / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] elu float32 4D tensor negative options.alpha / async + promise_test: Unhandled rejection with value: object "DataError: Failed to execute 'elu' on 'MLGraphBuilder': The value of alpha must be greater than 0." +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/gemm.https.any-expected.txt b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/gemm.https.any-expected.txt new file mode 100644 index 0000000..79f3701 --- /dev/null +++ b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/gemm.https.any-expected.txt
@@ -0,0 +1,26 @@ +This is a testharness.js-based test. +[PASS] gemm two float32 2D tensors (b is non-constant) default options / async +[PASS] gemm two float32 2D tensors default options / async +[PASS] gemm two float32 2D tensors options.c / async +[PASS] gemm two float32 2D tensors broadcast options.c [1, 5] => [3, 5] / async +[PASS] gemm two float32 2D tensors broadcast options.c [3, 1] => [3, 5] / async +[PASS] gemm two float32 2D tensors broadcast options.c [1, 1] => [3, 5] / async +[PASS] gemm two float32 2D tensors broadcast options.c [5] => [3, 5] / async +[PASS] gemm two float32 2D tensors broadcast options.c [1] => [3, 5] / async +[FAIL] gemm two float32 2D tensors scalar options.c / async + promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'constant' on 'MLGraphBuilder': 2 arguments required, but only 1 present." +[PASS] gemm two float32 2D tensors options.alpha / async +[PASS] gemm two float32 2D tensors options.beta / async +[PASS] gemm two float32 2D tensors options.c and options.beta / async +[PASS] gemm two float32 2D tensors options.aTranspose being true / async +[PASS] gemm two float32 2D tensors options.aTranspose being explicit false / async +[PASS] gemm two float32 2D tensors options.bTranspose being true / async +[PASS] gemm two float32 2D tensors options.bTranspose being explicit false / async +[PASS] gemm two float32 2D tensors all options / async +[PASS] gemm both negative options.alpha and 1st float32 input tensor / async +[PASS] gemm both negative options.alpha and 2nd float32 input tensor / async +[PASS] gemm both negative options.beta and 3rd float32 input tensor (options.c) / async +[PASS] gemm both negative options.alpha and options.beta / async +[PASS] gemm both negative options.alpha and 3rd float32 input tensor (options.c) / async +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/gemm.https.any.worker-expected.txt b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/gemm.https.any.worker-expected.txt new file mode 100644 index 0000000..1038aa9 --- /dev/null +++ b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/gemm.https.any.worker-expected.txt
@@ -0,0 +1,91 @@ +This is a testharness.js-based test. +[FAIL] gemm two float32 2D tensors (b is non-constant) default options / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (2) of the array buffer views doesn't match the expectation (0). +[FAIL] gemm two float32 2D tensors default options / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] gemm two float32 2D tensors options.c / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] gemm two float32 2D tensors broadcast options.c [1, 5] => [3, 5] / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] gemm two float32 2D tensors broadcast options.c [3, 1] => [3, 5] / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] gemm two float32 2D tensors broadcast options.c [1, 1] => [3, 5] / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] gemm two float32 2D tensors broadcast options.c [5] => [3, 5] / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] gemm two float32 2D tensors broadcast options.c [1] => [3, 5] / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] gemm two float32 2D tensors scalar options.c / sync + Failed to execute 'constant' on 'MLGraphBuilder': 2 arguments required, but only 1 present. +[FAIL] gemm two float32 2D tensors options.alpha / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] gemm two float32 2D tensors options.beta / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] gemm two float32 2D tensors options.c and options.beta / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] gemm two float32 2D tensors options.aTranspose being true / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] gemm two float32 2D tensors options.aTranspose being explicit false / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] gemm two float32 2D tensors options.bTranspose being true / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] gemm two float32 2D tensors options.bTranspose being explicit false / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] gemm two float32 2D tensors all options / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] gemm both negative options.alpha and 1st float32 input tensor / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] gemm both negative options.alpha and 2nd float32 input tensor / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] gemm both negative options.beta and 3rd float32 input tensor (options.c) / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] gemm both negative options.alpha and options.beta / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] gemm both negative options.alpha and 3rd float32 input tensor (options.c) / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] gemm two float32 2D tensors (b is non-constant) default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] gemm two float32 2D tensors default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] gemm two float32 2D tensors options.c / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] gemm two float32 2D tensors broadcast options.c [1, 5] => [3, 5] / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] gemm two float32 2D tensors broadcast options.c [3, 1] => [3, 5] / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] gemm two float32 2D tensors broadcast options.c [1, 1] => [3, 5] / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] gemm two float32 2D tensors broadcast options.c [5] => [3, 5] / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] gemm two float32 2D tensors broadcast options.c [1] => [3, 5] / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] gemm two float32 2D tensors scalar options.c / async + promise_test: Unhandled rejection with value: object "TypeError: Failed to execute 'constant' on 'MLGraphBuilder': 2 arguments required, but only 1 present." +[FAIL] gemm two float32 2D tensors options.alpha / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] gemm two float32 2D tensors options.beta / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] gemm two float32 2D tensors options.c and options.beta / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] gemm two float32 2D tensors options.aTranspose being true / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] gemm two float32 2D tensors options.aTranspose being explicit false / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] gemm two float32 2D tensors options.bTranspose being true / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] gemm two float32 2D tensors options.bTranspose being explicit false / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] gemm two float32 2D tensors all options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] gemm both negative options.alpha and 1st float32 input tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] gemm both negative options.alpha and 2nd float32 input tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] gemm both negative options.beta and 3rd float32 input tensor (options.c) / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] gemm both negative options.alpha and options.beta / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] gemm both negative options.alpha and 3rd float32 input tensor (options.c) / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/hard_sigmoid.https.any-expected.txt b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/hard_sigmoid.https.any-expected.txt new file mode 100644 index 0000000..a6dcfda --- /dev/null +++ b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/hard_sigmoid.https.any-expected.txt
@@ -0,0 +1,29 @@ +This is a testharness.js-based test. +[FAIL] hardSigmoid float32 positive 1D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] hardSigmoid float32 positive 2D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] hardSigmoid float32 positive 3D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] hardSigmoid float32 positive 4D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] hardSigmoid float32 positive 5D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] hardSigmoid float32 positive 4D tensor specified positive options.alpha default options.beta / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] hardSigmoid float32 negative 4D tensor specified negative options.alpha default options.beta / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] hardSigmoid float32 positive 4D tensor specified positive options.beta default options.alpha / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] hardSigmoid float32 negative 4D tensor specified negative options.beta default options.alpha / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] hardSigmoid float32 positive 4D tensor specified all options (positive options.alpha and positive options.beta) / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] hardSigmoid float32 positive 4D tensor specified all options (negative options.alpha and negative options.beta) / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] hardSigmoid float32 negative 4D tensor all options (positive options.alpha and negative options.beta) / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] hardSigmoid float32 negative 4D tensor specified all options (negative options.alpha and positive options.beta) / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/hard_sigmoid.https.any.worker-expected.txt b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/hard_sigmoid.https.any.worker-expected.txt new file mode 100644 index 0000000..3406fce --- /dev/null +++ b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/hard_sigmoid.https.any.worker-expected.txt
@@ -0,0 +1,55 @@ +This is a testharness.js-based test. +[FAIL] hardSigmoid float32 positive 1D tensor default options / sync + builder[operationName] is not a function +[FAIL] hardSigmoid float32 positive 2D tensor default options / sync + builder[operationName] is not a function +[FAIL] hardSigmoid float32 positive 3D tensor default options / sync + builder[operationName] is not a function +[FAIL] hardSigmoid float32 positive 4D tensor default options / sync + builder[operationName] is not a function +[FAIL] hardSigmoid float32 positive 5D tensor default options / sync + builder[operationName] is not a function +[FAIL] hardSigmoid float32 positive 4D tensor specified positive options.alpha default options.beta / sync + builder[operationName] is not a function +[FAIL] hardSigmoid float32 negative 4D tensor specified negative options.alpha default options.beta / sync + builder[operationName] is not a function +[FAIL] hardSigmoid float32 positive 4D tensor specified positive options.beta default options.alpha / sync + builder[operationName] is not a function +[FAIL] hardSigmoid float32 negative 4D tensor specified negative options.beta default options.alpha / sync + builder[operationName] is not a function +[FAIL] hardSigmoid float32 positive 4D tensor specified all options (positive options.alpha and positive options.beta) / sync + builder[operationName] is not a function +[FAIL] hardSigmoid float32 positive 4D tensor specified all options (negative options.alpha and negative options.beta) / sync + builder[operationName] is not a function +[FAIL] hardSigmoid float32 negative 4D tensor all options (positive options.alpha and negative options.beta) / sync + builder[operationName] is not a function +[FAIL] hardSigmoid float32 negative 4D tensor specified all options (negative options.alpha and positive options.beta) / sync + builder[operationName] is not a function +[FAIL] hardSigmoid float32 positive 1D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] hardSigmoid float32 positive 2D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] hardSigmoid float32 positive 3D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] hardSigmoid float32 positive 4D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] hardSigmoid float32 positive 5D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] hardSigmoid float32 positive 4D tensor specified positive options.alpha default options.beta / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] hardSigmoid float32 negative 4D tensor specified negative options.alpha default options.beta / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] hardSigmoid float32 positive 4D tensor specified positive options.beta default options.alpha / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] hardSigmoid float32 negative 4D tensor specified negative options.beta default options.alpha / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] hardSigmoid float32 positive 4D tensor specified all options (positive options.alpha and positive options.beta) / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] hardSigmoid float32 positive 4D tensor specified all options (negative options.alpha and negative options.beta) / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] hardSigmoid float32 negative 4D tensor all options (positive options.alpha and negative options.beta) / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] hardSigmoid float32 negative 4D tensor specified all options (negative options.alpha and positive options.beta) / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/hard_swish.https.any-expected.txt b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/hard_swish.https.any-expected.txt new file mode 100644 index 0000000..9572c60 --- /dev/null +++ b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/hard_swish.https.any-expected.txt
@@ -0,0 +1,13 @@ +This is a testharness.js-based test. +[FAIL] hardSwish float32 1D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: hardSwish is not implemented." +[FAIL] hardSwish float32 2D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: hardSwish is not implemented." +[FAIL] hardSwish float32 3D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: hardSwish is not implemented." +[FAIL] hardSwish float32 4D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: hardSwish is not implemented." +[FAIL] hardSwish float32 5D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: hardSwish is not implemented." +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/hard_swish.https.any.worker-expected.txt b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/hard_swish.https.any.worker-expected.txt new file mode 100644 index 0000000..496de30 --- /dev/null +++ b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/hard_swish.https.any.worker-expected.txt
@@ -0,0 +1,23 @@ +This is a testharness.js-based test. +[FAIL] hardSwish float32 1D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: hardSwish is not implemented. +[FAIL] hardSwish float32 2D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: hardSwish is not implemented. +[FAIL] hardSwish float32 3D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: hardSwish is not implemented. +[FAIL] hardSwish float32 4D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: hardSwish is not implemented. +[FAIL] hardSwish float32 5D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: hardSwish is not implemented. +[FAIL] hardSwish float32 1D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] hardSwish float32 2D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] hardSwish float32 3D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] hardSwish float32 4D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] hardSwish float32 5D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/leaky_relu.https.any.worker-expected.txt b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/leaky_relu.https.any.worker-expected.txt new file mode 100644 index 0000000..ce51fc8 --- /dev/null +++ b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/leaky_relu.https.any.worker-expected.txt
@@ -0,0 +1,35 @@ +This is a testharness.js-based test. +[FAIL] leakyRelu float32 1D tensor default options / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] leakyRelu float32 2D tensor default options / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] leakyRelu float32 3D tensor default options / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] leakyRelu float32 4D tensor default options / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] leakyRelu float32 5D tensor default options / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] leakyRelu float32 1D tensor negative options.alpha / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] leakyRelu float32 2D tensor positive options.alpha / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] leakyRelu float32 5D tensor options.alpha=0.0 / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] leakyRelu float32 1D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] leakyRelu float32 2D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] leakyRelu float32 3D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] leakyRelu float32 4D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] leakyRelu float32 5D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] leakyRelu float32 1D tensor negative options.alpha / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] leakyRelu float32 2D tensor positive options.alpha / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] leakyRelu float32 5D tensor options.alpha=0.0 / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/linear.https.any-expected.txt b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/linear.https.any-expected.txt new file mode 100644 index 0000000..ddaabfc --- /dev/null +++ b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/linear.https.any-expected.txt
@@ -0,0 +1,25 @@ +This is a testharness.js-based test. +[FAIL] linear float32 1D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] linear float32 2D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] linear float32 3D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] linear float32 4D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] linear float32 5D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] linear float32 4D tensor specified options.alpha and default options.beta / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] linear float32 positive 4D tensor specified positive options.beta and default options.alpha / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] linear float32 negative 4D tensor specified negative options.beta and default options.alpha / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] linear float32 positive 4D tensor all options (positive options.alpha and positive options.beta) / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] linear float32 positive 4D tensor all options (negative options.alpha and negative options.beta) / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] linear float32 negative 4D tensor all options (positive options.alpha and negative options.beta) / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/linear.https.any.worker-expected.txt b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/linear.https.any.worker-expected.txt new file mode 100644 index 0000000..3ecd5bd --- /dev/null +++ b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/linear.https.any.worker-expected.txt
@@ -0,0 +1,47 @@ +This is a testharness.js-based test. +[FAIL] linear float32 1D tensor default options / sync + builder[operationName] is not a function +[FAIL] linear float32 2D tensor default options / sync + builder[operationName] is not a function +[FAIL] linear float32 3D tensor default options / sync + builder[operationName] is not a function +[FAIL] linear float32 4D tensor default options / sync + builder[operationName] is not a function +[FAIL] linear float32 5D tensor default options / sync + builder[operationName] is not a function +[FAIL] linear float32 4D tensor specified options.alpha and default options.beta / sync + builder[operationName] is not a function +[FAIL] linear float32 positive 4D tensor specified positive options.beta and default options.alpha / sync + builder[operationName] is not a function +[FAIL] linear float32 negative 4D tensor specified negative options.beta and default options.alpha / sync + builder[operationName] is not a function +[FAIL] linear float32 positive 4D tensor all options (positive options.alpha and positive options.beta) / sync + builder[operationName] is not a function +[FAIL] linear float32 positive 4D tensor all options (negative options.alpha and negative options.beta) / sync + builder[operationName] is not a function +[FAIL] linear float32 negative 4D tensor all options (positive options.alpha and negative options.beta) / sync + builder[operationName] is not a function +[FAIL] linear float32 1D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] linear float32 2D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] linear float32 3D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] linear float32 4D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] linear float32 5D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] linear float32 4D tensor specified options.alpha and default options.beta / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] linear float32 positive 4D tensor specified positive options.beta and default options.alpha / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] linear float32 negative 4D tensor specified negative options.beta and default options.alpha / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] linear float32 positive 4D tensor all options (positive options.alpha and positive options.beta) / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] linear float32 positive 4D tensor all options (negative options.alpha and negative options.beta) / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] linear float32 negative 4D tensor all options (positive options.alpha and negative options.beta) / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/matmul.https.any-expected.txt b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/matmul.https.any-expected.txt new file mode 100644 index 0000000..55f2572 --- /dev/null +++ b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/matmul.https.any-expected.txt
@@ -0,0 +1,35 @@ +This is a testharness.js-based test. +[FAIL] matmul float32 1D and 1D tensors all positive produces a scalar / async + promise_test: Unhandled rejection with value: object "DataError: Failed to execute 'matmul' on 'MLGraphBuilder': The rank of input must be larger than or equal to 2." +[FAIL] matmul float32 1D and 1D tensors all negative produces a scalar / async + promise_test: Unhandled rejection with value: object "DataError: Failed to execute 'matmul' on 'MLGraphBuilder': The rank of input must be larger than or equal to 2." +[FAIL] matmul float32 positive 1D and negative 1D tensors produces a scalar / async + promise_test: Unhandled rejection with value: object "DataError: Failed to execute 'matmul' on 'MLGraphBuilder': The rank of input must be larger than or equal to 2." +[FAIL] matmul float32 negative 1D and positive 1D tensors produces a scalar / async + promise_test: Unhandled rejection with value: object "DataError: Failed to execute 'matmul' on 'MLGraphBuilder': The rank of input must be larger than or equal to 2." +[FAIL] matmul float32 1D and 2D tensors / async + promise_test: Unhandled rejection with value: object "DataError: Failed to execute 'matmul' on 'MLGraphBuilder': The rank of input must be larger than or equal to 2." +[FAIL] matmul float32 1D and 4D tensors / async + promise_test: Unhandled rejection with value: object "DataError: Failed to execute 'matmul' on 'MLGraphBuilder': The rank of input must be larger than or equal to 2." +[FAIL] matmul float32 2D and 1D tensors / async + promise_test: Unhandled rejection with value: object "DataError: Failed to execute 'matmul' on 'MLGraphBuilder': The rank of input must be larger than or equal to 2." +[FAIL] matmul float32 2D and 2D tensors / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (matmul) is not supported." +[FAIL] matmul float32 3D and 3D tensors / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (matmul) is not supported." +[FAIL] matmul float32 3D and 3D (broadcast) tensors / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (matmul) is not supported." +[FAIL] matmul float32 3D and 2D tensors / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (matmul) is not supported." +[FAIL] matmul float32 3D and 1D tensors / async + promise_test: Unhandled rejection with value: object "DataError: Failed to execute 'matmul' on 'MLGraphBuilder': The rank of input must be larger than or equal to 2." +[FAIL] matmul float32 4D and 4D (broadcast) tensors / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (matmul) is not supported." +[FAIL] matmul float32 4D and 3D tensors / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (matmul) is not supported." +[FAIL] matmul float32 5D and 5D tensors / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (matmul) is not supported." +[FAIL] matmul float32 5D and 2D tensors / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (matmul) is not supported." +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/matmul.https.any.worker-expected.txt b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/matmul.https.any.worker-expected.txt new file mode 100644 index 0000000..3c63363b --- /dev/null +++ b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/matmul.https.any.worker-expected.txt
@@ -0,0 +1,67 @@ +This is a testharness.js-based test. +[FAIL] matmul float32 1D and 1D tensors all positive produces a scalar / sync + Failed to execute 'matmul' on 'MLGraphBuilder': The rank of input must be larger than or equal to 2. +[FAIL] matmul float32 1D and 1D tensors all negative produces a scalar / sync + Failed to execute 'matmul' on 'MLGraphBuilder': The rank of input must be larger than or equal to 2. +[FAIL] matmul float32 positive 1D and negative 1D tensors produces a scalar / sync + Failed to execute 'matmul' on 'MLGraphBuilder': The rank of input must be larger than or equal to 2. +[FAIL] matmul float32 negative 1D and positive 1D tensors produces a scalar / sync + Failed to execute 'matmul' on 'MLGraphBuilder': The rank of input must be larger than or equal to 2. +[FAIL] matmul float32 1D and 2D tensors / sync + Failed to execute 'matmul' on 'MLGraphBuilder': The rank of input must be larger than or equal to 2. +[FAIL] matmul float32 1D and 4D tensors / sync + Failed to execute 'matmul' on 'MLGraphBuilder': The rank of input must be larger than or equal to 2. +[FAIL] matmul float32 2D and 1D tensors / sync + Failed to execute 'matmul' on 'MLGraphBuilder': The rank of input must be larger than or equal to 2. +[FAIL] matmul float32 2D and 2D tensors / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (matmul) is not supported. +[FAIL] matmul float32 3D and 3D tensors / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (matmul) is not supported. +[FAIL] matmul float32 3D and 3D (broadcast) tensors / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (matmul) is not supported. +[FAIL] matmul float32 3D and 2D tensors / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (matmul) is not supported. +[FAIL] matmul float32 3D and 1D tensors / sync + Failed to execute 'matmul' on 'MLGraphBuilder': The rank of input must be larger than or equal to 2. +[FAIL] matmul float32 4D and 4D (broadcast) tensors / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (matmul) is not supported. +[FAIL] matmul float32 4D and 3D tensors / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (matmul) is not supported. +[FAIL] matmul float32 5D and 5D tensors / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (matmul) is not supported. +[FAIL] matmul float32 5D and 2D tensors / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (matmul) is not supported. +[FAIL] matmul float32 1D and 1D tensors all positive produces a scalar / async + promise_test: Unhandled rejection with value: object "DataError: Failed to execute 'matmul' on 'MLGraphBuilder': The rank of input must be larger than or equal to 2." +[FAIL] matmul float32 1D and 1D tensors all negative produces a scalar / async + promise_test: Unhandled rejection with value: object "DataError: Failed to execute 'matmul' on 'MLGraphBuilder': The rank of input must be larger than or equal to 2." +[FAIL] matmul float32 positive 1D and negative 1D tensors produces a scalar / async + promise_test: Unhandled rejection with value: object "DataError: Failed to execute 'matmul' on 'MLGraphBuilder': The rank of input must be larger than or equal to 2." +[FAIL] matmul float32 negative 1D and positive 1D tensors produces a scalar / async + promise_test: Unhandled rejection with value: object "DataError: Failed to execute 'matmul' on 'MLGraphBuilder': The rank of input must be larger than or equal to 2." +[FAIL] matmul float32 1D and 2D tensors / async + promise_test: Unhandled rejection with value: object "DataError: Failed to execute 'matmul' on 'MLGraphBuilder': The rank of input must be larger than or equal to 2." +[FAIL] matmul float32 1D and 4D tensors / async + promise_test: Unhandled rejection with value: object "DataError: Failed to execute 'matmul' on 'MLGraphBuilder': The rank of input must be larger than or equal to 2." +[FAIL] matmul float32 2D and 1D tensors / async + promise_test: Unhandled rejection with value: object "DataError: Failed to execute 'matmul' on 'MLGraphBuilder': The rank of input must be larger than or equal to 2." +[FAIL] matmul float32 2D and 2D tensors / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] matmul float32 3D and 3D tensors / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] matmul float32 3D and 3D (broadcast) tensors / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] matmul float32 3D and 2D tensors / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] matmul float32 3D and 1D tensors / async + promise_test: Unhandled rejection with value: object "DataError: Failed to execute 'matmul' on 'MLGraphBuilder': The rank of input must be larger than or equal to 2." +[FAIL] matmul float32 4D and 4D (broadcast) tensors / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] matmul float32 4D and 3D tensors / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] matmul float32 5D and 5D tensors / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] matmul float32 5D and 2D tensors / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/pad.https.any.worker-expected.txt b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/pad.https.any.worker-expected.txt new file mode 100644 index 0000000..40d9912 --- /dev/null +++ b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/pad.https.any.worker-expected.txt
@@ -0,0 +1,43 @@ +This is a testharness.js-based test. +[FAIL] pad float32 1D tensor default options / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] pad float32 2D tensor default options / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] pad float32 3D tensor default options / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] pad float32 4D tensor default options / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] pad float32 5D tensor default options / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] pad float32 2D tensor explicit options.mode='constant' / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] pad float32 2D tensor options.value default constant mode / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] pad float32 4D tensor options.mode='edge' / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] pad float32 4D tensor options.mode='reflection' / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] pad float32 4D tensor options.mode='symmetric' / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] pad float32 1D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] pad float32 2D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] pad float32 3D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] pad float32 4D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] pad float32 5D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] pad float32 2D tensor explicit options.mode='constant' / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] pad float32 2D tensor options.value default constant mode / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] pad float32 4D tensor options.mode='edge' / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] pad float32 4D tensor options.mode='reflection' / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] pad float32 4D tensor options.mode='symmetric' / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/pooling.https.any-expected.txt b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/pooling.https.any-expected.txt new file mode 100644 index 0000000..567ac4d --- /dev/null +++ b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/pooling.https.any-expected.txt
@@ -0,0 +1,39 @@ +This is a testharness.js-based test. +[PASS] averagePool2d float32 4D tensor all positive default options / async +[PASS] averagePool2d float32 4D tensor all negative default options / async +[PASS] averagePool2d float32 4D tensor options.windowDimensions / async +[PASS] averagePool2d float32 4D tensor options.padding / async +[PASS] averagePool2d float32 4D tensor options.strides / async +[FAIL] averagePool2d float32 4D tensor options.dilations / async + promise_test: Unhandled rejection with value: object "NotSupportedError: Dilations are not supported for average pooling operator." +[PASS] averagePool2d float32 4D tensor options.autoPad=explicit / async +[PASS] averagePool2d float32 4D tensor options.autoPad=same-upper / async +[PASS] averagePool2d float32 4D tensor options.autoPad=same-lower / async +[PASS] averagePool2d float32 4D tensor options.autoPad=same-upper ignores options.padding / async +[PASS] averagePool2d float32 4D tensor options.autoPad=same-lower ignores options.padding / async +[PASS] averagePool2d float32 4D tensor options.layout=nchw / async +[PASS] averagePool2d float32 4D tensor options.layout=nhwc / async +[PASS] averagePool2d float32 4D tensor options.roundingType=floor / async +[PASS] averagePool2d float32 4D tensor options.roundingType=ceil / async +[PASS] averagePool2d float32 4D tensor options.outputSizes ignores options.roundingType=floor / async +[PASS] averagePool2d float32 4D tensor options.outputSizes ignores options.roundingType=ceil / async +[PASS] averagePool2d float32 4D tensor options.dilations with options.strides / async +[PASS] maxPool2d float32 4D tensor default options / async +[PASS] maxPool2d float32 4D tensor options.windowDimensions / async +[PASS] maxPool2d float32 4D tensor options.padding / async +[PASS] maxPool2d float32 4D tensor options.strides / async +[PASS] maxPool2d float32 4D tensor options.dilations / async +[PASS] maxPool2d float32 4D tensor options.autoPad=explicit / async +[PASS] maxPool2d float32 4D tensor options.autoPad=same-upper / async +[PASS] maxPool2d float32 4D tensor options.autoPad=same-lower / async +[PASS] maxPool2d float32 4D tensor options.autoPad=same-upper ignores options.padding / async +[PASS] maxPool2d float32 4D tensor options.autoPad=same-lower ignores options.padding / async +[PASS] maxPool2d float32 4D tensor options.layout=nchw / async +[PASS] maxPool2d float32 4D tensor options.layout=nhwc / async +[PASS] maxPool2d float32 4D tensor options.roundingType=floor / async +[PASS] maxPool2d float32 4D tensor options.roundingType=ceil / async +[PASS] maxPool2d float32 4D tensor options.outputSizes ignores options.roundingType=floor / async +[PASS] maxPool2d float32 4D tensor options.outputSizes ignores options.roundingType=ceil / async +[PASS] maxPool2d float32 4D tensor options.dilations with options.strides / async +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/pooling.https.any.worker-expected.txt b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/pooling.https.any.worker-expected.txt new file mode 100644 index 0000000..449f7dc --- /dev/null +++ b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/pooling.https.any.worker-expected.txt
@@ -0,0 +1,144 @@ +This is a testharness.js-based test. +Found 70 tests; 0 PASS, 70 FAIL, 0 TIMEOUT, 0 NOTRUN. +[FAIL] averagePool2d float32 4D tensor all positive default options / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] averagePool2d float32 4D tensor all negative default options / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] averagePool2d float32 4D tensor options.windowDimensions / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] averagePool2d float32 4D tensor options.padding / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] averagePool2d float32 4D tensor options.strides / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] averagePool2d float32 4D tensor options.dilations / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Dilations are not supported for average pooling operator. +[FAIL] averagePool2d float32 4D tensor options.autoPad=explicit / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] averagePool2d float32 4D tensor options.autoPad=same-upper / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] averagePool2d float32 4D tensor options.autoPad=same-lower / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] averagePool2d float32 4D tensor options.autoPad=same-upper ignores options.padding / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] averagePool2d float32 4D tensor options.autoPad=same-lower ignores options.padding / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] averagePool2d float32 4D tensor options.layout=nchw / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] averagePool2d float32 4D tensor options.layout=nhwc / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] averagePool2d float32 4D tensor options.roundingType=floor / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] averagePool2d float32 4D tensor options.roundingType=ceil / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] averagePool2d float32 4D tensor options.outputSizes ignores options.roundingType=floor / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] averagePool2d float32 4D tensor options.outputSizes ignores options.roundingType=ceil / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] averagePool2d float32 4D tensor options.dilations with options.strides / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] maxPool2d float32 4D tensor default options / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] maxPool2d float32 4D tensor options.windowDimensions / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] maxPool2d float32 4D tensor options.padding / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] maxPool2d float32 4D tensor options.strides / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] maxPool2d float32 4D tensor options.dilations / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] maxPool2d float32 4D tensor options.autoPad=explicit / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] maxPool2d float32 4D tensor options.autoPad=same-upper / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] maxPool2d float32 4D tensor options.autoPad=same-lower / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] maxPool2d float32 4D tensor options.autoPad=same-upper ignores options.padding / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] maxPool2d float32 4D tensor options.autoPad=same-lower ignores options.padding / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] maxPool2d float32 4D tensor options.layout=nchw / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] maxPool2d float32 4D tensor options.layout=nhwc / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] maxPool2d float32 4D tensor options.roundingType=floor / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] maxPool2d float32 4D tensor options.roundingType=ceil / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] maxPool2d float32 4D tensor options.outputSizes ignores options.roundingType=floor / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] maxPool2d float32 4D tensor options.outputSizes ignores options.roundingType=ceil / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] maxPool2d float32 4D tensor options.dilations with options.strides / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] averagePool2d float32 4D tensor all positive default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] averagePool2d float32 4D tensor all negative default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] averagePool2d float32 4D tensor options.windowDimensions / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] averagePool2d float32 4D tensor options.padding / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] averagePool2d float32 4D tensor options.strides / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] averagePool2d float32 4D tensor options.dilations / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] averagePool2d float32 4D tensor options.autoPad=explicit / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] averagePool2d float32 4D tensor options.autoPad=same-upper / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] averagePool2d float32 4D tensor options.autoPad=same-lower / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] averagePool2d float32 4D tensor options.autoPad=same-upper ignores options.padding / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] averagePool2d float32 4D tensor options.autoPad=same-lower ignores options.padding / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] averagePool2d float32 4D tensor options.layout=nchw / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] averagePool2d float32 4D tensor options.layout=nhwc / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] averagePool2d float32 4D tensor options.roundingType=floor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] averagePool2d float32 4D tensor options.roundingType=ceil / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] averagePool2d float32 4D tensor options.outputSizes ignores options.roundingType=floor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] averagePool2d float32 4D tensor options.outputSizes ignores options.roundingType=ceil / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] averagePool2d float32 4D tensor options.dilations with options.strides / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] maxPool2d float32 4D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] maxPool2d float32 4D tensor options.windowDimensions / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] maxPool2d float32 4D tensor options.padding / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] maxPool2d float32 4D tensor options.strides / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] maxPool2d float32 4D tensor options.dilations / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] maxPool2d float32 4D tensor options.autoPad=explicit / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] maxPool2d float32 4D tensor options.autoPad=same-upper / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] maxPool2d float32 4D tensor options.autoPad=same-lower / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] maxPool2d float32 4D tensor options.autoPad=same-upper ignores options.padding / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] maxPool2d float32 4D tensor options.autoPad=same-lower ignores options.padding / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] maxPool2d float32 4D tensor options.layout=nchw / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] maxPool2d float32 4D tensor options.layout=nhwc / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] maxPool2d float32 4D tensor options.roundingType=floor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] maxPool2d float32 4D tensor options.roundingType=ceil / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] maxPool2d float32 4D tensor options.outputSizes ignores options.roundingType=floor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] maxPool2d float32 4D tensor options.outputSizes ignores options.roundingType=ceil / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] maxPool2d float32 4D tensor options.dilations with options.strides / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/prelu.https.any.worker-expected.txt b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/prelu.https.any.worker-expected.txt new file mode 100644 index 0000000..3105a913 --- /dev/null +++ b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/prelu.https.any.worker-expected.txt
@@ -0,0 +1,43 @@ +This is a testharness.js-based test. +[FAIL] prelu float32 1D tensors / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] prelu float32 2D tensors / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] prelu float32 3D tensors / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] prelu float32 4D tensors / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] prelu float32 5D tensors / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] prelu float32 broadcast 4D x 1D slope / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] prelu float32 broadcast 4D x 1D slope of shape [1] / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] prelu float32 broadcast 4D x 2D slope / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] prelu float32 broadcast 4D x 3D slope / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] prelu float32 broadcast 4D x 4D slope / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] prelu float32 1D tensors / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] prelu float32 2D tensors / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] prelu float32 3D tensors / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] prelu float32 4D tensors / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] prelu float32 5D tensors / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] prelu float32 broadcast 4D x 1D slope / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] prelu float32 broadcast 4D x 1D slope of shape [1] / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] prelu float32 broadcast 4D x 2D slope / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] prelu float32 broadcast 4D x 3D slope / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] prelu float32 broadcast 4D x 4D slope / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/reduction.https.any-expected.txt b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/reduction.https.any-expected.txt new file mode 100644 index 0000000..016aa27 --- /dev/null +++ b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/reduction.https.any-expected.txt
@@ -0,0 +1,302 @@ +This is a testharness.js-based test. +Found 149 tests; 0 PASS, 149 FAIL, 0 TIMEOUT, 0 NOTRUN. +[FAIL] reduceL1 float32 1D tensor all positive default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceL1 float32 1D tensor all negative default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceL1 float32 1D tensor all positive integers default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceL1 float32 1D tensor all negative integers default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceL1 float32 2D tensor default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceL1 float32 3D tensor default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceL1 float32 4D tensor default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceL1 float32 5D tensor default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceL1 float32 3D tensor options.axes / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceL1 float32 4D tensor options.axes / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceL1 float32 3D tensor options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceL1 float32 3D tensor options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceL1 float32 4D tensor options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceL1 float32 4D tensor options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceL1 float32 4D tensor options.axes with options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceL1 float32 4D tensor options.axes with options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceL2 float32 1D tensor all positive default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceL2 float32 1D tensor all negative default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceL2 float32 1D tensor all positive integers default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceL2 float32 1D tensor all negative integers default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceL2 float32 2D tensor default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceL2 float32 3D tensor default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceL2 float32 4D tensor default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceL2 float32 5D tensor default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceL2 float32 3D tensor options.axes / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceL2 float32 4D tensor options.axes / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceL2 float32 3D tensor options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceL2 float32 3D tensor options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceL2 float32 4D tensor options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceL2 float32 4D tensor options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceL2 float32 4D tensor options.axes with options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceL2 float32 4D tensor options.axes with options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceLogSum float32 1D tensor all non-negative default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceLogSum float32 1D tensor all non-negative integers default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceLogSum float32 2D tensor default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceLogSum float32 3D tensor default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceLogSum float32 4D tensor default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceLogSum float32 5D tensor default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceLogSum float32 3D tensor options.axes / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceLogSum float32 4D tensor options.axes / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceLogSum float32 3D tensor options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceLogSum float32 3D tensor options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceLogSum float32 4D tensor options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceLogSum float32 4D tensor options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceLogSum float32 4D tensor options.axes with options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceLogSum float32 4D tensor options.axes with options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceLogSumExp float32 1D tensor all positive default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceLogSumExp float32 1D tensor all negative default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceLogSumExp float32 1D tensor all positive integers default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceLogSumExp float32 1D tensor all negative integers default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceLogSumExp float32 2D tensor default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceLogSumExp float32 3D tensor default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceLogSumExp float32 4D tensor default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceLogSumExp float32 5D tensor default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceLogSumExp float32 3D tensor options.axes / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceLogSumExp float32 4D tensor options.axes / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceLogSumExp float32 3D tensor options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceLogSumExp float32 3D tensor options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceLogSumExp float32 4D tensor options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceLogSumExp float32 4D tensor options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceLogSumExp float32 4D tensor options.axes with options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceLogSumExp float32 4D tensor options.axes with options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceMax float32 1D tensor default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceMax float32 2D tensor default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceMax float32 3D tensor default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceMax float32 4D tensor default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceMax float32 5D tensor default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceMax float32 3D tensor options.axes / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceMax float32 4D tensor options.axes / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceMax float32 3D tensor options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceMax float32 3D tensor options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceMax float32 4D tensor options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceMax float32 4D tensor options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceMax float32 4D tensor options.axes with options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceMax float32 4D tensor options.axes with options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceMean float32 1D tensor all positive default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceMean float32 1D tensor all negative default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceMean float32 1D tensor all positive integers default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceMean float32 1D tensor all negative integers default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceMean float32 2D tensor default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceMean float32 3D tensor default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceMean float32 4D tensor default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceMean float32 5D tensor default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceMean float32 3D tensor options.axes / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceMean float32 4D tensor options.axes / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceMean float32 3D tensor options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceMean float32 3D tensor options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceMean float32 4D tensor options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceMean float32 4D tensor options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceMean float32 4D tensor options.axes with options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceMean float32 4D tensor options.axes with options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceMin float32 1D tensor default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceMin float32 2D tensor default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceMin float32 3D tensor default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceMin float32 4D tensor default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceMin float32 5D tensor default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceMin float32 3D tensor options.axes / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceMin float32 4D tensor options.axes / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceMin float32 3D tensor options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceMin float32 3D tensor options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceMin float32 4D tensor options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceMin float32 4D tensor options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceMin float32 4D tensor options.axes with options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceMin float32 4D tensor options.axes with options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceProduct float32 1D tensor default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceProduct float32 2D tensor default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceProduct float32 3D tensor default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceProduct float32 4D tensor default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceProduct float32 5D tensor default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceProduct float32 3D tensor options.axes / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceProduct float32 4D tensor options.axes / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceProduct float32 3D tensor options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceProduct float32 3D tensor options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceProduct float32 4D tensor options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceProduct float32 4D tensor options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceProduct float32 4D tensor options.axes with options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceProduct float32 4D tensor options.axes with options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceSum float32 1D tensor all positive default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceSum float32 1D tensor all negative default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceSum float32 1D tensor all positive integers default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceSum float32 1D tensor all negative integers default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceSum float32 2D tensor default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceSum float32 3D tensor default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceSum float32 4D tensor default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceSum float32 5D tensor default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceSum float32 3D tensor options.axes / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceSum float32 4D tensor options.axes / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceSum float32 3D tensor options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceSum float32 3D tensor options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceSum float32 4D tensor options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceSum float32 4D tensor options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceSum float32 4D tensor options.axes with options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceSum float32 4D tensor options.axes with options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceSumSquare float32 1D tensor all positive default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceSumSquare float32 1D tensor all negative default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceSumSquare float32 1D tensor all positive integers default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceSumSquare float32 1D tensor all negative integers default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceSumSquare float32 2D tensor default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceSumSquare float32 3D tensor default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceSumSquare float32 4D tensor default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceSumSquare float32 5D tensor default options / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceSumSquare float32 3D tensor options.axes / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceSumSquare float32 4D tensor options.axes / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceSumSquare float32 3D tensor options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceSumSquare float32 3D tensor options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceSumSquare float32 4D tensor options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceSumSquare float32 4D tensor options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceSumSquare float32 4D tensor options.axes with options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +[FAIL] reduceSumSquare float32 4D tensor options.axes with options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "NotSupportedError: This operator (reduce) is not supported." +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/reduction.https.any.worker-expected.txt b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/reduction.https.any.worker-expected.txt new file mode 100644 index 0000000..b51cd9ba --- /dev/null +++ b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/reduction.https.any.worker-expected.txt
@@ -0,0 +1,600 @@ +This is a testharness.js-based test. +Found 298 tests; 0 PASS, 298 FAIL, 0 TIMEOUT, 0 NOTRUN. +[FAIL] reduceL1 float32 1D tensor all positive default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceL1 float32 1D tensor all negative default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceL1 float32 1D tensor all positive integers default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceL1 float32 1D tensor all negative integers default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceL1 float32 2D tensor default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceL1 float32 3D tensor default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceL1 float32 4D tensor default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceL1 float32 5D tensor default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceL1 float32 3D tensor options.axes / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceL1 float32 4D tensor options.axes / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceL1 float32 3D tensor options.keepDimensions=false / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceL1 float32 3D tensor options.keepDimensions=true / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceL1 float32 4D tensor options.keepDimensions=false / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceL1 float32 4D tensor options.keepDimensions=true / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceL1 float32 4D tensor options.axes with options.keepDimensions=false / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceL1 float32 4D tensor options.axes with options.keepDimensions=true / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceL2 float32 1D tensor all positive default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceL2 float32 1D tensor all negative default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceL2 float32 1D tensor all positive integers default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceL2 float32 1D tensor all negative integers default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceL2 float32 2D tensor default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceL2 float32 3D tensor default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceL2 float32 4D tensor default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceL2 float32 5D tensor default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceL2 float32 3D tensor options.axes / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceL2 float32 4D tensor options.axes / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceL2 float32 3D tensor options.keepDimensions=false / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceL2 float32 3D tensor options.keepDimensions=true / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceL2 float32 4D tensor options.keepDimensions=false / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceL2 float32 4D tensor options.keepDimensions=true / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceL2 float32 4D tensor options.axes with options.keepDimensions=false / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceL2 float32 4D tensor options.axes with options.keepDimensions=true / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceLogSum float32 1D tensor all non-negative default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceLogSum float32 1D tensor all non-negative integers default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceLogSum float32 2D tensor default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceLogSum float32 3D tensor default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceLogSum float32 4D tensor default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceLogSum float32 5D tensor default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceLogSum float32 3D tensor options.axes / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceLogSum float32 4D tensor options.axes / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceLogSum float32 3D tensor options.keepDimensions=false / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceLogSum float32 3D tensor options.keepDimensions=true / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceLogSum float32 4D tensor options.keepDimensions=false / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceLogSum float32 4D tensor options.keepDimensions=true / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceLogSum float32 4D tensor options.axes with options.keepDimensions=false / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceLogSum float32 4D tensor options.axes with options.keepDimensions=true / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceLogSumExp float32 1D tensor all positive default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceLogSumExp float32 1D tensor all negative default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceLogSumExp float32 1D tensor all positive integers default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceLogSumExp float32 1D tensor all negative integers default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceLogSumExp float32 2D tensor default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceLogSumExp float32 3D tensor default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceLogSumExp float32 4D tensor default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceLogSumExp float32 5D tensor default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceLogSumExp float32 3D tensor options.axes / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceLogSumExp float32 4D tensor options.axes / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceLogSumExp float32 3D tensor options.keepDimensions=false / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceLogSumExp float32 3D tensor options.keepDimensions=true / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceLogSumExp float32 4D tensor options.keepDimensions=false / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceLogSumExp float32 4D tensor options.keepDimensions=true / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceLogSumExp float32 4D tensor options.axes with options.keepDimensions=false / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceLogSumExp float32 4D tensor options.axes with options.keepDimensions=true / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceMax float32 1D tensor default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceMax float32 2D tensor default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceMax float32 3D tensor default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceMax float32 4D tensor default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceMax float32 5D tensor default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceMax float32 3D tensor options.axes / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceMax float32 4D tensor options.axes / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceMax float32 3D tensor options.keepDimensions=false / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceMax float32 3D tensor options.keepDimensions=true / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceMax float32 4D tensor options.keepDimensions=false / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceMax float32 4D tensor options.keepDimensions=true / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceMax float32 4D tensor options.axes with options.keepDimensions=false / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceMax float32 4D tensor options.axes with options.keepDimensions=true / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceMean float32 1D tensor all positive default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceMean float32 1D tensor all negative default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceMean float32 1D tensor all positive integers default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceMean float32 1D tensor all negative integers default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceMean float32 2D tensor default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceMean float32 3D tensor default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceMean float32 4D tensor default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceMean float32 5D tensor default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceMean float32 3D tensor options.axes / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceMean float32 4D tensor options.axes / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceMean float32 3D tensor options.keepDimensions=false / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceMean float32 3D tensor options.keepDimensions=true / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceMean float32 4D tensor options.keepDimensions=false / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceMean float32 4D tensor options.keepDimensions=true / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceMean float32 4D tensor options.axes with options.keepDimensions=false / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceMean float32 4D tensor options.axes with options.keepDimensions=true / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceMin float32 1D tensor default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceMin float32 2D tensor default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceMin float32 3D tensor default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceMin float32 4D tensor default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceMin float32 5D tensor default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceMin float32 3D tensor options.axes / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceMin float32 4D tensor options.axes / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceMin float32 3D tensor options.keepDimensions=false / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceMin float32 3D tensor options.keepDimensions=true / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceMin float32 4D tensor options.keepDimensions=false / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceMin float32 4D tensor options.keepDimensions=true / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceMin float32 4D tensor options.axes with options.keepDimensions=false / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceMin float32 4D tensor options.axes with options.keepDimensions=true / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceProduct float32 1D tensor default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceProduct float32 2D tensor default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceProduct float32 3D tensor default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceProduct float32 4D tensor default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceProduct float32 5D tensor default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceProduct float32 3D tensor options.axes / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceProduct float32 4D tensor options.axes / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceProduct float32 3D tensor options.keepDimensions=false / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceProduct float32 3D tensor options.keepDimensions=true / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceProduct float32 4D tensor options.keepDimensions=false / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceProduct float32 4D tensor options.keepDimensions=true / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceProduct float32 4D tensor options.axes with options.keepDimensions=false / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceProduct float32 4D tensor options.axes with options.keepDimensions=true / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceSum float32 1D tensor all positive default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceSum float32 1D tensor all negative default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceSum float32 1D tensor all positive integers default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceSum float32 1D tensor all negative integers default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceSum float32 2D tensor default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceSum float32 3D tensor default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceSum float32 4D tensor default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceSum float32 5D tensor default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceSum float32 3D tensor options.axes / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceSum float32 4D tensor options.axes / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceSum float32 3D tensor options.keepDimensions=false / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceSum float32 3D tensor options.keepDimensions=true / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceSum float32 4D tensor options.keepDimensions=false / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceSum float32 4D tensor options.keepDimensions=true / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceSum float32 4D tensor options.axes with options.keepDimensions=false / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceSum float32 4D tensor options.axes with options.keepDimensions=true / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceSumSquare float32 1D tensor all positive default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceSumSquare float32 1D tensor all negative default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceSumSquare float32 1D tensor all positive integers default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceSumSquare float32 1D tensor all negative integers default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceSumSquare float32 2D tensor default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceSumSquare float32 3D tensor default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceSumSquare float32 4D tensor default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceSumSquare float32 5D tensor default options / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceSumSquare float32 3D tensor options.axes / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceSumSquare float32 4D tensor options.axes / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceSumSquare float32 3D tensor options.keepDimensions=false / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceSumSquare float32 3D tensor options.keepDimensions=true / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceSumSquare float32 4D tensor options.keepDimensions=false / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceSumSquare float32 4D tensor options.keepDimensions=true / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceSumSquare float32 4D tensor options.axes with options.keepDimensions=false / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceSumSquare float32 4D tensor options.axes with options.keepDimensions=true / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': This operator (reduce) is not supported. +[FAIL] reduceL1 float32 1D tensor all positive default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceL1 float32 1D tensor all negative default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceL1 float32 1D tensor all positive integers default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceL1 float32 1D tensor all negative integers default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceL1 float32 2D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceL1 float32 3D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceL1 float32 4D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceL1 float32 5D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceL1 float32 3D tensor options.axes / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceL1 float32 4D tensor options.axes / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceL1 float32 3D tensor options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceL1 float32 3D tensor options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceL1 float32 4D tensor options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceL1 float32 4D tensor options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceL1 float32 4D tensor options.axes with options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceL1 float32 4D tensor options.axes with options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceL2 float32 1D tensor all positive default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceL2 float32 1D tensor all negative default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceL2 float32 1D tensor all positive integers default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceL2 float32 1D tensor all negative integers default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceL2 float32 2D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceL2 float32 3D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceL2 float32 4D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceL2 float32 5D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceL2 float32 3D tensor options.axes / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceL2 float32 4D tensor options.axes / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceL2 float32 3D tensor options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceL2 float32 3D tensor options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceL2 float32 4D tensor options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceL2 float32 4D tensor options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceL2 float32 4D tensor options.axes with options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceL2 float32 4D tensor options.axes with options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceLogSum float32 1D tensor all non-negative default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceLogSum float32 1D tensor all non-negative integers default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceLogSum float32 2D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceLogSum float32 3D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceLogSum float32 4D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceLogSum float32 5D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceLogSum float32 3D tensor options.axes / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceLogSum float32 4D tensor options.axes / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceLogSum float32 3D tensor options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceLogSum float32 3D tensor options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceLogSum float32 4D tensor options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceLogSum float32 4D tensor options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceLogSum float32 4D tensor options.axes with options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceLogSum float32 4D tensor options.axes with options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceLogSumExp float32 1D tensor all positive default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceLogSumExp float32 1D tensor all negative default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceLogSumExp float32 1D tensor all positive integers default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceLogSumExp float32 1D tensor all negative integers default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceLogSumExp float32 2D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceLogSumExp float32 3D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceLogSumExp float32 4D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceLogSumExp float32 5D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceLogSumExp float32 3D tensor options.axes / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceLogSumExp float32 4D tensor options.axes / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceLogSumExp float32 3D tensor options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceLogSumExp float32 3D tensor options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceLogSumExp float32 4D tensor options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceLogSumExp float32 4D tensor options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceLogSumExp float32 4D tensor options.axes with options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceLogSumExp float32 4D tensor options.axes with options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceMax float32 1D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceMax float32 2D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceMax float32 3D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceMax float32 4D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceMax float32 5D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceMax float32 3D tensor options.axes / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceMax float32 4D tensor options.axes / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceMax float32 3D tensor options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceMax float32 3D tensor options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceMax float32 4D tensor options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceMax float32 4D tensor options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceMax float32 4D tensor options.axes with options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceMax float32 4D tensor options.axes with options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceMean float32 1D tensor all positive default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceMean float32 1D tensor all negative default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceMean float32 1D tensor all positive integers default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceMean float32 1D tensor all negative integers default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceMean float32 2D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceMean float32 3D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceMean float32 4D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceMean float32 5D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceMean float32 3D tensor options.axes / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceMean float32 4D tensor options.axes / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceMean float32 3D tensor options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceMean float32 3D tensor options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceMean float32 4D tensor options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceMean float32 4D tensor options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceMean float32 4D tensor options.axes with options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceMean float32 4D tensor options.axes with options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceMin float32 1D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceMin float32 2D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceMin float32 3D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceMin float32 4D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceMin float32 5D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceMin float32 3D tensor options.axes / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceMin float32 4D tensor options.axes / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceMin float32 3D tensor options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceMin float32 3D tensor options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceMin float32 4D tensor options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceMin float32 4D tensor options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceMin float32 4D tensor options.axes with options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceMin float32 4D tensor options.axes with options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceProduct float32 1D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceProduct float32 2D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceProduct float32 3D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceProduct float32 4D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceProduct float32 5D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceProduct float32 3D tensor options.axes / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceProduct float32 4D tensor options.axes / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceProduct float32 3D tensor options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceProduct float32 3D tensor options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceProduct float32 4D tensor options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceProduct float32 4D tensor options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceProduct float32 4D tensor options.axes with options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceProduct float32 4D tensor options.axes with options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceSum float32 1D tensor all positive default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceSum float32 1D tensor all negative default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceSum float32 1D tensor all positive integers default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceSum float32 1D tensor all negative integers default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceSum float32 2D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceSum float32 3D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceSum float32 4D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceSum float32 5D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceSum float32 3D tensor options.axes / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceSum float32 4D tensor options.axes / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceSum float32 3D tensor options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceSum float32 3D tensor options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceSum float32 4D tensor options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceSum float32 4D tensor options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceSum float32 4D tensor options.axes with options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceSum float32 4D tensor options.axes with options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceSumSquare float32 1D tensor all positive default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceSumSquare float32 1D tensor all negative default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceSumSquare float32 1D tensor all positive integers default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceSumSquare float32 1D tensor all negative integers default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceSumSquare float32 2D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceSumSquare float32 3D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceSumSquare float32 4D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceSumSquare float32 5D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceSumSquare float32 3D tensor options.axes / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceSumSquare float32 4D tensor options.axes / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceSumSquare float32 3D tensor options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceSumSquare float32 3D tensor options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceSumSquare float32 4D tensor options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceSumSquare float32 4D tensor options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceSumSquare float32 4D tensor options.axes with options.keepDimensions=false / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reduceSumSquare float32 4D tensor options.axes with options.keepDimensions=true / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/relu.https.any.worker-expected.txt b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/relu.https.any.worker-expected.txt new file mode 100644 index 0000000..592be2ac --- /dev/null +++ b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/relu.https.any.worker-expected.txt
@@ -0,0 +1,23 @@ +This is a testharness.js-based test. +[FAIL] relu float32 1D tensor / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] relu float32 2D tensor / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] relu float32 3D tensor / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] relu float32 4D tensor / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] relu float32 5D tensor / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] relu float32 1D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] relu float32 2D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] relu float32 3D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] relu float32 4D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] relu float32 5D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/reshape.https.any.worker-expected.txt b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/reshape.https.any.worker-expected.txt new file mode 100644 index 0000000..ca593c52 --- /dev/null +++ b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/reshape.https.any.worker-expected.txt
@@ -0,0 +1,27 @@ +This is a testharness.js-based test. +[FAIL] reshape float32 tensor to a new shape (reorder all dimensions) / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] reshape float32 tensor to a new shape (reduce dimensions) / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] reshape float32 tensor to a new shape (extend dimensions) / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] reshape float32 tensor to a new shape (one dimension being the special value of null) / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] reshape float32 tensor to 1D tensor / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] reshape float32 tensor to 1D tensor newShape=[null] / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] reshape float32 tensor to a new shape (reorder all dimensions) / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reshape float32 tensor to a new shape (reduce dimensions) / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reshape float32 tensor to a new shape (extend dimensions) / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reshape float32 tensor to a new shape (one dimension being the special value of null) / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reshape float32 tensor to 1D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] reshape float32 tensor to 1D tensor newShape=[null] / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/sigmoid.https.any.worker-expected.txt b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/sigmoid.https.any.worker-expected.txt new file mode 100644 index 0000000..b696b7a --- /dev/null +++ b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/sigmoid.https.any.worker-expected.txt
@@ -0,0 +1,23 @@ +This is a testharness.js-based test. +[FAIL] sigmoid float32 1D tensor / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] sigmoid float32 2D tensor / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] sigmoid float32 3D tensor / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] sigmoid float32 4D tensor / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] sigmoid float32 5D tensor / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] sigmoid float32 1D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] sigmoid float32 2D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] sigmoid float32 3D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] sigmoid float32 4D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] sigmoid float32 5D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/slice.https.any.worker-expected.txt b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/slice.https.any.worker-expected.txt new file mode 100644 index 0000000..bbfc3bf1 --- /dev/null +++ b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/slice.https.any.worker-expected.txt
@@ -0,0 +1,23 @@ +This is a testharness.js-based test. +[FAIL] slice float32 1D tensor / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] slice float32 2D tensor / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] slice float32 3D tensor / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] slice float32 4D tensor / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] slice float32 5D tensor / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] slice float32 1D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] slice float32 2D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] slice float32 3D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] slice float32 4D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] slice float32 5D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/softmax.https.any.worker-expected.txt b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/softmax.https.any.worker-expected.txt new file mode 100644 index 0000000..687ac81 --- /dev/null +++ b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/softmax.https.any.worker-expected.txt
@@ -0,0 +1,11 @@ +This is a testharness.js-based test. +[FAIL] softmax float32 2D tensor all positive / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] softmax float32 2D tensor all negative / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] softmax float32 2D tensor all positive / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] softmax float32 2D tensor all negative / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/softplus.https.any-expected.txt b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/softplus.https.any-expected.txt new file mode 100644 index 0000000..dbaeeef --- /dev/null +++ b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/softplus.https.any-expected.txt
@@ -0,0 +1,17 @@ +This is a testharness.js-based test. +[FAIL] softplus float32 1D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] softplus float32 2D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] softplus float32 3D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] softplus float32 4D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] softplus float32 5D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] softplus both positive float32 4D tensor and options.steepness / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] softplus both negative float32 4D tensor and options.steepness / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/softplus.https.any.worker-expected.txt b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/softplus.https.any.worker-expected.txt new file mode 100644 index 0000000..add1731 --- /dev/null +++ b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/softplus.https.any.worker-expected.txt
@@ -0,0 +1,31 @@ +This is a testharness.js-based test. +[FAIL] softplus float32 1D tensor default options / sync + builder[operationName] is not a function +[FAIL] softplus float32 2D tensor default options / sync + builder[operationName] is not a function +[FAIL] softplus float32 3D tensor default options / sync + builder[operationName] is not a function +[FAIL] softplus float32 4D tensor default options / sync + builder[operationName] is not a function +[FAIL] softplus float32 5D tensor default options / sync + builder[operationName] is not a function +[FAIL] softplus both positive float32 4D tensor and options.steepness / sync + builder[operationName] is not a function +[FAIL] softplus both negative float32 4D tensor and options.steepness / sync + builder[operationName] is not a function +[FAIL] softplus float32 1D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] softplus float32 2D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] softplus float32 3D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] softplus float32 4D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] softplus float32 5D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] softplus both positive float32 4D tensor and options.steepness / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] softplus both negative float32 4D tensor and options.steepness / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/softsign.https.any-expected.txt b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/softsign.https.any-expected.txt new file mode 100644 index 0000000..1263d5a --- /dev/null +++ b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/softsign.https.any-expected.txt
@@ -0,0 +1,15 @@ +This is a testharness.js-based test. +[FAIL] softsign positive float32 1D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: softsign is not implemented." +[FAIL] softsign negative float32 1D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: softsign is not implemented." +[FAIL] softsign float32 2D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: softsign is not implemented." +[FAIL] softsign float32 3D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: softsign is not implemented." +[FAIL] softsign float32 4D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: softsign is not implemented." +[FAIL] softsign float32 5D tensor / async + promise_test: Unhandled rejection with value: object "DataError: Failed to build graph: softsign is not implemented." +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/softsign.https.any.worker-expected.txt b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/softsign.https.any.worker-expected.txt new file mode 100644 index 0000000..2c7bc03 --- /dev/null +++ b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/softsign.https.any.worker-expected.txt
@@ -0,0 +1,27 @@ +This is a testharness.js-based test. +[FAIL] softsign positive float32 1D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: softsign is not implemented. +[FAIL] softsign negative float32 1D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: softsign is not implemented. +[FAIL] softsign float32 2D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: softsign is not implemented. +[FAIL] softsign float32 3D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: softsign is not implemented. +[FAIL] softsign float32 4D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: softsign is not implemented. +[FAIL] softsign float32 5D tensor / sync + Failed to execute 'buildSync' on 'MLGraphBuilder': Failed to build graph: softsign is not implemented. +[FAIL] softsign positive float32 1D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] softsign negative float32 1D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] softsign float32 2D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] softsign float32 3D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] softsign float32 4D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] softsign float32 5D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/split.https.any.worker-expected.txt b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/split.https.any.worker-expected.txt new file mode 100644 index 0000000..b69415b --- /dev/null +++ b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/split.https.any.worker-expected.txt
@@ -0,0 +1,35 @@ +This is a testharness.js-based test. +[FAIL] split float32 1D tensor number splits default options / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] split float32 2D tensor number splits default options / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] split float32 3D tensor number splits default options / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] split float32 4D tensor number splits default options / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] split float32 5D tensor number splits default options / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] split float32 4D tensor array splits default options / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] split float32 4D tensor number splits options.axis / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] split float32 5D tensor array splits options.axis / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] split float32 1D tensor number splits default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] split float32 2D tensor number splits default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] split float32 3D tensor number splits default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] split float32 4D tensor number splits default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] split float32 5D tensor number splits default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] split float32 4D tensor array splits default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] split float32 4D tensor number splits options.axis / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] split float32 5D tensor array splits options.axis / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/squeeze.https.any-expected.txt b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/squeeze.https.any-expected.txt new file mode 100644 index 0000000..aff3ed0 --- /dev/null +++ b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/squeeze.https.any-expected.txt
@@ -0,0 +1,25 @@ +This is a testharness.js-based test. +[FAIL] squeeze float32 2D tensor by eliminating one dimension default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] squeeze float32 3D tensor by eliminating one dimension default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] squeeze float32 3D tensor by eliminating two dimensions default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] squeeze float32 4D tensor by eliminating two dimensions default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] squeeze float32 4D tensor by eliminating all dimensions default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] squeeze float32 5D tensor by eliminating four dimensions default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] squeeze float32 2D tensor by eliminating one dimension options.axes / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] squeeze float32 3D tensor by eliminating two dimensions options.axes / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] squeeze float32 4D tensor by eliminating two dimensions options.axes / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] squeeze float32 5D tensor by eliminating two dimensions options.axes / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] squeeze float32 5D tensor by eliminating four dimensions options.axes / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/squeeze.https.any.worker-expected.txt b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/squeeze.https.any.worker-expected.txt new file mode 100644 index 0000000..54ad664 --- /dev/null +++ b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/squeeze.https.any.worker-expected.txt
@@ -0,0 +1,47 @@ +This is a testharness.js-based test. +[FAIL] squeeze float32 2D tensor by eliminating one dimension default options / sync + builder[operationName] is not a function +[FAIL] squeeze float32 3D tensor by eliminating one dimension default options / sync + builder[operationName] is not a function +[FAIL] squeeze float32 3D tensor by eliminating two dimensions default options / sync + builder[operationName] is not a function +[FAIL] squeeze float32 4D tensor by eliminating two dimensions default options / sync + builder[operationName] is not a function +[FAIL] squeeze float32 4D tensor by eliminating all dimensions default options / sync + builder[operationName] is not a function +[FAIL] squeeze float32 5D tensor by eliminating four dimensions default options / sync + builder[operationName] is not a function +[FAIL] squeeze float32 2D tensor by eliminating one dimension options.axes / sync + builder[operationName] is not a function +[FAIL] squeeze float32 3D tensor by eliminating two dimensions options.axes / sync + builder[operationName] is not a function +[FAIL] squeeze float32 4D tensor by eliminating two dimensions options.axes / sync + builder[operationName] is not a function +[FAIL] squeeze float32 5D tensor by eliminating two dimensions options.axes / sync + builder[operationName] is not a function +[FAIL] squeeze float32 5D tensor by eliminating four dimensions options.axes / sync + builder[operationName] is not a function +[FAIL] squeeze float32 2D tensor by eliminating one dimension default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] squeeze float32 3D tensor by eliminating one dimension default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] squeeze float32 3D tensor by eliminating two dimensions default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] squeeze float32 4D tensor by eliminating two dimensions default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] squeeze float32 4D tensor by eliminating all dimensions default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] squeeze float32 5D tensor by eliminating four dimensions default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] squeeze float32 2D tensor by eliminating one dimension options.axes / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] squeeze float32 3D tensor by eliminating two dimensions options.axes / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] squeeze float32 4D tensor by eliminating two dimensions options.axes / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] squeeze float32 5D tensor by eliminating two dimensions options.axes / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +[FAIL] squeeze float32 5D tensor by eliminating four dimensions options.axes / async + promise_test: Unhandled rejection with value: object "TypeError: builder[operationName] is not a function" +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/tanh.https.any.worker-expected.txt b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/tanh.https.any.worker-expected.txt new file mode 100644 index 0000000..bf9b884d --- /dev/null +++ b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/tanh.https.any.worker-expected.txt
@@ -0,0 +1,23 @@ +This is a testharness.js-based test. +[FAIL] tanh float32 1D tensor / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] tanh float32 2D tensor / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] tanh float32 3D tensor / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] tanh float32 4D tensor / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] tanh float32 5D tensor / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] tanh float32 1D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] tanh float32 2D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] tanh float32 3D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] tanh float32 4D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] tanh float32 5D tensor / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/transpose.https.any.worker-expected.txt b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/transpose.https.any.worker-expected.txt new file mode 100644 index 0000000..5868749 --- /dev/null +++ b/third_party/blink/web_tests/platform/win/virtual/webnn-service-enabled/external/wpt/webnn/gpu/transpose.https.any.worker-expected.txt
@@ -0,0 +1,43 @@ +This is a testharness.js-based test. +[FAIL] transpose float32 1D tensor default options / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] transpose float32 2D tensor default options / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] transpose float32 3D tensor default options / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] transpose float32 4D tensor default options / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] transpose float32 5D tensor default options / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] transpose float32 1D tensor options.permutation / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] transpose float32 2D tensor options.permutation / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] transpose float32 3D tensor options.permutation / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] transpose float32 4D tensor options.permutation / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] transpose float32 5D tensor options.permutation / sync + Failed to execute 'computeSync' on 'MLContext': Invalid inputs: The number (1) of the array buffer views doesn't match the expectation (0). +[FAIL] transpose float32 1D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] transpose float32 2D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] transpose float32 3D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] transpose float32 4D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] transpose float32 5D tensor default options / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] transpose float32 1D tensor options.permutation / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] transpose float32 2D tensor options.permutation / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] transpose float32 3D tensor options.permutation / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] transpose float32 4D tensor options.permutation / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +[FAIL] transpose float32 5D tensor options.permutation / async + promise_test: Unhandled rejection with value: object "TypeError: builder.build is not a function" +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/virtual/webnn-service-enabled/README.md b/third_party/blink/web_tests/virtual/webnn-service-enabled/README.md new file mode 100644 index 0000000..810cedb9 --- /dev/null +++ b/third_party/blink/web_tests/virtual/webnn-service-enabled/README.md
@@ -0,0 +1 @@ +# This suite runs tests with --enable-features=MachineLearningNeuralNetworkService
diff --git a/third_party/crashpad/README.chromium b/third_party/crashpad/README.chromium index c8fb626f..dfee8c6 100644 --- a/third_party/crashpad/README.chromium +++ b/third_party/crashpad/README.chromium
@@ -2,7 +2,7 @@ Short Name: crashpad URL: https://crashpad.chromium.org/ Version: N/A -Revision: 573918571f30de8e58e2fbfa2ffbc809f116323c +Revision: 5613499bbda780dfa663344ea6253844e82c88c4 License: Apache 2.0 License File: crashpad/LICENSE Security Critical: yes
diff --git a/third_party/crashpad/crashpad/DEPS b/third_party/crashpad/crashpad/DEPS index 4b448d6..80c1aab 100644 --- a/third_party/crashpad/crashpad/DEPS +++ b/third_party/crashpad/crashpad/DEPS
@@ -47,7 +47,7 @@ '9719c1e1e676814c456b55f5f070eabad6709d31', 'crashpad/third_party/mini_chromium/mini_chromium': Var('chromium_git') + '/chromium/mini_chromium@' + - '450b101187b5311317dec2981303f60a3a0760fb', + '9e21183c1ea369398d6f6ddd302c8db580bd19c4', 'crashpad/third_party/libfuzzer/src': Var('chromium_git') + '/chromium/llvm-project/compiler-rt/lib/fuzzer.git@' + 'fda403cf93ecb8792cb1d061564d89a6553ca020',
diff --git a/third_party/crashpad/crashpad/client/crashpad_client_win.cc b/third_party/crashpad/crashpad/client/crashpad_client_win.cc index b444bbc..9b52fcd 100644 --- a/third_party/crashpad/crashpad/client/crashpad_client_win.cc +++ b/third_party/crashpad/crashpad/client/crashpad_client_win.cc
@@ -25,6 +25,7 @@ #include <string.h> #include <memory> +#include <string_view> #include "base/atomicops.h" #include "base/check_op.h" @@ -520,7 +521,7 @@ // invalid command line where the first argument needed by rundll32 is not in // the correct format as required in: // https://support.microsoft.com/en-ca/help/164787/info-windows-rundll-and-rundll32-interface - const base::WStringPiece kRunDll32Exe(L"rundll32.exe"); + const std::wstring_view kRunDll32Exe(L"rundll32.exe"); bool is_embedded_in_dll = false; if (data->handler.value().size() >= kRunDll32Exe.size() && _wcsicmp(data->handler.value()
diff --git a/third_party/crashpad/crashpad/snapshot/win/process_snapshot_win.cc b/third_party/crashpad/crashpad/snapshot/win/process_snapshot_win.cc index 9d599014..6c06165f 100644 --- a/third_party/crashpad/crashpad/snapshot/win/process_snapshot_win.cc +++ b/third_party/crashpad/crashpad/snapshot/win/process_snapshot_win.cc
@@ -19,6 +19,7 @@ #include <algorithm> #include <iterator> +#include <string_view> #include <utility> #include "base/logging.h" @@ -329,7 +330,7 @@ uet.SizeOfImage, uet.CheckSum, uet.TimeDateStamp, - base::WideToUTF8(base::WStringPiece( + base::WideToUTF8(std::wstring_view( uet.ImageName, wcsnlen(uet.ImageName, std::size(uet.ImageName)))))); }
diff --git a/third_party/crashpad/crashpad/util/misc/uuid.cc b/third_party/crashpad/crashpad/util/misc/uuid.cc index a3c33f4..1587070 100644 --- a/third_party/crashpad/crashpad/util/misc/uuid.cc +++ b/third_party/crashpad/crashpad/util/misc/uuid.cc
@@ -23,6 +23,7 @@ #include <stdio.h> #include <string.h> +#include <string_view> #include <type_traits> #include "base/rand_util.h" @@ -89,7 +90,7 @@ } #if BUILDFLAG(IS_WIN) -bool UUID::InitializeFromString(const base::WStringPiece& string) { +bool UUID::InitializeFromString(const std::wstring_view& string) { return InitializeFromString(base::WideToUTF8(string)); } #endif
diff --git a/third_party/crashpad/crashpad/util/misc/uuid.h b/third_party/crashpad/crashpad/util/misc/uuid.h index be005aaf..3e401ab 100644 --- a/third_party/crashpad/crashpad/util/misc/uuid.h +++ b/third_party/crashpad/crashpad/util/misc/uuid.h
@@ -18,6 +18,7 @@ #include <stdint.h> #include <string> +#include <string_view> #include "base/strings/string_piece.h" #include "build/build_config.h" @@ -64,7 +65,7 @@ //! parsed, with the object state untouched. bool InitializeFromString(const base::StringPiece& string); #if BUILDFLAG(IS_WIN) || DOXYGEN - bool InitializeFromString(const base::WStringPiece& string); + bool InitializeFromString(const std::wstring_view& string); #endif // BUILDFLAG(IS_WIN) //! \brief Initializes the %UUID using a standard system facility to generate
diff --git a/third_party/depot_tools b/third_party/depot_tools index e72395e..197399a 160000 --- a/third_party/depot_tools +++ b/third_party/depot_tools
@@ -1 +1 @@ -Subproject commit e72395e5f2b481bf91a444bc30c4dc732971ad78 +Subproject commit 197399a8acc768c60f2c7bce8726bb977929de81
diff --git a/third_party/instrumented_libraries/binaries/msan-chained-origins-focal.tgz.sha1 b/third_party/instrumented_libraries/binaries/msan-chained-origins-focal.tgz.sha1 index d6dc32f..9064aa1 100644 --- a/third_party/instrumented_libraries/binaries/msan-chained-origins-focal.tgz.sha1 +++ b/third_party/instrumented_libraries/binaries/msan-chained-origins-focal.tgz.sha1
@@ -1 +1 @@ -613ca7186114dd13a0a52500bf780dfa65062827 \ No newline at end of file +7d3c8d0964a152fc28aaaa84e8fea411e57cf87e \ No newline at end of file
diff --git a/third_party/instrumented_libraries/binaries/msan-no-origins-focal.tgz.sha1 b/third_party/instrumented_libraries/binaries/msan-no-origins-focal.tgz.sha1 index f77d7c1..e989fea 100644 --- a/third_party/instrumented_libraries/binaries/msan-no-origins-focal.tgz.sha1 +++ b/third_party/instrumented_libraries/binaries/msan-no-origins-focal.tgz.sha1
@@ -1 +1 @@ -1b213c0576d6539d7b3293cdb46d828815cd7fd4 \ No newline at end of file +1c1dc5a2f68921e58a8f5c531d6eed81373d9a82 \ No newline at end of file
diff --git a/third_party/libaom/cmake_update.sh b/third_party/libaom/cmake_update.sh index 5f1ca96..ef28be7 100755 --- a/third_party/libaom/cmake_update.sh +++ b/third_party/libaom/cmake_update.sh
@@ -21,9 +21,9 @@ # Toolchain for arm64: # - gcc-aarch64-linux-gnu # - g++-aarch64-linux-gnu -# 32bit build environment for cmake. Including but potentially not limited to: -# - lib32gcc-13-dev -# - lib32stdc++-13-dev +# Toolchain for x86: +# - gcc-i686-linux-gnu +# - g++-i686-linux-gnu # Alternatively: treat 32bit builds like Windows and manually tweak aom_config.h set -eE @@ -107,6 +107,9 @@ rm "${1}.bak" } +# Fetch the latest tags; used in creating aom_version.h. +git -C "${SRC}" fetch --tags + # Scope 'trap' error reporting to configuration generation. ( TMP=$(mktemp -d "${BASE}/build.XXXX") @@ -145,7 +148,8 @@ cp config/aom_version.h "${CFG}/config/" reset_dirs linux/ia32 -gen_config_files linux/ia32 "${toolchain}/x86-linux.cmake ${all_platforms} \ +gen_config_files linux/ia32 "${toolchain}/i686-linux-gcc.cmake \ + ${all_platforms} \ -DCONFIG_PIC=1 \ -DAOM_RTCD_FLAGS=--require-mmx;--require-sse;--require-sse2"
diff --git a/third_party/libaom/source/config/linux/ia32/config/aom_config.c b/third_party/libaom/source/config/linux/ia32/config/aom_config.c index 941ebf4..d2f32eda 100644 --- a/third_party/libaom/source/config/linux/ia32/config/aom_config.c +++ b/third_party/libaom/source/config/linux/ia32/config/aom_config.c
@@ -9,5 +9,5 @@ * PATENTS file, you can obtain it at www.aomedia.org/license/patent. */ #include "aom/aom_codec.h" -static const char* const cfg = "cmake ../source/libaom -G \"Unix Makefiles\" -DCMAKE_TOOLCHAIN_FILE=\"../source/libaom/build/cmake/toolchains/x86-linux.cmake\" -DAOM_RTCD_FLAGS=--require-mmx;--require-sse;--require-sse2 -DCONFIG_AV1_ENCODER=1 -DCONFIG_LIBYUV=0 -DCONFIG_AV1_HIGHBITDEPTH=0 -DCONFIG_AV1_TEMPORAL_DENOISING=1 -DCONFIG_PIC=1 -DCONFIG_REALTIME_ONLY=1 -DCONFIG_MAX_DECODE_PROFILE=0 -DCONFIG_NORMAL_TILE_MODE=1 -DCONFIG_SIZE_LIMIT=1 -DDECODE_HEIGHT_LIMIT=16384 -DDECODE_WIDTH_LIMIT=16384"; +static const char* const cfg = "cmake ../source/libaom -G \"Unix Makefiles\" -DCMAKE_TOOLCHAIN_FILE=\"../source/libaom/build/cmake/toolchains/i686-linux-gcc.cmake\" -DAOM_RTCD_FLAGS=--require-mmx;--require-sse;--require-sse2 -DCONFIG_AV1_ENCODER=1 -DCONFIG_LIBYUV=0 -DCONFIG_AV1_HIGHBITDEPTH=0 -DCONFIG_AV1_TEMPORAL_DENOISING=1 -DCONFIG_PIC=1 -DCONFIG_REALTIME_ONLY=1 -DCONFIG_MAX_DECODE_PROFILE=0 -DCONFIG_NORMAL_TILE_MODE=1 -DCONFIG_SIZE_LIMIT=1 -DDECODE_HEIGHT_LIMIT=16384 -DDECODE_WIDTH_LIMIT=16384"; const char *aom_codec_build_config(void) {return cfg;}
diff --git a/third_party/libaom/source/config/win/ia32/config/aom_config.c b/third_party/libaom/source/config/win/ia32/config/aom_config.c index 941ebf4..d2f32eda 100644 --- a/third_party/libaom/source/config/win/ia32/config/aom_config.c +++ b/third_party/libaom/source/config/win/ia32/config/aom_config.c
@@ -9,5 +9,5 @@ * PATENTS file, you can obtain it at www.aomedia.org/license/patent. */ #include "aom/aom_codec.h" -static const char* const cfg = "cmake ../source/libaom -G \"Unix Makefiles\" -DCMAKE_TOOLCHAIN_FILE=\"../source/libaom/build/cmake/toolchains/x86-linux.cmake\" -DAOM_RTCD_FLAGS=--require-mmx;--require-sse;--require-sse2 -DCONFIG_AV1_ENCODER=1 -DCONFIG_LIBYUV=0 -DCONFIG_AV1_HIGHBITDEPTH=0 -DCONFIG_AV1_TEMPORAL_DENOISING=1 -DCONFIG_PIC=1 -DCONFIG_REALTIME_ONLY=1 -DCONFIG_MAX_DECODE_PROFILE=0 -DCONFIG_NORMAL_TILE_MODE=1 -DCONFIG_SIZE_LIMIT=1 -DDECODE_HEIGHT_LIMIT=16384 -DDECODE_WIDTH_LIMIT=16384"; +static const char* const cfg = "cmake ../source/libaom -G \"Unix Makefiles\" -DCMAKE_TOOLCHAIN_FILE=\"../source/libaom/build/cmake/toolchains/i686-linux-gcc.cmake\" -DAOM_RTCD_FLAGS=--require-mmx;--require-sse;--require-sse2 -DCONFIG_AV1_ENCODER=1 -DCONFIG_LIBYUV=0 -DCONFIG_AV1_HIGHBITDEPTH=0 -DCONFIG_AV1_TEMPORAL_DENOISING=1 -DCONFIG_PIC=1 -DCONFIG_REALTIME_ONLY=1 -DCONFIG_MAX_DECODE_PROFILE=0 -DCONFIG_NORMAL_TILE_MODE=1 -DCONFIG_SIZE_LIMIT=1 -DDECODE_HEIGHT_LIMIT=16384 -DDECODE_WIDTH_LIMIT=16384"; const char *aom_codec_build_config(void) {return cfg;}
diff --git a/third_party/perfetto b/third_party/perfetto index 7e1ff25..eb35cbb6 160000 --- a/third_party/perfetto +++ b/third_party/perfetto
@@ -1 +1 @@ -Subproject commit 7e1ff250095383dbac1d56a8ed4f9e3c04e5dccd +Subproject commit eb35cbb649ff1783255dc348e2340bbd9b58f687
diff --git a/third_party/re2/src b/third_party/re2/src index 24d460a..974f44c 160000 --- a/third_party/re2/src +++ b/third_party/re2/src
@@ -1 +1 @@ -Subproject commit 24d460a9db6048b9d3e05cfdea13ec9d592545ad +Subproject commit 974f44c8d45242e710dc0a85a4defffdb3ce07fc
diff --git a/third_party/skia b/third_party/skia index 51b8c1c..0931110 160000 --- a/third_party/skia +++ b/third_party/skia
@@ -1 +1 @@ -Subproject commit 51b8c1cc715ab028802bbb739add0927235cf461 +Subproject commit 09311101b293b69c38395ecdaf93ced73a0e1256
diff --git a/third_party/vulkan-deps b/third_party/vulkan-deps index 04fa2390..e55b4f7 160000 --- a/third_party/vulkan-deps +++ b/third_party/vulkan-deps
@@ -1 +1 @@ -Subproject commit 04fa239099325005373f80c850175c958b01bdae +Subproject commit e55b4f78bcf354ebb7d6a4d48d4bd33713f3daba
diff --git a/third_party/webrtc b/third_party/webrtc index ad9c477..8ed4b4d 160000 --- a/third_party/webrtc +++ b/third_party/webrtc
@@ -1 +1 @@ -Subproject commit ad9c4773f46a829945aa4a62d7621543ae0e7242 +Subproject commit 8ed4b4d314a2dbd80fb83007b25e6e3c60d98330
diff --git a/tools/clang/rewrite_raw_ptr_fields/tests/affected-expr-expected.cc b/tools/clang/rewrite_raw_ptr_fields/tests/affected-expr-expected.cc index 83cf79c1..ed66886 100644 --- a/tools/clang/rewrite_raw_ptr_fields/tests/affected-expr-expected.cc +++ b/tools/clang/rewrite_raw_ptr_fields/tests/affected-expr-expected.cc
@@ -444,7 +444,7 @@ namespace implicit_constructors { -// Based on //base/strings/string_piece_forward.h: +// Based on //base/strings/string_piece.h: template <typename CharT> class BasicStringPiece; typedef BasicStringPiece<char> StringPiece; @@ -487,7 +487,7 @@ namespace implicit_constructors_raw_ref_tests { -// Based on //base/strings/string_piece_forward.h: +// Based on //base/strings/string_piece.h: template <typename CharT> class BasicStringPiece; typedef BasicStringPiece<char> StringPiece;
diff --git a/tools/clang/rewrite_raw_ptr_fields/tests/affected-expr-original.cc b/tools/clang/rewrite_raw_ptr_fields/tests/affected-expr-original.cc index 62f3e11..482e800fd 100644 --- a/tools/clang/rewrite_raw_ptr_fields/tests/affected-expr-original.cc +++ b/tools/clang/rewrite_raw_ptr_fields/tests/affected-expr-original.cc
@@ -441,7 +441,7 @@ namespace implicit_constructors { -// Based on //base/strings/string_piece_forward.h: +// Based on //base/strings/string_piece.h: template <typename CharT> class BasicStringPiece; typedef BasicStringPiece<char> StringPiece; @@ -484,7 +484,7 @@ namespace implicit_constructors_raw_ref_tests { -// Based on //base/strings/string_piece_forward.h: +// Based on //base/strings/string_piece.h: template <typename CharT> class BasicStringPiece; typedef BasicStringPiece<char> StringPiece;
diff --git a/tools/json_schema_compiler/manifest_parse_util.h b/tools/json_schema_compiler/manifest_parse_util.h index 7001614..29eb62f 100644 --- a/tools/json_schema_compiler/manifest_parse_util.h +++ b/tools/json_schema_compiler/manifest_parse_util.h
@@ -10,7 +10,6 @@ #include "base/check.h" #include "base/strings/string_piece.h" -#include "base/strings/string_piece_forward.h" #include "base/values.h" #include "tools/json_schema_compiler/util.h"
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml index 555270f..a8b843d 100644 --- a/tools/metrics/histograms/enums.xml +++ b/tools/metrics/histograms/enums.xml
@@ -1201,12 +1201,6 @@ <int value="8" label="With signed in, no match"/> </enum> -<enum name="AccountWaaStatusForCommerce"> - <int value="0" label="Account signed out"/> - <int value="1" label="Account signed in, WAA disabled"/> - <int value="2" label="Account signed in, WAA enabled"/> -</enum> - <enum name="AccuracyTipInteraction"> <obsolete> Deprecated as of 12/2022. @@ -1596,18 +1590,6 @@ <int value="1" label="kPreconnect"/> </enum> -<enum name="Android.Download.Rename.Dialog.Action"> - <obsolete> - Removed in April 2023. - </obsolete> - <int value="0" label="RenameDialogConfirm"/> - <int value="1" label="RenameDialogCancel"/> - <int value="2" label="RenameDialogOther"/> - <int value="3" label="RenameExtensionDialogConfirm"/> - <int value="4" label="RenameExtensionDialogCancel"/> - <int value="5" label="RenameExtensionDialogOther"/> -</enum> - <enum name="Android.MemoryPressureNotification"> <int value="0" label="Unknown onTrimMemory() level"/> <int value="1" label="TRIM_MEMORY_COMPLETE"/> @@ -1910,18 +1892,6 @@ <int value="4" label="Chrome Image"/> </enum> -<enum name="AndroidUtilsMimeTypes"> - <summary> - A set of common MIME types resolved by Android MimeTypeUtils. - </summary> - <int value="0" label="Unknown"/> - <int value="1" label="Text"/> - <int value="2" label="Image"/> - <int value="3" label="Audio"/> - <int value="4" label="Video"/> - <int value="5" label="Pdf"/> -</enum> - <enum name="AndroidWebViewCrashCollectionState"> <int value="0" label="ENABLED_BY_COMMANDLINE"> Enabled by commandline. This doesn't check later cases (ex. user consent). @@ -2693,19 +2663,6 @@ <!-- These values must be in sync with ProvisionConstants in CloudDPC code --> -<enum name="ArcTosScreenUserActions"> - <summary>Actions which happen on the ARC ToS screen.</summary> - <int value="0" label="Accept button clicked"/> - <int value="1" label="Next button clicked"/> - <int value="2" label="Retry button clicked"/> - <int value="3" label="Back button clicked"/> - <int value="4" label="Learn more about usage stats button clicked"/> - <int value="5" label="Learn more about backup button clicked"/> - <int value="6" label="Learn more about location services button clicked"/> - <int value="7" label="Learn more about play auto install button clicked"/> - <int value="8" label="Privacy policy button clicked"/> -</enum> - <enum name="ArmCpuPart"> <summary> Defines a subset of ARM CPU (implementer, part-number) pairs composed as a @@ -2859,12 +2816,6 @@ <int value="12" label="kOverviewMode"/> </enum> -<enum name="AssistantGestureType"> - <int value="0" label="Not recognized"/> - <int value="1" label="Horizontal stroke"/> - <int value="2" label="Closed shape"/> -</enum> - <enum name="AssistantInteractionResolution"> <int value="0" label="kNormal"/> <int value="1" label="kInterruption"/> @@ -3463,25 +3414,6 @@ <int value="4" label="NotShown, invalid legal message"/> </enum> -<enum name="AutofillCreditCardMessage"> - <obsolete> - Deprecated 10/2022. Will not launch save card Message UI. - </obsolete> - <int value="0" label="Shown"/> - <int value="1" label="Accepted"/> - <int value="2" label="Denied"/> - <int value="3" label="Ignored"/> -</enum> - -<enum name="AutofillCreditCardMessageDialogPrompt"> - <obsolete> - Deprecated 10/2022. Will not launch save card Message UI. - </obsolete> - <int value="0" label="Accepted"/> - <int value="1" label="Denied"/> - <int value="2" label="Ignored"/> -</enum> - <enum name="AutofillCreditCardOfferSelection"> <int value="0" label="Selected card without offer"/> <int value="1" label="Selected card with offer"/> @@ -3537,12 +3469,6 @@ <int value="1" label="CVC followed by WebAuthn"/> </enum> -<enum name="AutofillCreditCardUploadFeedback"> - <int value="0" label="Loading indicator shown"/> - <int value="1" label="Failure icon shown"/> - <int value="2" label="Failure bubble shown"/> -</enum> - <enum name="AutofillCreditCardUserPerceivedLatencyFollowUp"> <int value="0" label="User-perceived latency followed by WebAuthn"/> <int value="1" label="User-perceived latency followed by CVC fallback"/> @@ -4452,14 +4378,6 @@ <int value="2" label="Manage cards button pressed"/> </enum> -<enum name="AutofillMigrateUserOptedInToWalletSync"> - <int value="0" label="Not migrated"/> - <int value="1" label="Migrated from canonical email"/> - <int value="2" label="Migrated from non canonical email"/> - <int value="3" - label="Not migrated (Unexpected primary account id with email format)."/> -</enum> - <enum name="AutofillOfferNotificationBubbleResult"> <int value="0" label="User closed bubble via OK button"/> <int value="1" label="User closed bubble via corner X"/> @@ -6387,12 +6305,6 @@ <int value="3" label="Expiration date did not match, masked server card"/> </enum> -<enum name="AutofillSuggestionClick"> - <int value="0" label="Accepted click, without prior ignored click"/> - <int value="1" label="Ignored click"/> - <int value="2" label="Accepted click, followed an ignored click"/> -</enum> - <enum name="AutofillSuggestionManageType"> <int value="0" label="Other"/> <int value="1" label="Personal Information"/> @@ -7106,22 +7018,23 @@ <int value="2" label="(02) AR_DELEGATE"/> <int value="3" label="(03) SCENE_OVERLAY"/> <int value="4" label="(06) START_SURFACE (with tab switcher if enabled)"/> - <int value="5" label="(09) SELECTION_POPUP"/> - <int value="6" label="(10) MANUAL_FILLING"/> - <int value="7" label="(08) FULLSCREEN"/> + <int value="5" label="(10) SELECTION_POPUP"/> + <int value="6" label="(11) MANUAL_FILLING"/> + <int value="7" label="(09) FULLSCREEN"/> <int value="8" label="(04) BOTTOM_SHEET"/> - <int value="9" label="(12) TAB_MODAL_HANDLER"/> - <int value="10" label="(07) TAB_SWITCHER (if Start surface is disabled)"/> - <int value="11" label="(13) CLOSE_WATCHER"/> - <int value="12" label="(16) TAB_HISTORY (and bottom controls)"/> - <int value="13" label="(17) TAB_RETURN_TO_CHROME_START_SURFACE"/> - <int value="14" label="(18) SHOW_READING_LIST"/> - <int value="15" label="(19) MINIMIZE_APP_AND_CLOSE_TAB"/> - <int value="16" label="(14) FIND_TOOLBAR"/> - <int value="17" label="(11) LOCATION_BAR"/> + <int value="9" label="(13) TAB_MODAL_HANDLER"/> + <int value="10" label="(08) TAB_SWITCHER (if Start surface is disabled)"/> + <int value="11" label="(14) CLOSE_WATCHER"/> + <int value="12" label="(17) TAB_HISTORY (and bottom controls)"/> + <int value="13" label="(18) TAB_RETURN_TO_CHROME_START_SURFACE"/> + <int value="14" label="(19) SHOW_READING_LIST"/> + <int value="15" label="(20) MINIMIZE_APP_AND_CLOSE_TAB"/> + <int value="16" label="(15) FIND_TOOLBAR"/> + <int value="17" label="(12) LOCATION_BAR"/> <int value="18" label="(02) XR_DELEGATE"/> <int value="19" label="(05) PAGE_INSIGHTS_BOTTOM_SHEET"/> - <int value="20" label="(15) BOTTOM_CONTROLS"/> + <int value="20" label="(16) BOTTOM_CONTROLS"/> + <int value="21" label="(07) HUB"/> </enum> <enum name="BadMessageReasonAutofill"> @@ -8000,11 +7913,6 @@ <int value="1" label="Consistent"/> </enum> -<enum name="BooleanContained"> - <int value="0" label="Not contained"/> - <int value="1" label="Contained"/> -</enum> - <enum name="BooleanContainsPrice"> <int value="0" label="Does not contain price"/> <int value="1" label="Contains price"/> @@ -8065,11 +7973,6 @@ <int value="1" label="Detected"/> </enum> -<enum name="BooleanDidScalePage"> - <int value="0" label="User did not change scale"/> - <int value="1" label="User did change scale"/> -</enum> - <enum name="BooleanDirection"> <int value="0" label="Predicted direction was the same as real trajectory"/> <int value="1" @@ -8469,11 +8372,6 @@ <int value="1" label="Reset"/> </enum> -<enum name="BooleanReused"> - <int value="0" label="Not Reused"/> - <int value="1" label="Reused"/> -</enum> - <enum name="BooleanRevoked"> <int value="0" label="Not revoked"/> <int value="1" label="Revoked"/> @@ -10390,6 +10288,7 @@ <int value="7" label="User selected the Tab Search Media Tabs lab"/> <int value="8" label="User selected the Chrome Refresh lab"/> <int value="9" label="User selected the Tab Groups Save lab"/> + <int value="10" label="User selected the Chrome WebUI Refresh lab"/> </enum> <enum name="ChromeOSBiosType"> @@ -11265,13 +11164,6 @@ <int value="3" label="Missing"/> </enum> -<enum name="CommerceSubscriptionValidationResult"> - <int value="0" label="No fixes needed"/> - <int value="1" label="Bookmarks were fixed"/> - <int value="2" label="Subscriptions were fixed"/> - <int value="3" label="Bookmarks and Subscriptions were fixed"/> -</enum> - <enum name="CommittedRequestedWithHeaderMode"> <int value="0" label="No header set"/> <int value="1" label="App package name"/> @@ -11939,128 +11831,6 @@ <int value="2" label="Intelligent, not counted"/> </enum> -<enum name="ContextualSearchEnterClosedStateChange"> - <obsolete> - Removed as of 05/2022 - </obsolete> - <int value="0" label="From Other"/> - <int value="1" label="From Peeked (back press)"/> - <int value="2" label="From Peeked (base page scroll)"/> - <int value="3" label="From Peeked (text select tap)"/> - <int value="4" label="From Expanded (back press)"/> - <int value="5" label="From Expanded (base page tap)"/> - <int value="6" label="From Expanded (fling)"/> - <int value="7" label="From Maximized (back press)"/> - <int value="8" label="From Maximized (fling)"/> - <int value="9" label="From Maximized (tab promotion)"/> - <int value="10" label="From Maximized (SERP navigation)"/> -</enum> - -<enum name="ContextualSearchEnterExpandedStateChange"> - <obsolete> - Removed as of 05/2022 - </obsolete> - <int value="0" label="From Other"/> - <int value="1" label="From Peeked (search bar tap)"/> - <int value="2" label="From Peeked (swipe)"/> - <int value="3" label="From Peeked (fling)"/> - <int value="4" label="From Maximized (swipe)"/> - <int value="5" label="From Maximized (fling)"/> -</enum> - -<enum name="ContextualSearchEnterMaximizedStateChange"> - <obsolete> - Removed as of 05/2022 - </obsolete> - <int value="0" label="Other"/> - <int value="1" label="From Peeked (swipe)"/> - <int value="2" label="From Peeked (fling)"/> - <int value="3" label="From Expanded (swipe)"/> - <int value="4" label="From Expanded (fling)"/> - <int value="5" label="From Expanded (SERP navigation)"/> -</enum> - -<enum name="ContextualSearchEnterPeekedStateChange"> - <obsolete> - Removed as of 05/2022 - </obsolete> - <int value="0" label="From Other"/> - <int value="1" label="From Closed (text select tap)"/> - <int value="2" label="From Closed (text select long press)"/> - <int value="3" label="From Peeked (text select tap)"/> - <int value="4" label="From Peeked (text select long press)"/> - <int value="5" label="From Expanded (search bar tap)"/> - <int value="6" label="From Expanded (swipe)"/> - <int value="7" label="From Expanded (fling)"/> - <int value="8" label="From Maximized (swipe)"/> - <int value="9" label="From Maximized (fling)"/> -</enum> - -<enum name="ContextualSearchExitClosedStateChange"> - <obsolete> - Removed as of 05/2022 - </obsolete> - <int value="0" label="Other"/> - <int value="1" label="Peek (text select tap)"/> - <int value="2" label="Peek (text select long press)"/> -</enum> - -<enum name="ContextualSearchExitExpandedStateChange"> - <obsolete> - Removed as of 05/2022 - </obsolete> - <int value="0" label="Other"/> - <int value="1" label="Close (back press)"/> - <int value="2" label="Close (base page tap)"/> - <int value="3" label="Close (fling)"/> - <int value="4" label="Peek (search bar tap)"/> - <int value="5" label="Peek (swipe)"/> - <int value="6" label="Peek (fling)"/> - <int value="7" label="Maximize (swipe)"/> - <int value="8" label="Maximize (fling)"/> - <int value="9" label="Maximize (SERP navigation)"/> -</enum> - -<enum name="ContextualSearchExitMaximizedStateChange"> - <obsolete> - Removed as of 05/2022 - </obsolete> - <int value="0" label="Other"/> - <int value="1" label="Close (back press)"/> - <int value="2" label="Close (fling)"/> - <int value="3" label="Close (tab promotion)"/> - <int value="4" label="Close (SERP navigation)"/> - <int value="5" label="Peek (swipe)"/> - <int value="6" label="Peek (fling)"/> - <int value="7" label="Expand (swipe)"/> - <int value="8" label="Expand (fling)"/> -</enum> - -<enum name="ContextualSearchExitPeekedStateChange"> - <obsolete> - Removed as of 05/2022 - </obsolete> - <int value="0" label="Other"/> - <int value="1" label="Close (back press)"/> - <int value="2" label="Close (base page scroll)"/> - <int value="3" label="Close (text select tap)"/> - <int value="4" label="Peek (text select tap)"/> - <int value="5" label="Peek (text select long press)"/> - <int value="6" label="Expand (search bar tap)"/> - <int value="7" label="Expand (swipe)"/> - <int value="8" label="Expand (fling)"/> - <int value="9" label="Maximize (swipe)"/> - <int value="10" label="To Maximize (fling)"/> -</enum> - -<enum name="ContextualSearchFirstRunPanelSeen"> - <obsolete> - Removed as of 06/2022 - </obsolete> - <int value="0" label="Seen"/> - <int value="1" label="Unseen"/> -</enum> - <enum name="ContextualSearchGestureIsTap"> <int value="0" label="Longpress"/> <int value="1" label="Tap"/> @@ -12095,31 +11865,11 @@ <int value="2" label="Multiple matching apps"/> </enum> -<enum name="ContextualSearchQuickAnswerSeen"> - <obsolete> - Removed as of 05/2022 - </obsolete> - <int value="0" label="Activated, answered and seen"/> - <int value="1" label="Activated and answered but not seen"/> - <int value="2" label="Activated, not answered but seen"/> - <int value="3" label="Activated, not answered nor seen"/> - <int value="4" label="Not activated but seen"/> - <int value="5" label="Not activated nor seen"/> -</enum> - <enum name="ContextualSearchResultsSeen"> <int value="0" label="Seen"/> <int value="1" label="Unseen"/> </enum> -<enum name="ContextualSearchSearchRequestStatus"> - <obsolete> - Removed as of 06/2022 - </obsolete> - <int value="0" label="Not Failed"/> - <int value="1" label="Failed"/> -</enum> - <enum name="ContextualSearchSeenByGesture"> <int value="0" label="Seen, from Tap"/> <int value="1" label="Not seen, from Tap"/> @@ -12127,29 +11877,6 @@ <int value="3" label="Not seen, from Long-press"/> </enum> -<enum name="ContextualSearchSelectionValid"> - <obsolete> - Removed as of 06/2022 - </obsolete> - <int value="0" label="Valid"/> - <int value="1" label="Invalid"/> -</enum> - -<enum name="ContextualSearchSuppressionResultsSeen"> - <obsolete> - Removed as of 06/2022 - </obsolete> - <int value="0" label="Seen, heuristic satisfied"/> - <int value="1" label="Not seen, heuristic satisfied"/> - <int value="2" label="Seen, heuristic not satisfied"/> - <int value="3" label="Not seen, heuristic not satisfied"/> -</enum> - -<enum name="ContextualSearchTapSuppression"> - <int value="0" label="Tap suppressed"/> - <int value="1" label="Tap not suppressed"/> -</enum> - <enum name="ConversionAndroidRegistrationResult"> <int value="0" label="Success"/> <int value="1" label="Unknown error"/> @@ -12681,11 +12408,6 @@ <int value="3" label="Both 32-bit and 64-bit"/> </enum> -<enum name="CpuAffinityMode"> - <int value="0" label="kDefault"/> - <int value="1" label="kLittleCoresOnly"/> -</enum> - <enum name="CpuTimeMetricsThreadType"> <summary>Thread types used for CPU time metric breakdowns.</summary> <int value="0" label="UnattributedThread"> @@ -14912,16 +14634,6 @@ <int value="4" label="Google network TTS"/> </enum> -<enum name="CrosSettingsOsBannerInteraction"> - <obsolete> - Removed as of 07/2022 (crbug.com/1231142). - </obsolete> - <int value="0" label="Not shown"/> - <int value="1" label="Shown"/> - <int value="2" label="Clicked"/> - <int value="3" label="Closed"/> -</enum> - <enum name="CrossOriginAdStatus"> <int value="0" label="Ad Origin indeterminable"/> <int value="1" label="Main Frame Origin same as Ad"/> @@ -17138,47 +16850,12 @@ <int value="2" label="Dark"/> </enum> -<enum name="DarkThemeEnabledReason"> - <int value="0" label="User preference is set to force dark theme."/> - <int value="1" label="Power save mode is on."/> - <int value="2" label="Other."/> -</enum> - -<enum name="DarkThemePreferences"> - <int value="0" label="System default"/> - <int value="1" label="Light theme"/> - <int value="2" label="Dark theme"/> -</enum> - <enum name="DataFetchEventSource"> <int value="0" label="PostLoginFullRestore"/> <int value="1" label="Overview"/> <int value="2" label="Calendar"/> </enum> -<enum name="DataReductionProxyEnabledState"> - <int value="0" label="Off-to-On"/> - <int value="1" label="On-to-Off"/> -</enum> - -<enum name="DataReductionProxyProxyPrefMigrationResult"> - <int value="0" label="Proxy pref not cleared"/> - <int value="1" label="Empty proxy pref was cleared"/> - <int value="2" label="System proxy pref was cleared"/> - <int value="3" label="Proxy pref containing a DRP was cleared"/> - <int value="4" - label="Proxy pref containing a *.googlezip.net proxy was cleared"/> - <int value="5" - label="Proxy pref of an embedded PAC script containing a - *.googlezip.net proxy was cleared"/> -</enum> - -<enum name="DataReductionProxyStartupState"> - <int value="0" label="Proxy not available"/> - <int value="1" label="Proxy available but not enabled"/> - <int value="2" label="Proxy available and enabled"/> -</enum> - <enum name="DataUseContentType"> <int value="0" label="Other"/> <int value="1" label="Mainframe HTML"/> @@ -17195,21 +16872,6 @@ <int value="12" label="Video - Tab in foreground"/> </enum> -<enum name="DataUsePageTransition"> - <summary>PageTransitions in ui/base/page_transition_types.h.</summary> - <int value="0" label="LINK"/> - <int value="1" label="TYPED"/> - <int value="2" label="AUTO_BOOKMARK"/> - <int value="3" label="SUBFRAME"/> - <int value="4" label="GENERATED"/> - <int value="5" label="AUTO_TOPLEVEL"/> - <int value="6" label="FORM_SUBMIT"/> - <int value="7" label="RELOAD"/> - <int value="8" label="KEYWORD"/> - <int value="9" label="FORWARD_BACK"/> - <int value="10" label="HOME_PAGE"/> -</enum> - <enum name="DayOfWeek"> <int value="0" label="Sunday"/> <int value="1" label="Monday"/> @@ -17564,20 +17226,6 @@ <int value="1" label="New key accelerator is used"/> </enum> -<enum name="DeprecatedWindowSnapActionSource"> - <int value="0" label="Drag window to screen edge to snap"/> - <int value="1" label="Use window caption button to snap"/> - <int value="2" label="Use keyboard shortcut to snap"/> - <int value="3" label="Drag or select overview window to snap"/> - <int value="4" label="Long press overview button to snap"/> - <int value="5" label="Drag up from shelf to snap"/> - <int value="6" label="Drag down from top to snap"/> - <int value="7" label="Drag a tab to snap"/> - <int value="8" label="Auto snapped by splitview"/> - <int value="9" label="Window is snapped from window state restore"/> - <int value="10" label="Other ways to snap a window"/> -</enum> - <enum name="DescFailureReason"> <summary> The reason for the failure of a request made to the image annotation service @@ -18855,16 +18503,6 @@ <int value="1" label="Classic Script"/> </enum> -<enum name="DexFixerReason"> - <int value="0" label="Os.stat() failed"/> - <int value="1" label="Runtime.exec() failed"/> - <int value="2" label="Dexopt not needed"/> - <int value="5" label="Preemptive Dexopt after app updated"/> - <int value="6" label="DexFile.isDexOptNeeded() returned true"/> - <int value="7" label="DexFile.isDexOptNeeded() threw"/> - <int value="8" label="Dex files not world-readable"/> -</enum> - <enum name="DiagnosticsRecoveryRun"> <int value="0" label="Recovery not run"/> <int value="1" label="Recovery run because of crash"/> @@ -19633,15 +19271,6 @@ <int value="4" label="FAILURE_REASON_FILE_MONITOR"/> </enum> -<enum name="Download.Shelf.DragEvent"> - <obsolete> - Deprecated 2022-06-06 - </obsolete> - <int value="0" label="Started"/> - <int value="1" label="Canceled"/> - <int value="2" label="Dropped"/> -</enum> - <enum name="DownloadAddWarningActionEventOutcome"> <int value="0" label="NOT_ADDED_MISSING_DOWNLOAD"/> <int value="1" label="NOT_ADDED_WARNING_SHOWN_ALREADY_LOGGED"/> @@ -23731,16 +23360,6 @@ <int value="4" label="Programmatic API Call"/> </enum> -<enum name="ExtensionActionSetIconFailureType"> - <obsolete> - Code removed 2022/12. - </obsolete> - <int value="0" label="Failed to parse function details"/> - <int value="1" label="Failed to decode image canvas string"/> - <int value="2" label="Failed to unpickle image canvas"/> - <int value="3" label="Arguments provided neither image data nor icon index"/> -</enum> - <enum name="ExtensionAllowlistOmahaAttributeValue"> <int value="0" label="Undefined"/> <int value="1" label="Allowlisted"/> @@ -27113,15 +26732,6 @@ <int value="4" label="Failed"/> </enum> -<enum name="FcmTokenRevocation"> - <obsolete> - Removed 2023/01 with the removal of the relevant histogram. - </obsolete> - <int value="0" label="Reset grace period"/> - <int value="1" label="Revoke permission"/> - <int value="2" label="Grace period is not over"/> -</enum> - <enum name="FeatureManagementScopeLevel"> <int value="0" label="Regular">Device is a regular Chromebook.</int> <int value="1" label="Soft Braned"> @@ -32695,32 +32305,6 @@ <int value="1" label="Commit"/> </enum> -<enum name="FetchFontName"> - <obsolete> - Removed 09/2022. No longer needed. - </obsolete> - <int value="0" label="Other"/> - <int value="1" label="Google Sans Regular"/> - <int value="2" label="Google Sans Medium"/> - <int value="3" label="Google Sans Bold"/> - <int value="4" label="Noto Color Emoji Compat"/> -</enum> - -<enum name="FetchFontResult"> - <obsolete> - Removed 09/2022. No longer needed. - </obsolete> - <int value="0" label="Success"/> - <int value="1" label="Failed due to unexpected font name"/> - <int value="2" label="Failed with non-OK status code on result"/> - <int value="3" label="Failed with non-unique number of font results"/> - <int value="4" label="Failed with non-OK result code on font info"/> - <int value="5" label="Failed to open font file"/> - <int value="6" label="Failed with an exception"/> - <int value="7" label="Skipped to avoid retrying previous failure"/> - <int value="8" label="Font file descriptor was cached"/> -</enum> - <enum name="FetchKeepAliveBrowserMetricType"> <int value="0" label="kLoadingSuceeded: Fetch keepalive request has succeeded toloaded"> @@ -32991,12 +32575,6 @@ <int value="4" label="OPEN_MEDIA_DEVICE_IMPORT"/> </enum> -<enum name="FileManagerPrefsMigrationStatus"> - <int value="0" label="Success"/> - <int value="1" label="Fail to get existing preferences"/> - <int value="2" label="Fail to migrate preferences"/> -</enum> - <enum name="FileManagerQuickViewWayToOpen"> <int value="0" label="Context menu"/> <int value="1" label="Space key"/> @@ -33494,12 +33072,6 @@ <int value="2" label="YV12 format with Native Pixmaps"/> </enum> -<enum name="FormDataEquality"> - <int value="0" label="Shallow comparison is enough to find difference"/> - <int value="1" label="Deep comparison is needed to find difference"/> - <int value="2" label="Equal forms"/> -</enum> - <enum name="FormInputAccessoryAction"> <int value="0" label="PreviousElement"/> <int value="1" label="NextElement"/> @@ -35412,14 +34984,6 @@ </int> </enum> -<enum name="HistoryClustersSurvey"> - <summary> - Logs which HaTS survey was requested by the History Clusters UI code. - </summary> - <int value="0" label="HistoryEntrypointSurveyRequested"/> - <int value="1" label="OmniboxEntrypointSurveyRequested"/> -</enum> - <enum name="HistoryInitStep"> <int value="0" label="Open"/> <int value="1" label="Transaction begin"/> @@ -37784,18 +37348,6 @@ <int value="7" label="Unknown error"/> </enum> -<enum name="InstantTethering_BluetoothAdvertisementResult"> - <int value="0" label="Success"/> - <int value="1" label="Error: Unsupported platform"/> - <int value="2" label="Error: Advertisement already exists"/> - <int value="3" label="Error: Advertisement does not exist"/> - <int value="4" label="Error: Advertisement invalid length"/> - <int value="5" label="Error: Invalid advertisement interval"/> - <int value="6" label="Error: Reset advertising"/> - <int value="7" label="Invalid advertisement error code"/> - <int value="8" label="Unknown result"/> -</enum> - <enum name="InstantTethering_ConnectionToHostResult_Failure"> <int value="0" label="Unknown error"/> <int value="1" label="Tethering timed out"/> @@ -45658,6 +45210,7 @@ <int value="-371321069" label="SyncPromoAfterSigninIntercept:enabled"/> <int value="-371103035" label="OmniboxTouchDownTriggerForPrefetch:enabled"/> <int value="-370876369" label="ContextualSearchLiteralTapSearch:enabled"/> + <int value="-370229772" label="RefreshFeedOnRestart:enabled"/> <int value="-369565225" label="SkipServiceWorkerCheckInstallOnly:disabled"/> <int value="-369150124" label="SendTabToSelfV2:enabled"/> <int value="-368106169" @@ -47221,6 +46774,8 @@ <int value="369301993" label="PrinterStatus:enabled"/> <int value="369352033" label="GenericSensorExtraClasses:enabled"/> <int value="369635818" label="PasswordExport:enabled"/> + <int value="370045248" + label="SafeBrowsingNewGmsApiForBrowseUrlDatabaseCheck:disabled"/> <int value="370486304" label="enable-origin-chip-on-srp"/> <int value="370926002" label="FirmwareUpdateUIV2:enabled"/> <int value="371268743" label="OmniboxUIExperimentVerticalMargin:disabled"/> @@ -49635,6 +49190,7 @@ <int value="1552753678" label="DnsHttpssvc:disabled"/> <int value="1553017633" label="OmniboxHeaderPaddingUpdate:disabled"/> <int value="1553310752" label="AccessibilityCursorColor:enabled"/> + <int value="1553417445" label="RefreshFeedOnRestart:disabled"/> <int value="1553422694" label="EnablePalmOnMaxTouchMajor:enabled"/> <int value="1553430984" label="Projector:enabled"/> <int value="1553667664" label="CoralFeature:enabled"/> @@ -50423,6 +49979,8 @@ <int value="1913298816" label="OverlayScrollbar:enabled"/> <int value="1913926782" label="ChromeModernAlternateCardLayout:disabled"/> <int value="1914131031" label="AndroidSurfaceControlMagnifier:enabled"/> + <int value="1914175495" + label="SafeBrowsingNewGmsApiForBrowseUrlDatabaseCheck:enabled"/> <int value="1914347357" label="AutofillEnableVirtualCard:disabled"/> <int value="1915028326" label="BuiltInModuleKvStorage:disabled"/> <int value="1915178511" label="disable-blink-features"/> @@ -52316,12 +51874,6 @@ <int value="4" label="Conflicting name resolution"/> </enum> -<enum name="MediaCommand"> - <int value="0" label="Resume"/> - <int value="1" label="Pause"/> - <int value="2" label="Seek"/> -</enum> - <enum name="MediaEncryptionType"> <int value="0" label="None"/> <int value="1" label="Clear"/> @@ -53434,18 +52986,6 @@ <int value="5" label="Accelerator"/> </enum> -<enum name="NaClAppTypeEnum"> - <obsolete> - Deprecated in favor of NaClEmbedderTypeEnum. - </obsolete> - <int value="0" label="PNaCl Open Web"/> - <int value="1" label="PNaCl Hosted App"/> - <int value="2" label="PNaCl Packaged App"/> - <int value="3" label="NaCl Open Web"/> - <int value="4" label="NaCl Hosted App"/> - <int value="5" label="NaCl Packaged App"/> -</enum> - <enum name="NaClEmbedderTypeEnum"> <int value="0" label="PNaCl Open Web"/> <int value="1" label="PNaCl Hosted App"/> @@ -55713,19 +55253,6 @@ <int value="1395980614" label="underwater">Seascapes</int> </enum> -<enum name="NTPCustomizeAction"> - <obsolete> - Removed 2022-10. - </obsolete> - <int value="0" label="'Chrome backgrounds' menu item clicked."/> - <int value="1" label="'Upload an image' menu item clicked."/> - <int value="2" label="'Restore default background' menu item clicked."/> - <int value="3" label="Attribution link on a customized background clicked."/> - <int value="4" label="'Add shortcut' link clicked."/> - <int value="5" label="'Edit shortcut' link clicked."/> - <int value="6" label="'Restore default shortcuts' menu item clicked."/> -</enum> - <enum name="NTPCustomizeChromeBackgroundAction"> <int value="0" label="Collection selected in the 'Chrome backgrounds' dialog."/> @@ -56905,31 +56432,6 @@ label="Missing glyph path, but a fallback was found (deprecated)"/> </enum> -<enum name="OpaqueResponseBlocking_ResponseHeadersHeuristic"> - <summary> - Initial decision taken by Opaque Response Blocking (ORB, see also - https://github.com/annevk/orb) based on just the response headers. - </summary> - <int value="0" label="NonOpaqueResponse"> - ORB only applies to opaque respones - the NonOpaqueResponse value covers: - mode != no-cors (e.g. mode=navigate or mode=cors) and browser-initiated - requests. - </int> - <int value="1" label="ProcessedBasedOnHeaders"> - ORB algorithm is *surely* able to make a decision based on the response - headers. The ProcessedBasedOnHeaders enum value covers all subresource - requests: scripts, images, video, etc. (both same-origin and cross-origin - requests). - </int> - <int value="2" label="RequiresJavascriptParsing"> - ORB algorithm *might* requires parsing the response body as Javascript. - - This might be a false positive if the response: 1) sniffs as an - audio/image/video format 2) represents a valid range response for a media - element - </int> -</enum> - <enum name="OpenLinkAs"> <int value="0" label="Open Link as Profile displayed."/> <int value="1" label="Open Link as Profile clicked."/> @@ -57992,30 +57494,6 @@ <int value="4" label="Mixed foreground/background"/> </enum> -<enum name="PageScaleFactorRange"> - <int value="0" label="<25%"/> - <int value="1" label="25-49%"/> - <int value="2" label="50-74%"/> - <int value="3" label="75-99%"/> - <int value="4" label="100-124%"/> - <int value="5" label="125-149%"/> - <int value="6" label="150-174%"/> - <int value="7" label="175-199%"/> - <int value="8" label="200-224%"/> - <int value="9" label="225-249%"/> - <int value="10" label="250-274%"/> - <int value="11" label="275-299%"/> - <int value="12" label="300-324%"/> - <int value="13" label="325-349%"/> - <int value="14" label="350-374%"/> - <int value="15" label="375-399%"/> - <int value="16" label="400-424%"/> - <int value="17" label="425-449%"/> - <int value="18" label="450-474%"/> - <int value="19" label="475-499%"/> - <int value="20" label=">=500%"/> -</enum> - <enum name="PageState"> <int value="0" label="Focused"/> <int value="1" label="Visible"/> @@ -58152,13 +57630,6 @@ <int value="56" label="SkColor4f has non-finite values"/> </enum> -<enum name="PaletteModeCancelType"> - <int value="0" label="Palette laser pointer mode is cancelled."/> - <int value="1" label="Palette laser pointer mode is switched out of"/> - <int value="2" label="Palette magnify mode is cancelled."/> - <int value="3" label="Palette magnify mode is switched out of."/> -</enum> - <enum name="PAMInitializePrimaryAccountInfoState"> <int value="0" label="OK: Account info available"/> <int value="1" label="Empty account info. Restore failed (no sync consent)."/> @@ -59794,16 +59265,6 @@ <int value="2" label="Popup navigates to an unsafe safe-browsing site"/> </enum> -<enum name="PortalDetectionMultiProbeResult"> - <int value="0" label="Undefined result"/> - <int value="1" label="HTTPS traffic blocked, no HTTP redirect"/> - <int value="2" label="HTTPS traffic blocked, HTTP redirect received"/> - <int value="3" label="HTTPS traffic blocked, HTTP 204 received"/> - <int value="4" label="HTTPS traffic not blocked, no HTTP redirect"/> - <int value="5" label="HTTPS traffic not blocked, HTTP redirect received"/> - <int value="6" label="HTTPS traffic not blocked, HTTP 204 received"/> -</enum> - <enum name="PortalDetectorAggregateResult"> <int value="0" label="Unknown"/> <int value="1" label="No Connectivity"/> @@ -59996,26 +59457,6 @@ <int value="1" label="Lacros">Web page info comes from lacros chrome.</int> </enum> -<enum name="PowerMode"> - <int value="0" label="kIdle"/> - <int value="1" label="kAudible"/> - <int value="2" label="kLoading"/> - <int value="3" label="kAnimation"/> - <int value="4" label="kResponse"/> - <int value="5" label="kOtherActivity"/> - <int value="6" label="kBackground"/> - <int value="7" label="kCharging"/> - <int value="8" label="kNopAnimation"/> - <int value="9" label="kVideoPlayback"/> - <int value="10" label="kLoadingAnimation"/> - <int value="11" label="kMainThreadAnimation"/> - <int value="12" label="kSmallAnimation"/> - <int value="13" label="kMediumAnimation"/> - <int value="14" label="kSmallMainThreadAnimation"/> - <int value="15" label="kMediumMainThreadAnimation"/> - <int value="16" label="kScriptExecution"/> -</enum> - <enum name="PowerwashDialogViewType"> <int value="0" label="Invoked on settings page"/> <int value="1" label="Shortcut. Confirmation for powerwash only."/> @@ -62034,27 +61475,6 @@ <int value="2" label="Destination dialog has printers manage button"/> </enum> -<enum name="PrintPreviewPrintDestinationBuckets"> - <obsolete> - Deprecated 2022-06. - </obsolete> - <int value="0" label="DESTINATION_SHOWN"/> - <int value="1" label="DESTINATION_CLOSED_CHANGED"/> - <int value="2" label="DESTINATION_CLOSED_UNCHANGED"/> - <int value="3" label="SIGNIN_PROMPT_DEPRECATED"/> - <int value="4" label="SIGNIN_TRIGGERED_DEPRECATED"/> - <int value="5" label="PRIVET_DUPLICATE_SELECTED_DEPRECATED"/> - <int value="6" label="CLOUD_DUPLICATE_SELECTED_DEPRECATED"/> - <int value="7" label="REGISTER_PROMO_SHOWN_DEPRECATED"/> - <int value="8" label="REGISTER_PROMO_SELECTED_DEPRECATED"/> - <int value="9" label="ACCOUNT_CHANGED_DEPRECATED"/> - <int value="10" label="ADD_ACCOUNT_SELECTED_DEPRECATED"/> - <int value="11" label="INVITATION_AVAILABLE_DEPRECATED"/> - <int value="12" label="INVITATION_ACCEPTED_DEPRECATED"/> - <int value="13" label="INVITATION_REJECTED_DEPRECATED"/> - <int value="14" label="MANAGE_BUTTON_CLICKED"/> -</enum> - <enum name="PrintPreviewPrintDocumentTypeBuckets"> <int value="0" label="HTML_DOCUMENT"/> <int value="1" label="PDF_DOCUMENT"/> @@ -62882,18 +62302,6 @@ <int value="5" label="Magenta"/> </enum> -<enum name="ProjectorPolicyChangeHandlingError"> - <obsolete> - Deprecated in M116. No longer needed since no error reported and converted - to CHECK. - </obsolete> - <int value="0" label="SWA manager is not available"/> - <int value="1" label="Web app provider is not available"/> - <int value="2" - label="Web app provider is not available when registry is ready"/> - <int value="3" label="Sync bridge is not available"/> -</enum> - <enum name="ProjectorToolbar"> <int value="0" label="Toolbar opened (Obsolete)"/> <int value="1" label="Toolbar closed (Obsolete)"/> @@ -64822,43 +64230,6 @@ <int value="7" label="Unknown"/> </enum> -<enum name="RequestInitiatorOriginLockCompatibility"> - <int value="0" label="BrowserProcess"> - Request came from a browser process and so the - |request_initiator_origin_lock| doesn't apply. - </int> - <int value="1" label="NoLock"> - |request_initiator_origin_lock| is missing - see https://crbug.com/1098938. - </int> - <int value="2" label="NoInitiator">|request_initiator| is missing.</int> - <int value="3" label="CompatibleLock"> - |request.request_initiator| is compatible with - |factory_params_.request_initiator_origin_lock| - either - |request.request_initiator| is opaque or it is equal to - |request_initiator_origin_lock|. - </int> - <int value="4" label="IncorrectLock"> - |request.request_initiator| is non-opaque/unique and differs from - |factory_params_.request_initiator_origin_lock|. - </int> - <int value="5" label="ExcludedScheme"> - Scheme excluded from request_initiator_origin_lock checks. Since ~M80 this - value can only be recorded during tests. - </int> - <int value="6" label="ExcludedCorbForPlugin"> - Requests from a renderer process that embeds a plugin (e.g. Flash) that - needs to disable CORB and request_initiator_origin_lock enforcement. - - Obsolete - this enum value was removed in Nov 2020 (M89). - </int> - <int value="7" label="AllowedRequestInitiatorForPlugin"> - Requests from a renderer process that embeds a plugin (e.g. PDF) that needs - to poke small, targeted holes in request_initiator_origin_lock enforcement. - - Obsolete - this enum value was removed in Mar 2022 (M101). - </int> -</enum> - <enum name="RequestStorageResult"> <int value="0" label="Approved due to existing storage access"/> <int value="1" label="Approved with new grant"/> @@ -65724,15 +65095,6 @@ <int value="1" label="Finished"/> </enum> -<enum name="ScreenAILoadLibraryResult"> - <int value="0" label="Succeeded to load ScreenAI libraries"/> - <int value="1" label="Failed to load VisualAnnotation library (deprecated)"/> - <int value="2" label="Failed to load MainContentExtraction library"/> - <int value="3" label="Failed to load Layout Extraction library"/> - <int value="4" label="Failed to load OCR library"/> - <int value="5" label="Failed to load library functions."/> -</enum> - <enum name="ScreenRotationAcceleratorAction"> <int value="0" label="CancelledDialog"/> <int value="1" label="AcceptedDialog"/> @@ -65840,21 +65202,6 @@ <int value="1" label="Module is shown and collapsed"/> </enum> -<enum name="SearchTemplateURLEvent"> - <summary> - Events within the TemplateURL system we log, i.e. edge cases. - </summary> - <int value="0" label="SYNC_DELETE_SUCCESS"/> - <int value="1" label="SYNC_DELETE_FAIL_NONEXISTENT_ENGINE"/> - <int value="2" label="SYNC_DELETE_FAIL_DEFAULT_SEARCH_PROVIDER"/> - <int value="3" label="SYNC_ADD_SUCCESS"/> - <int value="4" label="SYNC_ADD_CONVERTED_TO_UPDATE"/> - <int value="5" label="SYNC_ADD_FAIL_OTHER_ERROR"/> - <int value="6" label="SYNC_UPDATE_SUCCESS"/> - <int value="7" label="SYNC_UPDATE_CONVERTED_TO_ADD"/> - <int value="8" label="MIGRATE_SAFE_FOR_AUTOREPLACE_PLAY_API_ENGINE"/> -</enum> - <enum name="SearchWidgetUseInfo"> <int value="0" label="defunct Present in partnership device"/> <int value="1" label="defunct Not present in partnership device"/> @@ -68514,12 +67861,6 @@ <int value="8" label="Inline speculation rules failed parsing"/> </enum> -<enum name="SpeculativeRenderFrameHostType"> - <int value="0" label="Does not exist"/> - <int value="1" label="Exists, not pending commit"/> - <int value="2" label="Exists, pending commit"/> -</enum> - <enum name="SpeechRecognitionEndState"> <int value="0" label="Speech recognition successfully stopped"/> <int value="1" label="Speech recognition enountered error while recognizing"/> @@ -69815,30 +69156,6 @@ <int value="0" label="New tab failed to open"/> </enum> -<enum name="TabStripReasonToShow"> - <obsolete> - Deprecated as of 01/2023. - </obsolete> - <summary>The reason why conditional tab strip is showing.</summary> - <int value="0" label="TabSwitched"/> - <int value="1" label="NewTab"/> - <int value="2" label="LongPress"/> -</enum> - -<enum name="TabStripUserStatus"> - <obsolete> - Deprecated as of 01/2023. - </obsolete> - <summary> - The user status of conditional tab strip in a feature-specific session. - </summary> - <int value="0" label="NonUser"/> - <int value="1" label="TabStripNotShown"/> - <int value="2" label="TabStripShown"/> - <int value="3" label="TabStripShownAndDismissed"/> - <int value="4" label="TabStripPermanentlyHidden"/> -</enum> - <enum name="TabSwitchResult2"> <int value="0" label="Success"/> <int value="1" label="Tab hidden before a frame is presented"/> @@ -69850,21 +69167,6 @@ <int value="1" label="Undelayed Tap"/> </enum> -<enum name="TextFragmentAnchorParameters"> - <summary> - Indicates which parameters were specified in a text fragment anchor. - </summary> - <int value="0" label="Unknown"/> - <int value="1" label="ExactText"/> - <int value="2" label="ExactTextWithPrefix"/> - <int value="3" label="ExactTextWithSuffix"/> - <int value="4" label="ExactTextWithContext"/> - <int value="5" label="TextRange"/> - <int value="6" label="TextRangeWithPrefix"/> - <int value="7" label="TextRangeWithSuffix"/> - <int value="8" label="TextRangeWithContext"/> -</enum> - <enum name="TextFragmentLinkOpenSource"> <int value="0" label="Unknown"/> <int value="1" label="SearchEngine"/> @@ -69935,51 +69237,6 @@ <int value="2" label="No third-party site data accesses"/> </enum> -<enum name="ThirdPartyStatus"> - <int value="0" label="Success"/> - <int value="1" label="FilePathNotFoundInRegistry"/> - <int value="2" label="FileNotFound"/> - <int value="3" label="FileEmpty"/> - <int value="4" label="FileArraySizeZero"/> - <int value="5" label="FileAccessDenied"/> - <int value="6" label="FileUnexpectedFailure"/> - <int value="7" label="FileMetadataReadFailure"/> - <int value="8" label="FileInvalidFormatVersion"/> - <int value="9" label="FileArrayTooBig"/> - <int value="10" label="FileArrayReadFailure"/> - <int value="11" label="FileArrayNotSorted"/> - <int value="12" label="LogsCreateMutexFailure"/> - <int value="13" label="HookInitImportsFailure"/> - <int value="14" label="HookUnsupportedOs"/> - <int value="15" label="HookVirtualProtectFailure"/> - <int value="16" label="HookApplyFailure"/> - <int value="17" label="HookCreateMutexFailure"/> - <int value="18" label="StatusCodeResetFailure"/> -</enum> - -<enum name="ThumbstripCloseByIOS"> - <obsolete> - Deprecated as of 06/2023 - </obsolete> - <int value="0" label="Closed by dragging the primary toolbar up"/> - <int value="1" label="Closed by tapping the fake tab at bottom"/> - <int value="2" label="Closed by user navigating in web page"/> - <int value="3" label="Closed by scrolling web page / ntp up"/> - <int value="4" label="Closed by tapping new tab button"/> - <int value="5" label="Closed by focusing the omnibox"/> - <int value="6" label="Closed by user tapping thumbstrip background"/> - <int value="7" label="Closed by user swiping thumbstrip background up"/> -</enum> - -<enum name="ThumbstripOpenByIOS"> - <obsolete> - Deprecated as of 06/2023 - </obsolete> - <int value="0" label="Opened by dragging tab strip down"/> - <int value="1" label="Opened by dragging primary toolbar down"/> - <int value="2" label="Opened by scrolling web page / ntp down from top"/> -</enum> - <enum name="TimeZoneRequestEvent"> <int value="0" label="Request start"/> <int value="1" label="Response success"/> @@ -75960,26 +75217,6 @@ <int value="39" label="onScaleChanged"/> </enum> -<enum name="WebViewClientErrorCode"> - <int value="-16" label="ERROR_UNSAFE_RESOURCE"/> - <int value="-15" label="ERROR_TOO_MANY_REQUESTS"/> - <int value="-14" label="ERROR_FILE_NOT_FOUND"/> - <int value="-13" label="ERROR_FILE"/> - <int value="-12" label="ERROR_BAD_URL"/> - <int value="-11" label="ERROR_FAILED_SSL_HANDSHAKE"/> - <int value="-10" label="ERROR_UNSUPPORTED_SCHEME"/> - <int value="-9" label="ERROR_REDIRECT_LOOP"/> - <int value="-8" label="ERROR_TIMEOUT"/> - <int value="-7" label="ERROR_IO"/> - <int value="-6" label="ERROR_CONNECT"/> - <int value="-5" label="ERROR_PROXY_AUTHENTICATION"/> - <int value="-4" label="ERROR_AUTHENTICATION"/> - <int value="-3" label="ERROR_UNSUPPORTED_AUTH_SCHEME"/> - <int value="-2" label="ERROR_HOST_LOOKUP"/> - <int value="-1" label="ERROR_UNKNOWN"/> - <int value="0" label="ERROR_OK"/> -</enum> - <enum name="WebViewClientTypeEnum"> <int value="0" label="Regular WebViewClient"/> <int value="1" label="WebViewClientCompat (via AndroidX)"/> @@ -76065,36 +75302,6 @@ <int value="8" label="Night mode off, light theme yes"/> </enum> -<enum name="WebViewNonembeddedService"> - <int value="0" label="AwMinidumpUploadJobService"/> - <int value="1" label="AwVariationsSeedFetcher"/> - <int value="2" label="ComponentsProviderService"/> - <int value="3" label="CrashReceiverService.class"/> - <int value="4" label="DeveloperUiService"/> - <int value="5" label="MetricsBridgeService"/> - <int value="6" label="MetricsUploadService"/> - <int value="7" label="SafeModeService"/> - <int value="8" label="VariationsSeedServer"/> -</enum> - -<enum name="WebViewOpenWebScreenPortion"> - <obsolete> - Deprecated in March 2022. - </obsolete> - <int value="0" label="0-10%"/> - <int value="1" label="10-20%"/> - <int value="2" label="20-30%"/> - <int value="3" label="30-40%"/> - <int value="4" label="40-50%"/> - <int value="5" label="50-60%"/> - <int value="6" label="60-70%"/> - <int value="7" label="70-80%"/> - <int value="8" label="80-90%"/> - <int value="9" label="90-100%"/> - <int value="10" label="ExactlyOneHundredPercent"/> - <int value="11" label="ExactlyZeroPercent"/> -</enum> - <enum name="WebViewPrimaryTextLuminanceVsLightTheme"> <int value="0" label="Text undefined, light theme undefined"/> <int value="1" label="Text undefined, light theme no"/> @@ -76119,12 +75326,6 @@ <int value="8" label="Text dark, night mode off"/> </enum> -<enum name="WebViewRequestedWithHeaderMode"> - <int value="0" label="No header set"/> - <int value="1" label="App package name"/> - <int value="2" label="Constant string 'WebView'"/> -</enum> - <enum name="WebViewUrlScheme"> <int value="0" label="Empty URL"/> <int value="1" label="Unknown scheme"/>
diff --git a/tools/metrics/histograms/metadata/apps/enums.xml b/tools/metrics/histograms/metadata/apps/enums.xml index daba3f01..4ac94d57 100644 --- a/tools/metrics/histograms/metadata/apps/enums.xml +++ b/tools/metrics/histograms/metadata/apps/enums.xml
@@ -35,6 +35,15 @@ <int value="5" label="InferenceExecutionFailed"/> </enum> +<enum name="AppInstallResult"> + <int value="0" label="kUnknown"/> + <int value="1" label="kSuccess"/> + <int value="2" label="kAlmanacFetchFailed"/> + <int value="3" label="kAppDataCorrupted"/> + <int value="4" label="kAppProviderNotAvailable"/> + <int value="5" label="kAppTypeNotSupported"/> +</enum> + <enum name="AppListAppMovingType"> <int value="0" label="MOVE_BY_DRAG_INTO_FOLDER"/> <int value="1" label="MOVE_BY_DRAG_OUT_OF_FOLDER"/>
diff --git a/tools/metrics/histograms/metadata/apps/histograms.xml b/tools/metrics/histograms/metadata/apps/histograms.xml index 3517a16..e6055c0 100644 --- a/tools/metrics/histograms/metadata/apps/histograms.xml +++ b/tools/metrics/histograms/metadata/apps/histograms.xml
@@ -274,6 +274,20 @@ </summary> </histogram> +<histogram name="Apps.AppInstallService.AppInstallResult{AppInstallSurface}" + enum="AppInstallResult" expires_after="2024-02-11"> + <owner>tsergeant@chromium.org</owner> + <owner>chromeos-apps-foundation-team@google.com</owner> + <summary> + Records the result of a request to install an app via AppInstallService for + a given install surface. + </summary> + <token key="AppInstallSurface"> + <variant name="" summary="All surfaces"/> + <variant name=".AppInstallNavigationThrottle" summary="URI navigation"/> + </token> +</histogram> + <histogram name="Apps.AppLaunch" enum="AppLaunch" expires_after="2024-04-28"> <owner>tapted@chromium.org</owner> <owner>benwells@chromium.org</owner>
diff --git a/tools/metrics/histograms/metadata/ash/histograms.xml b/tools/metrics/histograms/metadata/ash/histograms.xml index 0acd8cb..3f40f7f 100644 --- a/tools/metrics/histograms/metadata/ash/histograms.xml +++ b/tools/metrics/histograms/metadata/ash/histograms.xml
@@ -1237,17 +1237,6 @@ </summary> </histogram> -<histogram name="Ash.BrowserSupport.UnexpectedBrowserSupportInitialize" - enum="Boolean" expires_after="M122"> - <owner>andreaorru@chromium.org</owner> - <owner>hidehiko@chromium.org</owner> - <summary> - Making sure nobody in the production calls - ash::standalone_browser::BrowserSupport::Initialize() in unexpected timing. - This entry will not have "false" status. - </summary> -</histogram> - <histogram name="Ash.Calendar.CalendarKeyboardNavigationSource" enum="CalendarKeyboardNavigationSource" expires_after="2024-09-04"> <owner>kradtke@chromium.org</owner>
diff --git a/tools/metrics/histograms/metadata/extensions/histograms.xml b/tools/metrics/histograms/metadata/extensions/histograms.xml index 755166d6..3bd57f58 100644 --- a/tools/metrics/histograms/metadata/extensions/histograms.xml +++ b/tools/metrics/histograms/metadata/extensions/histograms.xml
@@ -238,17 +238,16 @@ <histogram name="Extensions.BackgroundPageType" enum="ExtensionBackgroundPageType" expires_after="2023-07-07"> - <obsolete> - Histogram is in the process of being removed in favor of its incremented - version that emits only on profile open for "user" profiles - (profiles where people can install extensions, specifically profiles that - can have non-component extensions installed). - </obsolete> <owner>rdevlin.cronin@chromium.org</owner> <owner>extensions-core@chromium.org</owner> <summary> The type (if any) of background page the extension has. Recorded for installed extensions on profile open. + + Histogram is in the process of being removed in favor of its incremented + version that emits only on profile open for "user" profiles + (profiles where people can install extensions, specifically profiles that + can have non-component extensions installed). </summary> </histogram> @@ -434,18 +433,17 @@ <histogram name="Extensions.CorruptExtensionTotalDisables" units="units" expires_after="2023-07-07"> - <obsolete> - Histogram is in the process of being removed in favor of its incremented - version that emits only on profile open for "user" profiles - (profiles where people can install extensions, specifically profiles that - can have non-component extensions installed). - </obsolete> <owner>jlulejian@chromium.org</owner> <owner>extensions-core@chromium.org</owner> <summary> Logged once on profile open, this is the value of a counter that is incremented anytime we disable a corrupted extension because its content didn't match an expected content hash. + + Histogram is in the process of being removed in favor of its incremented + version that emits only on profile open for "user" profiles + (profiles where people can install extensions, specifically profiles that + can have non-component extensions installed). </summary> </histogram> @@ -1045,15 +1043,14 @@ </histogram> <histogram name="Extensions.Disabled" units="units" expires_after="2023-07-07"> - <obsolete> + <owner>rdevlin.cronin@chromium.org</owner> + <summary> + The number of extensions that are disabled at browser profile open. + Histogram is in the process of being removed in favor of its incremented version that emits only on profile open for "user" profiles (profiles where people can install extensions, specifically profiles that can have non-component extensions installed). - </obsolete> - <owner>rdevlin.cronin@chromium.org</owner> - <summary> - The number of extensions that are disabled at browser profile open. </summary> </histogram> @@ -1071,16 +1068,15 @@ <histogram name="Extensions.DisabledForPermissions" units="units" expires_after="2023-07-07"> - <obsolete> - Histogram is in the process of being removed in favor of its incremented - version that emits only on profile open for "user" profiles - (profiles where people can install extensions, specifically profiles that - can have non-component extensions installed). - </obsolete> <owner>rdevlin.cronin@chromium.org</owner> <summary> The number of extensions that are disabled at browser profile open due to permissions increases. + + Histogram is in the process of being removed in favor of its incremented + version that emits only on profile open for "user" profiles + (profiles where people can install extensions, specifically profiles that + can have non-component extensions installed). </summary> </histogram> @@ -1442,16 +1438,15 @@ <histogram name="Extensions.ExtensionLocation" enum="ExtensionLocation" expires_after="2023-07-07"> - <obsolete> - Histogram is in the process of being removed in favor of its incremented - version that emits only on profile open for "user" profiles - (profiles where people can install extensions, specifically profiles that - can have non-component extensions installed). - </obsolete> <owner>rdevlin.cronin@chromium.org</owner> <summary> The install location for a given extension. Recorded once per enabled extension on profile initialization. + + Histogram is in the process of being removed in favor of its incremented + version that emits only on profile open for "user" profiles + (profiles where people can install extensions, specifically profiles that + can have non-component extensions installed). </summary> </histogram> @@ -1516,16 +1511,15 @@ <histogram name="Extensions.ExternalItemState" enum="ExternalItemState" expires_after="2023-07-07"> - <obsolete> - Histogram is in the process of being removed in favor of its incremented - version that emits only on profile open for "user" profiles - (profiles where people can install extensions, specifically profiles that - can have non-component extensions installed). - </obsolete> <owner>anunoy@chromium.org</owner> <summary> The number of sideloaded apps/extensions loaded on profile open grouped by enabled/disabled state. + + Histogram is in the process of being removed in favor of its incremented + version that emits only on profile open for "user" profiles + (profiles where people can install extensions, specifically profiles that + can have non-component extensions installed). </summary> </histogram> @@ -1562,12 +1556,6 @@ <histogram name="Extensions.FileAccessAllowed" units="units" expires_after="2023-07-07"> - <obsolete> - Histogram is in the process of being removed in favor of its incremented - version that emits only on profile open for "user" profiles - (profiles where people can install extensions, specifically profiles that - can have non-component extensions installed). - </obsolete> <owner>rdevlin.cronin@chromium.org</owner> <summary> The number of extensions (and friends) that could have been given access to @@ -1576,6 +1564,11 @@ up in chrome://extensions (platform apps, hosted apps, component extensions), policy-installed extensions, and unpacked extensions. See also Extensions.FileAccessNotAllowed. + + Histogram is in the process of being removed in favor of its incremented + version that emits only on profile open for "user" profiles + (profiles where people can install extensions, specifically profiles that + can have non-component extensions installed). </summary> </histogram> @@ -1597,12 +1590,6 @@ <histogram name="Extensions.FileAccessNotAllowed" units="units" expires_after="2023-07-07"> - <obsolete> - Histogram is in the process of being removed in favor of its incremented - version that emits only on profile open for "user" profiles - (profiles where people can install extensions, specifically profiles that - can have non-component extensions installed). - </obsolete> <owner>rdevlin.cronin@chromium.org</owner> <summary> The number of extensions (and friends) that could have been given access to @@ -1611,6 +1598,11 @@ up in chrome://extensions (platform apps, hosted apps, component extensions), policy-installed extensions, and unpacked extensions. See also Extensions.FileAccessAllowed. + + Histogram is in the process of being removed in favor of its incremented + version that emits only on profile open for "user" profiles + (profiles where people can install extensions, specifically profiles that + can have non-component extensions installed). </summary> </histogram> @@ -2044,18 +2036,17 @@ <histogram name="Extensions.FromWebstoreInconsistency" enum="ExtensionFromWebstoreInconcistencyEnum" expires_after="2023-07-07"> - <obsolete> - Histogram is in the process of being removed in favor of its incremented - version that emits only on profile open for "user" profiles - (profiles where people can install extensions, specifically profiles that - can have non-component extensions installed). - </obsolete> <owner>anunoy@chromium.org</owner> <summary> Number of apps/extensions loaded on profile open with an inconsistent "from webstore" state. This means an item that is flagged as from_webstore, but with either a non-webstore update_url or an external install location. + + Histogram is in the process of being removed in favor of its incremented + version that emits only on profile open for "user" profiles + (profiles where people can install extensions, specifically profiles that + can have non-component extensions installed). </summary> </histogram> @@ -2319,12 +2310,6 @@ <histogram name="Extensions.HasPermissions_Install3" enum="Boolean" expires_after="2023-07-07"> - <obsolete> - Histogram is in the process of being removed in favor of its incremented - version that emits only on profile open for "user" profiles - (profiles where people can install extensions, specifically profiles that - can have non-component extensions installed). - </obsolete> <owner>rdevlin.cronin@chromium.org</owner> <owner>extensions-core@chromium.org</owner> <summary> @@ -2332,6 +2317,11 @@ installed . To find places where this histogram may be emitted, look for calls to ExtensionService::RecordPermissionMessagesHistogram with the argument Install. For Sync users, this is reported for each device. + + Histogram is in the process of being removed in favor of its incremented + version that emits only on profile open for "user" profiles + (profiles where people can install extensions, specifically profiles that + can have non-component extensions installed). </summary> </histogram> @@ -2353,12 +2343,6 @@ <histogram name="Extensions.HasPermissions_Load3" enum="Boolean" expires_after="2023-07-07"> - <obsolete> - Histogram is in the process of being removed in favor of its incremented - version that emits only on profile open for "user" profiles - (profiles where people can install extensions, specifically profiles that - can have non-component extensions installed). - </obsolete> <owner>rdevlin.cronin@chromium.org</owner> <owner>extensions-core@chromium.org</owner> <summary> @@ -2366,6 +2350,11 @@ loaded (which happens at profile open or extension install). To find places where this histogram may be emitted, look for calls to ExtensionService::RecordPermissionMessagesHistogram with the argument Load. + + Histogram is in the process of being removed in favor of its incremented + version that emits only on profile open for "user" profiles + (profiles where people can install extensions, specifically profiles that + can have non-component extensions installed). </summary> </histogram> @@ -2387,17 +2376,16 @@ <histogram name="Extensions.HomepageOverrides" units="units" expires_after="2023-07-07"> - <obsolete> - Histogram is in the process of being removed in favor of its incremented - version that emits only on profile open for "user" profiles - (profiles where people can install extensions, specifically profiles that - can have non-component extensions installed). - </obsolete> <owner>rdevlin.cronin@chromium.org</owner> <owner>kelvinjiang@chromium.org</owner> <summary> The number of enabled extensions with a homepage override specified in their manifest. Recorded once per profile at profile initialization. + + Histogram is in the process of being removed in favor of its incremented + version that emits only on profile open for "user" profiles + (profiles where people can install extensions, specifically profiles that + can have non-component extensions installed). </summary> </histogram> @@ -2430,18 +2418,17 @@ <histogram name="Extensions.HostPermissions.GrantedAccess" enum="HostPermissionsAccess" expires_after="2023-07-07"> - <obsolete> - Histogram is in the process of being removed in favor of its incremented - version that emits only on profile open for "user" profiles - (profiles where people can install extensions, specifically profiles that - can have non-component extensions installed). - </obsolete> <owner>emiliapaz@chromium.org</owner> <owner>extensions-core@chromium.org</owner> <summary> Records the host permissions access for a enabled extension as a result of the RuntimeHostPermissions feature. Recorded once per extension at profile initialization. + + Histogram is in the process of being removed in favor of its incremented + version that emits only on profile open for "user" profiles + (profiles where people can install extensions, specifically profiles that + can have non-component extensions installed). </summary> </histogram> @@ -2462,18 +2449,17 @@ <histogram name="Extensions.HostPermissions.GrantedAccessForBroadRequests" enum="HostPermissionsAccess" expires_after="2023-07-07"> - <obsolete> - Histogram is in the process of being removed in favor of its incremented - version that emits only on profile open for "user" profiles - (profiles where people can install extensions, specifically profiles that - can have non-component extensions installed). - </obsolete> <owner>emiliapaz@chromium.org</owner> <owner>extensions-core@chromium.org</owner> <summary> Records the host permissions access for each enabled extension that specifies a host permission that matches an effective TLD. Recorded once per extension at profile initialization. + + Histogram is in the process of being removed in favor of its incremented + version that emits only on profile open for "user" profiles + (profiles where people can install extensions, specifically profiles that + can have non-component extensions installed). </summary> </histogram> @@ -2494,18 +2480,17 @@ <histogram name="Extensions.HostPermissions.GrantedAccessForTargetedRequests" enum="HostPermissionsAccess" expires_after="2023-07-07"> - <obsolete> - Histogram is in the process of being removed in favor of its incremented - version that emits only on profile open for "user" profiles - (profiles where people can install extensions, specifically profiles that - can have non-component extensions installed). - </obsolete> <owner>emiliapaz@chromium.org</owner> <owner>extensions-core@chromium.org</owner> <summary> Records the host permissions access for each enabled extension that specifies hosts, but has no host permission that matches an effective TLD. Recorded once per extension at profile initialization. + + Histogram is in the process of being removed in favor of its incremented + version that emits only on profile open for "user" profiles + (profiles where people can install extensions, specifically profiles that + can have non-component extensions installed). </summary> </histogram> @@ -2526,12 +2511,6 @@ <histogram name="Extensions.IncognitoAllowed" units="units" expires_after="2023-07-07"> - <obsolete> - Histogram is in the process of being removed in favor of its incremented - version that emits only on profile open for "user" profiles - (profiles where people can install extensions, specifically profiles that - can have non-component extensions installed). - </obsolete> <owner>rdevlin.cronin@chromium.org</owner> <summary> The number of extensions (and friends) that could have been allowed in @@ -2540,6 +2519,11 @@ chrome://extensions (platform apps, hosted apps, component extensions), policy-installed extensions, and unpacked extensions. See also Extensions.IncognitoNotAllowed. + + Histogram is in the process of being removed in favor of its incremented + version that emits only on profile open for "user" profiles + (profiles where people can install extensions, specifically profiles that + can have non-component extensions installed). </summary> </histogram> @@ -2563,12 +2547,6 @@ <histogram name="Extensions.IncognitoNotAllowed" units="units" expires_after="2023-07-07"> - <obsolete> - Histogram is in the process of being removed in favor of its incremented - version that emits only on profile open for "user" profiles - (profiles where people can install extensions, specifically profiles that - can have non-component extensions installed). - </obsolete> <owner>rdevlin.cronin@chromium.org</owner> <summary> The number of extensions (and friends) that could have been allowed in @@ -2577,6 +2555,11 @@ chrome://extensions (platform apps, hosted apps, component extensions), policy-installed extensions, and unpacked extensions. See also Extensions.IncognitoAllowed. + + Histogram is in the process of being removed in favor of its incremented + version that emits only on profile open for "user" profiles + (profiles where people can install extensions, specifically profiles that + can have non-component extensions installed). </summary> </histogram> @@ -2729,18 +2712,17 @@ <histogram name="Extensions.InstallSource" enum="ExtensionLocation" expires_after="2023-07-07"> - <obsolete> - Histogram is in the process of being removed in favor of its new versions - (Extensions.InstallType.User and Extensions.InstallType.Nonuser) that emit - only on profile open for "user" profiles (profiles where people - can install extensions, specifically profiles that can have non-component - extensions installed). - </obsolete> <owner>rdevlin.cronin@chromium.org</owner> <owner>extensions-core@chromium.org</owner> <summary> Installs grouped by the location property in prefs. Emitted once per profile open. + + Histogram is in the process of being removed in favor of its new versions + (Extensions.InstallType.User and Extensions.InstallType.Nonuser) that emit + only on profile open for "user" profiles (profiles where people + can install extensions, specifically profiles that can have non-component + extensions installed). </summary> </histogram> @@ -2776,17 +2758,16 @@ <histogram name="Extensions.InstallType" enum="ExtensionType" expires_after="2023-07-07"> - <obsolete> + <owner>rdevlin.cronin@chromium.org</owner> + <summary> + Installs grouped by Extension::HistogramType emitted once per extension + install. + Histogram is in the process of being removed in favor of its new versions (Extensions.InstallType.User and Extensions.InstallType.Nonuser) that emit only on profile open for "user" profiles (profiles where people can install extensions, specifically profiles that can have non-component extensions installed). - </obsolete> - <owner>rdevlin.cronin@chromium.org</owner> - <summary> - Installs grouped by Extension::HistogramType emitted once per extension - install. </summary> </histogram> @@ -2830,14 +2811,15 @@ </histogram> <histogram name="Extensions.LoadAll" units="units" expires_after="2023-07-07"> - <obsolete> + <owner>rdevlin.cronin@chromium.org</owner> + <summary> + The number of extensions and themes loaded at profile open. + Histogram is in the process of being removed in favor of its incremented version that emits only on profile open for "user" profiles (profiles where people can install extensions, specifically profiles that can have non-component extensions installed). - </obsolete> - <owner>rdevlin.cronin@chromium.org</owner> - <summary>The number of extensions and themes loaded at profile open.</summary> + </summary> </histogram> <histogram name="Extensions.LoadAll2" units="units" expires_after="never"> @@ -2854,18 +2836,17 @@ <histogram name="Extensions.LoadAllComponentTime" units="ms" expires_after="2023-07-07"> - <obsolete> - Histogram is in the process of being removed in favor of its new versions - (Extensions.LoadAllComponentTime.NonUser and - Extensions.LoadAllComponentTime.User) that emit only on profile open for - "user" profiles (profiles where people can install extensions, - specifically profiles that can have non-component extensions installed). - </obsolete> <owner>rdevlin.cronin@chromium.org</owner> <summary> Time taken to load all component extensions at profile open. This happens as part of the total initialization time of ExtensionService, measured in Extensions.ExtensionServiceInitTime. + + Histogram is in the process of being removed in favor of its new versions + (Extensions.LoadAllComponentTime.NonUser and + Extensions.LoadAllComponentTime.User) that emit only on profile open for + "user" profiles (profiles where people can install extensions, + specifically profiles that can have non-component extensions installed). </summary> </histogram> @@ -2901,18 +2882,17 @@ </histogram> <histogram name="Extensions.LoadAllTime2" units="ms" expires_after="2023-07-07"> - <obsolete> - Histogram is in the process of being removed in favor of its new versions - (Extensions.LoadAllTime2.NonUser and Extensions.LoadAllTime2.User) that emit - only on profile open for "user" profiles (profiles where people - can install extensions, specifically profiles that can have non-component - extensions installed). - </obsolete> <owner>rdevlin.cronin@chromium.org</owner> <summary> Time taken to load all non-component extensions at profile open and record metrics. This happens as part of the total initialization time of ExtensionService, measured in Extensions.ExtensionServiceInitTime. + + Histogram is in the process of being removed in favor of its new versions + (Extensions.LoadAllTime2.NonUser and Extensions.LoadAllTime2.User) that emit + only on profile open for "user" profiles (profiles where people + can install extensions, specifically profiles that can have non-component + extensions installed). </summary> </histogram> @@ -2948,14 +2928,15 @@ </histogram> <histogram name="Extensions.LoadApp" units="units" expires_after="2023-07-07"> - <obsolete> + <owner>rdevlin.cronin@chromium.org</owner> + <summary> + The number of apps loaded by each user at profile open. + Histogram is in the process of being removed in favor of its incremented version that emits only on profile open for "user" profiles (profiles where people can install extensions, specifically profiles that can have non-component extensions installed). - </obsolete> - <owner>rdevlin.cronin@chromium.org</owner> - <summary>The number of apps loaded by each user at profile open.</summary> + </summary> </histogram> <histogram name="Extensions.LoadApp2" units="units" expires_after="never"> @@ -2972,16 +2953,15 @@ <histogram name="Extensions.LoadAppExternal" units="units" expires_after="2023-07-07"> - <obsolete> - Histogram is in the process of being removed in favor of its incremented - version that emits only on profile open for "user" profiles - (profiles where people can install extensions, specifically profiles that - can have non-component extensions installed). - </obsolete> <owner>rdevlin.cronin@chromium.org</owner> <owner>extensions-core@chromium.org</owner> <summary> The number of externally managed apps loaded by each user at profile open. + + Histogram is in the process of being removed in favor of its incremented + version that emits only on profile open for "user" profiles + (profiles where people can install extensions, specifically profiles that + can have non-component extensions installed). </summary> </histogram> @@ -2999,15 +2979,14 @@ <histogram name="Extensions.LoadAppUser" units="units" expires_after="2023-07-07"> - <obsolete> + <owner>rdevlin.cronin@chromium.org</owner> + <summary> + The number of user-installed apps loaded by each user at profile open. + Histogram is in the process of being removed in favor of its incremented version that emits only on profile open for "user" profiles (profiles where people can install extensions, specifically profiles that can have non-component extensions installed). - </obsolete> - <owner>rdevlin.cronin@chromium.org</owner> - <summary> - The number of user-installed apps loaded by each user at profile open. </summary> </histogram> @@ -3025,15 +3004,14 @@ <histogram name="Extensions.LoadBrowserAction" units="units" expires_after="2023-07-07"> - <obsolete> + <owner>rdevlin.cronin@chromium.org</owner> + <summary> + The number of browser action extensions loaded at profile open. + Histogram is in the process of being removed in favor of its incremented version that emits only on profile open for "user" profiles (profiles where people can install extensions, specifically profiles that can have non-component extensions installed). - </obsolete> - <owner>rdevlin.cronin@chromium.org</owner> - <summary> - The number of browser action extensions loaded at profile open. </summary> </histogram> @@ -3052,14 +3030,15 @@ <histogram name="Extensions.LoadExtension" units="units" expires_after="2023-07-07"> - <obsolete> + <owner>rdevlin.cronin@chromium.org</owner> + <summary> + The number of extensions loaded at profile open. + Histogram is in the process of being removed in favor of its incremented version that emits only on profile open for "user" profiles (profiles where people can install extensions, specifically profiles that can have non-component extensions installed). - </obsolete> - <owner>rdevlin.cronin@chromium.org</owner> - <summary>The number of extensions loaded at profile open.</summary> + </summary> </histogram> <histogram name="Extensions.LoadExtension2" units="units" expires_after="never"> @@ -3076,16 +3055,15 @@ <histogram name="Extensions.LoadExtensionExternal" units="units" expires_after="2023-07-07"> - <obsolete> - Histogram is in the process of being removed in favor of its incremented - version that emits only on profile open for "user" profiles - (profiles where people can install extensions, specifically profiles that - can have non-component extensions installed). - </obsolete> <owner>rdevlin.cronin@chromium.org</owner> <owner>extensions-core@chromium.org</owner> <summary> The number of externally managed extensions loaded at profile open. + + Histogram is in the process of being removed in favor of its incremented + version that emits only on profile open for "user" profiles + (profiles where people can install extensions, specifically profiles that + can have non-component extensions installed). </summary> </histogram> @@ -3103,16 +3081,15 @@ <histogram name="Extensions.LoadExtensionUser" units="units" expires_after="2023-07-07"> - <obsolete> - Histogram is in the process of being removed in favor of its incremented - version that emits only on profile open for "user" profiles - (profiles where people can install extensions, specifically profiles that - can have non-component extensions installed). - </obsolete> <owner>rdevlin.cronin@chromium.org</owner> <owner>extensions-core@chromium.org</owner> <summary> The number of user-installed extensions loaded at profile open. + + Histogram is in the process of being removed in favor of its incremented + version that emits only on profile open for "user" profiles + (profiles where people can install extensions, specifically profiles that + can have non-component extensions installed). </summary> </histogram> @@ -3140,15 +3117,14 @@ <histogram name="Extensions.LoadHostedApp" units="units" expires_after="2023-07-07"> - <obsolete> + <owner>rdevlin.cronin@chromium.org</owner> + <summary> + The number of hosted apps loaded by each user at profile open. + Histogram is in the process of being removed in favor of its incremented version that emits only on profile open for "user" profiles (profiles where people can install extensions, specifically profiles that can have non-component extensions installed). - </obsolete> - <owner>rdevlin.cronin@chromium.org</owner> - <summary> - The number of hosted apps loaded by each user at profile open. </summary> </histogram> @@ -3166,16 +3142,15 @@ <histogram name="Extensions.LoadNoExtensionAction" units="units" expires_after="2023-07-07"> - <obsolete> - Histogram is in the process of being removed in favor of its incremented - version that emits only on profile open for "user" profiles - (profiles where people can install extensions, specifically profiles that - can have non-component extensions installed). - </obsolete> <owner>rdevlin.cronin@chromium.org</owner> <summary> The number of extensions that had neither a page nor browser action specified in their manifest. Recorded at profile open. + + Histogram is in the process of being removed in favor of its incremented + version that emits only on profile open for "user" profiles + (profiles where people can install extensions, specifically profiles that + can have non-component extensions installed). </summary> </histogram> @@ -3195,17 +3170,16 @@ <histogram name="Extensions.LoadOffStoreItems" units="Number of items" expires_after="2023-07-07"> - <obsolete> - Histogram is in the process of being removed in favor of its incremented - version that emits only on profile open for "user" profiles - (profiles where people can install extensions, specifically profiles that - can have non-component extensions installed). - </obsolete> <owner>rdevlin.cronin@chromium.org</owner> <owner>extensions-core@chromium.org</owner> <summary> The number of enabled extensions or apps the user has installed that do not update from the Chrome Web Store. Recorded during profile initialization. + + Histogram is in the process of being removed in favor of its incremented + version that emits only on profile open for "user" profiles + (profiles where people can install extensions, specifically profiles that + can have non-component extensions installed). </summary> </histogram> @@ -3225,15 +3199,14 @@ <histogram name="Extensions.LoadPackagedApp" units="units" expires_after="2023-07-07"> - <obsolete> + <owner>rdevlin.cronin@chromium.org</owner> + <summary> + The number of legacy packaged apps loaded by each user at profile open. + Histogram is in the process of being removed in favor of its incremented version that emits only on profile open for "user" profiles (profiles where people can install extensions, specifically profiles that can have non-component extensions installed). - </obsolete> - <owner>rdevlin.cronin@chromium.org</owner> - <summary> - The number of legacy packaged apps loaded by each user at profile open. </summary> </histogram> @@ -3251,14 +3224,15 @@ <histogram name="Extensions.LoadPlatformApp" units="units" expires_after="2023-07-07"> - <obsolete> + <owner>rdevlin.cronin@chromium.org</owner> + <summary> + The number of platform apps loaded at profile open. + Histogram is in the process of being removed in favor of its incremented version that emits only on profile open for "user" profiles (profiles where people can install extensions, specifically profiles that can have non-component extensions installed). - </obsolete> - <owner>rdevlin.cronin@chromium.org</owner> - <summary>The number of platform apps loaded at profile open.</summary> + </summary> </histogram> <histogram name="Extensions.LoadPlatformApp2" units="units" @@ -3274,15 +3248,16 @@ </histogram> <histogram name="Extensions.LoadTheme" units="units" expires_after="2023-07-07"> - <obsolete> + <owner>rdevlin.cronin@chromium.org</owner> + <owner>extensions-core@chromium.org</owner> + <summary> + The number of themes loaded at profile open. + Histogram is in the process of being removed in favor of its incremented version that emits only on profile open for "user" profiles (profiles where people can install extensions, specifically profiles that can have non-component extensions installed). - </obsolete> - <owner>rdevlin.cronin@chromium.org</owner> - <owner>extensions-core@chromium.org</owner> - <summary>The number of themes loaded at profile open.</summary> + </summary> </histogram> <histogram name="Extensions.LoadTheme2" units="units" @@ -3298,17 +3273,16 @@ <histogram name="Extensions.LoadType" enum="ExtensionType" expires_after="2023-07-07"> - <obsolete> - Histogram is in the process of being removed in favor of its incremented - version that emits only on profile open for "user" profiles - (profiles where people can install extensions, specifically profiles that - can have non-component extensions installed). - </obsolete> <owner>rdevlin.cronin@chromium.org</owner> <owner>extensions-core@chromium.org</owner> <summary> The number of extensions loaded at profile open grouped by Extension::HistogramType. + + Histogram is in the process of being removed in favor of its incremented + version that emits only on profile open for "user" profiles + (profiles where people can install extensions, specifically profiles that + can have non-component extensions installed). </summary> </histogram> @@ -3326,16 +3300,17 @@ <histogram name="Extensions.LoadUserScript" units="units" expires_after="2023-07-07"> - <obsolete> - Histogram is in the process of being removed in favor of its incremented - version that emits only on profile open for "user" profiles - (profiles where people can install extensions, specifically profiles that - can have non-component extensions installed). - </obsolete> <owner>rdevlin.cronin@chromium.org</owner> <owner>extensions-core@chromium.org</owner> <summary> The number of converted user scripts loaded at profile open. + + + + Histogram is in the process of being removed in favor of its incremented + version that emits only on profile open for "user" profiles + (profiles where people can install extensions, specifically profiles that + can have non-component extensions installed). </summary> </histogram> @@ -3430,14 +3405,17 @@ <histogram name="Extensions.ManifestVersion" units="units" expires_after="2023-07-07"> - <obsolete> + <owner>rdevlin.cronin@chromium.org</owner> + <summary> + The manifest version of each loaded extension. + + + Histogram is in the process of being removed in favor of its incremented version that emits only on profile open for "user" profiles (profiles where people can install extensions, specifically profiles that can have non-component extensions installed). - </obsolete> - <owner>rdevlin.cronin@chromium.org</owner> - <summary>The manifest version of each loaded extension.</summary> + </summary> </histogram> <histogram name="Extensions.ManifestVersion2" units="units" @@ -3592,17 +3570,16 @@ <histogram name="Extensions.NewTabPageOverrides" units="units" expires_after="2023-07-07"> - <obsolete> - Histogram is in the process of being removed in favor of its incremented - version that emits only on profile open for "user" profiles - (profiles where people can install extensions, specifically profiles that - can have non-component extensions installed). - </obsolete> <owner>rdevlin.cronin@chromium.org</owner> <owner>kelvinjiang@chromium.org</owner> <summary> The number of enabled extensions with a New Tab Page override specified in their manifest. Recorded once per profile at profile initialization. + + Histogram is in the process of being removed in favor of its incremented + version that emits only on profile open for "user" profiles + (profiles where people can install extensions, specifically profiles that + can have non-component extensions installed). </summary> </histogram> @@ -3620,16 +3597,15 @@ <histogram name="Extensions.NonWebstoreLocation" enum="ExtensionLocation" expires_after="2023-07-07"> - <obsolete> - Histogram is in the process of being removed in favor of its incremented - version that emits only on profile open for "user" profiles - (profiles where people can install extensions, specifically profiles that - can have non-component extensions installed). - </obsolete> <owner>rdevlin.cronin@chromium.org</owner> <summary> The number of apps/extensions with a non-webstore update_url loaded on profile open and grouped by Extension::Location. + + Histogram is in the process of being removed in favor of its incremented + version that emits only on profile open for "user" profiles + (profiles where people can install extensions, specifically profiles that + can have non-component extensions installed). </summary> </histogram> @@ -3649,16 +3625,15 @@ <histogram name="Extensions.NonWebStoreNewTabPageOverrides" units="units" expires_after="2023-07-07"> - <obsolete> - Histogram is in the process of being removed in favor of its incremented - version that emits only on profile open for "user" profiles - (profiles where people can install extensions, specifically profiles that - can have non-component extensions installed). - </obsolete> <owner>anunoy@chromium.org</owner> <summary> Number of non-WebStore extensions on profile open that override the new tab page. + + Histogram is in the process of being removed in favor of its incremented + version that emits only on profile open for "user" profiles + (profiles where people can install extensions, specifically profiles that + can have non-component extensions installed). </summary> </histogram> @@ -3676,18 +3651,17 @@ <histogram name="Extensions.NotAllowlistedDisabled" units="extensions" expires_after="2023-07-07"> - <obsolete> - Histogram is in the process of being removed in favor of its incremented - version that emits only on profile open for "user" profiles - (profiles where people can install extensions, specifically profiles that - can have non-component extensions installed). - </obsolete> <owner>jeffcyr@google.com</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> The total number of disabled extensions that are not present in the Enhanced Safe Browsing CRX allowlist. Recorded for all users on profile initialization. + + Histogram is in the process of being removed in favor of its incremented + version that emits only on profile open for "user" profiles + (profiles where people can install extensions, specifically profiles that + can have non-component extensions installed). </summary> </histogram> @@ -3705,18 +3679,17 @@ <histogram name="Extensions.NotAllowlistedDisabledAndEsbUser" units="extensions" expires_after="2023-10-01"> - <obsolete> - Histogram is in the process of being removed in favor of its incremented - version that emits only on profile open for "user" profiles - (profiles where people can install extensions, specifically profiles that - can have non-component extensions installed). - </obsolete> <owner>jeffcyr@google.com</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> The total number of disabled extensions that are not present in the Enhanced Safe Browsing CRX allowlist. Recorded for only for Enhanced Safe Browsing users on profile initialization. + + Histogram is in the process of being removed in favor of its incremented + version that emits only on profile open for "user" profiles + (profiles where people can install extensions, specifically profiles that + can have non-component extensions installed). </summary> </histogram> @@ -3735,18 +3708,17 @@ <histogram name="Extensions.NotAllowlistedEnabled" units="extensions" expires_after="2023-10-01"> - <obsolete> - Histogram is in the process of being removed in favor of its incremented - version that emits only on profile open for "user" profiles - (profiles where people can install extensions, specifically profiles that - can have non-component extensions installed). - </obsolete> <owner>jeffcyr@google.com</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> The total number of enabled extensions that are not present in the Enhanced Safe Browsing CRX allowlist. Recorded for all users on profile initialization. + + Histogram is in the process of being removed in favor of its incremented + version that emits only on profile open for "user" profiles + (profiles where people can install extensions, specifically profiles that + can have non-component extensions installed). </summary> </histogram> @@ -3764,18 +3736,17 @@ <histogram name="Extensions.NotAllowlistedEnabledAndEsbUser" units="extensions" expires_after="2023-10-01"> - <obsolete> - Histogram is in the process of being removed in favor of its incremented - version that emits only on profile open for "user" profiles - (profiles where people can install extensions, specifically profiles that - can have non-component extensions installed). - </obsolete> <owner>jeffcyr@google.com</owner> <owner>chrome-counter-abuse-alerts@google.com</owner> <summary> The total number of enabled extensions that are not present in the Enhanced Safe Browsing CRX allowlist. Recorded for only for Enhanced Safe Browsing users on profile initialization. + + Histogram is in the process of being removed in favor of its incremented + version that emits only on profile open for "user" profiles + (profiles where people can install extensions, specifically profiles that + can have non-component extensions installed). </summary> </histogram> @@ -3794,12 +3765,6 @@ <histogram name="Extensions.Permissions_Install3" enum="ExtensionPermission3" expires_after="2023-07-07"> - <obsolete> - Histogram is in the process of being removed in favor of its incremented - version that emits only on profile open for "user" profiles - (profiles where people can install extensions, specifically profiles that - can have non-component extensions installed). - </obsolete> <owner>rdevlin.cronin@chromium.org</owner> <owner>extensions-core@chromium.org</owner> <summary> @@ -3807,6 +3772,11 @@ places where this histogram may be emitted, look for calls to ExtensionService::RecordPermissionMessagesHistogram with the argument Install. For Sync users, this is reported for each device. + + Histogram is in the process of being removed in favor of its incremented + version that emits only on profile open for "user" profiles + (profiles where people can install extensions, specifically profiles that + can have non-component extensions installed). </summary> </histogram> @@ -3829,12 +3799,6 @@ <histogram name="Extensions.Permissions_Load3" enum="ExtensionPermission3" expires_after="2023-07-07"> - <obsolete> - Histogram is in the process of being removed in favor of its incremented - version that emits only on profile open for "user" profiles - (profiles where people can install extensions, specifically profiles that - can have non-component extensions installed). - </obsolete> <owner>rdevlin.cronin@chromium.org</owner> <owner>extensions-core@chromium.org</owner> <summary> @@ -3842,6 +3806,11 @@ profile open or extension install). To find places where this histogram may be emitted, look for calls to ExtensionService::RecordPermissionMessagesHistogram with the argument Load. + + Histogram is in the process of being removed in favor of its incremented + version that emits only on profile open for "user" profiles + (profiles where people can install extensions, specifically profiles that + can have non-component extensions installed). </summary> </histogram> @@ -3887,12 +3856,6 @@ <histogram name="Extensions.RuntimeHostPermissions.ExtensionHasWithheldHosts" enum="BooleanHasWithheldHosts" expires_after="2023-07-07"> - <obsolete> - Histogram is in the process of being removed in favor of its incremented - version that emits only on profile open for "user" profiles - (profiles where people can install extensions, specifically profiles that - can have non-component extensions installed). - </obsolete> <owner>rdevlin.cronin@chromium.org</owner> <owner>src/extensions/OWNERS</owner> <summary> @@ -3901,6 +3864,11 @@ initialization if and only if the RuntimeHostPermissions feature is enabled and the extension requests any host permissions (i.e., could be affected by the feature). + + Histogram is in the process of being removed in favor of its incremented + version that emits only on profile open for "user" profiles + (profiles where people can install extensions, specifically profiles that + can have non-component extensions installed). </summary> </histogram> @@ -3922,12 +3890,6 @@ <histogram name="Extensions.RuntimeHostPermissions.GrantedHostCount" units="Granted hosts" expires_after="2023-07-07"> - <obsolete> - Histogram is in the process of being removed in favor of its incremented - version that emits only on profile open for "user" profiles - (profiles where people can install extensions, specifically profiles that - can have non-component extensions installed). - </obsolete> <owner>rdevlin.cronin@chromium.org</owner> <owner>src/extensions/OWNERS</owner> <summary> @@ -3937,6 +3899,11 @@ initialization if and only if the RuntimeHostPermissions feature is enabled and the extension has had host permissions withheld. See also Extensions.RuntimeHostPermissions.ExtensionHasWithheldHosts. + + Histogram is in the process of being removed in favor of its incremented + version that emits only on profile open for "user" profiles + (profiles where people can install extensions, specifically profiles that + can have non-component extensions installed). </summary> </histogram> @@ -4003,17 +3970,16 @@ <histogram name="Extensions.SearchEngineOverrides" units="units" expires_after="2023-07-07"> - <obsolete> - Histogram is in the process of being removed in favor of its incremented - version that emits only on profile open for "user" profiles - (profiles where people can install extensions, specifically profiles that - can have non-component extensions installed). - </obsolete> <owner>rdevlin.cronin@chromium.org</owner> <owner>kelvinjiang@chromium.org</owner> <summary> The number of enabled extensions with a search engine override specified in their manifest. Recorded once per profile at profile initialization. + + Histogram is in the process of being removed in favor of its incremented + version that emits only on profile open for "user" profiles + (profiles where people can install extensions, specifically profiles that + can have non-component extensions installed). </summary> </histogram> @@ -4307,17 +4273,16 @@ <histogram name="Extensions.StartupPagesOverrides" units="units" expires_after="2023-07-07"> - <obsolete> - Histogram is in the process of being removed in favor of its incremented - version that emits only on profile open for "user" profiles - (profiles where people can install extensions, specifically profiles that - can have non-component extensions installed). - </obsolete> <owner>rdevlin.cronin@chromium.org</owner> <owner>kelvinjiang@chromium.org</owner> <summary> The number of enabled extensions with startup page overrides specified in their manifest. Recorded once per profile at profile initialization. + + Histogram is in the process of being removed in favor of its incremented + version that emits only on profile open for "user" profiles + (profiles where people can install extensions, specifically profiles that + can have non-component extensions installed). </summary> </histogram> @@ -4671,12 +4636,6 @@ <histogram name="Extensions.WebRequestBlockingCount" units="extensions" expires_after="2023-07-07"> - <obsolete> - Histogram is in the process of being removed in favor of its incremented - version that emits only on profile open for "user" profiles - (profiles where people can install extensions, specifically profiles that - can have non-component extensions installed). - </obsolete> <owner>rdevlin.cronin@chromium.org</owner> <owner>src/extensions/OWNERS</owner> <summary> @@ -4684,6 +4643,11 @@ "webRequestBlocking" permission. Includes all kinds of extensions, including component and unpacked extensions. Recorded during profile initialization. + + Histogram is in the process of being removed in favor of its incremented + version that emits only on profile open for "user" profiles + (profiles where people can install extensions, specifically profiles that + can have non-component extensions installed). </summary> </histogram> @@ -4704,18 +4668,17 @@ <histogram name="Extensions.WebRequestCount" units="extensions" expires_after="2023-07-07"> - <obsolete> - Histogram is in the process of being removed in favor of its incremented - version that emits only on profile open for "user" profiles - (profiles where people can install extensions, specifically profiles that - can have non-component extensions installed). - </obsolete> <owner>rdevlin.cronin@chromium.org</owner> <owner>src/extensions/OWNERS</owner> <summary> Number of enabled extensions which have requested the "webRequest" permission. Includes all kinds of extensions, including component and unpacked extensions. Recorded during profile initialization. + + Histogram is in the process of being removed in favor of its incremented + version that emits only on profile open for "user" profiles + (profiles where people can install extensions, specifically profiles that + can have non-component extensions installed). </summary> </histogram> @@ -4857,18 +4820,17 @@ <histogram name="ExtensionToolbarModel.BrowserActionsCount" units="actions" expires_after="2023-07-07"> - <obsolete> - Histogram is in the process of being removed in favor of its incremented - version that emits only on profile open for "user" profiles - (profiles where people can install extensions, specifically profiles that - can have non-component extensions installed). - </obsolete> <owner>rdevlin.cronin@chromium.org</owner> <owner>extensions-core@chromium.org</owner> <summary> The total number of extensions that have an icon in the extension toolbar, including those that are unpinned and only show in the extensions menu. Measured once per (non-incognito) profile open. + + Histogram is in the process of being removed in favor of its incremented + version that emits only on profile open for "user" profiles + (profiles where people can install extensions, specifically profiles that + can have non-component extensions installed). </summary> </histogram>
diff --git a/tools/metrics/histograms/metadata/history/histograms.xml b/tools/metrics/histograms/metadata/history/histograms.xml index e9c8790..338cac8 100644 --- a/tools/metrics/histograms/metadata/history/histograms.xml +++ b/tools/metrics/histograms/metadata/history/histograms.xml
@@ -577,7 +577,7 @@ </histogram> <histogram - name="History.Clusters.Backend.ClusterSimilarityHeuristicsProcessor.ClusterSearchTermOverridden" + name="History.Clusters.Backend.ClusterSimilarityHeuristicsProcessor.ClusterSearchTermOverriden" enum="Boolean" expires_after="2024-01-31"> <owner>sophiechang@chromium.org</owner> <owner>chrome-journeys@google.com</owner>
diff --git a/tools/metrics/histograms/metadata/network/histograms.xml b/tools/metrics/histograms/metadata/network/histograms.xml index 833b1ffc..d47e4bbe 100644 --- a/tools/metrics/histograms/metadata/network/histograms.xml +++ b/tools/metrics/histograms/metadata/network/histograms.xml
@@ -711,20 +711,6 @@ </token> </histogram> -<histogram name="Network.Ash.{NetworkType}.ConnectionResult.All" - enum="ShillConnectResult" expires_after="2024-05-05"> - <owner>hsuregan@chromium.org</owner> - <owner>cros-connectivity@google.com</owner> - <summary> - Tracks the result of all Network connection attempts. A success is emitted - when a network of type {NetworkType} becomes connected from a non-connected - state. When a network of type {NetworkType} goes from a connecting state to - a disconnected state without a user initiated disconnect, a shill failure - reason is emitted. - </summary> - <token key="NetworkType" variants="AshNetworkType"/> -</histogram> - <histogram name="Network.Ash.{NetworkType}.ConnectionResult.NonUserInitiated" enum="ShillConnectResult" expires_after="2024-03-17"> <owner>jiajunz@chromium.org</owner> @@ -748,6 +734,26 @@ <token key="NetworkType" variants="AshNetworkType"/> </histogram> +<histogram name="Network.Ash.{NetworkType}.ConnectionResult.{Filtering}" + enum="ShillConnectResult" expires_after="2024-03-03"> + <owner>hsuregan@chromium.org</owner> + <owner>cros-connectivity@google.com</owner> + <summary> + Tracks the result of all Network connection attempts, it also tracks tracks + non repeated connection errors. A success is emitted when a network of type + {NetworkType} becomes connected from a non-connected state. When a network + of type {NetworkType} goes from a connecting state to a disconnected state + without a user initiated disconnect, a shill failure reason is emitted. + {Filtering} is not emitted if the network has if the current error is the + same as the previous error. + </summary> + <token key="Filtering"> + <variant name="All"/> + <variant name="Filtered"/> + </token> + <token key="NetworkType" variants="AshNetworkType"/> +</histogram> + <histogram name="Network.Ash.{NetworkType}.DisconnectionsWithoutUserAction" enum="NetworkConnectionState" expires_after="2024-05-05"> <owner>hsuregan@chromium.org</owner>
diff --git a/tools/metrics/histograms/metadata/new_tab_page/histograms.xml b/tools/metrics/histograms/metadata/new_tab_page/histograms.xml index 0fa207d..94c6c38a 100644 --- a/tools/metrics/histograms/metadata/new_tab_page/histograms.xml +++ b/tools/metrics/histograms/metadata/new_tab_page/histograms.xml
@@ -994,7 +994,7 @@ </histogram> <histogram name="NewTabPage.Module.Click" enum="ModuleTypeOnStartAndNTP" - expires_after="2024-03-17"> + expires_after="2024-05-07"> <owner>hanxi@chromium.org</owner> <owner>xinyiji@chromium.org</owner> <summary> @@ -1623,7 +1623,7 @@ <histogram name="NewTabPage.SearchResumptionModule.NotShown" enum="SearchResumptionModule.ModuleNotShownReason" - expires_after="2024-01-14"> + expires_after="2024-05-07"> <owner>hanxi@chromium.org</owner> <owner>xinyiji@chromium.org</owner> <summary> @@ -1634,7 +1634,7 @@ </histogram> <histogram name="NewTabPage.SearchResumptionModule.Show" - enum="SearchResumptionModule.ModuleShowStatus" expires_after="2023-11-19"> + enum="SearchResumptionModule.ModuleShowStatus" expires_after="2024-05-07"> <owner>hanxi@chromium.org</owner> <owner>xinyiji@chromium.org</owner> <summary> @@ -1645,7 +1645,7 @@ </histogram> <histogram name="NewTabPage.SearchResumptionModule.Show.Cached" - enum="SearchResumptionModule.ModuleShowStatus" expires_after="2023-12-24"> + enum="SearchResumptionModule.ModuleShowStatus" expires_after="2024-05-07"> <owner>hanxi@chromium.org</owner> <owner>xinyiji@chromium.org</owner> <summary>
diff --git a/tools/metrics/histograms/metadata/page/histograms.xml b/tools/metrics/histograms/metadata/page/histograms.xml index f8af885a6..1307d06 100644 --- a/tools/metrics/histograms/metadata/page/histograms.xml +++ b/tools/metrics/histograms/metadata/page/histograms.xml
@@ -101,17 +101,16 @@ <histogram name="PageActionController.ExtensionsWithPageActions" units="units" expires_after="2023-07-07"> - <obsolete> - Histogram is in the process of being removed in in favor of - Extensions.ExtensionsWithPageActions that emits only on profile open for - "user" profiles (profiles where people can install extensions, - specifically profiles that can have non-component extensions installed). - </obsolete> <owner>rdevlin.cronin@chromium.org</owner> <owner>extensions-core@chromium.org</owner> <summary> The number of Extensions that have Page Actions. Measured once per profile open. + + Histogram is in the process of being removed in in favor of + Extensions.ExtensionsWithPageActions that emits only on profile open for + "user" profiles (profiles where people can install extensions, + specifically profiles that can have non-component extensions installed). </summary> </histogram>
diff --git a/tools/metrics/histograms/metadata/startup/histograms.xml b/tools/metrics/histograms/metadata/startup/histograms.xml index daed0c2..cfb8dd0 100644 --- a/tools/metrics/histograms/metadata/startup/histograms.xml +++ b/tools/metrics/histograms/metadata/startup/histograms.xml
@@ -56,7 +56,7 @@ </histogram> <histogram name="Startup.Android.CachedFeedVisibilityConsistency" - enum="BooleanConsistent" expires_after="2024-03-17"> + enum="BooleanConsistent" expires_after="2024-05-07"> <owner>hanxi@chromium.org</owner> <owner>wychen@chromium.org</owner> <summary> @@ -324,8 +324,9 @@ </histogram> <histogram name="Startup.Android.DurationSinceLastBackgroundTime" units="ms" - expires_after="2024-03-17"> + expires_after="2024-05-07"> <owner>hanxi@chromium.org</owner> + <owner>xinyiji@chromium.org</owner> <summary> Android: The elapsed time from the last time when Chrome goes to background till it becomes foreground again. The histogram is recorded when @@ -383,7 +384,7 @@ </histogram> <histogram base="true" name="Startup.Android.FeedContentFirstLoadedTime" - units="ms" expires_after="2023-11-12"> + units="ms" expires_after="2024-05-07"> <!-- Name completed by histogram_suffixes name="JavaStartMode" --> <owner>hanxi@chromium.org</owner> @@ -397,7 +398,7 @@ </histogram> <histogram name="Startup.Android.FeedsLoadingPlaceholderShown.Instant" - units="ms" expires_after="2023-11-12"> + units="ms" expires_after="2024-05-07"> <owner>hanxi@chromium.org</owner> <owner>wychen@chromium.org</owner> <summary> @@ -409,7 +410,7 @@ </histogram> <histogram base="true" name="Startup.Android.FeedStreamCreatedTime" units="ms" - expires_after="2024-01-14"> + expires_after="2024-05-07"> <!-- Name completed by histogram_suffixes name="JavaStartMode" --> <owner>hanxi@chromium.org</owner> @@ -422,7 +423,7 @@ </histogram> <histogram base="true" name="Startup.Android.FirstDrawCompletedTime" units="ms" - expires_after="2024-03-17"> + expires_after="2024-05-07"> <!-- Name completed by histogram_suffixes name="JavaStartMode" --> <owner>hanxi@chromium.org</owner> @@ -443,7 +444,7 @@ </histogram> <histogram name="Startup.Android.IsHomepagePolicyManagerInitialized" - enum="Boolean" expires_after="2024-03-17"> + enum="Boolean" expires_after="2024-05-07"> <owner>hanxi@chromium.org</owner> <owner>xinyiji@chromium.org</owner> <summary> @@ -455,7 +456,7 @@ </histogram> <histogram name="Startup.Android.IsLastBackgroundTimeLogged" enum="Boolean" - expires_after="2024-03-17"> + expires_after="2024-05-07"> <owner>hanxi@chromium.org</owner> <owner>xinyiji@chromium.org</owner> <summary> @@ -466,7 +467,7 @@ </histogram> <histogram name="Startup.Android.IsLastVisibleTimeLogged" enum="Boolean" - expires_after="2024-03-17"> + expires_after="2024-05-07"> <owner>hanxi@chromium.org</owner> <owner>xinyiji@chromium.org</owner> <summary> @@ -476,7 +477,7 @@ </histogram> <histogram name="Startup.Android.LastVisitedTabIsSRPWhenOverviewShownAtLaunch" - enum="Boolean" expires_after="2023-11-12"> + enum="Boolean" expires_after="2024-05-07"> <owner>hanxi@chromium.org</owner> <owner>fredmello@chromium.org</owner> <summary> @@ -499,7 +500,7 @@ </histogram> <histogram base="true" name="Startup.Android.SingleTabTitleAvailableTime" - units="ms" expires_after="2023-11-12"> + units="ms" expires_after="2024-05-07"> <!-- Name completed by histogram_suffixes name="JavaStartMode" --> <owner>hanxi@chromium.org</owner> @@ -513,7 +514,7 @@ </histogram> <histogram name="Startup.Android.StartSurfaceShownAtStartup" enum="Boolean" - expires_after="2024-03-17"> + expires_after="2024-05-07"> <owner>hanxi@chromium.org</owner> <owner>wychen@chromium.org</owner> <summary>
diff --git a/tools/metrics/ukm/ukm.xml b/tools/metrics/ukm/ukm.xml index a3f1ffa..26c187d 100644 --- a/tools/metrics/ukm/ukm.xml +++ b/tools/metrics/ukm/ukm.xml
@@ -23575,6 +23575,23 @@ </metric> </event> +<event name="Shopping.PDPStateWithLocalInfo"> + <owner>yuezhanggg@chromium.org</owner> + <owner>mdjones@chromium.org</owner> + <summary> + Records if and how a page has been determined to be a product details page. + It is recorded per eligible navigation (e.g. limited to main frame + navigation, http/https check, etc), and is recorded after the page has + finished loading. + </summary> + <metric name="PDPState" enum="ShoppingPDPDetectionMethod"> + <summary> + The state of if and how the page has been determined to be a product + details page. + </summary> + </metric> +</event> + <event name="Shopping.WillSendRequest"> <owner>wychen@chromium.org</owner> <owner>yuezhanggg@chromium.org</owner>
diff --git a/tools/perf/core/perfetto_binary_roller/binary_deps.json b/tools/perf/core/perfetto_binary_roller/binary_deps.json index 525e231..93ffb6b 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": "perfetto-luci-artifacts/3f522a981c45dc5d735a5e5d775c70188adff93c/linux-arm64/trace_processor_shell" }, "win": { - "hash": "3278660bc464fdcf9996fea926382e9c3428758b", - "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/win/72cd237dbedb3812a44305f923a1f149c108cf38/trace_processor_shell.exe" + "hash": "ab3c500c3e5045467c3dbeb41518a2ca76397cfa", + "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/win/7e1ff250095383dbac1d56a8ed4f9e3c04e5dccd/trace_processor_shell.exe" }, "linux_arm": { "hash": "a6d798c6ea35705f2ab9ace2b224c32e376eb0ce", "full_remote_path": "perfetto-luci-artifacts/3f522a981c45dc5d735a5e5d775c70188adff93c/linux-arm/trace_processor_shell" }, "mac": { - "hash": "1c705b9cfdd0ff4190d1fa8beff955d57e55575a", - "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/mac/dde07b7899f1ab725df391faae30ca613ac675e0/trace_processor_shell" + "hash": "4911320188a07618ebb0fc34e09a1585d1a9171c", + "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/mac/eb35cbb649ff1783255dc348e2340bbd9b58f687/trace_processor_shell" }, "mac_arm64": { "hash": "cc287491e9ff9fe2c4866e5574eaea04134895a0", "full_remote_path": "perfetto-luci-artifacts/v38.0/mac-arm64/trace_processor_shell" }, "linux": { - "hash": "37309fa676913ff65bbc90f0c6d6507deee275f2", - "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/linux/7e1ff250095383dbac1d56a8ed4f9e3c04e5dccd/trace_processor_shell" + "hash": "91699aa204a72ab9fc095dee476148c6a605d4f2", + "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/linux/eb35cbb649ff1783255dc348e2340bbd9b58f687/trace_processor_shell" } }, "power_profile.sql": {
diff --git a/ui/base/accelerators/mojom/BUILD.gn b/ui/base/accelerators/mojom/BUILD.gn index 7a3569f..cb01abab 100644 --- a/ui/base/accelerators/mojom/BUILD.gn +++ b/ui/base/accelerators/mojom/BUILD.gn
@@ -14,7 +14,6 @@ # Generate TypeScript WebUI bindings and JavaScript legacy JS bindings (for # Blink). webui_module_path = "chrome://resources/mojo/ui/base/accelerators/mojom" - use_typescript_sources = true generate_legacy_js_bindings = true cpp_typemaps = [
diff --git a/ui/base/clipboard/clipboard_data_unittest.cc b/ui/base/clipboard/clipboard_data_unittest.cc index 93396bf5..1895a01 100644 --- a/ui/base/clipboard/clipboard_data_unittest.cc +++ b/ui/base/clipboard/clipboard_data_unittest.cc
@@ -6,7 +6,7 @@ #include <memory> -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/abseil-cpp/absl/types/optional.h" #include "ui/base/clipboard/clipboard_util.h"
diff --git a/ui/base/clipboard/file_info.h b/ui/base/clipboard/file_info.h index e6c5a04..69dd081 100644 --- a/ui/base/clipboard/file_info.h +++ b/ui/base/clipboard/file_info.h
@@ -9,7 +9,7 @@ #include "base/component_export.h" #include "base/files/file_path.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" namespace ui {
diff --git a/ui/base/clipboard/url_file_parser.h b/ui/base/clipboard/url_file_parser.h index 62cb21c45..82fa957 100644 --- a/ui/base/clipboard/url_file_parser.h +++ b/ui/base/clipboard/url_file_parser.h
@@ -8,7 +8,7 @@ #include <cstddef> #include <string> -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" namespace ui::clipboard_util::internal {
diff --git a/ui/base/dragdrop/os_exchange_data_provider_non_backed_unittest.cc b/ui/base/dragdrop/os_exchange_data_provider_non_backed_unittest.cc index 2358ef38..e7948982 100644 --- a/ui/base/dragdrop/os_exchange_data_provider_non_backed_unittest.cc +++ b/ui/base/dragdrop/os_exchange_data_provider_non_backed_unittest.cc
@@ -9,7 +9,7 @@ #include "base/files/file_path.h" #include "base/logging.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/strings/utf_string_conversions.h" #include "build/chromeos_buildflags.h" #include "testing/gtest/include/gtest/gtest.h"
diff --git a/ui/base/ime/utf_offset.h b/ui/base/ime/utf_offset.h index 3292442b..f32a058985 100644 --- a/ui/base/ime/utf_offset.h +++ b/ui/base/ime/utf_offset.h
@@ -6,7 +6,7 @@ #define UI_BASE_IME_UTF_OFFSET_H_ #include "base/component_export.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "third_party/abseil-cpp/absl/types/optional.h" namespace ui {
diff --git a/ui/base/interaction/interaction_sequence.h b/ui/base/interaction/interaction_sequence.h index e9c71330..b472acc 100644 --- a/ui/base/interaction/interaction_sequence.h +++ b/ui/base/interaction/interaction_sequence.h
@@ -13,7 +13,6 @@ #include "base/memory/raw_ptr.h" #include "base/memory/weak_ptr.h" #include "base/strings/string_piece.h" -#include "base/strings/string_piece_forward.h" #include "third_party/abseil-cpp/absl/types/optional.h" #include "third_party/abseil-cpp/absl/types/variant.h" #include "ui/base/interaction/element_identifier.h"
diff --git a/ui/base/interaction/interactive_test.cc b/ui/base/interaction/interactive_test.cc index 7c6528e..2b68579 100644 --- a/ui/base/interaction/interactive_test.cc +++ b/ui/base/interaction/interactive_test.cc
@@ -10,7 +10,7 @@ #include "base/functional/callback_helpers.h" #include "base/functional/overloaded.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversions.h" #include "base/test/scoped_run_loop_timeout.h"
diff --git a/ui/base/interaction/interactive_test_internal.cc b/ui/base/interaction/interactive_test_internal.cc index 9c6b445d..32e7dce 100644 --- a/ui/base/interaction/interactive_test_internal.cc +++ b/ui/base/interaction/interactive_test_internal.cc
@@ -11,7 +11,7 @@ #include "base/containers/contains.h" #include "base/functional/bind.h" #include "base/functional/overloaded.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/strings/stringprintf.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/abseil-cpp/absl/types/variant.h"
diff --git a/ui/base/interaction/interactive_test_internal.h b/ui/base/interaction/interactive_test_internal.h index befb20c7..3b6b641f9 100644 --- a/ui/base/interaction/interactive_test_internal.h +++ b/ui/base/interaction/interactive_test_internal.h
@@ -18,7 +18,7 @@ #include "base/logging.h" #include "base/no_destructor.h" #include "base/strings/strcat.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/task/single_thread_task_runner.h" #include "base/test/bind.h" #include "base/test/rectify_callback.h"
diff --git a/ui/base/mojom/BUILD.gn b/ui/base/mojom/BUILD.gn index f6d132b..cf55560 100644 --- a/ui/base/mojom/BUILD.gn +++ b/ui/base/mojom/BUILD.gn
@@ -72,9 +72,6 @@ export_header_blink = "third_party/blink/public/platform/web_common.h" webui_module_path = "chrome://resources/mojo/ui/base/mojom" - # Generate WebUI bindings in TypeScript. - use_typescript_sources = true - # Generate legacy bindings for Blink. generate_legacy_js_bindings = true }
diff --git a/ui/display/manager/display_change_observer_unittest.cc b/ui/display/manager/display_change_observer_unittest.cc index 7661a4b..c11ff77b 100644 --- a/ui/display/manager/display_change_observer_unittest.cc +++ b/ui/display/manager/display_change_observer_unittest.cc
@@ -11,7 +11,7 @@ #include <tuple> #include "base/command_line.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/strings/stringprintf.h" #include "base/test/gtest_util.h" #include "base/test/scoped_command_line.h"
diff --git a/ui/display/manager/managed_display_info.cc b/ui/display/manager/managed_display_info.cc index 0e16ca2..3c3b41ee 100644 --- a/ui/display/manager/managed_display_info.cc +++ b/ui/display/manager/managed_display_info.cc
@@ -13,7 +13,7 @@ #include "base/logging.h" #include "base/notreached.h" #include "base/strings/string_number_conversions.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/strings/string_split.h" #include "base/strings/stringprintf.h" #include "build/build_config.h"
diff --git a/ui/display/util/gpu_info_util.h b/ui/display/util/gpu_info_util.h index 83cf1e47..0c74cfba 100644 --- a/ui/display/util/gpu_info_util.h +++ b/ui/display/util/gpu_info_util.h
@@ -5,7 +5,7 @@ #ifndef UI_DISPLAY_UTIL_GPU_INFO_UTIL_H_ #define UI_DISPLAY_UTIL_GPU_INFO_UTIL_H_ -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/values.h" namespace display {
diff --git a/ui/events/ash/mojom/BUILD.gn b/ui/events/ash/mojom/BUILD.gn index 786a9b9..13b6dcc7 100644 --- a/ui/events/ash/mojom/BUILD.gn +++ b/ui/events/ash/mojom/BUILD.gn
@@ -8,7 +8,6 @@ mojom("mojom") { webui_module_path = "/" - use_typescript_sources = true generate_legacy_js_bindings = true sources = [ "extended_fkeys_modifier.mojom",
diff --git a/ui/events/mojom/BUILD.gn b/ui/events/mojom/BUILD.gn index 16989cc4..8ecab3d 100644 --- a/ui/events/mojom/BUILD.gn +++ b/ui/events/mojom/BUILD.gn
@@ -82,7 +82,6 @@ # Generate TypeScript WebUI bindings and JavaScript legacy JS bindings (for # Blink). webui_module_path = "chrome://resources/mojo/ui/events/mojom" - use_typescript_sources = true generate_legacy_js_bindings = true }
diff --git a/ui/gfx/codec/jpeg_codec.cc b/ui/gfx/codec/jpeg_codec.cc index 62005fc..075debf88 100644 --- a/ui/gfx/codec/jpeg_codec.cc +++ b/ui/gfx/codec/jpeg_codec.cc
@@ -172,7 +172,7 @@ // We set up the normal JPEG error routines, then override error_exit. // This must be done before the call to jpeg_create_decompress. - CoderErrorMgr errmgr; + CoderErrorMgr errmgr = {}; cinfo->err = jpeg_std_error(&errmgr.pub); errmgr.pub.error_exit = ErrorExit; // Establish the setjmp return context for ErrorExit to use.
diff --git a/ui/gfx/font_fallback.h b/ui/gfx/font_fallback.h index 795544ac..419f3bcb 100644 --- a/ui/gfx/font_fallback.h +++ b/ui/gfx/font_fallback.h
@@ -8,7 +8,7 @@ #include <string> #include <vector> -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "build/build_config.h" #include "ui/gfx/font.h" #include "ui/gfx/gfx_export.h"
diff --git a/ui/gfx/geometry/mojom/BUILD.gn b/ui/gfx/geometry/mojom/BUILD.gn index 96377bb..5c7d6fe 100644 --- a/ui/gfx/geometry/mojom/BUILD.gn +++ b/ui/gfx/geometry/mojom/BUILD.gn
@@ -78,7 +78,6 @@ cpp_typemaps = [ shared_cpp_typemap ] blink_cpp_typemaps = [ shared_cpp_typemap ] webui_module_path = "chrome://resources/mojo/ui/gfx/geometry/mojom" - use_typescript_sources = true generate_legacy_js_bindings = true }
diff --git a/ui/gfx/image/mojom/BUILD.gn b/ui/gfx/image/mojom/BUILD.gn index e174c49a..33b2f94b 100644 --- a/ui/gfx/image/mojom/BUILD.gn +++ b/ui/gfx/image/mojom/BUILD.gn
@@ -9,9 +9,6 @@ webui_module_path = "chrome://resources/mojo/ui/gfx/image/mojom" - # Generate WebUI bindings in TypeScript. - use_typescript_sources = true - # Used by content/common so need legacy JS bindings for Blink. generate_legacy_js_bindings = true
diff --git a/ui/gfx/range/mojom/BUILD.gn b/ui/gfx/range/mojom/BUILD.gn index fb5c2c4..4508a80 100644 --- a/ui/gfx/range/mojom/BUILD.gn +++ b/ui/gfx/range/mojom/BUILD.gn
@@ -31,7 +31,6 @@ # Generate WebUI bindings in TypeScript and generate legacy JS bindings in # JavaScript for Blink. webui_module_path = "chrome://resources/mojo/ui/gfx/range/mojom" - use_typescript_sources = true generate_legacy_js_bindings = true }
diff --git a/ui/gl/dc_layer_tree.h b/ui/gl/dc_layer_tree.h index 9a6b913..5cff6dc 100644 --- a/ui/gl/dc_layer_tree.h +++ b/ui/gl/dc_layer_tree.h
@@ -48,6 +48,11 @@ gfx::Size video_input_size; gfx::Size video_output_size; + bool GetDriverSupportsVpAutoHdr() { return driver_supports_vp_auto_hdr; } + void SetDriverSupportsVpAutoHdr(bool value) { + driver_supports_vp_auto_hdr = value; + } + // The video processor is cached so SwapChains don't have to recreate it // whenever they're created. Microsoft::WRL::ComPtr<ID3D11VideoDevice> video_device; @@ -55,6 +60,10 @@ Microsoft::WRL::ComPtr<ID3D11VideoProcessor> video_processor; Microsoft::WRL::ComPtr<ID3D11VideoProcessorEnumerator> video_processor_enumerator; + + private: + // Whether the GPU driver supports video processor auto HDR. + bool driver_supports_vp_auto_hdr = false; }; class SolidColorSurface; @@ -527,6 +536,7 @@ // Store the largest video processor to avoid problems in // (http://crbug.com/1121061) and (http://crbug.com/1472975). VideoProcessorWrapper video_processor_wrapper_; + // To reduce resource usage, we keep track of the largest input/output // dimensions for several last VideoProcessor usages. All 4 dimensions must be // tracked separately.
diff --git a/ui/gl/swap_chain_presenter.cc b/ui/gl/swap_chain_presenter.cc index 7e20e257..d0fe762 100644 --- a/ui/gl/swap_chain_presenter.cc +++ b/ui/gl/swap_chain_presenter.cc
@@ -1793,9 +1793,12 @@ video_processor_wrapper->video_processor; if (video_processor_recreated) { - driver_supports_vp_auto_hdr_ = GpuDriverSupportsVpAutoHDR( + bool supports_vp_auto_hdr = GpuDriverSupportsVpAutoHDR( gpu_vendor_id_, video_context.Get(), video_processor.Get()); + video_processor_wrapper->SetDriverSupportsVpAutoHdr(supports_vp_auto_hdr); } + bool driver_supports_vp_auto_hdr = + video_processor_wrapper->GetDriverSupportsVpAutoHdr(); Microsoft::WRL::ComPtr<IDXGISwapChain3> swap_chain3; Microsoft::WRL::ComPtr<ID3D11VideoContext1> context1; @@ -1905,7 +1908,7 @@ } if (enable_vp_auto_hdr_) { - hr = ToggleVpAutoHDR(gpu_vendor_id_, driver_supports_vp_auto_hdr_, + hr = ToggleVpAutoHDR(gpu_vendor_id_, driver_supports_vp_auto_hdr, video_context.Get(), video_processor.Get(), use_vp_auto_hdr); if (FAILED(hr)) { @@ -1978,7 +1981,7 @@ "after it failed with error 0x" << std::hex << hr; - ToggleVpAutoHDR(gpu_vendor_id_, driver_supports_vp_auto_hdr_, + ToggleVpAutoHDR(gpu_vendor_id_, driver_supports_vp_auto_hdr, video_context.Get(), video_processor.Get(), false); if (!RevertSwapChainToSDR(video_device, video_processor,
diff --git a/ui/gl/swap_chain_presenter.h b/ui/gl/swap_chain_presenter.h index 424831fb..ba53e18 100644 --- a/ui/gl/swap_chain_presenter.h +++ b/ui/gl/swap_chain_presenter.h
@@ -328,7 +328,6 @@ bool enable_vp_auto_hdr_ = false; bool enable_vp_super_resolution_ = false; - bool driver_supports_vp_auto_hdr_ = false; UINT gpu_vendor_id_ = 0;
diff --git a/ui/latency/latency_tracker.cc b/ui/latency/latency_tracker.cc index c800293..8c1110c1 100644 --- a/ui/latency/latency_tracker.cc +++ b/ui/latency/latency_tracker.cc
@@ -11,7 +11,7 @@ #include "base/metrics/histogram_macros.h" #include "base/notreached.h" #include "base/strings/strcat.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/time/time.h" #include "services/metrics/public/cpp/ukm_entry_builder.h" #include "services/metrics/public/cpp/ukm_recorder.h"
diff --git a/ui/latency/latency_tracker.h b/ui/latency/latency_tracker.h index 326c727..bc8a626 100644 --- a/ui/latency/latency_tracker.h +++ b/ui/latency/latency_tracker.h
@@ -5,7 +5,7 @@ #ifndef UI_LATENCY_LATENCY_TRACKER_H_ #define UI_LATENCY_LATENCY_TRACKER_H_ -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/time/time.h" #include "ui/latency/latency_info.h"
diff --git a/ui/latency/mojom/BUILD.gn b/ui/latency/mojom/BUILD.gn index 455d0e27..a3901253 100644 --- a/ui/latency/mojom/BUILD.gn +++ b/ui/latency/mojom/BUILD.gn
@@ -47,7 +47,6 @@ # Generate WebUI bindings in TypeScript and legacy bindings in JS (for Blink) webui_module_path = "chrome://resources/mojo/ui/latency/mojom" - use_typescript_sources = true generate_legacy_js_bindings = true }
diff --git a/ui/ozone/platform/drm/gpu/screen_manager.cc b/ui/ozone/platform/drm/gpu/screen_manager.cc index cfc7ef7c..68bf522 100644 --- a/ui/ozone/platform/drm/gpu/screen_manager.cc +++ b/ui/ozone/platform/drm/gpu/screen_manager.cc
@@ -15,7 +15,7 @@ #include "base/logging.h" #include "base/strings/strcat.h" #include "base/strings/string_number_conversions.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/trace_event/common/trace_event_common.h" #include "base/trace_event/trace_event.h" #include "base/values.h"
diff --git a/ui/views/interaction/element_tracker_views.h b/ui/views/interaction/element_tracker_views.h index 0c87015d..e2c0f4b4 100644 --- a/ui/views/interaction/element_tracker_views.h +++ b/ui/views/interaction/element_tracker_views.h
@@ -14,7 +14,7 @@ #include "base/memory/raw_ptr.h" #include "base/no_destructor.h" #include "base/scoped_multi_source_observation.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "ui/base/interaction/element_identifier.h" #include "ui/base/interaction/element_tracker.h" #include "ui/views/view_utils.h"
diff --git a/ui/views/interaction/interactive_views_test.h b/ui/views/interaction/interactive_views_test.h index f9b3b29..2d76b8d0 100644 --- a/ui/views/interaction/interactive_views_test.h +++ b/ui/views/interaction/interactive_views_test.h
@@ -14,7 +14,7 @@ #include "base/callback_list.h" #include "base/functional/callback.h" #include "base/memory/raw_ptr.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/strings/stringprintf.h" #include "base/test/bind.h" #include "base/time/time.h"
diff --git a/ui/views/win/test_support/fake_ipointer_point.cc b/ui/views/win/test_support/fake_ipointer_point.cc index 72df162..0323768 100644 --- a/ui/views/win/test_support/fake_ipointer_point.cc +++ b/ui/views/win/test_support/fake_ipointer_point.cc
@@ -12,7 +12,7 @@ #include "base/check_op.h" #include "base/notreached.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/strings/utf_string_conversions.h" #include "base/win/win_util.h" #include "ui/views/win/test_support/fake_ipointer_point_properties.h"
diff --git a/ui/views/win/test_support/fake_ipointer_point_properties.cc b/ui/views/win/test_support/fake_ipointer_point_properties.cc index 3a2373a0..9f09f37 100644 --- a/ui/views/win/test_support/fake_ipointer_point_properties.cc +++ b/ui/views/win/test_support/fake_ipointer_point_properties.cc
@@ -12,7 +12,7 @@ #include "base/check_op.h" #include "base/notreached.h" -#include "base/strings/string_piece_forward.h" +#include "base/strings/string_piece.h" #include "base/strings/utf_string_conversions.h" #include "base/win/win_util.h"
diff --git a/ui/webui/resources/cr_elements/chromeos/cros_color_overrides.css b/ui/webui/resources/cr_elements/chromeos/cros_color_overrides.css index ba803c46..2b6c81f14 100644 --- a/ui/webui/resources/cr_elements/chromeos/cros_color_overrides.css +++ b/ui/webui/resources/cr_elements/chromeos/cros_color_overrides.css
@@ -8,20 +8,25 @@ * #css_wrapper_metadata_end */ /* -Style Module that defines overrides for cr-elements on ChromeOS. This file -plumbs semantic colors and fonts into cr-elements. - -To get ChromeOS System colors, an element must: -- be beneath a <html> element with a "cros" attribute -- have a <style include="cros-color-overrides"> module in its style module list -- import the following URL in JS/TS - //resources/cr_elements/chromeos/cros_color_overrides.css.js - -To get ChromeOS Jelly colors, an element must: -- have an ancestor <body> element with the "jelly-enabled" class -- include "cros-color-overrides" style module in HTML -- import "//resources/cr_elements/chromeos/cros_color_overrides.css.js" in JS/TS -*/ + * Style Module that defines overrides for cr-elements on ChromeOS. This file + * plumbs semantic colors and fonts into cr-elements. + * + * To get ChromeOS System colors, an element must: + * 1) Have an ancestor element with the "cros" attribute in the <html> tag. + * 2) Import the "cros_color_overrides.css.js" CSS wrapper file in JS/TS. + * 3) Include the "cros-color-overrides" style module in HTML. + * + * To get ChromeOS Jelly colors, an element must: + * 1) Have an ancestor element with the "jelly-enabled" class in the <body> tag. + * 2) Import the "cros_color_overrides.css.js" CSS wrapper file in JS/TS. + * 3) Include the "cros-color-overrides" style module in HTML. + * + * To apply ChromeOS overrides for Chrome Refresh 2023 styles, an element must: + * 1) Have an ancestor element with both the "cros" and "chrome-refresh-2023" + * attributes in the <html> tag. + * 2) Import the "cros_color_overrides.css.js" CSS wrapper file in JS/TS. + * 3) Include the "cros-color-overrides" style module in HTML. + */ :host-context([cros]) a:not(.item)[href] { color: var(--cros-link-color); @@ -297,9 +302,31 @@ --cr-toggle-unchecked-ripple-color: var(--cros-sys-hover_on_prominent); /* TODO(b/266837484) Replace with cros.sys.app-elevation1 when available */ --cr-toggle-box-shadow: var(--cros-elevation-1-shadow); + + /* Focus state */ + --cr-toggle-ripple-ring: 2px solid var(--cros-sys-focus_ring); --cr-toggle-ripple-diameter: 32px; } -:host-context(body.jelly-enabled) cr-toggle:focus { - --cr-toggle-ripple-ring: 2px solid var(--cros-sys-focus_ring); +:host-context([cros][chrome-refresh-2023]) cr-toggle { + --cr-toggle-bar-width: 32px; + --cr-toggle-knob-diameter: 12px; + --cr-toggle-bar-border: none; + + /* "On" state */ + --cr-toggle-checked-bar-color: var(--cros-sys-primary); + --cr-toggle-checked-button-color: var(--cros-sys-on_primary); + + /* "Off" state */ + --cr-toggle-unchecked-bar-color: var(--cros-sys-secondary); + --cr-toggle-unchecked-button-color: var(--cros-sys-on_secondary); + + /* Hover state */ + --color-toggle-button-thumb-on-hover: var(--cros-sys-on_primary); + + /* Disabled state */ + --cr-toggle-disabled-opacity: var(--cros-disabled-opacity); + + /* Focused state */ + --cr-toggle-ripple-ring: none; }
diff --git a/ui/webui/resources/js/test_loader.ts b/ui/webui/resources/js/test_loader.ts index 91892159..1ecb88c 100644 --- a/ui/webui/resources/js/test_loader.ts +++ b/ui/webui/resources/js/test_loader.ts
@@ -5,15 +5,16 @@ // @fileoverview Helper script used to load a JS module test into a WebUI page. // // Example usage: -// chrome://welcome/test_loader.html?module=my_test.js +// chrome://welcome/test_loader.html?module=foo/my_test.js // -// will load the JS module at chrome/test/data/webui/my_test.js +// will load the JS module at chrome/test/data/webui/foo/my_test.js, through the +// chrome://webui-test/foo/my_test.js URL. // // test_loader.html and test_loader.js should be registered with the // WebUIDataSource corresponding to the WebUI being tested, such that the // testing code is loaded from the same origin. Also note that the -// chrome://test/ data source only exists in a testing context, so using this -// script in production will result in a failed network request. +// chrome://webui-test/ data source only exists in a testing context, so using +// this script in production will result in a failed network request. import {loadMochaAdapter, loadTestModule} from './test_loader_util.js';
diff --git a/v8 b/v8 index 3bd53fa..618cf8f 160000 --- a/v8 +++ b/v8
@@ -1 +1 @@ -Subproject commit 3bd53fa98e3db67d83a448339a56ee2ee7bf4af0 +Subproject commit 618cf8f6d60a45cea451dcf59bcc7d104b106613