diff --git a/DEPS b/DEPS index 281631aa..f08ae70 100644 --- a/DEPS +++ b/DEPS
@@ -308,15 +308,15 @@ # 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': 'c54b2497b10ac936aa2a059c6cd4a6548d6cb83d', + 'src_internal_revision': '3404267321471bc8c9e1d0973545aeacb791c70a', # 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': '975859a96f8f30af6047007dea3fda08cc730052', + 'skia_revision': '22d1130a2ba22beb7156d5578f1a9942d1e88bcb', # 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': '83c84674a19490aaccae706a984743473d79ba40', + 'v8_revision': '2eaa4a2641b0d19b79d02a83d1683e60894a6179', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling ANGLE # and whatever else without interference from each other. @@ -387,7 +387,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling chromium_variations # and whatever else without interference from each other. - 'chromium_variations_revision': '29da917904fd9c60196538dc50fdb21768654121', + 'chromium_variations_revision': 'e4c2c64dda26b4673256949aaa6d8baed86f8af4', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling CrossBench # and whatever else without interference from each other. @@ -403,7 +403,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling devtools-frontend # and whatever else without interference from each other. - 'devtools_frontend_revision': '170f1b62ff2ddac12ee66724127335585acc8ece', + 'devtools_frontend_revision': '3586c7113a54ede17dc840ba4213a90823e56756', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling libprotobuf-mutator # and whatever else without interference from each other. @@ -431,7 +431,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling feed # and whatever else without interference from each other. - 'quiche_revision': '792c6e7d8658d7b7b27f780efec71c67930b4c9f', + 'quiche_revision': '62f5f6c9caabe019240b2a4377090bb657012c3f', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling ios_webkit # and whatever else without interference from each other. @@ -475,7 +475,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling feed # and whatever else without interference from each other. - 'cros_components_revision': 'ba1574281c8c012e17d8adbc7758efa60eea00ed', + 'cros_components_revision': '3d5fbf62d7c7d34b1ecf72dd09577117ed370343', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling feed # and whatever else without interference from each other. @@ -831,7 +831,7 @@ 'src/clank': { 'url': Var('chrome_git') + '/clank/internal/apps.git' + '@' + - '74e2bbf3403910d0bf68bb221f5cdd390208f06a', + '71700ce427b7af336a88a02a0767b1ee1af7512b', 'condition': 'checkout_android and checkout_src_internal', }, @@ -1202,7 +1202,7 @@ Var('chromium_git') + '/devtools/devtools-frontend' + '@' + Var('devtools_frontend_revision'), 'src/third_party/devtools-frontend-internal': { - 'url': Var('chrome_git') + '/devtools/devtools-internal.git' + '@' + 'cadbad6bc7fe48b083e0d25eb6feb06fa7a02d89', + 'url': Var('chrome_git') + '/devtools/devtools-internal.git' + '@' + 'fac063701741add8c5af364fb8cfbbf13e5bdc98', 'condition': 'checkout_src_internal', }, @@ -1818,7 +1818,7 @@ 'dep_type': 'cipd', }, - 'src/third_party/vulkan-deps': '{chromium_git}/vulkan-deps@b7e3beee69a50c823ab1ab646579e3111fc9a36d', + 'src/third_party/vulkan-deps': '{chromium_git}/vulkan-deps@36da75a01950ce86a9525f7c080359710c0ee6b4', 'src/third_party/vulkan_memory_allocator': Var('chromium_git') + '/external/github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git' + '@' + '56300b29fbfcc693ee6609ddad3fdd5b7a449a21', @@ -1858,7 +1858,7 @@ Var('chromium_git') + '/external/github.com/gpuweb/cts.git' + '@' + '680c654441704480e9756124770dd683a32d13d1', 'src/third_party/webrtc': - Var('webrtc_git') + '/src.git' + '@' + '2dd6cf61fdcca1b6f7f660f4bc43296bab6fa702', + Var('webrtc_git') + '/src.git' + '@' + 'cb3f740525bca608b44fb2a5af2e8ee0190a789c', # 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.
diff --git a/ash/components/arc/BUILD.gn b/ash/components/arc/BUILD.gn index 24196cc..5efc1669 100644 --- a/ash/components/arc/BUILD.gn +++ b/ash/components/arc/BUILD.gn
@@ -444,6 +444,7 @@ "net/always_on_vpn_manager_unittest.cc", "net/arc_net_host_impl_unittest.cc", "net/arc_net_utils_unittest.cc", + "net/arc_wifi_host_impl_unittests.cc", "net/passpoint_dialog_view_unittest.cc", "pay/arc_payment_app_bridge_unittest.cc", "power/arc_power_bridge_unittest.cc",
diff --git a/ash/components/arc/net/arc_net_host_impl.h b/ash/components/arc/net/arc_net_host_impl.h index 042155c..897d7bb0 100644 --- a/ash/components/arc/net/arc_net_host_impl.h +++ b/ash/components/arc/net/arc_net_host_impl.h
@@ -68,7 +68,11 @@ // Overridden from mojom::NetHost. void GetNetworks(mojom::GetNetworksRequestType type, GetNetworksCallback callback) override; + // TODO(b/329552433): Delete this method after pi-arc is removed. + // Deprecated. ArcWifiHostImpl::GetWifiEnabledState() should be used. void GetWifiEnabledState(GetWifiEnabledStateCallback callback) override; + // TODO(b/329552433): Delete this method after pi-arc is removed. + // Deprecated. ArcWifiHostImpl::SetWifiEnabledState() should be used. void SetWifiEnabledState(bool is_enabled, SetWifiEnabledStateCallback callback) override; void StartScan() override;
diff --git a/ash/components/arc/net/arc_wifi_host_impl.cc b/ash/components/arc/net/arc_wifi_host_impl.cc index abdeffa..782c5c43 100644 --- a/ash/components/arc/net/arc_wifi_host_impl.cc +++ b/ash/components/arc/net/arc_wifi_host_impl.cc
@@ -4,48 +4,116 @@ #include "ash/components/arc/net/arc_wifi_host_impl.h" +#include "ash/components/arc/arc_browser_context_keyed_service_factory_base.h" #include "ash/components/arc/session/arc_bridge_service.h" +#include "base/memory/singleton.h" +#include "chromeos/ash/components/network/network_event_log.h" +#include "chromeos/ash/components/network/network_handler.h" +#include "chromeos/ash/components/network/network_state_handler.h" +#include "chromeos/ash/components/network/network_type_pattern.h" +#include "chromeos/ash/components/network/technology_state_controller.h" + +namespace { + +ash::NetworkStateHandler* GetStateHandler() { + return ash::NetworkHandler::Get()->network_state_handler(); +} + +ash::TechnologyStateController* GetTechnologyStateController() { + return ash::NetworkHandler::Get()->technology_state_controller(); +} + +} // namespace namespace arc { +namespace { + +// Singleton factory for ArcWifiHostImpl. +class ArcWifiHostImplFactory + : public internal::ArcBrowserContextKeyedServiceFactoryBase< + ArcWifiHostImpl, + ArcWifiHostImplFactory> { + public: + // Factory name used by ArcBrowserContextKeyedServiceFactoryBase. + static constexpr const char* kName = "ArcWifiHostImplFactory"; + + static ArcWifiHostImplFactory* GetInstance() { + return base::Singleton<ArcWifiHostImplFactory>::get(); + } + + private: + friend base::DefaultSingletonTraits<ArcWifiHostImplFactory>; + ArcWifiHostImplFactory() = default; + ~ArcWifiHostImplFactory() override = default; +}; + +} // namespace // static ArcWifiHostImpl* ArcWifiHostImpl::GetForBrowserContext( content::BrowserContext* context) { - // TODO(b/329552433): Add implementation. - return nullptr; + return ArcWifiHostImplFactory::GetForBrowserContext(context); } // static ArcWifiHostImpl* ArcWifiHostImpl::GetForBrowserContextForTesting( content::BrowserContext* context) { - // TODO(b/329552433): Add implementation. - return nullptr; + return ArcWifiHostImplFactory::GetForBrowserContextForTesting(context); } ArcWifiHostImpl::ArcWifiHostImpl(content::BrowserContext* context, ArcBridgeService* bridge_service) : arc_bridge_service_(bridge_service) { - // TODO(b/329552433): Add implementation. + arc_bridge_service_->arc_wifi()->SetHost(this); + arc_bridge_service_->arc_wifi()->AddObserver(this); } ArcWifiHostImpl::~ArcWifiHostImpl() { - // TODO(b/329552433): Add implementation. + DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); + arc_bridge_service_->arc_wifi()->RemoveObserver(this); + arc_bridge_service_->arc_wifi()->SetHost(nullptr); } // static void ArcWifiHostImpl::EnsureFactoryBuilt() { - // TODO(b/329552433): Add implementation. + ArcWifiHostImplFactory::GetInstance(); } void ArcWifiHostImpl::GetWifiEnabledState( GetWifiEnabledStateCallback callback) { - // TODO(b/329552433): Add implementation. + bool is_enabled = + GetStateHandler()->IsTechnologyEnabled(ash::NetworkTypePattern::WiFi()); + std::move(callback).Run(is_enabled); } void ArcWifiHostImpl::SetWifiEnabledState( bool is_enabled, SetWifiEnabledStateCallback callback) { - // TODO(b/329552433): Add implementation. + DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); + auto state = + GetStateHandler()->GetTechnologyState(ash::NetworkTypePattern::WiFi()); + // WiFi can't be enabled or disabled in these states. + switch (state) { + case ash::NetworkStateHandler::TECHNOLOGY_PROHIBITED: + case ash::NetworkStateHandler::TECHNOLOGY_UNINITIALIZED: + case ash::NetworkStateHandler::TECHNOLOGY_UNAVAILABLE: + // If WiFi is in above state, it is already disabled. This is a noop. + if (!is_enabled) { + std::move(callback).Run(true); + return; + } + NET_LOG(ERROR) << __func__ << ": failed due to WiFi state: " << state; + std::move(callback).Run(false); + return; + default: + break; + } + + NET_LOG(USER) << __func__ << ": " << is_enabled; + GetTechnologyStateController()->SetTechnologiesEnabled( + ash::NetworkTypePattern::WiFi(), is_enabled, + ash::network_handler::ErrorCallback()); + std::move(callback).Run(true); } } // namespace arc
diff --git a/ash/components/arc/net/arc_wifi_host_impl.h b/ash/components/arc/net/arc_wifi_host_impl.h index ea8d387..cd09a006 100644 --- a/ash/components/arc/net/arc_wifi_host_impl.h +++ b/ash/components/arc/net/arc_wifi_host_impl.h
@@ -50,6 +50,8 @@ private: const raw_ptr<ArcBridgeService> arc_bridge_service_; // Owned by ArcServiceManager. + + THREAD_CHECKER(thread_checker_); }; } // namespace arc
diff --git a/ash/components/arc/net/arc_wifi_host_impl_unittests.cc b/ash/components/arc/net/arc_wifi_host_impl_unittests.cc new file mode 100644 index 0000000..85fa260 --- /dev/null +++ b/ash/components/arc/net/arc_wifi_host_impl_unittests.cc
@@ -0,0 +1,89 @@ +// Copyright 2024 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/components/arc/net/arc_wifi_host_impl.h" + +#include <string> + +#include "ash/components/arc/session/arc_bridge_service.h" +#include "ash/components/arc/session/arc_service_manager.h" +#include "base/test/task_environment.h" +#include "base/test/test_future.h" +#include "chromeos/ash/components/dbus/hermes/hermes_euicc_client.h" +#include "chromeos/ash/components/dbus/hermes/hermes_manager_client.h" +#include "chromeos/ash/components/dbus/hermes/hermes_profile_client.h" +#include "chromeos/ash/components/dbus/shill/shill_clients.h" +#include "chromeos/ash/components/dbus/shill/shill_manager_client.h" +#include "chromeos/ash/components/network/network_handler.h" +#include "testing/gmock/include/gmock/gmock.h" +#include "testing/gtest/include/gtest/gtest.h" +#include "third_party/cros_system_api/dbus/service_constants.h" + +namespace arc { +namespace { +class ArcWifiHostImplTest : public testing::Test { + public: + ArcWifiHostImplTest(const ArcWifiHostImplTest&) = delete; + ArcWifiHostImplTest& operator=(const ArcWifiHostImplTest&) = delete; + + protected: + ArcWifiHostImplTest() + : task_environment_(base::test::TaskEnvironment::TimeSource::MOCK_TIME) {} + + ~ArcWifiHostImplTest() override = default; + + void SetUp() override { + // Required for initializing NetworkHandler. + ash::HermesProfileClient::InitializeFake(); + ash::HermesManagerClient::InitializeFake(); + ash::HermesEuiccClient::InitializeFake(); + + // Required for initializingFakeShillManagerClient. + ash::shill_clients::InitializeFakes(); + ash::ShillManagerClient::Get() + ->GetTestInterface() + ->SetupDefaultEnvironment(); + + ash::NetworkHandler::Initialize(); + + bridge_service_ = std::make_unique<ArcBridgeService>(); + service_ = + std::make_unique<ArcWifiHostImpl>(nullptr, bridge_service_.get()); + base::RunLoop().RunUntilIdle(); + } + + void TearDown() override { + service_->Shutdown(); + ash::NetworkHandler::Shutdown(); + ash::HermesEuiccClient::Shutdown(); + ash::HermesManagerClient::Shutdown(); + ash::HermesProfileClient::Shutdown(); + ash::shill_clients::Shutdown(); + } + + ArcWifiHostImpl* service() { return service_.get(); } + + private: + base::test::TaskEnvironment task_environment_; + std::unique_ptr<ArcBridgeService> bridge_service_; + std::unique_ptr<ArcWifiHostImpl> service_; +}; + +TEST_F(ArcWifiHostImplTest, ToggleWifiEnabledState) { + base::test::TestFuture<bool> future; + // Enable WiFi and get WiFi state. + service()->SetWifiEnabledState(true, future.GetCallback()); + ASSERT_TRUE(future.Take()); + service()->GetWifiEnabledState(future.GetCallback()); + ASSERT_TRUE(future.Take()); + + // Disable WiFi and get WiFi state. + service()->SetWifiEnabledState(false, future.GetCallback()); + ASSERT_TRUE(future.Take()); + service()->GetWifiEnabledState(future.GetCallback()); + ASSERT_FALSE(future.Take()); +} + +} // namespace +} // namespace arc
diff --git a/ash/constants/ash_features.cc b/ash/constants/ash_features.cc index f1ae379..185a7aea 100644 --- a/ash/constants/ash_features.cc +++ b/ash/constants/ash_features.cc
@@ -2130,7 +2130,7 @@ // Enables or disables the OOBE QuickStart flow. BASE_FEATURE(kOobeQuickStart, "OobeQuickStart", - base::FEATURE_ENABLED_BY_DEFAULT); + base::FEATURE_DISABLED_BY_DEFAULT); // Enables or disables the OOBE QuickStart flow on the login screen. BASE_FEATURE(kOobeQuickStartOnLoginScreen,
diff --git a/base/BUILD.gn b/base/BUILD.gn index 48d15bdd..dcdb66d 100644 --- a/base/BUILD.gn +++ b/base/BUILD.gn
@@ -3524,7 +3524,6 @@ "test/test_pending_task_unittest.cc", "test/test_proto_loader_unittest.cc", "test/test_waitable_event_unittest.cc", - "third_party/dynamic_annotations/dynamic_annotations_compiletest.cc", "thread_annotations_unittest.cc", "threading/hang_watcher_unittest.cc", "threading/platform_thread_unittest.cc", @@ -3618,7 +3617,6 @@ "//base/test:run_all_unittests", "//base/test:test_proto", "//base/test:test_support", - "//base/third_party/dynamic_annotations", "//build:blink_buildflags", "//build:chromecast_buildflags", "//build:chromeos_buildflags",
diff --git a/base/files/memory_mapped_file_unittest.cc b/base/files/memory_mapped_file_unittest.cc index 93969ba..b22194a 100644 --- a/base/files/memory_mapped_file_unittest.cc +++ b/base/files/memory_mapped_file_unittest.cc
@@ -9,6 +9,8 @@ #include <utility> +#include "base/containers/heap_array.h" +#include "base/containers/span.h" #include "base/files/file_path.h" #include "base/files/file_util.h" #include "testing/gtest/include/gtest/gtest.h" @@ -19,17 +21,17 @@ namespace { // Create a temporary buffer and fill it with a watermark sequence. -std::unique_ptr<uint8_t[]> CreateTestBuffer(size_t size, size_t offset) { - std::unique_ptr<uint8_t[]> buf(new uint8_t[size]); +base::HeapArray<uint8_t> CreateTestBuffer(size_t size, size_t offset) { + auto buf = base::HeapArray<uint8_t>::Uninit(size); for (size_t i = 0; i < size; ++i) - buf.get()[i] = static_cast<uint8_t>((offset + i) % 253); + buf[i] = static_cast<uint8_t>((offset + i) % 253); return buf; } // Check that the watermark sequence is consistent with the |offset| provided. bool CheckBufferContents(span<const uint8_t> bytes, size_t offset) { - std::unique_ptr<uint8_t[]> test_data(CreateTestBuffer(bytes.size(), offset)); - return memcmp(test_data.get(), bytes.data(), bytes.size()) == 0; + base::HeapArray<uint8_t> test_data(CreateTestBuffer(bytes.size(), offset)); + return test_data.as_span() == bytes; } class MemoryMappedFileTest : public PlatformTest { @@ -46,9 +48,8 @@ File::FLAG_CREATE_ALWAYS | File::FLAG_READ | File::FLAG_WRITE); EXPECT_TRUE(file.IsValid()); - std::unique_ptr<uint8_t[]> test_data(CreateTestBuffer(size, 0)); - size_t bytes_written = - file.Write(0, reinterpret_cast<char*>(test_data.get()), size); + base::HeapArray<uint8_t> test_data(CreateTestBuffer(size, 0)); + size_t bytes_written = file.Write(0, test_data.as_span()).value(); EXPECT_EQ(size, bytes_written); file.Close(); }
diff --git a/base/memory/safety_checks.h b/base/memory/safety_checks.h index 8046015..fd84b71 100644 --- a/base/memory/safety_checks.h +++ b/base/memory/safety_checks.h
@@ -17,19 +17,37 @@ #include "partition_alloc/shim/allocator_shim_default_dispatch_to_partition_alloc.h" #endif // BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) -// This header defines following macros: -// - ADVANCED_MEMORY_SAFETY_CHECKS() +// This header defines `ADVANCED_MEMORY_SAFETY_CHECKS()` macro. // They can be used to specify a class/struct that is targeted to perform // additional CHECKS across variety of memory safety mechanisms such as // PartitionAllocator. -// +// ``` // class Foo { // ADVANCED_MEMORY_SAFETY_CHECKS(); // } -// +// ``` // Checks here are disabled by default because of their performance cost. // Currently, the macro is managed by the memory safety team internally and // you should not add / remove it manually. +// +// Additional checks here are categorized into either one of enum +// `MemorySafetyCheck`. Some of them are too costly and disabled even for +// `ADVANCED_MEMORY_SAFETY_CHECKS()` annotated types. These checks can be +// enabled by passing optional arguments to the macro. +// ``` +// class Foo { +// ADVANCED_MEMORY_SAFETY_CHECKS( +// /*enable=*/ kFoo | kBar); +// } +// ``` +// It is also possible to disable default checks for annotated types. +// ``` +// class Foo { +// ADVANCED_MEMORY_SAFETY_CHECKS( +// /*enable=*/ kFoo, +// /*disable=*/ kBaz); +// } +// ``` // We cannot hide things behind anonymous namespace because they are referenced // via macro, which can be defined anywhere. @@ -37,6 +55,7 @@ namespace base::internal { enum class MemorySafetyCheck : uint32_t { + kNone = 0, kForcePartitionAlloc = (1u << 0), // Enables |FreeFlags::kSchedulerLoopQuarantine|. // Requires PA-E. @@ -59,6 +78,10 @@ static_cast<uint32_t>(b)); } +constexpr MemorySafetyCheck operator~(MemorySafetyCheck a) { + return static_cast<MemorySafetyCheck>(~static_cast<uint32_t>(a)); +} + // Set of checks for ADVANCED_MEMORY_SAFETY_CHECKS() annotated objects. constexpr auto kAdvancedMemorySafetyChecks = MemorySafetyCheck::kForcePartitionAlloc | @@ -187,10 +210,13 @@ // public: // int public_field; // }; -#define ADVANCED_MEMORY_SAFETY_CHECKS_INTERNAL(SPECIFIER) \ +#define MEMORY_SAFETY_CHECKS_INTERNAL(SPECIFIER, DEFAULT_CHECKS, \ + ENABLED_CHECKS, DISABLED_CHECKS, ...) \ public: \ - static constexpr auto kMemorySafetyChecks = \ - base::internal::kAdvancedMemorySafetyChecks; \ + static constexpr auto kMemorySafetyChecks = []() { \ + using enum base::internal::MemorySafetyCheck; \ + return (DEFAULT_CHECKS | ENABLED_CHECKS) & ~(DISABLED_CHECKS); \ + }(); \ SPECIFIER static void* operator new(std::size_t count) { \ return base::internal::HandleMemorySafetyCheckedOperatorNew< \ kMemorySafetyChecks>(count); \ @@ -220,11 +246,23 @@ #if DCHECK_IS_ON() // Specify NOINLINE to display the operator on a stack trace. -#define ADVANCED_MEMORY_SAFETY_CHECKS() \ - ADVANCED_MEMORY_SAFETY_CHECKS_INTERNAL(NOINLINE NOT_TAIL_CALLED) +// When 2 args provided, these two are passed to `ENABLED_CHECKS` and +// `DISABLED_CHECKS`. A couple of `MemorySafetyCheck::kNone` is ignored. +// When 1 arg provided, the one is passed to `ENABLED_CHECKS` and the first +// `MemorySafetyCheck::kNone` serves a default value for `DISABLED_CHECKS`. +// When 0 arg provided, both of `MemorySafetyCheck::kNone`s serve as default +// values for `ENABLED_CHECKS` and `DISABLED_CHECKS` accordingly. +#define ADVANCED_MEMORY_SAFETY_CHECKS(...) \ + MEMORY_SAFETY_CHECKS_INTERNAL( \ + NOINLINE NOT_TAIL_CALLED, \ + base::internal::kAdvancedMemorySafetyChecks __VA_OPT__(, ) __VA_ARGS__, \ + kNone, kNone) #else -#define ADVANCED_MEMORY_SAFETY_CHECKS() \ - ADVANCED_MEMORY_SAFETY_CHECKS_INTERNAL(ALWAYS_INLINE) +#define ADVANCED_MEMORY_SAFETY_CHECKS(...) \ + MEMORY_SAFETY_CHECKS_INTERNAL( \ + ALWAYS_INLINE, \ + base::internal::kAdvancedMemorySafetyChecks __VA_OPT__(, ) __VA_ARGS__, \ + kNone, kNone) #endif // DCHECK_IS_ON() // When a struct/class with `ADVANCED_MEMORY_SAFETY_CHECKS()` is inherited, a @@ -238,44 +276,33 @@ // Explicitly exports operators from given `BaseClass` to re-apply // checks specified in the parent class. This is the recommended option as // a derived class is likely to have the same characteristics to its baes -// class. +// class. This macro accepts additional arguments to overwrite +// `BaseClass`'s opted-in checks. +// ``` +// INHERIT_MEMORY_SAFETY_CHECKS(BaseClass, +// /*enable=*/ kFoo | kBar, +// /*disable=*/ kBaz); +// ``` // - `DEFAULT_MEMORY_SAFETY_CHECKS()` // Re-define default `operator new()` and `operator delete()` using -// global operators that comes with default checks. +// global operators that comes with default checks. This macro accepts +// additional arguments to enable some checks manually. +// ``` +// DEFAULT_MEMORY_SAFETY_CHECKS(BaseClass, +// /*enable=*/ kFoo | kBar); +// ``` // // Note that if you use these macros at the top of struct declaration, the // declaration context would be left as |private|. Please switch it back to // |public| manually if needed. -#define INHERIT_MEMORY_SAFETY_CHECKS(BASE_CLASS) \ - public: \ - using BASE_CLASS::kMemorySafetyChecks; \ - using BASE_CLASS::operator new; \ - using BASE_CLASS::operator delete; \ - \ - private: \ - static_assert(true) /* semicolon here */ +#define INHERIT_MEMORY_SAFETY_CHECKS(BASE_CLASS, ...) \ + MEMORY_SAFETY_CHECKS_INTERNAL(ALWAYS_INLINE, \ + BASE_CLASS::kMemorySafetyChecks __VA_OPT__(, ) \ + __VA_ARGS__, \ + kNone, kNone) -#define DEFAULT_MEMORY_SAFETY_CHECKS() \ - public: \ - ALWAYS_INLINE static void* operator new(std::size_t count) { \ - return ::operator new(count); \ - } \ - ALWAYS_INLINE static void* operator new(std::size_t count, \ - std::align_val_t alignment) { \ - return ::operator new(count, alignment); \ - } \ - ALWAYS_INLINE static void* operator new(std::size_t count, void* ptr) { \ - return ::operator new(count, ptr); \ - } \ - ALWAYS_INLINE static void operator delete(void* ptr) noexcept { \ - return ::operator delete(ptr); \ - } \ - ALWAYS_INLINE static void operator delete( \ - void* ptr, std::align_val_t alignment) noexcept { \ - return ::operator delete(ptr, alignment); \ - } \ - \ - private: \ - static_assert(true) /* semicolon here */ +#define DEFAULT_MEMORY_SAFETY_CHECKS(...) \ + MEMORY_SAFETY_CHECKS_INTERNAL( \ + ALWAYS_INLINE, kNone __VA_OPT__(, ) __VA_ARGS__, kNone, kNone) #endif // BASE_MEMORY_SAFETY_CHECKS_H_
diff --git a/base/memory/safety_checks_unittest.cc b/base/memory/safety_checks_unittest.cc index 4c8e666..d9d0588 100644 --- a/base/memory/safety_checks_unittest.cc +++ b/base/memory/safety_checks_unittest.cc
@@ -75,6 +75,23 @@ !is_memory_safety_checked<MultipleInheritanceWithDefaultMacro, MemorySafetyCheck::kForcePartitionAlloc>); +struct AdvancedChecksWithPartialOverwrite { + ADVANCED_MEMORY_SAFETY_CHECKS(kNone, kForcePartitionAlloc); + + public: + char data[16]; +}; +static_assert( + !is_memory_safety_checked<AdvancedChecksWithPartialOverwrite, + MemorySafetyCheck::kForcePartitionAlloc>); + +struct InheritanceWithPartialOverwrite : private AdvancedChecks { + INHERIT_MEMORY_SAFETY_CHECKS(AdvancedChecks, kNone, kForcePartitionAlloc); +}; +static_assert( + !is_memory_safety_checked<InheritanceWithPartialOverwrite, + MemorySafetyCheck::kForcePartitionAlloc>); + // The macro may hook memory allocation/deallocation but should forward the // request to PA or any other allocator via // |HandleMemorySafetyCheckedOperator***|.
diff --git a/base/third_party/dynamic_annotations/BUILD.gn b/base/third_party/dynamic_annotations/BUILD.gn deleted file mode 100644 index 5bdad2b..0000000 --- a/base/third_party/dynamic_annotations/BUILD.gn +++ /dev/null
@@ -1,27 +0,0 @@ -# Copyright 2013 The Chromium Authors -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -if (is_nacl) { - # Native client doesn't need dynamic annotations, so we provide a - # dummy target in order for clients to not have to special-case the - # dependency. - source_set("dynamic_annotations") { - sources = [ "dynamic_annotations.h" ] - } -} else { - # Should be static library, see documentation on //base:base for discussion. - static_library("dynamic_annotations") { - sources = [ - "../valgrind/valgrind.h", - "dynamic_annotations.c", - "dynamic_annotations.h", - ] - if (is_android && !is_debug) { - configs -= [ "//build/config/compiler:default_optimization" ] - configs += [ "//build/config/compiler:optimize_max" ] - } - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] - } -}
diff --git a/base/third_party/dynamic_annotations/DEPS b/base/third_party/dynamic_annotations/DEPS deleted file mode 100644 index 0bc554c..0000000 --- a/base/third_party/dynamic_annotations/DEPS +++ /dev/null
@@ -1,4 +0,0 @@ -include_rules = [ - # Only used to "test" for mismatching declarations between the two headers. - "+third_party/abseil-cpp/absl/base/dynamic_annotations.h", -]
diff --git a/base/third_party/dynamic_annotations/LICENSE b/base/third_party/dynamic_annotations/LICENSE deleted file mode 100644 index 5c581a93..0000000 --- a/base/third_party/dynamic_annotations/LICENSE +++ /dev/null
@@ -1,28 +0,0 @@ -/* Copyright (c) 2008-2009, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * --- - * Author: Kostya Serebryany - */
diff --git a/base/third_party/dynamic_annotations/README.chromium b/base/third_party/dynamic_annotations/README.chromium deleted file mode 100644 index 9363ecc..0000000 --- a/base/third_party/dynamic_annotations/README.chromium +++ /dev/null
@@ -1,28 +0,0 @@ -Name: dynamic annotations -URL: http://code.google.com/p/data-race-test/wiki/DynamicAnnotations -Version: 4384 -License: BSD -License File: LICENSE -Shipped: yes - -ATTENTION: please avoid using these annotations in Chromium code. -They were mainly intended to instruct the Valgrind-based version of -ThreadSanitizer to handle atomic operations. The new version of ThreadSanitizer -based on compiler instrumentation understands atomic operations out of the box, -so normally you don't need the annotations. -If you still think you do, please consider writing a comment at http://crbug.com/349861 - -One header and one source file (dynamic_annotations.h and dynamic_annotations.c) -in this directory define runtime macros useful for annotating synchronization -utilities and benign data races so data race detectors can handle Chromium code -with better precision. - -These files were taken from -http://code.google.com/p/data-race-test/source/browse/?#svn/trunk/dynamic_annotations -The files are covered under BSD license as described within the files. - -Local modifications: -* made lineno an unsigned short (for -Wconstant-conversion warning fixes) -* remove two superfluous semicolons for -Wextra-semi -* changed various size parameters to a size_t to match the underlying runtime - and avoid conflicts with absl's dynamic_annotations.h.
diff --git a/base/third_party/dynamic_annotations/dynamic_annotations.c b/base/third_party/dynamic_annotations/dynamic_annotations.c deleted file mode 100644 index f6f4160..0000000 --- a/base/third_party/dynamic_annotations/dynamic_annotations.c +++ /dev/null
@@ -1,269 +0,0 @@ -/* Copyright (c) 2011, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifdef _MSC_VER -# include <windows.h> -#endif - -#ifdef __cplusplus -# error "This file should be built as pure C to avoid name mangling" -#endif - -#include <stdlib.h> -#include <string.h> - -#include "base/third_party/dynamic_annotations/dynamic_annotations.h" - -#ifdef __GNUC__ -/* valgrind.h uses gcc extensions so it won't build with other compilers */ -# include "base/third_party/valgrind/valgrind.h" -#endif - -/* Compiler-based ThreadSanitizer defines - DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL = 1 - and provides its own definitions of the functions. */ - -#ifndef DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL -# define DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL 0 -#endif - -/* Each function is empty and called (via a macro) only in debug mode. - The arguments are captured by dynamic tools at runtime. */ - -#if DYNAMIC_ANNOTATIONS_ENABLED == 1 \ - && DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL == 0 - -/* Identical code folding(-Wl,--icf=all) countermeasures. - This makes all Annotate* functions different, which prevents the linker from - folding them. */ -#ifdef __COUNTER__ -#define DYNAMIC_ANNOTATIONS_IMPL \ - volatile unsigned short lineno = (__LINE__ << 8) + __COUNTER__; (void)lineno; -#else -#define DYNAMIC_ANNOTATIONS_IMPL \ - volatile unsigned short lineno = (__LINE__ << 8); (void)lineno; -#endif - -/* WARNING: always add new annotations to the end of the list. - Otherwise, lineno (see above) numbers for different Annotate* functions may - conflict. */ -void DYNAMIC_ANNOTATIONS_NAME(AnnotateRWLockCreate)( - const char *file, int line, const volatile void *lock) -{DYNAMIC_ANNOTATIONS_IMPL} - -void DYNAMIC_ANNOTATIONS_NAME(AnnotateRWLockDestroy)( - const char *file, int line, const volatile void *lock) -{DYNAMIC_ANNOTATIONS_IMPL} - -void DYNAMIC_ANNOTATIONS_NAME(AnnotateRWLockAcquired)( - const char *file, int line, const volatile void *lock, long is_w) -{DYNAMIC_ANNOTATIONS_IMPL} - -void DYNAMIC_ANNOTATIONS_NAME(AnnotateRWLockReleased)( - const char *file, int line, const volatile void *lock, long is_w) -{DYNAMIC_ANNOTATIONS_IMPL} - -void DYNAMIC_ANNOTATIONS_NAME(AnnotateBarrierInit)( - const char *file, int line, const volatile void *barrier, long count, - long reinitialization_allowed) -{DYNAMIC_ANNOTATIONS_IMPL} - -void DYNAMIC_ANNOTATIONS_NAME(AnnotateBarrierWaitBefore)( - const char *file, int line, const volatile void *barrier) -{DYNAMIC_ANNOTATIONS_IMPL} - -void DYNAMIC_ANNOTATIONS_NAME(AnnotateBarrierWaitAfter)( - const char *file, int line, const volatile void *barrier) -{DYNAMIC_ANNOTATIONS_IMPL} - -void DYNAMIC_ANNOTATIONS_NAME(AnnotateBarrierDestroy)( - const char *file, int line, const volatile void *barrier) -{DYNAMIC_ANNOTATIONS_IMPL} - -void DYNAMIC_ANNOTATIONS_NAME(AnnotateCondVarWait)( - const char *file, int line, const volatile void *cv, - const volatile void *lock) -{DYNAMIC_ANNOTATIONS_IMPL} - -void DYNAMIC_ANNOTATIONS_NAME(AnnotateCondVarSignal)( - const char *file, int line, const volatile void *cv) -{DYNAMIC_ANNOTATIONS_IMPL} - -void DYNAMIC_ANNOTATIONS_NAME(AnnotateCondVarSignalAll)( - const char *file, int line, const volatile void *cv) -{DYNAMIC_ANNOTATIONS_IMPL} - -void DYNAMIC_ANNOTATIONS_NAME(AnnotateHappensBefore)( - const char *file, int line, const volatile void *obj) -{DYNAMIC_ANNOTATIONS_IMPL} - -void DYNAMIC_ANNOTATIONS_NAME(AnnotateHappensAfter)( - const char *file, int line, const volatile void *obj) -{DYNAMIC_ANNOTATIONS_IMPL} - -void DYNAMIC_ANNOTATIONS_NAME(AnnotatePublishMemoryRange)( - const char *file, int line, const volatile void *address, size_t size) -{DYNAMIC_ANNOTATIONS_IMPL} - -void DYNAMIC_ANNOTATIONS_NAME(AnnotateUnpublishMemoryRange)( - const char *file, int line, const volatile void *address, size_t size) -{DYNAMIC_ANNOTATIONS_IMPL} - -void DYNAMIC_ANNOTATIONS_NAME(AnnotatePCQCreate)( - const char *file, int line, const volatile void *pcq) -{DYNAMIC_ANNOTATIONS_IMPL} - -void DYNAMIC_ANNOTATIONS_NAME(AnnotatePCQDestroy)( - const char *file, int line, const volatile void *pcq) -{DYNAMIC_ANNOTATIONS_IMPL} - -void DYNAMIC_ANNOTATIONS_NAME(AnnotatePCQPut)( - const char *file, int line, const volatile void *pcq) -{DYNAMIC_ANNOTATIONS_IMPL} - -void DYNAMIC_ANNOTATIONS_NAME(AnnotatePCQGet)( - const char *file, int line, const volatile void *pcq) -{DYNAMIC_ANNOTATIONS_IMPL} - -void DYNAMIC_ANNOTATIONS_NAME(AnnotateNewMemory)( - const char *file, int line, const volatile void *mem, size_t size) -{DYNAMIC_ANNOTATIONS_IMPL} - -void DYNAMIC_ANNOTATIONS_NAME(AnnotateExpectRace)( - const char *file, int line, const volatile void *mem, - const char *description) -{DYNAMIC_ANNOTATIONS_IMPL} - -void DYNAMIC_ANNOTATIONS_NAME(AnnotateFlushExpectedRaces)( - const char *file, int line) -{DYNAMIC_ANNOTATIONS_IMPL} - -void DYNAMIC_ANNOTATIONS_NAME(AnnotateBenignRace)( - const char *file, int line, const volatile void *mem, - const char *description) -{DYNAMIC_ANNOTATIONS_IMPL} - -void DYNAMIC_ANNOTATIONS_NAME(AnnotateBenignRaceSized)( - const char *file, int line, const volatile void *mem, size_t size, - const char *description) -{DYNAMIC_ANNOTATIONS_IMPL} - -void DYNAMIC_ANNOTATIONS_NAME(AnnotateMutexIsUsedAsCondVar)( - const char *file, int line, const volatile void *mu) -{DYNAMIC_ANNOTATIONS_IMPL} - -void DYNAMIC_ANNOTATIONS_NAME(AnnotateMutexIsNotPHB)( - const char *file, int line, const volatile void *mu) -{DYNAMIC_ANNOTATIONS_IMPL} - -void DYNAMIC_ANNOTATIONS_NAME(AnnotateTraceMemory)( - const char *file, int line, const volatile void *arg) -{DYNAMIC_ANNOTATIONS_IMPL} - -void DYNAMIC_ANNOTATIONS_NAME(AnnotateThreadName)( - const char *file, int line, const char *name) -{DYNAMIC_ANNOTATIONS_IMPL} - -void DYNAMIC_ANNOTATIONS_NAME(AnnotateIgnoreReadsBegin)( - const char *file, int line) -{DYNAMIC_ANNOTATIONS_IMPL} - -void DYNAMIC_ANNOTATIONS_NAME(AnnotateIgnoreReadsEnd)( - const char *file, int line) -{DYNAMIC_ANNOTATIONS_IMPL} - -void DYNAMIC_ANNOTATIONS_NAME(AnnotateIgnoreWritesBegin)( - const char *file, int line) -{DYNAMIC_ANNOTATIONS_IMPL} - -void DYNAMIC_ANNOTATIONS_NAME(AnnotateIgnoreWritesEnd)( - const char *file, int line) -{DYNAMIC_ANNOTATIONS_IMPL} - -void DYNAMIC_ANNOTATIONS_NAME(AnnotateIgnoreSyncBegin)( - const char *file, int line) -{DYNAMIC_ANNOTATIONS_IMPL} - -void DYNAMIC_ANNOTATIONS_NAME(AnnotateIgnoreSyncEnd)( - const char *file, int line) -{DYNAMIC_ANNOTATIONS_IMPL} - -void DYNAMIC_ANNOTATIONS_NAME(AnnotateEnableRaceDetection)( - const char *file, int line, int enable) -{DYNAMIC_ANNOTATIONS_IMPL} - -void DYNAMIC_ANNOTATIONS_NAME(AnnotateNoOp)( - const char *file, int line, const volatile void *arg) -{DYNAMIC_ANNOTATIONS_IMPL} - -void DYNAMIC_ANNOTATIONS_NAME(AnnotateFlushState)( - const char *file, int line) -{DYNAMIC_ANNOTATIONS_IMPL} - -#endif /* DYNAMIC_ANNOTATIONS_ENABLED == 1 - && DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL == 0 */ - -#if DYNAMIC_ANNOTATIONS_PROVIDE_RUNNING_ON_VALGRIND == 1 \ - && DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL == 0 -static int GetRunningOnValgrind(void) { -#ifdef RUNNING_ON_VALGRIND - if (RUNNING_ON_VALGRIND) return 1; -#endif - -#ifndef _MSC_VER - char *running_on_valgrind_str = getenv("RUNNING_ON_VALGRIND"); - if (running_on_valgrind_str) { - return strcmp(running_on_valgrind_str, "0") != 0; - } -#else - /* Visual Studio issues warnings if we use getenv, - * so we use GetEnvironmentVariableA instead. - */ - char value[100] = "1"; - int res = GetEnvironmentVariableA("RUNNING_ON_VALGRIND", - value, sizeof(value)); - /* value will remain "1" if res == 0 or res >= sizeof(value). The latter - * can happen only if the given value is long, in this case it can't be "0". - */ - if (res > 0 && strcmp(value, "0") != 0) - return 1; -#endif - return 0; -} - -/* See the comments in dynamic_annotations.h */ -int RunningOnValgrind(void) { - static volatile int running_on_valgrind = -1; - /* C doesn't have thread-safe initialization of statics, and we - don't want to depend on pthread_once here, so hack it. */ - int local_running_on_valgrind = running_on_valgrind; - if (local_running_on_valgrind == -1) - running_on_valgrind = local_running_on_valgrind = GetRunningOnValgrind(); - return local_running_on_valgrind; -} - -#endif /* DYNAMIC_ANNOTATIONS_PROVIDE_RUNNING_ON_VALGRIND == 1 - && DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL == 0 */
diff --git a/base/third_party/dynamic_annotations/dynamic_annotations.h b/base/third_party/dynamic_annotations/dynamic_annotations.h deleted file mode 100644 index debfdda..0000000 --- a/base/third_party/dynamic_annotations/dynamic_annotations.h +++ /dev/null
@@ -1,597 +0,0 @@ -/* Copyright (c) 2011, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -/* This file defines dynamic annotations for use with dynamic analysis - tool such as valgrind, PIN, etc. - - Dynamic annotation is a source code annotation that affects - the generated code (that is, the annotation is not a comment). - Each such annotation is attached to a particular - instruction and/or to a particular object (address) in the program. - - The annotations that should be used by users are macros in all upper-case - (e.g., ANNOTATE_NEW_MEMORY). - - Actual implementation of these macros may differ depending on the - dynamic analysis tool being used. - - See http://code.google.com/p/data-race-test/ for more information. - - This file supports the following dynamic analysis tools: - - None (DYNAMIC_ANNOTATIONS_ENABLED is not defined or zero). - Macros are defined empty. - - ThreadSanitizer, Helgrind, DRD (DYNAMIC_ANNOTATIONS_ENABLED is 1). - Macros are defined as calls to non-inlinable empty functions - that are intercepted by Valgrind. */ - -#ifndef __DYNAMIC_ANNOTATIONS_H__ -#define __DYNAMIC_ANNOTATIONS_H__ - -#include <stddef.h> - -#ifndef DYNAMIC_ANNOTATIONS_PREFIX -# define DYNAMIC_ANNOTATIONS_PREFIX -#endif - -#ifndef DYNAMIC_ANNOTATIONS_PROVIDE_RUNNING_ON_VALGRIND -# define DYNAMIC_ANNOTATIONS_PROVIDE_RUNNING_ON_VALGRIND 1 -#endif - -#ifdef DYNAMIC_ANNOTATIONS_WANT_ATTRIBUTE_WEAK -# ifdef __GNUC__ -# define DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK __attribute__((weak)) -# else -/* TODO(glider): for Windows support we may want to change this macro in order - to prepend __declspec(selectany) to the annotations' declarations. */ -# error weak annotations are not supported for your compiler -# endif -#else -# define DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK -#endif - -/* The following preprocessor magic prepends the value of - DYNAMIC_ANNOTATIONS_PREFIX to annotation function names. */ -#define DYNAMIC_ANNOTATIONS_GLUE0(A, B) A##B -#define DYNAMIC_ANNOTATIONS_GLUE(A, B) DYNAMIC_ANNOTATIONS_GLUE0(A, B) -#define DYNAMIC_ANNOTATIONS_NAME(name) \ - DYNAMIC_ANNOTATIONS_GLUE(DYNAMIC_ANNOTATIONS_PREFIX, name) - -#ifndef DYNAMIC_ANNOTATIONS_ENABLED -# define DYNAMIC_ANNOTATIONS_ENABLED 0 -#endif - -#if DYNAMIC_ANNOTATIONS_ENABLED != 0 - - /* ------------------------------------------------------------- - Annotations useful when implementing condition variables such as CondVar, - using conditional critical sections (Await/LockWhen) and when constructing - user-defined synchronization mechanisms. - - The annotations ANNOTATE_HAPPENS_BEFORE() and ANNOTATE_HAPPENS_AFTER() can - be used to define happens-before arcs in user-defined synchronization - mechanisms: the race detector will infer an arc from the former to the - latter when they share the same argument pointer. - - Example 1 (reference counting): - - void Unref() { - ANNOTATE_HAPPENS_BEFORE(&refcount_); - if (AtomicDecrementByOne(&refcount_) == 0) { - ANNOTATE_HAPPENS_AFTER(&refcount_); - delete this; - } - } - - Example 2 (message queue): - - void MyQueue::Put(Type *e) { - MutexLock lock(&mu_); - ANNOTATE_HAPPENS_BEFORE(e); - PutElementIntoMyQueue(e); - } - - Type *MyQueue::Get() { - MutexLock lock(&mu_); - Type *e = GetElementFromMyQueue(); - ANNOTATE_HAPPENS_AFTER(e); - return e; - } - - Note: when possible, please use the existing reference counting and message - queue implementations instead of inventing new ones. */ - - /* Report that wait on the condition variable at address "cv" has succeeded - and the lock at address "lock" is held. */ - #define ANNOTATE_CONDVAR_LOCK_WAIT(cv, lock) \ - DYNAMIC_ANNOTATIONS_NAME(AnnotateCondVarWait)(__FILE__, __LINE__, cv, lock) - - /* Report that wait on the condition variable at "cv" has succeeded. Variant - w/o lock. */ - #define ANNOTATE_CONDVAR_WAIT(cv) \ - DYNAMIC_ANNOTATIONS_NAME(AnnotateCondVarWait)(__FILE__, __LINE__, cv, NULL) - - /* Report that we are about to signal on the condition variable at address - "cv". */ - #define ANNOTATE_CONDVAR_SIGNAL(cv) \ - DYNAMIC_ANNOTATIONS_NAME(AnnotateCondVarSignal)(__FILE__, __LINE__, cv) - - /* Report that we are about to signal_all on the condition variable at address - "cv". */ - #define ANNOTATE_CONDVAR_SIGNAL_ALL(cv) \ - DYNAMIC_ANNOTATIONS_NAME(AnnotateCondVarSignalAll)(__FILE__, __LINE__, cv) - - /* Annotations for user-defined synchronization mechanisms. */ - #define ANNOTATE_HAPPENS_BEFORE(obj) \ - DYNAMIC_ANNOTATIONS_NAME(AnnotateHappensBefore)(__FILE__, __LINE__, obj) - #define ANNOTATE_HAPPENS_AFTER(obj) \ - DYNAMIC_ANNOTATIONS_NAME(AnnotateHappensAfter)(__FILE__, __LINE__, obj) - - /* DEPRECATED. Don't use it. */ - #define ANNOTATE_PUBLISH_MEMORY_RANGE(pointer, size) \ - DYNAMIC_ANNOTATIONS_NAME(AnnotatePublishMemoryRange)(__FILE__, __LINE__, \ - pointer, size) - - /* DEPRECATED. Don't use it. */ - #define ANNOTATE_UNPUBLISH_MEMORY_RANGE(pointer, size) \ - DYNAMIC_ANNOTATIONS_NAME(AnnotateUnpublishMemoryRange)(__FILE__, __LINE__, \ - pointer, size) - - /* DEPRECATED. Don't use it. */ - #define ANNOTATE_SWAP_MEMORY_RANGE(pointer, size) \ - do { \ - ANNOTATE_UNPUBLISH_MEMORY_RANGE(pointer, size); \ - ANNOTATE_PUBLISH_MEMORY_RANGE(pointer, size); \ - } while (0) - - /* Instruct the tool to create a happens-before arc between mu->Unlock() and - mu->Lock(). This annotation may slow down the race detector and hide real - races. Normally it is used only when it would be difficult to annotate each - of the mutex's critical sections individually using the annotations above. - This annotation makes sense only for hybrid race detectors. For pure - happens-before detectors this is a no-op. For more details see - http://code.google.com/p/data-race-test/wiki/PureHappensBeforeVsHybrid . */ - #define ANNOTATE_PURE_HAPPENS_BEFORE_MUTEX(mu) \ - DYNAMIC_ANNOTATIONS_NAME(AnnotateMutexIsUsedAsCondVar)(__FILE__, __LINE__, \ - mu) - - /* Opposite to ANNOTATE_PURE_HAPPENS_BEFORE_MUTEX. - Instruct the tool to NOT create h-b arcs between Unlock and Lock, even in - pure happens-before mode. For a hybrid mode this is a no-op. */ - #define ANNOTATE_NOT_HAPPENS_BEFORE_MUTEX(mu) \ - DYNAMIC_ANNOTATIONS_NAME(AnnotateMutexIsNotPHB)(__FILE__, __LINE__, mu) - - /* Deprecated. Use ANNOTATE_PURE_HAPPENS_BEFORE_MUTEX. */ - #define ANNOTATE_MUTEX_IS_USED_AS_CONDVAR(mu) \ - DYNAMIC_ANNOTATIONS_NAME(AnnotateMutexIsUsedAsCondVar)(__FILE__, __LINE__, \ - mu) - - /* ------------------------------------------------------------- - Annotations useful when defining memory allocators, or when memory that - was protected in one way starts to be protected in another. */ - - /* Report that a new memory at "address" of size "size" has been allocated. - This might be used when the memory has been retrieved from a free list and - is about to be reused, or when a the locking discipline for a variable - changes. */ - #define ANNOTATE_NEW_MEMORY(address, size) \ - DYNAMIC_ANNOTATIONS_NAME(AnnotateNewMemory)(__FILE__, __LINE__, address, \ - size) - - /* ------------------------------------------------------------- - Annotations useful when defining FIFO queues that transfer data between - threads. */ - - /* Report that the producer-consumer queue (such as ProducerConsumerQueue) at - address "pcq" has been created. The ANNOTATE_PCQ_* annotations - should be used only for FIFO queues. For non-FIFO queues use - ANNOTATE_HAPPENS_BEFORE (for put) and ANNOTATE_HAPPENS_AFTER (for get). */ - #define ANNOTATE_PCQ_CREATE(pcq) \ - DYNAMIC_ANNOTATIONS_NAME(AnnotatePCQCreate)(__FILE__, __LINE__, pcq) - - /* Report that the queue at address "pcq" is about to be destroyed. */ - #define ANNOTATE_PCQ_DESTROY(pcq) \ - DYNAMIC_ANNOTATIONS_NAME(AnnotatePCQDestroy)(__FILE__, __LINE__, pcq) - - /* Report that we are about to put an element into a FIFO queue at address - "pcq". */ - #define ANNOTATE_PCQ_PUT(pcq) \ - DYNAMIC_ANNOTATIONS_NAME(AnnotatePCQPut)(__FILE__, __LINE__, pcq) - - /* Report that we've just got an element from a FIFO queue at address - "pcq". */ - #define ANNOTATE_PCQ_GET(pcq) \ - DYNAMIC_ANNOTATIONS_NAME(AnnotatePCQGet)(__FILE__, __LINE__, pcq) - - /* ------------------------------------------------------------- - Annotations that suppress errors. It is usually better to express the - program's synchronization using the other annotations, but these can - be used when all else fails. */ - - /* Report that we may have a benign race at "pointer", with size - "sizeof(*(pointer))". "pointer" must be a non-void* pointer. Insert at the - point where "pointer" has been allocated, preferably close to the point - where the race happens. See also ANNOTATE_BENIGN_RACE_STATIC. */ - #define ANNOTATE_BENIGN_RACE(pointer, description) \ - DYNAMIC_ANNOTATIONS_NAME(AnnotateBenignRaceSized)(__FILE__, __LINE__, \ - pointer, sizeof(*(pointer)), description) - - /* Same as ANNOTATE_BENIGN_RACE(address, description), but applies to - the memory range [address, address+size). */ - #define ANNOTATE_BENIGN_RACE_SIZED(address, size, description) \ - DYNAMIC_ANNOTATIONS_NAME(AnnotateBenignRaceSized)(__FILE__, __LINE__, \ - address, size, description) - - /* Request the analysis tool to ignore all reads in the current thread - until ANNOTATE_IGNORE_READS_END is called. - Useful to ignore intentional racey reads, while still checking - other reads and all writes. - See also ANNOTATE_UNPROTECTED_READ. */ - #define ANNOTATE_IGNORE_READS_BEGIN() \ - DYNAMIC_ANNOTATIONS_NAME(AnnotateIgnoreReadsBegin)(__FILE__, __LINE__) - - /* Stop ignoring reads. */ - #define ANNOTATE_IGNORE_READS_END() \ - DYNAMIC_ANNOTATIONS_NAME(AnnotateIgnoreReadsEnd)(__FILE__, __LINE__) - - /* Similar to ANNOTATE_IGNORE_READS_BEGIN, but ignore writes. */ - #define ANNOTATE_IGNORE_WRITES_BEGIN() \ - DYNAMIC_ANNOTATIONS_NAME(AnnotateIgnoreWritesBegin)(__FILE__, __LINE__) - - /* Stop ignoring writes. */ - #define ANNOTATE_IGNORE_WRITES_END() \ - DYNAMIC_ANNOTATIONS_NAME(AnnotateIgnoreWritesEnd)(__FILE__, __LINE__) - - /* Start ignoring all memory accesses (reads and writes). */ - #define ANNOTATE_IGNORE_READS_AND_WRITES_BEGIN() \ - do {\ - ANNOTATE_IGNORE_READS_BEGIN();\ - ANNOTATE_IGNORE_WRITES_BEGIN();\ - }while(0)\ - - /* Stop ignoring all memory accesses. */ - #define ANNOTATE_IGNORE_READS_AND_WRITES_END() \ - do {\ - ANNOTATE_IGNORE_WRITES_END();\ - ANNOTATE_IGNORE_READS_END();\ - }while(0)\ - - /* Similar to ANNOTATE_IGNORE_READS_BEGIN, but ignore synchronization events: - RWLOCK* and CONDVAR*. */ - #define ANNOTATE_IGNORE_SYNC_BEGIN() \ - DYNAMIC_ANNOTATIONS_NAME(AnnotateIgnoreSyncBegin)(__FILE__, __LINE__) - - /* Stop ignoring sync events. */ - #define ANNOTATE_IGNORE_SYNC_END() \ - DYNAMIC_ANNOTATIONS_NAME(AnnotateIgnoreSyncEnd)(__FILE__, __LINE__) - - - /* Enable (enable!=0) or disable (enable==0) race detection for all threads. - This annotation could be useful if you want to skip expensive race analysis - during some period of program execution, e.g. during initialization. */ - #define ANNOTATE_ENABLE_RACE_DETECTION(enable) \ - DYNAMIC_ANNOTATIONS_NAME(AnnotateEnableRaceDetection)(__FILE__, __LINE__, \ - enable) - - /* ------------------------------------------------------------- - Annotations useful for debugging. */ - - /* Request to trace every access to "address". */ - #define ANNOTATE_TRACE_MEMORY(address) \ - DYNAMIC_ANNOTATIONS_NAME(AnnotateTraceMemory)(__FILE__, __LINE__, address) - - /* Report the current thread name to a race detector. */ - #define ANNOTATE_THREAD_NAME(name) \ - DYNAMIC_ANNOTATIONS_NAME(AnnotateThreadName)(__FILE__, __LINE__, name) - - /* ------------------------------------------------------------- - Annotations useful when implementing locks. They are not - normally needed by modules that merely use locks. - The "lock" argument is a pointer to the lock object. */ - - /* Report that a lock has been created at address "lock". */ - #define ANNOTATE_RWLOCK_CREATE(lock) \ - DYNAMIC_ANNOTATIONS_NAME(AnnotateRWLockCreate)(__FILE__, __LINE__, lock) - - /* Report that the lock at address "lock" is about to be destroyed. */ - #define ANNOTATE_RWLOCK_DESTROY(lock) \ - DYNAMIC_ANNOTATIONS_NAME(AnnotateRWLockDestroy)(__FILE__, __LINE__, lock) - - /* Report that the lock at address "lock" has been acquired. - is_w=1 for writer lock, is_w=0 for reader lock. */ - #define ANNOTATE_RWLOCK_ACQUIRED(lock, is_w) \ - DYNAMIC_ANNOTATIONS_NAME(AnnotateRWLockAcquired)(__FILE__, __LINE__, lock, \ - is_w) - - /* Report that the lock at address "lock" is about to be released. */ - #define ANNOTATE_RWLOCK_RELEASED(lock, is_w) \ - DYNAMIC_ANNOTATIONS_NAME(AnnotateRWLockReleased)(__FILE__, __LINE__, lock, \ - is_w) - - /* ------------------------------------------------------------- - Annotations useful when implementing barriers. They are not - normally needed by modules that merely use barriers. - The "barrier" argument is a pointer to the barrier object. */ - - /* Report that the "barrier" has been initialized with initial "count". - If 'reinitialization_allowed' is true, initialization is allowed to happen - multiple times w/o calling barrier_destroy() */ - #define ANNOTATE_BARRIER_INIT(barrier, count, reinitialization_allowed) \ - DYNAMIC_ANNOTATIONS_NAME(AnnotateBarrierInit)(__FILE__, __LINE__, barrier, \ - count, reinitialization_allowed) - - /* Report that we are about to enter barrier_wait("barrier"). */ - #define ANNOTATE_BARRIER_WAIT_BEFORE(barrier) \ - DYNAMIC_ANNOTATIONS_NAME(AnnotateBarrierWaitBefore)(__FILE__, __LINE__, \ - barrier) - - /* Report that we just exited barrier_wait("barrier"). */ - #define ANNOTATE_BARRIER_WAIT_AFTER(barrier) \ - DYNAMIC_ANNOTATIONS_NAME(AnnotateBarrierWaitAfter)(__FILE__, __LINE__, \ - barrier) - - /* Report that the "barrier" has been destroyed. */ - #define ANNOTATE_BARRIER_DESTROY(barrier) \ - DYNAMIC_ANNOTATIONS_NAME(AnnotateBarrierDestroy)(__FILE__, __LINE__, \ - barrier) - - /* ------------------------------------------------------------- - Annotations useful for testing race detectors. */ - - /* Report that we expect a race on the variable at "address". - Use only in unit tests for a race detector. */ - #define ANNOTATE_EXPECT_RACE(address, description) \ - DYNAMIC_ANNOTATIONS_NAME(AnnotateExpectRace)(__FILE__, __LINE__, address, \ - description) - - #define ANNOTATE_FLUSH_EXPECTED_RACES() \ - DYNAMIC_ANNOTATIONS_NAME(AnnotateFlushExpectedRaces)(__FILE__, __LINE__) - - /* A no-op. Insert where you like to test the interceptors. */ - #define ANNOTATE_NO_OP(arg) \ - DYNAMIC_ANNOTATIONS_NAME(AnnotateNoOp)(__FILE__, __LINE__, arg) - - /* Force the race detector to flush its state. The actual effect depends on - * the implementation of the detector. */ - #define ANNOTATE_FLUSH_STATE() \ - DYNAMIC_ANNOTATIONS_NAME(AnnotateFlushState)(__FILE__, __LINE__) - - -#else /* DYNAMIC_ANNOTATIONS_ENABLED == 0 */ - - #define ANNOTATE_RWLOCK_CREATE(lock) /* empty */ - #define ANNOTATE_RWLOCK_DESTROY(lock) /* empty */ - #define ANNOTATE_RWLOCK_ACQUIRED(lock, is_w) /* empty */ - #define ANNOTATE_RWLOCK_RELEASED(lock, is_w) /* empty */ - #define ANNOTATE_BARRIER_INIT(barrier, count, reinitialization_allowed) /* */ - #define ANNOTATE_BARRIER_WAIT_BEFORE(barrier) /* empty */ - #define ANNOTATE_BARRIER_WAIT_AFTER(barrier) /* empty */ - #define ANNOTATE_BARRIER_DESTROY(barrier) /* empty */ - #define ANNOTATE_CONDVAR_LOCK_WAIT(cv, lock) /* empty */ - #define ANNOTATE_CONDVAR_WAIT(cv) /* empty */ - #define ANNOTATE_CONDVAR_SIGNAL(cv) /* empty */ - #define ANNOTATE_CONDVAR_SIGNAL_ALL(cv) /* empty */ - #define ANNOTATE_HAPPENS_BEFORE(obj) /* empty */ - #define ANNOTATE_HAPPENS_AFTER(obj) /* empty */ - #define ANNOTATE_PUBLISH_MEMORY_RANGE(address, size) /* empty */ - #define ANNOTATE_UNPUBLISH_MEMORY_RANGE(address, size) /* empty */ - #define ANNOTATE_SWAP_MEMORY_RANGE(address, size) /* empty */ - #define ANNOTATE_PCQ_CREATE(pcq) /* empty */ - #define ANNOTATE_PCQ_DESTROY(pcq) /* empty */ - #define ANNOTATE_PCQ_PUT(pcq) /* empty */ - #define ANNOTATE_PCQ_GET(pcq) /* empty */ - #define ANNOTATE_NEW_MEMORY(address, size) /* empty */ - #define ANNOTATE_EXPECT_RACE(address, description) /* empty */ - #define ANNOTATE_FLUSH_EXPECTED_RACES(address, description) /* empty */ - #define ANNOTATE_BENIGN_RACE(address, description) /* empty */ - #define ANNOTATE_BENIGN_RACE_SIZED(address, size, description) /* empty */ - #define ANNOTATE_PURE_HAPPENS_BEFORE_MUTEX(mu) /* empty */ - #define ANNOTATE_MUTEX_IS_USED_AS_CONDVAR(mu) /* empty */ - #define ANNOTATE_TRACE_MEMORY(arg) /* empty */ - #define ANNOTATE_THREAD_NAME(name) /* empty */ - #define ANNOTATE_IGNORE_READS_BEGIN() /* empty */ - #define ANNOTATE_IGNORE_READS_END() /* empty */ - #define ANNOTATE_IGNORE_WRITES_BEGIN() /* empty */ - #define ANNOTATE_IGNORE_WRITES_END() /* empty */ - #define ANNOTATE_IGNORE_READS_AND_WRITES_BEGIN() /* empty */ - #define ANNOTATE_IGNORE_READS_AND_WRITES_END() /* empty */ - #define ANNOTATE_IGNORE_SYNC_BEGIN() /* empty */ - #define ANNOTATE_IGNORE_SYNC_END() /* empty */ - #define ANNOTATE_ENABLE_RACE_DETECTION(enable) /* empty */ - #define ANNOTATE_NO_OP(arg) /* empty */ - #define ANNOTATE_FLUSH_STATE() /* empty */ - -#endif /* DYNAMIC_ANNOTATIONS_ENABLED */ - -/* Use the macros above rather than using these functions directly. */ -#ifdef __cplusplus -extern "C" { -#endif - - -void DYNAMIC_ANNOTATIONS_NAME(AnnotateRWLockCreate)( - const char *file, int line, - const volatile void *lock) DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK; -void DYNAMIC_ANNOTATIONS_NAME(AnnotateRWLockDestroy)( - const char *file, int line, - const volatile void *lock) DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK; -void DYNAMIC_ANNOTATIONS_NAME(AnnotateRWLockAcquired)( - const char *file, int line, - const volatile void *lock, long is_w) DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK; -void DYNAMIC_ANNOTATIONS_NAME(AnnotateRWLockReleased)( - const char *file, int line, - const volatile void *lock, long is_w) DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK; -void DYNAMIC_ANNOTATIONS_NAME(AnnotateBarrierInit)( - const char *file, int line, const volatile void *barrier, long count, - long reinitialization_allowed) DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK; -void DYNAMIC_ANNOTATIONS_NAME(AnnotateBarrierWaitBefore)( - const char *file, int line, - const volatile void *barrier) DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK; -void DYNAMIC_ANNOTATIONS_NAME(AnnotateBarrierWaitAfter)( - const char *file, int line, - const volatile void *barrier) DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK; -void DYNAMIC_ANNOTATIONS_NAME(AnnotateBarrierDestroy)( - const char *file, int line, - const volatile void *barrier) DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK; -void DYNAMIC_ANNOTATIONS_NAME(AnnotateCondVarWait)( - const char *file, int line, const volatile void *cv, - const volatile void *lock) DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK; -void DYNAMIC_ANNOTATIONS_NAME(AnnotateCondVarSignal)( - const char *file, int line, - const volatile void *cv) DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK; -void DYNAMIC_ANNOTATIONS_NAME(AnnotateCondVarSignalAll)( - const char *file, int line, - const volatile void *cv) DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK; -void DYNAMIC_ANNOTATIONS_NAME(AnnotateHappensBefore)( - const char *file, int line, - const volatile void *obj) DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK; -void DYNAMIC_ANNOTATIONS_NAME(AnnotateHappensAfter)( - const char *file, int line, - const volatile void *obj) DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK; -void DYNAMIC_ANNOTATIONS_NAME(AnnotatePublishMemoryRange)( - const char *file, int line, const volatile void *address, - size_t size) DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK; -void DYNAMIC_ANNOTATIONS_NAME(AnnotateUnpublishMemoryRange)( - const char *file, int line, const volatile void *address, - size_t size) DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK; -void DYNAMIC_ANNOTATIONS_NAME(AnnotatePCQCreate)( - const char *file, int line, - const volatile void *pcq) DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK; -void DYNAMIC_ANNOTATIONS_NAME(AnnotatePCQDestroy)( - const char *file, int line, - const volatile void *pcq) DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK; -void DYNAMIC_ANNOTATIONS_NAME(AnnotatePCQPut)( - const char *file, int line, - const volatile void *pcq) DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK; -void DYNAMIC_ANNOTATIONS_NAME(AnnotatePCQGet)( - const char *file, int line, - const volatile void *pcq) DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK; -void DYNAMIC_ANNOTATIONS_NAME(AnnotateNewMemory)( - const char *file, int line, const volatile void *mem, - size_t size) DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK; -void DYNAMIC_ANNOTATIONS_NAME(AnnotateExpectRace)( - const char *file, int line, const volatile void *mem, - const char *description) DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK; -void DYNAMIC_ANNOTATIONS_NAME(AnnotateFlushExpectedRaces)( - const char *file, int line) DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK; -void DYNAMIC_ANNOTATIONS_NAME(AnnotateBenignRace)( - const char *file, int line, const volatile void *mem, - const char *description) DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK; -void DYNAMIC_ANNOTATIONS_NAME(AnnotateBenignRaceSized)( - const char *file, int line, const volatile void *mem, size_t size, - const char *description) DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK; -void DYNAMIC_ANNOTATIONS_NAME(AnnotateMutexIsUsedAsCondVar)( - const char *file, int line, - const volatile void *mu) DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK; -void DYNAMIC_ANNOTATIONS_NAME(AnnotateMutexIsNotPHB)( - const char *file, int line, - const volatile void *mu) DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK; -void DYNAMIC_ANNOTATIONS_NAME(AnnotateTraceMemory)( - const char *file, int line, - const volatile void *arg) DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK; -void DYNAMIC_ANNOTATIONS_NAME(AnnotateThreadName)( - const char *file, int line, - const char *name) DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK; -void DYNAMIC_ANNOTATIONS_NAME(AnnotateIgnoreReadsBegin)( - const char *file, int line) DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK; -void DYNAMIC_ANNOTATIONS_NAME(AnnotateIgnoreReadsEnd)( - const char *file, int line) DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK; -void DYNAMIC_ANNOTATIONS_NAME(AnnotateIgnoreWritesBegin)( - const char *file, int line) DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK; -void DYNAMIC_ANNOTATIONS_NAME(AnnotateIgnoreWritesEnd)( - const char *file, int line) DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK; -void DYNAMIC_ANNOTATIONS_NAME(AnnotateIgnoreSyncBegin)( - const char *file, int line) DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK; -void DYNAMIC_ANNOTATIONS_NAME(AnnotateIgnoreSyncEnd)( - const char *file, int line) DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK; -void DYNAMIC_ANNOTATIONS_NAME(AnnotateEnableRaceDetection)( - const char *file, int line, int enable) DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK; -void DYNAMIC_ANNOTATIONS_NAME(AnnotateNoOp)( - const char *file, int line, - const volatile void *arg) DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK; -void DYNAMIC_ANNOTATIONS_NAME(AnnotateFlushState)( - const char *file, int line) DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK; - -#if DYNAMIC_ANNOTATIONS_PROVIDE_RUNNING_ON_VALGRIND == 1 -/* Return non-zero value if running under valgrind. - - If "valgrind.h" is included into dynamic_annotations.c, - the regular valgrind mechanism will be used. - See http://valgrind.org/docs/manual/manual-core-adv.html about - RUNNING_ON_VALGRIND and other valgrind "client requests". - The file "valgrind.h" may be obtained by doing - svn co svn://svn.valgrind.org/valgrind/trunk/include - - If for some reason you can't use "valgrind.h" or want to fake valgrind, - there are two ways to make this function return non-zero: - - Use environment variable: export RUNNING_ON_VALGRIND=1 - - Make your tool intercept the function RunningOnValgrind() and - change its return value. - */ -int RunningOnValgrind(void) DYNAMIC_ANNOTATIONS_ATTRIBUTE_WEAK; -#endif /* DYNAMIC_ANNOTATIONS_PROVIDE_RUNNING_ON_VALGRIND == 1 */ - -#ifdef __cplusplus -} -#endif - -#if DYNAMIC_ANNOTATIONS_ENABLED != 0 && defined(__cplusplus) - - /* ANNOTATE_UNPROTECTED_READ is the preferred way to annotate racey reads. - - Instead of doing - ANNOTATE_IGNORE_READS_BEGIN(); - ... = x; - ANNOTATE_IGNORE_READS_END(); - one can use - ... = ANNOTATE_UNPROTECTED_READ(x); */ - template <class T> - inline T ANNOTATE_UNPROTECTED_READ(const volatile T &x) { - ANNOTATE_IGNORE_READS_BEGIN(); - T res = x; - ANNOTATE_IGNORE_READS_END(); - return res; - } - /* Apply ANNOTATE_BENIGN_RACE_SIZED to a static variable. */ - #define ANNOTATE_BENIGN_RACE_STATIC(static_var, description) \ - namespace { \ - class static_var ## _annotator { \ - public: \ - static_var ## _annotator() { \ - ANNOTATE_BENIGN_RACE_SIZED(&static_var, \ - sizeof(static_var), \ - # static_var ": " description); \ - } \ - }; \ - static static_var ## _annotator the ## static_var ## _annotator;\ - } -#else /* DYNAMIC_ANNOTATIONS_ENABLED == 0 */ - - #define ANNOTATE_UNPROTECTED_READ(x) (x) - #define ANNOTATE_BENIGN_RACE_STATIC(static_var, description) /* empty */ - -#endif /* DYNAMIC_ANNOTATIONS_ENABLED */ - -#endif /* __DYNAMIC_ANNOTATIONS_H__ */
diff --git a/base/third_party/dynamic_annotations/dynamic_annotations_compiletest.cc b/base/third_party/dynamic_annotations/dynamic_annotations_compiletest.cc deleted file mode 100644 index 1c58c7f..0000000 --- a/base/third_party/dynamic_annotations/dynamic_annotations_compiletest.cc +++ /dev/null
@@ -1,10 +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. - -// This is a test intended to flush out potential build failures from mismatched -// declarations between absl's dynamic_annotations.h and the (unmaintained but -// still used) version in this directory. - -#include "base/third_party/dynamic_annotations/dynamic_annotations.h" -#include "third_party/abseil-cpp/absl/base/dynamic_annotations.h"
diff --git a/base/trace_event/malloc_dump_provider.cc b/base/trace_event/malloc_dump_provider.cc index 02c21165..d0da628b 100644 --- a/base/trace_event/malloc_dump_provider.cc +++ b/base/trace_event/malloc_dump_provider.cc
@@ -311,6 +311,20 @@ LeakySingletonTraits<MallocDumpProvider>>::get(); } +#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) +// static +MallocDumpProvider::ExtremeLUDGetStatsCallback + MallocDumpProvider::extreme_lud_get_stats_callback_ = nullptr; + +// static +void MallocDumpProvider::SetExtremeLUDGetStatsCallback( + ExtremeLUDGetStatsCallback callback) { + DCHECK(callback); + DCHECK(!extreme_lud_get_stats_callback_); + extreme_lud_get_stats_callback_ = callback; +} +#endif // BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) + MallocDumpProvider::MallocDumpProvider() = default; MallocDumpProvider::~MallocDumpProvider() = default; @@ -387,12 +401,6 @@ allocated_objects_count); } -#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) - base::trace_event::MemoryAllocatorDump* partitions_dump = - pmd->CreateAllocatorDump("malloc/partitions"); - pmd->AddOwnershipEdge(inner_dump->guid(), partitions_dump->guid()); -#endif // BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) - int64_t waste = static_cast<int64_t>(resident_size - allocated_objects_size); // With PartitionAlloc, reported size under malloc/partitions is the resident @@ -418,14 +426,24 @@ static_cast<uint64_t>(waste)); } - ReportPerMinuteStats(syscall_count, cumulative_brp_quarantined_size, - cumulative_brp_quarantined_count, outer_dump, + base::trace_event::MemoryAllocatorDump* partitions_dump = nullptr; + base::trace_event::MemoryAllocatorDump* elud_dump = nullptr; + ExtremeLUDStats elud_stats; #if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) - partitions_dump -#else - nullptr -#endif - ); + partitions_dump = pmd->CreateAllocatorDump("malloc/partitions"); + pmd->AddOwnershipEdge(inner_dump->guid(), partitions_dump->guid()); + + if (extreme_lud_get_stats_callback_) { // The Extreme LUD is enabled. + elud_dump = pmd->CreateAllocatorDump("malloc/extreme_lud"); + elud_stats = extreme_lud_get_stats_callback_(); + ReportPartitionAllocLightweightQuarantineStats(elud_dump, + elud_stats.lq_stats); + } +#endif // BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) + + ReportPerMinuteStats(syscall_count, cumulative_brp_quarantined_size, + cumulative_brp_quarantined_count, elud_stats, outer_dump, + partitions_dump, elud_dump); return true; } @@ -434,8 +452,10 @@ uint64_t syscall_count, size_t cumulative_brp_quarantined_bytes, size_t cumulative_brp_quarantined_count, + const ExtremeLUDStats& elud_stats, MemoryAllocatorDump* malloc_dump, - MemoryAllocatorDump* partition_alloc_dump) { + MemoryAllocatorDump* partition_alloc_dump, + MemoryAllocatorDump* elud_dump) { #if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) uint64_t new_syscalls = syscall_count - last_syscall_count_; size_t new_brp_quarantined_bytes = @@ -444,14 +464,15 @@ cumulative_brp_quarantined_count - last_cumulative_brp_quarantined_count_; base::TimeDelta time_since_last_dump = base::TimeTicks::Now() - last_memory_dump_time_; - uint64_t syscalls_per_minute = static_cast<uint64_t>( - (60 * new_syscalls) / time_since_last_dump.InSecondsF()); + auto seconds_since_last_dump = time_since_last_dump.InSecondsF(); + uint64_t syscalls_per_minute = + static_cast<uint64_t>((60 * new_syscalls) / seconds_since_last_dump); malloc_dump->AddScalar("syscalls_per_minute", "count", syscalls_per_minute); if (partition_alloc_dump) { size_t brp_quarantined_bytes_per_minute = - (60 * new_brp_quarantined_bytes) / time_since_last_dump.InSecondsF(); + (60 * new_brp_quarantined_bytes) / seconds_since_last_dump; size_t brp_quarantined_count_per_minute = - (60 * new_brp_quarantined_count) / time_since_last_dump.InSecondsF(); + (60 * new_brp_quarantined_count) / seconds_since_last_dump; partition_alloc_dump->AddScalar("brp_quarantined_bytes_per_minute", MemoryAllocatorDump::kUnitsBytes, brp_quarantined_bytes_per_minute); @@ -459,6 +480,52 @@ MemoryAllocatorDump::kNameObjectCount, brp_quarantined_count_per_minute); } + if (elud_dump) { + size_t bytes = elud_stats.lq_stats.cumulative_size_in_bytes - + last_cumulative_elud_quarantined_bytes_; + size_t count = elud_stats.lq_stats.cumulative_count - + last_cumulative_elud_quarantined_count_; + size_t miss_count = elud_stats.lq_stats.quarantine_miss_count - + last_cumulative_elud_miss_count_; + elud_dump->AddScalar("bytes_per_minute", MemoryAllocatorDump::kUnitsBytes, + 60ull * bytes / seconds_since_last_dump); + elud_dump->AddScalar("count_per_minute", + MemoryAllocatorDump::kNameObjectCount, + 60ull * count / seconds_since_last_dump); + elud_dump->AddScalar("miss_count_per_minute", + MemoryAllocatorDump::kNameObjectCount, + 60ull * miss_count / seconds_since_last_dump); + // Given the following three: + // capacity := the quarantine storage space + // time := the elapsed time since the last dump + // bytes := the consumed/used bytes since the last dump + // We can define/calculate the following. + // speed := the consuming speed of the quarantine + // = bytes / time + // quarantined_time + // := the time to use up the capacity + // (near to how long an object may be quarantined) + // = capacity / speed + // = capacity / (bytes / time) + // = time * capacity / bytes + // + // Note that objects in the quarantine are randomly evicted. So objects may + // stay in the qurantine longer or shorter depending on object sizes, + // allocation/deallocation patterns, etc. in addition to pure randomness. + // So, this is just a rough estimation, not necessarily to be the average. + if (bytes > 0) { + elud_dump->AddScalar( + "quarantined_time", "msec", + static_cast<uint64_t>(time_since_last_dump.InMilliseconds()) * + elud_stats.capacity_in_bytes / bytes); + } + last_cumulative_elud_quarantined_bytes_ = + elud_stats.lq_stats.cumulative_size_in_bytes; + last_cumulative_elud_quarantined_count_ = + elud_stats.lq_stats.cumulative_count; + last_cumulative_elud_miss_count_ = + elud_stats.lq_stats.quarantine_miss_count; + } last_memory_dump_time_ = base::TimeTicks::Now(); last_syscall_count_ = syscall_count;
diff --git a/base/trace_event/malloc_dump_provider.h b/base/trace_event/malloc_dump_provider.h index 859ec24..73b563d 100644 --- a/base/trace_event/malloc_dump_provider.h +++ b/base/trace_event/malloc_dump_provider.h
@@ -14,16 +14,13 @@ #include "base/trace_event/memory_dump_provider.h" #include "build/build_config.h" #include "partition_alloc/partition_alloc_buildflags.h" +#include "partition_alloc/partition_stats.h" #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_ANDROID) || \ BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) #define MALLOC_MEMORY_TRACING_SUPPORTED #endif -#if BUILDFLAG(USE_PARTITION_ALLOC) -#include "partition_alloc/partition_stats.h" -#endif - namespace base { namespace trace_event { @@ -38,6 +35,20 @@ static MallocDumpProvider* GetInstance(); + // The Extreme LUD is implemented in //components/gwp_asan, which //base + // cannot depend on. The following API allows an injection of stats-report + // function of the Extreme LUD. + struct ExtremeLUDStats { + // This default-constructs to be zero'ed. + partition_alloc::LightweightQuarantineStats lq_stats{0}; + size_t capacity_in_bytes = 0; + }; +#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) + using ExtremeLUDGetStatsCallback = ExtremeLUDStats (*)(); + static void SetExtremeLUDGetStatsCallback( + ExtremeLUDGetStatsCallback callback); +#endif // BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) + MallocDumpProvider(const MallocDumpProvider&) = delete; MallocDumpProvider& operator=(const MallocDumpProvider&) = delete; @@ -54,14 +65,19 @@ void ReportPerMinuteStats(uint64_t syscall_count, size_t cumulative_brp_quarantined_bytes, size_t cumulative_brp_quarantined_count, + const ExtremeLUDStats& elud_stats, MemoryAllocatorDump* malloc_dump, - MemoryAllocatorDump* partition_alloc_dump); + MemoryAllocatorDump* partition_alloc_dump, + MemoryAllocatorDump* elud_dump); bool emit_metrics_on_memory_dump_ GUARDED_BY(emit_metrics_on_memory_dump_lock_) = true; base::Lock emit_metrics_on_memory_dump_lock_; #if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) + // The injected stats-report function of the Extreme LUD. Non-null iff the + // Extreme LUD is enabled. + static ExtremeLUDGetStatsCallback extreme_lud_get_stats_callback_; // To be accurate, this requires the dump provider to be created very early, // which is the case. The alternative would be to drop the first data point, // which is not desirable as early process activity is highly relevant. @@ -69,6 +85,9 @@ uint64_t last_syscall_count_ = 0; size_t last_cumulative_brp_quarantined_bytes_ = 0; size_t last_cumulative_brp_quarantined_count_ = 0; + size_t last_cumulative_elud_quarantined_bytes_ = 0; + size_t last_cumulative_elud_quarantined_count_ = 0; + size_t last_cumulative_elud_miss_count_ = 0; #endif };
diff --git a/base/trace_event/memory_infra_background_allowlist.cc b/base/trace_event/memory_infra_background_allowlist.cc index c0c2319..62990290 100644 --- a/base/trace_event/memory_infra_background_allowlist.cc +++ b/base/trace_event/memory_infra_background_allowlist.cc
@@ -186,6 +186,9 @@ "leveldatabase/memenv_0x?", "malloc", "malloc/allocated_objects", +#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) + "malloc/extreme_lud", +#endif "malloc/metadata_fragmentation_caches", #if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) "malloc/partitions", @@ -199,7 +202,7 @@ "malloc/partitions/nonquarantinable", "malloc/sys_malloc", "malloc/win_heap", -#endif +#endif // BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) "media/webmediaplayer/audio/player_0x?", "media/webmediaplayer/data_source/player_0x?", "media/webmediaplayer/demuxer/player_0x?",
diff --git a/build/config/android/system_image.gni b/build/config/android/system_image.gni index d48b562..31a184c7 100644 --- a/build/config/android/system_image.gni +++ b/build/config/android/system_image.gni
@@ -63,7 +63,68 @@ script = "//build/android/gyp/compile_resources.py" inputs = [ _manifest_path, + android_sdk_tools_bundle_aapt2, android_sdk_jar, + + # TODO(b/315080809#comment4): remove these files after fixing + # build/print_python_deps.py. + "//third_party/protobuf/python/google/__init__.py", + "//third_party/protobuf/python/google/protobuf/__init__.py", + "//third_party/protobuf/python/google/protobuf/compiler/__init__.py", + "//third_party/protobuf/python/google/protobuf/compiler/plugin_pb2.py", + "//third_party/protobuf/python/google/protobuf/descriptor.py", + "//third_party/protobuf/python/google/protobuf/descriptor_database.py", + "//third_party/protobuf/python/google/protobuf/descriptor_pb2.py", + "//third_party/protobuf/python/google/protobuf/descriptor_pool.py", + "//third_party/protobuf/python/google/protobuf/internal/__init__.py", + "//third_party/protobuf/python/google/protobuf/internal/_parameterized.py", + "//third_party/protobuf/python/google/protobuf/internal/api_implementation.py", + "//third_party/protobuf/python/google/protobuf/internal/builder.py", + "//third_party/protobuf/python/google/protobuf/internal/containers.py", + "//third_party/protobuf/python/google/protobuf/internal/decoder.py", + "//third_party/protobuf/python/google/protobuf/internal/descriptor_database_test.py", + "//third_party/protobuf/python/google/protobuf/internal/descriptor_pool_test.py", + "//third_party/protobuf/python/google/protobuf/internal/descriptor_test.py", + "//third_party/protobuf/python/google/protobuf/internal/encoder.py", + "//third_party/protobuf/python/google/protobuf/internal/enum_type_wrapper.py", + "//third_party/protobuf/python/google/protobuf/internal/extension_dict.py", + "//third_party/protobuf/python/google/protobuf/internal/generator_test.py", + "//third_party/protobuf/python/google/protobuf/internal/import_test.py", + "//third_party/protobuf/python/google/protobuf/internal/import_test_package/__init__.py", + "//third_party/protobuf/python/google/protobuf/internal/json_format_test.py", + "//third_party/protobuf/python/google/protobuf/internal/keywords_test.py", + "//third_party/protobuf/python/google/protobuf/internal/message_factory_test.py", + "//third_party/protobuf/python/google/protobuf/internal/message_listener.py", + "//third_party/protobuf/python/google/protobuf/internal/message_test.py", + "//third_party/protobuf/python/google/protobuf/internal/proto_builder_test.py", + "//third_party/protobuf/python/google/protobuf/internal/python_message.py", + "//third_party/protobuf/python/google/protobuf/internal/reflection_test.py", + "//third_party/protobuf/python/google/protobuf/internal/service_reflection_test.py", + "//third_party/protobuf/python/google/protobuf/internal/symbol_database_test.py", + "//third_party/protobuf/python/google/protobuf/internal/test_util.py", + "//third_party/protobuf/python/google/protobuf/internal/testing_refleaks.py", + "//third_party/protobuf/python/google/protobuf/internal/text_encoding_test.py", + "//third_party/protobuf/python/google/protobuf/internal/text_format_test.py", + "//third_party/protobuf/python/google/protobuf/internal/type_checkers.py", + "//third_party/protobuf/python/google/protobuf/internal/unknown_fields_test.py", + "//third_party/protobuf/python/google/protobuf/internal/well_known_types.py", + "//third_party/protobuf/python/google/protobuf/internal/well_known_types_test.py", + "//third_party/protobuf/python/google/protobuf/internal/wire_format.py", + "//third_party/protobuf/python/google/protobuf/internal/wire_format_test.py", + "//third_party/protobuf/python/google/protobuf/json_format.py", + "//third_party/protobuf/python/google/protobuf/message.py", + "//third_party/protobuf/python/google/protobuf/message_factory.py", + "//third_party/protobuf/python/google/protobuf/proto_builder.py", + "//third_party/protobuf/python/google/protobuf/pyext/__init__.py", + "//third_party/protobuf/python/google/protobuf/pyext/cpp_message.py", + "//third_party/protobuf/python/google/protobuf/reflection.py", + "//third_party/protobuf/python/google/protobuf/service.py", + "//third_party/protobuf/python/google/protobuf/service_reflection.py", + "//third_party/protobuf/python/google/protobuf/symbol_database.py", + "//third_party/protobuf/python/google/protobuf/text_encoding.py", + "//third_party/protobuf/python/google/protobuf/text_format.py", + "//third_party/protobuf/python/google/protobuf/unknown_fields.py", + "//third_party/protobuf/python/google/protobuf/util/__init__.py", ] outputs = [ _resource_apk_path ] args = [ @@ -155,7 +216,7 @@ [ "static_library_name", "static_library_version", - "override_target_sdk" + "override_target_sdk", ]) package_info_from_target = invoker.apk_or_bundle_target stub_output = invoker.stub_output
diff --git a/build/util/ide_query b/build/util/ide_query index f35bf8a..b7d7b66 100755 --- a/build/util/ide_query +++ b/build/util/ide_query
@@ -82,11 +82,10 @@ else: args = ['siso', 'ninja', '-C', options.out_dir] args.extend(targets) - p = subprocess.run(args, cwd=repo_root, capture_output=True) + p = subprocess.run(args, cwd=repo_root, stdout=2, stderr=2) if p.returncode != 0: # TODO: report error in IdeAnalysis.Status? - sys.stderr.write('build failed with %d\n%s\n%s' % ( - p.returncode, p.stdout, p.stderr)) + sys.stderr.write('build failed with %d\n' % p.returncode) return 1 args = ['siso', 'query', 'ideanalysis', '-C', options.out_dir]
diff --git a/chrome/VERSION b/chrome/VERSION index cf14e74..4ba5ee2 100644 --- a/chrome/VERSION +++ b/chrome/VERSION
@@ -1,4 +1,4 @@ MAJOR=126 MINOR=0 -BUILD=6433 +BUILD=6434 PATCH=0
diff --git a/chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/FeedSurfaceMediator.java b/chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/FeedSurfaceMediator.java index afa6591..909b1e2 100644 --- a/chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/FeedSurfaceMediator.java +++ b/chrome/android/feed/core/java/src/org/chromium/chrome/browser/feed/FeedSurfaceMediator.java
@@ -1363,6 +1363,8 @@ return StreamType.FOR_YOU; case StreamKind.FOLLOWING: return StreamType.WEB_FEED; + case StreamKind.SUPERVISED_USER: + return StreamType.SUPERVISED_USER_FEED; default: return StreamType.UNSPECIFIED; }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/sync/settings/AccountManagementFragment.java b/chrome/android/java/src/org/chromium/chrome/browser/sync/settings/AccountManagementFragment.java index 2273e13..f1ce107 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/sync/settings/AccountManagementFragment.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/sync/settings/AccountManagementFragment.java
@@ -12,6 +12,7 @@ import androidx.annotation.LayoutRes; import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; import androidx.fragment.app.DialogFragment; import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentTransaction; @@ -75,12 +76,12 @@ private static final int REQUEST_CODE_TRUSTED_VAULT_KEY_RETRIEVAL = 1; private static final int REQUEST_CODE_TRUSTED_VAULT_RECOVERABILITY_DEGRADED = 2; - private static final String FRAGMENT_ENTER_PASSPHRASE = "enter_passphrase"; + @VisibleForTesting public static final String FRAGMENT_ENTER_PASSPHRASE = "enter_passphase"; /** - * The key for an integer value in arguments bundle to - * specify the correct GAIA service that has triggered the dialog. - * If the argument is not set, GAIA_SERVICE_TYPE_NONE is used as the origin of the dialog. + * The key for an integer value in arguments bundle to specify the correct GAIA service that has + * triggered the dialog. If the argument is not set, GAIA_SERVICE_TYPE_NONE is used as the + * origin of the dialog. */ private static final String SHOW_GAIA_SERVICE_TYPE_EXTRA = "ShowGAIAServiceType";
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/sync/AccountManagementFragmentTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/sync/AccountManagementFragmentTest.java index 23eced0..876c2ed 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/sync/AccountManagementFragmentTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/sync/AccountManagementFragmentTest.java
@@ -8,6 +8,8 @@ import static androidx.test.espresso.action.ViewActions.click; import static androidx.test.espresso.assertion.ViewAssertions.doesNotExist; import static androidx.test.espresso.assertion.ViewAssertions.matches; +import static androidx.test.espresso.intent.Intents.intended; +import static androidx.test.espresso.intent.Intents.intending; import static androidx.test.espresso.matcher.RootMatchers.isDialog; import static androidx.test.espresso.matcher.ViewMatchers.isDescendantOfA; import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed; @@ -16,11 +18,20 @@ import static org.hamcrest.CoreMatchers.allOf; import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.core.StringStartsWith.startsWith; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.doAnswer; +import static org.mockito.Mockito.spy; import static org.chromium.ui.test.util.ViewUtils.onViewWaiting; +import android.app.Activity; +import android.app.Instrumentation.ActivityResult; import android.view.View; +import androidx.test.espresso.intent.Intents; +import androidx.test.espresso.intent.matcher.IntentMatchers; +import androidx.test.filters.LargeTest; import androidx.test.filters.MediumTest; import androidx.test.filters.SmallTest; @@ -45,19 +56,27 @@ import org.chromium.chrome.browser.flags.ChromeFeatureList; import org.chromium.chrome.browser.flags.ChromeSwitches; import org.chromium.chrome.browser.profiles.ProfileManager; +import org.chromium.chrome.browser.settings.SettingsActivity; import org.chromium.chrome.browser.settings.SettingsActivityTestRule; import org.chromium.chrome.browser.signin.services.IdentityServicesProvider; import org.chromium.chrome.browser.sync.settings.AccountManagementFragment; import org.chromium.chrome.browser.sync.settings.SyncSettingsUtils; +import org.chromium.chrome.browser.sync.ui.PassphraseDialogFragment; import org.chromium.chrome.test.ChromeJUnit4RunnerDelegate; import org.chromium.chrome.test.R; +import org.chromium.chrome.test.util.ActivityTestUtils; import org.chromium.chrome.test.util.ChromeRenderTestRule; import org.chromium.chrome.test.util.browser.signin.AccountManagerTestRule; import org.chromium.chrome.test.util.browser.signin.SigninTestRule; +import org.chromium.chrome.test.util.browser.sync.SyncTestUtil; +import org.chromium.components.signin.AccountManagerFacadeProvider; import org.chromium.components.signin.base.AccountInfo; import org.chromium.components.signin.base.CoreAccountInfo; +import org.chromium.components.signin.base.GoogleServiceAuthError; import org.chromium.components.signin.identitymanager.ConsentLevel; import org.chromium.components.signin.test.util.AccountCapabilitiesBuilder; +import org.chromium.components.signin.test.util.FakeAccountManagerFacade; +import org.chromium.components.sync.SyncService; import org.chromium.content_public.browser.test.util.TestThreadUtils; import java.util.Arrays; @@ -450,6 +469,114 @@ watchIdentityErrorCardShownHistogram.assertExpected(); } + @Test + @LargeTest + @EnableFeatures(ChromeFeatureList.SYNC_SHOW_IDENTITY_ERRORS_FOR_SIGNED_IN_USERS) + public void testActionForAuthError() throws Exception { + FakeSyncServiceImpl fakeSyncService = overrideSyncService(); + fakeSyncService.setAuthError(GoogleServiceAuthError.State.INVALID_GAIA_CREDENTIALS); + + // Sign in and open settings. + mSyncTestRule.setUpAccountAndSignInForTesting(); + + mSettingsActivityTestRule.startSettingsActivity(); + onViewWaiting(allOf(is(mSettingsActivityTestRule.getFragment().getView()), isDisplayed())); + // The error card exists. + onView(withId(R.id.identity_error_card)).check(matches(isDisplayed())); + + FakeAccountManagerFacade fakeAccountManagerFacade = + spy((FakeAccountManagerFacade) AccountManagerFacadeProvider.getInstance()); + AccountManagerFacadeProvider.setInstanceForTests(fakeAccountManagerFacade); + + doAnswer( + invocation -> { + // Simulate re-auth by clearing the auth error. + fakeSyncService.setAuthError(GoogleServiceAuthError.State.NONE); + return null; + }) + .when(fakeAccountManagerFacade) + .updateCredentials(any(), any(), any()); + + // Mimic the user tapping on the error card's button. + onView(withId(R.id.identity_error_card_button)).perform(click()); + + // No error card exists anymore. + onView(withId(R.id.identity_error_card)).check(doesNotExist()); + } + + @Test + @LargeTest + @EnableFeatures(ChromeFeatureList.SYNC_SHOW_IDENTITY_ERRORS_FOR_SIGNED_IN_USERS) + public void testActionForPassphraseRequired() throws Exception { + mSyncTestRule.getFakeServerHelper().setCustomPassphraseNigori("passphrase"); + + mSyncTestRule.setUpAccountAndSignInForTesting(); + SyncTestUtil.waitForSyncTransportActive(); + + SyncService syncService = mSyncTestRule.getSyncService(); + CriteriaHelper.pollUiThread(() -> syncService.isPassphraseRequiredForPreferredDataTypes()); + + SettingsActivity settingsActivity = mSettingsActivityTestRule.startSettingsActivity(); + onViewWaiting(allOf(is(mSettingsActivityTestRule.getFragment().getView()), isDisplayed())); + // The error card exists. + onView(withId(R.id.identity_error_card)).check(matches(isDisplayed())); + + // Mimic the user tapping on the error card's button. + onView(withId(R.id.identity_error_card_button)).perform(click()); + + final AccountManagementFragment fragment = mSettingsActivityTestRule.getFragment(); + // Passphrase dialog should open. + final PassphraseDialogFragment passphraseFragment = + ActivityTestUtils.waitForFragment( + settingsActivity, AccountManagementFragment.FRAGMENT_ENTER_PASSPHRASE); + Assert.assertTrue(passphraseFragment.isAdded()); + + // Simulate OnPassphraseAccepted from external event by setting the passphrase + // and triggering syncStateChanged(). + // PassphraseDialogFragment should be dismissed. + TestThreadUtils.runOnUiThreadBlocking( + () -> syncService.setDecryptionPassphrase("passphrase")); + TestThreadUtils.runOnUiThreadBlocking( + () -> { + fragment.getFragmentManager().executePendingTransactions(); + Assert.assertNull( + "PassphraseDialogFragment should be dismissed.", + settingsActivity + .getFragmentManager() + .findFragmentByTag( + AccountManagementFragment.FRAGMENT_ENTER_PASSPHRASE)); + }); + + // No error card exists anymore. + onView(withId(R.id.identity_error_card)).check(doesNotExist()); + } + + @Test + @LargeTest + @EnableFeatures(ChromeFeatureList.SYNC_SHOW_IDENTITY_ERRORS_FOR_SIGNED_IN_USERS) + public void testActionForClientOutdatedError() throws Exception { + overrideSyncService().setRequiresClientUpgrade(true); + + // Sign in and open settings. + mSyncTestRule.setUpAccountAndSignInForTesting(); + + mSettingsActivityTestRule.startSettingsActivity(); + onViewWaiting(allOf(is(mSettingsActivityTestRule.getFragment().getView()), isDisplayed())); + // The error card exists. + onView(withId(R.id.identity_error_card)).check(matches(isDisplayed())); + + Intents.init(); + // Stub all external intents. + intending(IntentMatchers.anyIntent()) + .respondWith(new ActivityResult(Activity.RESULT_OK, null)); + + // Mimic the user tapping on the error card's button. + onView(withId(R.id.identity_error_card_button)).perform(click()); + + intended(IntentMatchers.hasDataString(startsWith("market"))); + Intents.release(); + } + private FakeSyncServiceImpl overrideSyncService() { return TestThreadUtils.runOnUiThreadBlockingNoException( () -> {
diff --git a/chrome/browser/apps/app_preload_service/app_preload_server_connector.cc b/chrome/browser/apps/app_preload_service/app_preload_server_connector.cc index 7345e82e..662924a 100644 --- a/chrome/browser/apps/app_preload_service/app_preload_server_connector.cc +++ b/chrome/browser/apps/app_preload_service/app_preload_server_connector.cc
@@ -4,19 +4,23 @@ #include "chrome/browser/apps/app_preload_service/app_preload_server_connector.h" +#include <utility> + +#include "base/feature_list.h" #include "base/functional/callback.h" #include "base/metrics/histogram_functions.h" #include "base/time/time.h" #include "chrome/browser/apps/almanac_api_client/almanac_api_util.h" #include "chrome/browser/apps/almanac_api_client/device_info_manager.h" #include "chrome/browser/apps/almanac_api_client/proto/client_context.pb.h" -#include "chrome/browser/apps/app_preload_service/preload_app_definition.h" +#include "chrome/browser/apps/app_preload_service/app_preload_service.h" #include "chrome/browser/apps/app_preload_service/proto/app_preload.pb.h" #include "net/base/net_errors.h" #include "services/network/public/cpp/shared_url_loader_factory.h" #include "services/network/public/cpp/simple_url_loader.h" #include "services/network/public/mojom/url_response_head.mojom.h" +namespace apps { namespace { // Endpoint for requesting app preload data on the ChromeOS Almanac API. @@ -61,9 +65,72 @@ return request_proto.SerializeAsString(); } -} // namespace +// Filters entries in LauncherConfig and ShelfConfig to ignore when the +// specified feature is disabled. +bool IsFeatureEnabled(const std::string& name) { + if (name == kAppPreloadServiceEnableTestApps.name) { + return base::FeatureList::IsEnabled(kAppPreloadServiceEnableTestApps); + } else if (!name.empty()) { + LOG(ERROR) << "Unrecognised feature flag considered disabled: " << name; + return false; + } -namespace apps { + return true; +} + +// Parses LauncherConfig from `in` and adds a LauncherItemMap entry +// into `out` LauncherOrdering keyed with `folder_name`. Uses single level of +// recursion to parse folders. +void ParseLauncherOrdering( + const google::protobuf::RepeatedPtrField< + proto::AppPreloadListResponse_LauncherConfig>& in, + const std::string& folder_name, + LauncherOrdering* out, + bool allow_nested_folders = false) { + LauncherItemMap item_map; + for (const auto& item : in) { + if (!IsFeatureEnabled(item.feature_flag())) { + continue; + } + // All packages are added as keys to item_map with the same data. + for (const auto& package_id : item.package_id()) { + if (std::optional<apps::PackageId> parsed = + apps::PackageId::FromString(package_id)) { + item_map[*parsed] = LauncherItemData(item.type(), item.order()); + } + } + // Add nested child folder. + if (allow_nested_folders && !item.folder_name().empty()) { + item_map[item.folder_name()] = + LauncherItemData(item.type(), item.order()); + ParseLauncherOrdering(item.child_config(), item.folder_name(), out); + } + } + (*out)[folder_name] = std::move(item_map); +} + +// Parses ShelfConfig from `in` and stores result in `out` ShelfPinOrdering. +void ParseShelfPinOrdering(const google::protobuf::RepeatedPtrField< + proto::AppPreloadListResponse_ShelfConfig>& in, + ShelfPinOrdering* out) { + // ShelfConfig is parsed into a map of PackageId and uint32 order. + for (const auto& item : in) { + // Ignore any packages which specify a feature flag which is disabled on + // this device. + if (!IsFeatureEnabled(item.feature_flag())) { + continue; + } + // All packages are added as keys to the map with the same order value. + for (const auto& package_id : item.package_id()) { + if (std::optional<apps::PackageId> parsed = + apps::PackageId::FromString(package_id)) { + (*out)[*parsed] = item.order(); + } + } + } +} + +} // namespace AppPreloadServerConnector::AppPreloadServerConnector() = default; @@ -101,9 +168,12 @@ absl::Status error = GetDownloadError(loader->NetError(), loader->ResponseInfo(), response_body.get(), kServerErrorHistogramName); + LauncherOrdering launcher_ordering; + ShelfPinOrdering shelf_pin_ordering; if (!error.ok()) { LOG(ERROR) << error.message(); - std::move(callback).Run(std::nullopt); + std::move(callback).Run(std::nullopt, std::move(launcher_ordering), + std::move(shelf_pin_ordering)); return; } @@ -114,7 +184,8 @@ if (!response.ParseFromString(*response_body)) { LOG(ERROR) << "Parsing failed"; - std::move(callback).Run(std::nullopt); + std::move(callback).Run(std::nullopt, std::move(launcher_ordering), + std::move(shelf_pin_ordering)); return; } @@ -123,7 +194,15 @@ apps.emplace_back(app); } - std::move(callback).Run(std::move(apps)); + std::string empty_root_folder; + ParseLauncherOrdering(response.launcher_config(), empty_root_folder, + &launcher_ordering, + /*allow_nested_folders=*/true); + + ParseShelfPinOrdering(response.shelf_config(), &shelf_pin_ordering); + + std::move(callback).Run(std::move(apps), std::move(launcher_ordering), + std::move(shelf_pin_ordering)); } } // namespace apps
diff --git a/chrome/browser/apps/app_preload_service/app_preload_server_connector.h b/chrome/browser/apps/app_preload_service/app_preload_server_connector.h index cf67e38e..0065b28 100644 --- a/chrome/browser/apps/app_preload_service/app_preload_server_connector.h +++ b/chrome/browser/apps/app_preload_service/app_preload_server_connector.h
@@ -13,6 +13,7 @@ #include "base/functional/callback_forward.h" #include "base/memory/scoped_refptr.h" #include "base/memory/weak_ptr.h" +#include "chrome/browser/apps/app_preload_service/preload_app_definition.h" class GURL; @@ -28,10 +29,11 @@ namespace apps { struct DeviceInfo; -class PreloadAppDefinition; using GetInitialAppsCallback = - base::OnceCallback<void(std::optional<std::vector<PreloadAppDefinition>>)>; + base::OnceCallback<void(std::optional<std::vector<PreloadAppDefinition>>, + LauncherOrdering, + ShelfPinOrdering)>; // The AppPreloadServerConnector is used to talk to the App Provisioning Service // API endpoint. Its role is to build requests and convert responses into
diff --git a/chrome/browser/apps/app_preload_service/app_preload_server_connector_unittest.cc b/chrome/browser/apps/app_preload_service/app_preload_server_connector_unittest.cc index 77df493..426a0cfe 100644 --- a/chrome/browser/apps/app_preload_service/app_preload_server_connector_unittest.cc +++ b/chrome/browser/apps/app_preload_service/app_preload_server_connector_unittest.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/apps/app_preload_service/app_preload_server_connector.h" #include <optional> +#include <tuple> #include "base/functional/bind.h" #include "base/functional/callback_forward.h" @@ -12,9 +13,11 @@ #include "base/memory/scoped_refptr.h" #include "base/test/bind.h" #include "base/test/metrics/histogram_tester.h" +#include "base/test/scoped_feature_list.h" #include "base/test/test_future.h" #include "chrome/browser/apps/almanac_api_client/device_info_manager.h" #include "chrome/browser/apps/almanac_api_client/proto/client_context.pb.h" +#include "chrome/browser/apps/app_preload_service/app_preload_service.h" #include "chrome/browser/apps/app_preload_service/preload_app_definition.h" #include "chrome/browser/apps/app_preload_service/proto/app_preload.pb.h" #include "content/public/test/browser_task_environment.h" @@ -41,13 +44,16 @@ AppPreloadServerConnectorTest() : test_shared_loader_factory_( base::MakeRefCounted<network::WeakWrapperSharedURLLoaderFactory>( - &url_loader_factory_)) {} + &url_loader_factory_)) { + feature_list_.InitAndDisableFeature(kAppPreloadServiceEnableTestApps); + } protected: network::TestURLLoaderFactory url_loader_factory_; scoped_refptr<network::SharedURLLoaderFactory> test_shared_loader_factory_; AppPreloadServerConnector server_connector_; base::HistogramTester histograms_; + base::test::ScopedFeatureList feature_list_; private: content::BrowserTaskEnvironment task_environment_; @@ -91,23 +97,97 @@ } TEST_F(AppPreloadServerConnectorTest, GetAppsForFirstLoginSuccessfulResponse) { + PackageId web_app1 = *PackageId::FromString("web::http://example.com/app1"); + PackageId android_app1 = *PackageId::FromString("android:com.example.app1"); + PackageId web_app2 = *PackageId::FromString("web::http://example.com/app2"); + PackageId web_app3 = *PackageId::FromString("web::http://example.com/app3"); + PackageId web_app4 = *PackageId::FromString("web::http://example.com/app4"); + + auto type_app = proto::AppPreloadListResponse_LauncherType_LAUNCHER_TYPE_APP; + auto type_folder = + proto::AppPreloadListResponse_LauncherType_LAUNCHER_TYPE_FOLDER; proto::AppPreloadListResponse response; auto* app = response.add_apps_to_install(); app->set_name("Peanut Types"); + auto* launcher_config_item = response.add_launcher_config(); + launcher_config_item->set_type(type_app); + launcher_config_item->set_order(1); + launcher_config_item->add_package_id(web_app1.ToString()); + launcher_config_item->add_package_id(android_app1.ToString()); + + launcher_config_item = response.add_launcher_config(); + launcher_config_item->set_type(type_app); + launcher_config_item->set_order(2); + launcher_config_item->set_feature_flag("unknown"); + launcher_config_item->add_package_id(web_app2.ToString()); + + launcher_config_item = response.add_launcher_config(); + launcher_config_item->set_type(type_app); + launcher_config_item->set_order(3); + launcher_config_item->set_feature_flag("AppPreloadServiceEnableTestApps"); + launcher_config_item->add_package_id(web_app3.ToString()); + + // Add folder with web_app4. + launcher_config_item = response.add_launcher_config(); + launcher_config_item->set_type(type_folder); + launcher_config_item->set_order(4); + launcher_config_item->set_folder_name("other-folder"); + auto* folder_item = launcher_config_item->add_child_config(); + folder_item->set_type(type_app); + folder_item->set_order(1); + folder_item->add_package_id(web_app4.ToString()); + + auto* shelf_config_item = response.add_shelf_config(); + shelf_config_item->set_order(1); + shelf_config_item->add_package_id(web_app1.ToString()); + shelf_config_item->add_package_id(android_app1.ToString()); + + shelf_config_item = response.add_shelf_config(); + shelf_config_item->set_order(2); + shelf_config_item->set_feature_flag("unknown"); + shelf_config_item->add_package_id(web_app2.ToString()); + + shelf_config_item = response.add_shelf_config(); + shelf_config_item->set_order(3); + shelf_config_item->set_feature_flag("AppPreloadServiceEnableTestApps"); + shelf_config_item->add_package_id(web_app3.ToString()); + url_loader_factory_.AddResponse( AppPreloadServerConnector::GetServerUrl().spec(), response.SerializeAsString()); - base::test::TestFuture<std::optional<std::vector<PreloadAppDefinition>>> + base::test::TestFuture<std::optional<std::vector<PreloadAppDefinition>>, + LauncherOrdering, ShelfPinOrdering> test_callback; server_connector_.GetAppsForFirstLogin( DeviceInfo(), test_shared_loader_factory_, test_callback.GetCallback()); - auto apps = test_callback.Get(); + + auto apps = std::get<0>(test_callback.Get()); EXPECT_TRUE(apps.has_value()); EXPECT_EQ(apps->size(), 1u); EXPECT_EQ(apps.value()[0].GetName(), "Peanut Types"); + auto launcher_ordering = std::get<1>(test_callback.Get()); + EXPECT_EQ(launcher_ordering.size(), 2u); + auto root_folder = launcher_ordering[""]; + EXPECT_EQ(root_folder.size(), 3u); + EXPECT_EQ(root_folder[web_app1].type, type_app); + EXPECT_EQ(root_folder[web_app1].order, 1u); + EXPECT_EQ(root_folder[android_app1].type, type_app); + EXPECT_EQ(root_folder[android_app1].order, 1u); + EXPECT_EQ(root_folder["other-folder"].type, type_folder); + EXPECT_EQ(root_folder["other-folder"].order, 4u); + auto other_folder = launcher_ordering["other-folder"]; + EXPECT_EQ(other_folder.size(), 1u); + EXPECT_EQ(other_folder[web_app4].type, type_app); + EXPECT_EQ(other_folder[web_app4].order, 1u); + + auto shelf_pin_ordering = std::get<2>(test_callback.Get()); + EXPECT_EQ(shelf_pin_ordering.size(), 2u); + EXPECT_EQ(shelf_pin_ordering[web_app1], 1u); + EXPECT_EQ(shelf_pin_ordering[android_app1], 1u); + histograms_.ExpectTotalCount(kServerRoundTripHistogram, 1); } @@ -116,11 +196,12 @@ AppPreloadServerConnector::GetServerUrl().spec(), /*content=*/"", net::HTTP_INTERNAL_SERVER_ERROR); - base::test::TestFuture<std::optional<std::vector<PreloadAppDefinition>>> + base::test::TestFuture<std::optional<std::vector<PreloadAppDefinition>>, + LauncherOrdering, ShelfPinOrdering> result; server_connector_.GetAppsForFirstLogin( DeviceInfo(), test_shared_loader_factory_, result.GetCallback()); - EXPECT_FALSE(result.Get().has_value()); + EXPECT_FALSE(std::get<0>(result.Get()).has_value()); histograms_.ExpectTotalCount(kServerRoundTripHistogram, 0); } @@ -131,11 +212,12 @@ network::mojom::URLResponseHead::New(), /*content=*/"", network::URLLoaderCompletionStatus(net::ERR_TIMED_OUT)); - base::test::TestFuture<std::optional<std::vector<PreloadAppDefinition>>> + base::test::TestFuture<std::optional<std::vector<PreloadAppDefinition>>, + LauncherOrdering, ShelfPinOrdering> result; server_connector_.GetAppsForFirstLogin( DeviceInfo(), test_shared_loader_factory_, result.GetCallback()); - EXPECT_FALSE(result.Get().has_value()); + EXPECT_FALSE(std::get<0>(result.Get()).has_value()); histograms_.ExpectTotalCount(kServerRoundTripHistogram, 0); }
diff --git a/chrome/browser/apps/app_preload_service/app_preload_service.cc b/chrome/browser/apps/app_preload_service/app_preload_service.cc index 144656a..949bbfea 100644 --- a/chrome/browser/apps/app_preload_service/app_preload_service.cc +++ b/chrome/browser/apps/app_preload_service/app_preload_service.cc
@@ -162,12 +162,15 @@ void AppPreloadService::OnGetAppsForFirstLoginCompleted( base::TimeTicks start_time, - std::optional<std::vector<PreloadAppDefinition>> apps) { + std::optional<std::vector<PreloadAppDefinition>> apps, + LauncherOrdering launcher_ordering, + ShelfPinOrdering shelf_pin_ordering) { if (!apps.has_value()) { OnFirstLoginFlowComplete(start_time, /*success=*/false); return; } + // TODO(crbug.com/327058999): Implement launcher ordering and shelf pinning. std::vector<const PreloadAppDefinition*> apps_to_install; for (const PreloadAppDefinition& app : apps.value()) { if (ShouldInstallApp(app)) {
diff --git a/chrome/browser/apps/app_preload_service/app_preload_service.h b/chrome/browser/apps/app_preload_service/app_preload_service.h index c6574cc..23ea9a8 100644 --- a/chrome/browser/apps/app_preload_service/app_preload_service.h +++ b/chrome/browser/apps/app_preload_service/app_preload_service.h
@@ -83,7 +83,9 @@ // Processes the list of apps retrieved by the server connector. void OnGetAppsForFirstLoginCompleted( base::TimeTicks start_time, - std::optional<std::vector<PreloadAppDefinition>> apps); + std::optional<std::vector<PreloadAppDefinition>> apps, + LauncherOrdering launcher_ordering, + ShelfPinOrdering shelf_pin_ordering); void OnAppInstallationsCompleted(base::TimeTicks start_time, const std::vector<bool>& results); // Called when the installation flow started by
diff --git a/chrome/browser/apps/app_preload_service/preload_app_definition.h b/chrome/browser/apps/app_preload_service/preload_app_definition.h index 2f3e3df..d82a4cb 100644 --- a/chrome/browser/apps/app_preload_service/preload_app_definition.h +++ b/chrome/browser/apps/app_preload_service/preload_app_definition.h
@@ -12,12 +12,13 @@ #include "chrome/browser/apps/app_service/app_install/app_install_types.h" #include "components/services/app_service/public/cpp/app_types.h" #include "components/services/app_service/public/cpp/package_id.h" +#include "third_party/abseil-cpp/absl/types/variant.h" class GURL; namespace apps { -// A wrapper class around an App Preload Server proto to allow for easier +// A wrapper class around an App Preload Server App proto to allow for easier // extraction and conversion of information. class PreloadAppDefinition { public: @@ -64,6 +65,28 @@ std::ostream& operator<<(std::ostream& os, const PreloadAppDefinition& app); +// Wrapper for App Preload Server ShelfConfig proto. Map of PackageId to order. +using ShelfPinOrdering = std::map<apps::PackageId, uint32_t>; + +// Wrappers for App Preload Server LauncherConfig proto: + +// LauncherItem is either an app represented by a PackageId, or a folder +// represented by a string. +using LauncherItem = absl::variant<apps::PackageId, std::string>; + +// LauncherItemData is the associated data for a LauncherItem. +struct LauncherItemData { + proto::AppPreloadListResponse_LauncherType type; + uint32_t order; +}; + +// Map of LauncherItem to LauncherItemData. +using LauncherItemMap = std::map<LauncherItem, LauncherItemData>; + +// Map of folder to LauncherItemMap. Root folder always exists and is keyed by +// empty string. +using LauncherOrdering = std::map<std::string, LauncherItemMap>; + } // namespace apps #endif // CHROME_BROWSER_APPS_APP_PRELOAD_SERVICE_PRELOAD_APP_DEFINITION_H_
diff --git a/chrome/browser/apps/app_service/metrics/app_platform_metrics.cc b/chrome/browser/apps/app_service/metrics/app_platform_metrics.cc index 1115446..0985a87 100644 --- a/chrome/browser/apps/app_service/metrics/app_platform_metrics.cc +++ b/chrome/browser/apps/app_service/metrics/app_platform_metrics.cc
@@ -26,7 +26,6 @@ #include "chrome/browser/ash/guest_os/guest_os_shelf_utils.h" #include "chrome/browser/ash/profiles/profile_helper.h" #include "chrome/browser/profiles/profile.h" -#include "chrome/browser/web_applications/web_app_id_constants.h" #include "chrome/browser/web_applications/web_app_utils.h" #include "chromeos/components/mgs/managed_guest_session_utils.h" #include "components/app_constants/constants.h" @@ -1216,7 +1215,7 @@ } // UMA for Mall app. - if (it.second.app_id == web_app::kMallAppId) { + if (AppIdToName(it.second.app_id) == DefaultAppName::kMall) { base::UmaHistogramCustomTimes("Apps.AppDiscovery.MallUsageTime", it.second.running_time, base::Seconds(1), base::Hours(2), 100);
diff --git a/chrome/browser/apps/app_service/metrics/app_service_metrics.cc b/chrome/browser/apps/app_service/metrics/app_service_metrics.cc index 44a386c..ceb105f 100644 --- a/chrome/browser/apps/app_service/metrics/app_service_metrics.cc +++ b/chrome/browser/apps/app_service/metrics/app_service_metrics.cc
@@ -329,6 +329,8 @@ return apps::DefaultAppName::kKeep; } else if (app_id == web_app::kGoogleMapsAppId) { return apps::DefaultAppName::kGoogleMaps; + } else if (app_id == web_app::kMallAppId) { + return DefaultAppName::kMall; } else if (app_id == web_app::kMessagesAppId) { return apps::DefaultAppName::kGoogleMessages; } else if (app_id == web_app::kPlayBooksAppId) {
diff --git a/chrome/browser/apps/app_service/metrics/app_service_metrics.h b/chrome/browser/apps/app_service/metrics/app_service_metrics.h index bd7dca0..2d01b50 100644 --- a/chrome/browser/apps/app_service/metrics/app_service_metrics.h +++ b/chrome/browser/apps/app_service/metrics/app_service_metrics.h
@@ -74,9 +74,10 @@ kGoogleMaps = 56, kGoogleMessages = 57, kContainer = 58, + kMall = 59, // Add any new values above this one, and update kMaxValue to the highest // enumerator value. - kMaxValue = kContainer, + kMaxValue = kMall, }; // The built-in app's histogram name. This is used for logging so do not change
diff --git a/chrome/browser/ash/BUILD.gn b/chrome/browser/ash/BUILD.gn index efdf407c..e142218 100644 --- a/chrome/browser/ash/BUILD.gn +++ b/chrome/browser/ash/BUILD.gn
@@ -1640,6 +1640,11 @@ "input_method/input_method_settings.h", "input_method/input_method_syncer.cc", "input_method/input_method_syncer.h", + "input_method/japanese/japanese_legacy_config.cc", + "input_method/japanese/japanese_legacy_config.h", + "input_method/japanese/japanese_prefs_constants.h", + "input_method/japanese/japanese_settings.cc", + "input_method/japanese/japanese_settings.h", "input_method/longpress_control_v_suggester.cc", "input_method/longpress_control_v_suggester.h", "input_method/longpress_diacritics_suggester.cc", @@ -2909,7 +2914,6 @@ "policy/status_collector/device_status_collector.h", "policy/status_collector/enterprise_activity_storage.cc", "policy/status_collector/enterprise_activity_storage.h", - "policy/status_collector/interval_map.h", "policy/status_collector/managed_session_service.cc", "policy/status_collector/managed_session_service.h", "policy/status_collector/status_collector.cc", @@ -5764,6 +5768,8 @@ "input_method/input_method_persistence_unittest.cc", "input_method/input_method_quick_settings_helpers_unittest.cc", "input_method/input_method_settings_unittest.cc", + "input_method/japanese/japanese_legacy_config_unittest.cc", + "input_method/japanese/japanese_settings_unittest.cc", "input_method/longpress_diacritics_suggester_unittest.cc", "input_method/multi_word_suggester_unittest.cc", "input_method/native_input_method_engine_observer_unittest.cc", @@ -6068,7 +6074,6 @@ "policy/status_collector/activity_storage_unittest.cc", "policy/status_collector/app_info_generator_unittest.cc", "policy/status_collector/enterprise_activity_storage_unittest.cc", - "policy/status_collector/interval_map_unittest.cc", "policy/status_collector/managed_session_service_unittest.cc", "policy/uploading/heartbeat_scheduler_unittest.cc", "policy/uploading/status_uploader_unittest.cc",
diff --git a/chrome/browser/ash/app_list/search/system_info/system_info_card_provider.cc b/chrome/browser/ash/app_list/search/system_info/system_info_card_provider.cc index a3a5ad7..9495b50f 100644 --- a/chrome/browser/ash/app_list/search/system_info/system_info_card_provider.cc +++ b/chrome/browser/ash/app_list/search/system_info/system_info_card_provider.cc
@@ -71,7 +71,6 @@ my_files_size_calculator_(profile), drive_offline_size_calculator_(profile), browsing_data_size_calculator_(profile), - apps_size_calculator_(profile), crostini_size_calculator_(profile), profile_(profile), keywords_(GetSystemInfoKeywordVector()) { @@ -439,7 +438,6 @@ my_files_size_calculator_.StartCalculation(); drive_offline_size_calculator_.StartCalculation(); browsing_data_size_calculator_.StartCalculation(); - apps_size_calculator_.StartCalculation(); crostini_size_calculator_.StartCalculation(); other_users_size_calculator_.StartCalculation(); } @@ -450,7 +448,14 @@ my_files_size_calculator_.AddObserver(this); drive_offline_size_calculator_.AddObserver(this); browsing_data_size_calculator_.AddObserver(this); - apps_size_calculator_.AddObserver(this); + // TODO(b/324478253): Currently, observing `apps_size_calculator_` at + // construction causes deterministic failure of ArcIntegrationTest on + // betty-pi-arc (b/329337572) . As apps size is not currently in use, we + // remove it from the code. If we are interested in the apps size at some + // point, consider delaying the observing to the first time launcher search is + // used. + calculation_state_.set( + static_cast<int>(SizeCalculator::CalculationType::kAppsExtensions)); crostini_size_calculator_.AddObserver(this); other_users_size_calculator_.AddObserver(this); } @@ -461,7 +466,6 @@ my_files_size_calculator_.RemoveObserver(this); drive_offline_size_calculator_.RemoveObserver(this); browsing_data_size_calculator_.RemoveObserver(this); - apps_size_calculator_.RemoveObserver(this); crostini_size_calculator_.RemoveObserver(this); other_users_size_calculator_.RemoveObserver(this); }
diff --git a/chrome/browser/ash/app_list/search/system_info/system_info_card_provider.h b/chrome/browser/ash/app_list/search/system_info/system_info_card_provider.h index b102243..16b7a30 100644 --- a/chrome/browser/ash/app_list/search/system_info/system_info_card_provider.h +++ b/chrome/browser/ash/app_list/search/system_info/system_info_card_provider.h
@@ -117,7 +117,6 @@ ::ash::settings::MyFilesSizeCalculator my_files_size_calculator_; ::ash::settings::DriveOfflineSizeCalculator drive_offline_size_calculator_; ::ash::settings::BrowsingDataSizeCalculator browsing_data_size_calculator_; - ::ash::settings::AppsSizeCalculator apps_size_calculator_; ::ash::settings::CrostiniSizeCalculator crostini_size_calculator_; ::ash::settings::OtherUsersSizeCalculator other_users_size_calculator_;
diff --git a/chrome/browser/ash/arc/session/arc_service_launcher.cc b/chrome/browser/ash/arc/session/arc_service_launcher.cc index c2cdb48..381406b0 100644 --- a/chrome/browser/ash/arc/session/arc_service_launcher.cc +++ b/chrome/browser/ash/arc/session/arc_service_launcher.cc
@@ -26,6 +26,7 @@ #include "ash/components/arc/metrics/arc_metrics_service.h" #include "ash/components/arc/midis/arc_midis_bridge.h" #include "ash/components/arc/net/arc_net_host_impl.h" +#include "ash/components/arc/net/arc_wifi_host_impl.h" #include "ash/components/arc/obb_mounter/arc_obb_mounter_bridge.h" #include "ash/components/arc/pay/arc_digital_goods_bridge.h" #include "ash/components/arc/pay/arc_payment_app_bridge.h" @@ -326,6 +327,7 @@ ArcVolumeMounterBridge::GetForBrowserContext(profile); ArcWakeLockBridge::GetForBrowserContext(profile); ArcWallpaperService::GetForBrowserContext(profile); + ArcWifiHostImpl::GetForBrowserContext(profile); GpuArcVideoKeyedService::GetForBrowserContext(profile); CertStoreService::GetForBrowserContext(profile); apps::ArcAppsFactory::GetForProfile(profile); @@ -509,6 +511,7 @@ ArcVolumeMounterBridge::EnsureFactoryBuilt(); ArcWakeLockBridge::EnsureFactoryBuilt(); ArcWallpaperService::EnsureFactoryBuilt(); + ArcWifiHostImpl::EnsureFactoryBuilt(); CertStoreService::EnsureFactoryBuilt(); GpuArcVideoKeyedService::EnsureFactoryBuilt(); input_overlay::ArcInputOverlayManager::EnsureFactoryBuilt();
diff --git a/chrome/browser/ash/arc/wallpaper/arc_wallpaper_service.cc b/chrome/browser/ash/arc/wallpaper/arc_wallpaper_service.cc index 38280e5..aa90251 100644 --- a/chrome/browser/ash/arc/wallpaper/arc_wallpaper_service.cc +++ b/chrome/browser/ash/arc/wallpaper/arc_wallpaper_service.cc
@@ -16,6 +16,7 @@ #include "base/logging.h" #include "base/memory/raw_ptr.h" #include "base/memory/singleton.h" +#include "base/metrics/histogram_functions.h" #include "base/task/thread_pool.h" #include "chrome/browser/ui/ash/wallpaper_controller_client_impl.h" #include "components/account_id/account_id.h" @@ -35,6 +36,18 @@ constexpr char kAndroidWallpaperFilename[] = "android.jpg"; +// This enum is used for UMA. Do not reuse or modify values. +enum class ArcWallpaperApi { + kSet = 0, + kSetDefault = 1, + kGet = 2, + kMaxValue = kGet, +}; + +void RecordApiUsage(const ArcWallpaperApi api) { + base::UmaHistogramEnumeration("Arc.WallpaperApiUsage", api); +} + std::vector<uint8_t> EncodeImagePng(const gfx::ImageSkia& image) { std::vector<uint8_t> result; gfx::PNGCodec::FastEncodeBGRASkBitmap(*image.bitmap(), true, &result); @@ -136,6 +149,8 @@ void ArcWallpaperService::SetWallpaper(const std::vector<uint8_t>& data, int32_t wallpaper_id) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + RecordApiUsage(ArcWallpaperApi::kSet); + if (wallpaper_id == 0) wallpaper_id = -1; @@ -148,6 +163,8 @@ void ArcWallpaperService::SetDefaultWallpaper() { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + RecordApiUsage(ArcWallpaperApi::kSetDefault); + // Previous request will be cancelled at destructor of // ImageDecoder::ImageRequest. decode_request_.reset(); @@ -160,6 +177,8 @@ void ArcWallpaperService::GetWallpaper(GetWallpaperCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + RecordApiUsage(ArcWallpaperApi::kGet); + gfx::ImageSkia image = ash::WallpaperController::Get()->GetWallpaperImage(); if (!image.isNull()) image.SetReadOnly();
diff --git a/chrome/browser/ash/arc/wallpaper/arc_wallpaper_service_unittest.cc b/chrome/browser/ash/arc/wallpaper/arc_wallpaper_service_unittest.cc index 09755c5a..b23b27f 100644 --- a/chrome/browser/ash/arc/wallpaper/arc_wallpaper_service_unittest.cc +++ b/chrome/browser/ash/arc/wallpaper/arc_wallpaper_service_unittest.cc
@@ -5,6 +5,7 @@ #include "chrome/browser/ash/arc/wallpaper/arc_wallpaper_service.h" #include <stdint.h> + #include <memory> #include <string> #include <utility> @@ -17,6 +18,7 @@ #include "base/functional/bind.h" #include "base/memory/ptr_util.h" #include "base/memory/raw_ptr.h" +#include "base/test/metrics/histogram_tester.h" #include "chrome/browser/ash/login/users/fake_chrome_user_manager.h" #include "chrome/browser/ash/wallpaper_handlers/test_wallpaper_fetcher_delegate.h" #include "chrome/browser/image_decoder/image_decoder.h" @@ -139,8 +141,13 @@ TEST_F(ArcWallpaperServiceTest, SetDefaultWallpaper) { test_wallpaper_controller_.ClearCounts(); + base::HistogramTester histogram_tester; + service_->SetDefaultWallpaper(); + EXPECT_EQ(1, test_wallpaper_controller_.set_default_wallpaper_count()); + histogram_tester.ExpectUniqueSample("Arc.WallpaperApiUsage", 1, + /*expected_bucket_count=*/1); } TEST_F(ArcWallpaperServiceTest, SetAndGetWallpaper) { @@ -148,17 +155,25 @@ std::make_unique<SuccessDecodeRequestSender>()); std::vector<uint8_t> bytes; test_wallpaper_controller_.SetCurrentUser(user_manager::StubAccountId()); + base::HistogramTester histogram_tester; + service_->SetWallpaper(bytes, 10 /*wallpaper_id=*/); + ASSERT_EQ(1u, wallpaper_instance_->changed_ids().size()); EXPECT_EQ(10, wallpaper_instance_->changed_ids()[0]); ASSERT_EQ(1, test_wallpaper_controller_.get_third_party_wallpaper_count()); + histogram_tester.ExpectUniqueSample("Arc.WallpaperApiUsage", 0, + /*expected_bucket_count=*/1); service_->GetWallpaper( base::BindOnce([](std::vector<uint8_t>* out, const std::vector<uint8_t>& bytes) { *out = bytes; }, &bytes)); content::RunAllTasksUntilIdle(); + ASSERT_NE(0u, bytes.size()); + histogram_tester.ExpectBucketCount("Arc.WallpaperApiUsage", 2, + /*expected_count=*/1); } TEST_F(ArcWallpaperServiceTest, SetWallpaperFailure) {
diff --git a/chrome/browser/ash/crosapi/device_local_account_extension_service_ash.cc b/chrome/browser/ash/crosapi/device_local_account_extension_service_ash.cc index 837a9a3..bdb0736 100644 --- a/chrome/browser/ash/crosapi/device_local_account_extension_service_ash.cc +++ b/chrome/browser/ash/crosapi/device_local_account_extension_service_ash.cc
@@ -6,15 +6,18 @@ #include <optional> #include <string> +#include <utility> -#include "base/debug/dump_without_crashing.h" -#include "chrome/browser/ash/policy/core/browser_policy_connector_ash.h" -#include "chrome/browser/ash/policy/core/device_local_account_policy_service.h" -#include "chrome/browser/browser_process.h" +#include "base/check.h" +#include "base/values.h" #include "chrome/browser/browser_process_platform_part.h" +#include "chromeos/crosapi/mojom/device_local_account_extension_service.mojom.h" #include "components/account_id/account_id.h" #include "components/user_manager/user.h" #include "components/user_manager/user_manager.h" +#include "mojo/public/cpp/bindings/pending_receiver.h" +#include "mojo/public/cpp/bindings/pending_remote.h" +#include "mojo/public/cpp/bindings/remote_set.h" namespace crosapi { namespace { @@ -22,8 +25,9 @@ std::optional<std::string> GetPrimaryUserEmail() { const user_manager::User* user = user_manager::UserManager::Get()->GetPrimaryUser(); - if (user) + if (user) { return user->GetAccountId().GetUserEmail(); + } return std::nullopt; } @@ -43,32 +47,40 @@ void DeviceLocalAccountExtensionServiceAsh::BindExtensionInstaller( mojo::PendingRemote<mojom::DeviceLocalAccountExtensionInstaller> - installer) { - policy::BrowserPolicyConnectorAsh* connector = - g_browser_process->platform_part()->browser_policy_connector_ash(); - std::optional<std::string> primary_user_email = GetPrimaryUserEmail(); - DCHECK(primary_user_email); - policy::DeviceLocalAccountPolicyBroker* broker = - connector->GetDeviceLocalAccountPolicyService()->GetBrokerForUser( - primary_user_email.value()); - if (broker) { - auto id = installers_.Add(std::move(installer)); - installers_.Get(id)->SetForceInstallExtensionsFromCache( - broker->GetCachedExtensions()); - } else { - LOG(ERROR) << "Missing broker for DeviceLocalAccount"; - base::debug::DumpWithoutCrashing(); - } + pending_installer) { + const auto id = installers_.Add(std::move(pending_installer)); + + installers_.Get(id)->SetForceInstallExtensionsFromCache( + GetForceInstallExtensionsForPrimaryUser()); } void DeviceLocalAccountExtensionServiceAsh::SetForceInstallExtensionsFromCache( const std::string& device_local_account_user_email, const base::Value::Dict& dict) { - if (device_local_account_user_email != GetPrimaryUserEmail()) + user_email_to_extensions_dict_[device_local_account_user_email] = + dict.Clone(); + + if (device_local_account_user_email != GetPrimaryUserEmail()) { return; + } for (auto& installer : installers_) { installer->SetForceInstallExtensionsFromCache(dict.Clone()); } } +base::Value::Dict +DeviceLocalAccountExtensionServiceAsh::GetForceInstallExtensionsForPrimaryUser() + const { + std::optional<std::string> primary_user_email = GetPrimaryUserEmail(); + CHECK(primary_user_email.has_value()); + if (!user_email_to_extensions_dict_.contains(primary_user_email.value())) { + // The force install extensions list for the primary user is not available + // yet. Send an empty dict for now and the populated dict will be sent + // later (through `SetForceInstallExtensionsFromCache`). + return base::Value::Dict(); + } + + return user_email_to_extensions_dict_.at(primary_user_email.value()).Clone(); +} + } // namespace crosapi
diff --git a/chrome/browser/ash/crosapi/device_local_account_extension_service_ash.h b/chrome/browser/ash/crosapi/device_local_account_extension_service_ash.h index deaeff8..89140c5 100644 --- a/chrome/browser/ash/crosapi/device_local_account_extension_service_ash.h +++ b/chrome/browser/ash/crosapi/device_local_account_extension_service_ash.h
@@ -5,6 +5,7 @@ #ifndef CHROME_BROWSER_ASH_CROSAPI_DEVICE_LOCAL_ACCOUNT_EXTENSION_SERVICE_ASH_H_ #define CHROME_BROWSER_ASH_CROSAPI_DEVICE_LOCAL_ACCOUNT_EXTENSION_SERVICE_ASH_H_ +#include <map> #include <string> #include "base/values.h" @@ -18,9 +19,12 @@ // Implementation of the crosapi::mojom::DeviceLocalAccountExtensionService // interface. // -// When Lacros first comes up, we find the broker belonging to the logged in -// user, retrieve the install information necessary to install its cached -// extensions and send them through to Lacros. Subsequent updates will be passed +// This class will be informed about the force install extensions for all device +// local accounts, but Lacros only cares about the force install extensions of +// the primary (logged in) user. However this class exists at the login screen +// where the primary user is still unknown, so `extensions_by_user_id_` will +// track all this information and send the right force install extensions +// dictionary when Lacros first comes up. Subsequent updates will be passed // directly via SetForceInstallExtensionsFromCache. class DeviceLocalAccountExtensionServiceAsh : public crosapi::mojom::DeviceLocalAccountExtensionService { @@ -50,8 +54,15 @@ const base::Value::Dict& dict); private: + base::Value::Dict GetForceInstallExtensionsForPrimaryUser() const; + mojo::ReceiverSet<mojom::DeviceLocalAccountExtensionService> receivers_; mojo::RemoteSet<mojom::DeviceLocalAccountExtensionInstaller> installers_; + + // Tracks the latest force-install-extensions dictionary sent to + // `SetForceInstallExtensionsFromCache`, keyed on the corresponding + // `device_local_account_user_email`. + std::map<std::string, base::Value::Dict> user_email_to_extensions_dict_; }; } // namespace crosapi
diff --git a/chrome/browser/ash/input_method/input_method_settings.cc b/chrome/browser/ash/input_method/input_method_settings.cc index 170ae6c..c33be7c 100644 --- a/chrome/browser/ash/input_method/input_method_settings.cc +++ b/chrome/browser/ash/input_method/input_method_settings.cc
@@ -15,6 +15,7 @@ #include "base/strings/strcat.h" #include "chrome/browser/ash/input_method/autocorrect_enums.h" #include "chrome/browser/ash/input_method/autocorrect_prefs.h" +#include "chrome/browser/ash/input_method/japanese/japanese_settings.h" #include "chrome/common/pref_names.h" #include "components/prefs/scoped_user_pref_update.h" @@ -25,6 +26,8 @@ namespace mojom = ::ash::ime::mojom; +constexpr std::string_view kJapaneseEngineId = "nacl_mozc_jp"; + // The values here should be kept in sync with // chrome/browser/resources/ash/settings/os_languages_page/input_method_util.js // Although these strings look like UI strings, they are the actual internal @@ -392,6 +395,10 @@ return mojom::InputMethodSettings::NewVietnameseVniSettings( CreateVietnameseVniSettings(input_method_specific_pref)); } + if (engine_id == kJapaneseEngineId) { + return mojom::InputMethodSettings::NewJapaneseSettings( + ToMojomInputMethodSettings(input_method_specific_pref)); + } // TODO(b/232341104): Add the code to send the Japanese settings to // the engine if the engine_id is nacl_mozc_jp or nacl_mozc_us. // This will do the inverse of ConvertConfigToJapaneseSettings.
diff --git a/chrome/browser/ash/input_method/input_method_settings_unittest.cc b/chrome/browser/ash/input_method/input_method_settings_unittest.cc index e8a2191..782f353 100644 --- a/chrome/browser/ash/input_method/input_method_settings_unittest.cc +++ b/chrome/browser/ash/input_method/input_method_settings_unittest.cc
@@ -27,6 +27,7 @@ constexpr char kKoreanEngineId[] = "ko-t-i0-und"; constexpr char kPinyinEngineId[] = "zh-t-i0-pinyin"; constexpr char kZhuyinEngineId[] = "zh-hant-t-i0-und"; +constexpr char kJapaneseEngineId[] = "nacl_mozc_jp"; constexpr char kVietnameseVniEngineId[] = "vkd_vi_vni"; constexpr char kVietnameseTelexEngineId[] = "vkd_vi_telex"; @@ -273,6 +274,53 @@ EXPECT_EQ(zhuyin_settings.page_size, 8u); } +TEST(CreateSettingsFromPrefsTest, CreateJapaneseSettings) { + using ::ash::ime::mojom::JapaneseSettings; + + base::Value::Dict jp_prefs; + jp_prefs.Set("AutomaticallySendStatisticsToGoogle", false); + jp_prefs.Set("AutomaticallySwitchToHalfwidth", false); + jp_prefs.Set("JapaneseDisableSuggestions", true); + jp_prefs.Set("JapaneseInputMode", "Kana"); + jp_prefs.Set("JapaneseKeymapStyle", "ChromeOs"); + jp_prefs.Set("JapanesePunctuationStyle", "CommaPeriod"); + jp_prefs.Set("JapaneseSectionShortcut", "ASDFGHJKL"); + jp_prefs.Set("JapaneseSpaceInputStyle", "Fullwidth"); + jp_prefs.Set("JapaneseSymbolStyle", "SquareBracketMiddleDot"); + jp_prefs.Set("ShiftKeyModeStyle", "Off"); + jp_prefs.Set("UseInputHistory", false); + jp_prefs.Set("UseSystemDictionary", false); + jp_prefs.Set("numberOfSuggestions", 5); + + base::Value::Dict full_prefs; + full_prefs.Set(kJapaneseEngineId, std::move(jp_prefs)); + TestingPrefServiceSimple prefs; + RegisterTestingPrefs(prefs, full_prefs); + + const mojom::InputMethodSettingsPtr settings = + CreateSettingsFromPrefs(prefs, kJapaneseEngineId); + + ASSERT_TRUE(settings->is_japanese_settings()); + mojom::JapaneseSettingsPtr expected = mojom::JapaneseSettings::New(); + expected->automatically_send_statistics_to_google = false; + expected->automatically_switch_to_halfwidth = true; + expected->disable_personalized_suggestions = true; + expected->input_mode = JapaneseSettings::InputMode::kKana; + expected->keymap_style = JapaneseSettings::KeymapStyle::kChromeos; + expected->punctuation_style = + JapaneseSettings::PunctuationStyle::kCommaPeriod; + expected->selection_shortcut = + JapaneseSettings::SelectionShortcut::kAsdfghjkl; + expected->space_input_style = JapaneseSettings::SpaceInputStyle::kFullWidth; + expected->symbol_style = + JapaneseSettings::SymbolStyle::kSquareBracketMiddleDot; + expected->shift_key_mode_style = JapaneseSettings::ShiftKeyModeStyle::kOff; + expected->use_input_history = false; + expected->use_system_dictionary = false; + expected->number_of_suggestions = 5; + EXPECT_EQ(settings->get_japanese_settings(), expected); +} + TEST(CreateSettingsFromPrefsTest, AutocorrectIsSupportedForLatin) { ASSERT_TRUE(IsAutocorrectSupported("xkb:ca:multix:fra")); ASSERT_TRUE(IsAutocorrectSupported("xkb:de::ger"));
diff --git a/chrome/browser/ash/input_method/japanese/japanese_legacy_config.cc b/chrome/browser/ash/input_method/japanese/japanese_legacy_config.cc new file mode 100644 index 0000000..a69feb02 --- /dev/null +++ b/chrome/browser/ash/input_method/japanese/japanese_legacy_config.cc
@@ -0,0 +1,143 @@ +// Copyright 2024 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/ash/input_method/japanese/japanese_legacy_config.h" + +#include "base/containers/fixed_flat_map.h" +#include "base/values.h" +#include "chrome/browser/ash/input_method/japanese/japanese_prefs_constants.h" +#include "chromeos/ash/services/ime/public/mojom/user_data/japanese_legacy_config.mojom.h" + +namespace ash::input_method { +namespace { +using ::ash::ime::mojom::JapaneseLegacyConfig; +using ::ash::ime::mojom::JapaneseLegacyConfigPtr; +// stuff +constexpr auto kPreedits = + base::MakeFixedFlatMap<JapaneseLegacyConfig::PreeditMethod, + std::string_view>({ + {JapaneseLegacyConfig::PreeditMethod::kRomaji, kJpPrefInputModeRomaji}, + {JapaneseLegacyConfig::PreeditMethod::kKana, kJpPrefInputModeKana}, + }); + +constexpr auto kPunctuations = + base::MakeFixedFlatMap<JapaneseLegacyConfig::PunctuationMethod, + std::string_view>({ + {JapaneseLegacyConfig::PunctuationMethod::kKutenTouten, + kJpPrefPunctuationStyleKutenTouten}, + {JapaneseLegacyConfig::PunctuationMethod::kCommaPeriod, + kJpPrefPunctuationStyleCommaPeriod}, + {JapaneseLegacyConfig::PunctuationMethod::kKutenPeriod, + kJpPrefPunctuationStyleKutenPeriod}, + {JapaneseLegacyConfig::PunctuationMethod::kCommaTouten, + kJpPrefPunctuationStyleCommaTouten}, + }); + +constexpr auto kSymbols = + base::MakeFixedFlatMap<JapaneseLegacyConfig::SymbolMethod, + std::string_view>({ + {JapaneseLegacyConfig::SymbolMethod::kCornerBracketMiddleDot, + kJpPrefSymbolStyleCornerBracketMiddleDot}, + {JapaneseLegacyConfig::SymbolMethod::kSquareBracketSlash, + kJpPrefSymbolStyleSquareBracketSlash}, + {JapaneseLegacyConfig::SymbolMethod::kCornerBracketSlash, + kJpPrefSymbolStyleCornerBracketSlash}, + {JapaneseLegacyConfig::SymbolMethod::kSquareBracketMiddleDot, + kJpPrefSymbolStyleSquareBracketMiddleDot}, + }); + +constexpr auto kFundamentalCharacterForms = + base::MakeFixedFlatMap<JapaneseLegacyConfig::FundamentalCharacterForm, + std::string_view>({ + {JapaneseLegacyConfig::FundamentalCharacterForm::kInputMode, + kJpPrefSpaceInputStyleInputMode}, + {JapaneseLegacyConfig::FundamentalCharacterForm::kFullWidth, + kJpPrefSpaceInputStyleFullwidth}, + {JapaneseLegacyConfig::FundamentalCharacterForm::kHalfWidth, + kJpPrefSpaceInputStyleHalfwidth}, + }); + +constexpr auto kSelectionShortcuts = + base::MakeFixedFlatMap<JapaneseLegacyConfig::SelectionShortcut, + std::string_view>({ + {JapaneseLegacyConfig::SelectionShortcut::k123456789, + kJpPrefSelectionShortcutDigits123456789}, + {JapaneseLegacyConfig::SelectionShortcut::kAsdfghjkl, + kJpPrefSelectionShortcutAsdfghjkl}, + {JapaneseLegacyConfig::SelectionShortcut::kNoShortcut, + kJpPrefSelectionShortcutNoShortcut}, + }); + +constexpr auto kSessionKeymaps = + base::MakeFixedFlatMap<JapaneseLegacyConfig::SessionKeymap, + std::string_view>({ + {JapaneseLegacyConfig::SessionKeymap::kCustom, + kJpPrefKeymapStyleCustom}, + {JapaneseLegacyConfig::SessionKeymap::kAtok, kJpPrefKeymapStyleAtok}, + {JapaneseLegacyConfig::SessionKeymap::kMsime, kJpPrefKeymapStyleMsIme}, + {JapaneseLegacyConfig::SessionKeymap::kKotoeri, + kJpPrefKeymapStyleKotoeri}, + {JapaneseLegacyConfig::SessionKeymap::kMobile, + kJpPrefKeymapStyleMobile}, + {JapaneseLegacyConfig::SessionKeymap::kChromeos, + kJpPrefKeymapStyleChromeOs}, + }); + +constexpr auto kShiftKeyModeSwitch = + base::MakeFixedFlatMap<JapaneseLegacyConfig::ShiftKeyModeSwitch, + std::string_view>({ + {JapaneseLegacyConfig::ShiftKeyModeSwitch::kOff, + kJpPrefShiftKeyModeStyleOff}, + {JapaneseLegacyConfig::ShiftKeyModeSwitch::kAsciiInputMode, + kJpPrefShiftKeyModeStyleAlphanumeric}, + {JapaneseLegacyConfig::ShiftKeyModeSwitch::kKatakana, + kJpPrefShiftKeyModeStyleKatakana}, + }); + +} // namespace + +base::Value::Dict CreatePrefsDictFromJapaneseLegacyConfig( + JapaneseLegacyConfigPtr config) { + base::Value::Dict dict; + if (auto it = kPreedits.find(config->preedit_method); it != kPreedits.end()) { + dict.Set(kJpPrefInputMode, it->second); + } + if (auto it = kPunctuations.find(config->punctuation_method); + it != kPunctuations.end()) { + dict.Set(kJpPrefPunctuationStyle, it->second); + } + if (auto it = kSymbols.find(config->symbol_method); it != kSymbols.end()) { + dict.Set(kJpPrefSymbolStyle, it->second); + } + if (auto it = kFundamentalCharacterForms.find(config->space_character_form); + it != kFundamentalCharacterForms.end()) { + dict.Set(kJpPrefSpaceInputStyle, it->second); + } + if (auto it = kSelectionShortcuts.find(config->selection_shortcut); + it != kSelectionShortcuts.end()) { + dict.Set(kJpPrefSelectionShortcut, it->second); + } + if (auto it = kSessionKeymaps.find(config->session_keymap); + it != kSessionKeymaps.end()) { + dict.Set(kJpPrefKeymapStyle, it->second); + } + if (auto it = kShiftKeyModeSwitch.find(config->shift_key_mode_switch); + it != kShiftKeyModeSwitch.end()) { + dict.Set(kJpPrefShiftKeyModeStyle, it->second); + } + + dict.Set(kJpPrefAutomaticallySwitchToHalfwidth, config->use_auto_conversion); + dict.Set(kJpPrefUseInputHistory, config->use_history_suggest); + dict.Set(kJpPrefUseSystemDictionary, config->use_dictionary_suggest); + dict.Set(kJpPrefDisablePersonalizedSuggestions, config->incognito_mode); + dict.Set(kJpPrefAutomaticallySendStatisticsToGoogle, + config->upload_usage_stats); + + dict.Set(kJpPrefNumberOfSuggestions, + static_cast<int>(config->suggestion_size)); + + return dict; +} + +} // namespace ash::input_method
diff --git a/chrome/browser/ash/input_method/japanese/japanese_legacy_config.h b/chrome/browser/ash/input_method/japanese/japanese_legacy_config.h new file mode 100644 index 0000000..dd935a3 --- /dev/null +++ b/chrome/browser/ash/input_method/japanese/japanese_legacy_config.h
@@ -0,0 +1,21 @@ +// Copyright 2024 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_ASH_INPUT_METHOD_JAPANESE_JAPANESE_LEGACY_CONFIG_H_ +#define CHROME_BROWSER_ASH_INPUT_METHOD_JAPANESE_JAPANESE_LEGACY_CONFIG_H_ + +#include "base/containers/fixed_flat_map.h" +#include "base/values.h" +#include "chromeos/ash/services/ime/public/mojom/user_data/japanese_legacy_config.mojom.h" + +namespace ash::input_method { + +// Fills a dictionary with all the prefs that are set in the +// JapaneseLegacyConfig using the prefs constants expected by the settings app. +base::Value::Dict CreatePrefsDictFromJapaneseLegacyConfig( + ash::ime::mojom::JapaneseLegacyConfigPtr legacy_config); + +} // namespace ash::input_method + +#endif // CHROME_BROWSER_ASH_INPUT_METHOD_JAPANESE_JAPANESE_LEGACY_CONFIG_H_
diff --git a/chrome/browser/ash/input_method/japanese/japanese_legacy_config_unittest.cc b/chrome/browser/ash/input_method/japanese/japanese_legacy_config_unittest.cc new file mode 100644 index 0000000..4040899 --- /dev/null +++ b/chrome/browser/ash/input_method/japanese/japanese_legacy_config_unittest.cc
@@ -0,0 +1,57 @@ +// Copyright 2024 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/ash/input_method/japanese/japanese_legacy_config.h" + +#include "chromeos/ash/services/ime/public/mojom/user_data/japanese_legacy_config.mojom.h" +#include "testing/gmock/include/gmock/gmock.h" +#include "testing/gtest/include/gtest/gtest.h" + +namespace ash::input_method { +namespace { + +using ::ash::ime::mojom::JapaneseLegacyConfig; + +TEST(JapaneseLegacyConfigTest, TestMojomToPref) { + base::Value::Dict response = + CreatePrefsDictFromJapaneseLegacyConfig(JapaneseLegacyConfig::New( + /*preedit_method=*/JapaneseLegacyConfig::PreeditMethod::kKana, + /*punctuation_method=*/ + JapaneseLegacyConfig::PunctuationMethod::kCommaPeriod, + /*symbol_method=*/ + JapaneseLegacyConfig::SymbolMethod::kCornerBracketMiddleDot, + /*space_character_form=*/ + JapaneseLegacyConfig::FundamentalCharacterForm::kFullWidth, + /*selection_shortcut=*/ + JapaneseLegacyConfig::SelectionShortcut::kAsdfghjkl, + /*session_keymap=*/JapaneseLegacyConfig::SessionKeymap::kAtok, + /*use_auto_conversion=*/true, + /*shift_key_mode_switch=*/ + JapaneseLegacyConfig::ShiftKeyModeSwitch::kAsciiInputMode, + /*use_history_suggest=*/true, + /*use_dictionary_suggest=*/true, + /*suggestion_size=*/8, + /*incognito_mode=*/true, + /*upload_usage_stats=*/false)); + + base::Value::Dict expected; + expected.Set("JapaneseInputMode", "Kana"); + expected.Set("JapanesePunctuationStyle", "CommaPeriod"); + expected.Set("JapaneseSymbolStyle", "CornerBracketMiddleDot"); + expected.Set("JapaneseSpaceInputStyle", "Fullwidth"); + expected.Set("JapaneseSectionShortcut", "ASDFGHJKL"); + expected.Set("JapaneseKeymapStyle", "Atok"); + expected.Set("AutomaticallySwitchToHalfwidth", true); + expected.Set("ShiftKeyModeStyle", "Alphanumeric"); + expected.Set("JapaneseDisableSuggestions", true); + expected.Set("UseSystemDictionary", true); + expected.Set("numberOfSuggestions", 8); + expected.Set("UseInputHistory", true); + expected.Set("AutomaticallySendStatisticsToGoogle", false); + + EXPECT_EQ(response, expected); +} + +} // namespace +} // namespace ash::input_method
diff --git a/chrome/browser/ash/input_method/japanese/japanese_prefs_constants.h b/chrome/browser/ash/input_method/japanese/japanese_prefs_constants.h new file mode 100644 index 0000000..11316ff --- /dev/null +++ b/chrome/browser/ash/input_method/japanese/japanese_prefs_constants.h
@@ -0,0 +1,78 @@ +// Copyright 2024 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_ASH_INPUT_METHOD_JAPANESE_JAPANESE_PREFS_CONSTANTS_H_ +#define CHROME_BROWSER_ASH_INPUT_METHOD_JAPANESE_JAPANESE_PREFS_CONSTANTS_H_ + +namespace ash::input_method { +// Encapsulates the constants for each of the options for Japanese prefs. +// Top level option categories: +// LINT.IfChange(JpOptionCategories) +static constexpr std::string_view kJpPrefAutomaticallySwitchToHalfwidth = + "AutomaticallySwitchToHalfwidth"; +static constexpr std::string_view kJpPrefShiftKeyModeStyle = + "ShiftKeyModeStyle"; +static constexpr std::string_view kJpPrefUseInputHistory = "UseInputHistory"; +static constexpr std::string_view kJpPrefUseSystemDictionary = + "UseSystemDictionary"; +static constexpr std::string_view kJpPrefNumberOfSuggestions = + "numberOfSuggestions"; +static constexpr std::string_view kJpPrefInputMode = "JapaneseInputMode"; +static constexpr std::string_view kJpPrefPunctuationStyle = + "JapanesePunctuationStyle"; +static constexpr std::string_view kJpPrefSymbolStyle = "JapaneseSymbolStyle"; +static constexpr std::string_view kJpPrefSpaceInputStyle = + "JapaneseSpaceInputStyle"; +static constexpr std::string_view kJpPrefSelectionShortcut = + "JapaneseSectionShortcut"; +static constexpr std::string_view kJpPrefKeymapStyle = "JapaneseKeymapStyle"; +static constexpr std::string_view kJpPrefDisablePersonalizedSuggestions = + "JapaneseDisableSuggestions"; +static constexpr std::string_view kJpPrefAutomaticallySendStatisticsToGoogle = + "AutomaticallySendStatisticsToGoogle"; +// LINT.ThenChange(/chrome/browser/resources/ash/settings/os_languages_page/input_method_util.ts:JpOptionCategories) +// Options values for the above option categories: +// LINT.IfChange(JpOptionValues) +static constexpr std::string_view kJpPrefInputModeKana = "Kana"; +static constexpr std::string_view kJpPrefInputModeRomaji = "Romaji"; +static constexpr std::string_view kJpPrefPunctuationStyleKutenTouten = + "KutenTouten"; +static constexpr std::string_view kJpPrefPunctuationStyleCommaPeriod = + "CommaPeriod"; +static constexpr std::string_view kJpPrefPunctuationStyleKutenPeriod = + "KutenPeriod"; +static constexpr std::string_view kJpPrefPunctuationStyleCommaTouten = + "CommaTouten"; +static constexpr std::string_view kJpPrefSymbolStyleCornerBracketMiddleDot = + "CornerBracketMiddleDot"; +static constexpr std::string_view kJpPrefSymbolStyleSquareBracketSlash = + "SquareBracketSlash"; +static constexpr std::string_view kJpPrefSymbolStyleCornerBracketSlash = + "CornerBracketSlash"; +static constexpr std::string_view kJpPrefSymbolStyleSquareBracketMiddleDot = + "SquareBracketMiddleDot"; +static constexpr std::string_view kJpPrefSpaceInputStyleInputMode = "InputMode"; +static constexpr std::string_view kJpPrefSpaceInputStyleFullwidth = "Fullwidth"; +static constexpr std::string_view kJpPrefSpaceInputStyleHalfwidth = "Halfwidth"; +static constexpr std::string_view kJpPrefSelectionShortcutNoShortcut = + "NoShortcut"; +static constexpr std::string_view kJpPrefSelectionShortcutDigits123456789 = + "Digits123456789"; +static constexpr std::string_view kJpPrefSelectionShortcutAsdfghjkl = + "ASDFGHJKL"; +static constexpr std::string_view kJpPrefKeymapStyleCustom = "Custom"; +static constexpr std::string_view kJpPrefKeymapStyleAtok = "Atok"; +static constexpr std::string_view kJpPrefKeymapStyleMsIme = "MsIme"; +static constexpr std::string_view kJpPrefKeymapStyleKotoeri = "Kotoeri"; +static constexpr std::string_view kJpPrefKeymapStyleMobile = "Mobile"; +static constexpr std::string_view kJpPrefKeymapStyleChromeOs = "ChromeOs"; +static constexpr std::string_view kJpPrefShiftKeyModeStyleOff = "Off"; +static constexpr std::string_view kJpPrefShiftKeyModeStyleAlphanumeric = + "Alphanumeric"; +static constexpr std::string_view kJpPrefShiftKeyModeStyleKatakana = "Katakana"; +// LINT.ThenChange(/chrome/browser/resources/ash/settings/os_languages_page/input_method_types.ts:JpOptionValues) + +} // namespace ash::input_method + +#endif // CHROME_BROWSER_ASH_INPUT_METHOD_JAPANESE_JAPANESE_PREFS_CONSTANTS_H_
diff --git a/chrome/browser/ash/input_method/japanese/japanese_settings.cc b/chrome/browser/ash/input_method/japanese/japanese_settings.cc new file mode 100644 index 0000000..bbc48f1 --- /dev/null +++ b/chrome/browser/ash/input_method/japanese/japanese_settings.cc
@@ -0,0 +1,196 @@ +// Copyright 2024 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/ash/input_method/japanese/japanese_settings.h" + +#include "base/containers/fixed_flat_map.h" +#include "chrome/browser/ash/input_method/japanese/japanese_prefs_constants.h" +#include "chromeos/ash/services/ime/public/mojom/input_method.mojom.h" + +namespace ash::input_method { +namespace { +using ::ash::ime::mojom::JapaneseSettings; +using ::ash::ime::mojom::JapaneseSettingsPtr; + +constexpr auto kInputModes = + base::MakeFixedFlatMap<std::string_view, JapaneseSettings::InputMode>({ + {kJpPrefInputModeRomaji, JapaneseSettings::InputMode::kRomaji}, + {kJpPrefInputModeKana, JapaneseSettings::InputMode::kKana}, + }); + +constexpr auto kPunctuations = + base::MakeFixedFlatMap<std::string_view, + JapaneseSettings::PunctuationStyle>({ + {kJpPrefPunctuationStyleKutenTouten, + JapaneseSettings::PunctuationStyle::kKutenTouten}, + {kJpPrefPunctuationStyleCommaPeriod, + JapaneseSettings::PunctuationStyle::kCommaPeriod}, + {kJpPrefPunctuationStyleKutenPeriod, + JapaneseSettings::PunctuationStyle::kKutenPeriod}, + {kJpPrefPunctuationStyleCommaTouten, + JapaneseSettings::PunctuationStyle::kCommaTouten}, + }); + +constexpr auto kSymbols = + base::MakeFixedFlatMap<std::string_view, JapaneseSettings::SymbolStyle>({ + {kJpPrefSymbolStyleCornerBracketMiddleDot, + JapaneseSettings::SymbolStyle::kCornerBracketMiddleDot}, + {kJpPrefSymbolStyleSquareBracketSlash, + JapaneseSettings::SymbolStyle::kSquareBracketSlash}, + {kJpPrefSymbolStyleCornerBracketSlash, + JapaneseSettings::SymbolStyle::kCornerBracketSlash}, + {kJpPrefSymbolStyleSquareBracketMiddleDot, + JapaneseSettings::SymbolStyle::kSquareBracketMiddleDot}, + }); + +constexpr auto kSpaceInputStyles = + base::MakeFixedFlatMap<std::string_view, JapaneseSettings::SpaceInputStyle>( + { + {kJpPrefSpaceInputStyleInputMode, + JapaneseSettings::SpaceInputStyle::kInputMode}, + {kJpPrefSpaceInputStyleFullwidth, + JapaneseSettings::SpaceInputStyle::kFullWidth}, + {kJpPrefSpaceInputStyleHalfwidth, + JapaneseSettings::SpaceInputStyle::kHalfWidth}, + }); + +constexpr auto kSelectionShortcuts = + base::MakeFixedFlatMap<std::string_view, + JapaneseSettings::SelectionShortcut>({ + {kJpPrefSelectionShortcutDigits123456789, + JapaneseSettings::SelectionShortcut::kDigits123456789}, + {kJpPrefSelectionShortcutAsdfghjkl, + JapaneseSettings::SelectionShortcut::kAsdfghjkl}, + {kJpPrefSelectionShortcutNoShortcut, + JapaneseSettings::SelectionShortcut::kNoShortcut}, + }); + +constexpr auto kKeymapStyles = + base::MakeFixedFlatMap<std::string_view, JapaneseSettings::KeymapStyle>({ + {kJpPrefKeymapStyleCustom, JapaneseSettings::KeymapStyle::kCustom}, + {kJpPrefKeymapStyleAtok, JapaneseSettings::KeymapStyle::kAtok}, + {kJpPrefKeymapStyleMsIme, JapaneseSettings::KeymapStyle::kMsime}, + {kJpPrefKeymapStyleKotoeri, JapaneseSettings::KeymapStyle::kKotoeri}, + {kJpPrefKeymapStyleMobile, JapaneseSettings::KeymapStyle::kMobile}, + {kJpPrefKeymapStyleChromeOs, JapaneseSettings::KeymapStyle::kChromeos}, + }); + +constexpr auto kShiftKeyModeStyle = + base::MakeFixedFlatMap<std::string_view, + JapaneseSettings::ShiftKeyModeStyle>({ + {kJpPrefShiftKeyModeStyleOff, + JapaneseSettings::ShiftKeyModeStyle::kOff}, + {kJpPrefShiftKeyModeStyleAlphanumeric, + JapaneseSettings::ShiftKeyModeStyle::kAlphanumeric}, + {kJpPrefShiftKeyModeStyleKatakana, + JapaneseSettings::ShiftKeyModeStyle::kKatakana}, + }); + +// Makes default based on what drop down menu in settings page will show if +// unset. +JapaneseSettingsPtr MakeDefaultJapaneseSettings() { + JapaneseSettingsPtr response = JapaneseSettings::New(); + // LINT.IfChange(JpPrefDefaults) + response->automatically_switch_to_halfwidth = true; + response->shift_key_mode_style = + JapaneseSettings::ShiftKeyModeStyle::kAlphanumeric; + response->use_input_history = true; + response->use_system_dictionary = true; + response->number_of_suggestions = 3; + response->input_mode = JapaneseSettings::InputMode::kRomaji; + response->punctuation_style = + JapaneseSettings::PunctuationStyle::kKutenTouten; + response->symbol_style = + JapaneseSettings::SymbolStyle::kCornerBracketMiddleDot; + response->space_input_style = JapaneseSettings::SpaceInputStyle::kInputMode; + response->selection_shortcut = + JapaneseSettings::SelectionShortcut::kDigits123456789; + response->keymap_style = JapaneseSettings::KeymapStyle::kCustom; + response->disable_personalized_suggestions = true; + response->automatically_send_statistics_to_google = true; + // LINT.ThenChange(/chrome/browser/resources/ash/settings/os_languages_page/input_method_util.ts:JpPrefDefaults) + return response; +} + +} // namespace + +JapaneseSettingsPtr ToMojomInputMethodSettings(const base::Value::Dict& prefs) { + JapaneseSettingsPtr response = MakeDefaultJapaneseSettings(); + if (const std::string* val = prefs.FindString(kJpPrefInputMode); + val != nullptr) { + if (auto it = kInputModes.find(*val); it != kInputModes.end()) { + response->input_mode = it->second; + } else { + LOG(ERROR) << "Value not found for " << *val; + } + } + if (const std::string* val = prefs.FindString(kJpPrefPunctuationStyle); + val != nullptr) { + if (auto it = kPunctuations.find(*val); it != kPunctuations.end()) { + response->punctuation_style = it->second; + } else { + LOG(ERROR) << "Value not found for " << *val; + } + } + if (const std::string* val = prefs.FindString(kJpPrefSymbolStyle); + val != nullptr) { + if (auto it = kSymbols.find(*val); it != kSymbols.end()) { + response->symbol_style = it->second; + } else { + LOG(ERROR) << "Value not found for " << *val; + } + } + if (const std::string* val = prefs.FindString(kJpPrefSpaceInputStyle); + val != nullptr) { + if (auto it = kSpaceInputStyles.find(*val); it != kSpaceInputStyles.end()) { + response->space_input_style = it->second; + } else { + LOG(ERROR) << "Value not found for " << *val; + } + } + if (const std::string* val = prefs.FindString(kJpPrefSelectionShortcut); + val != nullptr) { + if (auto it = kSelectionShortcuts.find(*val); + it != kSelectionShortcuts.end()) { + response->selection_shortcut = it->second; + } else { + LOG(ERROR) << "Value not found for " << *val; + } + } + if (const std::string* val = prefs.FindString(kJpPrefKeymapStyle); + val != nullptr) { + if (auto it = kKeymapStyles.find(*val); it != kKeymapStyles.end()) { + response->keymap_style = it->second; + } else { + LOG(ERROR) << "Value not found for " << *val; + } + } + if (const std::string* val = prefs.FindString(kJpPrefShiftKeyModeStyle); + val != nullptr) { + if (auto it = kShiftKeyModeStyle.find(*val); + it != kShiftKeyModeStyle.end()) { + response->shift_key_mode_style = it->second; + } else { + LOG(ERROR) << "Value not found for " << *val; + } + } + + response->use_input_history = prefs.FindBool(kJpPrefUseInputHistory) + .value_or(response->use_input_history); + response->use_system_dictionary = + prefs.FindBool(kJpPrefUseSystemDictionary) + .value_or(response->use_system_dictionary); + response->number_of_suggestions = + prefs.FindInt(kJpPrefNumberOfSuggestions) + .value_or(response->number_of_suggestions); + response->disable_personalized_suggestions = + prefs.FindBool(kJpPrefDisablePersonalizedSuggestions) + .value_or(response->disable_personalized_suggestions); + response->automatically_send_statistics_to_google = + prefs.FindBool(kJpPrefAutomaticallySendStatisticsToGoogle) + .value_or(response->automatically_send_statistics_to_google); + return response; +} + +} // namespace ash::input_method
diff --git a/chrome/browser/ash/input_method/japanese/japanese_settings.h b/chrome/browser/ash/input_method/japanese/japanese_settings.h new file mode 100644 index 0000000..c9a798f --- /dev/null +++ b/chrome/browser/ash/input_method/japanese/japanese_settings.h
@@ -0,0 +1,16 @@ +// Copyright 2024 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_ASH_INPUT_METHOD_JAPANESE_JAPANESE_SETTINGS_H_ +#define CHROME_BROWSER_ASH_INPUT_METHOD_JAPANESE_JAPANESE_SETTINGS_H_ +#include "chromeos/ash/services/ime/public/mojom/input_method.mojom.h" + +namespace ash::input_method { + +ash::ime::mojom::JapaneseSettingsPtr ToMojomInputMethodSettings( + const base::Value::Dict& prefs_dict); + +} // namespace ash::input_method + +#endif // CHROME_BROWSER_ASH_INPUT_METHOD_JAPANESE_JAPANESE_SETTINGS_H_
diff --git a/chrome/browser/ash/input_method/japanese/japanese_settings_unittest.cc b/chrome/browser/ash/input_method/japanese/japanese_settings_unittest.cc new file mode 100644 index 0000000..3d13df0 --- /dev/null +++ b/chrome/browser/ash/input_method/japanese/japanese_settings_unittest.cc
@@ -0,0 +1,84 @@ +// Copyright 2024 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/ash/input_method/japanese/japanese_settings.h" + +#include "chromeos/ash/services/ime/public/mojom/input_method.mojom.h" +#include "testing/gmock/include/gmock/gmock.h" +#include "testing/gtest/include/gtest/gtest.h" + +namespace ash::input_method { +namespace { +using ::ash::ime::mojom::JapaneseSettings; + +TEST(JapaneseSettingsTest, OnSetPrefsSetsSettingsFromPrefs) { + base::Value::Dict prefs; + prefs.Set("AutomaticallySendStatisticsToGoogle", false); + prefs.Set("AutomaticallySwitchToHalfwidth", false); + prefs.Set("JapaneseDisableSuggestions", true); + prefs.Set("JapaneseInputMode", "Kana"); + prefs.Set("JapaneseKeymapStyle", "ChromeOs"); + prefs.Set("JapanesePunctuationStyle", "CommaPeriod"); + prefs.Set("JapaneseSectionShortcut", "ASDFGHJKL"); + prefs.Set("JapaneseSpaceInputStyle", "Fullwidth"); + prefs.Set("JapaneseSymbolStyle", "SquareBracketMiddleDot"); + prefs.Set("ShiftKeyModeStyle", "Off"); + prefs.Set("UseInputHistory", false); + prefs.Set("UseSystemDictionary", false); + prefs.Set("numberOfSuggestions", 5); + + ash::ime::mojom::JapaneseSettingsPtr response = + ToMojomInputMethodSettings(prefs); + ash::ime::mojom::JapaneseSettingsPtr expected = + ash::ime::mojom::JapaneseSettings::New(); + expected->automatically_send_statistics_to_google = false; + expected->automatically_switch_to_halfwidth = true; + expected->disable_personalized_suggestions = true; + expected->input_mode = JapaneseSettings::InputMode::kKana; + expected->keymap_style = JapaneseSettings::KeymapStyle::kChromeos; + expected->punctuation_style = + JapaneseSettings::PunctuationStyle::kCommaPeriod; + expected->selection_shortcut = + JapaneseSettings::SelectionShortcut::kAsdfghjkl; + expected->space_input_style = JapaneseSettings::SpaceInputStyle::kFullWidth; + expected->symbol_style = + JapaneseSettings::SymbolStyle::kSquareBracketMiddleDot; + expected->shift_key_mode_style = JapaneseSettings::ShiftKeyModeStyle::kOff; + expected->use_input_history = false; + expected->use_system_dictionary = false; + expected->number_of_suggestions = 5; + + EXPECT_EQ(response, expected); +} + +TEST(JapaneseSettingsTest, OnUnsetPrefsSetsDefault) { + base::Value::Dict prefs; + + ash::ime::mojom::JapaneseSettingsPtr response = + ToMojomInputMethodSettings(prefs); + + ash::ime::mojom::JapaneseSettingsPtr expected = + ash::ime::mojom::JapaneseSettings::New(); + expected->automatically_switch_to_halfwidth = true; + expected->shift_key_mode_style = + JapaneseSettings::ShiftKeyModeStyle::kAlphanumeric; + expected->use_input_history = true; + expected->use_system_dictionary = true; + expected->number_of_suggestions = 3; + expected->input_mode = JapaneseSettings::InputMode::kRomaji; + expected->punctuation_style = + JapaneseSettings::PunctuationStyle::kKutenTouten; + expected->symbol_style = + JapaneseSettings::SymbolStyle::kCornerBracketMiddleDot; + expected->space_input_style = JapaneseSettings::SpaceInputStyle::kInputMode; + expected->selection_shortcut = + JapaneseSettings::SelectionShortcut::kDigits123456789; + expected->keymap_style = JapaneseSettings::KeymapStyle::kCustom; + expected->disable_personalized_suggestions = true; + expected->automatically_send_statistics_to_google = true; + EXPECT_EQ(response, expected); +} +} // namespace + +} // namespace ash::input_method
diff --git a/chrome/browser/ash/input_method/native_input_method_engine_observer.cc b/chrome/browser/ash/input_method/native_input_method_engine_observer.cc index 2f5d361c..de7254f 100644 --- a/chrome/browser/ash/input_method/native_input_method_engine_observer.cc +++ b/chrome/browser/ash/input_method/native_input_method_engine_observer.cc
@@ -28,6 +28,7 @@ #include "chrome/browser/ash/input_method/autocorrect_prefs.h" #include "chrome/browser/ash/input_method/input_method_quick_settings_helpers.h" #include "chrome/browser/ash/input_method/input_method_settings.h" +#include "chrome/browser/ash/input_method/japanese/japanese_legacy_config.h" #include "chrome/browser/ash/input_method/suggestion_enums.h" #include "chrome/browser/ash/input_method/ui/input_method_menu_manager.h" #include "chrome/browser/profiles/profile_manager.h" @@ -775,21 +776,14 @@ void NativeInputMethodEngineObserver::SetJapanesePrefsFromLegacyConfig( mojom::JapaneseLegacyConfigResponsePtr response) { - // TODO(b/333041130): Add remaining values. - // Move this setting prefs logic to its own separate file. - base::Value::Dict values; - - mojom::JapaneseLegacyConfig::PreeditMethod preedit = - response->get_response()->preedit_method; - if (preedit == mojom::JapaneseLegacyConfig::PreeditMethod::kKana) { - values.Set("JapaneseInputMode", "Kana"); - } - if (preedit == mojom::JapaneseLegacyConfig::PreeditMethod::kRomaji) { - values.Set("JapaneseInputMode", "Romaji"); + if (!response->is_response()) { + return; } - SetLanguageInputMethodSpecificSetting(*prefs_, kJapanesePrefsEngineId, - values); + SetLanguageInputMethodSpecificSetting( + *prefs_, kJapanesePrefsEngineId, + CreatePrefsDictFromJapaneseLegacyConfig( + std::move(response->get_response()))); } void NativeInputMethodEngineObserver::OnActivate(const std::string& engine_id) {
diff --git a/chrome/browser/ash/policy/core/device_local_account_external_cache.cc b/chrome/browser/ash/policy/core/device_local_account_external_cache.cc index 418991b..cb61e5e 100644 --- a/chrome/browser/ash/policy/core/device_local_account_external_cache.cc +++ b/chrome/browser/ash/policy/core/device_local_account_external_cache.cc
@@ -5,31 +5,59 @@ #include "chrome/browser/ash/policy/core/device_local_account_external_cache.h" #include <memory> +#include <set> #include <string> #include <utility> #include "base/check.h" #include "base/files/file_path.h" -#include "base/functional/bind.h" #include "base/functional/callback_forward.h" #include "base/memory/scoped_refptr.h" #include "base/task/sequenced_task_runner.h" #include "base/values.h" #include "chrome/browser/ash/extensions/external_cache_impl.h" #include "chrome/browser/browser_process.h" -#include "chrome/browser/chromeos/extensions/device_local_account_external_policy_loader.h" #include "components/user_manager/user.h" #include "components/user_manager/user_manager.h" #include "services/network/public/cpp/shared_url_loader_factory.h" namespace chromeos { +namespace { + +base::Value::Dict Merge(base::Value::Dict first, base::Value::Dict second) { + first.Merge(std::move(second)); + return first; +} + +std::set<std::string> GetKeys(const base::Value::Dict& dict) { + std::set<std::string> keys; + for (auto [key, _] : dict) { + keys.insert(key); + } + return keys; +} + +base::Value::Dict FilterOnKeys(const base::Value::Dict& dict, + const std::set<std::string>& keys_to_keep) { + base::Value::Dict result; + for (auto [key, value] : dict) { + if (keys_to_keep.contains(key)) { + result.Set(key, value.Clone()); + } + } + return result; +} + +} // namespace + DeviceLocalAccountExternalCache::DeviceLocalAccountExternalCache( ExtensionListCallback ash_loader, ExtensionListCallback lacros_loader, const std::string& user_id, const base::FilePath& cache_dir) - : cache_dir_(cache_dir), + : user_id_(user_id), + cache_dir_(cache_dir), ash_loader_(ash_loader), lacros_loader_(lacros_loader) {} @@ -42,16 +70,22 @@ scoped_refptr<network::SharedURLLoaderFactory> shared_url_loader_factory = g_browser_process->shared_url_loader_factory(); external_cache_ = std::make_unique<ExternalCacheImpl>( - cache_dir_, std::move(shared_url_loader_factory), cache_task_runner, this, + cache_dir_, std::move(shared_url_loader_factory), cache_task_runner, + /*delegate=*/this, /*always_check_updates=*/true, /*wait_for_cache_initialization=*/false, /*allow_scheduled_updates=*/false); } void DeviceLocalAccountExternalCache::UpdateExtensionsList( - base::Value::Dict dict) { + base::Value::Dict ash_extensions, + base::Value::Dict lacros_extensions) { + ash_extension_keys_ = GetKeys(ash_extensions); + lacros_extension_keys_ = GetKeys(lacros_extensions); + if (external_cache_) { - external_cache_->UpdateExtensionsList(std::move(dict)); + external_cache_->UpdateExtensionsList( + Merge(std::move(ash_extensions), std::move(lacros_extensions))); } } @@ -74,8 +108,8 @@ void DeviceLocalAccountExternalCache::OnExtensionListsUpdated( const base::Value::Dict& prefs) { - lacros_loader_.Run(user_id_, prefs.Clone()); - ash_loader_.Run(user_id_, prefs.Clone()); + lacros_loader_.Run(user_id_, FilterOnKeys(prefs, lacros_extension_keys_)); + ash_loader_.Run(user_id_, FilterOnKeys(prefs, ash_extension_keys_)); } bool DeviceLocalAccountExternalCache::IsRollbackAllowed() const { @@ -91,8 +125,14 @@ return true; } -base::Value::Dict DeviceLocalAccountExternalCache::GetCachedExtensions() const { +base::Value::Dict +DeviceLocalAccountExternalCache::GetCachedExtensionsForTesting() const { return external_cache_->GetCachedExtensions().Clone(); } +void DeviceLocalAccountExternalCache::SetCacheResponseForTesting( + const base::Value::Dict& cached_extensions) { + OnExtensionListsUpdated(cached_extensions); +} + } // namespace chromeos
diff --git a/chrome/browser/ash/policy/core/device_local_account_external_cache.h b/chrome/browser/ash/policy/core/device_local_account_external_cache.h index 0265d68..5c6311d7 100644 --- a/chrome/browser/ash/policy/core/device_local_account_external_cache.h +++ b/chrome/browser/ash/policy/core/device_local_account_external_cache.h
@@ -6,6 +6,7 @@ #define CHROME_BROWSER_ASH_POLICY_CORE_DEVICE_LOCAL_ACCOUNT_EXTERNAL_CACHE_H_ #include <memory> +#include <set> #include <string> #include "base/files/file_path.h" @@ -21,8 +22,12 @@ class ExternalCache; /** - * Wrapper class around ExternalCache that also handles the callbacks from - * ExternalCacheDelegate. + * Wrapper class around `ExternalCache` that will inform the given loaders when + * extensions have been downloaded by the cache. + * A single instance per device local account (running in Ash) handles all + * extensions needed both by Ash and Lacros, but only the cached extensions + * meant for Ash will be sent to the `ash_loader`, and only the cached + * extensions meant for Lacros will be sent to the `lacros_loader`. */ class DeviceLocalAccountExternalCache : public ExternalCacheDelegate { public: @@ -47,12 +52,21 @@ // Return whether the cache is currently running. bool IsCacheRunning() const; - // Send the new extension dictionary down to the ExternalCache. - void UpdateExtensionsList(base::Value::Dict dict); + // Sends all extensions from both dictionaries down to the `ExternalCache`. + // Then when the extensions are downloaded by the cache only the extensions + // from `ash_extensions` will be sent to the `ash_loader`, and only the + // extensions from `lacros_extensions` will be sent to the `lacros_loader`. + void UpdateExtensionsList(base::Value::Dict ash_extensions, + base::Value::Dict lacros_extensions); scoped_refptr<extensions::ExternalLoader> GetExtensionLoader(); - base::Value::Dict GetCachedExtensions() const; + // Returns all cached extensions, both the ones meant for Ash and for Lacros. + base::Value::Dict GetCachedExtensionsForTesting() const; + + // Pretends the external cache responded to `OnExtensionListUpdated` with the + // given list of cached/downloaded extensions. + void SetCacheResponseForTesting(const base::Value::Dict& cached_extensions); private: // `ExternalCacheDelegate`: @@ -64,6 +78,9 @@ const base::FilePath cache_dir_; std::unique_ptr<ExternalCache> external_cache_; + std::set<std::string> ash_extension_keys_; + std::set<std::string> lacros_extension_keys_; + // Callback invoked when the list of cached extensions that must be installed // in Ash is updated. ExtensionListCallback ash_loader_;
diff --git a/chrome/browser/ash/policy/core/device_local_account_external_cache_unittest.cc b/chrome/browser/ash/policy/core/device_local_account_external_cache_unittest.cc index d52dc4e..8e90494 100644 --- a/chrome/browser/ash/policy/core/device_local_account_external_cache_unittest.cc +++ b/chrome/browser/ash/policy/core/device_local_account_external_cache_unittest.cc
@@ -4,6 +4,8 @@ #include "chrome/browser/ash/policy/core/device_local_account_external_cache.h" +#include <initializer_list> +#include <iomanip> #include <memory> #include <set> #include <string> @@ -17,6 +19,7 @@ #include "base/functional/callback.h" #include "base/functional/callback_helpers.h" #include "base/location.h" +#include "base/logging.h" #include "base/memory/scoped_refptr.h" #include "base/path_service.h" #include "base/run_loop.h" @@ -24,6 +27,7 @@ #include "base/strings/stringprintf.h" #include "base/task/current_thread.h" #include "base/task/single_thread_task_runner.h" +#include "base/test/test_future.h" #include "base/time/time.h" #include "base/values.h" #include "chrome/browser/ash/settings/scoped_cros_settings_test_helper.h" @@ -156,6 +160,24 @@ dict.Set(extension_id, std::move(value)); } +base::Value::Dict CreateExtensionsDictionary( + std::initializer_list<std::string> extensions) { + base::Value::Dict result; + + for (std::string extension_id : extensions) { + AddExtensionToDictionary(extension_id, "http://download.url", result); + } + return result; +} + +std::vector<std::string> GetKeys(const base::Value::Dict& dict) { + std::vector<std::string> keys; + for (auto [key, _] : dict) { + keys.push_back(key); + } + return keys; +} + } // namespace class DeviceLocalAccountExternalCacheTest : public testing::Test { @@ -252,8 +274,8 @@ extension_update_found_observer) { // Return a manifest to the downloader. std::string manifest; - EXPECT_TRUE(base::ReadFileToString(test_dir_.Append(kExtensionUpdateManifest), - &manifest)); + EXPECT_TRUE( + base::ReadFileToString(test_dir_.Append(manifest_file), &manifest)); auto* pending_request = test_url_loader_factory_.GetPendingRequest(0); test_url_loader_factory_.AddResponse(pending_request->request.url.spec(), @@ -271,7 +293,7 @@ "Content is irrelevant."); return cache_dir_.Append( - base::StringPrintf("%s-%s.crx", kExtensionId, kExtensionCRXVersion)); + base::StringPrintf("%s-%s.crx", id.c_str(), kExtensionCRXVersion)); } // Verifies that when the cache is not explicitly started, the loader does not @@ -290,7 +312,8 @@ EXPECT_CALL(visitor_, OnExternalProviderReady(provider_.get())).Times(1); external_cache_->StartCache( base::SingleThreadTaskRunner::GetCurrentDefault()); - external_cache_->UpdateExtensionsList(base::Value::Dict()); + external_cache_->UpdateExtensionsList(base::Value::Dict(), + base::Value::Dict()); base::RunLoop().RunUntilIdle(); VerifyAndResetVisitorCallExpectations(); @@ -319,7 +342,7 @@ auto cache_task_runner = base::MakeRefCounted<TrackingProxyTaskRunner>( base::SingleThreadTaskRunner::GetCurrentDefault()); external_cache_->StartCache(cache_task_runner); - external_cache_->UpdateExtensionsList(std::move(dict)); + external_cache_->UpdateExtensionsList(std::move(dict), base::Value::Dict()); // Spin the loop, allowing the loader to process the force-install list. // Verify that the loader announces an empty extension list. @@ -360,4 +383,39 @@ EXPECT_FALSE(cache_task_runner->has_pending_tasks()); } +TEST_F(DeviceLocalAccountExternalCacheTest, + ShouldSeparateAshAndLacrosExtensions) { + base::Value::Dict ash_extension_prefs = + CreateExtensionsDictionary({"ash-extension", "shared-extension"}); + base::Value::Dict lacros_extension_prefs = + CreateExtensionsDictionary({"lacros-extension", "shared-extension"}); + + base::test::TestFuture<const std::string&, base::Value::Dict> ash_loader; + base::test::TestFuture<const std::string&, base::Value::Dict> lacros_loader; + + DeviceLocalAccountExternalCache cache{ash_loader.GetRepeatingCallback(), + lacros_loader.GetRepeatingCallback(), + "<the-user-id>", cache_dir_}; + + cache.UpdateExtensionsList(ash_extension_prefs.Clone(), + lacros_extension_prefs.Clone()); + + // Pretend the extensions have been downloaded by the cache. + cache.SetCacheResponseForTesting(CreateExtensionsDictionary( + {"ash-extension", "lacros-extension", "shared-extension"})); + + auto [user_id_sent_to_ash, extensions_sent_to_ash] = ash_loader.Take(); + EXPECT_EQ(user_id_sent_to_ash, "<the-user-id>"); + EXPECT_THAT( + GetKeys(extensions_sent_to_ash), + ::testing::UnorderedElementsAre("ash-extension", "shared-extension")); + + auto [user_id_sent_to_lacros, extensions_sent_to_lacros] = + lacros_loader.Take(); + EXPECT_EQ(user_id_sent_to_lacros, "<the-user-id>"); + EXPECT_THAT( + GetKeys(extensions_sent_to_lacros), + ::testing::UnorderedElementsAre("lacros-extension", "shared-extension")); +} + } // namespace chromeos
diff --git a/chrome/browser/ash/policy/core/device_local_account_policy_broker.cc b/chrome/browser/ash/policy/core/device_local_account_policy_broker.cc index 86d09ec..038d6de7 100644 --- a/chrome/browser/ash/policy/core/device_local_account_policy_broker.cc +++ b/chrome/browser/ash/policy/core/device_local_account_policy_broker.cc
@@ -86,9 +86,17 @@ return client; } -base::Value::Dict GetPrefsFromPolicy(const policy::PolicyMap& policy_map) { +base::Value::Dict GetAshPrefsFromPolicy(const policy::PolicyMap& policy_map) { extensions::ExtensionInstallForceListPolicyHandler policy_handler; - return policy_handler.GetPolicyDict(policy_map); + return policy_handler.GetAshPolicyDict(policy_map) + .value_or(base::Value::Dict()); +} + +base::Value::Dict GetLacrosPrefsFromPolicy( + const policy::PolicyMap& policy_map) { + extensions::ExtensionInstallForceListPolicyHandler policy_handler; + return policy_handler.GetLacrosPolicyDict(policy_map) + .value_or(base::Value::Dict()); } void SendExtensionsToAsh( @@ -266,11 +274,13 @@ void DeviceLocalAccountPolicyBroker::UpdateExtensionListFromStore() { external_cache_->UpdateExtensionsList( - GetPrefsFromPolicy(store_->policy_map())); + /*ash_extensions=*/GetAshPrefsFromPolicy(store_->policy_map()), + /*lacros_extensions=*/GetLacrosPrefsFromPolicy(store_->policy_map())); } -base::Value::Dict DeviceLocalAccountPolicyBroker::GetCachedExtensions() const { - return external_cache_->GetCachedExtensions(); +base::Value::Dict +DeviceLocalAccountPolicyBroker::GetCachedExtensionsForTesting() const { + return external_cache_->GetCachedExtensionsForTesting(); // IN-TEST } } // namespace policy
diff --git a/chrome/browser/ash/policy/core/device_local_account_policy_broker.h b/chrome/browser/ash/policy/core/device_local_account_policy_broker.h index b0336bb..a252041 100644 --- a/chrome/browser/ash/policy/core/device_local_account_policy_broker.h +++ b/chrome/browser/ash/policy/core/device_local_account_policy_broker.h
@@ -128,7 +128,9 @@ // Return whether the cache is currently running. bool IsCacheRunning() const; - base::Value::Dict GetCachedExtensions() const; + // Returns all cached extensions, both the ones meant for Ash and the ones + // meant for Lacros. + base::Value::Dict GetCachedExtensionsForTesting() const; private: void CreateComponentCloudPolicyService(CloudPolicyClient* client);
diff --git a/chrome/browser/ash/policy/core/device_local_account_policy_service_unittest.cc b/chrome/browser/ash/policy/core/device_local_account_policy_service_unittest.cc index 3e79bf1..64d515a9 100644 --- a/chrome/browser/ash/policy/core/device_local_account_policy_service_unittest.cc +++ b/chrome/browser/ash/policy/core/device_local_account_policy_service_unittest.cc
@@ -729,7 +729,7 @@ loop.Run(); base::Value::Dict extension_dict = - broker->GetCachedExtensions().FindDict(kExtensionID)->Clone(); + broker->GetCachedExtensionsForTesting().FindDict(kExtensionID)->Clone(); EXPECT_EQ(*extension_dict.FindString( extensions::ExternalProviderImpl::kExternalCrx), full_crx_path.value());
diff --git a/chrome/browser/ash/policy/status_collector/child_status_collector.cc b/chrome/browser/ash/policy/status_collector/child_status_collector.cc index 0b868c3..89e5316 100644 --- a/chrome/browser/ash/policy/status_collector/child_status_collector.cc +++ b/chrome/browser/ash/policy/status_collector/child_status_collector.cc
@@ -32,7 +32,6 @@ #include "base/task/thread_pool.h" #include "base/values.h" #include "chrome/browser/ash/policy/status_collector/child_activity_storage.h" -#include "chrome/browser/ash/policy/status_collector/interval_map.h" #include "chrome/browser/ash/policy/status_collector/status_collector_state.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/profiles/profile.h"
diff --git a/chrome/browser/ash/policy/status_collector/device_status_collector.cc b/chrome/browser/ash/policy/status_collector/device_status_collector.cc index 17631a84..b0558a66 100644 --- a/chrome/browser/ash/policy/status_collector/device_status_collector.cc +++ b/chrome/browser/ash/policy/status_collector/device_status_collector.cc
@@ -58,7 +58,6 @@ #include "chrome/browser/ash/policy/core/device_local_account.h" #include "chrome/browser/ash/policy/core/reporting_user_tracker.h" #include "chrome/browser/ash/policy/status_collector/enterprise_activity_storage.h" -#include "chrome/browser/ash/policy/status_collector/interval_map.h" #include "chrome/browser/ash/policy/status_collector/status_collector_state.h" #include "chrome/browser/ash/policy/status_collector/tpm_status_combiner.h" #include "chrome/browser/ash/profiles/profile_helper.h"
diff --git a/chrome/browser/ash/policy/status_collector/enterprise_activity_storage.h b/chrome/browser/ash/policy/status_collector/enterprise_activity_storage.h index 1656a6f4..a1f792e7 100644 --- a/chrome/browser/ash/policy/status_collector/enterprise_activity_storage.h +++ b/chrome/browser/ash/policy/status_collector/enterprise_activity_storage.h
@@ -9,7 +9,6 @@ #include <vector> #include "chrome/browser/ash/policy/status_collector/activity_storage.h" -#include "chrome/browser/ash/policy/status_collector/interval_map.h" class PrefService;
diff --git a/chrome/browser/ash/policy/status_collector/interval_map.h b/chrome/browser/ash/policy/status_collector/interval_map.h deleted file mode 100644 index 060bf62..0000000 --- a/chrome/browser/ash/policy/status_collector/interval_map.h +++ /dev/null
@@ -1,298 +0,0 @@ -// Copyright 2015 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_ASH_POLICY_STATUS_COLLECTOR_INTERVAL_MAP_H_ -#define CHROME_BROWSER_ASH_POLICY_STATUS_COLLECTOR_INTERVAL_MAP_H_ - -#include <algorithm> -#include <functional> -#include <limits> -#include <map> -#include <type_traits> -#include <utility> - -#include "base/check.h" -#include "base/memory/raw_ptr.h" - -namespace policy { - -// An IntervalMap<KeyType, ValueType> maps every value of KeyType to -// a ValueType, and incrementing, decrementing and setting ranges of values -// has been optimized. The default state is to map all values in -// KeyType to ValueType(). (Which is usually zero.) -// -// Set/Increment operations should generally take -// O(log(N)) + O(M) time where N is the number of intervals in the map and -// M is the number of modified intervals. -// -// Internally, IntervalMap<> uses an std::map, where the beginning of each -// interval is stored along with the value for that interval. Adjacent intervals -// which have the same value are automatically merged. For instance, if you did: -// -// IntervalMap<int, int> tmp; -// tmp.IncrementInterval(2, 5, 2); -// tmp.IncrementInterval(4, 6, 1); -// -// Then: -// tmp[0] = 0 -// tmp[1] = 0 -// tmp[2] = 2 -// tmp[3] = 2 -// tmp[4] = 3 -// tmp[5] = 1 -// tmp[6] = 0 -// -// If you iterate over tmp, you get the following intervals: -// -maxint .. 2 => 0 -// 2 .. 4 => 2 -// 4 .. 5 => 3 -// 5 .. 6 => 1 -// 6 .. maxint => 0 -// -// Internally, this would be stored in a map as: -// -maxint:0, 2:2, 4:3, 5:1, 6:0 -// -// TODO(hubbe): Consider consolidating with media::Ranges. - -// Simple interval class. -// Interval ends are always non-inclusive. -// Please note that end <= begin is a valid (but empty) interval. -template <typename T> -struct Interval { - public: - Interval(const T& begin, const T& end) : begin(begin), end(end) { - static_assert(std::is_integral<T>::value, "Integral types only."); - } - - // May return empty intervals (begin >= end). - Interval Intersect(const Interval& other) const { - return Interval(std::max(begin, other.begin), std::min(end, other.end)); - } - - bool Empty() const { return begin >= end; } - - T begin; - T end; -}; - -// The IntervalMapConstIterator points to an interval in an -// IntervalMap where all values are the same. Calling ++/-- -// goes to the next/previous interval, which is guaranteed to -// have values different from the current interval. -template <typename KeyType, - typename ValueType, - class Compare = std::less<KeyType>, - class NumericLimits = std::numeric_limits<KeyType>> -class IntervalMapConstIterator { - public: - typedef std::map<KeyType, ValueType, Compare> MapType; - IntervalMapConstIterator() { - static_assert(std::is_integral<KeyType>::value, "Integral types only."); - } - IntervalMapConstIterator(const MapType* map, - typename MapType::const_iterator iter) - : map_(map), iter_(iter) { - static_assert(std::is_integral<KeyType>::value, "Integral types only."); - } - - bool operator==(const IntervalMapConstIterator& other) const { - return iter_ == other.iter_; - } - - bool operator!=(const IntervalMapConstIterator& other) const { - return iter_ != other.iter_; - } - - // Returns the beginning of the current interval. - KeyType interval_begin() const { - DCHECK(iter_ != map_->end()); - return iter_->first; - } - - // Returns the end of the current interval, non-inclusive. - KeyType interval_end() const { - DCHECK(iter_ != map_->end()); - typename MapType::const_iterator next = iter_; - ++next; - if (next == map_->end()) { - return NumericLimits::max(); - } else { - return next->first; - } - } - - // Returns the current interval. - Interval<KeyType> interval() const { - return Interval<KeyType>(interval_begin(), interval_end()); - } - - // Returns the value associated with the current interval. - ValueType value() const { - DCHECK(iter_ != map_->end()); - return iter_->second; - } - - // Needed to make the following construct work: - // for (const auto& interval_value_pair : interval_map) - std::pair<Interval<KeyType>, ValueType> operator*() const { - return std::make_pair(interval(), value()); - } - - // Go to the next interval. - // The beginning of the next interval always matches the end of the current - // interval. (But should always have a different value.) - // Not allowed if we're already at map_->end(). - void operator++() { - DCHECK(iter_ != map_->end()); - ++iter_; - } - - // Go to the previous interval. - // The end of the previous interval always matches the beginning of the - // current interval. (But should always have a different value.) - // Not allowed if we're already at map_->begin(). - void operator--() { - DCHECK(iter_ != map_->begin()); - --iter_; - } - - private: - raw_ptr<const MapType> map_; - - // Pointer to the entry in the IntervalMap that specifies the - // beginning of the current interval. - typename MapType::const_iterator iter_; -}; - -template <typename KeyType, - typename ValueType, - class Compare = std::less<KeyType>, - class NumericLimits = std::numeric_limits<KeyType>> -class IntervalMap { - public: - typedef std::map<KeyType, ValueType, Compare> MapType; - typedef IntervalMapConstIterator<KeyType, ValueType, Compare, NumericLimits> - const_iterator; - IntervalMap() { - static_assert(std::is_integral<KeyType>::value, "Integral types only."); - // Adding an explicit entry for the default interval is not strictly needed, - // but simplifies the code a lot. - map_[NumericLimits::min()] = ValueType(); - } - - // Returns the value at a particular point. - // Defaults to ValueType(). - ValueType operator[](const KeyType& k) const { - typename MapType::const_iterator i = map_.upper_bound(k); - DCHECK(i != map_.begin()); - --i; - return i->second; - } - - // Increase [from..to) by |how_much|. - void IncrementInterval(KeyType from, KeyType to, ValueType how_much) { - if (to <= from || how_much == 0) - return; - typename MapType::iterator a = MakeEntry(from); - typename MapType::iterator b = MakeEntry(to); - for (typename MapType::iterator i = a; i != b; ++i) { - i->second += how_much; - } - RemoveDuplicates(a); - // b may be invalid - RemoveDuplicates(map_.lower_bound(to)); - } - - // Set [from..to) to |how_much|. - void SetInterval(KeyType from, KeyType to, ValueType how_much) { - if (to <= from) - return; - typename MapType::iterator a = MakeEntry(from); - typename MapType::iterator b = MakeEntry(to); - a->second = how_much; - while (true) { - typename MapType::iterator c = a; - ++c; - if (c == b) { - break; - } else { - map_.erase(c); - } - } - RemoveDuplicates(a); - // b may be invalid - RemoveDuplicates(map_.lower_bound(to)); - } - - // Returns an iterator to the first interval. - // Note, there is always at least one interval. - const_iterator begin() const { return const_iterator(&map(), map_.begin()); } - - // Returns an end marker iterator. - const_iterator end() const { return const_iterator(&map(), map_.end()); } - - // Returns an iterator to the interval containing |k|. - // Always returns a valid iterator. - const_iterator find(KeyType k) const { - typename MapType::const_iterator iter = map_.upper_bound(k); - DCHECK(iter != map_.begin()); - --iter; - return const_iterator(&map(), iter); - } - - bool empty() const { return map().size() == 1; } - void clear() { - map_.clear(); - map_[NumericLimits::min()] = ValueType(); - } - - private: - const MapType& map() const { return map_; } - - // Make an entry in map_ with the key |k| and return it's iterator. - // If such an entry already exists, just re-use it. - // If a new entry is created, it's value will be set to the same - // as the preceding entry, or ValueType() if no preceding entry exists. - // After calling this function, we'll need to call RemoveDuplicates() - // to clean up any duplicates that we made. - typename MapType::iterator MakeEntry(KeyType k) { - auto insert_result = map_.emplace(k, ValueType()); - if (insert_result.second) { - if (insert_result.first != map_.begin()) { - typename MapType::iterator i = insert_result.first; - --i; - insert_result.first->second = i->second; - } - } - return insert_result.first; - } - - // Remove duplicates before and after |i|. - void RemoveDuplicates(typename MapType::iterator i) { - if (i == map_.end()) - return; - - typename MapType::iterator first = i; - typename MapType::iterator second = i; - if (i != map_.begin()) { - --first; - if (first->second == second->second) { - map_.erase(second); - second = first; - } else { - first = second; - } - } - ++second; - if (second != map_.end() && first->second == second->second) { - map_.erase(second); - } - } - - MapType map_; -}; - -} // namespace policy - -#endif // CHROME_BROWSER_ASH_POLICY_STATUS_COLLECTOR_INTERVAL_MAP_H_
diff --git a/chrome/browser/ash/policy/status_collector/interval_map_unittest.cc b/chrome/browser/ash/policy/status_collector/interval_map_unittest.cc deleted file mode 100644 index 7f7a7a47..0000000 --- a/chrome/browser/ash/policy/status_collector/interval_map_unittest.cc +++ /dev/null
@@ -1,275 +0,0 @@ -// Copyright 2015 The Chromium Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include <stdint.h> - -#include <string> -#include <vector> - -#include "base/logging.h" -#include "base/rand_util.h" -#include "base/strings/stringprintf.h" -#include "chrome/browser/ash/policy/status_collector/interval_map.h" -#include "testing/gtest/include/gtest/gtest.h" - -namespace policy { -namespace { - -// Our tests only modify the interval map entries in [0..kTestSize). -// We need this to be big enough to hit tricky corner cases, but small -// enough that we get lots of entry duplication to clean up. -// Also, SimpleIntervalMap uses a vector of size kTestSize to emulate -// a intervalmap, so making this too big will the test down a lot. -const int kTestSize = 16; - -class SimpleIntervalMap { - public: - SimpleIntervalMap() : data_(kTestSize) {} - - void IncrementInterval(int32_t from, int32_t to, int32_t how_much) { - for (int32_t i = from; i < to; i++) { - data_[i] += how_much; - } - } - - void SetInterval(int32_t from, int32_t to, int32_t how_much) { - for (int32_t i = from; i < to; i++) { - data_[i] = how_much; - } - } - - int32_t operator[](int32_t index) const { return data_[index]; } - - private: - std::vector<int32_t> data_; -}; - -class IntervalMapTest : public testing::Test { - public: - IntervalMapTest() = default; - void IncrementInterval(int32_t from, int32_t to, int32_t how_much) { - truth_.IncrementInterval(from, to, how_much); - testee_.IncrementInterval(from, to, how_much); - std::string message = - base::StringPrintf("After [%d - %d) += %d", from, to, how_much); - Compare(message); - } - - void SetInterval(int32_t from, int32_t to, int32_t how_much) { - truth_.SetInterval(from, to, how_much); - testee_.SetInterval(from, to, how_much); - std::string message = - base::StringPrintf("After [%d - %d) += %d", from, to, how_much); - Compare(message); - } - - // Will exercise operator[] and IntervalMap::const_iterator. - void Compare(const std::string& message) { - bool had_fail = HasFailure(); - for (int i = 0; i < kTestSize; i++) { - EXPECT_EQ(truth_[i], testee_[i]) << " i = " << i << " " << message; - } - EXPECT_EQ(testee_[-1], 0) << message; - EXPECT_EQ(testee_[kTestSize], 0) << message; - int32_t prev_ = 0; - int32_t end_of_last_interval = 0; - for (const auto r : testee_) { - EXPECT_LT(r.first.begin, r.first.end); - if (r.first.begin == std::numeric_limits<int32_t>::min()) { - EXPECT_EQ(0, r.second); - } else { - EXPECT_EQ(end_of_last_interval, r.first.begin); - EXPECT_GE(r.first.begin, 0) << message; - EXPECT_LE(r.first.begin, kTestSize) << message; - EXPECT_NE(r.second, prev_) << message; - } - end_of_last_interval = r.first.end; - prev_ = r.second; - } - EXPECT_EQ(prev_, 0) << message; - - if (HasFailure() && !had_fail) { - for (int i = 0; i < kTestSize; i++) { - LOG(ERROR) << i << ": Truth =" << truth_[i] - << " Testee = " << testee_[i]; - } - for (const auto r : testee_) { - LOG(ERROR) << "Interval: " << r.first.begin << " - " << r.first.end - << " = " << r.second; - } - } - } - - void Clear() { - for (int j = 0; j < kTestSize; j++) { - IncrementInterval(j, j + 1, -truth_[j]); - } - } - - protected: - SimpleIntervalMap truth_; - IntervalMap<int32_t, int32_t> testee_; -}; - -} // namespace - -TEST_F(IntervalMapTest, SimpleTest) { - IncrementInterval(3, 7, 4); - EXPECT_EQ(0, testee_[0]); - EXPECT_EQ(0, testee_[2]); - EXPECT_EQ(4, testee_[3]); - EXPECT_EQ(4, testee_[5]); - EXPECT_EQ(4, testee_[6]); - EXPECT_EQ(0, testee_[7]); - IncrementInterval(3, 7, -4); - EXPECT_TRUE(testee_.empty()); -} - -TEST_F(IntervalMapTest, SimpleIncrementTest) { - IncrementInterval(3, 7, 1); - IncrementInterval(6, 10, 2); - EXPECT_EQ(0, testee_[2]); - EXPECT_EQ(1, testee_[3]); - EXPECT_EQ(1, testee_[5]); - EXPECT_EQ(3, testee_[6]); - EXPECT_EQ(2, testee_[7]); - EXPECT_EQ(2, testee_[9]); - EXPECT_EQ(0, testee_[10]); - SetInterval(3, 12, 0); - EXPECT_TRUE(testee_.empty()); -} - -TEST_F(IntervalMapTest, IncrementJoinIntervalsTest) { - IncrementInterval(3, 5, 1); - IncrementInterval(7, 8, 1); - IncrementInterval(9, 11, 1); - IncrementInterval(5, 7, 1); - IncrementInterval(8, 9, 1); - auto i = testee_.find(5); - EXPECT_EQ(3, i.interval_begin()); - EXPECT_EQ(11, i.interval_end()); - EXPECT_EQ(1, i.value()); -} - -TEST_F(IntervalMapTest, SetJoinIntervalsTest) { - SetInterval(3, 5, 1); - SetInterval(7, 8, 1); - SetInterval(9, 11, 1); - SetInterval(5, 9, 1); // overwrites one interval - auto i = testee_.find(5); - EXPECT_EQ(3, i.interval_begin()); - EXPECT_EQ(11, i.interval_end()); - EXPECT_EQ(1, i.value()); -} - -TEST_F(IntervalMapTest, FindTest) { - IncrementInterval(5, 6, 1); - IncrementInterval(1, 10, 2); - int32_t min_value = std::numeric_limits<int32_t>::min(); - int32_t max_value = std::numeric_limits<int32_t>::max(); - auto i = testee_.find(0); - EXPECT_EQ(min_value, i.interval_begin()); - EXPECT_EQ(1, i.interval_end()); - EXPECT_EQ(0, i.value()); - i = testee_.find(4); - EXPECT_EQ(1, i.interval_begin()); - EXPECT_EQ(5, i.interval_end()); - EXPECT_EQ(2, i.value()); - i = testee_.find(5); - EXPECT_EQ(5, i.interval_begin()); - EXPECT_EQ(6, i.interval_end()); - EXPECT_EQ(3, i.value()); - i = testee_.find(6); - EXPECT_EQ(6, i.interval_begin()); - EXPECT_EQ(10, i.interval_end()); - EXPECT_EQ(2, i.value()); - i = testee_.find(9); - EXPECT_EQ(6, i.interval_begin()); - EXPECT_EQ(10, i.interval_end()); - EXPECT_EQ(2, i.value()); - i = testee_.find(10); - EXPECT_EQ(10, i.interval_begin()); - EXPECT_EQ(max_value, i.interval_end()); - EXPECT_EQ(0, i.value()); -} - -TEST_F(IntervalMapTest, MinMaxInt) { - int32_t min_value = std::numeric_limits<int32_t>::min(); - int32_t max_value = std::numeric_limits<int32_t>::max(); - - // Change a single value at minint - testee_.IncrementInterval(min_value, min_value + 1, 7); - EXPECT_EQ(7, testee_[min_value]); - EXPECT_EQ(0, testee_[min_value + 1]); - auto i = testee_.find(0); - EXPECT_EQ(min_value + 1, i.interval_begin()); - EXPECT_EQ(max_value, i.interval_end()); - EXPECT_EQ(0, i.value()); - --i; - EXPECT_TRUE(i == testee_.find(min_value)); - EXPECT_EQ(min_value, i.interval_begin()); - EXPECT_EQ(min_value + 1, i.interval_end()); - EXPECT_EQ(7, i.value()); - testee_.clear(); - - // Change a single value at maxint - // Note that we don't actually have a way to represent a range - // that includes maxint as the end of the interval is non-inclusive. - testee_.IncrementInterval(max_value - 1, max_value, 7); - EXPECT_EQ(7, testee_[max_value - 1]); - EXPECT_EQ(0, testee_[max_value - 2]); - i = testee_.find(0); - EXPECT_EQ(min_value, i.interval_begin()); - EXPECT_EQ(max_value - 1, i.interval_end()); - EXPECT_EQ(0, i.value()); - ++i; - EXPECT_TRUE(i == testee_.find(max_value - 1)); - EXPECT_EQ(max_value - 1, i.interval_begin()); - EXPECT_EQ(max_value, i.interval_end()); - EXPECT_EQ(7, i.value()); - - testee_.clear(); - - // Change entire range (almost) - testee_.IncrementInterval(min_value, max_value, 17); - EXPECT_EQ(17, testee_[min_value]); - EXPECT_EQ(17, testee_[0]); - EXPECT_EQ(17, testee_[max_value - 1]); - i = testee_.find(0); - EXPECT_EQ(min_value, i.interval_begin()); - EXPECT_EQ(max_value, i.interval_end()); - EXPECT_EQ(17, i.value()); - EXPECT_TRUE(i == testee_.find(max_value - 1)); - EXPECT_TRUE(i == testee_.find(min_value)); -} - -TEST_F(IntervalMapTest, RandomIncrementTest) { - for (int j = 0; j < 200; j++) { - Clear(); - for (int i = 0; i < 200; i++) { - int32_t begin = base::RandInt(0, kTestSize - 1 - 1); - int32_t end = begin + 1 + base::RandInt(0, kTestSize - begin - 1 - 1); - IncrementInterval(begin, end, base::RandInt(0, 1) ? 1 : -1); - if (HasFailure()) { - return; - } - } - } -} - -TEST_F(IntervalMapTest, RandomSetTest) { - for (int j = 0; j < 200; j++) { - Clear(); - for (int i = 0; i < 200; i++) { - int32_t begin = base::RandInt(0, kTestSize - 1 - 1); - int32_t end = begin + 1 + base::RandInt(0, kTestSize - begin - 1 - 1); - SetInterval(begin, end, base::RandInt(0, 3)); - if (HasFailure()) { - return; - } - } - } -} - -} // namespace policy
diff --git a/chrome/browser/chrome_browser_main_linux.cc b/chrome/browser/chrome_browser_main_linux.cc index 45f29bc..a05cbe58 100644 --- a/chrome/browser/chrome_browser_main_linux.cc +++ b/chrome/browser/chrome_browser_main_linux.cc
@@ -19,6 +19,7 @@ #include "chrome/browser/browser_process.h" #include "chrome/common/chrome_features.h" #include "chrome/grit/branded_strings.h" +#include "components/password_manager/core/browser/password_manager_switches.h" #include "content/public/browser/browser_thread.h" #include "device/bluetooth/dbus/bluez_dbus_manager.h" #include "device/bluetooth/dbus/bluez_dbus_thread_manager.h" @@ -82,13 +83,14 @@ std::unique_ptr<os_crypt::Config> config = std::make_unique<os_crypt::Config>(); // Forward to os_crypt the flag to use a specific password store. - config->store = command_line->GetSwitchValueASCII(switches::kPasswordStore); + config->store = + command_line->GetSwitchValueASCII(password_manager::kPasswordStore); // Forward the product name config->product_name = l10n_util::GetStringUTF8(IDS_PRODUCT_NAME); // OSCrypt can be disabled in a special settings file. config->should_use_preference = base::CommandLine::ForCurrentProcess()->HasSwitch( - switches::kEnableEncryptionSelection); + password_manager::kEnableEncryptionSelection); chrome::GetDefaultUserDataDirectory(&config->user_data_path); OSCrypt::SetConfig(std::move(config)); #endif // !BUILDFLAG(IS_CHROMEOS)
diff --git a/chrome/browser/extensions/policy_handlers.cc b/chrome/browser/extensions/policy_handlers.cc index f055ae3..9b576a2 100644 --- a/chrome/browser/extensions/policy_handlers.cc +++ b/chrome/browser/extensions/policy_handlers.cc
@@ -7,6 +7,7 @@ #include <stddef.h> #include <memory> +#include <optional> #include <string> #include <unordered_set> #include <utility> @@ -134,18 +135,17 @@ void ExtensionInstallForceListPolicyHandler::ApplyPolicySettings( const policy::PolicyMap& policies, PrefValueMap* prefs) { - const base::Value* value = nullptr; - base::Value::Dict dict; - if (CheckAndGetValue(policies, nullptr, &value) && value && - ParseList(value, &dict, nullptr)) { #if BUILDFLAG(IS_CHROMEOS_ASH) - if (crosapi::browser_util::IsLacrosEnabled()) { - FilterOutExtensionsMeantToRunInLacros(dict); - } -#endif // BUILDFLAG(IS_CHROMEOS_ASH) + auto dict = GetAshPolicyDict(policies); +#elif BUILDFLAG(IS_CHROMEOS_LACROS) + auto dict = GetLacrosPolicyDict(policies); +#else + auto dict = GetPolicyDict(policies); +#endif + if (dict.has_value()) { prefs->SetValue(pref_names::kInstallForceList, - base::Value(std::move(dict))); + base::Value(std::move(dict).value())); } } @@ -217,18 +217,39 @@ return true; } -base::Value::Dict ExtensionInstallForceListPolicyHandler::GetPolicyDict( +#if BUILDFLAG(IS_CHROMEOS_ASH) +std::optional<base::Value::Dict> +ExtensionInstallForceListPolicyHandler::GetAshPolicyDict( const policy::PolicyMap& policies) { - if (CheckPolicySettings(policies, nullptr)) { - PrefValueMap pref_value_map; - ApplyPolicySettings(policies, &pref_value_map); - const base::Value* value; - if (pref_value_map.GetValue(pref_names::kInstallForceList, &value) && - value->is_dict()) { - return value->GetDict().Clone(); - } + std::optional<base::Value::Dict> dict = GetPolicyDict(policies); + if (dict.has_value() && crosapi::browser_util::IsLacrosEnabled()) { + FilterOutExtensionsMeantToRunInLacros(dict.value()); } - return base::Value::Dict(); + return dict; +} +#endif // BUILDFLAG(IS_CHROMEOS) + +#if BUILDFLAG(IS_CHROMEOS) +std::optional<base::Value::Dict> +ExtensionInstallForceListPolicyHandler::GetLacrosPolicyDict( + const policy::PolicyMap& policies) { + // TODO(b/335121961): Currently always returns all extensions on Lacros, + // even the ones that run in Ash. This is consistent with the pre-existing + // behavior but it should be investigated if this is the correct behavior. + return GetPolicyDict(policies); +} +#endif // BUILDFLAG(IS_CHROMEOS) + +std::optional<base::Value::Dict> +ExtensionInstallForceListPolicyHandler::GetPolicyDict( + const policy::PolicyMap& policies) { + const base::Value* value = nullptr; + base::Value::Dict dict; + if (CheckAndGetValue(policies, nullptr, &value) && value && + ParseList(value, &dict, nullptr)) { + return dict; + } + return std::nullopt; } // ExtensionInstallBlockListPolicyHandler implementation ----------------------
diff --git a/chrome/browser/extensions/policy_handlers.h b/chrome/browser/extensions/policy_handlers.h index a5c6f0d..178da6a 100644 --- a/chrome/browser/extensions/policy_handlers.h +++ b/chrome/browser/extensions/policy_handlers.h
@@ -5,7 +5,11 @@ #ifndef CHROME_BROWSER_EXTENSIONS_POLICY_HANDLERS_H_ #define CHROME_BROWSER_EXTENSIONS_POLICY_HANDLERS_H_ +#include <optional> + #include "base/values.h" +#include "build/build_config.h" +#include "build/chromeos_buildflags.h" #include "components/policy/core/browser/configuration_policy_handler.h" namespace policy { @@ -44,6 +48,12 @@ }; // Class for parsing the list of extensions to force install. +// +// On ChromeOS the policy values will be filtered before updating the prefs, +// such that the prefs on Ash only contain the extensions that must be force +// installed on Ash. +// Similarly the prefs on Lacros will only contain the extensions that must +// be force installed on Lacros. class ExtensionInstallForceListPolicyHandler : public policy::TypeCheckingPolicyHandler { public: @@ -60,9 +70,32 @@ void ApplyPolicySettings(const policy::PolicyMap& policies, PrefValueMap* prefs) override; - // Convenience method to directly get a base::Value::Dict with the policy - // values. - base::Value::Dict GetPolicyDict(const policy::PolicyMap& policy_map); +#if BUILDFLAG(IS_CHROMEOS_ASH) + // Returns a `base::Value::Dict` with the extensions that must be force + // installed in Ash. If Lacros is disabled this is the full extensions list, + // and if Lacros is enabled this only contains the extensions that must run on + // the Ash side. + // + // Returns nullopt if the policy is unset. + std::optional<base::Value::Dict> GetAshPolicyDict( + const policy::PolicyMap& policy_map); +#endif // BUILDFLAG(IS_CHROMEOS_ASH) + +#if BUILDFLAG(IS_CHROMEOS) + // Returns a `base::Value::Dict` with the extensions that must be force + // installed in Lacros. + // + // Returns nullopt if the policy is unset. + std::optional<base::Value::Dict> GetLacrosPolicyDict( + const policy::PolicyMap& policy_map); +#endif // BUILDFLAG(IS_CHROMEOS) + + // Returns a `base::Value::Dict` with the extensions that must be force + // installed. + // + // Returns nullopt if the policy is unset. + std::optional<base::Value::Dict> GetPolicyDict( + const policy::PolicyMap& policy_map); private: // Parses the data in |policy_value| and writes them to |extension_dict|.
diff --git a/chrome/browser/extensions/policy_handlers_unittest.cc b/chrome/browser/extensions/policy_handlers_unittest.cc index 4cc1134..9a020916 100644 --- a/chrome/browser/extensions/policy_handlers_unittest.cc +++ b/chrome/browser/extensions/policy_handlers_unittest.cc
@@ -324,7 +324,7 @@ handler.ApplyPolicySettings(policy_map, &prefs); EXPECT_FALSE(prefs.GetValue(pref_names::kInstallForceList, &value)); EXPECT_FALSE(value); - EXPECT_EQ(base::Value::Dict(), handler.GetPolicyDict(policy_map)); + EXPECT_EQ(std::nullopt, handler.GetPolicyDict(policy_map)); // Set the policy to an empty value. This shouldn't affect the pref. policy_map.Set(policy::key::kExtensionInstallForcelist, @@ -332,7 +332,7 @@ policy::POLICY_SOURCE_CLOUD, base::Value(policy.Clone()), nullptr); handler.ApplyPolicySettings(policy_map, &prefs); - EXPECT_TRUE(prefs.GetValue(pref_names::kInstallForceList, &value)); + ASSERT_TRUE(prefs.GetValue(pref_names::kInstallForceList, &value)); EXPECT_EQ(expected, *value); EXPECT_EQ(expected, handler.GetPolicyDict(policy_map)); @@ -346,7 +346,7 @@ policy::POLICY_SOURCE_CLOUD, base::Value(policy.Clone()), nullptr); handler.ApplyPolicySettings(policy_map, &prefs); - EXPECT_TRUE(prefs.GetValue(pref_names::kInstallForceList, &value)); + ASSERT_TRUE(prefs.GetValue(pref_names::kInstallForceList, &value)); EXPECT_EQ(expected, *value); EXPECT_EQ(expected, handler.GetPolicyDict(policy_map));
diff --git a/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/FeedReliabilityLoggerTest.java b/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/FeedReliabilityLoggerTest.java index af13f32..a4668fc 100644 --- a/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/FeedReliabilityLoggerTest.java +++ b/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/FeedReliabilityLoggerTest.java
@@ -154,6 +154,14 @@ } @Test + public void testOnBindStream_supervisedUserFeed() { + when(mLaunchLogger.isLaunchInProgress()).thenReturn(true); + mFeedReliabilityLogger.onBindStream(StreamType.SUPERVISED_USER_FEED, 0); + verify(mLaunchLogger).logFeedReloading(anyLong()); + verify(mUserInteractionLogger).onStreamOpened(eq(StreamType.SUPERVISED_USER_FEED)); + } + + @Test public void testOnUnbindStream() { when(mLaunchLogger.isLaunchInProgress()).thenReturn(true); mFeedReliabilityLogger.onUnbindStream(ClosedReason.LEAVE_FEED);
diff --git a/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/FeedStream.java b/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/FeedStream.java index 372d9c7..4bb81dad9 100644 --- a/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/FeedStream.java +++ b/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/FeedStream.java
@@ -1215,6 +1215,8 @@ return StreamType.WEB_FEED; case StreamKind.SINGLE_WEB_FEED: return StreamType.SINGLE_WEB_FEED; + case StreamKind.SUPERVISED_USER: + return StreamType.SUPERVISED_USER_FEED; default: return StreamType.UNSPECIFIED; }
diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json index a8ad99d..8ae70f9 100644 --- a/chrome/browser/flag-metadata.json +++ b/chrome/browser/flag-metadata.json
@@ -5335,7 +5335,7 @@ }, { "name": "language-packs-in-settings", - "owners": ["mlcui@chromium.org", "claudiomagni@chromium.org", "cros-borders-eng@google.com"], + "owners": ["mlcui@google.com", "claudiomagni@chromium.org", "cros-borders-eng@google.com"], "expiry_milestone": 126 }, {
diff --git a/chrome/browser/ip_protection/ip_protection_config_provider.cc b/chrome/browser/ip_protection/ip_protection_config_provider.cc index af8035e..671bcda 100644 --- a/chrome/browser/ip_protection/ip_protection_config_provider.cc +++ b/chrome/browser/ip_protection/ip_protection_config_provider.cc
@@ -372,6 +372,7 @@ : quiche::ProxyLayer::kProxyB; bsa_->GetTokens( access_token_info.token, batch_size, quiche_proxy_layer, + quiche::BlindSignAuthServiceType::kChromeIpBlinding, [weak_ptr = weak_ptr_factory_.GetWeakPtr(), bsa_get_tokens_start_time, callback = std::move(callback)]( absl::StatusOr<absl::Span<quiche::BlindSignToken>> tokens) mutable {
diff --git a/chrome/browser/ip_protection/ip_protection_config_provider_unittest.cc b/chrome/browser/ip_protection/ip_protection_config_provider_unittest.cc index 3c4fb91..51f79d7 100644 --- a/chrome/browser/ip_protection/ip_protection_config_provider_unittest.cc +++ b/chrome/browser/ip_protection/ip_protection_config_provider_unittest.cc
@@ -73,6 +73,7 @@ void GetTokens(std::optional<std::string> oauth_token, int num_tokens, quiche::ProxyLayer proxy_layer, + quiche::BlindSignAuthServiceType /*service_type*/, quiche::SignedTokenCallback callback) override { get_tokens_called_ = true; oauth_token_ = oauth_token ? *oauth_token : "";
diff --git a/chrome/browser/predictors/lcp_critical_path_predictor/lcp_critical_path_predictor_util.cc b/chrome/browser/predictors/lcp_critical_path_predictor/lcp_critical_path_predictor_util.cc index 5eddd8c..68d4c7b5 100644 --- a/chrome/browser/predictors/lcp_critical_path_predictor/lcp_critical_path_predictor_util.cc +++ b/chrome/browser/predictors/lcp_critical_path_predictor/lcp_critical_path_predictor_util.cc
@@ -123,11 +123,11 @@ // LcppFrequencyStatDataUpdater updater = // LcppFrequencyStatDataUpdater::FromLcppStringFrequencyStatData( // sliding_window_size, max_histogram_buckets, -// *data.mutable_lcpp_stat()->mutable_lcp_script_url_stat()); +// *stat.mutable_lcp_script_url_stat()); // // Update. // updater.Update(url); // // Extract. -// *data.mutable_lcpp_stat()->mutable_lcp_script_url_stat() = +// *stat.mutable_lcp_script_url_stat() = // updater.ToLcppStringFrequencyStatData(); // ``` // @@ -364,7 +364,7 @@ bool RecordLcpElementLocatorHistogram(const LoadingPredictorConfig& config, const std::string& lcp_element_locator, - LcppData& data) { + LcppStat& stat) { if (lcp_element_locator.size() > ResourcePrefetchPredictorTables::kMaxStringLength || lcp_element_locator.empty()) { @@ -372,25 +372,23 @@ } std::unique_ptr<LcppFrequencyStatDataUpdater> updater = LcppFrequencyStatDataUpdater::FromLcpElementLocatorStat( - config, data.mutable_lcpp_stat()->lcp_element_locator_stat()); + config, stat.lcp_element_locator_stat()); CHECK(updater); updater->Update(lcp_element_locator); - *data.mutable_lcpp_stat()->mutable_lcp_element_locator_stat() = - updater->ToLcpElementLocatorStat(); + *stat.mutable_lcp_element_locator_stat() = updater->ToLcpElementLocatorStat(); return true; } bool RecordLcpInfluencerScriptUrlsHistogram( const LoadingPredictorConfig& config, const std::vector<GURL>& lcp_influencer_scripts, - LcppData& data) { + LcppStat& stat) { // Contrasting to LCPP Element locator, there are multiple LCP dependency URLs // for an origin. Record each in a separate histogram. std::unique_ptr<LcppFrequencyStatDataUpdater> updater = LcppFrequencyStatDataUpdater::FromLcppStringFrequencyStatData( config.lcpp_histogram_sliding_window_size, - config.max_lcpp_histogram_buckets, - data.mutable_lcpp_stat()->lcp_script_url_stat()); + config.max_lcpp_histogram_buckets, stat.lcp_script_url_stat()); CHECK(updater); for (auto& script_url : lcp_influencer_scripts) { const auto& lcpp_script = script_url.spec(); @@ -399,21 +397,20 @@ } updater->Update(lcpp_script); } - *data.mutable_lcpp_stat()->mutable_lcp_script_url_stat() = + *stat.mutable_lcp_script_url_stat() = updater->ToLcppStringFrequencyStatData(); return updater->has_updated(); } bool RecordPreconnectOriginsHistogram(const LoadingPredictorConfig& config, const std::vector<GURL>& origins, - LcppData& data) { + LcppStat& stat) { // There could be multiple preconnect origins. Record each in a separate // histogram. std::unique_ptr<LcppFrequencyStatDataUpdater> updater = LcppFrequencyStatDataUpdater::FromLcppStringFrequencyStatData( config.lcpp_histogram_sliding_window_size, - config.max_lcpp_histogram_buckets, - data.mutable_lcpp_stat()->preconnect_origin_stat()); + config.max_lcpp_histogram_buckets, stat.preconnect_origin_stat()); CHECK(updater); for (auto& origin : origins) { const auto& origin_spec = origin.spec(); @@ -422,22 +419,21 @@ } updater->Update(origin_spec); } - *data.mutable_lcpp_stat()->mutable_preconnect_origin_stat() = + *stat.mutable_preconnect_origin_stat() = updater->ToLcppStringFrequencyStatData(); return updater->has_updated(); } bool RecordFetchedFontUrlsHistogram(const LoadingPredictorConfig& config, const std::vector<GURL>& fetched_font_urls, - LcppData& data) { + LcppStat& stat) { // Due to LCPP data structure, histogram is saved per origin. // Therefore, it sounds better to have this as a histogram instead of // a static data. std::unique_ptr<LcppFrequencyStatDataUpdater> updater = LcppFrequencyStatDataUpdater::FromLcppStringFrequencyStatData( config.lcpp_histogram_sliding_window_size, - config.max_lcpp_histogram_buckets, - data.mutable_lcpp_stat()->fetched_font_url_stat()); + config.max_lcpp_histogram_buckets, stat.fetched_font_url_stat()); std::set<GURL> used_urls; size_t max_url_length = 0; for (const auto& url : fetched_font_urls) { @@ -452,7 +448,7 @@ } updater->Update(font_spec); } - *data.mutable_lcpp_stat()->mutable_fetched_font_url_stat() = + *stat.mutable_fetched_font_url_stat() = updater->ToLcppStringFrequencyStatData(); base::UmaHistogramCounts10000( @@ -479,7 +475,7 @@ bool RecordFetchedSubresourceUrlsHistogram( const LoadingPredictorConfig& config, const std::map<GURL, base::TimeDelta>& fetched_subresource_urls, - LcppData& data) { + LcppStat& stat) { // `time_and_urls` keeps URLs (and its fetch timings) in a reversed // event order. The URL count that can be stored in the database is // limited. By processing recently fetched URLs first, we can keep the @@ -498,14 +494,14 @@ LcppFrequencyStatDataUpdater::FromLcppStringFrequencyStatData( config.lcpp_histogram_sliding_window_size, config.max_lcpp_histogram_buckets, - data.mutable_lcpp_stat()->fetched_subresource_url_stat()); + stat.fetched_subresource_url_stat()); for (const auto& [resource_load_start, subresource_url] : time_and_urls) { if (!IsValidUrlInLcppStringFrequencyStatData(subresource_url)) { continue; } updater->Update(subresource_url); } - *data.mutable_lcpp_stat()->mutable_fetched_subresource_url_stat() = + *stat.mutable_fetched_subresource_url_stat() = updater->ToLcppStringFrequencyStatData(); return updater->has_updated(); } @@ -527,12 +523,11 @@ bool RecordUnusedPreloadUrlsHistogram(const LoadingPredictorConfig& config, const std::vector<GURL>& unused_preloads, - LcppData& data) { + LcppStat& stat) { std::unique_ptr<LcppFrequencyStatDataUpdater> updater = LcppFrequencyStatDataUpdater::FromLcppStringFrequencyStatData( config.lcpp_histogram_sliding_window_size, - config.max_lcpp_histogram_buckets, - data.mutable_lcpp_stat()->unused_preload_stat()); + config.max_lcpp_histogram_buckets, stat.unused_preload_stat()); CHECK(updater); for (auto& url : unused_preloads) { if (!IsValidUrlInLcppStringFrequencyStatData(url.spec())) { @@ -540,7 +535,7 @@ } updater->Update(url.spec()); } - *data.mutable_lcpp_stat()->mutable_unused_preload_stat() = + *stat.mutable_unused_preload_stat() = updater->ToLcppStringFrequencyStatData(); return updater->has_updated(); @@ -727,22 +722,22 @@ LcppDataInputs::LcppDataInputs() = default; LcppDataInputs::~LcppDataInputs() = default; -bool UpdateLcppDataWithLcppDataInputs(const LoadingPredictorConfig& config, +bool UpdateLcppStatWithLcppDataInputs(const LoadingPredictorConfig& config, const LcppDataInputs& inputs, - LcppData& data) { + LcppStat& stat) { bool data_updated = false; data_updated |= RecordLcpElementLocatorHistogram( - config, inputs.lcp_element_locator, data); + config, inputs.lcp_element_locator, stat); data_updated |= RecordLcpInfluencerScriptUrlsHistogram( - config, inputs.lcp_influencer_scripts, data); + config, inputs.lcp_influencer_scripts, stat); data_updated |= - RecordFetchedFontUrlsHistogram(config, inputs.font_urls, data); + RecordFetchedFontUrlsHistogram(config, inputs.font_urls, stat); data_updated |= RecordFetchedSubresourceUrlsHistogram( - config, inputs.subresource_urls, data); + config, inputs.subresource_urls, stat); data_updated |= - RecordPreconnectOriginsHistogram(config, inputs.preconnect_origins, data); + RecordPreconnectOriginsHistogram(config, inputs.preconnect_origins, stat); data_updated |= RecordUnusedPreloadUrlsHistogram( - config, inputs.unused_preload_resources, data); + config, inputs.unused_preload_resources, stat); base::UmaHistogramCounts10000("Blink.LCPP.ReportedFontCount", base::checked_cast<int>(inputs.font_url_count)); if (inputs.font_url_count > 0 && inputs.font_urls.size() > 0) {
diff --git a/chrome/browser/predictors/lcp_critical_path_predictor/lcp_critical_path_predictor_util.h b/chrome/browser/predictors/lcp_critical_path_predictor/lcp_critical_path_predictor_util.h index b8a0c013..e051262c 100644 --- a/chrome/browser/predictors/lcp_critical_path_predictor/lcp_critical_path_predictor_util.h +++ b/chrome/browser/predictors/lcp_critical_path_predictor/lcp_critical_path_predictor_util.h
@@ -85,9 +85,9 @@ std::vector<GURL> unused_preload_resources; }; -bool UpdateLcppDataWithLcppDataInputs(const LoadingPredictorConfig& config, +bool UpdateLcppStatWithLcppDataInputs(const LoadingPredictorConfig& config, const LcppDataInputs& inputs, - LcppData& data); + LcppStat& stat); void UpdateLcppStringFrequencyStatData( size_t sliding_window_size,
diff --git a/chrome/browser/predictors/resource_prefetch_predictor.cc b/chrome/browser/predictors/resource_prefetch_predictor.cc index 30fdb569..3026cde0 100644 --- a/chrome/browser/predictors/resource_prefetch_predictor.cc +++ b/chrome/browser/predictors/resource_prefetch_predictor.cc
@@ -686,7 +686,8 @@ base::UmaHistogramBoolean("LoadingPredictor.LcppStatCorruptedAtLearnTime", true); } - bool data_updated = UpdateLcppDataWithLcppDataInputs(config_, inputs, data); + bool data_updated = UpdateLcppStatWithLcppDataInputs( + config_, inputs, *data.mutable_lcpp_stat()); DCHECK(IsValidLcppStat(data.lcpp_stat())); if (data_updated) { lcpp_data_->UpdateData(key, data);
diff --git a/chrome/browser/preloading/prefetch/no_state_prefetch/no_state_prefetch_unittest.cc b/chrome/browser/preloading/prefetch/no_state_prefetch/no_state_prefetch_unittest.cc index 2282503..1295be6 100644 --- a/chrome/browser/preloading/prefetch/no_state_prefetch/no_state_prefetch_unittest.cc +++ b/chrome/browser/preloading/prefetch/no_state_prefetch/no_state_prefetch_unittest.cc
@@ -959,34 +959,6 @@ EXPECT_NE(it, active_hints.end()); } -// Test that when prefetch fails and the kPrerenderFallbackToPreconnect -// experiment is enabled, a prefetch initiated by an external request actually -// results in preconnect. -TEST_F(PrerenderFallbackToPreconnectEnabledTest, - ExternalRequest_AllowedWhenNotDisabled_LowMemory_FeatureEnabled) { - const GURL kURL(GURL("http://www.example.com")); - - predictors::LoadingPredictorConfig config; - PopulateTestConfig(&config); - - auto* loading_predictor = - predictors::LoadingPredictorFactory::GetForProfile(profile()); - loading_predictor->StartInitialization(); - content::RunAllTasksUntilIdle(); - - // Prefetch should be disabled on low memory devices. - no_state_prefetch_manager()->SetIsLowEndDevice(true); - EXPECT_FALSE(no_state_prefetch_manager()->StartPrefetchingFromExternalRequest( - kURL, content::Referrer(), nullptr, gfx::Rect(kDefaultViewSize))); - - // Verify that the prefetch request falls back to a preconnect request. - EXPECT_EQ(1u, loading_predictor->GetActiveHintsSizeForTesting()); - - auto& active_hints = loading_predictor->active_hints_for_testing(); - auto it = active_hints.find(kURL); - EXPECT_NE(it, active_hints.end()); -} - TEST_F(NoStatePrefetchTest, LinkRelStillAllowedWhenDisabled) { DisablePrerender(); GURL url("http://www.google.com/"); @@ -1021,104 +993,6 @@ ASSERT_EQ(no_state_prefetch_contents, entry.get()); } -// Verify that the external prefetch requests are not allowed on cellular -// connection when kPredictivePrefetchingAllowedOnAllConnectionTypes feature is -// not enabled. -TEST_F(NoStatePrefetchTest, PrerenderNotAllowedOnCellularWithExternalOrigin) { - EnablePrerender(); - std::unique_ptr<net::NetworkChangeNotifier> mock( - new MockNetworkChangeNotifier4GMetered); - EXPECT_TRUE(net::NetworkChangeNotifier::IsConnectionCellular( - net::NetworkChangeNotifier::GetConnectionType())); - EXPECT_EQ(net::NetworkChangeNotifier::CONNECTION_COST_METERED, - net::NetworkChangeNotifier::GetConnectionCost()); - GURL url("http://www.google.com/"); - FakeNoStatePrefetchContents* no_state_prefetch_contents = - no_state_prefetch_manager()->CreateNextNoStatePrefetchContents( - url, std::nullopt, ORIGIN_EXTERNAL_REQUEST, - FINAL_STATUS_PROFILE_DESTROYED); - std::unique_ptr<NoStatePrefetchHandle> no_state_prefetch_handle( - no_state_prefetch_manager()->StartPrefetchingFromExternalRequest( - url, content::Referrer(), nullptr, gfx::Rect(kDefaultViewSize))); - EXPECT_TRUE(no_state_prefetch_handle); - EXPECT_TRUE(no_state_prefetch_contents->prefetching_has_started()); - histogram_tester().ExpectTotalCount("Prerender.FinalStatus", 0); -} - -// Verify that the external prefetch requests are allowed on unmetered cellular -// connection when kPredictivePrefetchingAllowedOnAllConnectionTypes feature is -// not enabled. -TEST_F(NoStatePrefetchTest, - PrerenderAllowedOnUnmeteredCellularWithExternalOrigin) { - EnablePrerender(); - std::unique_ptr<net::NetworkChangeNotifier> mock( - new MockNetworkChangeNotifier4GUnmetered); - EXPECT_TRUE(net::NetworkChangeNotifier::IsConnectionCellular( - net::NetworkChangeNotifier::GetConnectionType())); - EXPECT_EQ(net::NetworkChangeNotifier::CONNECTION_COST_UNMETERED, - net::NetworkChangeNotifier::GetConnectionCost()); - GURL url("http://www.google.com/"); - FakeNoStatePrefetchContents* no_state_prefetch_contents = - no_state_prefetch_manager()->CreateNextNoStatePrefetchContents( - url, std::nullopt, ORIGIN_EXTERNAL_REQUEST, - FINAL_STATUS_PROFILE_DESTROYED); - std::unique_ptr<NoStatePrefetchHandle> no_state_prefetch_handle( - no_state_prefetch_manager()->StartPrefetchingFromExternalRequest( - url, content::Referrer(), nullptr, gfx::Rect(kDefaultViewSize))); - EXPECT_TRUE(no_state_prefetch_handle); - EXPECT_TRUE(no_state_prefetch_contents->prefetching_has_started()); - histogram_tester().ExpectTotalCount("Prerender.FinalStatus", 0); -} - -// Verify that the external prefetch requests are not allowed on metered wifi -// connection when kPredictivePrefetchingAllowedOnAllConnectionTypes feature is -// not enabled. -TEST_F(NoStatePrefetchTest, - PrerenderNotAllowedOnMeteredWifiWithExternalOrigin) { - EnablePrerender(); - std::unique_ptr<net::NetworkChangeNotifier> mock( - new MockNetworkChangeNotifierWifiMetered); - EXPECT_FALSE(net::NetworkChangeNotifier::IsConnectionCellular( - net::NetworkChangeNotifier::GetConnectionType())); - EXPECT_EQ(net::NetworkChangeNotifier::CONNECTION_COST_METERED, - net::NetworkChangeNotifier::GetConnectionCost()); - GURL url("http://www.google.com/"); - FakeNoStatePrefetchContents* no_state_prefetch_contents = - no_state_prefetch_manager()->CreateNextNoStatePrefetchContents( - url, std::nullopt, ORIGIN_EXTERNAL_REQUEST, - FINAL_STATUS_PROFILE_DESTROYED); - std::unique_ptr<NoStatePrefetchHandle> no_state_prefetch_handle( - no_state_prefetch_manager()->StartPrefetchingFromExternalRequest( - url, content::Referrer(), nullptr, gfx::Rect(kDefaultViewSize))); - EXPECT_TRUE(no_state_prefetch_handle); - EXPECT_TRUE(no_state_prefetch_contents->prefetching_has_started()); - histogram_tester().ExpectTotalCount("Prerender.FinalStatus", 0); -} - -// Verify that the external prerender requests are allowed on cellular. -TEST_F( - NoStatePrefetchTest, - PrerenderAllowedOnCellularWithExternalOrigin_PredictivePrefetchingAllowedOnAllConnectionTypes) { - EnablePrerender(); - std::unique_ptr<net::NetworkChangeNotifier> mock( - new MockNetworkChangeNotifier4GMetered); - EXPECT_TRUE(net::NetworkChangeNotifier::IsConnectionCellular( - net::NetworkChangeNotifier::GetConnectionType())); - GURL url("http://www.google.com/"); - FakeNoStatePrefetchContents* no_state_prefetch_contents = - no_state_prefetch_manager()->CreateNextNoStatePrefetchContents( - url, std::nullopt, ORIGIN_EXTERNAL_REQUEST, FINAL_STATUS_USED); - std::unique_ptr<NoStatePrefetchHandle> no_state_prefetch_handle( - no_state_prefetch_manager()->StartPrefetchingFromExternalRequest( - url, content::Referrer(), nullptr, gfx::Rect(kDefaultViewSize))); - EXPECT_TRUE(no_state_prefetch_handle); - EXPECT_TRUE(no_state_prefetch_contents->prefetching_has_started()); - EXPECT_EQ(no_state_prefetch_contents, no_state_prefetch_handle->contents()); - std::unique_ptr<NoStatePrefetchContents> entry = - no_state_prefetch_manager()->FindAndUseEntry(url); - ASSERT_EQ(no_state_prefetch_contents, entry.get()); -} - TEST_F(NoStatePrefetchTest, LinkManagerCancel) { EXPECT_TRUE(IsEmptyNoStatePrefetchLinkManager()); GURL url("http://www.myexample.com");
diff --git a/chrome/browser/preloading/prefetch/no_state_prefetch/prerender_nostate_prefetch_browsertest.cc b/chrome/browser/preloading/prefetch/no_state_prefetch/prerender_nostate_prefetch_browsertest.cc index fb21d00f..0efe673 100644 --- a/chrome/browser/preloading/prefetch/no_state_prefetch/prerender_nostate_prefetch_browsertest.cc +++ b/chrome/browser/preloading/prefetch/no_state_prefetch/prerender_nostate_prefetch_browsertest.cc
@@ -1471,9 +1471,9 @@ FINAL_STATUS_RENDERER_CRASHED); content::ScopedAllowRendererCrashes scoped_allow_renderer_crashes; std::unique_ptr<NoStatePrefetchHandle> no_state_prefetch_handle( - GetNoStatePrefetchManager()->StartPrefetchingFromExternalRequest( - GURL(blink::kChromeUICrashURL), content::Referrer(), - storage_namespace, gfx::Rect(kSize))); + GetNoStatePrefetchManager()->StartPrefetchingFromOmnibox( + GURL(blink::kChromeUICrashURL), storage_namespace, kSize, + /*attempt=*/nullptr)); ASSERT_EQ(no_state_prefetch_handle->contents(), test_prerender->contents()); test_prerender->WaitForStop(); }
diff --git a/chrome/browser/resources/ash/settings/os_languages_page/input_method_types.ts b/chrome/browser/resources/ash/settings/os_languages_page/input_method_types.ts index 67b5f7b..624504dc 100644 --- a/chrome/browser/resources/ash/settings/os_languages_page/input_method_types.ts +++ b/chrome/browser/resources/ash/settings/os_languages_page/input_method_types.ts
@@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// LINT.IfChange(JpOptionValues) export enum JapaneseInputMode { KANA = 'Kana', ROMAJI = 'Romaji', @@ -47,3 +48,5 @@ ALPHANUMERIC = 'Alphanumeric', KATAKANA = 'Katakana', } +// LINT.ThenChange(/chrome/browser/ash/input_method/japanese/japanese_prefs_constants.h:JpOptionValues) +
diff --git a/chrome/browser/resources/ash/settings/os_languages_page/input_method_util.ts b/chrome/browser/resources/ash/settings/os_languages_page/input_method_util.ts index ec5b33f..ca8fffc 100644 --- a/chrome/browser/resources/ash/settings/os_languages_page/input_method_util.ts +++ b/chrome/browser/resources/ash/settings/os_languages_page/input_method_util.ts
@@ -71,6 +71,7 @@ 'virtualKeyboardEnableCapitalization', XKB_LAYOUT = 'xkbLayout', // Options for Japanese input method. + // LINT.IfChange(JpOptionCategories) JAPANESE_AUTOMATICALLY_SWITCH_TO_HALFWIDTH = 'AutomaticallySwitchToHalfwidth', JAPANESE_SHIFT_KEY_MODE_STYLE = 'ShiftKeyModeStyle', JAPANESE_USE_INPUT_HISTORY = 'UseInputHistory', @@ -87,6 +88,7 @@ JAPANESE_DISABLE_PERSONALIZED_SUGGESTIONS = 'JapaneseDisableSuggestions', JAPANESE_AUTOMATICALLY_SEND_STATISTICS_TO_GOOGLE = 'AutomaticallySendStatisticsToGoogle', + // LINT.ThenChange(/chrome/browser/ash/input_method/japanese/japanese_prefs_constants.h:JpOptionCategories) // Options for Korean input method. KOREAN_ENABLE_SYLLABLE_INPUT = 'koreanEnableSyllableInput', KOREAN_KEYBOARD_LAYOUT = 'koreanKeyboardLayout', @@ -142,11 +144,6 @@ [OptionType.ENABLE_GESTURE_TYPING]: true, [OptionType.ENABLE_PREDICTION]: false, [OptionType.ENABLE_SOUND_ON_KEYPRESS]: false, - [OptionType.JAPANESE_AUTOMATICALLY_SWITCH_TO_HALFWIDTH]: true, - [OptionType.JAPANESE_SHIFT_KEY_MODE_STYLE]: - JapaneseShiftKeyModeStyle.ALPHANUMERIC, - [OptionType.JAPANESE_USE_INPUT_HISTORY]: true, - [OptionType.JAPANESE_USE_SYSTEM_DICTIONARY]: true, [OptionType.JAPANESE_NUMBER_OF_SUGGESTIONS]: 3, [OptionType.PHYSICAL_KEYBOARD_AUTO_CORRECTION_LEVEL]: 0, [OptionType.PHYSICAL_KEYBOARD_ENABLE_CAPITALIZATION]: true, @@ -155,6 +152,12 @@ [OptionType.VIRTUAL_KEYBOARD_ENABLE_CAPITALIZATION]: true, [OptionType.XKB_LAYOUT]: 'US', // Options for Japanese input methods. + // LINT.IfChange(JpPrefDefaults) + [OptionType.JAPANESE_AUTOMATICALLY_SWITCH_TO_HALFWIDTH]: true, + [OptionType.JAPANESE_SHIFT_KEY_MODE_STYLE]: + JapaneseShiftKeyModeStyle.ALPHANUMERIC, + [OptionType.JAPANESE_USE_INPUT_HISTORY]: true, + [OptionType.JAPANESE_USE_SYSTEM_DICTIONARY]: true, [OptionType.JAPANESE_INPUT_MODE]: JapaneseInputMode.ROMAJI, [OptionType.JAPANESE_PUNCTUATION_STYLE]: JapanesePunctuationStyle.KUTEN_TOUTEN, @@ -166,6 +169,7 @@ [OptionType.JAPANESE_KEYMAP_STYLE]: JapaneseKeymapStyle.CUSTOM, [OptionType.JAPANESE_DISABLE_PERSONALIZED_SUGGESTIONS]: true, [OptionType.JAPANESE_AUTOMATICALLY_SEND_STATISTICS_TO_GOOGLE]: true, + // LINT.ThenChange(/chrome/browser/ash/input_method/japanese/japanese_settings.cc:JpPrefDefaults) // Options for Korean input method. [OptionType.KOREAN_ENABLE_SYLLABLE_INPUT]: true,
diff --git a/chrome/browser/resources/chromeos/emoji_picker/emoji_picker_api_proxy.ts b/chrome/browser/resources/chromeos/emoji_picker/emoji_picker_api_proxy.ts index 90a997f8..4aa60c6 100644 --- a/chrome/browser/resources/chromeos/emoji_picker/emoji_picker_api_proxy.ts +++ b/chrome/browser/resources/chromeos/emoji_picker/emoji_picker_api_proxy.ts
@@ -11,10 +11,10 @@ const HELP_CENTRE_URL = 'https://support.google.com/chrome?p=palette'; export class EmojiPickerApiProxy { - handler = new PageHandlerRemote(); - newWindowProxy = NewWindowProxy.getRemote(); + private handler = new PageHandlerRemote(); + private newWindowProxy = NewWindowProxy.getRemote(); // TODO(b/309343774): Once search is always on, remove function wrapper. - searchProxy = () => EmojiSearch.getRemote(); + private searchProxy = () => EmojiSearch.getRemote(); static instance: EmojiPickerApiProxy|null = null; constructor() { const factory = PageHandlerFactory.getRemote();
diff --git a/chrome/browser/resources/compose/app.html b/chrome/browser/resources/compose/app.html index 5457fc1..a2d3514e 100644 --- a/chrome/browser/resources/compose/app.html +++ b/chrome/browser/resources/compose/app.html
@@ -267,6 +267,10 @@ line-height: 20px; } + :host([enable-ui-refinements][is-editing-result-text_]) .result-container { + outline: solid 2px var(--cr-focus-outline-color); + } + :host-context([chrome-refresh-2023]) .result-container { --compose-result-text-color-while-loading: var( --color-compose-dialog-result-foreground-while-loading); @@ -606,18 +610,20 @@ </cr-loading-gradient> </div> <div id="resultContainer" class="result-container" - hidden="[[!hasOutput_]]"> + hidden="[[hideResults_(hasOutput_, feedbackEnabled_)]]"> <div id="resultContainerInner"> <div id="resultTextContainer" scrollable$="[[enableUiRefinements]]"> <compose-result-text id="resultText" text-input="[[responseText_]]" is-output-complete="{{outputComplete_}}" has-output="{{hasOutput_}}" has-partial-output="{{hasPartialOutput_}}" - on-result-edit="onResultEdit_"> + on-result-edit="onResultEdit_" + on-set-result-focus="onSetResultFocus_"> </compose-result-text> </div> <div id="resultOptionsContainer"> - <div id="resultOptions" inert$="[[!outputComplete_]]"> + <div id="resultOptions" + inert$="[[hideResults_(hasOutput_, feedbackEnabled_)]]"> <select class="md-select" id="lengthMenu" value="[[selectedLength_]]" aria-label="$i18n{lengthMenuTitle}" on-change="onLengthChanged_" hidden="[[enableUiRefinements]]"> @@ -698,7 +704,7 @@ </div> <div id="resultFooter" class="footer" - hidden$="[[!outputComplete_]]" + hidden$="[[hideResults_(hasOutput_, feedbackEnabled_)]]" inert$="[[hasPartialOutput_]]"> <div class="footer-text"> <div on-click="onFooterClick_">
diff --git a/chrome/browser/resources/compose/app.ts b/chrome/browser/resources/compose/app.ts index 14d6631..c5ee4f02 100644 --- a/chrome/browser/resources/compose/app.ts +++ b/chrome/browser/resources/compose/app.ts
@@ -132,6 +132,11 @@ value: false, observer: 'onIsEditingSubmittedInputChanged_', }, + isEditingResultText_: { + type: Boolean, + reflectToAttribute: true, + value: false, + }, isEditSubmitEnabled_: { type: Boolean, value: true, @@ -185,7 +190,7 @@ }, feedbackEnabled_: { type: Boolean, - value: false, + value: true, }, responseText_: { type: String, @@ -301,6 +306,7 @@ private input_: string; private inputParams_: ConfigurableParams; private isEditingSubmittedInput_: boolean; + private isEditingResultText_: boolean; private isEditSubmitEnabled_: boolean; private isSubmitEnabled_: boolean; private loading_: boolean; @@ -657,6 +663,7 @@ this.userResponseText_ = undefined; this.response_ = null; this.partialResponse_ = undefined; + this.feedbackEnabled_ = true; this.saveComposeAppState_(); // Ensure state is saved before compose call. this.apiProxy_.compose(this.input_, inputEdited); } @@ -671,6 +678,7 @@ this.userResponseText_ = undefined; this.response_ = null; this.partialResponse_ = undefined; + this.feedbackEnabled_ = true; this.saveComposeAppState_(); // Ensure state is saved before compose call. this.apiProxy_.rewrite(style); this.animator_.transitionFromResultToLoading(bodyHeight, resultHeight); @@ -746,6 +754,13 @@ return this.loading_ && !this.hasOutput_; } + // Elements related to results should be hidden when the output is empty, but + // not if the results are in an edited state. The latter corresponds with + // feedback being disabled. + private hideResults_(): boolean { + return !this.hasOutput_ && this.feedbackEnabled_; + } + private hasSuccessfulResponse_(): boolean { return this.response_?.status === ComposeStatus.kOk; } @@ -861,6 +876,10 @@ }); } + private onSetResultFocus_(e: CustomEvent<boolean>) { + this.isEditingResultText_ = e.detail; + } + private saveComposeAppState_() { if (this.saveAppStateDebouncer_?.isActive()) { this.saveAppStateDebouncer_.flush();
diff --git a/chrome/browser/resources/compose/result_text.html b/chrome/browser/resources/compose/result_text.html index 8d6a02a89..15736f3 100644 --- a/chrome/browser/resources/compose/result_text.html +++ b/chrome/browser/resources/compose/result_text.html
@@ -3,10 +3,15 @@ white-space: pre-wrap; word-wrap: break-word; user-select: text; + outline: none; /*One line high, to avoid resizing after first word is added.*/ min-height: 1lh; } + :host([editing-enabled_]) .result-text { + cursor: text; + } + @keyframes text-fade-in { from { opacity: 0;} to {opacity: 1;} @@ -20,13 +25,13 @@ } </style> <div id="root"> - <div class="result-text" hidden="[[textInput.streamingEnabled]]" - contenteditable$="[[canEdit_()]]" on-focusout="onFocusOut_" - on-input="onInput_">[[textInput.text]]</div> + <div id="resultText" class="result-text" + hidden="[[textInput.streamingEnabled]]" contenteditable$="[[canEdit_()]]" + on-focusin="onFocusIn_" on-focusout="onFocusOut_"></div> <div id="partialResultText" class="result-text" hidden="[[!textInput.streamingEnabled]]" - contenteditable$="[[partialTextCanEdit_()]]" on-focusout="onFocusOut_" - on-input="onInput_" + contenteditable$="[[partialTextCanEdit_()]]" on-focusin="onFocusIn_" + on-focusout="onFocusOut_" ><template is="dom-repeat" items="[[displayedChunks_]]" ><span>[[item.text]]</span></template></div> </div>
diff --git a/chrome/browser/resources/compose/result_text.ts b/chrome/browser/resources/compose/result_text.ts index 57b6b757..6cb51b8c 100644 --- a/chrome/browser/resources/compose/result_text.ts +++ b/chrome/browser/resources/compose/result_text.ts
@@ -15,6 +15,7 @@ export interface ComposeResultTextElement { $: { + resultText: HTMLElement, partialResultText: HTMLElement, root: HTMLElement, }; @@ -79,6 +80,7 @@ }, editingEnabled_: { type: Boolean, + reflectToAttribute: true, }, }; } @@ -96,8 +98,7 @@ private displayedChunks_: StreamChunk[] = []; private displayedFullText_: string = ''; private editingEnabled_: boolean; - // Tracking whether the value has changed - private isDirty_: boolean = false; + private initialText_: string = ''; constructor() { super(); @@ -106,6 +107,8 @@ } updateInputs() { + this.$.resultText.innerText = this.textInput.text; + if (this.textInput.streamingEnabled) { this.isOutputComplete = false; this.wordStreamer_.setText( @@ -129,20 +132,32 @@ this.wordStreamer_.setCharsPerTickForTesting(5); } + private onFocusIn_() { + this.dispatchEvent(new CustomEvent( + 'set-result-focus', {bubbles: true, composed: true, detail: true})); + + this.initialText_ = this.textInput.text; + } + private onFocusOut_() { - // Only dispatch event if user has typed something. - if (this.editingEnabled_ && this.isDirty_) { - this.isDirty_ = false; + this.dispatchEvent(new CustomEvent( + 'set-result-focus', {bubbles: true, composed: true, detail: false})); + + const currentText = this.$.resultText.innerText; + if (currentText === '') { + // We disallow the user from saving or using empty text. Instead, replace + // it with the starting state of the text before it was edited. + this.$.resultText.innerText = this.initialText_; + return; + } + // Only dispatch event if the text has changed from its initial state. + if (this.editingEnabled_ && currentText !== this.initialText_) { this.dispatchEvent(new CustomEvent( 'result-edit', {bubbles: true, composed: true, detail: this.$.root.innerText})); } } - private onInput_() { - this.isDirty_ = true; - } - private canEdit_() { if (this.editingEnabled_) { return 'plaintext-only';
diff --git a/chrome/browser/resources/side_panel/read_anything/app.html b/chrome/browser/resources/side_panel/read_anything/app.html index 6d610e4..fc71daa 100644 --- a/chrome/browser/resources/side_panel/read_anything/app.html +++ b/chrome/browser/resources/side_panel/read_anything/app.html
@@ -22,7 +22,6 @@ } #appFlexParent #container-parent { - background: var(--background-color); height: 100%; overflow: auto; }
diff --git a/chrome/browser/sync/test/integration/sync_test.cc b/chrome/browser/sync/test/integration/sync_test.cc index 83ad864..726f56e 100644 --- a/chrome/browser/sync/test/integration/sync_test.cc +++ b/chrome/browser/sync/test/integration/sync_test.cc
@@ -805,10 +805,25 @@ fake_server_.reset(); } - for (Profile* profile : profiles_) { + for (size_t index = 0; index < profiles_.size(); ++index) { // Profile could be removed earlier. - if (profile) { - profile->RemoveObserver(this); + if (profiles_[index]) { + profiles_[index]->RemoveObserver(this); + +#if BUILDFLAG(IS_ANDROID) + if (server_type_ == EXTERNAL_LIVE_SERVER) { + // A profile could have backend tasks from the associate sync engine. + // In browser tests, on non-Android platforms, these tasks are cancelled + // during the browser process shutdown. + // On Android, however, browser process is not shutdown after test run. + // As a result, these backend tasks could keep running and cause timeout + // error during test shutdown. + // To fix this issue, we explicitly call SyncServiceImpl::StopAndClear + // to cancel any ongoing sync engine's backend tasks. + GetSyncService(index)->StopAndClear(); + } +#endif // BUILDFLAG(IS_ANDROID) + } }
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn index a5ccc6e0..f98ff0dc 100644 --- a/chrome/browser/ui/BUILD.gn +++ b/chrome/browser/ui/BUILD.gn
@@ -5267,8 +5267,6 @@ "views/commerce/price_tracking_icon_view.h", "views/commerce/price_tracking_view.cc", "views/commerce/price_tracking_view.h", - "views/commerce/product_specifications_button.cc", - "views/commerce/product_specifications_button.h", "views/commerce/shopping_collection_iph_view.cc", "views/commerce/shopping_collection_iph_view.h", "views/confirm_bubble_views.cc",
diff --git a/chrome/browser/ui/browser_element_identifiers.cc b/chrome/browser/ui/browser_element_identifiers.cc index e365708..5ae9fb9 100644 --- a/chrome/browser/ui/browser_element_identifiers.cc +++ b/chrome/browser/ui/browser_element_identifiers.cc
@@ -46,7 +46,6 @@ DEFINE_ELEMENT_IDENTIFIER_VALUE(kPriceInsightsChipElementId); DEFINE_ELEMENT_IDENTIFIER_VALUE(kPriceTrackingBookmarkViewElementId); DEFINE_ELEMENT_IDENTIFIER_VALUE(kPriceTrackingChipElementId); -DEFINE_ELEMENT_IDENTIFIER_VALUE(kProductSpecificationsButtonElementId); DEFINE_ELEMENT_IDENTIFIER_VALUE(kReadLaterSidePanelWebViewElementId); DEFINE_ELEMENT_IDENTIFIER_VALUE(kReloadButtonElementId); DEFINE_ELEMENT_IDENTIFIER_VALUE(kSavePasswordComboboxElementId);
diff --git a/chrome/browser/ui/browser_element_identifiers.h b/chrome/browser/ui/browser_element_identifiers.h index 478570d..e497f7b 100644 --- a/chrome/browser/ui/browser_element_identifiers.h +++ b/chrome/browser/ui/browser_element_identifiers.h
@@ -56,7 +56,6 @@ DECLARE_ELEMENT_IDENTIFIER_VALUE(kPriceInsightsChipElementId); DECLARE_ELEMENT_IDENTIFIER_VALUE(kPriceTrackingBookmarkViewElementId); DECLARE_ELEMENT_IDENTIFIER_VALUE(kPriceTrackingChipElementId); -DECLARE_ELEMENT_IDENTIFIER_VALUE(kProductSpecificationsButtonElementId); DECLARE_ELEMENT_IDENTIFIER_VALUE(kReadLaterSidePanelWebViewElementId); DECLARE_ELEMENT_IDENTIFIER_VALUE(kReloadButtonElementId); DECLARE_ELEMENT_IDENTIFIER_VALUE(kSavePasswordComboboxElementId);
diff --git a/chrome/browser/ui/views/autofill/add_new_address_bubble_view.cc b/chrome/browser/ui/views/autofill/add_new_address_bubble_view.cc index ddf1c95d..6fb4f7c 100644 --- a/chrome/browser/ui/views/autofill/add_new_address_bubble_view.cc +++ b/chrome/browser/ui/views/autofill/add_new_address_bubble_view.cc
@@ -39,15 +39,12 @@ views::BoxLayout::Orientation::kVertical, gfx::Insets(), views::LayoutProvider::Get()->GetDistanceMetric( views::DISTANCE_UNRELATED_CONTROL_VERTICAL))); + set_fixed_width(views::LayoutProvider::Get()->GetDistanceMetric( + views::DISTANCE_BUBBLE_PREFERRED_WIDTH)); AddChildView(views::Builder<views::Label>() .SetText(controller_->GetBodyText()) .SetTextStyle(views::style::STYLE_SECONDARY) - .SetPreferredSize(gfx::Size( - views::LayoutProvider::Get()->GetDistanceMetric( - views::DISTANCE_BUBBLE_PREFERRED_WIDTH) - - margins().width(), - 0)) .SetHorizontalAlignment(gfx::HorizontalAlignment::ALIGN_LEFT) .SetMultiLine(true) .Build());
diff --git a/chrome/browser/ui/views/autofill/save_address_profile_view.cc b/chrome/browser/ui/views/autofill/save_address_profile_view.cc index 547c160..b1aa356 100644 --- a/chrome/browser/ui/views/autofill/save_address_profile_view.cc +++ b/chrome/browser/ui/views/autofill/save_address_profile_view.cc
@@ -186,6 +186,10 @@ views::Builder<views::Label>() .SetText(description) .SetTextStyle(views::style::STYLE_SECONDARY) + // The preferred size is set to prevent the long description text + // from affecting the bubble width. Using `set_fixed_width()` for + // the popup doesn't work as the popup should accommodate + // potentially long user input nicely. .SetPreferredSize( gfx::Size(views::LayoutProvider::Get()->GetDistanceMetric( views::DISTANCE_BUBBLE_PREFERRED_WIDTH) -
diff --git a/chrome/browser/ui/views/commerce/product_specifications_button.cc b/chrome/browser/ui/views/commerce/product_specifications_button.cc deleted file mode 100644 index b569fb3..0000000 --- a/chrome/browser/ui/views/commerce/product_specifications_button.cc +++ /dev/null
@@ -1,281 +0,0 @@ -// Copyright 2024 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/ui/views/commerce/product_specifications_button.h" - -#include "chrome/app/vector_icons/vector_icons.h" -#include "chrome/browser/ui/browser_element_identifiers.h" -#include "chrome/browser/ui/color/chrome_color_id.h" -#include "chrome/browser/ui/tabs/organization/tab_organization_service.h" -#include "chrome/browser/ui/views/tabs/tab_strip_controller.h" -#include "chrome/grit/generated_resources.h" -#include "components/strings/grit/components_strings.h" -#include "components/vector_icons/vector_icons.h" -#include "ui/base/l10n/l10n_util.h" -#include "ui/base/metadata/metadata_impl_macros.h" -#include "ui/compositor/layer.h" -#include "ui/views/animation/ink_drop.h" -#include "ui/views/controls/highlight_path_generator.h" -#include "ui/views/layout/box_layout.h" -#include "ui/views/mouse_watcher_view_host.h" -#include "ui/views/view_class_properties.h" - -namespace { -// TODO(b/335015993): These constants are shared with TabSearchContainer, and -// should be moved into one place. Similar for the LockedExpansionMode enum used -// in this file. -constexpr int kProductSpecificationsButtonCornerRadius = 10; -constexpr int kProductSpecificationsButtonLabelMargin = 10; -constexpr int kProductSpecificationsCloseButtonMargin = 8; -constexpr int kProductSpecificationsCloseButtonSize = 16; - -constexpr base::TimeDelta kExpansionInDuration = base::Milliseconds(500); -constexpr base::TimeDelta kExpansionOutDuration = base::Milliseconds(250); -constexpr base::TimeDelta kOpacityInDuration = base::Milliseconds(300); -constexpr base::TimeDelta kOpacityOutDuration = base::Milliseconds(100); -constexpr base::TimeDelta kOpacityDelay = base::Milliseconds(100); -constexpr base::TimeDelta kShowDuration = base::Seconds(20); - -} // namespace - -ProductSpecificationsButton::ProductSpecificationsButton( - TabStripController* tab_strip_controller, - bool before_tab_strip, - View* locked_expansion_view) - : TabStripControlButton( - tab_strip_controller, - base::BindRepeating(&ProductSpecificationsButton::OnClicked, - base::Unretained(this)), - l10n_util::GetStringUTF16( - IDS_PRODUCT_SPECIFICATIONS_ENTRY_POINT_DEFAULT), - Edge::kNone), - locked_expansion_view_(locked_expansion_view) { - mouse_watcher_ = std::make_unique<views::MouseWatcher>( - std::make_unique<views::MouseWatcherViewHost>(locked_expansion_view, - gfx::Insets()), - this); - auto* const layout_manager = - SetLayoutManager(std::make_unique<views::BoxLayout>()); - layout_manager->set_main_axis_alignment( - views::BoxLayout::MainAxisAlignment::kEnd); - - SetProperty(views::kElementIdentifierKey, - kProductSpecificationsButtonElementId); - - SetTooltipText(l10n_util::GetStringUTF16( - IDS_PRODUCT_SPECIFICATIONS_ENTRY_POINT_DEFAULT)); - // TODO(b/325661685): Set accessibility name of the button. - SetLabelStyle(views::style::STYLE_BODY_3_EMPHASIS); - label()->SetElideBehavior(gfx::ElideBehavior::NO_ELIDE); - - const gfx::Insets label_margin = - gfx::Insets().set_left(kProductSpecificationsButtonLabelMargin); - label()->SetProperty(views::kMarginsKey, label_margin); - - SetForegroundFrameActiveColorId(kColorTabSearchButtonCRForegroundFrameActive); - SetForegroundFrameInactiveColorId( - kColorTabSearchButtonCRForegroundFrameInactive); - SetBackgroundFrameActiveColorId(kColorNewTabButtonCRBackgroundFrameActive); - SetBackgroundFrameInactiveColorId( - kColorNewTabButtonCRBackgroundFrameInactive); - SetCloseButton(base::BindRepeating(&ProductSpecificationsButton::OnDismissed, - base::Unretained(this))); - - const int space_between_buttons = 2; - gfx::Insets margin = gfx::Insets(); - if (before_tab_strip) { - margin.set_left(space_between_buttons); - } else { - margin.set_right(space_between_buttons); - } - SetProperty(views::kMarginsKey, margin); - SetOpacity(0); - - expansion_animation_.SetTweenType(gfx::Tween::Type::ACCEL_20_DECEL_100); - opacity_animation_.SetTweenType(gfx::Tween::Type::LINEAR); - - set_paint_transparent_for_custom_image_theme(false); - - layout_manager->SetFlexForView(close_button_, 1); - - UpdateColors(); -} - -ProductSpecificationsButton::~ProductSpecificationsButton() = default; - -gfx::Size ProductSpecificationsButton::CalculatePreferredSize() const { - const int full_width = GetLayoutManager()->GetPreferredSize(this).width(); - const int width = full_width * width_factor_; - const int height = TabStripControlButton::CalculatePreferredSize().height(); - return gfx::Size(width, height); -} - -void ProductSpecificationsButton::MouseMovedOutOfHost() { - SetLockedExpansionMode(LockedExpansionMode::kNone); -} - -void ProductSpecificationsButton::AnimationCanceled( - const gfx::Animation* animation) { - ApplyAnimationValue(animation); -} - -void ProductSpecificationsButton::AnimationEnded( - const gfx::Animation* animation) { - ApplyAnimationValue(animation); -} - -void ProductSpecificationsButton::AnimationProgressed( - const gfx::Animation* animation) { - ApplyAnimationValue(animation); -} - -void ProductSpecificationsButton::Show() { - if (locked_expansion_view_->IsMouseHovered()) { - SetLockedExpansionMode(LockedExpansionMode::kWillShow); - } - if (locked_expansion_mode_ == LockedExpansionMode::kNone) { - ExecuteShow(); - } -} - -void ProductSpecificationsButton::Hide() { - if (locked_expansion_view_->IsMouseHovered()) { - SetLockedExpansionMode(LockedExpansionMode::kWillHide); - } - if (locked_expansion_mode_ == LockedExpansionMode::kNone) { - ExecuteHide(); - } -} - -void ProductSpecificationsButton::SetOpacity(float factor) { - label()->layer()->SetOpacity(factor); - close_button_->layer()->SetOpacity(factor); -} - -int ProductSpecificationsButton::GetCornerRadius() const { - return kProductSpecificationsButtonCornerRadius; -} - -void ProductSpecificationsButton::ApplyAnimationValue( - const gfx::Animation* animation) { - float value = animation->GetCurrentValue(); - if (animation == &expansion_animation_) { - SetWidthFactor(value); - } else if (animation == &opacity_animation_) { - SetOpacity(value); - } -} - -void ProductSpecificationsButton::ExecuteShow() { - expansion_animation_.SetSlideDuration( - GetAnimationDuration(kExpansionInDuration)); - opacity_animation_.SetSlideDuration(GetAnimationDuration(kOpacityInDuration)); - const base::TimeDelta delay = GetAnimationDuration(kOpacityDelay); - opacity_animation_delay_timer_.Start( - FROM_HERE, delay, this, - &ProductSpecificationsButton::ShowOpacityAnimation); - - expansion_animation_.Show(); - - hide_button_timer_.Start(FROM_HERE, kShowDuration, this, - &ProductSpecificationsButton::OnTimeout); -} - -void ProductSpecificationsButton::ExecuteHide() { - expansion_animation_.SetSlideDuration( - GetAnimationDuration(kExpansionOutDuration)); - expansion_animation_.Hide(); - - opacity_animation_.SetSlideDuration( - GetAnimationDuration(kOpacityOutDuration)); - opacity_animation_.Hide(); -} - -void ProductSpecificationsButton::OnClicked() { - // TODO(b/325661685): Add implementation for this method. -} - -void ProductSpecificationsButton::OnDismissed() { - ExecuteHide(); -} - -void ProductSpecificationsButton::OnTimeout() { - Hide(); -} - -void ProductSpecificationsButton::SetCloseButton( - views::LabelButton::PressedCallback pressed_callback) { - auto close_button = - std::make_unique<views::LabelButton>(std::move(pressed_callback)); - close_button->SetTooltipText(l10n_util::GetStringUTF16( - IDS_TOOLTIP_PRODUCT_SPECIFICATIONS_ENTRY_POINT_CLOSE)); - - const ui::ImageModel icon_image_model = ui::ImageModel::FromVectorIcon( - vector_icons::kCloseChromeRefreshIcon, - kColorTabSearchButtonCRForegroundFrameActive, - kProductSpecificationsCloseButtonSize); - - close_button->SetImageModel(views::Button::STATE_NORMAL, icon_image_model); - close_button->SetImageModel(views::Button::STATE_HOVERED, icon_image_model); - close_button->SetImageModel(views::Button::STATE_PRESSED, icon_image_model); - - close_button->SetPaintToLayer(); - close_button->layer()->SetFillsBoundsOpaquely(false); - - views::InkDrop::Get(close_button.get()) - ->SetMode(views::InkDropHost::InkDropMode::ON); - views::InkDrop::Get(close_button.get())->SetHighlightOpacity(0.16f); - views::InkDrop::Get(close_button.get())->SetVisibleOpacity(0.14f); - views::InkDrop::Get(close_button.get()) - ->SetBaseColorId(kColorTabSearchButtonCRForegroundFrameActive); - - auto ink_drop_highlight_path = - std::make_unique<views::CircleHighlightPathGenerator>(gfx::Insets()); - views::HighlightPathGenerator::Install(close_button.get(), - std::move(ink_drop_highlight_path)); - - close_button->SetPreferredSize( - gfx::Size(kProductSpecificationsCloseButtonSize, - kProductSpecificationsCloseButtonSize)); - close_button->SetBorder(nullptr); - - const gfx::Insets margin = - gfx::Insets().set_left_right(kProductSpecificationsCloseButtonMargin, - kProductSpecificationsCloseButtonMargin); - close_button->SetProperty(views::kMarginsKey, margin); - - close_button_ = AddChildView(std::move(close_button)); -} - -void ProductSpecificationsButton::SetLockedExpansionMode( - LockedExpansionMode mode) { - if (mode == LockedExpansionMode::kNone) { - if (locked_expansion_mode_ == LockedExpansionMode::kWillShow) { - ExecuteShow(); - } else if (locked_expansion_mode_ == LockedExpansionMode::kWillHide) { - ExecuteHide(); - } - } else { - mouse_watcher_->Start(GetWidget()->GetNativeWindow()); - } - locked_expansion_mode_ = mode; -} - -void ProductSpecificationsButton::SetWidthFactor(float factor) { - width_factor_ = factor; - PreferredSizeChanged(); -} - -void ProductSpecificationsButton::ShowOpacityAnimation() { - opacity_animation_.Show(); -} - -base::TimeDelta ProductSpecificationsButton::GetAnimationDuration( - base::TimeDelta duration) { - return gfx::Animation::ShouldRenderRichAnimation() ? duration - : base::TimeDelta(); -} - -BEGIN_METADATA(ProductSpecificationsButton) -END_METADATA
diff --git a/chrome/browser/ui/views/commerce/product_specifications_button.h b/chrome/browser/ui/views/commerce/product_specifications_button.h deleted file mode 100644 index 89a6e4a..0000000 --- a/chrome/browser/ui/views/commerce/product_specifications_button.h +++ /dev/null
@@ -1,108 +0,0 @@ -// Copyright 2024 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_UI_VIEWS_COMMERCE_PRODUCT_SPECIFICATIONS_BUTTON_H_ -#define CHROME_BROWSER_UI_VIEWS_COMMERCE_PRODUCT_SPECIFICATIONS_BUTTON_H_ - -#include "base/timer/timer.h" -#include "chrome/browser/ui/views/tabs/tab_search_container.h" -#include "chrome/browser/ui/views/tabs/tab_strip_control_button.h" -#include "ui/base/metadata/metadata_header_macros.h" -#include "ui/gfx/animation/animation.h" -#include "ui/gfx/animation/slide_animation.h" -#include "ui/views/animation/animation_delegate_views.h" -#include "ui/views/mouse_watcher.h" -#include "ui/views/view.h" - -class TabStripController; - -class ProductSpecificationsButton : public TabStripControlButton, - public views::MouseWatcherListener { - METADATA_HEADER(ProductSpecificationsButton, TabStripControlButton) - - public: - ProductSpecificationsButton(TabStripController* tab_strip_controller, - bool before_tab_strip, - View* locked_expansion_view); - ProductSpecificationsButton(const ProductSpecificationsButton&) = delete; - ProductSpecificationsButton& operator=(const ProductSpecificationsButton&) = - delete; - ~ProductSpecificationsButton() override; - - // TabStripControlButton: - gfx::Size CalculatePreferredSize() const override; - - // views::MouseWatcherListener: - void MouseMovedOutOfHost() override; - - // views::AnimationDelegateViews - void AnimationCanceled(const gfx::Animation* animation) override; - void AnimationEnded(const gfx::Animation* animation) override; - void AnimationProgressed(const gfx::Animation* animation) override; - - // Trigger ProductSpecificationsButton show. Whether it's actually showing - // depends on if the |locked_expansion_view| is hovered. - void Show(); - - // Trigger ProductSpecificationsButton hide. Whether it's actually hiding - // depends on if the |locked_expansion_view| is hovered. - void Hide(); - - float width_factor_for_testing() { return width_factor_; } - gfx::SlideAnimation* expansion_animation_for_testing() { - return &expansion_animation_; - } - - protected: - // TabStripControlButton: - int GetCornerRadius() const override; - - private: - friend class ProductSpecificationsButtonBrowserTest; - friend class ProductSpecificationsButtonTest; - - void ApplyAnimationValue(const gfx::Animation* animation); - void ExecuteShow(); - void ExecuteHide(); - - void OnClicked(); - void OnDismissed(); - void OnTimeout(); - - void SetCloseButton(PressedCallback callback); - void SetLockedExpansionMode(LockedExpansionMode mode); - void ShowOpacityAnimation(); - void SetOpacity(float opacity); - void SetWidthFactor(float factor); - - base::TimeDelta GetAnimationDuration(base::TimeDelta duration); - - // View where, if the mouse is currently over its bounds, the expansion state - // will not change. Changes will be staged until after the mouse exits the - // bounds of this View. - raw_ptr<View, DanglingUntriaged> locked_expansion_view_; - - // Animations controlling showing and hiding of the button. - gfx::SlideAnimation expansion_animation_{this}; - gfx::SlideAnimation opacity_animation_{this}; - - // Timer for hiding the button after show. - base::OneShotTimer hide_button_timer_; - // Timer for initiating the opacity animation during show. - base::OneShotTimer opacity_animation_delay_timer_; - - // When locked, the container is unable to change its expanded state. Changes - // will be staged until after this is unlocked. - LockedExpansionMode locked_expansion_mode_ = LockedExpansionMode::kNone; - - // MouseWatcher is used to lock and unlock the expansion state of this - // container. - std::unique_ptr<views::MouseWatcher> mouse_watcher_; - - // Preferred width multiplier, between 0-1. Used to animate button size. - float width_factor_ = 0; - raw_ptr<views::LabelButton> close_button_; -}; - -#endif // CHROME_BROWSER_UI_VIEWS_COMMERCE_PRODUCT_SPECIFICATIONS_BUTTON_H_
diff --git a/chrome/browser/ui/views/commerce/product_specifications_button_browsertest.cc b/chrome/browser/ui/views/commerce/product_specifications_button_browsertest.cc deleted file mode 100644 index 7664756..0000000 --- a/chrome/browser/ui/views/commerce/product_specifications_button_browsertest.cc +++ /dev/null
@@ -1,137 +0,0 @@ -// Copyright 2024 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/ui/views/commerce/product_specifications_button.h" - -#include "chrome/browser/ui/browser.h" -#include "chrome/browser/ui/views/frame/browser_view.h" -#include "chrome/browser/ui/views/frame/tab_strip_region_view.h" -#include "chrome/browser/ui/views/tabs/tab_search_button.h" -#include "chrome/test/base/in_process_browser_test.h" -#include "chrome/test/views/chrome_views_test_base.h" -#include "components/commerce/core/commerce_feature_list.h" -#include "content/public/test/browser_test.h" -#include "testing/gtest/include/gtest/gtest.h" -#include "ui/events/test/event_generator.h" - -class ProductSpecificationsButtonBrowserTest : public InProcessBrowserTest { - public: - ProductSpecificationsButtonBrowserTest() { - feature_list_.InitAndEnableFeature(commerce::kProductSpecifications); - } - - BrowserView* browser_view() { - return BrowserView::GetBrowserViewForBrowser(browser()); - } - - TabSearchContainer* tab_search_container() { - return browser_view()->tab_strip_region_view()->tab_search_container(); - } - - ProductSpecificationsButton* product_specifications_button() { - return browser_view() - ->tab_strip_region_view() - ->product_specifications_button(); - } - - bool GetRenderTabSearchBeforeTabStrip() { - return browser_view() - ->tab_strip_region_view() - ->render_tab_search_before_tab_strip_; - } - - void SetLockedExpansionModeForTesting(LockedExpansionMode mode) { - product_specifications_button()->SetLockedExpansionMode(mode); - } - - void OnDismissed() { product_specifications_button()->OnDismissed(); } - - void OnTimeout() { product_specifications_button()->OnTimeout(); } - - private: - base::test::ScopedFeatureList feature_list_; -}; - -IN_PROC_BROWSER_TEST_F(ProductSpecificationsButtonBrowserTest, - ProductSpecificationsButtonOrder) { - auto* tab_strip_region_view = browser_view()->tab_strip_region_view(); - if (GetRenderTabSearchBeforeTabStrip()) { - ASSERT_EQ(tab_search_container(), tab_strip_region_view->children()[0]); - ASSERT_EQ(product_specifications_button(), - tab_strip_region_view->children()[1]); - } else { - ASSERT_EQ(product_specifications_button(), - tab_strip_region_view->children()[0]); - ASSERT_EQ(tab_search_container(), tab_strip_region_view->children()[1]); - } -} - -IN_PROC_BROWSER_TEST_F(ProductSpecificationsButtonBrowserTest, DelaysShow) { - ASSERT_FALSE(product_specifications_button() - ->expansion_animation_for_testing() - ->IsShowing()); - - SetLockedExpansionModeForTesting(LockedExpansionMode::kWillShow); - product_specifications_button()->Show(); - - ASSERT_FALSE(product_specifications_button() - ->expansion_animation_for_testing() - ->IsShowing()); - - SetLockedExpansionModeForTesting(LockedExpansionMode::kNone); - - ASSERT_TRUE(product_specifications_button() - ->expansion_animation_for_testing() - ->IsShowing()); -} - -IN_PROC_BROWSER_TEST_F(ProductSpecificationsButtonBrowserTest, DelaysHide) { - product_specifications_button()->expansion_animation_for_testing()->Reset(1); - ASSERT_FALSE(product_specifications_button() - ->expansion_animation_for_testing() - ->IsClosing()); - - SetLockedExpansionModeForTesting(LockedExpansionMode::kWillHide); - product_specifications_button()->Hide(); - - ASSERT_FALSE(product_specifications_button() - ->expansion_animation_for_testing() - ->IsClosing()); - - SetLockedExpansionModeForTesting(LockedExpansionMode::kNone); - - ASSERT_TRUE(product_specifications_button() - ->expansion_animation_for_testing() - ->IsClosing()); -} - -IN_PROC_BROWSER_TEST_F(ProductSpecificationsButtonBrowserTest, - ImmediatelyHidesWhenButtonDismissed) { - product_specifications_button()->expansion_animation_for_testing()->Reset(1); - SetLockedExpansionModeForTesting(LockedExpansionMode::kWillHide); - - OnDismissed(); - - EXPECT_TRUE(product_specifications_button() - ->expansion_animation_for_testing() - ->IsClosing()); -} - -IN_PROC_BROWSER_TEST_F(ProductSpecificationsButtonBrowserTest, - DelaysHideWhenButtonTimesOut) { - product_specifications_button()->expansion_animation_for_testing()->Reset(1); - SetLockedExpansionModeForTesting(LockedExpansionMode::kWillHide); - - OnTimeout(); - - EXPECT_FALSE(product_specifications_button() - ->expansion_animation_for_testing() - ->IsClosing()); - - SetLockedExpansionModeForTesting(LockedExpansionMode::kNone); - - ASSERT_TRUE(product_specifications_button() - ->expansion_animation_for_testing() - ->IsClosing()); -}
diff --git a/chrome/browser/ui/views/commerce/product_specifications_button_unittest.cc b/chrome/browser/ui/views/commerce/product_specifications_button_unittest.cc deleted file mode 100644 index 65bd49b..0000000 --- a/chrome/browser/ui/views/commerce/product_specifications_button_unittest.cc +++ /dev/null
@@ -1,60 +0,0 @@ -// Copyright 2024 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/ui/views/commerce/product_specifications_button.h" - -#include "chrome/browser/ui/views/tabs/fake_base_tab_strip_controller.h" -#include "chrome/test/views/chrome_views_test_base.h" -#include "testing/gtest/include/gtest/gtest.h" - -class ProductSpecificationsButtonTest : public ChromeViewsTestBase { - public: - void SetUp() override { - ChromeViewsTestBase::SetUp(); - - tab_strip_controller_ = std::make_unique<FakeBaseTabStripController>(); - locked_expansion_view_ = std::make_unique<views::View>(); - button_ = std::make_unique<ProductSpecificationsButton>( - tab_strip_controller_.get(), true, locked_expansion_view_.get()); - } - - void SetWidthFactor(float factor) { button_->SetWidthFactor(factor); } - - protected: - std::unique_ptr<ProductSpecificationsButton> button_; - std::unique_ptr<TabStripController> tab_strip_controller_; - std::unique_ptr<views::View> locked_expansion_view_; -}; - -TEST_F(ProductSpecificationsButtonTest, AppliesWidthFactor) { - ASSERT_EQ(0, button_->width_factor_for_testing()); - ASSERT_EQ(0, button_->CalculatePreferredSize().width()); - - SetWidthFactor(0.5); - - const int half_width = button_->CalculatePreferredSize().width(); - ASSERT_LT(0, half_width); - - SetWidthFactor(1); - - const int full_width = button_->CalculatePreferredSize().width(); - const int half_full_width = full_width / 2; - ASSERT_LT(0, full_width); - ASSERT_EQ(half_width, half_full_width); -} - -TEST_F(ProductSpecificationsButtonTest, AnimatesToExpanded) { - // Should be collapsed by default - ASSERT_EQ(0, button_->expansion_animation_for_testing()->GetCurrentValue()); - - ASSERT_EQ(0, button_->width_factor_for_testing()); - - button_->Show(); - - ASSERT_TRUE(button_->expansion_animation_for_testing()->IsShowing()); - - button_->expansion_animation_for_testing()->Reset(1); - - ASSERT_EQ(1, button_->width_factor_for_testing()); -}
diff --git a/chrome/browser/ui/views/frame/tab_strip_region_view.cc b/chrome/browser/ui/views/frame/tab_strip_region_view.cc index 9967f13..5b538335 100644 --- a/chrome/browser/ui/views/frame/tab_strip_region_view.cc +++ b/chrome/browser/ui/views/frame/tab_strip_region_view.cc
@@ -13,7 +13,6 @@ #include "chrome/browser/ui/layout_constants.h" #include "chrome/browser/ui/ui_features.h" #include "chrome/browser/ui/views/chrome_layout_provider.h" -#include "chrome/browser/ui/views/commerce/product_specifications_button.h" #include "chrome/browser/ui/views/tab_search_bubble_host.h" #include "chrome/browser/ui/views/tabs/new_tab_button.h" #include "chrome/browser/ui/views/tabs/tab_drag_controller.h" @@ -27,7 +26,6 @@ #include "chrome/browser/ui/views/toolbar/toolbar_view.h" #include "chrome/browser/ui/web_applications/app_browser_controller.h" #include "chrome/grit/generated_resources.h" -#include "components/commerce/core/commerce_feature_list.h" #include "components/vector_icons/vector_icons.h" #include "ui/accessibility/ax_node_data.h" #include "ui/base/clipboard/clipboard_constants.h" @@ -107,18 +105,6 @@ views::LayoutAlignment::kCenter); } - // Add and configure the ProductSpecificationsButton. - std::unique_ptr<ProductSpecificationsButton> product_specifications_button; - if (tab_search_container && - base::FeatureList::IsEnabled(commerce::kProductSpecifications)) { - product_specifications_button = - std::make_unique<ProductSpecificationsButton>( - tab_strip_->controller(), render_tab_search_before_tab_strip_, - this); - product_specifications_button->SetProperty(views::kCrossAxisAlignmentKey, - views::LayoutAlignment::kCenter); - } - if (tab_search_container && render_tab_search_before_tab_strip_) { tab_search_container->SetPaintToLayer(); tab_search_container->layer()->SetFillsBoundsOpaquely(false); @@ -128,16 +114,6 @@ // Inset between the tabsearch and tabstrip should be reduced to account for // extra spacing. tab_search_container_->SetProperty(views::kViewIgnoredByLayoutKey, true); - - if (product_specifications_button) { - product_specifications_button->SetPaintToLayer(); - product_specifications_button->layer()->SetFillsBoundsOpaquely(false); - - product_specifications_button_ = - AddChildView(std::move(product_specifications_button)); - product_specifications_button_->SetProperty( - views::kViewIgnoredByLayoutKey, true); - } } if (base::FeatureList::IsEnabled(features::kScrollableTabStrip)) { @@ -246,10 +222,6 @@ if (browser && tab_search_container && !WindowFrameUtil::IsWindowsTabSearchCaptionButtonEnabled(browser) && !render_tab_search_before_tab_strip_) { - if (product_specifications_button) { - product_specifications_button_ = - AddChildView(std::move(product_specifications_button)); - } tab_search_container_ = AddChildView(std::move(tab_search_container)); if (features::IsChromeRefresh2023()) { tab_search_container_->SetProperty( @@ -289,13 +261,6 @@ get_target_rect(tab_search_container_)); } - if (render_tab_search_before_tab_strip_ && product_specifications_button_ && - product_specifications_button_->GetLocalBounds().Intersects( - get_target_rect(product_specifications_button_))) { - return !product_specifications_button_->HitTestRect( - get_target_rect(product_specifications_button_)); - } - // Perform a hit test against the |tab_strip_container_| to ensure that the // rect is within the visible portion of the |tab_strip_| before calling the // tab strip's |IsRectInWindowCaption()| for scrolling disabled. Defer to @@ -356,10 +321,6 @@ children.emplace_back(tab_search_container_.get()); } - if (product_specifications_button_) { - children.emplace_back(product_specifications_button_.get()); - } - if (reserved_grab_handle_space_) { children.emplace_back(reserved_grab_handle_space_.get()); } @@ -380,19 +341,20 @@ LayoutSuperclass<views::AccessiblePaneView>(this); if (tab_search_container_before_tab_strip) { - // Manually adjust x-axis position of the UI components. Currently the - // components are `tab_search_container_` and - // `product_specifications_button` if it's available. - if (product_specifications_button_) { - AdjustViewBoundsRect(product_specifications_button_, 0); - } + const gfx::Size tab_search_container_size = + tab_search_container_->GetPreferredSize(); - int product_specifications_button_width = - product_specifications_button_ - ? product_specifications_button_->GetPreferredSize().width() - : 0; - AdjustViewBoundsRect(tab_search_container_, - product_specifications_button_width); + // The TabSearchButton is calculated as controls padding away from the first + // tab (not including bottom corner radius) + const int x = tab_strip_container_->x() + + TabStyle::Get()->GetBottomCornerRadius() - + GetLayoutConstant(TAB_STRIP_PADDING) - + tab_search_container_size.width(); + + const gfx::Rect tab_search_new_bounds = + gfx::Rect(gfx::Point(x, 0), tab_search_container_size); + + tab_search_container_->SetBoundsRect(tab_search_new_bounds); } if (render_new_tab_button_over_tab_strip_ && new_tab_button_) { @@ -549,22 +511,15 @@ // The `tab_search_container_` is being laid out manually. tab_search_container_->GetProperty(views::kViewIgnoredByLayoutKey); - // When tab search container shows before tab strip, add a margin to the - // tab_strip_container_ to leave the correct amount of space for UI - // components showing before tab strip. Currently the components are - // `tab_search_container_` and `product_specifications_button` if it's - // available. - int product_specifications_button_width = - product_specifications_button_ - ? product_specifications_button_->GetPreferredSize().width() - : 0; - tab_strip_left_margin = tab_search_container_->GetPreferredSize().width() + - product_specifications_button_width; + // Add a margin to the tab_strip_container_ to leave the correct amount of + // space for the `tab_search_container_`. + const gfx::Size tab_search_container_size = + tab_search_container_->GetPreferredSize(); // The TabSearchContainer should be 6 pixels from the left and the tabstrip // should have 6 px of padding between it and the tab_search button (not // including the corner radius). - tab_strip_left_margin = tab_strip_left_margin.value() + + tab_strip_left_margin = tab_search_container_size.width() + GetLayoutConstant(TAB_STRIP_PADDING) + GetLayoutConstant(TAB_STRIP_PADDING) - TabStyle::Get()->GetBottomCornerRadius(); @@ -580,14 +535,5 @@ } } -void TabStripRegionView::AdjustViewBoundsRect(View* view, int offset) { - const gfx::Size view_size = view->GetPreferredSize(); - const int x = - tab_strip_container_->x() + TabStyle::Get()->GetBottomCornerRadius() - - GetLayoutConstant(TAB_STRIP_PADDING) - view_size.width() - offset; - const gfx::Rect new_bounds = gfx::Rect(gfx::Point(x, 0), view_size); - view->SetBoundsRect(new_bounds); -} - BEGIN_METADATA(TabStripRegionView) END_METADATA
diff --git a/chrome/browser/ui/views/frame/tab_strip_region_view.h b/chrome/browser/ui/views/frame/tab_strip_region_view.h index 5711102..6951cbfc 100644 --- a/chrome/browser/ui/views/frame/tab_strip_region_view.h +++ b/chrome/browser/ui/views/frame/tab_strip_region_view.h
@@ -20,7 +20,6 @@ class TabSearchButton; class TabStrip; class TabStripScrollContainer; -class ProductSpecificationsButton; // Container for the tabstrip and the other views sharing space with it - // with the exception of the caption buttons. @@ -47,10 +46,6 @@ TabSearchContainer* tab_search_container() { return tab_search_container_; } - ProductSpecificationsButton* product_specifications_button() { - return product_specifications_button_; - } - views::View* reserved_grab_handle_space_for_testing() { return reserved_grab_handle_space_; } @@ -92,8 +87,6 @@ views::View* GetTabStripContainerForTesting() { return tab_strip_container_; } private: - friend class ProductSpecificationsButtonBrowserTest; - // Updates the border padding for `new_tab_button_` and // `tab_search_container_`, if present. This should be called whenever any // input of the computation of the border's sizing changes. @@ -104,10 +97,6 @@ // `render_tab_search_before_tab_strip_` is true. void UpdateTabStripMargin(); - // Gets called on `Layout` and adjusts the x-axis position of the `view` based - // on `offset`. This should only used for views that show before tab strip. - void AdjustViewBoundsRect(View* view, int offset); - raw_ptr<views::View, AcrossTasksDanglingUntriaged> tab_strip_container_ = nullptr; raw_ptr<views::View, DanglingUntriaged> reserved_grab_handle_space_ = nullptr; @@ -117,8 +106,6 @@ raw_ptr<views::Button, DanglingUntriaged> new_tab_button_ = nullptr; raw_ptr<TabSearchContainer, DanglingUntriaged> tab_search_container_ = nullptr; - raw_ptr<ProductSpecificationsButton, DanglingUntriaged> - product_specifications_button_ = nullptr; // On some platforms for Chrome Refresh, the TabSearchButton should be // laid out before the TabStrip. Storing this configuration prevents
diff --git a/chrome/browser/ui/views/toolbar/app_menu.cc b/chrome/browser/ui/views/toolbar/app_menu.cc index eee57e09..c5eaa29 100644 --- a/chrome/browser/ui/views/toolbar/app_menu.cc +++ b/chrome/browser/ui/views/toolbar/app_menu.cc
@@ -1271,10 +1271,8 @@ void AppMenu::WillShowMenu(MenuItemView* menu) { if (menu == saved_tab_groups_menu_) { - if (!stg_everything_menu_) { - stg_everything_menu_ = + stg_everything_menu_ = std::make_unique<tab_groups::STGEverythingMenu>(nullptr, browser_); - } stg_everything_menu_->PopulateMenu(menu); } else if (menu == bookmark_menu_) { CreateBookmarkMenu();
diff --git a/chrome/browser/ui/webauthn/authenticator_dialog_browsertest.cc b/chrome/browser/ui/webauthn/authenticator_dialog_browsertest.cc index 771d879..2f1903d 100644 --- a/chrome/browser/ui/webauthn/authenticator_dialog_browsertest.cc +++ b/chrome/browser/ui/webauthn/authenticator_dialog_browsertest.cc
@@ -17,6 +17,7 @@ #include "chrome/browser/webauthn/authenticator_request_dialog_model.h" #include "chrome/browser/webauthn/enclave_manager.h" #include "chrome/browser/webauthn/enclave_manager_factory.h" +#include "chrome/browser/webauthn/webauthn_switches.h" #include "chrome/test/base/in_process_browser_test.h" #include "components/network_session_configurator/common/network_switches.h" #include "components/sync/base/features.h" @@ -908,9 +909,11 @@ void SetUpCommandLine(base::CommandLine* command_line) override { InProcessBrowserTest::SetUpCommandLine(command_line); command_line->AppendSwitch(switches::kIgnoreCertificateErrors); + command_line->AppendSwitchASCII(switches::kGaiaUrl, + https_server_.base_url().spec()); command_line->AppendSwitchASCII( - switches::kGaiaUrl, - https_server_.GetURL("accounts.google.com", "/").spec()); + webauthn::switches::kGpmPinResetReauthUrlSwitch, + https_server_.GetURL("/encryption/pin/reset").spec()); } void SetUpOnMainThread() override { @@ -947,7 +950,7 @@ new Map([["hw_protected", [{epoch: 1, key: new ArrayBuffer(32)}]]])); }); </script></head><body><p>Test MagicArch</p></body></html>)"); - } else if (path == "/embedded/xreauth/chrome") { + } else if (path == "/encryption/pin/reset") { response->set_code(net::HTTP_OK); response->set_content(R"(<html><head><title>Test Reauth</title> <script>
diff --git a/chrome/browser/ui/webauthn/authenticator_request_window.cc b/chrome/browser/ui/webauthn/authenticator_request_window.cc index 7d71d4cf..7ea33ed 100644 --- a/chrome/browser/ui/webauthn/authenticator_request_window.cc +++ b/chrome/browser/ui/webauthn/authenticator_request_window.cc
@@ -4,6 +4,7 @@ #include "chrome/browser/ui/webauthn/authenticator_request_window.h" +#include "base/command_line.h" #include "base/functional/bind.h" #include "base/functional/callback.h" #include "base/memory/weak_ptr.h" @@ -12,6 +13,7 @@ #include "chrome/browser/ui/browser_finder.h" #include "chrome/browser/ui/browser_window.h" #include "chrome/browser/webauthn/authenticator_request_dialog_model.h" +#include "chrome/browser/webauthn/webauthn_switches.h" #include "content/public/browser/navigation_handle.h" #include "content/public/browser/web_contents_observer.h" #include "google_apis/gaia/gaia_urls.h" @@ -22,6 +24,20 @@ namespace { +const char kGpmPinResetReauthUrl[] = + "https://passwords.google.com/encryption/pin/reset"; + +GURL GetGpmResetPinUrl() { + std::string command_line_url = + base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( + webauthn::switches::kGpmPinResetReauthUrlSwitch); + if (command_line_url.empty()) { + // Command line switch is not specified or is not a valid ASCII string. + return GURL(kGpmPinResetReauthUrl); + } + return GURL(command_line_url); +} + // This WebContents observer watches the WebView that shows a GAIA // reauthentication page. When that page navigates to a URL that includes the // resulting RAPT token, it invokes a callback with that token. @@ -131,8 +147,7 @@ break; case AuthenticatorRequestDialogModel::Step::kGPMReauthAccount: - // TODO(enclave): this isn't the correct URL, but it'll serve for now. - url = GaiaUrls::GetInstance()->reauth_url(); + url = GetGpmResetPinUrl(); reauth_observer_ = std::make_unique<ReauthWebContentsObserver>( web_contents.get(), url, // Unretained: `reauth_observer_` is owned by this object so if
diff --git a/chrome/browser/webauthn/webauthn_switches.cc b/chrome/browser/webauthn/webauthn_switches.cc index 4306bb4b..0d52a58 100644 --- a/chrome/browser/webauthn/webauthn_switches.cc +++ b/chrome/browser/webauthn/webauthn_switches.cc
@@ -12,4 +12,6 @@ const char kPermitEnterpriseAttestationOriginList[] = "webauthn-permit-enterprise-attestation"; +const char kGpmPinResetReauthUrlSwitch[] = "webauthn-gpm-pin-reset-reauth-url"; + } // namespace webauthn::switches
diff --git a/chrome/browser/webauthn/webauthn_switches.h b/chrome/browser/webauthn/webauthn_switches.h index a883002..bc621b7 100644 --- a/chrome/browser/webauthn/webauthn_switches.h +++ b/chrome/browser/webauthn/webauthn_switches.h
@@ -17,6 +17,9 @@ // creating a WebAuthn credential. extern const char kPermitEnterpriseAttestationOriginList[]; +// The reauth URL for changing the Password Manager PIN. +extern const char kGpmPinResetReauthUrlSwitch[]; + } // namespace webauthn::switches #endif // CHROME_BROWSER_WEBAUTHN_WEBAUTHN_SWITCHES_H_
diff --git a/chrome/browser/xsurface/android/java/src/org/chromium/chrome/browser/xsurface/StreamType.java b/chrome/browser/xsurface/android/java/src/org/chromium/chrome/browser/xsurface/StreamType.java index 03b017b..560705f 100644 --- a/chrome/browser/xsurface/android/java/src/org/chromium/chrome/browser/xsurface/StreamType.java +++ b/chrome/browser/xsurface/android/java/src/org/chromium/chrome/browser/xsurface/StreamType.java
@@ -15,7 +15,8 @@ StreamType.UNSPECIFIED, StreamType.FOR_YOU, StreamType.WEB_FEED, - StreamType.SINGLE_WEB_FEED + StreamType.SINGLE_WEB_FEED, + StreamType.SUPERVISED_USER_FEED }) @Retention(RetentionPolicy.SOURCE) public @interface StreamType { @@ -23,4 +24,5 @@ int FOR_YOU = 1; int WEB_FEED = 2; int SINGLE_WEB_FEED = 3; + int SUPERVISED_USER_FEED = 4; }
diff --git a/chrome/browser/xsurface/android/java/src/org/chromium/chrome/browser/xsurface/feed/FeedLaunchReliabilityLogger.java b/chrome/browser/xsurface/android/java/src/org/chromium/chrome/browser/xsurface/feed/FeedLaunchReliabilityLogger.java index e3d6d6f..bf9c8ff5 100644 --- a/chrome/browser/xsurface/android/java/src/org/chromium/chrome/browser/xsurface/feed/FeedLaunchReliabilityLogger.java +++ b/chrome/browser/xsurface/android/java/src/org/chromium/chrome/browser/xsurface/feed/FeedLaunchReliabilityLogger.java
@@ -29,7 +29,8 @@ StreamType.UNSPECIFIED, StreamType.FOR_YOU, StreamType.WEB_FEED, - StreamType.SINGLE_WEB_FEED + StreamType.SINGLE_WEB_FEED, + StreamType.SUPERVISED_USER_FEED }) @Retention(RetentionPolicy.SOURCE) @interface StreamType { @@ -37,13 +38,15 @@ int FOR_YOU = 1; int WEB_FEED = 2; int SINGLE_WEB_FEED = 3; + int SUPERVISED_USER_FEED = 4; } /** * Set details about the stream being launched and send any pending events. - * @param streamType Feed type (e.g. "for you" or "following"). + * + * @param streamType Feed type (e.g. "for you", "following" or "supervised user"). * @param streamId Identifier for the stream used to disambiguate events from concurrent - * streams. + * streams. */ default void sendPendingEvents( @org.chromium.chrome.browser.xsurface.feed.StreamType int streamType, int streamId) {}
diff --git a/chrome/browser/xsurface/android/java/src/org/chromium/chrome/browser/xsurface/feed/StreamType.java b/chrome/browser/xsurface/android/java/src/org/chromium/chrome/browser/xsurface/feed/StreamType.java index ea6647a..e788552 100644 --- a/chrome/browser/xsurface/android/java/src/org/chromium/chrome/browser/xsurface/feed/StreamType.java +++ b/chrome/browser/xsurface/android/java/src/org/chromium/chrome/browser/xsurface/feed/StreamType.java
@@ -9,12 +9,16 @@ import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; -/** Type of stream being launched (the "For you","Following", or "SingleWebFeed" feed). */ +/** + * Type of stream being launched (the "For you","Following", "SingleWebFeed", or "Supervised User" + * feed). + */ @IntDef({ StreamType.UNSPECIFIED, StreamType.FOR_YOU, StreamType.WEB_FEED, - StreamType.SINGLE_WEB_FEED + StreamType.SINGLE_WEB_FEED, + StreamType.SUPERVISED_USER_FEED }) @Retention(RetentionPolicy.SOURCE) public @interface StreamType { @@ -22,4 +26,5 @@ int FOR_YOU = 1; int WEB_FEED = 2; int SINGLE_WEB_FEED = 3; + int SUPERVISED_USER_FEED = 4; }
diff --git a/chrome/build/android-arm32.pgo.txt b/chrome/build/android-arm32.pgo.txt index b794177..0310836 100644 --- a/chrome/build/android-arm32.pgo.txt +++ b/chrome/build/android-arm32.pgo.txt
@@ -1 +1 @@ -chrome-android32-main-1713742736-a43df84fc3cd982ca5c9be715f38b66db5310542-2a6aba0081c720c97832a077700415a368fb2a26.profdata +chrome-android32-main-1713765581-a920c9bf2944d44d111f9be1590b199e08d977bc-bd7c80d505f82eb64d22d357ecaceeec80dc30a9.profdata
diff --git a/chrome/build/android-arm64.pgo.txt b/chrome/build/android-arm64.pgo.txt index f7fe900d..3d88e938 100644 --- a/chrome/build/android-arm64.pgo.txt +++ b/chrome/build/android-arm64.pgo.txt
@@ -1 +1 @@ -chrome-android64-main-1713722281-e8d174adb7ee0da5b95286a8b926c54c4c825f79-c5a57cf8b32f975e0599b0f1877afedcc4ddd530.profdata +chrome-android64-main-1713742736-28a7d76ad388283f061403b8b73e594a94abf8b9-2a6aba0081c720c97832a077700415a368fb2a26.profdata
diff --git a/chrome/build/lacros-arm64.pgo.txt b/chrome/build/lacros-arm64.pgo.txt index 56409b9..1456832 100644 --- a/chrome/build/lacros-arm64.pgo.txt +++ b/chrome/build/lacros-arm64.pgo.txt
@@ -1 +1 @@ -chrome-chromeos-arm64-generic-main-1713571112-15f2a29c1df7c1e547632bee7439b2ad3f639d1c-f5dc0130097d4f7180bd89f9e98ea0c2d191d52d.profdata +chrome-chromeos-arm64-generic-main-1713742736-d168b7a2b53fd1987b161c558390afec7411ef7a-2a6aba0081c720c97832a077700415a368fb2a26.profdata
diff --git a/chrome/build/lacros64.pgo.txt b/chrome/build/lacros64.pgo.txt index d33e8f9d..cec72d49 100644 --- a/chrome/build/lacros64.pgo.txt +++ b/chrome/build/lacros64.pgo.txt
@@ -1 +1 @@ -chrome-chromeos-amd64-generic-main-1713700547-9edfc621f2db77f3a3bb855f5d5d00c898eaba83-74b8e495e8abddcb8b7d62d8575b61f2feccc32d.profdata +chrome-chromeos-amd64-generic-main-1713742736-7e47b7b1b1d5fe3f9772151a099b511b1764d903-2a6aba0081c720c97832a077700415a368fb2a26.profdata
diff --git a/chrome/build/linux.pgo.txt b/chrome/build/linux.pgo.txt index e8debbc..46e0884d7 100644 --- a/chrome/build/linux.pgo.txt +++ b/chrome/build/linux.pgo.txt
@@ -1 +1 @@ -chrome-linux-main-1713700547-f6d42a9a89ce14a8c84cc8b03b0132842b47cbf7-74b8e495e8abddcb8b7d62d8575b61f2feccc32d.profdata +chrome-linux-main-1713765581-add4d3bc4a3a773aea2d7d9032be89ab542629e6-bd7c80d505f82eb64d22d357ecaceeec80dc30a9.profdata
diff --git a/chrome/build/win-arm64.pgo.txt b/chrome/build/win-arm64.pgo.txt index b6af9ec..854c9afd 100644 --- a/chrome/build/win-arm64.pgo.txt +++ b/chrome/build/win-arm64.pgo.txt
@@ -1 +1 @@ -chrome-win-arm64-main-1713742736-1ce54651d9f935be9fee88f5c1c4643abbf312ec-2a6aba0081c720c97832a077700415a368fb2a26.profdata +chrome-win-arm64-main-1713765581-5f8d5ea1f2c649bd8cf985fc8b7810acad857555-bd7c80d505f82eb64d22d357ecaceeec80dc30a9.profdata
diff --git a/chrome/build/win32.pgo.txt b/chrome/build/win32.pgo.txt index 9b26aa22..8cea27f 100644 --- a/chrome/build/win32.pgo.txt +++ b/chrome/build/win32.pgo.txt
@@ -1 +1 @@ -chrome-win32-main-1713730395-657ddeaabfe11c3b464acfba627dbbdf84a9b569-1c25e6d4af2829e693bbbd9b8e8c672acc767736.profdata +chrome-win32-main-1713765581-61e03b99577fed20a2194c759794fbba4df7a6cf-bd7c80d505f82eb64d22d357ecaceeec80dc30a9.profdata
diff --git a/chrome/build/win64.pgo.txt b/chrome/build/win64.pgo.txt index e5ee303..cd08e0f 100644 --- a/chrome/build/win64.pgo.txt +++ b/chrome/build/win64.pgo.txt
@@ -1 +1 @@ -chrome-win64-main-1713730395-207782a596203664da349d814fc0eca544d47d1f-1c25e6d4af2829e693bbbd9b8e8c672acc767736.profdata +chrome-win64-main-1713765581-bb0cbe9c007cde0b28b999445a0c62c07e06fc53-bd7c80d505f82eb64d22d357ecaceeec80dc30a9.profdata
diff --git a/chrome/common/channel_info_posix.cc b/chrome/common/channel_info_posix.cc index eb40d9f..51e8bae 100644 --- a/chrome/common/channel_info_posix.cc +++ b/chrome/common/channel_info_posix.cc
@@ -9,6 +9,7 @@ #include <string> #include "base/environment.h" +#include "base/notreached.h" #include "base/strings/strcat.h" #include "base/strings/string_piece.h" #include "base/strings/string_util.h" @@ -47,9 +48,6 @@ return {version_info::Channel::BETA, /*is_extended_stable=*/false}; if (env_str == "unstable") // linux version of "dev" return {version_info::Channel::DEV, /*is_extended_stable=*/false}; - if (env_str == "canary") { - return {version_info::Channel::CANARY, /*is_extended_stable=*/false}; - } #endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) return {version_info::Channel::UNKNOWN, /*is_extended_stable=*/false}; @@ -64,7 +62,8 @@ case version_info::Channel::UNKNOWN: return "unknown"; case version_info::Channel::CANARY: - return "canary"; + NOTREACHED(); + return "unknown"; case version_info::Channel::DEV: return "dev"; case version_info::Channel::BETA: @@ -98,8 +97,6 @@ #if BUILDFLAG(GOOGLE_CHROME_BRANDING) const auto channel_state = GetChannelImpl(); switch (channel_state.channel) { - case version_info::Channel::CANARY: - return "_CANARY"; case version_info::Channel::DEV: return "_DEV"; case version_info::Channel::BETA:
diff --git a/chrome/common/channel_info_unittest.cc b/chrome/common/channel_info_unittest.cc index 564ed7c6..7b8835c 100644 --- a/chrome/common/channel_info_unittest.cc +++ b/chrome/common/channel_info_unittest.cc
@@ -170,8 +170,8 @@ version_info::Channel::DEV, /*is_extended_stable=*/false, /*posix_data_dir_suffix=*/"-unstable"))); -#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || \ - BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || \ + BUILDFLAG(IS_FUCHSIA) // No canary channel on Linux. INSTANTIATE_TEST_SUITE_P( Canary, ChannelInfoTest, @@ -181,8 +181,7 @@ version_info::Channel::CANARY, /*is_extended_stable=*/false, /*posix_data_dir_suffix=*/""))); -#endif // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_FUCHSIA) || - // BUILDFLAG(IS_LINUX) +#endif // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) #else // BUILDFLAG(GOOGLE_CHROME_BRANDING) INSTANTIATE_TEST_SUITE_P( Chromium,
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index ba26c36..4e5567a 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc
@@ -747,19 +747,6 @@ const char kHelp[] = "help"; const char kHelpShort[] = "h"; -// Specifies which encryption storage backend to use. Possible values are -// kwallet, kwallet5, kwallet6, gnome-libsecret, basic. -// Any other value will lead to Chrome detecting the best backend automatically. -// TODO(crbug.com/40449930): Once PasswordStore no longer uses KWallet for -// storing passwords, rename this flag to stop referencing passwords. Do not -// rename it sooner, though; developers and testers might rely on it keeping -// large amounts of testing passwords out of their KWallets. -const char kPasswordStore[] = "password-store"; - -// Enables the feature of allowing the user to disable the backend via a -// setting. -const char kEnableEncryptionSelection[] = "enable-encryption-selection"; - // The same as the --class argument in X applications. Overrides the WM_CLASS // window property with the given value. const char kWmClass[] = "class";
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h index 781d416..37ae068 100644 --- a/chrome/common/chrome_switches.h +++ b/chrome/common/chrome_switches.h
@@ -234,8 +234,6 @@ #if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_CHROMEOS_ASH) extern const char kHelp[]; extern const char kHelpShort[]; -extern const char kPasswordStore[]; -extern const char kEnableEncryptionSelection[]; extern const char kWmClass[]; #endif
diff --git a/chrome/installer/linux/BUILD.gn b/chrome/installer/linux/BUILD.gn index a4472e52..d4294115 100644 --- a/chrome/installer/linux/BUILD.gn +++ b/chrome/installer/linux/BUILD.gn
@@ -226,7 +226,6 @@ group("linux") { deps = [ ":beta", - ":canary", ":stable", ":unstable", ] @@ -301,7 +300,6 @@ "$branding_dir_100/linux/product_logo_32.png", ] if (is_chrome_branded) { - # TODO(crbug.com/335306207): Add product logo for canary channel. sources += [ "$branding_dir/linux/product_logo_128_beta.png", "$branding_dir/linux/product_logo_128_dev.png", @@ -548,6 +546,3 @@ linux_package("unstable") { channel = "unstable" } -linux_package("canary") { - channel = "canary" -}
diff --git a/chrome/installer/linux/debian/build.sh b/chrome/installer/linux/debian/build.sh index 851755cb..7cd40b9c 100755 --- a/chrome/installer/linux/debian/build.sh +++ b/chrome/installer/linux/debian/build.sh
@@ -142,7 +142,7 @@ echo "usage: $(basename $0) [-a target_arch] -c channel -d branding" echo " [-f] [-o 'dir'] -s 'dir' -t target_os" echo "-a arch deb package architecture" - echo "-c channel the package channel (canary, unstable, beta, stable)" + echo "-c channel the package channel (unstable, beta, stable)" echo "-d brand either chromium or google_chrome" echo "-f indicates that this is an official build" echo "-h this help message" @@ -166,12 +166,6 @@ CHANNEL=unstable RELEASENOTES="https://chromereleases.googleblog.com/search/label/Dev%20updates" ;; - # Canary is released twice a day automatically, so no release notes - # attached. - canary ) - CHANNEL=canary - RELEASENOTES="N/A" - ;; * ) echo echo "ERROR: '$CHANNEL' is not a valid channel type."
diff --git a/chrome/installer/linux/rpm/build.sh b/chrome/installer/linux/rpm/build.sh index fdc61e7..3053be4 100755 --- a/chrome/installer/linux/rpm/build.sh +++ b/chrome/installer/linux/rpm/build.sh
@@ -130,7 +130,7 @@ echo "usage: $(basename $0) [-a target_arch] -c channel -d branding" echo " [-f] [-o 'dir'] -t target_os" echo "-a arch rpm package architecture" - echo "-c channel the package channel (canary, unstable, beta, stable)" + echo "-c channel the package channel (unstable, beta, stable)" echo "-d brand either chromium or google_chrome" echo "-f indicates that this is an official build" echo "-h this help message" @@ -150,9 +150,6 @@ testing|beta ) CHANNEL=beta ;; - canary ) - CHANNEL=canary - ;; * ) echo echo "ERROR: '$CHANNEL' is not a valid channel type."
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn index bbb6bb2..d75e310 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn
@@ -4177,7 +4177,6 @@ "../browser/ui/views/commerce/ntp_discount_consent_dialog_view_browsertest.cc", "../browser/ui/views/commerce/price_insights_icon_view_browsertest.cc", "../browser/ui/views/commerce/price_tracking_icon_view_browsertest.cc", - "../browser/ui/views/commerce/product_specifications_button_browsertest.cc", "../browser/ui/views/desktop_capture/desktop_media_picker_views_browsertest.cc", "../browser/ui/views/extensions/device_chooser_extension_browsertest.cc", "../browser/ui/views/extensions/extension_install_blocked_dialog_view_browsertest.cc", @@ -10106,7 +10105,6 @@ "../browser/ui/views/commerce/price_tracking_email_dialog_view_unittest.cc", "../browser/ui/views/commerce/price_tracking_icon_view_integration_test.cc", "../browser/ui/views/commerce/price_tracking_view_unittest.cc", - "../browser/ui/views/commerce/product_specifications_button_unittest.cc", "../browser/ui/views/confirm_bubble_views_unittest.cc", "../browser/ui/views/content_setting_bubble_contents_unittest.cc", "../browser/ui/views/content_setting_site_row_view_unittest.cc",
diff --git a/chrome/test/DEPS b/chrome/test/DEPS index 7e64b338..097cecf1 100644 --- a/chrome/test/DEPS +++ b/chrome/test/DEPS
@@ -69,6 +69,7 @@ "+components/os_crypt/sync", "+components/password_manager/content/browser", "+components/password_manager/content/common", + "+components/password_manager/core/browser", "+components/password_manager/core/common", "+components/performance_manager/public", "+components/permissions",
diff --git a/chrome/test/base/scoped_channel_override.h b/chrome/test/base/scoped_channel_override.h index 1b67c81..53f1e01 100644 --- a/chrome/test/base/scoped_channel_override.h +++ b/chrome/test/base/scoped_channel_override.h
@@ -32,8 +32,7 @@ kStable, kBeta, kDev, -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) || \ - BUILDFLAG(IS_LINUX) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_FUCHSIA) kCanary, #endif };
diff --git a/chrome/test/base/scoped_channel_override_posix.cc b/chrome/test/base/scoped_channel_override_posix.cc index 5a22866..1ad37a3 100644 --- a/chrome/test/base/scoped_channel_override_posix.cc +++ b/chrome/test/base/scoped_channel_override_posix.cc
@@ -45,8 +45,6 @@ return "beta"; case ScopedChannelOverride::Channel::kDev: return "unstable"; - case ScopedChannelOverride::Channel::kCanary: - return "canary"; } }
diff --git a/chrome/test/base/test_launcher_utils.cc b/chrome/test/base/test_launcher_utils.cc index bdaa5ca..8194a6453 100644 --- a/chrome/test/base/test_launcher_utils.cc +++ b/chrome/test/base/test_launcher_utils.cc
@@ -19,6 +19,7 @@ #include "chrome/common/chrome_switches.h" #include "chrome/common/url_constants.h" #include "components/os_crypt/sync/os_crypt_switches.h" +#include "components/password_manager/core/browser/password_manager_switches.h" #include "content/public/common/content_switches.h" #include "ui/display/display_switches.h" @@ -55,13 +56,14 @@ wm::switches::kWindowAnimationsDisabled); #endif -#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(IS_LINUX) // Don't use the native password stores on Linux since they may // prompt for additional UI during tests and cause test failures or // timeouts. Win, Mac and ChromeOS don't look at the kPasswordStore // switch. - if (!command_line->HasSwitch(switches::kPasswordStore)) - command_line->AppendSwitchASCII(switches::kPasswordStore, "basic"); + if (!command_line->HasSwitch(password_manager::kPasswordStore)) { + command_line->AppendSwitchASCII(password_manager::kPasswordStore, "basic"); + } #endif #if BUILDFLAG(IS_MAC)
diff --git a/chromeos/ash/services/ime/public/mojom/input_method.mojom b/chromeos/ash/services/ime/public/mojom/input_method.mojom index 767f7dd..fb58072 100644 --- a/chromeos/ash/services/ime/public/mojom/input_method.mojom +++ b/chromeos/ash/services/ime/public/mojom/input_method.mojom
@@ -6,7 +6,7 @@ // the Chromium repo. This file should be updated first, before syncing in the // other repos. -// Next MinVersion: 22 +// Next MinVersion: 23 module ash.ime.mojom; @@ -394,11 +394,87 @@ [MinVersion=6] bool default_to_full_width_punctuation@6; }; -// Next ordinal: 1 +// JapaneseSettings are preference values for the Japanese engine as stored +// in PrefService. The value names closely match how they are defined in prefs. +// Next ordinal: 14 [Stable] struct JapaneseSettings { + [Stable, Extensible] + enum InputMode { + [Default] kUnspecified = 0, + kRomaji = 1, + kKana = 2, + }; + + [Stable, Extensible] + enum PunctuationStyle { + [Default] kUnspecified = 0, + kKutenTouten = 1, + kCommaPeriod = 2, + kKutenPeriod = 3, + kCommaTouten = 4, + }; + + [Stable, Extensible] + enum SymbolStyle { + [Default] kUnspecified = 0, + kCornerBracketMiddleDot = 1, + kSquareBracketSlash = 2, + kCornerBracketSlash = 3, + kSquareBracketMiddleDot = 4, + }; + + [Stable, Extensible] + enum SpaceInputStyle { + [Default] kUnspecified = 0, + kInputMode = 1, + kFullWidth = 2, + kHalfWidth = 3, + }; + + [Stable, Extensible] + enum SelectionShortcut { + [Default] kUnspecified = 0, + kDigits123456789 = 1, + kAsdfghjkl = 2, + kNoShortcut = 3, + }; + + [Stable, Extensible] + enum KeymapStyle { + [Default] kUnspecified = 0, + kCustom = 1, + kAtok = 2, + kMsime = 3, + kKotoeri = 4, + kMobile = 5, + kChromeos = 6, + }; + + [Stable, Extensible] + enum ShiftKeyModeStyle { + [Default] kUnspecified = 0, + kOff = 1, + kAlphanumeric = 2, + kKatakana = 3, + }; + + // This is a legacy field that is no longer used. JpUnusedStruct unused@0; - // TODO(b/232341104): Add the Japanese user dictionary here. + + [MinVersion=22] InputMode input_mode@1; + [MinVersion=22] PunctuationStyle punctuation_style@2; + [MinVersion=22] SymbolStyle symbol_style@3; + [MinVersion=22] SpaceInputStyle space_input_style@4; + [MinVersion=22] SelectionShortcut selection_shortcut@5; + [MinVersion=22] KeymapStyle keymap_style@6; + [MinVersion=22] bool automatically_switch_to_halfwidth@7; + [MinVersion=22] ShiftKeyModeStyle shift_key_mode_style@8; + [MinVersion=22] bool use_input_history@9; + [MinVersion=22] bool use_system_dictionary@10; + [MinVersion=22] uint32 number_of_suggestions@11; + [MinVersion=22] bool disable_personalized_suggestions@12; + [MinVersion=22] bool automatically_send_statistics_to_google@13; }; // Next ordinal: 3
diff --git a/clank b/clank index 74e2bbf..71700ce 160000 --- a/clank +++ b/clank
@@ -1 +1 @@ -Subproject commit 74e2bbf3403910d0bf68bb221f5cdd390208f06a +Subproject commit 71700ce427b7af336a88a02a0767b1ee1af7512b
diff --git a/components/autofill/core/browser/address_data_manager.cc b/components/autofill/core/browser/address_data_manager.cc index 5b5d75e5..95dab16 100644 --- a/components/autofill/core/browser/address_data_manager.cc +++ b/components/autofill/core/browser/address_data_manager.cc
@@ -71,10 +71,10 @@ base::RepeatingClosure notify_pdm_observers, GeoIpCountryCode variation_country_code, const std::string& app_locale) - : notify_pdm_observers_(notify_pdm_observers), - variation_country_code_(std::move(variation_country_code)), + : variation_country_code_(std::move(variation_country_code)), webdata_service_(webdata_service), sync_service_(sync_service), + notify_pdm_observers_(std::move(notify_pdm_observers)), app_locale_(app_locale) { if (webdata_service_) { // The `webdata_service_` is null when the TestPDM is used. @@ -147,7 +147,7 @@ has_initial_load_finished_ = true; LogStoredDataMetrics(); } - notify_pdm_observers_.Run(); + NotifyObservers(); } std::vector<AutofillProfile*> AddressDataManager::GetProfiles( @@ -204,7 +204,7 @@ // TODO(crbug.com/1007974): This call is only used to notify tests to stop // waiting. Since no profile is added, this case shouldn't trigger // `OnPersonalDataChanged()`. - notify_pdm_observers_.Run(); + NotifyObservers(); return; } ongoing_profile_changes_[profile.guid()].emplace_back( @@ -265,7 +265,7 @@ ? &ongoing_profile_changes_[guid].back().first.data_model() : GetProfileByGUID(guid); if (!profile) { - notify_pdm_observers_.Run(); + NotifyObservers(); return; } @@ -544,6 +544,12 @@ return address_suggestion_strike_database_.get(); } +void AddressDataManager::NotifyObservers() { + if (!IsAwaitingPendingAddressChanges()) { + notify_pdm_observers_.Run(); + } +} + bool AddressDataManager::IsAutofillProfileEnabled() const { return prefs::IsAutofillProfileEnabled(pref_service_); } @@ -652,7 +658,7 @@ const AutofillProfile* existing_profile = GetProfileByGUID(profile.guid()); if (!existing_profile || existing_profile->EqualsForUpdatePurposes(profile)) { - notify_pdm_observers_.Run(); + NotifyObservers(); return; } } @@ -739,7 +745,7 @@ void AddressDataManager::OnProfileChangeDone(const std::string& guid) { ongoing_profile_changes_[guid].pop_front(); - notify_pdm_observers_.Run(); + NotifyObservers(); HandleNextProfileChange(guid); }
diff --git a/components/autofill/core/browser/address_data_manager.h b/components/autofill/core/browser/address_data_manager.h index 4a5755e..26c4e371 100644 --- a/components/autofill/core/browser/address_data_manager.h +++ b/components/autofill/core/browser/address_data_manager.h
@@ -322,8 +322,7 @@ virtual const AddressSuggestionStrikeDatabase* GetAddressSuggestionStrikeDatabase() const; - // TODO(b/322170538): Remove once the PDM observer is split. - base::RepeatingClosure notify_pdm_observers_; + void NotifyObservers(); // Tracks whether the first `LoadProfiles()` call has already finished. bool has_initial_load_finished_ = false; @@ -425,6 +424,9 @@ std::unique_ptr<AddressSuggestionStrikeDatabase> address_suggestion_strike_database_; + // TODO(b/322170538): Remove once the PDM observer is split. + base::RepeatingClosure notify_pdm_observers_; + const std::string app_locale_; base::WeakPtrFactory<AddressDataManager> weak_factory_{this};
diff --git a/components/autofill/core/browser/address_data_manager_unittest.cc b/components/autofill/core/browser/address_data_manager_unittest.cc index 6dab9bb..01876928 100644 --- a/components/autofill/core/browser/address_data_manager_unittest.cc +++ b/components/autofill/core/browser/address_data_manager_unittest.cc
@@ -7,12 +7,14 @@ #include <string> #include <vector> +#include "base/run_loop.h" +#include "base/test/gmock_callback_support.h" +#include "base/test/mock_callback.h" #include "base/test/scoped_feature_list.h" #include "base/test/with_feature_override.h" #include "build/buildflag.h" #include "components/autofill/core/browser/autofill_test_utils.h" #include "components/autofill/core/browser/data_model/autofill_profile.h" -#include "components/autofill/core/browser/personal_data_manager.h" #include "components/autofill/core/browser/personal_data_manager_test_base.h" #include "components/autofill/core/browser/profile_token_quality_test_api.h" #include "components/autofill/core/browser/test_autofill_clock.h" @@ -49,62 +51,63 @@ protected: void SetUp() override { SetUpTest(); - ResetPersonalDataManager(); + ResetAddressDataManager(); } void TearDown() override { TearDownTest(); } - ~AddressDataManagerTest() override { - if (personal_data_) { - personal_data_->Shutdown(); - } - personal_data_.reset(); + AddressDataManager& address_data_manager() { return *address_data_manager_; } + + void WaitForOnAddressDataChanged() { + base::RunLoop run_loop; + ON_CALL(on_address_data_changed_, Run) + .WillByDefault(base::test::RunClosure(run_loop.QuitClosure())); + run_loop.Run(); } - AddressDataManager& address_data_manager() { - return personal_data_->address_data_manager(); + void ResetAddressDataManager(bool use_sync_transport_mode = false) { + address_data_manager_.reset(); + MakePrimaryAccountAvailable(use_sync_transport_mode); + address_data_manager_ = std::make_unique<AddressDataManager>( + profile_database_service_, prefs_.get(), &sync_service_, + identity_test_env_.identity_manager(), strike_database_.get(), + on_address_data_changed_.Get(), GeoIpCountryCode("US"), "en-US"); + address_data_manager_->LoadProfiles(); + WaitForOnAddressDataChanged(); } - void ResetPersonalDataManager(bool use_sync_transport_mode = false) { - if (personal_data_) { - personal_data_->Shutdown(); - } - personal_data_ = std::make_unique<PersonalDataManager>("EN", "US"); - PersonalDataManagerTestBase::ResetPersonalDataManager( - use_sync_transport_mode, personal_data_.get()); - } - - // TODO(b/322170538): Rename. - void AddProfileToPersonalDataManager(const AutofillProfile& profile) { - PersonalDataChangedWaiter waiter(*personal_data_); + void AddProfileToAddressDataManager(const AutofillProfile& profile) { + // When trying to add a duplicate profile, observers are notified + // synchronously, which is why calling `WaitForOnAddressDataChanged()` + // after `AddProfile()` doesn't suffice. + base::RunLoop run_loop; + ON_CALL(on_address_data_changed_, Run) + .WillByDefault(base::test::RunClosure(run_loop.QuitClosure())); address_data_manager().AddProfile(profile); - std::move(waiter).Wait(); + run_loop.Run(); } - // TODO(b/322170538): Rename. - void UpdateProfileOnPersonalDataManager(const AutofillProfile& profile) { - PersonalDataChangedWaiter waiter(*personal_data_); + void UpdateProfileOnAddressDataManager(const AutofillProfile& profile) { + // Like in `AddProfileToAddressDataManager()`, observers are notified + // synchronously when trying to perform a no-op update. + base::RunLoop run_loop; + ON_CALL(on_address_data_changed_, Run) + .WillByDefault(base::test::RunClosure(run_loop.QuitClosure())); address_data_manager().UpdateProfile(profile); - std::move(waiter).Wait(); + run_loop.Run(); } - // TODO(b/322170538): Rename. - void RemoveByGUIDFromPersonalDataManager(const std::string& guid) { - PersonalDataChangedWaiter waiter(*personal_data_); - address_data_manager().RemoveProfile(guid); - std::move(waiter).Wait(); - } - - // TODO(b/322170538): Make this an `AddressDataManager`. - std::unique_ptr<PersonalDataManager> personal_data_; + private: + testing::NiceMock<base::MockRepeatingClosure> on_address_data_changed_; + std::unique_ptr<AddressDataManager> address_data_manager_; }; TEST_F(AddressDataManagerTest, AddProfile) { // Add profile0 to the database. AutofillProfile profile0(test::GetFullProfile()); profile0.SetRawInfo(EMAIL_ADDRESS, u"j@s.com"); - AddProfileToPersonalDataManager(profile0); + AddProfileToAddressDataManager(profile0); // Reload the database. - ResetPersonalDataManager(); + ResetAddressDataManager(); // Verify the addition. const std::vector<AutofillProfile*>& results1 = address_data_manager().GetProfiles(); @@ -115,10 +118,10 @@ AutofillProfile profile0a = profile0; profile0a.set_guid(base::Uuid::GenerateRandomV4().AsLowercaseString()); - AddProfileToPersonalDataManager(profile0a); + AddProfileToAddressDataManager(profile0a); // Reload the database. - ResetPersonalDataManager(); + ResetAddressDataManager(); // Verify the non-addition. const std::vector<AutofillProfile*>& results2 = @@ -134,10 +137,10 @@ // Add the different profile. This should save as a separate profile. // Note that if this same profile was "merged" it would collapse to one // profile with a multi-valued entry for email. - AddProfileToPersonalDataManager(profile1); + AddProfileToAddressDataManager(profile1); // Reload the database. - ResetPersonalDataManager(); + ResetAddressDataManager(); // Verify the addition. EXPECT_THAT(address_data_manager().GetProfiles(), @@ -148,7 +151,7 @@ TestAutofillClock test_clock; test_clock.SetNow(kArbitraryTime); AutofillProfile profile = test::GetFullProfile(); - AddProfileToPersonalDataManager(profile); + AddProfileToAddressDataManager(profile); ASSERT_THAT(address_data_manager().GetProfiles(), UnorderedElementsAre(Pointee(profile))); @@ -157,14 +160,14 @@ // `modification_date()`. test_clock.SetNow(kSomeLaterTime); profile.SetRawInfo(EMAIL_ADDRESS, u"new" + profile.GetRawInfo(EMAIL_ADDRESS)); - UpdateProfileOnPersonalDataManager(profile); + UpdateProfileOnAddressDataManager(profile); std::vector<AutofillProfile*> profiles = address_data_manager().GetProfiles(); ASSERT_THAT(profiles, UnorderedElementsAre(Pointee(profile))); EXPECT_EQ(profiles[0]->modification_date(), kSomeLaterTime); // If the profile hasn't change, expect that updating is a no-op. test_clock.SetNow(kMuchLaterTime); - UpdateProfileOnPersonalDataManager(profile); + UpdateProfileOnAddressDataManager(profile); profiles = address_data_manager().GetProfiles(); ASSERT_THAT(profiles, UnorderedElementsAre(Pointee(profile))); EXPECT_EQ(profiles[0]->modification_date(), kSomeLaterTime); @@ -180,10 +183,10 @@ kAccountProfile2.set_source_for_testing(AutofillProfile::Source::kAccount); AutofillProfile kLocalProfile = test::GetFullProfile(); - AddProfileToPersonalDataManager(kAccountProfile); - AddProfileToPersonalDataManager(kAccountProfile2); - AddProfileToPersonalDataManager(kLocalProfile); - ResetPersonalDataManager(); + AddProfileToAddressDataManager(kAccountProfile); + AddProfileToAddressDataManager(kAccountProfile2); + AddProfileToAddressDataManager(kLocalProfile); + ResetAddressDataManager(); EXPECT_THAT( address_data_manager().GetProfiles(), @@ -211,14 +214,14 @@ profile3.set_use_date(now - base::Hours(1)); profile3.set_use_count(1234); - AddProfileToPersonalDataManager(profile1); - AddProfileToPersonalDataManager(profile2); - AddProfileToPersonalDataManager(profile3); - ResetPersonalDataManager(); + AddProfileToAddressDataManager(profile1); + AddProfileToAddressDataManager(profile2); + AddProfileToAddressDataManager(profile3); + ResetAddressDataManager(); // kNone doesn't guarantee any order. EXPECT_THAT(address_data_manager().GetProfiles( - PersonalDataManager::ProfileOrder::kNone), + AddressDataManager::ProfileOrder::kNone), UnorderedElementsAre(Pointee(profile1), Pointee(profile2), Pointee(profile3))); @@ -226,12 +229,12 @@ // `profile1` and `profile2` have the same use count, so `profile2` with later // use date is second. EXPECT_THAT(address_data_manager().GetProfiles( - PersonalDataManager::ProfileOrder::kHighestFrecencyDesc), + AddressDataManager::ProfileOrder::kHighestFrecencyDesc), testing::ElementsAre(Pointee(profile3), Pointee(profile2), Pointee(profile1))); std::vector<AutofillProfile*> profiles = address_data_manager().GetProfiles( - PersonalDataManager::ProfileOrder::kMostRecentlyUsedFirstDesc); + AddressDataManager::ProfileOrder::kMostRecentlyUsedFirstDesc); // Ordered by `use_date()`. EXPECT_THAT(profiles, testing::ElementsAre(Pointee(profile2), Pointee(profile3), @@ -247,7 +250,7 @@ profiles[i]->set_modification_date(now - base::Hours(2 - i)); } EXPECT_THAT(address_data_manager().GetProfiles( - PersonalDataManager::ProfileOrder::kMostRecentlyModifiedDesc), + AddressDataManager::ProfileOrder::kMostRecentlyModifiedDesc), testing::ElementsAre(Pointee(profile1), Pointee(profile3), Pointee(profile2))); } @@ -261,11 +264,11 @@ test::SetProfileInfo(&local_profile, "Josephine", "Alicia", "Saenz", "joewayne@me.xyz", "Fox", "1212 Center.", "Bld. 5", "Orlando", "FL", "32801", "US", "19482937549"); - AddProfileToPersonalDataManager(local_profile); + AddProfileToAddressDataManager(local_profile); // Disable Profile autofill. prefs::SetAutofillProfileEnabled(prefs_.get(), false); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnAddressDataChanged(); // Check that profiles were saved. const size_t expected_profiles = 1; @@ -284,10 +287,10 @@ test::SetProfileInfo(&local_profile, "Josephine", "Alicia", "Saenz", "joewayne@me.xyz", "Fox", "1212 Center.", "Bld. 5", "Orlando", "FL", "32801", "US", "19482937549"); - AddProfileToPersonalDataManager(local_profile); + AddProfileToAddressDataManager(local_profile); address_data_manager().LoadProfiles(); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnAddressDataChanged(); // Expect that all profiles are suggested. const size_t expected_profiles = 1; @@ -298,7 +301,7 @@ // Disable Profile autofill. prefs::SetAutofillProfileEnabled(prefs_.get(), false); // Reload the database. - ResetPersonalDataManager(); + ResetAddressDataManager(); // Expect no profile values or suggestions were loaded. EXPECT_EQ(0U, address_data_manager().GetProfilesToSuggest().size()); @@ -308,7 +311,7 @@ // false. TEST_F(AddressDataManagerTest, GetProfilesToSuggest_NoProfilesAddedIfDisabled) { prefs::SetAutofillProfileEnabled(prefs_.get(), false); - AddProfileToPersonalDataManager(test::GetFullProfile()); + AddProfileToAddressDataManager(test::GetFullProfile()); EXPECT_TRUE(address_data_manager().GetProfiles().empty()); } @@ -321,13 +324,13 @@ AutofillProfile kAccountProfile = test::GetFullProfile(); kAccountProfile.set_source_for_testing(AutofillProfile::Source::kAccount); - AddProfileToPersonalDataManager(kAccountProfile); + AddProfileToAddressDataManager(kAccountProfile); AutofillProfile kLocalOrSyncableProfile = test::GetFullProfile2(); kLocalOrSyncableProfile.set_source_for_testing( AutofillProfile::Source::kLocalOrSyncable); test_clock.Advance(base::Minutes(123)); - AddProfileToPersonalDataManager(kLocalOrSyncableProfile); + AddProfileToAddressDataManager(kLocalOrSyncableProfile); EXPECT_THAT(address_data_manager().GetProfilesForSettings(), testing::ElementsAre(testing::Pointee(kLocalOrSyncableProfile), @@ -341,7 +344,7 @@ address_data_manager().AddProfile(profile); address_data_manager().RemoveProfile(profile.guid()); address_data_manager().UpdateProfile(profile); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnAddressDataChanged(); auto profiles = address_data_manager().GetProfiles(); ASSERT_EQ(0U, profiles.size()); @@ -349,7 +352,7 @@ address_data_manager().AddProfile(profile); address_data_manager().RemoveProfile(profile.guid()); address_data_manager().RemoveProfile(profile.guid()); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnAddressDataChanged(); profiles = address_data_manager().GetProfiles(); ASSERT_EQ(0U, profiles.size()); @@ -357,7 +360,7 @@ address_data_manager().AddProfile(profile); profile.SetRawInfo(EMAIL_ADDRESS, u"new@email.com"); address_data_manager().UpdateProfile(profile); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnAddressDataChanged(); profiles = address_data_manager().GetProfiles(); ASSERT_EQ(1U, profiles.size()); @@ -367,7 +370,7 @@ address_data_manager().UpdateProfile(profile); profile.SetRawInfo(EMAIL_ADDRESS, u"newest@email.com"); address_data_manager().UpdateProfile(profile); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnAddressDataChanged(); profiles = address_data_manager().GetProfiles(); ASSERT_EQ(1U, profiles.size()); @@ -383,10 +386,10 @@ // Add a profile to the database. AutofillProfile profile(test::GetFullProfile()); profile.SetRawInfo(EMAIL_ADDRESS, u"j@s.com"); - AddProfileToPersonalDataManager(profile); + AddProfileToAddressDataManager(profile); // Reload the database. - ResetPersonalDataManager(); + ResetAddressDataManager(); // Verify the addition. const std::vector<AutofillProfile*>& results = @@ -505,7 +508,7 @@ profiles.push_back(profile7); for (const AutofillProfile& profile : profiles) { - AddProfileToPersonalDataManager(profile); + AddProfileToAddressDataManager(profile); } ASSERT_EQ(profiles.size(), address_data_manager().GetProfiles().size()); for (size_t i = 0; i < profiles.size(); ++i) { @@ -531,7 +534,7 @@ AutofillProfile with_invalid = without_invalid; with_invalid.SetRawInfo(PHONE_HOME_WHOLE_NUMBER, u"Invalid_Phone_Number"); - AddProfileToPersonalDataManager(with_invalid); + AddProfileToAddressDataManager(with_invalid); ASSERT_EQ(1u, address_data_manager().GetProfiles().size()); AutofillProfile profile = *address_data_manager().GetProfiles()[0]; ASSERT_NE(without_invalid.GetRawInfo(PHONE_HOME_WHOLE_NUMBER), @@ -555,17 +558,17 @@ "Orlando", "FL", "32801", "US", "19482937549"); // Add two test profiles to the database. - AddProfileToPersonalDataManager(profile0); - AddProfileToPersonalDataManager(profile1); + AddProfileToAddressDataManager(profile0); + AddProfileToAddressDataManager(profile1); EXPECT_THAT(address_data_manager().GetProfiles(), UnorderedElementsAre(Pointee(profile0), Pointee(profile1))); // Update, remove, and add. profile0.SetRawInfo(NAME_FIRST, u"John"); - UpdateProfileOnPersonalDataManager(profile0); - RemoveByGUIDFromPersonalDataManager(profile1.guid()); - AddProfileToPersonalDataManager(profile2); + UpdateProfileOnAddressDataManager(profile0); + address_data_manager().RemoveProfile(profile1.guid()); + AddProfileToAddressDataManager(profile2); EXPECT_THAT(address_data_manager().GetProfiles(), UnorderedElementsAre(Pointee(profile0), Pointee(profile2))); @@ -573,7 +576,7 @@ // Reset the PersonalDataManager. This tests that the personal data was saved // to the web database, and that we can load the profiles from the web // database. - ResetPersonalDataManager(); + ResetAddressDataManager(); // Verify that we've loaded the profiles from the web database. EXPECT_THAT(address_data_manager().GetProfiles(), @@ -590,14 +593,14 @@ TestAutofillClock test_clock; test_clock.SetNow(kArbitraryTime); AutofillProfile profile = test::GetFullProfile(); - AddProfileToPersonalDataManager(profile); + AddProfileToAddressDataManager(profile); test_clock.SetNow(kSomeLaterTime); // Add an observation, as might happen during a form submit. test_api(profile.token_quality()) .AddObservation(NAME_FIRST, ProfileTokenQuality::ObservationType::kAccepted); - UpdateProfileOnPersonalDataManager(profile); + UpdateProfileOnAddressDataManager(profile); // Expect that `UpdateProfile()` didn't reject the update as a no-op. // Since new observations are considered a metadata change, further expected @@ -624,11 +627,11 @@ test_api(profile.token_quality()) .AddObservation(NAME_LAST, ProfileTokenQuality::ObservationType::kEditedFallback); - AddProfileToPersonalDataManager(profile); + AddProfileToAddressDataManager(profile); // Modify the NAME_FIRST and update the profile in the PDM. profile.SetRawInfo(NAME_FIRST, u"new " + profile.GetRawInfo(NAME_FIRST)); - UpdateProfileOnPersonalDataManager(profile); + UpdateProfileOnAddressDataManager(profile); // Expect that only the observations for NAME_LAST remain. profile = *address_data_manager().GetProfileByGUID(profile.guid()); @@ -658,10 +661,10 @@ TEST_F(AddressDataManagerTest, MigrateProfileToAccount) { const AutofillProfile kLocalProfile = test::GetFullProfile(); ASSERT_EQ(kLocalProfile.source(), AutofillProfile::Source::kLocalOrSyncable); - AddProfileToPersonalDataManager(kLocalProfile); + AddProfileToAddressDataManager(kLocalProfile); address_data_manager().MigrateProfileToAccount(kLocalProfile); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnAddressDataChanged(); const std::vector<AutofillProfile*> profiles = address_data_manager().GetProfiles(); @@ -686,7 +689,7 @@ ""); // Add the profile0 to the db. - AddProfileToPersonalDataManager(profile0); + AddProfileToAddressDataManager(profile0); // Verify that we've loaded the profiles from the web database. const std::vector<AutofillProfile*>& results2 = @@ -698,7 +701,7 @@ AutofillProfile profile1(i18n_model_definition::kLegacyHierarchyCountryCode); test::SetProfileInfo(&profile1, "z", "", "", "", "", "", "", "", "", "", "", ""); - AddProfileToPersonalDataManager(profile1); + AddProfileToAddressDataManager(profile1); // Make sure the two profiles have different GUIDs, both valid. const std::vector<AutofillProfile*>& results3 = @@ -715,12 +718,12 @@ ""); // Add the empty profile to the database. - AddProfileToPersonalDataManager(profile0); + AddProfileToAddressDataManager(profile0); // Reset the PersonalDataManager. This tests that the personal data was saved // to the web database, and that we can load the profiles from the web // database. - ResetPersonalDataManager(); + ResetAddressDataManager(); // Verify that we've loaded the profiles from the web database. ASSERT_EQ(0U, address_data_manager().GetProfiles().size()); @@ -738,8 +741,8 @@ "Orlando", "FL", "32801", "US", "19482937549"); // Add the test profiles to the database. - AddProfileToPersonalDataManager(profile0); - AddProfileToPersonalDataManager(profile1); + AddProfileToAddressDataManager(profile0); + AddProfileToAddressDataManager(profile1); EXPECT_THAT(address_data_manager().GetProfiles(), UnorderedElementsAre(Pointee(profile0), Pointee(profile1))); @@ -752,8 +755,7 @@ profile_database_service_->AddAutofillProfile(profile2); address_data_manager().LoadProfiles(); - - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnAddressDataChanged(); EXPECT_THAT(address_data_manager().GetProfiles(), UnorderedElementsAre(Pointee(profile0), Pointee(profile1), @@ -765,7 +767,7 @@ profile2.guid(), AutofillProfile::Source::kLocalOrSyncable); address_data_manager().LoadProfiles(); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnAddressDataChanged(); auto results = address_data_manager().GetProfiles(); ASSERT_EQ(1U, results.size()); @@ -775,7 +777,7 @@ profile_database_service_->UpdateAutofillProfile(profile0); address_data_manager().LoadProfiles(); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnAddressDataChanged(); results = address_data_manager().GetProfiles(); ASSERT_EQ(1U, results.size()); @@ -787,14 +789,14 @@ test::SetProfileInfo(&profile, "Marion", "Mitchell", "Morrison", "johnwayne@me.xyz", "Fox", "123 Zoo St.", "unit 5", "Hollywood", "CA", "91601", "US", "12345678910"); - AddProfileToPersonalDataManager(profile); + AddProfileToAddressDataManager(profile); // Make sure everything is set up correctly. EXPECT_EQ(1U, address_data_manager().GetProfiles().size()); EXPECT_EQ(1U, address_data_manager().GetProfiles().size()); profile.set_language_code("en"); - UpdateProfileOnPersonalDataManager(profile); + UpdateProfileOnAddressDataManager(profile); const std::vector<AutofillProfile*>& results = address_data_manager().GetProfiles(); @@ -823,8 +825,8 @@ base::Time newer_use_data = AutofillClock::Now(); more_recently_used_profile.set_use_date(newer_use_data); - AddProfileToPersonalDataManager(more_recently_used_profile); - AddProfileToPersonalDataManager(less_recently_used_profile); + AddProfileToAddressDataManager(more_recently_used_profile); + AddProfileToAddressDataManager(less_recently_used_profile); EXPECT_EQ(address_data_manager().GetProfiles().size(), 2U); @@ -836,7 +838,7 @@ less_recently_used_profile.guid()); // Set the updated profile to have a older use date than it's duplicate. updated_less_recently_used_profile.set_use_date(older_use_date); - UpdateProfileOnPersonalDataManager(updated_less_recently_used_profile); + UpdateProfileOnAddressDataManager(updated_less_recently_used_profile); // Verify that the less recently used profile was removed. ASSERT_EQ(address_data_manager().GetProfiles().size(), 1U); @@ -861,8 +863,8 @@ less_recently_used_profile.set_use_date(AutofillClock::Now()); more_recently_used_profile.set_use_date(AutofillClock::Now()); - AddProfileToPersonalDataManager(less_recently_used_profile); - AddProfileToPersonalDataManager(more_recently_used_profile); + AddProfileToAddressDataManager(less_recently_used_profile); + AddProfileToAddressDataManager(more_recently_used_profile); EXPECT_EQ(address_data_manager().GetProfiles().size(), 2U); @@ -876,11 +878,10 @@ test_clock.Advance(base::Days(1)); base::Time newer_use_data = AutofillClock::Now(); updated_more_recently_used_profile.set_use_date(newer_use_data); - PersonalDataChangedWaiter update_waiter(*personal_data_); // Expect an update and a deletion. This only triggers a single notification // once both operations have finished. address_data_manager().UpdateProfile(updated_more_recently_used_profile); - std::move(update_waiter).Wait(); + WaitForOnAddressDataChanged(); // Verify that less recently used profile was removed. ASSERT_EQ(address_data_manager().GetProfiles().size(), 1U); @@ -898,11 +899,11 @@ ASSERT_EQ(profile.use_count(), 1u); ASSERT_EQ(profile.use_date(), kArbitraryTime); ASSERT_EQ(profile.modification_date(), kArbitraryTime); - AddProfileToPersonalDataManager(profile); + AddProfileToAddressDataManager(profile); test_clock.SetNow(kSomeLaterTime); address_data_manager().RecordUseOf(profile); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnAddressDataChanged(); AutofillProfile* adm_profile = address_data_manager().GetProfileByGUID(profile.guid()); @@ -1106,7 +1107,7 @@ INSTANTIATE_FEATURE_OVERRIDE_TEST_SUITE(AddressDataManagerExplicitSigninTest); TEST_F(AddressDataManagerTest, AutofillSyncToggleAvailableInTransportMode) { - ResetPersonalDataManager( + ResetAddressDataManager( /*use_sync_transport_mode=*/true); base::test::ScopedFeatureList feature_list; feature_list.InitWithFeatures( @@ -1117,16 +1118,14 @@ const CoreAccountInfo& account = sync_service_.GetAccountInfo(); identity_test_env_.SimulateSuccessfulFetchOfAccountInfo( account.account_id, account.email, account.gaia, - /*hosted_domain=*/"", "Full Name", "Given Name", - personal_data_->app_locale(), /*picture_url=*/""); + /*hosted_domain=*/"", "Full Name", "Given Name", "en-US", + /*picture_url=*/""); prefs_->SetBoolean(::prefs::kExplicitBrowserSignin, true); - EXPECT_TRUE( - personal_data_->address_data_manager().IsAutofillSyncToggleAvailable()); + EXPECT_TRUE(address_data_manager().IsAutofillSyncToggleAvailable()); prefs_->SetBoolean(::prefs::kExplicitBrowserSignin, false); - EXPECT_FALSE( - personal_data_->address_data_manager().IsAutofillSyncToggleAvailable()); + EXPECT_FALSE(address_data_manager().IsAutofillSyncToggleAvailable()); } #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
diff --git a/components/autofill/core/browser/payments_data_manager.cc b/components/autofill/core/browser/payments_data_manager.cc index b1431b6..738d1f9d 100644 --- a/components/autofill/core/browser/payments_data_manager.cc +++ b/components/autofill/core/browser/payments_data_manager.cc
@@ -275,13 +275,13 @@ GeoIpCountryCode variations_country_code, const std::string& app_locale, base::RepeatingClosure notify_pdm_observers) - : notify_pdm_observers_(notify_pdm_observers), - image_fetcher_(image_fetcher), + : image_fetcher_(image_fetcher), shared_storage_handler_(std::move(shared_storage_handler)), sync_service_(sync_service), identity_manager_(identity_manager), variations_country_code_(std::move(variations_country_code)), - app_locale_(app_locale) { + app_locale_(app_locale), + notify_pdm_observers_(std::move(notify_pdm_observers)) { database_helper_ = std::make_unique<PaymentsDatabaseHelper>( this, profile_database, account_database); SetPrefService(pref_service); @@ -446,7 +446,7 @@ PaymentsDataCleaner(this).CleanupPaymentsData(); } - notify_pdm_observers_.Run(); + NotifyObservers(); } CoreAccountInfo PaymentsDataManager::GetAccountInfoForPaymentsServer() const { @@ -863,6 +863,12 @@ base::Unretained(this))); } +void PaymentsDataManager::NotifyObservers() { + if (!HasPendingPaymentQueries()) { + notify_pdm_observers_.Run(); + } +} + bool PaymentsDataManager::IsCardEligibleForBenefits( const CreditCard& card) const { return (card.issuer_id() == kAmexCardIssuerId &&
diff --git a/components/autofill/core/browser/payments_data_manager.h b/components/autofill/core/browser/payments_data_manager.h index 4238c22..84bd327f 100644 --- a/components/autofill/core/browser/payments_data_manager.h +++ b/components/autofill/core/browser/payments_data_manager.h
@@ -491,6 +491,8 @@ void SetPrefService(PrefService* pref_service); + void NotifyObservers(); + // Stores the PaymentsCustomerData obtained from the database. std::unique_ptr<PaymentsCustomerData> payments_customer_data_; @@ -544,9 +546,6 @@ // True if personal data has been loaded from the web database. bool is_payments_data_loaded_ = false; - // TODO(b/322170538): Remove once the PDM observer is split. - base::RepeatingClosure notify_pdm_observers_; - private: // Triggered when all the card art image fetches have been completed, // regardless of whether all of them succeeded. @@ -622,6 +621,9 @@ // Stores the |app_locale| supplied on construction. const std::string app_locale_; + // TODO(b/322170538): Remove once the PDM observer is split. + base::RepeatingClosure notify_pdm_observers_; + // The PrefService that this instance uses to read and write preferences. // Must outlive this instance. raw_ptr<PrefService> pref_service_ = nullptr;
diff --git a/components/autofill/core/browser/payments_data_manager_unittest.cc b/components/autofill/core/browser/payments_data_manager_unittest.cc index 4eb83fb..83175388 100644 --- a/components/autofill/core/browser/payments_data_manager_unittest.cc +++ b/components/autofill/core/browser/payments_data_manager_unittest.cc
@@ -23,6 +23,7 @@ #include "base/test/gmock_callback_support.h" #include "base/test/gtest_util.h" #include "base/test/metrics/histogram_tester.h" +#include "base/test/mock_callback.h" #include "base/test/scoped_feature_list.h" #include "base/test/task_environment.h" #include "base/time/time.h" @@ -37,7 +38,6 @@ #include "components/autofill/core/browser/metrics/autofill_metrics.h" #include "components/autofill/core/browser/metrics/payments/mandatory_reauth_metrics.h" #include "components/autofill/core/browser/payments_data_manager_test_api.h" -#include "components/autofill/core/browser/personal_data_manager.h" #include "components/autofill/core/browser/personal_data_manager_test_base.h" #include "components/autofill/core/browser/test_autofill_clock.h" #include "components/autofill/core/browser/ui/autofill_image_fetcher_base.h" @@ -111,24 +111,27 @@ protected: PaymentsDataManagerHelper() = default; - virtual ~PaymentsDataManagerHelper() { - if (personal_data_) { - personal_data_->Shutdown(); - } - personal_data_.reset(); + void ResetPaymentsDataManager(bool use_sync_transport_mode = false) { + payments_data_manager_.reset(); + MakePrimaryAccountAvailable(use_sync_transport_mode); + payments_data_manager_ = std::make_unique<PaymentsDataManager>( + profile_database_service_, account_database_service_, + /*image_fetcher=*/nullptr, /*shared_storage_handler=*/nullptr, + prefs_.get(), &sync_service_, identity_test_env_.identity_manager(), + GeoIpCountryCode("US"), "en-US", on_payments_data_changed_.Get()); + payments_data_manager_->Refresh(); + WaitForOnPaymentsDataChanged(); } - void ResetPersonalDataManager(bool use_sync_transport_mode = false) { - if (personal_data_) { - personal_data_->Shutdown(); - } - personal_data_ = std::make_unique<PersonalDataManager>("EN", "US"); - PersonalDataManagerTestBase::ResetPersonalDataManager( - use_sync_transport_mode, personal_data_.get()); + void WaitForOnPaymentsDataChanged() { + base::RunLoop run_loop; + ON_CALL(on_payments_data_changed_, Run) + .WillByDefault(base::test::RunClosure(run_loop.QuitClosure())); + run_loop.Run(); } PaymentsDataManager& payments_data_manager() { - return personal_data_->payments_data_manager(); + return *payments_data_manager_; } bool TurnOnSyncFeature() { @@ -141,7 +144,7 @@ .IsSyncFeatureEnabledForPaymentsServerMetrics(); } - // Adds three local cards to the |personal_data_|. The three cards are + // Adds three local cards to the `payments_data_manager_`. The three cards are // different: two are from different companies and the third doesn't have a // number. All three have different owners and credit card number. This allows // to test the suggestions based on name as well as on credit card number. @@ -172,9 +175,8 @@ test::SetCreditCardInfo(&credit_card2, "Bonnie Parker", "5105105105105100" /* Mastercard */, "12", "2999", "1"); - PersonalDataChangedWaiter waiter(*personal_data_); payments_data_manager().AddCreditCard(credit_card2); - std::move(waiter).Wait(); + WaitForOnPaymentsDataChanged(); ASSERT_EQ(3U, payments_data_manager().GetCreditCards().size()); } @@ -190,11 +192,8 @@ masked_server_card.set_server_id("masked_id"); masked_server_card.SetNetworkForMaskedCard(kVisaCard); masked_server_card.set_use_count(15); - { - PersonalDataChangedWaiter waiter(*personal_data_); - test_api(payments_data_manager()).AddServerCreditCard(masked_server_card); - std::move(waiter).Wait(); - } + test_api(payments_data_manager()).AddServerCreditCard(masked_server_card); + WaitForOnPaymentsDataChanged(); ASSERT_EQ(1U, payments_data_manager().GetCreditCards().size()); CreditCard local_card; @@ -204,11 +203,8 @@ local_card.set_guid("00000000-0000-0000-0000-000000000009"); local_card.set_record_type(CreditCard::RecordType::kLocalCard); local_card.set_use_count(5); - { - PersonalDataChangedWaiter waiter(*personal_data_); - payments_data_manager().AddCreditCard(local_card); - std::move(waiter).Wait(); - } + payments_data_manager().AddCreditCard(local_card); + WaitForOnPaymentsDataChanged(); ASSERT_EQ(2U, payments_data_manager().GetCreditCards().size()); } @@ -219,11 +215,9 @@ : account_autofill_table_.get(); } - // TODO(b/322170538): Rename. - void RemoveByGUIDFromPersonalDataManager(const std::string& guid) { - PersonalDataChangedWaiter waiter(*personal_data_); + void RemoveByGUIDFromPaymentsDataManager(const std::string& guid) { payments_data_manager().RemoveByGUID(guid); - std::move(waiter).Wait(); + WaitForOnPaymentsDataChanged(); } void SetServerCards(const std::vector<CreditCard>& server_cards) { @@ -238,7 +232,7 @@ void AddLocalIban(Iban& iban) { iban.set_identifier( Iban::Guid(payments_data_manager().AddAsLocalIban(iban))); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); iban.set_record_type(Iban::kLocalIban); } @@ -248,7 +242,9 @@ GetServerDataTable()->SetCreditCardBenefits(credit_card_benefits); } - std::unique_ptr<PersonalDataManager> personal_data_; + private: + testing::NiceMock<base::MockRepeatingClosure> on_payments_data_changed_; + std::unique_ptr<PaymentsDataManager> payments_data_manager_; }; class MockAutofillImageFetcher : public AutofillImageFetcherBase { @@ -266,7 +262,7 @@ protected: void SetUp() override { SetUpTest(); - ResetPersonalDataManager(); + ResetPaymentsDataManager(); } void TearDown() override { TearDownTest(); } }; @@ -277,7 +273,7 @@ protected: void SetUp() override { SetUpTest(); - ResetPersonalDataManager( + ResetPaymentsDataManager( /*use_sync_transport_mode=*/true); } void TearDown() override { TearDownTest(); } @@ -291,12 +287,12 @@ GetServerDataTable()->SetServerIbansForTesting({server_iban1, server_iban2}); std::vector<const Iban*> expected_ibans = {&server_iban1, &server_iban2}; payments_data_manager().Refresh(); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); ExpectSameElements(expected_ibans, payments_data_manager().GetServerIbans()); - // Reset the PersonalDataManager. This tests that the personal data was saved + // Reset the PaymentsDataManager. This tests that the personal data was saved // to the web database, and that we can load the IBANs from the web database. - ResetPersonalDataManager(); + ResetPaymentsDataManager(); // Verify that we've reloaded the IBANs from the web database. ExpectSameElements(expected_ibans, payments_data_manager().GetServerIbans()); @@ -318,7 +314,7 @@ GetServerDataTable()->SetServerIbansForTesting({server_iban1, server_iban2}); payments_data_manager().Refresh(); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); std::vector<const Iban*> all_ibans = {&local_iban1, &local_iban2, &server_iban1, &server_iban2}; @@ -349,7 +345,7 @@ GetServerDataTable()->SetServerIbansForTesting({server_iban1, server_iban2}); payments_data_manager().Refresh(); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); std::vector<const Iban*> ibans_to_suggest = {&server_iban1, &server_iban2, &local_iban2}; @@ -374,7 +370,7 @@ // identical to `iban2`. AddLocalIban(iban1); AddLocalIban(iban2); - // Do not add `PersonalDataChangedWaiter(*personal_data_).Wait()` for this + // Do not add `WaitForOnPaymentsDataChanged()` for this // `AddAsLocalIban` operation, as it will be terminated prematurely for // `iban2_with_different_nickname` due to the presence of an IBAN with the // same value. @@ -405,7 +401,7 @@ iban.set_value(std::u16string(test::kIbanValue16)); payments_data_manager().AddAsLocalIban(iban); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); // Adding an IBAN permanently enables the pref. EXPECT_TRUE(payments_data_manager().IsAutofillHasSeenIbanPrefEnabled()); } @@ -423,7 +419,7 @@ // Update the `iban` with new value. iban.SetRawInfo(IBAN_VALUE, u"GB98 MIDL 0700 9312 3456 78"); payments_data_manager().UpdateIban(iban); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); ibans = {&iban}; ExpectSameElements(ibans, payments_data_manager().GetLocalIbans()); @@ -431,7 +427,7 @@ // Update the `iban` with new nickname. iban.set_nickname(u"Another nickname"); payments_data_manager().UpdateIban(iban); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); ibans = {&iban}; ExpectSameElements(ibans, payments_data_manager().GetLocalIbans()); @@ -447,11 +443,11 @@ std::vector<const Iban*> ibans = {&iban}; ExpectSameElements(ibans, payments_data_manager().GetLocalIbans()); - RemoveByGUIDFromPersonalDataManager(iban.guid()); + RemoveByGUIDFromPaymentsDataManager(iban.guid()); EXPECT_TRUE(payments_data_manager().GetLocalIbans().empty()); // Verify that removal of a GUID that doesn't exist won't crash. - // `RemoveByGUIDFromPersonalDataManager()` can't be used, since it try + // `RemoveByGUIDFromPaymentsDataManager()` can't be used, since it try // waiting for the removal to complete. payments_data_manager().RemoveByGUID(iban.guid()); } @@ -475,7 +471,7 @@ // Use `local_iban`, then verify usage stats. EXPECT_EQ(payments_data_manager().GetLocalIbans().size(), 1u); payments_data_manager().RecordUseOfIban(local_iban); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); histogram_tester.ExpectTotalCount( "Autofill.DaysSinceLastUse.StoredIban.Local", 1); EXPECT_EQ(local_iban.use_count(), 2u); @@ -494,7 +490,7 @@ EXPECT_EQ(server_iban.modification_date(), kArbitraryTime); GetServerDataTable()->SetServerIbansForTesting({server_iban}); payments_data_manager().Refresh(); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); // Set the current time to sometime later. test_clock.SetNow(kSomeLaterTime); @@ -502,7 +498,7 @@ // Use `server_iban`, then verify usage stats. EXPECT_EQ(payments_data_manager().GetServerIbans().size(), 1u); payments_data_manager().RecordUseOfIban(server_iban); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); histogram_tester.ExpectTotalCount( "Autofill.DaysSinceLastUse.StoredIban.Server", 1); EXPECT_EQ(server_iban.use_count(), 2u); @@ -534,7 +530,7 @@ payments_data_manager().AddCreditCard(credit_card0); payments_data_manager().AddCreditCard(credit_card1); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); std::vector<CreditCard*> cards; cards.push_back(&credit_card0); @@ -545,20 +541,20 @@ credit_card0.SetRawInfo(CREDIT_CARD_NAME_FULL, u"Joe"); credit_card0.SetNickname(u"new card zero"); payments_data_manager().UpdateCreditCard(credit_card0); - RemoveByGUIDFromPersonalDataManager(credit_card1.guid()); + RemoveByGUIDFromPaymentsDataManager(credit_card1.guid()); payments_data_manager().AddCreditCard(credit_card2); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); cards.clear(); cards.push_back(&credit_card0); cards.push_back(&credit_card2); ExpectSameElements(cards, payments_data_manager().GetCreditCards()); - // Reset the PersonalDataManager. This tests that the personal data was saved + // Reset the PaymentsDataManager. This tests that the personal data was saved // to the web database, and that we can load the credit cards from the web // database. - ResetPersonalDataManager(); + ResetPaymentsDataManager(); // Verify that we've loaded the credit cards from the web database. cards.clear(); @@ -575,7 +571,7 @@ credit_card3.SetNetworkForMaskedCard(kVisaCard); test_api(payments_data_manager()).AddServerCreditCard(credit_card3); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); cards.push_back(&credit_card3); ExpectSameElements(cards, payments_data_manager().GetCreditCards()); @@ -607,11 +603,11 @@ ASSERT_EQ(card.use_date(), kArbitraryTime); ASSERT_EQ(card.modification_date(), kArbitraryTime); payments_data_manager().AddCreditCard(card); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); test_clock.SetNow(kSomeLaterTime); payments_data_manager().RecordUseOfCard(&card); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); CreditCard* pdm_card = payments_data_manager().GetCreditCardByGUID(card.guid()); @@ -628,16 +624,14 @@ CreditCard credit_card = test::GetCreditCard(); const std::u16string kCvc = u"111"; credit_card.set_cvc(kCvc); - PersonalDataChangedWaiter add_waiter(*personal_data_); payments_data_manager().AddCreditCard(credit_card); - std::move(add_waiter).Wait(); + WaitForOnPaymentsDataChanged(); ASSERT_EQ(payments_data_manager().GetLocalCreditCards().size(), 1U); EXPECT_EQ(payments_data_manager().GetLocalCreditCards()[0]->cvc(), kCvc); const std::u16string kNewCvc = u"222"; - PersonalDataChangedWaiter update_waiter(*personal_data_); payments_data_manager().UpdateLocalCvc(credit_card.guid(), kNewCvc); - std::move(update_waiter).Wait(); + WaitForOnPaymentsDataChanged(); ASSERT_EQ(payments_data_manager().GetLocalCreditCards().size(), 1U); EXPECT_EQ(payments_data_manager().GetLocalCreditCards()[0]->cvc(), kNewCvc); } @@ -652,7 +646,7 @@ EXPECT_DEATH_IF_SUPPORTED(payments_data_manager().AddServerCvc(1, u""), ""); payments_data_manager().AddServerCvc(credit_card.instrument_id(), kCvc); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); ASSERT_EQ(payments_data_manager().GetCreditCards().size(), 1U); EXPECT_EQ(payments_data_manager().GetCreditCards()[0]->cvc(), kCvc); @@ -666,11 +660,11 @@ const std::u16string kNewCvc = u"222"; payments_data_manager().UpdateServerCvc(credit_card.instrument_id(), kNewCvc); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); EXPECT_EQ(payments_data_manager().GetCreditCards()[0]->cvc(), kNewCvc); payments_data_manager().RemoveServerCvc(credit_card.instrument_id()); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); ASSERT_EQ(payments_data_manager().GetCreditCards().size(), 1U); EXPECT_TRUE(payments_data_manager().GetCreditCards()[0]->cvc().empty()); } @@ -682,13 +676,13 @@ CreditCard credit_card = test::GetMaskedServerCard(); SetServerCards({credit_card}); payments_data_manager().AddServerCvc(credit_card.instrument_id(), kCvc); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); ASSERT_EQ(payments_data_manager().GetCreditCards().size(), 1U); EXPECT_EQ(payments_data_manager().GetCreditCards()[0]->cvc(), kCvc); // After we clear server cvcs we should expect empty cvc. payments_data_manager().ClearServerCvcs(); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); EXPECT_TRUE(payments_data_manager().GetCreditCards()[0]->cvc().empty()); } @@ -706,7 +700,7 @@ payments_data_manager().AddCreditCard(credit_card); // Reload the database. - ResetPersonalDataManager(); + ResetPaymentsDataManager(); // Verify the addition. const std::vector<CreditCard*>& results = @@ -770,7 +764,7 @@ payments_data_manager().SetCreditCards(&cards); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); ASSERT_EQ(cards.size(), payments_data_manager().GetCreditCards().size()); for (size_t i = 0; i < cards.size(); ++i) { @@ -796,7 +790,7 @@ CreditCard card = test::GetMaskedServerCardVisa(); card.set_server_id("server id"); test_api(payments_data_manager()).AddServerCreditCard(card); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); ASSERT_EQ(1u, payments_data_manager().GetCreditCards().size()); EXPECT_TRUE(payments_data_manager().GetCreditCardByServerId("server id")); @@ -811,7 +805,7 @@ // Add the data to the database. payments_data_manager().AddCreditCard(credit_card); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); EXPECT_THAT(payments_data_manager().GetCreditCards(), testing::UnorderedElementsAre(Pointee(credit_card))); @@ -829,7 +823,7 @@ // Try to update with data changed as well. credit_card.SetRawInfo(CREDIT_CARD_NAME_FULL, u"Joe"); payments_data_manager().UpdateCreditCard(credit_card); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); EXPECT_THAT(payments_data_manager().GetCreditCards(), testing::UnorderedElementsAre(Pointee(credit_card))); @@ -863,10 +857,10 @@ payments_data_manager().AddCreditCard(credit_card4); payments_data_manager().AddCreditCard(credit_card5); - // Reset the PersonalDataManager. This tests that the personal data was saved + // Reset the PaymentsDataManager. This tests that the personal data was saved // to the web database, and that we can load the credit cards from the web // database. - ResetPersonalDataManager(); + ResetPaymentsDataManager(); std::vector<CreditCard*> cards; cards.push_back(&credit_card0); @@ -888,10 +882,10 @@ // Note: no refresh here. - // Reset the PersonalDataManager. This tests that the personal data was saved + // Reset the PaymentsDataManager. This tests that the personal data was saved // to the web database, and that we can load the credit cards from the web // database. - ResetPersonalDataManager(); + ResetPaymentsDataManager(); // Verify that we've loaded the credit cards from the web database. ASSERT_EQ(0U, payments_data_manager().GetCreditCards().size()); @@ -925,8 +919,8 @@ /*is_expired=*/false)); // Only the active offer for example.com should be returned. - EXPECT_EQ(1U, personal_data_ - ->GetActiveAutofillPromoCodeOffersForOrigin( + EXPECT_EQ(1U, payments_data_manager() + .GetActiveAutofillPromoCodeOffersForOrigin( GURL("http://www.example.com")) .size()); } @@ -969,8 +963,8 @@ AddOfferDataForTest(test::GetPromoCodeOfferData( /*origin=*/GURL("http://www.example.com"))); - ASSERT_EQ(1U, personal_data_ - ->GetActiveAutofillPromoCodeOffersForOrigin( + ASSERT_EQ(1U, payments_data_manager() + .GetActiveAutofillPromoCodeOffersForOrigin( GURL("http://www.example.com")) .size()); @@ -978,8 +972,8 @@ /*sync_everything=*/false, syncer::UserSelectableTypeSet()); // Should not return the offer as the wallet import pref is disabled. - EXPECT_EQ(0U, personal_data_ - ->GetActiveAutofillPromoCodeOffersForOrigin( + EXPECT_EQ(0U, payments_data_manager() + .GetActiveAutofillPromoCodeOffersForOrigin( GURL("http://www.example.com")) .size()); } @@ -995,8 +989,8 @@ prefs::SetAutofillPaymentMethodsEnabled(prefs_.get(), false); // Should not return the offer as the autofill credit card pref is disabled. - EXPECT_EQ(0U, personal_data_ - ->GetActiveAutofillPromoCodeOffersForOrigin( + EXPECT_EQ(0U, payments_data_manager() + .GetActiveAutofillPromoCodeOffersForOrigin( GURL("http://www.example.com")) .size()); } @@ -1045,7 +1039,7 @@ // Make sure everything is set up correctly. payments_data_manager().Refresh(); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); EXPECT_EQ(5U, payments_data_manager().GetCreditCards().size()); std::vector<CreditCard*> card_to_suggest = @@ -1089,7 +1083,7 @@ // Make sure everything is set up correctly. payments_data_manager().Refresh(); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); EXPECT_EQ(4U, payments_data_manager().GetCreditCards().size()); std::vector<CreditCard*> card_to_suggest = @@ -1133,11 +1127,11 @@ SetServerCards(server_cards); payments_data_manager().Refresh(); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); // Disable Credit card autofill. prefs::SetAutofillPaymentMethodsEnabled(prefs_.get(), false); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); // Check that profiles were saved. EXPECT_EQ(5U, payments_data_manager().GetCreditCards().size()); @@ -1174,7 +1168,7 @@ SetServerCards(server_cards); payments_data_manager().Refresh(); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); // Expect 5 autofilled values or suggestions. EXPECT_EQ(5U, payments_data_manager().GetCreditCards().size()); @@ -1182,7 +1176,7 @@ // Disable Credit card autofill. prefs::SetAutofillPaymentMethodsEnabled(prefs_.get(), false); // Reload the database. - ResetPersonalDataManager(); + ResetPaymentsDataManager(); // Expect no credit card values or suggestions were loaded. EXPECT_EQ(0U, payments_data_manager().GetCreditCardsToSuggest().size()); @@ -1366,7 +1360,7 @@ payments_data_manager().DeleteLocalCreditCards(cards); // Wait for the data to be refreshed. - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); EXPECT_EQ(1U, payments_data_manager().GetCreditCards().size()); @@ -1386,7 +1380,7 @@ payments_data_manager().DeleteAllLocalCreditCards(); // Wait for the data to be refreshed. - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); // Expect the local credit cards to have been deleted. EXPECT_EQ(0U, payments_data_manager().GetLocalCreditCards().size()); @@ -1439,13 +1433,13 @@ SetServerCards(server_cards); payments_data_manager().Refresh(); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); ASSERT_EQ(4U, payments_data_manager().GetCreditCards().size()); // Reload the database, which will log the stored profile counts. base::HistogramTester histogram_tester; - ResetPersonalDataManager(); + ResetPaymentsDataManager(); ASSERT_EQ(4U, payments_data_manager().GetCreditCards().size()); @@ -1481,7 +1475,7 @@ // Set no sync service. payments_data_manager().SetSyncServiceForTest(nullptr); payments_data_manager().Refresh(); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); // No sync service is the same as payments integration being disabled, i.e. // IsAutofillWalletImportEnabled() returning false. Only local credit @@ -1515,7 +1509,7 @@ // Switch to persistent storage. sync_service_.SetHasSyncConsent(true); payments_data_manager().OnStateChanged(&sync_service_); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); EXPECT_EQ(0U, payments_data_manager().GetServerCreditCards().size()); @@ -1528,7 +1522,7 @@ server_card.set_server_id("server_id"); server_card.SetNetworkForMaskedCard(kVisaCard); test_api(payments_data_manager()).AddServerCreditCard(server_card); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); EXPECT_EQ(1U, payments_data_manager().GetServerCreditCards().size()); @@ -1536,7 +1530,7 @@ // original card. sync_service_.SetHasSyncConsent(false); payments_data_manager().OnStateChanged(&sync_service_); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); ASSERT_EQ(1U, payments_data_manager().GetServerCreditCards().size()); EXPECT_EQ(u"3456", @@ -1561,7 +1555,7 @@ server_card.set_use_count(15); payments_data_manager().UpdateServerCardsMetadata({server_card}); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); // Expect that the server card is stored in the account autofill table. std::vector<std::unique_ptr<CreditCard>> cards; @@ -1579,7 +1573,7 @@ local_card.set_use_date(AutofillClock::Now() - base::Days(5)); payments_data_manager().AddCreditCard(local_card); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); // Expect that the local card is stored in the profile autofill table. profile_autofill_table_->GetCreditCards(&cards); @@ -1669,7 +1663,7 @@ local_card.set_record_type(CreditCard::RecordType::kLocalCard); local_card.set_use_count(5); payments_data_manager().AddCreditCard(local_card); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); EXPECT_EQ(1U, payments_data_manager().GetCreditCards().size()); // Sign in. @@ -1703,7 +1697,7 @@ "5105105105105100" /* Mastercard */, "04", "1999", "1"); payments_data_manager().AddCreditCard(credit_card); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); // Turn off payments sync. syncer::UserSelectableTypeSet user_selectable_type_set = @@ -1717,7 +1711,7 @@ ASSERT_EQ(1U, payments_data_manager().GetCreditCards().size()); // Reload the personal data manager. - ResetPersonalDataManager(); + ResetPaymentsDataManager(); // The credit card should still exist. ASSERT_EQ(1U, payments_data_manager().GetCreditCards().size()); @@ -1734,14 +1728,14 @@ const std::u16string server_cvc = u"111"; SetServerCards({server_card}); payments_data_manager().AddServerCvc(server_card.instrument_id(), server_cvc); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); // Add a local card and its CVC. CreditCard local_card = test::GetCreditCard(); const std::u16string local_cvc = u"999"; local_card.set_cvc(local_cvc); payments_data_manager().AddCreditCard(local_card); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); ASSERT_EQ(payments_data_manager().GetLocalCreditCards().size(), 1U); ASSERT_EQ(payments_data_manager().GetServerCreditCards().size(), 1U); @@ -1752,7 +1746,7 @@ // Clear out all the CVCs (local + server). payments_data_manager().ClearLocalCvcs(); payments_data_manager().ClearServerCvcs(); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); EXPECT_TRUE(payments_data_manager().GetServerCreditCards()[0]->cvc().empty()); EXPECT_TRUE(payments_data_manager().GetLocalCreditCards()[0]->cvc().empty()); } @@ -1765,7 +1759,8 @@ const CreditCardBenefitBase::LinkedCardInstrumentId instrument_id_for_flat_rate_benefit = flat_rate_benefit.linked_card_instrument_id(); - personal_data_->AddCreditCardBenefitForTest(std::move(flat_rate_benefit)); + payments_data_manager().AddCreditCardBenefitForTest( + std::move(flat_rate_benefit)); CreditCardCategoryBenefit category_benefit = test::GetActiveCreditCardCategoryBenefit(); @@ -1775,7 +1770,8 @@ const CreditCardCategoryBenefit::BenefitCategory benefit_category_for_category_benefit = category_benefit.benefit_category(); - personal_data_->AddCreditCardBenefitForTest(std::move(category_benefit)); + payments_data_manager().AddCreditCardBenefitForTest( + std::move(category_benefit)); CreditCardMerchantBenefit merchant_benefit = test::GetActiveCreditCardMerchantBenefit(); @@ -1784,7 +1780,8 @@ merchant_benefit.linked_card_instrument_id(); url::Origin merchant_origin_for_merchant_benefit = *merchant_benefit.merchant_domains().begin(); - personal_data_->AddCreditCardBenefitForTest(std::move(merchant_benefit)); + payments_data_manager().AddCreditCardBenefitForTest( + std::move(merchant_benefit)); // Match getter results with the search criteria. EXPECT_TRUE(payments_data_manager().IsAutofillPaymentMethodsEnabled()); @@ -1837,7 +1834,8 @@ const CreditCardBenefitBase::LinkedCardInstrumentId instrument_id_for_flat_rate_benefit = flat_rate_benefit.linked_card_instrument_id(); - personal_data_->AddCreditCardBenefitForTest(std::move(flat_rate_benefit)); + payments_data_manager().AddCreditCardBenefitForTest( + std::move(flat_rate_benefit)); CreditCardCategoryBenefit category_benefit = test::GetActiveCreditCardCategoryBenefit(); @@ -1848,7 +1846,8 @@ const CreditCardCategoryBenefit::BenefitCategory benefit_category_for_category_benefit = category_benefit.benefit_category(); - personal_data_->AddCreditCardBenefitForTest(std::move(category_benefit)); + payments_data_manager().AddCreditCardBenefitForTest( + std::move(category_benefit)); CreditCardMerchantBenefit merchant_benefit = test::GetActiveCreditCardMerchantBenefit(); @@ -1858,7 +1857,8 @@ merchant_benefit.linked_card_instrument_id(); url::Origin merchant_origin_for_merchant_benefit = *merchant_benefit.merchant_domains().begin(); - personal_data_->AddCreditCardBenefitForTest(std::move(merchant_benefit)); + payments_data_manager().AddCreditCardBenefitForTest( + std::move(merchant_benefit)); // Should not return any benefits as no benefit is currently active. EXPECT_FALSE(payments_data_manager().GetFlatRateBenefitByInstrumentId( @@ -1884,7 +1884,8 @@ const CreditCardBenefitBase::LinkedCardInstrumentId instrument_id_for_flat_rate_benefit = flat_rate_benefit.linked_card_instrument_id(); - personal_data_->AddCreditCardBenefitForTest(std::move(flat_rate_benefit)); + payments_data_manager().AddCreditCardBenefitForTest( + std::move(flat_rate_benefit)); CreditCardCategoryBenefit category_benefit = test::GetActiveCreditCardCategoryBenefit(); @@ -1895,7 +1896,8 @@ const CreditCardCategoryBenefit::BenefitCategory benefit_category_for_category_benefit = category_benefit.benefit_category(); - personal_data_->AddCreditCardBenefitForTest(std::move(category_benefit)); + payments_data_manager().AddCreditCardBenefitForTest( + std::move(category_benefit)); CreditCardMerchantBenefit merchant_benefit = test::GetActiveCreditCardMerchantBenefit(); @@ -1905,7 +1907,8 @@ merchant_benefit.linked_card_instrument_id(); url::Origin merchant_origin_for_merchant_benefit = *merchant_benefit.merchant_domains().begin(); - personal_data_->AddCreditCardBenefitForTest(std::move(merchant_benefit)); + payments_data_manager().AddCreditCardBenefitForTest( + std::move(merchant_benefit)); // Should not return any benefits as all of the benefits are expired. EXPECT_FALSE(payments_data_manager().GetFlatRateBenefitByInstrumentId( @@ -1931,17 +1934,17 @@ {bank_account1, bank_account2})); std::vector<BankAccount> bank_accounts = payments_data_manager().GetMaskedBankAccounts(); - // Since the PersonalDataManager was initialized before adding the masked + // Since the PaymentsDataManager was initialized before adding the masked // bank accounts to the WebDatabase, we expect GetMaskedBankAccounts to return // an empty list. EXPECT_EQ(0u, bank_accounts.size()); - // Refresh the PersonalDataManager. Under normal circumstances with the flag + // Refresh the PaymentsDataManager. Under normal circumstances with the flag // on, this step would load the bank accounts from the WebDatabase. payments_data_manager().Refresh(); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); - // Verify that no bank accounts are loaded into PersonalDataManager because + // Verify that no bank accounts are loaded into PaymentsDataManager because // the experiment is turned off. bank_accounts = payments_data_manager().GetMaskedBankAccounts(); EXPECT_EQ(0u, bank_accounts.size()); @@ -1957,12 +1960,12 @@ // We need to call `Refresh()` to ensure that the BankAccounts are loaded // again from the WebDatabase. payments_data_manager().Refresh(); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); // Disable payment methods prefs. prefs::SetAutofillPaymentMethodsEnabled(prefs_.get(), false); - // Verify that no bank accounts are loaded into PersonalDataManager because + // Verify that no bank accounts are loaded into PaymentsDataManager because // the AutofillPaymentMethodsEnabled pref is set to false. EXPECT_THAT(payments_data_manager().GetMaskedBankAccounts(), testing::IsEmpty()); @@ -1976,7 +1979,7 @@ ASSERT_TRUE(GetServerDataTable()->SetMaskedBankAccounts( {bank_account1, bank_account2})); - // Since the PersonalDataManager was initialized before adding the masked + // Since the PaymentsDataManager was initialized before adding the masked // bank accounts to the WebDatabase, we expect GetMaskedBankAccounts to return // an empty list. std::vector<BankAccount> bank_accounts = @@ -1986,7 +1989,7 @@ // We need to call `Refresh()` to ensure that the BankAccounts are loaded // again from the WebDatabase. payments_data_manager().Refresh(); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); bank_accounts = payments_data_manager().GetMaskedBankAccounts(); EXPECT_EQ(2u, bank_accounts.size()); @@ -2013,8 +2016,8 @@ // We need to call `Refresh()` to ensure that the BankAccounts are loaded // again from the WebDatabase which triggers the call to fetch icons from // image fetcher. - personal_data_->Refresh(); - PersonalDataChangedWaiter(*personal_data_).Wait(); + payments_data_manager().Refresh(); + WaitForOnPaymentsDataChanged(); } #endif // BUILDFLAG(IS_ANDROID) @@ -2031,7 +2034,7 @@ ASSERT_EQ(0U, test_api(payments_data_manager()).GetCreditCardBenefitsCount()); prefs::SetPaymentCardBenefits(prefs_.get(), true); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); // Verify that the card benefits are loaded from the web database. ASSERT_EQ(card_benefits.size(), @@ -2048,7 +2051,7 @@ SetCreditCardBenefits(card_benefits); // Refresh to load the card benefits from the web database. payments_data_manager().Refresh(); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); ASSERT_EQ(card_benefits.size(), test_api(payments_data_manager()).GetCreditCardBenefitsCount()); @@ -2081,7 +2084,7 @@ // Refresh to load the card benefits from the web database. Make sure no card // benefits are saved to PaymentsDataManager. payments_data_manager().Refresh(); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); ASSERT_EQ(0u, test_api(payments_data_manager()).GetCreditCardBenefitsCount()); // Ensure no card benefits are returned. @@ -2119,7 +2122,7 @@ // PaymentsDataManager::FetchImagesForUrls() does not get triggered when // PaymentsDataManager::GetCachedCardArtImageForUrl() is called. gfx::Image* cached_image = - personal_data_->payments_data_manager().GetCachedCardArtImageForUrl( + payments_data_manager().GetCachedCardArtImageForUrl( GURL("https://www.example.com")); ASSERT_TRUE(cached_image); EXPECT_TRUE(gfx::test::AreImagesEqual(expected_image, *cached_image)); @@ -2148,7 +2151,7 @@ CreditCard card = test::GetMaskedServerCardVisa(); card.set_server_id("card_server_id"); test_api(payments_data_manager()).AddServerCreditCard(card); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); card.set_server_id("card_server_id"); card.set_card_art_url(GURL("https://www.example.com/card1")); @@ -2210,7 +2213,7 @@ prefs::SetAutofillPaymentMethodsEnabled(prefs_.get(), true); prefs::SetPaymentCardBenefits(prefs_.get(), IsBenefitsPrefTurnedOn()); base::HistogramTester histogram_tester; - ResetPersonalDataManager(); + ResetPaymentsDataManager(); if (!AreAmericanExpressBenefitsEnabled() && !AreCapitalOneBenefitsEnabled()) { histogram_tester.ExpectTotalCount( "Autofill.PaymentMethods.CardBenefitsIsEnabled.Startup", 0); @@ -2227,7 +2230,7 @@ LogIsCreditCardBenefitsEnabledAtStartup_PaymentMethodsDisabled) { prefs::SetAutofillPaymentMethodsEnabled(prefs_.get(), false); base::HistogramTester histogram_tester; - ResetPersonalDataManager(); + ResetPaymentsDataManager(); histogram_tester.ExpectTotalCount( "Autofill.PaymentMethods.CardBenefitsIsEnabled.Startup", 0); } @@ -2266,7 +2269,7 @@ payments_data_manager().AddCreditCard(credit_card); // Make sure everything is set up correctly. - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); EXPECT_EQ(1U, payments_data_manager().GetCreditCards().size()); CreditCard new_verified_card = credit_card; @@ -2277,7 +2280,7 @@ payments_data_manager().OnAcceptedLocalCreditCardSave(new_verified_card); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); // Expect that the saved credit card is updated. const std::vector<CreditCard*>& results = @@ -2298,7 +2301,7 @@ iban0.set_record_type(Iban::kLocalIban); // Make sure everything is set up correctly. - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); EXPECT_EQ(1U, payments_data_manager().GetLocalIbans().size()); // Creates a new IBAN and call `OnAcceptedLocalIbanSave()` and verify that @@ -2306,7 +2309,7 @@ Iban iban1; iban1.set_value(base::UTF8ToUTF16(std::string(test::kIbanValue_1))); guid = payments_data_manager().OnAcceptedLocalIbanSave(iban1); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); iban1.set_identifier(Iban::Guid(guid)); iban1.set_record_type(Iban::kLocalIban); @@ -2324,11 +2327,11 @@ Iban iban2 = iban0; iban2.set_nickname(u"Nickname 2"); payments_data_manager().OnAcceptedLocalIbanSave(iban2); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); // Updates the nickname for `iban1` and call `OnAcceptedLocalIbanSave()`. iban1.set_nickname(u"Nickname 1 updated"); payments_data_manager().OnAcceptedLocalIbanSave(iban1); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); ibans.clear(); ibans.push_back(&iban1); @@ -2344,10 +2347,10 @@ payments_data_manager().OnAcceptedLocalIbanSave(iban1); ExpectSameElements(ibans, payments_data_manager().GetLocalIbans()); - // Reset the PersonalDataManager. This tests that the IBANs are persisted + // Reset the PaymentsDataManager. This tests that the IBANs are persisted // in the local web database even if the browser is re-loaded, ensuring that // the user can load the IBANs from the local web database on browser startup. - ResetPersonalDataManager(); + ResetPaymentsDataManager(); ExpectSameElements(ibans, payments_data_manager().GetLocalIbans()); } @@ -2363,7 +2366,7 @@ // Make sure everything is set up correctly. payments_data_manager().Refresh(); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); EXPECT_EQ(1U, payments_data_manager().GetCreditCards().size()); CreditCard cardToCompare; @@ -2381,7 +2384,7 @@ // Make sure everything is set up correctly. payments_data_manager().Refresh(); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); EXPECT_EQ(1U, payments_data_manager().GetCreditCards().size()); CreditCard cardToCompare; @@ -2399,7 +2402,7 @@ // Make sure everything is set up correctly. payments_data_manager().Refresh(); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); EXPECT_EQ(1U, payments_data_manager().GetCreditCards().size()); CreditCard cardToCompare; @@ -2417,7 +2420,7 @@ // Make sure everything is set up correctly. payments_data_manager().Refresh(); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); EXPECT_EQ(1U, payments_data_manager().GetCreditCards().size()); CreditCard cardToCompare; @@ -2444,7 +2447,7 @@ // Make sure everything is set up correctly. payments_data_manager().Refresh(); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); EXPECT_EQ(2U, payments_data_manager().GetCreditCards().size()); CreditCard cardToCompare; @@ -2466,7 +2469,7 @@ // Make sure everything is set up correctly. payments_data_manager().Refresh(); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); EXPECT_EQ(1U, payments_data_manager().GetCreditCards().size()); ASSERT_TRUE(payments_data_manager().IsServerCard(&masked_card)); @@ -2482,7 +2485,7 @@ // Make sure everything is set up correctly. payments_data_manager().Refresh(); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); EXPECT_EQ(1U, payments_data_manager().GetCreditCards().size()); ASSERT_FALSE(payments_data_manager().IsServerCard(&local_card)); @@ -2509,7 +2512,7 @@ server_cards.back().SetNetworkForMaskedCard(kAmericanExpressCard); SetServerCards(server_cards); payments_data_manager().Refresh(); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); // Make sure the function returns true. EXPECT_TRUE(payments_data_manager().ShouldShowCardsFromAccountOption()); @@ -2532,13 +2535,13 @@ // false. SetServerCards({}); payments_data_manager().Refresh(); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); EXPECT_FALSE(payments_data_manager().ShouldShowCardsFromAccountOption()); // Re-set some server cards. Check that the function now returns true. SetServerCards(server_cards); payments_data_manager().Refresh(); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); EXPECT_TRUE(payments_data_manager().ShouldShowCardsFromAccountOption()); // Set that the user enabled the sync feature. Check that the function now @@ -2576,7 +2579,7 @@ server_cards.back().SetNetworkForMaskedCard(kMasterCard); SetServerCards(server_cards); payments_data_manager().Refresh(); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); // Make sure the function returns false. EXPECT_FALSE(payments_data_manager().ShouldShowCardsFromAccountOption()); @@ -2599,13 +2602,13 @@ // returns false. SetServerCards({}); payments_data_manager().Refresh(); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); EXPECT_FALSE(payments_data_manager().ShouldShowCardsFromAccountOption()); // Re-set some server cards. Check that the function still returns false. SetServerCards(server_cards); payments_data_manager().Refresh(); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); EXPECT_FALSE(payments_data_manager().ShouldShowCardsFromAccountOption()); // Set that the user enabled the sync feature. Check that the function still @@ -2852,7 +2855,7 @@ } // Test that -// `PersonalDataManager::ShouldShowPaymentMethodsMandatoryReauthPromo()` +// `PaymentsDataManager::ShouldShowPaymentMethodsMandatoryReauthPromo()` // only returns that we should show the promo when we are below the max counter // limit for showing the promo. TEST_F( @@ -2889,7 +2892,7 @@ } // Test that -// `PersonalDataManager::ShouldShowPaymentMethodsMandatoryReauthPromo()` +// `PaymentsDataManager::ShouldShowPaymentMethodsMandatoryReauthPromo()` // returns that we should not show the promo if the user already opted in. TEST_F(PaymentsDataManagerTest, ShouldShowPaymentMethodsMandatoryReauthPromo_UserOptedInAlready) { @@ -2917,7 +2920,7 @@ } // Test that -// `PersonalDataManager::ShouldShowPaymentMethodsMandatoryReauthPromo()` +// `PaymentsDataManager::ShouldShowPaymentMethodsMandatoryReauthPromo()` // returns that we should not show the promo if the user has already opted out. TEST_F(PaymentsDataManagerTest, ShouldShowPaymentMethodsMandatoryReauthPromo_UserOptedOut) { @@ -2943,7 +2946,7 @@ } // Test that -// `PersonalDataManager::ShouldShowPaymentMethodsMandatoryReauthPromo()` +// `PaymentsDataManager::ShouldShowPaymentMethodsMandatoryReauthPromo()` // returns that we should not show the promo if the flag is off. TEST_F(PaymentsDataManagerTest, ShouldShowPaymentMethodsMandatoryReauthPromo_FlagOff) { @@ -2965,7 +2968,7 @@ // Add the credit card to the database. bool is_saved = payments_data_manager().SaveCardLocallyIfNew(credit_card); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); // Expect that the credit card was saved. EXPECT_TRUE(is_saved); @@ -2986,7 +2989,7 @@ // Add the credit card to the database. payments_data_manager().AddCreditCard(credit_card); - PersonalDataChangedWaiter(*personal_data_).Wait(); + WaitForOnPaymentsDataChanged(); EXPECT_EQ(1U, payments_data_manager().GetCreditCards().size()); // Create a new credit card with the same card number but different detailed
diff --git a/components/autofill/core/browser/personal_data_manager_test_base.cc b/components/autofill/core/browser/personal_data_manager_test_base.cc index 127f1b9..9e5d937 100644 --- a/components/autofill/core/browser/personal_data_manager_test_base.cc +++ b/components/autofill/core/browser/personal_data_manager_test_base.cc
@@ -66,9 +66,8 @@ OSCryptMocker::TearDown(); } -void PersonalDataManagerTestBase::ResetPersonalDataManager( - bool use_sync_transport_mode, - PersonalDataManager* personal_data) { +void PersonalDataManagerTestBase::MakePrimaryAccountAvailable( + bool use_sync_transport_mode) { std::string email = use_sync_transport_mode ? kSyncTransportAccountEmail : kPrimaryAccountEmail; // Set the account in both IdentityManager and SyncService. @@ -94,7 +93,12 @@ #endif sync_service_.SetAccountInfo(account_info); sync_service_.SetHasSyncConsent(!use_sync_transport_mode); +} +void PersonalDataManagerTestBase::ResetPersonalDataManager( + bool use_sync_transport_mode, + PersonalDataManager* personal_data) { + MakePrimaryAccountAvailable(use_sync_transport_mode); PersonalDataChangedWaiter waiter(*personal_data); personal_data->Init( profile_database_service_, account_database_service_, prefs_.get(),
diff --git a/components/autofill/core/browser/personal_data_manager_test_base.h b/components/autofill/core/browser/personal_data_manager_test_base.h index 9591317..cb3da11 100644 --- a/components/autofill/core/browser/personal_data_manager_test_base.h +++ b/components/autofill/core/browser/personal_data_manager_test_base.h
@@ -34,6 +34,13 @@ void SetUpTest(); void TearDownTest(); + // Signs in through the `identity_test_env_` and makes the primary account + // info available to the `sync_service_`. Depending on + // `use_sync_transport_mode`, sync-the-feature is either activated or not. + void MakePrimaryAccountAvailable(bool use_sync_transport_mode); + + // Calls `MakePrimaryAccountAvailable()` and initializes the `personal_data`, + // waiting for the `Refresh()` to complete. void ResetPersonalDataManager(bool use_sync_transport_mode, PersonalDataManager* personal_data);
diff --git a/components/autofill/core/browser/test_address_data_manager.cc b/components/autofill/core/browser/test_address_data_manager.cc index 5acb262d..bc7b8197 100644 --- a/components/autofill/core/browser/test_address_data_manager.cc +++ b/components/autofill/core/browser/test_address_data_manager.cc
@@ -33,14 +33,14 @@ std::make_unique<AutofillProfile>(profile); profile_ptr->FinalizeAfterImport(); GetProfileStorage(profile.source()).push_back(std::move(profile_ptr)); - notify_pdm_observers_.Run(); + NotifyObservers(); } void TestAddressDataManager::UpdateProfile(const AutofillProfile& profile) { AutofillProfile* existing_profile = GetProfileByGUID(profile.guid()); if (existing_profile) { *existing_profile = profile; - notify_pdm_observers_.Run(); + NotifyObservers(); } } @@ -50,7 +50,7 @@ GetProfileStorage(profile->source()); profiles.erase(base::ranges::find(profiles, profile, &std::unique_ptr<AutofillProfile>::get)); - notify_pdm_observers_.Run(); + NotifyObservers(); } void TestAddressDataManager::LoadProfiles() {
diff --git a/components/autofill/core/browser/test_payments_data_manager.cc b/components/autofill/core/browser/test_payments_data_manager.cc index 607c1c1..121453d 100644 --- a/components/autofill/core/browser/test_payments_data_manager.cc +++ b/components/autofill/core/browser/test_payments_data_manager.cc
@@ -86,12 +86,12 @@ if (CreditCard* credit_card = GetCreditCardByGUID(guid)) { local_credit_cards_.erase(base::ranges::find( local_credit_cards_, credit_card, &std::unique_ptr<CreditCard>::get)); - notify_pdm_observers_.Run(); + NotifyObservers(); return true; } else if (const Iban* iban = GetIbanByGUID(guid)) { local_ibans_.erase( base::ranges::find(local_ibans_, iban, &std::unique_ptr<Iban>::get)); - notify_pdm_observers_.Run(); + NotifyObservers(); return true; } return false; @@ -123,7 +123,7 @@ std::unique_ptr<CreditCard> local_credit_card = std::make_unique<CreditCard>(credit_card); local_credit_cards_.push_back(std::move(local_credit_card)); - notify_pdm_observers_.Run(); + NotifyObservers(); } std::string TestPaymentsDataManager::AddAsLocalIban(Iban iban) { @@ -133,7 +133,7 @@ Iban::Guid(base::Uuid::GenerateRandomV4().AsLowercaseString())); std::unique_ptr<Iban> local_iban = std::make_unique<Iban>(iban); local_ibans_.push_back(std::move(local_iban)); - notify_pdm_observers_.Run(); + NotifyObservers(); return iban.guid(); } @@ -152,7 +152,7 @@ // behavior of PersonalDataManager. RemoveCardWithoutNotification(card); } - notify_pdm_observers_.Run(); + NotifyObservers(); } void TestPaymentsDataManager::UpdateCreditCard(const CreditCard& credit_card) { @@ -278,7 +278,7 @@ std::unique_ptr<CreditCard> server_credit_card = std::make_unique<CreditCard>(credit_card); server_credit_cards_.push_back(std::move(server_credit_card)); - notify_pdm_observers_.Run(); + NotifyObservers(); } void TestPaymentsDataManager::AddAutofillOfferData( @@ -286,26 +286,26 @@ std::unique_ptr<AutofillOfferData> data = std::make_unique<AutofillOfferData>(offer_data); autofill_offer_data_.emplace_back(std::move(data)); - notify_pdm_observers_.Run(); + NotifyObservers(); } void TestPaymentsDataManager::AddServerIban(const Iban& iban) { CHECK(iban.value().empty()); server_ibans_.push_back(std::make_unique<Iban>(iban)); - notify_pdm_observers_.Run(); + NotifyObservers(); } void TestPaymentsDataManager::AddCardArtImage(const GURL& url, const gfx::Image& image) { credit_card_art_images_[url] = std::make_unique<gfx::Image>(image); - notify_pdm_observers_.Run(); + NotifyObservers(); } void TestPaymentsDataManager::AddVirtualCardUsageData( const VirtualCardUsageData& usage_data) { autofill_virtual_card_usage_data_.push_back( std::make_unique<VirtualCardUsageData>(usage_data)); - notify_pdm_observers_.Run(); + NotifyObservers(); } void TestPaymentsDataManager::SetNicknameForCardWithGUID( @@ -321,7 +321,7 @@ card->SetNickname(base::ASCIIToUTF16(nickname)); } } - notify_pdm_observers_.Run(); + NotifyObservers(); } void TestPaymentsDataManager::RemoveCardWithoutNotification(
diff --git a/components/autofill/core/common/autofill_features.cc b/components/autofill/core/common/autofill_features.cc index f048fb8..128f9815 100644 --- a/components/autofill/core/common/autofill_features.cc +++ b/components/autofill/core/common/autofill_features.cc
@@ -438,7 +438,7 @@ // TODO(crbug/1121990): Remove once launched. BASE_FEATURE(kAutofillParsingPatternProvider, "AutofillParsingPatternProvider", - base::FEATURE_ENABLED_BY_DEFAULT); + base::FEATURE_DISABLED_BY_DEFAULT); // The specific pattern set is controlled by the `kAutofillParsingPatternActive` // parameter. One of "default", "experimental", "nextgen".
diff --git a/components/commerce_strings.grdp b/components/commerce_strings.grdp index 601a6b7c..2b5083b 100644 --- a/components/commerce_strings.grdp +++ b/components/commerce_strings.grdp
@@ -457,12 +457,9 @@ <message name="IDS_PRICE_INSIGHTS_BUYING_OPTIONS_TITLE" desc="The title text for the buying options section of price insights."> Search more buying options </message> - <message name="IDS_PRICE_INSIGHTS_BUYING_OPTIONS_SUBTITLE" desc="The description text for the buying options section of price insights."> + <message name="IDS_PRICE_INSIGHTS_BUYING_OPTIONS_SUBTITLE" desc="The description text for the BUYING_OPTIONS section of price insights."> From other stores across the web </message> - <message name="IDS_PRICE_INSIGHTS_HISTORY_TITLE" desc="The description text for the history section of price insights."> - Price history across the web - </message> <message name="IDS_SHOPPING_COLLECTION_FOLDER_NAME" desc="The name of bookmark folder that is automatically created when a user bookmarks a product page."> Shopping list
diff --git a/components/commerce_strings_grdp/IDS_PRICE_INSIGHTS_HISTORY_TITLE.png.sha1 b/components/commerce_strings_grdp/IDS_PRICE_INSIGHTS_HISTORY_TITLE.png.sha1 deleted file mode 100644 index 645e9c3..0000000 --- a/components/commerce_strings_grdp/IDS_PRICE_INSIGHTS_HISTORY_TITLE.png.sha1 +++ /dev/null
@@ -1 +0,0 @@ -db65609e7d344a0b9e7431c06debb39134d51277 \ No newline at end of file
diff --git a/components/gwp_asan/client/extreme_lightweight_detector_malloc_shims.cc b/components/gwp_asan/client/extreme_lightweight_detector_malloc_shims.cc index 165f570..a4398027 100644 --- a/components/gwp_asan/client/extreme_lightweight_detector_malloc_shims.cc +++ b/components/gwp_asan/client/extreme_lightweight_detector_malloc_shims.cc
@@ -7,6 +7,7 @@ #include <atomic> #include "base/no_destructor.h" +#include "base/trace_event/malloc_dump_provider.h" #include "components/gwp_asan/client/sampling_state.h" #include "components/gwp_asan/common/extreme_lightweight_detector_util.h" #include "partition_alloc/lightweight_quarantine.h" @@ -310,6 +311,18 @@ nullptr, // next }; +[[maybe_unused]] base::trace_event::MallocDumpProvider::ExtremeLUDStats +GetStats() { + if (!lightweight_quarantine_branch) { // Not yet initialized. + return {}; + } + + base::trace_event::MallocDumpProvider::ExtremeLUDStats stats{ + .capacity_in_bytes = lightweight_quarantine_branch->GetCapacityInBytes()}; + lightweight_quarantine_branch->GetRoot().AccumulateStats(stats.lq_stats); + return stats; +} + } // namespace void InstallExtremeLightweightDetectorHooks( @@ -321,6 +334,11 @@ sampling_state.Init(init_options.sampling_frequency); allocator_shim::InsertAllocatorDispatch(&allocator_dispatch); + +#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) + base::trace_event::MallocDumpProvider::SetExtremeLUDGetStatsCallback( + GetStats); +#endif // BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) } partition_alloc::internal::LightweightQuarantineBranch&
diff --git a/components/no_state_prefetch/browser/no_state_prefetch_contents.cc b/components/no_state_prefetch/browser/no_state_prefetch_contents.cc index 3744b177..2770cb5 100644 --- a/components/no_state_prefetch/browser/no_state_prefetch_contents.cc +++ b/components/no_state_prefetch/browser/no_state_prefetch_contents.cc
@@ -177,7 +177,6 @@ origin_(origin) { switch (origin) { case ORIGIN_OMNIBOX: - case ORIGIN_EXTERNAL_REQUEST: case ORIGIN_NAVIGATION_PREDICTOR: DCHECK(!initiator_origin_.has_value()); break;
diff --git a/components/no_state_prefetch/browser/no_state_prefetch_manager.cc b/components/no_state_prefetch/browser/no_state_prefetch_manager.cc index ba076c1e..17d62db 100644 --- a/components/no_state_prefetch/browser/no_state_prefetch_manager.cc +++ b/components/no_state_prefetch/browser/no_state_prefetch_manager.cc
@@ -283,17 +283,6 @@ initiator_origin, gfx::Rect(size), session_storage_namespace); } -std::unique_ptr<NoStatePrefetchHandle> -NoStatePrefetchManager::StartPrefetchingFromExternalRequest( - const GURL& url, - const content::Referrer& referrer, - SessionStorageNamespace* session_storage_namespace, - const gfx::Rect& bounds) { - return StartPrefetchingWithPreconnectFallback(ORIGIN_EXTERNAL_REQUEST, url, - referrer, std::nullopt, bounds, - session_storage_namespace); -} - void NoStatePrefetchManager::CancelAllPrerenders() { DCHECK_CURRENTLY_ON(BrowserThread::UI); while (!active_prefetches_.empty()) { @@ -930,14 +919,6 @@ } } -bool NoStatePrefetchManager::HasRecentlyPrefetchedUrlForTesting( - const GURL& url) { - return base::ranges::any_of(prefetches_, [url](const NavigationRecord& r) { - return r.url == url && - r.final_status == FINAL_STATUS_NOSTATE_PREFETCH_FINISHED; - }); -} - void NoStatePrefetchManager::OnPrefetchUsed(const GURL& url) { // Loading a prefetched URL resets the revalidation bypass. Remove all // matching urls from the prefetch list for more accurate metrics.
diff --git a/components/no_state_prefetch/browser/no_state_prefetch_manager.h b/components/no_state_prefetch/browser/no_state_prefetch_manager.h index e3b501b2a..bb15106 100644 --- a/components/no_state_prefetch/browser/no_state_prefetch_manager.h +++ b/components/no_state_prefetch/browser/no_state_prefetch_manager.h
@@ -133,12 +133,6 @@ const gfx::Size& size, const url::Origin& initiator_origin); - std::unique_ptr<NoStatePrefetchHandle> StartPrefetchingFromExternalRequest( - const GURL& url, - const content::Referrer& referrer, - content::SessionStorageNamespace* session_storage_namespace, - const gfx::Rect& bounds); - // Cancels all active prerenders. void CancelAllPrerenders(); @@ -241,9 +235,6 @@ // the same URL in tests, without running into FINAL_STATUS_DUPLICATE. void ClearPrefetchInformationForTesting(); - // Returns true iff the |url| is found in the list of recent prefetches. - bool HasRecentlyPrefetchedUrlForTesting(const GURL& url); - // Starts a prefetch for |url| from |initiator_origin|. The |origin| specifies // how the prefetch was started. Returns a NoStatePrefetchHandle or nullptr. // Only for testing.
diff --git a/components/no_state_prefetch/browser/prerender_histograms.cc b/components/no_state_prefetch/browser/prerender_histograms.cc index 53fda5f..64eed9b 100644 --- a/components/no_state_prefetch/browser/prerender_histograms.cc +++ b/components/no_state_prefetch/browser/prerender_histograms.cc
@@ -34,8 +34,6 @@ return "websame"; case ORIGIN_LINK_REL_PRERENDER_CROSSDOMAIN: return "webcross"; - case ORIGIN_EXTERNAL_REQUEST: - return "externalrequest"; case ORIGIN_LINK_REL_NEXT: return "webnext"; case ORIGIN_GWS_PRERENDER:
diff --git a/components/no_state_prefetch/common/prerender_origin.cc b/components/no_state_prefetch/common/prerender_origin.cc index 072bc09e..c36bf43 100644 --- a/components/no_state_prefetch/common/prerender_origin.cc +++ b/components/no_state_prefetch/common/prerender_origin.cc
@@ -21,13 +21,13 @@ "Link Rel Prerender (same domain)", "Link Rel Prerender (cross domain)", "[Deprecated] Local Predictor", - "External Request", + "[Deprecated] External Request", "[Deprecated] Instant", "[Deprecated] Link Rel Next", - "External Request Forced Cellular", + "[Deprecated] External Request Forced Cellular", "[Deprecated] Offline", "Navigation Predictor", - "Isolated Prerender", + "[Deprecated] Isolated Prerender", "Speculation Rules Same Origin Prerender", "Max", };
diff --git a/components/no_state_prefetch/common/prerender_origin.h b/components/no_state_prefetch/common/prerender_origin.h index 3d78e26..ba5e2b2 100644 --- a/components/no_state_prefetch/common/prerender_origin.h +++ b/components/no_state_prefetch/common/prerender_origin.h
@@ -25,7 +25,7 @@ ORIGIN_LINK_REL_PRERENDER_SAMEDOMAIN = 7, ORIGIN_LINK_REL_PRERENDER_CROSSDOMAIN = 8, // Obsolete: ORIGIN_LOCAL_PREDICTOR = 9, - ORIGIN_EXTERNAL_REQUEST = 10, + // Obsolete: ORIGIN_EXTERNAL_REQUEST = 10, // Obsolete: ORIGIN_INSTANT = 11, ORIGIN_LINK_REL_NEXT = 12, // Obsolete: ORIGIN_EXTERNAL_REQUEST_FORCED_PRERENDER = 13,
diff --git a/components/password_manager/core/browser/BUILD.gn b/components/password_manager/core/browser/BUILD.gn index 9a74090..b7ed0ad 100644 --- a/components/password_manager/core/browser/BUILD.gn +++ b/components/password_manager/core/browser/BUILD.gn
@@ -116,6 +116,8 @@ "password_manager_metrics_recorder.h", "password_manager_setting.h", "password_manager_settings_service.h", + "password_manager_switches.cc", + "password_manager_switches.h", "password_manager_util.cc", "password_manager_util.h", "password_manual_fallback_flow.cc",
diff --git a/components/password_manager/core/browser/password_manager_switches.cc b/components/password_manager/core/browser/password_manager_switches.cc new file mode 100644 index 0000000..123949dc --- /dev/null +++ b/components/password_manager/core/browser/password_manager_switches.cc
@@ -0,0 +1,20 @@ +// Copyright 2024 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "components/password_manager/core/browser/password_manager_switches.h" + +namespace password_manager { + +#if BUILDFLAG(IS_LINUX) +// Specifies which encryption storage backend to use. Possible values are +// kwallet, kwallet5, kwallet6, gnome-libsecret, basic. +// Any other value will lead to Chrome detecting the best backend automatically. +const char kPasswordStore[] = "password-store"; + +// Enables the feature of allowing the user to disable the backend via a +// setting. +const char kEnableEncryptionSelection[] = "enable-encryption-selection"; +#endif // BUILDFLAG(IS_LINUX) + +} // namespace password_manager
diff --git a/components/password_manager/core/browser/password_manager_switches.h b/components/password_manager/core/browser/password_manager_switches.h new file mode 100644 index 0000000..208f490 --- /dev/null +++ b/components/password_manager/core/browser/password_manager_switches.h
@@ -0,0 +1,20 @@ +// Copyright 2024 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_SWITCHES_H_ +#define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_SWITCHES_H_ + +#include "build/build_config.h" +#include "build/chromeos_buildflags.h" + +namespace password_manager { + +#if BUILDFLAG(IS_LINUX) +extern const char kPasswordStore[]; +extern const char kEnableEncryptionSelection[]; +#endif + +} // namespace password_manager + +#endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_SWITCHES_H_
diff --git a/components/plus_addresses/plus_address_service.cc b/components/plus_addresses/plus_address_service.cc index f87758b5..b44b053 100644 --- a/components/plus_addresses/plus_address_service.cc +++ b/components/plus_addresses/plus_address_service.cc
@@ -352,16 +352,16 @@ } void PlusAddressService::OnWebDataChangedBySync( - const PlusAddressSyncDataChange& change) { + const PlusAddressDataChange& change) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); switch (change.type()) { - case PlusAddressSyncDataChange::Type::kAdd: { + case PlusAddressDataChange::Type::kAdd: { plus_profiles_.insert(change.profile()); plus_addresses_.insert(change.profile().plus_address); break; } - case PlusAddressSyncDataChange::Type::kRemove: { + case PlusAddressDataChange::Type::kRemove: { plus_profiles_.erase(change.profile()); plus_addresses_.erase(change.profile().plus_address); break;
diff --git a/components/plus_addresses/plus_address_service.h b/components/plus_addresses/plus_address_service.h index c45ca54..d8eebbe 100644 --- a/components/plus_addresses/plus_address_service.h +++ b/components/plus_addresses/plus_address_service.h
@@ -79,7 +79,7 @@ void RecordAutofillSuggestionEvent(SuggestionEvent suggestion_event) override; // PlusAddressWebDataService::Observer: - void OnWebDataChangedBySync(const PlusAddressSyncDataChange& change) override; + void OnWebDataChangedBySync(const PlusAddressDataChange& change) override; // WebDataServiceConsumer: void OnWebDataServiceRequestDone(
diff --git a/components/plus_addresses/plus_address_service_unittest.cc b/components/plus_addresses/plus_address_service_unittest.cc index f822ccb..31712f9 100644 --- a/components/plus_addresses/plus_address_service_unittest.cc +++ b/components/plus_addresses/plus_address_service_unittest.cc
@@ -773,16 +773,16 @@ table().AddOrUpdatePlusProfile(profile1); table().AddOrUpdatePlusProfile(profile2); EXPECT_THAT(service().GetPlusProfiles(), testing::IsEmpty()); - service().OnWebDataChangedBySync(PlusAddressSyncDataChange( - PlusAddressSyncDataChange::Type::kAdd, profile1)); - service().OnWebDataChangedBySync(PlusAddressSyncDataChange( - PlusAddressSyncDataChange::Type::kAdd, profile2)); + service().OnWebDataChangedBySync( + PlusAddressDataChange(PlusAddressDataChange::Type::kAdd, profile1)); + service().OnWebDataChangedBySync( + PlusAddressDataChange(PlusAddressDataChange::Type::kAdd, profile2)); EXPECT_THAT(service().GetPlusProfiles(), testing::UnorderedElementsAre(profile1, profile2)); table().RemovePlusProfile(profile1.profile_id); - service().OnWebDataChangedBySync(PlusAddressSyncDataChange( - PlusAddressSyncDataChange::Type::kRemove, profile1)); + service().OnWebDataChangedBySync( + PlusAddressDataChange(PlusAddressDataChange::Type::kRemove, profile1)); EXPECT_THAT(service().GetPlusProfiles(), testing::UnorderedElementsAre(profile2)); }
diff --git a/components/plus_addresses/plus_address_types.cc b/components/plus_addresses/plus_address_types.cc index a77710d..1ab6a5f2 100644 --- a/components/plus_addresses/plus_address_types.cc +++ b/components/plus_addresses/plus_address_types.cc
@@ -20,4 +20,12 @@ PlusProfile::PlusProfile(PlusProfile&&) = default; PlusProfile::~PlusProfile() = default; +PlusAddressDataChange::PlusAddressDataChange(Type type, PlusProfile profile) + : type_(type), profile_(std::move(profile)) {} +PlusAddressDataChange::PlusAddressDataChange( + const PlusAddressDataChange& other) = default; +PlusAddressDataChange& PlusAddressDataChange::operator=( + const PlusAddressDataChange& change) = default; +PlusAddressDataChange::~PlusAddressDataChange() = default; + } // namespace plus_addresses
diff --git a/components/plus_addresses/plus_address_types.h b/components/plus_addresses/plus_address_types.h index f6a108d64..e8be4767 100644 --- a/components/plus_addresses/plus_address_types.h +++ b/components/plus_addresses/plus_address_types.h
@@ -85,6 +85,25 @@ std::optional<int> http_response_code_; }; +class PlusAddressDataChange { + public: + enum class Type { kAdd = 0, kRemove = 1 }; + + PlusAddressDataChange(Type type, PlusProfile profile); + PlusAddressDataChange(const PlusAddressDataChange& other); + PlusAddressDataChange& operator=(const PlusAddressDataChange& change); + ~PlusAddressDataChange(); + + Type type() const { return type_; } + const PlusProfile& profile() const { return profile_; } + + bool operator==(const PlusAddressDataChange& other) const = default; + + private: + Type type_; + PlusProfile profile_; +}; + // Only used by Autofill. using autofill::PlusAddressCallback;
diff --git a/components/plus_addresses/webdata/plus_address_sync_bridge.cc b/components/plus_addresses/webdata/plus_address_sync_bridge.cc index 439b3e1..278b5595 100644 --- a/components/plus_addresses/webdata/plus_address_sync_bridge.cc +++ b/components/plus_addresses/webdata/plus_address_sync_bridge.cc
@@ -78,7 +78,7 @@ return syncer::ModelError(FROM_HERE, "Failed to begin transaction."); } - std::vector<PlusAddressSyncDataChange> profile_changes; + std::vector<PlusAddressDataChange> profile_changes; for (const std::unique_ptr<syncer::EntityChange>& change : entity_changes) { switch (change->type()) { case syncer::EntityChange::ACTION_ADD: @@ -94,10 +94,10 @@ // both a REMOVE and ADD change for the old and new profiles // respectively. if (existing_profile) { - profile_changes.emplace_back(PlusAddressSyncDataChange::Type::kRemove, + profile_changes.emplace_back(PlusAddressDataChange::Type::kRemove, std::move(*existing_profile)); } - profile_changes.emplace_back(PlusAddressSyncDataChange::Type::kAdd, + profile_changes.emplace_back(PlusAddressDataChange::Type::kAdd, std::move(profile)); break; } @@ -109,7 +109,7 @@ "Failed to remove profile in database."); } if (profile) { - profile_changes.emplace_back(PlusAddressSyncDataChange::Type::kRemove, + profile_changes.emplace_back(PlusAddressDataChange::Type::kRemove, std::move(*profile)); } break; @@ -136,9 +136,9 @@ {FROM_HERE, "Failed to begin transaction."}); } - std::vector<PlusAddressSyncDataChange> profile_changes; + std::vector<PlusAddressDataChange> profile_changes; for (PlusProfile& profile : GetPlusAddressTable()->GetPlusProfiles()) { - profile_changes.emplace_back(PlusAddressSyncDataChange::Type::kRemove, + profile_changes.emplace_back(PlusAddressDataChange::Type::kRemove, std::move(profile)); }
diff --git a/components/plus_addresses/webdata/plus_address_sync_bridge.h b/components/plus_addresses/webdata/plus_address_sync_bridge.h index 77cc2dc..db891c9 100644 --- a/components/plus_addresses/webdata/plus_address_sync_bridge.h +++ b/components/plus_addresses/webdata/plus_address_sync_bridge.h
@@ -15,13 +15,13 @@ namespace plus_addresses { -class PlusAddressSyncDataChange; +class PlusAddressDataChange; class PlusAddressTable; class PlusAddressSyncBridge : public syncer::ModelTypeSyncBridge { public: using DataChangedBySyncCallback = base::RepeatingCallback<void( - std::vector<PlusAddressSyncDataChange> /*changes*/)>; + std::vector<PlusAddressDataChange> /*changes*/)>; PlusAddressSyncBridge( std::unique_ptr<syncer::ModelTypeChangeProcessor> change_processor, scoped_refptr<WebDatabaseBackend> db_backend,
diff --git a/components/plus_addresses/webdata/plus_address_sync_bridge_unittest.cc b/components/plus_addresses/webdata/plus_address_sync_bridge_unittest.cc index dd95713..3d38890 100644 --- a/components/plus_addresses/webdata/plus_address_sync_bridge_unittest.cc +++ b/components/plus_addresses/webdata/plus_address_sync_bridge_unittest.cc
@@ -40,7 +40,7 @@ using ::testing::UnorderedElementsAre; using DataChangedBySyncCallbackMock = - base::MockRepeatingCallback<void(std::vector<PlusAddressSyncDataChange>)>; + base::MockRepeatingCallback<void(std::vector<PlusAddressDataChange>)>; class PlusAddressSyncBridgeTest : public testing::Test { public: @@ -139,12 +139,11 @@ TEST_F(PlusAddressSyncBridgeTest, MergeFullSyncData) { const PlusProfile profile1 = test::CreatePlusProfile(); const PlusProfile profile2 = test::CreatePlusProfile2(); - EXPECT_CALL(on_data_changed_callback(), - Run(/*changes=*/ElementsAre( - PlusAddressSyncDataChange( - PlusAddressSyncDataChange::Type::kAdd, profile1), - PlusAddressSyncDataChange( - PlusAddressSyncDataChange::Type::kAdd, profile2)))); + EXPECT_CALL( + on_data_changed_callback(), + Run(/*changes=*/ElementsAre( + PlusAddressDataChange(PlusAddressDataChange::Type::kAdd, profile1), + PlusAddressDataChange(PlusAddressDataChange::Type::kAdd, profile2)))); EXPECT_TRUE(StartSyncing(/*remote_profiles=*/{profile1, profile2})); EXPECT_THAT(table().GetPlusProfiles(), UnorderedElementsAre(profile1, profile2)); @@ -153,8 +152,8 @@ TEST_F(PlusAddressSyncBridgeTest, ApplyIncrementalSyncChanges_AddUpdate) { PlusProfile profile1 = test::CreatePlusProfile(); EXPECT_CALL(on_data_changed_callback(), - Run(/*changes=*/UnorderedElementsAre(PlusAddressSyncDataChange( - PlusAddressSyncDataChange::Type::kAdd, profile1)))); + Run(/*changes=*/UnorderedElementsAre(PlusAddressDataChange( + PlusAddressDataChange::Type::kAdd, profile1)))); ASSERT_TRUE(StartSyncing(/*remote_profiles=*/{profile1})); // Simulate receiving an incremental update. @@ -173,14 +172,13 @@ change_list.push_back( syncer::EntityChange::CreateAdd(storage_key, std::move(entity_data))); // `ApplyIncrementalSyncChanges()` returns an error if it fails. - EXPECT_CALL(on_data_changed_callback(), - Run(/*changes=*/ElementsAre( - PlusAddressSyncDataChange( - PlusAddressSyncDataChange::Type::kRemove, old_profile1), - PlusAddressSyncDataChange( - PlusAddressSyncDataChange::Type::kAdd, profile1), - PlusAddressSyncDataChange( - PlusAddressSyncDataChange::Type::kAdd, profile2)))); + EXPECT_CALL( + on_data_changed_callback(), + Run(/*changes=*/ElementsAre( + PlusAddressDataChange(PlusAddressDataChange::Type::kRemove, + old_profile1), + PlusAddressDataChange(PlusAddressDataChange::Type::kAdd, profile1), + PlusAddressDataChange(PlusAddressDataChange::Type::kAdd, profile2)))); EXPECT_FALSE(bridge().ApplyIncrementalSyncChanges( bridge().CreateMetadataChangeList(), std::move(change_list))); @@ -198,8 +196,8 @@ bridge().GetStorageKey(EntityDataFromPlusProfile(profile)))); // `ApplyIncrementalSyncChanges()` returns an error if it fails. EXPECT_CALL(on_data_changed_callback(), - Run(/*changes=*/ElementsAre(PlusAddressSyncDataChange( - PlusAddressSyncDataChange::Type::kRemove, profile)))); + Run(/*changes=*/ElementsAre(PlusAddressDataChange( + PlusAddressDataChange::Type::kRemove, profile)))); EXPECT_FALSE(bridge().ApplyIncrementalSyncChanges( bridge().CreateMetadataChangeList(), std::move(change_list))); @@ -210,8 +208,8 @@ const PlusProfile profile = test::CreatePlusProfile(); ASSERT_TRUE(StartSyncing(/*remote_profiles=*/{profile})); EXPECT_CALL(on_data_changed_callback(), - Run(/*changes=*/ElementsAre(PlusAddressSyncDataChange( - PlusAddressSyncDataChange::Type::kRemove, profile)))); + Run(/*changes=*/ElementsAre(PlusAddressDataChange( + PlusAddressDataChange::Type::kRemove, profile)))); bridge().ApplyDisableSyncChanges(bridge().CreateMetadataChangeList()); EXPECT_THAT(table().GetPlusProfiles(), IsEmpty()); }
diff --git a/components/plus_addresses/webdata/plus_address_sync_util.cc b/components/plus_addresses/webdata/plus_address_sync_util.cc index 13aaf97..5e74c39 100644 --- a/components/plus_addresses/webdata/plus_address_sync_util.cc +++ b/components/plus_addresses/webdata/plus_address_sync_util.cc
@@ -11,15 +11,6 @@ namespace plus_addresses { -PlusAddressSyncDataChange::PlusAddressSyncDataChange(Type type, - PlusProfile profile) - : type_(type), profile_(std::move(profile)) {} -PlusAddressSyncDataChange::PlusAddressSyncDataChange( - const PlusAddressSyncDataChange& other) = default; -PlusAddressSyncDataChange& PlusAddressSyncDataChange::operator=( - const PlusAddressSyncDataChange& change) = default; -PlusAddressSyncDataChange::~PlusAddressSyncDataChange() = default; - PlusProfile PlusProfileFromEntityData(const syncer::EntityData& entity_data) { CHECK(entity_data.specifics.has_plus_address()); sync_pb::PlusAddressSpecifics specifics =
diff --git a/components/plus_addresses/webdata/plus_address_sync_util.h b/components/plus_addresses/webdata/plus_address_sync_util.h index 9b80229..4f771921 100644 --- a/components/plus_addresses/webdata/plus_address_sync_util.h +++ b/components/plus_addresses/webdata/plus_address_sync_util.h
@@ -9,26 +9,6 @@ #include "components/sync/protocol/entity_data.h" namespace plus_addresses { - -class PlusAddressSyncDataChange { - public: - enum class Type { kAdd = 0, kRemove = 1 }; - - PlusAddressSyncDataChange(Type type, PlusProfile profile); - PlusAddressSyncDataChange(const PlusAddressSyncDataChange& other); - PlusAddressSyncDataChange& operator=(const PlusAddressSyncDataChange& change); - ~PlusAddressSyncDataChange(); - - Type type() const { return type_; } - const PlusProfile& profile() const { return profile_; } - - bool operator==(const PlusAddressSyncDataChange& other) const = default; - - private: - Type type_; - PlusProfile profile_; -}; - // Utils to convert a `EntityData` containing `PlusAddressSpecifics` to a // `PlusProfile` and back. // Since the PLUS_ADDRESS model type is read-only on the client, it is not
diff --git a/components/plus_addresses/webdata/plus_address_webdata_service.cc b/components/plus_addresses/webdata/plus_address_webdata_service.cc index f744ad59..57100f964 100644 --- a/components/plus_addresses/webdata/plus_address_webdata_service.cc +++ b/components/plus_addresses/webdata/plus_address_webdata_service.cc
@@ -138,10 +138,10 @@ } void PlusAddressWebDataService::NotifyOnWebDataChangedBySync( - std::vector<PlusAddressSyncDataChange> changes) { + std::vector<PlusAddressDataChange> changes) { CHECK(ui_task_runner_->RunsTasksInCurrentSequence()); for (Observer& o : observers_) { - for (const PlusAddressSyncDataChange& change : changes) { + for (const PlusAddressDataChange& change : changes) { o.OnWebDataChangedBySync(change); } }
diff --git a/components/plus_addresses/webdata/plus_address_webdata_service.h b/components/plus_addresses/webdata/plus_address_webdata_service.h index 07337ab..a1025e42 100644 --- a/components/plus_addresses/webdata/plus_address_webdata_service.h +++ b/components/plus_addresses/webdata/plus_address_webdata_service.h
@@ -26,7 +26,7 @@ namespace plus_addresses { class PlusAddressSyncBridge; -class PlusAddressSyncDataChange; +class PlusAddressDataChange; // `PlusAddressWebDataService` acts as the bridge between code on the UI // sequence (`PlusAddressService`) and code on the DB sequence ( @@ -49,7 +49,7 @@ // operations are emulated as a remove operation of the old value followed // by an addition of the updated value. virtual void OnWebDataChangedBySync( - const PlusAddressSyncDataChange& change) = 0; + const PlusAddressDataChange& change) = 0; }; PlusAddressWebDataService( @@ -96,8 +96,7 @@ }; // Notifies all `observers_` about `OnWebDataChangedBySync()`. - void NotifyOnWebDataChangedBySync( - std::vector<PlusAddressSyncDataChange> changes); + void NotifyOnWebDataChangedBySync(std::vector<PlusAddressDataChange> changes); scoped_refptr<base::SequencedTaskRunner> ui_task_runner_; scoped_refptr<base::SequencedTaskRunner> db_task_runner_;
diff --git a/components/search_engines/search_engine_choice/search_engine_choice_utils.h b/components/search_engines/search_engine_choice/search_engine_choice_utils.h index caa774d..84721699 100644 --- a/components/search_engines/search_engine_choice/search_engine_choice_utils.h +++ b/components/search_engines/search_engine_choice/search_engine_choice_utils.h
@@ -5,6 +5,7 @@ #ifndef COMPONENTS_SEARCH_ENGINES_SEARCH_ENGINE_CHOICE_SEARCH_ENGINE_CHOICE_UTILS_H_ #define COMPONENTS_SEARCH_ENGINES_SEARCH_ENGINE_CHOICE_SEARCH_ENGINE_CHOICE_UTILS_H_ +#include <optional> #include <string> #include <vector>
diff --git a/content/browser/renderer_host/media/media_devices_manager.cc b/content/browser/renderer_host/media/media_devices_manager.cc index 1a7d5dc5..f328d7f1 100644 --- a/content/browser/renderer_host/media/media_devices_manager.cc +++ b/content/browser/renderer_host/media/media_devices_manager.cc
@@ -387,7 +387,10 @@ class MediaDevicesManager::AudioServiceDeviceListener : public audio::mojom::DeviceListener { public: - AudioServiceDeviceListener() { ConnectToService(); } + AudioServiceDeviceListener(base::RepeatingClosure disconnect_cb) + : disconnect_cb_(std::move(disconnect_cb)) { + ConnectToService(); + } AudioServiceDeviceListener(const AudioServiceDeviceListener&) = delete; AudioServiceDeviceListener& operator=(const AudioServiceDeviceListener&) = @@ -420,8 +423,10 @@ void OnConnectionError() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + CHECK(disconnect_cb_); mojo_audio_device_notifier_.reset(); receiver_.reset(); + disconnect_cb_.Run(); // Resetting the error handler in a posted task since doing it synchronously // results in a browser crash. See https://crbug.com/845142. @@ -430,6 +435,10 @@ weak_factory_.GetWeakPtr())); } + // |disconnect_cb_| is a callback used to invalidate the cache and do a + // fresh enumeration to avoid losing out on the changes that might happen + // when the audio service is not active. + const base::RepeatingClosure disconnect_cb_; mojo::Receiver<audio::mojom::DeviceListener> receiver_{this}; mojo::Remote<audio::mojom::DeviceNotifier> mojo_audio_device_notifier_; @@ -615,8 +624,14 @@ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) if (base::FeatureList::IsEnabled(features::kAudioServiceOutOfProcess)) { DCHECK(!audio_service_device_listener_); + + // base::Unretained(this) is safe here because |this| owns + // |audio_service_device_listener_|. audio_service_device_listener_ = - std::make_unique<AudioServiceDeviceListener>(); + std::make_unique<AudioServiceDeviceListener>( + /*disconnect_cb=*/base::BindRepeating( + &MediaDevicesManager::HandleDevicesChanged, + base::Unretained(this), MediaDeviceType::kMediaAudioInput)); } #endif SendLogMessage("StartMonitoring()");
diff --git a/docs/linux/build_instructions.md b/docs/linux/build_instructions.md index c0d17aea..655743a 100644 --- a/docs/linux/build_instructions.md +++ b/docs/linux/build_instructions.md
@@ -355,6 +355,17 @@ with no preceding "//" (so, for `//chrome/test:unit_tests` use `autoninja -C out/Default chrome/test:unit_tests`). +## Compile a single file + +Ninja supports a special [syntax `^`][ninja hat syntax] to compile a single object file specyfing +the source file. For example, `autoninja -C out/Default ../../base/logging.cc^` +compiles `obj/base/base/logging.o`. + +[ninja hat syntax]: https://ninja-build.org/manual.html#:~:text=There%20is%20also%20a%20special%20syntax%20target%5E%20for%20specifying%20a%20target%20as%20the%20first%20output%20of%20some%20rule%20containing%20the%20source%20you%20put%20in%20the%20command%20line%2C%20if%20one%20exists.%20For%20example%2C%20if%20you%20specify%20target%20as%20foo.c%5E%20then%20foo.o%20will%20get%20built%20(assuming%20you%20have%20those%20targets%20in%20your%20build%20files) + +In addition to `foo.cc^`, Siso also supports `foo.h^` syntax to compile +the corresponding `foo.o` if it exists. + ## Run Chromium Once it is built, you can simply run the browser:
diff --git a/docs/windows_build_instructions.md b/docs/windows_build_instructions.md index 859ca64..489782dd 100644 --- a/docs/windows_build_instructions.md +++ b/docs/windows_build_instructions.md
@@ -399,6 +399,23 @@ the GN label with no preceding "//" (so for `//chrome/test:unit_tests` use `autoninja -C out\Default chrome/test:unit_tests`). +## Compile a single file + +Ninja supports a special [syntax `^`][ninja hat syntax] to compile a single object file specyfing +the source file. For example, `ninja -C out/Default ../../base/logging.cc^` +compiles `obj/base/base/logging.o`. + +[ninja hat syntax]: https://ninja-build.org/manual.html#:~:text=There%20is%20also%20a%20special%20syntax%20target%5E%20for%20specifying%20a%20target%20as%20the%20first%20output%20of%20some%20rule%20containing%20the%20source%20you%20put%20in%20the%20command%20line%2C%20if%20one%20exists.%20For%20example%2C%20if%20you%20specify%20target%20as%20foo.c%5E%20then%20foo.o%20will%20get%20built%20(assuming%20you%20have%20those%20targets%20in%20your%20build%20files) + +With autoninja, you need to add `^^` to preserve the trailing `^`. + +```shell +$ autoninja -C out\Default ..\..\base\logging.cc^^ +``` + +In addition to `foo.cc^^`, Siso also supports `foo.h^^` syntax to compile +the corresponding `foo.o` if it exists. + ## Run Chromium Once it is built, you can simply run the browser:
diff --git a/gpu/command_buffer/service/shared_image/iosurface_image_backing_factory.mm b/gpu/command_buffer/service/shared_image/iosurface_image_backing_factory.mm index e60b365..463ea712 100644 --- a/gpu/command_buffer/service/shared_image/iosurface_image_backing_factory.mm +++ b/gpu/command_buffer/service/shared_image/iosurface_image_backing_factory.mm
@@ -5,7 +5,6 @@ #include "gpu/command_buffer/service/shared_image/iosurface_image_backing_factory.h" #include <optional> -#include "base/feature_list.h" #include "base/memory/scoped_refptr.h" #include "build/build_config.h" #include "components/viz/common/resources/resource_sizes.h" @@ -37,29 +36,11 @@ namespace gpu { namespace { -BASE_FEATURE(kCorrectFramebufferAttachmentComputationInAppleBacking, - "CorrectFramebufferAttachmentComputationInAppleBacking", - base::FEATURE_ENABLED_BY_DEFAULT); - bool UsageWillResultInGLWrite(uint32_t usage, GrContextType gr_context_type) { - bool will_write_to_gl = false; - // NOTE: We are in the process of computing writes to GL without using - // GLES2_FRAMEBUFFER_HINT as part of eliminating the latter. Here we make the - // change guarded by a killswitch. - // TODO(b/41491709): Remove this killswitch post safe rollout. - if (base::FeatureList::IsEnabled( - kCorrectFramebufferAttachmentComputationInAppleBacking)) { - will_write_to_gl = (usage & SHARED_IMAGE_USAGE_GLES2_WRITE) || - ((gr_context_type == GrContextType::kGL) && - (usage & (SHARED_IMAGE_USAGE_RASTER_WRITE | - SHARED_IMAGE_USAGE_DISPLAY_WRITE))); - } else { - will_write_to_gl = - (usage & - (SHARED_IMAGE_USAGE_RASTER_READ | SHARED_IMAGE_USAGE_RASTER_WRITE | - SHARED_IMAGE_USAGE_GLES2_FRAMEBUFFER_HINT)) != 0; - } - return will_write_to_gl; + return (usage & SHARED_IMAGE_USAGE_GLES2_WRITE) || + ((gr_context_type == GrContextType::kGL) && + (usage & (SHARED_IMAGE_USAGE_RASTER_WRITE | + SHARED_IMAGE_USAGE_DISPLAY_WRITE))); } bool IsFormatSupported(viz::SharedImageFormat format) {
diff --git "a/infra/config/generated/builders/ci/Comparison Android \050reclient\051/gn-args.json" "b/infra/config/generated/builders/ci/Comparison Android \050reclient\051/gn-args.json" index d10d8a086..3633f3a 100644 --- "a/infra/config/generated/builders/ci/Comparison Android \050reclient\051/gn-args.json" +++ "b/infra/config/generated/builders/ci/Comparison Android \050reclient\051/gn-args.json"
@@ -11,7 +11,8 @@ "system_webview_package_name": "com.google.android.webview", "target_cpu": "arm64", "target_os": "android", - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } }, "build2": { @@ -25,7 +26,8 @@ "system_webview_package_name": "com.google.android.webview", "target_cpu": "arm64", "target_os": "android", - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } }
diff --git "a/infra/config/generated/builders/ci/Comparison Mac \050reclient\051/gn-args.json" "b/infra/config/generated/builders/ci/Comparison Mac \050reclient\051/gn-args.json" index bc8a69b2..686126b 100644 --- "a/infra/config/generated/builders/ci/Comparison Mac \050reclient\051/gn-args.json" +++ "b/infra/config/generated/builders/ci/Comparison Mac \050reclient\051/gn-args.json"
@@ -8,7 +8,8 @@ "is_debug": false, "proprietary_codecs": true, "symbol_level": 1, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } }, "build2": { @@ -19,7 +20,8 @@ "is_debug": false, "proprietary_codecs": true, "symbol_level": 1, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } }
diff --git "a/infra/config/generated/builders/ci/Comparison Mac arm64 \050reclient\051/gn-args.json" "b/infra/config/generated/builders/ci/Comparison Mac arm64 \050reclient\051/gn-args.json" index 0014d08..763d392d 100644 --- "a/infra/config/generated/builders/ci/Comparison Mac arm64 \050reclient\051/gn-args.json" +++ "b/infra/config/generated/builders/ci/Comparison Mac arm64 \050reclient\051/gn-args.json"
@@ -9,7 +9,8 @@ "proprietary_codecs": true, "symbol_level": 1, "target_cpu": "arm64", - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } }, "build2": { @@ -21,7 +22,8 @@ "proprietary_codecs": true, "symbol_level": 1, "target_cpu": "arm64", - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } }
diff --git "a/infra/config/generated/builders/ci/Comparison Mac arm64 on arm64 \050reclient\051/gn-args.json" "b/infra/config/generated/builders/ci/Comparison Mac arm64 on arm64 \050reclient\051/gn-args.json" index 0014d08..763d392d 100644 --- "a/infra/config/generated/builders/ci/Comparison Mac arm64 on arm64 \050reclient\051/gn-args.json" +++ "b/infra/config/generated/builders/ci/Comparison Mac arm64 on arm64 \050reclient\051/gn-args.json"
@@ -9,7 +9,8 @@ "proprietary_codecs": true, "symbol_level": 1, "target_cpu": "arm64", - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } }, "build2": { @@ -21,7 +22,8 @@ "proprietary_codecs": true, "symbol_level": 1, "target_cpu": "arm64", - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } }
diff --git "a/infra/config/generated/builders/ci/Comparison Simple Chrome \050reclient\051/gn-args.json" "b/infra/config/generated/builders/ci/Comparison Simple Chrome \050reclient\051/gn-args.json" index 4cc50833..d6b0726 100644 --- "a/infra/config/generated/builders/ci/Comparison Simple Chrome \050reclient\051/gn-args.json" +++ "b/infra/config/generated/builders/ci/Comparison Simple Chrome \050reclient\051/gn-args.json"
@@ -8,7 +8,8 @@ "is_chromeos_device": true, "ozone_platform_headless": true, "use_real_dbus_clients": false, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } }, "build2": { @@ -19,7 +20,8 @@ "is_chromeos_device": true, "ozone_platform_headless": true, "use_real_dbus_clients": false, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } }
diff --git "a/infra/config/generated/builders/ci/Comparison Windows \0508 cores\051 \050reclient\051/gn-args.json" "b/infra/config/generated/builders/ci/Comparison Windows \0508 cores\051 \050reclient\051/gn-args.json" index bc8a69b2..686126b 100644 --- "a/infra/config/generated/builders/ci/Comparison Windows \0508 cores\051 \050reclient\051/gn-args.json" +++ "b/infra/config/generated/builders/ci/Comparison Windows \0508 cores\051 \050reclient\051/gn-args.json"
@@ -8,7 +8,8 @@ "is_debug": false, "proprietary_codecs": true, "symbol_level": 1, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } }, "build2": { @@ -19,7 +20,8 @@ "is_debug": false, "proprietary_codecs": true, "symbol_level": 1, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } }
diff --git "a/infra/config/generated/builders/ci/Comparison Windows \050reclient\051/gn-args.json" "b/infra/config/generated/builders/ci/Comparison Windows \050reclient\051/gn-args.json" index bc8a69b2..686126b 100644 --- "a/infra/config/generated/builders/ci/Comparison Windows \050reclient\051/gn-args.json" +++ "b/infra/config/generated/builders/ci/Comparison Windows \050reclient\051/gn-args.json"
@@ -8,7 +8,8 @@ "is_debug": false, "proprietary_codecs": true, "symbol_level": 1, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } }, "build2": { @@ -19,7 +20,8 @@ "is_debug": false, "proprietary_codecs": true, "symbol_level": 1, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } }
diff --git "a/infra/config/generated/builders/ci/Comparison ios \050reclient\051/gn-args.json" "b/infra/config/generated/builders/ci/Comparison ios \050reclient\051/gn-args.json" index cc59280..1747837 100644 --- "a/infra/config/generated/builders/ci/Comparison ios \050reclient\051/gn-args.json" +++ "b/infra/config/generated/builders/ci/Comparison ios \050reclient\051/gn-args.json"
@@ -9,7 +9,8 @@ "target_cpu": "x64", "target_environment": "simulator", "target_os": "ios", - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } }, "build2": { @@ -21,7 +22,8 @@ "target_cpu": "x64", "target_environment": "simulator", "target_os": "ios", - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } }
diff --git "a/infra/config/generated/builders/ci/Linux Builder \050reclient compare\051/gn-args.json" "b/infra/config/generated/builders/ci/Linux Builder \050reclient compare\051/gn-args.json" index 9343f21c..e088770 100644 --- "a/infra/config/generated/builders/ci/Linux Builder \050reclient compare\051/gn-args.json" +++ "b/infra/config/generated/builders/ci/Linux Builder \050reclient compare\051/gn-args.json"
@@ -5,6 +5,7 @@ "is_component_build": false, "is_debug": false, "proprietary_codecs": true, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git "a/infra/config/generated/builders/ci/Linux Builder \050reclient compare\051/properties.json" "b/infra/config/generated/builders/ci/Linux Builder \050reclient compare\051/properties.json" index 43a0795..2d63716 100644 --- "a/infra/config/generated/builders/ci/Linux Builder \050reclient compare\051/properties.json" +++ "b/infra/config/generated/builders/ci/Linux Builder \050reclient compare\051/properties.json"
@@ -58,6 +58,16 @@ }, "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted-test", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/Linux Viz/gn-args.json b/infra/config/generated/builders/ci/Linux Viz/gn-args.json index e7422abd..7e37bfb 100644 --- a/infra/config/generated/builders/ci/Linux Viz/gn-args.json +++ b/infra/config/generated/builders/ci/Linux Viz/gn-args.json
@@ -4,6 +4,7 @@ "is_component_build": false, "is_debug": false, "symbol_level": 1, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/Linux Viz/properties.json b/infra/config/generated/builders/ci/Linux Viz/properties.json index 4e46a6e8..74effb6 100644 --- a/infra/config/generated/builders/ci/Linux Viz/properties.json +++ b/infra/config/generated/builders/ci/Linux Viz/properties.json
@@ -53,6 +53,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/Linux Viz/shadow-properties.json b/infra/config/generated/builders/ci/Linux Viz/shadow-properties.json index 999510c..ea7a2f5 100644 --- a/infra/config/generated/builders/ci/Linux Viz/shadow-properties.json +++ b/infra/config/generated/builders/ci/Linux Viz/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 250, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git "a/infra/config/generated/builders/ci/Mac Builder \050reclient compare\051/gn-args.json" "b/infra/config/generated/builders/ci/Mac Builder \050reclient compare\051/gn-args.json" index 137ae77f..4ed67c6 100644 --- "a/infra/config/generated/builders/ci/Mac Builder \050reclient compare\051/gn-args.json" +++ "b/infra/config/generated/builders/ci/Mac Builder \050reclient compare\051/gn-args.json"
@@ -7,6 +7,7 @@ "proprietary_codecs": true, "symbol_level": 1, "target_cpu": "x64", - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git "a/infra/config/generated/builders/ci/Mac Builder \050reclient compare\051/properties.json" "b/infra/config/generated/builders/ci/Mac Builder \050reclient compare\051/properties.json" index ecd99c4..76cc364 100644 --- "a/infra/config/generated/builders/ci/Mac Builder \050reclient compare\051/properties.json" +++ "b/infra/config/generated/builders/ci/Mac Builder \050reclient compare\051/properties.json"
@@ -56,6 +56,16 @@ }, "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted-test", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/Mac Builder Next/gn-args.json b/infra/config/generated/builders/ci/Mac Builder Next/gn-args.json index 48eaa917d..14e7e5c 100644 --- a/infra/config/generated/builders/ci/Mac Builder Next/gn-args.json +++ b/infra/config/generated/builders/ci/Mac Builder Next/gn-args.json
@@ -7,6 +7,7 @@ "proprietary_codecs": true, "symbol_level": 1, "target_cpu": "arm64", - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/Mac Builder Next/properties.json b/infra/config/generated/builders/ci/Mac Builder Next/properties.json index 0c7901b..02ed72d 100644 --- a/infra/config/generated/builders/ci/Mac Builder Next/properties.json +++ b/infra/config/generated/builders/ci/Mac Builder Next/properties.json
@@ -54,6 +54,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/Mac Builder Next/shadow-properties.json b/infra/config/generated/builders/ci/Mac Builder Next/shadow-properties.json index 999510c..ea7a2f5 100644 --- a/infra/config/generated/builders/ci/Mac Builder Next/shadow-properties.json +++ b/infra/config/generated/builders/ci/Mac Builder Next/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 250, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git "a/infra/config/generated/builders/ci/Mac deterministic \050dbg\051/gn-args.json" "b/infra/config/generated/builders/ci/Mac deterministic \050dbg\051/gn-args.json" index 0fb1499d..f73df1f 100644 --- "a/infra/config/generated/builders/ci/Mac deterministic \050dbg\051/gn-args.json" +++ "b/infra/config/generated/builders/ci/Mac deterministic \050dbg\051/gn-args.json"
@@ -3,6 +3,7 @@ "is_component_build": true, "is_debug": true, "symbol_level": 1, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/Mac deterministic/gn-args.json b/infra/config/generated/builders/ci/Mac deterministic/gn-args.json index 1312f6e..f58d737 100644 --- a/infra/config/generated/builders/ci/Mac deterministic/gn-args.json +++ b/infra/config/generated/builders/ci/Mac deterministic/gn-args.json
@@ -5,6 +5,7 @@ "is_component_build": false, "is_debug": false, "symbol_level": 1, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/Site Isolation Android/gn-args.json b/infra/config/generated/builders/ci/Site Isolation Android/gn-args.json index 27f96086..bfeb6f9 100644 --- a/infra/config/generated/builders/ci/Site Isolation Android/gn-args.json +++ b/infra/config/generated/builders/ci/Site Isolation Android/gn-args.json
@@ -10,6 +10,7 @@ "symbol_level": 1, "target_cpu": "arm64", "target_os": "android", - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/Site Isolation Android/properties.json b/infra/config/generated/builders/ci/Site Isolation Android/properties.json index 75ae79e..73c010f5 100644 --- a/infra/config/generated/builders/ci/Site Isolation Android/properties.json +++ b/infra/config/generated/builders/ci/Site Isolation Android/properties.json
@@ -50,6 +50,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/Site Isolation Android/shadow-properties.json b/infra/config/generated/builders/ci/Site Isolation Android/shadow-properties.json index 999510c..ea7a2f5 100644 --- a/infra/config/generated/builders/ci/Site Isolation Android/shadow-properties.json +++ b/infra/config/generated/builders/ci/Site Isolation Android/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 250, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/Win 10 Fast Ring/gn-args.json b/infra/config/generated/builders/ci/Win 10 Fast Ring/gn-args.json index e7422abd..7e37bfb 100644 --- a/infra/config/generated/builders/ci/Win 10 Fast Ring/gn-args.json +++ b/infra/config/generated/builders/ci/Win 10 Fast Ring/gn-args.json
@@ -4,6 +4,7 @@ "is_component_build": false, "is_debug": false, "symbol_level": 1, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/Win 10 Fast Ring/properties.json b/infra/config/generated/builders/ci/Win 10 Fast Ring/properties.json index d96f669..5cff79e3 100644 --- a/infra/config/generated/builders/ci/Win 10 Fast Ring/properties.json +++ b/infra/config/generated/builders/ci/Win 10 Fast Ring/properties.json
@@ -47,6 +47,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/Win 10 Fast Ring/shadow-properties.json b/infra/config/generated/builders/ci/Win 10 Fast Ring/shadow-properties.json index 51352a4..2a63ea5a 100644 --- a/infra/config/generated/builders/ci/Win 10 Fast Ring/shadow-properties.json +++ b/infra/config/generated/builders/ci/Win 10 Fast Ring/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 80, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git "a/infra/config/generated/builders/ci/Win x64 Builder \050reclient compare\051/gn-args.json" "b/infra/config/generated/builders/ci/Win x64 Builder \050reclient compare\051/gn-args.json" index e1a1b3b..5b66695 100644 --- "a/infra/config/generated/builders/ci/Win x64 Builder \050reclient compare\051/gn-args.json" +++ "b/infra/config/generated/builders/ci/Win x64 Builder \050reclient compare\051/gn-args.json"
@@ -6,6 +6,7 @@ "is_debug": false, "proprietary_codecs": true, "symbol_level": 1, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git "a/infra/config/generated/builders/ci/Win x64 Builder \050reclient compare\051/properties.json" "b/infra/config/generated/builders/ci/Win x64 Builder \050reclient compare\051/properties.json" index ad58112..7388f35 100644 --- "a/infra/config/generated/builders/ci/Win x64 Builder \050reclient compare\051/properties.json" +++ "b/infra/config/generated/builders/ci/Win x64 Builder \050reclient compare\051/properties.json"
@@ -55,6 +55,16 @@ }, "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted-test", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git "a/infra/config/generated/builders/ci/Win x64 Builder \050reclient\051/gn-args.json" "b/infra/config/generated/builders/ci/Win x64 Builder \050reclient\051/gn-args.json" index e1a1b3b..5b66695 100644 --- "a/infra/config/generated/builders/ci/Win x64 Builder \050reclient\051/gn-args.json" +++ "b/infra/config/generated/builders/ci/Win x64 Builder \050reclient\051/gn-args.json"
@@ -6,6 +6,7 @@ "is_debug": false, "proprietary_codecs": true, "symbol_level": 1, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git "a/infra/config/generated/builders/ci/Win x64 Builder \050reclient\051/properties.json" "b/infra/config/generated/builders/ci/Win x64 Builder \050reclient\051/properties.json" index 1804395..c362f5f 100644 --- "a/infra/config/generated/builders/ci/Win x64 Builder \050reclient\051/properties.json" +++ "b/infra/config/generated/builders/ci/Win x64 Builder \050reclient\051/properties.json"
@@ -50,6 +50,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted-test", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/android-fieldtrial-rel/gn-args.json b/infra/config/generated/builders/ci/android-fieldtrial-rel/gn-args.json index dbc3a793..162feadf 100644 --- a/infra/config/generated/builders/ci/android-fieldtrial-rel/gn-args.json +++ b/infra/config/generated/builders/ci/android-fieldtrial-rel/gn-args.json
@@ -14,6 +14,7 @@ "system_webview_shell_package_name": "org.chromium.my_webview_shell", "target_cpu": "x64", "target_os": "android", - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/android-fieldtrial-rel/properties.json b/infra/config/generated/builders/ci/android-fieldtrial-rel/properties.json index 72c5a67..25e1a865 100644 --- a/infra/config/generated/builders/ci/android-fieldtrial-rel/properties.json +++ b/infra/config/generated/builders/ci/android-fieldtrial-rel/properties.json
@@ -59,6 +59,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/android-fieldtrial-rel/shadow-properties.json b/infra/config/generated/builders/ci/android-fieldtrial-rel/shadow-properties.json index 999510c..ea7a2f5 100644 --- a/infra/config/generated/builders/ci/android-fieldtrial-rel/shadow-properties.json +++ b/infra/config/generated/builders/ci/android-fieldtrial-rel/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 250, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/android-perfetto-rel/gn-args.json b/infra/config/generated/builders/ci/android-perfetto-rel/gn-args.json index dee4888..4c7a8458 100644 --- a/infra/config/generated/builders/ci/android-perfetto-rel/gn-args.json +++ b/infra/config/generated/builders/ci/android-perfetto-rel/gn-args.json
@@ -9,6 +9,7 @@ "target_cpu": "x64", "target_os": "android", "use_perfetto_client_library": true, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/android-perfetto-rel/properties.json b/infra/config/generated/builders/ci/android-perfetto-rel/properties.json index 7e8b5cb7..15bd959 100644 --- a/infra/config/generated/builders/ci/android-perfetto-rel/properties.json +++ b/infra/config/generated/builders/ci/android-perfetto-rel/properties.json
@@ -58,6 +58,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/android-perfetto-rel/shadow-properties.json b/infra/config/generated/builders/ci/android-perfetto-rel/shadow-properties.json index 999510c..ea7a2f5 100644 --- a/infra/config/generated/builders/ci/android-perfetto-rel/shadow-properties.json +++ b/infra/config/generated/builders/ci/android-perfetto-rel/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 250, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/ios-blink-dbg-fyi/gn-args.json b/infra/config/generated/builders/ci/ios-blink-dbg-fyi/gn-args.json index 4bce3a2..7f0e613a 100644 --- a/infra/config/generated/builders/ci/ios-blink-dbg-fyi/gn-args.json +++ b/infra/config/generated/builders/ci/ios-blink-dbg-fyi/gn-args.json
@@ -11,6 +11,7 @@ "target_environment": "simulator", "target_os": "ios", "use_blink": true, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/ios-blink-dbg-fyi/properties.json b/infra/config/generated/builders/ci/ios-blink-dbg-fyi/properties.json index 028a75b..2199515 100644 --- a/infra/config/generated/builders/ci/ios-blink-dbg-fyi/properties.json +++ b/infra/config/generated/builders/ci/ios-blink-dbg-fyi/properties.json
@@ -54,6 +54,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/ios-blink-dbg-fyi/shadow-properties.json b/infra/config/generated/builders/ci/ios-blink-dbg-fyi/shadow-properties.json index 999510c..ea7a2f5 100644 --- a/infra/config/generated/builders/ci/ios-blink-dbg-fyi/shadow-properties.json +++ b/infra/config/generated/builders/ci/ios-blink-dbg-fyi/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 250, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/ios-fieldtrial-rel/gn-args.json b/infra/config/generated/builders/ci/ios-fieldtrial-rel/gn-args.json index a02531d..a7da5ef 100644 --- a/infra/config/generated/builders/ci/ios-fieldtrial-rel/gn-args.json +++ b/infra/config/generated/builders/ci/ios-fieldtrial-rel/gn-args.json
@@ -7,6 +7,7 @@ "target_cpu": "arm64", "target_environment": "simulator", "target_os": "ios", - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/ios-fieldtrial-rel/properties.json b/infra/config/generated/builders/ci/ios-fieldtrial-rel/properties.json index 2577891..519242d8 100644 --- a/infra/config/generated/builders/ci/ios-fieldtrial-rel/properties.json +++ b/infra/config/generated/builders/ci/ios-fieldtrial-rel/properties.json
@@ -53,6 +53,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/ios-fieldtrial-rel/shadow-properties.json b/infra/config/generated/builders/ci/ios-fieldtrial-rel/shadow-properties.json index 999510c..ea7a2f5 100644 --- a/infra/config/generated/builders/ci/ios-fieldtrial-rel/shadow-properties.json +++ b/infra/config/generated/builders/ci/ios-fieldtrial-rel/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 250, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/ios-m1-simulator/gn-args.json b/infra/config/generated/builders/ci/ios-m1-simulator/gn-args.json index a02531d..a7da5ef 100644 --- a/infra/config/generated/builders/ci/ios-m1-simulator/gn-args.json +++ b/infra/config/generated/builders/ci/ios-m1-simulator/gn-args.json
@@ -7,6 +7,7 @@ "target_cpu": "arm64", "target_environment": "simulator", "target_os": "ios", - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/ios-m1-simulator/properties.json b/infra/config/generated/builders/ci/ios-m1-simulator/properties.json index a2d61df..6e16b6d4 100644 --- a/infra/config/generated/builders/ci/ios-m1-simulator/properties.json +++ b/infra/config/generated/builders/ci/ios-m1-simulator/properties.json
@@ -53,6 +53,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/ios-m1-simulator/shadow-properties.json b/infra/config/generated/builders/ci/ios-m1-simulator/shadow-properties.json index 999510c..ea7a2f5 100644 --- a/infra/config/generated/builders/ci/ios-m1-simulator/shadow-properties.json +++ b/infra/config/generated/builders/ci/ios-m1-simulator/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 250, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/ios-simulator-multi-window/gn-args.json b/infra/config/generated/builders/ci/ios-simulator-multi-window/gn-args.json index e39c65b5..0ffcfae 100644 --- a/infra/config/generated/builders/ci/ios-simulator-multi-window/gn-args.json +++ b/infra/config/generated/builders/ci/ios-simulator-multi-window/gn-args.json
@@ -7,6 +7,7 @@ "target_cpu": "x64", "target_environment": "simulator", "target_os": "ios", - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/ios-simulator-multi-window/properties.json b/infra/config/generated/builders/ci/ios-simulator-multi-window/properties.json index 4bedcdd..62fa4df 100644 --- a/infra/config/generated/builders/ci/ios-simulator-multi-window/properties.json +++ b/infra/config/generated/builders/ci/ios-simulator-multi-window/properties.json
@@ -54,6 +54,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/ios-simulator-multi-window/shadow-properties.json b/infra/config/generated/builders/ci/ios-simulator-multi-window/shadow-properties.json index 999510c..ea7a2f5 100644 --- a/infra/config/generated/builders/ci/ios-simulator-multi-window/shadow-properties.json +++ b/infra/config/generated/builders/ci/ios-simulator-multi-window/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 250, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/ios-webkit-tot/gn-args.json b/infra/config/generated/builders/ci/ios-webkit-tot/gn-args.json index ee19055..f3aceb2 100644 --- a/infra/config/generated/builders/ci/ios-webkit-tot/gn-args.json +++ b/infra/config/generated/builders/ci/ios-webkit-tot/gn-args.json
@@ -8,6 +8,7 @@ "target_environment": "simulator", "target_os": "ios", "use_lld": false, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/ios-webkit-tot/properties.json b/infra/config/generated/builders/ci/ios-webkit-tot/properties.json index 63ba118..0f529f3 100644 --- a/infra/config/generated/builders/ci/ios-webkit-tot/properties.json +++ b/infra/config/generated/builders/ci/ios-webkit-tot/properties.json
@@ -51,6 +51,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/ios-webkit-tot/shadow-properties.json b/infra/config/generated/builders/ci/ios-webkit-tot/shadow-properties.json index 999510c..ea7a2f5 100644 --- a/infra/config/generated/builders/ci/ios-webkit-tot/shadow-properties.json +++ b/infra/config/generated/builders/ci/ios-webkit-tot/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 250, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/ios-wpt-fyi-rel/gn-args.json b/infra/config/generated/builders/ci/ios-wpt-fyi-rel/gn-args.json index fc1b989..5bf6045 100644 --- a/infra/config/generated/builders/ci/ios-wpt-fyi-rel/gn-args.json +++ b/infra/config/generated/builders/ci/ios-wpt-fyi-rel/gn-args.json
@@ -8,6 +8,7 @@ "target_cpu": "x64", "target_environment": "simulator", "target_os": "ios", - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/ios-wpt-fyi-rel/properties.json b/infra/config/generated/builders/ci/ios-wpt-fyi-rel/properties.json index 5b2a338..b125348 100644 --- a/infra/config/generated/builders/ci/ios-wpt-fyi-rel/properties.json +++ b/infra/config/generated/builders/ci/ios-wpt-fyi-rel/properties.json
@@ -53,6 +53,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/ios-wpt-fyi-rel/shadow-properties.json b/infra/config/generated/builders/ci/ios-wpt-fyi-rel/shadow-properties.json index 999510c..ea7a2f5 100644 --- a/infra/config/generated/builders/ci/ios-wpt-fyi-rel/shadow-properties.json +++ b/infra/config/generated/builders/ci/ios-wpt-fyi-rel/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 250, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/ios17-beta-simulator/gn-args.json b/infra/config/generated/builders/ci/ios17-beta-simulator/gn-args.json index a02531d..a7da5ef 100644 --- a/infra/config/generated/builders/ci/ios17-beta-simulator/gn-args.json +++ b/infra/config/generated/builders/ci/ios17-beta-simulator/gn-args.json
@@ -7,6 +7,7 @@ "target_cpu": "arm64", "target_environment": "simulator", "target_os": "ios", - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/ios17-beta-simulator/properties.json b/infra/config/generated/builders/ci/ios17-beta-simulator/properties.json index c9d140e..657d437 100644 --- a/infra/config/generated/builders/ci/ios17-beta-simulator/properties.json +++ b/infra/config/generated/builders/ci/ios17-beta-simulator/properties.json
@@ -54,6 +54,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/ios17-beta-simulator/shadow-properties.json b/infra/config/generated/builders/ci/ios17-beta-simulator/shadow-properties.json index 999510c..ea7a2f5 100644 --- a/infra/config/generated/builders/ci/ios17-beta-simulator/shadow-properties.json +++ b/infra/config/generated/builders/ci/ios17-beta-simulator/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 250, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/ios17-sdk-device/gn-args.json b/infra/config/generated/builders/ci/ios17-sdk-device/gn-args.json index 2e75914..22e8ca04 100644 --- a/infra/config/generated/builders/ci/ios17-sdk-device/gn-args.json +++ b/infra/config/generated/builders/ci/ios17-sdk-device/gn-args.json
@@ -8,6 +8,7 @@ "target_cpu": "arm64", "target_environment": "device", "target_os": "ios", - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/ios17-sdk-device/properties.json b/infra/config/generated/builders/ci/ios17-sdk-device/properties.json index a14f91a..d816ce8 100644 --- a/infra/config/generated/builders/ci/ios17-sdk-device/properties.json +++ b/infra/config/generated/builders/ci/ios17-sdk-device/properties.json
@@ -48,6 +48,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/ios17-sdk-device/shadow-properties.json b/infra/config/generated/builders/ci/ios17-sdk-device/shadow-properties.json index 999510c..ea7a2f5 100644 --- a/infra/config/generated/builders/ci/ios17-sdk-device/shadow-properties.json +++ b/infra/config/generated/builders/ci/ios17-sdk-device/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 250, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/ios17-sdk-simulator/gn-args.json b/infra/config/generated/builders/ci/ios17-sdk-simulator/gn-args.json index a02531d..a7da5ef 100644 --- a/infra/config/generated/builders/ci/ios17-sdk-simulator/gn-args.json +++ b/infra/config/generated/builders/ci/ios17-sdk-simulator/gn-args.json
@@ -7,6 +7,7 @@ "target_cpu": "arm64", "target_environment": "simulator", "target_os": "ios", - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/ios17-sdk-simulator/properties.json b/infra/config/generated/builders/ci/ios17-sdk-simulator/properties.json index b3d5770..d04f5eefc 100644 --- a/infra/config/generated/builders/ci/ios17-sdk-simulator/properties.json +++ b/infra/config/generated/builders/ci/ios17-sdk-simulator/properties.json
@@ -54,6 +54,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/ios17-sdk-simulator/shadow-properties.json b/infra/config/generated/builders/ci/ios17-sdk-simulator/shadow-properties.json index 999510c..ea7a2f5 100644 --- a/infra/config/generated/builders/ci/ios17-sdk-simulator/shadow-properties.json +++ b/infra/config/generated/builders/ci/ios17-sdk-simulator/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 250, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/ios18-beta-simulator/gn-args.json b/infra/config/generated/builders/ci/ios18-beta-simulator/gn-args.json index a02531d..a7da5ef 100644 --- a/infra/config/generated/builders/ci/ios18-beta-simulator/gn-args.json +++ b/infra/config/generated/builders/ci/ios18-beta-simulator/gn-args.json
@@ -7,6 +7,7 @@ "target_cpu": "arm64", "target_environment": "simulator", "target_os": "ios", - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/ios18-beta-simulator/properties.json b/infra/config/generated/builders/ci/ios18-beta-simulator/properties.json index 203d60a..e876f38f 100644 --- a/infra/config/generated/builders/ci/ios18-beta-simulator/properties.json +++ b/infra/config/generated/builders/ci/ios18-beta-simulator/properties.json
@@ -54,6 +54,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/ios18-beta-simulator/shadow-properties.json b/infra/config/generated/builders/ci/ios18-beta-simulator/shadow-properties.json index 999510c..ea7a2f5 100644 --- a/infra/config/generated/builders/ci/ios18-beta-simulator/shadow-properties.json +++ b/infra/config/generated/builders/ci/ios18-beta-simulator/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 250, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/ios18-sdk-simulator/gn-args.json b/infra/config/generated/builders/ci/ios18-sdk-simulator/gn-args.json index a02531d..a7da5ef 100644 --- a/infra/config/generated/builders/ci/ios18-sdk-simulator/gn-args.json +++ b/infra/config/generated/builders/ci/ios18-sdk-simulator/gn-args.json
@@ -7,6 +7,7 @@ "target_cpu": "arm64", "target_environment": "simulator", "target_os": "ios", - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/ios18-sdk-simulator/properties.json b/infra/config/generated/builders/ci/ios18-sdk-simulator/properties.json index f0cdeb0..b0c7893 100644 --- a/infra/config/generated/builders/ci/ios18-sdk-simulator/properties.json +++ b/infra/config/generated/builders/ci/ios18-sdk-simulator/properties.json
@@ -54,6 +54,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/ios18-sdk-simulator/shadow-properties.json b/infra/config/generated/builders/ci/ios18-sdk-simulator/shadow-properties.json index 999510c..ea7a2f5 100644 --- a/infra/config/generated/builders/ci/ios18-sdk-simulator/shadow-properties.json +++ b/infra/config/generated/builders/ci/ios18-sdk-simulator/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 250, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/linux-annotator-rel/gn-args.json b/infra/config/generated/builders/ci/linux-annotator-rel/gn-args.json index ce15f13..2ea554c 100644 --- a/infra/config/generated/builders/ci/linux-annotator-rel/gn-args.json +++ b/infra/config/generated/builders/ci/linux-annotator-rel/gn-args.json
@@ -3,6 +3,7 @@ "dcheck_always_on": false, "is_component_build": false, "is_debug": false, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/linux-annotator-rel/properties.json b/infra/config/generated/builders/ci/linux-annotator-rel/properties.json index 591dbe3d..484c63b 100644 --- a/infra/config/generated/builders/ci/linux-annotator-rel/properties.json +++ b/infra/config/generated/builders/ci/linux-annotator-rel/properties.json
@@ -53,6 +53,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/linux-annotator-rel/shadow-properties.json b/infra/config/generated/builders/ci/linux-annotator-rel/shadow-properties.json index 2997dff..7aaa9e5f 100644 --- a/infra/config/generated/builders/ci/linux-annotator-rel/shadow-properties.json +++ b/infra/config/generated/builders/ci/linux-annotator-rel/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 500, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/linux-blink-heap-verification/gn-args.json b/infra/config/generated/builders/ci/linux-blink-heap-verification/gn-args.json index dd65f6f..05feed2d 100644 --- a/infra/config/generated/builders/ci/linux-blink-heap-verification/gn-args.json +++ b/infra/config/generated/builders/ci/linux-blink-heap-verification/gn-args.json
@@ -6,6 +6,7 @@ "is_component_build": false, "is_debug": false, "proprietary_codecs": true, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/linux-blink-heap-verification/properties.json b/infra/config/generated/builders/ci/linux-blink-heap-verification/properties.json index 5ea6633..84ed9e92 100644 --- a/infra/config/generated/builders/ci/linux-blink-heap-verification/properties.json +++ b/infra/config/generated/builders/ci/linux-blink-heap-verification/properties.json
@@ -53,6 +53,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/linux-blink-heap-verification/shadow-properties.json b/infra/config/generated/builders/ci/linux-blink-heap-verification/shadow-properties.json index 2997dff..7aaa9e5f 100644 --- a/infra/config/generated/builders/ci/linux-blink-heap-verification/shadow-properties.json +++ b/infra/config/generated/builders/ci/linux-blink-heap-verification/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 500, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/linux-blink-wpt-reset-rel/gn-args.json b/infra/config/generated/builders/ci/linux-blink-wpt-reset-rel/gn-args.json index e1a1b3b..5b66695 100644 --- a/infra/config/generated/builders/ci/linux-blink-wpt-reset-rel/gn-args.json +++ b/infra/config/generated/builders/ci/linux-blink-wpt-reset-rel/gn-args.json
@@ -6,6 +6,7 @@ "is_debug": false, "proprietary_codecs": true, "symbol_level": 1, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/linux-blink-wpt-reset-rel/properties.json b/infra/config/generated/builders/ci/linux-blink-wpt-reset-rel/properties.json index 0b87923..8a280f4 100644 --- a/infra/config/generated/builders/ci/linux-blink-wpt-reset-rel/properties.json +++ b/infra/config/generated/builders/ci/linux-blink-wpt-reset-rel/properties.json
@@ -46,6 +46,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/linux-blink-wpt-reset-rel/shadow-properties.json b/infra/config/generated/builders/ci/linux-blink-wpt-reset-rel/shadow-properties.json index 999510c..ea7a2f5 100644 --- a/infra/config/generated/builders/ci/linux-blink-wpt-reset-rel/shadow-properties.json +++ b/infra/config/generated/builders/ci/linux-blink-wpt-reset-rel/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 250, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/linux-chromeos-annotator-rel/gn-args.json b/infra/config/generated/builders/ci/linux-chromeos-annotator-rel/gn-args.json index eab4743..624055f 100644 --- a/infra/config/generated/builders/ci/linux-chromeos-annotator-rel/gn-args.json +++ b/infra/config/generated/builders/ci/linux-chromeos-annotator-rel/gn-args.json
@@ -7,6 +7,7 @@ "proprietary_codecs": true, "target_os": "chromeos", "use_cups": true, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/linux-chromeos-annotator-rel/properties.json b/infra/config/generated/builders/ci/linux-chromeos-annotator-rel/properties.json index 4cc92b5..3740ac6 100644 --- a/infra/config/generated/builders/ci/linux-chromeos-annotator-rel/properties.json +++ b/infra/config/generated/builders/ci/linux-chromeos-annotator-rel/properties.json
@@ -56,6 +56,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/linux-chromeos-annotator-rel/shadow-properties.json b/infra/config/generated/builders/ci/linux-chromeos-annotator-rel/shadow-properties.json index 2997dff..7aaa9e5f 100644 --- a/infra/config/generated/builders/ci/linux-chromeos-annotator-rel/shadow-properties.json +++ b/infra/config/generated/builders/ci/linux-chromeos-annotator-rel/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 500, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/linux-chromeos-dbg-oslogin/gn-args.json b/infra/config/generated/builders/ci/linux-chromeos-dbg-oslogin/gn-args.json index 143093c..3be2794 100644 --- a/infra/config/generated/builders/ci/linux-chromeos-dbg-oslogin/gn-args.json +++ b/infra/config/generated/builders/ci/linux-chromeos-dbg-oslogin/gn-args.json
@@ -7,6 +7,7 @@ "symbol_level": 1, "target_os": "chromeos", "use_cups": true, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/linux-chromeos-dbg-oslogin/properties.json b/infra/config/generated/builders/ci/linux-chromeos-dbg-oslogin/properties.json index 4e9bb59..b093b950 100644 --- a/infra/config/generated/builders/ci/linux-chromeos-dbg-oslogin/properties.json +++ b/infra/config/generated/builders/ci/linux-chromeos-dbg-oslogin/properties.json
@@ -56,6 +56,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/linux-chromeos-dbg-oslogin/shadow-properties.json b/infra/config/generated/builders/ci/linux-chromeos-dbg-oslogin/shadow-properties.json index 999510c..ea7a2f5 100644 --- a/infra/config/generated/builders/ci/linux-chromeos-dbg-oslogin/shadow-properties.json +++ b/infra/config/generated/builders/ci/linux-chromeos-dbg-oslogin/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 250, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/linux-fieldtrial-rel/gn-args.json b/infra/config/generated/builders/ci/linux-fieldtrial-rel/gn-args.json index 5cb2ff2a..026f4e5 100644 --- a/infra/config/generated/builders/ci/linux-fieldtrial-rel/gn-args.json +++ b/infra/config/generated/builders/ci/linux-fieldtrial-rel/gn-args.json
@@ -4,6 +4,7 @@ "is_component_build": false, "is_debug": false, "symbol_level": 1, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/linux-fieldtrial-rel/properties.json b/infra/config/generated/builders/ci/linux-fieldtrial-rel/properties.json index 3a94ea3..4d09a2f 100644 --- a/infra/config/generated/builders/ci/linux-fieldtrial-rel/properties.json +++ b/infra/config/generated/builders/ci/linux-fieldtrial-rel/properties.json
@@ -53,6 +53,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/linux-fieldtrial-rel/shadow-properties.json b/infra/config/generated/builders/ci/linux-fieldtrial-rel/shadow-properties.json index 999510c..ea7a2f5 100644 --- a/infra/config/generated/builders/ci/linux-fieldtrial-rel/shadow-properties.json +++ b/infra/config/generated/builders/ci/linux-fieldtrial-rel/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 250, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/linux-headless-shell-rel/gn-args.json b/infra/config/generated/builders/ci/linux-headless-shell-rel/gn-args.json index 0517d2a..e53641e 100644 --- a/infra/config/generated/builders/ci/linux-headless-shell-rel/gn-args.json +++ b/infra/config/generated/builders/ci/linux-headless-shell-rel/gn-args.json
@@ -8,6 +8,7 @@ "media_use_ffmpeg": false, "media_use_libvpx": false, "proprietary_codecs": false, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/linux-headless-shell-rel/properties.json b/infra/config/generated/builders/ci/linux-headless-shell-rel/properties.json index 9340018..32205e8 100644 --- a/infra/config/generated/builders/ci/linux-headless-shell-rel/properties.json +++ b/infra/config/generated/builders/ci/linux-headless-shell-rel/properties.json
@@ -53,6 +53,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/linux-headless-shell-rel/shadow-properties.json b/infra/config/generated/builders/ci/linux-headless-shell-rel/shadow-properties.json index 999510c..ea7a2f5 100644 --- a/infra/config/generated/builders/ci/linux-headless-shell-rel/shadow-properties.json +++ b/infra/config/generated/builders/ci/linux-headless-shell-rel/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 250, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/linux-lacros-builder-fyi-rel/gn-args.json b/infra/config/generated/builders/ci/linux-lacros-builder-fyi-rel/gn-args.json index da9ad20..2e6ae4a0 100644 --- a/infra/config/generated/builders/ci/linux-lacros-builder-fyi-rel/gn-args.json +++ b/infra/config/generated/builders/ci/linux-lacros-builder-fyi-rel/gn-args.json
@@ -6,6 +6,7 @@ "is_component_build": false, "is_debug": false, "target_os": "chromeos", - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/linux-lacros-builder-fyi-rel/properties.json b/infra/config/generated/builders/ci/linux-lacros-builder-fyi-rel/properties.json index 02c676c67..7d4e3cd9 100644 --- a/infra/config/generated/builders/ci/linux-lacros-builder-fyi-rel/properties.json +++ b/infra/config/generated/builders/ci/linux-lacros-builder-fyi-rel/properties.json
@@ -92,6 +92,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/linux-lacros-builder-fyi-rel/shadow-properties.json b/infra/config/generated/builders/ci/linux-lacros-builder-fyi-rel/shadow-properties.json index 2997dff..7aaa9e5f 100644 --- a/infra/config/generated/builders/ci/linux-lacros-builder-fyi-rel/shadow-properties.json +++ b/infra/config/generated/builders/ci/linux-lacros-builder-fyi-rel/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 500, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git "a/infra/config/generated/builders/ci/linux-lacros-builder-rel \050reclient\051/gn-args.json" "b/infra/config/generated/builders/ci/linux-lacros-builder-rel \050reclient\051/gn-args.json" index da9ad20..2e6ae4a0 100644 --- "a/infra/config/generated/builders/ci/linux-lacros-builder-rel \050reclient\051/gn-args.json" +++ "b/infra/config/generated/builders/ci/linux-lacros-builder-rel \050reclient\051/gn-args.json"
@@ -6,6 +6,7 @@ "is_component_build": false, "is_debug": false, "target_os": "chromeos", - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git "a/infra/config/generated/builders/ci/linux-lacros-builder-rel \050reclient\051/properties.json" "b/infra/config/generated/builders/ci/linux-lacros-builder-rel \050reclient\051/properties.json" index 76b7ae7..9c970a4 100644 --- "a/infra/config/generated/builders/ci/linux-lacros-builder-rel \050reclient\051/properties.json" +++ "b/infra/config/generated/builders/ci/linux-lacros-builder-rel \050reclient\051/properties.json"
@@ -53,6 +53,16 @@ }, "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git "a/infra/config/generated/builders/ci/linux-lacros-builder-rel \050reclient\051/shadow-properties.json" "b/infra/config/generated/builders/ci/linux-lacros-builder-rel \050reclient\051/shadow-properties.json" index 2e47c5b0..7a86f82 100644 --- "a/infra/config/generated/builders/ci/linux-lacros-builder-rel \050reclient\051/shadow-properties.json" +++ "b/infra/config/generated/builders/ci/linux-lacros-builder-rel \050reclient\051/shadow-properties.json"
@@ -6,5 +6,15 @@ "RBE_cache_silo": "linux-lacros-builder-rel (reclient)" }, "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/linux-lacros-dbg-fyi/gn-args.json b/infra/config/generated/builders/ci/linux-lacros-dbg-fyi/gn-args.json index a82f4f0..533e6d9 100644 --- a/infra/config/generated/builders/ci/linux-lacros-dbg-fyi/gn-args.json +++ b/infra/config/generated/builders/ci/linux-lacros-dbg-fyi/gn-args.json
@@ -6,6 +6,7 @@ "is_debug": true, "symbol_level": 1, "target_os": "chromeos", - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/linux-lacros-dbg-fyi/properties.json b/infra/config/generated/builders/ci/linux-lacros-dbg-fyi/properties.json index 46612ec..81710d7 100644 --- a/infra/config/generated/builders/ci/linux-lacros-dbg-fyi/properties.json +++ b/infra/config/generated/builders/ci/linux-lacros-dbg-fyi/properties.json
@@ -86,6 +86,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/linux-lacros-dbg-fyi/shadow-properties.json b/infra/config/generated/builders/ci/linux-lacros-dbg-fyi/shadow-properties.json index 2997dff..7aaa9e5f 100644 --- a/infra/config/generated/builders/ci/linux-lacros-dbg-fyi/shadow-properties.json +++ b/infra/config/generated/builders/ci/linux-lacros-dbg-fyi/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 500, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/linux-lacros-rel-dangling-ptr-fyi/gn-args.json b/infra/config/generated/builders/ci/linux-lacros-rel-dangling-ptr-fyi/gn-args.json index 5198547..d1c7cdb 100644 --- a/infra/config/generated/builders/ci/linux-lacros-rel-dangling-ptr-fyi/gn-args.json +++ b/infra/config/generated/builders/ci/linux-lacros-rel-dangling-ptr-fyi/gn-args.json
@@ -10,6 +10,7 @@ "is_debug": false, "target_os": "chromeos", "use_cups": true, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/linux-lacros-rel-dangling-ptr-fyi/properties.json b/infra/config/generated/builders/ci/linux-lacros-rel-dangling-ptr-fyi/properties.json index 2060618..cd5cfe5 100644 --- a/infra/config/generated/builders/ci/linux-lacros-rel-dangling-ptr-fyi/properties.json +++ b/infra/config/generated/builders/ci/linux-lacros-rel-dangling-ptr-fyi/properties.json
@@ -57,6 +57,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/linux-lacros-rel-dangling-ptr-fyi/shadow-properties.json b/infra/config/generated/builders/ci/linux-lacros-rel-dangling-ptr-fyi/shadow-properties.json index 2997dff..7aaa9e5f 100644 --- a/infra/config/generated/builders/ci/linux-lacros-rel-dangling-ptr-fyi/shadow-properties.json +++ b/infra/config/generated/builders/ci/linux-lacros-rel-dangling-ptr-fyi/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 500, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/linux-network-sandbox-rel/gn-args.json b/infra/config/generated/builders/ci/linux-network-sandbox-rel/gn-args.json index 5cb2ff2a..026f4e5 100644 --- a/infra/config/generated/builders/ci/linux-network-sandbox-rel/gn-args.json +++ b/infra/config/generated/builders/ci/linux-network-sandbox-rel/gn-args.json
@@ -4,6 +4,7 @@ "is_component_build": false, "is_debug": false, "symbol_level": 1, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/linux-network-sandbox-rel/properties.json b/infra/config/generated/builders/ci/linux-network-sandbox-rel/properties.json index 2d3cd7b..9c7099d 100644 --- a/infra/config/generated/builders/ci/linux-network-sandbox-rel/properties.json +++ b/infra/config/generated/builders/ci/linux-network-sandbox-rel/properties.json
@@ -47,6 +47,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/linux-network-sandbox-rel/shadow-properties.json b/infra/config/generated/builders/ci/linux-network-sandbox-rel/shadow-properties.json index 999510c..ea7a2f5 100644 --- a/infra/config/generated/builders/ci/linux-network-sandbox-rel/shadow-properties.json +++ b/infra/config/generated/builders/ci/linux-network-sandbox-rel/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 250, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/linux-perfetto-rel/gn-args.json b/infra/config/generated/builders/ci/linux-perfetto-rel/gn-args.json index a6ac7b1f..2fe3bb3a 100644 --- a/infra/config/generated/builders/ci/linux-perfetto-rel/gn-args.json +++ b/infra/config/generated/builders/ci/linux-perfetto-rel/gn-args.json
@@ -4,6 +4,7 @@ "is_component_build": false, "is_debug": false, "use_perfetto_client_library": true, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/linux-perfetto-rel/properties.json b/infra/config/generated/builders/ci/linux-perfetto-rel/properties.json index e91d89e..0c4668c 100644 --- a/infra/config/generated/builders/ci/linux-perfetto-rel/properties.json +++ b/infra/config/generated/builders/ci/linux-perfetto-rel/properties.json
@@ -53,6 +53,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/linux-perfetto-rel/shadow-properties.json b/infra/config/generated/builders/ci/linux-perfetto-rel/shadow-properties.json index 999510c..ea7a2f5 100644 --- a/infra/config/generated/builders/ci/linux-perfetto-rel/shadow-properties.json +++ b/infra/config/generated/builders/ci/linux-perfetto-rel/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 250, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/linux-rel-no-external-ip/gn-args.json b/infra/config/generated/builders/ci/linux-rel-no-external-ip/gn-args.json index b849b27..7eefe53 100644 --- a/infra/config/generated/builders/ci/linux-rel-no-external-ip/gn-args.json +++ b/infra/config/generated/builders/ci/linux-rel-no-external-ip/gn-args.json
@@ -6,6 +6,7 @@ "is_component_build": false, "is_debug": false, "proprietary_codecs": true, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/linux-rel-no-external-ip/properties.json b/infra/config/generated/builders/ci/linux-rel-no-external-ip/properties.json index 91e1d284..5c922c86 100644 --- a/infra/config/generated/builders/ci/linux-rel-no-external-ip/properties.json +++ b/infra/config/generated/builders/ci/linux-rel-no-external-ip/properties.json
@@ -50,6 +50,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/linux-rel-no-external-ip/shadow-properties.json b/infra/config/generated/builders/ci/linux-rel-no-external-ip/shadow-properties.json index 999510c..ea7a2f5 100644 --- a/infra/config/generated/builders/ci/linux-rel-no-external-ip/shadow-properties.json +++ b/infra/config/generated/builders/ci/linux-rel-no-external-ip/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 250, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/linux-rr-fyi/gn-args.json b/infra/config/generated/builders/ci/linux-rr-fyi/gn-args.json index ce15f13..2ea554c 100644 --- a/infra/config/generated/builders/ci/linux-rr-fyi/gn-args.json +++ b/infra/config/generated/builders/ci/linux-rr-fyi/gn-args.json
@@ -3,6 +3,7 @@ "dcheck_always_on": false, "is_component_build": false, "is_debug": false, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/linux-upload-perfetto/gn-args.json b/infra/config/generated/builders/ci/linux-upload-perfetto/gn-args.json index 7aa45ce8..24c77cb 100644 --- a/infra/config/generated/builders/ci/linux-upload-perfetto/gn-args.json +++ b/infra/config/generated/builders/ci/linux-upload-perfetto/gn-args.json
@@ -4,6 +4,7 @@ "enable_perfetto_zlib": true, "is_component_build": false, "is_debug": false, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/linux-upload-perfetto/properties.json b/infra/config/generated/builders/ci/linux-upload-perfetto/properties.json index be0af845..048de304 100644 --- a/infra/config/generated/builders/ci/linux-upload-perfetto/properties.json +++ b/infra/config/generated/builders/ci/linux-upload-perfetto/properties.json
@@ -47,6 +47,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/linux-upload-perfetto/shadow-properties.json b/infra/config/generated/builders/ci/linux-upload-perfetto/shadow-properties.json index 999510c..ea7a2f5 100644 --- a/infra/config/generated/builders/ci/linux-upload-perfetto/shadow-properties.json +++ b/infra/config/generated/builders/ci/linux-upload-perfetto/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 250, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/linux-wpt-chromium-rel/gn-args.json b/infra/config/generated/builders/ci/linux-wpt-chromium-rel/gn-args.json index 40d5c10..b365922 100644 --- a/infra/config/generated/builders/ci/linux-wpt-chromium-rel/gn-args.json +++ b/infra/config/generated/builders/ci/linux-wpt-chromium-rel/gn-args.json
@@ -6,6 +6,7 @@ "is_debug": false, "proprietary_codecs": true, "symbol_level": 1, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/linux-wpt-chromium-rel/properties.json b/infra/config/generated/builders/ci/linux-wpt-chromium-rel/properties.json index d96ca2a..eb30103 100644 --- a/infra/config/generated/builders/ci/linux-wpt-chromium-rel/properties.json +++ b/infra/config/generated/builders/ci/linux-wpt-chromium-rel/properties.json
@@ -53,6 +53,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/linux-wpt-chromium-rel/shadow-properties.json b/infra/config/generated/builders/ci/linux-wpt-chromium-rel/shadow-properties.json index 999510c..ea7a2f5 100644 --- a/infra/config/generated/builders/ci/linux-wpt-chromium-rel/shadow-properties.json +++ b/infra/config/generated/builders/ci/linux-wpt-chromium-rel/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 250, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/linux-wpt-content-shell-asan-fyi-rel/gn-args.json b/infra/config/generated/builders/ci/linux-wpt-content-shell-asan-fyi-rel/gn-args.json index 7066e169..5fe32cd 100644 --- a/infra/config/generated/builders/ci/linux-wpt-content-shell-asan-fyi-rel/gn-args.json +++ b/infra/config/generated/builders/ci/linux-wpt-content-shell-asan-fyi-rel/gn-args.json
@@ -6,6 +6,7 @@ "is_debug": false, "is_lsan": true, "symbol_level": 1, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/linux-wpt-content-shell-asan-fyi-rel/properties.json b/infra/config/generated/builders/ci/linux-wpt-content-shell-asan-fyi-rel/properties.json index aed6374..faddbdc 100644 --- a/infra/config/generated/builders/ci/linux-wpt-content-shell-asan-fyi-rel/properties.json +++ b/infra/config/generated/builders/ci/linux-wpt-content-shell-asan-fyi-rel/properties.json
@@ -47,6 +47,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/linux-wpt-content-shell-asan-fyi-rel/shadow-properties.json b/infra/config/generated/builders/ci/linux-wpt-content-shell-asan-fyi-rel/shadow-properties.json index 999510c..ea7a2f5 100644 --- a/infra/config/generated/builders/ci/linux-wpt-content-shell-asan-fyi-rel/shadow-properties.json +++ b/infra/config/generated/builders/ci/linux-wpt-content-shell-asan-fyi-rel/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 250, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/linux-wpt-content-shell-fyi-rel/gn-args.json b/infra/config/generated/builders/ci/linux-wpt-content-shell-fyi-rel/gn-args.json index e1a1b3b..5b66695 100644 --- a/infra/config/generated/builders/ci/linux-wpt-content-shell-fyi-rel/gn-args.json +++ b/infra/config/generated/builders/ci/linux-wpt-content-shell-fyi-rel/gn-args.json
@@ -6,6 +6,7 @@ "is_debug": false, "proprietary_codecs": true, "symbol_level": 1, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/linux-wpt-content-shell-fyi-rel/properties.json b/infra/config/generated/builders/ci/linux-wpt-content-shell-fyi-rel/properties.json index 6c0dcc5f..35ff417 100644 --- a/infra/config/generated/builders/ci/linux-wpt-content-shell-fyi-rel/properties.json +++ b/infra/config/generated/builders/ci/linux-wpt-content-shell-fyi-rel/properties.json
@@ -52,6 +52,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/linux-wpt-content-shell-fyi-rel/shadow-properties.json b/infra/config/generated/builders/ci/linux-wpt-content-shell-fyi-rel/shadow-properties.json index 999510c..ea7a2f5 100644 --- a/infra/config/generated/builders/ci/linux-wpt-content-shell-fyi-rel/shadow-properties.json +++ b/infra/config/generated/builders/ci/linux-wpt-content-shell-fyi-rel/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 250, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/linux-wpt-content-shell-leak-detection/gn-args.json b/infra/config/generated/builders/ci/linux-wpt-content-shell-leak-detection/gn-args.json index e1a1b3b..5b66695 100644 --- a/infra/config/generated/builders/ci/linux-wpt-content-shell-leak-detection/gn-args.json +++ b/infra/config/generated/builders/ci/linux-wpt-content-shell-leak-detection/gn-args.json
@@ -6,6 +6,7 @@ "is_debug": false, "proprietary_codecs": true, "symbol_level": 1, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/linux-wpt-content-shell-leak-detection/properties.json b/infra/config/generated/builders/ci/linux-wpt-content-shell-leak-detection/properties.json index ffdf5d6..d953c2fa4 100644 --- a/infra/config/generated/builders/ci/linux-wpt-content-shell-leak-detection/properties.json +++ b/infra/config/generated/builders/ci/linux-wpt-content-shell-leak-detection/properties.json
@@ -52,6 +52,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/linux-wpt-content-shell-leak-detection/shadow-properties.json b/infra/config/generated/builders/ci/linux-wpt-content-shell-leak-detection/shadow-properties.json index 999510c..ea7a2f5 100644 --- a/infra/config/generated/builders/ci/linux-wpt-content-shell-leak-detection/shadow-properties.json +++ b/infra/config/generated/builders/ci/linux-wpt-content-shell-leak-detection/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 250, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/mac-osxbeta-rel/gn-args.json b/infra/config/generated/builders/ci/mac-osxbeta-rel/gn-args.json index cb9f174..130ad35 100644 --- a/infra/config/generated/builders/ci/mac-osxbeta-rel/gn-args.json +++ b/infra/config/generated/builders/ci/mac-osxbeta-rel/gn-args.json
@@ -7,6 +7,7 @@ "proprietary_codecs": true, "symbol_level": 0, "target_cpu": "x64", - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/mac-osxbeta-rel/properties.json b/infra/config/generated/builders/ci/mac-osxbeta-rel/properties.json index c00e2308..61d5c48 100644 --- a/infra/config/generated/builders/ci/mac-osxbeta-rel/properties.json +++ b/infra/config/generated/builders/ci/mac-osxbeta-rel/properties.json
@@ -53,6 +53,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/mac-osxbeta-rel/shadow-properties.json b/infra/config/generated/builders/ci/mac-osxbeta-rel/shadow-properties.json index 999510c..ea7a2f5 100644 --- a/infra/config/generated/builders/ci/mac-osxbeta-rel/shadow-properties.json +++ b/infra/config/generated/builders/ci/mac-osxbeta-rel/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 250, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/mac-perfetto-rel/gn-args.json b/infra/config/generated/builders/ci/mac-perfetto-rel/gn-args.json index f7a4b62..f68349a 100644 --- a/infra/config/generated/builders/ci/mac-perfetto-rel/gn-args.json +++ b/infra/config/generated/builders/ci/mac-perfetto-rel/gn-args.json
@@ -5,6 +5,7 @@ "is_debug": false, "target_cpu": "x64", "use_perfetto_client_library": true, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/mac-perfetto-rel/properties.json b/infra/config/generated/builders/ci/mac-perfetto-rel/properties.json index d6b4ce7..772b6bb 100644 --- a/infra/config/generated/builders/ci/mac-perfetto-rel/properties.json +++ b/infra/config/generated/builders/ci/mac-perfetto-rel/properties.json
@@ -52,6 +52,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/mac-perfetto-rel/shadow-properties.json b/infra/config/generated/builders/ci/mac-perfetto-rel/shadow-properties.json index 999510c..ea7a2f5 100644 --- a/infra/config/generated/builders/ci/mac-perfetto-rel/shadow-properties.json +++ b/infra/config/generated/builders/ci/mac-perfetto-rel/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 250, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/mac-upload-perfetto/gn-args.json b/infra/config/generated/builders/ci/mac-upload-perfetto/gn-args.json index 7aa45ce8..24c77cb 100644 --- a/infra/config/generated/builders/ci/mac-upload-perfetto/gn-args.json +++ b/infra/config/generated/builders/ci/mac-upload-perfetto/gn-args.json
@@ -4,6 +4,7 @@ "enable_perfetto_zlib": true, "is_component_build": false, "is_debug": false, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/mac-upload-perfetto/properties.json b/infra/config/generated/builders/ci/mac-upload-perfetto/properties.json index 23e699f..22ee313 100644 --- a/infra/config/generated/builders/ci/mac-upload-perfetto/properties.json +++ b/infra/config/generated/builders/ci/mac-upload-perfetto/properties.json
@@ -47,6 +47,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/mac-upload-perfetto/shadow-properties.json b/infra/config/generated/builders/ci/mac-upload-perfetto/shadow-properties.json index 999510c..ea7a2f5 100644 --- a/infra/config/generated/builders/ci/mac-upload-perfetto/shadow-properties.json +++ b/infra/config/generated/builders/ci/mac-upload-perfetto/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 250, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/mac10.15-wpt-content-shell-fyi-rel/gn-args.json b/infra/config/generated/builders/ci/mac10.15-wpt-content-shell-fyi-rel/gn-args.json index e1a1b3b..5b66695 100644 --- a/infra/config/generated/builders/ci/mac10.15-wpt-content-shell-fyi-rel/gn-args.json +++ b/infra/config/generated/builders/ci/mac10.15-wpt-content-shell-fyi-rel/gn-args.json
@@ -6,6 +6,7 @@ "is_debug": false, "proprietary_codecs": true, "symbol_level": 1, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/mac10.15-wpt-content-shell-fyi-rel/properties.json b/infra/config/generated/builders/ci/mac10.15-wpt-content-shell-fyi-rel/properties.json index 6a234ae2..4d71976e 100644 --- a/infra/config/generated/builders/ci/mac10.15-wpt-content-shell-fyi-rel/properties.json +++ b/infra/config/generated/builders/ci/mac10.15-wpt-content-shell-fyi-rel/properties.json
@@ -52,6 +52,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/mac10.15-wpt-content-shell-fyi-rel/shadow-properties.json b/infra/config/generated/builders/ci/mac10.15-wpt-content-shell-fyi-rel/shadow-properties.json index 999510c..ea7a2f5 100644 --- a/infra/config/generated/builders/ci/mac10.15-wpt-content-shell-fyi-rel/shadow-properties.json +++ b/infra/config/generated/builders/ci/mac10.15-wpt-content-shell-fyi-rel/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 250, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/mac11-arm64-wpt-content-shell-fyi-rel/gn-args.json b/infra/config/generated/builders/ci/mac11-arm64-wpt-content-shell-fyi-rel/gn-args.json index 73da9ed..14c5b15c 100644 --- a/infra/config/generated/builders/ci/mac11-arm64-wpt-content-shell-fyi-rel/gn-args.json +++ b/infra/config/generated/builders/ci/mac11-arm64-wpt-content-shell-fyi-rel/gn-args.json
@@ -7,6 +7,7 @@ "proprietary_codecs": true, "symbol_level": 1, "target_cpu": "arm64", - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/mac11-arm64-wpt-content-shell-fyi-rel/properties.json b/infra/config/generated/builders/ci/mac11-arm64-wpt-content-shell-fyi-rel/properties.json index e8cb6dbe..984aeed 100644 --- a/infra/config/generated/builders/ci/mac11-arm64-wpt-content-shell-fyi-rel/properties.json +++ b/infra/config/generated/builders/ci/mac11-arm64-wpt-content-shell-fyi-rel/properties.json
@@ -52,6 +52,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/mac11-arm64-wpt-content-shell-fyi-rel/shadow-properties.json b/infra/config/generated/builders/ci/mac11-arm64-wpt-content-shell-fyi-rel/shadow-properties.json index 999510c..ea7a2f5 100644 --- a/infra/config/generated/builders/ci/mac11-arm64-wpt-content-shell-fyi-rel/shadow-properties.json +++ b/infra/config/generated/builders/ci/mac11-arm64-wpt-content-shell-fyi-rel/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 250, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/mac11-wpt-content-shell-fyi-rel/gn-args.json b/infra/config/generated/builders/ci/mac11-wpt-content-shell-fyi-rel/gn-args.json index 137ae77f..4ed67c6 100644 --- a/infra/config/generated/builders/ci/mac11-wpt-content-shell-fyi-rel/gn-args.json +++ b/infra/config/generated/builders/ci/mac11-wpt-content-shell-fyi-rel/gn-args.json
@@ -7,6 +7,7 @@ "proprietary_codecs": true, "symbol_level": 1, "target_cpu": "x64", - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/mac11-wpt-content-shell-fyi-rel/properties.json b/infra/config/generated/builders/ci/mac11-wpt-content-shell-fyi-rel/properties.json index 4c23adb3..ecb92ac 100644 --- a/infra/config/generated/builders/ci/mac11-wpt-content-shell-fyi-rel/properties.json +++ b/infra/config/generated/builders/ci/mac11-wpt-content-shell-fyi-rel/properties.json
@@ -52,6 +52,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/mac11-wpt-content-shell-fyi-rel/shadow-properties.json b/infra/config/generated/builders/ci/mac11-wpt-content-shell-fyi-rel/shadow-properties.json index 999510c..ea7a2f5 100644 --- a/infra/config/generated/builders/ci/mac11-wpt-content-shell-fyi-rel/shadow-properties.json +++ b/infra/config/generated/builders/ci/mac11-wpt-content-shell-fyi-rel/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 250, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/mac12-arm64-wpt-content-shell-fyi-rel/gn-args.json b/infra/config/generated/builders/ci/mac12-arm64-wpt-content-shell-fyi-rel/gn-args.json index 73da9ed..14c5b15c 100644 --- a/infra/config/generated/builders/ci/mac12-arm64-wpt-content-shell-fyi-rel/gn-args.json +++ b/infra/config/generated/builders/ci/mac12-arm64-wpt-content-shell-fyi-rel/gn-args.json
@@ -7,6 +7,7 @@ "proprietary_codecs": true, "symbol_level": 1, "target_cpu": "arm64", - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/mac12-arm64-wpt-content-shell-fyi-rel/properties.json b/infra/config/generated/builders/ci/mac12-arm64-wpt-content-shell-fyi-rel/properties.json index 9d0a19d..e5828935 100644 --- a/infra/config/generated/builders/ci/mac12-arm64-wpt-content-shell-fyi-rel/properties.json +++ b/infra/config/generated/builders/ci/mac12-arm64-wpt-content-shell-fyi-rel/properties.json
@@ -53,6 +53,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/mac12-arm64-wpt-content-shell-fyi-rel/shadow-properties.json b/infra/config/generated/builders/ci/mac12-arm64-wpt-content-shell-fyi-rel/shadow-properties.json index 999510c..ea7a2f5 100644 --- a/infra/config/generated/builders/ci/mac12-arm64-wpt-content-shell-fyi-rel/shadow-properties.json +++ b/infra/config/generated/builders/ci/mac12-arm64-wpt-content-shell-fyi-rel/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 250, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/mac12-wpt-content-shell-fyi-rel/gn-args.json b/infra/config/generated/builders/ci/mac12-wpt-content-shell-fyi-rel/gn-args.json index 137ae77f..4ed67c6 100644 --- a/infra/config/generated/builders/ci/mac12-wpt-content-shell-fyi-rel/gn-args.json +++ b/infra/config/generated/builders/ci/mac12-wpt-content-shell-fyi-rel/gn-args.json
@@ -7,6 +7,7 @@ "proprietary_codecs": true, "symbol_level": 1, "target_cpu": "x64", - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/mac12-wpt-content-shell-fyi-rel/properties.json b/infra/config/generated/builders/ci/mac12-wpt-content-shell-fyi-rel/properties.json index 3fd1914..31831a63 100644 --- a/infra/config/generated/builders/ci/mac12-wpt-content-shell-fyi-rel/properties.json +++ b/infra/config/generated/builders/ci/mac12-wpt-content-shell-fyi-rel/properties.json
@@ -52,6 +52,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/mac12-wpt-content-shell-fyi-rel/shadow-properties.json b/infra/config/generated/builders/ci/mac12-wpt-content-shell-fyi-rel/shadow-properties.json index 999510c..ea7a2f5 100644 --- a/infra/config/generated/builders/ci/mac12-wpt-content-shell-fyi-rel/shadow-properties.json +++ b/infra/config/generated/builders/ci/mac12-wpt-content-shell-fyi-rel/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 250, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/mac13-arm64-wpt-content-shell-fyi-rel/gn-args.json b/infra/config/generated/builders/ci/mac13-arm64-wpt-content-shell-fyi-rel/gn-args.json index 73da9ed..14c5b15c 100644 --- a/infra/config/generated/builders/ci/mac13-arm64-wpt-content-shell-fyi-rel/gn-args.json +++ b/infra/config/generated/builders/ci/mac13-arm64-wpt-content-shell-fyi-rel/gn-args.json
@@ -7,6 +7,7 @@ "proprietary_codecs": true, "symbol_level": 1, "target_cpu": "arm64", - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/mac13-arm64-wpt-content-shell-fyi-rel/properties.json b/infra/config/generated/builders/ci/mac13-arm64-wpt-content-shell-fyi-rel/properties.json index 1a839f3..cc3f0a3 100644 --- a/infra/config/generated/builders/ci/mac13-arm64-wpt-content-shell-fyi-rel/properties.json +++ b/infra/config/generated/builders/ci/mac13-arm64-wpt-content-shell-fyi-rel/properties.json
@@ -53,6 +53,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/mac13-arm64-wpt-content-shell-fyi-rel/shadow-properties.json b/infra/config/generated/builders/ci/mac13-arm64-wpt-content-shell-fyi-rel/shadow-properties.json index 999510c..ea7a2f5 100644 --- a/infra/config/generated/builders/ci/mac13-arm64-wpt-content-shell-fyi-rel/shadow-properties.json +++ b/infra/config/generated/builders/ci/mac13-arm64-wpt-content-shell-fyi-rel/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 250, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/mac13-wpt-content-shell-fyi-rel/gn-args.json b/infra/config/generated/builders/ci/mac13-wpt-content-shell-fyi-rel/gn-args.json index e1a1b3b..5b66695 100644 --- a/infra/config/generated/builders/ci/mac13-wpt-content-shell-fyi-rel/gn-args.json +++ b/infra/config/generated/builders/ci/mac13-wpt-content-shell-fyi-rel/gn-args.json
@@ -6,6 +6,7 @@ "is_debug": false, "proprietary_codecs": true, "symbol_level": 1, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/mac13-wpt-content-shell-fyi-rel/properties.json b/infra/config/generated/builders/ci/mac13-wpt-content-shell-fyi-rel/properties.json index 7465a2e..b9972b4 100644 --- a/infra/config/generated/builders/ci/mac13-wpt-content-shell-fyi-rel/properties.json +++ b/infra/config/generated/builders/ci/mac13-wpt-content-shell-fyi-rel/properties.json
@@ -52,6 +52,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/mac13-wpt-content-shell-fyi-rel/shadow-properties.json b/infra/config/generated/builders/ci/mac13-wpt-content-shell-fyi-rel/shadow-properties.json index 999510c..ea7a2f5 100644 --- a/infra/config/generated/builders/ci/mac13-wpt-content-shell-fyi-rel/shadow-properties.json +++ b/infra/config/generated/builders/ci/mac13-wpt-content-shell-fyi-rel/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 250, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/win-annotator-rel/gn-args.json b/infra/config/generated/builders/ci/win-annotator-rel/gn-args.json index ce15f13..2ea554c 100644 --- a/infra/config/generated/builders/ci/win-annotator-rel/gn-args.json +++ b/infra/config/generated/builders/ci/win-annotator-rel/gn-args.json
@@ -3,6 +3,7 @@ "dcheck_always_on": false, "is_component_build": false, "is_debug": false, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/win-annotator-rel/properties.json b/infra/config/generated/builders/ci/win-annotator-rel/properties.json index d20193a..3138637 100644 --- a/infra/config/generated/builders/ci/win-annotator-rel/properties.json +++ b/infra/config/generated/builders/ci/win-annotator-rel/properties.json
@@ -53,6 +53,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/win-annotator-rel/shadow-properties.json b/infra/config/generated/builders/ci/win-annotator-rel/shadow-properties.json index 51352a4..2a63ea5a 100644 --- a/infra/config/generated/builders/ci/win-annotator-rel/shadow-properties.json +++ b/infra/config/generated/builders/ci/win-annotator-rel/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 80, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/win-fieldtrial-rel/gn-args.json b/infra/config/generated/builders/ci/win-fieldtrial-rel/gn-args.json index 5cb2ff2a..026f4e5 100644 --- a/infra/config/generated/builders/ci/win-fieldtrial-rel/gn-args.json +++ b/infra/config/generated/builders/ci/win-fieldtrial-rel/gn-args.json
@@ -4,6 +4,7 @@ "is_component_build": false, "is_debug": false, "symbol_level": 1, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/win-fieldtrial-rel/properties.json b/infra/config/generated/builders/ci/win-fieldtrial-rel/properties.json index 5c13264..7701c5d1 100644 --- a/infra/config/generated/builders/ci/win-fieldtrial-rel/properties.json +++ b/infra/config/generated/builders/ci/win-fieldtrial-rel/properties.json
@@ -53,6 +53,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/win-fieldtrial-rel/shadow-properties.json b/infra/config/generated/builders/ci/win-fieldtrial-rel/shadow-properties.json index 51352a4..2a63ea5a 100644 --- a/infra/config/generated/builders/ci/win-fieldtrial-rel/shadow-properties.json +++ b/infra/config/generated/builders/ci/win-fieldtrial-rel/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 80, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/win-perfetto-rel/gn-args.json b/infra/config/generated/builders/ci/win-perfetto-rel/gn-args.json index a6ac7b1f..2fe3bb3a 100644 --- a/infra/config/generated/builders/ci/win-perfetto-rel/gn-args.json +++ b/infra/config/generated/builders/ci/win-perfetto-rel/gn-args.json
@@ -4,6 +4,7 @@ "is_component_build": false, "is_debug": false, "use_perfetto_client_library": true, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/win-perfetto-rel/properties.json b/infra/config/generated/builders/ci/win-perfetto-rel/properties.json index c0c6ad78..1bbe20b 100644 --- a/infra/config/generated/builders/ci/win-perfetto-rel/properties.json +++ b/infra/config/generated/builders/ci/win-perfetto-rel/properties.json
@@ -52,6 +52,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/win-perfetto-rel/shadow-properties.json b/infra/config/generated/builders/ci/win-perfetto-rel/shadow-properties.json index 999510c..ea7a2f5 100644 --- a/infra/config/generated/builders/ci/win-perfetto-rel/shadow-properties.json +++ b/infra/config/generated/builders/ci/win-perfetto-rel/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 250, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/win-upload-perfetto/gn-args.json b/infra/config/generated/builders/ci/win-upload-perfetto/gn-args.json index 7aa45ce8..24c77cb 100644 --- a/infra/config/generated/builders/ci/win-upload-perfetto/gn-args.json +++ b/infra/config/generated/builders/ci/win-upload-perfetto/gn-args.json
@@ -4,6 +4,7 @@ "enable_perfetto_zlib": true, "is_component_build": false, "is_debug": false, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/win-upload-perfetto/properties.json b/infra/config/generated/builders/ci/win-upload-perfetto/properties.json index f3a4dbd..16ca96c 100644 --- a/infra/config/generated/builders/ci/win-upload-perfetto/properties.json +++ b/infra/config/generated/builders/ci/win-upload-perfetto/properties.json
@@ -47,6 +47,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/win-upload-perfetto/shadow-properties.json b/infra/config/generated/builders/ci/win-upload-perfetto/shadow-properties.json index 51352a4..2a63ea5a 100644 --- a/infra/config/generated/builders/ci/win-upload-perfetto/shadow-properties.json +++ b/infra/config/generated/builders/ci/win-upload-perfetto/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 80, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/win10-multiscreen-fyi-rel/gn-args.json b/infra/config/generated/builders/ci/win10-multiscreen-fyi-rel/gn-args.json index e1a1b3b..5b66695 100644 --- a/infra/config/generated/builders/ci/win10-multiscreen-fyi-rel/gn-args.json +++ b/infra/config/generated/builders/ci/win10-multiscreen-fyi-rel/gn-args.json
@@ -6,6 +6,7 @@ "is_debug": false, "proprietary_codecs": true, "symbol_level": 1, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/win10-multiscreen-fyi-rel/properties.json b/infra/config/generated/builders/ci/win10-multiscreen-fyi-rel/properties.json index de722bd2..63e308ae 100644 --- a/infra/config/generated/builders/ci/win10-multiscreen-fyi-rel/properties.json +++ b/infra/config/generated/builders/ci/win10-multiscreen-fyi-rel/properties.json
@@ -52,6 +52,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/win10-multiscreen-fyi-rel/shadow-properties.json b/infra/config/generated/builders/ci/win10-multiscreen-fyi-rel/shadow-properties.json index 999510c..ea7a2f5 100644 --- a/infra/config/generated/builders/ci/win10-multiscreen-fyi-rel/shadow-properties.json +++ b/infra/config/generated/builders/ci/win10-multiscreen-fyi-rel/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 250, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/win10-rel-no-external-ip/gn-args.json b/infra/config/generated/builders/ci/win10-rel-no-external-ip/gn-args.json index e1a1b3b..5b66695 100644 --- a/infra/config/generated/builders/ci/win10-rel-no-external-ip/gn-args.json +++ b/infra/config/generated/builders/ci/win10-rel-no-external-ip/gn-args.json
@@ -6,6 +6,7 @@ "is_debug": false, "proprietary_codecs": true, "symbol_level": 1, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/win10-rel-no-external-ip/properties.json b/infra/config/generated/builders/ci/win10-rel-no-external-ip/properties.json index 5e2a70a4..8140dc6 100644 --- a/infra/config/generated/builders/ci/win10-rel-no-external-ip/properties.json +++ b/infra/config/generated/builders/ci/win10-rel-no-external-ip/properties.json
@@ -51,6 +51,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/win10-rel-no-external-ip/shadow-properties.json b/infra/config/generated/builders/ci/win10-rel-no-external-ip/shadow-properties.json index 999510c..ea7a2f5 100644 --- a/infra/config/generated/builders/ci/win10-rel-no-external-ip/shadow-properties.json +++ b/infra/config/generated/builders/ci/win10-rel-no-external-ip/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 250, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/win10-wpt-content-shell-fyi-rel/gn-args.json b/infra/config/generated/builders/ci/win10-wpt-content-shell-fyi-rel/gn-args.json index e1a1b3b..5b66695 100644 --- a/infra/config/generated/builders/ci/win10-wpt-content-shell-fyi-rel/gn-args.json +++ b/infra/config/generated/builders/ci/win10-wpt-content-shell-fyi-rel/gn-args.json
@@ -6,6 +6,7 @@ "is_debug": false, "proprietary_codecs": true, "symbol_level": 1, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/win10-wpt-content-shell-fyi-rel/properties.json b/infra/config/generated/builders/ci/win10-wpt-content-shell-fyi-rel/properties.json index 8d1d1f3..45cdc2b 100644 --- a/infra/config/generated/builders/ci/win10-wpt-content-shell-fyi-rel/properties.json +++ b/infra/config/generated/builders/ci/win10-wpt-content-shell-fyi-rel/properties.json
@@ -52,6 +52,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/win10-wpt-content-shell-fyi-rel/shadow-properties.json b/infra/config/generated/builders/ci/win10-wpt-content-shell-fyi-rel/shadow-properties.json index 999510c..ea7a2f5 100644 --- a/infra/config/generated/builders/ci/win10-wpt-content-shell-fyi-rel/shadow-properties.json +++ b/infra/config/generated/builders/ci/win10-wpt-content-shell-fyi-rel/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 250, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/win11-wpt-content-shell-fyi-rel/gn-args.json b/infra/config/generated/builders/ci/win11-wpt-content-shell-fyi-rel/gn-args.json index e1a1b3b..5b66695 100644 --- a/infra/config/generated/builders/ci/win11-wpt-content-shell-fyi-rel/gn-args.json +++ b/infra/config/generated/builders/ci/win11-wpt-content-shell-fyi-rel/gn-args.json
@@ -6,6 +6,7 @@ "is_debug": false, "proprietary_codecs": true, "symbol_level": 1, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/win11-wpt-content-shell-fyi-rel/properties.json b/infra/config/generated/builders/ci/win11-wpt-content-shell-fyi-rel/properties.json index ad9495e..30a40c9 100644 --- a/infra/config/generated/builders/ci/win11-wpt-content-shell-fyi-rel/properties.json +++ b/infra/config/generated/builders/ci/win11-wpt-content-shell-fyi-rel/properties.json
@@ -52,6 +52,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/win32-arm64-rel/gn-args.json b/infra/config/generated/builders/ci/win32-arm64-rel/gn-args.json index fe751bb..2c76b8a 100644 --- a/infra/config/generated/builders/ci/win32-arm64-rel/gn-args.json +++ b/infra/config/generated/builders/ci/win32-arm64-rel/gn-args.json
@@ -5,6 +5,7 @@ "is_debug": false, "symbol_level": 1, "target_cpu": "arm64", - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/ci/win32-arm64-rel/properties.json b/infra/config/generated/builders/ci/win32-arm64-rel/properties.json index 45727058..bb7cd15 100644 --- a/infra/config/generated/builders/ci/win32-arm64-rel/properties.json +++ b/infra/config/generated/builders/ci/win32-arm64-rel/properties.json
@@ -48,6 +48,16 @@ "metrics_project": "chromium-reclient-metrics", "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted", + "remote_jobs": 250 + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/ci/win32-arm64-rel/shadow-properties.json b/infra/config/generated/builders/ci/win32-arm64-rel/shadow-properties.json index 227ab04..b659678 100644 --- a/infra/config/generated/builders/ci/win32-arm64-rel/shadow-properties.json +++ b/infra/config/generated/builders/ci/win32-arm64-rel/shadow-properties.json
@@ -4,5 +4,15 @@ "jobs": 150, "metrics_project": "chromium-reclient-metrics", "scandeps_server": true + }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted", + "remote_jobs": 250 } } \ No newline at end of file
diff --git "a/infra/config/generated/builders/reclient/Comparison Linux \050reclient vs reclient remote links\051/gn-args.json" "b/infra/config/generated/builders/reclient/Comparison Linux \050reclient vs reclient remote links\051/gn-args.json" index cc1c444..9ebe4ac 100644 --- "a/infra/config/generated/builders/reclient/Comparison Linux \050reclient vs reclient remote links\051/gn-args.json" +++ "b/infra/config/generated/builders/reclient/Comparison Linux \050reclient vs reclient remote links\051/gn-args.json"
@@ -7,7 +7,8 @@ "is_component_build": false, "is_debug": false, "proprietary_codecs": true, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } }, "build2": { @@ -19,7 +20,8 @@ "is_debug": false, "proprietary_codecs": true, "use_remoteexec": true, - "use_remoteexec_links": true + "use_remoteexec_links": true, + "use_siso": true } } }
diff --git "a/infra/config/generated/builders/reclient/Comparison Linux \050reclient\051/gn-args.json" "b/infra/config/generated/builders/reclient/Comparison Linux \050reclient\051/gn-args.json" index 073526a..49c3b87 100644 --- "a/infra/config/generated/builders/reclient/Comparison Linux \050reclient\051/gn-args.json" +++ "b/infra/config/generated/builders/reclient/Comparison Linux \050reclient\051/gn-args.json"
@@ -7,7 +7,8 @@ "is_component_build": false, "is_debug": false, "proprietary_codecs": true, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } }, "build2": { @@ -17,7 +18,8 @@ "is_component_build": false, "is_debug": false, "proprietary_codecs": true, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } }
diff --git "a/infra/config/generated/builders/reclient/Linux Builder \050canonical wd\051 \050reclient compare\051/gn-args.json" "b/infra/config/generated/builders/reclient/Linux Builder \050canonical wd\051 \050reclient compare\051/gn-args.json" index afc96b6..c35df1a2 100644 --- "a/infra/config/generated/builders/reclient/Linux Builder \050canonical wd\051 \050reclient compare\051/gn-args.json" +++ "b/infra/config/generated/builders/reclient/Linux Builder \050canonical wd\051 \050reclient compare\051/gn-args.json"
@@ -5,6 +5,7 @@ "is_debug": true, "proprietary_codecs": true, "symbol_level": 1, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git "a/infra/config/generated/builders/reclient/Linux Builder \050canonical wd\051 \050reclient compare\051/properties.json" "b/infra/config/generated/builders/reclient/Linux Builder \050canonical wd\051 \050reclient compare\051/properties.json" index 0cbaceb..05e76cc 100644 --- "a/infra/config/generated/builders/reclient/Linux Builder \050canonical wd\051 \050reclient compare\051/properties.json" +++ "b/infra/config/generated/builders/reclient/Linux Builder \050canonical wd\051 \050reclient compare\051/properties.json"
@@ -62,6 +62,15 @@ }, "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted-test" + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/reclient/Linux Builder reclient staging untrusted/gn-args.json b/infra/config/generated/builders/reclient/Linux Builder reclient staging untrusted/gn-args.json index 9343f21c..e088770 100644 --- a/infra/config/generated/builders/reclient/Linux Builder reclient staging untrusted/gn-args.json +++ b/infra/config/generated/builders/reclient/Linux Builder reclient staging untrusted/gn-args.json
@@ -5,6 +5,7 @@ "is_component_build": false, "is_debug": false, "proprietary_codecs": true, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/reclient/Linux Builder reclient staging untrusted/properties.json b/infra/config/generated/builders/reclient/Linux Builder reclient staging untrusted/properties.json index 9d52238..b205e9f 100644 --- a/infra/config/generated/builders/reclient/Linux Builder reclient staging untrusted/properties.json +++ b/infra/config/generated/builders/reclient/Linux Builder reclient staging untrusted/properties.json
@@ -59,6 +59,15 @@ }, "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted" + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/reclient/Linux Builder reclient staging/gn-args.json b/infra/config/generated/builders/reclient/Linux Builder reclient staging/gn-args.json index 9343f21c..e088770 100644 --- a/infra/config/generated/builders/reclient/Linux Builder reclient staging/gn-args.json +++ b/infra/config/generated/builders/reclient/Linux Builder reclient staging/gn-args.json
@@ -5,6 +5,7 @@ "is_component_build": false, "is_debug": false, "proprietary_codecs": true, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/reclient/Linux Builder reclient staging/properties.json b/infra/config/generated/builders/reclient/Linux Builder reclient staging/properties.json index 396e7e4..39504bf 100644 --- a/infra/config/generated/builders/reclient/Linux Builder reclient staging/properties.json +++ b/infra/config/generated/builders/reclient/Linux Builder reclient staging/properties.json
@@ -59,6 +59,15 @@ }, "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted" + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git "a/infra/config/generated/builders/reclient/Linux Builder reclient test \050casng\051 untrusted/gn-args.json" "b/infra/config/generated/builders/reclient/Linux Builder reclient test \050casng\051 untrusted/gn-args.json" index 9343f21c..e088770 100644 --- "a/infra/config/generated/builders/reclient/Linux Builder reclient test \050casng\051 untrusted/gn-args.json" +++ "b/infra/config/generated/builders/reclient/Linux Builder reclient test \050casng\051 untrusted/gn-args.json"
@@ -5,6 +5,7 @@ "is_component_build": false, "is_debug": false, "proprietary_codecs": true, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git "a/infra/config/generated/builders/reclient/Linux Builder reclient test \050casng\051 untrusted/properties.json" "b/infra/config/generated/builders/reclient/Linux Builder reclient test \050casng\051 untrusted/properties.json" index 3a47e268..9133ff2 100644 --- "a/infra/config/generated/builders/reclient/Linux Builder reclient test \050casng\051 untrusted/properties.json" +++ "b/infra/config/generated/builders/reclient/Linux Builder reclient test \050casng\051 untrusted/properties.json"
@@ -60,6 +60,15 @@ }, "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted-test" + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git "a/infra/config/generated/builders/reclient/Linux Builder reclient test \050casng\051/gn-args.json" "b/infra/config/generated/builders/reclient/Linux Builder reclient test \050casng\051/gn-args.json" index 9343f21c..e088770 100644 --- "a/infra/config/generated/builders/reclient/Linux Builder reclient test \050casng\051/gn-args.json" +++ "b/infra/config/generated/builders/reclient/Linux Builder reclient test \050casng\051/gn-args.json"
@@ -5,6 +5,7 @@ "is_component_build": false, "is_debug": false, "proprietary_codecs": true, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git "a/infra/config/generated/builders/reclient/Linux Builder reclient test \050casng\051/properties.json" "b/infra/config/generated/builders/reclient/Linux Builder reclient test \050casng\051/properties.json" index 0ef1bd9..e66afcd 100644 --- "a/infra/config/generated/builders/reclient/Linux Builder reclient test \050casng\051/properties.json" +++ "b/infra/config/generated/builders/reclient/Linux Builder reclient test \050casng\051/properties.json"
@@ -60,6 +60,15 @@ }, "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted-test" + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git "a/infra/config/generated/builders/reclient/Linux Builder reclient test \050unified uploads\051 untrusted/gn-args.json" "b/infra/config/generated/builders/reclient/Linux Builder reclient test \050unified uploads\051 untrusted/gn-args.json" index 9343f21c..e088770 100644 --- "a/infra/config/generated/builders/reclient/Linux Builder reclient test \050unified uploads\051 untrusted/gn-args.json" +++ "b/infra/config/generated/builders/reclient/Linux Builder reclient test \050unified uploads\051 untrusted/gn-args.json"
@@ -5,6 +5,7 @@ "is_component_build": false, "is_debug": false, "proprietary_codecs": true, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git "a/infra/config/generated/builders/reclient/Linux Builder reclient test \050unified uploads\051 untrusted/properties.json" "b/infra/config/generated/builders/reclient/Linux Builder reclient test \050unified uploads\051 untrusted/properties.json" index 3307aad..2f9a45c 100644 --- "a/infra/config/generated/builders/reclient/Linux Builder reclient test \050unified uploads\051 untrusted/properties.json" +++ "b/infra/config/generated/builders/reclient/Linux Builder reclient test \050unified uploads\051 untrusted/properties.json"
@@ -60,6 +60,15 @@ }, "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted-test" + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git "a/infra/config/generated/builders/reclient/Linux Builder reclient test \050unified uploads\051/gn-args.json" "b/infra/config/generated/builders/reclient/Linux Builder reclient test \050unified uploads\051/gn-args.json" index 9343f21c..e088770 100644 --- "a/infra/config/generated/builders/reclient/Linux Builder reclient test \050unified uploads\051/gn-args.json" +++ "b/infra/config/generated/builders/reclient/Linux Builder reclient test \050unified uploads\051/gn-args.json"
@@ -5,6 +5,7 @@ "is_component_build": false, "is_debug": false, "proprietary_codecs": true, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git "a/infra/config/generated/builders/reclient/Linux Builder reclient test \050unified uploads\051/properties.json" "b/infra/config/generated/builders/reclient/Linux Builder reclient test \050unified uploads\051/properties.json" index f05eb1a..ef5180df 100644 --- "a/infra/config/generated/builders/reclient/Linux Builder reclient test \050unified uploads\051/properties.json" +++ "b/infra/config/generated/builders/reclient/Linux Builder reclient test \050unified uploads\051/properties.json"
@@ -60,6 +60,15 @@ }, "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted-test" + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/reclient/Linux Builder reclient test untrusted/gn-args.json b/infra/config/generated/builders/reclient/Linux Builder reclient test untrusted/gn-args.json index 9343f21c..e088770 100644 --- a/infra/config/generated/builders/reclient/Linux Builder reclient test untrusted/gn-args.json +++ b/infra/config/generated/builders/reclient/Linux Builder reclient test untrusted/gn-args.json
@@ -5,6 +5,7 @@ "is_component_build": false, "is_debug": false, "proprietary_codecs": true, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/reclient/Linux Builder reclient test untrusted/properties.json b/infra/config/generated/builders/reclient/Linux Builder reclient test untrusted/properties.json index 30b3775..727f08a9 100644 --- a/infra/config/generated/builders/reclient/Linux Builder reclient test untrusted/properties.json +++ b/infra/config/generated/builders/reclient/Linux Builder reclient test untrusted/properties.json
@@ -60,6 +60,15 @@ }, "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted-test" + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/reclient/Linux Builder reclient test/gn-args.json b/infra/config/generated/builders/reclient/Linux Builder reclient test/gn-args.json index 9343f21c..e088770 100644 --- a/infra/config/generated/builders/reclient/Linux Builder reclient test/gn-args.json +++ b/infra/config/generated/builders/reclient/Linux Builder reclient test/gn-args.json
@@ -5,6 +5,7 @@ "is_component_build": false, "is_debug": false, "proprietary_codecs": true, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/reclient/Linux Builder reclient test/properties.json b/infra/config/generated/builders/reclient/Linux Builder reclient test/properties.json index 880299e..d3629f0f 100644 --- a/infra/config/generated/builders/reclient/Linux Builder reclient test/properties.json +++ b/infra/config/generated/builders/reclient/Linux Builder reclient test/properties.json
@@ -60,6 +60,15 @@ }, "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted-test" + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/reclient/Mac Builder reclient staging untrusted/gn-args.json b/infra/config/generated/builders/reclient/Mac Builder reclient staging untrusted/gn-args.json index e1a1b3b..5b66695 100644 --- a/infra/config/generated/builders/reclient/Mac Builder reclient staging untrusted/gn-args.json +++ b/infra/config/generated/builders/reclient/Mac Builder reclient staging untrusted/gn-args.json
@@ -6,6 +6,7 @@ "is_debug": false, "proprietary_codecs": true, "symbol_level": 1, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/reclient/Mac Builder reclient staging untrusted/properties.json b/infra/config/generated/builders/reclient/Mac Builder reclient staging untrusted/properties.json index 59d89ba..fb39427 100644 --- a/infra/config/generated/builders/reclient/Mac Builder reclient staging untrusted/properties.json +++ b/infra/config/generated/builders/reclient/Mac Builder reclient staging untrusted/properties.json
@@ -61,6 +61,15 @@ }, "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted" + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/reclient/Mac Builder reclient staging/gn-args.json b/infra/config/generated/builders/reclient/Mac Builder reclient staging/gn-args.json index e1a1b3b..5b66695 100644 --- a/infra/config/generated/builders/reclient/Mac Builder reclient staging/gn-args.json +++ b/infra/config/generated/builders/reclient/Mac Builder reclient staging/gn-args.json
@@ -6,6 +6,7 @@ "is_debug": false, "proprietary_codecs": true, "symbol_level": 1, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/reclient/Mac Builder reclient staging/properties.json b/infra/config/generated/builders/reclient/Mac Builder reclient staging/properties.json index eb97ae8..26b67a8 100644 --- a/infra/config/generated/builders/reclient/Mac Builder reclient staging/properties.json +++ b/infra/config/generated/builders/reclient/Mac Builder reclient staging/properties.json
@@ -61,6 +61,15 @@ }, "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted" + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/reclient/Mac Builder reclient test untrusted/gn-args.json b/infra/config/generated/builders/reclient/Mac Builder reclient test untrusted/gn-args.json index e1a1b3b..5b66695 100644 --- a/infra/config/generated/builders/reclient/Mac Builder reclient test untrusted/gn-args.json +++ b/infra/config/generated/builders/reclient/Mac Builder reclient test untrusted/gn-args.json
@@ -6,6 +6,7 @@ "is_debug": false, "proprietary_codecs": true, "symbol_level": 1, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/reclient/Mac Builder reclient test untrusted/properties.json b/infra/config/generated/builders/reclient/Mac Builder reclient test untrusted/properties.json index 4702f63..4870d1a 100644 --- a/infra/config/generated/builders/reclient/Mac Builder reclient test untrusted/properties.json +++ b/infra/config/generated/builders/reclient/Mac Builder reclient test untrusted/properties.json
@@ -63,6 +63,15 @@ }, "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted-test" + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/reclient/Mac Builder reclient test/gn-args.json b/infra/config/generated/builders/reclient/Mac Builder reclient test/gn-args.json index e1a1b3b..5b66695 100644 --- a/infra/config/generated/builders/reclient/Mac Builder reclient test/gn-args.json +++ b/infra/config/generated/builders/reclient/Mac Builder reclient test/gn-args.json
@@ -6,6 +6,7 @@ "is_debug": false, "proprietary_codecs": true, "symbol_level": 1, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/reclient/Mac Builder reclient test/properties.json b/infra/config/generated/builders/reclient/Mac Builder reclient test/properties.json index ccb4b83..9230960 100644 --- a/infra/config/generated/builders/reclient/Mac Builder reclient test/properties.json +++ b/infra/config/generated/builders/reclient/Mac Builder reclient test/properties.json
@@ -63,6 +63,15 @@ }, "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted-test" + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/reclient/Simple Chrome Builder reclient staging untrusted/gn-args.json b/infra/config/generated/builders/reclient/Simple Chrome Builder reclient staging untrusted/gn-args.json index 13ca3b7..dc1f8c8 100644 --- a/infra/config/generated/builders/reclient/Simple Chrome Builder reclient staging untrusted/gn-args.json +++ b/infra/config/generated/builders/reclient/Simple Chrome Builder reclient staging untrusted/gn-args.json
@@ -6,6 +6,7 @@ "is_chromeos_device": true, "ozone_platform_headless": true, "use_real_dbus_clients": false, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/reclient/Simple Chrome Builder reclient staging untrusted/properties.json b/infra/config/generated/builders/reclient/Simple Chrome Builder reclient staging untrusted/properties.json index a2b37c1..d11c3754 100644 --- a/infra/config/generated/builders/reclient/Simple Chrome Builder reclient staging untrusted/properties.json +++ b/infra/config/generated/builders/reclient/Simple Chrome Builder reclient staging untrusted/properties.json
@@ -66,6 +66,15 @@ }, "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted" + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/reclient/Simple Chrome Builder reclient staging/gn-args.json b/infra/config/generated/builders/reclient/Simple Chrome Builder reclient staging/gn-args.json index 13ca3b7..dc1f8c8 100644 --- a/infra/config/generated/builders/reclient/Simple Chrome Builder reclient staging/gn-args.json +++ b/infra/config/generated/builders/reclient/Simple Chrome Builder reclient staging/gn-args.json
@@ -6,6 +6,7 @@ "is_chromeos_device": true, "ozone_platform_headless": true, "use_real_dbus_clients": false, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/reclient/Simple Chrome Builder reclient staging/properties.json b/infra/config/generated/builders/reclient/Simple Chrome Builder reclient staging/properties.json index 73932ae..f64e2b3 100644 --- a/infra/config/generated/builders/reclient/Simple Chrome Builder reclient staging/properties.json +++ b/infra/config/generated/builders/reclient/Simple Chrome Builder reclient staging/properties.json
@@ -66,6 +66,15 @@ }, "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted" + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/reclient/Simple Chrome Builder reclient test untrusted/gn-args.json b/infra/config/generated/builders/reclient/Simple Chrome Builder reclient test untrusted/gn-args.json index 13ca3b7..dc1f8c8 100644 --- a/infra/config/generated/builders/reclient/Simple Chrome Builder reclient test untrusted/gn-args.json +++ b/infra/config/generated/builders/reclient/Simple Chrome Builder reclient test untrusted/gn-args.json
@@ -6,6 +6,7 @@ "is_chromeos_device": true, "ozone_platform_headless": true, "use_real_dbus_clients": false, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/reclient/Simple Chrome Builder reclient test untrusted/properties.json b/infra/config/generated/builders/reclient/Simple Chrome Builder reclient test untrusted/properties.json index 81e38953..76b40a7 100644 --- a/infra/config/generated/builders/reclient/Simple Chrome Builder reclient test untrusted/properties.json +++ b/infra/config/generated/builders/reclient/Simple Chrome Builder reclient test untrusted/properties.json
@@ -66,6 +66,15 @@ }, "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted-test" + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/reclient/Simple Chrome Builder reclient test/gn-args.json b/infra/config/generated/builders/reclient/Simple Chrome Builder reclient test/gn-args.json index 13ca3b7..dc1f8c8 100644 --- a/infra/config/generated/builders/reclient/Simple Chrome Builder reclient test/gn-args.json +++ b/infra/config/generated/builders/reclient/Simple Chrome Builder reclient test/gn-args.json
@@ -6,6 +6,7 @@ "is_chromeos_device": true, "ozone_platform_headless": true, "use_real_dbus_clients": false, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/reclient/Simple Chrome Builder reclient test/properties.json b/infra/config/generated/builders/reclient/Simple Chrome Builder reclient test/properties.json index ebeefcb..09c9892 100644 --- a/infra/config/generated/builders/reclient/Simple Chrome Builder reclient test/properties.json +++ b/infra/config/generated/builders/reclient/Simple Chrome Builder reclient test/properties.json
@@ -66,6 +66,15 @@ }, "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted-test" + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/reclient/Win x64 Builder reclient staging untrusted/gn-args.json b/infra/config/generated/builders/reclient/Win x64 Builder reclient staging untrusted/gn-args.json index e1a1b3b..5b66695 100644 --- a/infra/config/generated/builders/reclient/Win x64 Builder reclient staging untrusted/gn-args.json +++ b/infra/config/generated/builders/reclient/Win x64 Builder reclient staging untrusted/gn-args.json
@@ -6,6 +6,7 @@ "is_debug": false, "proprietary_codecs": true, "symbol_level": 1, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/reclient/Win x64 Builder reclient staging untrusted/properties.json b/infra/config/generated/builders/reclient/Win x64 Builder reclient staging untrusted/properties.json index 14a99253..0ac51246 100644 --- a/infra/config/generated/builders/reclient/Win x64 Builder reclient staging untrusted/properties.json +++ b/infra/config/generated/builders/reclient/Win x64 Builder reclient staging untrusted/properties.json
@@ -59,6 +59,15 @@ }, "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted" + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/reclient/Win x64 Builder reclient staging/gn-args.json b/infra/config/generated/builders/reclient/Win x64 Builder reclient staging/gn-args.json index e1a1b3b..5b66695 100644 --- a/infra/config/generated/builders/reclient/Win x64 Builder reclient staging/gn-args.json +++ b/infra/config/generated/builders/reclient/Win x64 Builder reclient staging/gn-args.json
@@ -6,6 +6,7 @@ "is_debug": false, "proprietary_codecs": true, "symbol_level": 1, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/reclient/Win x64 Builder reclient staging/properties.json b/infra/config/generated/builders/reclient/Win x64 Builder reclient staging/properties.json index 7b2295c..6360ff26 100644 --- a/infra/config/generated/builders/reclient/Win x64 Builder reclient staging/properties.json +++ b/infra/config/generated/builders/reclient/Win x64 Builder reclient staging/properties.json
@@ -59,6 +59,15 @@ }, "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted" + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/reclient/Win x64 Builder reclient test untrusted/gn-args.json b/infra/config/generated/builders/reclient/Win x64 Builder reclient test untrusted/gn-args.json index e1a1b3b..5b66695 100644 --- a/infra/config/generated/builders/reclient/Win x64 Builder reclient test untrusted/gn-args.json +++ b/infra/config/generated/builders/reclient/Win x64 Builder reclient test untrusted/gn-args.json
@@ -6,6 +6,7 @@ "is_debug": false, "proprietary_codecs": true, "symbol_level": 1, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/reclient/Win x64 Builder reclient test untrusted/properties.json b/infra/config/generated/builders/reclient/Win x64 Builder reclient test untrusted/properties.json index 7644e9a..abcc595f 100644 --- a/infra/config/generated/builders/reclient/Win x64 Builder reclient test untrusted/properties.json +++ b/infra/config/generated/builders/reclient/Win x64 Builder reclient test untrusted/properties.json
@@ -60,6 +60,15 @@ }, "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted-test" + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/reclient/Win x64 Builder reclient test/gn-args.json b/infra/config/generated/builders/reclient/Win x64 Builder reclient test/gn-args.json index e1a1b3b..5b66695 100644 --- a/infra/config/generated/builders/reclient/Win x64 Builder reclient test/gn-args.json +++ b/infra/config/generated/builders/reclient/Win x64 Builder reclient test/gn-args.json
@@ -6,6 +6,7 @@ "is_debug": false, "proprietary_codecs": true, "symbol_level": 1, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/reclient/Win x64 Builder reclient test/properties.json b/infra/config/generated/builders/reclient/Win x64 Builder reclient test/properties.json index 64885cd7..de7de7f 100644 --- a/infra/config/generated/builders/reclient/Win x64 Builder reclient test/properties.json +++ b/infra/config/generated/builders/reclient/Win x64 Builder reclient test/properties.json
@@ -60,6 +60,15 @@ }, "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted-test" + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git "a/infra/config/generated/builders/reclient/Win x64 Cross Builder \050reclient compare\051/gn-args.json" "b/infra/config/generated/builders/reclient/Win x64 Cross Builder \050reclient compare\051/gn-args.json" index e1a1b3b..5b66695 100644 --- "a/infra/config/generated/builders/reclient/Win x64 Cross Builder \050reclient compare\051/gn-args.json" +++ "b/infra/config/generated/builders/reclient/Win x64 Cross Builder \050reclient compare\051/gn-args.json"
@@ -6,6 +6,7 @@ "is_debug": false, "proprietary_codecs": true, "symbol_level": 1, - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git "a/infra/config/generated/builders/reclient/Win x64 Cross Builder \050reclient compare\051/properties.json" "b/infra/config/generated/builders/reclient/Win x64 Cross Builder \050reclient compare\051/properties.json" index e96add0..aad415c 100644 --- "a/infra/config/generated/builders/reclient/Win x64 Cross Builder \050reclient compare\051/properties.json" +++ "b/infra/config/generated/builders/reclient/Win x64 Cross Builder \050reclient compare\051/properties.json"
@@ -60,6 +60,15 @@ }, "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted" + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/reclient/Windows Cross deterministic/gn-args.json b/infra/config/generated/builders/reclient/Windows Cross deterministic/gn-args.json index 7011c1c0..5da5f28f5 100644 --- a/infra/config/generated/builders/reclient/Windows Cross deterministic/gn-args.json +++ b/infra/config/generated/builders/reclient/Windows Cross deterministic/gn-args.json
@@ -6,7 +6,8 @@ "is_component_build": false, "is_debug": false, "symbol_level": 1, - "target_cpu": "x86" + "target_cpu": "x86", + "use_siso": true } }, "reclient": { @@ -16,7 +17,8 @@ "is_debug": false, "symbol_level": 1, "target_cpu": "x86", - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } }
diff --git a/infra/config/generated/builders/reclient/ios-simulator reclient staging untrusted/gn-args.json b/infra/config/generated/builders/reclient/ios-simulator reclient staging untrusted/gn-args.json index e39c65b5..0ffcfae 100644 --- a/infra/config/generated/builders/reclient/ios-simulator reclient staging untrusted/gn-args.json +++ b/infra/config/generated/builders/reclient/ios-simulator reclient staging untrusted/gn-args.json
@@ -7,6 +7,7 @@ "target_cpu": "x64", "target_environment": "simulator", "target_os": "ios", - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/reclient/ios-simulator reclient staging untrusted/properties.json b/infra/config/generated/builders/reclient/ios-simulator reclient staging untrusted/properties.json index 3fd6b0bb..bc9ad1f6 100644 --- a/infra/config/generated/builders/reclient/ios-simulator reclient staging untrusted/properties.json +++ b/infra/config/generated/builders/reclient/ios-simulator reclient staging untrusted/properties.json
@@ -61,6 +61,15 @@ }, "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted" + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/reclient/ios-simulator reclient staging/gn-args.json b/infra/config/generated/builders/reclient/ios-simulator reclient staging/gn-args.json index e39c65b5..0ffcfae 100644 --- a/infra/config/generated/builders/reclient/ios-simulator reclient staging/gn-args.json +++ b/infra/config/generated/builders/reclient/ios-simulator reclient staging/gn-args.json
@@ -7,6 +7,7 @@ "target_cpu": "x64", "target_environment": "simulator", "target_os": "ios", - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/reclient/ios-simulator reclient staging/properties.json b/infra/config/generated/builders/reclient/ios-simulator reclient staging/properties.json index 69442dd0a..c931476 100644 --- a/infra/config/generated/builders/reclient/ios-simulator reclient staging/properties.json +++ b/infra/config/generated/builders/reclient/ios-simulator reclient staging/properties.json
@@ -61,6 +61,15 @@ }, "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted" + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/reclient/ios-simulator reclient test untrusted/gn-args.json b/infra/config/generated/builders/reclient/ios-simulator reclient test untrusted/gn-args.json index e39c65b5..0ffcfae 100644 --- a/infra/config/generated/builders/reclient/ios-simulator reclient test untrusted/gn-args.json +++ b/infra/config/generated/builders/reclient/ios-simulator reclient test untrusted/gn-args.json
@@ -7,6 +7,7 @@ "target_cpu": "x64", "target_environment": "simulator", "target_os": "ios", - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/reclient/ios-simulator reclient test untrusted/properties.json b/infra/config/generated/builders/reclient/ios-simulator reclient test untrusted/properties.json index ab9aa8f2..77e4175 100644 --- a/infra/config/generated/builders/reclient/ios-simulator reclient test untrusted/properties.json +++ b/infra/config/generated/builders/reclient/ios-simulator reclient test untrusted/properties.json
@@ -61,6 +61,15 @@ }, "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted-test" + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/reclient/ios-simulator reclient test/gn-args.json b/infra/config/generated/builders/reclient/ios-simulator reclient test/gn-args.json index e39c65b5..0ffcfae 100644 --- a/infra/config/generated/builders/reclient/ios-simulator reclient test/gn-args.json +++ b/infra/config/generated/builders/reclient/ios-simulator reclient test/gn-args.json
@@ -7,6 +7,7 @@ "target_cpu": "x64", "target_environment": "simulator", "target_os": "ios", - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/reclient/ios-simulator reclient test/properties.json b/infra/config/generated/builders/reclient/ios-simulator reclient test/properties.json index eba3139..99c8b6b 100644 --- a/infra/config/generated/builders/reclient/ios-simulator reclient test/properties.json +++ b/infra/config/generated/builders/reclient/ios-simulator reclient test/properties.json
@@ -61,6 +61,15 @@ }, "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted-test" + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/reclient/mac-arm64-rel reclient staging untrusted/gn-args.json b/infra/config/generated/builders/reclient/mac-arm64-rel reclient staging untrusted/gn-args.json index 73da9ed..14c5b15c 100644 --- a/infra/config/generated/builders/reclient/mac-arm64-rel reclient staging untrusted/gn-args.json +++ b/infra/config/generated/builders/reclient/mac-arm64-rel reclient staging untrusted/gn-args.json
@@ -7,6 +7,7 @@ "proprietary_codecs": true, "symbol_level": 1, "target_cpu": "arm64", - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/reclient/mac-arm64-rel reclient staging untrusted/properties.json b/infra/config/generated/builders/reclient/mac-arm64-rel reclient staging untrusted/properties.json index 85ef008..8f6a27b 100644 --- a/infra/config/generated/builders/reclient/mac-arm64-rel reclient staging untrusted/properties.json +++ b/infra/config/generated/builders/reclient/mac-arm64-rel reclient staging untrusted/properties.json
@@ -60,6 +60,15 @@ }, "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted" + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/reclient/mac-arm64-rel reclient staging/gn-args.json b/infra/config/generated/builders/reclient/mac-arm64-rel reclient staging/gn-args.json index 73da9ed..14c5b15c 100644 --- a/infra/config/generated/builders/reclient/mac-arm64-rel reclient staging/gn-args.json +++ b/infra/config/generated/builders/reclient/mac-arm64-rel reclient staging/gn-args.json
@@ -7,6 +7,7 @@ "proprietary_codecs": true, "symbol_level": 1, "target_cpu": "arm64", - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/reclient/mac-arm64-rel reclient staging/properties.json b/infra/config/generated/builders/reclient/mac-arm64-rel reclient staging/properties.json index 1da3c73a..d3473dd 100644 --- a/infra/config/generated/builders/reclient/mac-arm64-rel reclient staging/properties.json +++ b/infra/config/generated/builders/reclient/mac-arm64-rel reclient staging/properties.json
@@ -60,6 +60,15 @@ }, "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted" + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/reclient/mac-arm64-rel reclient test untrusted/gn-args.json b/infra/config/generated/builders/reclient/mac-arm64-rel reclient test untrusted/gn-args.json index 73da9ed..14c5b15c 100644 --- a/infra/config/generated/builders/reclient/mac-arm64-rel reclient test untrusted/gn-args.json +++ b/infra/config/generated/builders/reclient/mac-arm64-rel reclient test untrusted/gn-args.json
@@ -7,6 +7,7 @@ "proprietary_codecs": true, "symbol_level": 1, "target_cpu": "arm64", - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/reclient/mac-arm64-rel reclient test untrusted/properties.json b/infra/config/generated/builders/reclient/mac-arm64-rel reclient test untrusted/properties.json index c309c8c..5eb78f26 100644 --- a/infra/config/generated/builders/reclient/mac-arm64-rel reclient test untrusted/properties.json +++ b/infra/config/generated/builders/reclient/mac-arm64-rel reclient test untrusted/properties.json
@@ -60,6 +60,15 @@ }, "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-untrusted-test" + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/builders/reclient/mac-arm64-rel reclient test/gn-args.json b/infra/config/generated/builders/reclient/mac-arm64-rel reclient test/gn-args.json index 73da9ed..14c5b15c 100644 --- a/infra/config/generated/builders/reclient/mac-arm64-rel reclient test/gn-args.json +++ b/infra/config/generated/builders/reclient/mac-arm64-rel reclient test/gn-args.json
@@ -7,6 +7,7 @@ "proprietary_codecs": true, "symbol_level": 1, "target_cpu": "arm64", - "use_remoteexec": true + "use_remoteexec": true, + "use_siso": true } } \ No newline at end of file
diff --git a/infra/config/generated/builders/reclient/mac-arm64-rel reclient test/properties.json b/infra/config/generated/builders/reclient/mac-arm64-rel reclient test/properties.json index e1e3aa5..2f3219e 100644 --- a/infra/config/generated/builders/reclient/mac-arm64-rel reclient test/properties.json +++ b/infra/config/generated/builders/reclient/mac-arm64-rel reclient test/properties.json
@@ -60,6 +60,15 @@ }, "scandeps_server": true }, + "$build/siso": { + "configs": [ + "builder" + ], + "enable_cloud_profiler": true, + "enable_cloud_trace": true, + "experiments": [], + "project": "rbe-chromium-trusted-test" + }, "$recipe_engine/resultdb/test_presentation": { "column_keys": [], "grouping_keys": [
diff --git a/infra/config/generated/luci/cr-buildbucket.cfg b/infra/config/generated/luci/cr-buildbucket.cfg index 7a57b96..3a039d0f7 100644 --- a/infra/config/generated/luci/cr-buildbucket.cfg +++ b/infra/config/generated/luci/cr-buildbucket.cfg
@@ -5268,6 +5268,16 @@ ' "metrics_project": "chromium-reclient-metrics",' ' "scandeps_server": true' ' },' + ' "$build/siso": {' + ' "configs": [' + ' "builder"' + ' ],' + ' "enable_cloud_profiler": true,' + ' "enable_cloud_trace": true,' + ' "experiments": [],' + ' "project": "rbe-chromium-trusted-test",' + ' "remote_jobs": 250' + ' },' ' "$recipe_engine/resultdb/test_presentation": {' ' "column_keys": [],' ' "grouping_keys": [' @@ -5338,6 +5348,16 @@ ' "jobs": 250,' ' "metrics_project": "chromium-reclient-metrics",' ' "scandeps_server": true' + ' },' + ' "$build/siso": {' + ' "configs": [' + ' "builder"' + ' ],' + ' "enable_cloud_profiler": true,' + ' "enable_cloud_trace": true,' + ' "experiments": [],' + ' "project": "rbe-chromium-untrusted-test",' + ' "remote_jobs": 250' ' }' '}' dimensions: "free_space:" @@ -5372,6 +5392,16 @@ ' "metrics_project": "chromium-reclient-metrics",' ' "scandeps_server": true' ' },' + ' "$build/siso": {' + ' "configs": [' + ' "builder"' + ' ],' + ' "enable_cloud_profiler": true,' + ' "enable_cloud_trace": true,' + ' "experiments": [],' + ' "project": "rbe-chromium-trusted-test",' + ' "remote_jobs": 250' + ' },' ' "$recipe_engine/resultdb/test_presentation": {' ' "column_keys": [],' ' "grouping_keys": [' @@ -5442,6 +5472,16 @@ ' "jobs": 250,' ' "metrics_project": "chromium-reclient-metrics",' ' "scandeps_server": true' + ' },' + ' "$build/siso": {' + ' "configs": [' + ' "builder"' + ' ],' + ' "enable_cloud_profiler": true,' + ' "enable_cloud_trace": true,' + ' "experiments": [],' + ' "project": "rbe-chromium-untrusted-test",' + ' "remote_jobs": 250' ' }' '}' dimensions: "free_space:" @@ -5483,7 +5523,8 @@ ' "enable_cloud_profiler": true,' ' "enable_cloud_trace": true,' ' "experiments": [],' - ' "project": "rbe-chromium-untrusted-test"' + ' "project": "rbe-chromium-untrusted-test",' + ' "remote_jobs": 250' ' },' ' "$recipe_engine/resultdb/test_presentation": {' ' "column_keys": [],' @@ -5563,7 +5604,8 @@ ' "enable_cloud_profiler": true,' ' "enable_cloud_trace": true,' ' "experiments": [],' - ' "project": "rbe-chromium-untrusted-test"' + ' "project": "rbe-chromium-untrusted-test",' + ' "remote_jobs": 250' ' }' '}' dimensions: "free_space:" @@ -5597,6 +5639,16 @@ ' "metrics_project": "chromium-reclient-metrics",' ' "scandeps_server": true' ' },' + ' "$build/siso": {' + ' "configs": [' + ' "builder"' + ' ],' + ' "enable_cloud_profiler": true,' + ' "enable_cloud_trace": true,' + ' "experiments": [],' + ' "project": "rbe-chromium-trusted-test",' + ' "remote_jobs": 250' + ' },' ' "$recipe_engine/resultdb/test_presentation": {' ' "column_keys": [],' ' "grouping_keys": [' @@ -5667,6 +5719,16 @@ ' "jobs": 250,' ' "metrics_project": "chromium-reclient-metrics",' ' "scandeps_server": true' + ' },' + ' "$build/siso": {' + ' "configs": [' + ' "builder"' + ' ],' + ' "enable_cloud_profiler": true,' + ' "enable_cloud_trace": true,' + ' "experiments": [],' + ' "project": "rbe-chromium-untrusted-test",' + ' "remote_jobs": 250' ' }' '}' dimensions: "free_space:" @@ -5701,6 +5763,16 @@ ' "metrics_project": "chromium-reclient-metrics",' ' "scandeps_server": true' ' },' + ' "$build/siso": {' + ' "configs": [' + ' "builder"' + ' ],' + ' "enable_cloud_profiler": true,' + ' "enable_cloud_trace": true,' + ' "experiments": [],' + ' "project": "rbe-chromium-untrusted-test",' + ' "remote_jobs": 250' + ' },' ' "$recipe_engine/resultdb/test_presentation": {' ' "column_keys": [],' ' "grouping_keys": [' @@ -5772,6 +5844,16 @@ ' "jobs": 150,' ' "metrics_project": "chromium-reclient-metrics",' ' "scandeps_server": true' + ' },' + ' "$build/siso": {' + ' "configs": [' + ' "builder"' + ' ],' + ' "enable_cloud_profiler": true,' + ' "enable_cloud_trace": true,' + ' "experiments": [],' + ' "project": "rbe-chromium-untrusted-test",' + ' "remote_jobs": 250' ' }' '}' dimensions: "free_space:" @@ -5805,6 +5887,16 @@ ' "metrics_project": "chromium-reclient-metrics",' ' "scandeps_server": true' ' },' + ' "$build/siso": {' + ' "configs": [' + ' "builder"' + ' ],' + ' "enable_cloud_profiler": true,' + ' "enable_cloud_trace": true,' + ' "experiments": [],' + ' "project": "rbe-chromium-trusted-test",' + ' "remote_jobs": 250' + ' },' ' "$recipe_engine/resultdb/test_presentation": {' ' "column_keys": [],' ' "grouping_keys": [' @@ -5875,6 +5967,16 @@ ' "jobs": 250,' ' "metrics_project": "chromium-reclient-metrics",' ' "scandeps_server": true' + ' },' + ' "$build/siso": {' + ' "configs": [' + ' "builder"' + ' ],' + ' "enable_cloud_profiler": true,' + ' "enable_cloud_trace": true,' + ' "experiments": [],' + ' "project": "rbe-chromium-untrusted-test",' + ' "remote_jobs": 250' ' }' '}' dimensions: "free_space:" @@ -5908,6 +6010,16 @@ ' "metrics_project": "chromium-reclient-metrics",' ' "scandeps_server": true' ' },' + ' "$build/siso": {' + ' "configs": [' + ' "builder"' + ' ],' + ' "enable_cloud_profiler": true,' + ' "enable_cloud_trace": true,' + ' "experiments": [],' + ' "project": "rbe-chromium-trusted-test",' + ' "remote_jobs": 250' + ' },' ' "$recipe_engine/resultdb/test_presentation": {' ' "column_keys": [],' ' "grouping_keys": [' @@ -5978,6 +6090,16 @@ ' "jobs": 250,' ' "metrics_project": "chromium-reclient-metrics",' ' "scandeps_server": true' + ' },' + ' "$build/siso": {' + ' "configs": [' + ' "builder"' + ' ],' + ' "enable_cloud_profiler": true,' + ' "enable_cloud_trace": true,' + ' "experiments": [],' + ' "project": "rbe-chromium-untrusted-test",' + ' "remote_jobs": 250' ' }' '}' dimensions: "free_space:" @@ -6012,6 +6134,16 @@ ' "metrics_project": "chromium-reclient-metrics",' ' "scandeps_server": true' ' },' + ' "$build/siso": {' + ' "configs": [' + ' "builder"' + ' ],' + ' "enable_cloud_profiler": true,' + ' "enable_cloud_trace": true,' + ' "experiments": [],' + ' "project": "rbe-chromium-trusted-test",' + ' "remote_jobs": 250' + ' },' ' "$recipe_engine/resultdb/test_presentation": {' ' "column_keys": [],' ' "grouping_keys": [' @@ -6081,6 +6213,16 @@ ' "jobs": 250,' ' "metrics_project": "chromium-reclient-metrics",' ' "scandeps_server": true' + ' },' + ' "$build/siso": {' + ' "configs": [' + ' "builder"' + ' ],' + ' "enable_cloud_profiler": true,' + ' "enable_cloud_trace": true,' + ' "experiments": [],' + ' "project": "rbe-chromium-untrusted-test",' + ' "remote_jobs": 250' ' }' '}' dimensions: "free_space:" @@ -6122,7 +6264,8 @@ ' "enable_cloud_profiler": true,' ' "enable_cloud_trace": true,' ' "experiments": [],' - ' "project": "rbe-chromium-untrusted-test"' + ' "project": "rbe-chromium-untrusted-test",' + ' "remote_jobs": 250' ' },' ' "$recipe_engine/resultdb/test_presentation": {' ' "column_keys": [],' @@ -6202,7 +6345,8 @@ ' "enable_cloud_profiler": true,' ' "enable_cloud_trace": true,' ' "experiments": [],' - ' "project": "rbe-chromium-untrusted-test"' + ' "project": "rbe-chromium-untrusted-test",' + ' "remote_jobs": 250' ' }' '}' dimensions: "free_space:" @@ -6237,6 +6381,16 @@ ' "metrics_project": "chromium-reclient-metrics",' ' "scandeps_server": true' ' },' + ' "$build/siso": {' + ' "configs": [' + ' "builder"' + ' ],' + ' "enable_cloud_profiler": true,' + ' "enable_cloud_trace": true,' + ' "experiments": [],' + ' "project": "rbe-chromium-trusted-test",' + ' "remote_jobs": 250' + ' },' ' "$recipe_engine/resultdb/test_presentation": {' ' "column_keys": [],' ' "grouping_keys": [' @@ -6306,6 +6460,16 @@ ' "jobs": 80,' ' "metrics_project": "chromium-reclient-metrics",' ' "scandeps_server": true' + ' },' + ' "$build/siso": {' + ' "configs": [' + ' "builder"' + ' ],' + ' "enable_cloud_profiler": true,' + ' "enable_cloud_trace": true,' + ' "experiments": [],' + ' "project": "rbe-chromium-untrusted-test",' + ' "remote_jobs": 250' ' }' '}' dimensions: "free_space:" @@ -6340,6 +6504,16 @@ ' "metrics_project": "chromium-reclient-metrics",' ' "scandeps_server": true' ' },' + ' "$build/siso": {' + ' "configs": [' + ' "builder"' + ' ],' + ' "enable_cloud_profiler": true,' + ' "enable_cloud_trace": true,' + ' "experiments": [],' + ' "project": "rbe-chromium-trusted-test",' + ' "remote_jobs": 250' + ' },' ' "$recipe_engine/resultdb/test_presentation": {' ' "column_keys": [],' ' "grouping_keys": [' @@ -6409,6 +6583,16 @@ ' "jobs": 250,' ' "metrics_project": "chromium-reclient-metrics",' ' "scandeps_server": true' + ' },' + ' "$build/siso": {' + ' "configs": [' + ' "builder"' + ' ],' + ' "enable_cloud_profiler": true,' + ' "enable_cloud_trace": true,' + ' "experiments": [],' + ' "project": "rbe-chromium-untrusted-test",' + ' "remote_jobs": 250' ' }' '}' dimensions: "free_space:" @@ -6450,7 +6634,8 @@ ' "enable_cloud_profiler": true,' ' "enable_cloud_trace": true,' ' "experiments": [],' - ' "project": "rbe-chromium-untrusted-test"' + ' "project": "rbe-chromium-untrusted-test",' + ' "remote_jobs": 250' ' },' ' "$recipe_engine/resultdb/test_presentation": {' ' "column_keys": [],' @@ -6530,7 +6715,8 @@ ' "enable_cloud_profiler": true,' ' "enable_cloud_trace": true,' ' "experiments": [],' - ' "project": "rbe-chromium-untrusted-test"' + ' "project": "rbe-chromium-untrusted-test",' + ' "remote_jobs": 250' ' }' '}' dimensions: "free_space:" @@ -6563,6 +6749,16 @@ ' "metrics_project": "chromium-reclient-metrics",' ' "scandeps_server": true' ' },' + ' "$build/siso": {' + ' "configs": [' + ' "builder"' + ' ],' + ' "enable_cloud_profiler": true,' + ' "enable_cloud_trace": true,' + ' "experiments": [],' + ' "project": "rbe-chromium-trusted-test",' + ' "remote_jobs": 250' + ' },' ' "$recipe_engine/resultdb/test_presentation": {' ' "column_keys": [],' ' "grouping_keys": [' @@ -6637,6 +6833,16 @@ ' "jobs": 250,' ' "metrics_project": "chromium-reclient-metrics",' ' "scandeps_server": true' + ' },' + ' "$build/siso": {' + ' "configs": [' + ' "builder"' + ' ],' + ' "enable_cloud_profiler": true,' + ' "enable_cloud_trace": true,' + ' "experiments": [],' + ' "project": "rbe-chromium-untrusted-test",' + ' "remote_jobs": 250' ' }' '}' dimensions: "free_space:" @@ -6670,6 +6876,16 @@ ' "metrics_project": "chromium-reclient-metrics",' ' "scandeps_server": true' ' },' + ' "$build/siso": {' + ' "configs": [' + ' "builder"' + ' ],' + ' "enable_cloud_profiler": true,' + ' "enable_cloud_trace": true,' + ' "experiments": [],' + ' "project": "rbe-chromium-untrusted-test",' + ' "remote_jobs": 250' + ' },' ' "$recipe_engine/resultdb/test_presentation": {' ' "column_keys": [],' ' "grouping_keys": [' @@ -6745,6 +6961,16 @@ ' "jobs": 150,' ' "metrics_project": "chromium-reclient-metrics",' ' "scandeps_server": true' + ' },' + ' "$build/siso": {' + ' "configs": [' + ' "builder"' + ' ],' + ' "enable_cloud_profiler": true,' + ' "enable_cloud_trace": true,' + ' "experiments": [],' + ' "project": "rbe-chromium-untrusted-test",' + ' "remote_jobs": 250' ' }' '}' dimensions: "free_space:" @@ -22163,6 +22389,16 @@ ' "metrics_project": "chromium-reclient-metrics",' ' "scandeps_server": true' ' },' + ' "$build/siso": {' + ' "configs": [' + ' "builder"' + ' ],' + ' "enable_cloud_profiler": true,' + ' "enable_cloud_trace": true,' + ' "experiments": [],' + ' "project": "rbe-chromium-trusted",' + ' "remote_jobs": 250' + ' },' ' "$recipe_engine/resultdb/test_presentation": {' ' "column_keys": [],' ' "grouping_keys": [' @@ -22227,6 +22463,16 @@ ' "jobs": 250,' ' "metrics_project": "chromium-reclient-metrics",' ' "scandeps_server": true' + ' },' + ' "$build/siso": {' + ' "configs": [' + ' "builder"' + ' ],' + ' "enable_cloud_profiler": true,' + ' "enable_cloud_trace": true,' + ' "experiments": [],' + ' "project": "rbe-chromium-untrusted",' + ' "remote_jobs": 250' ' }' '}' dimensions: "builder:" @@ -22254,6 +22500,16 @@ ' "metrics_project": "chromium-reclient-metrics",' ' "scandeps_server": true' ' },' + ' "$build/siso": {' + ' "configs": [' + ' "builder"' + ' ],' + ' "enable_cloud_profiler": true,' + ' "enable_cloud_trace": true,' + ' "experiments": [],' + ' "project": "rbe-chromium-trusted",' + ' "remote_jobs": 250' + ' },' ' "$recipe_engine/resultdb/test_presentation": {' ' "column_keys": [],' ' "grouping_keys": [' @@ -22318,6 +22574,16 @@ ' "jobs": 250,' ' "metrics_project": "chromium-reclient-metrics",' ' "scandeps_server": true' + ' },' + ' "$build/siso": {' + ' "configs": [' + ' "builder"' + ' ],' + ' "enable_cloud_profiler": true,' + ' "enable_cloud_trace": true,' + ' "experiments": [],' + ' "project": "rbe-chromium-untrusted",' + ' "remote_jobs": 250' ' }' '}' dimensions: "builder:" @@ -48139,6 +48405,16 @@ ' "metrics_project": "chromium-reclient-metrics",' ' "scandeps_server": true' ' },' + ' "$build/siso": {' + ' "configs": [' + ' "builder"' + ' ],' + ' "enable_cloud_profiler": true,' + ' "enable_cloud_trace": true,' + ' "experiments": [],' + ' "project": "rbe-chromium-trusted",' + ' "remote_jobs": 250' + ' },' ' "$recipe_engine/resultdb/test_presentation": {' ' "column_keys": [],' ' "grouping_keys": [' @@ -48204,6 +48480,16 @@ ' "jobs": 250,' ' "metrics_project": "chromium-reclient-metrics",' ' "scandeps_server": true' + ' },' + ' "$build/siso": {' + ' "configs": [' + ' "builder"' + ' ],' + ' "enable_cloud_profiler": true,' + ' "enable_cloud_trace": true,' + ' "experiments": [],' + ' "project": "rbe-chromium-untrusted",' + ' "remote_jobs": 250' ' }' '}' dimensions: "free_space:" @@ -60708,6 +60994,15 @@ ' "metrics_project": "chromium-reclient-metrics",' ' "scandeps_server": true' ' },' + ' "$build/siso": {' + ' "configs": [' + ' "builder"' + ' ],' + ' "enable_cloud_profiler": true,' + ' "enable_cloud_trace": true,' + ' "experiments": [],' + ' "project": "rbe-chromium-trusted-test"' + ' },' ' "$recipe_engine/resultdb/test_presentation": {' ' "column_keys": [],' ' "grouping_keys": [' @@ -60790,6 +61085,15 @@ ' "metrics_project": "chromium-reclient-metrics",' ' "scandeps_server": true' ' },' + ' "$build/siso": {' + ' "configs": [' + ' "builder"' + ' ],' + ' "enable_cloud_profiler": true,' + ' "enable_cloud_trace": true,' + ' "experiments": [],' + ' "project": "rbe-chromium-trusted-test"' + ' },' ' "$recipe_engine/resultdb/test_presentation": {' ' "column_keys": [],' ' "grouping_keys": [' @@ -60856,6 +61160,15 @@ ' "jobs": 250,' ' "metrics_project": "chromium-reclient-metrics",' ' "scandeps_server": true' + ' },' + ' "$build/siso": {' + ' "configs": [' + ' "builder"' + ' ],' + ' "enable_cloud_profiler": true,' + ' "enable_cloud_trace": true,' + ' "experiments": [],' + ' "project": "rbe-chromium-untrusted-test"' ' }' '}' } @@ -62871,6 +63184,15 @@ ' "metrics_project": "chromium-reclient-metrics",' ' "scandeps_server": true' ' },' + ' "$build/siso": {' + ' "configs": [' + ' "builder"' + ' ],' + ' "enable_cloud_profiler": true,' + ' "enable_cloud_trace": true,' + ' "experiments": [],' + ' "project": "rbe-chromium-untrusted"' + ' },' ' "$recipe_engine/resultdb/test_presentation": {' ' "column_keys": [],' ' "grouping_keys": ['
diff --git a/infra/config/generated/testing/variants.pyl b/infra/config/generated/testing/variants.pyl index 7b6089d..33d275e2 100644 --- a/infra/config/generated/testing/variants.pyl +++ b/infra/config/generated/testing/variants.pyl
@@ -267,16 +267,16 @@ }, 'LACROS_VERSION_SKEW_CANARY': { 'identifier': 'Lacros version skew testing ash canary', - 'description': 'Run with ash-chrome version 126.0.6432.0', + 'description': 'Run with ash-chrome version 126.0.6433.0', 'args': [ - '--ash-chrome-path-override=../../lacros_version_skew_tests_v126.0.6432.0/test_ash_chrome', + '--ash-chrome-path-override=../../lacros_version_skew_tests_v126.0.6433.0/test_ash_chrome', ], 'swarming': { 'cipd_packages': [ { 'cipd_package': 'chromium/testing/linux-ash-chromium/x86_64/ash.zip', - 'location': 'lacros_version_skew_tests_v126.0.6432.0', - 'revision': 'version:126.0.6432.0', + 'location': 'lacros_version_skew_tests_v126.0.6433.0', + 'revision': 'version:126.0.6433.0', }, ], },
diff --git a/infra/config/subprojects/chromium/ci/chromium.fyi.star b/infra/config/subprojects/chromium/ci/chromium.fyi.star index 1d05843..4557d396 100644 --- a/infra/config/subprojects/chromium/ci/chromium.fyi.star +++ b/infra/config/subprojects/chromium/ci/chromium.fyi.star
@@ -25,6 +25,8 @@ reclient_jobs = reclient.jobs.DEFAULT, service_account = ci.DEFAULT_SERVICE_ACCOUNT, shadow_service_account = ci.DEFAULT_SHADOW_SERVICE_ACCOUNT, + siso_enabled = True, + siso_remote_jobs = reclient.jobs.DEFAULT, ) consoles.console_view(
diff --git a/infra/config/subprojects/reclient/reclient.star b/infra/config/subprojects/reclient/reclient.star index dc2f68f..4a901518 100644 --- a/infra/config/subprojects/reclient/reclient.star +++ b/infra/config/subprojects/reclient/reclient.star
@@ -46,6 +46,7 @@ service_account = ( "chromium-ci-builder@chops-service-accounts.iam.gserviceaccount.com" ), + siso_enabled = True, ) consoles.console_view( @@ -751,5 +752,4 @@ reclient_instance = reclient.instance.TEST_UNTRUSTED, reclient_jobs = reclient.jobs.HIGH_JOBS_FOR_CQ, shadow_reclient_instance = reclient.instance.TEST_UNTRUSTED, - siso_enabled = True, )
diff --git a/infra/config/targets/lacros-version-skew-variants.json b/infra/config/targets/lacros-version-skew-variants.json index d98f4af..4730c4b2 100644 --- a/infra/config/targets/lacros-version-skew-variants.json +++ b/infra/config/targets/lacros-version-skew-variants.json
@@ -1,16 +1,16 @@ { "LACROS_VERSION_SKEW_CANARY": { "args": [ - "--ash-chrome-path-override=../../lacros_version_skew_tests_v126.0.6432.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v126.0.6433.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 126.0.6432.0", + "description": "Run with ash-chrome version 126.0.6433.0", "identifier": "Lacros version skew testing ash canary", "swarming": { "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v126.0.6432.0", - "revision": "version:126.0.6432.0" + "location": "lacros_version_skew_tests_v126.0.6433.0", + "revision": "version:126.0.6433.0" } ] }
diff --git a/internal b/internal index c54b249..3404267 160000 --- a/internal +++ b/internal
@@ -1 +1 @@ -Subproject commit c54b2497b10ac936aa2a059c6cd4a6548d6cb83d +Subproject commit 3404267321471bc8c9e1d0973545aeacb791c70a
diff --git a/ios/chrome/app/spotlight/BUILD.gn b/ios/chrome/app/spotlight/BUILD.gn index 44f9e39..ba7a85b 100644 --- a/ios/chrome/app/spotlight/BUILD.gn +++ b/ios/chrome/app/spotlight/BUILD.gn
@@ -50,6 +50,7 @@ "//ios/chrome/browser/reading_list/model", "//ios/chrome/browser/search_engines/model:template_url_service_factory", "//ios/chrome/browser/shared/model/browser", + "//ios/chrome/browser/shared/model/browser_state", "//ios/chrome/browser/shared/model/web_state_list", "//ios/chrome/browser/shared/public/features", "//ios/chrome/browser/shared/public/features:system_flags",
diff --git a/ios/chrome/app/spotlight/bookmark_spotlight_manager_unittest.mm b/ios/chrome/app/spotlight/bookmark_spotlight_manager_unittest.mm index a45eb59..c0c9766 100644 --- a/ios/chrome/app/spotlight/bookmark_spotlight_manager_unittest.mm +++ b/ios/chrome/app/spotlight/bookmark_spotlight_manager_unittest.mm
@@ -111,7 +111,8 @@ localOrSyncableBookmarkModel:local_or_syncable_bookmark_model_ accountBookmarkModel:account_bookmark_model_ spotlightInterface:fakeSpotlightInterface - searchableItemFactory:searchableItemFactory_]; + searchableItemFactory:searchableItemFactory_ + prefService:pref_service_]; NSUInteger initialIndexedItemCount = fakeSpotlightInterface.indexSearchableItemsCallsCount; @@ -144,7 +145,8 @@ localOrSyncableBookmarkModel:local_or_syncable_bookmark_model_ accountBookmarkModel:account_bookmark_model_ spotlightInterface:spotlightInterface_ - searchableItemFactory:searchableItemFactory_]; + searchableItemFactory:searchableItemFactory_ + prefService:pref_service_]; const bookmarks::BookmarkNode* root = local_or_syncable_bookmark_model_->mobile_node(); @@ -173,7 +175,8 @@ localOrSyncableBookmarkModel:local_or_syncable_bookmark_model_ accountBookmarkModel:account_bookmark_model_ spotlightInterface:fakeSpotlightInterface - searchableItemFactory:searchableItemFactory_]; + searchableItemFactory:searchableItemFactory_ + prefService:pref_service_]; NSUInteger initialIndexedItemCount = fakeSpotlightInterface.indexSearchableItemsCallsCount; @@ -202,7 +205,8 @@ localOrSyncableBookmarkModel:local_or_syncable_bookmark_model_ accountBookmarkModel:account_bookmark_model_ spotlightInterface:fakeSpotlightInterface - searchableItemFactory:searchableItemFactory_]; + searchableItemFactory:searchableItemFactory_ + prefService:pref_service_]; NSUInteger currentIndexedItemCount = fakeSpotlightInterface.indexSearchableItemsCallsCount; @@ -253,7 +257,8 @@ localOrSyncableBookmarkModel:nullptr accountBookmarkModel:nullptr spotlightInterface:fakeSpotlightInterface - searchableItemFactory:searchableItemFactory_]; + searchableItemFactory:searchableItemFactory_ + prefService:pref_service_]; NSUInteger initialIndexedItemCount = fakeSpotlightInterface.indexSearchableItemsCallsCount; @@ -287,7 +292,8 @@ localOrSyncableBookmarkModel:local_or_syncable_bookmark_model_ accountBookmarkModel:account_bookmark_model_ spotlightInterface:fakeSpotlightInterface - searchableItemFactory:searchableItemFactory_]; + searchableItemFactory:searchableItemFactory_ + prefService:pref_service_]; const bookmarks::BookmarkNode* addedNode1 = AddBookmark(local_or_syncable_bookmark_model_->mobile_node(), u"foo1",
diff --git a/ios/chrome/app/spotlight/bookmarks_spotlight_manager.h b/ios/chrome/app/spotlight/bookmarks_spotlight_manager.h index ef7cb33..9f28256fb 100644 --- a/ios/chrome/app/spotlight/bookmarks_spotlight_manager.h +++ b/ios/chrome/app/spotlight/bookmarks_spotlight_manager.h
@@ -9,6 +9,7 @@ class ChromeBrowserState; class LegacyBookmarkModel; +class PrefService; namespace favicon { class LargeIconService; @@ -33,7 +34,8 @@ (LegacyBookmarkModel*)localOrSyncableBookmarkModel accountBookmarkModel:(LegacyBookmarkModel*)accountBookmarkModel spotlightInterface:(SpotlightInterface*)spotlightInterface - searchableItemFactory:(SearchableItemFactory*)searchableItemFactory; + searchableItemFactory:(SearchableItemFactory*)searchableItemFactory + prefService:(PrefService*)prefService; /// Number of pending large icon tasks. @property(nonatomic, assign) NSUInteger pendingLargeIconTasksCount;
diff --git a/ios/chrome/app/spotlight/bookmarks_spotlight_manager.mm b/ios/chrome/app/spotlight/bookmarks_spotlight_manager.mm index 503b816..39f4258 100644 --- a/ios/chrome/app/spotlight/bookmarks_spotlight_manager.mm +++ b/ios/chrome/app/spotlight/bookmarks_spotlight_manager.mm
@@ -4,11 +4,11 @@ #import "ios/chrome/app/spotlight/bookmarks_spotlight_manager.h" +#import <CoreSpotlight/CoreSpotlight.h> + #import <memory> #import <stack> -#import <CoreSpotlight/CoreSpotlight.h> - #import "base/apple/foundation_util.h" #import "base/memory/raw_ptr.h" #import "base/metrics/histogram_macros.h" @@ -18,6 +18,7 @@ #import "base/version.h" #import "components/bookmarks/browser/base_bookmark_model_observer.h" #import "components/bookmarks/browser/bookmark_node.h" +#import "components/prefs/pref_service.h" #import "ios/chrome/app/spotlight/searchable_item_factory.h" #import "ios/chrome/app/spotlight/spotlight_interface.h" #import "ios/chrome/app/spotlight/spotlight_logger.h" @@ -27,6 +28,7 @@ #import "ios/chrome/browser/bookmarks/model/legacy_bookmark_model.h" #import "ios/chrome/browser/bookmarks/model/local_or_syncable_bookmark_model_factory.h" #import "ios/chrome/browser/favicon/model/ios_chrome_large_icon_service_factory.h" +#import "ios/chrome/browser/shared/model/browser_state/chrome_browser_state.h" namespace { // Limit the size of the initial indexing. This will not limit the size of the @@ -91,6 +93,9 @@ // Number of times the indexing was interrupted by model updates. NSInteger _reindexInterruptionCount; + + // PrefService per a browser state. + PrefService* _prefService; } + (BookmarksSpotlightManager*)bookmarksSpotlightManagerWithBrowserState: @@ -109,7 +114,8 @@ [[SearchableItemFactory alloc] initWithLargeIconService:largeIconService domain:spotlight::DOMAIN_BOOKMARKS - useTitleInIdentifiers:YES]]; + useTitleInIdentifiers:YES] + prefService:browserState->GetPrefs()]; } - (instancetype) @@ -118,13 +124,15 @@ (LegacyBookmarkModel*)localOrSyncableBookmarkModel accountBookmarkModel:(LegacyBookmarkModel*)accountBookmarkModel spotlightInterface:(SpotlightInterface*)spotlightInterface - searchableItemFactory:(SearchableItemFactory*)searchableItemFactory { + searchableItemFactory:(SearchableItemFactory*)searchableItemFactory + prefService:(PrefService*)prefService { self = [super initWithSpotlightInterface:spotlightInterface searchableItemFactory:searchableItemFactory]; if (self) { _pendingLargeIconTasksCount = 0; _localOrSyncableBookmarkModel = localOrSyncableBookmarkModel; _accountBookmarkModel = accountBookmarkModel; + _prefService = prefService; [self attachBookmarkModel]; } return self; @@ -221,6 +229,7 @@ - (BOOL)shouldReindex { NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults]; + // TODO(crbug.com/324534520): Use PrefService instead. NSDate* date = base::apple::ObjCCast<NSDate>( [userDefaults objectForKey:@(spotlight::kSpotlightLastIndexingDateKey)]); if (!date) { @@ -231,14 +240,10 @@ if (timeSinceLastIndexing >= kDelayBetweenTwoIndexing) { return YES; } - NSNumber* lastIndexedVersion = base::apple::ObjCCast<NSNumber>([userDefaults - objectForKey:@(spotlight::kSpotlightLastIndexingVersionKey)]); - if (!lastIndexedVersion) { - return YES; - } - - if ([lastIndexedVersion integerValue] < - spotlight::kCurrentSpotlightIndexVersion) { + // The default value is 0 if the value isn't set up yet. + const int lastIndexedVersion = + _prefService->GetInteger(spotlight::kSpotlightLastIndexingVersionKey); + if (lastIndexedVersion < spotlight::kCurrentSpotlightIndexVersion) { return YES; } return NO; @@ -559,13 +564,14 @@ UMA_HISTOGRAM_TIMES("IOS.Spotlight.BookmarksIndexingDuration", _initialIndexTimer->Elapsed()); _initialIndexTimer.reset(); + + // TODO(crbug.com/324534520): Use PrefService instead. [[NSUserDefaults standardUserDefaults] setObject:base::Time::Now().ToNSDate() forKey:@(spotlight::kSpotlightLastIndexingDateKey)]; - [[NSUserDefaults standardUserDefaults] - setObject:@(spotlight::kCurrentSpotlightIndexVersion) - forKey:@(spotlight::kSpotlightLastIndexingVersionKey)]; + _prefService->SetInteger(spotlight::kSpotlightLastIndexingVersionKey, + spotlight::kCurrentSpotlightIndexVersion); } - (void)logIndexingInterruption {
diff --git a/ios/chrome/browser/bookmarks/model/bookmark_ios_unit_test_support.h b/ios/chrome/browser/bookmarks/model/bookmark_ios_unit_test_support.h index b57241a..d638f30 100644 --- a/ios/chrome/browser/bookmarks/model/bookmark_ios_unit_test_support.h +++ b/ios/chrome/browser/bookmarks/model/bookmark_ios_unit_test_support.h
@@ -18,6 +18,7 @@ class GURL; class LegacyBookmarkModel; class TestChromeBrowserState; +class PrefService; namespace bookmarks { class BookmarkNode; @@ -66,6 +67,7 @@ // Bookmark model providing a merged view. raw_ptr<bookmarks::CoreBookmarkModel> bookmark_model_; raw_ptr<bookmarks::ManagedBookmarkService> managed_bookmark_service_; + raw_ptr<PrefService> pref_service_; }; #endif // IOS_CHROME_BROWSER_BOOKMARKS_MODEL_BOOKMARK_IOS_UNIT_TEST_SUPPORT_H_
diff --git a/ios/chrome/browser/bookmarks/model/bookmark_ios_unit_test_support.mm b/ios/chrome/browser/bookmarks/model/bookmark_ios_unit_test_support.mm index 1a91a6ee..f447e65 100644 --- a/ios/chrome/browser/bookmarks/model/bookmark_ios_unit_test_support.mm +++ b/ios/chrome/browser/bookmarks/model/bookmark_ios_unit_test_support.mm
@@ -3,6 +3,7 @@ // found in the LICENSE file. #import "ios/chrome/browser/bookmarks/model/bookmark_ios_unit_test_support.h" + #import <memory> #import "base/feature_list.h" @@ -80,6 +81,9 @@ EXPECT_TRUE(bookmark_model_->loaded()); } + pref_service_ = chrome_browser_state_->GetPrefs(); + EXPECT_TRUE(pref_service_); + if (wait_for_initialization_ && base::FeatureList::IsEnabled( syncer::kEnableBookmarkFoldersForAccountStorage)) {
diff --git a/ios/chrome/browser/price_insights/coordinator/price_insights_modulator.mm b/ios/chrome/browser/price_insights/coordinator/price_insights_modulator.mm index 023b40c..b292a0c1 100644 --- a/ios/chrome/browser/price_insights/coordinator/price_insights_modulator.mm +++ b/ios/chrome/browser/price_insights/coordinator/price_insights_modulator.mm
@@ -201,7 +201,6 @@ // Cell configuration handler helper. - (void)configureCell:(PriceInsightsCell*)cell { - cell.viewController = self.viewController; PriceInsightsItem* item = [[PriceInsightsItem alloc] init]; [cell configureWithItem:item]; }
diff --git a/ios/chrome/browser/price_insights/ui/BUILD.gn b/ios/chrome/browser/price_insights/ui/BUILD.gn index 7a354ad..278fbbf 100644 --- a/ios/chrome/browser/price_insights/ui/BUILD.gn +++ b/ios/chrome/browser/price_insights/ui/BUILD.gn
@@ -2,8 +2,6 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import("//build/config/ios/swift_source_set.gni") - source_set("price_insights_ui") { sources = [ "price_insights_cell.h", @@ -13,7 +11,6 @@ ] deps = [ - ":price_history_swift", "//base", "//components/strings", "//ios/chrome/browser/shared/ui/symbols", @@ -26,18 +23,3 @@ ] frameworks = [ "UIKit.framework" ] } - -swift_source_set("price_history_swift") { - bridge_header = "price_history_swift_bridge.h" - sources = [ - "price_history.swift", - "price_history_provider.swift", - ] - deps = [] - frameworks = [ - "Charts.framework", - "Foundation.framework", - "SwiftUI.framework", - "Combine.framework", - ] -}
diff --git a/ios/chrome/browser/price_insights/ui/price_history.swift b/ios/chrome/browser/price_insights/ui/price_history.swift deleted file mode 100644 index 1a89a1d..0000000 --- a/ios/chrome/browser/price_insights/ui/price_history.swift +++ /dev/null
@@ -1,15 +0,0 @@ -// Copyright 2024 The Chromium Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -import Charts -import Foundation -import SwiftUI - -@available(iOS 16, *) -struct HistoryGraph: View { - var body: some View { - // TODO(b/333893571): Configure the price history graph. - Text("") - } -}
diff --git a/ios/chrome/browser/price_insights/ui/price_history_provider.swift b/ios/chrome/browser/price_insights/ui/price_history_provider.swift deleted file mode 100644 index 6056e54..0000000 --- a/ios/chrome/browser/price_insights/ui/price_history_provider.swift +++ /dev/null
@@ -1,16 +0,0 @@ -// Copyright 2024 The Chromium Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -import Foundation -import SwiftUI -import UIKit - -// A provider to provide the SwiftUI PriceHistory to Objective C. This is -// necessary because Objective C can't see SwiftUI types. -@available(iOS 16, *) -@objcMembers class PriceHistoryProvider: NSObject { - public static func makeViewController(withHistory history: [Date: NSNumber]) -> UIViewController { - return UIHostingController(rootView: HistoryGraph()) - } -}
diff --git a/ios/chrome/browser/price_insights/ui/price_history_swift_bridge.h b/ios/chrome/browser/price_insights/ui/price_history_swift_bridge.h deleted file mode 100644 index 5e6f481..0000000 --- a/ios/chrome/browser/price_insights/ui/price_history_swift_bridge.h +++ /dev/null
@@ -1,8 +0,0 @@ -// Copyright 2024 The Chromium Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef IOS_CHROME_BROWSER_PRICE_INSIGHTS_UI_PRICE_HISTORY_SWIFT_BRIDGE_H_ -#define IOS_CHROME_BROWSER_PRICE_INSIGHTS_UI_PRICE_HISTORY_SWIFT_BRIDGE_H_ - -#endif // IOS_CHROME_BROWSER_PRICE_INSIGHTS_UI_PRICE_HISTORY_SWIFT_BRIDGE_H_
diff --git a/ios/chrome/browser/price_insights/ui/price_insights_cell.h b/ios/chrome/browser/price_insights/ui/price_insights_cell.h index fc8a182..807ec9e 100644 --- a/ios/chrome/browser/price_insights/ui/price_insights_cell.h +++ b/ios/chrome/browser/price_insights/ui/price_insights_cell.h
@@ -12,9 +12,6 @@ // UICollectionViewCell that contains data for Price Insights. @interface PriceInsightsCell : UICollectionViewCell -// Contextual panel view controller. -@property(nonatomic, weak) UIViewController* viewController; - // Configures the UICollectionViewCell with `PriceInsightsitem`. - (void)configureWithItem:(PriceInsightsItem*)item;
diff --git a/ios/chrome/browser/price_insights/ui/price_insights_cell.mm b/ios/chrome/browser/price_insights/ui/price_insights_cell.mm index 5c9f5ce..f11951a 100644 --- a/ios/chrome/browser/price_insights/ui/price_insights_cell.mm +++ b/ios/chrome/browser/price_insights/ui/price_insights_cell.mm
@@ -6,7 +6,6 @@ #import "base/strings/sys_string_conversions.h" #import "components/strings/grit/components_strings.h" -#import "ios/chrome/browser/price_insights/ui/price_history_swift.h" #import "ios/chrome/browser/shared/ui/symbols/symbols.h" #import "ios/chrome/browser/shared/ui/util/uikit_ui_util.h" #import "ios/chrome/browser/ui/price_notifications/cells/price_notifications_track_button.h" @@ -35,18 +34,12 @@ // The spacing between price tracking stack views. const CGFloat kHorizontalStackViewSpacing = 20.0f; -// Size of the icon. -const CGFloat kIconSize = 20.0f; - -// Size of the space between the graph and the text in Price History. -const CGFloat kPriceHistoryContentSpacing = 12.0f; - -// Height of Price History graph. -const CGFloat kPriceHistoryGraphHeight = 186.0f; - // The corner radius of this container. const float kCornerRadius = 24; +// Size of the icon. +const CGFloat kIconSize = 20.0f; + } // namespace @interface PriceInsightsCell () @@ -61,7 +54,6 @@ UIStackView* _priceTrackingStackView; UIStackView* _buyingOptionsStackView; UIStackView* _contentStackView; - UIStackView* _priceHistoryStackView; } #pragma mark - Public @@ -81,67 +73,25 @@ [self.contentView addSubview:_contentStackView]; AddSameConstraintsWithInsets( _contentStackView, self.contentView, - NSDirectionalEdgeInsetsMake(0, kHorizontalInset, 0, kHorizontalInset)); + NSDirectionalEdgeInsetsMake(0, kHorizontalInset, 0, -kHorizontalInset)); } return self; } - (void)configureWithItem:(PriceInsightsItem*)item { self.item = item; - - // Configure Price Trancking and Price Range. if (self.item.canPriceTrack || ([self hasPriceRange] && [self hasPriceHistory])) { [self configurePriceTrackingAndRange]; [_contentStackView addArrangedSubview:_priceTrackingStackView]; } - // Configure Price History. - if ([self hasPriceHistory]) { - NSString* title; - NSString* primarySubtitle; - NSString* secondarySubtitle; - - bool hasPriceTrackOrPriceRange = - self.item.canPriceTrack || [self hasPriceRange]; - title = hasPriceTrackOrPriceRange - ? l10n_util::GetNSString(IDS_PRICE_INSIGHTS_HISTORY_TITLE) - : self.item.title; - NSString* priceHistoryDescription = - hasPriceTrackOrPriceRange - ? nil - : l10n_util::GetNSString(IDS_PRICE_INSIGHTS_HISTORY_TITLE); - - if ([self hasVariants]) { - primarySubtitle = self.item.variants; - secondarySubtitle = priceHistoryDescription; - } else { - primarySubtitle = priceHistoryDescription; - secondarySubtitle = nil; - } - - [self configurePriceHistoryWithTitle:title - primarySubtitle:primarySubtitle - secondarySubtitle:secondarySubtitle]; - - [_contentStackView addArrangedSubview:_priceHistoryStackView]; - } - - // Configure Buying options. if (self.item.buyingOptionsURL.is_valid()) { [self configureBuyingOptions]; [_contentStackView addArrangedSubview:_buyingOptionsStackView]; } } -#pragma mark - Actions - -- (void)trackButtonToggled { -} - -- (void)handleBuyingOptionsTap:(UITapGestureRecognizer*)sender { -} - #pragma mark - Private // Returns whether or not price range is available. @@ -164,23 +114,35 @@ // Returns whether or not price history is available. - (BOOL)hasPriceHistory { - return self.item.priceHistory && [self.item.priceHistory count] > 0; + return NO; } // Method that creates a view for both price tracking and price range, or solely // for price tracking or price range when price history is also available. - (void)configurePriceTrackingAndRange { - UILabel* priceTrackingTitle = [self createLabel]; + UILabel* priceTrackingTitle = [[UILabel alloc] init]; + priceTrackingTitle.numberOfLines = 1; + priceTrackingTitle.textAlignment = NSTextAlignmentLeft; priceTrackingTitle.font = CreateDynamicFont(UIFontTextStyleSubheadline, UIFontWeightSemibold); + priceTrackingTitle.adjustsFontForContentSizeCategory = YES; + priceTrackingTitle.adjustsFontSizeToFitWidth = NO; + priceTrackingTitle.translatesAutoresizingMaskIntoConstraints = NO; + priceTrackingTitle.lineBreakMode = NSLineBreakByTruncatingTail; priceTrackingTitle.textColor = [UIColor colorNamed:kTextPrimaryColor]; priceTrackingTitle.text = self.item.title; - UILabel* priceTrackingSubtitle = [self createLabel]; + UILabel* priceTrackingSubtitle = [[UILabel alloc] init]; + priceTrackingSubtitle.textAlignment = NSTextAlignmentLeft; priceTrackingSubtitle.font = CreateDynamicFont(UIFontTextStyleSubheadline, UIFontWeightRegular); + priceTrackingSubtitle.adjustsFontForContentSizeCategory = YES; + priceTrackingSubtitle.adjustsFontSizeToFitWidth = NO; + priceTrackingSubtitle.lineBreakMode = NSLineBreakByTruncatingTail; + priceTrackingSubtitle.translatesAutoresizingMaskIntoConstraints = NO; priceTrackingSubtitle.textColor = [UIColor colorNamed:kTextSecondaryColor]; if ([self hasPriceRange] && [self hasPriceHistory]) { + priceTrackingSubtitle.numberOfLines = 1; priceTrackingSubtitle.text = [self hasVariants] ? ([self hasPriceOneTypicalPrice] @@ -238,17 +200,29 @@ // Method that creates a view for the buying options module. - (void)configureBuyingOptions { - UILabel* title = [self createLabel]; + UILabel* title = [[UILabel alloc] init]; + title.numberOfLines = 1; + title.textAlignment = NSTextAlignmentLeft; title.font = CreateDynamicFont(UIFontTextStyleSubheadline, UIFontWeightSemibold); + title.adjustsFontForContentSizeCategory = YES; + title.adjustsFontSizeToFitWidth = NO; title.text = l10n_util::GetNSString(IDS_PRICE_INSIGHTS_BUYING_OPTIONS_TITLE); + title.translatesAutoresizingMaskIntoConstraints = NO; + title.lineBreakMode = NSLineBreakByTruncatingTail; title.textColor = [UIColor colorNamed:kTextPrimaryColor]; - UILabel* subtitle = [self createLabel]; + UILabel* subtitle = [[UILabel alloc] init]; + subtitle.numberOfLines = 1; + subtitle.textAlignment = NSTextAlignmentLeft; subtitle.font = CreateDynamicFont(UIFontTextStyleSubheadline, UIFontWeightRegular); + subtitle.adjustsFontForContentSizeCategory = YES; + subtitle.adjustsFontSizeToFitWidth = NO; + subtitle.lineBreakMode = NSLineBreakByTruncatingTail; subtitle.text = l10n_util::GetNSString(IDS_PRICE_INSIGHTS_BUYING_OPTIONS_SUBTITLE); + subtitle.translatesAutoresizingMaskIntoConstraints = NO; subtitle.textColor = [UIColor colorNamed:kTextSecondaryColor]; UIStackView* verticalStack = @@ -282,81 +256,12 @@ [_buyingOptionsStackView addGestureRecognizer:tapRecognizer]; } -// Method that creates a swiftUI graph for price history. -- (void)configurePriceHistoryWithTitle:(NSString*)titleText - primarySubtitle:(NSString*)primarySubtitleText - secondarySubtitle:(NSString*)secondarySubtitleText { - if (@available(iOS 16, *)) { - UIStackView* verticalStack = [[UIStackView alloc] init]; - verticalStack.axis = UILayoutConstraintAxisVertical; - verticalStack.distribution = UIStackViewDistributionFill; - verticalStack.alignment = UIStackViewAlignmentLeading; +#pragma mark - Actions - UILabel* title = [self createLabel]; - title.font = - CreateDynamicFont(UIFontTextStyleSubheadline, UIFontWeightSemibold); - title.text = titleText; - title.textColor = [UIColor colorNamed:kTextPrimaryColor]; - [verticalStack addArrangedSubview:title]; - - if (primarySubtitleText.length) { - UILabel* primarySubtitle = [self createLabel]; - primarySubtitle.font = - CreateDynamicFont(UIFontTextStyleFootnote, UIFontWeightRegular); - primarySubtitle.text = primarySubtitleText; - primarySubtitle.textColor = [UIColor colorNamed:kTextSecondaryColor]; - [verticalStack addArrangedSubview:primarySubtitle]; - - // Set secondarySubtitle only if both primarySubtitle and - // secondarySubtitle are present. - if (secondarySubtitleText.length) { - UILabel* secondarySubtitle = [self createLabel]; - secondarySubtitle.font = - CreateDynamicFont(UIFontTextStyleFootnote, UIFontWeightRegular); - secondarySubtitle.text = secondarySubtitleText; - secondarySubtitle.textColor = [UIColor colorNamed:kTextSecondaryColor]; - [verticalStack addArrangedSubview:secondarySubtitle]; - } - } - - UIViewController* priceHistoryViewController = [PriceHistoryProvider - makeViewControllerWithHistory:self.item.priceHistory]; - priceHistoryViewController.view.translatesAutoresizingMaskIntoConstraints = - NO; - [self.viewController addChildViewController:priceHistoryViewController]; - [priceHistoryViewController - didMoveToParentViewController:self.viewController]; - [NSLayoutConstraint activateConstraints:@[ - [priceHistoryViewController.view.heightAnchor - constraintEqualToConstant:kPriceHistoryGraphHeight] - ]]; - - _priceHistoryStackView = [[UIStackView alloc] initWithArrangedSubviews:@[ - verticalStack, priceHistoryViewController.view - ]]; - _priceHistoryStackView.axis = UILayoutConstraintAxisVertical; - _priceHistoryStackView.spacing = kPriceHistoryContentSpacing; - _priceHistoryStackView.distribution = UIStackViewDistributionFill; - _priceHistoryStackView.translatesAutoresizingMaskIntoConstraints = NO; - _priceHistoryStackView.backgroundColor = - [UIColor colorNamed:kBackgroundColor]; - _priceHistoryStackView.layoutMarginsRelativeArrangement = YES; - _priceHistoryStackView.layoutMargins = - UIEdgeInsets(kContentVerticalInset, kContentHorizontalInset, - kContentVerticalInset, kContentHorizontalInset); - } +- (void)trackButtonToggled { } -// Creates and configures a UILabel with default settings. -- (UILabel*)createLabel { - UILabel* label = [[UILabel alloc] init]; - label.textAlignment = NSTextAlignmentLeft; - label.adjustsFontForContentSizeCategory = YES; - label.adjustsFontSizeToFitWidth = NO; - label.lineBreakMode = NSLineBreakByTruncatingTail; - label.translatesAutoresizingMaskIntoConstraints = NO; - label.numberOfLines = 1; - return label; +- (void)handleBuyingOptionsTap:(UITapGestureRecognizer*)sender { } @end
diff --git a/ios/chrome/browser/price_insights/ui/price_insights_item.h b/ios/chrome/browser/price_insights/ui/price_insights_item.h index 8dc33265..6825cca 100644 --- a/ios/chrome/browser/price_insights/ui/price_insights_item.h +++ b/ios/chrome/browser/price_insights/ui/price_insights_item.h
@@ -21,8 +21,6 @@ @property(nonatomic, copy) NSString* lowPrice; // The product typically high price. @property(nonatomic, copy) NSString* highPrice; -// The price history. -@property(nonatomic, copy) NSDictionary* priceHistory; // The product buying options URL. @property(nonatomic, assign) const GURL& buyingOptionsURL; // Whether or not the price can be tracked.
diff --git a/ios/chrome/browser/shared/model/prefs/BUILD.gn b/ios/chrome/browser/shared/model/prefs/BUILD.gn index 5101ddd..93173085 100644 --- a/ios/chrome/browser/shared/model/prefs/BUILD.gn +++ b/ios/chrome/browser/shared/model/prefs/BUILD.gn
@@ -79,6 +79,7 @@ "//components/variations/service", "//components/web_resource", "//ios/chrome/app:variations_app_state_agent", + "//ios/chrome/app/spotlight", "//ios/chrome/browser/drive/model:policy", "//ios/chrome/browser/first_run/model", "//ios/chrome/browser/geolocation/model",
diff --git a/ios/chrome/browser/shared/model/prefs/browser_prefs.mm b/ios/chrome/browser/shared/model/prefs/browser_prefs.mm index d7a594fe..9425da0 100644 --- a/ios/chrome/browser/shared/model/prefs/browser_prefs.mm +++ b/ios/chrome/browser/shared/model/prefs/browser_prefs.mm
@@ -70,6 +70,7 @@ #import "components/update_client/update_client.h" #import "components/variations/service/variations_service.h" #import "components/web_resource/web_resource_pref_names.h" +#import "ios/chrome/app/spotlight/spotlight_util.h" #import "ios/chrome/app/variations_app_state_agent.h" #import "ios/chrome/browser/drive/model/drive_policy.h" #import "ios/chrome/browser/first_run/model/first_run.h" @@ -785,6 +786,8 @@ registry->RegisterTimePref(prefs::kLastApplicationStorageMetricsLogTime, base::Time()); + + registry->RegisterIntegerPref(spotlight::kSpotlightLastIndexingVersionKey, 0); } // This method should be periodically pruned of year+ old migrations. @@ -992,6 +995,10 @@ // Added 04/2024. prefs->ClearPref(prefs::kMixedContentAutoupgradeEnabled); + + // Added 04/2024. + MigrateIntegerPreferenceFromUserDefaults( + spotlight::kSpotlightLastIndexingVersionKey, prefs, defaults); } void MigrateObsoleteUserDefault() {
diff --git a/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/base_grid_view_controller.mm b/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/base_grid_view_controller.mm index 984191a..748249a 100644 --- a/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/base_grid_view_controller.mm +++ b/ios/chrome/browser/ui/tab_switcher/tab_grid/grid/base_grid_view_controller.mm
@@ -1457,21 +1457,10 @@ // Makes the required changes when a new item has been inserted. - (void)modelAndViewUpdatesForInsertionDidCompleteForItemIdentifier: (GridItemIdentifier*)item { - NSIndexPath* index = - [self.diffableDataSource indexPathForItemIdentifier:item]; - [self updateSelectedCollectionViewItemRingAndBringIntoView:YES]; + [self updateSelectedCollectionViewItemRingAndBringIntoView:NO]; NSInteger numberOfTabs = [self numberOfTabs]; [self.delegate gridViewController:self didChangeItemCount:numberOfTabs]; - - if (!index) { - return; - } - - [self.collectionView - scrollToItemAtIndexPath:index - atScrollPosition:UICollectionViewScrollPositionCenteredVertically - animated:YES]; } // Makes the required changes to the data source when an existing item is
diff --git a/ios/web_view/internal/cwv_web_view.mm b/ios/web_view/internal/cwv_web_view.mm index 2a0881d..8c9a10b 100644 --- a/ios/web_view/internal/cwv_web_view.mm +++ b/ios/web_view/internal/cwv_web_view.mm
@@ -635,7 +635,7 @@ } - (void)evaluateJavaScript:(NSString*)javaScriptString - completion:(void (^)(id, NSError*))completion { + completionHandler:(void (^)(id result, NSError* error))completion { web::WebFrame* mainFrame = _webState->GetPageWorldWebFramesManager()->GetMainWebFrame(); if (!mainFrame) { @@ -663,6 +663,11 @@ })); } +- (void)evaluateJavaScript:(NSString*)javaScriptString + completion:(void (^)(id, NSError*))completion { + [self evaluateJavaScript:javaScriptString completionHandler:completion]; +} + - (void)setUIDelegate:(id<CWVUIDelegate>)UIDelegate { _UIDelegate = UIDelegate;
diff --git a/ios/web_view/public/cwv_web_view.h b/ios/web_view/public/cwv_web_view.h index bef3754..267559e0 100644 --- a/ios/web_view/public/cwv_web_view.h +++ b/ios/web_view/public/cwv_web_view.h
@@ -235,10 +235,17 @@ // `completion` is invoked with the result of evaluating the script and a // boolean representing success (`YES`) or failure (`NO`) of the evaluation. // -// Evaluation of `javaScriptString` will fail (and return NO to `completion`) if -// there is no current internal representation of the main frame. This can occur -// when the web view is navigating or if the current page content does not allow -// JavaScript execution (ex: JS disabled or PDF content). +// Evaluation of `javaScriptString` will fail (and return NO to `completion`) +// if there is no current internal representation of the main frame. This can +// occur when the web view is navigating or if the current page content does +// not allow JavaScript execution (ex: JS disabled or PDF content). +- (void)evaluateJavaScript:(NSString*)javaScriptString + completionHandler:(nullable void (^)(id result, + NSError* __nullable error))completion; + +// DEPRECATED: Use `evaluateJavaScript:completionHandler` instead. These +// methods are the same, but `evaluateJavaScript:completionHandler` provides +// better Swift type compatibility. - (void)evaluateJavaScript:(NSString*)javaScriptString completion:(void (^)(id result, NSError* error))completion;
diff --git a/media/audio/win/audio_low_latency_output_win.cc b/media/audio/win/audio_low_latency_output_win.cc index 6d0061f..5dae79ed 100644 --- a/media/audio/win/audio_low_latency_output_win.cc +++ b/media/audio/win/audio_low_latency_output_win.cc
@@ -135,10 +135,13 @@ params.hardware_capabilities().value_or( AudioParameters::HardwareCapabilities()); - // Only request an explicit buffer size if we are requesting the minimum - // supported by the hardware, everything else uses the older IAudioClient API. - if (params.frames_per_buffer() == - hardware_capabilities.min_frames_per_buffer) { + // Only request an explicit buffer size if we are requesting the non-default + // and the minimum supported by the hardware, everything else uses the older + // IAudioClient API. + if (params.frames_per_buffer() != + hardware_capabilities.default_frames_per_buffer && + params.frames_per_buffer() == + hardware_capabilities.min_frames_per_buffer) { requested_iaudioclient3_buffer_size_ = hardware_capabilities.min_frames_per_buffer; }
diff --git a/media/audio/win/audio_manager_win.cc b/media/audio/win/audio_manager_win.cc index b39c97a..6ab59b2 100644 --- a/media/audio/win/audio_manager_win.cc +++ b/media/audio/win/audio_manager_win.cc
@@ -334,6 +334,7 @@ int effects = AudioParameters::NO_EFFECTS; int min_buffer_size = 0; int max_buffer_size = 0; + int default_buffer_size = 0; bool attempt_audio_offload = CoreAudioUtil::IsAudioOffloadSupported(nullptr); if (cmd_line->HasSwitch(switches::kEnableExclusiveAudio)) { @@ -376,6 +377,7 @@ AudioParameters::HardwareCapabilities()); min_buffer_size = hardware_capabilities.min_frames_per_buffer; max_buffer_size = hardware_capabilities.max_frames_per_buffer; + default_buffer_size = hardware_capabilities.default_frames_per_buffer; } if (input_params.IsValid()) { @@ -423,7 +425,8 @@ buffer_size = user_buffer_size; AudioParameters::HardwareCapabilities hardware_capabilities( - min_buffer_size, max_buffer_size, attempt_audio_offload); + min_buffer_size, max_buffer_size, default_buffer_size, + attempt_audio_offload); #if BUILDFLAG(ENABLE_PASSTHROUGH_AUDIO_CODECS) hardware_capabilities.bitstream_formats = 0; hardware_capabilities.require_encapsulation = false;
diff --git a/media/audio/win/core_audio_util_win.cc b/media/audio/win/core_audio_util_win.cc index 685d160..e63220f 100644 --- a/media/audio/win/core_audio_util_win.cc +++ b/media/audio/win/core_audio_util_win.cc
@@ -475,6 +475,7 @@ int min_frames_per_buffer = 0; int max_frames_per_buffer = 0; + int default_frames_per_buffer = 0; int frames_per_buffer = 0; const bool supports_iac3 = IAudioClient3IsSupported(); @@ -519,6 +520,7 @@ if (SUCCEEDED(hr)) { min_frames_per_buffer = min_period_frames; max_frames_per_buffer = max_period_frames; + default_frames_per_buffer = default_period_frames; frames_per_buffer = default_period_frames; } DVLOG(1) << "IAudioClient3 => min_period_frames: " << min_period_frames; @@ -576,7 +578,8 @@ AudioParameters::AUDIO_PCM_LOW_LATENCY, {channel_layout, channels}, sample_rate, frames_per_buffer, AudioParameters::HardwareCapabilities( - min_frames_per_buffer, max_frames_per_buffer, is_offload_stream)); + min_frames_per_buffer, max_frames_per_buffer, + default_frames_per_buffer, is_offload_stream)); DVLOG(1) << audio_params.AsHumanReadableString(); DCHECK(audio_params.IsValid());
diff --git a/media/base/audio_parameters.h b/media/base/audio_parameters.h index 5cb0829..3e2821c0 100644 --- a/media/base/audio_parameters.h +++ b/media/base/audio_parameters.h
@@ -228,9 +228,11 @@ struct HardwareCapabilities { HardwareCapabilities(int min_frames_per_buffer, int max_frames_per_buffer, + int default_frames_per_buffer, bool require_offload) : min_frames_per_buffer(min_frames_per_buffer), max_frames_per_buffer(max_frames_per_buffer), + default_frames_per_buffer(default_frames_per_buffer), require_audio_offload(require_offload) {} HardwareCapabilities(int min_frames_per_buffer, int max_frames_per_buffer) : min_frames_per_buffer(min_frames_per_buffer), @@ -247,6 +249,11 @@ // Either value can be 0 and means that the min or max is not known. int min_frames_per_buffer = 0; int max_frames_per_buffer = 0; + // The default buffer size that the device will use when frames_per_buffer + // is not specified. Can be `min_frames_per_buffer`, + // `max_frames_per_buffer`, or a value in between. Can be 0 when the + // default is unknown. + int default_frames_per_buffer = 0; // Bitstream formats (OR'ed) supported by audio hardware. int bitstream_formats = 0; // Bitstream will need to be encapsulated in IEC61937 to be
diff --git a/media/capture/video/chromeos/stream_buffer_manager.cc b/media/capture/video/chromeos/stream_buffer_manager.cc index 759381a..c00fa9d 100644 --- a/media/capture/video/chromeos/stream_buffer_manager.cc +++ b/media/capture/video/chromeos/stream_buffer_manager.cc
@@ -446,7 +446,11 @@ DLOG(WARNING) << "Failed to reserve video capture buffer"; return; } - if (retire_old_buffer_id != VideoCaptureBufferPool::kInvalidId) { + // TODO(b/333813928): This is a temporary solution to fix the cros camera + // service crash until we figure out the crash root cause. + const bool kEnableBufferSynchronizationWithCameraService = false; + if (kEnableBufferSynchronizationWithCameraService && + retire_old_buffer_id != VideoCaptureBufferPool::kInvalidId) { buffer_observer_->OnBufferRetired( client_type, GetBufferIpcId(stream_type, retire_old_buffer_id)); } @@ -456,7 +460,8 @@ stream_context->buffer_dimension, *gfx_format, stream_context->buffer_usage, base::NullCallback()); - if (require_new_buffer_id != VideoCaptureBufferPool::kInvalidId) { + if (kEnableBufferSynchronizationWithCameraService && + require_new_buffer_id != VideoCaptureBufferPool::kInvalidId) { gfx::GpuMemoryBufferHandle gpu_memory_buffer_handle = gmb->CloneHandle(); gfx::NativePixmapHandle& native_pixmap_handle = gpu_memory_buffer_handle.native_pixmap_handle;
diff --git a/net/third_party/quiche/src b/net/third_party/quiche/src index 792c6e7..62f5f6c 160000 --- a/net/third_party/quiche/src +++ b/net/third_party/quiche/src
@@ -1 +1 @@ -Subproject commit 792c6e7d8658d7b7b27f780efec71c67930b4c9f +Subproject commit 62f5f6c9caabe019240b2a4377090bb657012c3f
diff --git a/testing/buildbot/chromium.chromiumos.json b/testing/buildbot/chromium.chromiumos.json index 01a2437a..076d0939 100644 --- a/testing/buildbot/chromium.chromiumos.json +++ b/testing/buildbot/chromium.chromiumos.json
@@ -5482,9 +5482,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_v126.0.6432.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v126.0.6433.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 126.0.6432.0", + "description": "Run with ash-chrome version 126.0.6433.0", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -5494,8 +5494,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v126.0.6432.0", - "revision": "version:126.0.6432.0" + "location": "lacros_version_skew_tests_v126.0.6433.0", + "revision": "version:126.0.6433.0" } ], "dimensions": { @@ -5638,9 +5638,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_v126.0.6432.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v126.0.6433.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 126.0.6432.0", + "description": "Run with ash-chrome version 126.0.6433.0", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -5650,8 +5650,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v126.0.6432.0", - "revision": "version:126.0.6432.0" + "location": "lacros_version_skew_tests_v126.0.6433.0", + "revision": "version:126.0.6433.0" } ], "dimensions": {
diff --git a/testing/buildbot/chromium.coverage.json b/testing/buildbot/chromium.coverage.json index 3052a35..a1446c2 100644 --- a/testing/buildbot/chromium.coverage.json +++ b/testing/buildbot/chromium.coverage.json
@@ -19663,9 +19663,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_v126.0.6432.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v126.0.6433.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 126.0.6432.0", + "description": "Run with ash-chrome version 126.0.6433.0", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -19675,8 +19675,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v126.0.6432.0", - "revision": "version:126.0.6432.0" + "location": "lacros_version_skew_tests_v126.0.6433.0", + "revision": "version:126.0.6433.0" } ], "dimensions": { @@ -19819,9 +19819,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_v126.0.6432.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v126.0.6433.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 126.0.6432.0", + "description": "Run with ash-chrome version 126.0.6433.0", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -19831,8 +19831,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v126.0.6432.0", - "revision": "version:126.0.6432.0" + "location": "lacros_version_skew_tests_v126.0.6433.0", + "revision": "version:126.0.6433.0" } ], "dimensions": {
diff --git a/testing/buildbot/chromium.fyi.json b/testing/buildbot/chromium.fyi.json index 2d1570f7..f67b865 100644 --- a/testing/buildbot/chromium.fyi.json +++ b/testing/buildbot/chromium.fyi.json
@@ -41837,9 +41837,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_v126.0.6432.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v126.0.6433.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 126.0.6432.0", + "description": "Run with ash-chrome version 126.0.6433.0", "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -41848,8 +41848,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v126.0.6432.0", - "revision": "version:126.0.6432.0" + "location": "lacros_version_skew_tests_v126.0.6433.0", + "revision": "version:126.0.6433.0" } ], "dimensions": { @@ -41987,9 +41987,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_v126.0.6432.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v126.0.6433.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 126.0.6432.0", + "description": "Run with ash-chrome version 126.0.6433.0", "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -41998,8 +41998,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v126.0.6432.0", - "revision": "version:126.0.6432.0" + "location": "lacros_version_skew_tests_v126.0.6433.0", + "revision": "version:126.0.6433.0" } ], "dimensions": { @@ -43336,9 +43336,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_v126.0.6432.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v126.0.6433.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 126.0.6432.0", + "description": "Run with ash-chrome version 126.0.6433.0", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -43348,8 +43348,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v126.0.6432.0", - "revision": "version:126.0.6432.0" + "location": "lacros_version_skew_tests_v126.0.6433.0", + "revision": "version:126.0.6433.0" } ], "dimensions": { @@ -43492,9 +43492,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_v126.0.6432.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v126.0.6433.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 126.0.6432.0", + "description": "Run with ash-chrome version 126.0.6433.0", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -43504,8 +43504,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v126.0.6432.0", - "revision": "version:126.0.6432.0" + "location": "lacros_version_skew_tests_v126.0.6433.0", + "revision": "version:126.0.6433.0" } ], "dimensions": { @@ -44817,9 +44817,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_v126.0.6432.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v126.0.6433.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 126.0.6432.0", + "description": "Run with ash-chrome version 126.0.6433.0", "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -44828,8 +44828,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v126.0.6432.0", - "revision": "version:126.0.6432.0" + "location": "lacros_version_skew_tests_v126.0.6433.0", + "revision": "version:126.0.6433.0" } ], "dimensions": { @@ -44967,9 +44967,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_v126.0.6432.0/test_ash_chrome" + "--ash-chrome-path-override=../../lacros_version_skew_tests_v126.0.6433.0/test_ash_chrome" ], - "description": "Run with ash-chrome version 126.0.6432.0", + "description": "Run with ash-chrome version 126.0.6433.0", "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" }, @@ -44978,8 +44978,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v126.0.6432.0", - "revision": "version:126.0.6432.0" + "location": "lacros_version_skew_tests_v126.0.6433.0", + "revision": "version:126.0.6433.0" } ], "dimensions": {
diff --git a/testing/buildbot/chromium.memory.json b/testing/buildbot/chromium.memory.json index 076e9c7b..854b522 100644 --- a/testing/buildbot/chromium.memory.json +++ b/testing/buildbot/chromium.memory.json
@@ -15763,12 +15763,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_v126.0.6432.0/test_ash_chrome", + "--ash-chrome-path-override=../../lacros_version_skew_tests_v126.0.6433.0/test_ash_chrome", "--test-launcher-print-test-stdio=always", "--combine-ash-logs-on-bots", "--asan-symbolize-output" ], - "description": "Run with ash-chrome version 126.0.6432.0", + "description": "Run with ash-chrome version 126.0.6433.0", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -15778,8 +15778,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v126.0.6432.0", - "revision": "version:126.0.6432.0" + "location": "lacros_version_skew_tests_v126.0.6433.0", + "revision": "version:126.0.6433.0" } ], "dimensions": { @@ -15939,12 +15939,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_v126.0.6432.0/test_ash_chrome", + "--ash-chrome-path-override=../../lacros_version_skew_tests_v126.0.6433.0/test_ash_chrome", "--test-launcher-print-test-stdio=always", "--combine-ash-logs-on-bots", "--asan-symbolize-output" ], - "description": "Run with ash-chrome version 126.0.6432.0", + "description": "Run with ash-chrome version 126.0.6433.0", "isolate_profile_data": true, "merge": { "script": "//testing/merge_scripts/standard_gtest_merge.py" @@ -15954,8 +15954,8 @@ "cipd_packages": [ { "cipd_package": "chromium/testing/linux-ash-chromium/x86_64/ash.zip", - "location": "lacros_version_skew_tests_v126.0.6432.0", - "revision": "version:126.0.6432.0" + "location": "lacros_version_skew_tests_v126.0.6433.0", + "revision": "version:126.0.6433.0" } ], "dimensions": {
diff --git a/testing/buildbot/filters/ios.content_browsertests.filter b/testing/buildbot/filters/ios.content_browsertests.filter index 163a5a2..2e6f0766 100644 --- a/testing/buildbot/filters/ios.content_browsertests.filter +++ b/testing/buildbot/filters/ios.content_browsertests.filter
@@ -368,6 +368,7 @@ -All/DumpAccessibilityTreeTest.AccessibilityInputTimeWithPopupOpen/blink -All/DumpAccessibilityTreeTest.AccessibilityInputWeek/blink -All/DumpAccessibilityTreeTest.AccessibilityInteractiveControlsWithLabels/blink +-All/DumpAccessibilityTreeTest.ReloadSelectionCrash/blink -All/NavigationControllerBrowserTest.BackSameDocumentInNewWindow/RDAllFrames_BFCacheDisabled -All/NavigationControllerBrowserTest.BackSameDocumentInNewWindow/RDAllFrames_BFCacheEnabled -All/NavigationControllerBrowserTest.BackSameDocumentInNewWindow/RDCrashedFrame_BFCacheDisabled @@ -493,6 +494,8 @@ -All/YieldingParserDumpAccessibilityTreeTest.AccessibilityInputTimeWithPopupOpen/blink -AttributionInternalsWebUiBrowserTest.ClearButton_ClearsSourceTable -AttributionInternalsWebUiBrowserTest.WebUIShownWithActiveImpression_ImpressionsDisplayed +-AttributionInternalsWebUiBrowserTest.WebUIShownWithPendingAggregatableReports_ReportsDisplayed +-AttributionInternalsWebUiBrowserTest.WebUIShownWithPendingReports_ReportsDisplayed -BackForwardCacheBrowserTest.BackNavigationFromCrashedPage -BackForwardCacheBrowserTest.EvictsFromCacheIfRendererProcessCrashes -BackForwardCacheBrowserTestWithJavaScriptDetails.StickyFeaturesWithDetails @@ -504,6 +507,7 @@ -ChildProcessSecurityPolicyInProcessBrowserTest.NoLeak -CommitNavigationRaceBrowserTest.CrashedInPendingCommit/NavigationQueueing -CommitNavigationRaceBrowserTest.CrashedInPendingCommit/UndoCommitNavigation +-CorsOriginPatternSetterBrowserTest.BlockDifferentPort -CrossPlatformAccessibilityBrowserTest.ControlsIdsForColorPopup -CrossPlatformAccessibilityBrowserTest.ControlsIdsForDateTimePopup -CrossSiteTransferTest.MaliciousPostWithFileData @@ -536,6 +540,7 @@ -IndexedDBBrowserTestWithCorruption.OperationOnCorruptedOpenDatabase/0 -InterestGroupBiddingAndAuctionServerBrowserTest.ChecksPermissionPolicyWarning -InterestGroupBiddingAndAuctionServerBrowserTest.TestEmpty +-InterestGroupBrowserTest.JoinInterestGroupNonObjectJSONFields -IsolatedOriginTest.LocalStorageOriginEnforcement_IsolatedAccessingNonIsolated -IsolatedOriginTest.LocalStorageOriginEnforcement_OpaqueOrigin -IsolatedOriginTest.LocalStorage_EmptyLocalFrameToken @@ -545,11 +550,13 @@ -IsolatedOriginTest.SessionStorage_WrongOrigin -LoaderBrowserTest.DynamicTitle1 -LoaderBrowserTest.DynamicTitle2 +-LocalCompileHintsBrowserTest.LocalCompileHints -MessagePortCloseEventBrowserTest.CloseEventHappensIfProcessCrashes -MediaSessionPictureInPictureContentBrowserTest.ActionAvailableAfterEndOfStreamAndSrcUpdate -MediaSessionServiceImplBrowserTest.ResetServiceWhenNavigatingAway -NavigationBrowserTest.PostUploadIllegalFilePath -NavigationBrowserTest.ProcessShutdownDuringDeferredNavigationThrottle +-NavigationCookiesBrowserTest.CookiesInheritedAboutBlank -NavigationCookiesBrowserTest.CookiesInheritedSrcDoc -NavigationRequestBrowserTest.CancelNavigationInWillStartRequest -NavigationRequestBrowserTest.EarlySwapMetrics_CrashNoCommit @@ -563,9 +570,13 @@ -PointerLockBrowserTest.PointerLockInnerContentsCrashes -PointerLockBrowserTest.PointerLockOopifCrashes -PolicyContainerHostBrowserTest.CheckRendererPolicyContainerAccessesAfterCrash +-PowerMonitorTest.TestRendererProcess -PrerenderBrowserTest.AbandonIfPrimaryMainFrameRendererProcessIsKilled -PrerenderBrowserTest.AbandonIfRendererProcessCrashes -PrerenderBrowserTest.AbandonIfRendererProcessIsKilled +-PrivateAggregationInternalsWebUiBrowserTest.WebUIClearStorage_ReportsRemoved +-PrivateAggregationInternalsWebUiBrowserTest.WebUIShownWithReports_ReportsDisplayed +-PrivateNetworkAccessBrowserTestRespectPreflightResultsForWorkers.FetchSharedWorkerFromSecureTreatAsPublicToLocal -RenderFrameDevToolsAgentHostFencedFrameBrowserTest.PageCrashInFencedFrame -RenderFrameHostImplBrowserTest.CheckRFHLifecycleStateWhenRendererCrashes -RenderFrameHostImplBrowserTest.DevToolsNavigationToken_EarlyCommitAfterCrash @@ -618,7 +629,10 @@ -ServiceProcessHostBrowserTest.LocalDisconnectQuits -ServiceProcessHostBrowserTest.ObserveCrash -ServiceProcessHostBrowserTest.RemoteDisconnectQuits +-ServiceWorkerInternalsUIBrowserTest.StopStartSWReflectedOnInternalUI -ServiceWorkerVersionBrowserTest.RendererCrash +-ServiceWorkerVersionBrowserTest.UpdateWithScriptLargerThanMojoDataPipeBuffer +-SignedExchangeRequestHandlerDownloadBrowserTest.DataURLDownload -SitePerProcessDevToolsProtocolTest.PageCrashInFrame -SitePerProcessHitTestBrowserTest.CancelWheelScrollBubblingOnWheelTargetDeletion -SitePerProcessHitTestBrowserTest.LargeCursorRemovedInScrolledOOPIF @@ -627,6 +641,7 @@ -SpareRenderProcessHostManagerTest.SpareRenderProcessHostKilled -TrustTokenBrowsertest.SigningRequiresRedemptionRecordInStorage -UtilityProcessHostBrowserTest.LaunchProcessAndCrash +-VideoPictureInPictureContentBrowserTest.PlaybackStateWhenReopenedAfterEndOfStream -ViewTransitionBrowserTest.NavigationCancelledBeforeScreenshot -ViewTransitionBrowserTest.NavigationCancelledAfterScreenshot -ViewTransitionBrowserTest.OwnershipTransferredToNewRenderer @@ -639,6 +654,7 @@ -WebContentsImplBrowserTest.PopupsOfPopupsFromJavaScriptEndFullscreen -WebContentsImplBrowserTest.ReinitializeMainFrameForCrashedTab -WebUIImplBrowserTest.NavigateFromCrashedAboutBlank +-WebContentsObserverBrowserTest.CookieCallbacks_MainFrame -WebContentsObserverBrowserTest.CookieCallbacks_Subframe -WebContentsObserverBrowserTest.CookieCallbacks_Subresource
diff --git a/testing/buildbot/variants.pyl b/testing/buildbot/variants.pyl index 7b6089d..33d275e2 100644 --- a/testing/buildbot/variants.pyl +++ b/testing/buildbot/variants.pyl
@@ -267,16 +267,16 @@ }, 'LACROS_VERSION_SKEW_CANARY': { 'identifier': 'Lacros version skew testing ash canary', - 'description': 'Run with ash-chrome version 126.0.6432.0', + 'description': 'Run with ash-chrome version 126.0.6433.0', 'args': [ - '--ash-chrome-path-override=../../lacros_version_skew_tests_v126.0.6432.0/test_ash_chrome', + '--ash-chrome-path-override=../../lacros_version_skew_tests_v126.0.6433.0/test_ash_chrome', ], 'swarming': { 'cipd_packages': [ { 'cipd_package': 'chromium/testing/linux-ash-chromium/x86_64/ash.zip', - 'location': 'lacros_version_skew_tests_v126.0.6432.0', - 'revision': 'version:126.0.6432.0', + 'location': 'lacros_version_skew_tests_v126.0.6433.0', + 'revision': 'version:126.0.6433.0', }, ], },
diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json index 934cdbf..073beab3 100644 --- a/testing/variations/fieldtrial_testing_config.json +++ b/testing/variations/fieldtrial_testing_config.json
@@ -1747,6 +1747,31 @@ ] } ], + "AutofillParsingPatternProvider": [ + { + "platforms": [ + "android", + "android_webview", + "chromeos", + "chromeos_lacros", + "ios", + "linux", + "mac", + "windows" + ], + "experiments": [ + { + "name": "Enabled", + "params": { + "prediction_source": "default" + }, + "enable_features": [ + "AutofillParsingPatternProvider" + ] + } + ] + } + ], "AutofillPopupImprovedTimingChecksV2": [ { "platforms": [ @@ -3761,6 +3786,21 @@ ] } ], + "ChromeOSOobeQuickStart": [ + { + "platforms": [ + "chromeos" + ], + "experiments": [ + { + "name": "Enabled", + "enable_features": [ + "OobeQuickStart" + ] + } + ] + } + ], "ChromeOSPrintingIppUsb": [ { "platforms": [ @@ -9473,21 +9513,6 @@ ] } ], - "IOSEnableViewportIntents": [ - { - "platforms": [ - "ios" - ], - "experiments": [ - { - "name": "Enabled", - "enable_features": [ - "EnableViewportIntents" - ] - } - ] - } - ], "IOSFastApplicationWillTerminate": [ { "platforms": [ @@ -9675,10 +9700,29 @@ ], "experiments": [ { - "name": "Enabled", + "name": "Enabled_20240419", "enable_features": [ "EnableMeasurementsExperience" ] + }, + { + "name": "MeasurementsOnly_20240419", + "enable_features": [ + "EnableMeasurementsExperience" + ] + }, + { + "name": "ViewportOnly_20240419", + "enable_features": [ + "EnableViewportIntents" + ] + }, + { + "name": "MeasurementsAndViewport_20240419", + "enable_features": [ + "EnableMeasurementsExperience", + "EnableViewportIntents" + ] } ] } @@ -14098,6 +14142,26 @@ ] } ], + "PlusAddressRefreshDesktopModal": [ + { + "platforms": [ + "chromeos", + "chromeos_lacros", + "linux", + "mac", + "windows" + ], + "experiments": [ + { + "name": "Enabled", + "enable_features": [ + "PlusAddressRefresh", + "PlusAddressRefreshUiInDesktopModal" + ] + } + ] + } + ], "PlusAddressesExperiment": [ { "platforms": [
diff --git a/third_party/blink/common/features.cc b/third_party/blink/common/features.cc index 620e28a..742726b 100644 --- a/third_party/blink/common/features.cc +++ b/third_party/blink/common/features.cc
@@ -1973,7 +1973,7 @@ // to send it to the browser. BASE_FEATURE(kRegisterJSSourceLocationBlockingBFCache, "RegisterJSSourceLocationBlockingBFCache", - base::FEATURE_DISABLED_BY_DEFAULT); + base::FEATURE_ENABLED_BY_DEFAULT); BASE_FEATURE(kRemoveAuthroizationOnCrossOriginRedirect, "RemoveAutorizationOnCrossOriginRedirect",
diff --git a/third_party/blink/renderer/core/css/css_properties.json5 b/third_party/blink/renderer/core/css/css_properties.json5 index 145626c9..2c73cc6 100644 --- a/third_party/blink/renderer/core/css/css_properties.json5 +++ b/third_party/blink/renderer/core/css/css_properties.json5
@@ -5191,7 +5191,6 @@ getter: "GetTextAlign", style_builder_custom_functions: ["value"], valid_for_formatted_text: true, - valid_for_permission_element: true, valid_for_page_context: true, }, { @@ -5203,7 +5202,6 @@ keywords: ["auto", "start", "end", "left", "right", "center", "justify"], default_value: "auto", typedom_types: ["Keyword"], - valid_for_permission_element: true, valid_for_page_context: true, }, {
diff --git a/third_party/blink/renderer/core/html/html_image_element.cc b/third_party/blink/renderer/core/html/html_image_element.cc index d1d0709f..a1acae0 100644 --- a/third_party/blink/renderer/core/html/html_image_element.cc +++ b/third_party/blink/renderer/core/html/html_image_element.cc
@@ -574,7 +574,8 @@ } } - if (features:: + if (base::FeatureList::IsEnabled(features::kLCPCriticalPathPredictor) && + features:: kLCPCriticalPathPredictorImageLoadPriorityEnabledForHTMLImageElement .Get()) { if (LocalFrame* frame = GetDocument().GetFrame()) {
diff --git a/third_party/blink/renderer/core/layout/inline/inline_layout_algorithm.cc b/third_party/blink/renderer/core/layout/inline/inline_layout_algorithm.cc index f61a35c..fbd7c57 100644 --- a/third_party/blink/renderer/core/layout/inline/inline_layout_algorithm.cc +++ b/third_party/blink/renderer/core/layout/inline/inline_layout_algorithm.cc
@@ -555,6 +555,18 @@ // TODO(crbug.com/40254880): Just flags, trimming data isn't implemented. if (space.ShouldTextBoxTrimStart() && line_info->IsFirstFormattedLine()) { // Apply `text-box-trim: start` if this is the first formatted line. + // TODO(crbug.com/40254880): The edge should be determined by + // `text-box-edge` property. + FontHeight intrinsic_metrics = + Node().Style().GetFontHeight(baseline_type_); + LayoutUnit offset_for_trimming_box = + intrinsic_metrics.ascent - line_box_metrics.ascent; + container_builder_.SetIntrinsicMetrics(intrinsic_metrics); + container_builder_.SetLineBoxBfcBlockOffset( + container_builder_.LineBoxBfcBlockOffset() + ? offset_for_trimming_box + + container_builder_.LineBoxBfcBlockOffset().value() + : offset_for_trimming_box); container_builder_.SetIsTextBoxTrimApplied(); } if (space.ShouldTextBoxTrimEnd() && !line_info->GetBreakToken()) {
diff --git a/third_party/blink/renderer/core/layout/inline/inline_node_test.cc b/third_party/blink/renderer/core/layout/inline/inline_node_test.cc index c620f4b..718bfeb 100644 --- a/third_party/blink/renderer/core/layout/inline/inline_node_test.cc +++ b/third_party/blink/renderer/core/layout/inline/inline_node_test.cc
@@ -526,6 +526,7 @@ // `text-indent` with hyphenations. // The "hy-" with the indent should be longest. {"hyphenation a", {60, 160}, "hyphens: auto; text-indent: 3em", "", "en"}, + {"hhhhh a", {80, 100}, "hyphens: auto; text-indent: 3em", "", "en"}, // Negative `text-indent`. {"43210123 1234 12", {40, 110}, "text-indent: -5em"}, {"4321012345 1234 12", {50, 130}, "text-indent: -5em"},
diff --git a/third_party/blink/renderer/core/layout/inline/line_box_fragment_builder.h b/third_party/blink/renderer/core/layout/inline/line_box_fragment_builder.h index 04aab2a..d6062d9 100644 --- a/third_party/blink/renderer/core/layout/inline/line_box_fragment_builder.h +++ b/third_party/blink/renderer/core/layout/inline/line_box_fragment_builder.h
@@ -73,6 +73,9 @@ const FontHeight& Metrics() const { return metrics_; } void SetMetrics(const FontHeight& metrics) { metrics_ = metrics; } + void SetIntrinsicMetrics(const FontHeight& intrinsic_metrics) { + intrinsic_metrics_ = intrinsic_metrics; + } void SetBaseDirection(TextDirection direction) { base_direction_ = direction; @@ -100,6 +103,7 @@ std::optional<LayoutUnit> line_box_bfc_block_offset_; LayoutUnit annotation_block_offset_adjustment_; FontHeight metrics_ = FontHeight::Empty(); + FontHeight intrinsic_metrics_ = FontHeight::Empty(); LayoutUnit hang_inline_size_; LayoutUnit clearance_after_line_; PhysicalLineBoxFragment::LineBoxType line_box_type_;
diff --git a/third_party/blink/renderer/core/layout/inline/line_breaker.cc b/third_party/blink/renderer/core/layout/inline/line_breaker.cc index 21d8546..271e2786 100644 --- a/third_party/blink/renderer/core/layout/inline/line_breaker.cc +++ b/third_party/blink/renderer/core/layout/inline/line_breaker.cc
@@ -905,7 +905,7 @@ use_faster_min_content_ && UNLIKELY(mode_ == LineBreakerMode::kMinContent) ? LineBreakState::kOverflow : LineBreakState::kContinue; - trailing_whitespace_ = WhitespaceState::kLeading; + trailing_whitespace_ = initial_whitespace_; while (state_ != LineBreakState::kDone) { // If we reach at the end of the block, this is the last line. DCHECK_LE(current_.item_index, items.size()); @@ -1720,10 +1720,11 @@ // The first word and the last word, "1" and "6" in the example above, are // handled in normal |HandleText()| because they may form a word with the // previous/next item. -bool LineBreaker::HandleTextForFastMinContent(InlineItemResult* item_result, - const InlineItem& item, - const ShapeResult& shape_result, - LineInfo* line_info) { +bool LineBreaker::HandleTextForFastMinContentOld( + InlineItemResult* item_result, + const InlineItem& item, + const ShapeResult& shape_result, + LineInfo* line_info) { DCHECK_EQ(mode_, LineBreakerMode::kMinContent); DCHECK(auto_wrap_); DCHECK(item.Type() == InlineItem::kText || @@ -1828,6 +1829,193 @@ return true; } +bool LineBreaker::HandleTextForFastMinContent(InlineItemResult* item_result, + const InlineItem& item, + const ShapeResult& shape_result, + LineInfo* line_info) { + if (UNLIKELY(!use_faster_min_content_)) { + return HandleTextForFastMinContentOld(item_result, item, shape_result, + line_info); + } + + DCHECK_EQ(mode_, LineBreakerMode::kMinContent); + DCHECK(auto_wrap_); + DCHECK(item.Type() == InlineItem::kText || + (item.Type() == InlineItem::kControl && + Text()[item.StartOffset()] == kTabulationCharacter)); + DCHECK(&shape_result); + + // Break the text at every break opportunity and measure each word. + unsigned start_offset = item_result->StartOffset(); + DCHECK_LT(start_offset, item.EndOffset()); + DCHECK_EQ(shape_result.StartIndex(), item.StartOffset()); + DCHECK_GE(start_offset, shape_result.StartIndex()); + const unsigned item_end_offset = item.EndOffset(); + unsigned end_offset = item_end_offset; + + bool should_break_at_first_opportunity = false; + const LayoutUnit indent = line_info->TextIndent(); + if (UNLIKELY(indent)) { + if (UNLIKELY(indent < 0)) { + // A negative `text-indent` can make this line not wrap at the first + // break opportunity if it's in the indent. Use `HandleText()`. + return false; + } + should_break_at_first_opportunity = true; + end_offset = start_offset + 1; + } else if (UNLIKELY(position_ < indent)) { + // A negative margin can move the position before the initial position. + // This line may not wrap at the first break opportunity if it appears + // before the initial position. Fall back to `HandleText()`. + return false; + } else { + if (UNLIKELY(position_ != indent)) { + // Break at the first opportunity if there were previous items. + should_break_at_first_opportunity = true; + end_offset = start_offset + 1; + } +#if EXPENSIVE_DCHECKS_ARE_ON() + // Whether the start offset is at middle of a word or not can also be + // determined by `line_info->Results()`. Check if they match. + auto results = base::make_span(line_info->Results()); + DCHECK_EQ(item_result, &results.back()); + results = results.subspan(0, results.size() - 1); + bool is_at_mid_word = false; + for (const InlineItemResult& result : base::Reversed(results)) { + DCHECK(!result.can_break_after); + if (result.inline_size) { + is_at_mid_word = true; + break; + } + } + DCHECK_EQ(should_break_at_first_opportunity, + is_at_mid_word || has_cloned_box_decorations_); +#endif // EXPENSIVE_DCHECKS_ARE_ON() + } + + shape_result.EnsurePositionData(); + const unsigned saved_start_offset = break_iterator_.StartOffset(); + FastMinTextContext context; + const String& text = Text(); + const ComputedStyle& item_style = *item.Style(); + const bool should_break_spaces = item_style.ShouldBreakSpaces(); + unsigned next_break = 0; + unsigned non_hangable_run_end = 0; + bool can_break_after = false; + while (start_offset < end_offset) { + // TODO(crbug.com/332328872): `following()` scans back to the start of the + // string. Resetting the ICU `BreakIterator` is faster than the scanning. + break_iterator_.SetStartOffset(start_offset); + next_break = break_iterator_.NextBreakOpportunity( + start_offset + 1, std::min(item_end_offset + 1, text.length())); + + if (UNLIKELY(next_break > item_end_offset)) { + // The `item.EndOffset()` is not breakable; e.g., middle of a word. + DCHECK_EQ(next_break, item_end_offset + 1); + if (start_offset == item_result->StartOffset()) { + // If this is the first word of this line, create an `InlineItemResult` + // of this word with `!can_break_after`, so that it can create a line + // with following items. + next_break = item_end_offset; + can_break_after = false; + } else { + const UChar next_ch = text[next_break - 1]; + if (next_ch == kNewlineCharacter) { + // Optimize to avoid splitting `InlineItemResult`. If the next is a + // forced break, this line ends without additional widths. + next_break = item_end_offset; + can_break_after = false; + } else { + // If the end of `item` is middle of a word, spilt before the last + // word. The last word should create a line with following items. + next_break = start_offset; + DCHECK(can_break_after); + break; + } + } + } else { + can_break_after = true; + } + DCHECK_LE(next_break, item_end_offset); + + // Remove trailing spaces. + non_hangable_run_end = next_break; + if (!should_break_spaces) { + while (non_hangable_run_end > start_offset && + IsBreakableSpace(text[non_hangable_run_end - 1])) { + --non_hangable_run_end; + } + } + + // `word_len` may be zero if `start_offset` is at a breakable space. + DCHECK_GE(non_hangable_run_end, start_offset); + if (const wtf_size_t word_len = non_hangable_run_end - start_offset) { + bool has_hyphen = can_break_after && + text[non_hangable_run_end - 1] == kSoftHyphenCharacter; + if (UNLIKELY(hyphenation_)) { + const StringView word(text, start_offset, word_len); + if (UNLIKELY(should_break_at_first_opportunity)) { + if (const wtf_size_t location = + hyphenation_->FirstHyphenLocation(word, 0)) { + next_break = non_hangable_run_end = start_offset + location; + has_hyphen = can_break_after = true; + } + context.Add(shape_result, start_offset, non_hangable_run_end, + has_hyphen, *item_result); + } else { + context.AddHyphenated(shape_result, start_offset, + non_hangable_run_end, has_hyphen, *item_result, + *hyphenation_, word); + } + } else { + context.Add(shape_result, start_offset, non_hangable_run_end, + has_hyphen, *item_result); + } + } + + DCHECK_GT(next_break, start_offset); + start_offset = next_break; + } + + break_iterator_.SetStartOffset(saved_start_offset); + + // Create an `InlineItemResult` that has the max of widths of all words. + DCHECK_GE(non_hangable_run_end, item_result->StartOffset()); + DCHECK_LE(non_hangable_run_end, item_end_offset); + if (item_style.ShouldCollapseWhiteSpaces()) { + item_result->text_offset.end = non_hangable_run_end; + trailing_whitespace_ = non_hangable_run_end != next_break + ? WhitespaceState::kCollapsed + : WhitespaceState::kNone; + } else { + item_result->text_offset.end = next_break; + trailing_whitespace_ = non_hangable_run_end != next_break + ? WhitespaceState::kPreserved + : WhitespaceState::kNone; + } + item_result->text_offset.AssertValid(); + item_result->inline_size = context.MinInlineSize(); + position_ += item_result->inline_size; + item_result->can_break_after = can_break_after; + if (can_break_after) { + state_ = LineBreakState::kTrailing; + } else { + state_ = LineBreakState::kOverflow; + } + + DCHECK_GE(next_break, non_hangable_run_end); + DCHECK_LE(next_break, item_end_offset); + if (next_break >= item_end_offset) { + MoveToNextOf(item); + } else { + // It's critical to move forward to avoid an infinite loop. + DCHECK_EQ(current_.text_offset, item_result->StartOffset()); + CHECK_GT(next_break, current_.text_offset); + current_.text_offset = next_break; + } + return true; +} + void LineBreaker::HandleEmptyText(const InlineItem& item, LineInfo* line_info) { // Add an empty `InlineItemResult` for empty or fully collapsed text. They // aren't necessary for line breaking/layout purposes, but callsites may need @@ -3027,13 +3215,14 @@ // TODO(crbug.com/324111880): Setup for a wrapped ruby column. const InlineItem& item = Items()[open_column_item_index]; - LineInfo base_line_info = - CreateSubLineInfo(base_start, base_end_index, LayoutUnit::Max()); + LineInfo base_line_info = CreateSubLineInfo( + base_start, base_end_index, LayoutUnit::Max(), trailing_whitespace_); HeapVector<LineInfo, 1> annotation_line_list; for (const auto& data : annotation_data) { annotation_line_list.push_back( - CreateSubLineInfo(data.start, data.end_item_index, LayoutUnit::Max())); + CreateSubLineInfo(data.start, data.end_item_index, LayoutUnit::Max(), + WhitespaceState::kLeading)); } LayoutUnit ruby_size = MaxLineWidth(base_line_info, annotation_line_list); @@ -3042,11 +3231,12 @@ // Recreate lines because lines created with LineBreakerMode::kMaxContent // are not usable in InlineLayoutAlgorithm. base_line_info = - CreateSubLineInfo(base_start, base_end_index, LayoutUnit::NearlyMax()); + CreateSubLineInfo(base_start, base_end_index, LayoutUnit::NearlyMax(), + trailing_whitespace_); for (wtf_size_t i = 0; i < annotation_data.size(); ++i) { annotation_line_list[i] = CreateSubLineInfo( annotation_data[i].start, annotation_data[i].end_item_index, - LayoutUnit::NearlyMax()); + LayoutUnit::NearlyMax(), WhitespaceState::kLeading); } AddRubyColumnResult(item, base_line_info, annotation_line_list, @@ -3060,9 +3250,11 @@ // RemainingAvailableWidth(). } -LineInfo LineBreaker::CreateSubLineInfo(InlineItemTextIndex start, - wtf_size_t end_item_index, - LayoutUnit limit) { +LineInfo LineBreaker::CreateSubLineInfo( + InlineItemTextIndex start, + wtf_size_t end_item_index, + LayoutUnit limit, + WhitespaceState initial_whitespace_state) { ExclusionSpace empty_exclusion_space; LeadingFloats empty_leading_floats; LineInfo sub_line_info; @@ -3073,7 +3265,8 @@ constraint_space_, LineLayoutOpportunity(limit), empty_leading_floats, /* break_token */ nullptr, /* column_spanner_path */ nullptr, &empty_exclusion_space); - sub_line_breaker.SetInputRange(start, end_item_index); + sub_line_breaker.SetInputRange(start, end_item_index, + initial_whitespace_state); sub_line_breaker.NextLine(&sub_line_info); return sub_line_info; } @@ -4102,10 +4295,12 @@ } void LineBreaker::SetInputRange(InlineItemTextIndex start, - wtf_size_t end_item_index) { + wtf_size_t end_item_index, + WhitespaceState initial_whitespace_state) { DCHECK(RuntimeEnabledFeatures::RubyLineBreakableEnabled()); current_ = start; end_item_index_ = end_item_index; + initial_whitespace_ = initial_whitespace_state; } const InlineBreakToken* LineBreaker::CreateBreakToken(
diff --git a/third_party/blink/renderer/core/layout/inline/line_breaker.h b/third_party/blink/renderer/core/layout/inline/line_breaker.h index 29faaa9..d6616400 100644 --- a/third_party/blink/renderer/core/layout/inline/line_breaker.h +++ b/third_party/blink/renderer/core/layout/inline/line_breaker.h
@@ -55,9 +55,6 @@ const InlineItemsData& ItemsData() const { return items_data_; } - // This LineBreaker handles only [start, end_item_index) of `Items()`. - void SetInputRange(InlineItemTextIndex start, wtf_size_t end_item_index); - // True if the last line has `box-decoration-break: clone`, which affected the // size. bool HasClonedBoxDecorations() const { return has_cloned_box_decorations_; } @@ -123,6 +120,11 @@ bool CanBreakInside(const LineInfo& line_info); bool CanBreakInside(const InlineItemResult& item_result); + // This LineBreaker handles only [start, end_item_index) of `Items()`. + void SetInputRange(InlineItemTextIndex start, + wtf_size_t end_item_index, + WhitespaceState initial_whitespace_state); + private: Document& GetDocument() const { return node_.GetDocument(); } @@ -186,6 +188,10 @@ const InlineItem&, const ShapeResult&, LineInfo*); + bool HandleTextForFastMinContentOld(InlineItemResult*, + const InlineItem&, + const ShapeResult&, + LineInfo*); void HandleEmptyText(const InlineItem& item, LineInfo*); const ShapeResultView* TruncateLineEndResult(const LineInfo&, @@ -218,7 +224,8 @@ bool HandleRuby(LineInfo* line_info); LineInfo CreateSubLineInfo(InlineItemTextIndex start, wtf_size_t end_item_index, - LayoutUnit limit); + LayoutUnit limit, + WhitespaceState initial_whitespace_state); InlineItemResult* AddRubyColumnResult( const InlineItem& item, const LineInfo& base_line_info, @@ -305,6 +312,9 @@ // |WhitespaceState| of the current end. When a line is broken, this indicates // the state of trailing whitespaces. WhitespaceState trailing_whitespace_ = WhitespaceState::kUnknown; + // The state just after starting BreakLine(). This can be overridden by + // SetInputRange(). + WhitespaceState initial_whitespace_ = WhitespaceState::kLeading; // The current position from inline_start. Unlike InlineLayoutAlgorithm // that computes position in visual order, this position in logical order. @@ -426,6 +436,7 @@ // Keep the last item |HandleTextForFastMinContent()| has handled. This is // used to fallback the last word to |HandleText()|. + // TODO(crbug.com/333630754): Remove when `FasterMinContent` is stabilized. const InlineItem* fast_min_content_item_ = nullptr; // The current base direction for the bidi algorithm.
diff --git a/third_party/blink/renderer/core/layout/inline/line_breaker_test.cc b/third_party/blink/renderer/core/layout/inline/line_breaker_test.cc index ba24fd84..8c727bc 100644 --- a/third_party/blink/renderer/core/layout/inline/line_breaker_test.cc +++ b/third_party/blink/renderer/core/layout/inline/line_breaker_test.cc
@@ -1111,7 +1111,7 @@ LineLayoutOpportunity(LayoutUnit::Max()), leading_floats, nullptr, nullptr, &exclusion_space); // <span> to just after </span>. - line_breaker.SetInputRange({1, 6}, 4); + line_breaker.SetInputRange({1, 6}, 4, LineBreaker::WhitespaceState::kLeading); LineInfo line_info; line_breaker.NextLine(&line_info); // The result should contain only <span>...</span>.
diff --git a/third_party/blink/renderer/core/layout/inline/physical_line_box_fragment.cc b/third_party/blink/renderer/core/layout/inline/physical_line_box_fragment.cc index be4675df..61014e34 100644 --- a/third_party/blink/renderer/core/layout/inline/physical_line_box_fragment.cc +++ b/third_party/blink/renderer/core/layout/inline/physical_line_box_fragment.cc
@@ -20,6 +20,7 @@ struct SameSizeAsPhysicalLineBoxFragment : PhysicalFragment { FontHeight metrics; + FontHeight intrinsic_metrics; }; ASSERT_SIZE(PhysicalLineBoxFragment, SameSizeAsPhysicalLineBoxFragment); @@ -44,7 +45,10 @@ builder->GetWritingMode(), kFragmentLineBox, builder->line_box_type_), - metrics_(builder->metrics_) { + metrics_(builder->metrics_), + intrinsic_metrics_(builder->intrinsic_metrics_.IsEmpty() + ? builder->metrics_ + : builder->intrinsic_metrics_) { // A line box must have a metrics unless it's an empty line box. DCHECK(!metrics_.IsEmpty() || IsEmptyLineBox()); base_direction_ = static_cast<unsigned>(builder->base_direction_);
diff --git a/third_party/blink/renderer/core/layout/inline/physical_line_box_fragment.h b/third_party/blink/renderer/core/layout/inline/physical_line_box_fragment.h index 3aae382..50352f1 100644 --- a/third_party/blink/renderer/core/layout/inline/physical_line_box_fragment.h +++ b/third_party/blink/renderer/core/layout/inline/physical_line_box_fragment.h
@@ -50,6 +50,12 @@ const FontHeight& Metrics() const { return metrics_; } + // Different from `Metrics()`, which can be affected by properties such as + // `line-height`, `IntrinsicMetrics()` describes content's inherent size. + // Properties such as `text-box-edge` contribute to the determination of + // inherent size. + const FontHeight& IntrinsicMetrics() const { return intrinsic_metrics_; } + // The base direction of this line. Also known as the paragraph direction. // This may be different from the direction of the container box when // first-line style is used, or when 'unicode-bidi: plaintext' is used. @@ -75,6 +81,10 @@ private: FontHeight metrics_; + + // The intrinsic content size. It might be affected by `text-box-edge` + // property. + FontHeight intrinsic_metrics_; }; template <>
diff --git a/third_party/blink/renderer/core/layout/inline/ruby_utils.cc b/third_party/blink/renderer/core/layout/inline/ruby_utils.cc index 9fdeb58..8b51d434 100644 --- a/third_party/blink/renderer/core/layout/inline/ruby_utils.cc +++ b/third_party/blink/renderer/core/layout/inline/ruby_utils.cc
@@ -976,10 +976,20 @@ return result_height; } if (const auto& layout_result = line_item.layout_result) { - if (line_item.Size().inline_size != LayoutUnit()) { + const auto& fragment = layout_result->GetPhysicalFragment(); + const auto& style = fragment.Style(); + LogicalSize logical_size = + LogicalFragment(style.GetWritingDirection(), fragment).Size(); + const LayoutBox* box = DynamicTo<LayoutBox>(line_item.GetLayoutObject()); + if (logical_size.inline_size && box && box->IsAtomicInlineLevel()) { + LogicalRect overflow = + WritingModeConverter( + {ToLineWritingMode(style.GetWritingMode()), style.Direction()}, + fragment.Size()) + .ToLogical(box->ScrollableOverflowRect()); // Assume 0 is the baseline. BlockOffset() is always negative. - return FontHeight(-line_item.BlockOffset(), - line_item.Size().block_size + line_item.BlockOffset()); + return FontHeight(-overflow.offset.block_offset - line_item.BlockOffset(), + overflow.BlockEndOffset() + line_item.BlockOffset()); } } return FontHeight();
diff --git a/third_party/blink/renderer/core/loader/image_loader.cc b/third_party/blink/renderer/core/loader/image_loader.cc index 0b9e486f..ee7107a6 100644 --- a/third_party/blink/renderer/core/loader/image_loader.cc +++ b/third_party/blink/renderer/core/loader/image_loader.cc
@@ -912,7 +912,8 @@ ResourcePriority priority = image_resource->ComputeResourcePriority(); priority.source = ResourcePriority::Source::kImageLoader; - if (features:: + if (base::FeatureList::IsEnabled(features::kLCPCriticalPathPredictor) && + features:: kLCPCriticalPathPredictorImageLoadPriorityEnabledForHTMLImageElement .Get()) { auto* html_image_element = DynamicTo<HTMLImageElement>(element_.Get());
diff --git a/third_party/blink/renderer/modules/media/audio/audio_renderer_mixer_manager.cc b/third_party/blink/renderer/modules/media/audio/audio_renderer_mixer_manager.cc index 0429abe2..a3e6f91 100644 --- a/third_party/blink/renderer/modules/media/audio/audio_renderer_mixer_manager.cc +++ b/third_party/blink/renderer/modules/media/audio/audio_renderer_mixer_manager.cc
@@ -102,7 +102,7 @@ #if BUILDFLAG(IS_WIN) if (base::FeatureList::IsEnabled(media::kAudioOffload)) { if (params.latency_tag() == media::AudioLatency::Type::kPlayback) { - media::AudioParameters::HardwareCapabilities hardware_caps(0, 0, true); + media::AudioParameters::HardwareCapabilities hardware_caps(0, 0, 0, true); params.set_hardware_capabilities(hardware_caps); } }
diff --git a/third_party/blink/renderer/modules/ml/webnn/ml_graph_builder.cc b/third_party/blink/renderer/modules/ml/webnn/ml_graph_builder.cc index a2ddf6a..79eb57e 100644 --- a/third_party/blink/renderer/modules/ml/webnn/ml_graph_builder.cc +++ b/third_party/blink/renderer/modules/ml/webnn/ml_graph_builder.cc
@@ -532,8 +532,7 @@ // non-finite values. if (options->hasMinValue() && options->hasMaxValue()) { if (options->minValue() > options->maxValue()) { - exception_state.ThrowDOMException( - DOMExceptionCode::kDataError, + exception_state.ThrowTypeError( String::Format("The min value (%f) should be less than or equal to " "the max value (%f).", options->minValue(), options->maxValue())); @@ -1140,8 +1139,7 @@ // The current spec doesn't restrict the value of alpha. An issue has been // filed to track it: https://github.com/webmachinelearning/webnn/issues/383 if (options->alpha() <= 0.0f) { - exception_state.ThrowDOMException( - DOMExceptionCode::kDataError, + exception_state.ThrowTypeError( "The value of alpha must be greater than 0."); return nullptr; } @@ -1162,8 +1160,7 @@ // The current spec doesn't restrict the value of alpha. An issue has been // filed to track it: https://github.com/webmachinelearning/webnn/issues/383 if (options->alpha() <= 0.0f) { - exception_state.ThrowDOMException( - DOMExceptionCode::kDataError, + exception_state.ThrowTypeError( "The value of alpha must be greater than 0."); return nullptr; } @@ -1474,9 +1471,7 @@ ConvertToComponentOperand(input), axes, ConvertToLayerNormalizationAttributes(options)); if (!validated_output.has_value()) { - exception_state.ThrowDOMException( - DOMExceptionCode::kDataError, - String::FromUTF8(validated_output.error())); + exception_state.ThrowTypeError(String::FromUTF8(validated_output.error())); return nullptr; } @@ -1488,8 +1483,7 @@ this, ComponentOperandTypeToBlink(validated_output->data_type), Vector<uint32_t>(validated_output->dimensions), layer_normalization); if (!output.has_value()) { - exception_state.ThrowDOMException(DOMExceptionCode::kDataError, - output.error()); + exception_state.ThrowTypeError(output.error()); return nullptr; }
diff --git a/third_party/blink/renderer/modules/ml/webnn/ml_graph_builder_test.cc b/third_party/blink/renderer/modules/ml/webnn/ml_graph_builder_test.cc index 68717e2..bbd2f22 100644 --- a/third_party/blink/renderer/modules/ml/webnn/ml_graph_builder_test.cc +++ b/third_party/blink/renderer/modules/ml/webnn/ml_graph_builder_test.cc
@@ -741,75 +741,6 @@ } } -MLOperand* BuildHardSigmoid(V8TestingScope& scope, - MLGraphBuilder* builder, - const MLOperand* input, - const MLHardSigmoidOptions* options) { - auto* output = - builder->hardSigmoid(input, options, scope.GetExceptionState()); - EXPECT_THAT(output, testing::NotNull()); - EXPECT_EQ(output->Kind(), webnn::mojom::blink::Operand::Kind::kOutput); - EXPECT_EQ(output->DataType(), input->DataType()); - EXPECT_EQ(output->Dimensions(), input->Dimensions()); - auto* hard_sigmoid = output->Operator(); - EXPECT_THAT(hard_sigmoid, testing::NotNull()); - EXPECT_EQ(hard_sigmoid->Kind(), - webnn::mojom::blink::Operation::Tag::kHardSigmoid); - EXPECT_TRUE(hard_sigmoid->IsConnected()); - EXPECT_THAT(hard_sigmoid->Options(), testing::NotNull()); - return output; -} - -TEST_F(MLGraphBuilderTest, HardSigmoidTest) { - V8TestingScope scope; - auto* builder = - CreateMLGraphBuilder(scope.GetExecutionContext(), scope.GetScriptState(), - scope.GetExceptionState()); - { - // Test building hardSigmoid with a scalar input and default options. - auto* input = - BuildInput(builder, "input", {}, V8MLOperandDataType::Enum::kFloat32, - scope.GetExceptionState()); - BuildHardSigmoid(scope, builder, input); - } - { - // Test building hardSigmoid with a 2-D input and alpha = 0.1, beta = 0.2. - auto* input = BuildInput(builder, "input", {3, 4}, - V8MLOperandDataType::Enum::kFloat16, - scope.GetExceptionState()); - auto* options = MLHardSigmoidOptions::Create(); - options->setAlpha(0.1); - options->setBeta(0.2); - BuildHardSigmoid(scope, builder, input, options); - } - { - // Test building hardSigmoid activation. - auto* output = builder->hardSigmoid(MLHardSigmoidOptions::Create(), - scope.GetExceptionState()); - ASSERT_THAT(output, testing::NotNull()); - const MLOperator* hard_sigmoid = output->Operator(); - ASSERT_THAT(hard_sigmoid, testing::NotNull()); - EXPECT_EQ(hard_sigmoid->Kind(), - webnn::mojom::blink::Operation::Tag::kHardSigmoid); - EXPECT_FALSE(hard_sigmoid->IsConnected()); - ASSERT_THAT(hard_sigmoid->Options(), testing::NotNull()); - } - { - // Test throwing exception when building hardSigmoid with int32 input. - Vector<uint32_t> input_shape({3, 4}); - auto* input = BuildInput(builder, "input", input_shape, - V8MLOperandDataType::Enum::kInt32, - scope.GetExceptionState()); - auto* output = builder->hardSigmoid(input, MLHardSigmoidOptions::Create(), - scope.GetExceptionState()); - EXPECT_THAT(output, testing::IsNull()); - EXPECT_EQ(scope.GetExceptionState().CodeAs<ESErrorType>(), - ESErrorType::kTypeError); - EXPECT_EQ(scope.GetExceptionState().Message(), - "The input data type must be one of the float32,float16 types."); - } -} - MLOperand* BuildGemm(V8TestingScope& scope, MLGraphBuilder* builder, const MLOperand* a, @@ -1372,171 +1303,6 @@ } } -MLOperand* BuildClamp(V8TestingScope& scope, - MLGraphBuilder* builder, - const MLOperand* input, - const MLClampOptions* options) { - auto* output = builder->clamp(input, options, scope.GetExceptionState()); - EXPECT_THAT(output, testing::NotNull()); - EXPECT_EQ(output->Kind(), webnn::mojom::blink::Operand::Kind::kOutput); - EXPECT_EQ(output->DataType(), input->DataType()); - auto* clamp = output->Operator(); - EXPECT_THAT(clamp, testing::NotNull()); - EXPECT_EQ(clamp->Kind(), webnn::mojom::blink::Operation::Tag::kClamp); - EXPECT_TRUE(clamp->IsConnected()); - EXPECT_THAT(clamp->Options(), testing::NotNull()); - return output; -} - -TEST_F(MLGraphBuilderTest, ClampTest) { - V8TestingScope scope; - MLGraphBuilder* builder = - CreateMLGraphBuilder(scope.GetExecutionContext(), scope.GetScriptState(), - scope.GetExceptionState()); - { - // Test building clamp with default options. - auto* input = BuildInput(builder, "input", {2, 4}, - V8MLOperandDataType::Enum::kFloat32, - scope.GetExceptionState()); - auto* options = MLClampOptions::Create(); - EXPECT_FALSE(options->hasMaxValue()); - EXPECT_FALSE(options->hasMinValue()); - auto* output = BuildClamp(scope, builder, input, options); - EXPECT_EQ(output->Dimensions(), Vector<uint32_t>({2, 4})); - } - { - // Test building clamp with max value = 0 and min value = 0. - auto* input = BuildInput(builder, "input", {1, 2, 2, 7}, - V8MLOperandDataType::Enum::kFloat32, - scope.GetExceptionState()); - auto* options = MLClampOptions::Create(); - options->setMaxValue(0); - options->setMinValue(0); - auto* output = BuildClamp(scope, builder, input, options); - EXPECT_EQ(output->Dimensions(), Vector<uint32_t>({1, 2, 2, 7})); - } - { - // Test throwing error when the max value is less than the min value. - auto* input = - BuildInput(builder, "input", {2, 4}, V8MLOperandDataType::Enum::kInt32, - scope.GetExceptionState()); - auto* options = MLClampOptions::Create(); - options->setMaxValue(-3.243432); - options->setMinValue(4.432232); - auto* output = builder->clamp(input, options, scope.GetExceptionState()); - EXPECT_THAT(output, testing::IsNull()); - EXPECT_EQ(scope.GetExceptionState().CodeAs<DOMExceptionCode>(), - DOMExceptionCode::kDataError); - EXPECT_EQ(scope.GetExceptionState().Message(), - "The min value (4.432232) should be less than or equal to " - "the max value (-3.243432)."); - } - { - // Test building clamp as an activation. - MLActivation* clamp = - builder->clamp(MLClampOptions::Create(), scope.GetExceptionState()); - ASSERT_THAT(clamp, testing::NotNull()); - ASSERT_THAT(clamp->Operator(), testing::NotNull()); - EXPECT_EQ(clamp->Kind(), webnn::mojom::blink::Activation::Tag::kClamp); - EXPECT_FALSE(clamp->Operator()->IsConnected()); - ASSERT_THAT(clamp->Operator()->Options(), testing::NotNull()); - } -} - -void TestBuildElu(V8TestingScope& scope, - MLGraphBuilder* builder, - const MLOperand* input, - const Vector<uint32_t>& output_shape, - const MLEluOptions* options) { - auto* output = builder->elu(input, options, scope.GetExceptionState()); - EXPECT_THAT(output, testing::NotNull()); - EXPECT_EQ(output->Kind(), webnn::mojom::blink::Operand::Kind::kOutput); - EXPECT_EQ(output->DataType(), input->DataType()); - EXPECT_EQ(output->Dimensions(), output_shape); - auto* elu = output->Operator(); - EXPECT_THAT(elu, testing::NotNull()); - EXPECT_EQ(elu->Kind(), webnn::mojom::blink::Operation::Tag::kElu); - EXPECT_TRUE(elu->IsConnected()); - EXPECT_THAT(elu->Options(), testing::NotNull()); -} - -TEST_F(MLGraphBuilderTest, EluTest) { - V8TestingScope scope; - MLGraphBuilder* builder = - CreateMLGraphBuilder(scope.GetExecutionContext(), scope.GetScriptState(), - scope.GetExceptionState()); - { - // Test building elu with float32 input and default options. - auto* input = BuildInput(builder, "input", {1, 2, 3}, - V8MLOperandDataType::Enum::kFloat32, - scope.GetExceptionState()); - auto* options = MLEluOptions::Create(); - EXPECT_TRUE(options->hasAlpha()); - EXPECT_EQ(options->alpha(), 1.0f); - TestBuildElu(scope, builder, input, {1, 2, 3}, options); - } - { - // Test building elu with float32 input and alpha = 0.1. - auto* input = BuildInput(builder, "input", {2, 2, 3}, - V8MLOperandDataType::Enum::kFloat32, - scope.GetExceptionState()); - auto* options = MLEluOptions::Create(); - options->setAlpha(0.1); - TestBuildElu(scope, builder, input, {2, 2, 3}, options); - } - { - // Test throwing error when alpha = 0. - auto* input = BuildInput(builder, "input", {2, 2, 3}, - V8MLOperandDataType::Enum::kFloat32, - scope.GetExceptionState()); - auto* options = MLEluOptions::Create(); - options->setAlpha(0); - auto* output = builder->elu(input, options, scope.GetExceptionState()); - EXPECT_THAT(output, testing::IsNull()); - EXPECT_EQ(scope.GetExceptionState().CodeAs<DOMExceptionCode>(), - DOMExceptionCode::kDataError); - EXPECT_EQ(scope.GetExceptionState().Message(), - "The value of alpha must be greater than 0."); - } - { - // Test throwing error when alpha = -1. - auto* input = BuildInput(builder, "input", {2, 2, 3}, - V8MLOperandDataType::Enum::kFloat32, - scope.GetExceptionState()); - auto* options = MLEluOptions::Create(); - options->setAlpha(-1); - auto* output = builder->elu(input, options, scope.GetExceptionState()); - EXPECT_THAT(output, testing::IsNull()); - EXPECT_EQ(scope.GetExceptionState().CodeAs<DOMExceptionCode>(), - DOMExceptionCode::kDataError); - EXPECT_EQ(scope.GetExceptionState().Message(), - "The value of alpha must be greater than 0."); - } - { - // Test throwing error when input data type is int32. - auto* input = BuildInput(builder, "input", {2, 2, 3}, - V8MLOperandDataType::Enum::kInt32, - scope.GetExceptionState()); - auto* output = - builder->elu(input, MLEluOptions::Create(), scope.GetExceptionState()); - EXPECT_THAT(output, testing::IsNull()); - EXPECT_EQ(scope.GetExceptionState().CodeAs<ESErrorType>(), - ESErrorType::kTypeError); - EXPECT_EQ(scope.GetExceptionState().Message(), - "The input data type must be one of the float32,float16 types."); - } - { - // Test building elu as an activation. - MLActivation* elu = - builder->elu(MLEluOptions::Create(), scope.GetExceptionState()); - ASSERT_THAT(elu, testing::NotNull()); - ASSERT_THAT(elu->Operator(), testing::NotNull()); - EXPECT_EQ(elu->Kind(), webnn::mojom::blink::Activation::Tag::kElu); - EXPECT_FALSE(elu->Operator()->IsConnected()); - ASSERT_THAT(elu->Operator()->Options(), testing::NotNull()); - } -} - template <typename T> struct ExpandTester { OperandInfo<T> input; @@ -1645,299 +1411,6 @@ } } -MLOperand* BuildLayerNormalization(V8TestingScope& scope, - MLGraphBuilder* builder, - const MLOperand* input, - const MLLayerNormalizationOptions* options) { - auto* output = - builder->layerNormalization(input, options, scope.GetExceptionState()); - EXPECT_THAT(output, testing::NotNull()); - EXPECT_EQ(output->Kind(), webnn::mojom::blink::Operand::Kind::kOutput); - EXPECT_EQ(output->DataType(), input->DataType()); - EXPECT_EQ(output->Dimensions(), input->Dimensions()); - auto* layer_normalization = output->Operator(); - EXPECT_THAT(layer_normalization, testing::NotNull()); - EXPECT_EQ(layer_normalization->Kind(), - webnn::mojom::blink::Operation::Tag::kLayerNormalization); - EXPECT_TRUE(layer_normalization->IsConnected()); - EXPECT_THAT(layer_normalization->Options(), testing::NotNull()); - return output; -} - -TEST_F(MLGraphBuilderTest, LayerNormalizationTest) { - V8TestingScope scope; - MLGraphBuilder* builder = - CreateMLGraphBuilder(scope.GetExecutionContext(), scope.GetScriptState(), - scope.GetExceptionState()); - { - // Test building layerNormalization with default options for scalar input. - auto* input = - BuildInput(builder, "input", {}, V8MLOperandDataType::Enum::kFloat32, - scope.GetExceptionState()); - BuildLayerNormalization(scope, builder, input); - } - { - // Test building layerNormalization with given axes. - auto* input = BuildInput(builder, "input", {1, 2, 3, 4}, - V8MLOperandDataType::Enum::kFloat32, - scope.GetExceptionState()); - auto* options = MLLayerNormalizationOptions::Create(); - options->setAxes({3}); - BuildLayerNormalization(scope, builder, input, options); - } - { - // Test building layerNormalization with given scale. - auto* input = BuildInput(builder, "input", {1, 2, 3, 4}, - V8MLOperandDataType::Enum::kFloat32, - scope.GetExceptionState()); - auto* options = MLLayerNormalizationOptions::Create(); - auto* scale = BuildInput(builder, "scale", {2, 3, 4}, - V8MLOperandDataType::Enum::kFloat32, - scope.GetExceptionState()); - options->setScale(scale); - BuildLayerNormalization(scope, builder, input, options); - } - { - // Test building layerNormalization with given axes, scale and bias. - auto* input = BuildInput(builder, "input", {1, 2, 3, 4}, - V8MLOperandDataType::Enum::kFloat16, - scope.GetExceptionState()); - auto* options = MLLayerNormalizationOptions::Create(); - auto* scale = BuildInput(builder, "scale", {3, 4}, - V8MLOperandDataType::Enum::kFloat16, - scope.GetExceptionState()); - auto* bias = - BuildInput(builder, "bias", {3, 4}, V8MLOperandDataType::Enum::kFloat16, - scope.GetExceptionState()); - options->setScale(scale); - options->setBias(bias); - options->setAxes({2, 3}); - BuildLayerNormalization(scope, builder, input, options); - } - { - // Test building layerNormalization with inconsecutive axes. - auto* input = BuildInput(builder, "input", {1, 2, 3, 4, 5, 6}, - V8MLOperandDataType::Enum::kFloat32, - scope.GetExceptionState()); - auto* options = MLLayerNormalizationOptions::Create(); - auto* scale = BuildInput(builder, "scale", {2, 4, 6}, - V8MLOperandDataType::Enum::kFloat32, - scope.GetExceptionState()); - auto* bias = BuildInput(builder, "bias", {2, 4, 6}, - V8MLOperandDataType::Enum::kFloat32, - scope.GetExceptionState()); - options->setScale(scale); - options->setBias(bias); - options->setAxes({1, 3, 5}); - BuildLayerNormalization(scope, builder, input, options); - } - { - // Test building layerNormalization with axes in descending order. - auto* input = BuildInput(builder, "input", {1, 2, 3, 4, 5, 6}, - V8MLOperandDataType::Enum::kFloat32, - scope.GetExceptionState()); - auto* options = MLLayerNormalizationOptions::Create(); - auto* scale = BuildInput(builder, "scale", {6, 5, 4, 3, 2}, - V8MLOperandDataType::Enum::kFloat32, - scope.GetExceptionState()); - auto* bias = BuildInput(builder, "bias", {6, 5, 4, 3, 2}, - V8MLOperandDataType::Enum::kFloat32, - scope.GetExceptionState()); - options->setScale(scale); - options->setBias(bias); - options->setAxes({5, 4, 3, 2, 1}); - BuildLayerNormalization(scope, builder, input, options); - } - { - // Test throwing error when the input data type is uint32. - auto* input = BuildInput(builder, "input", {1, 2, 3, 4}, - V8MLOperandDataType::Enum::kUint32, - scope.GetExceptionState()); - auto* options = MLLayerNormalizationOptions::Create(); - auto* output = - builder->layerNormalization(input, options, scope.GetExceptionState()); - EXPECT_THAT(output, testing::IsNull()); - EXPECT_EQ(scope.GetExceptionState().CodeAs<DOMExceptionCode>(), - DOMExceptionCode::kDataError); - EXPECT_EQ(scope.GetExceptionState().Message(), - "The input type must be one of the floating point types."); - } - { - // Test throwing error when the axis is greater than the input rank. - auto* input = BuildInput(builder, "input", {1, 2, 3, 4}, - V8MLOperandDataType::Enum::kFloat32, - scope.GetExceptionState()); - auto* options = MLLayerNormalizationOptions::Create(); - options->setAxes({1, 2, 4}); - auto* output = - builder->layerNormalization(input, options, scope.GetExceptionState()); - EXPECT_THAT(output, testing::IsNull()); - EXPECT_EQ(scope.GetExceptionState().CodeAs<DOMExceptionCode>(), - DOMExceptionCode::kDataError); - EXPECT_EQ(scope.GetExceptionState().Message(), - "The values in axes must be in the range [0, 4)."); - } - { - // Test throwing error when the axes have duplications. - auto* input = BuildInput(builder, "input", {1, 2, 3, 4}, - V8MLOperandDataType::Enum::kFloat32, - scope.GetExceptionState()); - auto* options = MLLayerNormalizationOptions::Create(); - options->setAxes({3, 3}); - auto* output = - builder->layerNormalization(input, options, scope.GetExceptionState()); - EXPECT_THAT(output, testing::IsNull()); - EXPECT_EQ(scope.GetExceptionState().CodeAs<DOMExceptionCode>(), - DOMExceptionCode::kDataError); - EXPECT_EQ(scope.GetExceptionState().Message(), - "Two or more values are same in the axes sequence."); - } - { - // Test throwing error when the scale data type doesn't match input data - // type. - auto* input = BuildInput(builder, "input", {1, 2, 3, 4}, - V8MLOperandDataType::Enum::kFloat32, - scope.GetExceptionState()); - auto* options = MLLayerNormalizationOptions::Create(); - auto* scale = BuildInput(builder, "scale", {3, 4}, - V8MLOperandDataType::Enum::kFloat16, - scope.GetExceptionState()); - auto* bias = - BuildInput(builder, "bias", {3, 4}, V8MLOperandDataType::Enum::kFloat32, - scope.GetExceptionState()); - options->setScale(scale); - options->setBias(bias); - options->setAxes({2, 3}); - auto* output = - builder->layerNormalization(input, options, scope.GetExceptionState()); - EXPECT_THAT(output, testing::IsNull()); - EXPECT_EQ(scope.GetExceptionState().CodeAs<DOMExceptionCode>(), - DOMExceptionCode::kDataError); - EXPECT_EQ( - scope.GetExceptionState().Message(), - "For scale operand: the data type doesn't match the input data type."); - } - { - // Test throwing error when the bias dimensions doesn't match axis - // dimensions. - auto* input = BuildInput(builder, "input", {1, 2, 3, 4}, - V8MLOperandDataType::Enum::kFloat32, - scope.GetExceptionState()); - auto* options = MLLayerNormalizationOptions::Create(); - auto* bias = BuildInput(builder, "bias", {3, 3, 4}, - V8MLOperandDataType::Enum::kFloat32, - scope.GetExceptionState()); - options->setBias(bias); - auto* output = - builder->layerNormalization(input, options, scope.GetExceptionState()); - EXPECT_THAT(output, testing::IsNull()); - EXPECT_EQ(scope.GetExceptionState().CodeAs<DOMExceptionCode>(), - DOMExceptionCode::kDataError); - EXPECT_EQ(scope.GetExceptionState().Message(), - "For bias operand: the shape doesn't match the axis dimensions " - "of the input."); - } -} - -MLOperand* BuildLeakyRelu(V8TestingScope& scope, - MLGraphBuilder* builder, - const MLOperand* input, - const MLLeakyReluOptions* options) { - auto* output = builder->leakyRelu(input, options, scope.GetExceptionState()); - EXPECT_THAT(output, testing::NotNull()); - EXPECT_EQ(output->Kind(), webnn::mojom::blink::Operand::Kind::kOutput); - EXPECT_EQ(output->DataType(), input->DataType()); - auto* leaky_relu = output->Operator(); - EXPECT_THAT(leaky_relu, testing::NotNull()); - EXPECT_EQ(leaky_relu->Kind(), - webnn::mojom::blink::Operation::Tag::kLeakyRelu); - EXPECT_TRUE(leaky_relu->IsConnected()); - EXPECT_THAT(leaky_relu->Options(), testing::NotNull()); - return output; -} - -TEST_F(MLGraphBuilderTest, LeakyReluTest) { - V8TestingScope scope; - MLGraphBuilder* builder = - CreateMLGraphBuilder(scope.GetExecutionContext(), scope.GetScriptState(), - scope.GetExceptionState()); - { - // Test building leaky_relu with float32 input. - auto* input = BuildInput(builder, "input", {1, 2, 3}, - V8MLOperandDataType::Enum::kFloat32, - scope.GetExceptionState()); - auto* options = MLLeakyReluOptions::Create(); - auto* output = BuildLeakyRelu(scope, builder, input, options); - EXPECT_EQ(output->Dimensions(), Vector<uint32_t>({1, 2, 3})); - } - { - // Test building leaky_relu as an activation. - MLActivation* leaky_relu = builder->leakyRelu(MLLeakyReluOptions::Create(), - scope.GetExceptionState()); - ASSERT_THAT(leaky_relu, testing::NotNull()); - ASSERT_THAT(leaky_relu->Operator(), testing::NotNull()); - EXPECT_EQ(leaky_relu->Kind(), - webnn::mojom::blink::Activation::Tag::kLeakyRelu); - EXPECT_FALSE(leaky_relu->Operator()->IsConnected()); - ASSERT_THAT(leaky_relu->Operator()->Options(), testing::NotNull()); - } -} - -MLOperand* BuildLinear(V8TestingScope& scope, - MLGraphBuilder* builder, - const MLOperand* input, - const MLLinearOptions* options) { - auto* output = builder->linear(input, options, scope.GetExceptionState()); - EXPECT_THAT(output, testing::NotNull()); - EXPECT_EQ(output->Kind(), webnn::mojom::blink::Operand::Kind::kOutput); - EXPECT_EQ(output->DataType(), input->DataType()); - auto* linear = output->Operator(); - EXPECT_THAT(linear, testing::NotNull()); - EXPECT_EQ(linear->Kind(), webnn::mojom::blink::Operation::Tag::kLinear); - EXPECT_TRUE(linear->IsConnected()); - EXPECT_THAT(linear->Options(), testing::NotNull()); - return output; -} - -TEST_F(MLGraphBuilderTest, LinearTest) { - V8TestingScope scope; - MLGraphBuilder* builder = - CreateMLGraphBuilder(scope.GetExecutionContext(), scope.GetScriptState(), - scope.GetExceptionState()); - { - // Test building linear with float32 input. - auto* input = BuildInput(builder, "input", {1, 2, 3}, - V8MLOperandDataType::Enum::kFloat32, - scope.GetExceptionState()); - auto* options = MLLinearOptions::Create(); - auto* output = BuildLinear(scope, builder, input, options); - EXPECT_EQ(output->Dimensions(), Vector<uint32_t>({1, 2, 3})); - } - { - // Test throwing exception when the input data type is int32. - auto* input = BuildInput(builder, "input", {1, 2, 3}, - V8MLOperandDataType::Enum::kInt32, - scope.GetExceptionState()); - auto* options = MLLinearOptions::Create(); - auto* output = builder->linear(input, options, scope.GetExceptionState()); - EXPECT_THAT(output, testing::IsNull()); - EXPECT_EQ(scope.GetExceptionState().CodeAs<ESErrorType>(), - ESErrorType::kTypeError); - EXPECT_EQ(scope.GetExceptionState().Message(), - "The input data type must be one of the float32,float16 types."); - } - { - // Test building linear as an activation. - MLActivation* linear = - builder->linear(MLLinearOptions::Create(), scope.GetExceptionState()); - ASSERT_THAT(linear, testing::NotNull()); - ASSERT_THAT(linear->Operator(), testing::NotNull()); - EXPECT_EQ(linear->Kind(), webnn::mojom::blink::Activation::Tag::kLinear); - EXPECT_FALSE(linear->Operator()->IsConnected()); - ASSERT_THAT(linear->Operator()->Options(), testing::NotNull()); - } -} - MLOperand* BuildPad(V8TestingScope& scope, MLGraphBuilder* builder, const MLOperand* input, @@ -2088,71 +1561,6 @@ } } -MLOperand* BuildSoftplus(V8TestingScope& scope, - MLGraphBuilder* builder, - const MLOperand* input, - const MLSoftplusOptions* options) { - auto* output = builder->softplus(input, options, scope.GetExceptionState()); - EXPECT_THAT(output, testing::NotNull()); - EXPECT_EQ(output->Kind(), webnn::mojom::blink::Operand::Kind::kOutput); - EXPECT_EQ(output->DataType(), input->DataType()); - EXPECT_EQ(output->Dimensions(), input->Dimensions()); - auto* softplus = output->Operator(); - EXPECT_THAT(softplus, testing::NotNull()); - EXPECT_EQ(softplus->Kind(), webnn::mojom::blink::Operation::Tag::kSoftplus); - EXPECT_TRUE(softplus->IsConnected()); - EXPECT_THAT(softplus->Options(), testing::NotNull()); - return output; -} - -TEST_F(MLGraphBuilderTest, SoftPlusTest) { - V8TestingScope scope; - auto* builder = - CreateMLGraphBuilder(scope.GetExecutionContext(), scope.GetScriptState(), - scope.GetExceptionState()); - { - // Test building softplus with a scalar input and default options. - auto* input = - BuildInput(builder, "input", {}, V8MLOperandDataType::Enum::kFloat32, - scope.GetExceptionState()); - BuildSoftplus(scope, builder, input); - } - { - // Test building softplus with a 2-D input and steepness = 2.0. - auto* input = BuildInput(builder, "input", {3, 4}, - V8MLOperandDataType::Enum::kFloat16, - scope.GetExceptionState()); - auto* options = MLSoftplusOptions::Create(); - options->setSteepness(2.0); - BuildSoftplus(scope, builder, input, options); - } - { - // Test building softplus activation. - auto* output = builder->softplus(MLSoftplusOptions::Create(), - scope.GetExceptionState()); - ASSERT_THAT(output, testing::NotNull()); - const MLOperator* softplus = output->Operator(); - ASSERT_THAT(softplus, testing::NotNull()); - EXPECT_EQ(softplus->Kind(), webnn::mojom::blink::Operation::Tag::kSoftplus); - EXPECT_FALSE(softplus->IsConnected()); - ASSERT_THAT(softplus->Options(), testing::NotNull()); - } - { - // Test throwing exception when building softplus with int32 input. - Vector<uint32_t> input_shape({3, 4}); - auto* input = BuildInput(builder, "input", input_shape, - V8MLOperandDataType::Enum::kInt32, - scope.GetExceptionState()); - auto* output = builder->softplus(input, MLSoftplusOptions::Create(), - scope.GetExceptionState()); - EXPECT_THAT(output, testing::IsNull()); - EXPECT_EQ(scope.GetExceptionState().CodeAs<ESErrorType>(), - ESErrorType::kTypeError); - EXPECT_EQ(scope.GetExceptionState().Message(), - "The input data type must be one of the float32,float16 types."); - } -} - TEST_F(MLGraphBuilderTest, SliceTest) { V8TestingScope scope; auto* builder =
diff --git a/third_party/blink/renderer/modules/ml/webnn/ml_graph_builder_test.h b/third_party/blink/renderer/modules/ml/webnn/ml_graph_builder_test.h index 7171c75..77beaed 100644 --- a/third_party/blink/renderer/modules/ml/webnn/ml_graph_builder_test.h +++ b/third_party/blink/renderer/modules/ml/webnn/ml_graph_builder_test.h
@@ -9,15 +9,9 @@ #include "testing/gtest/include/gtest/gtest.h" #include "third_party/blink/renderer/bindings/modules/v8/v8_ml_arg_min_max_options.h" #include "third_party/blink/renderer/bindings/modules/v8/v8_ml_batch_normalization_options.h" -#include "third_party/blink/renderer/bindings/modules/v8/v8_ml_clamp_options.h" #include "third_party/blink/renderer/bindings/modules/v8/v8_ml_conv_2d_options.h" -#include "third_party/blink/renderer/bindings/modules/v8/v8_ml_elu_options.h" #include "third_party/blink/renderer/bindings/modules/v8/v8_ml_gemm_options.h" #include "third_party/blink/renderer/bindings/modules/v8/v8_ml_gru_options.h" -#include "third_party/blink/renderer/bindings/modules/v8/v8_ml_hard_sigmoid_options.h" -#include "third_party/blink/renderer/bindings/modules/v8/v8_ml_layer_normalization_options.h" -#include "third_party/blink/renderer/bindings/modules/v8/v8_ml_leaky_relu_options.h" -#include "third_party/blink/renderer/bindings/modules/v8/v8_ml_linear_options.h" #include "third_party/blink/renderer/bindings/modules/v8/v8_ml_lstm_options.h" #include "third_party/blink/renderer/bindings/modules/v8/v8_ml_operand_data_type.h" #include "third_party/blink/renderer/bindings/modules/v8/v8_ml_pad_options.h" @@ -54,11 +48,6 @@ const MLBatchNormalizationOptions* options = MLBatchNormalizationOptions::Create()); -MLOperand* BuildClamp(V8TestingScope& scope, - MLGraphBuilder* builder, - const MLOperand* input, - const MLClampOptions* options = MLClampOptions::Create()); - MLOperand* BuildConv2d( V8TestingScope& scope, MLGraphBuilder* builder, @@ -66,12 +55,6 @@ const MLOperand* filter, const MLConv2dOptions* options = MLConv2dOptions::Create()); -MLOperand* BuildLeakyRelu( - V8TestingScope& scope, - MLGraphBuilder* builder, - const MLOperand* input, - const MLLeakyReluOptions* options = MLLeakyReluOptions::Create()); - MLOperand* BuildElementWiseBinary( V8TestingScope& scope, MLGraphBuilder* builder, @@ -92,18 +75,6 @@ const MLOperand* b, const MLGemmOptions* options = MLGemmOptions::Create()); -MLOperand* BuildHardSigmoid( - V8TestingScope& scope, - MLGraphBuilder* builder, - const MLOperand* input, - const MLHardSigmoidOptions* options = MLHardSigmoidOptions::Create()); - -MLOperand* BuildLayerNormalization(V8TestingScope& scope, - MLGraphBuilder* builder, - const MLOperand* input, - const MLLayerNormalizationOptions* options = - MLLayerNormalizationOptions::Create()); - MLOperand* BuildReduce( V8TestingScope& scope, MLGraphBuilder* builder,
diff --git a/third_party/blink/renderer/modules/ml/webnn/ml_graph_mojo_test.cc b/third_party/blink/renderer/modules/ml/webnn/ml_graph_mojo_test.cc index c6ea6be..4086c65 100644 --- a/third_party/blink/renderer/modules/ml/webnn/ml_graph_mojo_test.cc +++ b/third_party/blink/renderer/modules/ml/webnn/ml_graph_mojo_test.cc
@@ -26,7 +26,13 @@ #include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_testing.h" #include "third_party/blink/renderer/bindings/core/v8/v8_dom_exception.h" #include "third_party/blink/renderer/bindings/modules/v8/v8_ml_buffer_descriptor.h" +#include "third_party/blink/renderer/bindings/modules/v8/v8_ml_clamp_options.h" #include "third_party/blink/renderer/bindings/modules/v8/v8_ml_context_options.h" +#include "third_party/blink/renderer/bindings/modules/v8/v8_ml_elu_options.h" +#include "third_party/blink/renderer/bindings/modules/v8/v8_ml_hard_sigmoid_options.h" +#include "third_party/blink/renderer/bindings/modules/v8/v8_ml_leaky_relu_options.h" +#include "third_party/blink/renderer/bindings/modules/v8/v8_ml_linear_options.h" +#include "third_party/blink/renderer/bindings/modules/v8/v8_ml_softplus_options.h" #include "third_party/blink/renderer/bindings/modules/v8/v8_ml_triangular_options.h" #include "third_party/blink/renderer/core/dom/dom_exception.h" #include "third_party/blink/renderer/modules/ml/webnn/ml_activation.h" @@ -578,138 +584,16 @@ } } -struct ClampTester { - OperandInfoBlink input; - struct ClampOptions { - std::optional<float> min_value; - std::optional<float> max_value; - }; - ClampOptions options; - OperandInfoMojo expected_operand; - ClampOptions expected_attributes; - - void Test(MLGraphTestMojo& helper, - V8TestingScope& scope, - MLGraphBuilder* builder) { - // Build the graph. - auto* input_operand = - BuildInput(builder, "input", input.dimensions, input.data_type, - scope.GetExceptionState()); - MLClampOptions* ml_clamp_options = MLClampOptions::Create(); - if (options.min_value) { - ml_clamp_options->setMinValue(options.min_value.value()); - } - if (options.max_value) { - ml_clamp_options->setMaxValue(options.max_value.value()); - } - auto* output_operand = builder->clamp(input_operand, ml_clamp_options, - scope.GetExceptionState()); - auto [graph, error_name, error_message] = - helper.BuildGraph(scope, builder, {{"output", output_operand}}); - ASSERT_THAT(graph, testing::NotNull()); - - auto graph_info = helper.GetGraphInfo(); - // Verify the graph information of mojo are as expected. - ASSERT_EQ(graph_info->operations.size(), 1u); - auto& operation = graph_info->operations[0]; - EXPECT_TRUE(operation->is_clamp()); - auto& clamp = operation->get_clamp(); - EXPECT_EQ(clamp->min_value, expected_attributes.min_value); - EXPECT_EQ(clamp->max_value, expected_attributes.max_value); - EXPECT_EQ(graph_info->output_operands.size(), 1u); - auto output_operand_id = graph_info->output_operands[0]; - auto output_operand_iter = - graph_info->id_to_operand_map.find(output_operand_id); - ASSERT_TRUE(output_operand_iter != graph_info->id_to_operand_map.end()); - EXPECT_EQ(output_operand_iter->value->data_type, - expected_operand.data_type); - EXPECT_EQ(output_operand_iter->value->dimensions, - expected_operand.dimensions); - } +struct ClampOptions { + std::optional<float> min_value; + std::optional<float> max_value; }; -TEST_P(MLGraphTestMojo, ClampTest) { - V8TestingScope scope; - // Bind fake WebNN Context in the service for testing. - ScopedWebNNServiceBinder scoped_setup_binder(*this, scope); - - auto* options = MLContextOptions::Create(); - // Create WebNN Context with GPU device type. - options->setDeviceType(V8MLDeviceType::Enum::kGpu); - auto* builder = CreateGraphBuilder(scope, options); - ASSERT_THAT(builder, testing::NotNull()); - { - // Test clamp operator with default options that no minimum and maximum - // values are defined. - ClampTester{ - .input = {.data_type = V8MLOperandDataType::Enum::kFloat32, - .dimensions = {1, 2, 2, 1}}, - .expected_operand = {.data_type = - blink_mojom::Operand::DataType::kFloat32, - .dimensions = {1, 2, 2, 1}}, - .expected_attributes = {.min_value = - -std::numeric_limits<float>::infinity(), - .max_value = - +std::numeric_limits<float>::infinity()}} - .Test(*this, scope, builder); - } - { - // Test clamp operator with the minimum value defined. - ClampTester{ - .input = {.data_type = V8MLOperandDataType::Enum::kFloat16, - .dimensions = {2, 4}}, - .options = {0.0, std::nullopt}, - .expected_operand = {.data_type = - blink_mojom::Operand::DataType::kFloat16, - .dimensions = {2, 4}}, - .expected_attributes = {.min_value = 0.0, - .max_value = - +std::numeric_limits<float>::infinity()}} - .Test(*this, scope, builder); - } - { - // Test clamp operator with the maximum value defined. - ClampTester{ - .input = {.data_type = V8MLOperandDataType::Enum::kInt32, - .dimensions = {3, 1, 6}}, - .options = {std::nullopt, 6.0}, - .expected_operand = {.data_type = - blink_mojom::Operand::DataType::kInt32, - .dimensions = {3, 1, 6}}, - .expected_attributes = {.min_value = - -std::numeric_limits<float>::infinity(), - .max_value = 6.0}} - .Test(*this, scope, builder); - } - { - // Test clamp operator with both the minimum and maximum values defined. - ClampTester{.input = {.data_type = V8MLOperandDataType::Enum::kUint8, - .dimensions = {7}}, - .options = {0.0, 6.0}, - .expected_operand = {.data_type = - blink_mojom::Operand::DataType::kUint8, - .dimensions = {7}}, - .expected_attributes = {.min_value = 0.0, .max_value = 6.0}} - .Test(*this, scope, builder); - } - { - // Test clamp operator with scalar. - ClampTester{.input = {.data_type = V8MLOperandDataType::Enum::kUint8, - .dimensions = {}}, - .options = {0.0, 6.0}, - .expected_operand = {.data_type = - blink_mojom::Operand::DataType::kUint8, - .dimensions = {}}, - .expected_attributes = {.min_value = 0.0, .max_value = 6.0}} - .Test(*this, scope, builder); - } -} - // TODO: crbug.com/325598628 - Consider replacing this with direct use of the // mojo Activation struct. struct Activation { webnn::mojom::blink::Activation::Tag kind; - std::optional<ClampTester::ClampOptions> clamp_options; + std::optional<ClampOptions> clamp_options; std::optional<float> hard_sigmoid_alpha; std::optional<float> hard_sigmoid_beta; std::optional<float> elu_alpha; @@ -1094,8 +978,7 @@ Activation{ .kind = webnn::mojom::blink::Activation::Tag::kClamp, - .clamp_options = - ClampTester::ClampOptions{.min_value = 1.0, + .clamp_options = ClampOptions{.min_value = 1.0, .max_value = 6.0}}}, .expected_operand = {.data_type = blink_mojom::Operand::DataType::kFloat32, @@ -1109,8 +992,7 @@ Activation{ .kind = webnn::mojom::blink::Activation::Tag::kClamp, .clamp_options = - ClampTester::ClampOptions{.min_value = 1.0, - .max_value = 6.0}}}} + ClampOptions{.min_value = 1.0, .max_value = 6.0}}}} .Test(*this, scope, builder); } { @@ -1705,134 +1587,6 @@ } } -struct EluTester { - OperandInfoBlink input; - std::optional<float> alpha; - OperandInfoMojo expected_operand; - float expected_alpha; - - void Test(MLGraphTestMojo& helper, - V8TestingScope& scope, - MLGraphBuilder* builder) { - // Build the graph. - auto* input_operand = - BuildInput(builder, "input", input.dimensions, input.data_type, - scope.GetExceptionState()); - MLEluOptions* ml_elu_options = MLEluOptions::Create(); - if (alpha) { - ml_elu_options->setAlpha(alpha.value()); - } - auto* output_operand = - builder->elu(input_operand, ml_elu_options, scope.GetExceptionState()); - auto [graph, error_name, error_message] = - helper.BuildGraph(scope, builder, {{"output", output_operand}}); - ASSERT_THAT(graph, testing::NotNull()); - - auto graph_info = helper.GetGraphInfo(); - // Verify the graph information of mojo is as expected. - ASSERT_EQ(graph_info->id_to_operand_map.size(), 2u); - - // Verify the input `mojo::Operand`. - ASSERT_EQ(graph_info->input_operands.size(), 1u); - auto input_operand_id = graph_info->input_operands[0]; - auto input_operand_iter = - graph_info->id_to_operand_map.find(input_operand_id); - ASSERT_TRUE(input_operand_iter != graph_info->id_to_operand_map.end()); - EXPECT_EQ(input_operand_iter->value->kind, - blink_mojom::Operand::Kind::kInput); - EXPECT_EQ(input_operand_iter->value->data_type, expected_operand.data_type); - EXPECT_EQ(input_operand_iter->value->dimensions, input.dimensions); - EXPECT_EQ(input_operand_iter->value->name, "input"); - - // Verify the output `mojo::Operand`. - ASSERT_EQ(graph_info->output_operands.size(), 1u); - auto output_operand_id = graph_info->output_operands[0]; - auto output_operand_iter = - graph_info->id_to_operand_map.find(output_operand_id); - ASSERT_TRUE(output_operand_iter != graph_info->id_to_operand_map.end()); - EXPECT_EQ(output_operand_iter->value->kind, - blink_mojom::Operand::Kind::kOutput); - EXPECT_EQ(output_operand_iter->value->data_type, - expected_operand.data_type); - EXPECT_EQ(output_operand_iter->value->dimensions, - expected_operand.dimensions); - EXPECT_EQ(output_operand_iter->value->name, "output"); - - // Verify the `mojo::Operator`. - ASSERT_EQ(graph_info->operations.size(), 1u); - auto& operation = graph_info->operations[0]; - ASSERT_TRUE(operation->is_elu()); - auto& elu = operation->get_elu(); - EXPECT_EQ(elu->input_operand_id, input_operand_id); - EXPECT_EQ(elu->output_operand_id, output_operand_id); - EXPECT_EQ(elu->alpha, expected_alpha); - } -}; - -TEST_P(MLGraphTestMojo, EluTest) { - V8TestingScope scope; - // Bind fake WebNN Context in the service for testing. - ScopedWebNNServiceBinder scoped_setup_binder(*this, scope); - - auto* options = MLContextOptions::Create(); - // Create WebNN Context with GPU device type. - options->setDeviceType(V8MLDeviceType::Enum::kGpu); - auto* builder = CreateGraphBuilder(scope, options); - ASSERT_THAT(builder, testing::NotNull()); - { - // Test elu operator for 0-D tensor with default options. - EluTester{.input = {.data_type = V8MLOperandDataType::Enum::kFloat32, - .dimensions = {}}, - .expected_operand = {.data_type = - blink_mojom::Operand::DataType::kFloat32, - .dimensions = {}}, - .expected_alpha = 1} - .Test(*this, scope, builder); - } - { - // Test elu operator for 1-D tensor with default options. - EluTester{.input = {.data_type = V8MLOperandDataType::Enum::kFloat32, - .dimensions = {2}}, - .expected_operand = {.data_type = - blink_mojom::Operand::DataType::kFloat32, - .dimensions = {2}}, - .expected_alpha = 1} - .Test(*this, scope, builder); - } - { - // Test elu operator for 2-D tensor with default options. - EluTester{.input = {.data_type = V8MLOperandDataType::Enum::kFloat16, - .dimensions = {3, 7}}, - .expected_operand = {.data_type = - blink_mojom::Operand::DataType::kFloat16, - .dimensions = {3, 7}}, - .expected_alpha = 1} - .Test(*this, scope, builder); - } - { - // Test elu operator for 3-D tensor with given alpha. - EluTester{.input = {.data_type = V8MLOperandDataType::Enum::kFloat32, - .dimensions = {1, 5, 3}}, - .alpha = 0.5, - .expected_operand = {.data_type = - blink_mojom::Operand::DataType::kFloat32, - .dimensions = {1, 5, 3}}, - .expected_alpha = 0.5} - .Test(*this, scope, builder); - } - { - // Test elu operator for 4-D tensor with given alpha. - EluTester{.input = {.data_type = V8MLOperandDataType::Enum::kFloat16, - .dimensions = {1, 2, 2, 1}}, - .alpha = 0.7, - .expected_operand = {.data_type = - blink_mojom::Operand::DataType::kFloat16, - .dimensions = {1, 2, 2, 1}}, - .expected_alpha = 0.7} - .Test(*this, scope, builder); - } -} - struct ExpandTester { OperandInfoBlink input; Vector<uint32_t> new_shape; @@ -1919,601 +1673,6 @@ } } -struct HardSigmoidTester { - OperandInfoBlink input; - std::optional<float> alpha; - std::optional<float> beta; - OperandInfoMojo expected_output; - float expected_alpha; - float expected_beta; - - void Test(MLGraphTestMojo& helper, - V8TestingScope& scope, - MLGraphBuilder* builder) { - // Build the graph. - auto* input_operand = - BuildInput(builder, "input", input.dimensions, input.data_type, - scope.GetExceptionState()); - MLHardSigmoidOptions* hard_sigmoid_options = MLHardSigmoidOptions::Create(); - if (alpha) { - hard_sigmoid_options->setAlpha(alpha.value()); - } - if (beta) { - hard_sigmoid_options->setBeta(beta.value()); - } - auto* output_operand = builder->hardSigmoid( - input_operand, hard_sigmoid_options, scope.GetExceptionState()); - auto [graph, error_name, error_message] = - helper.BuildGraph(scope, builder, {{"output", output_operand}}); - ASSERT_THAT(graph, testing::NotNull()); - - auto graph_info = helper.GetGraphInfo(); - // Verify the `mojo::Operator`. - ASSERT_EQ(graph_info->operations.size(), 1u); - auto& operation = graph_info->operations[0]; - ASSERT_TRUE(operation->is_hard_sigmoid()); - auto& hard_sigmoid = operation->get_hard_sigmoid(); - - // Verify the alpha and beta. - EXPECT_FLOAT_EQ(hard_sigmoid->alpha, expected_alpha); - EXPECT_FLOAT_EQ(hard_sigmoid->beta, expected_beta); - - // Verify the input `mojo::Operand`. - ASSERT_EQ(graph_info->input_operands.size(), 1u); - auto input_operand_id = graph_info->input_operands[0]; - auto input_operand_iter = - graph_info->id_to_operand_map.find(input_operand_id); - ASSERT_TRUE(input_operand_iter != graph_info->id_to_operand_map.end()); - EXPECT_EQ(input_operand_iter->value->kind, - blink_mojom::Operand::Kind::kInput); - EXPECT_EQ(input_operand_iter->value->data_type, expected_output.data_type); - EXPECT_EQ(input_operand_iter->value->dimensions, - expected_output.dimensions); - EXPECT_EQ(input_operand_iter->value->name, "input"); - - // Verify the output `mojo::Operand`. - ASSERT_EQ(graph_info->output_operands.size(), 1u); - auto output_operand_id = graph_info->output_operands[0]; - auto output_operand_iter = - graph_info->id_to_operand_map.find(output_operand_id); - ASSERT_TRUE(output_operand_iter != graph_info->id_to_operand_map.end()); - EXPECT_EQ(output_operand_iter->value->kind, - blink_mojom::Operand::Kind::kOutput); - EXPECT_EQ(output_operand_iter->value->data_type, expected_output.data_type); - EXPECT_EQ(output_operand_iter->value->dimensions, - expected_output.dimensions); - EXPECT_EQ(output_operand_iter->value->name, "output"); - } -}; - -TEST_P(MLGraphTestMojo, HardSigmoidTest) { - V8TestingScope scope; - // Bind fake WebNN Context in the service for testing. - ScopedWebNNServiceBinder scoped_setup_binder(*this, scope); - - auto* options = MLContextOptions::Create(); - // Create WebNN Context with GPU device type. - options->setDeviceType(V8MLDeviceType::Enum::kGpu); - auto* builder = CreateGraphBuilder(scope, options); - ASSERT_THAT(builder, testing::NotNull()); - { - // Test building hardSigmoid with default options. - HardSigmoidTester{ - .input = {.data_type = V8MLOperandDataType::Enum::kFloat32, - .dimensions = {2, 4}}, - .expected_output = {.data_type = - blink_mojom::Operand::DataType::kFloat32, - .dimensions = {2, 4}}, - .expected_alpha = 0.2, - .expected_beta = 0.5} - .Test(*this, scope, builder); - } - { - // Test building hardSigmoid with alpha = 0.5, beta = -3. - HardSigmoidTester{ - .input = {.data_type = V8MLOperandDataType::Enum::kFloat16, - .dimensions = {1, 5}}, - .alpha = 0.5, - .beta = -3, - .expected_output = {.data_type = - blink_mojom::Operand::DataType::kFloat16, - .dimensions = {1, 5}}, - .expected_alpha = 0.5, - .expected_beta = -3} - .Test(*this, scope, builder); - } -} - -struct LayerNormalizationTester { - OperandInfoBlink input; - struct LayerNormalizationOptions { - std::optional<OperandInfoBlink> scale; - std::optional<OperandInfoBlink> bias; - std::optional<Vector<uint32_t>> axes; - std::optional<float> epsilon; - }; - struct LayerNormalizationAttributes { - std::optional<OperandInfoMojo> scale; - std::optional<OperandInfoMojo> bias; - Vector<uint32_t> axes; - float epsilon = 1e-5; - }; - LayerNormalizationOptions options; - OperandInfoMojo expected_operand; - LayerNormalizationAttributes expected_attributes; - - void Test(MLGraphTestMojo& helper, - V8TestingScope& scope, - MLGraphBuilder* builder) { - // Build the graph. - auto* input_operand = - BuildInput(builder, "input", input.dimensions, input.data_type, - scope.GetExceptionState()); - MLLayerNormalizationOptions* layer_normalization_options = - MLLayerNormalizationOptions::Create(); - if (options.scale) { - layer_normalization_options->setScale( - BuildInput(builder, "scale", options.scale->dimensions, - options.scale->data_type, scope.GetExceptionState())); - } - if (options.bias) { - layer_normalization_options->setBias( - BuildInput(builder, "bias", options.bias->dimensions, - options.bias->data_type, scope.GetExceptionState())); - } - if (options.axes) { - layer_normalization_options->setAxes(options.axes.value()); - } - if (options.epsilon) { - layer_normalization_options->setEpsilon(options.epsilon.value()); - } - - auto* output_operand = builder->layerNormalization( - input_operand, layer_normalization_options, scope.GetExceptionState()); - auto [graph, error_name, error_message] = - helper.BuildGraph(scope, builder, {{"output", output_operand}}); - ASSERT_THAT(graph, testing::NotNull()); - - auto graph_info = helper.GetGraphInfo(); - // Verify the `mojo::Operator`. - ASSERT_EQ(graph_info->operations.size(), 1u); - auto& operation = graph_info->operations[0]; - ASSERT_TRUE(operation->is_layer_normalization()); - auto& layer_normalization = operation->get_layer_normalization(); - - // Verify the axes. - EXPECT_EQ(layer_normalization->axes, expected_attributes.axes); - - // Verify the epsilon. - EXPECT_FLOAT_EQ(layer_normalization->epsilon, expected_attributes.epsilon); - - // Verify the scale `mojo::Operand`. - if (expected_attributes.scale.has_value()) { - ASSERT_TRUE(layer_normalization->scale_operand_id.has_value()); - auto scale_operand_id = layer_normalization->scale_operand_id.value(); - auto scale_operand_iter = - graph_info->id_to_operand_map.find(scale_operand_id); - ASSERT_TRUE(scale_operand_iter != graph_info->id_to_operand_map.end()); - EXPECT_EQ(scale_operand_iter->value->kind, - blink_mojom::Operand::Kind::kInput); - EXPECT_EQ(scale_operand_iter->value->data_type, - expected_attributes.scale->data_type); - EXPECT_EQ(scale_operand_iter->value->dimensions, - expected_attributes.scale->dimensions); - EXPECT_EQ(scale_operand_iter->value->name, "scale"); - } - - // Verify the bias `mojo::Operand`. - if (expected_attributes.bias.has_value()) { - ASSERT_TRUE(layer_normalization->bias_operand_id.has_value()); - auto bias_operand_id = layer_normalization->bias_operand_id.value(); - auto bias_operand_iter = - graph_info->id_to_operand_map.find(bias_operand_id); - ASSERT_TRUE(bias_operand_iter != graph_info->id_to_operand_map.end()); - EXPECT_EQ(bias_operand_iter->value->kind, - blink_mojom::Operand::Kind::kInput); - EXPECT_EQ(bias_operand_iter->value->data_type, - expected_attributes.bias->data_type); - EXPECT_EQ(bias_operand_iter->value->dimensions, - expected_attributes.bias->dimensions); - EXPECT_EQ(bias_operand_iter->value->name, "bias"); - } - - // Verify the output `mojo::Operand`. - ASSERT_EQ(graph_info->output_operands.size(), 1u); - auto output_operand_id = graph_info->output_operands[0]; - auto output_operand_iter = - graph_info->id_to_operand_map.find(output_operand_id); - ASSERT_TRUE(output_operand_iter != graph_info->id_to_operand_map.end()); - EXPECT_EQ(output_operand_iter->value->kind, - blink_mojom::Operand::Kind::kOutput); - EXPECT_EQ(output_operand_iter->value->data_type, - expected_operand.data_type); - EXPECT_EQ(output_operand_iter->value->dimensions, - expected_operand.dimensions); - EXPECT_EQ(output_operand_iter->value->name, "output"); - } -}; - -TEST_P(MLGraphTestMojo, LayerNormalizationTest) { - V8TestingScope scope; - // Bind fake WebNN Context in the service for testing. - ScopedWebNNServiceBinder scoped_setup_binder(*this, scope); - - auto* options = MLContextOptions::Create(); - // Create WebNN Context with GPU device type. - options->setDeviceType(V8MLDeviceType::Enum::kGpu); - auto* builder = CreateGraphBuilder(scope, options); - ASSERT_THAT(builder, testing::NotNull()); - { - // Test layerNormalization with default options for scalar input. - LayerNormalizationTester{ - .input = {.data_type = V8MLOperandDataType::Enum::kFloat32, - .dimensions = {}}, - .expected_operand = {.data_type = - blink_mojom::Operand::DataType::kFloat32, - .dimensions = {}}, - .expected_attributes = {.axes = {}}} - .Test(*this, scope, builder); - } - { - // Test layerNormalization with given epsilon. - LayerNormalizationTester{ - .input = {.data_type = V8MLOperandDataType::Enum::kFloat32, - .dimensions = {1, 2, 3}}, - .options = {.epsilon = 5e-5}, - .expected_operand = {.data_type = - blink_mojom::Operand::DataType::kFloat32, - .dimensions = {1, 2, 3}}, - .expected_attributes = {.axes = {1, 2}, .epsilon = 5e-5}} - .Test(*this, scope, builder); - } - { - // Test layerNormalization with given axes. - LayerNormalizationTester{ - .input = {.data_type = V8MLOperandDataType::Enum::kFloat32, - .dimensions = {1, 3, 4, 5}}, - .options = {.axes = Vector<uint32_t>{2, 0}}, - .expected_operand = {.data_type = - blink_mojom::Operand::DataType::kFloat32, - .dimensions = {1, 3, 4, 5}}, - .expected_attributes = {.axes = {2, 0}}} - .Test(*this, scope, builder); - } - { - // Test layerNormalization with given scale and bias. - LayerNormalizationTester{ - .input = {.data_type = V8MLOperandDataType::Enum::kFloat32, - .dimensions = {1, 3, 4, 5}}, - .options = {.scale = - OperandInfoBlink{ - .data_type = V8MLOperandDataType::Enum::kFloat32, - .dimensions = {3, 4, 5}}, - .bias = - OperandInfoBlink{ - .data_type = V8MLOperandDataType::Enum::kFloat32, - .dimensions = {3, 4, 5}}}, - .expected_operand = {.data_type = - blink_mojom::Operand::DataType::kFloat32, - .dimensions = {1, 3, 4, 5}}, - .expected_attributes = - {.scale = - OperandInfoMojo{ - .data_type = blink_mojom::Operand::DataType::kFloat32, - .dimensions = {3, 4, 5}}, - .bias = - OperandInfoMojo{ - .data_type = blink_mojom::Operand::DataType::kFloat32, - .dimensions = {3, 4, 5}}, - .axes = {1, 2, 3}}} - .Test(*this, scope, builder); - } - { - // Test layerNormalization with given scale, bias and permuted axes. - LayerNormalizationTester{ - .input = {.data_type = V8MLOperandDataType::Enum::kFloat32, - .dimensions = {1, 2, 3, 4, 5, 6}}, - .options = {.scale = - OperandInfoBlink{ - .data_type = V8MLOperandDataType::Enum::kFloat32, - .dimensions = {2, 5, 3, 6}}, - .bias = - OperandInfoBlink{ - .data_type = V8MLOperandDataType::Enum::kFloat32, - .dimensions = {2, 5, 3, 6}}, - .axes = Vector<uint32_t>{1, 4, 2, 5}}, - .expected_operand = {.data_type = - blink_mojom::Operand::DataType::kFloat32, - .dimensions = {1, 2, 3, 4, 5, 6}}, - .expected_attributes = - {.scale = - OperandInfoMojo{ - .data_type = blink_mojom::Operand::DataType::kFloat32, - .dimensions = {2, 5, 3, 6}}, - .bias = - OperandInfoMojo{ - .data_type = blink_mojom::Operand::DataType::kFloat32, - .dimensions = {2, 5, 3, 6}}, - .axes = {1, 4, 2, 5}}} - .Test(*this, scope, builder); - } -} - -struct LeakyReluTester { - OperandInfoBlink input; - std::optional<float> alpha; - OperandInfoMojo expected_operand; - float expected_alpha; - - void Test(MLGraphTestMojo& helper, - V8TestingScope& scope, - MLGraphBuilder* builder) { - // Build the graph. - auto* input_operand = - BuildInput(builder, "input", input.dimensions, input.data_type, - scope.GetExceptionState()); - MLLeakyReluOptions* ml_leaky_relu_options = MLLeakyReluOptions::Create(); - if (alpha) { - ml_leaky_relu_options->setAlpha(alpha.value()); - } - auto* output_operand = builder->leakyRelu( - input_operand, ml_leaky_relu_options, scope.GetExceptionState()); - auto [graph, error_name, error_message] = - helper.BuildGraph(scope, builder, {{"output", output_operand}}); - ASSERT_THAT(graph, testing::NotNull()); - - auto graph_info = helper.GetGraphInfo(); - // Verify the graph information of mojo are as expected. - ASSERT_EQ(graph_info->id_to_operand_map.size(), 2u); - - // Verify the input `mojo::Operand`. - ASSERT_EQ(graph_info->input_operands.size(), 1u); - auto input_operand_id = graph_info->input_operands[0]; - auto input_operand_iter = - graph_info->id_to_operand_map.find(input_operand_id); - ASSERT_TRUE(input_operand_iter != graph_info->id_to_operand_map.end()); - EXPECT_EQ(input_operand_iter->value->kind, - blink_mojom::Operand::Kind::kInput); - EXPECT_EQ(input_operand_iter->value->data_type, expected_operand.data_type); - EXPECT_EQ(input_operand_iter->value->dimensions, input.dimensions); - EXPECT_EQ(input_operand_iter->value->name, "input"); - - // Verify the output `mojo::Operand`. - ASSERT_EQ(graph_info->output_operands.size(), 1u); - auto output_operand_id = graph_info->output_operands[0]; - auto output_operand_iter = - graph_info->id_to_operand_map.find(output_operand_id); - ASSERT_TRUE(output_operand_iter != graph_info->id_to_operand_map.end()); - EXPECT_EQ(output_operand_iter->value->kind, - blink_mojom::Operand::Kind::kOutput); - EXPECT_EQ(output_operand_iter->value->data_type, - expected_operand.data_type); - EXPECT_EQ(output_operand_iter->value->dimensions, - expected_operand.dimensions); - EXPECT_EQ(output_operand_iter->value->name, "output"); - - // Verify the `mojo::Operator`. - ASSERT_EQ(graph_info->operations.size(), 1u); - auto& operation = graph_info->operations[0]; - ASSERT_TRUE(operation->is_leaky_relu()); - auto& leaky_relu = operation->get_leaky_relu(); - EXPECT_EQ(leaky_relu->input_operand_id, input_operand_id); - EXPECT_EQ(leaky_relu->output_operand_id, output_operand_id); - EXPECT_EQ(leaky_relu->alpha, expected_alpha); - } -}; - -TEST_P(MLGraphTestMojo, LeakyReluTest) { - V8TestingScope scope; - // Bind fake WebNN Context in the service for testing. - ScopedWebNNServiceBinder scoped_setup_binder(*this, scope); - - auto* options = MLContextOptions::Create(); - // Create WebNN Context with GPU device type. - options->setDeviceType(V8MLDeviceType::Enum::kGpu); - auto* builder = CreateGraphBuilder(scope, options); - ASSERT_THAT(builder, testing::NotNull()); - { - // Test leaky relu operator for 0-D scalar with default options. - LeakyReluTester{ - .input = {.data_type = V8MLOperandDataType::Enum::kFloat32, - .dimensions = {}}, - .expected_operand = {.data_type = - blink_mojom::Operand::DataType::kFloat32, - .dimensions = {}}, - .expected_alpha = 0.01} - .Test(*this, scope, builder); - } - { - // Test leaky relu operator for 1-D tensor with default options. - LeakyReluTester{ - .input = {.data_type = V8MLOperandDataType::Enum::kFloat32, - .dimensions = {2}}, - .expected_operand = {.data_type = - blink_mojom::Operand::DataType::kFloat32, - .dimensions = {2}}, - .expected_alpha = 0.01} - .Test(*this, scope, builder); - } - { - // Test leaky relu operator for 2-D tensor with default options. - LeakyReluTester{ - .input = {.data_type = V8MLOperandDataType::Enum::kFloat16, - .dimensions = {3, 7}}, - .expected_operand = {.data_type = - blink_mojom::Operand::DataType::kFloat16, - .dimensions = {3, 7}}, - .expected_alpha = 0.01} - .Test(*this, scope, builder); - } - { - // Test leaky relu operator for 3-D tensor with given alpha. - LeakyReluTester{ - .input = {.data_type = V8MLOperandDataType::Enum::kFloat32, - .dimensions = {1, 5, 3}}, - .alpha = 0.05, - .expected_operand = {.data_type = - blink_mojom::Operand::DataType::kFloat32, - .dimensions = {1, 5, 3}}, - .expected_alpha = 0.05} - .Test(*this, scope, builder); - } - { - // Test leaky relu operator for 4-D tensor with given alpha. - LeakyReluTester{ - .input = {.data_type = V8MLOperandDataType::Enum::kFloat16, - .dimensions = {1, 2, 2, 1}}, - .alpha = 0.07, - .expected_operand = {.data_type = - blink_mojom::Operand::DataType::kFloat16, - .dimensions = {1, 2, 2, 1}}, - .expected_alpha = 0.07} - .Test(*this, scope, builder); - } -} - -struct LinearTester { - OperandInfoBlink input; - struct LinearOptions { - std::optional<float> alpha; - std::optional<float> beta; - }; - LinearOptions options; - OperandInfoMojo expected_operand; - LinearOptions expected_attributes; - - void Test(MLGraphTestMojo& helper, - V8TestingScope& scope, - MLGraphBuilder* builder) { - // Build the graph. - auto* input_operand = - BuildInput(builder, "input", input.dimensions, input.data_type, - scope.GetExceptionState()); - MLLinearOptions* ml_linear_options = MLLinearOptions::Create(); - if (options.alpha) { - ml_linear_options->setAlpha(options.alpha.value()); - } - if (options.beta) { - ml_linear_options->setBeta(options.beta.value()); - } - auto* output_operand = builder->linear(input_operand, ml_linear_options, - scope.GetExceptionState()); - auto [graph, error_name, error_message] = - helper.BuildGraph(scope, builder, {{"output", output_operand}}); - ASSERT_NE(graph, nullptr); - - auto graph_info = helper.GetGraphInfo(); - // Verify the graph information of mojo are as expected. - ASSERT_EQ(graph_info->id_to_operand_map.size(), 2u); - - // Verify the input `mojo::Operand`. - ASSERT_EQ(graph_info->input_operands.size(), 1u); - auto input_operand_id = graph_info->input_operands[0]; - auto input_operand_iter = - graph_info->id_to_operand_map.find(input_operand_id); - ASSERT_TRUE(input_operand_iter != graph_info->id_to_operand_map.end()); - EXPECT_EQ(input_operand_iter->value->kind, - blink_mojom::Operand::Kind::kInput); - EXPECT_EQ(input_operand_iter->value->data_type, expected_operand.data_type); - EXPECT_EQ(input_operand_iter->value->dimensions, input.dimensions); - EXPECT_EQ(input_operand_iter->value->name, "input"); - - // Verify the output `mojo::Operand`. - ASSERT_EQ(graph_info->output_operands.size(), 1u); - auto output_operand_id = graph_info->output_operands[0]; - auto output_operand_iter = - graph_info->id_to_operand_map.find(output_operand_id); - ASSERT_TRUE(output_operand_iter != graph_info->id_to_operand_map.end()); - EXPECT_EQ(output_operand_iter->value->kind, - blink_mojom::Operand::Kind::kOutput); - EXPECT_EQ(output_operand_iter->value->data_type, - expected_operand.data_type); - EXPECT_EQ(output_operand_iter->value->dimensions, - expected_operand.dimensions); - EXPECT_EQ(output_operand_iter->value->name, "output"); - - // Verify the `mojo::Operator`. - ASSERT_EQ(graph_info->operations.size(), 1u); - auto& operation = graph_info->operations[0]; - ASSERT_TRUE(operation->is_linear()); - auto& linear = operation->get_linear(); - EXPECT_EQ(linear->input_operand_id, input_operand_id); - EXPECT_EQ(linear->output_operand_id, output_operand_id); - EXPECT_EQ(linear->alpha, expected_attributes.alpha); - EXPECT_EQ(linear->beta, expected_attributes.beta); - } -}; - -TEST_P(MLGraphTestMojo, LinearTest) { - V8TestingScope scope; - // Bind fake WebNN Context in the service for testing. - ScopedWebNNServiceBinder scoped_setup_binder(*this, scope); - - auto* options = MLContextOptions::Create(); - // Create WebNN Context with GPU device type. - options->setDeviceType(V8MLDeviceType::Enum::kGpu); - auto* builder = CreateGraphBuilder(scope, options); - ASSERT_NE(builder, nullptr); - { - // Test linear operator for 0-D scalar with default options. - LinearTester{ - .input = {.data_type = V8MLOperandDataType::Enum::kFloat32, - .dimensions = {}}, - .expected_operand = {.data_type = - blink_mojom::Operand::DataType::kFloat32, - .dimensions = {}}, - .expected_attributes = {.alpha = 1.0, .beta = 0}} - .Test(*this, scope, builder); - } - { - // Test linear operator for 1-D tensor with default options. - LinearTester{ - .input = {.data_type = V8MLOperandDataType::Enum::kFloat32, - .dimensions = {2}}, - .expected_operand = {.data_type = - blink_mojom::Operand::DataType::kFloat32, - .dimensions = {2}}, - .expected_attributes = {.alpha = 1.0, .beta = 0}} - .Test(*this, scope, builder); - } - { - // Test linear operator for 2-D tensor with given alpha. - LinearTester{ - .input = {.data_type = V8MLOperandDataType::Enum::kFloat16, - .dimensions = {3, 7}}, - .options = {.alpha = 0.05}, - .expected_operand = {.data_type = - blink_mojom::Operand::DataType::kFloat16, - .dimensions = {3, 7}}, - .expected_attributes = {.alpha = 0.05, .beta = 0}} - .Test(*this, scope, builder); - } - { - // Test linear operator for 3-D tensor with given beta. - LinearTester{ - .input = {.data_type = V8MLOperandDataType::Enum::kFloat32, - .dimensions = {1, 5, 3}}, - .options = {.beta = 0.07}, - .expected_operand = {.data_type = - blink_mojom::Operand::DataType::kFloat32, - .dimensions = {1, 5, 3}}, - .expected_attributes = {.alpha = 1.0, .beta = 0.07}} - .Test(*this, scope, builder); - } - { - // Test linear operator for 4-D tensor with given beta and beta. - LinearTester{ - .input = {.data_type = V8MLOperandDataType::Enum::kFloat16, - .dimensions = {1, 2, 2, 1}}, - .options = {.alpha = 0.05, .beta = 0.07}, - .expected_operand = {.data_type = - blink_mojom::Operand::DataType::kFloat16, - .dimensions = {1, 2, 2, 1}}, - .expected_attributes = {.alpha = 0.05, .beta = 0.07}} - .Test(*this, scope, builder); - } -} - struct PadTester { OperandInfoBlink input; Vector<uint32_t> beginning_padding; @@ -3006,102 +2165,6 @@ } } -struct SoftplusTester { - OperandInfoBlink input; - std::optional<float> steepness; - OperandInfoMojo expected_output; - float expected_steepness; - - void Test(MLGraphTestMojo& helper, - V8TestingScope& scope, - MLGraphBuilder* builder) { - // Build the graph. - auto* input_operand = - BuildInput(builder, "input", input.dimensions, input.data_type, - scope.GetExceptionState()); - MLSoftplusOptions* softplus_options = MLSoftplusOptions::Create(); - if (steepness) { - softplus_options->setSteepness(steepness.value()); - } - auto* output_operand = builder->softplus(input_operand, softplus_options, - scope.GetExceptionState()); - auto [graph, error_name, error_message] = - helper.BuildGraph(scope, builder, {{"output", output_operand}}); - ASSERT_THAT(graph, testing::NotNull()); - - auto graph_info = helper.GetGraphInfo(); - // Verify the `mojo::Operator`. - ASSERT_EQ(graph_info->operations.size(), 1u); - auto& operation = graph_info->operations[0]; - ASSERT_TRUE(operation->is_softplus()); - auto& softplus = operation->get_softplus(); - - // Verify the steepness. - EXPECT_FLOAT_EQ(softplus->steepness, expected_steepness); - - // Verify the input `mojo::Operand`. - ASSERT_EQ(graph_info->input_operands.size(), 1u); - auto input_operand_id = graph_info->input_operands[0]; - auto input_operand_iter = - graph_info->id_to_operand_map.find(input_operand_id); - ASSERT_TRUE(input_operand_iter != graph_info->id_to_operand_map.end()); - EXPECT_EQ(input_operand_iter->value->kind, - blink_mojom::Operand::Kind::kInput); - EXPECT_EQ(input_operand_iter->value->data_type, expected_output.data_type); - EXPECT_EQ(input_operand_iter->value->dimensions, - expected_output.dimensions); - EXPECT_EQ(input_operand_iter->value->name, "input"); - - // Verify the output `mojo::Operand`. - ASSERT_EQ(graph_info->output_operands.size(), 1u); - auto output_operand_id = graph_info->output_operands[0]; - auto output_operand_iter = - graph_info->id_to_operand_map.find(output_operand_id); - ASSERT_TRUE(output_operand_iter != graph_info->id_to_operand_map.end()); - EXPECT_EQ(output_operand_iter->value->kind, - blink_mojom::Operand::Kind::kOutput); - EXPECT_EQ(output_operand_iter->value->data_type, expected_output.data_type); - EXPECT_EQ(output_operand_iter->value->dimensions, - expected_output.dimensions); - EXPECT_EQ(output_operand_iter->value->name, "output"); - } -}; - -TEST_P(MLGraphTestMojo, SoftplusTest) { - V8TestingScope scope; - // Bind fake WebNN Context in the service for testing. - ScopedWebNNServiceBinder scoped_setup_binder(*this, scope); - - auto* options = MLContextOptions::Create(); - // Create WebNN Context with GPU device type. - options->setDeviceType(V8MLDeviceType::Enum::kGpu); - auto* builder = CreateGraphBuilder(scope, options); - ASSERT_THAT(builder, testing::NotNull()); - { - // Test building softplus with default options. - SoftplusTester{ - .input = {.data_type = V8MLOperandDataType::Enum::kFloat32, - .dimensions = {2, 4}}, - .expected_output = {.data_type = - blink_mojom::Operand::DataType::kFloat32, - .dimensions = {2, 4}}, - .expected_steepness = 1.0} - .Test(*this, scope, builder); - } - { - // Test building softplus with steepness = 5.0. - SoftplusTester{ - .input = {.data_type = V8MLOperandDataType::Enum::kFloat16, - .dimensions = {1, 5}}, - .steepness = 5.0, - .expected_output = {.data_type = - blink_mojom::Operand::DataType::kFloat16, - .dimensions = {1, 5}}, - .expected_steepness = 5.0} - .Test(*this, scope, builder); - } -} - struct ReduceTester { OperandInfoBlink input; std::optional<Vector<uint32_t>> axes;
diff --git a/third_party/blink/renderer/modules/ml/webnn/ml_graph_test.cc b/third_party/blink/renderer/modules/ml/webnn/ml_graph_test.cc index 5589ab5..aedb9d32 100644 --- a/third_party/blink/renderer/modules/ml/webnn/ml_graph_test.cc +++ b/third_party/blink/renderer/modules/ml/webnn/ml_graph_test.cc
@@ -6,7 +6,6 @@ #include "testing/gtest/include/gtest/gtest.h" #include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_testing.h" #include "third_party/blink/renderer/bindings/modules/v8/v8_ml_clamp_options.h" -#include "third_party/blink/renderer/bindings/modules/v8/v8_ml_leaky_relu_options.h" #include "third_party/blink/renderer/bindings/modules/v8/v8_ml_pad_options.h" #include "third_party/blink/renderer/bindings/modules/v8/v8_ml_reduce_options.h" #include "third_party/blink/renderer/bindings/modules/v8/v8_ml_split_options.h" @@ -671,76 +670,6 @@ } template <typename T> -struct LeakyReluTester { - OperandInfo<T> input; - Vector<T> expected; - - void Test(MLGraphTest& helper, - V8TestingScope& scope, - MLLeakyReluOptions* options = MLLeakyReluOptions::Create()) { - // Build the graph. - auto* builder = - CreateMLGraphBuilder(scope.GetExecutionContext(), - scope.GetScriptState(), scope.GetExceptionState()); - auto* input_operand = - BuildInput(builder, "input", input.dimensions, input.data_type, - scope.GetExceptionState()); - auto* output_operand = - BuildLeakyRelu(scope, builder, input_operand, options); - auto [graph, error_name, error_message] = - helper.BuildGraph(scope, builder, {{"output", output_operand}}); - ASSERT_THAT(graph, testing::NotNull()); - - // Compute the graph. - MLNamedArrayBufferViews inputs( - {{"input", - CreateArrayBufferViewForOperand(input_operand, input.values)}}); - MLNamedArrayBufferViews outputs( - {{"output", CreateArrayBufferViewForOperand(output_operand)}}); - std::tie(error_name, error_message) = - helper.ComputeGraph(scope, graph, inputs, outputs); - EXPECT_TRUE(error_name.IsNull()); - auto results = GetArrayBufferViewValues<T>(outputs[0].second); - EXPECT_EQ(results, expected); - } -}; - -TEST_P(MLGraphTest, LeakyReluTest) { - V8TestingScope scope; - { - // Test leakyRelu operator with default options. - auto* options = MLLeakyReluOptions::Create(); - LeakyReluTester<float>{ - .input = {.data_type = V8MLOperandDataType::Enum::kFloat32, - .dimensions = {1, 2, 2, 1}, - .values = {10, 5, -100, 0}}, - .expected = {10, 5, -1, 0}} - .Test(*this, scope, options); - } - { - // Test leakyRelu operator with alpha = 0.2. - auto* options = MLLeakyReluOptions::Create(); - options->setAlpha(0.2); - LeakyReluTester<float>{ - .input = {.data_type = V8MLOperandDataType::Enum::kFloat32, - .dimensions = {1, 2, 2, 1}, - .values = {10, 5, -100, 0}}, - .expected = {10, 5, -20, 0}} - .Test(*this, scope, options); - } - { - // Test leakyRelu operator for scalar input. - auto* options = MLLeakyReluOptions::Create(); - LeakyReluTester<float>{ - .input = {.data_type = V8MLOperandDataType::Enum::kFloat32, - .dimensions = {}, - .values = {-100}}, - .expected = {-1}} - .Test(*this, scope, options); - } -} - -template <typename T> struct ReduceTester { webnn::mojom::blink::Reduce::Kind kind; OperandInfo<T> input; @@ -835,113 +764,6 @@ } template <typename T> -struct ClampTester { - OperandInfo<T> input; - Vector<T> expected; - - void Test(MLGraphTest& helper, - V8TestingScope& scope, - MLClampOptions* options = MLClampOptions::Create()) { - // Build the graph. - auto* builder = - CreateMLGraphBuilder(scope.GetExecutionContext(), - scope.GetScriptState(), scope.GetExceptionState()); - auto* input_operand = - BuildInput(builder, "input", input.dimensions, input.data_type, - scope.GetExceptionState()); - auto* output_operand = - builder->clamp(input_operand, options, scope.GetExceptionState()); - auto [graph, error_name, error_message] = - helper.BuildGraph(scope, builder, {{"output", output_operand}}); - ASSERT_THAT(graph, testing::NotNull()); - - // Compute the graph. - MLNamedArrayBufferViews inputs( - {{"input", - CreateArrayBufferViewForOperand(input_operand, input.values)}}); - MLNamedArrayBufferViews outputs( - {{"output", CreateArrayBufferViewForOperand(output_operand)}}); - std::tie(error_name, error_message) = - helper.ComputeGraph(scope, graph, inputs, outputs); - EXPECT_TRUE(error_name.IsNull()); - auto results = GetArrayBufferViewValues<T>(outputs[0].second); - EXPECT_EQ(results, expected); - } -}; - -TEST_P(MLGraphTest, ClampTest) { - V8TestingScope scope; - { - // Test clamp operator with the minimum value defined. - MLClampOptions* options = MLClampOptions::Create(); - options->setMinValue(0.0); - ClampTester<float>{ - .input = {.data_type = V8MLOperandDataType::Enum::kFloat32, - .dimensions = {1, 2, 2, 1}, - .values = {-10.0, -0.5, 0.5, 10.0}}, - .expected = {0.0, 0.0, 0.5, 10.0}} - .Test(*this, scope, options); - } - { - // Test clamp operator with the minimum = 0 and maximum = 6. - MLClampOptions* options = MLClampOptions::Create(); - options->setMinValue(0.0); - options->setMaxValue(6.0); - ClampTester<float>{ - .input = {.data_type = V8MLOperandDataType::Enum::kFloat32, - .dimensions = {1, 2, 2, 1}, - .values = {-10.0, -0.5, 0.5, 10.0}}, - .expected = {0.0, 0.0, 0.5, 6.0}} - .Test(*this, scope, options); - } - { - // Test clamp operator with the minimum = -1 and maximum = 1. - MLClampOptions* options = MLClampOptions::Create(); - options->setMinValue(-1.0); - options->setMaxValue(1.0); - ClampTester<float>{ - .input = {.data_type = V8MLOperandDataType::Enum::kFloat32, - .dimensions = {1, 2, 2, 1}, - .values = {-10.0, -0.5, 0.5, 10.0}}, - .expected = {-1, -0.5, 0.5, 1}} - .Test(*this, scope, options); - } - { - // Test clamp operator for scalar input. - MLClampOptions* options = MLClampOptions::Create(); - options->setMinValue(0.0); - options->setMaxValue(6.0); - ClampTester<float>{ - .input = {.data_type = V8MLOperandDataType::Enum::kFloat32, - .dimensions = {}, - .values = {10.0}}, - .expected = {6.0}} - .Test(*this, scope, options); - } - { - // Test clamp operator with default options that no minimum and maximum - // values are defined. - ClampTester<float>{ - .input = {.data_type = V8MLOperandDataType::Enum::kFloat32, - .dimensions = {1, 2, 2, 1}, - .values = {-10.0, -0.5, 0.5, 10.0}}, - .expected = {-10.0, -0.5, 0.5, 10.0}} - .Test(*this, scope); - } - { - // Test clamp operator with the maximum value defined. - MLClampOptions* options = MLClampOptions::Create(); - options->setMaxValue(6.0); - ClampTester<float>{ - .input = {.data_type = V8MLOperandDataType::Enum::kFloat32, - .dimensions = {1, 2, 2, 1}, - .values = {-10.0, -0.5, 0.5, 10.0}}, - .expected = {-10.0, -0.5, 0.5, 6.0}} - .Test(*this, scope, options); - } -} - -template <typename T> struct GemmTester { OperandInfo<T> a; OperandInfo<T> b;
diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc b/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc index 3cc2c38..757954677 100644 --- a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc +++ b/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.cc
@@ -672,10 +672,12 @@ // function is that we want to record UMA with following // MaybeRecordBoostImagePriorityReason() function even when we disables // AdjustImagePriority. - if (base::FeatureList::IsEnabled(features::kLCPCriticalPathPredictor) && + static const bool kOverrideFirstNBoost = + base::FeatureList::IsEnabled(features::kLCPCriticalPathPredictor) && features::kLCPCriticalPathAdjustImageLoadPriority.Get() && features::kLCPCriticalPathAdjustImageLoadPriorityOverrideFirstNBoost - .Get() && + .Get(); + if (kOverrideFirstNBoost && context_->DoesLCPPHaveLcpElementLocatorHintData()) { new_priority = priority_so_far; } @@ -783,12 +785,14 @@ return properties_->GetControllerServiceWorkerMode(); } -bool ResourceFetcher::ShouldDeferResource(ResourceType type, - const FetchParameters& params) const { +ResourceFetcher::DeferPolicy ResourceFetcher::GetDeferPolicy( + ResourceType type, + const FetchParameters& params) const { // Defer a font load until it is actually needed unless this is a link // preload. - if (type == ResourceType::kFont && !params.IsLinkPreload()) - return true; + if (type == ResourceType::kFont && !params.IsLinkPreload()) { + return DeferPolicy::kDefer; + } // Defer loading images when: // - images are disabled. @@ -798,10 +802,10 @@ (ShouldDeferImageLoad(params.Url()) || params.GetImageRequestBehavior() == FetchParameters::ImageRequestBehavior::kDeferImageLoad)) { - return true; + return DeferPolicy::kDefer; } - return false; + return DeferPolicy::kNoDefer; } bool ResourceFetcher::ResourceAlreadyLoadStarted(Resource* resource, @@ -812,11 +816,15 @@ bool ResourceFetcher::ResourceNeedsLoad(Resource* resource, RevalidationPolicy policy, - bool should_defer) const { - // MHTML documents should not trigger actual loads (i.e. all resource requests - // should be fulfilled by the MHTML archive). - return !archive_ && !should_defer && - !ResourceAlreadyLoadStarted(resource, policy); + DeferPolicy defer_policy) const { + switch (defer_policy) { + case DeferPolicy::kNoDefer: + // MHTML documents should not trigger actual loads (i.e. all resource + // requests should be fulfilled by the MHTML archive). + return !archive_ && !ResourceAlreadyLoadStarted(resource, policy); + case DeferPolicy::kDefer: + return false; + } } void ResourceFetcher::DidLoadResourceFromMemoryCache( @@ -991,9 +999,15 @@ ResourceFetcher::RevalidationPolicyForMetrics ResourceFetcher::MapToPolicyForMetrics(RevalidationPolicy policy, Resource* resource, - bool should_defer) { - if (should_defer && !ResourceAlreadyLoadStarted(resource, policy)) { - return RevalidationPolicyForMetrics::kDefer; + DeferPolicy defer_policy) { + switch (defer_policy) { + case DeferPolicy::kDefer: + if (!ResourceAlreadyLoadStarted(resource, policy)) { + return RevalidationPolicyForMetrics::kDefer; + } + break; + case DeferPolicy::kNoDefer: + break; } // A resource in memory cache but not yet loaded is a deferred resource // created in previous loads. @@ -1221,11 +1235,12 @@ bool is_data_url = resource_request.Url().ProtocolIsData(); bool is_static_data = is_data_url || archive_; bool is_stale_revalidation = params.IsStaleRevalidation(); - bool should_defer = ShouldDeferResource(resource_type, params); + DeferPolicy defer_policy = GetDeferPolicy(resource_type, params); // MHTML archives do not load from the network and must load immediately. Data // urls can also load immediately, except in cases when they should be // deferred. - if (!is_stale_revalidation && (archive_ || (is_data_url && !should_defer))) { + if (!is_stale_revalidation && + (archive_ || (is_data_url && defer_policy != DeferPolicy::kDefer))) { resource = CreateResourceForStaticData(params, factory); if (resource) { policy = @@ -1273,7 +1288,7 @@ } UpdateMemoryCacheStats( - resource, MapToPolicyForMetrics(policy, resource, should_defer), params, + resource, MapToPolicyForMetrics(policy, resource, defer_policy), params, factory, is_static_data, same_top_frame_site_resource_cached); switch (policy) { @@ -1360,7 +1375,7 @@ // loading immediately. If revalidation policy was determined as |Revalidate|, // the resource was already initialized for the revalidation here, but won't // start loading. - if (ResourceNeedsLoad(resource, policy, should_defer)) { + if (ResourceNeedsLoad(resource, policy, defer_policy)) { if (!StartLoad(resource, std::move(params.MutableResourceRequest().MutableBody()), load_blocking_policy, params.GetRenderBlockingBehavior())) {
diff --git a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.h b/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.h index 0f29dc10..9509283 100644 --- a/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.h +++ b/third_party/blink/renderer/platform/loader/fetch/resource_fetcher.h
@@ -384,6 +384,13 @@ kIncludingKeepaliveLoaders, }; + enum class DeferPolicy { + kNoDefer, + // kDefer doesn't start loading in `ResourceRequest()`. This option is used + // to defer a non-link preload font, or image loading is disabled. + kDefer, + }; + bool StartLoad(Resource*, ResourceRequestBody, ImageLoadBlockingPolicy, @@ -507,11 +514,9 @@ bool is_static_data, RenderBlockingBehavior); - bool ShouldDeferResource(ResourceType, const FetchParameters& params) const; + DeferPolicy GetDeferPolicy(ResourceType, const FetchParameters& params) const; - bool ResourceNeedsLoad(Resource*, - RevalidationPolicy, - bool should_defer) const; + bool ResourceNeedsLoad(Resource*, RevalidationPolicy, DeferPolicy) const; static bool ResourceAlreadyLoadStarted(Resource*, RevalidationPolicy); @@ -519,7 +524,7 @@ static RevalidationPolicyForMetrics MapToPolicyForMetrics(RevalidationPolicy, Resource*, - bool should_defer); + DeferPolicy); void UpdateMemoryCacheStats(Resource*, RevalidationPolicyForMetrics,
diff --git a/third_party/blink/web_tests/TestExpectations b/third_party/blink/web_tests/TestExpectations index 203a46f0..dcc3dc43 100644 --- a/third_party/blink/web_tests/TestExpectations +++ b/third_party/blink/web_tests/TestExpectations
@@ -2630,7 +2630,7 @@ crbug.com/626703 external/wpt/uievents/mouse/mouse_boundary_events_after_removing_last_over_element.html [ Failure ] # ====== New tests from wpt-importer added here ====== -[ Linux ] virtual/stylable-select-disabled/external/wpt/html/semantics/forms/the-select-element/stylable-select/native-popup-with-datalist.tentative.html [ Failure ] +crbug.com/335769267 [ Linux ] virtual/stylable-select-disabled/external/wpt/html/semantics/forms/the-select-element/stylable-select/native-popup-with-datalist.tentative.html [ Failure ] crbug.com/335769262 [ Win11-arm64 ] external/wpt/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-blob.tentative.html [ Failure ] crbug.com/335769262 [ Mac14-arm64 ] external/wpt/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-blob.tentative.html [ Failure ] crbug.com/335769262 [ Mac13-arm64 ] external/wpt/html/canvas/element/manual/drawing-images-to-the-canvas/image-orientation/drawImage-from-blob.tentative.html [ Failure ] @@ -3010,7 +3010,7 @@ crbug.com/626703 [ Mac13 Release ] external/wpt/css/css-tables/crashtests/textarea-intrinsic-size-crash.html [ Timeout ] crbug.com/626703 [ Mac13 ] external/wpt/fetch/api/abort/serviceworker-intercepted.https.html [ Timeout ] crbug.com/626703 [ Mac13 ] external/wpt/service-workers/cache-storage/crashtests/cache-response-clone.https.html [ Timeout ] -crbug.com/626703 external/wpt/css/css-inline/text-box-trim/text-box-trim-half-leading-block-box-001-ref.html [ Failure ] +crbug.com/626703 external/wpt/css/css-inline/text-box-trim/text-box-trim-half-leading-block-box-002.html [ Failure ] crbug.com/626703 external/wpt/css/css-inline/text-box-trim/text-box-trim-half-leading-block-box-001.html [ Failure ] crbug.com/626703 [ Mac10.15 ] virtual/fenced-frame-mparch/external/wpt/fenced-frame/background-sync.https.html [ Timeout ] crbug.com/626703 [ Mac13 ] virtual/fenced-frame-mparch/external/wpt/fenced-frame/background-sync.https.html [ Timeout ] @@ -3898,6 +3898,7 @@ # Sheriff 2018-06-07 crbug.com/850358 http/tests/devtools/editor/text-editor-enter-behaviour.js [ Failure Pass Timeout ] +crbug.com/849978 http/tests/devtools/elements/styles-4/stylesheet-source-url-comment.js [ Failure Pass Timeout ] # User Activation crbug.com/736415 crbug.com/1066190 [ Debug ] external/wpt/html/user-activation/navigation-state-reset-crossorigin.sub.html [ Failure Timeout ] @@ -4506,6 +4507,7 @@ # Sheriff 2020-12-11 # Flaking on Linux crbug.com/1157861 http/tests/devtools/extensions/extensions-resources.js [ Failure Pass ] +crbug.com/1157861 http/tests/devtools/console/paintworklet-console-selector.js [ Failure Pass ] # Wpt importer sheriff 2021-01-05 crbug.com/1163175 external/wpt/css/css-pseudo/first-letter-punctuation-and-space.html [ Failure ] @@ -6734,9 +6736,6 @@ # Tentative allow to fail to roll SwiftShader changes. crbug.com/726075 [ Linux ] virtual/gpu/fast/canvas/canvas-imageSmoothing-disabled-scaling-down.html [ Failure ] -# Temporary for V8 roll -crbug.com/329409675 http/tests/inspector-protocol/side-effects/evaluate-embedder-side-effect-free-methods.js [ Failure Pass ] - # Gardener 2023-12-01 crbug.com/1506782 fast/dom/HTMLImageElement/image-sizes-1x.html [ Failure Pass ] @@ -7226,23 +7225,14 @@ # RubyLineBreakable crbug.com/324111880 virtual/ruby-lb/editing/execCommand/insert-paragraph-into-table.html [ Failure ] crbug.com/324111880 virtual/ruby-lb/external/wpt/css/css-break/ruby-000.html [ Failure ] -crbug.com/324111880 virtual/ruby-lb/external/wpt/css/css-break/ruby-001.html [ Failure ] crbug.com/324111880 virtual/ruby-lb/external/wpt/css/css-break/ruby-002.html [ Failure ] -crbug.com/324111880 virtual/ruby-lb/external/wpt/css/css-break/ruby-003.html [ Failure ] crbug.com/324111880 virtual/ruby-lb/external/wpt/css/css-contain/contain-layout-005.html [ Crash Failure ] crbug.com/324111880 virtual/ruby-lb/external/wpt/css/css-contain/contain-paint-008.html [ Failure ] crbug.com/324111880 virtual/ruby-lb/external/wpt/css/css-contain/contain-paint-ignored-cases-ruby-containing-block-001.html [ Crash ] crbug.com/324111880 virtual/ruby-lb/external/wpt/css/css-contain/content-visibility/display-ruby-text-crash.html [ Crash ] -crbug.com/324111880 virtual/ruby-lb/external/wpt/css/css-multicol/multicol-fill-balance-021.html [ Failure ] -crbug.com/324111880 virtual/ruby-lb/external/wpt/css/css-ruby/br-clear-all-002.html [ Failure ] crbug.com/324111880 virtual/ruby-lb/external/wpt/css/css-text-decor/ruby-text-decoration-01.html [ Crash ] -crbug.com/324111880 virtual/ruby-lb/external/wpt/css/css-writing-modes/direction-upright-002.html [ Crash Failure ] crbug.com/324111880 virtual/ruby-lb/external/wpt/editing/run/inserthorizontalrule.html [ Failure ] -crbug.com/324111880 virtual/ruby-lb/external/wpt/webvtt/rendering/cues-with-video/processing-model/bidi/vertical_lr.html [ Crash Failure ] -crbug.com/324111880 virtual/ruby-lb/external/wpt/webvtt/rendering/cues-with-video/processing-model/bidi/vertical_rl.html [ Crash Failure ] -crbug.com/324111880 virtual/ruby-lb/external/wpt/webvtt/rendering/cues-with-video/processing-model/selectors/cue/vertical_ruby-position.html [ Crash Failure ] crbug.com/324111880 virtual/ruby-lb/fast/ruby/float-overhang-from-ruby-text.html [ Failure ] -crbug.com/324111880 virtual/ruby-lb/fast/ruby/ruby-position-modern-japanese-fonts.html [ Failure ] crbug.com/324111880 virtual/ruby-lb/fast/ruby/select-ruby.html [ Failure ] crbug.com/324111880 virtual/ruby-lb/paint/invalidation/ruby-flipped-blocks.html [ Failure ] crbug.com/324111880 virtual/ruby-lb/virtual/text-antialias/emphasis-avoid-ruby.html [ Failure ] @@ -7265,6 +7255,7 @@ crbug.com/324111880 virtual/ruby-lb/fast/ruby/ruby-illegal-7.html [ Failure ] crbug.com/324111880 virtual/ruby-lb/fast/ruby/ruby-illegal-combined.html [ Failure ] crbug.com/324111880 virtual/ruby-lb/fast/ruby/ruby-length.html [ Failure ] +crbug.com/324111880 virtual/ruby-lb/fast/ruby/ruby-position-modern-japanese-fonts.html [ Failure ] crbug.com/324111880 virtual/ruby-lb/fast/ruby/ruby-text-before-after-content.html [ Failure ] crbug.com/324111880 virtual/ruby-lb/fast/ruby/ruby-trailing.html [ Failure ] crbug.com/324111880 virtual/ruby-lb/fast/ruby/split-ruby-column-percentage-height-descendant.html [ Failure ] @@ -7366,41 +7357,3 @@ # Gardener 2024-04-16 crbug.com/335003887 [ Mac14 ] virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gpu/arg_min_max.https.any.worker.html [ Failure Pass ] crbug.com/335003887 [ Win11 ] virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gpu/arg_min_max.https.any.worker.html [ Failure Pass ] - -#Gardener 2024-04-19 -crbug.com/40933623 [ Linux ] http/tests/devtools/console/command-line-api.js [ Crash Failure Pass ] -crbug.com/40933623 [ Linux ] http/tests/devtools/console/console-api-on-call-frame.js [ Crash Failure Pass ] -crbug.com/40933623 [ Linux ] http/tests/devtools/console/console-error-on-call-frame.js [ Crash Failure Pass ] -crbug.com/40933623 [ Linux ] http/tests/devtools/console/console-link-to-snippet.js [ Crash Failure Pass ] -crbug.com/40933623 [ Linux ] http/tests/devtools/console/console-links-on-messages-before-inspection.js [ Crash Failure Pass ] -crbug.com/40933623 [ Linux ] http/tests/devtools/console/console-xml-document.js [ Crash Failure Pass ] -crbug.com/40933623 [ Linux ] http/tests/devtools/console/paintworklet-console-selector.js [ Crash Failure Pass ] -crbug.com/40933623 [ Mac ] http/tests/devtools/console/paintworklet-console-selector.js [ Crash Failure Pass ] -crbug.com/40933623 [ Win ] http/tests/devtools/console/paintworklet-console-selector.js [ Crash Failure Pass ] -crbug.com/40933623 [ Linux ] http/tests/devtools/console/shadow-element.js [ Crash Failure Pass ] -crbug.com/40933623 [ Linux ] http/tests/devtools/elements/accessibility/autocomplete-attribute.js [ Crash Failure Pass ] -crbug.com/40933623 [ Linux ] http/tests/devtools/elements/accessibility/edit-aria-attributes.js [ Crash Failure Pass ] -crbug.com/40933623 [ Linux ] http/tests/devtools/elements/event-listener-sidebar-custom-framework.js [ Crash Failure Pass ] -crbug.com/40933623 [ Linux ] http/tests/devtools/elements/event-listener-sidebar-jquery1.js [ Crash Failure Pass ] -crbug.com/40933623 [ Linux ] http/tests/devtools/elements/event-listener-sidebar-jquery2.js [ Crash Failure Pass ] -crbug.com/40933623 [ Linux ] http/tests/devtools/elements/event-listener-sidebar-remove.js [ Crash Failure Pass ] -crbug.com/40933623 [ Linux ] http/tests/devtools/elements/event-listener-sidebar.js [ Crash Failure Pass ] -crbug.com/40933623 [ Linux ] http/tests/devtools/elements/event-listeners-about-blank.js [ Crash Failure Pass ] -crbug.com/40933623 [ Linux ] http/tests/devtools/elements/event-listeners-framework-with-service-worker.js [ Crash Failure Pass ] -crbug.com/40933623 [ Linux ] http/tests/devtools/elements/highlight/highlight-dom-updates.js [ Crash Failure Pass ] -crbug.com/40933623 [ Linux ] http/tests/devtools/elements/styles-4/styles-do-not-detach-sourcemap-on-edits.js [ Crash Failure Pass ] -crbug.com/40933623 [ Linux ] http/tests/devtools/elements/styles-4/styles-edit-property-after-invalid-rule.js [ Crash Failure Pass ] -crbug.com/40933623 [ Linux ] http/tests/devtools/elements/styles-4/styles-update-links-3.js [ Crash Failure Pass ] -crbug.com/40933623 [ Linux ] http/tests/devtools/elements/styles-4/stylesheet-source-url-comment.js [ Crash Failure Pass ] -crbug.com/40933623 [ Mac ] http/tests/devtools/elements/styles-4/stylesheet-source-url-comment.js [ Crash Failure Pass ] -crbug.com/40933623 [ Win ] http/tests/devtools/elements/styles-4/stylesheet-source-url-comment.js [ Crash Failure Pass ] -crbug.com/40933623 [ Linux ] http/tests/devtools/elements/styles/selector-line.js [ Crash Failure Pass ] -crbug.com/40933623 [ Linux ] http/tests/devtools/elements/styles/styles-do-not-add-inline-stylesheets-in-navigator.js [ Crash Failure Pass ] -crbug.com/40933623 [ Linux ] http/tests/devtools/elements/styles/undo-after-cancelled-editing.js [ Crash Failure Pass ] -crbug.com/40933623 [ Linux ] http/tests/devtools/extensions/extensions-sidebar.js [ Crash Failure Pass ] -crbug.com/40933623 [ Linux ] http/tests/devtools/oopif/oopif-presentation-console-messages.js [ Crash Failure Pass ] -crbug.com/40933623 [ Linux ] http/tests/devtools/reveal-objects.js [ Crash Failure Pass ] -crbug.com/40933623 [ Linux ] http/tests/devtools/service-workers/service-worker-pause.js [ Crash Failure Pass ] -crbug.com/40933623 [ Linux ] http/tests/devtools/sources/debugger-breakpoints/dom-breakpoints-reload.js [ Crash Failure Pass ] -crbug.com/40933623 [ Linux ] http/tests/devtools/sources/debugger-ui/script-snippet-model.js [ Crash Failure Pass ] -crbug.com/40933623 [ Linux ] http/tests/devtools/sources/sources-panel-focus-editor-on-select.js [ Crash Failure Pass ]
diff --git a/third_party/blink/web_tests/external/wpt/css/css-inline/text-box-trim/text-box-trim-half-leading-block-box-001.html b/third_party/blink/web_tests/external/wpt/css/css-inline/text-box-trim/text-box-trim-half-leading-block-box-001.html index 2cbf1c2..14429b1 100644 --- a/third_party/blink/web_tests/external/wpt/css/css-inline/text-box-trim/text-box-trim-half-leading-block-box-001.html +++ b/third_party/blink/web_tests/external/wpt/css/css-inline/text-box-trim/text-box-trim-half-leading-block-box-001.html
@@ -15,6 +15,6 @@ </style> <div class ="div-parent""> - <div id="d1"></div> + <div id="d2">Testline1<br>Testline2<br>Testline3</div> </div>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-inline/text-box-trim/text-box-trim-half-leading-block-box-002-ref.html b/third_party/blink/web_tests/external/wpt/css/css-inline/text-box-trim/text-box-trim-half-leading-block-box-002-ref.html new file mode 100644 index 0000000..8c10a80 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-inline/text-box-trim/text-box-trim-half-leading-block-box-002-ref.html
@@ -0,0 +1,17 @@ +<!DOCTYPE html> +<title>Reference for trimming block-boxes at their first/last formatted lines</title> +<link rel="help" href="https://drafts.csswg.org/css-inline-3/#leading-trim"> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> + +<style> +.div-parent { + outline: 1px solid orange; + font-family: Ahem; + font-size: 20px; + line-height: 1; + writing-mode:vertical-lr; +} +</style> +<div class ="div-parent"> + Test<br><br> +</div>
diff --git a/third_party/blink/web_tests/external/wpt/css/css-inline/text-box-trim/text-box-trim-half-leading-block-box-002.html b/third_party/blink/web_tests/external/wpt/css/css-inline/text-box-trim/text-box-trim-half-leading-block-box-002.html new file mode 100644 index 0000000..fdf5b71 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-inline/text-box-trim/text-box-trim-half-leading-block-box-002.html
@@ -0,0 +1,17 @@ +<!DOCTYPE html> +<title>Tests block boxes's edges are trimmed at text-over/text-under baselines of their first/last formatted lines</title> +<link rel="help" href="https://drafts.csswg.org/css-inline-3/#leading-trim"> +<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" /> +<link rel="match" href="text-box-trim-half-leading-block-box-002-ref.html"> + +<style> +.div-parent { + outline: 1px solid orange; + font-family: Ahem; + font-size: 20px; + line-height: 3; + writing-mode:vertical-lr; +} +</style> + +<div class ="div-parent" style="text-box-trim:start">Test</div>
diff --git a/third_party/blink/web_tests/external/wpt/webnn/conformance_tests/elu.https.any-expected.txt b/third_party/blink/web_tests/external/wpt/webnn/conformance_tests/elu.https.any-expected.txt index 4e44422b..3e47719 100644 --- a/third_party/blink/web_tests/external/wpt/webnn/conformance_tests/elu.https.any-expected.txt +++ b/third_party/blink/web_tests/external/wpt/webnn/conformance_tests/elu.https.any-expected.txt
@@ -1,5 +1,5 @@ This is a testharness.js-based test. [FAIL] elu float32 4D tensor negative options.alpha - promise_test: Unhandled rejection with value: object "DataError: Failed to execute 'elu' on 'MLGraphBuilder': The value of alpha must be greater than 0." + promise_test: Unhandled rejection with value: object "TypeError: 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/external/wpt/webnn/conformance_tests/elu.https.any.worker-expected.txt b/third_party/blink/web_tests/external/wpt/webnn/conformance_tests/elu.https.any.worker-expected.txt index 4e44422b..3e47719 100644 --- a/third_party/blink/web_tests/external/wpt/webnn/conformance_tests/elu.https.any.worker-expected.txt +++ b/third_party/blink/web_tests/external/wpt/webnn/conformance_tests/elu.https.any.worker-expected.txt
@@ -1,5 +1,5 @@ This is a testharness.js-based test. [FAIL] elu float32 4D tensor negative options.alpha - promise_test: Unhandled rejection with value: object "DataError: Failed to execute 'elu' on 'MLGraphBuilder': The value of alpha must be greater than 0." + promise_test: Unhandled rejection with value: object "TypeError: 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/external/wpt/webnn/validation_tests/clamp.https.any.js b/third_party/blink/web_tests/external/wpt/webnn/validation_tests/clamp.https.any.js index 85cd19a..126fa90 100644 --- a/third_party/blink/web_tests/external/wpt/webnn/validation_tests/clamp.https.any.js +++ b/third_party/blink/web_tests/external/wpt/webnn/validation_tests/clamp.https.any.js
@@ -5,3 +5,56 @@ 'use strict'; validateInputFromAnotherBuilder('clamp'); + +validateUnaryOperation( + 'clamp', allWebNNOperandDataTypes, /*alsoBuildActivation=*/ true); + +promise_test(async t => { + const options = {minValue: 1.0, maxValue: 3.0}; + const input = + builder.input('input', {dataType: 'uint32', dimensions: [1, 2, 3]}); + const output = builder.clamp(input, options); + assert_equals(output.dataType(), 'uint32'); + assert_array_equals(output.shape(), [1, 2, 3]); +}, '[clamp] Test building an operator with options'); + +promise_test(async t => { + const options = {minValue: 0, maxValue: 0}; + const input = + builder.input('input', {dataType: 'int32', dimensions: [1, 2, 3, 4]}); + const output = builder.clamp(input, options); + assert_equals(output.dataType(), 'int32'); + assert_array_equals(output.shape(), [1, 2, 3, 4]); +}, '[clamp] Test building an operator with options.minValue == options.maxValue'); + +promise_test(async t => { + const options = {minValue: 2.0}; + builder.clamp(options); +}, '[clamp] Test building an activation with options'); + +promise_test(async t => { + const options = {minValue: 3.0, maxValue: 1.0}; + const input = + builder.input('input', {dataType: 'uint8', dimensions: [1, 2, 3]}); + assert_throws_js(TypeError, () => builder.clamp(input, options)); +}, '[clamp] Throw if options.minValue > options.maxValue when building an operator'); + +// To be removed once infinite `minValue` is allowed. Tracked in +// https://github.com/webmachinelearning/webnn/pull/647. +promise_test(async t => { + const options = {minValue: -Infinity}; + const input = builder.input('input', {dataType: 'float16', dimensions: []}); + assert_throws_js(TypeError, () => builder.clamp(input, options)); +}, '[clamp] Throw if options.minValue is -Infinity when building an operator'); + +promise_test(async t => { + const options = {minValue: 2.0, maxValue: -1.0}; + assert_throws_js(TypeError, () => builder.clamp(options)); +}, '[clamp] Throw if options.minValue > options.maxValue when building an activation'); + +// To be removed once NaN `maxValue` is allowed. Tracked in +// https://github.com/webmachinelearning/webnn/pull/647. +promise_test(async t => { + const options = {maxValue: NaN}; + assert_throws_js(TypeError, () => builder.clamp(options)); +}, '[clamp] Throw if options.maxValue is NaN when building an activation');
diff --git a/third_party/blink/web_tests/external/wpt/webnn/validation_tests/elu.https.any.js b/third_party/blink/web_tests/external/wpt/webnn/validation_tests/elu.https.any.js index 6e842cb6..53ec5e5 100644 --- a/third_party/blink/web_tests/external/wpt/webnn/validation_tests/elu.https.any.js +++ b/third_party/blink/web_tests/external/wpt/webnn/validation_tests/elu.https.any.js
@@ -5,3 +5,43 @@ 'use strict'; validateInputFromAnotherBuilder('elu'); + +validateUnaryOperation( + 'elu', floatingPointTypes, /*alsoBuildActivation=*/ true); + +promise_test(async t => { + const options = {alpha: 1.0}; + const input = + builder.input('input', {dataType: 'float32', dimensions: [1, 2, 3]}); + const output = builder.elu(input, options); + assert_equals(output.dataType(), 'float32'); + assert_array_equals(output.shape(), [1, 2, 3]); +}, '[elu] Test building an operator with options'); + +promise_test(async t => { + const options = {alpha: 1.5}; + builder.elu(options); +}, '[elu] Test building an activation with options'); + +promise_test(async t => { + const options = {alpha: -1.0}; + const input = + builder.input('input', {dataType: 'float32', dimensions: [1, 2, 3]}); + assert_throws_js(TypeError, () => builder.elu(input, options)); +}, '[elu] Throw if options.alpha <= 0 when building an operator'); + +promise_test(async t => { + const options = {alpha: NaN}; + const input = builder.input('input', {dataType: 'float16', dimensions: []}); + assert_throws_js(TypeError, () => builder.elu(input, options)); +}, '[elu] Throw if options.alpha is NaN when building an operator'); + +promise_test(async t => { + const options = {alpha: 0}; + assert_throws_js(TypeError, () => builder.elu(options)); +}, '[elu] Throw if options.alpha <= 0 when building an activation'); + +promise_test(async t => { + const options = {alpha: Infinity}; + assert_throws_js(TypeError, () => builder.elu(options)); +}, '[elu] Throw if options.alpha is Infinity when building an activation');
diff --git a/third_party/blink/web_tests/external/wpt/webnn/validation_tests/hardSigmoid.https.any.js b/third_party/blink/web_tests/external/wpt/webnn/validation_tests/hardSigmoid.https.any.js index 01b24db..2c55d0e 100644 --- a/third_party/blink/web_tests/external/wpt/webnn/validation_tests/hardSigmoid.https.any.js +++ b/third_party/blink/web_tests/external/wpt/webnn/validation_tests/hardSigmoid.https.any.js
@@ -5,3 +5,31 @@ 'use strict'; validateInputFromAnotherBuilder('hardSigmoid'); + +validateUnaryOperation( + 'hardSigmoid', floatingPointTypes, /*alsoBuildActivation=*/ true); + +promise_test(async t => { + const options = {alpha: 0.5, beta: 1.0}; + const input = + builder.input('input', {dataType: 'float16', dimensions: [1, 2, 3]}); + const output = builder.hardSigmoid(input, options); + assert_equals(output.dataType(), 'float16'); + assert_array_equals(output.shape(), [1, 2, 3]); +}, '[hardSigmoid] Test building an operator with options'); + +promise_test(async t => { + const options = {alpha: 0.2}; + builder.hardSigmoid(options); +}, '[hardSigmoid] Test building an activation with options'); + +promise_test(async t => { + const options = {beta: NaN}; + const input = builder.input('input', {dataType: 'float32', dimensions: []}); + assert_throws_js(TypeError, () => builder.hardSigmoid(input, options)); +}, '[hardSigmoid] Throw if options.beta is NaN when building an operator'); + +promise_test(async t => { + const options = {alpha: Infinity}; + assert_throws_js(TypeError, () => builder.hardSigmoid(options)); +}, '[hardSigmoid] Throw if options.alpha is Infinity when building an activation');
diff --git a/third_party/blink/web_tests/external/wpt/webnn/validation_tests/layerNormalization.https.any.js b/third_party/blink/web_tests/external/wpt/webnn/validation_tests/layerNormalization.https.any.js index e9e9141..63f9c0d 100644 --- a/third_party/blink/web_tests/external/wpt/webnn/validation_tests/layerNormalization.https.any.js +++ b/third_party/blink/web_tests/external/wpt/webnn/validation_tests/layerNormalization.https.any.js
@@ -9,8 +9,6 @@ dimensions: [2, 2] }; -validateOptionsAxes('layerNormalization', 4); - validateInputFromAnotherBuilder('layerNormalization'); multi_builder_test(async (t, builder, otherBuilder) => { @@ -30,3 +28,181 @@ const input = builder.input('input', kExampleInputDescriptor); assert_throws_js(TypeError, () => builder.layerNormalization(input, options)); }, '[layerNormalization] throw if bias option is from another builder'); + +const tests = [ + { + name: '[layerNormalization] Test with default options for scalar input.', + input: {dataType: 'float32', dimensions: []}, + output: {dataType: 'float32', dimensions: []}, + }, + { + name: '[layerNormalization] Test when the input data type is float16.', + input: {dataType: 'float16', dimensions: []}, + output: {dataType: 'float16', dimensions: []}, + }, + { + name: '[layerNormalization] Test with given axes.', + input: {dataType: 'float32', dimensions: [1, 2, 3, 4]}, + options: { + axes: [3], + }, + output: {dataType: 'float32', dimensions: [1, 2, 3, 4]}, + }, + { + name: '[layerNormalization] Test with given scale.', + input: {dataType: 'float32', dimensions: [1, 2, 3, 4]}, + options: { + scale: {dataType: 'float32', dimensions: [2, 3, 4]}, + }, + output: {dataType: 'float32', dimensions: [1, 2, 3, 4]}, + }, + { + name: '[layerNormalization] Test with a non-default epsilon value.', + input: {dataType: 'float32', dimensions: [1, 2, 3, 4]}, + options: { + epsilon: 1e-4, // default epsilon=1e-5 + }, + output: {dataType: 'float32', dimensions: [1, 2, 3, 4]}, + }, + { + name: '[layerNormalization] Test with given axes, scale and bias.', + input: {dataType: 'float32', dimensions: [1, 2, 3, 4]}, + options: { + scale: {dataType: 'float32', dimensions: [3, 4]}, + bias: {dataType: 'float32', dimensions: [3, 4]}, + axes: [2, 3], + }, + output: {dataType: 'float32', dimensions: [1, 2, 3, 4]}, + }, + { + name: '[layerNormalization] Test with nonconsecutive axes.', + input: {dataType: 'float32', dimensions: [1, 2, 3, 4, 5, 6]}, + options: { + scale: {dataType: 'float32', dimensions: [2, 4, 6]}, + bias: {dataType: 'float32', dimensions: [2, 4, 6]}, + axes: [1, 3, 5], + }, + output: {dataType: 'float32', dimensions: [1, 2, 3, 4, 5, 6]}, + }, + { + name: '[layerNormalization] Test with axes in descending order.', + input: {dataType: 'float32', dimensions: [1, 2, 3, 4, 5, 6]}, + options: { + scale: {dataType: 'float32', dimensions: [6, 5, 4, 3, 2]}, + bias: {dataType: 'float32', dimensions: [6, 5, 4, 3, 2]}, + axes: [5, 4, 3, 2, 1] + }, + output: {dataType: 'float32', dimensions: [1, 2, 3, 4, 5, 6]}, + }, + { + name: + '[layerNormalization] Throw if the input data type is not one of the floating point types.', + input: {dataType: 'uint32', dimensions: [1, 2, 3, 4]}, + }, + { + name: + '[layerNormalization] Throw if the axis is greater than the input rank.', + input: {dataType: 'float32', dimensions: [1, 2, 3, 4]}, + options: { + axes: [1, 2, 4], + }, + }, + { + name: '[layerNormalization] Throw if the axes have duplications.', + input: {dataType: 'float32', dimensions: [1, 2, 3, 4]}, + options: {axes: [3, 3]}, + }, + { + name: + '[layerNormalization] Throw if the bias data type doesn\'t match input data type', + input: {dataType: 'float32', dimensions: [1, 2, 3, 4]}, + options: { + scale: {dataType: 'float32', dimensions: [3, 4]}, + bias: {dataType: 'float16', dimensions: [3, 4]}, + axes: [2, 3], + }, + }, + { + name: + '[layerNormalization] Throw if the scale data type doesn\'t match input data type', + input: {dataType: 'float32', dimensions: [1, 2, 3, 4]}, + options: { + scale: {dataType: 'float16', dimensions: [3, 4]}, + bias: {dataType: 'float32', dimensions: [3, 4]}, + axes: [2, 3], + }, + }, + { + name: + '[layerNormalization] Throw if the bias dimensions doesn\'t match axis dimensions.', + input: {dataType: 'float32', dimensions: [1, 2, 3, 4]}, + options: { + bias: { + dataType: 'float32', + dimensions: [3, 3, 4] + }, // for 4D input, default axes = [1,2,3] + }, + }, + { + name: + '[layerNormalization] Throw if the scale dimensions doesn\'t match axis dimensions.', + input: {dataType: 'float32', dimensions: [1, 2, 3, 4]}, + options: { + scale: { + dataType: 'float32', + dimensions: [3, 3, 4] + }, // for 4D input, default axes = [1,2,3] + }, + }, + { + name: + '[layerNormalization] Throw if the bias rank doesn\'t match axis rank.', + input: {dataType: 'float32', dimensions: [1, 2, 3, 4]}, + options: { + bias: { + dataType: 'float32', + dimensions: [1, 2, 3, 4] + }, // for 4D input, default axes = [1,2,3] + }, + }, + { + name: + '[layerNormalization] Throw if the scale rank doesn\'t match axis rank.', + input: {dataType: 'float32', dimensions: [1, 2, 3, 4]}, + options: { + scale: { + dataType: 'float32', + dimensions: [1, 2, 3, 4] + }, // for 4D input, default axes = [1,2,3] + }, + }, +]; + +tests.forEach( + test => promise_test(async t => { + const input = builder.input( + 'input', + {dataType: test.input.dataType, dimensions: test.input.dimensions}); + + if (test.options && test.options.bias) { + test.options.bias = builder.input('bias', { + dataType: test.options.bias.dataType, + dimensions: test.options.bias.dimensions + }); + } + if (test.options && test.options.scale) { + test.options.scale = builder.input('scale', { + dataType: test.options.scale.dataType, + dimensions: test.options.scale.dimensions + }); + } + + if (test.output) { + const output = builder.layerNormalization(input, test.options); + assert_equals(output.dataType(), test.output.dataType); + assert_array_equals(output.shape(), test.output.dimensions); + } else { + assert_throws_js( + TypeError, () => builder.layerNormalization(input, test.options)); + } + }, test.name));
diff --git a/third_party/blink/web_tests/external/wpt/webnn/validation_tests/leakyRelu.https.any.js b/third_party/blink/web_tests/external/wpt/webnn/validation_tests/leakyRelu.https.any.js index 6fc19b1..f250b0ed 100644 --- a/third_party/blink/web_tests/external/wpt/webnn/validation_tests/leakyRelu.https.any.js +++ b/third_party/blink/web_tests/external/wpt/webnn/validation_tests/leakyRelu.https.any.js
@@ -5,3 +5,31 @@ 'use strict'; validateInputFromAnotherBuilder('leakyRelu'); + +validateUnaryOperation( + 'leakyRelu', floatingPointTypes, /*alsoBuildActivation=*/ true); + +promise_test(async t => { + const options = {alpha: 0.02}; + const input = + builder.input('input', {dataType: 'float32', dimensions: [1, 2, 3]}); + const output = builder.leakyRelu(input, options); + assert_equals(output.dataType(), 'float32'); + assert_array_equals(output.shape(), [1, 2, 3]); +}, '[leakyRelu] Test building an operator with options'); + +promise_test(async t => { + const options = {alpha: 0.03}; + builder.leakyRelu(options); +}, '[leakyRelu] Test building an activation with options'); + +promise_test(async t => { + const options = {alpha: Infinity}; + const input = builder.input('input', {dataType: 'float16', dimensions: []}); + assert_throws_js(TypeError, () => builder.leakyRelu(input, options)); +}, '[leakyRelu] Throw if options.alpha is Infinity when building an operator'); + +promise_test(async t => { + const options = {alpha: -NaN}; + assert_throws_js(TypeError, () => builder.leakyRelu(options)); +}, '[leakyRelu] Throw if options.alpha is -NaN when building an activation');
diff --git a/third_party/blink/web_tests/external/wpt/webnn/validation_tests/linear.https.any.js b/third_party/blink/web_tests/external/wpt/webnn/validation_tests/linear.https.any.js index 99c1daa..6ec0389f 100644 --- a/third_party/blink/web_tests/external/wpt/webnn/validation_tests/linear.https.any.js +++ b/third_party/blink/web_tests/external/wpt/webnn/validation_tests/linear.https.any.js
@@ -5,3 +5,31 @@ 'use strict'; validateInputFromAnotherBuilder('linear'); + +validateUnaryOperation( + 'linear', floatingPointTypes, /*alsoBuildActivation=*/ true); + +promise_test(async t => { + const options = {alpha: 1.5, beta: 0.3}; + const input = + builder.input('input', {dataType: 'float32', dimensions: [1, 2, 3]}); + const output = builder.linear(input, options); + assert_equals(output.dataType(), 'float32'); + assert_array_equals(output.shape(), [1, 2, 3]); +}, '[linear] Test building an operator with options'); + +promise_test(async t => { + const options = {beta: 1.5}; + builder.linear(options); +}, '[linear] Test building an activation with options'); + +promise_test(async t => { + const options = {beta: -Infinity}; + const input = builder.input('input', {dataType: 'float16', dimensions: []}); + assert_throws_js(TypeError, () => builder.linear(input, options)); +}, '[linear] Throw if options.beta is -Infinity when building an operator'); + +promise_test(async t => { + const options = {alpha: NaN}; + assert_throws_js(TypeError, () => builder.linear(options)); +}, '[linear] Throw if options.alpha is NaN when building an activation');
diff --git a/third_party/blink/web_tests/external/wpt/webnn/validation_tests/softplus.https.any.js b/third_party/blink/web_tests/external/wpt/webnn/validation_tests/softplus.https.any.js index 347dfcd9..c13ea82 100644 --- a/third_party/blink/web_tests/external/wpt/webnn/validation_tests/softplus.https.any.js +++ b/third_party/blink/web_tests/external/wpt/webnn/validation_tests/softplus.https.any.js
@@ -5,3 +5,36 @@ 'use strict'; validateInputFromAnotherBuilder('softplus'); + +validateUnaryOperation( + 'softplus', floatingPointTypes, /*alsoBuildActivation=*/ true); + +promise_test(async t => { + const options = {steepness: 1.3}; + const input = + builder.input('input', {dataType: 'float32', dimensions: [1, 2, 3]}); + const output = builder.softplus(input, options); + assert_equals(output.dataType(), 'float32'); + assert_array_equals(output.shape(), [1, 2, 3]); +}, '[softplus] Test building an operator with options'); + +promise_test(async t => { + const options = {steepness: 1.2}; + builder.softplus(options); +}, '[softplus] Test building an activation with options.steepness == 1.2'); + +promise_test(async t => { + const options = {steepness: 0}; + builder.softplus(options); +}, '[softplus] Test building an activation with options.steepness == 0'); + +promise_test(async t => { + const options = {steepness: Infinity}; + const input = builder.input('input', {dataType: 'float16', dimensions: []}); + assert_throws_js(TypeError, () => builder.softplus(input, options)); +}, '[softplus] Throw if options.steepness is Infinity when building an operator'); + +promise_test(async t => { + const options = {steepness: NaN}; + assert_throws_js(TypeError, () => builder.softplus(options)); +}, '[softplus] Throw if options.steepness is NaN when building an activation');
diff --git a/third_party/blink/web_tests/http/tests/devtools/tracing/timeline-xhr-event-expected.txt b/third_party/blink/web_tests/http/tests/devtools/tracing/timeline-xhr-event-expected.txt deleted file mode 100644 index 8e0e590..0000000 --- a/third_party/blink/web_tests/http/tests/devtools/tracing/timeline-xhr-event-expected.txt +++ /dev/null
@@ -1,69 +0,0 @@ -Tests the Timeline events for XMLHttpReqeust - -XHRReadyStateChange Properties: -{ - data : { - frame : <string> - readyState : 1 - stackTrace : <object> - url : .../devtools/tracing/network/resources/resource.php - } - endTime : <number> - frameId : <string> - stackTrace : <object> - startTime : <number> - type : "XHRReadyStateChange" -} -Text details for XHRReadyStateChange: resource.php -XHRReadyStateChange Properties: -{ - data : { - frame : <string> - readyState : 2 - url : .../devtools/tracing/network/resources/resource.php - } - endTime : <number> - frameId : <string> - startTime : <number> - type : "XHRReadyStateChange" -} -Text details for XHRReadyStateChange: resource.php -XHRReadyStateChange Properties: -{ - data : { - frame : <string> - readyState : 3 - url : .../devtools/tracing/network/resources/resource.php - } - endTime : <number> - frameId : <string> - startTime : <number> - type : "XHRReadyStateChange" -} -Text details for XHRReadyStateChange: resource.php -XHRReadyStateChange Properties: -{ - data : { - frame : <string> - readyState : 4 - url : .../devtools/tracing/network/resources/resource.php - } - endTime : <number> - frameId : <string> - startTime : <number> - type : "XHRReadyStateChange" -} -Text details for XHRReadyStateChange: resource.php -XHRLoad Properties: -{ - data : { - frame : <string> - url : .../devtools/tracing/network/resources/resource.php - } - endTime : <number> - frameId : <string> - startTime : <number> - type : "XHRLoad" -} -Text details for XHRLoad: resource.php -
diff --git a/third_party/blink/web_tests/http/tests/devtools/tracing/timeline-xhr-event.js b/third_party/blink/web_tests/http/tests/devtools/tracing/timeline-xhr-event.js deleted file mode 100644 index 4d3f4110..0000000 --- a/third_party/blink/web_tests/http/tests/devtools/tracing/timeline-xhr-event.js +++ /dev/null
@@ -1,31 +0,0 @@ -// Copyright 2017 The Chromium Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -import {TestRunner} from 'test_runner'; -import {PerformanceTestRunner} from 'performance_test_runner'; -import {NetworkTestRunner} from 'network_test_runner'; - -(async function() { - TestRunner.addResult(`Tests the Timeline events for XMLHttpReqeust\n`); - await TestRunner.showPanel('timeline'); - await TestRunner.evaluateInPagePromise(` - function performActions() - { - var callback; - var promise = new Promise((fulfill) => callback = fulfill); - var xhr = new XMLHttpRequest(); - xhr.open("GET", "network/resources/resource.php", true); - xhr.onload = callback; // This is necessary for XHRLoad event. - xhr.onreadystatechange = function () { }; // This is necessary for XHRReadyStateChange event. - xhr.send(null); - return promise; - } - `); - - await PerformanceTestRunner.invokeAsyncWithTimeline('performActions'); - - await PerformanceTestRunner.printTimelineRecordsWithDetails('XHRReadyStateChange'); - await PerformanceTestRunner.printTimelineRecordsWithDetails('XHRLoad'); - TestRunner.completeTest(); -})();
diff --git a/third_party/blink/web_tests/http/tests/devtools/tracing/timeline-xhr-response-type-blob-event-expected.txt b/third_party/blink/web_tests/http/tests/devtools/tracing/timeline-xhr-response-type-blob-event-expected.txt deleted file mode 100644 index 6188c5c..0000000 --- a/third_party/blink/web_tests/http/tests/devtools/tracing/timeline-xhr-response-type-blob-event-expected.txt +++ /dev/null
@@ -1,64 +0,0 @@ -Tests the Timeline events for XMLHttpReqeust with responseType="blob" - -XHRReadyStateChange Properties: -{ - data : { - frame : <string> - readyState : 1 - stackTrace : <object> - url : .../devtools/tracing/network/resources/resource.php - } - endTime : <number> - frameId : <string> - stackTrace : <object> - startTime : <number> - type : "XHRReadyStateChange" -} -XHRReadyStateChange Properties: -{ - data : { - frame : <string> - readyState : 2 - url : .../devtools/tracing/network/resources/resource.php - } - endTime : <number> - frameId : <string> - startTime : <number> - type : "XHRReadyStateChange" -} -XHRReadyStateChange Properties: -{ - data : { - frame : <string> - readyState : 3 - url : .../devtools/tracing/network/resources/resource.php - } - endTime : <number> - frameId : <string> - startTime : <number> - type : "XHRReadyStateChange" -} -XHRReadyStateChange Properties: -{ - data : { - frame : <string> - readyState : 4 - url : .../devtools/tracing/network/resources/resource.php - } - endTime : <number> - frameId : <string> - startTime : <number> - type : "XHRReadyStateChange" -} -XHRLoad Properties: -{ - data : { - frame : <string> - url : .../devtools/tracing/network/resources/resource.php - } - endTime : <number> - frameId : <string> - startTime : <number> - type : "XHRLoad" -} -
diff --git a/third_party/blink/web_tests/http/tests/devtools/tracing/timeline-xhr-response-type-blob-event.js b/third_party/blink/web_tests/http/tests/devtools/tracing/timeline-xhr-response-type-blob-event.js deleted file mode 100644 index eca4d823..0000000 --- a/third_party/blink/web_tests/http/tests/devtools/tracing/timeline-xhr-response-type-blob-event.js +++ /dev/null
@@ -1,38 +0,0 @@ -// Copyright 2017 The Chromium Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -import {TestRunner} from 'test_runner'; -import {PerformanceTestRunner} from 'performance_test_runner'; -import {NetworkTestRunner} from 'network_test_runner'; - -(async function() { - TestRunner.addResult(`Tests the Timeline events for XMLHttpReqeust with responseType="blob"\n`); - await TestRunner.showPanel('timeline'); - await TestRunner.evaluateInPagePromise(` - function performActions() - { - var callback; - var promise = new Promise((fulfill) => callback = fulfill); - var xhr = new XMLHttpRequest(); - xhr.responseType = "blob"; - xhr.open("GET", "network/resources/resource.php", true); - xhr.onload = function() { }; // This is necessary for XHRLoad event. - // assigning callback to onload doesn't work here due to exception in responseXML handling for blob response type. - xhr.onreadystatechange = done; - function done() - { - if (xhr.readyState === 4) - callback(); - } - xhr.send(null); - return promise; - } - `); - - await PerformanceTestRunner.invokeAsyncWithTimeline('performActions'); - - PerformanceTestRunner.printTimelineRecords('XHRReadyStateChange'); - PerformanceTestRunner.printTimelineRecords('XHRLoad'); - TestRunner.completeTest(); -})();
diff --git a/third_party/blink/web_tests/http/tests/inspector-protocol/side-effects/evaluate-embedder-side-effect-free-methods-expected.txt b/third_party/blink/web_tests/http/tests/inspector-protocol/side-effects/evaluate-embedder-side-effect-free-methods-expected.txt index 6695740..18cf94d 100644 --- a/third_party/blink/web_tests/http/tests/inspector-protocol/side-effects/evaluate-embedder-side-effect-free-methods-expected.txt +++ b/third_party/blink/web_tests/http/tests/inspector-protocol/side-effects/evaluate-embedder-side-effect-free-methods-expected.txt
@@ -2,29 +2,29 @@ Expression `document.querySelector('div').x = "foo"` has side effect: true, expected: true Expression `$('div')` -has side effect: true, expected: true +has side effect: false, expected: false Expression `$$('div')` -has side effect: true, expected: true +has side effect: false, expected: false Expression `$x('//div')` -has side effect: true, expected: true +has side effect: false, expected: false Expression `getEventListeners(document)` -has side effect: true, expected: true +has side effect: false, expected: false Expression `$.toString()` -has side effect: true, expected: true +has side effect: false, expected: false Expression `$$.toString()` -has side effect: true, expected: true +has side effect: false, expected: false Expression `$x.toString()` -has side effect: true, expected: true +has side effect: false, expected: false Expression `getEventListeners.toString()` -has side effect: true, expected: true +has side effect: false, expected: false Expression `monitorEvents()` has side effect: true, expected: true Expression `unmonitorEvents()` has side effect: true, expected: true Expression `monitorEvents.toString()` -has side effect: true, expected: true +has side effect: false, expected: false Expression `unmonitorEvents.toString()` -has side effect: true, expected: true +has side effect: false, expected: false Expression `document.getElementsByTagName('div')` has side effect: false, expected: false Expression `document.getElementsByTagNameNS(namespace, 'div')`
diff --git a/third_party/blink/web_tests/http/tests/inspector-protocol/side-effects/evaluate-embedder-side-effect-free-methods.js b/third_party/blink/web_tests/http/tests/inspector-protocol/side-effects/evaluate-embedder-side-effect-free-methods.js index cd911446..450c775 100644 --- a/third_party/blink/web_tests/http/tests/inspector-protocol/side-effects/evaluate-embedder-side-effect-free-methods.js +++ b/third_party/blink/web_tests/http/tests/inspector-protocol/side-effects/evaluate-embedder-side-effect-free-methods.js
@@ -37,20 +37,20 @@ await checkHasSideEffect(`document.querySelector('div').x = "foo"`); // Command Line API - await checkHasSideEffect(`$('div')`); - await checkHasSideEffect(`$$('div')`); - await checkHasSideEffect(`$x('//div')`); - await checkHasSideEffect(`getEventListeners(document)`); - await checkHasSideEffect(`$.toString()`); - await checkHasSideEffect(`$$.toString()`); - await checkHasSideEffect(`$x.toString()`); - await checkHasSideEffect(`getEventListeners.toString()`); + await checkHasNoSideEffect(`$('div')`); + await checkHasNoSideEffect(`$$('div')`); + await checkHasNoSideEffect(`$x('//div')`); + await checkHasNoSideEffect(`getEventListeners(document)`); + await checkHasNoSideEffect(`$.toString()`); + await checkHasNoSideEffect(`$$.toString()`); + await checkHasNoSideEffect(`$x.toString()`); + await checkHasNoSideEffect(`getEventListeners.toString()`); // Unsafe Command Line API await checkHasSideEffect(`monitorEvents()`); await checkHasSideEffect(`unmonitorEvents()`); - await checkHasSideEffect(`monitorEvents.toString()`); - await checkHasSideEffect(`unmonitorEvents.toString()`); + await checkHasNoSideEffect(`monitorEvents.toString()`); + await checkHasNoSideEffect(`unmonitorEvents.toString()`); // Document await checkHasNoSideEffect(`document.getElementsByTagName('div')`);
diff --git a/third_party/blink/web_tests/http/tests/inspector-protocol/tracing/xhr-requests-expected.txt b/third_party/blink/web_tests/http/tests/inspector-protocol/tracing/xhr-requests-expected.txt new file mode 100644 index 0000000..ce63528 --- /dev/null +++ b/third_party/blink/web_tests/http/tests/inspector-protocol/tracing/xhr-requests-expected.txt
@@ -0,0 +1,46 @@ +Tests the data of Network request lifecycle trace events +Testing XHR request with responseType of 'text' +Recording started +Tracing complete +Found 4 XHRReadyStateChange events: +Event 1: +=> readyState: 1 +=> url: http://127.0.0.1:8000/inspector-protocol/resources/blank.js + +Event 2: +=> readyState: 2 +=> url: http://127.0.0.1:8000/inspector-protocol/resources/blank.js + +Event 3: +=> readyState: 3 +=> url: http://127.0.0.1:8000/inspector-protocol/resources/blank.js + +Event 4: +=> readyState: 4 +=> url: http://127.0.0.1:8000/inspector-protocol/resources/blank.js + +XHRLoad event URL: http://127.0.0.1:8000/inspector-protocol/resources/blank.js + + +Testing XHR request with responseType of 'blob' +Recording started +Tracing complete +Found 4 XHRReadyStateChange events: +Event 1: +=> readyState: 1 +=> url: http://127.0.0.1:8000/inspector-protocol/resources/blank.js + +Event 2: +=> readyState: 2 +=> url: http://127.0.0.1:8000/inspector-protocol/resources/blank.js + +Event 3: +=> readyState: 3 +=> url: http://127.0.0.1:8000/inspector-protocol/resources/blank.js + +Event 4: +=> readyState: 4 +=> url: http://127.0.0.1:8000/inspector-protocol/resources/blank.js + +XHRLoad event URL: http://127.0.0.1:8000/inspector-protocol/resources/blank.js +
diff --git a/third_party/blink/web_tests/http/tests/inspector-protocol/tracing/xhr-requests.js b/third_party/blink/web_tests/http/tests/inspector-protocol/tracing/xhr-requests.js new file mode 100644 index 0000000..1487678 --- /dev/null +++ b/third_party/blink/web_tests/http/tests/inspector-protocol/tracing/xhr-requests.js
@@ -0,0 +1,73 @@ +(async function(/** @type {import('test_runner').TestRunner} */ testRunner) { + const {session, dp} = await testRunner.startBlank( + 'Tests the data of Network request lifecycle trace events'); + + const TracingHelper = + await testRunner.loadScript('../resources/tracing-test.js'); + const tracingHelper = new TracingHelper(testRunner, session); + + await dp.Page.enable(); + await dp.Network.enable(); + + dp.Page.navigate( + {url: 'http://127.0.0.1:8000/inspector-protocol/resources/basic.html'}); + + testRunner.log('Testing XHR request with responseType of \'text\''); + + function logResultOutput(events) { + const stateChangeEvents = + events.filter(event => event.name === 'XHRReadyStateChange'); + + testRunner.log( + `Found ${stateChangeEvents.length} XHRReadyStateChange events:`); + stateChangeEvents.forEach((event, index) => { + testRunner.log(`Event ${index + 1}:`); + testRunner.log(`=> readyState: ${event.args.data.readyState}`); + testRunner.log(`=> url: ${event.args.data.url}\n`); + }) + const loadEvent = events.find(event => event.name === 'XHRLoad'); + if (!loadEvent) { + testRunner.log('ERROR: did not find XHRLoad event.'); + } + testRunner.log(`XHRLoad event URL: ${loadEvent.args.data.url}`); + } + + await tracingHelper.invokeAsyncWithTracing(function() { + let callback; + let promise = new Promise((fulfill) => callback = fulfill); + let xhr = new XMLHttpRequest(); + xhr.open('GET', 'blank.js', true); + xhr.onload = callback; // This is necessary for XHRLoad event. + xhr.onreadystatechange = function() {}; // This is necessary for XHRReadyStateChange event. + xhr.send(null); + return promise; + }); + const xhrTimelineEvents = tracingHelper.filterEvents((event) => { + return event.name.startsWith('XHR'); + }); + logResultOutput(xhrTimelineEvents); + + testRunner.log('\n\nTesting XHR request with responseType of \'blob\''); + await tracingHelper.invokeAsyncWithTracing(function() { + let callback; + let promise = new Promise((fulfill) => callback = fulfill); + let xhr = new XMLHttpRequest(); + xhr.responseType = 'blob'; + xhr.open('GET', 'blank.js', true); + xhr.onload = function() {}; // This is necessary for XHRLoad event. + xhr.onreadystatechange = done; + function done() { + if (xhr.readyState === 4) { + callback(); + } + } + xhr.send(null); + return promise; + }); + const xhrBlobTimelineEvents = tracingHelper.filterEvents((event) => { + return event.name.startsWith('XHR'); + }); + logResultOutput(xhrBlobTimelineEvents); + + testRunner.completeTest(); +});
diff --git a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-without-gpu/external/wpt/webnn/conformance_tests/gpu/elu.https.any-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-without-gpu/external/wpt/webnn/conformance_tests/gpu/elu.https.any-expected.txt index a9e9599d..b33c42e 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-without-gpu/external/wpt/webnn/conformance_tests/gpu/elu.https.any-expected.txt +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-without-gpu/external/wpt/webnn/conformance_tests/gpu/elu.https.any-expected.txt
@@ -2,6 +2,6 @@ [FAIL] elu float32 4D tensor positive options.alpha promise_test: Unhandled rejection with value: object "NotSupportedError: Failed to execute 'build' on 'MLGraphBuilder': Setting a custom alpha is not supported in tflite schema." [FAIL] elu float32 4D tensor negative options.alpha - promise_test: Unhandled rejection with value: object "DataError: Failed to execute 'elu' on 'MLGraphBuilder': The value of alpha must be greater than 0." + promise_test: Unhandled rejection with value: object "TypeError: 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/linux/virtual/webnn-service-without-gpu/external/wpt/webnn/conformance_tests/gpu/elu.https.any.worker-expected.txt b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-without-gpu/external/wpt/webnn/conformance_tests/gpu/elu.https.any.worker-expected.txt index a9e9599d..b33c42e 100644 --- a/third_party/blink/web_tests/platform/linux/virtual/webnn-service-without-gpu/external/wpt/webnn/conformance_tests/gpu/elu.https.any.worker-expected.txt +++ b/third_party/blink/web_tests/platform/linux/virtual/webnn-service-without-gpu/external/wpt/webnn/conformance_tests/gpu/elu.https.any.worker-expected.txt
@@ -2,6 +2,6 @@ [FAIL] elu float32 4D tensor positive options.alpha promise_test: Unhandled rejection with value: object "NotSupportedError: Failed to execute 'build' on 'MLGraphBuilder': Setting a custom alpha is not supported in tflite schema." [FAIL] elu float32 4D tensor negative options.alpha - promise_test: Unhandled rejection with value: object "DataError: Failed to execute 'elu' on 'MLGraphBuilder': The value of alpha must be greater than 0." + promise_test: Unhandled rejection with value: object "TypeError: 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/mac/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gpu/elu.https.any-expected.txt b/third_party/blink/web_tests/platform/mac/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gpu/elu.https.any-expected.txt index 1b174a97..5593df3 100644 --- a/third_party/blink/web_tests/platform/mac/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gpu/elu.https.any-expected.txt +++ b/third_party/blink/web_tests/platform/mac/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gpu/elu.https.any-expected.txt
@@ -14,6 +14,6 @@ [FAIL] elu float32 4D tensor positive options.alpha promise_test: Unhandled rejection with value: object "NotSupportedError: Failed to execute 'build' on 'MLGraphBuilder': This operator is not implemented." [FAIL] elu float32 4D tensor negative options.alpha - promise_test: Unhandled rejection with value: object "DataError: Failed to execute 'elu' on 'MLGraphBuilder': The value of alpha must be greater than 0." + promise_test: Unhandled rejection with value: object "TypeError: 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/mac/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gpu/elu.https.any.worker-expected.txt b/third_party/blink/web_tests/platform/mac/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gpu/elu.https.any.worker-expected.txt index 1b174a97..5593df3 100644 --- a/third_party/blink/web_tests/platform/mac/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gpu/elu.https.any.worker-expected.txt +++ b/third_party/blink/web_tests/platform/mac/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gpu/elu.https.any.worker-expected.txt
@@ -14,6 +14,6 @@ [FAIL] elu float32 4D tensor positive options.alpha promise_test: Unhandled rejection with value: object "NotSupportedError: Failed to execute 'build' on 'MLGraphBuilder': This operator is not implemented." [FAIL] elu float32 4D tensor negative options.alpha - promise_test: Unhandled rejection with value: object "DataError: Failed to execute 'elu' on 'MLGraphBuilder': The value of alpha must be greater than 0." + promise_test: Unhandled rejection with value: object "TypeError: 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/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gpu/elu.https.any-expected.txt b/third_party/blink/web_tests/platform/win/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gpu/elu.https.any-expected.txt similarity index 77% rename from third_party/blink/web_tests/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gpu/elu.https.any-expected.txt rename to third_party/blink/web_tests/platform/win/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gpu/elu.https.any-expected.txt index 4e44422b..3e47719 100644 --- a/third_party/blink/web_tests/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gpu/elu.https.any-expected.txt +++ b/third_party/blink/web_tests/platform/win/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gpu/elu.https.any-expected.txt
@@ -1,5 +1,5 @@ This is a testharness.js-based test. [FAIL] elu float32 4D tensor negative options.alpha - promise_test: Unhandled rejection with value: object "DataError: Failed to execute 'elu' on 'MLGraphBuilder': The value of alpha must be greater than 0." + promise_test: Unhandled rejection with value: object "TypeError: 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/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gpu/elu.https.any-expected.txt b/third_party/blink/web_tests/platform/win/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gpu/elu.https.any.worker-expected.txt similarity index 77% copy from third_party/blink/web_tests/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gpu/elu.https.any-expected.txt copy to third_party/blink/web_tests/platform/win/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gpu/elu.https.any.worker-expected.txt index 4e44422b..3e47719 100644 --- a/third_party/blink/web_tests/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gpu/elu.https.any-expected.txt +++ b/third_party/blink/web_tests/platform/win/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gpu/elu.https.any.worker-expected.txt
@@ -1,5 +1,5 @@ This is a testharness.js-based test. [FAIL] elu float32 4D tensor negative options.alpha - promise_test: Unhandled rejection with value: object "DataError: Failed to execute 'elu' on 'MLGraphBuilder': The value of alpha must be greater than 0." + promise_test: Unhandled rejection with value: object "TypeError: 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/win11-arm64/external/wpt/webnn/conformance_tests/elu.https.any-expected.txt b/third_party/blink/web_tests/platform/win11-arm64/external/wpt/webnn/conformance_tests/elu.https.any-expected.txt deleted file mode 100644 index 5b37deb..0000000 --- a/third_party/blink/web_tests/platform/win11-arm64/external/wpt/webnn/conformance_tests/elu.https.any-expected.txt +++ /dev/null
@@ -1,4 +0,0 @@ -This is a testharness.js-based test. -All subtests passed and are omitted for brevity. -See https://chromium.googlesource.com/chromium/src/+/HEAD/docs/testing/writing_web_tests.md#Text-Test-Baselines for details. -Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/platform/win11-arm64/external/wpt/webnn/conformance_tests/elu.https.any.worker-expected.txt b/third_party/blink/web_tests/platform/win11-arm64/external/wpt/webnn/conformance_tests/elu.https.any.worker-expected.txt deleted file mode 100644 index 5b37deb..0000000 --- a/third_party/blink/web_tests/platform/win11-arm64/external/wpt/webnn/conformance_tests/elu.https.any.worker-expected.txt +++ /dev/null
@@ -1,4 +0,0 @@ -This is a testharness.js-based test. -All subtests passed and are omitted for brevity. -See https://chromium.googlesource.com/chromium/src/+/HEAD/docs/testing/writing_web_tests.md#Text-Test-Baselines for details. -Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gpu/elu.https.any.worker-expected.txt b/third_party/blink/web_tests/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gpu/elu.https.any.worker-expected.txt deleted file mode 100644 index 4e44422b..0000000 --- a/third_party/blink/web_tests/virtual/webnn-service-with-gpu/external/wpt/webnn/conformance_tests/gpu/elu.https.any.worker-expected.txt +++ /dev/null
@@ -1,5 +0,0 @@ -This is a testharness.js-based test. -[FAIL] elu float32 4D tensor negative options.alpha - 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/chromium-variations b/third_party/chromium-variations index 29da917..e4c2c64 160000 --- a/third_party/chromium-variations +++ b/third_party/chromium-variations
@@ -1 +1 @@ -Subproject commit 29da917904fd9c60196538dc50fdb21768654121 +Subproject commit e4c2c64dda26b4673256949aaa6d8baed86f8af4
diff --git a/third_party/cros-components/src b/third_party/cros-components/src index ba15742..3d5fbf6 160000 --- a/third_party/cros-components/src +++ b/third_party/cros-components/src
@@ -1 +1 @@ -Subproject commit ba1574281c8c012e17d8adbc7758efa60eea00ed +Subproject commit 3d5fbf62d7c7d34b1ecf72dd09577117ed370343
diff --git a/third_party/devtools-frontend-internal b/third_party/devtools-frontend-internal index cadbad6..fac0637 160000 --- a/third_party/devtools-frontend-internal +++ b/third_party/devtools-frontend-internal
@@ -1 +1 @@ -Subproject commit cadbad6bc7fe48b083e0d25eb6feb06fa7a02d89 +Subproject commit fac063701741add8c5af364fb8cfbbf13e5bdc98
diff --git a/third_party/devtools-frontend/src b/third_party/devtools-frontend/src index 170f1b6..3586c71 160000 --- a/third_party/devtools-frontend/src +++ b/third_party/devtools-frontend/src
@@ -1 +1 @@ -Subproject commit 170f1b62ff2ddac12ee66724127335585acc8ece +Subproject commit 3586c7113a54ede17dc840ba4213a90823e56756
diff --git a/third_party/skia b/third_party/skia index 975859a..22d1130 160000 --- a/third_party/skia +++ b/third_party/skia
@@ -1 +1 @@ -Subproject commit 975859a96f8f30af6047007dea3fda08cc730052 +Subproject commit 22d1130a2ba22beb7156d5578f1a9942d1e88bcb
diff --git a/third_party/vulkan-deps b/third_party/vulkan-deps index b7e3bee..36da75a 160000 --- a/third_party/vulkan-deps +++ b/third_party/vulkan-deps
@@ -1 +1 @@ -Subproject commit b7e3beee69a50c823ab1ab646579e3111fc9a36d +Subproject commit 36da75a01950ce86a9525f7c080359710c0ee6b4
diff --git a/third_party/webrtc b/third_party/webrtc index 2dd6cf6..cb3f740 160000 --- a/third_party/webrtc +++ b/third_party/webrtc
@@ -1 +1 @@ -Subproject commit 2dd6cf61fdcca1b6f7f660f4bc43296bab6fa702 +Subproject commit cb3f740525bca608b44fb2a5af2e8ee0190a789c
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml index 661f345..756b5e4 100644 --- a/tools/metrics/histograms/enums.xml +++ b/tools/metrics/histograms/enums.xml
@@ -4948,6 +4948,7 @@ <int value="56" label="Google Maps"/> <int value="57" label="Google Messages"/> <int value="58" label="Container"/> + <int value="59" label="Mall"/> </enum> <enum name="DefaultBrowserInfoBarUserInteraction">
diff --git a/tools/metrics/histograms/metadata/arc/enums.xml b/tools/metrics/histograms/metadata/arc/enums.xml index fe11102..8adf7a5 100644 --- a/tools/metrics/histograms/metadata/arc/enums.xml +++ b/tools/metrics/histograms/metadata/arc/enums.xml
@@ -779,6 +779,13 @@ <int value="4" label="The migration has finished"/> </enum> +<enum name="ArcWallpaperApi"> + <summary>Defines the Wallpaper APIs called from Android.</summary> + <int value="0" label="Set"/> + <int value="1" label="SetDefault"/> + <int value="2" label="Get"/> +</enum> + <enum name="BooleanIsCustomNotification"> <int value="0" label="Not Custom Notification"/> <int value="1" label="Is Custom Notification"/>
diff --git a/tools/metrics/histograms/metadata/arc/histograms.xml b/tools/metrics/histograms/metadata/arc/histograms.xml index 2edc0498..79b9ea6 100644 --- a/tools/metrics/histograms/metadata/arc/histograms.xml +++ b/tools/metrics/histograms/metadata/arc/histograms.xml
@@ -2738,6 +2738,16 @@ <token key="DeviceType" variants="DeviceType"/> </histogram> +<histogram name="Arc.WallpaperApiUsage" enum="ArcWallpaperApi" + expires_after="2024-12-31"> + <owner>hirokisato@google.com</owner> + <owner>arc-framework@google.com</owner> + <summary> + Records the number of times an API for getting / setting wallpaper from + Android is called. + </summary> +</histogram> + <histogram name="Arc.Wayland.LateTiming.Duration{WaylandEventType}" units="ms" expires_after="2024-08-16"> <owner>alanding@google.com</owner>
diff --git a/tools/metrics/histograms/metadata/histogram_suffixes_list.xml b/tools/metrics/histograms/metadata/histogram_suffixes_list.xml index 609d02d..40601b0 100644 --- a/tools/metrics/histograms/metadata/histogram_suffixes_list.xml +++ b/tools/metrics/histograms/metadata/histogram_suffixes_list.xml
@@ -2894,7 +2894,6 @@ <histogram_suffixes name="PrerenderSource" separator="_" ordering="prefix"> <suffix name="" label="All prerenders."/> - <suffix name="externalrequest" label="Externally triggered prerender."/> <suffix name="gws" label="GWS triggered prerender."/> <suffix name="navigationpredictor" label="Triggered by the NavigationPredictor."/>
diff --git a/ui/file_manager/file_manager/foreground/js/directory_model.ts b/ui/file_manager/file_manager/foreground/js/directory_model.ts index 3eae9f52..97b525f 100644 --- a/ui/file_manager/file_manager/foreground/js/directory_model.ts +++ b/ui/file_manager/file_manager/foreground/js/directory_model.ts
@@ -229,19 +229,12 @@ // initiate the actual change and will update to SUCCESS at the end. if (state.currentDirectory?.status === PropStatus.STARTED) { const fileData = getFileData(state, newURL); - if (!fileData) { - console.error( - `Failed to find in the store the new directory key ${newURL}`); - this.store_.dispatch( - changeDirectory({toKey: newURL, status: PropStatus.ERROR})); - return; - } - if (fileData.type === EntryType.MATERIALIZED_VIEW) { + if (fileData?.type === EntryType.MATERIALIZED_VIEW) { this.changeDirectoryFileData(fileData); return; } - const entry = fileData.entry; + const entry = fileData?.entry; if (!entry) { // TODO(lucmult): Fix potential race condition in this await/then. urlToEntry(newURL) @@ -254,7 +247,7 @@ this.changeDirectoryEntry(entry as DirectoryEntry); }) .catch((error) => { - console.error(error); + console.warn(error); this.store_.dispatch( changeDirectory({toKey: newURL, status: PropStatus.ERROR})); });
diff --git a/ui/ozone/platform/wayland/host/wayland_window.cc b/ui/ozone/platform/wayland/host/wayland_window.cc index 07663d8..d11fe7f 100644 --- a/ui/ozone/platform/wayland/host/wayland_window.cc +++ b/ui/ozone/platform/wayland/host/wayland_window.cc
@@ -1487,17 +1487,9 @@ auto old_state = latched_state_; latched_state_ = req.state; - // Update the geometry if the bounds are different or the window scale has - // been changed or if the insets have changed since the last latched request. - // If geometry is not updated on window scale update, the insets are set in a - // wrong way. That is, aura provides insets in pixels, which are converted by - // the device scale factor known from the display. It can be different from - // the one that the |latch_state_.window_scale| has. As a result, the geometry - // is set with wrong values as Wayland requires them to be in DIP. - // TODO(crbug.com/328011220): Investigate whether we can remove - // `window_scale` check from here. + // Update the geometry if the bounds or the insets are changed since the last + // latched request. if (req.state.bounds_dip.size() != old_state.bounds_dip.size() || - req.state.window_scale != old_state.window_scale || delegate()->CalculateInsetsInDIP(req.state.window_state) != delegate()->CalculateInsetsInDIP(old_state.window_state)) { SetWindowGeometry(req.state);
diff --git a/ui/views/controls/button/md_text_button.cc b/ui/views/controls/button/md_text_button.cc index f5d99be..d886c50 100644 --- a/ui/views/controls/button/md_text_button.cc +++ b/ui/views/controls/button/md_text_button.cc
@@ -140,9 +140,7 @@ if (corner_radius_ == radius) return; corner_radius_ = radius; - LabelButton::SetFocusRingCornerRadius(GetCornerRadiusValue()); - // UpdateColors also updates the background border radius. - UpdateColors(); + OnCornerRadiusValueChanged(); OnPropertyChanged(&corner_radius_, kPropertyEffectsNone); } @@ -151,7 +149,8 @@ } float MdTextButton::GetCornerRadiusValue() const { - return corner_radius_.value_or(0); + return corner_radius_.value_or(LayoutProvider::Get()->GetCornerRadiusMetric( + ShapeContextTokens::kButtonRadius, size())); } void MdTextButton::OnThemeChanged() { @@ -184,13 +183,8 @@ void MdTextButton::OnBoundsChanged(const gfx::Rect& previous_bounds) { LabelButton::OnBoundsChanged(previous_bounds); - // A fully rounded corner radius is calculated based on the size of the - // button. To avoid overriding a custom corner radius, make sure the default - // radius is only called once by checking if the value already exists. - if (!corner_radius_) { - SetCornerRadius(LayoutProvider::Get()->GetCornerRadiusMetric( - ShapeContextTokens::kButtonRadius, size())); - } + // A fully rounded corner radius is calculated based on the button size. + OnCornerRadiusValueChanged(); } void MdTextButton::SetEnabledTextColors(std::optional<SkColor> color) { @@ -367,6 +361,12 @@ } } +void MdTextButton::OnCornerRadiusValueChanged() { + LabelButton::SetFocusRingCornerRadius(GetCornerRadiusValue()); + // UpdateColors also updates the background border radius. + UpdateColors(); +} + std::unique_ptr<ActionViewInterface> MdTextButton::GetActionViewInterface() { return std::make_unique<MdTextButtonActionViewInterface>(this); }
diff --git a/ui/views/controls/button/md_text_button.h b/ui/views/controls/button/md_text_button.h index 4f29fa6..ce1c68ac 100644 --- a/ui/views/controls/button/md_text_button.h +++ b/ui/views/controls/button/md_text_button.h
@@ -56,7 +56,8 @@ void SetBgColorOverrideDeprecated(const std::optional<SkColor>& color); std::optional<SkColor> GetBgColorOverrideDeprecated() const; - // Override the default corner radius of the round rect used for the + // Override the default corner radius (received from the `LayoutProvider` for + // `ShapeContextTokens::kButtonRadius`) of the round rect used for the // background and ink drop effects. void SetCornerRadius(std::optional<float> radius); std::optional<float> GetCornerRadius() const; @@ -94,6 +95,9 @@ // Returns the hover color depending on the button style. SkColor GetHoverColor(ui::ButtonStyle button_style); + // Updates button attributes that depend on the corner radius. + void OnCornerRadiusValueChanged(); + ui::ButtonStyle style_ = ui::ButtonStyle::kDefault; // When set, this provides the background color. At most one of
diff --git a/ui/views/controls/button/md_text_button_unittest.cc b/ui/views/controls/button/md_text_button_unittest.cc index cac0c66e..f11b2bf 100644 --- a/ui/views/controls/button/md_text_button_unittest.cc +++ b/ui/views/controls/button/md_text_button_unittest.cc
@@ -92,4 +92,40 @@ EXPECT_EQ(test_string, md_text_button->GetText()); EXPECT_FALSE(md_text_button->GetEnabled()); } + +TEST_F(MdTextButtonActionViewInterfaceTest, + DefaultCornerRadiusDependsOnButtonSize) { + auto md_text_button = std::make_unique<MdTextButton>(); + constexpr gfx::Size kSize1(100, 100); + constexpr gfx::Size kSize2(50, 50); + + const int corner_radius_1 = LayoutProvider::Get()->GetCornerRadiusMetric( + ShapeContextTokens::kButtonRadius, kSize1); + const int corner_radius_2 = LayoutProvider::Get()->GetCornerRadiusMetric( + ShapeContextTokens::kButtonRadius, kSize2); + ASSERT_NE(corner_radius_1, corner_radius_2); + + md_text_button->SetBoundsRect(gfx::Rect(kSize1)); + EXPECT_EQ(md_text_button->GetCornerRadiusValue(), corner_radius_1); + EXPECT_EQ(md_text_button->GetFocusRingCornerRadius(), corner_radius_1); + + md_text_button->SetBoundsRect(gfx::Rect(kSize2)); + EXPECT_EQ(md_text_button->GetCornerRadiusValue(), corner_radius_2); + EXPECT_EQ(md_text_button->GetFocusRingCornerRadius(), corner_radius_2); +} + +TEST_F(MdTextButtonActionViewInterfaceTest, + CustomCornerRadiusIsNotOverriddenOnButtonSizeChange) { + auto md_text_button = std::make_unique<MdTextButton>(); + md_text_button->SetBoundsRect(gfx::Rect(100, 100)); + + constexpr int kCustomCornerRadius = 1234; + md_text_button->SetCornerRadius(kCustomCornerRadius); + ASSERT_EQ(md_text_button->GetCornerRadiusValue(), kCustomCornerRadius); + + md_text_button->SetBoundsRect(gfx::Rect(50, 50)); + EXPECT_EQ(md_text_button->GetCornerRadiusValue(), kCustomCornerRadius); + EXPECT_EQ(md_text_button->GetFocusRingCornerRadius(), kCustomCornerRadius); +} + } // namespace views
diff --git a/v8 b/v8 index 83c8467..2eaa4a2 160000 --- a/v8 +++ b/v8
@@ -1 +1 @@ -Subproject commit 83c84674a19490aaccae706a984743473d79ba40 +Subproject commit 2eaa4a2641b0d19b79d02a83d1683e60894a6179