diff --git a/AUTHORS b/AUTHORS index 7e2a3848..de89c11c 100644 --- a/AUTHORS +++ b/AUTHORS
@@ -1092,6 +1092,7 @@ Randy Posynick <randy.posynick@gmail.com> Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> Raul Tambre <raul@tambre.ee> +Rastislav Vašička <rastislav.vasicka@codetech.cc> Raveendra Karu <r.karu@samsung.com> Ravi Nanjundappa <nravi.n@samsung.com> Ravi Phaneendra Kasibhatla <r.kasibhatla@samsung.com>
diff --git a/DEPS b/DEPS index 3f467cc0..39cbcb2 100644 --- a/DEPS +++ b/DEPS
@@ -360,7 +360,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling freetype # and whatever else without interference from each other. - 'freetype_revision': '6d6607b8b3a78a305cc92d6016c411344c8c7b89', + 'freetype_revision': 'e9202737747ac008819d24a39c54584200c7a254', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling freetype # and whatever else without interference from each other. @@ -368,7 +368,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling HarfBuzz # and whatever else without interference from each other. - 'harfbuzz_revision': 'f26fd69d858642d76413b8f4068eaf9b57c40a5f', + 'harfbuzz_revision': '920c40cd43dd7b10b7ecba3d82a46f5fea88536f', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling Emoji Segmenter # and whatever else without interference from each other. @@ -380,7 +380,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling catapult # and whatever else without interference from each other. - 'catapult_revision': 'f3e882d6319dab1c71e0b86dacf13f7ef859701f', + 'catapult_revision': '448b931d9af81cee1f1bcf89672ccbad21a2513e', # 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. @@ -440,7 +440,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. - 'dawn_revision': '450cd4e14242c9e2a87ac3b9a2bb3cc41006d528', + 'dawn_revision': '3ec333906a355a569954ce4822852cda98dd7f23', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling feed # and whatever else without interference from each other. @@ -840,7 +840,7 @@ 'src/clank': { 'url': Var('chrome_git') + '/clank/internal/apps.git' + '@' + - '32b4d47fa67b9ee0f1df72a4284d726ec63f0b21', + 'f75c7cbd6dde5dd650d3052569eef08b0375ec10', 'condition': 'checkout_android and checkout_src_internal', }, @@ -1002,7 +1002,7 @@ 'packages': [ { 'package': 'chromium/third_party/androidx', - 'version': 'jYnZMA1q1qNqyYpVcsoN14-OPUhM_wdPIFCxcGj8zakC', + 'version': '7gw0P2lS-ut2s5t50FOrENILfpO4Z8dgj0tIwzxV448C', }, ], 'condition': 'checkout_android', @@ -1246,7 +1246,7 @@ }, 'src/third_party/depot_tools': - Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + 'b4e466e610accd97629e2a8f3e4fdb307bc54f4a', + Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + '0c5e8652fe1fefee1c291cbf05ca3a41b9f66890', 'src/third_party/devtools-frontend/src': Var('chromium_git') + '/devtools/devtools-frontend' + '@' + Var('devtools_frontend_revision'), @@ -1717,7 +1717,7 @@ Var('pdfium_git') + '/pdfium.git' + '@' + Var('pdfium_revision'), 'src/third_party/perfetto': - Var('android_git') + '/platform/external/perfetto.git' + '@' + 'eaa388ea811c973cbc86d6c304cbdc847cebe47d', + Var('android_git') + '/platform/external/perfetto.git' + '@' + '79b45f60dfbe97cbbc8f8be3a3807ae186bfd60a', 'src/third_party/perl': { 'url': Var('chromium_git') + '/chromium/deps/perl.git' + '@' + '6f3e5028eb65d0b4c5fdd792106ac4c84eee1eb3', @@ -1902,7 +1902,7 @@ Var('chromium_git') + '/external/github.com/gpuweb/cts.git' + '@' + '1c407e0944032ac9877bf4e5e000acff7a591b73', 'src/third_party/webrtc': - Var('webrtc_git') + '/src.git' + '@' + '2bb48727a04b6d8742f5ded3646b352ab30d5800', + Var('webrtc_git') + '/src.git' + '@' + '9272771418491e6ec56d6ea11167d1d1cbf2b81f', # 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. @@ -4059,7 +4059,7 @@ 'src/ios_internal': { 'url': Var('chrome_git') + '/chrome/ios_internal.git' + '@' + - '75fcd16c47f80a829a83279d3aecf56a874d5b21', + 'e93c9eb21e418da5953bd8239704c166ee419d57', 'condition': 'checkout_ios and checkout_src_internal', }, @@ -4138,7 +4138,7 @@ }, 'src/third_party/ml': { - 'url': Var('chrome_git') + '/chrome/third_party/ml.git' + '@' + '05e8032fd4cbe1508963eb1357b979e3d28e48e0', + 'url': Var('chrome_git') + '/chrome/third_party/ml.git' + '@' + '12e73e8a007bd7ceaabfc1c0c8baa54c9c8348ff', 'condition': 'checkout_third_party_ml', },
diff --git a/android_webview/browser/network_service/aw_proxying_restricted_cookie_manager.cc b/android_webview/browser/network_service/aw_proxying_restricted_cookie_manager.cc index 67f68a0..d0a8672 100644 --- a/android_webview/browser/network_service/aw_proxying_restricted_cookie_manager.cc +++ b/android_webview/browser/network_service/aw_proxying_restricted_cookie_manager.cc
@@ -76,13 +76,14 @@ const url::Origin& top_frame_origin, bool has_storage_access, network::mojom::CookieManagerGetOptionsPtr options, + bool is_ad_tagged, GetAllForUrlCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::IO); if (AllowCookies(url, site_for_cookies)) { underlying_restricted_cookie_manager_->GetAllForUrl( url, site_for_cookies, top_frame_origin, has_storage_access, - std::move(options), std::move(callback)); + std::move(options), is_ad_tagged, std::move(callback)); } else { std::move(callback).Run(std::vector<net::CookieWithAccessResult>()); } @@ -156,6 +157,7 @@ const url::Origin& top_frame_origin, bool has_storage_access, bool get_version_shared_memory, + bool is_ad_tagged, GetCookiesStringCallback callback) { DCHECK_CURRENTLY_ON(content::BrowserThread::IO); @@ -167,7 +169,7 @@ // strategy so that the shared memory access can be revoked from here. underlying_restricted_cookie_manager_->GetCookiesString( url, site_for_cookies, top_frame_origin, has_storage_access, - /*get_version_shared_memory=*/false, std::move(callback)); + /*get_version_shared_memory=*/false, is_ad_tagged, std::move(callback)); } else { std::move(callback).Run(network::mojom::kInvalidCookieVersion, base::ReadOnlySharedMemoryRegion(), "");
diff --git a/android_webview/browser/network_service/aw_proxying_restricted_cookie_manager.h b/android_webview/browser/network_service/aw_proxying_restricted_cookie_manager.h index 17d052d..ab68a85 100644 --- a/android_webview/browser/network_service/aw_proxying_restricted_cookie_manager.h +++ b/android_webview/browser/network_service/aw_proxying_restricted_cookie_manager.h
@@ -47,6 +47,7 @@ const url::Origin& top_frame_origin, bool has_storage_access, network::mojom::CookieManagerGetOptionsPtr options, + bool is_ad_tagged, GetAllForUrlCallback callback) override; void SetCanonicalCookie(const net::CanonicalCookie& cookie, const GURL& url, @@ -75,6 +76,7 @@ const url::Origin& top_frame_origin, bool has_storage_access, bool get_version_shared_memory, + bool is_ad_tagged, GetCookiesStringCallback callback) override; void CookiesEnabledFor(const GURL& url,
diff --git a/android_webview/common/crash_reporter/crash_keys.cc b/android_webview/common/crash_reporter/crash_keys.cc index 2443253..8c76a4e 100644 --- a/android_webview/common/crash_reporter/crash_keys.cc +++ b/android_webview/common/crash_reporter/crash_keys.cc
@@ -51,11 +51,6 @@ "oop_read_failure", "gpu-gl-error-message", - // components/android_autofill - "crbug1479006-form_ token", - "crbug1479006-form token", - "crbug1479006-manager token", - // components/viz "viz_deserialization",
diff --git a/ash/app_list/views/app_list_item_view.cc b/ash/app_list/views/app_list_item_view.cc index fe049fd..933d718 100644 --- a/ash/app_list/views/app_list_item_view.cc +++ b/ash/app_list/views/app_list_item_view.cc
@@ -1380,7 +1380,7 @@ const int shortcut_background_container_dimension = app_list_config_->GetShortcutBackgroundContainerDimension(); - const int shotcut_host_badge_icon_container_dimension = + const int shortcut_host_badge_icon_container_dimension = app_list_config_->GetShortcutHostBadgeIconContainerDimension(); const gfx::Size shortcut_background_container_size = @@ -1388,8 +1388,8 @@ shortcut_background_container_dimension); const gfx::Size shotcut_host_badge_icon_container_size = - gfx::Size(shotcut_host_badge_icon_container_dimension, - shotcut_host_badge_icon_container_dimension); + gfx::Size(shortcut_host_badge_icon_container_dimension, + shortcut_host_badge_icon_container_dimension); if (shortcut_background_container_ && has_host_badge_) { shortcut_background_container_->SetBackground( @@ -1442,7 +1442,7 @@ host_badge_icon_container_->SetBackground( views::CreateThemedRoundedRectBackground( cros_tokens::kCrosSysSystemOnBaseOpaque, - shortcut_background_container_dimension / 2, 0)); + shortcut_host_badge_icon_container_dimension / 2, 0)); host_badge_icon_container_->SetBoundsRect(host_badge_icon_container_bounds); }
diff --git a/ash/public/cpp/shelf_config.h b/ash/public/cpp/shelf_config.h index 760a42b0..9fe87f4 100644 --- a/ash/public/cpp/shelf_config.h +++ b/ash/public/cpp/shelf_config.h
@@ -99,6 +99,18 @@ // Returns the optimal shelf icon size for the given hotseat density. int GetShelfButtonIconSize(HotseatDensity density) const; + // Returns the shelf shortuct icon size. + int GetShelfShortcutIconSize() const; + + // Returns the shelf shortcut icon border size. + int GetShelfShortcutIconBorderSize() const; + + // Returns the shelf shortcut host badge icon size. + int GetShelfShortcutHostBadgeIconSize() const; + + // Returns the shelf shortcut host badge icon border size. + int GetShelfShortcutHostBadgeBorderSize() const; + // Returns the hotseat height for the given hotseat density. // NOTE: This may not match the actual hotseat size, as hotseat may get scaled // down if it does not fit in available bounds within the shelf. Use @@ -322,6 +334,18 @@ const int shelf_button_icon_size_median_; const int shelf_button_icon_size_dense_; + // Size of the shortcut icon. + const int shelf_shortcut_icon_size_; + + // Size of the shortcut icon border. + const int shelf_shortcut_icon_border_size_; + + // Size of the shortcut host badge icon. + const int shelf_shortcut_host_badge_icon_size_; + + // Size of the shortcut host badge border. + const int shelf_shortcut_host_badge_border_size_; + // Size allocated for each app button on the shelf. const int shelf_button_size_; const int shelf_button_size_median_;
diff --git a/ash/shelf/shelf_app_button.cc b/ash/shelf/shelf_app_button.cc index 6faf6b0..5f41176 100644 --- a/ash/shelf/shelf_app_button.cc +++ b/ash/shelf/shelf_app_button.cc
@@ -54,6 +54,7 @@ #include "ui/views/controls/focus_ring.h" #include "ui/views/controls/highlight_path_generator.h" #include "ui/views/controls/image_view.h" +#include "ui/views/layout/box_layout.h" #include "ui/views/painter.h" namespace { @@ -458,6 +459,11 @@ // TODO: refactor the layers so each button doesn't require 3. // |icon_view_| needs its own layer so it can be scaled up independently of // the ink drop ripple. + icon_container_view_ = AddChildView(std::make_unique<views::View>()); + icon_container_view_->SetPaintToLayer(); + icon_container_view_->layer()->SetFillsBoundsOpaquely(false); + icon_container_view_->SetCanProcessEventsWithinSubtree(false); + icon_view_->SetPaintToLayer(); icon_view_->layer()->SetFillsBoundsOpaquely(false); icon_view_->SetHorizontalAlignment(views::ImageView::Alignment::kCenter); @@ -470,9 +476,28 @@ AddChildView(indicator_.get()); AddChildView(icon_view_.get()); + notification_indicator_ = AddChildView(std::make_unique<DotIndicator>(kDefaultIndicatorColor)); + host_badge_container_view_ = AddChildView(std::make_unique<views::View>()); + host_badge_container_view_->SetPaintToLayer(); + host_badge_container_view_->layer()->SetFillsBoundsOpaquely(false); + host_badge_container_view_->SetCanProcessEventsWithinSubtree(false); + auto* host_badge_container_view_layout = + host_badge_container_view_->SetLayoutManager( + std::make_unique<views::BoxLayout>( + views::BoxLayout::Orientation::kVertical, gfx::Insets(), 0)); + host_badge_container_view_layout->set_cross_axis_alignment( + views::BoxLayout::CrossAxisAlignment::kCenter); + host_badge_container_view_layout->set_main_axis_alignment( + views::BoxLayout::MainAxisAlignment::kCenter); + + host_badge_icon_view_ = AddChildView(std::make_unique<views::ImageView>()); + host_badge_icon_view_->SetPaintToLayer(); + host_badge_icon_view_->layer()->SetFillsBoundsOpaquely(false); + host_badge_icon_view_->SetCanProcessEventsWithinSubtree(false); + views::InkDrop::Get(this)->GetInkDrop()->AddObserver(this); // Do not set a clip, allow the ink drop to burst out. @@ -511,11 +536,21 @@ icon_image_ = image; gfx::Size preferred_size = GetPreferredIconSize(); + + if (has_host_badge_) { + if (image.size() == preferred_size) { + icon_view_->SetImage(image); + return; + } + icon_view_->SetImage(gfx::ImageSkiaOperations::CreateResizedImage( + image, skia::ImageOperations::RESIZE_BEST, preferred_size)); + return; + } + if (image.size() == preferred_size) { SetShadowedImage(image); return; } - SetShadowedImage(gfx::ImageSkiaOperations::CreateResizedImage( image, skia::ImageOperations::RESIZE_BEST, preferred_size)); } @@ -533,6 +568,31 @@ icon_image_, skia::ImageOperations::RESIZE_BEST, GetPreferredIconSize()); } +void ShelfAppButton::SetHostBadgeImage(const gfx::ImageSkia& host_badge_image) { + const gfx::Size preferred_icon_size( + shelf_view_->GetShelfShortcutHostBadgeIconSize(), + shelf_view_->GetShelfShortcutHostBadgeIconSize()); + if (host_badge_image.isNull()) { + host_badge_image_ = gfx::ImageSkia(); + return; + } + host_badge_image_ = host_badge_image; + host_badge_icon_view_->SetImage(gfx::ImageSkiaOperations::CreateResizedImage( + host_badge_image, skia::ImageOperations::RESIZE_BEST, + preferred_icon_size)); + host_badge_container_view_->AddChildView(host_badge_icon_view_); +} + +void ShelfAppButton::SetMainAndMaybeHostBadgeImage( + const gfx::ImageSkia& image, + const gfx::ImageSkia& host_badge_image) { + // `has_host_badge_` needs to be set before SetImage(), since image size is + // set depending on the boolean logic. + has_host_badge_ = !host_badge_image.isNull(); + SetImage(image); + SetHostBadgeImage(host_badge_image); +} + void ShelfAppButton::AddState(State state) { if (!(state_ & state)) { state_ |= state; @@ -847,10 +907,12 @@ ? gfx::Insets() : gfx::ShadowValue::GetMargin(icon_shadows_); // Center icon with respect to the secondary axis. - if (is_horizontal_shelf) + if (is_horizontal_shelf) { x_offset = std::max(0.0f, button_bounds.width() - icon_width + 1) / 2; - else + + } else { y_offset = std::max(0.0f, button_bounds.height() - icon_height) / 2; + } gfx::RectF icon_view_bounds = gfx::RectF(button_bounds.x() + x_offset, button_bounds.y() + y_offset, icon_width, icon_height); @@ -864,6 +926,57 @@ return gfx::ToRoundedRect(icon_view_bounds); } +gfx::Rect ShelfAppButton::GetShortcutViewBounds(const gfx::Rect& button_bounds, + float icon_scale, + const float icon_size) const { + const float shortcut_icon_size = icon_size * icon_scale; + const float shortcut_icon_padding = + (shelf_view_->GetButtonSize() - shortcut_icon_size) / 2; + + const Shelf* shelf = shelf_view_->shelf(); + const bool is_horizontal_shelf = shelf->IsHorizontalAlignment(); + float shortcut_x_offset = is_horizontal_shelf ? 0 : shortcut_icon_padding; + float shortcut_y_offset = is_horizontal_shelf ? shortcut_icon_padding : 0; + + const float shortcut_icon_width = + std::min(shortcut_icon_size, button_bounds.width() - shortcut_x_offset); + const float shortcut_icon_height = + std::min(shortcut_icon_size, button_bounds.height() - shortcut_y_offset); + + if (shelf->alignment() == ShelfAlignment::kLeft) { + shortcut_x_offset = + button_bounds.width() - (shortcut_icon_size + shortcut_icon_padding); + } + + if (is_horizontal_shelf) { + shortcut_x_offset = + std::max(0.0f, button_bounds.width() - shortcut_icon_width) / 2; + } else { + shortcut_y_offset = + std::max(0.0f, button_bounds.height() - shortcut_icon_height) / 2; + } + + gfx::RectF shortcut_view_bounds = + gfx::RectF(button_bounds.x() + shortcut_x_offset, + button_bounds.y() + shortcut_y_offset, shortcut_icon_width, + shortcut_icon_height); + + DCHECK_LE(shortcut_icon_width, shortcut_icon_size); + DCHECK_LE(shortcut_icon_height, shortcut_icon_size); + + return gfx::ToRoundedRect(shortcut_view_bounds); +} + +gfx::Rect ShelfAppButton::GetIdealHostBadgeContainerBounds() { + const gfx::Rect main_app_icon_bounds = icon_view_->bounds(); + const gfx::Size host_badge_container_view_size( + shelf_view_->GetShelfShortcutHostBadgeContainerSize(), + shelf_view_->GetShelfShortcutHostBadgeContainerSize()); + gfx::Rect rect(main_app_icon_bounds.CenterPoint(), + host_badge_container_view_size); + return rect; +} + gfx::Rect ShelfAppButton::GetNotificationIndicatorBounds(float icon_scale) { gfx::Rect scaled_icon_view_bounds = GetIconViewBounds(GetContentsBounds(), icon_scale); @@ -878,14 +991,40 @@ void ShelfAppButton::Layout() { Shelf* shelf = shelf_view_->shelf(); - gfx::Rect icon_view_bounds = GetIconViewBounds( - GetContentsBounds(), GetAdjustedIconScaleForProgressRing()); + gfx::Rect icon_view_bounds = + has_host_badge_ + ? GetShortcutViewBounds(GetContentsBounds(), + GetAdjustedIconScaleForProgressRing(), + shelf_view_->GetShortcutIconSize()) + : GetIconViewBounds(GetContentsBounds(), + GetAdjustedIconScaleForProgressRing()); const gfx::Rect button_bounds(GetContentsBounds()); const int status_indicator_offet_from_shelf_edge = ShelfConfig::Get()->status_indicator_offset_from_shelf_edge(); - icon_view_->SetBoundsRect(icon_view_bounds); + if (has_host_badge_) { + const int icon_container_size = + shelf_view_->GetShelfShortcutIconContainerSize(); + const gfx::Size icon_container_view_size(icon_container_size, + icon_container_size); + const gfx::Rect icon_container_view_bounds = GetShortcutViewBounds( + GetContentsBounds(), GetAdjustedIconScaleForProgressRing(), + shelf_view_->GetShelfShortcutIconContainerSize()); + icon_container_view_->SetBackground( + views::CreateThemedRoundedRectBackground( + cros_tokens::kCrosSysSystemOnBaseOpaque, (icon_container_size / 2), + 0)); + icon_container_view_->SetBoundsRect(icon_container_view_bounds); + + host_badge_container_view_->SetBackground( + views::CreateThemedRoundedRectBackground( + cros_tokens::kCrosSysSystemOnBaseOpaque, + shelf_view_->GetShelfShortcutHostBadgeContainerSize() / 2, 0)); + host_badge_container_view_->SetBoundsRect( + GetIdealHostBadgeContainerBounds()); + } + notification_indicator_->SetIndicatorBounds( GetNotificationIndicatorBounds(GetAdjustedIconScaleForProgressRing())); @@ -1077,8 +1216,11 @@ } gfx::Size ShelfAppButton::GetPreferredIconSize() const { - const int icon_size = - shelf_view_->GetButtonIconSize() * GetAdjustedIconScaleForProgressRing(); + const int icon_size = has_host_badge_ + ? shelf_view_->GetShortcutIconSize() * + GetAdjustedIconScaleForProgressRing() + : shelf_view_->GetButtonIconSize() * + GetAdjustedIconScaleForProgressRing(); // Resize the image maintaining our aspect ratio. float aspect_ratio = static_cast<float>(icon_image_.width()) /
diff --git a/ash/shelf/shelf_app_button.h b/ash/shelf/shelf_app_button.h index 4f2bb49d..28d2876 100644 --- a/ash/shelf/shelf_app_button.h +++ b/ash/shelf/shelf_app_button.h
@@ -79,6 +79,10 @@ // Gets the resized `icon_image_` without the shadow. gfx::ImageSkia GetIconImage() const; + // Calls SetImage(), and SetHostBadgeImage() depending on `has_host_badge`. + void SetMainAndMaybeHostBadgeImage(const gfx::ImageSkia& image, + const gfx::ImageSkia& host_badge_image); + // |state| is or'd into the current state. void AddState(State state); void ClearState(State state); @@ -96,6 +100,10 @@ gfx::Rect GetIdealIconBounds(const gfx::Size& button_size, float icon_scale) const; + // Returns the ideal host badge icon bounds within the button view of the + // provided size. + gfx::Rect GetIdealHostBadgeContainerBounds(); + views::InkDrop* GetInkDropForTesting(); // Called when user started dragging the shelf button. @@ -188,6 +196,12 @@ gfx::Rect GetIconViewBounds(const gfx::Rect& button_bounds, float icon_scale) const; + // Calculates the bounds for either the shortcut icon container or shortcut + // icon scaled by `icon_scale`. + gfx::Rect GetShortcutViewBounds(const gfx::Rect& button_bounds, + float icon_scale, + const float icon_size) const; + // Calculates the notification indicator bounds when scaled by |scale|. gfx::Rect GetNotificationIndicatorBounds(float scale); @@ -205,13 +219,27 @@ // active. void UpdateProgressRingBounds(); + // Sets the host badge image to display for this entry + void SetHostBadgeImage(const gfx::ImageSkia& host_badge_image); + // Returns the icon scale adjusted to fit for the `progress_indicator_` if any // is currently active. float GetAdjustedIconScaleForProgressRing() const; + // The container for the icon, which looks like a halo around the icon. + raw_ptr<views::View, ExperimentalAsh> icon_container_view_ = nullptr; + // The icon part of a button can be animated independently of the rest. const raw_ptr<views::ImageView, ExperimentalAsh> icon_view_; + // The container for the host badge icon, which looks like a halo around the + // host badge icon. + raw_ptr<views::View, ExperimentalAsh> host_badge_container_view_ = nullptr; + + // The host badge icon part of a button, can be animated independently of the + // rest. + raw_ptr<views::ImageView, ExperimentalAsh> host_badge_icon_view_ = nullptr; + // The ShelfView showing this ShelfAppButton. Owned by RootWindowController. const raw_ptr<ShelfView, ExperimentalAsh> shelf_view_; @@ -231,6 +259,9 @@ // The bitmap image for this app button. gfx::ImageSkia icon_image_; + // The bitmap image for the host badge icon if this is an App Shortcut. + gfx::ImageSkia host_badge_image_; + // The scaling factor for displaying the app icon. float icon_scale_ = 1.0f; @@ -268,6 +299,9 @@ // The package id that is associated with this shelf app. std::string package_id_; + // Whether the app has a host badge (i.e. an App Shortcut). + bool has_host_badge_ = false; + // Used to track whether the menu was deleted while running. Must be last. base::WeakPtrFactory<ShelfAppButton> weak_factory_{this}; };
diff --git a/ash/shelf/shelf_config.cc b/ash/shelf/shelf_config.cc index d7104ad..309a4ac 100644 --- a/ash/shelf/shelf_config.cc +++ b/ash/shelf/shelf_config.cc
@@ -111,6 +111,10 @@ : shelf_button_icon_size_(44), shelf_button_icon_size_median_(40), shelf_button_icon_size_dense_(36), + shelf_shortcut_icon_size_(30), + shelf_shortcut_icon_border_size_(3), + shelf_shortcut_host_badge_icon_size_(14), + shelf_shortcut_host_badge_border_size_(2), shelf_button_size_(56), shelf_button_size_median_(52), shelf_button_size_dense_(48), @@ -291,6 +295,22 @@ } } +int ShelfConfig::GetShelfShortcutIconSize() const { + return shelf_shortcut_icon_size_; +} + +int ShelfConfig::GetShelfShortcutIconBorderSize() const { + return shelf_shortcut_icon_border_size_; +} + +int ShelfConfig::GetShelfShortcutHostBadgeIconSize() const { + return shelf_shortcut_host_badge_icon_size_; +} + +int ShelfConfig::GetShelfShortcutHostBadgeBorderSize() const { + return shelf_shortcut_host_badge_border_size_; +} + int ShelfConfig::GetHotseatSize(HotseatDensity density) const { if (!in_tablet_mode_) return shelf_size();
diff --git a/ash/shelf/shelf_view.cc b/ash/shelf/shelf_view.cc index 0af8147..4136112 100644 --- a/ash/shelf/shelf_view.cc +++ b/ash/shelf/shelf_view.cc
@@ -477,6 +477,24 @@ shelf_->hotseat_widget()->target_hotseat_density()); } +int ShelfView::GetShortcutIconSize() const { + return ShelfConfig::Get()->GetShelfShortcutIconSize(); +} + +int ShelfView::GetShelfShortcutIconContainerSize() const { + return GetShortcutIconSize() + + ShelfConfig::Get()->GetShelfShortcutIconBorderSize() * 2; +} + +int ShelfView::GetShelfShortcutHostBadgeIconSize() const { + return ShelfConfig::Get()->GetShelfShortcutHostBadgeIconSize(); +} + +int ShelfView::GetShelfShortcutHostBadgeContainerSize() const { + return GetShelfShortcutHostBadgeIconSize() + + ShelfConfig::Get()->GetShelfShortcutHostBadgeBorderSize() * 2; +} + int ShelfView::GetShelfItemRippleSize() const { return GetButtonSize() + 2 * ShelfConfig::Get()->scrollable_shelf_ripple_padding(); @@ -1027,10 +1045,7 @@ case TYPE_DIALOG: { ShelfAppButton* button = new ShelfAppButton( this, shelf_button_delegate_ ? shelf_button_delegate_.get() : this); - button->SetImage(item.image); - button->SetNotificationBadgeColor(item.notification_badge_color); - button->ReflectItemStatus(item); - button->SetAccessibleName(item.accessible_name); + UpdateButton(button, item); view = button; break; } @@ -1045,6 +1060,14 @@ return view; } +void ShelfView::UpdateButton(ShelfAppButton* button, const ShelfItem& item) { + button->ReflectItemStatus(item); + button->SetMainAndMaybeHostBadgeImage(item.image, item.badge_image); + button->SetNotificationBadgeColor(item.notification_badge_color); + button->SetAccessibleName(item.accessible_name); + button->SchedulePaint(); +} + int ShelfView::GetAvailableSpaceForAppIcons() const { return shelf()->PrimaryAxisValue(width(), height()); } @@ -2476,11 +2499,7 @@ case TYPE_DIALOG: { CHECK_EQ(ShelfAppButton::kViewClassName, view->GetClassName()); ShelfAppButton* button = static_cast<ShelfAppButton*>(view); - button->ReflectItemStatus(item); - button->SetImage(item.image); - button->SetNotificationBadgeColor(item.notification_badge_color); - button->SetAccessibleName(item.accessible_name); - button->SchedulePaint(); + UpdateButton(button, item); break; } case TYPE_UNDEFINED:
diff --git a/ash/shelf/shelf_view.h b/ash/shelf/shelf_view.h index 94136a3..3a8b8ec7 100644 --- a/ash/shelf/shelf_view.h +++ b/ash/shelf/shelf_view.h
@@ -287,6 +287,18 @@ // Returns the size of a shelf button icon. int GetButtonIconSize() const; + // Returns the size of a shelf button shortcut icon. + int GetShortcutIconSize() const; + + // Returns the size of a shelf button shortcut icon border. + int GetShelfShortcutIconContainerSize() const; + + // Returns the size of a shelf button shortcut host badge icon. + int GetShelfShortcutHostBadgeIconSize() const; + + // Returns the size of a shelf button shortcut host badge icon border. + int GetShelfShortcutHostBadgeContainerSize() const; + // Returns the size of the shelf item ripple ring. int GetShelfItemRippleSize() const; @@ -365,6 +377,10 @@ // Minimum distance before drag starts. static const int kMinimumDragDistance; + // Updates relevant fields of the button and reflects the item status has + // changed. + void UpdateButton(ShelfAppButton* button, const ShelfItem& item); + // Common setup done for all children views. |layer_type| specifies the type // of layer for the |view|. Use ui::LAYER_NOT_DRAWN if the content of the view // do not have to be painted (e.g. a container for views that have its own
diff --git a/ash/strings/ash_strings_ar.xtb b/ash/strings/ash_strings_ar.xtb index 529d9ec..1dbb5e4f 100644 --- a/ash/strings/ash_strings_ar.xtb +++ b/ash/strings/ash_strings_ar.xtb
@@ -116,6 +116,7 @@ <translation id="1391102559483454063">مُفعَّلة</translation> <translation id="1407069428457324124">المظهر الداكن</translation> <translation id="1410568680128842168"><ph name="DATE_CELL_TOOL_TIP" />. يمكنك الانتقال بين التواريخ باستخدام مفاتيح الأسهم.</translation> +<translation id="141170878022560212">الزر الأوسط</translation> <translation id="1414271762428216854"><ph name="APP_NAME" />، تطبيق مثبّت</translation> <translation id="1414919006379339073">إغلاق النافذة الحالية</translation> <translation id="1415846719612499304">عرض قائمة الشبكات: <ph name="STATE_TEXT" /></translation> @@ -282,6 +283,7 @@ <translation id="2086334242442703436">فتح "أداة اختيار الرموز التعبيرية"</translation> <translation id="2088116547584365419">الألعاب</translation> <translation id="209965399369889474">لا يتوفّر اتصال بالشبكة</translation> +<translation id="2107581415810719320">الزر الآخر "<ph name="BUTTON_NUMBER" />"</translation> <translation id="2107914222138020205">لا يتوافق الكابل المزوّد بمنفذ USB-C مع جهاز Thunderbolt. وقد يصبح أداء الجهاز محدودًا.</translation> <translation id="2108303511227308752">تم تغيير اختصارات لوحة المفاتيح "Alt + Backspace". لاستخدام مفتاح Delete، اضغط على المفتاحَين "<ph name="LAUNCHER_KEY_NAME" /> + Backspace".</translation> <translation id="2126242104232412123">سطح مكتب جديد</translation>
diff --git a/ash/strings/ash_strings_be.xtb b/ash/strings/ash_strings_be.xtb index 2206178b..79052b6 100644 --- a/ash/strings/ash_strings_be.xtb +++ b/ash/strings/ash_strings_be.xtb
@@ -1197,6 +1197,7 @@ <translation id="5788127256798019331">Файлы Play</translation> <translation id="5788535737706478207">Адкрыць апошнюю закрытую ўкладку або акно</translation> <translation id="5790085346892983794">Выканана</translation> +<translation id="5802516411616338943">Адкрыць хуткія налады</translation> <translation id="5804651031882187592">Выключыце наладу блакіроўкі SIM-карты</translation> <translation id="5805809050170488595">Націсніце, каб актываваць сетку <ph name="NETWORK_NAME" /></translation> <translation id="5823239091726045201">Google Задачы (вэб-версія)</translation> @@ -1222,6 +1223,7 @@ <translation id="5901630391730855834">Жоўты</translation> <translation id="5911231045062997865">Вокны Lacros цяпер не падтрымліваюцца. Іншыя праграмы будуць захаваны.</translation> <translation id="5911909173233110115"><ph name="USERNAME" /> (<ph name="MAIL" />)</translation> +<translation id="5916646100036936191">Новае апавяшчэнне, усяго <ph name="NOTIFICATION_COUNT" /></translation> <translation id="5916664084637901428">Уключана</translation> <translation id="5920710855273935292">Мікрафон выключаны.</translation> <translation id="5946788582095584774">Стан функцыі "<ph name="FEATURE_NAME" />": уключана.</translation>
diff --git a/ash/strings/ash_strings_bs.xtb b/ash/strings/ash_strings_bs.xtb index 52bfefe..f7fe2ec 100644 --- a/ash/strings/ash_strings_bs.xtb +++ b/ash/strings/ash_strings_bs.xtb
@@ -1197,6 +1197,7 @@ <translation id="5788127256798019331">Play fajlovi</translation> <translation id="5788535737706478207">Ponovno otvaranje posljednje zatvorene kartice ili prozora</translation> <translation id="5790085346892983794">Uspješno</translation> +<translation id="5802516411616338943">Otvaranje Brzih postavki</translation> <translation id="5804651031882187592">Isključite postavku "Zaključaj SIM"</translation> <translation id="5805809050170488595">Kliknite da aktivirate mrežu <ph name="NETWORK_NAME" /></translation> <translation id="5823239091726045201">Google Zadaci na webu</translation> @@ -1222,6 +1223,7 @@ <translation id="5901630391730855834">Žuta</translation> <translation id="5911231045062997865">Lacros prozori trenutno nisu podržani. Druge aplikacije će se sačuvati.</translation> <translation id="5911909173233110115"><ph name="USERNAME" /> (<ph name="MAIL" />)</translation> +<translation id="5916646100036936191">Nova obavijest, ukupno <ph name="NOTIFICATION_COUNT" /></translation> <translation id="5916664084637901428">Uključeno</translation> <translation id="5920710855273935292">Mikrofon je isključen.</translation> <translation id="5946788582095584774">Funkcija <ph name="FEATURE_NAME" /> je uključena.</translation>
diff --git a/ash/strings/ash_strings_eu.xtb b/ash/strings/ash_strings_eu.xtb index 1eec809..b4b5d17 100644 --- a/ash/strings/ash_strings_eu.xtb +++ b/ash/strings/ash_strings_eu.xtb
@@ -116,6 +116,7 @@ <translation id="1391102559483454063">Aktibatuta</translation> <translation id="1407069428457324124">Gai iluna</translation> <translation id="1410568680128842168"><ph name="DATE_CELL_TOOL_TIP" />. Erabili gezi-teklak daten artean nabigatzeko.</translation> +<translation id="141170878022560212">Erdiko botoia</translation> <translation id="1414271762428216854">Instalatutako aplikazioa (<ph name="APP_NAME" />)</translation> <translation id="1414919006379339073">Itxi leiho hau</translation> <translation id="1415846719612499304">Erakutsi sareen zerrenda. <ph name="STATE_TEXT" />.</translation> @@ -281,6 +282,7 @@ <translation id="2086334242442703436">Ireki emoji-hautatzailea</translation> <translation id="2088116547584365419">jokoak</translation> <translation id="209965399369889474">Ez zaude konektatuta sarera</translation> +<translation id="2107581415810719320">Beste botoia <ph name="BUTTON_NUMBER" /></translation> <translation id="2107914222138020205">USB-C kableak ez du onartzen Thunderbolt. Baliteke gailuaren errendimendua mugatuta egotea.</translation> <translation id="2108303511227308752">Alt + Atzera tekla lasterbidea aldatu egin da. "Ezabatu" tekla erabiltzeko, sakatu <ph name="LAUNCHER_KEY_NAME" /> tekla + Atzera tekla.</translation> <translation id="2126242104232412123">Lan-eremu berria</translation>
diff --git a/ash/strings/ash_strings_hr.xtb b/ash/strings/ash_strings_hr.xtb index eb21045..fa75567 100644 --- a/ash/strings/ash_strings_hr.xtb +++ b/ash/strings/ash_strings_hr.xtb
@@ -1197,6 +1197,7 @@ <translation id="5788127256798019331">Datoteke Playa</translation> <translation id="5788535737706478207">Ponovno otvaranje zadnje zatvorene kartice ili prozora</translation> <translation id="5790085346892983794">Uspjeh</translation> +<translation id="5802516411616338943">Otvaranje Brzih postavki</translation> <translation id="5804651031882187592">Isključivanje postavke Zaključaj SIM</translation> <translation id="5805809050170488595">Kliknite da biste aktivirali mrežu <ph name="NETWORK_NAME" /></translation> <translation id="5823239091726045201">Google Tasks na webu</translation> @@ -1222,6 +1223,7 @@ <translation id="5901630391730855834">Žuta</translation> <translation id="5911231045062997865">Prozori Lacrosa trenutačno nisu podržani. Ostale će se aplikacije spremiti.</translation> <translation id="5911909173233110115"><ph name="USERNAME" /> (<ph name="MAIL" />)</translation> +<translation id="5916646100036936191">Nova obavijest, ukupno <ph name="NOTIFICATION_COUNT" /></translation> <translation id="5916664084637901428">Uključi</translation> <translation id="5920710855273935292">Mikrofon je isključen.</translation> <translation id="5946788582095584774">Značajka <ph name="FEATURE_NAME" /> je uključena.</translation>
diff --git a/ash/strings/ash_strings_iw.xtb b/ash/strings/ash_strings_iw.xtb index aaae8cf..21c05df7 100644 --- a/ash/strings/ash_strings_iw.xtb +++ b/ash/strings/ash_strings_iw.xtb
@@ -564,6 +564,7 @@ <translation id="3340978935015468852">הגדרות</translation> <translation id="3341303451326249809">צילום המסך בוצע</translation> <translation id="334252345105450327">יצירת צילום מסך</translation> +<translation id="3346728094401457853">צריך להזין את סיסמת המכשיר של <ph name="EMAIL" /></translation> <translation id="334927402682780278">בחירת הטקסט מהסמן עד סוף השורה</translation> <translation id="3349345708646875009">פתיחת מנהל המשימות</translation> <translation id="3364721542077212959">כלי סטיילוס</translation> @@ -1583,6 +1584,7 @@ <translation id="7489261257412536105">מעבר למסך מלא או יציאה ממנו</translation> <translation id="7490360161041035804">ניתן להצמיד קבצים חשובים, כולל קבצים מ-Google Drive. כדי להצמיד, מעבירים את העכבר מעל פריט או פותחים את 'קבצים' ולוחצים לחיצה ימנית על פריט.</translation> <translation id="7497767806359279797">בחירת שפה ומקלדת</translation> +<translation id="7507162824403726948">צריך לסיים את אימות הזהות</translation> <translation id="7508690557411636492">נפתח בחודש האחרון</translation> <translation id="7509246181739783082">אימות זהות</translation> <translation id="7512509370370076552">מקשי הקיצור של לחיצה ימנית היו Alt + לחיצה ועכשיו הם מקש <ph name="LAUNCHER_KEY_NAME" /> + לחיצה</translation>
diff --git a/ash/strings/ash_strings_ms.xtb b/ash/strings/ash_strings_ms.xtb index 7cb1be3..e58b69e7 100644 --- a/ash/strings/ash_strings_ms.xtb +++ b/ash/strings/ash_strings_ms.xtb
@@ -131,6 +131,7 @@ <translation id="146902737843070955">Pentadbir anda telah meminta perubahan ini</translation> <translation id="1469148162491666137">Tindakan ini akan membenarkan akses kepada <ph name="APP1_NAME" />, <ph name="APP2_NAME" /> dan semua apl serta laman web dengan kebenaran kamera dan mikrofon. Anda mungkin perlu menyegarkan semula halaman web atau memulakan semula apl.</translation> <translation id="147310119694673958">Bateri telefon <ph name="BATTERY_PERCENTAGE" />%</translation> +<translation id="1475340220124222168">Togol tempat liputan. Tempat liputan dihidupkan, 1 peranti disambungkan.</translation> <translation id="1479909375538722835">Menu kebolehaksesan terapung</translation> <translation id="1480845547124508962"><ph name="CURRENT_TIME" />, Tekan kekunci enter untuk membuka paparan Calendar</translation> <translation id="1484102317210609525"><ph name="DEVICE_NAME" /> (HDMI/DP)</translation> @@ -890,6 +891,7 @@ <translation id="4577990005084629481">Tunjukkan pratonton</translation> <translation id="4578906031062871102">Menu tetapan dibuka</translation> <translation id="458210817642223147">Rakam GIF</translation> +<translation id="4582666543382004902">Tempat Liputan telah dimatikan untuk menggunakan Wi-Fi. Untuk menggunakan tempat liputan, matikan Wi-Fi.</translation> <translation id="4585337515783392668">Berhenti menghantar pada penerima yang tidak diketahui</translation> <translation id="4596144739579517758">Tema gelap dimatikan</translation> <translation id="4611292653554630842">Log masuk</translation> @@ -1097,6 +1099,7 @@ <translation id="5395308026110844773"><ph name="DRAGGED_APP_NAME" /> ke atas <ph name="IN_PLACE_APP" />, lepaskan untuk membuat folder.</translation> <translation id="5397578532367286026">Penggunaan dan sejarah pengguna ini boleh disemak oleh pengurus (<ph name="MANAGER_EMAIL" />) di chrome.com.</translation> <translation id="5400461572260843123">Tetapan Pantas, Tekan cari + kiri untuk mengakses pusat pemberitahuan.</translation> +<translation id="540713187982329711">Togol tempat liputan. Tempat liputan dihidupkan, tiada peranti disambungkan.</translation> <translation id="5413656666631274079">Halaman tetapan</translation> <translation id="5414198321558177633">Memuat semula senarai profil. Proses ini mungkin mengambil masa beberapa minit.</translation> <translation id="5426063383988017631">Menu tetapan ditutup</translation> @@ -1188,9 +1191,11 @@ <translation id="576341972084747908">Muat turun berbahaya <ph name="FILENAME" /></translation> <translation id="576453121877257266">Cahaya Malam dihidupkan.</translation> <translation id="5764569119212455782">Beralih kepada bahasa terakhir yang dipilih</translation> +<translation id="5767730327234918501">Pentadbir anda telah mematikan tempat liputan.</translation> <translation id="5769373120130404283">Skrin privasi</translation> <translation id="5773950591113557721">Tindakan ini akan membenarkan akses kepada <ph name="APP_NAME" /> dan semua apl serta laman web dengan kebenaran kamera dan mikrofon</translation> <translation id="5774295353725270860">Buka apl Fail</translation> +<translation id="5775936059231769503">Togol tempat liputan. Tempat liputan dimatikan.</translation> <translation id="5777841717266010279">Hentikan perkongsian skrin?</translation> <translation id="5779721926447984944">Fail disemat</translation> <translation id="5785221443435874078">Alih keluar cadangan ini</translation> @@ -1508,6 +1513,7 @@ <translation id="7068360136237591149">Buka fail</translation> <translation id="7076293881109082629">Melog masuk</translation> <translation id="7076878155205969899">Redamkan bunyi</translation> +<translation id="7084678090004350185">Togol tempat liputan. Tempat liputan dihidupkan, <ph name="DEVICECOUNT" /> peranti disambungkan.</translation> <translation id="7086931198345821656">Kemaskinian ini memerlukan fungsi powerwash <ph name="DEVICE_TYPE" /> anda. Semua data akan dipadamkan. Ketahui lebih lanjut tentang kemas kini <ph name="SYSTEM_APP_NAME" /> yang terbaharu.</translation> <translation id="7088960765736518739">Akses Suis</translation> <translation id="709015856939120012">Zum masuk pada halaman</translation>
diff --git a/ash/strings/ash_strings_my.xtb b/ash/strings/ash_strings_my.xtb index 5d41c7994..fed9253b 100644 --- a/ash/strings/ash_strings_my.xtb +++ b/ash/strings/ash_strings_my.xtb
@@ -1197,6 +1197,7 @@ <translation id="5788127256798019331">Play ဖိုင်များ</translation> <translation id="5788535737706478207">နောက်ဆုံးပိတ်လိုက်သည့်တဘ် (သို့) ဝင်းဒိုးကို ပြန်ဖွင့်ရန်</translation> <translation id="5790085346892983794">အောင်မြင်ခြင်း</translation> +<translation id="5802516411616338943">အမြန်ဆက်တင်များ ဖွင့်ရန်</translation> <translation id="5804651031882187592">"ဆင်းမ်လော့ခ်ချရန်" ဆက်တင်ကို ပိတ်ပါ</translation> <translation id="5805809050170488595"><ph name="NETWORK_NAME" /> စတင်ရန် နှိပ်ပါ</translation> <translation id="5823239091726045201">ဝဘ်ပေါ်ရှိ Google Tasks</translation> @@ -1222,6 +1223,7 @@ <translation id="5901630391730855834">အၐါရောင်</translation> <translation id="5911231045062997865">Lacros ဝင်းဒိုးများကို လောလောဆယ် မပံ့ပိုးပါ။ အခြားအက်ပ်များကို သိမ်းပါမည်။</translation> <translation id="5911909173233110115"><ph name="USERNAME" /> (<ph name="MAIL" />)</translation> +<translation id="5916646100036936191">အကြောင်းကြားချက်အသစ်၊ စုစုပေါင်း <ph name="NOTIFICATION_COUNT" /> ခု</translation> <translation id="5916664084637901428">ဖွင့်ရန်</translation> <translation id="5920710855273935292">မိုက်ပိတ်ထားသည်။</translation> <translation id="5946788582095584774"><ph name="FEATURE_NAME" /> ဖွင့်ထားသည်။</translation>
diff --git a/ash/strings/ash_strings_uz.xtb b/ash/strings/ash_strings_uz.xtb index e749faf1b..5121112 100644 --- a/ash/strings/ash_strings_uz.xtb +++ b/ash/strings/ash_strings_uz.xtb
@@ -564,6 +564,7 @@ <translation id="3340978935015468852">sozlamalar</translation> <translation id="3341303451326249809">Skrinshot olindi</translation> <translation id="334252345105450327">Skrinshot olish</translation> +<translation id="3346728094401457853"><ph name="EMAIL" /> uchun qurilma parolini kiriting</translation> <translation id="334927402682780278">Kursordan qator oxirigacha matnni belgilash</translation> <translation id="3349345708646875009">Vazifalar boshqaruvini ochish</translation> <translation id="3364721542077212959">Stilus vositalari</translation> @@ -1583,6 +1584,7 @@ <translation id="7489261257412536105">Butun ekran rejimiga kirish/chiqish</translation> <translation id="7490360161041035804">Google Drive omboridagi kabi muhim fayllarni mahkamlash mumkin. Mahkamlash uchun sichqonchani fayl ustiga suring yoki Fayllar ilovasini ochib, unga oʻng klik bosing.</translation> <translation id="7497767806359279797">Til va klaviaturani tanlang</translation> +<translation id="7507162824403726948">Shaxsingizni tasdiqlash jarayonini yakunlang</translation> <translation id="7508690557411636492">Oxirgi oyda ochilgan</translation> <translation id="7509246181739783082">Shaxsni tasdiqlash</translation> <translation id="7512509370370076552">Oʻng klik tugmasi Alt + klikdan <ph name="LAUNCHER_KEY_NAME" /> + klikka yangilandi</translation>
diff --git a/ash/webui/common/resources/BUILD.gn b/ash/webui/common/resources/BUILD.gn index 650ca86..ca08e69 100644 --- a/ash/webui/common/resources/BUILD.gn +++ b/ash/webui/common/resources/BUILD.gn
@@ -185,6 +185,7 @@ "multidevice_setup/icons.html", "navigation_icons.html", + "auth_setup/auth_setup_icons.html", "bluetooth/bluetooth_icons.html", "cellular_setup/cellular_setup_icons.html", "network/network_icons.html",
diff --git a/ash/webui/common/resources/auth_setup/auth_setup_icons.html b/ash/webui/common/resources/auth_setup/auth_setup_icons.html new file mode 100644 index 0000000..c68ef601 --- /dev/null +++ b/ash/webui/common/resources/auth_setup/auth_setup_icons.html
@@ -0,0 +1,8 @@ +<iron-iconset-svg name="auth-setup" size="24"> + <svg> + <defs> + <g id="visibility" viewBox="0 -960 960 960"><path d="M480-320q75 0 127.5-52.5T660-500q0-75-52.5-127.5T480-680q-75 0-127.5 52.5T300-500q0 75 52.5 127.5T480-320Zm0-72q-45 0-76.5-31.5T372-500q0-45 31.5-76.5T480-608q45 0 76.5 31.5T588-500q0 45-31.5 76.5T480-392Zm0 192q-146 0-266-81.5T40-500q54-137 174-218.5T480-800q146 0 266 81.5T920-500q-54 137-174 218.5T480-200Zm0-300Zm0 220q113 0 207.5-59.5T832-500q-50-101-144.5-160.5T480-720q-113 0-207.5 59.5T128-500q50 101 144.5 160.5T480-280Z"></path></g> + <g id="visibility-off" viewBox="0 -960 960 960"><path d="m644-428-58-58q9-47-27-88t-93-32l-58-58q17-8 34.5-12t37.5-4q75 0 127.5 52.5T660-500q0 20-4 37.5T644-428Zm128 126-58-56q38-29 67.5-63.5T832-500q-50-101-143.5-160.5T480-720q-29 0-57 4t-55 12l-62-62q41-17 84-25.5t90-8.5q151 0 269 83.5T920-500q-23 59-60.5 109.5T772-302Zm20 246L624-222q-35 11-70.5 16.5T480-200q-151 0-269-83.5T40-500q21-53 53-98.5t73-81.5L56-792l56-56 736 736-56 56ZM222-624q-29 26-53 57t-41 67q50 101 143.5 160.5T480-280q20 0 39-2.5t39-5.5l-36-38q-11 3-21 4.5t-21 1.5q-75 0-127.5-52.5T300-500q0-11 1.5-21t4.5-21l-84-82Zm319 93Zm-151 75Z"></path></g> + </defs> + </svg> +</iron-iconset-svg>
diff --git a/ash/webui/common/resources/auth_setup/set_local_password_input.html b/ash/webui/common/resources/auth_setup/set_local_password_input.html index 902f61c..92bb14b 100644 --- a/ash/webui/common/resources/auth_setup/set_local_password_input.html +++ b/ash/webui/common/resources/auth_setup/set_local_password_input.html
@@ -4,6 +4,12 @@ found in the LICENSE file. --> <style include="cr-shared-style cros-color-overrides"> + cr-icon-button { + --cr-icon-button-icon-size: 20px; + --cr-icon-button-size: 32px; + --cr-icon-button-margin-start: 0; + --cr-icon-button-margin-end: 0; + } /* Styling for the hint/error of the first input element. These styles are to be kept in sync with the #error styling of the cr-input element. We can't use the cr-input error message here, because for the first input element @@ -30,24 +36,26 @@ --cr-input-background-color: var(--cros-sys-input_field_on_shaded); } </style> -<!-- TODO(b/298932938): This should have a "show password" button. --> <cr-input id="firstInput" - type="password" + type="[[getPasswordInputType(isFirstPasswordVisible_)]]" required placeholder="[[i18nDynamic(locale, 'setLocalPasswordPlaceholder')]]" on-input="onInput" on-blur="onBlur" on-keyup="onKeyup" invalid="[[showFirstInputError(firstInputValidity_)]]"> + <cr-icon-button id="showPasswordButton" slot="inline-suffix" + title="[[getShowHideButtonLabel(isFirstPasswordVisible_)]]" + iron-icon="[[getShowHideButtonIcon(isFirstPasswordVisible_)]]" + on-click="onFirstShowHidePasswordButtonClick"> </cr-input> <div id="firstInputHint" is-error$="[[showFirstInputError(firstInputValidity_)]]"> [[i18nDynamic(locale, 'setLocalPasswordMinCharsHint')]] </div> -<!-- TODO(b/298932938): This should have a "show password" button. --> <cr-input id="confirmInput" - type="password" + type="[[getPasswordInputType(isConfirmPasswordVisible_)]]" required placeholder="[[i18nDynamic(locale, 'setLocalPasswordConfirmPlaceholder')]]" on-input="onInput" @@ -55,4 +63,8 @@ on-keyup="onKeyup" invalid="[[showConfirmInputError(confirmInputValidity_)]]" error-message="[[i18nDynamic(locale, 'setLocalPasswordNoMatchError')]]"> + <cr-icon-button id="showPasswordButton" slot="inline-suffix" + title="[[getShowHideButtonLabel(isConfirmPasswordVisible_)]]" + iron-icon="[[getShowHideButtonIcon(isConfirmPasswordVisible_)]]" + on-click="onConfirmShowHidePasswordButtonClick"> </cr-input>
diff --git a/ash/webui/common/resources/auth_setup/set_local_password_input.ts b/ash/webui/common/resources/auth_setup/set_local_password_input.ts index 66d1f96..05241f2 100644 --- a/ash/webui/common/resources/auth_setup/set_local_password_input.ts +++ b/ash/webui/common/resources/auth_setup/set_local_password_input.ts
@@ -4,6 +4,7 @@ import 'chrome://resources/cr_elements/cr_shared_style.css.js'; import '//resources/cr_elements/chromeos/cros_color_overrides.css.js'; +import './auth_setup_icons.html.js'; import {CrInputElement} from 'chrome://resources/cr_elements/cr_input/cr_input.js'; import {I18nMixin} from 'chrome://resources/cr_elements/i18n_mixin.js'; @@ -53,6 +54,8 @@ * When the user presses <Enter> in the confirmation input field and validation * passes, then the 'set-local-password-input' element dispatches a "submit" * event. + * + * TODO(b/309430756): Reuse ShowPasswordMixin here. */ export class SetLocalPasswordInputElement extends LocalPasswordInputElementBase { @@ -94,6 +97,16 @@ type: String, value: null, }, + + isFirstPasswordVisible_: { + type: Boolean, + value: false, + }, + + isConfirmPasswordVisible_: { + type: Boolean, + value: false, + }, }; } @@ -101,6 +114,8 @@ private firstInputValidity_: null|FirstInputValidity; private confirmInputValidity_: null|ConfirmInputValidity; + private isFirstPasswordVisible_: boolean; + private isConfirmPasswordVisible_: boolean; locale: string; @@ -288,6 +303,30 @@ return false; } } + + private getPasswordInputType(isVisible: boolean): string { + return isVisible ? 'text' : 'password'; + } + + private getShowHideButtonLabel(isVisible: boolean): string { + return isVisible ? loadTimeData.getString('hidePassword') : + loadTimeData.getString('showPassword'); + } + + private getShowHideButtonIcon(isVisible: boolean): string { + return isVisible ? 'auth-setup:visibility-off' : 'auth-setup:visibility'; + } + + /** + * Handlers for showing/hiding the passwords. These methods should be + * attached to on-click event of show/hide password button. + */ + private onFirstShowHidePasswordButtonClick() { + this.isFirstPasswordVisible_ = !this.isFirstPasswordVisible_; + } + private onConfirmShowHidePasswordButtonClick() { + this.isConfirmPasswordVisible_ = !this.isConfirmPasswordVisible_; + } } customElements.define(
diff --git a/base/apple/scoped_nsobject_unittest.mm b/base/apple/scoped_nsobject_unittest.mm index a369fbc..6829b223 100644 --- a/base/apple/scoped_nsobject_unittest.mm +++ b/base/apple/scoped_nsobject_unittest.mm
@@ -36,15 +36,11 @@ ASSERT_EQ(1u, [p1.get() retainCount]); base::apple::scoped_nsobject<NSObject> p4([p1.get() retain]); ASSERT_EQ(2u, [p1.get() retainCount]); - ASSERT_TRUE(p1 == p1.get()); ASSERT_TRUE(p1 == p1); ASSERT_FALSE(p1 != p1); - ASSERT_FALSE(p1 != p1.get()); base::apple::scoped_nsobject<NSObject> p5([[NSObject alloc] init]); ASSERT_TRUE(p1 != p5); - ASSERT_TRUE(p1 != p5.get()); ASSERT_FALSE(p1 == p5); - ASSERT_FALSE(p1 == p5.get()); base::apple::scoped_nsobject<NSObject> p6 = p1; ASSERT_EQ(3u, [p6.get() retainCount]);
diff --git a/base/apple/scoped_typeref.h b/base/apple/scoped_typeref.h index 7c2ad41..393770d 100644 --- a/base/apple/scoped_typeref.h +++ b/base/apple/scoped_typeref.h
@@ -167,9 +167,6 @@ explicit operator bool() const { return object_ != Traits::InvalidValue(); } - // TODO(https://crbug.com/1495439): Remove. - operator element_type() const { return object_; } - element_type get() const { return object_; } void swap(ScopedTypeRef& that) {
diff --git a/base/ios/device_util.mm b/base/ios/device_util.mm index b4333ae..0a4a270 100644 --- a/base/ios/device_util.mm +++ b/base/ios/device_util.mm
@@ -128,8 +128,8 @@ base::apple::ScopedCFTypeRef<CFUUIDRef> uuid_object( CFUUIDCreate(kCFAllocatorDefault)); base::apple::ScopedCFTypeRef<CFStringRef> uuid_string( - CFUUIDCreateString(kCFAllocatorDefault, uuid_object)); - return base::SysCFStringRefToUTF8(uuid_string); + CFUUIDCreateString(kCFAllocatorDefault, uuid_object.get())); + return base::SysCFStringRefToUTF8(uuid_string.get()); } std::string GetDeviceIdentifier(const char* salt) { @@ -176,8 +176,8 @@ base::apple::ScopedCFTypeRef<CFUUIDRef> uuid_object( CFUUIDCreateFromUUIDBytes(kCFAllocatorDefault, *uuid_bytes)); base::apple::ScopedCFTypeRef<CFStringRef> device_id( - CFUUIDCreateString(kCFAllocatorDefault, uuid_object)); - return base::SysCFStringRefToUTF8(device_id); + CFUUIDCreateString(kCFAllocatorDefault, uuid_object.get())); + return base::SysCFStringRefToUTF8(device_id.get()); } } // namespace ios::device_util
diff --git a/base/test/metrics/histogram_enum_reader.cc b/base/test/metrics/histogram_enum_reader.cc index 16f9b86..0b5a870 100644 --- a/base/test/metrics/histogram_enum_reader.cc +++ b/base/test/metrics/histogram_enum_reader.cc
@@ -83,17 +83,23 @@ } // namespace absl::optional<HistogramEnumEntryMap> ReadEnumFromEnumsXml( - const std::string& enum_name) { + const std::string& enum_name, + const absl::optional<std::string>& subdirectory) { FilePath src_root; if (!PathService::Get(DIR_SRC_TEST_DATA_ROOT, &src_root)) { ADD_FAILURE() << "Failed to get src root."; return absl::nullopt; } - base::FilePath enums_xml = src_root.AppendASCII("tools") - .AppendASCII("metrics") - .AppendASCII("histograms") - .AppendASCII("enums.xml"); + base::FilePath enums_xml = + src_root.AppendASCII("tools").AppendASCII("metrics").AppendASCII( + "histograms"); + if (subdirectory) { + enums_xml = + enums_xml.AppendASCII("metadata").AppendASCII(subdirectory.value()); + } + enums_xml = enums_xml.AppendASCII("enums.xml"); + if (!PathExists(enums_xml)) { ADD_FAILURE() << "enums.xml file does not exist."; return absl::nullopt;
diff --git a/base/test/metrics/histogram_enum_reader.h b/base/test/metrics/histogram_enum_reader.h index b4fc3416..17896605 100644 --- a/base/test/metrics/histogram_enum_reader.h +++ b/base/test/metrics/histogram_enum_reader.h
@@ -16,7 +16,8 @@ using HistogramEnumEntryMap = std::map<HistogramBase::Sample, std::string>; // Find and read the enum with the given |enum_name| (with integer values) from -// tools/metrics/histograms/enums.xml. +// tools/metrics/histograms/enums.xml, or from enums.xml in the given +// |subdirectory| of tools/metrics/histograms/metadata. // // Returns map { value => label } so that: // <int value="9" label="enable-pinch-virtual-viewport"/> @@ -24,7 +25,8 @@ // { 9 => "enable-pinch-virtual-viewport" } // Returns empty absl::nullopt on failure. absl::optional<HistogramEnumEntryMap> ReadEnumFromEnumsXml( - const std::string& enum_name); + const std::string& enum_name, + const absl::optional<std::string>& subdirectory = absl::nullopt); } // namespace base
diff --git a/chrome/VERSION b/chrome/VERSION index 6a0997d..6653cf05 100644 --- a/chrome/VERSION +++ b/chrome/VERSION
@@ -1,4 +1,4 @@ MAJOR=121 MINOR=0 -BUILD=6111 +BUILD=6112 PATCH=0
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn index df835f9..04b7532 100644 --- a/chrome/android/BUILD.gn +++ b/chrome/android/BUILD.gn
@@ -678,7 +678,7 @@ "//components/dom_distiller/core:distiller_type_java", "//components/ntp_tiles:ntp_tiles_enums_java", "//components/offline_pages/core:offline_page_model_enums_java", - "//components/supervised_user/core/browser:supervised_user_url_filter_enum_javagen", + "//components/supervised_user/core/common:supervised_user_utils_enum_javagen", "//net:effective_connection_type_java", ]
diff --git a/chrome/android/features/start_surface/java/res/layout/single_tab_module_layout.xml b/chrome/android/features/start_surface/java/res/layout/single_tab_module_layout.xml index 92c20867..019d21e 100644 --- a/chrome/android/features/start_surface/java/res/layout/single_tab_module_layout.xml +++ b/chrome/android/features/start_surface/java/res/layout/single_tab_module_layout.xml
@@ -84,7 +84,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentEnd="true" - android:layout_marginStart="@dimen/single_tab_module_lateral_margin" + android:layout_marginStart="@dimen/single_tab_module_padding_bottom" android:layout_toEndOf="@+id/tab_images" android:ellipsize="end" android:gravity="center_vertical" @@ -96,7 +96,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="2dp" - android:layout_marginStart="@dimen/single_tab_module_lateral_margin" + android:layout_marginStart="@dimen/single_tab_module_padding_bottom" android:layout_alignParentEnd="true" android:layout_alignParentBottom="true" android:layout_gravity="bottom"
diff --git a/chrome/android/features/start_surface/javatests/src/org/chromium/chrome/features/start_surface/ShowNtpAtStartupTest.java b/chrome/android/features/start_surface/javatests/src/org/chromium/chrome/features/start_surface/ShowNtpAtStartupTest.java index 3d196cd..63a2be7 100644 --- a/chrome/android/features/start_surface/javatests/src/org/chromium/chrome/features/start_surface/ShowNtpAtStartupTest.java +++ b/chrome/android/features/start_surface/javatests/src/org/chromium/chrome/features/start_surface/ShowNtpAtStartupTest.java
@@ -699,6 +699,7 @@ @Test @LargeTest @Feature({"StartSurface"}) + @EnableFeatures({ChromeFeatureList.SHOW_SCROLLABLE_MVT_ON_NTP_PHONE_ANDROID}) @CommandLineFlags.Add({START_SURFACE_ON_TABLET_TEST_PARAMS}) public void testThumbnailRecaptureForSingleTabCardAfterMostRecentTabClosed() throws IOException {
diff --git a/chrome/android/features/tab_ui/java/res/layout/tab_selection_editor_toolbar.xml b/chrome/android/features/tab_ui/java/res/layout/tab_selection_editor_toolbar.xml index a01d4779..85ff60c1 100644 --- a/chrome/android/features/tab_ui/java/res/layout/tab_selection_editor_toolbar.xml +++ b/chrome/android/features/tab_ui/java/res/layout/tab_selection_editor_toolbar.xml
@@ -16,7 +16,7 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="horizontal"> - <org.chromium.components.browser_ui.widget.listmenu.ListMenuButton + <org.chromium.ui.listmenu.ListMenuButton style="@style/ToolbarMenuButton" android:id="@+id/list_menu_button" android:src="@drawable/ic_more_vert_24dp"
diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridDialogMenuCoordinator.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridDialogMenuCoordinator.java index 6daf2b5..4795a3a 100644 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridDialogMenuCoordinator.java +++ b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabGridDialogMenuCoordinator.java
@@ -18,11 +18,10 @@ import org.chromium.base.LifetimeAssert; import org.chromium.chrome.tab_ui.R; import org.chromium.components.browser_ui.widget.BrowserUiListMenuUtils; -import org.chromium.components.browser_ui.widget.listmenu.BasicListMenu.ListMenuItemType; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuItemProperties; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuItemViewBinder; +import org.chromium.ui.listmenu.BasicListMenu.ListMenuItemType; +import org.chromium.ui.listmenu.ListMenuItemProperties; +import org.chromium.ui.listmenu.ListMenuItemViewBinder; import org.chromium.ui.modelutil.LayoutViewBuilder; -import org.chromium.ui.modelutil.MVCListAdapter.ListItem; import org.chromium.ui.modelutil.MVCListAdapter.ModelList; import org.chromium.ui.modelutil.ModelListAdapter; import org.chromium.ui.widget.AnchoredPopupWindow;
diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabSelectionEditorActionViewLayout.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabSelectionEditorActionViewLayout.java index e9ef855..4bb6c63 100644 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabSelectionEditorActionViewLayout.java +++ b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabSelectionEditorActionViewLayout.java
@@ -15,8 +15,8 @@ import org.chromium.base.MathUtils; import org.chromium.chrome.tab_ui.R; import org.chromium.components.browser_ui.widget.NumberRollView; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButton; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButtonDelegate; +import org.chromium.ui.listmenu.ListMenuButton; +import org.chromium.ui.listmenu.ListMenuButtonDelegate; import java.util.ArrayList; import java.util.Set;
diff --git a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabSelectionEditorMenu.java b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabSelectionEditorMenu.java index 526b1bb..daae6d6 100644 --- a/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabSelectionEditorMenu.java +++ b/chrome/android/features/tab_ui/java/src/org/chromium/chrome/browser/tasks/tab_management/TabSelectionEditorMenu.java
@@ -16,8 +16,8 @@ import org.chromium.chrome.browser.tasks.tab_management.TabSelectionEditorActionViewLayout.ActionViewLayoutDelegate; import org.chromium.chrome.tab_ui.R; import org.chromium.components.browser_ui.widget.BrowserUiListMenuUtils; -import org.chromium.components.browser_ui.widget.listmenu.ListMenu; import org.chromium.components.browser_ui.widget.selectable_list.SelectionDelegate; +import org.chromium.ui.listmenu.ListMenu; import org.chromium.ui.modelutil.LayoutViewBuilder; import org.chromium.ui.modelutil.MVCListAdapter.ListItem; import org.chromium.ui.modelutil.MVCListAdapter.ModelList;
diff --git a/chrome/android/features/tab_ui/java/strings/translations/android_chrome_tab_ui_strings_ms.xtb b/chrome/android/features/tab_ui/java/strings/translations/android_chrome_tab_ui_strings_ms.xtb index 956c5a3..861446d4 100644 --- a/chrome/android/features/tab_ui/java/strings/translations/android_chrome_tab_ui_strings_ms.xtb +++ b/chrome/android/features/tab_ui/java/strings/translations/android_chrome_tab_ui_strings_ms.xtb
@@ -2,6 +2,7 @@ <!DOCTYPE translationbundle> <translationbundle lang="ms"> <translation id="1075622780330595106"><ph name="NUMBER_OF_TABS" /> daripada tab anda sudah lama tidak digunakan. Tutup tab?</translation> +<translation id="1155815720264022949">Mahu menutup tab lama?</translation> <translation id="1215127405478249895">Semak tab</translation> <translation id="125153950246128346">Ketik untuk melihat tab lain</translation> <translation id="1499635324672558517">Tutup semua tab Inkognito?</translation> @@ -46,9 +47,11 @@ <translation id="5073204694187207510">Sembunyikan grid skrin penuh</translation> <translation id="5076161749301278626">Lihat ulasan gedung?</translation> <translation id="5082793167783849073">Bandingkan halaman dengan pantas dengan membuat kumpulan. Untuk bermula, sentuh & tahan pautan.</translation> +<translation id="5303274951032363933">{TABS_COUNT,plural, =1{Anda mempunyai <ph name="TABS_COUNT_ONE" /> tab yang tidak digunakan baru-baru ini}other{Anda mempunyai <ph name="TABS_COUNT_MANY" /> tab yang tidak digunakan baru-baru ini}}</translation> <translation id="5339733443032484186">Tab terakhir anda</translation> <translation id="5490235265819901748">Kumpulan tab dikembangkan</translation> <translation id="5494920125229734069">Pilih semua</translation> +<translation id="5545379293264651575">Tutup tanpa membuat semakan</translation> <translation id="5556417849629758491">Lihat maklumat kedai, pilihan tersedia berhampiran bahagian atas skrin</translation> <translation id="5558362125926932819">Tutup kumpulan tab dengan <ph name="NUMBER_OF_TABS" /> tab</translation> <translation id="5580090775658607195"><ph name="TAB_COUNT" /> tab dihimpunkan</translation>
diff --git a/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabSelectionEditorMenuTest.java b/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabSelectionEditorMenuTest.java index 9c8d07d..d3aa6a8 100644 --- a/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabSelectionEditorMenuTest.java +++ b/chrome/android/features/tab_ui/javatests/src/org/chromium/chrome/browser/tasks/tab_management/TabSelectionEditorMenuTest.java
@@ -51,10 +51,10 @@ import org.chromium.chrome.test.R; import org.chromium.chrome.test.util.browser.Features; import org.chromium.components.browser_ui.widget.NumberRollView; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButton; import org.chromium.components.browser_ui.widget.selectable_list.SelectionDelegate; import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.ui.UiUtils; +import org.chromium.ui.listmenu.ListMenuButton; import org.chromium.ui.modelutil.ListModelChangeProcessor; import org.chromium.ui.modelutil.PropertyKey; import org.chromium.ui.modelutil.PropertyListModel;
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 d781c9b5..14e62056 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
@@ -53,8 +53,6 @@ import org.chromium.components.browser_ui.widget.displaystyle.DisplayStyleObserver; import org.chromium.components.browser_ui.widget.displaystyle.HorizontalDisplayStyle; import org.chromium.components.browser_ui.widget.displaystyle.UiConfig; -import org.chromium.components.browser_ui.widget.listmenu.ListMenu; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuItemProperties; import org.chromium.components.prefs.PrefService; import org.chromium.components.search_engines.TemplateUrlService; import org.chromium.components.search_engines.TemplateUrlService.TemplateUrlServiceObserver; @@ -64,6 +62,8 @@ import org.chromium.components.user_prefs.UserPrefs; import org.chromium.content_public.browser.LoadUrlParams; import org.chromium.ui.base.DeviceFormFactor; +import org.chromium.ui.listmenu.ListMenu; +import org.chromium.ui.listmenu.ListMenuItemProperties; import org.chromium.ui.modelutil.MVCListAdapter; import org.chromium.ui.modelutil.MVCListAdapter.ModelList; import org.chromium.ui.modelutil.PropertyKey;
diff --git a/chrome/android/java/res/layout/improved_bookmark_row_content.xml b/chrome/android/java/res/layout/improved_bookmark_row_content.xml index 225d945..367a81f 100644 --- a/chrome/android/java/res/layout/improved_bookmark_row_content.xml +++ b/chrome/android/java/res/layout/improved_bookmark_row_content.xml
@@ -18,7 +18,7 @@ android:layout_width="16dp" android:layout_height="match_parent" /> - <org.chromium.components.browser_ui.widget.listmenu.ListMenuButton + <org.chromium.ui.listmenu.ListMenuButton android:id="@+id/more" android:visibility="gone" android:layout_width="@dimen/min_touch_target_size"
diff --git a/chrome/android/java/res/layout/list_menu_button.xml b/chrome/android/java/res/layout/list_menu_button.xml index 16cbb25..e5aa9e3 100644 --- a/chrome/android/java/res/layout/list_menu_button.xml +++ b/chrome/android/java/res/layout/list_menu_button.xml
@@ -5,7 +5,7 @@ found in the LICENSE file. --> -<org.chromium.components.browser_ui.widget.listmenu.ListMenuButton +<org.chromium.ui.listmenu.ListMenuButton xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools"
diff --git a/chrome/android/java/res/layout/optional_toolbar_button.xml b/chrome/android/java/res/layout/optional_toolbar_button.xml index f8e2293..1b54ba7c 100644 --- a/chrome/android/java/res/layout/optional_toolbar_button.xml +++ b/chrome/android/java/res/layout/optional_toolbar_button.xml
@@ -5,7 +5,7 @@ found in the LICENSE file. --> -<org.chromium.components.browser_ui.widget.listmenu.ListMenuButton +<org.chromium.ui.listmenu.ListMenuButton xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" style="@style/ToolbarHoverableButton"
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java index c84c013..4b3c279 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
@@ -1983,8 +1983,13 @@ mNextTabPolicySupplier = new ChromeNextTabPolicySupplier(mLayoutStateProviderSupplier); - boolean tabModelWasCreated = mTabModelOrchestrator.createTabModels( - this, this, mNextTabPolicySupplier, mWindowId); + boolean tabModelWasCreated = + mTabModelOrchestrator.createTabModels( + this, + getProfileProviderSupplier(), + this, + mNextTabPolicySupplier, + mWindowId); if (!tabModelWasCreated) { finishAndRemoveTask(); return;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/tabmodel/CustomTabsTabModelOrchestrator.java b/chrome/android/java/src/org/chromium/chrome/browser/app/tabmodel/CustomTabsTabModelOrchestrator.java index 0a1dcc8..d8c15620 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/app/tabmodel/CustomTabsTabModelOrchestrator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/app/tabmodel/CustomTabsTabModelOrchestrator.java
@@ -4,11 +4,10 @@ package org.chromium.chrome.browser.app.tabmodel; -import androidx.annotation.Nullable; - -import org.chromium.base.supplier.Supplier; +import org.chromium.base.supplier.OneshotSupplier; import org.chromium.chrome.browser.dependency_injection.ActivityScope; import org.chromium.chrome.browser.flags.ActivityType; +import org.chromium.chrome.browser.profiles.ProfileProvider; import org.chromium.chrome.browser.tabmodel.AsyncTabParamsManager; import org.chromium.chrome.browser.tabmodel.NextTabPolicy; import org.chromium.chrome.browser.tabmodel.NextTabPolicy.NextTabPolicySupplier; @@ -17,7 +16,6 @@ import org.chromium.chrome.browser.tabmodel.TabModelSelectorImpl; import org.chromium.chrome.browser.tabmodel.TabPersistencePolicy; import org.chromium.chrome.browser.tabmodel.TabPersistentStore; -import org.chromium.ui.base.WindowAndroid; import javax.inject.Inject; @@ -30,17 +28,25 @@ @Inject public CustomTabsTabModelOrchestrator() {} - /** - * Creates the TabModelSelector and the TabPersistentStore. - */ - public void createTabModels(@Nullable Supplier<WindowAndroid> windowAndroidSupplier, - TabCreatorManager tabCreatorManager, TabModelFilterFactory tabModelFilterFactory, - TabPersistencePolicy persistencePolicy, AsyncTabParamsManager asyncTabParamsManager) { + /** Creates the TabModelSelector and the TabPersistentStore. */ + public void createTabModels( + OneshotSupplier<ProfileProvider> profileProviderSupplier, + TabCreatorManager tabCreatorManager, + TabModelFilterFactory tabModelFilterFactory, + TabPersistencePolicy persistencePolicy, + AsyncTabParamsManager asyncTabParamsManager) { // Instantiate TabModelSelectorImpl NextTabPolicySupplier nextTabPolicySupplier = () -> NextTabPolicy.LOCATIONAL; - mTabModelSelector = new TabModelSelectorImpl(windowAndroidSupplier, tabCreatorManager, - tabModelFilterFactory, nextTabPolicySupplier, asyncTabParamsManager, false, - ActivityType.CUSTOM_TAB, false); + mTabModelSelector = + new TabModelSelectorImpl( + profileProviderSupplier, + tabCreatorManager, + tabModelFilterFactory, + nextTabPolicySupplier, + asyncTabParamsManager, + false, + ActivityType.CUSTOM_TAB, + false); // Instantiate TabPersistentStore mTabPersistencePolicy = persistencePolicy;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/tabmodel/DefaultTabModelSelectorFactory.java b/chrome/android/java/src/org/chromium/chrome/browser/app/tabmodel/DefaultTabModelSelectorFactory.java index 512ffa0..83458c9f 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/app/tabmodel/DefaultTabModelSelectorFactory.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/app/tabmodel/DefaultTabModelSelectorFactory.java
@@ -6,7 +6,9 @@ import android.app.Activity; +import org.chromium.base.supplier.OneshotSupplier; import org.chromium.chrome.browser.flags.ActivityType; +import org.chromium.chrome.browser.profiles.ProfileProvider; import org.chromium.chrome.browser.tabmodel.AsyncTabParamsManager; import org.chromium.chrome.browser.tabmodel.NextTabPolicy.NextTabPolicySupplier; import org.chromium.chrome.browser.tabmodel.TabCreatorManager; @@ -22,13 +24,23 @@ // Do not inline since this uses some APIs only available on Android N versions, which cause // verification errors. @Override - public TabModelSelector buildSelector(Activity activity, TabCreatorManager tabCreatorManager, - NextTabPolicySupplier nextTabPolicySupplier, int selectorIndex) { + public TabModelSelector buildSelector( + Activity activity, + OneshotSupplier<ProfileProvider> profileProviderSupplier, + TabCreatorManager tabCreatorManager, + NextTabPolicySupplier nextTabPolicySupplier, + int selectorIndex) { TabModelFilterFactory tabModelFilterFactory = new ChromeTabModelFilterFactory(activity); AsyncTabParamsManager asyncTabParamsManager = AsyncTabParamsManagerSingleton.getInstance(); - return new TabModelSelectorImpl(/*windowAndroidSupplier=*/null, tabCreatorManager, - tabModelFilterFactory, nextTabPolicySupplier, asyncTabParamsManager, true, - ActivityType.TABBED, false); + return new TabModelSelectorImpl( + profileProviderSupplier, + tabCreatorManager, + tabModelFilterFactory, + nextTabPolicySupplier, + asyncTabParamsManager, + true, + ActivityType.TABBED, + false); } }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/app/tabmodel/TabbedModeTabModelOrchestrator.java b/chrome/android/java/src/org/chromium/chrome/browser/app/tabmodel/TabbedModeTabModelOrchestrator.java index cb5306f5..6dfa787 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/app/tabmodel/TabbedModeTabModelOrchestrator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/app/tabmodel/TabbedModeTabModelOrchestrator.java
@@ -9,8 +9,10 @@ import androidx.annotation.VisibleForTesting; +import org.chromium.base.supplier.OneshotSupplier; import org.chromium.chrome.browser.multiwindow.MultiInstanceManager; import org.chromium.chrome.browser.multiwindow.MultiWindowUtils; +import org.chromium.chrome.browser.profiles.ProfileProvider; import org.chromium.chrome.browser.tabmodel.NextTabPolicy.NextTabPolicySupplier; import org.chromium.chrome.browser.tabmodel.TabCreatorManager; import org.chromium.chrome.browser.tabmodel.TabModelSelector; @@ -38,10 +40,14 @@ * Creates the TabModelSelector and the TabPersistentStore. * * @return Whether the creation was successful. It may fail is we reached the limit of number of - * windows. + * windows. */ - public boolean createTabModels(Activity activity, TabCreatorManager tabCreatorManager, - NextTabPolicySupplier nextTabPolicySupplier, int selectorIndex) { + public boolean createTabModels( + Activity activity, + OneshotSupplier<ProfileProvider> profileProviderSupplier, + TabCreatorManager tabCreatorManager, + NextTabPolicySupplier nextTabPolicySupplier, + int selectorIndex) { boolean mergeTabsOnStartup = shouldMergeTabs(activity); if (mergeTabsOnStartup) { MultiInstanceManager.mergedOnStartup(); @@ -49,8 +55,13 @@ // Instantiate TabModelSelectorImpl Pair<Integer, TabModelSelector> selectorAssignment = - TabWindowManagerSingleton.getInstance().requestSelector( - activity, tabCreatorManager, nextTabPolicySupplier, selectorIndex); + TabWindowManagerSingleton.getInstance() + .requestSelector( + activity, + profileProviderSupplier, + tabCreatorManager, + nextTabPolicySupplier, + selectorIndex); if (selectorAssignment == null) { mTabModelSelector = null; } else {
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkManagerMediator.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkManagerMediator.java index 5a79fc8c..94b7c68 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkManagerMediator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkManagerMediator.java
@@ -48,8 +48,6 @@ import org.chromium.components.browser_ui.widget.dragreorder.DragReorderableRecyclerViewAdapter.DragListener; import org.chromium.components.browser_ui.widget.dragreorder.DragReorderableRecyclerViewAdapter.DraggabilityProvider; import org.chromium.components.browser_ui.widget.dragreorder.DragStateDelegate; -import org.chromium.components.browser_ui.widget.listmenu.ListMenu; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuItemProperties; import org.chromium.components.browser_ui.widget.selectable_list.SelectableListLayout; import org.chromium.components.browser_ui.widget.selectable_list.SelectionDelegate; import org.chromium.components.browser_ui.widget.selectable_list.SelectionDelegate.SelectionObserver; @@ -60,6 +58,8 @@ import org.chromium.components.power_bookmarks.PowerBookmarkMeta; import org.chromium.components.power_bookmarks.PowerBookmarkType; import org.chromium.ui.accessibility.AccessibilityState; +import org.chromium.ui.listmenu.ListMenu; +import org.chromium.ui.listmenu.ListMenuItemProperties; import org.chromium.ui.modelutil.MVCListAdapter.ListItem; import org.chromium.ui.modelutil.MVCListAdapter.ModelList; import org.chromium.ui.modelutil.PropertyModel;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkRow.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkRow.java index 7d1797ee..ed47f8f7 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkRow.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkRow.java
@@ -28,13 +28,13 @@ import org.chromium.components.bookmarks.BookmarkItem; import org.chromium.components.bookmarks.BookmarkType; import org.chromium.components.browser_ui.widget.BrowserUiListMenuUtils; -import org.chromium.components.browser_ui.widget.listmenu.ListMenu; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButton; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButton.PopupMenuShownListener; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButtonDelegate; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuItemProperties; import org.chromium.components.browser_ui.widget.selectable_list.CheckableSelectableItemView; import org.chromium.components.browser_ui.widget.selectable_list.SelectableListUtils; +import org.chromium.ui.listmenu.ListMenu; +import org.chromium.ui.listmenu.ListMenuButton; +import org.chromium.ui.listmenu.ListMenuButton.PopupMenuShownListener; +import org.chromium.ui.listmenu.ListMenuButtonDelegate; +import org.chromium.ui.listmenu.ListMenuItemProperties; import org.chromium.ui.modelutil.MVCListAdapter.ModelList; import java.lang.annotation.Retention;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/ImprovedBookmarkRow.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/ImprovedBookmarkRow.java index 4c22308..3061596 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/ImprovedBookmarkRow.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/ImprovedBookmarkRow.java
@@ -22,10 +22,10 @@ import org.chromium.chrome.R; import org.chromium.components.browser_ui.widget.RoundedCornerOutlineProvider; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButton; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButton.PopupMenuShownListener; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButtonDelegate; import org.chromium.components.browser_ui.widget.selectable_list.SelectableListUtils; +import org.chromium.ui.listmenu.ListMenuButton; +import org.chromium.ui.listmenu.ListMenuButton.PopupMenuShownListener; +import org.chromium.ui.listmenu.ListMenuButtonDelegate; import org.chromium.ui.widget.ViewLookupCachingFrameLayout; /** Common logic for improved bookmark and folder rows. */
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/ImprovedBookmarkRowProperties.java b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/ImprovedBookmarkRowProperties.java index 906ba816..f1e7e77 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/ImprovedBookmarkRowProperties.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/ImprovedBookmarkRowProperties.java
@@ -12,7 +12,7 @@ import androidx.annotation.IntDef; import org.chromium.base.supplier.LazyOneshotSupplier; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButtonDelegate; +import org.chromium.ui.listmenu.ListMenuButtonDelegate; import org.chromium.ui.modelutil.PropertyKey; import org.chromium.ui.modelutil.PropertyModel; import org.chromium.ui.modelutil.PropertyModel.WritableBooleanPropertyKey;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/content/CustomTabActivityTabFactory.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/content/CustomTabActivityTabFactory.java index 7eb808c..d93e8f61 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/content/CustomTabActivityTabFactory.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/content/CustomTabActivityTabFactory.java
@@ -103,8 +103,12 @@ /** Calls the {@link TabModelOrchestrator} to create TabModels and TabPersistentStore. */ public void createTabModels() { - mTabModelOrchestrator.createTabModels(mActivityWindowAndroid::get, mTabCreatorManager, - mTabModelFilterFactory, mPersistencePolicy, mAsyncTabParamsManager.get()); + mTabModelOrchestrator.createTabModels( + mProfileProviderSupplier, + mTabCreatorManager, + mTabModelFilterFactory, + mPersistencePolicy, + mAsyncTabParamsManager.get()); } /** Returns the previously created {@link TabModelSelector}. */
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/privacy_sandbox/TrackingProtectionNoticeController.java b/chrome/android/java/src/org/chromium/chrome/browser/privacy_sandbox/TrackingProtectionNoticeController.java index f5503ab..398d6666 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/privacy_sandbox/TrackingProtectionNoticeController.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/privacy_sandbox/TrackingProtectionNoticeController.java
@@ -24,11 +24,6 @@ import org.chromium.chrome.browser.tab.Tab; import org.chromium.components.browser_ui.settings.SettingsLauncher; import org.chromium.components.browser_ui.widget.BrowserUiListMenuUtils; -import org.chromium.components.browser_ui.widget.listmenu.BasicListMenu; -import org.chromium.components.browser_ui.widget.listmenu.ListMenu; -import org.chromium.components.browser_ui.widget.listmenu.ListMenu.Delegate; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButtonDelegate; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuItemProperties; import org.chromium.components.messages.DismissReason; import org.chromium.components.messages.MessageBannerProperties; import org.chromium.components.messages.MessageDispatcher; @@ -37,6 +32,11 @@ import org.chromium.components.privacy_sandbox.TrackingProtectionSettings; import org.chromium.components.security_state.ConnectionSecurityLevel; import org.chromium.components.security_state.SecurityStateModel; +import org.chromium.ui.listmenu.BasicListMenu; +import org.chromium.ui.listmenu.ListMenu; +import org.chromium.ui.listmenu.ListMenu.Delegate; +import org.chromium.ui.listmenu.ListMenuButtonDelegate; +import org.chromium.ui.listmenu.ListMenuItemProperties; import org.chromium.ui.modelutil.MVCListAdapter; import org.chromium.ui.modelutil.MVCListAdapter.ListItem; import org.chromium.ui.modelutil.PropertyModel;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/selection/ChromeSelectionDropdownMenuDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/selection/ChromeSelectionDropdownMenuDelegate.java index 66acb414..f6a1ace 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/selection/ChromeSelectionDropdownMenuDelegate.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/selection/ChromeSelectionDropdownMenuDelegate.java
@@ -16,10 +16,10 @@ import org.chromium.chrome.R; import org.chromium.components.browser_ui.widget.BrowserUiListMenuUtils; -import org.chromium.components.browser_ui.widget.listmenu.BasicListMenu; -import org.chromium.components.browser_ui.widget.listmenu.BasicListMenu.ListMenuItemType; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuItemProperties; import org.chromium.content_public.browser.selection.SelectionDropdownMenuDelegate; +import org.chromium.ui.listmenu.BasicListMenu; +import org.chromium.ui.listmenu.BasicListMenu.ListMenuItemType; +import org.chromium.ui.listmenu.ListMenuItemProperties; import org.chromium.ui.modelutil.MVCListAdapter; import org.chromium.ui.modelutil.MVCListAdapter.ListItem; import org.chromium.ui.modelutil.PropertyModel;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/IncognitoTabModelImplCreator.java b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/IncognitoTabModelImplCreator.java index cc70eb3c..f54b3dd5 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/IncognitoTabModelImplCreator.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/IncognitoTabModelImplCreator.java
@@ -4,22 +4,19 @@ package org.chromium.chrome.browser.tabmodel; -import static org.chromium.chrome.browser.incognito.IncognitoUtils.getNonPrimaryOTRProfileFromWindowAndroid; -import androidx.annotation.Nullable; -import org.chromium.base.supplier.Supplier; import org.chromium.chrome.browser.compositor.layouts.content.TabContentManager; import org.chromium.chrome.browser.flags.ActivityType; -import org.chromium.chrome.browser.profiles.Profile; +import org.chromium.chrome.browser.profiles.ProfileProvider; import org.chromium.chrome.browser.tabmodel.IncognitoTabModelImpl.IncognitoTabModelDelegate; import org.chromium.chrome.browser.tabmodel.NextTabPolicy.NextTabPolicySupplier; -import org.chromium.ui.base.WindowAndroid; /** * Stores all the variables needed to create an Incognito TabModelImpl when it is needed. */ class IncognitoTabModelImplCreator implements IncognitoTabModelDelegate { + private final ProfileProvider mProfileProvider; private final TabCreator mRegularTabCreator; private final TabCreator mIncognitoTabCreator; private final TabModelOrderController mOrderController; @@ -28,36 +25,36 @@ private final AsyncTabParamsManager mAsyncTabParamsManager; private final TabModelDelegate mModelDelegate; - // This is passed in as null if the {@link WindowAndroid} instance doesn't belong to an - // incognito CustomTabActivity. - @Nullable - private final Supplier<WindowAndroid> mWindowAndroidSupplier; - private final @ActivityType int mActivityType; + /** * Constructor for an IncognitoTabModelImplCreator, used by {@link IncognitoTabModelImpl}. * - * Creating an instance of this class does not create the Incognito TabModelImpl immediately. + * <p>Creating an instance of this class does not create the Incognito TabModelImpl immediately. * The {@link IncognitoTabModelImpl} will use this class to create the real TabModelImpl when it * will actually be used. * - * @param windowAndroidSupplier The supplier to the {@link WindowAndroid} instance. - * @param regularTabCreator Creates regular tabs. + * @param profileProvider Provides access to the necessary Profiles for this model. + * @param regularTabCreator Creates regular tabs. * @param incognitoTabCreator Creates incognito tabs. - * @param orderController Determines the order for inserting new Tabs. - * @param tabContentManager Manages the display content of the tab. + * @param orderController Determines the order for inserting new Tabs. + * @param tabContentManager Manages the display content of the tab. * @param nextTabPolicySupplier Supplies the policy to pick a next tab if the current is closed * @param asyncTabParamsManager An {@link AsyncTabParamsManager} instance. * @param activityType Type of the activity for the tab model. * @param modelDelegate Delegate to handle external dependencies and interactions. */ - IncognitoTabModelImplCreator(@Nullable Supplier<WindowAndroid> windowAndroidSupplier, - TabCreator regularTabCreator, TabCreator incognitoTabCreator, - TabModelOrderController orderController, TabContentManager tabContentManager, + IncognitoTabModelImplCreator( + ProfileProvider profileProvider, + TabCreator regularTabCreator, + TabCreator incognitoTabCreator, + TabModelOrderController orderController, + TabContentManager tabContentManager, NextTabPolicySupplier nextTabPolicySupplier, - AsyncTabParamsManager asyncTabParamsManager, @ActivityType int activityType, + AsyncTabParamsManager asyncTabParamsManager, + @ActivityType int activityType, TabModelDelegate modelDelegate) { - mWindowAndroidSupplier = windowAndroidSupplier; + mProfileProvider = profileProvider; mRegularTabCreator = regularTabCreator; mIncognitoTabCreator = incognitoTabCreator; mOrderController = orderController; @@ -68,34 +65,19 @@ mModelDelegate = modelDelegate; } - private Profile getOTRProfile() { - if (mActivityType == ActivityType.TABBED) { - // The Incognito profile hasn't been created yet when this method is called for the - // first time. The {@link IncognitoTabModelImpl} class creates an {@link EmptyTabModel} - // in the beginning and only later creates the profile when a user switches from a - // regular {@link TabModel} to Incognito {@link TabModel}. - return Profile.getLastUsedRegularProfile().getPrimaryOTRProfile( - /*createIfNeeded=*/true); - } else if (mActivityType == ActivityType.CUSTOM_TAB) { - assert (mWindowAndroidSupplier != null) - : "Incognito CCT relies on a non null instance of WindowAndroidSupplier " - + "to fetch non primary OTR profile."; - Profile otrProfile = - getNonPrimaryOTRProfileFromWindowAndroid(mWindowAndroidSupplier.get()); - assert (otrProfile != null) - : "Failed to find the non-primary OTR profile associated with the Incognito CCT."; - return otrProfile; - } else { - assert false : "Incognito is currently only supported for a Tabbed/CustomTab Activity."; - return null; - } - } - @Override public TabModel createTabModel() { - return new TabModelImpl(getOTRProfile(), mActivityType, mRegularTabCreator, - mIncognitoTabCreator, mOrderController, mTabContentManager, mNextTabPolicySupplier, - mAsyncTabParamsManager, mModelDelegate, false); + return new TabModelImpl( + mProfileProvider.getOffTheRecordProfile(true), + mActivityType, + mRegularTabCreator, + mIncognitoTabCreator, + mOrderController, + mTabContentManager, + mNextTabPolicySupplier, + mAsyncTabParamsManager, + mModelDelegate, + false); } }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelSelectorImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelSelectorImpl.java index 5d7832fb..ba89d53f6 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelSelectorImpl.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelSelectorImpl.java
@@ -9,11 +9,11 @@ import androidx.annotation.Nullable; import androidx.annotation.VisibleForTesting; -import org.chromium.base.supplier.Supplier; +import org.chromium.base.supplier.OneshotSupplier; import org.chromium.chrome.browser.compositor.layouts.content.TabContentManager; import org.chromium.chrome.browser.flags.ActivityType; import org.chromium.chrome.browser.ntp.RecentlyClosedBridge; -import org.chromium.chrome.browser.profiles.Profile; +import org.chromium.chrome.browser.profiles.ProfileProvider; import org.chromium.chrome.browser.tab.SadTab; import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.browser.tab.TabCreationState; @@ -39,44 +39,41 @@ private final AtomicBoolean mSessionRestoreInProgress = new AtomicBoolean(true); - private boolean mIsUndoSupported; - // Type of the Activity for this tab model. Used by sync to determine how to handle restore // on cold start. private final @ActivityType int mActivityType; - private final TabModelOrderController mOrderController; - private final AsyncTabParamsManager mAsyncTabParamsManager; + private final OneshotSupplier<ProfileProvider> mProfileProviderSupplier; + private boolean mIsUndoSupported; private NextTabPolicySupplier mNextTabPolicySupplier; - private TabContentManager mTabContentManager; - private RecentlyClosedBridge mRecentlyClosedBridge; - private Tab mVisibleTab; - private final Supplier<WindowAndroid> mWindowAndroidSupplier; - /** * Builds a {@link TabModelSelectorImpl} instance. - * @param windowAndroidSupplier A supplier of {@link WindowAndroid} instance which is passed - * down to {@link IncognitoTabModelImplCreator} for creating {@link IncognitoTabModel}. + * + * @param profileProviderSupplier Provides the Profiles used in this selector. * @param tabCreatorManager A {@link TabCreatorManager} instance. * @param tabModelFilterFactory * @param nextTabPolicySupplier * @param asyncTabParamsManager - * @param activityType Type of the activity for the tab model selector. * @param supportUndo Whether a tab closure can be undone. + * @param activityType Type of the activity for the tab model selector. */ - public TabModelSelectorImpl(@Nullable Supplier<WindowAndroid> windowAndroidSupplier, - TabCreatorManager tabCreatorManager, TabModelFilterFactory tabModelFilterFactory, + public TabModelSelectorImpl( + OneshotSupplier<ProfileProvider> profileProviderSupplier, + TabCreatorManager tabCreatorManager, + TabModelFilterFactory tabModelFilterFactory, NextTabPolicySupplier nextTabPolicySupplier, - AsyncTabParamsManager asyncTabParamsManager, boolean supportUndo, - @ActivityType int activityType, boolean startIncognito) { + AsyncTabParamsManager asyncTabParamsManager, + boolean supportUndo, + @ActivityType int activityType, + boolean startIncognito) { super(tabCreatorManager, tabModelFilterFactory, startIncognito); - mWindowAndroidSupplier = windowAndroidSupplier; + mProfileProviderSupplier = profileProviderSupplier; mIsUndoSupported = supportUndo; mOrderController = new TabModelOrderControllerImpl(this); mNextTabPolicySupplier = nextTabPolicySupplier; @@ -109,21 +106,41 @@ public void onNativeLibraryReady(TabContentManager tabContentProvider) { assert mTabContentManager == null : "onNativeLibraryReady called twice!"; + ProfileProvider profileProvider = mProfileProviderSupplier.get(); + assert profileProvider != null; + ChromeTabCreator regularTabCreator = (ChromeTabCreator) getTabCreatorManager().getTabCreator(false); ChromeTabCreator incognitoTabCreator = (ChromeTabCreator) getTabCreatorManager().getTabCreator(true); - mRecentlyClosedBridge = new RecentlyClosedBridge(Profile.getLastUsedRegularProfile(), this); - TabModelImpl normalModel = new TabModelImpl(Profile.getLastUsedRegularProfile(), - mActivityType, regularTabCreator, incognitoTabCreator, mOrderController, - tabContentProvider, mNextTabPolicySupplier, mAsyncTabParamsManager, this, - mIsUndoSupported); + mRecentlyClosedBridge = + new RecentlyClosedBridge(profileProvider.getOriginalProfile(), this); + TabModelImpl normalModel = + new TabModelImpl( + profileProvider.getOriginalProfile(), + mActivityType, + regularTabCreator, + incognitoTabCreator, + mOrderController, + tabContentProvider, + mNextTabPolicySupplier, + mAsyncTabParamsManager, + this, + mIsUndoSupported); regularTabCreator.setTabModel(normalModel, mOrderController); - IncognitoTabModel incognitoModel = new IncognitoTabModelImpl( - new IncognitoTabModelImplCreator(mWindowAndroidSupplier, regularTabCreator, - incognitoTabCreator, mOrderController, tabContentProvider, - mNextTabPolicySupplier, mAsyncTabParamsManager, mActivityType, this)); + IncognitoTabModel incognitoModel = + new IncognitoTabModelImpl( + new IncognitoTabModelImplCreator( + profileProvider, + regularTabCreator, + incognitoTabCreator, + mOrderController, + tabContentProvider, + mNextTabPolicySupplier, + mAsyncTabParamsManager, + mActivityType, + this)); incognitoTabCreator.setTabModel(incognitoModel, mOrderController); onNativeLibraryReadyInternal(tabContentProvider, normalModel, incognitoModel); }
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/app/bookmarks/BookmarkTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/app/bookmarks/BookmarkTest.java index 28037be..d7c994d 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/app/bookmarks/BookmarkTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/app/bookmarks/BookmarkTest.java
@@ -109,7 +109,6 @@ import org.chromium.components.browser_ui.widget.NumberRollView; import org.chromium.components.browser_ui.widget.RecyclerViewTestUtils; import org.chromium.components.browser_ui.widget.dragreorder.DragReorderableRecyclerViewAdapter; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButton; import org.chromium.components.browser_ui.widget.selectable_list.SelectableListToolbar.NavigationButton; import org.chromium.components.browser_ui.widget.selectable_list.SelectableListToolbar.ViewType; import org.chromium.components.embedder_support.util.UrlConstants; @@ -122,6 +121,7 @@ import org.chromium.content_public.browser.test.util.TouchCommon; import org.chromium.net.test.EmbeddedTestServer; import org.chromium.ui.accessibility.AccessibilityState; +import org.chromium.ui.listmenu.ListMenuButton; import org.chromium.ui.test.util.NightModeTestUtils; import org.chromium.ui.test.util.UiRestriction; import org.chromium.url.GURL;
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/bookmarks/ImprovedBookmarkRowRenderTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/bookmarks/ImprovedBookmarkRowRenderTest.java index daf237bb..353c5df3d 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/bookmarks/ImprovedBookmarkRowRenderTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/bookmarks/ImprovedBookmarkRowRenderTest.java
@@ -43,13 +43,13 @@ import org.chromium.chrome.test.util.ChromeRenderTestRule; import org.chromium.chrome.test.util.browser.Features; import org.chromium.components.browser_ui.widget.BrowserUiListMenuUtils; -import org.chromium.components.browser_ui.widget.listmenu.ListMenu; import org.chromium.components.commerce.core.ShoppingService; import org.chromium.components.payments.CurrencyFormatter; import org.chromium.components.payments.CurrencyFormatterJni; import org.chromium.components.power_bookmarks.ProductPrice; import org.chromium.components.power_bookmarks.ShoppingSpecifics; import org.chromium.content_public.browser.test.util.TestThreadUtils; +import org.chromium.ui.listmenu.ListMenu; import org.chromium.ui.modelutil.MVCListAdapter.ModelList; import org.chromium.ui.modelutil.PropertyModel; import org.chromium.ui.modelutil.PropertyModelChangeProcessor;
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabTabPersistencePolicyTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabTabPersistencePolicyTest.java index 9e3207d..fd2cae09 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabTabPersistencePolicyTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabTabPersistencePolicyTest.java
@@ -30,6 +30,7 @@ import org.chromium.base.Callback; import org.chromium.base.ContextUtils; import org.chromium.base.StreamUtil; +import org.chromium.base.supplier.OneshotSupplierImpl; import org.chromium.base.task.PostTask; import org.chromium.base.task.SequencedTaskRunner; import org.chromium.base.task.TaskRunner; @@ -44,6 +45,7 @@ import org.chromium.chrome.browser.app.tabmodel.CustomTabsTabModelOrchestrator; import org.chromium.chrome.browser.compositor.layouts.content.TabContentManager; import org.chromium.chrome.browser.profiles.Profile; +import org.chromium.chrome.browser.profiles.ProfileProvider; import org.chromium.chrome.browser.tab.MockTab; import org.chromium.chrome.browser.tabmodel.TabModelSelector; import org.chromium.chrome.browser.tabmodel.TabModelSelectorImpl; @@ -71,6 +73,7 @@ /** Tests for the Custom Tab persistence logic. */ @RunWith(ChromeJUnit4ClassRunner.class) public class CustomTabTabPersistencePolicyTest { + @Mock private ProfileProvider mProfileProvider; @Mock private Profile mProfile; @Mock private Profile mIncognitoProfile; @@ -509,9 +512,13 @@ ApplicationStatus.registerStateListenerForActivity(stateListener, customTabActivity); ApplicationStatus.onStateChangeForTesting(customTabActivity, ActivityState.STARTED); + OneshotSupplierImpl<ProfileProvider> profileProviderSupplier = new OneshotSupplierImpl<>(); + profileProviderSupplier.set(mProfileProvider); + Mockito.when(mProfileProvider.getOriginalProfile()).thenReturn(mProfile); + CustomTabsTabModelOrchestrator orchestrator = new CustomTabsTabModelOrchestrator(); orchestrator.createTabModels( - customTabActivity::getWindowAndroid, + profileProviderSupplier, customTabActivity, new ChromeTabModelFilterFactory(customTabActivity), buildTestPersistencePolicy(),
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/signin/SigninFirstRunFragmentTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/signin/SigninFirstRunFragmentTest.java index 6ad7d48..c38c40d 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/signin/SigninFirstRunFragmentTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/signin/SigninFirstRunFragmentTest.java
@@ -37,7 +37,6 @@ import android.content.res.Configuration; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; -import android.os.Build.VERSION_CODES; import android.widget.ProgressBar; import androidx.appcompat.app.AppCompatDelegate; @@ -64,7 +63,6 @@ import org.chromium.base.test.util.CallbackHelper; import org.chromium.base.test.util.CommandLineFlags; import org.chromium.base.test.util.CriteriaHelper; -import org.chromium.base.test.util.DisableIf; import org.chromium.base.test.util.DisabledTest; import org.chromium.base.test.util.DoNotBatch; import org.chromium.base.test.util.HistogramWatcher; @@ -260,7 +258,6 @@ @Test @MediumTest - @DisabledTest(message = "https://crbug.com/1429072") public void testFragmentWhenRemovingChildAccountDynamically() { mSigninTestRule.addAccount( CHILD_ACCOUNT_EMAIL, CHILD_FULL_NAME, /* givenName= */ null, /* avatar= */ null); @@ -296,7 +293,6 @@ @Test @MediumTest - @DisabledTest(message = "https://crbug.com/1434098") public void testRemovingAllAccountsDismissesAccountPickerDialog() { mSigninTestRule.addAccount(TEST_EMAIL1, FULL_NAME1, GIVEN_NAME1, /* avatar= */ null); launchActivityWithFragment(); @@ -441,7 +437,6 @@ @Test @MediumTest - @DisableIf.Build(sdk_is_less_than = VERSION_CODES.Q, message = "https://crbug.com/1434098") public void testFragmentWhenChoosingAnotherAccount() { mSigninTestRule.addAccount(TEST_EMAIL1, FULL_NAME1, GIVEN_NAME1, null); mSigninTestRule.addAccount( @@ -973,7 +968,6 @@ @Test @MediumTest - @DisabledTest(message = "https://crbug.com/1429072") public void testFragmentWhenAddingAnotherAccount() { mSigninTestRule.setResultForNextAddAccountFlow(Activity.RESULT_OK, TEST_EMAIL2); mSigninTestRule.addAccount(TEST_EMAIL1, FULL_NAME1, GIVEN_NAME1, null);
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/site_settings/WebsitePermissionsFetcherTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/site_settings/WebsitePermissionsFetcherTest.java index 8675cc5..36b26f6 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/site_settings/WebsitePermissionsFetcherTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/site_settings/WebsitePermissionsFetcherTest.java
@@ -590,7 +590,7 @@ // If the ContentSettingsType.NUM_TYPES value changes *and* a new value has been exposed on // Android, then please update this code block to include a test for your new type. // Otherwise, just update count in the assert. - Assert.assertEquals(94, ContentSettingsType.NUM_TYPES); + Assert.assertEquals(95, ContentSettingsType.NUM_TYPES); websitePreferenceBridge.addContentSettingException( new ContentSettingException( ContentSettingsType.COOKIES,
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/tabmodel/ContextMenuLoadUrlParamsTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/tabmodel/ContextMenuLoadUrlParamsTest.java index 23d08b9d..5a448fa 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/tabmodel/ContextMenuLoadUrlParamsTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/tabmodel/ContextMenuLoadUrlParamsTest.java
@@ -19,6 +19,7 @@ import org.junit.Test; import org.junit.runner.RunWith; +import org.chromium.base.supplier.OneshotSupplier; import org.chromium.base.test.util.Batch; import org.chromium.base.test.util.CommandLineFlags; import org.chromium.base.test.util.Feature; @@ -28,6 +29,7 @@ import org.chromium.chrome.browser.firstrun.FirstRunStatus; import org.chromium.chrome.browser.flags.ActivityType; import org.chromium.chrome.browser.flags.ChromeSwitches; +import org.chromium.chrome.browser.profiles.ProfileProvider; import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.browser.tab.TabLaunchType; import org.chromium.chrome.browser.tabmodel.NextTabPolicy.NextTabPolicySupplier; @@ -77,11 +79,12 @@ public RecordingTabModelSelector( Activity activity, + OneshotSupplier<ProfileProvider> profileProviderSupplier, TabCreatorManager tabCreatorManager, TabModelFilterFactory tabModelFilterFactory, int selectorIndex) { super( - null, + profileProviderSupplier, tabCreatorManager, tabModelFilterFactory, () -> NextTabPolicy.HIERARCHICAL, @@ -102,11 +105,13 @@ @Override public TabModelSelector buildSelector( Activity activity, + OneshotSupplier<ProfileProvider> profileProviderSupplier, TabCreatorManager tabCreatorManager, NextTabPolicySupplier nextTabPolicySupplier, int selectorIndex) { return new RecordingTabModelSelector( activity, + profileProviderSupplier, tabCreatorManager, new ChromeTabModelFilterFactory(activity), selectorIndex);
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/tabmodel/TabPersistentStoreTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/tabmodel/TabPersistentStoreTest.java index eb8fecc5..b0c6917 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/tabmodel/TabPersistentStoreTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/tabmodel/TabPersistentStoreTest.java
@@ -45,6 +45,7 @@ import org.chromium.chrome.browser.compositor.overlays.strip.StripLayoutHelper; import org.chromium.chrome.browser.flags.ActivityType; import org.chromium.chrome.browser.flags.ChromeSwitches; +import org.chromium.chrome.browser.init.ActivityProfileProvider; import org.chromium.chrome.browser.preferences.ChromePreferenceKeys; import org.chromium.chrome.browser.preferences.ChromeSharedPreferences; import org.chromium.chrome.browser.profiles.Profile; @@ -263,6 +264,7 @@ @Override public TabModelSelector buildSelector( Activity activity, + OneshotSupplier<ProfileProvider> profileProviderSupplier, TabCreatorManager tabCreatorManager, NextTabPolicySupplier nextTabPolicySupplier, int selectorIndex) { @@ -1073,7 +1075,13 @@ mChromeActivity, ActivityState.DESTROYED); return (TestTabModelSelector) sTabWindowManager.requestSelector( - mChromeActivity, mChromeActivity, null, 0) + mChromeActivity, + new ActivityProfileProvider( + mChromeActivity + .getLifecycleDispatcher()), + mChromeActivity, + null, + 0) .second; } });
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/tabmodel/TabbedModeTabPersistencePolicyTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/tabmodel/TabbedModeTabPersistencePolicyTest.java index 3eb27c2..762a041b 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/tabmodel/TabbedModeTabPersistencePolicyTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/tabmodel/TabbedModeTabPersistencePolicyTest.java
@@ -25,6 +25,8 @@ import org.chromium.base.ApplicationStatus; import org.chromium.base.ContextUtils; +import org.chromium.base.supplier.OneshotSupplier; +import org.chromium.base.supplier.OneshotSupplierImpl; import org.chromium.base.test.util.AdvancedMockContext; import org.chromium.base.test.util.CallbackHelper; import org.chromium.base.test.util.Feature; @@ -33,6 +35,7 @@ import org.chromium.chrome.browser.app.tabmodel.TabbedModeTabModelOrchestrator; import org.chromium.chrome.browser.price_tracking.PriceTrackingFeatures; import org.chromium.chrome.browser.profiles.Profile; +import org.chromium.chrome.browser.profiles.ProfileProvider; import org.chromium.chrome.browser.tab.MockTab; import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.browser.tab.TabState; @@ -62,6 +65,7 @@ @Rule public MockitoRule mMockitoRule = MockitoJUnit.rule(); + @Mock ProfileProvider mProfileProvider; @Mock Profile mProfile; @Mock Profile mIncognitoProfile; @@ -75,6 +79,7 @@ @Override public TabModelSelector buildSelector( Activity activity, + OneshotSupplier<ProfileProvider> profileProviderSupplier, TabCreatorManager tabCreatorManager, NextTabPolicySupplier nextTabPolicySupplier, int selectorIndex) { @@ -95,6 +100,7 @@ TabStateDirectory.TABBED_MODE_DIRECTORY); TabStateDirectory.setBaseStateDirectoryForTests(mMockDirectory.getBaseDirectory()); + Mockito.when(mProfileProvider.getOriginalProfile()).thenReturn(mProfile); Mockito.when(mIncognitoProfile.isOffTheRecord()).thenReturn(true); PriceTrackingFeatures.setPriceTrackingEnabledForTesting(false); } @@ -141,10 +147,17 @@ TabbedModeTabModelOrchestrator orchestrator = TestThreadUtils.runOnUiThreadBlocking( () -> { + OneshotSupplierImpl<ProfileProvider> profileProviderSupplier = + new OneshotSupplierImpl<>(); + profileProviderSupplier.set(mProfileProvider); TabbedModeTabModelOrchestrator tmpOrchestrator = new TabbedModeTabModelOrchestrator(false); tmpOrchestrator.createTabModels( - new ChromeTabbedActivity(), null, null, 0); + new ChromeTabbedActivity(), + profileProviderSupplier, + null, + null, + 0); TabModelSelector selector = tmpOrchestrator.getTabModelSelector(); ((MockTabModelSelector) selector) .initializeTabModels(normalTabModel, incognitoTabModel);
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveButtonActionMenuRenderTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveButtonActionMenuRenderTest.java index fca3cc4..187b1b0e 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveButtonActionMenuRenderTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveButtonActionMenuRenderTest.java
@@ -32,8 +32,8 @@ import org.chromium.chrome.test.R; import org.chromium.chrome.test.util.ChromeRenderTestRule; import org.chromium.chrome.test.util.browser.Features.EnableFeatures; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButton; import org.chromium.content_public.browser.test.util.TestThreadUtils; +import org.chromium.ui.listmenu.ListMenuButton; import org.chromium.ui.test.util.BlankUiTestActivity; import org.chromium.ui.test.util.NightModeTestUtils;
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/top/StartSurfaceTabSwitcherActionMenuRenderTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/top/StartSurfaceTabSwitcherActionMenuRenderTest.java index 4fdc63e51..f134050 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/top/StartSurfaceTabSwitcherActionMenuRenderTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/top/StartSurfaceTabSwitcherActionMenuRenderTest.java
@@ -26,8 +26,8 @@ import org.chromium.chrome.test.ChromeJUnit4RunnerDelegate; import org.chromium.chrome.test.R; import org.chromium.chrome.test.util.ChromeRenderTestRule; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButton; import org.chromium.content_public.browser.test.util.TestThreadUtils; +import org.chromium.ui.listmenu.ListMenuButton; import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import org.chromium.ui.test.util.NightModeTestUtils;
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/top/TabSwitcherActionMenuRenderTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/top/TabSwitcherActionMenuRenderTest.java index 586d5dc..136464a 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/top/TabSwitcherActionMenuRenderTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/toolbar/top/TabSwitcherActionMenuRenderTest.java
@@ -26,8 +26,8 @@ import org.chromium.chrome.test.ChromeJUnit4RunnerDelegate; import org.chromium.chrome.test.R; import org.chromium.chrome.test.util.ChromeRenderTestRule; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButton; import org.chromium.content_public.browser.test.util.TestThreadUtils; +import org.chromium.ui.listmenu.ListMenuButton; import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import org.chromium.ui.test.util.NightModeTestUtils;
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/app/tabmodel/TabPersistentStoreIntegrationTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/app/tabmodel/TabPersistentStoreIntegrationTest.java index ce77bc52..f4561d6 100644 --- a/chrome/android/junit/src/org/chromium/chrome/browser/app/tabmodel/TabPersistentStoreIntegrationTest.java +++ b/chrome/android/junit/src/org/chromium/chrome/browser/app/tabmodel/TabPersistentStoreIntegrationTest.java
@@ -31,6 +31,7 @@ import org.robolectric.annotation.LooperMode; import org.robolectric.annotation.LooperMode.Mode; +import org.chromium.base.supplier.OneshotSupplierImpl; import org.chromium.base.task.PostTask; import org.chromium.base.test.BaseRobolectricTestRunner; import org.chromium.base.test.util.Feature; @@ -42,6 +43,7 @@ import org.chromium.chrome.browser.ntp.RecentlyClosedBridgeJni; import org.chromium.chrome.browser.price_tracking.PriceTrackingFeatures; import org.chromium.chrome.browser.profiles.Profile; +import org.chromium.chrome.browser.profiles.ProfileProvider; import org.chromium.chrome.browser.tab.MockTab; import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.browser.tab.TabCreationState; @@ -99,6 +101,7 @@ @Mock private NextTabPolicySupplier mNextTabPolicySupplier; @Mock private TabContentManager mTabContentManager; @Mock private Profile mProfile; + @Mock private ProfileProvider mProfileProvider; @Mock private TabModelJniBridge.Natives mTabModelJniBridgeJni; @Mock private RecentlyClosedBridge.Natives mRecentlyClosedBridgeJni; @Mock private Resources mResources; @@ -119,16 +122,23 @@ when(mResources.getInteger(org.chromium.ui.R.integer.min_screen_width_bucket)) .thenReturn(1); when(mTabCreatorManager.getTabCreator(anyBoolean())).thenReturn(mChromeTabCreator); - mOrchestrator = new TabbedModeTabModelOrchestrator(/* tabMergingEnabled= */ true); - mOrchestrator.createTabModels( - mChromeActivity, mTabCreatorManager, mNextTabPolicySupplier, 0); - mTabModelSelector = mOrchestrator.getTabModelSelector(); - mTabPersistentStore = mOrchestrator.getTabPersistentStore(); // Pretend native was loaded, creating TabModelImpls. - Profile.setLastUsedProfileForTesting(mProfile); + OneshotSupplierImpl<ProfileProvider> profileProviderSupplier = new OneshotSupplierImpl<>(); + profileProviderSupplier.set(mProfileProvider); + when(mProfileProvider.getOriginalProfile()).thenReturn(mProfile); PriceTrackingFeatures.setPriceTrackingEnabledForTesting(false); + mOrchestrator = new TabbedModeTabModelOrchestrator(/* tabMergingEnabled= */ true); + mOrchestrator.createTabModels( + mChromeActivity, + profileProviderSupplier, + mTabCreatorManager, + mNextTabPolicySupplier, + 0); + mTabModelSelector = mOrchestrator.getTabModelSelector(); + mTabPersistentStore = mOrchestrator.getTabPersistentStore(); + jniMocker.mock(TabModelJniBridgeJni.TEST_HOOKS, mTabModelJniBridgeJni); jniMocker.mock(RecentlyClosedBridgeJni.TEST_HOOKS, mRecentlyClosedBridgeJni); jniMocker.mock(TabImplJni.TEST_HOOKS, mTabImplJni);
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/app/tabmodel/TabbedModeTabModelOrchestratorUnitTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/app/tabmodel/TabbedModeTabModelOrchestratorUnitTest.java index e149433..9596685e 100644 --- a/chrome/android/junit/src/org/chromium/chrome/browser/app/tabmodel/TabbedModeTabModelOrchestratorUnitTest.java +++ b/chrome/android/junit/src/org/chromium/chrome/browser/app/tabmodel/TabbedModeTabModelOrchestratorUnitTest.java
@@ -19,13 +19,14 @@ import org.mockito.Mock; import org.mockito.MockitoAnnotations; +import org.chromium.base.supplier.OneshotSupplierImpl; import org.chromium.base.task.AsyncTask; import org.chromium.base.test.BaseRobolectricTestRunner; import org.chromium.base.test.util.Feature; import org.chromium.chrome.browser.ChromeTabbedActivity; import org.chromium.chrome.browser.multiwindow.MultiWindowTestUtils; import org.chromium.chrome.browser.multiwindow.MultiWindowUtils; -import org.chromium.chrome.browser.tabmodel.ChromeTabCreator; +import org.chromium.chrome.browser.profiles.ProfileProvider; import org.chromium.chrome.browser.tabmodel.NextTabPolicy.NextTabPolicySupplier; import org.chromium.chrome.browser.tabmodel.TabCreatorManager; @@ -37,9 +38,12 @@ public class TabbedModeTabModelOrchestratorUnitTest { @Mock private ChromeTabbedActivity mChromeActivity; @Mock private TabCreatorManager mTabCreatorManager; - @Mock private ChromeTabCreator mChromeTabCreator; + @Mock private ProfileProvider mProfileProvider; @Mock private NextTabPolicySupplier mNextTabPolicySupplier; + private OneshotSupplierImpl<ProfileProvider> mProfileProviderSupplier = + new OneshotSupplierImpl<>(); + // TabbedModeTabModelOrchestrator running on Android S where tab merging into other instance // is not performed. private class TabbedModeTabModelOrchestratorApi31 extends TabbedModeTabModelOrchestrator { @@ -56,6 +60,7 @@ @Before public void setUp() { MockitoAnnotations.initMocks(this); + mProfileProviderSupplier.set(mProfileProvider); } @After @@ -77,7 +82,11 @@ assertEquals(0, MultiWindowUtils.getInstanceCount()); TabbedModeTabModelOrchestrator orchestrator = new TabbedModeTabModelOrchestratorApi31(); orchestrator.createTabModels( - mChromeActivity, mTabCreatorManager, mNextTabPolicySupplier, 0); + mChromeActivity, + mProfileProviderSupplier, + mTabCreatorManager, + mNextTabPolicySupplier, + 0); List<Pair<AsyncTask<DataInputStream>, String>> tabStatesToMerge; tabStatesToMerge = orchestrator.getTabPersistentStore().getTabListToMergeTasksForTesting(); assertFalse("Should have a tab state file to merge", tabStatesToMerge.isEmpty()); @@ -88,7 +97,11 @@ // Once an instance is created, no more merging is allowed. orchestrator = new TabbedModeTabModelOrchestratorApi31(); orchestrator.createTabModels( - mChromeActivity, mTabCreatorManager, mNextTabPolicySupplier, 1); + mChromeActivity, + mProfileProviderSupplier, + mTabCreatorManager, + mNextTabPolicySupplier, + 1); tabStatesToMerge = orchestrator.getTabPersistentStore().getTabListToMergeTasksForTesting(); assertTrue("Should not have any tab state file to merge", tabStatesToMerge.isEmpty()); }
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/bookmarks/BookmarkManagerMediatorTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/bookmarks/BookmarkManagerMediatorTest.java index 1486bb6f..0698e93c 100644 --- a/chrome/android/junit/src/org/chromium/chrome/browser/bookmarks/BookmarkManagerMediatorTest.java +++ b/chrome/android/junit/src/org/chromium/chrome/browser/bookmarks/BookmarkManagerMediatorTest.java
@@ -98,8 +98,6 @@ import org.chromium.components.browser_ui.widget.dragreorder.DragReorderableRecyclerViewAdapter.DragListener; import org.chromium.components.browser_ui.widget.dragreorder.DragReorderableRecyclerViewAdapter.DraggabilityProvider; import org.chromium.components.browser_ui.widget.dragreorder.DragStateDelegate; -import org.chromium.components.browser_ui.widget.listmenu.BasicListMenu; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuItemProperties; import org.chromium.components.browser_ui.widget.selectable_list.SelectableListLayout; import org.chromium.components.browser_ui.widget.selectable_list.SelectionDelegate; import org.chromium.components.browser_ui.widget.selectable_list.SelectionDelegate.SelectionObserver; @@ -122,6 +120,8 @@ import org.chromium.components.url_formatter.UrlFormatter; import org.chromium.ui.accessibility.AccessibilityState; import org.chromium.ui.base.TestActivity; +import org.chromium.ui.listmenu.BasicListMenu; +import org.chromium.ui.listmenu.ListMenuItemProperties; import org.chromium.ui.modelutil.ListObservable; import org.chromium.ui.modelutil.MVCListAdapter.ListItem; import org.chromium.ui.modelutil.MVCListAdapter.ModelList;
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/bookmarks/ImprovedBookmarkRowTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/bookmarks/ImprovedBookmarkRowTest.java index 00c0ce72..a9ed9dac 100644 --- a/chrome/android/junit/src/org/chromium/chrome/browser/bookmarks/ImprovedBookmarkRowTest.java +++ b/chrome/android/junit/src/org/chromium/chrome/browser/bookmarks/ImprovedBookmarkRowTest.java
@@ -45,8 +45,8 @@ import org.chromium.base.test.util.Batch; import org.chromium.chrome.R; import org.chromium.chrome.browser.bookmarks.ImprovedBookmarkRowProperties.ImageVisibility; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButtonDelegate; import org.chromium.ui.base.TestActivity; +import org.chromium.ui.listmenu.ListMenuButtonDelegate; import org.chromium.ui.modelutil.PropertyModel; import org.chromium.ui.modelutil.PropertyModelChangeProcessor;
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/feed/FeedSurfaceMediatorTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/feed/FeedSurfaceMediatorTest.java index 8d3d992..c9adfbb6 100644 --- a/chrome/android/junit/src/org/chromium/chrome/browser/feed/FeedSurfaceMediatorTest.java +++ b/chrome/android/junit/src/org/chromium/chrome/browser/feed/FeedSurfaceMediatorTest.java
@@ -73,11 +73,11 @@ import org.chromium.components.browser_ui.widget.displaystyle.UiConfig; import org.chromium.components.browser_ui.widget.displaystyle.UiConfig.DisplayStyle; import org.chromium.components.browser_ui.widget.displaystyle.VerticalDisplayStyle; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuItemProperties; import org.chromium.components.prefs.PrefService; import org.chromium.components.search_engines.TemplateUrlService; import org.chromium.components.search_engines.TemplateUrlService.TemplateUrlServiceObserver; import org.chromium.components.signin.identitymanager.IdentityManager; +import org.chromium.ui.listmenu.ListMenuItemProperties; import org.chromium.ui.modelutil.MVCListAdapter; import org.chromium.ui.modelutil.PropertyModel;
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31UnitTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31UnitTest.java index 4ecfa06..385b6f13 100644 --- a/chrome/android/junit/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31UnitTest.java +++ b/chrome/android/junit/src/org/chromium/chrome/browser/multiwindow/MultiInstanceManagerApi31UnitTest.java
@@ -50,6 +50,8 @@ import org.chromium.base.ApplicationStatus.ActivityStateListener; import org.chromium.base.ContextUtils; import org.chromium.base.supplier.ObservableSupplier; +import org.chromium.base.supplier.OneshotSupplier; +import org.chromium.base.supplier.OneshotSupplierImpl; import org.chromium.base.test.BaseRobolectricTestRunner; import org.chromium.base.test.UiThreadTest; import org.chromium.chrome.browser.ChromeTabbedActivity; @@ -61,6 +63,7 @@ import org.chromium.chrome.browser.preferences.ChromePreferenceKeys; import org.chromium.chrome.browser.preferences.ChromeSharedPreferences; import org.chromium.chrome.browser.profiles.Profile; +import org.chromium.chrome.browser.profiles.ProfileProvider; import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.browser.tabmodel.NextTabPolicy.NextTabPolicySupplier; import org.chromium.chrome.browser.tabmodel.TabCreatorManager; @@ -153,6 +156,7 @@ @Mock Profile mProfile; @Mock Profile mIncognitoProfile; + @Mock ProfileProvider mProfileProvider; @Mock TabModelSelectorBase mTabModelSelector; @Mock TabModel mNormalTabModel; @@ -185,6 +189,8 @@ private int mIncognitoTabCount; private Context mContextTabMove; + private OneshotSupplierImpl<ProfileProvider> mProfileProviderSupplier = + new OneshotSupplierImpl<>(); private static class TestMultiInstanceManagerApi31 extends MultiInstanceManagerApi31 { // Running tasks containing Chrome activity ~ ActivityManager.getAppTasks() @@ -336,6 +342,7 @@ when(mActivityManager.getAppTasks()).thenReturn(new ArrayList()); when(mTabModelOrchestratorSupplier.get()).thenReturn(mTabModelOrchestrator); + mProfileProviderSupplier.set(mProfileProvider); when(mIncognitoProfile.isOffTheRecord()).thenReturn(true); mActivityPool = @@ -355,6 +362,7 @@ @Override public TabModelSelector buildSelector( Activity activity, + OneshotSupplier<ProfileProvider> profileProviderSupplier, TabCreatorManager tabCreatorManager, NextTabPolicySupplier nextTabPolicySupplier, int selectorIndex) { @@ -880,7 +888,7 @@ // Does what TabModelOrchestrator.createTabModels() would do to simulate production code. Pair<Integer, TabModelSelector> pair = TabWindowManagerSingleton.getInstance() - .requestSelector(activity, null, null, index); + .requestSelector(activity, mProfileProviderSupplier, null, null, index); if (pair == null) return INVALID_INSTANCE_ID; int instanceId = pair.first;
diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/tabmodel/TabModelSelectorImplTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/tabmodel/TabModelSelectorImplTest.java index abf973a9..5efc243 100644 --- a/chrome/android/junit/src/org/chromium/chrome/browser/tabmodel/TabModelSelectorImplTest.java +++ b/chrome/android/junit/src/org/chromium/chrome/browser/tabmodel/TabModelSelectorImplTest.java
@@ -26,10 +26,12 @@ import org.robolectric.annotation.LooperMode; import org.robolectric.shadows.ShadowLooper; +import org.chromium.base.supplier.OneshotSupplierImpl; import org.chromium.base.test.BaseRobolectricTestRunner; import org.chromium.chrome.browser.compositor.layouts.content.TabContentManager; import org.chromium.chrome.browser.flags.ActivityType; import org.chromium.chrome.browser.profiles.Profile; +import org.chromium.chrome.browser.profiles.ProfileProvider; import org.chromium.chrome.browser.tab.MockTab; import org.chromium.chrome.browser.tab.TabCreationState; import org.chromium.chrome.browser.tab.TabDelegateFactory; @@ -57,6 +59,7 @@ IncognitoTabModelObserver.IncognitoReauthDialogDelegate mIncognitoReauthDialogDelegateMock; @Mock TabModelSelectorObserver mTabModelSelectorObserverMock; + @Mock ProfileProvider mProfileProvider; @Mock Profile mProfile; @Mock Profile mIncognitoProfile; @@ -75,16 +78,18 @@ AsyncTabParamsManager realAsyncTabParamsManager = AsyncTabParamsManagerFactory.createAsyncTabParamsManager(); + OneshotSupplierImpl<ProfileProvider> profileProviderSupplier = new OneshotSupplierImpl<>(); + profileProviderSupplier.set(mProfileProvider); mTabModelSelector = new TabModelSelectorImpl( - null, + profileProviderSupplier, mTabCreatorManager, mMockTabModelFilterFactory, mNextTabPolicySupplier, - realAsyncTabParamsManager, - /* supportUndo= */ false, - NO_RESTORE_TYPE, - /* startIncognito= */ false); + /* supportUndo= */ realAsyncTabParamsManager, + false, + /* startIncognito= */ NO_RESTORE_TYPE, + false); mTabCreatorManager.initialize(mTabModelSelector); mTabModelSelector.onNativeLibraryReadyInternal( mMockTabContentManager,
diff --git a/chrome/app/app-Info.plist b/chrome/app/app-Info.plist index ff644f1..5654e5c9 100644 --- a/chrome/app/app-Info.plist +++ b/chrome/app/app-Info.plist
@@ -416,5 +416,10 @@ <string>banner</string> <key>GPUEjectPolicy</key> <string>wait</string> + <key>NSAppTransportSecurity</key> + <dict> + <key>NSAllowsArbitraryLoads</key> + <true/> + </dict> </dict> </plist>
diff --git a/chrome/app/chromeos_strings.grdp b/chrome/app/chromeos_strings.grdp index 181a02a..969ba40 100644 --- a/chrome/app/chromeos_strings.grdp +++ b/chrome/app/chromeos_strings.grdp
@@ -6579,6 +6579,12 @@ <message name="IDS_AUTH_SETUP_SET_LOCAL_PASSWORD_CONFIRM_PLACEHOLDER" desc="Placeholder text for the input where the user should enter a new local password for a second time for confirmation."> Confirm password </message> + <message name="IDS_AUTH_SETUP_SHOW_PASSWORD" desc="A tooltip on a button that reveals the password."> + Show password + </message> + <message name="IDS_AUTH_SETUP_HIDE_PASSWORD" desc="A tooltip on a button that hides the password that is being shown."> + Hide password + </message> <message name="IDS_AUTH_SETUP_SET_LOCAL_PASSWORD_MIN_CHARS_HINT" desc="The hint about the minimal length of a password when the user sets a new password."> Password must be at least 8 characters </message>
diff --git a/chrome/app/chromeos_strings_grdp/IDS_AUTH_SETUP_HIDE_PASSWORD.png.sha1 b/chrome/app/chromeos_strings_grdp/IDS_AUTH_SETUP_HIDE_PASSWORD.png.sha1 new file mode 100644 index 0000000..fe913b4 --- /dev/null +++ b/chrome/app/chromeos_strings_grdp/IDS_AUTH_SETUP_HIDE_PASSWORD.png.sha1
@@ -0,0 +1 @@ +7ecd59679189399197222890aa1bd4e4ec148dd2 \ No newline at end of file
diff --git a/chrome/app/chromeos_strings_grdp/IDS_AUTH_SETUP_SHOW_PASSWORD.png.sha1 b/chrome/app/chromeos_strings_grdp/IDS_AUTH_SETUP_SHOW_PASSWORD.png.sha1 new file mode 100644 index 0000000..ad0ea81 --- /dev/null +++ b/chrome/app/chromeos_strings_grdp/IDS_AUTH_SETUP_SHOW_PASSWORD.png.sha1
@@ -0,0 +1 @@ +0fa9a7eac21499e38fa2df1550ac941341a9b8b3 \ No newline at end of file
diff --git a/chrome/app/resources/chromium_strings_ar.xtb b/chrome/app/resources/chromium_strings_ar.xtb index f4132ed..97a281b 100644 --- a/chrome/app/resources/chromium_strings_ar.xtb +++ b/chrome/app/resources/chromium_strings_ar.xtb
@@ -1,6 +1,7 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="ar"> +<translation id="1001716830750249114">الانتقال إلى صفحة إعدادات إصدار Chromium</translation> <translation id="1026101648481255140">استئناف التثبيت</translation> <translation id="1029669172902658969">إعادة التشغيل لتحديث نظام التشغيل &Chromium</translation> <translation id="1040916596585577953">ينصح Chromium بمراجعة هذه الإضافة</translation> @@ -29,6 +30,7 @@ <translation id="1632539827495546968">إذا أردت استخدام هذا الحساب لمرة واحدة فقط، يمكنك استخدام <ph name="GUEST_LINK_BEGIN" />وضع الضيف<ph name="GUEST_LINK_END" /> في متصفّح Chromium. وإذا أردت إضافة حساب لمستخدم آخر، <ph name="LINK_BEGIN" />أضِف مستخدمًا جديدًا<ph name="LINK_END" /> إلى <ph name="DEVICE_TYPE" />، مع العِلم بأنّ الأذونات التي سبق لك منحها إلى المواقع الإلكترونية والتطبيقات يمكن أن تنطبق على هذا الحساب. يمكنك إدارة حساباتك على Google من خلال <ph name="SETTINGS_LINK_BEGIN" />الإعدادات<ph name="SETTINGS_LINK_END" />.</translation> <translation id="1640672724030957280">جارٍ التنزيل...</translation> <translation id="1708666629004767631">يتوفر إصدار جديد وأكثر أمانًا Chromium.</translation> +<translation id="1715127912119967311">يُرسل Chromium تفاعلاتك مع هذه الميزات إلى Google للمساعدة في تحسينها. وقد يقرأ المراجعون هذه البيانات ويعالجونها ويضيفون تعليقات توضيحية إليها.</translation> <translation id="17264556997921157">يمكنك الاطّلاع على المواضيع التي تهمّك وتستخدمها المواقع الإلكترونية لعرض الإعلانات لك، وبإمكانك كذلك إزالة ما تشاء من هذه المواضيع. ويعمل Chromium على تقديم تقديرات حول اهتماماتك بناءً على سجل التصفّح الأخير.</translation> <translation id="1733725117201708356">سيحذف Chromium بيانات التصفُّح قريبًا</translation> <translation id="1745121272106313518">ستتم إعادة تشغيل Chromium خلال <ph name="REMAINING_TIME" /></translation>
diff --git a/chrome/app/resources/chromium_strings_be.xtb b/chrome/app/resources/chromium_strings_be.xtb index 1e5d9a4..da3a5777 100644 --- a/chrome/app/resources/chromium_strings_be.xtb +++ b/chrome/app/resources/chromium_strings_be.xtb
@@ -240,6 +240,7 @@ <translation id="5623402015214259806">{0,plural, =0{Ёсць абнаўленне Chromium}=1{Ёсць абнаўленне Chromium}one{Абнаўленне Chromium выйшла # дзень таму}few{Абнаўленне Chromium выйшла # дні таму}many{Абнаўленне Chromium выйшла # дзён таму}other{Абнаўленне Chromium выйшла # дня таму}}</translation> <translation id="5643865575100044307">Заўсёды выдаляць даныя сайтаў з прылады пры закрыцці Chromium</translation> <translation id="5653831366781983928">Перазапусціце Chromium</translation> +<translation id="5675598751761067447">Гэты файл можа быць небяспечным<ph name="LINE_BREAK" />Chromium можа праверыць спампоўку, калі вы ўведзяце пароль (ён застанецца на прыладзе)</translation> <translation id="5690427481109656848">Google LLC</translation> <translation id="5698481217667032250">Паказваць інтэрфейс браўзера Chromium на гэтай мове</translation> <translation id="569897634095159764">Не ўдалося падключыцца да інтэрнэту. Проксі-сервер патрабуе прайсці аўтэнтыфікацыю.</translation>
diff --git a/chrome/app/resources/chromium_strings_bs.xtb b/chrome/app/resources/chromium_strings_bs.xtb index 6832c1b..2241b1c 100644 --- a/chrome/app/resources/chromium_strings_bs.xtb +++ b/chrome/app/resources/chromium_strings_bs.xtb
@@ -240,6 +240,7 @@ <translation id="5623402015214259806">{0,plural, =0{Ažuriranje za Chromium je dostupno}=1{Ažuriranje za Chromium je dostupno}one{Ažuriranje za Chromium je dostupno # dan}few{Ažuriranje za Chromium je dostupno # dana}other{Ažuriranje za Chromium je dostupno # dana}}</translation> <translation id="5643865575100044307">Uvijek izbrišite podatke web lokacije s uređaja kada zatvorite Chromium</translation> <translation id="5653831366781983928">Ponovo pokrenite Chromium sada</translation> +<translation id="5675598751761067447">Datoteka može biti opasna<ph name="LINE_BREAK" />Chromium može provjeriti to preuzimanje za vas ako unesete zaporku — vaša zaporka ostaje na uređaju</translation> <translation id="5690427481109656848">Google LLC</translation> <translation id="5698481217667032250">Prikaži Chromium na ovom jeziku.</translation> <translation id="569897634095159764">Nije moguće povezati se s internetom. Proksi server zahtijeva autentifikaciju.</translation>
diff --git a/chrome/app/resources/chromium_strings_eu.xtb b/chrome/app/resources/chromium_strings_eu.xtb index 1f698b8..5fbf7977 100644 --- a/chrome/app/resources/chromium_strings_eu.xtb +++ b/chrome/app/resources/chromium_strings_eu.xtb
@@ -1,6 +1,7 @@ <?xml version="1.0" ?> <!DOCTYPE translationbundle> <translationbundle lang="eu"> +<translation id="1001716830750249114">Joan Chromium-en bertsioaren ezarpenetara</translation> <translation id="1026101648481255140">Berrekin instalazioari</translation> <translation id="1029669172902658969">&Chromium OS eguneratzeko, exekuta ezazu berriro</translation> <translation id="1040916596585577953">Luzapen hau berrikustea gomendatzen dizu Chromium-ek</translation> @@ -33,6 +34,7 @@ Baliteke webguneei eta aplikazioei emandako baimenak kontu honi aplikatzea. Google-ko kontuak kudeatzeko, joan <ph name="SETTINGS_LINK_BEGIN" />Ezarpenak<ph name="SETTINGS_LINK_END" /> atalera.</translation> <translation id="1640672724030957280">Deskargatzen…</translation> <translation id="1708666629004767631">Chromium-en bertsio berriagoa eta seguruagoa erabilgarri dago.</translation> +<translation id="1715127912119967311">Eginbide hauek hobetzen laguntzeko, Chromium-ek haiekin dituzun interakzioak bidaltzen dizkio Google-ri. Baliteke informazio hori gizakia den berrikusle batek irakurtzea, prozesatzea eta hari buruzko oharpenak egitea.</translation> <translation id="17264556997921157">Webguneek iragarkiak erakusteko erabili dituzten gai interesgarriak ikusi eta ken ditzakezu. Azkenaldiko arakatze-historian oinarrituta estimatzen ditu Chromium-ek zure interesak.</translation> <translation id="1733725117201708356">Chromium-ek arakatze-datuak ezabatuko ditu laster</translation> <translation id="1745121272106313518"><ph name="REMAINING_TIME" /> barru berrabiaraziko da Chromium</translation> @@ -325,7 +327,7 @@ <translation id="6873893289264747459">"<ph name="EXTENSION_NAME" />" elementuak malwarea duela hauteman du Chromium-ek</translation> <translation id="6893813176749746474">Chromium eguneratu da baina ez duzu erabili 30 egunetan gutxienez.</translation> <translation id="691026815377248078">Chromium-ek Bluetootha erabiltzeko baimena behar du parekatzen jarraitzeko. <ph name="IDS_BLUETOOTH_DEVICE_CHOOSER_AUTHORIZE_BLUETOOTH_LINK" /></translation> -<translation id="6929417474050522668">Probak abian diren bitartean, iragarkien neurketari esker, bisitatzen dituzun webguneek Chromium-i informazioa eska diezaiokete. Informazio horren bidez, webguneek beren iragarkien errendimendua neur dezakete. Webguneen artean ahalik eta informazio gutxien transferituta mugatzen du iragarkien neurketak webguneen arteko jarraipena.</translation> +<translation id="6929417474050522668">Probak abian diren bitartean, iragarkien neurketari esker, bisitatzen dituzun webguneek Chromium-i informazioa eska diezaiokete. Informazio horren bidez, webguneek beren iragarkien errendimendua neur dezakete. Webguneen artean ahalik eta informazio gutxien transferituta mugatzen du iragarkien neurketak webgunearteko jarraipena.</translation> <translation id="6940431691900807093">Beranduago, bisitatzen duzun webgune batek zure interesak ikusteko eska diezaioke Chromium-i, agertzen zaizkizun iragarkiak pertsonalizatze aldera. Chromium-ek hiru interes parteka ditzake gehienez.</translation> <translation id="6964305034639999644">Ireki esteka Chromium-eko &ezkutuko moduko leiho batean</translation> <translation id="6978145336957848883">Seguruak ez diren pasahitzak erraz asmatzen dira. Utzi Chromium-i <ph name="BEGIN_LINK" />pasahitz konplexuak sortzen eta gogoratzen<ph name="END_LINK" />.</translation> @@ -344,7 +346,7 @@ <translation id="7213407614656404070">Erabili Chromium mezu, dokumentu edo beste aplikazioetako estekak sakatzean</translation> <translation id="7223968959479464213">Ataza-kudeatzailea - Chromium</translation> <translation id="7246575524853130370">Chromium-ek estimatu dizkizun interesak</translation> -<translation id="7309928523159922338">Iragarkien neurketari esker, bisitatzen dituzun webguneek Chromium-i informazioa eska diezaiokete. Informazio horren bidez, webguneek beren iragarkien errendimendua neur dezakete. Webguneen artean ahalik eta informazio gutxien transferituta mugatzen du iragarkien neurketak webguneen arteko jarraipena.</translation> +<translation id="7309928523159922338">Iragarkien neurketari esker, bisitatzen dituzun webguneek Chromium-i informazioa eska diezaiokete. Informazio horren bidez, webguneek beren iragarkien errendimendua neur dezakete. Webguneen artean ahalik eta informazio gutxien transferituta mugatzen du iragarkien neurketak webgunearteko jarraipena.</translation> <translation id="731795002583552498">Chromium eguneratzen</translation> <translation id="7318036098707714271">Hobespenen fitxategia hondatuta dago edo ez da baliozkoa.
diff --git a/chrome/app/resources/chromium_strings_hr.xtb b/chrome/app/resources/chromium_strings_hr.xtb index b9fdde3..bde5348c 100644 --- a/chrome/app/resources/chromium_strings_hr.xtb +++ b/chrome/app/resources/chromium_strings_hr.xtb
@@ -238,6 +238,7 @@ <translation id="5623402015214259806">{0,plural, =0{Dostupno je ažuriranje Chromiuma}=1{Dostupno je ažuriranje Chromiuma}one{Ažuriranje Chromiuma dostupno je već # dan}few{Ažuriranje Chromiuma dostupno je već # dana}other{Ažuriranje Chromiuma dostupno je već # dana}}</translation> <translation id="5643865575100044307">Podaci web-lokacije uvijek se brišu s uređaja kada zatvorite Chromium</translation> <translation id="5653831366781983928">Sada ponovo pokrenite Chromium</translation> +<translation id="5675598751761067447">Datoteka može biti opasna<ph name="LINE_BREAK" />Chromium može provjeriti to preuzimanje za vas ako unesete zaporku — vaša zaporka ostaje na uređaju</translation> <translation id="5690427481109656848">Google LLC</translation> <translation id="5698481217667032250">Prikaži Chromium na tom jeziku</translation> <translation id="569897634095159764">Povezivanje s internetom nije moguće. Proxy poslužitelj zahtijeva autentifikaciju.</translation>
diff --git a/chrome/app/resources/chromium_strings_iw.xtb b/chrome/app/resources/chromium_strings_iw.xtb index 5ff6ee8..10552cd7 100644 --- a/chrome/app/resources/chromium_strings_iw.xtb +++ b/chrome/app/resources/chromium_strings_iw.xtb
@@ -22,6 +22,7 @@ <translation id="1342274909142618978">אני רוצה למחוק את הנתונים גם מ-Chromium (<ph name="URL" />)</translation> <translation id="1414495520565016063">נכנסת ל-Chromium!</translation> <translation id="1478370723027452770">קבלת עזרה לגבי Chrome for Testing</translation> +<translation id="1497802159252041924">שגיאת התקנה: <ph name="INSTALL_ERROR" /></translation> <translation id="1524282610922162960">שיתוף כרטיסיית Chromium</translation> <translation id="1553461853655228091">Chromium זקוק להרשאת גישה למצלמה כדי ליצור מפה תלת-ממדית של הסביבה שלך</translation> <translation id="1574377791422810894">הכלים לבטיחות של Chromium</translation> @@ -155,11 +156,13 @@ <translation id="390528597099634151">המשתמש <ph name="EXISTING_USER" /> כבר מחובר לפרופיל Chromium הזה. כדי להפריד בין פעילויות גלישה, Chromium יכול ליצור עבורך פרופיל משלך.</translation> <translation id="3909353120217047026">התוסף הזה מפר את המדיניות של חנות האינטרנט של Chrome, ויכול להיות שהוא לא בטוח. צריך להסיר אותו מ-Chromium כדי לא לאפשר לו יותר להציג ולשנות את הנתונים שלך באתרים שאליהם תתבצע כניסה, כולל הפרטים האישיים שלך.</translation> <translation id="391789666908693569">החשבון שלך מנוהל על ידי <ph name="MANAGER_NAME" />. האדמין שלך יכול לראות ולערוך את הפרופיל הזה של דפדפן Chromium ואת הנתונים שלו, כמו סימניות, היסטוריה וסיסמאות.</translation> +<translation id="3922825997980843979">תוך כדי הקלדה, Chromium שולח את התוכן של סרגל הכתובות או תיבת החיפוש למנוע החיפוש שמוגדר כברירת מחדל</translation> <translation id="3945058413678539331">Chromium מנסה להעתיק את הסיסמאות. כדי לאפשר למערכת לעשות זאת, יש להזין את הסיסמה שלך ל-Windows.</translation> <translation id="3962647064319009959">איך מערכת Chromium שומרת על האבטחה שלך</translation> <translation id="3975724895399328945">מידע על &Google Chrome for Testing</translation> <translation id="3997429360543082038">מידע על ChromiumOS</translation> <translation id="4019629340646866719">השימוש ב-ChromiumOS מתאפשר בזכות <ph name="BEGIN_LINK_CROS_OSS" />תוכנות קוד פתוח<ph name="END_LINK_CROS_OSS" /> נוספות כמו <ph name="BEGIN_LINK_LINUX_OSS" />סביבת הפיתוח של Linux<ph name="END_LINK_LINUX_OSS" />.</translation> +<translation id="4028143804911941282">כשההגדרה מושבתת, עדיין יוצגו הצעות מ-Chromium באופן מקומי</translation> <translation id="4036079820698952681">דיווח על <ph name="BEGIN_LINK" />ההגדרות הנוכחיות<ph name="END_LINK" /> יעזור לשפר את Chromium</translation> <translation id="4050175100176540509">הגרסה החדשה כוללת שיפורי בטיחות חשובים ותכונות חדשות.</translation> <translation id="4055805654398742145">מנהל הס&יסמאות</translation> @@ -251,6 +254,7 @@ <translation id="6003112304606738118">מתבצעת הורדה… יש עוד <ph name="HOURS" /> שע'</translation> <translation id="6040143037577758943">סגירה</translation> <translation id="6055895534982063517">גרסה חדשה של Chromium זמינה, והיא מהירה יותר מאי פעם.</translation> +<translation id="6058380562449900225">כדי להגן על הנתונים שלך, כדאי לאפשר ל-Chromium להסיר הרשאות מאתרים שלא נכנסת אליהם לאחרונה. המערכת תמשיך לשלוח התראות.</translation> <translation id="6063093106622310249">&פתיחה ב-Chromium</translation> <translation id="6072279588547424923"><ph name="EXTENSION_NAME" /> נוסף ל-Chromium</translation> <translation id="6072463441809498330">שיפור המהירות ב-Chromium</translation>
diff --git a/chrome/app/resources/chromium_strings_ms.xtb b/chrome/app/resources/chromium_strings_ms.xtb index 3aab8561..dfce22e 100644 --- a/chrome/app/resources/chromium_strings_ms.xtb +++ b/chrome/app/resources/chromium_strings_ms.xtb
@@ -80,6 +80,7 @@ <translation id="2478295928299953161">Chromium akan ditutup sebentar lagi</translation> <translation id="2483889755041906834">Dalam Chromium</translation> <translation id="2485422356828889247">Nyahpasang</translation> +<translation id="2513154137948333830">But semula diperlukan: <ph name="INSTALL_SUCCESS" /></translation> <translation id="2554739539410784893">Chromium cuba menggantikan kata laluan sedia ada. Taip kata laluan Windows anda untuk membenarkan tindakan ini.</translation> <translation id="2560420686485554789">Chromium memerlukan akses storan untuk memuat turun fail</translation> <translation id="2572494885440352020">Pembantu Chromium</translation> @@ -96,12 +97,14 @@ <translation id="2785438272836277133">Sambungan ini mengandungi perisian hasad dan tidak selamat. Alih keluar sambungan ini daripada Chromium supaya sambungan ini tidak dapat melihat dan mengubah data anda pada laman yang anda lawati lagi, termasuk maklumat peribadi anda.</translation> <translation id="2799223571221894425">Lancarkan semula</translation> <translation id="2837693172913560447">Tindakan ini akan membuat profil Chromium baharu untuk <ph name="USER_EMAIL_ADDRESS" /></translation> +<translation id="2846251086934905009">Ralat pemasangan: Proses pemasang tidak selesai. Pemasangan telah dihenti paksa.</translation> <translation id="2847479871509788944">Alih keluar daripada Chromium...</translation> <translation id="2850691299438350830">Memastikan anda selamat pada Chromium dan mungkin digunakan untuk meningkatkan keselamatan anda dalam apl Google yang lain apabila anda log masuk</translation> <translation id="2885378588091291677">Pengurus Tugas</translation> <translation id="2910007522516064972">Mengenai &Chromium</translation> <translation id="2915996080311180594">Mulakan Semula Kemudian</translation> <translation id="2928420929544864228">Pemasangan selesai.</translation> +<translation id="2945997411976714835">Ralat pemasangan: Proses pemasang gagal dimulakan.</translation> <translation id="2977470724722393594">Chromium telah dikemas kini</translation> <translation id="2977506796191543575">Jika laman cuba mencuri kata laluan anda atau apabila anda memuat turun fail yang berbahaya, Chromium juga mungkin menghantar URL, termasuk sedikit kandungan halaman, kepada Penyemakan Imbas Selamat</translation> <translation id="3032706164202344641">Chromium tidak dapat menyemak kata laluan anda. Cuba lagi nanti.</translation> @@ -159,6 +162,7 @@ <translation id="3909353120217047026">Sambungan ini melanggar dasar Gedung Web Chrome dan mungkin tidak selamat. Alih keluar sambungan ini daripada Chromium supaya sambungan ini tidak dapat melihat dan mengubah data anda pada laman yang anda lawati lagi, termasuk maklumat peribadi anda.</translation> <translation id="391789666908693569">Akaun anda diurus oleh <ph name="MANAGER_NAME" />. Pentadbir anda boleh melihat dan mengedit profil penyemak imbas Chromium ini dan datanya seperti penanda halaman, sejarah dan kata laluan.</translation> <translation id="3922825997980843979">Ketika anda menaip, Chromium menghantar kandungan daripada bar alamat atau kotak carian ke enjin carian lalai anda</translation> +<translation id="3941890832296813527">Ralat pemasangan: Nama fail pemasang tidak sah atau tidak disokong.</translation> <translation id="3945058413678539331">Chromium cuba menyalin kata laluan. Taip kata laluan Windows anda untuk membenarkan penyalinan.</translation> <translation id="3962647064319009959">Ketahui tentang cara Chromium memastikan anda selamat</translation> <translation id="3975724895399328945">Perihal &Google Chrome for Testing</translation> @@ -221,6 +225,7 @@ <translation id="5296845517486664001">Semasa percubaan dihidupkan dan jika Chromium telah meletakkan anda secara rawak dalam percubaan aktif, sejarah penyemakan imbas anda mempengaruhi iklan yang anda lihat dan minat seperti yang dianggarkan di bawah. Untuk melindungi privasi anda, Chromium memadamkan minat anda secara bergilir setiap bulan.</translation> <translation id="5352264705793813212">Chromium menemukan beberapa syor keselamatan untuk semakan anda</translation> <translation id="5358375970380395591">Anda log masuk menggunakan akaun yang terurus dan memberikan pentadbirnya kawalan ke atas profil Chromium anda. Data Chromium anda, seperti apl, penanda halaman, sejarah, kata laluan dan tetapan anda yang lain akan terikat kepada <ph name="USER_NAME" /> secara kekal. Anda akan dapat memadamkan data ini melalui Papan Pemuka Akaun Google, tetapi anda tidak akan dapat mengaitkan data ini dengan akaun lain. <ph name="LEARN_MORE" /></translation> +<translation id="5368118228313795342">Kod tambahan: <ph name="EXTRA_CODE" />.</translation> <translation id="5386450000063123300">Mengemas kini Chromium (<ph name="PROGRESS_PERCENT" />)</translation> <translation id="538767207339317086">Benarkan log masuk Chromium</translation> <translation id="5398878173008909840">Terdapat versi baharu Chromium tersedia.</translation> @@ -424,6 +429,7 @@ <translation id="8648201657708811153">Google Chrome for Testing tidak boleh dijadikan penyemak imbas lalai anda.</translation> <translation id="8697124171261953979">Sambungan turut mengawal halaman yang ditunjukkan apabila anda memulakan Chromium atau membuat carian dari Kotak Omni.</translation> <translation id="8704119203788522458">Ini Chromium anda</translation> +<translation id="878572486461146056">Ralat pemasangan: Pentadbir rangkaian anda telah menggunakan Dasar Kumpulan yang menghalang pemasangan: <ph name="INSTALL_ERROR" /></translation> <translation id="8796602469536043152">Chromium memerlukan kebenaran untuk mengakses kamera dan mikrofon anda bagi tapak ini</translation> <translation id="8826492472752484139">Klik “Password Manager”</translation> <translation id="8833697763442816810">Sistem Chromium OS</translation>
diff --git a/chrome/app/resources/chromium_strings_my.xtb b/chrome/app/resources/chromium_strings_my.xtb index 4644905..3168887 100644 --- a/chrome/app/resources/chromium_strings_my.xtb +++ b/chrome/app/resources/chromium_strings_my.xtb
@@ -242,6 +242,7 @@ <translation id="5623402015214259806">{0,plural, =0{Chromium အပ်ဒိတ်တစ်ခု ရနိုင်ပါသည်}=1{Chromium အပ်ဒိတ်တစ်ခု ရနိုင်ပါသည်}other{Chromium အပ်ဒိတ်တစ်ခု ရနိုင်သည်မှာ # ရက် ရှိပါပြီ}}</translation> <translation id="5643865575100044307">Chromium ကို ပိတ်သည့်အခါ သင့်စက်မှ ဝဘ်ဆိုက်ဒေတာကို အမြဲဖျက်ရန်</translation> <translation id="5653831366781983928">Chromium ကို ယခု ပြန်စပါ</translation> +<translation id="5675598751761067447">ဤဖိုင်သည် အန္တရာယ်ရှိနိုင်သည်<ph name="LINE_BREAK" />သင်စကားဝှက်ပေးပါက Chromium သည် သင့်အတွက် ဤဒေါင်းလုဒ်ကို စစ်ပေးနိုင်သည် — သင့်စကားဝှက်သည် ဤစက်၌သာ ရှိပါမည်</translation> <translation id="5690427481109656848">Google LLC</translation> <translation id="5698481217667032250">Chromium ကို ဤဘာသာစကားဖြင့် ပြသပါ</translation> <translation id="569897634095159764">အင်တာနက် ချိတ်ဆက်၍ မရပါ။ ပရောက်စီဆာဗာအတွက် အထောက်အထားစိစစ်ရန် လိုအပ်သည်။</translation>
diff --git a/chrome/app/resources/chromium_strings_uz.xtb b/chrome/app/resources/chromium_strings_uz.xtb index b96cfa39..c0c7fd9 100644 --- a/chrome/app/resources/chromium_strings_uz.xtb +++ b/chrome/app/resources/chromium_strings_uz.xtb
@@ -22,6 +22,7 @@ <translation id="1342274909142618978">Chromium maʼlumotlari ham oʻchirilsin (<ph name="URL" />)</translation> <translation id="1414495520565016063">Chromium‘ga xush kelibsiz!</translation> <translation id="1478370723027452770">Chrome for Testing yuzasidan yordam olish</translation> +<translation id="1497802159252041924">O'rnatishdagi xatolik: <ph name="INSTALL_ERROR" /></translation> <translation id="1524282610922162960">Chromium sahifasini namoyish qilish</translation> <translation id="1553461853655228091">Chromium atrofingiz 3D xaritasini yaratishi uchun unga kamera ruxsati zarur</translation> <translation id="1574377791422810894">Chromium xavfsizlik vositalari</translation> @@ -155,11 +156,13 @@ <translation id="390528597099634151"><ph name="EXISTING_USER" /> allaqachon ushbu Chromium profiliga kirgan. Internetni alohida kezish uchun Chromium siz uchun alohida profil yaratadi.</translation> <translation id="3909353120217047026">Bu kengaytma Chrome Web Store qoidalariga mos emas va xavfli boʻlishi mumkin. Ochilgan saytlarda shaxsiy axborot kabi maʼlumotlarni koʻrishi va oʻzgartirishini tugatish uchun uni Chromiumdan olib tashlang.</translation> <translation id="391789666908693569">Hisobingiz <ph name="MANAGER_NAME" /> domenida boshqariladi. Administrator Chromium brauzeri profili va undagi bukmarklar, tarix va parollar kabi maʼlumotlarni koʻrib, tahrirlay oladi.</translation> +<translation id="3922825997980843979">Matn kiritishni boshlashingiz bilan Chromium manzil qatori yoki qidiruv maydonchasi kontentini asosiy qidiruv vositasiga yuboradi</translation> <translation id="3945058413678539331">Chromium parollarni nusxalashga urinmoqda. Ruxsat berish uchun Windows parolingizni kiriting.</translation> <translation id="3962647064319009959">Chromium qanday qilib sizni himoya qilishi haqida batafsil</translation> <translation id="3975724895399328945">Google Chrome for Testing haqida</translation> <translation id="3997429360543082038">ChromiumOS haqida</translation> <translation id="4019629340646866719">ChromiumOS tizimini ishlab chiqishda <ph name="BEGIN_LINK_LINUX_OSS" />Linux dasturlash muhiti<ph name="END_LINK_LINUX_OSS" /> <ph name="BEGIN_LINK_CROS_OSS" />ochiq kodli DT<ph name="END_LINK_CROS_OSS" /> vositalaridan foydalanilgan.</translation> +<translation id="4028143804911941282">Nofaolligida Chromium mahalliy takliflarni yuborishda davom etadi</translation> <translation id="4036079820698952681">Chromium brauzerining <ph name="BEGIN_LINK" />joriy sozlamalari<ph name="END_LINK" /> asosida hisobot yuboring va brauzerning ishlashini yaxshilashga yordamlashing</translation> <translation id="4050175100176540509">So‘nggi versiyada himoya devori yaxshilandi va yangi funksiyalar qo‘shildi.</translation> <translation id="4055805654398742145">Parollar menejeri</translation> @@ -251,6 +254,7 @@ <translation id="6003112304606738118">Yuklab olinmoqda... <ph name="HOURS" /> soat qoldi</translation> <translation id="6040143037577758943">Yopish</translation> <translation id="6055895534982063517">Chromium brauzerining yanada tezroq ishlaydigan yangi versiyasi chiqdi.</translation> +<translation id="6058380562449900225">Maʼlumotlaringizni himoyalash maqsadida Chromium brauzeriga uzoq vaqt kirmagan saytlardan ruxsatlarni olib tashlashi uchun ruxsat bering. Bildirishnomalar kelishi davom etadi.</translation> <translation id="6063093106622310249">&Chromiumda ochish</translation> <translation id="6072279588547424923"><ph name="EXTENSION_NAME" /> kengaytmasi Chromiumga o‘rnatildi</translation> <translation id="6072463441809498330">Chromiumni tezlashtirish</translation>
diff --git a/chrome/app/resources/generated_resources_ar.xtb b/chrome/app/resources/generated_resources_ar.xtb index 6c48dbcb..7585783 100644 --- a/chrome/app/resources/generated_resources_ar.xtb +++ b/chrome/app/resources/generated_resources_ar.xtb
@@ -718,6 +718,7 @@ <translation id="1566329594234563241">عندما يكون الجهاز غير نشط وموصولاً بمصدر طاقة</translation> <translation id="1567135437923613642">تفعيل التجارب المميَّزة</translation> <translation id="1567387640189251553">تم توصيل لوحة مفاتيح مختلفة منذ آخر إدخال لكلمة المرور، وقد يكون ذلك محاولةً لسرقة ضغطات المفاتيح.</translation> +<translation id="1567579616025300478">هذا الموقع الإلكتروني غير مسموح له بحفظ البيانات على جهازك.</translation> <translation id="156793199942386351">سبق وتم تخصيص مفتاح "<ph name="CURRENTKEY" />" للإجراء "<ph name="ACTION" />". يمكنك الضغط على أي مفتاح لاختيار <ph name="RESPONSE" />.</translation> <translation id="1567993339577891801">وحدة تحكم JavaScript</translation> <translation id="1569466257325986920">عند تغيير كلمة مرور حسابك على Google في المرة القادمة، سيتم استرداد بياناتك المحلية تلقائيًا بعد تسجيل الدخول إلى الحساب.</translation> @@ -1240,6 +1241,7 @@ <translation id="1944535645109964458">ما مِن مفاتيح مرور متوفّرة</translation> <translation id="1944921356641260203">تم العثور على التحديث</translation> <translation id="1947136734041527201">بإمكانك تسجيل الدخول إلى المواقع الإلكترونية باستخدام حسابك من خلال خدمة تقديم الهويات.</translation> +<translation id="1948632501103125383">ح&فظ إطار الفيديو باسم...</translation> <translation id="1949332606889020901">معرفات الأعطال</translation> <translation id="1949584741547056205">إجابات سريعة</translation> <translation id="1949849604471335579">يمكنك تخصيص الخلفية وشاشة الاستراحة وألوان التمييز وغير ذلك.</translation> @@ -1476,6 +1478,7 @@ <translation id="2123766928840368256">اختيار ملف آخر</translation> <translation id="2124930039827422115">{1,plural, =1{تم التقييم بـ <ph name="AVERAGE_RATING" /> بواسطة مستخدم واحد.}zero{تم التقييم بـ <ph name="AVERAGE_RATING" /> بواسطة # مستخدم.}two{تم التقييم بـ <ph name="AVERAGE_RATING" /> بواسطة مستخدميْنِ (#).}few{تم التقييم بـ <ph name="AVERAGE_RATING" /> بواسطة # مستخدمين.}many{تم التقييم بـ <ph name="AVERAGE_RATING" /> بواسطة # مستخدمًا.}other{تم التقييم بـ <ph name="AVERAGE_RATING" /> بواسطة # مستخدم.}}</translation> <translation id="2126167708562367080">تم إيقاف المزامنة من قِبل المشرف.</translation> +<translation id="212633415503779955">ORCA</translation> <translation id="2127372758936585790">شاحن منخفض الطاقة</translation> <translation id="212862741129535676">نسبة إشغال حالة التردد</translation> <translation id="212876957201860463">جارٍ التحضير لإعداد جهازك الخلوي...</translation> @@ -1969,6 +1972,7 @@ <translation id="2489918096470125693">إضافة &مجلد...</translation> <translation id="2489931062851778802">اضغط على هذه المفاتيح على <ph name="DEVICE_NAME" />.</translation> <translation id="2490481887078769936">تمت إزالة "<ph name="FILE_NAME" />" من القائمة</translation> +<translation id="249098303613516219">تم السماح بحفظ بيانات الموقع الإلكتروني على الجهاز فقط</translation> <translation id="249113932447298600">عذرًا، لا يتوفر الجهاز <ph name="DEVICE_LABEL" /> في الوقت الحالي.</translation> <translation id="2492461744635776704">جارٍ تحضير طلب توقيع الشهادة</translation> <translation id="249330843868392562">فتح إعدادات تحويل النص إلى كلام</translation> @@ -1987,6 +1991,7 @@ <translation id="2501920221385095727">مفاتيح الثبات</translation> <translation id="2502441965851148920">يتم تفعيل التحديثات التلقائية. يتم إيقاف التحديثات اليدوية من قبل المشرف.</translation> <translation id="2502719318159902502">الوصول الكامل</translation> +<translation id="2504801073028762184">اقتراحات الأمان</translation> <translation id="2505324914378689427">{SCREEN_INDEX,plural, =1{شاشة #}zero{شاشة #}two{شاشة #}few{شاشة #}many{شاشة #}other{شاشة #}}</translation> <translation id="2505402373176859469"><ph name="RECEIVED_AMOUNT" /> من <ph name="TOTAL_SIZE" /></translation> <translation id="250704661983564564">ترتيب العرض</translation> @@ -2757,6 +2762,7 @@ <translation id="3103451787721578293">يُرجى تحديد سبب لتحميل هذه البيانات:</translation> <translation id="3105339775057145050">آخر تغيير غير ناجح</translation> <translation id="3105796011181310544">هل تريد التغيير مرة أخرى إلى Google؟</translation> +<translation id="3105820656234755131">تمّ تعديل كلمة المرور</translation> <translation id="3105990244222795498"><ph name="DEVICE_NAME" /> (بلوتوث)</translation> <translation id="310671807099593501">يستخدم الموقع الإلكتروني البلوتوث.</translation> <translation id="3108931485517391283">يتعذّر تلقّي الملف</translation> @@ -3451,6 +3457,7 @@ <translation id="3696817060563289264">تم تنزيل ملفات التعرّف على النص.</translation> <translation id="369736917241079046">مفتاح مشغِّل التطبيقات + السهم المتّجه لليسار</translation> <translation id="3697716475445175867">آخر إشارات مرجعية تم فتحها</translation> +<translation id="3697732362672163692">{NUM_SITES,plural, =1{يمكنك منع هذا الموقع الإلكتروني من إرسال إشعارات مستقبلية.}zero{يمكنك منع هذه المواقع الإلكترونية من إرسال إشعارات مستقبلية.}two{يمكنك منع هذين الموقعَين الإلكترونيَّين من إرسال إشعارات مستقبلية.}few{يمكنك منع هذه المواقع الإلكترونية من إرسال إشعارات مستقبلية.}many{يمكنك منع هذه المواقع الإلكترونية من إرسال إشعارات مستقبلية.}other{يمكنك منع هذه المواقع الإلكترونية من إرسال إشعارات مستقبلية.}}</translation> <translation id="3697952514309507634">الملفات الشخصية الأخرى على Chrome</translation> <translation id="3698471669415859717">اكتملت المراجعة</translation> <translation id="3699624789011381381">عنوان البريد الإلكتروني</translation> @@ -4098,6 +4105,7 @@ <translation id="4190492351494485814">لإجراء الإعداد الأوّلي، عليك الاتصال بالإنترنت كي تتم مزامنة الملفات مع جهاز Chromebook.</translation> <translation id="4190828427319282529">تمييز الكائن باستخدام تركيز لوحة المفاتيح</translation> <translation id="4191892134568599822">هل تريد الاستلام عبر ميزة "<ph name="FEATURE_NAME" />"؟</translation> +<translation id="4192024474038595073">{NUM_SITES,plural, =1{تمت إزالة أذونات موقع إلكتروني واحد غير مستخدَم.}zero{تمت إزالة أذونات {NUM_SITES} موقع إلكتروني غير مستخدَم.}two{تمت إزالة أذونات موقعَين إلكترونيَّين ({NUM_SITES}) غير مستخدمَين.}few{تمت إزالة أذونات {NUM_SITES} مواقع إلكترونية غير مستخدمة.}many{تمت إزالة أذونات {NUM_SITES} موقعًا إلكترونيًا غير مستخدَم.}other{تمت إزالة أذونات {NUM_SITES} موقع إلكتروني غير مستخدَم.}}</translation> <translation id="4193251682249731404">مرجع تصديق موثوق به</translation> <translation id="4193575319002689239">عرض البطاقات</translation> <translation id="4193836101014293726">لا يمكن حذف هذا الملف الشخصي</translation> @@ -4326,6 +4334,7 @@ <translation id="4379281552162875326">هل تريد إلغاء تثبيت "<ph name="APP_NAME" />"؟</translation> <translation id="4380055775103003110">في حال استمرار ظهور هذه المشكلة، يمكنك تجربة طرق أخرى للمتابعة على "<ph name="SITE_ETLD_PLUS_ONE" />".</translation> <translation id="4380648069038809855">الدخول إلى وضع ملء الشاشة</translation> +<translation id="4381902252848068865">عدم السماح للموقع الإلكتروني بحفظ البيانات</translation> <translation id="4383048856908088702">عندما كانت علامة التبويب هذه غير نشطة، نجحت ميزة "توفير الذاكرة" في تفريغ <ph name="MEMORY_VALUE" /> من الذاكرة لتنفيذ مهام أخرى. يمكنك تغيير إعدادات هذه الميزة في أي وقت من خلال <ph name="SETTINGS_LINK" />.</translation> <translation id="4384312707950789900">إضافة إلى الشبكات المُفضلة</translation> <translation id="4384652540891215547">تفعيل الإضافة</translation> @@ -5550,6 +5559,7 @@ <translation id="5383377866517186886">تم إيقاف الكاميرا في إعدادات نظام Mac المفضلة</translation> <translation id="5383740867328871413">مجموعة لم تتم تسميتها - <ph name="GROUP_CONTENTS" /> - <ph name="COLLAPSED_STATE" /></translation> <translation id="538822246583124912">تم تغيير سياسة المؤسسة، وبموجب هذا التغيير، تمت إضافة زر "التجارب" إلى شريط الأدوات. انقر على الزرّ لفتح مربّع حوار لتفعيل التجارب.</translation> +<translation id="5388567882092991136">{NUM_SITES,plural, =1{تم العثور على موقع إلكتروني واحد يحتوي على الكثير من الإشعارات.}zero{تم العثور على {NUM_SITES} موقع إلكتروني يحتوي على الكثير من الإشعارات.}two{تم العثور على موقعَين إلكترونيَّين ({NUM_SITES}) يحتويان على الكثير من الإشعارات.}few{تم العثور على {NUM_SITES} مواقع إلكترونية تحتوي على الكثير من الإشعارات.}many{تم العثور على {NUM_SITES} موقعًا إلكترونيًا يحتوي على الكثير من الإشعارات.}other{تم العثور على {NUM_SITES} موقع إلكتروني يحتوي على الكثير من الإشعارات.}}</translation> <translation id="5388885445722491159">مقترن</translation> <translation id="5389626883706033615">المواقع الإلكترونية محظورة من أن تطلب منك استخدام المعلومات التي تم حفظها عنك.</translation> <translation id="5390112241331447203">إدراج ملف system_logs.txt المُرسَل في تقارير التعليقات</translation> @@ -5870,6 +5880,7 @@ <translation id="5636012309446422">هل تريد إزالة <ph name="DEVICE" /> من حساب <ph name="PRIMARY_EMAIL" />؟</translation> <translation id="5636996382092289526">لاستخدام <ph name="NETWORK_ID" /> ربما تحتاج أولاً إلى <ph name="LINK_START" />الانتقال إلى صفحة تسجيل الدخول إلى الشبكة<ph name="LINK_END" />، والتي سيتم فتحها تلقائيًا خلال بضع ثوانٍ. إذا لم يحدث ذلك، فلن يمكن استخدام الشبكة.</translation> <translation id="5637476008227280525">تفعيل بيانات الجوّال</translation> +<translation id="563821631542362636">السماح للموقع الإلكتروني بحفظ البيانات</translation> <translation id="5638309510554459422">يمكنك العثور على الإضافات والمظاهر في <ph name="BEGIN_LINK" />سوق Chrome الإلكتروني<ph name="END_LINK" />.</translation> <translation id="5639549361331209298">إعادة تحميل هذه الصفحة، انتظر لمشاهدة المزيد من الخيارات</translation> <translation id="5640133431808313291">إدارة مفاتيح الأمان</translation> @@ -6252,6 +6263,7 @@ <translation id="5948476936444935795">إلغاء الاستيراد</translation> <translation id="5948536763493709626">يمكنك توصيل لوحة مفاتيح أو ماوس أو مواصلة عملية الإعداد باستخدام الشاشة التي تعمل باللمس. وإذا كنت تستخدم أجهزة تتضمّن بلوتوث، يجب أن تكون هذه الأجهزة جاهزة لعملية الإقران.</translation> <translation id="5949544233750246342">تعذَّر تحليل الملف</translation> +<translation id="594993197557058302">اضغط على مفاتيح التعديل من 1 إلى 4 (Ctrl أو Alt أو Shift أو مفتاح البحث أو مفتاح مشغِّل التطبيقات) ومفتاح آخر، كما يمكنك اختيار مفتاح واحد.</translation> <translation id="5950762317146173294">قد يكون هذا الملف فيروسًا أو برنامجًا ضارًا.</translation> <translation id="5951303645598168883">يطلب الموقع الإلكتروني <ph name="ORIGIN" /> استخدام الخطوط المحلية.</translation> <translation id="5951624318208955736">إعدادات الشاشة</translation> @@ -7055,6 +7067,7 @@ لديك # كلمة مرور أخرى يُحتمَل تعرّضها للاختراق. ينصح "مدير كلمات المرور في Google" بالتحقّق من كلمات المرور هذه الآن.}}</translation> <translation id="6596325263575161958">خيارات التشفير</translation> <translation id="6596816719288285829">عنوان IP</translation> +<translation id="6596916244504302242">إعادة تحميل هذه الصفحة لتطبيق إعدادات الإضافات المعدّلة على هذا الموقع الإلكتروني</translation> <translation id="6597017209724497268">نماذج</translation> <translation id="6597324406048772521">الإضافات غير مسموح بها على هذا الموقع الإلكتروني.</translation> <translation id="6597331566371766302">حظر المشرف الإضافات التالية:</translation> @@ -7242,8 +7255,10 @@ <translation id="6759193508432371551">إعادة الضبط على الإعدادات الأصلية</translation> <translation id="6760354150216532978">تحذير: يمكن لهذا الموقع الإلكتروني الاطّلاع على التعديلات التي تُجريها.</translation> <translation id="676158322851696513">"<ph name="EXTENSION_NAME" />"</translation> +<translation id="6761623907967804682">غير مسموح بحفظ بيانات الموقع الإلكتروني على الجهاز فقط</translation> <translation id="6762833852331690540">مفعّل</translation> <translation id="676560328519657314">طُرق الدفع المُستخدَمة في Google Pay</translation> +<translation id="6766488013065406604">الانتقال إلى "مدير كلمات المرور في Google"</translation> <translation id="6767566652486411142">اختيار لغة أخرى...</translation> <translation id="6767639283522617719">يتعذَّر ضم الجهاز إلى النطاق. يُرجى التأكُّد من صحة الإعدادات في الوحدة التنظيمية.</translation> <translation id="6768034047581882264">المواقع الإلكترونية التي لا يُسمح لها بعرض المحتوى غير الآمن</translation> @@ -7302,6 +7317,7 @@ <translation id="6801308659697002152">{NUM_EXTENSIONS,plural, =1{اختيار ما إذا كان بإمكان هذه الإضافة الاطّلاع على محتوى هذا الموقع الإلكتروني أو تغييره}zero{اختيار ما إذا كان بإمكان هذه الإضافات الاطّلاع على محتوى هذا الموقع الإلكتروني أو تغييره}two{اختيار ما إذا كان بإمكان هاتين الإضافتَين الاطّلاع على محتوى هذا الموقع الإلكتروني أو تغييره}few{اختيار ما إذا كان بإمكان هذه الإضافات الاطّلاع على محتوى هذا الموقع الإلكتروني أو تغييره}many{اختيار ما إذا كان بإمكان هذه الإضافات الاطّلاع على محتوى هذا الموقع الإلكتروني أو تغييره}other{اختيار ما إذا كان بإمكان هذه الإضافات الاطّلاع على محتوى هذا الموقع الإلكتروني أو تغييره}}</translation> <translation id="6801435275744557998">معايرة الشاشة التي تعمل باللمس</translation> <translation id="6802031077390104172"><ph name="USAGE" /> (<ph name="OID" />)</translation> +<translation id="6803766346203101854">يُسمَح لهذا الموقع الإلكتروني بحفظ البيانات على جهازك.</translation> <translation id="680488281839478944">توفّر الجهاز الافتراضي "<ph name="DEFAULT_VM_NAME" />"</translation> <translation id="6805647936811177813">يُرجى تسجيل الدخول إلى <ph name="TOKEN_NAME" /> لاستيراد شهادة العميل من <ph name="HOST_NAME" />.</translation> <translation id="680572642341004180">تفعيل تتبع RLZ في <ph name="SHORT_PRODUCT_OS_NAME" />.</translation> @@ -7491,6 +7507,7 @@ <translation id="6944750221184785444">يتعذّر تثبيت هذا الملف الشخصي. للحصول على الدعم الفني، يُرجى التواصل مع مشغّل شبكة الجوّال.</translation> <translation id="6945221475159498467">تحديد</translation> <translation id="694592694773692225">تم حظر إعادة التوجيه في هذه الصفحة.</translation> +<translation id="6946231195377941116">{NUM_SITES,plural, =1{تم إيقاف إضافة واحدة غير آمنة.}zero{تم إيقاف {NUM_SITES} إضافة غير آمنة.}two{تم إيقاف إضافتَين ({NUM_SITES}) غير آمنتَين.}few{تم إيقاف {NUM_SITES} إضافات غير آمنة.}many{تم إيقاف {NUM_SITES} إضافة غير آمنة.}other{تم إيقاف {NUM_SITES} إضافة غير آمنة.}}</translation> <translation id="6947015141909171112">تظهر لك وصفات طعام استنادًا إلى آخر عمليات بحث أجريتها عن وصفات الطعام على محرك بحث Google. <ph name="BREAK" /> <ph name="BREAK" /> @@ -8499,6 +8516,7 @@ <translation id="7744192722284567281">تم العثور عليها في عملية اختراق البيانات.</translation> <translation id="7744649840067671761">اضغط على مفتاح تحكّم جديد أو مفتاح معيّن على لوحة المفاتيح لبدء التخصيص. ولإزالة مفتاح تحكّم أو مفتاح على لوحة المفاتيح مخصّص حاليًا، اضغط عليه.</translation> +<translation id="7745554356330788383">إعادة تحميل هذه الصفحة لتطبيق إعدادات "<ph name="EXTENSION_NAME" />" المعدّلة على هذا الموقع الإلكتروني</translation> <translation id="7745677556280361868">هل تريد إزالة هذه الشبكة من خلال صفحة اشتراك نقطة المرور؟</translation> <translation id="7746045113967198252">تتيح لك هذه الميزة تكبير حجم العناصر المعروضة على شاشتك أو تصغيرها، بما في ذلك النصوص. يمكنك أيضًا العثور على هذه الميزة لاحقًا في الإعدادات > الجهاز > الشاشات.</translation> <translation id="7746739418892731373">تظهر لك أهمّ الصور والفيديوهات من مكتبة "صور Google". يمكنك التحكّم في المحتوى الذي يتم عرضه في الفيديوهات والصور المميّزة من خلال الانتقال إلى <ph name="BEGIN_LINK" />photos.google.com/settings<ph name="END_LINK" />. @@ -8816,6 +8834,7 @@ <translation id="7974936243149753750">الخروج عن إطار الشاشة</translation> <translation id="7975504106303186033">يجب تسجيل جهاز Chrome Education هذا باستخدام حساب تعليم. للاشتراك في حساب جديد، يُرجى زيارة g.co/workspace/edusignup.</translation> <translation id="7977451675950311423">ستتلقّى تحذيرًا إذا كنت تستخدم كلمة مرور تم اختراقها في عملية اختراق للبيانات.</translation> +<translation id="7978053509627908242">ح&فظ إطار الفيديو باسم...</translation> <translation id="7978412674231730200">مفتاح خاص</translation> <translation id="7978450511781612192">سيؤدي ذلك إلى تسجيل خروجك من حساباتك على Google. ولن تتم بعد ذلك مزامنة الإشارات المرجعية والسجلّ وكلمات المرور والمزيد.</translation> <translation id="7980084013673500153">رقم تعريف مادة العرض: <ph name="ASSET_ID" /></translation> @@ -9693,6 +9712,7 @@ <translation id="8676374126336081632">محو الإرسال</translation> <translation id="8676770494376880701">تمّ توصيل شاحن منخفض الطاقة</translation> <translation id="8677212948402625567">تصغير الكل...</translation> +<translation id="8678192320753081984">يوفِّر أعلى مستويات الحماية من Google لحسابات المستخدمين المعرضين لخطر الهجمات الموجّهة.</translation> <translation id="8678378565142776698">إعادة التشغيل والحصول على التحديثات التلقائية</translation> <translation id="8678538439778360739">تم ترميز البيانات باستخدام عبارة مرور المزامنة الخاصة بك في <ph name="TIME" />. ولا يتضمَّن ذلك طرق الدفع والعناوين من Google Pay.</translation> <translation id="8678582529642151449">عدم تصغير علامات التبويب</translation> @@ -10276,6 +10296,7 @@ <translation id="9111102763498581341">فتح القفل</translation> <translation id="9111305600911828693">لم يتم إعداد الترخيص.</translation> <translation id="9111395131601239814"><ph name="NETWORKDEVICE" />: <ph name="STATUS" /></translation> +<translation id="9111519254489533373">الانتقال إلى إعدادات "التصفُّح الآمن"</translation> <translation id="9111668656364922873">مرحبًا بك في ملفك الشخصي الجديد</translation> <translation id="9112517757103905964">تنصح مؤسستك بحذف هذا الملف لأنّه يتضمّن محتوى حسّاسًا.</translation> <translation id="9112748030372401671">تغيير الخلفية</translation>
diff --git a/chrome/app/resources/generated_resources_be.xtb b/chrome/app/resources/generated_resources_be.xtb index 5419485..2b38e54 100644 --- a/chrome/app/resources/generated_resources_be.xtb +++ b/chrome/app/resources/generated_resources_be.xtb
@@ -1370,6 +1370,7 @@ <translation id="2046702855113914483">Рамен</translation> <translation id="204706822916043810">Ідзе праверка наяўнасці віртуальнай машыны</translation> <translation id="2048182445208425546">Доступ да сеткавага трафіка</translation> +<translation id="2048254245884707305">Правяраецца наяўнасць шкодных праграм...</translation> <translation id="2048554637254265991">Памылка запуску менеджара кантэйнераў. Паўтарыце спробу.</translation> <translation id="2048653237708779538">Дзеянне недаступнае</translation> <translation id="204914487372604757">Стварыць ярлык</translation> @@ -2084,6 +2085,7 @@ <translation id="2580889980133367162">Заўсёды дазваляць хосту <ph name="HOST" /> спампоўваць некалькі файлаў</translation> <translation id="258095186877893873">Доўгая</translation> <translation id="2581455244799175627">Дадатковая інфармацыя пра дазвол выкарыстоўваць староннія файлы cookie</translation> +<translation id="2581992808349413349">Выкарыстоўвайце бяспечнае падключэнне, каб знайсці IP-адрас сайта ў сістэме даменных імёнаў (DNS). Для гэтага ўжываецца кіруемы пастаўшчык паслуг, указаны ў шаблоне <ph name="DNS_SERVER_TEMPLATE_WITH_IDENTIFIER" />.</translation> <translation id="2582253231918033891"><ph name="PRODUCT_NAME" /> <ph name="PRODUCT_VERSION" /> (платформа <ph name="PLATFORM_VERSION" />) <ph name="DEVICE_SERIAL_NUMBER" /></translation> <translation id="2584109212074498965">Не ўдалося атрымаць білет Kerberos. Паўтарыце спробу або звярніцеся да адміністратара прылад сваёй арганізацыі. (Код памылкі: <ph name="ERROR_CODE" />.)</translation> <translation id="2586561813241011046">Не ўдалося ўсталяваць праграму <ph name="APP_NAME" />. Паўтарыце спробу або звярніцеся да адміністратара. Код памылкі: <ph name="ERROR_CODE" />.</translation> @@ -2558,6 +2560,7 @@ <translation id="2942581856830209953">Наладзіць гэту старонку</translation> <translation id="2942707801577151363">Вы зможаце адкрываць, рэдагаваць і захоўваць файлы Word, Excel і PowerPoint. Для выкарыстання некаторых функцый патрабуецца падпіска.</translation> <translation id="2943268899142471972">Выберыце Ansible Playbook ці рэзервовы файл Crostini</translation> +<translation id="2943478529590267286">Змяненне сістэмнай раскладкі клавіятуры</translation> <translation id="2944060181911631861">Адпраўка даных пра выкарыстанне і дыягностыку. Дапамажыце палепшыць функцыянальнасць прылады Android шляхам аўтаматычнай адпраўкі ў Google даных пра дыягностыку, выкарыстанне прылады і праграм. Яны будуць карысныя для паляпшэння стабільнасці сістэмы і праграм і для іншых удасканаленняў. Некаторыя згрупаваныя даныя таксама будуць карысныя для праграм і партнёраў Google, напрыклад распрацоўшчыкаў Android. Калі налада "Дадатковыя дзеянні ў інтэрнэце і праграмах" уключана, адпаведныя даныя могуць захоўвацца ва Уліковым запісе Google. <ph name="BEGIN_LINK1" />Даведацца больш<ph name="END_LINK1" /></translation> <translation id="2946054015403765210">Перайсці да файлаў</translation> <translation id="2946119680249604491">Дадаць падключэнне</translation> @@ -2847,6 +2850,7 @@ <translation id="3192947282887913208">Аўдыяфайлы</translation> <translation id="3193695589337931419">Утыліты сігналаў сістэмы</translation> <translation id="3194786596445804250">Паказаць падрабязныя звесткі пра блакіроўку старонніх файлаў cookie</translation> +<translation id="3196912927885212665">Каб наладзіць з дапамогай тэлефона Android, уключыце Bluetooth на Chromebook</translation> <translation id="3197453258332670132">Па націсканні правай кнопкай мышы або доўгім націсканні паказваць звязаную інфармацыю пра вылучаны вамі тэкст</translation> <translation id="3198487209506801480"><ph name="BEGIN_PARAGRAPH1" />Вы можаце дазволіць прыладам з ChromeOS адпраўляць аўтаматычныя справаздачы, каб дапамагаць нам выяўляць, над чым трэба працаваць у першую чаргу. У гэтыя справаздачы можа ўключацца, у прыватнасці, інфармацыя пра збоі ў ChromeOS, а таксама пра тое, якія функцыі выкарыстоўваліся і які аб'ём памяці быў звычайна задзейнічаны. Некаторыя сукупныя даныя будуць карыснымі для праграм і партнёраў Google, напрыклад, распрацоўшчыкаў Android. Іншыя даныя пра выкарыстанне і дыягностыку, у тым ліку для Android і вэб-праграм, будуць збірацца, калі таксама ўключана сінхранізацыя праграм.<ph name="END_PARAGRAPH1" /> <ph name="BEGIN_PARAGRAPH2" />Вы можаце дазволіць або забараніць стварэнне такіх справаздач у любы час у наладах прылады з ChromeOS вашага дзіцяці. Калі вы з'яўляецеся адміністратарам дамена, вы можаце змяніць гэту наладу ў кансолі адміністратара.<ph name="END_PARAGRAPH2" /> @@ -3275,6 +3279,7 @@ <translation id="3544879808695557954">Імя карыстальніка (неабавязкова)</translation> <translation id="3547954654003013442">Налады проксі-сервера</translation> <translation id="3548162552723420559">Дапасоўваць колер экрана да навакольнага асяроддзя</translation> +<translation id="354949590254473526">Увядзіце URL-адрас свайго DNS-запыту</translation> <translation id="3550593477037018652">Выключыць сотавую сетку</translation> <translation id="3550915441744863158">Chrome абнаўляецца аўтаматычна, таму ў вас заўсёды будзе ўсталявана апошняя версія</translation> <translation id="3551320343578183772">Закрыць укладку</translation> @@ -3588,6 +3593,7 @@ <translation id="3784472333786002075">Файлы cookie – гэта файлы, якія ствараюцца вэб-сайтамі. Ёсць два віды файлаў cookie. Асноўныя файлы cookie ствараюцца самім сайтам, які вы наведваеце. Ён паказваецца ў адрасным радку. Староннія файлы cookie ствараюцца іншымі сайтамі. Гэтым сайтам належыць пэўнае змесціва (напрыклад рэклама або відарысы), размешчанае на вэб-сайце, які вы наведваеце.</translation> <translation id="3785308913036335955">Паказваць ярлыкі праграм</translation> <translation id="3785727820640310185">Захаваныя паролі для гэтага сайта</translation> +<translation id="3786224729726357296">Выдаліць даныя і дазволы сайта <ph name="SITE" /></translation> <translation id="3786834302860277193">Паказваць падкрэсліванне тэксту пры яго ўводзе</translation> <translation id="3787434344076711519">Выконваецца пераклад</translation> <translation id="3788301286821743879">Не ўдалося запусціць праграму-кіёск.</translation> @@ -4410,6 +4416,7 @@ <translation id="443454694385851356">Ранейшая версія (небяспечная)</translation> <translation id="4434611816075088065">Іншых рэкамендацый па бяспецы зараз няма</translation> <translation id="443475966875174318">Абнавіць або выдаліць несумяшчальныя праграмы</translation> +<translation id="4437947179446780764">Дадаць свайго пастаўшчыка паслуг DNS</translation> <translation id="4438043733494739848">Празрыста</translation> <translation id="4441124369922430666">Ці запускаць аўтаматычна гэту праграму пры ўключэнні прылады?</translation> <translation id="4441147046941420429">Каб працягнуць, дастаньце ключ бяспекі з прылады, затым зноў устаўце і дакраніцеся да яго</translation> @@ -4998,7 +5005,9 @@ <translation id="4907161631261076876">Гэты файл звычайна не спампоўваецца і можа быць небяспечным.</translation> <translation id="4908811072292128752">Адкрыйце новую ўкладку, каб праглядаць разам два сайты</translation> <translation id="4909038193460299775">Гэты ўліковы запіс знаходзіцца пад кіраваннем дамена <ph name="DOMAIN" />, таму з прылады будуць выдалены вашы закладкі, гісторыя, паролі і іншыя налады. Але вашы даныя застануцца ва Уліковым запісе Google, і імі можна будзе кіраваць на старонцы <ph name="BEGIN_LINK" />Панэль кіравання Google<ph name="END_LINK" />.</translation> +<translation id="4911572142453926213">Выкарыстоўвайце бяспечнае падключэнне, каб знайсці IP-адрас сайта ў сістэме даменных імёнаў (DNS)</translation> <translation id="4912643508233590958">Абуджэнні ад бяздзейнасці</translation> +<translation id="4913209098186576320">Гэты файл можа быць небяспечным<ph name="LINE_BREAK" />Праверка займае больш часу, чым звычайна...</translation> <translation id="4915961947098019832">Дазволена паказваць відарысы</translation> <translation id="4916542008280060967">Дазволіць сайту змяніць файл <ph name="FILE_NAME" />?</translation> <translation id="4917385247580444890">Моцны</translation> @@ -5035,6 +5044,7 @@ <translation id="4941963255146903244">Прагляд фота, медыяфайлаў і праграм з тэлефона</translation> <translation id="494286511941020793">Даведка па канфігурацыі проксі-сервера</translation> <translation id="4943368462779413526">Мяч для амерыканскага футбола</translation> +<translation id="4943927218331934807">Патрабуецца пароль</translation> <translation id="4944310289250773232">Гэты сэрвіс аўтэнтыфікацыі размешчаны на дамене <ph name="SAML_DOMAIN" /></translation> <translation id="4945439665401275950">Каб наладзіць выкарыстанне адбітка пальца, папрасіце дзіця дакрануцца да кнопкі сілкавання. Адбіткі пальцаў дзіцяці надзейна захоўваюцца на прыладзе <ph name="DEVICE_TYPE" /> і нікуды не перадаюцца.</translation> <translation id="4946459324029651239">Вы абаронены стандартнымі сродкамі</translation> @@ -5474,6 +5484,7 @@ <translation id="5307030433605830021">Крыніца не падтрымліваецца</translation> <translation id="5307386115243749078">Спалучыць пераключальнік Bluetooth</translation> <translation id="5308380583665731573">Падключыцца</translation> +<translation id="5308989548591363504">Праверыць наяўнасць шкодных праграм</translation> <translation id="5309418307557605830">Памочнік Google працуе і на гэтай прыладзе</translation> <translation id="5309641450810523897">Ідэнтыфікатар запыту ў службу падтрымкі</translation> <translation id="5311304534597152726">Уваход з уліковага запісу</translation> @@ -5781,6 +5792,7 @@ <translation id="555604722231274592">Уключыць функцыю "<ph name="FEATURE_NAME" />"</translation> <translation id="5556459405103347317">Перазагрузіць</translation> <translation id="5558129378926964177">Павялічыць &маштаб</translation> +<translation id="5558594314398017686">Стандартныя налады АС (пры наяўнасці)</translation> <translation id="5559311991468302423">Выдаленне адраса</translation> <translation id="5559768063688681413">Няма захаваных прынтараў</translation> <translation id="55601339223879446">Рэгуліроўка граніц працоўнага стала ў межах дысплэя</translation> @@ -8866,6 +8878,7 @@ <translation id="8005600846065423578">Заўсёды дазваляць хосту <ph name="HOST" /> праглядаць буфер абмену</translation> <translation id="8006630792898017994">Прабел або Tab</translation> <translation id="8008356846765065031">Інтэрнэт адключаны. Праверце падключэнне да інтэрнэту.</translation> +<translation id="8008704580256716350">Падазроны файл заблакіраваны</translation> <translation id="8009225694047762179">Кіраваць паролямі</translation> <translation id="8011372169388649948">Закладка "<ph name="BOOKMARK_TITLE" />" перамешчана.</translation> <translation id="8012188750847319132">Caps Lock</translation> @@ -10215,6 +10228,7 @@ <translation id="9057354806206861646">Абнавіць расклад</translation> <translation id="9058070466596314168">{NUM_NOTIFICATION,plural, =1{Прыкладна 1 апавяшчэнне ў дзень}one{Прыкладна {NUM_NOTIFICATION} апавяшчэнне ў дзень}few{Прыкладна {NUM_NOTIFICATION} апавяшчэнні ў дзень}many{Прыкладна {NUM_NOTIFICATION} апавяшчэнняў у дзень}other{Прыкладна {NUM_NOTIFICATION} апавяшчэння ў дзень}}</translation> <translation id="9058760336383947367">Паглядзець файл PPD для прынтара</translation> +<translation id="9060042817356580609">Выбраць пастаўшчыка паслуг DNS</translation> <translation id="9061694916020926968">Каб выкарыстоўваць Steam для Chromebook (бэта), увайдзіце ва Уліковы запіс Google і паўтарыце спробу.</translation> <translation id="9062468308252555888">14x</translation> <translation id="9063208415146866933">Памылка з радка <ph name="ERROR_LINE_START" /> па <ph name="ERROR_LINE_END" /></translation>
diff --git a/chrome/app/resources/generated_resources_bs.xtb b/chrome/app/resources/generated_resources_bs.xtb index fa38bcb..54e5a96 100644 --- a/chrome/app/resources/generated_resources_bs.xtb +++ b/chrome/app/resources/generated_resources_bs.xtb
@@ -1380,6 +1380,7 @@ <translation id="2046702855113914483">Ramen</translation> <translation id="204706822916043810">Provjeravanje virtuelnog računara</translation> <translation id="2048182445208425546">Pristup vašem mrežnom saobraćaju</translation> +<translation id="2048254245884707305">Traženje zlonamjernog softvera...</translation> <translation id="2048554637254265991">Došlo je do greške prilikom pokretanja upravitelja spremnika. Pokušajte ponovo.</translation> <translation id="2048653237708779538">Radnja nije dostupna</translation> <translation id="204914487372604757">Napravi prečicu</translation> @@ -2097,6 +2098,7 @@ <translation id="2580889980133367162">Uvijek dozvoli da <ph name="HOST" /> preuzima višestruke fajlove</translation> <translation id="258095186877893873">Duga</translation> <translation id="2581455244799175627">Više o odobravanju kolačića treće strane</translation> +<translation id="2581992808349413349">Upotrijebite sigurnu vezu za traženje IP adrese web-lokacije u DNS-u (Domain Name System). Ova aplikacija upotrebljava upravljanog davatelja usluga na web-lokaciji <ph name="DNS_SERVER_TEMPLATE_WITH_IDENTIFIER" /></translation> <translation id="2582253231918033891"><ph name="PRODUCT_NAME" /> <ph name="PRODUCT_VERSION" /> (Platforma <ph name="PLATFORM_VERSION" />) <ph name="DEVICE_SERIAL_NUMBER" /></translation> <translation id="2584109212074498965">Preuzimanje Kerberos tiketa nije uspjelo. Pokušajte ponovo ili se obratite administratoru uređaja organizacije. (Kȏd greške: <ph name="ERROR_CODE" />).</translation> <translation id="2586561813241011046">Instaliranje aplikacije <ph name="APP_NAME" /> nije uspjelo. Pokušajte ponovo ili kontaktirajte administratora. Kȏd greške: <ph name="ERROR_CODE" />.</translation> @@ -2571,6 +2573,7 @@ <translation id="2942581856830209953">Prilagođavanje stranice</translation> <translation id="2942707801577151363">Otvorite, uredite i sačuvajte Word, Excel i PowerPoint fajlove. Određene funkcije mogu zahtijevati pretplatu.</translation> <translation id="2943268899142471972">Odaberite Ansible Playbook ili Crostini fajl sigurnosne kopije</translation> +<translation id="2943478529590267286">Promjena izgleda tipkovnice sustava</translation> <translation id="2944060181911631861">Šaljite podatke o upotrebi i dijagnostici. Poboljšajte svoje iskustvo korištenja Androida automatskim slanjem podataka o dijagnostici, uređaju i korištenju aplikacija Googleu. Ovo će pomoći poboljšati stabilnost sistema i aplikacija i još mnogo toga. Neki zbirni podaci će također pomoći Googleovim aplikacijama i partnerima, kao što su Androidovi programeri. Ako je uključena postavka dodatna Aktivnost na webu i u aplikacijama, ovi podaci će možda biti sačuvani na vaš Google račun. <ph name="BEGIN_LINK1" />Saznajte više<ph name="END_LINK1" /></translation> <translation id="2946054015403765210">Idi u fajlove</translation> <translation id="2946119680249604491">Dodaj vezu</translation> @@ -2860,6 +2863,7 @@ <translation id="3192947282887913208">Audio fajlovi</translation> <translation id="3193695589337931419">Uslužni programi za signalizaciju sistema</translation> <translation id="3194786596445804250">Prikaži detalje o blokiranju kolačića trećih strana</translation> +<translation id="3196912927885212665">Da biste postavili uređaj pomoću Android telefona, Bluetooth na Chromebooku treba biti uključen</translation> <translation id="3197453258332670132">Desnim klikom ili dugim pritiskom pogledajte srodne informacije za odabir teksta</translation> <translation id="3198487209506801480"><ph name="BEGIN_PARAGRAPH1" />Ako dozvolite ChromeOS uređajima da šalju automatske izvještaje, pomoći ćete nam da damo prioritet stvarima koje je potrebno popraviti i poboljšati u ChromeOS-u. Ti izvještaji mogu sadržavati informacije o padovima ChromeOS-a, funkcijama koje koristite i količini memorije koju obično koristite. Neki zbirni podaci pomažu Googleovim aplikacijama i partnerima kao što su Androidovi programeri. Drugi dijagnostički podaci i podaci o korištenju aplikacija, uključujući za Android i web aplikacije, prikupljat će se ako je i sinhronizacija aplikacija uključena.<ph name="END_PARAGRAPH1" /> <ph name="BEGIN_PARAGRAPH2" />Možete dozvoliti ili onemogućiti te izvještaje bilo kada u postavkama djetetovog ChromeOS uređaja. Ako ste administrator domene, možete promijeniti ovu postavku na administratorskoj konzoli.<ph name="END_PARAGRAPH2" /> @@ -3288,6 +3292,7 @@ <translation id="3544879808695557954">Korisničko ime (nije obavezno)</translation> <translation id="3547954654003013442">Postavke proksi servera</translation> <translation id="3548162552723420559">Prilagođava boju ekrana prema okruženju</translation> +<translation id="354949590254473526">Unesite URL upita za prilagođeni DNS</translation> <translation id="3550593477037018652">Prekini povezanost mobilne mreže</translation> <translation id="3550915441744863158">Chrome se ažurira automatski tako da uvijek imate najnoviju verziju</translation> <translation id="3551320343578183772">Zatvori karticu</translation> @@ -3603,6 +3608,7 @@ <translation id="3784472333786002075">Kolačići su fajlovi koje kreiraju web lokacije. Postoje dvije vrste kolačića: Izvorne kolačiće kreira web lokacija koju posjećujete. Web lokacija je prikazana na traci za adresu. Kolačiće treće strane kreiraju druge web lokacije. Te web lokacije posjeduju dio sadržaja, kao što su oglasi ili slike, koji se prikazuje na web lokaciji koju posjećujete.</translation> <translation id="3785308913036335955">Prikaži prečice aplikacije</translation> <translation id="3785727820640310185">Sačuvane lozinke za ovu web lokaciju</translation> +<translation id="3786224729726357296">Brisanje podataka web-lokacije i dopuštenja za web-lokaciju <ph name="SITE" /></translation> <translation id="3786834302860277193">Podvlači tekst sastava</translation> <translation id="3787434344076711519">Čeka se prijevod</translation> <translation id="3788301286821743879">Pokretanje aplikacije za kiosk nije uspjelo.</translation> @@ -4425,6 +4431,7 @@ <translation id="443454694385851356">Zastarjelo (nesigurno)</translation> <translation id="4434611816075088065">Trenutno ni za šta drugo nije potrebna vaša radnja</translation> <translation id="443475966875174318">Ažurirajte ili uklonite nekompatibilne aplikacije</translation> +<translation id="4437947179446780764">Dodajte davatelja usluge prilagođenog DNS-a</translation> <translation id="4438043733494739848">Providno</translation> <translation id="4441124369922430666">Želite li automatski pokrenuti ovu aplikaciju prilikom uključivanja uređaja?</translation> <translation id="4441147046941420429">Da nastavite, uklonite sigurnosni ključ iz uređaja, a zatim ga ponovo umetnite i dodirnite</translation> @@ -5014,7 +5021,9 @@ <translation id="4907161631261076876">Ovaj fajl se ne preuzima često i može biti opasan.</translation> <translation id="4908811072292128752">Otvorite novu karticu da istovremeno pregledate dvije web lokacije</translation> <translation id="4909038193460299775">S obzirom da ovim računom upravlja domena <ph name="DOMAIN" />, vaše oznake, historija, lozinke i druge postavke će se izbrisati s ovog uređaja. Međutim, postojeći podaci će ostati pohranjeni na vašem Google računu i njima možete upravljati na <ph name="BEGIN_LINK" />Google kontrolnoj tabli<ph name="END_LINK" />.</translation> +<translation id="4911572142453926213">Upotreba sigurne veze za traženje IP adrese web-lokacije u DNS-u (Domain Name System)</translation> <translation id="4912643508233590958">Buđenja iz neaktivnosti</translation> +<translation id="4913209098186576320">Datoteka je možda opasna<ph name="LINE_BREAK" />Provjera traje dulje nego inače...</translation> <translation id="4915961947098019832">Dozvoljeno je prikazivanje slika</translation> <translation id="4916542008280060967">Dozvoliti web lokaciji da uredi fajl <ph name="FILE_NAME" />?</translation> <translation id="4917385247580444890">Jako</translation> @@ -5051,6 +5060,7 @@ <translation id="4941963255146903244">Pregledajte fotografije, medijski sadržaj i aplikacije telefona</translation> <translation id="494286511941020793">Pomoć za konfiguraciju proksi servera</translation> <translation id="4943368462779413526">Nogomet</translation> +<translation id="4943927218331934807">Potrebna je zaporka</translation> <translation id="4944310289250773232">Ovu uslugu autentifikacije hostira <ph name="SAML_DOMAIN" /></translation> <translation id="4945439665401275950">Da postavi otisak prsta, vaše dijete treba dodirnuti dugme za uključivanje. Podaci otiska prsta vašeg djeteta se sigurno pohranjuju i nikada ne napuštaju uređaj <ph name="DEVICE_TYPE" />.</translation> <translation id="4946459324029651239">Dobijate standardnu zaštitu</translation> @@ -5490,6 +5500,7 @@ <translation id="5307030433605830021">Izvor nije podržan</translation> <translation id="5307386115243749078">Uparivanje Bluetooth prekidača</translation> <translation id="5308380583665731573">Poveži</translation> +<translation id="5308989548591363504">Provjerite je li instaliran zlonamjerni softver</translation> <translation id="5309418307557605830">Google Asistent funkcionira i ovdje</translation> <translation id="5309641450810523897">ID predmeta podrške</translation> <translation id="5311304534597152726">Prijavljivanje kao</translation> @@ -5797,6 +5808,7 @@ <translation id="555604722231274592">Omogućite funkciju <ph name="FEATURE_NAME" /></translation> <translation id="5556459405103347317">Učitaj ponovo</translation> <translation id="5558129378926964177">Uve&ćaj</translation> +<translation id="5558594314398017686">Zadane postavke OS-a (ako su dostupne)</translation> <translation id="5559311991468302423">Izbrišite adresu</translation> <translation id="5559768063688681413">Nema sačuvanih štampača</translation> <translation id="55601339223879446">Podesite granice radne površine unutar ekrana</translation> @@ -8881,6 +8893,7 @@ <translation id="8005600846065423578">Uvijek omogući da <ph name="HOST" /> vidi međumemoriju</translation> <translation id="8006630792898017994">Razmak ili Tab</translation> <translation id="8008356846765065031">Veza s internetom je prekinuta. Provjerite internetsku vezu.</translation> +<translation id="8008704580256716350">Blokirana je sumnjiva datoteka</translation> <translation id="8009225694047762179">Upravljaj lozinkama</translation> <translation id="8011372169388649948">Stavka "<ph name="BOOKMARK_TITLE" />" je premještena.</translation> <translation id="8012188750847319132">caps lock</translation> @@ -10230,6 +10243,7 @@ <translation id="9057354806206861646">Ažuriranje rasporeda</translation> <translation id="9058070466596314168">{NUM_NOTIFICATION,plural, =1{Otprilike 1 obavještenje dnevno}one{Otprilike {NUM_NOTIFICATION} obavještenje dnevno}few{Otprilike {NUM_NOTIFICATION} obavještenja dnevno}other{Otprilike {NUM_NOTIFICATION} obavještenja dnevno}}</translation> <translation id="9058760336383947367">Prikaži PPD štampača</translation> +<translation id="9060042817356580609">Odaberite davatelja usluge DNS-a</translation> <translation id="9061694916020926968">Morate biti prijavljeni na Google račun da koristite Steam za Chromebook (beta verzija). Prijavite se i pokušajte ponovo.</translation> <translation id="9062468308252555888">14 x</translation> <translation id="9063208415146866933">Greška iz reda <ph name="ERROR_LINE_START" /> u <ph name="ERROR_LINE_END" /></translation>
diff --git a/chrome/app/resources/generated_resources_eu.xtb b/chrome/app/resources/generated_resources_eu.xtb index c23d81a..5d8d6c1 100644 --- a/chrome/app/resources/generated_resources_eu.xtb +++ b/chrome/app/resources/generated_resources_eu.xtb
@@ -716,6 +716,7 @@ <translation id="1566329594234563241">Inaktibo eta entxufatuta dagoen bitartean</translation> <translation id="1567135437923613642">Gaitu proba aipagarriak</translation> <translation id="1567387640189251553">Beste teklatu bat konektatu duzu pasahitza azkenekoz idatzi zenuenetik. Agian sakatzen ari zaren teklak erregistratzen ari da, pasahitzak lapurtzeko asmoz.</translation> +<translation id="1567579616025300478">Webguneak ez du baimenik gailuan datuak gordetzeko.</translation> <translation id="156793199942386351">"<ph name="ACTION" />" ekintzari esleitu zaio dagoeneko "<ph name="CURRENTKEY" />". Sakatu edozein tekla <ph name="RESPONSE" />.</translation> <translation id="1567993339577891801">JavaScript-en kontsola</translation> <translation id="1569466257325986920">Google-ko kontuko pasahitza aldatzen den hurrengoan, gailuko datuak automatikoki berreskuratuko dira Google-ko kontuan saioa hasten duzunean</translation> @@ -1237,6 +1238,7 @@ <translation id="1944535645109964458">Ez dago sarbide-gakorik erabilgarri</translation> <translation id="1944921356641260203">Eguneratzea aurkitu da</translation> <translation id="1947136734041527201">Aukera honi esker, identitate-zerbitzu bateko kontuaren bidez webguneetan saioa has dezakezu</translation> +<translation id="1948632501103125383">Gorde bideoaren fotograma honela…</translation> <translation id="1949332606889020901">Hutsegiteen identifikatzaileak</translation> <translation id="1949584741547056205">Erantzun bizkorrak</translation> <translation id="1949849604471335579">Pertsonalizatu horma-papera, pantaila-babeslea, nabarmentzeko koloreak eta abar</translation> @@ -1472,6 +1474,7 @@ <translation id="2123766928840368256">Aukeratu beste fitxategi bat</translation> <translation id="2124930039827422115">{1,plural, =1{Erabiltzaile batek emandako balorazioa: <ph name="AVERAGE_RATING" />.}other{# erabiltzailek emandako balorazioa: <ph name="AVERAGE_RATING" />.}}</translation> <translation id="2126167708562367080">Sinkronizazioa desgaitu du administratzaileak.</translation> +<translation id="212633415503779955">Orca</translation> <translation id="2127372758936585790">Potentzia txikiko kargagailua</translation> <translation id="212862741129535676">Frekuentziaren egoera-okupazioaren ehunekoa</translation> <translation id="212876957201860463">Gailu mugikorra konfiguratzeko prestatzen…</translation> @@ -1965,6 +1968,7 @@ <translation id="2489918096470125693">Gehitu &karpeta…</translation> <translation id="2489931062851778802">Idatzi tekla hauek <ph name="DEVICE_NAME" /> gailuan</translation> <translation id="2490481887078769936">Kendu da "<ph name="FILE_NAME" />" zerrendatik</translation> +<translation id="249098303613516219">Webguneetako datuak gailuan gordetzea onartzen da</translation> <translation id="249113932447298600"><ph name="DEVICE_LABEL" /> gailua ez da bateragarria une honetan.</translation> <translation id="2492461744635776704">Ziurtagiria sinatzeko eskaera prestatzen</translation> <translation id="249330843868392562">Ireki testua ahots bihurtzeko eginbidearen ezarpenak</translation> @@ -1983,6 +1987,7 @@ <translation id="2501920221385095727">Tekla itsaskorrak</translation> <translation id="2502441965851148920">Gaituta daude eguneratze automatikoak. Administratzaileak desgaitu ditu eskuzko eguneratzeak.</translation> <translation id="2502719318159902502">Sarbide osoa</translation> +<translation id="2504801073028762184">Segurtasun-gomendioak</translation> <translation id="2505324914378689427">{SCREEN_INDEX,plural, =1{# pantaila}other{# pantaila}}</translation> <translation id="2505402373176859469"><ph name="RECEIVED_AMOUNT" />/<ph name="TOTAL_SIZE" /></translation> <translation id="250704661983564564">Pantailaren antolaketa</translation> @@ -2753,6 +2758,7 @@ <translation id="3103451787721578293">Idatzi datu hauek kargatzeko arrazoi bat:</translation> <translation id="3105339775057145050">Ezin izan da instalatu azken eguneratzea</translation> <translation id="3105796011181310544">Google-ra itzuli nahi duzu?</translation> +<translation id="3105820656234755131">Eguneratu da pasahitza</translation> <translation id="3105990244222795498"><ph name="DEVICE_NAME" /> (Bluetootha)</translation> <translation id="310671807099593501">Webgunea Bluetootha erabiltzen ari da</translation> <translation id="3108931485517391283">Ezin da jaso</translation> @@ -3447,6 +3453,7 @@ <translation id="3696817060563289264">Deskargatu dira testu-hautematearen fitxategiak</translation> <translation id="369736917241079046">Exekutatzeko tresnaren tekla + ezkerrera egiteko gezi-tekla</translation> <translation id="3697716475445175867">azken irekitze-data</translation> +<translation id="3697732362672163692">{NUM_SITES,plural, =1{Webgune honek etorkizunean jakinarazpenak bidaltzea geldiaraz dezakezu.}other{Webgune hauek etorkizunean jakinarazpenak bidaltzea geldiaraz dezakezu.}}</translation> <translation id="3697952514309507634">Chrome-ko beste profilak</translation> <translation id="3698471669415859717">Berrikuspena osatu duzu</translation> <translation id="3699624789011381381">Helbide elektronikoa</translation> @@ -4096,6 +4103,7 @@ <translation id="4190492351494485814">Hasierako konfigurazio-prozesurako Internetera konektatu behar zara, fitxategiak Chromebook-arekin sinkronizatu ahal izateko</translation> <translation id="4190828427319282529">Nabarmendu teklatuaren fokua</translation> <translation id="4191892134568599822"><ph name="FEATURE_NAME" /> bidez jaso nahi duzu?</translation> +<translation id="4192024474038595073">{NUM_SITES,plural, =1{Baimenak kendu zaizkio erabiltzen ez den webgune bati}other{Baimenak kendu zaizkie erabiltzen ez diren {NUM_SITES} webguneri}}</translation> <translation id="4193251682249731404">Autoritate ziurtagiri-emaile fidagarria</translation> <translation id="4193575319002689239">Erakutsi txartelak</translation> <translation id="4193836101014293726">Ezin da ezabatu profil hau</translation> @@ -4324,6 +4332,7 @@ <translation id="4379281552162875326">"<ph name="APP_NAME" />" desinstalatu nahi duzu?</translation> <translation id="4380055775103003110">Arazoak badirau, <ph name="SITE_ETLD_PLUS_ONE" /> webgunean aurrera egiteko beste modu batzuk proba ditzakezu.</translation> <translation id="4380648069038809855">Pantaila osoko modua ezarri da</translation> +<translation id="4381902252848068865">Ez eman datuak gordetzeko baimena webguneari</translation> <translation id="4383048856908088702">Fitxa inaktibo zegoen bitartean, memoria-aurreztaileak beste zeregin batzuetarako <ph name="MEMORY_VALUE" /> libre utzi ditu memorian. Hori aldatzeko, joan <ph name="SETTINGS_LINK" /> atalera.</translation> <translation id="4384312707950789900">Gehitu hobetsietan</translation> <translation id="4384652540891215547">Aktibatu luzapena</translation> @@ -5548,6 +5557,7 @@ <translation id="5383377866517186886">Kamera erabiltzeko baimena desaktibatuta dago Mac sistemaren hobespenetan</translation> <translation id="5383740867328871413">Talde izengabea. <ph name="GROUP_CONTENTS" />. <ph name="COLLAPSED_STATE" />.</translation> <translation id="538822246583124912">Enterprise-ren gidalerroak aldatu egin dira. Proben botoia gehitu egin da tresna-barran. Probak gaitzeko leihoa ireki dadin, sakatu botoia.</translation> +<translation id="5388567882092991136">{NUM_SITES,plural, =1{1 webgune aurkitu da jakinarazpen ugarirekin}other{{NUM_SITES} webgune aurkitu dira jakinarazpen ugarirekin}}</translation> <translation id="5388885445722491159">Parekatuta</translation> <translation id="5389626883706033615">Zuri buruz gordetako informazioa erabiltzeko baimena eskatzea debekatu zaie webguneei</translation> <translation id="5390112241331447203">Gehitu iritzi-txostenetan bidalitako system_logs.txt fitxategia.</translation> @@ -5866,6 +5876,7 @@ <translation id="5636012309446422"><ph name="DEVICE" /> gailua <ph name="PRIMARY_EMAIL" /> kontutik kendu nahi duzu?</translation> <translation id="5636996382092289526"><ph name="NETWORK_ID" /> erabiltzeko, agian <ph name="LINK_START" />sarearen saio-hasierako orrira<ph name="LINK_END" /> joan beharko zara; segundo gutxi barru irekiko da hori automatikoki. Hala ez bada, ezin izango duzu sarea erabili.</translation> <translation id="5637476008227280525">Gaitu datu-konexioa</translation> +<translation id="563821631542362636">Eman datuak gordetzeko baimena webguneari</translation> <translation id="5638309510554459422">Aurkitu luzapenak eta gaiak <ph name="BEGIN_LINK" />Chrome Web Store<ph name="END_LINK" /> dendan</translation> <translation id="5639549361331209298">Kargatu orria berriro eta, aukera gehiago ikusteko, eduki hau sakatuta</translation> <translation id="5640133431808313291">Kudeatu segurtasun-giltzak</translation> @@ -6248,6 +6259,7 @@ <translation id="5948476936444935795">Utzi inportazioa bertan behera</translation> <translation id="5948536763493709626">Konektatu teklatu edo sagu bat, edo jarraitu gailuak konfiguratzen ukipen-pantaila erabilita. Bluetooth bidezko gailuak erabiltzen ari bazara, ziurtatu parekatzeko prest daudela.</translation> <translation id="5949544233750246342">Ezin da analizatu fitxategia</translation> +<translation id="594993197557058302">Sakatu 1-4 tekla aldatzaileak (Ktrl, Alt, Maius, Bilaketa edo Exekutatzeko tresnaren tekla) eta beste tekla bat. Tekla bakarra ere aukera dezakezu.</translation> <translation id="5950762317146173294">Baliteke fitxategi hau birusa edo malwarea izatea</translation> <translation id="5951303645598168883"><ph name="ORIGIN" /> webguneak gailuko letrak erabili nahi ditu</translation> <translation id="5951624318208955736">Monitorea</translation> @@ -7042,6 +7054,7 @@ Arriskuan dauden # pasahitz gehiago dauzkazu. Google-ren Pasahitz-kudeatzailea zerbitzuak pasahitz horiek orain aldatzea gomendatzen du.}}</translation> <translation id="6596325263575161958">Enkriptatze aukerak</translation> <translation id="6596816719288285829">IP helbidea</translation> +<translation id="6596916244504302242">Kargatu berriro orria ezarpen berriak webgune honetan aplikatzeko</translation> <translation id="6597017209724497268">Adibideak</translation> <translation id="6597324406048772521">Webgune honetan ezin da erabili luzapenik</translation> <translation id="6597331566371766302">Administratzaileak blokeatu egin ditu luzapen hauek:</translation> @@ -7229,8 +7242,10 @@ <translation id="6759193508432371551">Jatorrizko datuak berrezartzea</translation> <translation id="6760354150216532978">Abisua: webgune honek egiten dituzun aldaketak ikus ditzake</translation> <translation id="676158322851696513">"<ph name="EXTENSION_NAME" />"</translation> +<translation id="6761623907967804682">Ez da onartzen webguneetako datuak gailuan gordetzea</translation> <translation id="6762833852331690540">Aktibatuta</translation> <translation id="676560328519657314">Google Pay-ko ordainketa-metodoak</translation> +<translation id="6766488013065406604">Joan Google-ren Pasahitz-kudeatzailea zerbitzura</translation> <translation id="6767566652486411142">Aukeratu beste hizkuntza bat…</translation> <translation id="6767639283522617719">Ezin izan da sartu domeinuan. Ziurtatu antolamendu-unitatearen ezarpenak zuzenak direla.</translation> <translation id="6768034047581882264">Ezin dute erakutsi segurua ez den edukirik</translation> @@ -7289,6 +7304,7 @@ <translation id="6801308659697002152">{NUM_EXTENSIONS,plural, =1{Aukeratu luzapenak webgunea irakurri edo aldatu ahal duen}other{Aukeratu luzapenek webgunea irakurri edo aldatu ahal duten}}</translation> <translation id="6801435275744557998">Kalibratu ukipen-pantaila</translation> <translation id="6802031077390104172"><ph name="USAGE" /> (<ph name="OID" />)</translation> +<translation id="6803766346203101854">Webguneak datuak zure gailuan gordetzeko baimena du.</translation> <translation id="680488281839478944">"<ph name="DEFAULT_VM_NAME" />" makina birtuala lehendik dago</translation> <translation id="6805647936811177813">Hasi saioa <ph name="TOKEN_NAME" /> webgunean <ph name="HOST_NAME" /> webgunearen bezero-ziurtagiria inportatzeko.</translation> <translation id="680572642341004180">Gaitu RLZ jarraipena <ph name="SHORT_PRODUCT_OS_NAME" /> sisteman.</translation> @@ -7478,6 +7494,7 @@ <translation id="6944750221184785444">Ezin da instalatu profila. Laguntza teknikoa eskuratzeko, jarri operadorearekin harremanetan.</translation> <translation id="6945221475159498467">Hautatu</translation> <translation id="694592694773692225">Blokeatu egin da birbideratzeko ekintza orri honetan.</translation> +<translation id="6946231195377941116">{NUM_SITES,plural, =1{Segurua ez den luzapen bat desaktibatu da}other{Seguruak ez diren {NUM_SITES} luzapen desaktibatu dira}}</translation> <translation id="6947015141909171112">Bilaketa zerbitzuan errezeten inguruan egindako azken jardueretan oinarrituta ari zara ikusten errezetak. <ph name="BREAK" /> <ph name="BREAK" /> @@ -7705,7 +7722,7 @@ <translation id="7123302939607518173">Gehitu interes edo webgune bat harekin erlazionatutako iragarkiak zuretzat erabilgarriak izango direla uste baduzu;</translation> <translation id="7124013154139278147">Esleitu erabilerraztasun-etengailu bat "Aurrekoa" ekintzari</translation> <translation id="7124712201233930202">Ez dira gordetzen erakundearen gidalerroak</translation> -<translation id="7125029162161377569">Privacy Sandbox-aren probei esker, berdin arakatu ahalko dituzu webguneak datu gutxiago erabilita. Pribatutasun handiagoa izango duzula eta webguneen arteko jarraipena mugatuko dela esan nahi du horrek. Proba berriak gehituko ditugu kaleratzeko prest egon ahala.</translation> +<translation id="7125029162161377569">Privacy Sandbox-aren probei esker, berdin arakatu ahalko dituzu webguneak datu gutxiago erabilita. Pribatutasun handiagoa izango duzula eta webgunearteko jarraipena mugatuko dela esan nahi du horrek. Proba berriak gehituko ditugu kaleratzeko prest egon ahala.</translation> <translation id="7125148293026877011">Ezabatu Crostini</translation> <translation id="7125932261198019860">Ziurtatu inprimagailua Chromebook-aren wifi-sare berera konektatuta dagoela, edo erabili USB kable bat. <ph name="LINK_BEGIN" />Lortu bateragarritasunari buruzko informazio gehiago<ph name="LINK_END" /></translation> <translation id="7127980134843952133">Deskargen historia</translation> @@ -8484,6 +8501,7 @@ <translation id="7744192722284567281">Datuen isilpekotasunaren urratze batean aurkitu da</translation> <translation id="7744649840067671761">Beste esleipen bat egiteko, sakatu beste erabilerraztasun-etengailu edo teklatuko tekla bat. Esleipen bat kentzeko, berriz, sakatu esleipen bat daukan erabilerraztasun-etengailu edo teklatuko tekla bat.</translation> +<translation id="7745554356330788383">Kargatu berriro orria "<ph name="EXTENSION_NAME" />" luzapenerako ezarpen berriak webgune honetan aplikatzeko</translation> <translation id="7745677556280361868">Passpoint-eko harpidetzaren orritik sare hau kendu nahi duzu?</translation> <translation id="7746045113967198252">Handitu edo txikitu pantailako elementuak, testua barne. Ezarpenak > Gailua > Pantailak atalean ere aurki dezakezu aukera hau.</translation> <translation id="7746739418892731373">Google Argazkiak zerbitzu liburutegiko argazki eta bideo nabarmenak ari zara ikusten. Eduki nabarmentzat jotzen dena kontrolatzeko, joan <ph name="BEGIN_LINK" />photos.google.com/settings<ph name="END_LINK" /> helbidera. @@ -8801,6 +8819,7 @@ <translation id="7974936243149753750">Bilatu gainetik</translation> <translation id="7975504106303186033">Chrome Education-eko gailu hau G Suite for Education-eko kontu batekin erregistratu behar duzu. Beste kontu bat erregistratzeko, joan g.co/workspace/edusignup helbidera.</translation> <translation id="7977451675950311423">Datuen isilpekotasunaren urratze batean arriskuan jarri den pasahitz bat badarabilzu, horren berri emango dizu.</translation> +<translation id="7978053509627908242">Gorde bideoaren fotograma honela…</translation> <translation id="7978412674231730200">Gako pribatua</translation> <translation id="7978450511781612192">Zure Google-ko kontuetako saioa amaituko da. Aurrerantzean, ez dira sinkronizatuko laster-markak, historia, pasahitzak eta beste.</translation> <translation id="7980084013673500153">Erreproduzigaiaren identifikatzailea: <ph name="ASSET_ID" /></translation> @@ -9660,7 +9679,7 @@ <translation id="8666759526542103597">Iragarkiak arakatzailean oinarrituta pertsonalizatzeari buruz</translation> <translation id="8667261224612332309">Hobe daitezkeen pasahitzak dituzu</translation> <translation id="8667328578593601900"><ph name="FULLSCREEN_ORIGIN" /> pantaila osoan dago eta saguaren kurtsorea desgaitu du.</translation> -<translation id="8667760277771450375">Webguneei spama eta iruzurrak saihesteko aukera gaitu bitartean webguneen arteko jarraipenak mugatzeko moduak arakatzen ari gara.</translation> +<translation id="8667760277771450375">Webguneei spama eta iruzurrak saihesteko aukera gaitu bitartean webgunearteko jarraipenak mugatzeko moduak arakatzen ari gara.</translation> <translation id="8668378421690365723">Baliteke gailuak behar bezala funtzionatzeari uztea eta segurtasun- eta errendimendu-arazoak izatea.</translation> <translation id="8669284339312441707">Beroagoa</translation> <translation id="8670537393737592796">Hona bizkor itzuli ahal izateko, instalatu <ph name="APP_NAME" /> instalatzeko botoia sakatuta</translation> @@ -9676,6 +9695,7 @@ <translation id="8676374126336081632">Garbitu idatzitakoa</translation> <translation id="8676770494376880701">Potentzia txikiko kargagailua konektatu da</translation> <translation id="8677212948402625567">Tolestu guztiak…</translation> +<translation id="8678192320753081984">Google-ren kontuaren segurtasun sendoena eskaintzen du, eraso bideratuak jasotzeko arriskuan dauden pertsonentzat</translation> <translation id="8678378565142776698">Berrezarri eta jaso eguneratze automatikoak</translation> <translation id="8678538439778360739">Sinkronizazio-pasaesaldiarekin enkriptatu dira datuak (<ph name="TIME" />). Kanpoan utzi dira Google Pay-ko ordainketa-metodoak eta helbideak.</translation> <translation id="8678582529642151449">Fitxak ez dira txikitzen</translation> @@ -10255,6 +10275,7 @@ <translation id="9111102763498581341">Desblokeatu</translation> <translation id="9111305600911828693">Ez dago konfiguratuta lizentzia</translation> <translation id="9111395131601239814"><ph name="NETWORKDEVICE" />: <ph name="STATUS" /></translation> +<translation id="9111519254489533373">Joan arakatze seguruaren ezarpenetara</translation> <translation id="9111668656364922873">Ongi etorri profil berrira</translation> <translation id="9112517757103905964">Zure erakundeak fitxategia ezabatzea gomendatzen du kontuzko edukia daukalako</translation> <translation id="9112748030372401671">Aldatu horma-papera</translation>
diff --git a/chrome/app/resources/generated_resources_hr.xtb b/chrome/app/resources/generated_resources_hr.xtb index f17a7e1..20d13db 100644 --- a/chrome/app/resources/generated_resources_hr.xtb +++ b/chrome/app/resources/generated_resources_hr.xtb
@@ -1371,6 +1371,7 @@ <translation id="2046702855113914483">Ramen</translation> <translation id="204706822916043810">Provjeravanje virtualnog računala</translation> <translation id="2048182445208425546">pristupiti vašem mrežnom prometu</translation> +<translation id="2048254245884707305">Traženje zlonamjernog softvera...</translation> <translation id="2048554637254265991">Došlo je do pogreške prilikom pokretanja upravitelja spremnika. Pokušajte ponovo.</translation> <translation id="2048653237708779538">Radnja nije dostupna</translation> <translation id="204914487372604757">Stvori prečac</translation> @@ -2086,6 +2087,7 @@ <translation id="2580889980133367162">Uvijek dozvoli hostu <ph name="HOST" /> preuzimanje više datoteka</translation> <translation id="258095186877893873">Dugo</translation> <translation id="2581455244799175627">Više o dopuštanju kolačića trećih strana</translation> +<translation id="2581992808349413349">Upotrijebite sigurnu vezu za traženje IP adrese web-lokacije u DNS-u (Domain Name System). Ova aplikacija upotrebljava upravljanog davatelja usluga na web-lokaciji <ph name="DNS_SERVER_TEMPLATE_WITH_IDENTIFIER" /></translation> <translation id="2582253231918033891"><ph name="PRODUCT_NAME" /> <ph name="PRODUCT_VERSION" /> (Platforma <ph name="PLATFORM_VERSION" />) <ph name="DEVICE_SERIAL_NUMBER" /></translation> <translation id="2584109212074498965">Dohvaćanje Kerberosovog tiketa nije uspjelo. Pokušajte ponovo ili se obratite administratoru uređaja u svojoj organizaciji. (Kôd pogreške <ph name="ERROR_CODE" />).</translation> <translation id="2586561813241011046">Instaliranje aplikacije <ph name="APP_NAME" /> nije uspjelo. Pokušajte ponovo ili se obratite administratoru. Kôd pogreške: <ph name="ERROR_CODE" />.</translation> @@ -2560,6 +2562,7 @@ <translation id="2942581856830209953">Prilagodba stranice</translation> <translation id="2942707801577151363">Otvarajte, uređujte i spremajte datoteke programa Word, Excel i PowerPoint. Za neke značajke možda je potrebna pretplata.</translation> <translation id="2943268899142471972">Odaberite datoteku sigurnosne kopije za Ansible Playbook ili Crostini</translation> +<translation id="2943478529590267286">Promjena izgleda tipkovnice sustava</translation> <translation id="2944060181911631861">Slanje podataka o upotrebi i dijagnostici. Pomognite poboljšati Android automatskim slanjem dijagnostičkih podataka te podataka o upotrebi uređaja i aplikacija Googleu. Ti podaci pomoći će poboljšati stabilnost sustava, aplikacija i drugo. Neki skupni podaci pomoći će i Googleovim aplikacijama i partnerima, na primjer razvojnim programerima za Android. Ako je uključena dodatna postavka Aktivnost na webu i u aplikacijama, ti se podaci mogu spremati na vaš Google račun. <ph name="BEGIN_LINK1" />Saznajte više<ph name="END_LINK1" /></translation> <translation id="2946054015403765210">Idi na datoteke</translation> <translation id="2946119680249604491">Dodaj vezu</translation> @@ -2849,6 +2852,7 @@ <translation id="3192947282887913208">Audio datoteke</translation> <translation id="3193695589337931419">Uslužni programi za signale sustava</translation> <translation id="3194786596445804250">Prikaži pojedinosti o blokiranju kolačića trećih strana</translation> +<translation id="3196912927885212665">Da biste postavili uređaj pomoću Android telefona, Bluetooth na Chromebooku treba biti uključen</translation> <translation id="3197453258332670132">Klikom desnom tipkom ili dugim pritiskom prikazuju se povezane informacije za tekst koji ste odabrali</translation> <translation id="3198487209506801480"><ph name="BEGIN_PARAGRAPH1" />Ako dopustite ChromeOS uređajima da nam šalju automatska izvješća, lakše ćemo odrediti prioritete za ispravljanje pogrešaka i poboljšavanje ChromeOS-a. Ta izvješća mogu uključivati situacije u kojima se ChromeOS ruši, koje su značajke korištene i koliko je memorije obično korišteno. Neki skupni podaci pomoći će i Googleovim aplikacijama i partnerima, na primjer razvojnim programerima za Android. Drugi podaci o dijagnostici i upotrebi aplikacije, uključujući podatke za Android i web-aplikacije, prikupljat će se ako je uključena i sinkronizacija aplikacija.<ph name="END_PARAGRAPH1" /> <ph name="BEGIN_PARAGRAPH2" />Ta izvješća možete uključiti ili isključiti kad god želite u postavkama djetetovog ChromeOS uređaja. Ako ste administrator domene, tu postavku možete promijeniti na administratorskoj konzoli.<ph name="END_PARAGRAPH2" /> @@ -3277,6 +3281,7 @@ <translation id="3544879808695557954">Korisničko ime (nije obavezno)</translation> <translation id="3547954654003013442">Proxy postavke</translation> <translation id="3548162552723420559">Prilagođava boju zaslona u skladu s okolinom</translation> +<translation id="354949590254473526">Unesite URL upita za prilagođeni DNS</translation> <translation id="3550593477037018652">Prekidanje veze s mobilnom mrežom</translation> <translation id="3550915441744863158">Chrome se automatski ažurira tako da uvijek imate najnoviju verziju</translation> <translation id="3551320343578183772">Zatvori karticu</translation> @@ -3592,6 +3597,7 @@ <translation id="3784472333786002075">Kolačići su datoteke web-lokacija. Postoje dvije vrste kolačića: kolačiće prve strane izrađuje web-lokacija koju posjetite. Ta je web-lokacija navedena u adresnoj traci. Kolačiće trećih strana izrađuju ostale web-lokacije. Te web-lokacije posjeduju dio sadržaja prikazanog na web-lokaciji koju ste posjetili, primjerice oglase ili slike.</translation> <translation id="3785308913036335955">Prikaži prečac za Aplikacije</translation> <translation id="3785727820640310185">Spremljene zaporke za tu web-lokaciju</translation> +<translation id="3786224729726357296">Brisanje podataka web-lokacije i dopuštenja za web-lokaciju <ph name="SITE" /></translation> <translation id="3786834302860277193">Prikazivanje podcrtavanja za tekst kompozicije</translation> <translation id="3787434344076711519">Čekanje na prijevod</translation> <translation id="3788301286821743879">Aplikacija kioska ne može se pokrenuti.</translation> @@ -4414,6 +4420,7 @@ <translation id="443454694385851356">Naslijeđeno (nije sigurno)</translation> <translation id="4434611816075088065">Trenutačno ni na što drugo ne trebate obratiti pažnju</translation> <translation id="443475966875174318">Ažuriranje ili uklanjanje nekompatibilnih aplikacija</translation> +<translation id="4437947179446780764">Dodajte davatelja usluge prilagođenog DNS-a</translation> <translation id="4438043733494739848">Prozirno</translation> <translation id="4441124369922430666">Želite li automatski pokrenuti tu aplikaciju kada se uređaj uključi?</translation> <translation id="4441147046941420429">Da biste nastavili, uklonite sigurnosni ključ iz uređaja, a zatim ga ponovo umetnite i dodirnite</translation> @@ -5002,7 +5009,9 @@ <translation id="4907161631261076876">Ova se aplikacija ne preuzima često i može biti opasna.</translation> <translation id="4908811072292128752">Otvorite novu karticu za istodobni pregled dvije stranice</translation> <translation id="4909038193460299775">Budući da ovim računom upravlja <ph name="DOMAIN" />, vaše oznake, povijest, zaporke i druge postavke izbrisat će se s ovog uređaja. No vaši podaci ostat će pohranjeni na vašem Google računu i možete upravljati njima na <ph name="BEGIN_LINK" />Google nadzornoj ploči<ph name="END_LINK" />.</translation> +<translation id="4911572142453926213">Upotreba sigurne veze za traženje IP adrese web-lokacije u DNS-u (Domain Name System)</translation> <translation id="4912643508233590958">Buđenja iz stanja mirovanja</translation> +<translation id="4913209098186576320">Datoteka je možda opasna<ph name="LINE_BREAK" />Provjera traje dulje nego inače...</translation> <translation id="4915961947098019832">Dopušteno je prikazivanje slika</translation> <translation id="4916542008280060967">Dopustiti web-lokaciji da uredi <ph name="FILE_NAME" />?</translation> <translation id="4917385247580444890">Jak</translation> @@ -5039,6 +5048,7 @@ <translation id="4941963255146903244">Pregled fotografija, medija i aplikacija s vašeg telefona</translation> <translation id="494286511941020793">Pomoć za proxy konfiguraciju</translation> <translation id="4943368462779413526">Američki nogomet</translation> +<translation id="4943927218331934807">Potrebna je zaporka</translation> <translation id="4944310289250773232">Tu uslugu autentifikacije hostira <ph name="SAML_DOMAIN" /></translation> <translation id="4945439665401275950">Da biste postavili otisak prsta, neka vaše dijete dodirne tipku za uključivanje/isključivanje. Podaci o otisku prsta vašeg djeteta sigurno se pohranjuju i nikamo se ne šalju s uređaja <ph name="DEVICE_TYPE" />.</translation> <translation id="4946459324029651239">Imate standardnu zaštitu</translation> @@ -5478,6 +5488,7 @@ <translation id="5307030433605830021">Izvor nije podržan</translation> <translation id="5307386115243749078">Uparivanje Bluetooth prekidača</translation> <translation id="5308380583665731573">Poveži</translation> +<translation id="5308989548591363504">Provjerite je li instaliran zlonamjerni softver</translation> <translation id="5309418307557605830">Google asistent radi i ovdje</translation> <translation id="5309641450810523897">ID upita za korisničku podršku</translation> <translation id="5311304534597152726">Prijavite se kao</translation> @@ -5785,6 +5796,7 @@ <translation id="555604722231274592">Omogućivanje značajke <ph name="FEATURE_NAME" /></translation> <translation id="5556459405103347317">Ponovno učitaj</translation> <translation id="5558129378926964177">Zoom &In (Povećaj)</translation> +<translation id="5558594314398017686">Zadane postavke OS-a (ako su dostupne)</translation> <translation id="5559311991468302423">Brisanje adrese</translation> <translation id="5559768063688681413">Nema spremljenih pisača</translation> <translation id="55601339223879446">Prilagodba granica radne površine unutar zaslona</translation> @@ -8866,6 +8878,7 @@ <translation id="8005600846065423578">Uvijek dopusti web-lokaciji <ph name="HOST" /> uvid u međuspremnik</translation> <translation id="8006630792898017994">Razmaknica ili tipka Tab</translation> <translation id="8008356846765065031">Prekinuta je veza s internetom. Provjerite internetsku vezu.</translation> +<translation id="8008704580256716350">Blokirana je sumnjiva datoteka</translation> <translation id="8009225694047762179">Upravljanje zaporkama</translation> <translation id="8011372169388649948">Oznaka <ph name="BOOKMARK_TITLE" /> je premještena.</translation> <translation id="8012188750847319132">caps lock</translation> @@ -10215,6 +10228,7 @@ <translation id="9057354806206861646">Ažuriranje rasporeda</translation> <translation id="9058070466596314168">{NUM_NOTIFICATION,plural, =1{Približno jedna obavijest dnevno}one{Približno {NUM_NOTIFICATION} obavijest dnevno}few{Približno {NUM_NOTIFICATION} obavijesti dnevno}other{Približno {NUM_NOTIFICATION} obavijesti dnevno}}</translation> <translation id="9058760336383947367">Prikaz PPD-a pisača</translation> +<translation id="9060042817356580609">Odaberite davatelja usluge DNS-a</translation> <translation id="9061694916020926968">Da biste upotrebljavali Steam za Chromebook (Beta), morate biti prijavljeni na Google račun. Prijavite se i pokušajte ponovo.</translation> <translation id="9062468308252555888">14x</translation> <translation id="9063208415146866933">Pogreška od <ph name="ERROR_LINE_START" />. do <ph name="ERROR_LINE_END" />. retka</translation>
diff --git a/chrome/app/resources/generated_resources_iw.xtb b/chrome/app/resources/generated_resources_iw.xtb index 2c8dcb9..fe043c77 100644 --- a/chrome/app/resources/generated_resources_iw.xtb +++ b/chrome/app/resources/generated_resources_iw.xtb
@@ -9031,6 +9031,7 @@ <translation id="81238879832906896">פרח צהוב ולבן</translation> <translation id="8123975449645947908">גלילה אחורה</translation> <translation id="8124313775439841391">ONC מנוהל</translation> +<translation id="8125651784723647184">שיתוף הסיסמאות מנוהל על ידי האדמין</translation> <translation id="8129265306888404830">כדי להשתמש בכתובת האימייל של הארגון שלך (<ph name="EMAIL_DOMAIN" />), עליך להירשם לארגון. אם המכשיר הזה מיועד לשימוש אישי, עליך להיכנס באמצעות חשבון Google האישי.</translation> <translation id="813082847718468539">הצגת נתוני אתר</translation> <translation id="8131740175452115882">אישור</translation>
diff --git a/chrome/app/resources/generated_resources_mk.xtb b/chrome/app/resources/generated_resources_mk.xtb index d11718b..e0e3d92 100644 --- a/chrome/app/resources/generated_resources_mk.xtb +++ b/chrome/app/resources/generated_resources_mk.xtb
@@ -2235,7 +2235,7 @@ <translation id="2691385045260836588">Модел</translation> <translation id="2691440343905273290">Изменете ги поставките за внесување</translation> <translation id="2692503699962701720">Смени ја висината на гласот кога изговараш типови елементи и форматиран текст</translation> -<translation id="2692901429679246677">Aqua</translation> +<translation id="2692901429679246677">Вода</translation> <translation id="2693134906590795721">Звуци на полнење</translation> <translation id="2693176596243495071">Упс! Настана непозната грешка. Обидете се повторно подоцна. Ако и понатаму се соочувате со истиот проблем, контактирајте со вашиот администратор.</translation> <translation id="2698147581454716013">Ова е уред од група и не може да се регистрира со надградба за киоск или уред за сигнализација.</translation>
diff --git a/chrome/app/resources/generated_resources_ms.xtb b/chrome/app/resources/generated_resources_ms.xtb index 69773b7..959de8c0 100644 --- a/chrome/app/resources/generated_resources_ms.xtb +++ b/chrome/app/resources/generated_resources_ms.xtb
@@ -3853,6 +3853,7 @@ <translation id="3963753386716096475">Gunakan telefon, tablet atau kunci keselamatan lain</translation> <translation id="3964480518399667971">Matikan Rangkaian selular</translation> <translation id="3965965397408324205">Keluar daripada <ph name="PROFILE_NAME" /></translation> +<translation id="3965984916551757611">Pemberitahuan, Google Play</translation> <translation id="3966072572894326936">Pilih folder lain...</translation> <translation id="3966094581547899417">Butiran tempat liputan</translation> <translation id="3967822245660637423">Muat turun selesai</translation> @@ -4851,6 +4852,7 @@ <translation id="4779136857077979611">Onigiri</translation> <translation id="4779766576531456629">Namakan semula rangkaian Selular eSIM</translation> <translation id="4780321648949301421">Simpan Halaman Sebagai...</translation> +<translation id="4780558987886269159">Untuk kerja</translation> <translation id="4781443161433589743">Anda menggunakan keselamatan Chrome yang paling kukuh</translation> <translation id="4785719467058219317">Anda menggunakan kunci keselamatan yang tidak berdaftar dengan laman web ini</translation> <translation id="4785914069240823137">Batalkan Pemangkasan</translation> @@ -5700,6 +5702,7 @@ <translation id="5473099001878321374">Dengan meneruskan penggunaan, anda bersetuju bahawa peranti ini juga mungkin memuat turun dan memasang kemas kini dan apl daripada Google, pembawa anak anda dan pengeluar peranti ini secara automatik dan mungkin menggunakan data selular. Sesetengah apl ini mungkin menawarkan pembelian dalam apl.</translation> <translation id="5473156705047072749">{NUM_CHARACTERS,plural, =1{PIN mestilah sekurang-kurangnya satu aksara}other{PIN mestilah sekurang-kurangnya # aksara}}</translation> <translation id="5474859849784484111"><ph name="MANAGER" /> menghendaki anda menyambung kepada Wi-Fi sekarang dan memuat turun kemaskinian. Atau, muat turun daripada sambungan bermeter (caj mungkin dikenakan).</translation> +<translation id="5477089831058413614">Konfigurasikan tempat liputan <ph name="DEVICE_TYPE" /></translation> <translation id="5481273127572794904">Tidak dibenarkan untuk memuat turun berbilang fail secara automatik</translation> <translation id="5481941284378890518">Tambahkan Pencetak Berdekatan</translation> <translation id="5484181871714116891">Apabila dihidupkan, kunci laluan dibuat dalam iCloud Keychain dan tersedia merentas semua peranti Apple anda. Apabila dimatikan, kunci laluan dibuat dalam profil Chrome anda pada peranti ini.</translation> @@ -6816,6 +6819,7 @@ <translation id="637642201764944055">Versi lama Apl Chrome tidak akan dibuka pada peranti Linux selepas Disember 2022. Hubungi pentadbir anda untuk mengemas kini kepada versi baharu atau mengalih keluar apl ini.</translation> <translation id="6377268785556383139">1 hasil carian untuk '<ph name="SEARCH_TEXT" />'</translation> <translation id="6378392501584240055">Buka dalam rangkaian Wi-Fi</translation> +<translation id="6379533146645857098">Pilih julat masa</translation> <translation id="6380143666419481200">Terima dan teruskan</translation> <translation id="6383382161803538830">Mod bacaan tidak tersedia pada halaman ini</translation> <translation id="638418309848716977">Pautan yang disokong</translation>
diff --git a/chrome/app/resources/generated_resources_my.xtb b/chrome/app/resources/generated_resources_my.xtb index 333307f6..34013e83 100644 --- a/chrome/app/resources/generated_resources_my.xtb +++ b/chrome/app/resources/generated_resources_my.xtb
@@ -1379,6 +1379,7 @@ <translation id="2046702855113914483">ခေါက်ဆွဲ</translation> <translation id="204706822916043810">ပကတိအသွင်စက်ကို စစ်ဆေးနေသည်</translation> <translation id="2048182445208425546">သင်၏ ကွန်ရက် အသုံးပြုမှုကို ရယူသုံးရန်</translation> +<translation id="2048254245884707305">မဲလ်ဝဲ စစ်နေသည်...</translation> <translation id="2048554637254265991">ကွန်တိန်နာမန်နေဂျာကို စတင်ရာတွင် အမှားရှိသည်။ ထပ်စမ်းကြည့်ပါ။</translation> <translation id="2048653237708779538">လုပ်ဆောင်ချက် မရနိုင်ပါ</translation> <translation id="204914487372604757">ဖြတ်လမ်း ပြုလုပ်ရန်</translation> @@ -2096,6 +2097,7 @@ <translation id="2580889980133367162"><ph name="HOST" />အား ဖိုင် အများအပြား ဒေါင်းလုဒ် လုပ်မှုကို အမြဲတမ်း ခွင့်ပြုရန်</translation> <translation id="258095186877893873">ရှည်</translation> <translation id="2581455244799175627">ပြင်ပကုမ္ပဏီ၏ကွတ်ကီးများ ခွင့်ပြုခြင်းအကြောင်း ပိုမိုသိရှိရန်</translation> +<translation id="2581992808349413349">DNS (ဒိုမိန်းအမည်ပေးစနစ်) ရှိ ဝဘ်ဆိုက်၏ IP လိပ်စာကို ရှာရန် လုံခြုံသောချိတ်ဆက်မှုသုံးပါ။ ၎င်းက <ph name="DNS_SERVER_TEMPLATE_WITH_IDENTIFIER" /> ရှိ စီမံထားသော ဝန်ဆောင်မှုပေးသူကို သုံးသည်</translation> <translation id="2582253231918033891"><ph name="PRODUCT_NAME" /> <ph name="PRODUCT_VERSION" /> (Platform <ph name="PLATFORM_VERSION" />) <ph name="DEVICE_SERIAL_NUMBER" /></translation> <translation id="2584109212074498965">Kerberos လက်မှတ်ကို ရှာမတွေ့ပါ။ ထပ်စမ်းကြည့်ပါ သို့မဟုတ် သင့်အဖွဲ့အစည်း၏ စီမံခန့်ခွဲသူထံ ဆက်သွယ်ပါ။ (အမှားကုဒ် <ph name="ERROR_CODE" />)။</translation> <translation id="2586561813241011046"><ph name="APP_NAME" /> ကို ထည့်သွင်း၍ မရပါ။ ထပ်စမ်းကြည့်ပါ သို့မဟုတ် သင့်စီမံခန့်ခွဲသူထံ ဆက်သွယ်ပါ။ အမှားကုဒ်- <ph name="ERROR_CODE" />။</translation> @@ -2570,6 +2572,7 @@ <translation id="2942581856830209953">ဤစာမျက်နှာကို စိတ်ကြိုက်လုပ်ရန်</translation> <translation id="2942707801577151363">Word၊ Excel နှင့် PowerPoint ဖိုင်များ ဖွင့်နိုင်၊ တည်းဖြတ်နိုင်၊ သိမ်းနိုင်သည်။ ဝန်ဆောင်မှုအချို့အတွက် စာရင်းသွင်းမှု လိုနိုင်သည်။</translation> <translation id="2943268899142471972">Ansible Playbook (သို့) Crostini အရန်ဖိုင် ရွေးပါ</translation> +<translation id="2943478529590267286">စနစ် ကီးဘုတ်အပြင်အဆင် ပြောင်းသည်</translation> <translation id="2944060181911631861">အသုံးပြုမှုနှင့် အမှားရှာဖွေမှုဒေတာ ပို့ပါ။ အမှားရှာဖွေမှု၊ စက်ပစ္စည်းနှင့်အက်ပ် အသုံးပြုမှုဒေတာများကို Google သို့ အလိုအလျောက်ပို့၍ Android အသုံးပြုမှု ပိုမိုကောင်းမွန်လာစေရန် ကူညီပါ။ ၎င်းက စနစ်နှင့် အက်ပ်တည်ငြိမ်မှု၊ အခြား တိုးတက်ပြင်ဆင်မှုများအတွက် ပံ့ပိုးပေးပါမည်။ စုစည်းထားသော ဒေတာအချို့က Google အက်ပ်နှင့် Android ဆော့ဖ်ဝဲအင်ဂျင်နီယာများကဲ့သို့ ပါတနာများကို ကူညီပေးပါမည်။ သင်၏ထပ်တိုး 'ဝဘ်နှင့် အက်ပ်လုပ်ဆောင်ချက်' ကို ဖွင့်ထားသည့်အခါ ဤဒေတာကို သင့် Google အကောင့်သို့ သိမ်းသွားပါမည်။ <ph name="BEGIN_LINK1" />ပိုမိုလေ့လာရန်<ph name="END_LINK1" /></translation> <translation id="2946054015403765210">ဖိုင်များသို့သွားရန်</translation> <translation id="2946119680249604491">ချိတ်ဆက်မှုကို ထည့်ရန်</translation> @@ -2859,6 +2862,7 @@ <translation id="3192947282887913208">အသံ ဖိုင်များ</translation> <translation id="3193695589337931419">စနစ်အချက်ပေးမှု အထောက်အကူပြု ဆော့ဖ်ဝဲလ်များ</translation> <translation id="3194786596445804250">ပြင်ပကုမ္ပဏီကွတ်ကီးများ ပိတ်ထားခြင်းအကြောင်း အသေးစိတ်ပြပါ</translation> +<translation id="3196912927885212665">သင့် Android ဖုန်းဖြင့် စနစ်ထည့်သွင်းရန် Chromebook ၏ ဘလူးတုသ် ဖွင့်ရန်လိုသည်</translation> <translation id="3197453258332670132">ညာဘက်ခလုတ်ကို နှိပ်လျှင် (သို့) ကြာရှည်စွာဖိထားလျှင် သင့်စာသားရွေးချယ်မှုအတွက် ဆက်စပ်သော အချက်အလက်ကို ပြနိုင်သည်</translation> <translation id="3198487209506801480"><ph name="BEGIN_PARAGRAPH1" />ChromeOS စက်များအား အလိုအလျောက် အစီရင်ခံစာများ ပို့ခွင့်ပြုခြင်းဖြင့် ChromeOS တွင် ပြင်ဆင်ရန်နှင့် တိုးမြှင့်ရန်ရှိသည်တို့ကို ဦးစားပေးလုပ်ဆောင်နိုင်ရန် ကျွန်ုပ်တို့အား အကူအညီဖြစ်စေပါသည်။ ဤအစီရင်ခံစာများတွင် ChromeOS ရပ်တန့်သွားချိန်၊ အသုံးပြုထားသော ဝန်ဆောင်မှုများ၊ ပုံမှန်အားဖြင့် အသုံးပြုထားသော မှတ်ဉာဏ်ပမာဏတို့ကဲ့သို့ အချက်များ ပါဝင်နိုင်ပါသည်။ ပေါင်းစည်းထားသည့် ဒေတာအချို့က Google အက်ပ်များနှင့် Android ဆော့ဖ်ဝဲရေးသူများကဲ့သို့ ပါတနာများကိုလည်း ကူညီပါမည်။ အက်ပ်များစင့်ခ်လုပ်ခြင်းကိုလည်း ဖွင့်ထားပါက Android နှင့် ဝဘ်အက်ပ်များအပါအဝင် အခြားအက်ပ် အမှားရှာဖွေမှုနှင့် သုံးစွဲမှု ဒေတာများကို စုဆောင်းပါမည်။<ph name="END_PARAGRAPH1" /> <ph name="BEGIN_PARAGRAPH2" />သင့်ကလေး၏ ChromeOS စက်ဆက်တင်များတွင် ဤအစီရင်ခံစာများ ခွင့်ပြုခြင်းကို အချိန်မရွေး စတင်နိုင် (သို့) ရပ်တန့်နိုင်ပါသည်။ သင်သည် ဒိုမိန်း စီမံခန့်ခွဲသူဖြစ်ပါက ဤဆက်တင်ကို စီမံခန့်ခွဲသူ ကွန်ဆိုးလ်တွင် ပြောင်းနိုင်ပါသည်။<ph name="END_PARAGRAPH2" /> @@ -3287,6 +3291,7 @@ <translation id="3544879808695557954">အသုံးပြုသူအမည် (ချန်လှပ်ထားနိုင်သည်)</translation> <translation id="3547954654003013442">ပရောက်စီ ဆက်တင်များ</translation> <translation id="3548162552723420559">ပတ်ဝန်းကျင်နှင့် ကိုက်ညီစေရန် မျက်နှာပြင်အရောင်ကို ချိန်ညှိပေးသည်</translation> +<translation id="354949590254473526">စိတ်ကြိုက် DNS မေးမြန်းချက် URL ထည့်ပါ</translation> <translation id="3550593477037018652">ဆယ်လူလာကွန်ရက် ချိတ်ဆက်မှုဖြုတ်ရန်</translation> <translation id="3550915441744863158">Chrome သည် အလိုအလျောက် မွမ်းမံယူသောကြောင့် သင်သည် အမြဲတမ်း နောက်ဆုံး ဗားရှင်းကို သုံးနိုင်မည်။</translation> <translation id="3551320343578183772">တဘ် ပိတ်ရန်</translation> @@ -3602,6 +3607,7 @@ <translation id="3784472333786002075">ကွတ်ကီးများဟူသည်မှာ ဝဘ်ဆိုက်များက ပြုလုပ်ထားသော ဖိုင်များဖြစ်သည်။ ကွက်ကီးနှစ်မျိုး ရှိပါသည်− ပင်မကွတ်ကီးများကို သင်ဝင်ကြည့်သော ဝဘ်ဆိုက်က ပြုလုပ်ခြင်းဖြစ်သည်။ ဝဘ်ဆိုက်ကို လိပ်စာဘားတွင် ပြထားသည်။ ပြင်ပကွတ်ကီးများကို အခြားဝဘ်ဆိုက်များက ပြုလုပ်ခြင်းဖြစ်သည်။ ဤဝဘ်ဆိုက်များတွင် သင်ဝင်ကြည့်သည့်ဝဘ်ဆိုက်ပေါ်တွင် တွေ့ရသည့်ကြော်ငြာ သို့မဟုတ် ပုံများကဲ့သို့ အကြောင်းအရာအချို့ ပါဝင်သည်။</translation> <translation id="3785308913036335955">အက်ပ်များ ဖြတ်လမ်းကို ပြပေးရန်</translation> <translation id="3785727820640310185">ဤဝဘ်ဆိုက်အတွက် သိမ်းဆည်းထားသည့် စကားဝှက်များ</translation> +<translation id="3786224729726357296"><ph name="SITE" /> အတွက် ဝဘ်ဆိုက်ဒေတာနှင့် ခွင့်ပြုချက်များ ဖျက်ရန်</translation> <translation id="3786834302860277193">ရေးသည့်စာသားတွင် အောက်မျဉ်းဆွဲရန်</translation> <translation id="3787434344076711519">ဘာသာပြန်ရန် စောင့်နေသည်</translation> <translation id="3788301286821743879">Koisk အပလီကေးရှင်း စတင်၍ မရပါ။</translation> @@ -4423,6 +4429,7 @@ <translation id="443454694385851356">လက်ဟောင်း (မလုံခြုံပါ)</translation> <translation id="4434611816075088065">ယခု သင်ဘာမျှလုပ်ရန်မလိုပါ</translation> <translation id="443475966875174318">ကိုက်ညီမှုမရှိသည့် အပလီကေးရှင်းများကို အပ်ဒိတ်လုပ်ပါ သို့မဟုတ် ဖယ်ရှားပါ</translation> +<translation id="4437947179446780764">စိတ်ကြိုက် DNS ဝန်ဆောင်မှုပေးသူ ထည့်ရန်</translation> <translation id="4438043733494739848">ထွင်းဖောက်မြင်ရသည်</translation> <translation id="4441124369922430666">စက် ပွင့်လာသည့် အခါမှာ ဒီအက်ပ်ကို သင်သည် အလိုအလျောက် စတင်စေလိုပါသလား?</translation> <translation id="4441147046941420429">ရှေ့ဆက်ရန် သင်၏စက်မှ လုံခြုံရေးကီး ဖယ်ရှားပါ၊ ထို့နောက် ၎င်းကို ပြန်ထည့်သွင်းပြီး ထိပါ</translation> @@ -5012,7 +5019,9 @@ <translation id="4907161631261076876">ဤဖိုင်ကို အများအားဖြင့် ဒေါင်းလုဒ်လုပ်လေ့ မရှိပါ။ အန္တရာယ်ရှိနိုင်ပါသည်။</translation> <translation id="4908811072292128752">ဝဘ်ဆိုက်နှစ်ခုကို တစ်ပြိုင်တည်းဖွင့်ကြည့်ရန်အတွက် တဘ်အသစ်တစ်ခု ဖွင့်ပါ</translation> <translation id="4909038193460299775">ဤအကောင့်ကို <ph name="DOMAIN" /> က စီမံခန့်ခွဲထားသည့်အတွက် သင့်စာညှပ်များ၊ မှတ်တမ်း၊ စကားဝှက်များနှင့် အခြားဆက်တင်များကို ဤစက်ပစ္စည်းမှ ရှင်းလင်းသွားမည် ဖြစ်သည်။ သို့သော် သင့်ဒေတာများကို သင့် Google အကောင့်တွင် ဆက်လက်သိမ်းဆည်းထားမည်ဖြစ်ပြီး <ph name="BEGIN_LINK" />Google Dashboard<ph name="END_LINK" /> ပေါ်တွင် စီမံနိုင်ပါသည်။</translation> +<translation id="4911572142453926213">DNS (ဒိုမိန်းအမည်ပေးစနစ်) ရှိ ဝဘ်ဆိုက်၏ IP လိပ်စာကို ရှာရန် လုံခြုံသောချိတ်ဆက်မှုသုံးပါ</translation> <translation id="4912643508233590958">နားနေရာမှ နိုးလာ</translation> +<translation id="4913209098186576320">ဤဖိုင်သည် အန္တရာယ်ရှိနိုင်သည်<ph name="LINE_BREAK" />စစ်ဆေးမှုသည် ပုံမှန်ထက် ပိုကြာနေသည်...</translation> <translation id="4915961947098019832">ပုံများပြရန် ခွင့်ပြုထားသည်</translation> <translation id="4916542008280060967">ဝဘ်ဆိုက်ကို <ph name="FILE_NAME" /> အား တည်းဖြတ်ခွင့်ပြုမလား။</translation> <translation id="4917385247580444890">အားကောင်းသည်</translation> @@ -5049,6 +5058,7 @@ <translation id="4941963255146903244">သင့်ဖုန်း၏ ဓာတ်ပုံ၊ မီဒီယာနှင့် အက်ပ်များကို ကြည့်နိုင်သည်</translation> <translation id="494286511941020793">ပရောက်စီ စီစဉ်ဖွဲ့စည်းမှု အကူအညီ</translation> <translation id="4943368462779413526">ဘောလုံး</translation> +<translation id="4943927218331934807">စကားဝှက် လိုအပ်သည်</translation> <translation id="4944310289250773232">ဤအထောက်အထားစိစစ်ခြင်း ဝန်ဆောင်မှုကို <ph name="SAML_DOMAIN" /> က လက်ခံဝန်ဆောင်ပေးထားခြင်းဖြစ်သည်</translation> <translation id="4945439665401275950">လက်ဗွေစနစ်ထည့်သွင်းရန် သင့်ကလေးအား ဖွင့်ပိတ်ခလုတ်ကို ထိခိုင်းပါ။ သင့်ကလေး၏ လက်ဗွေဒေတာကို ဤ <ph name="DEVICE_TYPE" /> တွင်သာ လုံခြုံစွာ သိမ်းထားသည်။</translation> <translation id="4946459324029651239">ပုံမှန်ကာကွယ်မှုကို ရပါတော့မည်</translation> @@ -5488,6 +5498,7 @@ <translation id="5307030433605830021">ရင်းမြစ်ကို ပံ့ပိုးမထားပါ</translation> <translation id="5307386115243749078">ဘလူးတုသ်ခလုတ်ကို တွဲချိတ်ရန်</translation> <translation id="5308380583665731573">ချိတ်ဆက်ရန်</translation> +<translation id="5308989548591363504">မဲလ်ဝဲ ရှာဖွေနေသည်</translation> <translation id="5309418307557605830">Google Assistant သည် ဤနေရာတွင်လည်း အလုပ်လုပ်သည်</translation> <translation id="5309641450810523897">အကူအညီ ဖြစ်ရပ် ID</translation> <translation id="5311304534597152726">ဤအကောင့်ဖြင့် လက်မှတ်ထိုးဝင်ထားသည်</translation> @@ -5795,6 +5806,7 @@ <translation id="555604722231274592"><ph name="FEATURE_NAME" /> ဖွင့်ရန်</translation> <translation id="5556459405103347317">ပြန်တင်ရန်</translation> <translation id="5558129378926964177">ဇူးမ်ဆွဲရန်</translation> +<translation id="5558594314398017686">OS မူရင်း (ရနိုင်ပါက)</translation> <translation id="5559311991468302423">လိပ်စာကို ဖျက်ရန်</translation> <translation id="5559768063688681413">သိမ်းထားသည့် ပုံနှိပ်ထုတ်စက်မရှိပါ</translation> <translation id="55601339223879446">မျက်နှာပြင် ဖော်ပြမှုအတွင်း သင့်ဒက်စ်တော့ ဘောင်များကို ချိန်ညှိပါ</translation> @@ -8872,6 +8884,7 @@ <translation id="8005600846065423578"><ph name="HOST" /> အား ကလစ်ဘုတ်ကို အမြဲကြည့်ခွင့်ပြုရန်</translation> <translation id="8006630792898017994">Space (သို့) တဘ်</translation> <translation id="8008356846765065031">အင်တာနက် ချိတ်ဆက်မှုဖြုတ်လိုက်ပါပြီ။ ကျေးဇူးပြု၍ သင့်အင်တာနက် ချိတ်ဆက်မှုကို စစ်ဆေးပါ။</translation> +<translation id="8008704580256716350">သံသယဖြစ်ဖွယ်ဖိုင်ကို ပိတ်ထားသည်</translation> <translation id="8009225694047762179">စကားဝှက်များကို စီမံခြင်း</translation> <translation id="8011372169388649948">‘<ph name="BOOKMARK_TITLE" />’ ကို ရွှေ့ထားသည်။</translation> <translation id="8012188750847319132">စာလုံးကြီးခလုတ်</translation> @@ -10218,6 +10231,7 @@ <translation id="9057354806206861646">အစီအစဉ်ကို အပ်ဒိတ်လုပ်ခြင်း</translation> <translation id="9058070466596314168">{NUM_NOTIFICATION,plural, =1{တစ်ရက်လျှင် အကြောင်းကြားချက် ၁ ခုခန့်}other{တစ်ရက်လျှင် အကြောင်းကြားချက် {NUM_NOTIFICATION} ခုခန့်}}</translation> <translation id="9058760336383947367">ပရင့်တာ PPD ကြည့်ရန်</translation> +<translation id="9060042817356580609">DNS ပံ့ပိုးသူ ရွေးရန်</translation> <translation id="9061694916020926968">‘Chromebook အတွက် Steam’ (စမ်းသပ်) ကို သုံးရန်အတွက် Google Account တစ်ခုသို့ လက်မှတ်ထိုးဝင်ရမည်။ လက်မှတ်ထိုးဝင်ပြီး ထပ်စမ်းကြည့်ပါ။</translation> <translation id="9062468308252555888">၁၄ ဆ</translation> <translation id="9063208415146866933">စာကြောင်း <ph name="ERROR_LINE_START" /> မှ <ph name="ERROR_LINE_END" /> အထိ အမှားအယွင်း ရှိနေသည်</translation>
diff --git a/chrome/app/resources/generated_resources_uz.xtb b/chrome/app/resources/generated_resources_uz.xtb index c82a188..850931e3 100644 --- a/chrome/app/resources/generated_resources_uz.xtb +++ b/chrome/app/resources/generated_resources_uz.xtb
@@ -9010,6 +9010,7 @@ <translation id="81238879832906896">Moychechak</translation> <translation id="8123975449645947908">Orqaga varaqlash</translation> <translation id="8124313775439841391">Boshqariladigan ONC</translation> +<translation id="8125651784723647184">Parol ulashuvini administrator boshqaradi</translation> <translation id="8129265306888404830">Tashkilotingiz email manzilidan (<ph name="EMAIL_DOMAIN" />) foydalanish uchun korporativ sifatida qayd qilishingiz kerak. Agar bu qurilmadan shaxsiy maqsadda foydalanmoqchi boʻlsangiz, shaxsiy Google hisobingiz bilan kiring.</translation> <translation id="813082847718468539">Sayt haqidagi ma’lumotlar</translation> <translation id="8131740175452115882">Tasdiqlash</translation>
diff --git a/chrome/app/resources/google_chrome_strings_ar.xtb b/chrome/app/resources/google_chrome_strings_ar.xtb index 86d969b..440f176 100644 --- a/chrome/app/resources/google_chrome_strings_ar.xtb +++ b/chrome/app/resources/google_chrome_strings_ar.xtb
@@ -261,10 +261,12 @@ <translation id="5334487786912937552">يحتاج Chrome إلى إذن للوصول إلى مساحة التخزين من أجل تنزيل الملفات.</translation> <translation id="5337648990166757586">إجراء اختياري: يمكنك المساعدة في تحسين ميزات نظام التشغيل Chrome وأدائه من خلال إرسال بيانات التشخيص والاستخدام تلقائيًا إلى Google.</translation> <translation id="5357889879764279201">الحصول على مساعدة في نظام التشغيل ChromeOS Flex</translation> +<translation id="5386118856456530849">الانتقال إلى صفحة إعدادات إصدار Chrome</translation> <translation id="5386244825306882791">كما أنها تتحكم في الصفحة التي تظهر عند تشغيل Chrome أو إجراء بحث من المربع متعدد الاستخدامات.</translation> <translation id="5394833366792865639">مشاركة علامة تبويب Chrome</translation> <translation id="5412485296464121825">يمكن أن تخزّن المواقع الإلكترونية معلومات عن اهتماماتك في متصفّح Chrome. على سبيل المثال، إذا انتقلت إلى موقع إلكتروني لشراء حذاء لاستخدامه في سباق ماراثون، قد يحدّد هذا الموقع الإلكتروني حسب تقديره أنك مهتم بسباقات الماراثون. وبعد ذلك، إذا انتقلت إلى موقع إلكتروني آخر للتسجيل في سباق ماراثون، يمكن أن يعرض لك هذا الموقع الإلكتروني إعلانًا عن الأحذية المخصّصة للجري بناءً على اهتماماتك.</translation> <translation id="5430073640787465221">ملف الإعدادات المفضّلة تالف أو غير صالح. يتعذر على Google Chrome استرداد إعداداتك.</translation> +<translation id="5468572406162360320">يُرسل Chrome تفاعلاتك مع هذه الميزات إلى Google للمساعدة في تحسينها. وقد يقرأ المراجعون هذه البيانات ويعالجونها ويضيفون تعليقات توضيحية إليها.</translation> <translation id="5524761631371622910">عندما تكون التجارب مفعَّلة، وفي حال أضافك Chrome عشوائيًا إلى تجربة نشطة، سيؤثر سجلّ تصفّحك في الإعلانات التي تظهر لك والاهتمامات التي يتم تقديرها على النحو الموضّح أدناه. ولحماية خصوصيتك، يحذف Chrome اهتماماتك بشكل متواصل مرة واحدة على الأقل شهريًا.</translation> <translation id="5530733413481476019">زيادة سرعة أداء Chrome</translation> <translation id="5566025111015594046">Google Chrome (mDNS-In)</translation>
diff --git a/chrome/app/resources/google_chrome_strings_be.xtb b/chrome/app/resources/google_chrome_strings_be.xtb index 7e5be82..d6c02d1 100644 --- a/chrome/app/resources/google_chrome_strings_be.xtb +++ b/chrome/app/resources/google_chrome_strings_be.xtb
@@ -72,6 +72,7 @@ <translation id="2130870084309816036">Не ўдалося падключыцца да інтэрнэту. Калі вы выкарыстоўваеце брандмаўар, дадайце <ph name="PRODUCT_EXE_NAME" /> у белы спіс.</translation> <translation id="2131230230468101642">У мэтах аховы вашай прыватнасці старэйшыя за 4 тыдні звесткі пра вашы інтарэсы аўтаматычна выдаляюцца. Па меры прагляду сайтаў у інтэрнэце пэўныя інтарэсы могуць з'яўляцца ў спісе зноў. Вы таксама можаце выдаляць пэўныя інтарэсы, калі не хочаце, каб браўзер Chrome іх улічваў.</translation> <translation id="2139300032719313227">Перазапусціце Chrome OS</translation> +<translation id="2146761408396054429">Гэты файл можа быць небяспечным<ph name="LINE_BREAK" />Chrome можа праверыць спампоўку, калі вы ўведзяце пароль (ён застанецца на прыладзе)</translation> <translation id="2151406531797534936">Перазапусціце Chrome</translation> <translation id="2174917724755363426">Усталяванне не завершана. Вы сапраўды хочаце скасаваць яго?</translation> <translation id="2190166659037789668">Не ўдалося праверыць наяўнасць абнаўленняў: <ph name="UPDATE_CHECK_ERROR" />.</translation>
diff --git a/chrome/app/resources/google_chrome_strings_bs.xtb b/chrome/app/resources/google_chrome_strings_bs.xtb index 7d6bf7a0..75ac2bd 100644 --- a/chrome/app/resources/google_chrome_strings_bs.xtb +++ b/chrome/app/resources/google_chrome_strings_bs.xtb
@@ -73,6 +73,7 @@ <translation id="2130870084309816036">Nije moguće povezati se s internetom. Ako koristite zaštitni zid, omogućite listu dozvoljenih <ph name="PRODUCT_EXE_NAME" />.</translation> <translation id="2131230230468101642">Da zaštitimo vašu privatnost, automatski brišemo interesovanja koja su starija od 4 sedmice. Kada nastavite koristiti preglednik, interesovanje se može ponovo pojaviti na listi. Ili možete ukloniti interesovanja koja ne želite dati Chromeu na razmatranje.</translation> <translation id="2139300032719313227">Ponovo pokrenite ChromeOS</translation> +<translation id="2146761408396054429">Datoteka može biti opasna<ph name="LINE_BREAK" />Chrome može provjeriti to preuzimanje za vas ako unesete zaporku — vaša zaporka ostaje na uređaju</translation> <translation id="2151406531797534936">Ponovo pokrenite Chrome sada</translation> <translation id="2174917724755363426">Instalacija nije završena. Jeste li sigurni da želite otkazati?</translation> <translation id="2190166659037789668">Greška provjere ažuriranja: <ph name="UPDATE_CHECK_ERROR" />.</translation>
diff --git a/chrome/app/resources/google_chrome_strings_eu.xtb b/chrome/app/resources/google_chrome_strings_eu.xtb index 763a43d..f05ee5a1d 100644 --- a/chrome/app/resources/google_chrome_strings_eu.xtb +++ b/chrome/app/resources/google_chrome_strings_eu.xtb
@@ -59,7 +59,7 @@ <translation id="2018528049276128029">Profil bakoitzak Chrome-ko informazio propioa dauka; adibidez, laster-markak, historia, pasahitzak eta beste</translation> <translation id="2018879682492276940">Ezin izan da instalatu. Saiatu berriro.</translation> <translation id="2071318482926839249">Beste kontu batek dagoeneko hasita dauka saioa. Arakatze-jarduerak bereizita edukitzeko, Chrome-k profil bat sor dezake zuretzat.</translation> -<translation id="207902854391093810">Probak abian diren bitartean, iragarkien neurketari esker, bisitatzen dituzun webguneek Chrome-ri informazioa eska diezaiokete. Informazio horren bidez, webguneek beren iragarkien errendimendua neur dezakete. Webguneen artean ahalik eta informazio gutxien transferituta mugatzen du iragarkien neurketak webguneen arteko jarraipena.</translation> +<translation id="207902854391093810">Probak abian diren bitartean, iragarkien neurketari esker, bisitatzen dituzun webguneek Chrome-ri informazioa eska diezaiokete. Informazio horren bidez, webguneek beren iragarkien errendimendua neur dezakete. Webguneen artean ahalik eta informazio gutxien transferituta mugatzen du iragarkien neurketak webgunearteko jarraipena.</translation> <translation id="2091012649849228750">Etorkizunean Google Chrome-ren eguneratzeak eskuratzeko, Windows 10 edo bertsio berriago bat beharko duzu. Ordenagailua Windows 8 erabiltzen ari da.</translation> <translation id="2094648590148273905">ChromeOS Flex-en baldintzak</translation> <translation id="2094919256425865063">Chrome-tik irten nahi duzu hala ere?</translation> @@ -213,7 +213,7 @@ <translation id="4427306783828095590">Babes handiagoa eskaintzen du phishingaren eta malwarearen aurka</translation> <translation id="4450664632294415862">Chrome - Hasi saioa sarean - <ph name="PAGE_TITLE" /></translation> <translation id="4458462641685292929">Beste eragiketa bat ari da egiten Google Chrome. Saiatu berriro geroago.</translation> -<translation id="4459234553906210702">Iragarkien neurketari esker, bisitatzen dituzun webguneek Chrome-ri informazioa eska diezaiokete. Informazio horren bidez, webguneek beren iragarkien errendimendua neur dezakete. Webguneen artean ahalik eta informazio gutxien transferituta mugatzen du iragarkien neurketak webguneen arteko jarraipena.</translation> +<translation id="4459234553906210702">Iragarkien neurketari esker, bisitatzen dituzun webguneek Chrome-ri informazioa eska diezaiokete. Informazio horren bidez, webguneek beren iragarkien errendimendua neur dezakete. Webguneen artean ahalik eta informazio gutxien transferituta mugatzen du iragarkien neurketak webgunearteko jarraipena.</translation> <translation id="4501471624619070934">Ezin izan da instalatu, herrialde honetan sarbidea murriztuta dagoelako.</translation> <translation id="4561051373932531560">Google Chrome-rekin, telefono-zenbakietan klik egin dezakezu Skype bidez horietara deitzeko!</translation> <translation id="4567424176335768812"><ph name="USER_EMAIL_ADDRESS" /> gisa hasi duzu saioa. Laster-markak, historia eta bestelako ezarpenak atzi ditzakezu saioa hasita daukaten gailu guztien bidez.</translation> @@ -262,12 +262,14 @@ <translation id="5334487786912937552">Chrome-k biltegia erabiltzeko baimena behar du fitxategiak deskargatu ahal izateko</translation> <translation id="5337648990166757586">Aukerakoa: lagundu Chrome OS-ren eginbideak eta errendimendua hobetzen Google-ri diagnostiko- eta erabilera-datuak automatikoki bidalita.</translation> <translation id="5357889879764279201">Lortu ChromeOS Flex erabiltzeko laguntza</translation> +<translation id="5386118856456530849">Joan Chrome-ren bertsioaren ezarpenetara</translation> <translation id="5386244825306882791">Chrome hastean edo Omnibox bidez bilatzean erakutsiko den orria ere kontrolatzen du.</translation> <translation id="5394833366792865639">Partekatu Chrome-ko fitxa bat</translation> <translation id="5412485296464121825">Webguneek zure interesei buruzko informazioa gorde dezakete Chrome-n; esaterako, webgune batera joaten bazara maratoi baterako oinetakoak erostera, baliteke webgune horrek "maratoiak" definitzea interes gisa. Ondorioz, beranduago beste webgune batera joaten bazara lasterketa batean izena emateko, litekeena da webgune horrek lasterketetarako oinetakoekin erlazionatutako iragarki bat erakustea zure interesetan oinarrituta.</translation> <translation id="5430073640787465221">Hobespenen fitxategia hondatuta dago edo ez du balio. Google Chrome-k ezin ditu berreskuratu zure ezarpenak.</translation> +<translation id="5468572406162360320">Eginbide hauek hobetzen laguntzeko, Chrome-k haiekin dituzun interakzioak bidaltzen dizkio Google-ri. Baliteke informazio hori gizakia den berrikusle batek irakurtzea, prozesatzea eta hari buruzko oharpenak egitea.</translation> <translation id="5524761631371622910">Probak abian diren bitartean eta Chrome-k proba aktibo batean ausaz sartu bazaitu, agertzen zaizkizun iragarkietan eta behean estimatutako interesetan eragina izango du arakatze-historiak. Zure pribatutasuna babesteko, Chrome-k hilero ezabatzen ditu zure interesak.</translation> <translation id="5530733413481476019">Bizkortu Chrome</translation> <translation id="5566025111015594046">Google Chrome (mDNS-In)</translation>
diff --git a/chrome/app/resources/google_chrome_strings_hr.xtb b/chrome/app/resources/google_chrome_strings_hr.xtb index 4b5b017..001aec4 100644 --- a/chrome/app/resources/google_chrome_strings_hr.xtb +++ b/chrome/app/resources/google_chrome_strings_hr.xtb
@@ -69,6 +69,7 @@ <translation id="2130870084309816036">Povezivanje s internetom nije moguće. Ako upotrebljavate vatrozid, na popis dopuštenih stavite <ph name="PRODUCT_EXE_NAME" />.</translation> <translation id="2131230230468101642">Da bismo zaštitili vašu privatnost, automatski brišemo vaše interese starije od četiri tjedna. Tijekom vašeg daljnjeg pregledavanja neki se interes može ponovo pojaviti na popisu. Možete i ukloniti interese za koje ne želite da ih Chrome razmatra.</translation> <translation id="2139300032719313227">Ponovo pokrenite Chrome OS</translation> +<translation id="2146761408396054429">Datoteka može biti opasna<ph name="LINE_BREAK" />Chrome može provjeriti to preuzimanje za vas ako unesete zaporku — vaša zaporka ostaje na uređaju</translation> <translation id="2151406531797534936">Sada ponovo pokrenite Chrome</translation> <translation id="2174917724755363426">Instaliranje nije dovršeno. Jeste li sigurni da ga želite otkazati?</translation> <translation id="2190166659037789668">Pogreška provjere ažuriranja: <ph name="UPDATE_CHECK_ERROR" />.</translation>
diff --git a/chrome/app/resources/google_chrome_strings_iw.xtb b/chrome/app/resources/google_chrome_strings_iw.xtb index 5856e38..239c47c 100644 --- a/chrome/app/resources/google_chrome_strings_iw.xtb +++ b/chrome/app/resources/google_chrome_strings_iw.xtb
@@ -25,6 +25,7 @@ <translation id="1425903838053942728">{COUNT,plural, =0{העדכון של Chrome הסתיים. אפשר להשתמש בגרסה העדכנית מיד עם ההפעלה מחדש. לאחר מכן, הכרטיסיות הנוכחיות ייפתחו מחדש.}=1{העדכון של Chrome הסתיים. אפשר להשתמש בגרסה העדכנית מיד עם ההפעלה מחדש. לאחר מכן, הכרטיסיות הנוכחיות ייפתחו מחדש. החלון הפרטי לא ייפתח מחדש.}one{העדכון של Chrome הסתיים. אפשר להשתמש בגרסה העדכנית מיד עם ההפעלה מחדש. לאחר מכן, הכרטיסיות הנוכחיות ייפתחו מחדש. # החלונות הפרטיים לא ייפתחו מחדש.}two{העדכון של Chrome הסתיים. אפשר להשתמש בגרסה העדכנית מיד עם ההפעלה מחדש. לאחר מכן, הכרטיסיות הנוכחיות ייפתחו מחדש. # החלונות הפרטיים לא ייפתחו מחדש.}other{העדכון של Chrome הסתיים. אפשר להשתמש בגרסה העדכנית מיד עם ההפעלה מחדש. לאחר מכן, הכרטיסיות הנוכחיות ייפתחו מחדש. # החלונות הפרטיים לא ייפתחו מחדש.}}</translation> <translation id="1434626383986940139">אפליקציות Chrome – קאנארי</translation> <translation id="1492280395845991349">צריך להפעיל מחדש כדי לסיים את העדכון של Chrome</translation> +<translation id="1497802159252041924">שגיאת התקנה: <ph name="INSTALL_ERROR" /></translation> <translation id="1507198376417198979">רוצה להתאים אישית את פרופיל Chrome?</translation> <translation id="1516530951338665275">ל-Google Chrome נדרשת גישה ל-Bluetooth כדי להמשיך את ההתאמה. <ph name="IDS_BLUETOOTH_DEVICE_CHOOSER_AUTHORIZE_BLUETOOTH_LINK" /></translation> @@ -87,6 +88,7 @@ <translation id="2467438592969358367">Google Chrome רוצה לייצא את הסיסמאות שלך. יש להקליד את הסיסמה שלך ל-Windows כדי לאפשר זאת.</translation> <translation id="2472092250898121027">התוסף הזה מכיל תוכנה זדונית והוא לא בטוח. צריך להסיר אותו מ-Chrome כדי לא לאפשר לו יותר להציג ולשנות את הנתונים שלך באתרים שאליהם תתבצע כניסה, כולל הפרטים האישיים שלך.</translation> <translation id="2485422356828889247">הסרת התקנה</translation> +<translation id="2534365042754120737">כדי להגן על הנתונים שלך, כדאי לאפשר ל-Chrome להסיר הרשאות מאתרים שלא נכנסת אליהם לאחרונה. המערכת תמשיך לשלוח התראות.</translation> <translation id="2534507159460261402">Google Pay (הועתק ל-Chrome)</translation> <translation id="2556847002339236023">לפי הגדרת הארגון, Chrome נסגר אוטומטית כשלא משתמשים בו במשך <ph name="TIMEOUT_DURATION" />. נתוני הגלישה נמחקו. בין הנתונים שנמחקו: היסטוריה, מילוי אוטומטי והורדות.</translation> <translation id="2559253115192232574">לאחר מכן, אתר שבו ביקרת יכול לשלוח בקשה ל-Chrome כדי לגלות מהם תחומי העניין שלך ולהתאים אישית את המודעות שמוצגות לך. Chrome יכול לשתף עד 3 תחומי עניין.</translation> @@ -266,6 +268,7 @@ <translation id="5524761631371622910">כשגרסאות הניסיון פעילות, ובמקרים שבהם צורפת באופן אקראי לגרסת ניסיון פעילה ב-Chrome, היסטוריית הגלישה שלך משפיעה על המודעות שמוצגות לך ועל תחומי העניין המשוערים שמופיעים בהמשך. כדי להגן על הפרטיות שלך, מתבצעת ב-Chrome מחיקה של תחומי העניין שלך על בסיס מתחלף מדי חודש.</translation> <translation id="5530733413481476019">שיפור המהירות ב-Chrome</translation> <translation id="5566025111015594046">Google Chrome (mDNS-In)</translation> +<translation id="5572786658631721382">כשההגדרה מושבתת, עדיין יוצגו הצעות מ-Chrome באופן מקומי</translation> <translation id="565744775970812598"><ph name="FILE_NAME" /> עלול להיות מסוכן, ולכן Chrome חסם אותו.</translation> <translation id="5678190148303298925">{COUNT,plural, =0{מנהל המערכת מבקש להפעיל מחדש את Chrome כדי להחיל את העדכון הזה}=1{מנהל המערכת מבקש להפעיל מחדש את Chrome כדי להחיל את העדכון הזה. החלון האנונימי לא ייפתח מחדש.}one{מנהל המערכת מבקש להפעיל מחדש את Chrome כדי להחיל את העדכון הזה. # החלונות האנונימיים לא ייפתחו מחדש.}two{מנהל המערכת מבקש להפעיל מחדש את Chrome כדי להחיל את העדכון הזה. # החלונות האנונימיים לא ייפתחו מחדש.}other{מנהל המערכת מבקש להפעיל מחדש את Chrome כדי להחיל את העדכון הזה. # החלונות האנונימיים לא ייפתחו מחדש.}}</translation> <translation id="5686916850681061684">התאמה אישית וניהול של Google Chrome. נחוצה פעולה שלך - יש ללחוץ לקבלת פרטים נוספים.</translation> @@ -359,6 +362,7 @@ <translation id="7177959540995930968">מידע נוסף לגבי התכונות האלה זמין בהגדרות של Chrome.</translation> <translation id="7193885263065350793">לפי הגדרת הארגון, Chrome נסגר אוטומטית כשלא משתמשים בו במשך <ph name="TIMEOUT_DURATION" />.</translation> <translation id="7242029209006116544">בחרת להיכנס לחשבון מנוהל, ויינתן למנהל המערכת שלו שליטה על הפרופיל שלך ב-Google Chrome. הנתונים שלך ב-Chrome, כגון אפליקציות, סימניות, היסטוריה, סיסמאות והגדרות אחרות ייקשרו באופן קבוע ל-<ph name="USER_NAME" />. ניתן למחוק את הנתונים האלה באמצעות מרכז השליטה של חשבונות Google, אבל לא ניתן יהיה לשייך את הנתונים האלה לחשבון אחר. <ph name="LEARN_MORE" /></translation> +<translation id="7284878711178835966">תוך כדי הקלדה, Chrome שולח את התוכן של סרגל הכתובות או תיבת החיפוש למנוע החיפוש שמוגדר כברירת מחדל</translation> <translation id="7295052994004373688">זו השפה שבה מוצג ממשק המשתמש של Google Chrome</translation> <translation id="7296210096911315575">מידע חשוב על בטיחות ועל אופן השימוש</translation> <translation id="7308322188646931570">Chrome זקוק לגישה לאחסון כדי להוריד קבצים</translation>
diff --git a/chrome/app/resources/google_chrome_strings_ms.xtb b/chrome/app/resources/google_chrome_strings_ms.xtb index 3b9f82d4..03d8396 100644 --- a/chrome/app/resources/google_chrome_strings_ms.xtb +++ b/chrome/app/resources/google_chrome_strings_ms.xtb
@@ -89,6 +89,7 @@ <translation id="2467438592969358367">Google Chrome mahu mengeksport kata laluan anda. Taip kata laluan Windows anda untuk membenarkannya.</translation> <translation id="2472092250898121027">Sambungan ini mengandungi perisian hasad dan tidak selamat. Alih keluar sambungan ini daripada Chrome supaya sambungan ini tidak dapat melihat dan mengubah data anda pada laman yang anda lawati lagi, termasuk maklumat peribadi anda.</translation> <translation id="2485422356828889247">Nyahpasang</translation> +<translation id="2513154137948333830">But semula diperlukan: <ph name="INSTALL_SUCCESS" /></translation> <translation id="2534365042754120737">Untuk melindungi data anda, benarkan Chrome mengalih keluar kebenaran daripada laman yang belum anda lawati baru-baru ini. Tidak menghentikan pemberitahuan.</translation> <translation id="2534507159460261402">Google Pay (disalin ke Chrome)</translation> <translation id="2556847002339236023">Organisasi anda menutup Chrome apabila apl tersebut tidak digunakan selama <ph name="TIMEOUT_DURATION" />. Data semakan imbas telah dipadamkan. Pemadaman ini termasuk sejarah, autolengkap dan muat turun.</translation> @@ -112,6 +113,7 @@ <translation id="2770231113462710648">Tukar penyemak imbas lalai kepada:</translation> <translation id="2775140325783767197">Chrome tidak dapat menyemak kata laluan anda. Cuba periksa sambungan Internet anda.</translation> <translation id="2799223571221894425">Lancarkan semula</translation> +<translation id="2846251086934905009">Ralat pemasangan: Proses pemasang tidak selesai. Pemasangan telah dihenti paksa.</translation> <translation id="2847461019998147611">Paparkan Google Chrome dalam bahasa ini</translation> <translation id="2853415089995957805">Chrome mempramuat halaman yang mungkin anda lawati supaya halaman tersebut dimuatkan dengan lebih pantas apabila dilawati</translation> <translation id="2857540653560290388">Melancarkan Chrome...</translation> @@ -127,6 +129,7 @@ <translation id="2926952073016206995">Chrome memerlukan kebenaran kamera untuk laman ini</translation> <translation id="2928420929544864228">Pemasangan selesai.</translation> <translation id="2929907241665500097">Chrome tidak dikemas kini, kesilapan telah berlaku. <ph name="BEGIN_LINK" />Selesaikan masalah kemas kini dan kegagalan kemas kini Chrome.<ph name="END_LINK" /></translation> +<translation id="2945997411976714835">Ralat pemasangan: Proses pemasang gagal dimulakan.</translation> <translation id="2969728957078202736"><ph name="PAGE_TITLE" /> - Log Masuk Rangkaian - Chrome</translation> <translation id="3018957014024118866">Padamkan juga data daripada Chrome (<ph name="URL" />)</translation> <translation id="3019382870990049182">Lancarkan semula untuk mengemas kini &ChromeOS Flex</translation> @@ -183,6 +186,7 @@ <translation id="3865754807470779944">Chrome versi <ph name="PRODUCT_VERSION" /> dipasang</translation> <translation id="3873044882194371212">Buka pautan dalam tetingkap inko&gnito Chrome</translation> <translation id="3889417619312448367">Nyahpasang Google Chrome</translation> +<translation id="3941890832296813527">Ralat pemasangan: Nama fail pemasang tidak sah atau tidak disokong.</translation> <translation id="3999683152997576765">Anda boleh melihat dan mengalih keluar topik minat yang digunakan oleh laman untuk memaparkan iklan kepada anda. Chrome menganggarkan minat anda berdasarkan sejarah penyemakan imbas anda baru-baru ini.</translation> <translation id="4035053306113201399">Chrome OS perlu dimulakan semula untuk melaksanakan kemaskinian.</translation> <translation id="4050175100176540509">Peningkatan keselamatan penting dan ciri baharu tersedia dalam versi terkini.</translation> @@ -260,6 +264,7 @@ <translation id="5334487786912937552">Chrome memerlukan kebenaran akses storan untuk memuat turun fail</translation> <translation id="5337648990166757586">Pilihan: Bantu kami mempertingkat ciri dan prestasi Chrome OS dengan menghantar data diagnostik dan penggunaan kepada Google secara automatik.</translation> <translation id="5357889879764279201">Dapatkan bantuan berkenaan Chrome OS Flex</translation> +<translation id="5368118228313795342">Kod tambahan: <ph name="EXTRA_CODE" />.</translation> <translation id="5386118856456530849">Akses tetapan versi Chrome</translation> <translation id="5386244825306882791">Sambungan turut mengawal halaman yang ditunjukkan apabila anda memulakan Chrome atau membuat carian dari Kotak Omni.</translation> <translation id="5394833366792865639">Kongsi tab Chrome</translation> @@ -456,6 +461,7 @@ <translation id="8727043961453758442">Manfaatkan Chrome sepenuhnya</translation> <translation id="873133009373065397">Google Chrome tidak dapat menentukan atau menetapkan penyemak imbas lalai</translation> <translation id="8765470054473112089">Apabila anda menaip dalam bar alamat atau kotak carian, Chrome menghantar perkara yang anda taip ke enjin carian lalai anda untuk mendapatkan cadangan yang lebih baik. Tetapan ini dimatikan dalam Inkognito.</translation> +<translation id="878572486461146056">Ralat pemasangan: Pentadbir rangkaian anda telah menggunakan Dasar Kumpulan yang menghalang pemasangan: <ph name="INSTALL_ERROR" /></translation> <translation id="8821043148920470810">Untuk mendapatkan kemaskinian Google Chrome yang akan datang, anda memerlukan Windows 10 atau yang lebih baharu. Komputer ini menggunakan Windows 7.</translation> <translation id="8823341990149967727">Chrome sudah Usang</translation> <translation id="8825634023950448068">Untuk melindungi privasi anda, kami memadamkan minat anda yang disimpan melebihi 4 minggu secara automatik. Semasa anda terus menyemak imbas, minat itu mungkin muncul semula dalam senarai. Jika Chrome tersilap atau anda tidak mahu melihat iklan tertentu, anda boleh mengalih keluar minat itu.</translation>
diff --git a/chrome/app/resources/google_chrome_strings_my.xtb b/chrome/app/resources/google_chrome_strings_my.xtb index db3ede2..b2ec9bf 100644 --- a/chrome/app/resources/google_chrome_strings_my.xtb +++ b/chrome/app/resources/google_chrome_strings_my.xtb
@@ -73,6 +73,7 @@ <translation id="2130870084309816036">အင်တာနက် ချိတ်ဆက်၍ မရပါ။ firewall သုံးပါက <ph name="PRODUCT_EXE_NAME" /> ကို ခွင့်ပြုစာရင်းသို့ ထည့်ပါ။</translation> <translation id="2131230230468101642">သင်၏ကိုယ်ရေးအချက်အလက်လုံခြုံမှုကို ကာကွယ်ရန် ၄ ပတ်ကျော်ပြီဖြစ်သော သင့်စိတ်ဝင်စားမှုများကို အလိုအလျောက်ဖျက်သည်။ သင်ကြည့်ရှုနေသည့်အတွက် စိတ်ဝင်စားမှုက စာရင်းတွင် ထပ်ပေါ်လာနိုင်သည်။ သို့မဟုတ် Chrome ထည့်မတွက်ရမည့် စိတ်ဝင်စားမှုများကို ဖယ်ရှားနိုင်သည်။</translation> <translation id="2139300032719313227">ChromeOS ပြန်စပါ</translation> +<translation id="2146761408396054429">ဤဖိုင်သည် အန္တရာယ်ရှိနိုင်သည်<ph name="LINE_BREAK" />သင်စကားဝှက်ပေးပါက Chrome သည် သင့်အတွက် ဤဒေါင်းလုဒ်ကို စစ်ပေးနိုင်သည် — သင့်စကားဝှက်သည် ဤစက်၌သာ ရှိပါမည်</translation> <translation id="2151406531797534936">Chrome ကို ယခုပြန်စပါ</translation> <translation id="2174917724755363426">ထည့်သွင်းမှု မပြီးဆုံးပါ။ ပယ်ဖျက်လိုသည်မှာ သေချာပါသလား။</translation> <translation id="2190166659037789668">အပ်ဒိတ်စစ်ဆေးရန် အမှား- <ph name="UPDATE_CHECK_ERROR" />။</translation>
diff --git a/chrome/app/resources/google_chrome_strings_uz.xtb b/chrome/app/resources/google_chrome_strings_uz.xtb index 59336f75..dabdaf45 100644 --- a/chrome/app/resources/google_chrome_strings_uz.xtb +++ b/chrome/app/resources/google_chrome_strings_uz.xtb
@@ -25,6 +25,7 @@ <translation id="1425903838053942728">{COUNT,plural, =0{Chrome yangilandi. Qayta ochilganda oxirgi versiyadan foydalanish mumkin. Keyin joriy varaqlar tiklanadi.}=1{Chrome yangilandi. Qayta ochilganda oxirgi versiyadan foydalanish mumkin. Keyin joriy varaqlar tiklanadi. Inkognito oynalar qayta ochilmaydi.}other{Chrome yangilandi. Qayta ochilganda oxirgi versiyadan foydalanish mumkin. Keyin joriy varaqlar tiklanadi. # ta inkognito oyna qayta ochilmaydi.}}</translation> <translation id="1434626383986940139">Chrome Canary ilovalari</translation> <translation id="1492280395845991349">Chrome yangilanishini yakunlash uchun qayta oching</translation> +<translation id="1497802159252041924">O'rnatishdagi xatolik: <ph name="INSTALL_ERROR" /></translation> <translation id="1507198376417198979">Yangi Chrome profilini moslash</translation> <translation id="1516530951338665275">Google Chrome ulanishi uchun Bluetooth orqali kirish ruxsati kerak. <ph name="IDS_BLUETOOTH_DEVICE_CHOOSER_AUTHORIZE_BLUETOOTH_LINK" /></translation> @@ -88,6 +89,7 @@ <translation id="2467438592969358367">Google Chrome parollaringizni eksport qilmoqchi. Ruxsat berish uchun Windows platformasidagi parolingizni kiriting.</translation> <translation id="2472092250898121027">Bu kengaytma tarkibida zararli kod bor va u xavfli boʻlishi mumkin. Ochilgan saytlarda shaxsiy axborot kabi maʼlumotlarni koʻrishi va oʻzgartirishini tugatish uchun uni Chromedan olib tashlang.</translation> <translation id="2485422356828889247">O‘chirib tashlash</translation> +<translation id="2534365042754120737">Maʼlumotlaringizni himoyalash maqsadida Chrome brauzeriga uzoq vaqt kirmagan saytlardan ruxsatlarni olib tashlashi uchun ruxsat bering. Bildirishnomalar kelishi davom etadi.</translation> <translation id="2534507159460261402">Google Pay (Chrome brauzeriga nusxalandi)</translation> <translation id="2556847002339236023">Tashkilotingiz Chrome <ph name="TIMEOUT_DURATION" /> ishlatilmasa avtomatik yopilishini sozlagan. Brauzer maʼlumotlari oʻchirib tashlandi. Jumladan, tarix, avtomatik kiritish va yuklanmalar.</translation> <translation id="2559253115192232574">Keyinchalik sayt sizga chiqadigan reklamani moslashtirish maqsadida Chromedan qiziqishlaringiz haqida soʻrashi mumkin. Chrome 3 tagacha qiziqishingizni ulasha oladi.</translation> @@ -271,6 +273,7 @@ <translation id="5524761631371622910">Sinov muddatlari yoqilganida Chrome sizni tasodifiy faol sinovga joylaganida, siz ochgan sahifalar tarixi chiqadigan reklama va quyidagi qiziqishlaringizga taʼsir qiladi. Maxfiylikni himoya qilish maqsadida Chrome har oyda qiziqishlaringizni avtomatik oʻchiradi.</translation> <translation id="5530733413481476019">Chromeni tezlashtirish</translation> <translation id="5566025111015594046">Google Chrome (mDNS-In)</translation> +<translation id="5572786658631721382">Nofaolligida Chrome mahalliy takliflarni yuborishda davom etadi</translation> <translation id="565744775970812598"><ph name="FILE_NAME" /> zararli bo‘lishi mumkin, shuning uchun u Chrome tomonidan bloklandi.</translation> <translation id="5678190148303298925">{COUNT,plural, =0{Administrator yangilishlarni oʻrnatish uchun Chrome brauzerini qayta ishga tushirishni soʻramoqda}=1{Administrator yangilishlarni oʻrnatish uchun Chrome brauzerini qayta ishga tushirishni soʻramoqda Inkognito oynalar qayta ochilmaydi.}other{Administrator yangilishlarni oʻrnatish uchun Chrome brauzerini qayta ishga tushirishni soʻramoqda # ta inkognito oyna qayta ochilmaydi.}}</translation> <translation id="5686916850681061684">Google Chrome brauzerini sozlash va boshqarish. Diqqat qaratishingiz zarur. Batafsil axborot olish uchun bu yerga bosing.</translation> @@ -364,6 +367,7 @@ <translation id="7177959540995930968">Bu funksiyalar haqida batafsil axborotni Chrome sozlamalari orqali olish mumkin.</translation> <translation id="7193885263065350793">Tashkilotingiz Chrome <ph name="TIMEOUT_DURATION" /> ishlatilmasa avtomatik yopilishini sozlagan.</translation> <translation id="7242029209006116544">Boshqariladigan hisobga kirish bilan siz administratorga Google Chrome profilingiz sozlamalarini boshqarishiga rozilik bildirasiz. Barcha Chrome ma’lumotlaringiz (m-n, ilovalar, xatcho‘plar, brauzer tarixi, parollar va boshqa sozlamalar kabi) <ph name="USER_NAME" /> hisobiga butunlay bog‘lanadi. Bu ma’lumotlarni Google shaxsiy kabinetida o‘chirish mumkin, lekin boshqa hisobga bog‘lash imkoniyati yo‘q. Chrome ma’lumotlarini saqlab qolish uchun yangi profil yarating. <ph name="LEARN_MORE" /></translation> +<translation id="7284878711178835966">Matn kiritishni boshlashingiz bilan Chrome manzil qatori yoki qidiruv maydonchasi kontentini asosiy qidiruv vositasiga yuboradi</translation> <translation id="7295052994004373688">Google Chrome UI inteyfeysi hozir shu tilda</translation> <translation id="7296210096911315575">Foydalanish va xavfsizlik</translation> <translation id="7308322188646931570">Yuklab olish uchun Chrome brauzerida omborga saqlash ruxsati bo‘lishi zarur</translation>
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc index bec81b0..0e5447a 100644 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc
@@ -6918,6 +6918,12 @@ kOsDesktop, FEATURE_VALUE_TYPE(ntp_features::kRealboxCr23ExpandedStateIcons)}, + {"ntp-realbox-cr23-expanded-state-layout", + flag_descriptions::kNtpRealboxCr23ExpandedStateLayoutName, + flag_descriptions::kNtpRealboxCr23ExpandedStateLayoutDescription, + kOsDesktop, + FEATURE_VALUE_TYPE(ntp_features::kRealboxCr23ExpandedStateLayout)}, + {"ntp-realbox-match-searchbox-theme", flag_descriptions::kNtpRealboxMatchSearchboxThemeName, flag_descriptions::kNtpRealboxMatchSearchboxThemeDescription, kOsDesktop,
diff --git a/chrome/browser/accessibility/accessibility_extension_api_ash.cc b/chrome/browser/accessibility/accessibility_extension_api_ash.cc index 75e13c87..c53cffa 100644 --- a/chrome/browser/accessibility/accessibility_extension_api_ash.cc +++ b/chrome/browser/accessibility/accessibility_extension_api_ash.cc
@@ -73,12 +73,11 @@ ash::AccessibilityToastType ConvertToastType( accessibility_private::ToastType type) { switch (type) { - case accessibility_private::ToastType:: - TOAST_TYPE_DICTATIONNOFOCUSEDTEXTFIELD: + case accessibility_private::ToastType::kDictationNoFocusedTextField: return ash::AccessibilityToastType::kDictationNoFocusedTextField; - case accessibility_private::ToastType::TOAST_TYPE_DICTATIONMICMUTED: + case accessibility_private::ToastType::kDictationMicMuted: return ash::AccessibilityToastType::kDictationMicMuted; - case accessibility_private::ToastType::TOAST_TYPE_NONE: + case accessibility_private::ToastType::kNone: NOTREACHED_NORETURN(); } } @@ -86,32 +85,23 @@ ash::DictationBubbleHintType ConvertDictationHintType( accessibility_private::DictationBubbleHintType hint_type) { switch (hint_type) { - case accessibility_private::DictationBubbleHintType:: - DICTATION_BUBBLE_HINT_TYPE_TRYSAYING: + case accessibility_private::DictationBubbleHintType::kTrySaying: return ash::DictationBubbleHintType::kTrySaying; - case accessibility_private::DictationBubbleHintType:: - DICTATION_BUBBLE_HINT_TYPE_TYPE: + case accessibility_private::DictationBubbleHintType::kType: return ash::DictationBubbleHintType::kType; - case accessibility_private::DictationBubbleHintType:: - DICTATION_BUBBLE_HINT_TYPE_DELETE: + case accessibility_private::DictationBubbleHintType::kDelete: return ash::DictationBubbleHintType::kDelete; - case accessibility_private::DictationBubbleHintType:: - DICTATION_BUBBLE_HINT_TYPE_SELECTALL: + case accessibility_private::DictationBubbleHintType::kSelectAll: return ash::DictationBubbleHintType::kSelectAll; - case accessibility_private::DictationBubbleHintType:: - DICTATION_BUBBLE_HINT_TYPE_UNDO: + case accessibility_private::DictationBubbleHintType::kUndo: return ash::DictationBubbleHintType::kUndo; - case accessibility_private::DictationBubbleHintType:: - DICTATION_BUBBLE_HINT_TYPE_HELP: + case accessibility_private::DictationBubbleHintType::kHelp: return ash::DictationBubbleHintType::kHelp; - case accessibility_private::DictationBubbleHintType:: - DICTATION_BUBBLE_HINT_TYPE_UNSELECT: + case accessibility_private::DictationBubbleHintType::kUnselect: return ash::DictationBubbleHintType::kUnselect; - case accessibility_private::DictationBubbleHintType:: - DICTATION_BUBBLE_HINT_TYPE_COPY: + case accessibility_private::DictationBubbleHintType::kCopy: return ash::DictationBubbleHintType::kCopy; - case accessibility_private::DictationBubbleHintType:: - DICTATION_BUBBLE_HINT_TYPE_NONE: + case accessibility_private::DictationBubbleHintType::kNone: NOTREACHED(); return ash::DictationBubbleHintType::kTrySaying; } @@ -283,27 +273,23 @@ accessibility_private::AccessibilityFeature params_feature = params->feature; bool enabled; switch (params_feature) { - case accessibility_private::AccessibilityFeature:: - ACCESSIBILITY_FEATURE_GOOGLETTSLANGUAGEPACKS: + case accessibility_private::AccessibilityFeature::kGoogleTtsLanguagePacks: enabled = ::features:: IsExperimentalAccessibilityGoogleTtsLanguagePacksEnabled(); break; case accessibility_private::AccessibilityFeature:: - ACCESSIBILITY_FEATURE_GOOGLETTSHIGHQUALITYVOICES: + kGoogleTtsHighQualityVoices: enabled = ::features:: IsExperimentalAccessibilityGoogleTtsHighQualityVoicesEnabled(); break; - case accessibility_private::AccessibilityFeature:: - ACCESSIBILITY_FEATURE_DICTATIONCONTEXTCHECKING: + case accessibility_private::AccessibilityFeature::kDictationContextChecking: enabled = ::features:: IsExperimentalAccessibilityDictationContextCheckingEnabled(); break; - case accessibility_private::AccessibilityFeature:: - ACCESSIBILITY_FEATURE_GAMEFACEINTEGRATION: + case accessibility_private::AccessibilityFeature::kGameFaceIntegration: enabled = ::features::IsAccessibilityGameFaceIntegrationEnabled(); break; - case accessibility_private::AccessibilityFeature:: - ACCESSIBILITY_FEATURE_NONE: + case accessibility_private::AccessibilityFeature::kNone: return RespondNow(Error("Unrecognized feature")); } @@ -357,13 +343,13 @@ EXTENSION_FUNCTION_VALIDATE(params); ash::AcceleratorAction accelerator_action; switch (params->accelerator_action) { - case accessibility_private::ACCELERATOR_ACTION_FOCUSPREVIOUSPANE: + case accessibility_private::AcceleratorAction::kFocusPreviousPane: accelerator_action = ash::AcceleratorAction::kFocusPreviousPane; break; - case accessibility_private::ACCELERATOR_ACTION_FOCUSNEXTPANE: + case accessibility_private::AcceleratorAction::kFocusNextPane: accelerator_action = ash::AcceleratorAction::kFocusNextPane; break; - case accessibility_private::ACCELERATOR_ACTION_NONE: + case accessibility_private::AcceleratorAction::kNone: NOTREACHED(); return RespondNow(Error("Invalid accelerator action.")); } @@ -400,7 +386,7 @@ static_cast<ui::KeyboardCode>(key_data->key_code); ui::KeyEvent synthetic_key_event( key_data->type == - accessibility_private::SYNTHETIC_KEYBOARD_EVENT_TYPE_KEYUP + accessibility_private::SyntheticKeyboardEventType::kKeyup ? ui::ET_KEY_RELEASED : ui::ET_KEY_PRESSED, keyboard_code, ui::UsLayoutKeyboardCodeToDomCode(keyboard_code), @@ -435,22 +421,22 @@ ui::EventType type = ui::ET_UNKNOWN; switch (mouse_data->type) { - case accessibility_private::SYNTHETIC_MOUSE_EVENT_TYPE_PRESS: + case accessibility_private::SyntheticMouseEventType::kPress: type = ui::ET_MOUSE_PRESSED; break; - case accessibility_private::SYNTHETIC_MOUSE_EVENT_TYPE_RELEASE: + case accessibility_private::SyntheticMouseEventType::kRelease: type = ui::ET_MOUSE_RELEASED; break; - case accessibility_private::SYNTHETIC_MOUSE_EVENT_TYPE_DRAG: + case accessibility_private::SyntheticMouseEventType::kDrag: type = ui::ET_MOUSE_DRAGGED; break; - case accessibility_private::SYNTHETIC_MOUSE_EVENT_TYPE_MOVE: + case accessibility_private::SyntheticMouseEventType::kMove: type = ui::ET_MOUSE_MOVED; break; - case accessibility_private::SYNTHETIC_MOUSE_EVENT_TYPE_ENTER: + case accessibility_private::SyntheticMouseEventType::kEnter: type = ui::ET_MOUSE_ENTERED; break; - case accessibility_private::SYNTHETIC_MOUSE_EVENT_TYPE_EXIT: + case accessibility_private::SyntheticMouseEventType::kExit: type = ui::ET_MOUSE_EXITED; break; default: @@ -460,19 +446,19 @@ int flags = 0; if (type != ui::ET_MOUSE_MOVED) { switch (mouse_data->mouse_button) { - case accessibility_private::SYNTHETIC_MOUSE_EVENT_BUTTON_LEFT: + case accessibility_private::SyntheticMouseEventButton::kLeft: flags |= ui::EF_LEFT_MOUSE_BUTTON; break; - case accessibility_private::SYNTHETIC_MOUSE_EVENT_BUTTON_MIDDLE: + case accessibility_private::SyntheticMouseEventButton::kMiddle: flags |= ui::EF_MIDDLE_MOUSE_BUTTON; break; - case accessibility_private::SYNTHETIC_MOUSE_EVENT_BUTTON_RIGHT: + case accessibility_private::SyntheticMouseEventButton::kRight: flags |= ui::EF_RIGHT_MOUSE_BUTTON; break; - case accessibility_private::SYNTHETIC_MOUSE_EVENT_BUTTON_BACK: + case accessibility_private::SyntheticMouseEventButton::kBack: flags |= ui::EF_BACK_MOUSE_BUTTON; break; - case accessibility_private::SYNTHETIC_MOUSE_EVENT_BUTTON_FOWARD: + case accessibility_private::SyntheticMouseEventButton::kFoward: flags |= ui::EF_FORWARD_MOUSE_BUTTON; break; default: @@ -540,31 +526,31 @@ ax::mojom::AssistiveTechnologyType at_type; switch (params->at_type) { - case extensions::api::accessibility_private::ASSISTIVE_TECHNOLOGY_TYPE_NONE: + case extensions::api::accessibility_private::AssistiveTechnologyType::kNone: at_type = ax::mojom::AssistiveTechnologyType::kUnknown; break; - case extensions::api::accessibility_private:: - ASSISTIVE_TECHNOLOGY_TYPE_CHROMEVOX: + case extensions::api::accessibility_private::AssistiveTechnologyType:: + kChromeVox: at_type = ax::mojom::AssistiveTechnologyType::kChromeVox; break; - case extensions::api::accessibility_private:: - ASSISTIVE_TECHNOLOGY_TYPE_SELECTTOSPEAK: + case extensions::api::accessibility_private::AssistiveTechnologyType:: + kSelectToSpeak: at_type = ax::mojom::AssistiveTechnologyType::kSelectToSpeak; break; - case extensions::api::accessibility_private:: - ASSISTIVE_TECHNOLOGY_TYPE_SWITCHACCESS: + case extensions::api::accessibility_private::AssistiveTechnologyType:: + kSwitchAccess: at_type = ax::mojom::AssistiveTechnologyType::kSwitchAccess; break; - case extensions::api::accessibility_private:: - ASSISTIVE_TECHNOLOGY_TYPE_AUTOCLICK: + case extensions::api::accessibility_private::AssistiveTechnologyType:: + kAutoClick: at_type = ax::mojom::AssistiveTechnologyType::kAutoClick; break; - case extensions::api::accessibility_private:: - ASSISTIVE_TECHNOLOGY_TYPE_MAGNIFIER: + case extensions::api::accessibility_private::AssistiveTechnologyType:: + kMagnifier: at_type = ax::mojom::AssistiveTechnologyType::kMagnifier; break; - case extensions::api::accessibility_private:: - ASSISTIVE_TECHNOLOGY_TYPE_DICTATION: + case extensions::api::accessibility_private::AssistiveTechnologyType:: + kDictation: at_type = ax::mojom::AssistiveTechnologyType::kDictation; break; } @@ -596,28 +582,29 @@ } switch (focus_ring_info.type) { - case accessibility_private::FOCUS_TYPE_SOLID: + case accessibility_private::FocusType::kSolid: focus_ring->type = ash::FocusRingType::SOLID; break; - case accessibility_private::FOCUS_TYPE_DASHED: + case accessibility_private::FocusType::kDashed: focus_ring->type = ash::FocusRingType::DASHED; break; - case accessibility_private::FOCUS_TYPE_GLOW: + case accessibility_private::FocusType::kGlow: focus_ring->type = ash::FocusRingType::GLOW; break; default: NOTREACHED(); } - if (focus_ring_info.stacking_order) { + if (focus_ring_info.stacking_order != + accessibility_private::FocusRingStackingOrder::kNone) { switch (focus_ring_info.stacking_order) { - case accessibility_private:: - FOCUS_RING_STACKING_ORDER_ABOVEACCESSIBILITYBUBBLES: + case accessibility_private::FocusRingStackingOrder:: + kAboveAccessibilityBubbles: focus_ring->stacking_order = ash::FocusRingStackingOrder::ABOVE_ACCESSIBILITY_BUBBLES; break; - case accessibility_private:: - FOCUS_RING_STACKING_ORDER_BELOWACCESSIBILITYBUBBLES: + case accessibility_private::FocusRingStackingOrder:: + kBelowAccessibilityBubbles: focus_ring->stacking_order = ash::FocusRingStackingOrder::BELOW_ACCESSIBILITY_BUBBLES; break; @@ -736,8 +723,7 @@ extensions::api::accessibility_private:: SetNativeChromeVoxArcSupportForCurrentApp::Results::Create( extensions::api::accessibility_private:: - SetNativeChromeVoxResponse:: - SET_NATIVE_CHROME_VOX_RESPONSE_FAILURE))); + SetNativeChromeVoxResponse::kFailure))); } void AccessibilityPrivateSetNativeChromeVoxArcSupportForCurrentAppFunction:: @@ -758,13 +744,13 @@ accessibility_private::PointScanState params_state = params->state; switch (params_state) { - case accessibility_private::PointScanState::POINT_SCAN_STATE_START: + case accessibility_private::PointScanState::kStart: ash::AccessibilityController::Get()->StartPointScan(); break; - case accessibility_private::PointScanState::POINT_SCAN_STATE_STOP: + case accessibility_private::PointScanState::kStop: ash::AccessibilityController::Get()->StopPointScan(); break; - case accessibility_private::PointScanState::POINT_SCAN_STATE_NONE: + case accessibility_private::PointScanState::kNone: break; } @@ -779,17 +765,14 @@ accessibility_private::SelectToSpeakState params_state = params->state; ash::SelectToSpeakState state; switch (params_state) { - case accessibility_private::SelectToSpeakState:: - SELECT_TO_SPEAK_STATE_SELECTING: + case accessibility_private::SelectToSpeakState::kSelecting: state = ash::SelectToSpeakState::kSelectToSpeakStateSelecting; break; - case accessibility_private::SelectToSpeakState:: - SELECT_TO_SPEAK_STATE_SPEAKING: + case accessibility_private::SelectToSpeakState::kSpeaking: state = ash::SelectToSpeakState::kSelectToSpeakStateSpeaking; break; - case accessibility_private::SelectToSpeakState:: - SELECT_TO_SPEAK_STATE_INACTIVE: - case accessibility_private::SelectToSpeakState::SELECT_TO_SPEAK_STATE_NONE: + case accessibility_private::SelectToSpeakState::kInactive: + case accessibility_private::SelectToSpeakState::kNone: state = ash::SelectToSpeakState::kSelectToSpeakStateInactive; } @@ -888,24 +871,19 @@ // Extract the icon type. ash::DictationBubbleIconType icon = ash::DictationBubbleIconType::kHidden; switch (properties.icon) { - case accessibility_private::DictationBubbleIconType:: - DICTATION_BUBBLE_ICON_TYPE_HIDDEN: + case accessibility_private::DictationBubbleIconType::kHidden: icon = ash::DictationBubbleIconType::kHidden; break; - case accessibility_private::DictationBubbleIconType:: - DICTATION_BUBBLE_ICON_TYPE_STANDBY: + case accessibility_private::DictationBubbleIconType::kStandby: icon = ash::DictationBubbleIconType::kStandby; break; - case accessibility_private::DictationBubbleIconType:: - DICTATION_BUBBLE_ICON_TYPE_MACROSUCCESS: + case accessibility_private::DictationBubbleIconType::kMacroSuccess: icon = ash::DictationBubbleIconType::kMacroSuccess; break; - case accessibility_private::DictationBubbleIconType:: - DICTATION_BUBBLE_ICON_TYPE_MACROFAIL: + case accessibility_private::DictationBubbleIconType::kMacroFail: icon = ash::DictationBubbleIconType::kMacroFail; break; - case accessibility_private::DictationBubbleIconType:: - DICTATION_BUBBLE_ICON_TYPE_NONE: + case accessibility_private::DictationBubbleIconType::kNone: NOTREACHED(); break; } @@ -970,10 +948,10 @@ if (!params->show) { if (params->bubble == - accessibility_private::SWITCH_ACCESS_BUBBLE_BACKBUTTON) { + accessibility_private::SwitchAccessBubble::kBackButton) { ash::AccessibilityController::Get()->HideSwitchAccessBackButton(); } else if (params->bubble == - accessibility_private::SWITCH_ACCESS_BUBBLE_MENU) { + accessibility_private::SwitchAccessBubble::kMenu) { ash::AccessibilityController::Get()->HideSwitchAccessMenu(); } return RespondNow(NoArguments()); @@ -987,7 +965,7 @@ params->anchor->width, params->anchor->height); if (params->bubble == - accessibility_private::SWITCH_ACCESS_BUBBLE_BACKBUTTON) { + accessibility_private::SwitchAccessBubble::kBackButton) { ash::AccessibilityController::Get()->ShowSwitchAccessBackButton(anchor); return RespondNow(NoArguments()); }
diff --git a/chrome/browser/ash/accessibility/accessibility_event_rewriter_delegate_impl.cc b/chrome/browser/ash/accessibility/accessibility_event_rewriter_delegate_impl.cc index 53159d3..08ca56f7 100644 --- a/chrome/browser/ash/accessibility/accessibility_event_rewriter_delegate_impl.cc +++ b/chrome/browser/ash/accessibility/accessibility_event_rewriter_delegate_impl.cc
@@ -28,14 +28,14 @@ switch (command) { case SwitchAccessCommand::kSelect: return extensions::api::accessibility_private::ToString( - extensions::api::accessibility_private::SWITCH_ACCESS_COMMAND_SELECT); + extensions::api::accessibility_private::SwitchAccessCommand::kSelect); case SwitchAccessCommand::kNext: return extensions::api::accessibility_private::ToString( - extensions::api::accessibility_private::SWITCH_ACCESS_COMMAND_NEXT); + extensions::api::accessibility_private::SwitchAccessCommand::kNext); case SwitchAccessCommand::kPrevious: return extensions::api::accessibility_private::ToString( - extensions::api::accessibility_private:: - SWITCH_ACCESS_COMMAND_PREVIOUS); + extensions::api::accessibility_private::SwitchAccessCommand:: + kPrevious); case SwitchAccessCommand::kNone: NOTREACHED(); return ""; @@ -46,19 +46,19 @@ switch (command) { case MagnifierCommand::kMoveStop: return extensions::api::accessibility_private::ToString( - extensions::api::accessibility_private::MAGNIFIER_COMMAND_MOVESTOP); + extensions::api::accessibility_private::MagnifierCommand::kMoveStop); case MagnifierCommand::kMoveUp: return extensions::api::accessibility_private::ToString( - extensions::api::accessibility_private::MAGNIFIER_COMMAND_MOVEUP); + extensions::api::accessibility_private::MagnifierCommand::kMoveUp); case MagnifierCommand::kMoveDown: return extensions::api::accessibility_private::ToString( - extensions::api::accessibility_private::MAGNIFIER_COMMAND_MOVEDOWN); + extensions::api::accessibility_private::MagnifierCommand::kMoveDown); case MagnifierCommand::kMoveLeft: return extensions::api::accessibility_private::ToString( - extensions::api::accessibility_private::MAGNIFIER_COMMAND_MOVELEFT); + extensions::api::accessibility_private::MagnifierCommand::kMoveLeft); case MagnifierCommand::kMoveRight: return extensions::api::accessibility_private::ToString( - extensions::api::accessibility_private::MAGNIFIER_COMMAND_MOVERIGHT); + extensions::api::accessibility_private::MagnifierCommand::kMoveRight); } return "";
diff --git a/chrome/browser/ash/accessibility/accessibility_manager.cc b/chrome/browser/ash/accessibility/accessibility_manager.cc index 69fffe4..b79fe68 100644 --- a/chrome/browser/ash/accessibility/accessibility_manager.cc +++ b/chrome/browser/ash/accessibility/accessibility_manager.cc
@@ -189,36 +189,36 @@ switch (action) { case SelectToSpeakPanelAction::kPreviousSentence: return extensions::api::accessibility_private::ToString( - extensions::api::accessibility_private:: - SELECT_TO_SPEAK_PANEL_ACTION_PREVIOUSSENTENCE); + extensions::api::accessibility_private::SelectToSpeakPanelAction:: + kPreviousSentence); case SelectToSpeakPanelAction::kPreviousParagraph: return extensions::api::accessibility_private::ToString( - extensions::api::accessibility_private:: - SELECT_TO_SPEAK_PANEL_ACTION_PREVIOUSPARAGRAPH); + extensions::api::accessibility_private::SelectToSpeakPanelAction:: + kPreviousParagraph); case SelectToSpeakPanelAction::kPause: return extensions::api::accessibility_private::ToString( - extensions::api::accessibility_private:: - SELECT_TO_SPEAK_PANEL_ACTION_PAUSE); + extensions::api::accessibility_private::SelectToSpeakPanelAction:: + kPause); case SelectToSpeakPanelAction::kResume: return extensions::api::accessibility_private::ToString( - extensions::api::accessibility_private:: - SELECT_TO_SPEAK_PANEL_ACTION_RESUME); + extensions::api::accessibility_private::SelectToSpeakPanelAction:: + kResume); case SelectToSpeakPanelAction::kNextSentence: return extensions::api::accessibility_private::ToString( - extensions::api::accessibility_private:: - SELECT_TO_SPEAK_PANEL_ACTION_NEXTSENTENCE); + extensions::api::accessibility_private::SelectToSpeakPanelAction:: + kNextSentence); case SelectToSpeakPanelAction::kNextParagraph: return extensions::api::accessibility_private::ToString( - extensions::api::accessibility_private:: - SELECT_TO_SPEAK_PANEL_ACTION_NEXTPARAGRAPH); + extensions::api::accessibility_private::SelectToSpeakPanelAction:: + kNextParagraph); case SelectToSpeakPanelAction::kChangeSpeed: return extensions::api::accessibility_private::ToString( - extensions::api::accessibility_private:: - SELECT_TO_SPEAK_PANEL_ACTION_CHANGESPEED); + extensions::api::accessibility_private::SelectToSpeakPanelAction:: + kChangeSpeed); case SelectToSpeakPanelAction::kExit: return extensions::api::accessibility_private::ToString( - extensions::api::accessibility_private:: - SELECT_TO_SPEAK_PANEL_ACTION_EXIT); + extensions::api::accessibility_private::SelectToSpeakPanelAction:: + kExit); case SelectToSpeakPanelAction::kNone: NOTREACHED(); return ""; @@ -2354,18 +2354,18 @@ switch (type) { case ui::EventType::ET_MOUSE_PRESSED: event_type = extensions::api::accessibility_private:: - SyntheticMouseEventType::SYNTHETIC_MOUSE_EVENT_TYPE_PRESS; + SyntheticMouseEventType::kPress; break; case ui::EventType::ET_MOUSE_RELEASED: event_type = extensions::api::accessibility_private:: - SyntheticMouseEventType::SYNTHETIC_MOUSE_EVENT_TYPE_RELEASE; + SyntheticMouseEventType::kRelease; break; case ui::EventType::ET_MOUSE_MOVED: case ui::EventType::ET_MOUSE_ENTERED: case ui::EventType::ET_MOUSE_EXITED: case ui::EventType::ET_MOUSE_DRAGGED: event_type = extensions::api::accessibility_private:: - SyntheticMouseEventType::SYNTHETIC_MOUSE_EVENT_TYPE_MOVE; + SyntheticMouseEventType::kMove; break; case ui::EventType::ET_MOUSEWHEEL: // Mouse wheel not handled. @@ -2715,39 +2715,23 @@ // DLCs. static constexpr auto kTtsDlcTypeToLocale = base::MakeFixedFlatMap<DlcType, const char*>( - {{DlcType::DLC_TYPE_TTSBNBD, "bn-bd"}, - {DlcType::DLC_TYPE_TTSCSCZ, "cs-cz"}, - {DlcType::DLC_TYPE_TTSDADK, "da-dk"}, - {DlcType::DLC_TYPE_TTSDEDE, "de-de"}, - {DlcType::DLC_TYPE_TTSELGR, "el-gr"}, - {DlcType::DLC_TYPE_TTSENAU, "en-au"}, - {DlcType::DLC_TYPE_TTSENGB, "en-gb"}, - {DlcType::DLC_TYPE_TTSENUS, "en-us"}, - {DlcType::DLC_TYPE_TTSESES, "es-es"}, - {DlcType::DLC_TYPE_TTSESUS, "es-us"}, - {DlcType::DLC_TYPE_TTSFIFI, "fi-fi"}, - {DlcType::DLC_TYPE_TTSFILPH, "fil-ph"}, - {DlcType::DLC_TYPE_TTSFRFR, "fr-fr"}, - {DlcType::DLC_TYPE_TTSHIIN, "hi-in"}, - {DlcType::DLC_TYPE_TTSHUHU, "hu-hu"}, - {DlcType::DLC_TYPE_TTSIDID, "id-id"}, - {DlcType::DLC_TYPE_TTSITIT, "it-it"}, - {DlcType::DLC_TYPE_TTSJAJP, "ja-jp"}, - {DlcType::DLC_TYPE_TTSKMKH, "km-kh"}, - {DlcType::DLC_TYPE_TTSKOKR, "ko-kr"}, - {DlcType::DLC_TYPE_TTSNBNO, "nb-no"}, - {DlcType::DLC_TYPE_TTSNENP, "ne-np"}, - {DlcType::DLC_TYPE_TTSNLNL, "nl-nl"}, - {DlcType::DLC_TYPE_TTSPLPL, "pl-pl"}, - {DlcType::DLC_TYPE_TTSPTBR, "pt-br"}, - {DlcType::DLC_TYPE_TTSSILK, "si-lk"}, - {DlcType::DLC_TYPE_TTSSKSK, "sk-sk"}, - {DlcType::DLC_TYPE_TTSSVSE, "sv-se"}, - {DlcType::DLC_TYPE_TTSTHTH, "th-th"}, - {DlcType::DLC_TYPE_TTSTRTR, "tr-tr"}, - {DlcType::DLC_TYPE_TTSUKUA, "uk-ua"}, - {DlcType::DLC_TYPE_TTSVIVN, "vi-vn"}, - {DlcType::DLC_TYPE_TTSYUEHK, "yue-hk"}}); + {{DlcType::kTtsBnBd, "bn-bd"}, {DlcType::kTtsCsCz, "cs-cz"}, + {DlcType::kTtsDaDk, "da-dk"}, {DlcType::kTtsDeDe, "de-de"}, + {DlcType::kTtsElGr, "el-gr"}, {DlcType::kTtsEnAu, "en-au"}, + {DlcType::kTtsEnGb, "en-gb"}, {DlcType::kTtsEnUs, "en-us"}, + {DlcType::kTtsEsEs, "es-es"}, {DlcType::kTtsEsUs, "es-us"}, + {DlcType::kTtsFiFi, "fi-fi"}, {DlcType::kTtsFilPh, "fil-ph"}, + {DlcType::kTtsFrFr, "fr-fr"}, {DlcType::kTtsHiIn, "hi-in"}, + {DlcType::kTtsHuHu, "hu-hu"}, {DlcType::kTtsIdId, "id-id"}, + {DlcType::kTtsItIt, "it-it"}, {DlcType::kTtsJaJp, "ja-jp"}, + {DlcType::kTtsKmKh, "km-kh"}, {DlcType::kTtsKoKr, "ko-kr"}, + {DlcType::kTtsNbNo, "nb-no"}, {DlcType::kTtsNeNp, "ne-np"}, + {DlcType::kTtsNlNl, "nl-nl"}, {DlcType::kTtsPlPl, "pl-pl"}, + {DlcType::kTtsPtBr, "pt-br"}, {DlcType::kTtsSiLk, "si-lk"}, + {DlcType::kTtsSkSk, "sk-sk"}, {DlcType::kTtsSvSe, "sv-se"}, + {DlcType::kTtsThTh, "th-th"}, {DlcType::kTtsTrTr, "tr-tr"}, + {DlcType::kTtsUkUa, "uk-ua"}, {DlcType::kTtsViVn, "vi-vn"}, + {DlcType::kTtsYueHk, "yue-hk"}}); // Use LanguagePackManager to get the path of the DLC. std::string locale = kTtsDlcTypeToLocale.find(dlc)->second;
diff --git a/chrome/browser/ash/arc/accessibility/arc_accessibility_tree_tracker.cc b/chrome/browser/ash/arc/accessibility/arc_accessibility_tree_tracker.cc index 41e289c..a9fa03a 100644 --- a/chrome/browser/ash/arc/accessibility/arc_accessibility_tree_tracker.cc +++ b/chrome/browser/ash/arc/accessibility/arc_accessibility_tree_tracker.cc
@@ -125,22 +125,19 @@ ax::android::mojom::SetNativeChromeVoxResponse response) { switch (response) { case ax::android::mojom::SetNativeChromeVoxResponse::SUCCESS: - return SetNativeChromeVoxResponse::SET_NATIVE_CHROME_VOX_RESPONSE_SUCCESS; + return SetNativeChromeVoxResponse::kSuccess; case ax::android::mojom::SetNativeChromeVoxResponse::TALKBACK_NOT_INSTALLED: - return SetNativeChromeVoxResponse:: - SET_NATIVE_CHROME_VOX_RESPONSE_TALKBACKNOTINSTALLED; + return SetNativeChromeVoxResponse::kTalkbackNotInstalled; case ax::android::mojom::SetNativeChromeVoxResponse::WINDOW_NOT_FOUND: - return SetNativeChromeVoxResponse:: - SET_NATIVE_CHROME_VOX_RESPONSE_WINDOWNOTFOUND; + return SetNativeChromeVoxResponse::kWindowNotFound; case ax::android::mojom::SetNativeChromeVoxResponse::FAILURE: - return SetNativeChromeVoxResponse::SET_NATIVE_CHROME_VOX_RESPONSE_FAILURE; + return SetNativeChromeVoxResponse::kFailure; case ax::android::mojom::SetNativeChromeVoxResponse:: NEED_DEPRECATION_CONFIRMATION: - return SetNativeChromeVoxResponse:: - SET_NATIVE_CHROME_VOX_RESPONSE_NEEDDEPRECATIONCONFIRMATION; + return SetNativeChromeVoxResponse::kNeedDeprecationConfirmation; case ax::android::mojom::SetNativeChromeVoxResponse::INVALID_ENUM_VALUE: NOTREACHED(); - return SetNativeChromeVoxResponse::SET_NATIVE_CHROME_VOX_RESPONSE_FAILURE; + return SetNativeChromeVoxResponse::kFailure; } } @@ -773,14 +770,12 @@ SetNativeChromeVoxCallback callback) { aura::Window* window = GetFocusedArcWindow(); if (!window) { - std::move(callback).Run( - SetNativeChromeVoxResponse::SET_NATIVE_CHROME_VOX_RESPONSE_FAILURE); + std::move(callback).Run(SetNativeChromeVoxResponse::kFailure); return; } if (!GetWindowTaskId(window).has_value()) { - std::move(callback).Run( - SetNativeChromeVoxResponse::SET_NATIVE_CHROME_VOX_RESPONSE_FAILURE); + std::move(callback).Run(SetNativeChromeVoxResponse::kFailure); return; }
diff --git a/chrome/browser/ash/crosapi/browser_data_back_migrator.h b/chrome/browser/ash/crosapi/browser_data_back_migrator.h index 9e705346..1fa36616 100644 --- a/chrome/browser/ash/crosapi/browser_data_back_migrator.h +++ b/chrome/browser/ash/crosapi/browser_data_back_migrator.h
@@ -157,6 +157,8 @@ FRIEND_TEST_ALL_PREFIXES(BrowserDataBackMigratorFilesSetupTest, MovesLacrosItemsToAshDirCorrectly); FRIEND_TEST_ALL_PREFIXES(BrowserDataBackMigratorTest, + MovesMergedItemsBackToAshCorrectly); + FRIEND_TEST_ALL_PREFIXES(BrowserDataBackMigratorTest, MergesAshOnlyPreferencesCorrectly); FRIEND_TEST_ALL_PREFIXES(BrowserDataBackMigratorTest, MergesDictSplitPreferencesCorrectly);
diff --git a/chrome/browser/ash/crosapi/browser_data_back_migrator_unittest.cc b/chrome/browser/ash/crosapi/browser_data_back_migrator_unittest.cc index 1f41b8f..a1baebd 100644 --- a/chrome/browser/ash/crosapi/browser_data_back_migrator_unittest.cc +++ b/chrome/browser/ash/crosapi/browser_data_back_migrator_unittest.cc
@@ -729,8 +729,7 @@ } } -TEST_F(BrowserDataBackMigratorTest, - MergesAshOnlyPreferencesCorrectly) { +TEST_F(BrowserDataBackMigratorTest, MergesAshOnlyPreferencesCorrectly) { // AshPrefs // { // kOtherAshPreference: kAshPrefValue, @@ -775,8 +774,7 @@ ASSERT_EQ(merged_other_ash_pref->GetInt(), kAshPrefValue); } -TEST_F(BrowserDataBackMigratorTest, - MergesDictSplitPreferencesCorrectly) { +TEST_F(BrowserDataBackMigratorTest, MergesDictSplitPreferencesCorrectly) { // AshPrefs // { // browser_data_migrator_util::kSplitPreferencesKeys[0]: { @@ -853,8 +851,7 @@ ASSERT_EQ(lacros_extension_value->GetInt(), kLacrosPrefValue); } -TEST_F(BrowserDataBackMigratorTest, - MergesListSplitPreferencesCorrectly) { +TEST_F(BrowserDataBackMigratorTest, MergesListSplitPreferencesCorrectly) { // AshPrefs // { // browser_data_migrator_util::kSplitPreferencesKeys[0]: [ @@ -920,8 +917,7 @@ ASSERT_EQ(CountStringInList(*split_pref_list, kLacrosOnlyExtensionId), 1u); } -TEST_F(BrowserDataBackMigratorTest, - MergesLacrosPreferencesCorrectly) { +TEST_F(BrowserDataBackMigratorTest, MergesLacrosPreferencesCorrectly) { // AshPrefs // { // kOtherAshPreference: kAshPrefValue, @@ -1085,6 +1081,42 @@ browser_data_migrator_util::kExtensionsFilePath))); } +TEST_F(BrowserDataBackMigratorTest, MovesMergedItemsBackToAshCorrectly) { + CreateTemporaryDirectory(); + // Generate merged Local Storage leveldb. + const base::FilePath tmp_local_storage_leveldb_path = + tmp_profile_dir_.Append(browser_data_migrator_util::kLocalStorageFilePath) + .Append(browser_data_migrator_util::kLocalStorageLeveldbName); + std::map<std::string, std::string> merged_level_db_contents; + merged_level_db_contents["VERSION"] = "1"; + GenerateLevelDB(tmp_local_storage_leveldb_path, merged_level_db_contents); + // Generate merged preferences. + base::Value::Dict merged_prefs; + merged_prefs.SetByDottedPath( + browser_data_migrator_util::kAshOnlyPreferencesKeys[0], kAshPrefValue); + ASSERT_TRUE(WriteJSONDict(merged_prefs, tmp_prefs_path_)); + + const auto result = + BrowserDataBackMigrator::MoveMergedItemsBackToAsh(ash_profile_dir_); + + ASSERT_EQ(result.status, BrowserDataBackMigrator::TaskStatus::kSucceeded); + // Verify that there is a level db in the ash dir with the right contents. + const base::FilePath ash_local_storage_leveldb_path = + ash_profile_dir_.Append(browser_data_migrator_util::kLocalStorageFilePath) + .Append(browser_data_migrator_util::kLocalStorageLeveldbName); + auto ash_level_db = ReadLevelDB(ash_local_storage_leveldb_path); + EXPECT_EQ(ash_level_db["VERSION"], "1"); + EXPECT_EQ(ash_level_db.size(), 1u); + // Verify that there is a pref file in the ash dir with the right contents. + base::Value ash_prefs; + EXPECT_TRUE(ReadJSON(ash_prefs_path_, &ash_prefs)); + const base::Value::Dict& ash_prefs_dict = ash_prefs.GetDict(); + EXPECT_EQ(ash_prefs_dict.size(), 1u); + const base::Value* ash_pref = ash_prefs_dict.FindByDottedPath( + browser_data_migrator_util::kAshOnlyPreferencesKeys[0]); + EXPECT_EQ(ash_pref->GetInt(), kAshPrefValue); +} + namespace { // This implementation of RAII for LacrosDataBackwardMigrationMode is intended
diff --git a/chrome/browser/ash/login/screens/cryptohome_recovery_setup_screen_browsertest.cc b/chrome/browser/ash/login/screens/cryptohome_recovery_setup_screen_browsertest.cc index 78a3acb..8e2a2ec7 100644 --- a/chrome/browser/ash/login/screens/cryptohome_recovery_setup_screen_browsertest.cc +++ b/chrome/browser/ash/login/screens/cryptohome_recovery_setup_screen_browsertest.cc
@@ -11,6 +11,7 @@ #include "ash/constants/ash_pref_names.h" #include "ash/public/cpp/test/shell_test_api.h" #include "base/run_loop.h" +#include "base/time/time.h" #include "chrome/browser/ash/login/quick_unlock/quick_unlock_utils.h" #include "chrome/browser/ash/login/screen_manager.h" #include "chrome/browser/ash/login/test/cryptohome_mixin.h" @@ -24,6 +25,7 @@ #include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/ui/webui/ash/login/cryptohome_recovery_setup_screen_handler.h" #include "chrome/browser/ui/webui/ash/login/user_creation_screen_handler.h" +#include "chromeos/ash/components/cryptohome/constants.h" #include "chromeos/ash/components/osauth/public/auth_session_storage.h" #include "content/public/test/browser_test.h" #include "testing/gmock/include/gmock/gmock.h" @@ -86,7 +88,8 @@ auto session_ids = cryptohome_.AddSession(user_context->GetAccountId(), /*authenticated=*/true); user_context->SetAuthSessionIds(session_ids.first, session_ids.second); - + user_context->SetSessionLifetime(base::Time::Now() + + cryptohome::kAuthsessionInitialLifetime); if (ash::features::ShouldUseAuthSessionStorage()) { context->extra_factors_token = ash::AuthSessionStorage::Get()->Store(std::move(user_context));
diff --git a/chrome/browser/ash/login/screens/osauth/DIR_METADATA b/chrome/browser/ash/login/screens/osauth/DIR_METADATA new file mode 100644 index 0000000..88df346 --- /dev/null +++ b/chrome/browser/ash/login/screens/osauth/DIR_METADATA
@@ -0,0 +1 @@ +mixins: "//ash/login/LOGIN_LOCK_METADATA"
diff --git a/chrome/browser/ash/login/screens/osauth/OWNERS b/chrome/browser/ash/login/screens/osauth/OWNERS new file mode 100644 index 0000000..20e41d6 --- /dev/null +++ b/chrome/browser/ash/login/screens/osauth/OWNERS
@@ -0,0 +1 @@ +file://ash/login/LOGIN_LOCK_OWNERS
diff --git a/chrome/browser/ash/login/screens/pin_setup_screen_browsertest.cc b/chrome/browser/ash/login/screens/pin_setup_screen_browsertest.cc index 39d73fd..c62cfed9 100644 --- a/chrome/browser/ash/login/screens/pin_setup_screen_browsertest.cc +++ b/chrome/browser/ash/login/screens/pin_setup_screen_browsertest.cc
@@ -23,6 +23,7 @@ #include "chrome/browser/ash/login/wizard_controller.h" #include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/ui/webui/ash/login/pin_setup_screen_handler.h" +#include "chromeos/ash/components/cryptohome/constants.h" #include "chromeos/ash/components/dbus/userdataauth/fake_userdataauth_client.h" #include "chromeos/ash/components/osauth/public/auth_session_storage.h" #include "components/user_manager/user_type.h" @@ -101,6 +102,8 @@ auto session_ids = cryptohome_.AddSession(context->GetAccountId(), /*authenticated=*/true); context->SetAuthSessionIds(session_ids.first, session_ids.second); + context->SetSessionLifetime(base::Time::Now() + + cryptohome::kAuthsessionInitialLifetime); if (ash::features::ShouldUseAuthSessionStorage()) { ash::AuthSessionStorage::Get()->Return( wizard_context->extra_factors_token.value(), std::move(context)); @@ -143,10 +146,12 @@ if (ash::features::ShouldUseAuthSessionStorage()) { std::unique_ptr<UserContext> context = std::make_unique<UserContext>(); context->SetAuthSessionIds("fake-session-id", "broadcast"); - auto token = ash::AuthSessionStorage::Get()->Store(std::move(context)); + context->SetSessionLifetime(base::Time::Now() + + cryptohome::kAuthsessionInitialLifetime); LoginDisplayHost::default_host() ->GetWizardContextForTesting() - ->extra_factors_token = token; + ->extra_factors_token = + ash::AuthSessionStorage::Get()->Store(std::move(context)); } else { LoginDisplayHost::default_host() ->GetWizardContextForTesting()
diff --git a/chrome/browser/ash/login/screens/recovery_eligibility_screen_browsertest.cc b/chrome/browser/ash/login/screens/recovery_eligibility_screen_browsertest.cc index 0880c32..db50a66 100644 --- a/chrome/browser/ash/login/screens/recovery_eligibility_screen_browsertest.cc +++ b/chrome/browser/ash/login/screens/recovery_eligibility_screen_browsertest.cc
@@ -27,6 +27,7 @@ #include "chrome/browser/ui/webui/ash/login/recovery_eligibility_screen_handler.h" #include "chrome/browser/ui/webui/ash/login/user_creation_screen_handler.h" #include "chrome/test/base/fake_gaia_mixin.h" +#include "chromeos/ash/components/cryptohome/constants.h" #include "chromeos/ash/components/osauth/public/auth_session_storage.h" #include "components/prefs/pref_service.h" #include "content/public/test/browser_test.h" @@ -96,6 +97,8 @@ auto session_ids = cryptohome_.AddSession(user_context->GetAccountId(), /*authenticated=*/true); user_context->SetAuthSessionIds(session_ids.first, session_ids.second); + user_context->SetSessionLifetime(base::Time::Now() + + cryptohome::kAuthsessionInitialLifetime); if (ash::features::ShouldUseAuthSessionStorage()) { context->extra_factors_token = ash::AuthSessionStorage::Get()->Store(std::move(user_context));
diff --git a/chrome/browser/ash/policy/remote_commands/device_command_fetch_support_packet_job.cc b/chrome/browser/ash/policy/remote_commands/device_command_fetch_support_packet_job.cc index 50d90b226..59d87b6f 100644 --- a/chrome/browser/ash/policy/remote_commands/device_command_fetch_support_packet_job.cc +++ b/chrome/browser/ash/policy/remote_commands/device_command_fetch_support_packet_job.cc
@@ -66,6 +66,9 @@ constexpr char kContentTypeJson[] = "application/json"; constexpr char kFilenameKey[] = "Filename"; +// JSON key that's used in command result payload. +constexpr char kResultKey[] = "result"; + std::set<support_tool::DataCollectorType> GetDataCollectorTypes( const base::Value::List& requested_data_collectors) { std::set<support_tool::DataCollectorType> data_collectors; @@ -155,6 +158,15 @@ return base::StringPrintf("%s\n%s", json.c_str(), kContentTypeJson); } +std::string GetCommandResultPayload( + policy::EnterpriseFetchSupportPacketFailureType result_enum) { + base::Value::Dict json; + json.Set(kResultKey, static_cast<int>(result_enum)); + std::string result_payload; + base::JSONWriter::Write(json, &result_payload); + return result_payload; +} + } // namespace namespace policy { @@ -306,11 +318,14 @@ base::UmaHistogramEnumeration(kFetchSupportPacketFailureHistogramName, EnterpriseFetchSupportPacketFailureType:: kFailedOnCommandEnabledForUserCheck); - SYSLOG(ERROR) << kCommandNotEnabledForUserMessage; + SYSLOG(ERROR) + << "FETCH_SUPPORT_PACKET command is not enabled for this user type."; base::SequencedTaskRunner::GetCurrentDefault()->PostTask( FROM_HERE, - base::BindOnce(std::move(result_callback_), ResultType::kFailure, - kCommandNotEnabledForUserMessage)); + base::BindOnce( + std::move(result_callback_), ResultType::kFailure, + GetCommandResultPayload(EnterpriseFetchSupportPacketFailureType:: + kFailedOnCommandEnabledForUserCheck))); return; } @@ -362,12 +377,13 @@ base::UmaHistogramEnumeration(kFetchSupportPacketFailureHistogramName, EnterpriseFetchSupportPacketFailureType:: kFailedOnExportingSupportPacket); - std::string error_message = - base::StrCat({"The device couldn't export the collected data " - "into local storage: ", - export_error->error_message}); - SYSLOG(ERROR) << error_message; - std::move(result_callback_).Run(ResultType::kFailure, error_message); + SYSLOG(ERROR) << "The device couldn't export the collected data " + "into local storage: " + << export_error->error_message; + std::move(result_callback_) + .Run(ResultType::kFailure, + GetCommandResultPayload(EnterpriseFetchSupportPacketFailureType:: + kFailedOnExportingSupportPacket)); return; } @@ -425,14 +441,15 @@ return; } - std::string error_message = base::StrCat( - {"Couldn't enqueue event to reporting queue: ", status.error_message()}); - base::UmaHistogramEnumeration( kFetchSupportPacketFailureHistogramName, EnterpriseFetchSupportPacketFailureType::kFailedOnEnqueueingEvent); - SYSLOG(ERROR) << error_message; - std::move(result_callback_).Run(ResultType::kFailure, error_message); + SYSLOG(ERROR) << "Couldn't enqueue event to reporting queue: " + << status.error_message(); + std::move(result_callback_) + .Run(ResultType::kFailure, + GetCommandResultPayload(EnterpriseFetchSupportPacketFailureType:: + kFailedOnEnqueueingEvent)); } } // namespace policy
diff --git a/chrome/browser/ash/policy/remote_commands/device_command_fetch_support_packet_job_unittest.cc b/chrome/browser/ash/policy/remote_commands/device_command_fetch_support_packet_job_unittest.cc index ba3f53eb..e76dd56a 100644 --- a/chrome/browser/ash/policy/remote_commands/device_command_fetch_support_packet_job_unittest.cc +++ b/chrome/browser/ash/policy/remote_commands/device_command_fetch_support_packet_job_unittest.cc
@@ -200,6 +200,10 @@ } TEST_F(DeviceCommandFetchSupportPacketTest, FailForNonKioskDevice) { + // The expected result payload for when the command fails because of not being + // supported on the active session type. + constexpr char kExpectedResultPayload[] = R"({"result":2})"; + // Set LoginState as non-kiosk device. ash::LoginState::Get()->SetLoggedInState( ash::LoginState::LoggedInState::LOGGED_IN_ACTIVE, @@ -225,7 +229,7 @@ ASSERT_TRUE(job_finished_future.Wait()) << "Job did not finish."; // Expect the job to fail for non-kiosk device. EXPECT_EQ(job->status(), RemoteCommandJob::FAILED); - EXPECT_EQ(*job->GetResultPayload(), kCommandNotEnabledForUserMessage); + EXPECT_EQ(*job->GetResultPayload(), kExpectedResultPayload); histogram_tester_.ExpectUniqueSample(kFetchSupportPacketFailureHistogramName, EnterpriseFetchSupportPacketFailureType:: kFailedOnCommandEnabledForUserCheck,
diff --git a/chrome/browser/devtools/BUILD.gn b/chrome/browser/devtools/BUILD.gn index 71e6ebd..e4cc4963 100644 --- a/chrome/browser/devtools/BUILD.gn +++ b/chrome/browser/devtools/BUILD.gn
@@ -170,6 +170,9 @@ if (is_chromeos_ash) { deps += [ "//ash/constants" ] } + if (is_chromeos_ash || is_chromeos_lacros) { + deps += [ "//components/metrics/structured:structured_events" ] + } sources += [ "chrome_devtools_manager_delegate.cc", "chrome_devtools_manager_delegate.h",
diff --git a/chrome/browser/devtools/devtools_ui_bindings.cc b/chrome/browser/devtools/devtools_ui_bindings.cc index 0996959..adf2228 100644 --- a/chrome/browser/devtools/devtools_ui_bindings.cc +++ b/chrome/browser/devtools/devtools_ui_bindings.cc
@@ -30,6 +30,7 @@ #include "base/uuid.h" #include "base/values.h" #include "build/build_config.h" +#include "chrome/browser/browser_features.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/devtools/devtools_file_watcher.h" #include "chrome/browser/devtools/devtools_window.h" @@ -49,6 +50,9 @@ #include "chrome/common/pref_names.h" #include "chrome/common/url_constants.h" #include "components/infobars/content/content_infobar_manager.h" +#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS) +#include "components/metrics/structured/structured_events.h" +#endif #include "components/prefs/scoped_user_pref_update.h" #include "components/signin/public/identity_manager/account_info.h" #include "components/signin/public/identity_manager/identity_manager.h" @@ -661,7 +665,8 @@ delegate_(new DefaultBindingsDelegate(web_contents_)), devices_updates_enabled_(false), frontend_loaded_(false), - settings_(profile_) { + settings_(profile_), + last_action_time_(base::TimeTicks::Now()) { DevToolsUIBindings::GetDevToolsUIBindings().push_back(this); frontend_contents_observer_ = std::make_unique<FrontendWebContentsObserver>(this); @@ -1407,10 +1412,70 @@ base::RecordComputedAction(name); } -void DevToolsUIBindings::RecordImpression(const ImpressionEvent& event) {} -void DevToolsUIBindings::RecordClick(const ClickEvent& event) {} -void DevToolsUIBindings::RecordChange(const ChangeEvent& event) {} -void DevToolsUIBindings::RecordKeyDown(const KeyDownEvent& event) {} +base::TimeDelta DevToolsUIBindings::GetTimeSinceLastAction() { + base::TimeTicks now = base::TimeTicks::Now(); + base::TimeDelta time_since_last_action = (now - last_action_time_); + last_action_time_ = now; + return time_since_last_action; +} + +void DevToolsUIBindings::RecordImpression(const ImpressionEvent& event) { + if (!base::FeatureList::IsEnabled(::features::kDevToolsVeLogging)) { + return; + } +#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS) + for (const auto& ve : event.impressions) { + metrics::structured::events::v2::dev_tools::Impression() + .SetVeId(ve.id) + .SetVeType(ve.type) + .SetVeParent(ve.parent) + .SetVeContext(ve.context) + .SetTimeSinceLastAction(GetTimeSinceLastAction().InMilliseconds()) + .Record(); + } +#endif +} + +void DevToolsUIBindings::RecordClick(const ClickEvent& event) { + if (!base::FeatureList::IsEnabled(::features::kDevToolsVeLogging)) { + return; + } +#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS) + metrics::structured::events::v2::dev_tools::Click() + .SetVeId(event.veid) + .SetMouseButton(event.mouse_button) + .SetContext(event.context) + .SetTimeSinceLastAction(GetTimeSinceLastAction().InMilliseconds()) + .Record(); +#endif +} + +void DevToolsUIBindings::RecordChange(const ChangeEvent& event) { + if (!base::FeatureList::IsEnabled(::features::kDevToolsVeLogging)) { + return; + } +#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS) + metrics::structured::events::v2::dev_tools::Change() + .SetVeId(event.veid) + .SetContext(event.context) + .SetTimeSinceLastAction(GetTimeSinceLastAction().InMilliseconds()) + .Record(); +#endif +} + +void DevToolsUIBindings::RecordKeyDown(const KeyDownEvent& event) { + if (!base::FeatureList::IsEnabled(::features::kDevToolsVeLogging)) { + return; + } +#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS) + metrics::structured::events::v2::dev_tools::KeyDown() + .SetVeId(event.veid) + .SetContext(event.context) + .SetTimeSinceLastAction(GetTimeSinceLastAction().InMilliseconds()) + .Record(); +#endif +} + void DevToolsUIBindings::SendJsonRequest(DispatchCallback callback, const std::string& browser_id, const std::string& url) {
diff --git a/chrome/browser/devtools/devtools_ui_bindings.h b/chrome/browser/devtools/devtools_ui_bindings.h index afab2f49..ef98a83 100644 --- a/chrome/browser/devtools/devtools_ui_bindings.h +++ b/chrome/browser/devtools/devtools_ui_bindings.h
@@ -263,6 +263,7 @@ const std::vector<std::string>& file_paths); void ShowDevToolsInfoBar(const std::u16string& message, DevToolsInfoBarDelegate::Callback callback); + base::TimeDelta GetTimeSinceLastAction(); // Extensions support. void AddDevToolsExtensionsToClient(); @@ -308,6 +309,7 @@ std::string initial_target_id_; DevToolsSettings settings_; + base::TimeTicks last_action_time_; #if defined(AIDA_SCOPE) std::unique_ptr<AidaClient> aida_client_;
diff --git a/chrome/browser/download/internal/android/java/src/org/chromium/chrome/browser/download/home/list/holder/OfflineItemViewHolder.java b/chrome/browser/download/internal/android/java/src/org/chromium/chrome/browser/download/home/list/holder/OfflineItemViewHolder.java index f6b1baf..0bbfbcf 100644 --- a/chrome/browser/download/internal/android/java/src/org/chromium/chrome/browser/download/home/list/holder/OfflineItemViewHolder.java +++ b/chrome/browser/download/internal/android/java/src/org/chromium/chrome/browser/download/home/list/holder/OfflineItemViewHolder.java
@@ -23,12 +23,12 @@ import org.chromium.chrome.browser.download.internal.R; import org.chromium.components.browser_ui.widget.BrowserUiListMenuUtils; import org.chromium.components.browser_ui.widget.async_image.AsyncImageView; -import org.chromium.components.browser_ui.widget.listmenu.ListMenu; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButton; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButtonDelegate; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuItemProperties; import org.chromium.components.offline_items_collection.OfflineItem; import org.chromium.components.offline_items_collection.OfflineItemVisuals; +import org.chromium.ui.listmenu.ListMenu; +import org.chromium.ui.listmenu.ListMenuButton; +import org.chromium.ui.listmenu.ListMenuButtonDelegate; +import org.chromium.ui.listmenu.ListMenuItemProperties; import org.chromium.ui.modelutil.MVCListAdapter.ModelList; import org.chromium.ui.modelutil.PropertyModel;
diff --git a/chrome/browser/extensions/api/quick_unlock_private/quick_unlock_private_api_unittest.cc b/chrome/browser/extensions/api/quick_unlock_private/quick_unlock_private_api_unittest.cc index 0318f85..7c19ae3 100644 --- a/chrome/browser/extensions/api/quick_unlock_private/quick_unlock_private_api_unittest.cc +++ b/chrome/browser/extensions/api/quick_unlock_private/quick_unlock_private_api_unittest.cc
@@ -24,6 +24,7 @@ #include "base/test/metrics/histogram_tester.h" #include "base/test/scoped_feature_list.h" #include "base/test/test_future.h" +#include "base/time/time.h" #include "chrome/browser/ash/login/quick_unlock/auth_token.h" #include "chrome/browser/ash/login/quick_unlock/pin_backend.h" #include "chrome/browser/ash/login/quick_unlock/pin_storage_prefs.h" @@ -252,6 +253,8 @@ // Generate an auth token. auth_token_user_context_.SetAccountId(test_account); auth_token_user_context_.SetUserIDHash(kTestUserEmailHash); + auth_token_user_context_.SetSessionLifetime( + base::Time::Now() + ash::quick_unlock::AuthToken::kTokenExpiration); if (std::get<0>(GetParam()) == TestType::kCryptohome) { auto* fake_userdataauth_client_testapi = ash::FakeUserDataAuthClient::TestApi::Get();
diff --git a/chrome/browser/feed/android/java/res/layout/new_tab_page_feed_v2_expandable_header.xml b/chrome/browser/feed/android/java/res/layout/new_tab_page_feed_v2_expandable_header.xml index ee1283c..31f70ed 100644 --- a/chrome/browser/feed/android/java/res/layout/new_tab_page_feed_v2_expandable_header.xml +++ b/chrome/browser/feed/android/java/res/layout/new_tab_page_feed_v2_expandable_header.xml
@@ -33,7 +33,7 @@ android:textAppearance="@style/TextAppearance.HeaderTitle" android:textDirection="locale" /> - <org.chromium.components.browser_ui.widget.listmenu.ListMenuButton + <org.chromium.ui.listmenu.ListMenuButton android:id="@+id/header_menu" android:layout_width="@dimen/feed_v2_header_menu_width" android:layout_height="@dimen/snippets_article_header_menu_size"
diff --git a/chrome/browser/feed/android/java/res/layout/new_tab_page_multi_feed_header.xml b/chrome/browser/feed/android/java/res/layout/new_tab_page_multi_feed_header.xml index 483e954..febb918f 100644 --- a/chrome/browser/feed/android/java/res/layout/new_tab_page_multi_feed_header.xml +++ b/chrome/browser/feed/android/java/res/layout/new_tab_page_multi_feed_header.xml
@@ -60,7 +60,7 @@ android:visibility="gone" /> </FrameLayout> - <org.chromium.components.browser_ui.widget.listmenu.ListMenuButton + <org.chromium.ui.listmenu.ListMenuButton android:id="@+id/header_menu" android:layout_width="@dimen/feed_header_icon_size" android:layout_height="@dimen/snippets_article_header_menu_size"
diff --git a/chrome/browser/feed/android/java/res/layout/new_tab_page_multi_sticky_feed_header.xml b/chrome/browser/feed/android/java/res/layout/new_tab_page_multi_sticky_feed_header.xml index ef116d1..86e83f5 100644 --- a/chrome/browser/feed/android/java/res/layout/new_tab_page_multi_sticky_feed_header.xml +++ b/chrome/browser/feed/android/java/res/layout/new_tab_page_multi_sticky_feed_header.xml
@@ -60,7 +60,7 @@ android:textAppearance="@style/TextAppearance.HeaderTitle" android:visibility="gone" /> - <org.chromium.components.browser_ui.widget.listmenu.ListMenuButton + <org.chromium.ui.listmenu.ListMenuButton android:id="@+id/header_menu" android:layout_width="@dimen/feed_header_icon_size" android:layout_height="@dimen/snippets_article_header_menu_size"
diff --git a/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/sections/SectionHeaderListProperties.java b/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/sections/SectionHeaderListProperties.java index 354f0d6..06dabbb 100644 --- a/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/sections/SectionHeaderListProperties.java +++ b/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/sections/SectionHeaderListProperties.java
@@ -8,7 +8,7 @@ import androidx.annotation.Px; -import org.chromium.components.browser_ui.widget.listmenu.ListMenu; +import org.chromium.ui.listmenu.ListMenu; import org.chromium.ui.modelutil.MVCListAdapter; import org.chromium.ui.modelutil.PropertyKey; import org.chromium.ui.modelutil.PropertyListModel;
diff --git a/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/sections/SectionHeaderView.java b/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/sections/SectionHeaderView.java index 95e6c37..b6c7b0d 100644 --- a/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/sections/SectionHeaderView.java +++ b/chrome/browser/feed/android/java/src/org/chromium/chrome/browser/feed/sections/SectionHeaderView.java
@@ -34,12 +34,12 @@ import org.chromium.components.browser_ui.widget.highlight.PulseDrawable; import org.chromium.components.browser_ui.widget.highlight.ViewHighlighter.HighlightParams; import org.chromium.components.browser_ui.widget.highlight.ViewHighlighter.HighlightShape; -import org.chromium.components.browser_ui.widget.listmenu.BasicListMenu; -import org.chromium.components.browser_ui.widget.listmenu.ListMenu; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButton; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButtonDelegate; import org.chromium.components.feature_engagement.FeatureConstants; import org.chromium.ui.base.DeviceFormFactor; +import org.chromium.ui.listmenu.BasicListMenu; +import org.chromium.ui.listmenu.ListMenu; +import org.chromium.ui.listmenu.ListMenuButton; +import org.chromium.ui.listmenu.ListMenuButtonDelegate; import org.chromium.ui.modelutil.MVCListAdapter.ModelList; import org.chromium.ui.widget.RectProvider; import org.chromium.ui.widget.ViewRectProvider;
diff --git a/chrome/browser/feedback/android/family_info_feedback_source_unittest.cc b/chrome/browser/feedback/android/family_info_feedback_source_unittest.cc index 2006d655..1f66f93 100644 --- a/chrome/browser/feedback/android/family_info_feedback_source_unittest.cc +++ b/chrome/browser/feedback/android/family_info_feedback_source_unittest.cc
@@ -27,6 +27,7 @@ #include "components/supervised_user/core/browser/proto_fetcher.h" #include "components/supervised_user/core/browser/supervised_user_service.h" #include "components/supervised_user/core/browser/supervised_user_url_filter.h" +#include "components/supervised_user/core/common/supervised_user_utils.h" #include "content/public/test/browser_task_environment.h" #include "google_apis/gaia/google_service_auth_error.h" #include "testing/gtest/include/gtest/gtest.h" @@ -59,8 +60,7 @@ // TODO(b/280772872): Integrate AsyncURLChecker to test // supervised_user::SupervisedUserURLFilter::WebFilterType::kTryToBlockMatureSites. class FamilyInfoFeedbackSourceForChildFilterBehaviorTest - : public testing::TestWithParam< - supervised_user::SupervisedUserURLFilter::FilteringBehavior> { + : public testing::TestWithParam<supervised_user::FilteringBehavior> { public: FamilyInfoFeedbackSourceForChildFilterBehaviorTest() : env_(base::android::AttachCurrentThread()) {} @@ -156,10 +156,10 @@ // Don't put logic in tests, test explicit values. switch (GetParam()) { - case (supervised_user::SupervisedUserURLFilter::FilteringBehavior::BLOCK): + case (supervised_user::FilteringBehavior::kBlock): EXPECT_EQ("allow_certain_sites", expected_feedback_value); break; - case (supervised_user::SupervisedUserURLFilter::FilteringBehavior::ALLOW): + case (supervised_user::FilteringBehavior::kAllow): EXPECT_EQ("allow_all_sites", expected_feedback_value); break; default: @@ -171,9 +171,8 @@ INSTANTIATE_TEST_SUITE_P( FilterBehaviourContainer, FamilyInfoFeedbackSourceForChildFilterBehaviorTest, - ::testing::Values( - supervised_user::SupervisedUserURLFilter::FilteringBehavior::BLOCK, - supervised_user::SupervisedUserURLFilter::FilteringBehavior::ALLOW)); + ::testing::Values(supervised_user::FilteringBehavior::kBlock, + supervised_user::FilteringBehavior::kAllow)); class FamilyInfoFeedbackSourceTest : public testing::TestWithParam<kids_chrome_management::FamilyRole> { @@ -284,7 +283,7 @@ // Set some filtering behavior for the user, as ListFamilyMembers // will try to obtain this along with the family role (and crush otherwise). supervised_user_service_->GetURLFilter()->SetDefaultFilteringBehavior( - supervised_user::SupervisedUserURLFilter::FilteringBehavior::ALLOW); + supervised_user::FilteringBehavior::kAllow); } base::WeakPtr<FamilyInfoFeedbackSource> feedback_source =
diff --git a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc index adbc96e4..81f6bf79 100644 --- a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc +++ b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc
@@ -2265,7 +2265,8 @@ PermissionDecisionAutoBlockerFactory::GetForProfile( Profile::FromBrowserContext(profile())) ->RecordDismissAndEmbargo( - origin.GetURL(), ContentSettingsType::FILE_SYSTEM_WRITE_GUARD, false); + origin.GetURL(), + ContentSettingsType::FILE_SYSTEM_ACCESS_RESTORE_PERMISSION, false); UpdateGrantsOnRestorePermissionNotAllowed(origin); } @@ -2274,7 +2275,8 @@ PermissionDecisionAutoBlockerFactory::GetForProfile( Profile::FromBrowserContext(profile())) ->RecordIgnoreAndEmbargo( - origin.GetURL(), ContentSettingsType::FILE_SYSTEM_WRITE_GUARD, false); + origin.GetURL(), + ContentSettingsType::FILE_SYSTEM_ACCESS_RESTORE_PERMISSION, false); UpdateGrantsOnRestorePermissionNotAllowed(origin); } @@ -2353,8 +2355,9 @@ const bool origin_is_embargoed = PermissionDecisionAutoBlockerFactory::GetForProfile( Profile::FromBrowserContext(profile())) - ->IsEmbargoed(origin.GetURL(), - ContentSettingsType::FILE_SYSTEM_WRITE_GUARD); + ->IsEmbargoed( + origin.GetURL(), + ContentSettingsType::FILE_SYSTEM_ACCESS_RESTORE_PERMISSION); if (origin_is_embargoed) { return false; }
diff --git a/chrome/browser/file_system_access/chrome_file_system_access_permission_context_unittest.cc b/chrome/browser/file_system_access/chrome_file_system_access_permission_context_unittest.cc index 4f4c175a..5468816 100644 --- a/chrome/browser/file_system_access/chrome_file_system_access_permission_context_unittest.cc +++ b/chrome/browser/file_system_access/chrome_file_system_access_permission_context_unittest.cc
@@ -1523,8 +1523,9 @@ auto origin_is_embargoed = PermissionDecisionAutoBlockerFactory::GetForProfile( Profile::FromBrowserContext(profile())) - ->IsEmbargoed(kTestOrigin.GetURL(), - ContentSettingsType::FILE_SYSTEM_WRITE_GUARD); + ->IsEmbargoed( + kTestOrigin.GetURL(), + ContentSettingsType::FILE_SYSTEM_ACCESS_RESTORE_PERMISSION); EXPECT_FALSE(origin_is_embargoed); // Check that the origin is placed under embargo after being ignored @@ -1536,8 +1537,9 @@ auto origin_is_embargoed_updated = PermissionDecisionAutoBlockerFactory::GetForProfile( Profile::FromBrowserContext(profile())) - ->IsEmbargoed(kTestOrigin.GetURL(), - ContentSettingsType::FILE_SYSTEM_WRITE_GUARD); + ->IsEmbargoed( + kTestOrigin.GetURL(), + ContentSettingsType::FILE_SYSTEM_ACCESS_RESTORE_PERMISSION); EXPECT_FALSE(origin_is_embargoed_updated); // The origin is embargoed, after reaching the ignore limit set by // `kDefaultDismissalsBeforeBlock`. @@ -1546,8 +1548,9 @@ auto origin_is_embargoed_after_rejection_limit = PermissionDecisionAutoBlockerFactory::GetForProfile( Profile::FromBrowserContext(profile())) - ->IsEmbargoed(kTestOrigin.GetURL(), - ContentSettingsType::FILE_SYSTEM_WRITE_GUARD); + ->IsEmbargoed( + kTestOrigin.GetURL(), + ContentSettingsType::FILE_SYSTEM_ACCESS_RESTORE_PERMISSION); EXPECT_TRUE(origin_is_embargoed_after_rejection_limit); } @@ -1699,8 +1702,9 @@ auto origin_is_embargoed = PermissionDecisionAutoBlockerFactory::GetForProfile( Profile::FromBrowserContext(profile())) - ->IsEmbargoed(kTestOrigin.GetURL(), - ContentSettingsType::FILE_SYSTEM_WRITE_GUARD); + ->IsEmbargoed( + kTestOrigin.GetURL(), + ContentSettingsType::FILE_SYSTEM_ACCESS_RESTORE_PERMISSION); EXPECT_FALSE(origin_is_embargoed); // The origin is placed under embargo after being ignored @@ -1714,8 +1718,9 @@ auto origin_is_embargoed_updated = PermissionDecisionAutoBlockerFactory::GetForProfile( Profile::FromBrowserContext(profile())) - ->IsEmbargoed(kTestOrigin.GetURL(), - ContentSettingsType::FILE_SYSTEM_WRITE_GUARD); + ->IsEmbargoed( + kTestOrigin.GetURL(), + ContentSettingsType::FILE_SYSTEM_ACCESS_RESTORE_PERMISSION); EXPECT_FALSE(origin_is_embargoed_updated); // The origin is embargoed, after reaching the ignore limit set by @@ -1725,8 +1730,9 @@ auto origin_is_embargoed_after_ignore_limit = PermissionDecisionAutoBlockerFactory::GetForProfile( Profile::FromBrowserContext(profile())) - ->IsEmbargoed(kTestOrigin.GetURL(), - ContentSettingsType::FILE_SYSTEM_WRITE_GUARD); + ->IsEmbargoed( + kTestOrigin.GetURL(), + ContentSettingsType::FILE_SYSTEM_ACCESS_RESTORE_PERMISSION); EXPECT_TRUE(origin_is_embargoed_after_ignore_limit); }
diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json index 6da0b43..c15b073 100644 --- a/chrome/browser/flag-metadata.json +++ b/chrome/browser/flag-metadata.json
@@ -5544,6 +5544,11 @@ "expiry_milestone": 130 }, { + "name": "ntp-realbox-cr23-expanded-state-layout", + "owners": [ "niharm@google.com", "mahmadi@google.com"], + "expiry_milestone": 130 + }, + { "name": "ntp-realbox-is-tall", "owners": [ "tiborg@chromium.org", "mahmadi@chromium.org" ], "expiry_milestone": 130
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc index a7e9114f..7fcd305 100644 --- a/chrome/browser/flag_descriptions.cc +++ b/chrome/browser/flag_descriptions.cc
@@ -2758,11 +2758,6 @@ "of the scroller size and the default scroll animation is replaced with " "Impulse-style scroll animations."; -const char kPermissionChipName[] = "Permissions Chip Experiment"; -const char kPermissionChipDescription[] = - "Enables an experimental permission prompt that uses a chip in the location" - " bar."; - const char kImprovedSemanticsActivityIndicatorsName[] = "Improved semantics activity indicators"; const char kImprovedSemanticsActivityIndicatorsDescription[] = @@ -4911,6 +4906,11 @@ "CR23 Icons, AiS and Pedal backgrounds, CR23 entity rounded corner radii " "in Realbox expanded state"; +const char kNtpRealboxCr23ExpandedStateLayoutName[] = + "Realbox Chrome Refresh Expanded State Layout"; +const char kNtpRealboxCr23ExpandedStateLayoutDescription[] = + "CR23 layout for Realbox in expanded state"; + const char kNtpRealboxMatchSearchboxThemeName[] = "NTP Realbox Matches Searchbox Theme"; const char kNtpRealboxMatchSearchboxThemeDescription[] =
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h index 0f2c3ca..546b2bf 100644 --- a/chrome/browser/flag_descriptions.h +++ b/chrome/browser/flag_descriptions.h
@@ -1602,9 +1602,6 @@ extern const char kWindowsScrollingPersonalityName[]; extern const char kWindowsScrollingPersonalityDescription[]; -extern const char kPermissionChipName[]; -extern const char kPermissionChipDescription[]; - extern const char kImprovedSemanticsActivityIndicatorsName[]; extern const char kImprovedSemanticsActivityIndicatorsDescription[]; @@ -2853,6 +2850,9 @@ extern const char kNtpRealboxCr23ExpandedStateIconsName[]; extern const char kNtpRealboxCr23ExpandedStateIconsDescription[]; +extern const char kNtpRealboxCr23ExpandedStateLayoutName[]; +extern const char kNtpRealboxCr23ExpandedStateLayoutDescription[]; + extern const char kNtpRealboxMatchSearchboxThemeName[]; extern const char kNtpRealboxMatchSearchboxThemeDescription[];
diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browser/flags/android/chrome_feature_list.cc index a4907d3..d200b09f 100644 --- a/chrome/browser/flags/android/chrome_feature_list.cc +++ b/chrome/browser/flags/android/chrome_feature_list.cc
@@ -1139,7 +1139,7 @@ BASE_FEATURE(kStartSurfaceRefactor, "StartSurfaceRefactor", - base::FEATURE_DISABLED_BY_DEFAULT); + base::FEATURE_ENABLED_BY_DEFAULT); BASE_FEATURE(kStartSurfaceDisabledFeedImprovement, "StartSurfaceDisabledFeedImprovement",
diff --git a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java index 09ff31c9..c97caae 100644 --- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java +++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/ChromeFeatureList.java
@@ -618,7 +618,7 @@ public static final CachedFlag sStartSurfaceOnTablet = new CachedFlag(START_SURFACE_ON_TABLET, true); public static final CachedFlag sStartSurfaceRefactor = - new CachedFlag(START_SURFACE_REFACTOR, false); + new CachedFlag(START_SURFACE_REFACTOR, true); public static final CachedFlag sStartSurfaceReturnTime = new CachedFlag(START_SURFACE_RETURN_TIME, false); public static final CachedFlag sAccountReauthenticationRecentTimeWindow =
diff --git a/chrome/browser/hub/android/java/src/org/chromium/chrome/browser/hub/Pane.java b/chrome/browser/hub/android/java/src/org/chromium/chrome/browser/hub/Pane.java index 04a11eec..9694e9b 100644 --- a/chrome/browser/hub/android/java/src/org/chromium/chrome/browser/hub/Pane.java +++ b/chrome/browser/hub/android/java/src/org/chromium/chrome/browser/hub/Pane.java
@@ -16,6 +16,10 @@ * A base interface representing a UI that will be displayed as a Pane in the Hub. */ public interface Pane extends BackPressHandler { + /** Returns the {@link PaneId} corresponding to this Pane. */ + @PaneId + int getPaneId(); + /** Returns the {@link View} containing the contents of the Pane. */ View getRootView();
diff --git a/chrome/browser/hub/internal/BUILD.gn b/chrome/browser/hub/internal/BUILD.gn index cef6bd1..12422c25 100644 --- a/chrome/browser/hub/internal/BUILD.gn +++ b/chrome/browser/hub/internal/BUILD.gn
@@ -29,6 +29,7 @@ "android/java/src/org/chromium/chrome/browser/hub/HubToolbarProperties.java", "android/java/src/org/chromium/chrome/browser/hub/HubToolbarView.java", "android/java/src/org/chromium/chrome/browser/hub/HubToolbarViewBinder.java", + "android/java/src/org/chromium/chrome/browser/hub/PaneBackStackHandler.java", "android/java/src/org/chromium/chrome/browser/hub/PaneManagerImpl.java", "android/java/src/org/chromium/chrome/browser/hub/ResourceButtonData.java", "android/java/src/org/chromium/chrome/browser/hub/ShrinkExpandHubLayoutAnimationFactory.java", @@ -96,6 +97,7 @@ "android/java/src/org/chromium/chrome/browser/hub/HubManagerImplUnitTest.java", "android/java/src/org/chromium/chrome/browser/hub/HubPaneHostMediatorUnitTest.java", "android/java/src/org/chromium/chrome/browser/hub/HubPaneHostViewUnitTest.java", + "android/java/src/org/chromium/chrome/browser/hub/PaneBackStackHandlerUnitTest.java", "android/java/src/org/chromium/chrome/browser/hub/PaneManagerImplUnitTest.java", "android/java/src/org/chromium/chrome/browser/hub/ResourceButtonDataUnitTest.java", "android/java/src/org/chromium/chrome/browser/hub/ShrinkExpandHubLayoutAnimatorProviderUnitTest.java",
diff --git a/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubCoordinator.java b/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubCoordinator.java index 7a6c9b95..818398d 100644 --- a/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubCoordinator.java +++ b/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubCoordinator.java
@@ -9,18 +9,21 @@ import android.view.View; import android.widget.FrameLayout; -import org.chromium.base.supplier.ObservableSupplier; +import androidx.annotation.NonNull; -/** - * Root coordinator of the Hub. - * - * <p>TODO(crbug/1487315): This is a stub implementation make it display the Hub UI. - */ -public class HubCoordinator { - private final FrameLayout mContainerView; - private final View mMainHubParent; - private final HubToolbarCoordinator mHubToolbarCoordinator; - private final HubPaneHostCoordinator mHubPaneHostCoordinator; +import org.chromium.base.supplier.ObservableSupplier; +import org.chromium.base.supplier.ObservableSupplierImpl; +import org.chromium.components.browser_ui.widget.gesture.BackPressHandler; +import org.chromium.components.browser_ui.widget.gesture.BackPressHandler.BackPressResult; + +/** Root coordinator of the Hub. */ +public class HubCoordinator implements BackPressHandler { + private final @NonNull FrameLayout mContainerView; + private final @NonNull View mMainHubParent; + private final @NonNull HubToolbarCoordinator mHubToolbarCoordinator; + private final @NonNull HubPaneHostCoordinator mHubPaneHostCoordinator; + private final @NonNull ObservableSupplierImpl<Boolean> mHandleBackPressSupplier; + private final @NonNull PaneBackStackHandler mPaneBackStackHandler; /** * Creates the {@link HubCoordinator}. @@ -28,7 +31,7 @@ * @param containerView The view to attach the Hub to. * @param paneSupplier Used to observe the current pane. */ - public HubCoordinator(FrameLayout containerView, ObservableSupplier<Pane> paneSupplier) { + public HubCoordinator(@NonNull FrameLayout containerView, @NonNull PaneManager paneManager) { Context context = containerView.getContext(); mContainerView = containerView; mMainHubParent = LayoutInflater.from(context).inflate(R.layout.hub_layout, null); @@ -38,7 +41,15 @@ mHubToolbarCoordinator = new HubToolbarCoordinator(hubToolbarView); HubPaneHostView hubPaneHostView = mContainerView.findViewById(R.id.hub_pane_host); - mHubPaneHostCoordinator = new HubPaneHostCoordinator(hubPaneHostView, paneSupplier); + mHubPaneHostCoordinator = + new HubPaneHostCoordinator(hubPaneHostView, paneManager.getFocusedPaneSupplier()); + + mHandleBackPressSupplier = new ObservableSupplierImpl<>(); + mPaneBackStackHandler = new PaneBackStackHandler(paneManager); + mPaneBackStackHandler + .getHandleBackPressChangedSupplier() + .addObserver((handlesBackPress) -> updateHandleBackPressSupplier()); + updateHandleBackPressSupplier(); } /** Removes the hub from the layout tree and cleans up resources. */ @@ -47,4 +58,35 @@ mHubToolbarCoordinator.destroy(); mHubPaneHostCoordinator.destroy(); } + + @Override + public @BackPressResult int handleBackPress() { + // TODO(crbug/1498614): Add support here for in order of priority. + // 1) Delegate to the current Pane. + // 2) Delegate to PaneBackStackHandler. - DONE + // 3) No-op if Start Surface was the previous layout. It should be higher priority and + // already handle it, but add verification. + // 4) Hide the Hub to the most recent tab in the current TabModel. + if (mPaneBackStackHandler.handleBackPress() == BackPressResult.SUCCESS) { + return BackPressResult.SUCCESS; + } + return BackPressResult.FAILURE; + } + + @Override + public ObservableSupplier<Boolean> getHandleBackPressChangedSupplier() { + return mHandleBackPressSupplier; + } + + private void updateHandleBackPressSupplier() { + // TODO(crbug/1498614): See comment in handleBackPress. The conditions to check for each + // case are: + // 1) Whether the Pane's getHandleBackPressChangedSupplier is set. + // 2) Whether the PaneBackStackHandler getHandleBackPressChangeSupplier is set. - DONE + // 3) Whether Start Surface was the previous layout and we are not in incognito mode. + // 4) Whether the current TabModel has a selected tab. + boolean shouldHandleBackPress = + mPaneBackStackHandler.getHandleBackPressChangedSupplier().get(); + mHandleBackPressSupplier.set(shouldHandleBackPress); + } }
diff --git a/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubCoordinatorUnitTest.java b/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubCoordinatorUnitTest.java index b9c8082..2695563 100644 --- a/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubCoordinatorUnitTest.java +++ b/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubCoordinatorUnitTest.java
@@ -4,32 +4,59 @@ package org.chromium.chrome.browser.hub; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotEquals; +import static org.junit.Assert.assertTrue; +import static org.mockito.Mockito.when; + import android.widget.FrameLayout; import androidx.test.ext.junit.rules.ActivityScenarioRule; import androidx.test.filters.SmallTest; -import org.junit.Assert; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnit; +import org.mockito.junit.MockitoRule; +import org.robolectric.shadows.ShadowLooper; -import org.chromium.base.supplier.ObservableSupplierImpl; import org.chromium.base.test.BaseRobolectricTestRunner; +import org.chromium.components.browser_ui.widget.gesture.BackPressHandler.BackPressResult; import org.chromium.ui.base.TestActivity; /** Tests for {@link HubCoordinator}. */ @RunWith(BaseRobolectricTestRunner.class) public class HubCoordinatorUnitTest { - public @Rule ActivityScenarioRule<TestActivity> mActivityScenarioRule = + @Rule + public ActivityScenarioRule<TestActivity> mActivityScenarioRule = new ActivityScenarioRule<>(TestActivity.class); - private ObservableSupplierImpl<Pane> mPaneSupplier = new ObservableSupplierImpl<>(); + @Rule public MockitoRule mMockitoRule = MockitoJUnit.rule(); + + @Mock private Pane mTabSwitcherPane; + @Mock private Pane mIncognitoTabSwitcherPane; + + private PaneManager mPaneManager; private FrameLayout mRootView; @Before public void setUp() { + when(mTabSwitcherPane.getPaneId()).thenReturn(PaneId.TAB_SWITCHER); + when(mIncognitoTabSwitcherPane.getPaneId()).thenReturn(PaneId.INCOGNITO_TAB_SWITCHER); + + PaneListBuilder builder = + new PaneListBuilder(new DefaultPaneOrderController()) + .registerPane(PaneId.TAB_SWITCHER, () -> mTabSwitcherPane) + .registerPane( + PaneId.INCOGNITO_TAB_SWITCHER, () -> mIncognitoTabSwitcherPane); + mPaneManager = new PaneManagerImpl(builder); + assertTrue(mPaneManager.focusPane(PaneId.TAB_SWITCHER)); + assertEquals(mTabSwitcherPane, mPaneManager.getFocusedPaneSupplier().get()); + mActivityScenarioRule.getScenario().onActivity(this::onActivity); } @@ -41,10 +68,28 @@ @Test @SmallTest public void testCreateAndDestroy() { - HubCoordinator hubCoordinator = new HubCoordinator(mRootView, mPaneSupplier); + HubCoordinator hubCoordinator = new HubCoordinator(mRootView, mPaneManager); mRootView.getChildCount(); - Assert.assertNotEquals(0, mRootView.getChildCount()); + assertNotEquals(0, mRootView.getChildCount()); hubCoordinator.destroy(); - Assert.assertEquals(0, mRootView.getChildCount()); + assertEquals(0, mRootView.getChildCount()); + } + + @Test + @SmallTest + public void testBackNavigationBetweenPanes() { + HubCoordinator hubCoordinator = new HubCoordinator(mRootView, mPaneManager); + ShadowLooper.runUiThreadTasks(); + assertFalse(hubCoordinator.getHandleBackPressChangedSupplier().get()); + + assertTrue(mPaneManager.focusPane(PaneId.INCOGNITO_TAB_SWITCHER)); + assertEquals(mIncognitoTabSwitcherPane, mPaneManager.getFocusedPaneSupplier().get()); + assertTrue(hubCoordinator.getHandleBackPressChangedSupplier().get()); + + assertEquals(BackPressResult.SUCCESS, hubCoordinator.handleBackPress()); + assertEquals(mTabSwitcherPane, mPaneManager.getFocusedPaneSupplier().get()); + assertFalse(hubCoordinator.getHandleBackPressChangedSupplier().get()); + + hubCoordinator.destroy(); } }
diff --git a/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubManagerImpl.java b/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubManagerImpl.java index 9ea1d5e1..a0d8f4a 100644 --- a/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubManagerImpl.java +++ b/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/HubManagerImpl.java
@@ -76,8 +76,7 @@ private void ensureHubCoordinatorIsInitialized() { if (mHubCoordinator != null) return; - mHubCoordinator = - new HubCoordinator(mHubContainerView, mPaneManager.getFocusedPaneSupplier()); + mHubCoordinator = new HubCoordinator(mHubContainerView, mPaneManager); } HubCoordinator getHubCoordinatorForTesting() {
diff --git a/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/PaneBackStackHandler.java b/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/PaneBackStackHandler.java new file mode 100644 index 0000000..455215e7 --- /dev/null +++ b/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/PaneBackStackHandler.java
@@ -0,0 +1,95 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package org.chromium.chrome.browser.hub; + +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + +import org.chromium.base.supplier.ObservableSupplier; +import org.chromium.base.supplier.ObservableSupplierImpl; +import org.chromium.components.browser_ui.widget.gesture.BackPressHandler; +import org.chromium.components.browser_ui.widget.gesture.BackPressHandler.BackPressResult; + +import java.util.LinkedList; + +/** + * Manages back navigations between Panes. + * + * <p>The back navigation stack is a stack containing visited {@link Pane}s in most recently visited + * to least recently visited. The current {@link Pane} is not in the stack. When a pane is focused + * by any action other than back press, the previous {@link Pane} is added to the stack and the + * current {@link Pane} is removed from the stack. When a back press happens, the most recent (top + * of the stack) {@link Pane} is focused, but the previous {@link Pane} is not re-added to the stack + * to prevent an infinite loop. + */ +public class PaneBackStackHandler implements BackPressHandler { + private final @NonNull PaneManager mPaneManager; + private final @NonNull ObservableSupplierImpl<Boolean> mHandleBackPressSupplier; + private final @NonNull LinkedList<Pane> mBackStack; + private @Nullable Pane mCurrentPane; + + /** + * Handler for back navigations between Panes. + * + * @param paneManager The {@link PaneManager} of the Hub. + */ + public PaneBackStackHandler(@NonNull PaneManager paneManager) { + mPaneManager = paneManager; + mHandleBackPressSupplier = new ObservableSupplierImpl<>(); + mHandleBackPressSupplier.set(false); + + mBackStack = new LinkedList<>(); + paneManager.getFocusedPaneSupplier().addObserver(this::onPaneFocused); + } + + /** Resets the back stack. */ + public void reset() { + mHandleBackPressSupplier.set(false); + mBackStack.clear(); + } + + @Override + public @BackPressResult int handleBackPress() { + assert mHandleBackPressSupplier.get() + : "Handling back press when not accepting back presses."; + assert !mBackStack.isEmpty() + : "mBackStack should not be empty if handleBackPress is valid."; + + while (!mBackStack.isEmpty()) { + // Set mCurrentPane to null so it isn't re-added to mBackStack. + mCurrentPane = null; + Pane nextPane = mBackStack.removeFirst(); + + // In practice failing to focus and falling back should be rare or impossible; however, + // we handle the condition to ensure back handling doesn't break if this were to ever + // become commonplace. + if (!mPaneManager.focusPane(nextPane.getPaneId())) continue; + + if (mBackStack.isEmpty()) { + mHandleBackPressSupplier.set(false); + } + return BackPressResult.SUCCESS; + } + + // mBackStack was emptied without navigating. + mHandleBackPressSupplier.set(false); + return BackPressResult.FAILURE; + } + + @Override + public ObservableSupplier<Boolean> getHandleBackPressChangedSupplier() { + return mHandleBackPressSupplier; + } + + private void onPaneFocused(Pane pane) { + // `pane` is the newly focused pane. At this point mCurrentPane is the previous pane. + if (mCurrentPane != null) { + mBackStack.addFirst(mCurrentPane); + mHandleBackPressSupplier.set(true); + } + mCurrentPane = pane; + mBackStack.remove(pane); + } +}
diff --git a/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/PaneBackStackHandlerUnitTest.java b/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/PaneBackStackHandlerUnitTest.java new file mode 100644 index 0000000..605e1f39 --- /dev/null +++ b/chrome/browser/hub/internal/android/java/src/org/chromium/chrome/browser/hub/PaneBackStackHandlerUnitTest.java
@@ -0,0 +1,248 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package org.chromium.chrome.browser.hub; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +import androidx.test.filters.SmallTest; + +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mock; +import org.mockito.junit.MockitoJUnit; +import org.mockito.junit.MockitoRule; +import org.robolectric.shadows.ShadowLooper; + +import org.chromium.base.supplier.ObservableSupplierImpl; +import org.chromium.base.test.BaseRobolectricTestRunner; +import org.chromium.components.browser_ui.widget.gesture.BackPressHandler.BackPressResult; + +/** Tests for {@link PaneBackStackHandler}. */ +@RunWith(BaseRobolectricTestRunner.class) +public class PaneBackStackHandlerUnitTest { + public @Rule MockitoRule mMockitoRule = MockitoJUnit.rule(); + + @Mock private Pane mTabSwitcherPane; + @Mock private Pane mIncognitoTabSwitcherPane; + @Mock private Pane mBookmarksPane; + @Mock private PaneManager mMockPaneManager; + private ObservableSupplierImpl<Pane> mMockPaneManagerPaneSupplier = + new ObservableSupplierImpl<>(); + + private PaneManager mPaneManager; + private PaneBackStackHandler mBackStackHandler; + + @Before + public void setUp() { + when(mTabSwitcherPane.getPaneId()).thenReturn(PaneId.TAB_SWITCHER); + when(mIncognitoTabSwitcherPane.getPaneId()).thenReturn(PaneId.INCOGNITO_TAB_SWITCHER); + when(mBookmarksPane.getPaneId()).thenReturn(PaneId.BOOKMARKS); + + when(mMockPaneManager.getFocusedPaneSupplier()).thenReturn(mMockPaneManagerPaneSupplier); + + PaneListBuilder builder = + new PaneListBuilder(new DefaultPaneOrderController()) + .registerPane(PaneId.TAB_SWITCHER, () -> mTabSwitcherPane) + .registerPane( + PaneId.INCOGNITO_TAB_SWITCHER, () -> mIncognitoTabSwitcherPane) + .registerPane(PaneId.BOOKMARKS, () -> mBookmarksPane); + + mPaneManager = new PaneManagerImpl(builder); + mBackStackHandler = new PaneBackStackHandler(mPaneManager); + ShadowLooper.runUiThreadTasks(); + } + + @Test + @SmallTest + public void testReset() { + assertFalse(mBackStackHandler.getHandleBackPressChangedSupplier().get()); + + // Focus each of three panes. + assertTrue(mPaneManager.focusPane(PaneId.TAB_SWITCHER)); + assertFalse(mBackStackHandler.getHandleBackPressChangedSupplier().get()); + assertEquals(mTabSwitcherPane, mPaneManager.getFocusedPaneSupplier().get()); + + assertTrue(mPaneManager.focusPane(PaneId.BOOKMARKS)); + assertTrue(mBackStackHandler.getHandleBackPressChangedSupplier().get()); + assertEquals(mBookmarksPane, mPaneManager.getFocusedPaneSupplier().get()); + + assertTrue(mPaneManager.focusPane(PaneId.INCOGNITO_TAB_SWITCHER)); + assertTrue(mBackStackHandler.getHandleBackPressChangedSupplier().get()); + assertEquals(mIncognitoTabSwitcherPane, mPaneManager.getFocusedPaneSupplier().get()); + + // Reset. + mBackStackHandler.reset(); + assertFalse(mBackStackHandler.getHandleBackPressChangedSupplier().get()); + + // Ensure the focus tracking and back state still work. + assertTrue(mPaneManager.focusPane(PaneId.BOOKMARKS)); + assertTrue(mBackStackHandler.getHandleBackPressChangedSupplier().get()); + assertEquals(mBookmarksPane, mPaneManager.getFocusedPaneSupplier().get()); + + assertEquals(BackPressResult.SUCCESS, mBackStackHandler.handleBackPress()); + assertFalse(mBackStackHandler.getHandleBackPressChangedSupplier().get()); + assertEquals(mIncognitoTabSwitcherPane, mPaneManager.getFocusedPaneSupplier().get()); + } + + @Test + @SmallTest + public void testBackStack() { + assertFalse(mBackStackHandler.getHandleBackPressChangedSupplier().get()); + + // Focus each of three panes. + assertTrue(mPaneManager.focusPane(PaneId.TAB_SWITCHER)); + assertFalse(mBackStackHandler.getHandleBackPressChangedSupplier().get()); + assertEquals(mTabSwitcherPane, mPaneManager.getFocusedPaneSupplier().get()); + + assertTrue(mPaneManager.focusPane(PaneId.BOOKMARKS)); + assertTrue(mBackStackHandler.getHandleBackPressChangedSupplier().get()); + assertEquals(mBookmarksPane, mPaneManager.getFocusedPaneSupplier().get()); + + assertTrue(mPaneManager.focusPane(PaneId.INCOGNITO_TAB_SWITCHER)); + assertTrue(mBackStackHandler.getHandleBackPressChangedSupplier().get()); + assertEquals(mIncognitoTabSwitcherPane, mPaneManager.getFocusedPaneSupplier().get()); + + // Ensure back works for multiple steps. + assertEquals(BackPressResult.SUCCESS, mBackStackHandler.handleBackPress()); + assertTrue(mBackStackHandler.getHandleBackPressChangedSupplier().get()); + assertEquals(mBookmarksPane, mPaneManager.getFocusedPaneSupplier().get()); + + assertEquals(BackPressResult.SUCCESS, mBackStackHandler.handleBackPress()); + assertFalse(mBackStackHandler.getHandleBackPressChangedSupplier().get()); + assertEquals(mTabSwitcherPane, mPaneManager.getFocusedPaneSupplier().get()); + } + + @Test + @SmallTest + public void testRepeatedlyFocusSamePane() { + assertFalse(mBackStackHandler.getHandleBackPressChangedSupplier().get()); + + // Focus the first pane twice. + assertTrue(mPaneManager.focusPane(PaneId.TAB_SWITCHER)); + assertFalse(mBackStackHandler.getHandleBackPressChangedSupplier().get()); + assertEquals(mTabSwitcherPane, mPaneManager.getFocusedPaneSupplier().get()); + + assertTrue(mPaneManager.focusPane(PaneId.TAB_SWITCHER)); + assertFalse(mBackStackHandler.getHandleBackPressChangedSupplier().get()); + assertEquals(mTabSwitcherPane, mPaneManager.getFocusedPaneSupplier().get()); + + // Focus the second pane twice. + assertTrue(mPaneManager.focusPane(PaneId.BOOKMARKS)); + assertTrue(mBackStackHandler.getHandleBackPressChangedSupplier().get()); + assertEquals(mBookmarksPane, mPaneManager.getFocusedPaneSupplier().get()); + + assertTrue(mPaneManager.focusPane(PaneId.BOOKMARKS)); + assertTrue(mBackStackHandler.getHandleBackPressChangedSupplier().get()); + assertEquals(mBookmarksPane, mPaneManager.getFocusedPaneSupplier().get()); + + // Ensure the back stack still works. + assertEquals(BackPressResult.SUCCESS, mBackStackHandler.handleBackPress()); + assertFalse(mBackStackHandler.getHandleBackPressChangedSupplier().get()); + assertEquals(mTabSwitcherPane, mPaneManager.getFocusedPaneSupplier().get()); + } + + @Test + @SmallTest + public void testDeduplicatedOldEntries() { + assertFalse(mBackStackHandler.getHandleBackPressChangedSupplier().get()); + + // Focus tab switcher into bookmarks. + assertTrue(mPaneManager.focusPane(PaneId.TAB_SWITCHER)); + assertFalse(mBackStackHandler.getHandleBackPressChangedSupplier().get()); + assertEquals(mTabSwitcherPane, mPaneManager.getFocusedPaneSupplier().get()); + + assertTrue(mPaneManager.focusPane(PaneId.BOOKMARKS)); + assertTrue(mBackStackHandler.getHandleBackPressChangedSupplier().get()); + assertEquals(mBookmarksPane, mPaneManager.getFocusedPaneSupplier().get()); + + // Refocus tab switcher. + assertTrue(mPaneManager.focusPane(PaneId.TAB_SWITCHER)); + assertTrue(mBackStackHandler.getHandleBackPressChangedSupplier().get()); + assertEquals(mTabSwitcherPane, mPaneManager.getFocusedPaneSupplier().get()); + + // Ensure that going back works and there are no more entries. + assertEquals(BackPressResult.SUCCESS, mBackStackHandler.handleBackPress()); + assertFalse(mBackStackHandler.getHandleBackPressChangedSupplier().get()); + assertEquals(mBookmarksPane, mPaneManager.getFocusedPaneSupplier().get()); + } + + @Test + @SmallTest + public void testSkipOnFailToFocus() { + mBackStackHandler = new PaneBackStackHandler(mMockPaneManager); + ShadowLooper.runUiThreadTasks(); + assertFalse(mBackStackHandler.getHandleBackPressChangedSupplier().get()); + + // Mock focusing each of three panes. + mMockPaneManagerPaneSupplier.set(mTabSwitcherPane); + assertFalse(mBackStackHandler.getHandleBackPressChangedSupplier().get()); + + mMockPaneManagerPaneSupplier.set(mIncognitoTabSwitcherPane); + assertTrue(mBackStackHandler.getHandleBackPressChangedSupplier().get()); + + mMockPaneManagerPaneSupplier.set(mBookmarksPane); + assertTrue(mBackStackHandler.getHandleBackPressChangedSupplier().get()); + + // Fail to focus on the incognito pane so we go directly back to the tab switcher pane. + when(mMockPaneManager.focusPane(eq(PaneId.INCOGNITO_TAB_SWITCHER))).thenReturn(false); + when(mMockPaneManager.focusPane(eq(PaneId.TAB_SWITCHER))).thenReturn(true); + + assertEquals(BackPressResult.SUCCESS, mBackStackHandler.handleBackPress()); + assertFalse(mBackStackHandler.getHandleBackPressChangedSupplier().get()); + verify(mMockPaneManager).focusPane(eq(PaneId.INCOGNITO_TAB_SWITCHER)); + verify(mMockPaneManager).focusPane(eq(PaneId.TAB_SWITCHER)); + + // Ensure the back tracking still works. + mMockPaneManagerPaneSupplier.set(mTabSwitcherPane); + assertFalse(mBackStackHandler.getHandleBackPressChangedSupplier().get()); + + mMockPaneManagerPaneSupplier.set(mIncognitoTabSwitcherPane); + assertTrue(mBackStackHandler.getHandleBackPressChangedSupplier().get()); + + assertEquals(BackPressResult.SUCCESS, mBackStackHandler.handleBackPress()); + assertFalse(mBackStackHandler.getHandleBackPressChangedSupplier().get()); + } + + @Test + @SmallTest + public void testCompleltyFailToFocus() { + mBackStackHandler = new PaneBackStackHandler(mMockPaneManager); + ShadowLooper.runUiThreadTasks(); + assertFalse(mBackStackHandler.getHandleBackPressChangedSupplier().get()); + + // Mock focusing on tab switcher and bookmarks. + mMockPaneManagerPaneSupplier.set(mTabSwitcherPane); + assertFalse(mBackStackHandler.getHandleBackPressChangedSupplier().get()); + + mMockPaneManagerPaneSupplier.set(mBookmarksPane); + assertTrue(mBackStackHandler.getHandleBackPressChangedSupplier().get()); + + // Fail the transition back to tab switcher. + when(mMockPaneManager.focusPane(eq(PaneId.TAB_SWITCHER))).thenReturn(false); + + assertEquals(BackPressResult.FAILURE, mBackStackHandler.handleBackPress()); + assertFalse(mBackStackHandler.getHandleBackPressChangedSupplier().get()); + verify(mMockPaneManager).focusPane(eq(PaneId.TAB_SWITCHER)); + + // Ensure focus tracking continues to work. + when(mMockPaneManager.focusPane(eq(PaneId.TAB_SWITCHER))).thenReturn(true); + + mMockPaneManagerPaneSupplier.set(mTabSwitcherPane); + assertFalse(mBackStackHandler.getHandleBackPressChangedSupplier().get()); + + mMockPaneManagerPaneSupplier.set(mIncognitoTabSwitcherPane); + assertTrue(mBackStackHandler.getHandleBackPressChangedSupplier().get()); + + assertEquals(BackPressResult.SUCCESS, mBackStackHandler.handleBackPress()); + assertFalse(mBackStackHandler.getHandleBackPressChangedSupplier().get()); + } +}
diff --git a/chrome/browser/incognito/android/java/res/layout/incognito_reauth_view.xml b/chrome/browser/incognito/android/java/res/layout/incognito_reauth_view.xml index 3e8964f2..7eaae46 100644 --- a/chrome/browser/incognito/android/java/res/layout/incognito_reauth_view.xml +++ b/chrome/browser/incognito/android/java/res/layout/incognito_reauth_view.xml
@@ -14,7 +14,7 @@ android:layout_height="match_parent" android:background="@color/ntp_bg_incognito"> - <org.chromium.components.browser_ui.widget.listmenu.ListMenuButton + <org.chromium.ui.listmenu.ListMenuButton android:id="@+id/incognito_reauth_menu_button" android:layout_marginTop="24dp" android:background="@null"
diff --git a/chrome/browser/incognito/android/java/src/org/chromium/chrome/browser/incognito/reauth/FullScreenIncognitoReauthCoordinatorTest.java b/chrome/browser/incognito/android/java/src/org/chromium/chrome/browser/incognito/reauth/FullScreenIncognitoReauthCoordinatorTest.java index 35903803..13c2d7c 100644 --- a/chrome/browser/incognito/android/java/src/org/chromium/chrome/browser/incognito/reauth/FullScreenIncognitoReauthCoordinatorTest.java +++ b/chrome/browser/incognito/android/java/src/org/chromium/chrome/browser/incognito/reauth/FullScreenIncognitoReauthCoordinatorTest.java
@@ -28,7 +28,7 @@ import org.chromium.base.test.BaseRobolectricTestRunner; import org.chromium.base.test.util.Batch; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButtonDelegate; +import org.chromium.ui.listmenu.ListMenuButtonDelegate; import org.chromium.ui.modaldialog.DialogDismissalCause; import org.chromium.ui.modaldialog.ModalDialogManager; import org.chromium.ui.modelutil.PropertyModel;
diff --git a/chrome/browser/incognito/android/java/src/org/chromium/chrome/browser/incognito/reauth/IncognitoReauthCoordinatorBase.java b/chrome/browser/incognito/android/java/src/org/chromium/chrome/browser/incognito/reauth/IncognitoReauthCoordinatorBase.java index eeeaebb..9f05a2c 100644 --- a/chrome/browser/incognito/android/java/src/org/chromium/chrome/browser/incognito/reauth/IncognitoReauthCoordinatorBase.java +++ b/chrome/browser/incognito/android/java/src/org/chromium/chrome/browser/incognito/reauth/IncognitoReauthCoordinatorBase.java
@@ -16,7 +16,7 @@ import org.chromium.chrome.browser.incognito.R; import org.chromium.chrome.browser.incognito.reauth.IncognitoReauthManager.IncognitoReauthCallback; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButtonDelegate; +import org.chromium.ui.listmenu.ListMenuButtonDelegate; import org.chromium.ui.modelutil.PropertyModel; import org.chromium.ui.modelutil.PropertyModelChangeProcessor;
diff --git a/chrome/browser/incognito/android/java/src/org/chromium/chrome/browser/incognito/reauth/IncognitoReauthMenuDelegate.java b/chrome/browser/incognito/android/java/src/org/chromium/chrome/browser/incognito/reauth/IncognitoReauthMenuDelegate.java index 8c45cdd..3dfcb93 100644 --- a/chrome/browser/incognito/android/java/src/org/chromium/chrome/browser/incognito/reauth/IncognitoReauthMenuDelegate.java +++ b/chrome/browser/incognito/android/java/src/org/chromium/chrome/browser/incognito/reauth/IncognitoReauthMenuDelegate.java
@@ -15,10 +15,10 @@ import org.chromium.chrome.browser.incognito.R; import org.chromium.components.browser_ui.settings.SettingsLauncher; import org.chromium.components.browser_ui.widget.BrowserUiListMenuUtils; -import org.chromium.components.browser_ui.widget.listmenu.BasicListMenu; -import org.chromium.components.browser_ui.widget.listmenu.ListMenu; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButtonDelegate; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuItemProperties; +import org.chromium.ui.listmenu.BasicListMenu; +import org.chromium.ui.listmenu.ListMenu; +import org.chromium.ui.listmenu.ListMenuButtonDelegate; +import org.chromium.ui.listmenu.ListMenuItemProperties; import org.chromium.ui.modelutil.MVCListAdapter; import org.chromium.ui.modelutil.PropertyModel;
diff --git a/chrome/browser/incognito/android/java/src/org/chromium/chrome/browser/incognito/reauth/IncognitoReauthProperties.java b/chrome/browser/incognito/android/java/src/org/chromium/chrome/browser/incognito/reauth/IncognitoReauthProperties.java index 7c69225..e95e656c 100644 --- a/chrome/browser/incognito/android/java/src/org/chromium/chrome/browser/incognito/reauth/IncognitoReauthProperties.java +++ b/chrome/browser/incognito/android/java/src/org/chromium/chrome/browser/incognito/reauth/IncognitoReauthProperties.java
@@ -6,7 +6,7 @@ import androidx.annotation.Nullable; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButtonDelegate; +import org.chromium.ui.listmenu.ListMenuButtonDelegate; import org.chromium.ui.modelutil.PropertyKey; import org.chromium.ui.modelutil.PropertyModel; import org.chromium.ui.modelutil.PropertyModel.ReadableBooleanPropertyKey;
diff --git a/chrome/browser/incognito/android/java/src/org/chromium/chrome/browser/incognito/reauth/IncognitoReauthViewBinder.java b/chrome/browser/incognito/android/java/src/org/chromium/chrome/browser/incognito/reauth/IncognitoReauthViewBinder.java index 9ed4cce..202bb90 100644 --- a/chrome/browser/incognito/android/java/src/org/chromium/chrome/browser/incognito/reauth/IncognitoReauthViewBinder.java +++ b/chrome/browser/incognito/android/java/src/org/chromium/chrome/browser/incognito/reauth/IncognitoReauthViewBinder.java
@@ -9,8 +9,8 @@ import androidx.annotation.Nullable; import org.chromium.chrome.browser.incognito.R; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButton; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButtonDelegate; +import org.chromium.ui.listmenu.ListMenuButton; +import org.chromium.ui.listmenu.ListMenuButtonDelegate; import org.chromium.ui.modelutil.PropertyKey; import org.chromium.ui.modelutil.PropertyModel;
diff --git a/chrome/browser/incognito/android/javatests/src/org/chromium/chrome/browser/incognito/reauth/TabSwitcherIncognitoReauthViewTest.java b/chrome/browser/incognito/android/javatests/src/org/chromium/chrome/browser/incognito/reauth/TabSwitcherIncognitoReauthViewTest.java index 1d555d0..7f5c316 100644 --- a/chrome/browser/incognito/android/javatests/src/org/chromium/chrome/browser/incognito/reauth/TabSwitcherIncognitoReauthViewTest.java +++ b/chrome/browser/incognito/android/javatests/src/org/chromium/chrome/browser/incognito/reauth/TabSwitcherIncognitoReauthViewTest.java
@@ -155,7 +155,7 @@ .check(matches(not(isDisplayed()))); mRenderTestRule.render( - cta.findViewById(R.id.action_bar_root), "incognito_reauth_view_tab_switcher"); + cta.findViewById(R.id.action_bar_root), "incognito_reauth_view_tab_switcher_v2"); } @Test
diff --git a/chrome/browser/language/android/java/res/layout/accept_languages_item.xml b/chrome/browser/language/android/java/res/layout/accept_languages_item.xml index 28582c5..81dfe05 100644 --- a/chrome/browser/language/android/java/res/layout/accept_languages_item.xml +++ b/chrome/browser/language/android/java/res/layout/accept_languages_item.xml
@@ -42,7 +42,7 @@ </LinearLayout> - <org.chromium.components.browser_ui.widget.listmenu.ListMenuButton + <org.chromium.ui.listmenu.ListMenuButton android:id="@+id/more" android:layout_width="wrap_content" android:layout_height="match_parent"
diff --git a/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/ContentLanguagesPreference.java b/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/ContentLanguagesPreference.java index 2b7bedc3..0f894f14 100644 --- a/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/ContentLanguagesPreference.java +++ b/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/ContentLanguagesPreference.java
@@ -25,9 +25,9 @@ import org.chromium.components.browser_ui.styles.SemanticColorUtils; import org.chromium.components.browser_ui.widget.BrowserUiListMenuUtils; import org.chromium.components.browser_ui.widget.TintedDrawable; -import org.chromium.components.browser_ui.widget.listmenu.ListMenu; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuItemProperties; import org.chromium.components.prefs.PrefService; +import org.chromium.ui.listmenu.ListMenu; +import org.chromium.ui.listmenu.ListMenuItemProperties; import org.chromium.ui.modelutil.MVCListAdapter.ListItem; import org.chromium.ui.modelutil.MVCListAdapter.ModelList;
diff --git a/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/LanguageItemListFragment.java b/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/LanguageItemListFragment.java index 5a81bc04..16bf421 100644 --- a/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/LanguageItemListFragment.java +++ b/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/LanguageItemListFragment.java
@@ -29,8 +29,8 @@ import org.chromium.components.browser_ui.styles.SemanticColorUtils; import org.chromium.components.browser_ui.widget.BrowserUiListMenuUtils; import org.chromium.components.browser_ui.widget.TintedDrawable; -import org.chromium.components.browser_ui.widget.listmenu.ListMenu; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuItemProperties; +import org.chromium.ui.listmenu.ListMenu; +import org.chromium.ui.listmenu.ListMenuItemProperties; import org.chromium.ui.modelutil.MVCListAdapter.ModelList; import java.util.Collection;
diff --git a/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/LanguageListBaseAdapter.java b/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/LanguageListBaseAdapter.java index 80a249d9..e45ceb9 100644 --- a/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/LanguageListBaseAdapter.java +++ b/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/LanguageListBaseAdapter.java
@@ -23,10 +23,10 @@ import org.chromium.chrome.browser.language.R; import org.chromium.components.browser_ui.widget.dragreorder.DragReorderableListAdapter; import org.chromium.components.browser_ui.widget.dragreorder.DragStateDelegate; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButton; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButtonDelegate; import org.chromium.components.browser_ui.widget.selectable_list.SelectableListUtils; import org.chromium.ui.accessibility.AccessibilityState; +import org.chromium.ui.listmenu.ListMenuButton; +import org.chromium.ui.listmenu.ListMenuButtonDelegate; import java.util.ArrayList; import java.util.Collection;
diff --git a/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/LanguageSettingsTest.java b/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/LanguageSettingsTest.java index 502ff7ff..4cbdfc8 100644 --- a/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/LanguageSettingsTest.java +++ b/chrome/browser/language/android/java/src/org/chromium/chrome/browser/language/settings/LanguageSettingsTest.java
@@ -41,8 +41,8 @@ import org.chromium.chrome.browser.translate.TranslateBridge; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; import org.chromium.components.browser_ui.widget.RecyclerViewTestUtils; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButton; import org.chromium.content_public.browser.test.util.TestThreadUtils; +import org.chromium.ui.listmenu.ListMenuButton; import org.chromium.ui.test.util.UiRestriction; /** Tests for the "Languages" settings screen. */
diff --git a/chrome/browser/ntp_tiles/chrome_most_visited_sites_factory.cc b/chrome/browser/ntp_tiles/chrome_most_visited_sites_factory.cc index 148d3c89..ec02aac0 100644 --- a/chrome/browser/ntp_tiles/chrome_most_visited_sites_factory.cc +++ b/chrome/browser/ntp_tiles/chrome_most_visited_sites_factory.cc
@@ -40,6 +40,7 @@ #include "components/supervised_user/core/browser/supervised_user_service.h" #include "components/supervised_user/core/browser/supervised_user_service_observer.h" #include "components/supervised_user/core/browser/supervised_user_url_filter.h" // nogncheck +#include "components/supervised_user/core/common/supervised_user_utils.h" #endif #if BUILDFLAG(ENABLE_SUPERVISED_USERS) @@ -89,7 +90,7 @@ SupervisedUserServiceFactory::GetForProfile(profile_); auto* url_filter = supervised_user_service->GetURLFilter(); return url_filter->GetFilteringBehaviorForURL(url) == - supervised_user::SupervisedUserURLFilter::FilteringBehavior::BLOCK; + supervised_user::FilteringBehavior::kBlock; } bool SupervisorBridge::IsChildProfile() {
diff --git a/chrome/browser/page_info/page_info_features.cc b/chrome/browser/page_info/page_info_features.cc index 09cb67c6..158fb0d 100644 --- a/chrome/browser/page_info/page_info_features.cc +++ b/chrome/browser/page_info/page_info_features.cc
@@ -23,7 +23,7 @@ BASE_FEATURE(kAboutThisSiteAsyncFetching, "AboutThisSiteAsyncFetching", - base::FEATURE_DISABLED_BY_DEFAULT); + base::FEATURE_ENABLED_BY_DEFAULT); #if !BUILDFLAG(IS_ANDROID) bool IsPersistentSidePanelEntryFeatureEnabled() {
diff --git a/chrome/browser/page_load_metrics/observers/third_party_cookie_deprecation_metrics_observer_browsertest.cc b/chrome/browser/page_load_metrics/observers/third_party_cookie_deprecation_metrics_observer_browsertest.cc index 7187f8a..f33c5303 100644 --- a/chrome/browser/page_load_metrics/observers/third_party_cookie_deprecation_metrics_observer_browsertest.cc +++ b/chrome/browser/page_load_metrics/observers/third_party_cookie_deprecation_metrics_observer_browsertest.cc
@@ -178,6 +178,8 @@ false, 0); histogram_tester.ExpectBucketCount(kThirdPartyCookieAccessBlockedHistogram, true, 0); + histogram_tester.ExpectTotalCount( + "PageLoad.Clients.TPCD.TPCAccess.BlockedByExperiment.IsAdOrNonAd", 0); } IN_PROC_BROWSER_TEST_P(ThirdPartyCookieDeprecationObserverBrowserTest, @@ -244,6 +246,9 @@ histogram_tester.ExpectBucketCount( "Blink.UseCounter.Features", blink::mojom::WebFeature::kThirdPartyCookieAccessBlockByExperiment, 0); + histogram_tester.ExpectBucketCount( + "Blink.UseCounter.Features", + blink::mojom::WebFeature::kThirdPartyCookieAdAccessBlockByExperiment, 0); histogram_tester.ExpectBucketCount(kThirdPartyCookieAccessBlockedHistogram, false, 0); histogram_tester.ExpectBucketCount(kThirdPartyCookieAccessBlockedHistogram, @@ -283,6 +288,9 @@ blink::mojom::WebFeature::kThirdPartyCookieAccessBlockByExperiment, 1); histogram_tester.ExpectUniqueSample(kThirdPartyCookieAccessBlockedHistogram, true, 2); + histogram_tester.ExpectUniqueSample( + "PageLoad.Clients.TPCD.TPCAccess.BlockedByExperiment.IsAdOrNonAd", + false, 1); } else { histogram_tester.ExpectBucketCount( "Blink.UseCounter.Features", @@ -510,3 +518,46 @@ false, 1); } } + +IN_PROC_BROWSER_TEST_P(ThirdPartyCookieDeprecationObserverBrowserTest, + ThirdPartyAdJavaScriptCookieRead) { + SetUpThirdPartyCookieExperimentWithClientState(); + + content::CookieChangeObserver observer(web_contents(), + /*num_expected_calls=*/2); + base::HistogramTester histogram_tester; + NavigateToPageWithFrame("a.com"); + NavigateFrameTo("b.com", "/empty.html?isad=1"); + content::RenderFrameHost* frame = + ChildFrameAt(web_contents()->GetPrimaryMainFrame(), 0); + + // Write a third-party cookie. + EXPECT_TRUE(content::ExecJs( + frame, "document.cookie = 'foo=bar;SameSite=None;Secure';")); + + // Read a third-party cookie. + EXPECT_TRUE(content::ExecJs(frame, "let x = document.cookie;")); + observer.Wait(); + NavigateToUntrackedUrl(); + + if (IsRecordThirdPartyCookiesExperimentMetrics()) { + histogram_tester.ExpectBucketCount( + "Blink.UseCounter.Features", + blink::mojom::WebFeature::kThirdPartyCookieAdAccessBlockByExperiment, + 1); + histogram_tester.ExpectUniqueSample( + "PageLoad.Clients.TPCD.TPCAccess.BlockedByExperiment.IsAdOrNonAd", true, + 1); + histogram_tester.ExpectUniqueSample( + "PageLoad.Clients.TPCD.AdTPCAccess.BlockedByExperiment", true, 1); + } else { + histogram_tester.ExpectBucketCount( + "Blink.UseCounter.Features", + blink::mojom::WebFeature::kThirdPartyCookieAdAccessBlockByExperiment, + 0); + histogram_tester.ExpectUniqueSample( + "PageLoad.Clients.TPCD.AdTPCAccess.BlockedByExperiment", false, 1); + histogram_tester.ExpectTotalCount( + "PageLoad.Clients.TPCD.TPCAccess.BlockedByExperiment.IsAdOrNonAd", 0); + } +}
diff --git a/chrome/browser/password_check/android/internal/java/res/layout/password_check_compromised_credential_item.xml b/chrome/browser/password_check/android/internal/java/res/layout/password_check_compromised_credential_item.xml index 1052631..e09c74a9 100644 --- a/chrome/browser/password_check/android/internal/java/res/layout/password_check_compromised_credential_item.xml +++ b/chrome/browser/password_check/android/internal/java/res/layout/password_check_compromised_credential_item.xml
@@ -77,7 +77,7 @@ </LinearLayout> - <org.chromium.components.browser_ui.widget.listmenu.ListMenuButton + <org.chromium.ui.listmenu.ListMenuButton xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/credential_menu_button" android:background="@null"
diff --git a/chrome/browser/password_check/android/internal/java/src/org/chromium/chrome/browser/password_check/PasswordCheckViewBinder.java b/chrome/browser/password_check/android/internal/java/src/org/chromium/chrome/browser/password_check/PasswordCheckViewBinder.java index 90e4614..ae7e41f 100644 --- a/chrome/browser/password_check/android/internal/java/src/org/chromium/chrome/browser/password_check/PasswordCheckViewBinder.java +++ b/chrome/browser/password_check/android/internal/java/src/org/chromium/chrome/browser/password_check/PasswordCheckViewBinder.java
@@ -44,9 +44,9 @@ import org.chromium.chrome.browser.password_check.helper.PasswordCheckIconHelper; import org.chromium.chrome.browser.ui.favicon.FaviconUtils; import org.chromium.components.browser_ui.widget.BrowserUiListMenuUtils; -import org.chromium.components.browser_ui.widget.listmenu.ListMenu; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButton; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuItemProperties; +import org.chromium.ui.listmenu.ListMenu; +import org.chromium.ui.listmenu.ListMenuButton; +import org.chromium.ui.listmenu.ListMenuItemProperties; import org.chromium.ui.modelutil.MVCListAdapter; import org.chromium.ui.modelutil.PropertyKey; import org.chromium.ui.modelutil.PropertyModel;
diff --git a/chrome/browser/password_check/android/javatests/src/org/chromium/chrome/browser/password_check/PasswordCheckViewTest.java b/chrome/browser/password_check/android/javatests/src/org/chromium/chrome/browser/password_check/PasswordCheckViewTest.java index e89cce4..e32248f 100644 --- a/chrome/browser/password_check/android/javatests/src/org/chromium/chrome/browser/password_check/PasswordCheckViewTest.java +++ b/chrome/browser/password_check/android/javatests/src/org/chromium/chrome/browser/password_check/PasswordCheckViewTest.java
@@ -90,8 +90,8 @@ import org.chromium.chrome.browser.password_manager.settings.ReauthenticationManager.ReauthScope; import org.chromium.chrome.browser.settings.SettingsActivityTestRule; import org.chromium.chrome.test.ChromeJUnit4ClassRunner; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButton; import org.chromium.content_public.browser.test.util.TouchCommon; +import org.chromium.ui.listmenu.ListMenuButton; import org.chromium.ui.modelutil.MVCListAdapter; import org.chromium.ui.modelutil.PropertyModel; import org.chromium.ui.widget.ButtonCompat;
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc index 2834b70..e3bac46 100644 --- a/chrome/browser/prefs/browser_prefs.cc +++ b/chrome/browser/prefs/browser_prefs.cc
@@ -167,6 +167,7 @@ #include "components/signin/public/identity_manager/identity_manager.h" #include "components/site_engagement/content/site_engagement_service.h" #include "components/subresource_filter/content/browser/ruleset_service.h" +#include "components/supervised_user/core/browser/supervised_user_preferences.h" #include "components/supervised_user/core/common/buildflags.h" #include "components/sync/base/pref_names.h" #include "components/sync/service/glue/sync_transport_data_prefs.h" @@ -1766,8 +1767,7 @@ #endif #if BUILDFLAG(ENABLE_SUPERVISED_USERS) - supervised_user::ChildAccountService::RegisterProfilePrefs(registry); - supervised_user::SupervisedUserService::RegisterProfilePrefs(registry); + supervised_user::RegisterProfilePrefs(registry); #endif #if BUILDFLAG(ENABLE_FEED_V2)
diff --git a/chrome/browser/privacy_budget/privacy_budget_browsertest.cc b/chrome/browser/privacy_budget/privacy_budget_browsertest.cc index 71f94c70..e1612e62 100644 --- a/chrome/browser/privacy_budget/privacy_budget_browsertest.cc +++ b/chrome/browser/privacy_budget/privacy_budget_browsertest.cc
@@ -101,8 +101,7 @@ EXPECT_TRUE(settings->IsActive()); } -IN_PROC_BROWSER_TEST_F(PrivacyBudgetBrowserTestWithTestRecorder, - SamplingScreenAPIs) { +IN_PROC_BROWSER_TEST_F(PrivacyBudgetBrowserTestWithTestRecorder, SamplingAPIs) { ASSERT_TRUE(embedded_test_server()->Start()); content::DOMMessageQueue messages(web_contents()); @@ -116,17 +115,17 @@ ASSERT_TRUE(content::NavigateToURL( web_contents(), embedded_test_server()->GetURL( - "/privacy_budget/samples_screen_attributes.html"))); + "/privacy_budget/samples_some_surfaces.html"))); // The document calls a bunch of instrumented functions and sends a message // back to the test. Receipt of the message indicates that the script // successfully completed. - std::string screen_scrape; - ASSERT_TRUE(messages.WaitForMessage(&screen_scrape)); + std::string scraped_apis; + ASSERT_TRUE(messages.WaitForMessage(&scraped_apis)); // The contents of the received message isn't used for anything other than // diagnostics. - SCOPED_TRACE(screen_scrape); + SCOPED_TRACE(scraped_apis); // Navigating away from the test page causes the document to be unloaded. That // will cause any buffered metrics to be flushed. @@ -165,6 +164,7 @@ blink::mojom::WebFeature::kV8Screen_AvailTop_AttributeGetter)), Key(HashFeature( blink::mojom::WebFeature::kV8Screen_AvailWidth_AttributeGetter)), + Key(HashFeature(blink::mojom::WebFeature::kNavigatorDoNotTrack)), })); } @@ -371,7 +371,7 @@ ASSERT_TRUE(content::NavigateToURL( web_contents(), embedded_test_server()->GetURL( - "/privacy_budget/samples_screen_attributes.html"))); + "/privacy_budget/samples_some_surfaces.html"))); // The document calls a bunch of instrumented functions and sends a message // back to the test. Receipt of the message indicates that the script
diff --git a/chrome/browser/profiles/profile_keyed_service_browsertest.cc b/chrome/browser/profiles/profile_keyed_service_browsertest.cc index cdffce3..33739642 100644 --- a/chrome/browser/profiles/profile_keyed_service_browsertest.cc +++ b/chrome/browser/profiles/profile_keyed_service_browsertest.cc
@@ -11,6 +11,7 @@ #include "chrome/browser/media/router/media_router_feature.h" #include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/profiles/profile_selections.h" +#include "chrome/browser/ui/ui_features.h" #include "chrome/common/chrome_features.h" #include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/profile_waiter.h" @@ -157,9 +158,11 @@ ProfileKeyedServiceBrowserTest() { // Force features activation to make sure the test is accurate as possible. // Also removes differences between official and non official run of the - // tests. If a feature is integrated in the fieldtrial_testing_config.json, - // it might not be considered under an official build. Adding it under a - // InitWithFeatures to activate it would neglect that difference. + // tests. + // + // If a feature is integrated in the fieldtrial_testing_config.json, + // it might not be considered under an official build. Adding it under the + // InitWithFeatures below, to activate it, will solve that difference. // clang-format off feature_list_.InitWithFeatures( @@ -169,8 +172,10 @@ companion::visual_search::features::kVisualSearchSuggestions, #endif // !BUILDFLAG(IS_ANDROID) blink::features::kBrowsingTopics, + net::features::kTpcdMetadataGrants, net::features::kTpcdSupportSettings, features::kPersistentOriginTrials, + features::kSidePanelPinning, #if BUILDFLAG(BUILD_WITH_TFLITE_LIB) omnibox::kOnDeviceTailModel, omnibox::kOnDeviceHeadProviderNonIncognito, @@ -251,6 +256,7 @@ #if BUILDFLAG(ENABLE_PDF) "PdfViewerPrivateEventRouter", #endif // BUILDFLAG(ENABLE_PDF) + "PinnedToolbarActionsModel", "PlatformNotificationService", "PredictionModelHandlerProvider", "PrefWatcher", @@ -278,6 +284,7 @@ "TrackingProtectionSettings", "UDPSocketEventDispatcher", "UkmBackgroundRecorderService", + "UpdaterService", "UsbDeviceManager", "UsbDeviceResourceManager", "sct_reporting::Factory" @@ -453,6 +460,7 @@ "PermissionsUpdaterShutdownFactory", "PersonalDataManager", "PinnedTabService", + "PinnedToolbarActionsModel", "PlatformNotificationService", "PluginManager", "PluginPrefs", @@ -519,6 +527,7 @@ "TtsAPI", "UDPSocketEventDispatcher", "UkmBackgroundRecorderService", + "UpdaterService", "UsbDeviceManager", "UsbDeviceResourceManager", "UserCloudPolicyInvalidator",
diff --git a/chrome/browser/renderer_context_menu/render_view_context_menu.cc b/chrome/browser/renderer_context_menu/render_view_context_menu.cc index 71c275a..efb66ae 100644 --- a/chrome/browser/renderer_context_menu/render_view_context_menu.cc +++ b/chrome/browser/renderer_context_menu/render_view_context_menu.cc
@@ -811,8 +811,7 @@ autofill_context_menu_manager_( autofill::PersonalDataManagerFactory::GetForProfile(GetProfile()), this, - &menu_model_, - GetBrowser()) { + &menu_model_) { if (!g_custom_id_ranges_initialized) { g_custom_id_ranges_initialized = true; SetContentCustomCommandIdRange(IDC_CONTENT_CONTEXT_CUSTOM_FIRST, @@ -3545,7 +3544,7 @@ // filter requires an async call. This call is made if the user selects // "Save link as" and blocks the download. if (url_filter->GetFilteringBehaviorForURL(params_.link_url) != - supervised_user::SupervisedUserURLFilter::FilteringBehavior::ALLOW) { + supervised_user::FilteringBehavior::kAllow) { return false; } } @@ -3909,12 +3908,10 @@ } void RenderViewContextMenu::OnSupervisedUserURLFilterChecked( - supervised_user::SupervisedUserURLFilter::FilteringBehavior - filtering_behavior, + supervised_user::FilteringBehavior filtering_behavior, supervised_user::FilteringBehaviorReason reason, bool uncertain) { - if (filtering_behavior == - supervised_user::SupervisedUserURLFilter::FilteringBehavior::ALLOW) { + if (filtering_behavior == supervised_user::FilteringBehavior::kAllow) { ExecSaveLinkAs(); } }
diff --git a/chrome/browser/renderer_context_menu/render_view_context_menu.h b/chrome/browser/renderer_context_menu/render_view_context_menu.h index 4b1a6d3..747a2a0 100644 --- a/chrome/browser/renderer_context_menu/render_view_context_menu.h +++ b/chrome/browser/renderer_context_menu/render_view_context_menu.h
@@ -424,8 +424,7 @@ // Does not execute "Save link as" if the URL is blocked by the URL filter. void CheckSupervisedUserURLFilterAndSaveLinkAs(); void OnSupervisedUserURLFilterChecked( - supervised_user::SupervisedUserURLFilter::FilteringBehavior - filtering_behavior, + supervised_user::FilteringBehavior filtering_behavior, supervised_user::FilteringBehaviorReason reason, bool uncertain); #endif
diff --git a/chrome/browser/resources/ash/settings/os_people_page/password_settings.html b/chrome/browser/resources/ash/settings/os_people_page/password_settings.html index d2b588e..fda23e04 100644 --- a/chrome/browser/resources/ash/settings/os_people_page/password_settings.html +++ b/chrome/browser/resources/ash/settings/os_people_page/password_settings.html
@@ -68,7 +68,7 @@ <cr-button on-click="openSetLocalPasswordDialog_"> $i18n{lockScreenChangePasswordButton} </cr-button> - <template> + </template> </div> <cr-radio-button name="gaia"
diff --git a/chrome/browser/resources/chromeos/accessibility/strings/accessibility_strings_kk.xtb b/chrome/browser/resources/chromeos/accessibility/strings/accessibility_strings_kk.xtb index 32e30cd30..6e81b01 100644 --- a/chrome/browser/resources/chromeos/accessibility/strings/accessibility_strings_kk.xtb +++ b/chrome/browser/resources/chromeos/accessibility/strings/accessibility_strings_kk.xtb
@@ -870,7 +870,7 @@ <translation id="7039555289296502784">Сұрқай жасыл</translation> <translation id="7041173719775863268">Соңғы таңдау</translation> <translation id="7043850226734279132">Қоңыр жасыл</translation> -<translation id="7051308646573997571">Маржан</translation> +<translation id="7051308646573997571">Қызыл маржан</translation> <translation id="7062635574500127092">Көкшіл жасыл</translation> <translation id="7086377898680121060">Жарықтық деңгейін арттыру</translation> <translation id="7088743565397416204">Ерекшеленген элементті іске қосу үшін оны екі рет түртіңіз</translation>
diff --git a/chrome/browser/resources/chromeos/login/BUILD.gn b/chrome/browser/resources/chromeos/login/BUILD.gn index 62d2df2..5cd8396a 100644 --- a/chrome/browser/resources/chromeos/login/BUILD.gn +++ b/chrome/browser/resources/chromeos/login/BUILD.gn
@@ -3,7 +3,6 @@ # found in the LICENSE file. import("//chrome/common/features.gni") -import("//chrome/test/base/ash/js2gtest.gni") import("//third_party/closure_compiler/compile_js.gni") import("//tools/grit/grit_rule.gni") import("//tools/grit/preprocess_if_expr.gni") @@ -348,6 +347,9 @@ "screens/common:closure_compile", "screens/login:closure_compile", "screens/oobe:closure_compile", + + # TODO(antrim): re-enable once files are moved. + # t "screens/osauth:closure_compile", "test_api:closure_compile", # TODO(crbug.com/1229130)
diff --git a/chrome/browser/resources/chromeos/login/components/behaviors/login_screen_behavior.js b/chrome/browser/resources/chromeos/login/components/behaviors/login_screen_behavior.js index 9c8ab7c..0b788ad 100644 --- a/chrome/browser/resources/chromeos/login/components/behaviors/login_screen_behavior.js +++ b/chrome/browser/resources/chromeos/login/components/behaviors/login_screen_behavior.js
@@ -14,7 +14,7 @@ const CALLBACK_USER_ACTED = 'userActed'; /** @polymerBehavior */ -export var LoginScreenBehavior = { +export const LoginScreenBehavior = { // List of methods exported to login.screenName.<method> API. // This is expected to be overridden by the Polymer object using this // behavior.
diff --git a/chrome/browser/resources/chromeos/login/components/behaviors/multi_step_behavior.js b/chrome/browser/resources/chromeos/login/components/behaviors/multi_step_behavior.js index 58a139b..c1471c8 100644 --- a/chrome/browser/resources/chromeos/login/components/behaviors/multi_step_behavior.js +++ b/chrome/browser/resources/chromeos/login/components/behaviors/multi_step_behavior.js
@@ -39,7 +39,7 @@ */ /** @polymerBehavior */ -export var MultiStepBehavior = { +export const MultiStepBehavior = { properties: { uiStep: { type: String, @@ -174,7 +174,7 @@ */ refreshStepBindings_() { this.stepElements_ = {}; - var matches = dom(this.root).querySelectorAll('[for-step]'); + const matches = dom(this.root).querySelectorAll('[for-step]'); for (const child of matches) { const stepsList = child.getAttribute('for-step'); for (const stepChunk of stepsList.split(',')) {
diff --git a/chrome/browser/resources/chromeos/login/components/behaviors/oobe_dialog_host_behavior.js b/chrome/browser/resources/chromeos/login/components/behaviors/oobe_dialog_host_behavior.js index 3574f31..75c29f2 100644 --- a/chrome/browser/resources/chromeos/login/components/behaviors/oobe_dialog_host_behavior.js +++ b/chrome/browser/resources/chromeos/login/components/behaviors/oobe_dialog_host_behavior.js
@@ -16,7 +16,7 @@ */ /** @polymerBehavior */ -export var OobeDialogHostBehavior = { +export const OobeDialogHostBehavior = { properties: {}, /** @@ -45,8 +45,8 @@ * @param {string} selector CSS selector (optional). */ propagateUpdateLocalizedContent(selector) { - var screens = dom(this.root).querySelectorAll(selector); - for (var i = 0; i < screens.length; ++i) { + const screens = dom(this.root).querySelectorAll(selector); + for (let i = 0; i < screens.length; ++i) { /** @type {{updateLocalizedContent: function()}}}*/ (screens[i]) .updateLocalizedContent(); }
diff --git a/chrome/browser/resources/chromeos/login/components/behaviors/oobe_focus_behavior.js b/chrome/browser/resources/chromeos/login/components/behaviors/oobe_focus_behavior.js index 5c60f1cd..da1a58d 100644 --- a/chrome/browser/resources/chromeos/login/components/behaviors/oobe_focus_behavior.js +++ b/chrome/browser/resources/chromeos/login/components/behaviors/oobe_focus_behavior.js
@@ -33,9 +33,9 @@ if (!root) { return; } - var focusedElements = root.getElementsByClassName('focus-on-show'); - var focused = false; - for (var i = 0; i < focusedElements.length; ++i) { + const focusedElements = root.getElementsByClassName('focus-on-show'); + let focused = false; + for (let i = 0; i < focusedElements.length; ++i) { if (focusedElements[i].hidden) { continue; }
diff --git a/chrome/browser/resources/chromeos/login/components/behaviors/oobe_i18n_behavior.js b/chrome/browser/resources/chromeos/login/components/behaviors/oobe_i18n_behavior.js index 752ad73..68a1070 100644 --- a/chrome/browser/resources/chromeos/login/components/behaviors/oobe_i18n_behavior.js +++ b/chrome/browser/resources/chromeos/login/components/behaviors/oobe_i18n_behavior.js
@@ -35,8 +35,8 @@ // TODO(crbug.com/955194): move i18nUpdateLocale from I18nBehavior to this // class. I18nBehavior.i18nUpdateLocale.call(this); - var matches = this.shadowRoot.querySelectorAll('.i18n-dynamic'); - for (var child of matches) { + const matches = this.shadowRoot.querySelectorAll('.i18n-dynamic'); + for (const child of matches) { if (typeof (child.i18nUpdateLocale) === 'function') { child.i18nUpdateLocale(); }
diff --git a/chrome/browser/resources/chromeos/login/components/behaviors/oobe_scrollable_behavior.js b/chrome/browser/resources/chromeos/login/components/behaviors/oobe_scrollable_behavior.js index ec4ef90..1efddbaf 100644 --- a/chrome/browser/resources/chromeos/login/components/behaviors/oobe_scrollable_behavior.js +++ b/chrome/browser/resources/chromeos/login/components/behaviors/oobe_scrollable_behavior.js
@@ -23,7 +23,7 @@ this.scrollableElement_.addEventListener( 'scroll', this.applyScrollClassTags_.bind(this)); this.resizeObserver_.observe(this.scrollableElement_); - for (var i = 0; i < sizeChangeObservableElemenets.length; ++i) { + for (let i = 0; i < sizeChangeObservableElemenets.length; ++i) { this.resizeObserver_.observe(sizeChangeObservableElemenets[i]); } }, @@ -32,7 +32,7 @@ * Applies the class tags to topScrollContainer that control the shadows. */ applyScrollClassTags_() { - var el = this.scrollableElement_; + const el = this.scrollableElement_; el.classList.toggle('can-scroll', el.clientHeight < el.scrollHeight); el.classList.toggle('is-scrolled', el.scrollTop > 0); el.classList.toggle(
diff --git a/chrome/browser/resources/chromeos/login/components/dialogs/oobe_adaptive_dialog.js b/chrome/browser/resources/chromeos/login/components/dialogs/oobe_adaptive_dialog.js index f75108b..04d6041 100644 --- a/chrome/browser/resources/chromeos/login/components/dialogs/oobe_adaptive_dialog.js +++ b/chrome/browser/resources/chromeos/login/components/dialogs/oobe_adaptive_dialog.js
@@ -110,8 +110,8 @@ this.readMoreState = ReadMoreState.HIDDEN; } - var scrollContainer = this.shadowRoot.querySelector('#scrollContainer'); - var contentContainer = this.shadowRoot.querySelector('#contentContainer'); + const scrollContainer = this.shadowRoot.querySelector('#scrollContainer'); + const contentContainer = this.shadowRoot.querySelector('#contentContainer'); if (!scrollContainer || !contentContainer) { return; } @@ -137,7 +137,7 @@ * @private */ applyScrollClassTags_() { - var el = this.shadowRoot.querySelector('#scrollContainer'); + const el = this.shadowRoot.querySelector('#scrollContainer'); el.classList.toggle('can-scroll', el.clientHeight < el.scrollHeight); el.classList.toggle('is-scrolled', el.scrollTop > 0); el.classList.toggle( @@ -168,7 +168,7 @@ this.removeReadMoreButton_(); return; } - var content = this.shadowRoot.querySelector('#contentContainer'); + const content = this.shadowRoot.querySelector('#contentContainer'); if (this.readMoreState == ReadMoreState.UNKNOWN) { if (content.clientHeight < content.scrollHeight) { this.readMoreState = ReadMoreState.SHOWN; @@ -204,7 +204,7 @@ * Scroll to the bottom of footer container. */ scrollToBottom() { - var el = this.shadowRoot.querySelector('#scrollContainer'); + const el = this.shadowRoot.querySelector('#scrollContainer'); el.scrollTop = el.scrollHeight; } @@ -224,9 +224,9 @@ /** @private */ focusOnShow_() { - var focusedElements = this.getElementsByClassName('focus-on-show'); - var focused = false; - for (var i = 0; i < focusedElements.length; ++i) { + const focusedElements = this.getElementsByClassName('focus-on-show'); + let focused = false; + for (let i = 0; i < focusedElements.length; ++i) { if (focusedElements[i].hidden) { continue; } @@ -258,12 +258,12 @@ /** @private */ addReadMoreButton_() { - var contentContainer = this.shadowRoot.querySelector('#contentContainer'); + const contentContainer = this.shadowRoot.querySelector('#contentContainer'); contentContainer.setAttribute('read-more-content', true); this.showReadMoreButton_ = true; afterNextRender(this, () => { - var readMoreButton = this.shadowRoot.querySelector('#readMoreButton'); + const readMoreButton = this.shadowRoot.querySelector('#readMoreButton'); this.focusElement_(readMoreButton); }); @@ -283,13 +283,13 @@ /** @private */ removeReadMoreButton_() { - var contentContainer = this.shadowRoot.querySelector('#contentContainer'); + const contentContainer = this.shadowRoot.querySelector('#contentContainer'); contentContainer.removeAttribute('read-more-content'); this.showReadMoreButton_ = false; // If `read more` button is focused after it was removed, move focus to the // 'focus-on-show' element. - var readMoreButton = this.shadowRoot.querySelector('#readMoreButton'); + const readMoreButton = this.shadowRoot.querySelector('#readMoreButton'); if (this.shadowRoot.activeElement == readMoreButton) { this.focusOnShow_(); }
diff --git a/chrome/browser/resources/chromeos/login/components/dialogs/oobe_content_dialog.js b/chrome/browser/resources/chromeos/login/components/dialogs/oobe_content_dialog.js index 2d7131f..5271a433 100644 --- a/chrome/browser/resources/chromeos/login/components/dialogs/oobe_content_dialog.js +++ b/chrome/browser/resources/chromeos/login/components/dialogs/oobe_content_dialog.js
@@ -57,8 +57,8 @@ onBeforeShow() { this.shadowRoot.querySelector('#lazy').get(); - var contentContainer = this.shadowRoot.querySelector('#contentContainer'); - var scrollContainer = this.shadowRoot.querySelector('#scrollContainer'); + const contentContainer = this.shadowRoot.querySelector('#contentContainer'); + const scrollContainer = this.shadowRoot.querySelector('#scrollContainer'); if (!scrollContainer || !contentContainer) { return; } @@ -85,4 +85,4 @@ } } -customElements.define(OobeContentDialog.is, OobeContentDialog); \ No newline at end of file +customElements.define(OobeContentDialog.is, OobeContentDialog);
diff --git a/chrome/browser/resources/chromeos/login/components/gaia_input_form.js b/chrome/browser/resources/chromeos/login/components/gaia_input_form.js index 447e78c..770a801 100644 --- a/chrome/browser/resources/chromeos/login/components/gaia_input_form.js +++ b/chrome/browser/resources/chromeos/login/components/gaia_input_form.js
@@ -68,8 +68,8 @@ /** @public */ reset() { - var inputs = this.getInputs_(); - for (var i = 0; i < inputs.length; ++i) { + const inputs = this.getInputs_(); + for (let i = 0; i < inputs.length; ++i) { inputs[i].value = ''; inputs[i].isInvalid = false; } @@ -109,7 +109,7 @@ * @return {!Array<!Element>} */ getControls_() { - var controls = this.getInputs_(); + const controls = this.getInputs_(); controls.push(this.$.button); return controls.concat(dom(this).querySelectorAll('gaia-button')); }
diff --git a/chrome/browser/resources/chromeos/login/components/oobe_display_size_selector.js b/chrome/browser/resources/chromeos/login/components/oobe_display_size_selector.js index 504e1da8..75583ec 100644 --- a/chrome/browser/resources/chromeos/login/components/oobe_display_size_selector.js +++ b/chrome/browser/resources/chromeos/login/components/oobe_display_size_selector.js
@@ -118,7 +118,7 @@ updatePreviewSizes_() { const selectedSize = this.availableSizesTicks_[this.tickedSizeIndex_].value; const icons = this.shadowRoot.querySelectorAll('.app-icon'); - for (var i = 0; i < icons.length; i++) { + for (let i = 0; i < icons.length; i++) { icons[i].style.width = selectedSize * DEFAULT_APP_ICON_SIZE + 'px'; } @@ -126,7 +126,7 @@ title.style.fontSize = selectedSize * DEFAULT_FONT_SIZE + 'px'; const names = this.shadowRoot.querySelectorAll('.app-name'); - for (var i = 0; i < names.length; i++) { + for (let i = 0; i < names.length; i++) { names[i].style.fontSize = selectedSize * DEFAULT_FONT_SIZE + 'px'; } }
diff --git a/chrome/browser/resources/chromeos/login/components/oobe_i18n_dropdown.js b/chrome/browser/resources/chromeos/login/components/oobe_i18n_dropdown.js index 4f01867..551d820 100644 --- a/chrome/browser/resources/chromeos/login/components/oobe_i18n_dropdown.js +++ b/chrome/browser/resources/chromeos/login/components/oobe_i18n_dropdown.js
@@ -14,7 +14,7 @@ * Languages/keyboard descriptor to display * @typedef {!OobeTypes.LanguageDsc|!OobeTypes.IMEDsc|!OobeTypes.DemoCountryDsc} */ -var I18nMenuItem; +let I18nMenuItem; /** * Polymer class definition for 'oobe-i18n-dropdown'. @@ -82,8 +82,8 @@ const selectionCallback = !this.idToItem_ ? this.onSelected_.bind(this) : null; this.idToItem_ = new Map(); - for (var i = 0; i < items.length; ++i) { - var item = items[i]; + for (let i = 0; i < items.length; ++i) { + const item = items[i]; this.idToItem_.set(item.value, item); } setupSelect(this.$.select, items, selectionCallback);
diff --git a/chrome/browser/resources/chromeos/login/components/oobe_screens_list.js b/chrome/browser/resources/chromeos/login/components/oobe_screens_list.js index 225504b..c4f17df3 100644 --- a/chrome/browser/resources/chromeos/login/components/oobe_screens_list.js +++ b/chrome/browser/resources/chromeos/login/components/oobe_screens_list.js
@@ -138,7 +138,7 @@ getAriaLabelToggleButtons_( locale, screen_title, screen_subtitle, screen_is_synced, screen_is_completed, screen_id, screen_is_selected) { - var ariaLabel = this.i18nDynamic(locale, screen_title); + let ariaLabel = this.i18nDynamic(locale, screen_title); if (screen_subtitle) { if (screen_id === 'display-size') { ariaLabel = ariaLabel + '.' + screen_subtitle;
diff --git a/chrome/browser/resources/chromeos/login/components/oobe_select.js b/chrome/browser/resources/chromeos/login/components/oobe_select.js index 4b0d96c..95f6abb 100644 --- a/chrome/browser/resources/chromeos/login/components/oobe_select.js +++ b/chrome/browser/resources/chromeos/login/components/oobe_select.js
@@ -46,7 +46,7 @@ } } if (callback) { - var runCallback = function() { + const runCallback = function() { callback(select.options[select.selectedIndex].value); }; select.addEventListener('input', runCallback);
diff --git a/chrome/browser/resources/chromeos/login/components/web_view_helper.js b/chrome/browser/resources/chromeos/login/components/web_view_helper.js index 5abe2bb0..e9dc99e 100644 --- a/chrome/browser/resources/chromeos/login/components/web_view_helper.js +++ b/chrome/browser/resources/chromeos/login/components/web_view_helper.js
@@ -57,7 +57,7 @@ } }; - var xhr = new XMLHttpRequest(); + const xhr = new XMLHttpRequest(); xhr.open('GET', url); xhr.setRequestHeader('Accept', contentType); xhr.onreadystatechange = function() { @@ -69,7 +69,7 @@ return; } - var responseContentType = xhr.getResponseHeader('Content-Type'); + const responseContentType = xhr.getResponseHeader('Content-Type'); if (responseContentType && !responseContentType.includes(contentType)) { onError(); return;
diff --git a/chrome/browser/resources/chromeos/login/components/web_view_loader.js b/chrome/browser/resources/chromeos/login/components/web_view_loader.js index 878bc957..0b1763a 100644 --- a/chrome/browser/resources/chromeos/login/components/web_view_loader.js +++ b/chrome/browser/resources/chromeos/login/components/web_view_loader.js
@@ -12,7 +12,7 @@ export const CLEAR_ANCHORS_CONTENT_SCRIPT = { code: 'A=Array.from(document.getElementsByTagName("a"));' + - 'for(var i = 0; i < A.length; ++i) {' + + 'for(let i = 0; i < A.length; ++i) {' + ' const el = A[i];' + ' let e = document.createElement("span");' + ' if (el.textContent.trim().length > 0) {' +
diff --git a/chrome/browser/resources/chromeos/login/debug/debug.js b/chrome/browser/resources/chromeos/login/debug/debug.js index 5555e57..e862e36 100644 --- a/chrome/browser/resources/chromeos/login/debug/debug.js +++ b/chrome/browser/resources/chromeos/login/debug/debug.js
@@ -1929,7 +1929,7 @@ } getScreenshotId() { - var result = 'unknown'; + let result = 'unknown'; if (this.currentScreenId_) { result = this.currentScreenId_; } @@ -2139,7 +2139,7 @@ new DebugButton(panel.content, 'Toggle color mode', function() { chrome.send('debug.toggleColorMode'); }); - var button = new DebugButton( + const button = new DebugButton( panel.content, 'Toggle gaming mode', this.toggleGameMode.bind(this)); button.element.classList.add('gametoggle-button'); @@ -2188,7 +2188,7 @@ // Disable userActed from triggering chrome.send() and crashing. document.getElementById(screenId).userActed = function(){}; const state = screen.stateMap_[stateId]; - var data = {}; + let data = {}; if (state.data) { data = state.data; } @@ -2210,7 +2210,7 @@ this.knownScreens = []; this.screenButtons = {}; /** @suppress {visibility} */ - for (var id of Oobe.getInstance().screens_) { + for (const id of Oobe.getInstance().screens_) { if (id in this.screenMap) { const screenDef = this.screenMap[id]; const screenElement = $(id); @@ -2265,11 +2265,11 @@ this.knownScreens = this.knownScreens.sort((a, b) => a.index - b.index); const content = this.screensPanel.content; this.knownScreens.forEach((screen) => { - var name = screen.id; + let name = screen.id; if (screen.suffix) { name = name + ' (' + screen.suffix + ')'; } - var button = new DebugButton( + const button = new DebugButton( content, name, this.switchToScreen.bind(this, screen)); button.element.classList.add('debug-button-' + screen.kind); this.screenButtons[screen.id] = button; @@ -2322,7 +2322,7 @@ } createCssStyle(name, styleSpec) { - var style = document.createElement('style'); + const style = document.createElement('style'); style.type = 'text/css'; style.innerHTML = sanitizeInnerHtml('.' + name + ' {' + styleSpec + '}'); document.getElementsByTagName('head')[0].appendChild(style);
diff --git a/chrome/browser/resources/chromeos/login/display_manager.js b/chrome/browser/resources/chromeos/login/display_manager.js index 32d46ca..48613fc3 100644 --- a/chrome/browser/resources/chromeos/login/display_manager.js +++ b/chrome/browser/resources/chromeos/login/display_manager.js
@@ -374,7 +374,7 @@ } } const dynamicElements = document.getElementsByClassName('i18n-dynamic'); - for (var child of dynamicElements) { + for (const child of dynamicElements) { if (typeof (child.i18nUpdateLocale) === 'function') { child.i18nUpdateLocale(); }
diff --git a/chrome/browser/resources/chromeos/login/screens/common/app_launch_splash.js b/chrome/browser/resources/chromeos/login/screens/common/app_launch_splash.js index 0d435d1..d433647 100644 --- a/chrome/browser/resources/chromeos/login/screens/common/app_launch_splash.js +++ b/chrome/browser/resources/chromeos/login/screens/common/app_launch_splash.js
@@ -130,7 +130,7 @@ * @param {boolean} visible Whether to show the option. */ toggleNetworkConfig(visible) { - var currVisible = + const currVisible = !this.$.configNetworkContainer.classList.contains('faded'); if (currVisible == visible) { return;
diff --git a/chrome/browser/resources/chromeos/login/screens/common/consolidated_consent.js b/chrome/browser/resources/chromeos/login/screens/common/consolidated_consent.js index 375eaf6..5accf4d 100644 --- a/chrome/browser/resources/chromeos/login/screens/common/consolidated_consent.js +++ b/chrome/browser/resources/chromeos/login/screens/common/consolidated_consent.js
@@ -303,7 +303,7 @@ return; } - var configuration = Oobe.getInstance().getOobeConfiguration(); + const configuration = Oobe.getInstance().getOobeConfiguration(); if (!configuration) { return; } @@ -390,14 +390,14 @@ loadPrivacyPolicyWebview_(online_tos_url) { const webview = this.$.consolidatedConsentPrivacyPolicyWebview; - var loadFailureCallback = () => { + const loadFailureCallback = () => { if (this.isDemo_) { WebViewHelper.loadUrlContentToWebView( webview, PRIVACY_POLICY_URL, ContentType.PDF); } }; - var tosLoader = new WebViewLoader( + const tosLoader = new WebViewLoader( webview, CONSOLIDATED_CONSENT_ONLINE_LOAD_TIMEOUT_IN_MS, loadFailureCallback, false /* clear_anchors */, false /* inject_css */); tosLoader.setUrl(online_tos_url);
diff --git a/chrome/browser/resources/chromeos/login/screens/common/fingerprint_setup.js b/chrome/browser/resources/chromeos/login/screens/common/fingerprint_setup.js index 86512d5..7ce2f7b 100644 --- a/chrome/browser/resources/chromeos/login/screens/common/fingerprint_setup.js +++ b/chrome/browser/resources/chromeos/login/screens/common/fingerprint_setup.js
@@ -31,7 +31,7 @@ * third_party/cros_system_api/dbus/service_constants.h. * @enum {number} */ -var FingerprintResultType = { +const FingerprintResultType = { SUCCESS: 0, PARTIAL: 1, INSUFFICIENT: 2,
diff --git a/chrome/browser/resources/chromeos/login/screens/common/gesture_navigation.js b/chrome/browser/resources/chromeos/login/screens/common/gesture_navigation.js index 1f23a3e..b713c09 100644 --- a/chrome/browser/resources/chromeos/login/screens/common/gesture_navigation.js +++ b/chrome/browser/resources/chromeos/login/screens/common/gesture_navigation.js
@@ -154,7 +154,7 @@ * @private */ setPlayCurrentScreenAnimation(enabled) { - var animation = this.$[this.uiStep].querySelector('.gesture-animation'); + const animation = this.$[this.uiStep].querySelector('.gesture-animation'); if (animation) { animation.playing = enabled; }
diff --git a/chrome/browser/resources/chromeos/login/screens/common/offline_ad_login.js b/chrome/browser/resources/chromeos/login/screens/common/offline_ad_login.js index 7b08c59..50260bd 100644 --- a/chrome/browser/resources/chromeos/login/screens/common/offline_ad_login.js +++ b/chrome/browser/resources/chromeos/login/screens/common/offline_ad_login.js
@@ -39,7 +39,7 @@ * computer_ou: ?string, encryption_types: ?string, * computer_name_validation_regex: ?string}} */ -export var JoinConfigType; +export let JoinConfigType; // Possible error states of the screen. Must be in the same order as // ActiveDirectoryErrorState enum values. Used in enterprise_enrollment @@ -67,7 +67,7 @@ * @typedef {Iterable<{value: string, title: string, selected: boolean, * subtitle: string}>} */ -var EncryptionSelectListType; +let EncryptionSelectListType; /** * @constructor @@ -312,9 +312,9 @@ } setupEncList() { - var list = /** @type {!EncryptionSelectListType}>} */ + let list = /** @type {!EncryptionSelectListType}>} */ (loadTimeData.getValue('encryptionTypesList')); - for (var item of list) { + for (const item of list) { this.encryptionValueToSubtitleMap[item.value] = item.subtitle; delete item.subtitle; } @@ -381,8 +381,8 @@ return; } this.joinConfigOptions_ = options; - var selectList = []; - for (var i = 0; i < options.length; ++i) { + const selectList = []; + for (let i = 0; i < options.length; ++i) { selectList.push({title: options[i].name, value: i}); } setupSelect( @@ -415,7 +415,7 @@ return; } - var user = /** @type {string} */ (this.$.userInput.value); + let user = /** @type {string} */ (this.$.userInput.value); const password = /** @type {string} / */ (this.$.passwordInput.value); if (!user.includes('@') && this.userRealm) { user += this.userRealm; @@ -476,7 +476,7 @@ /** @private */ onUnlockPasswordEntered_() { - var msg = { + const msg = { 'unlock_password': this.$.unlockPasswordInput.value, }; this.dispatchEvent(new CustomEvent( @@ -515,8 +515,8 @@ this.errorState = ActiveDirectoryErrorState.NONE; this.previousSelectedConfigOption_ = this.selectedConfigOption_; this.selectedConfigOption_ = this.joinConfigOptions_[value]; - var option = this.selectedConfigOption_; - var encryptionTypes = + const option = this.selectedConfigOption_; + let encryptionTypes = option['encryption_types'] || DEFAULT_ENCRYPTION_TYPES; if (!(encryptionTypes in this.encryptionValueToSubtitleMap)) { encryptionTypes = DEFAULT_ENCRYPTION_TYPES;
diff --git a/chrome/browser/resources/chromeos/login/screens/common/saml_confirm_password.js b/chrome/browser/resources/chromeos/login/screens/common/saml_confirm_password.js index 3c6bc4e..853c4c8 100644 --- a/chrome/browser/resources/chromeos/login/screens/common/saml_confirm_password.js +++ b/chrome/browser/resources/chromeos/login/screens/common/saml_confirm_password.js
@@ -171,7 +171,8 @@ } if (this.isManualInput) { // When using manual password entry, both passwords must match. - var confirmPasswordInput = this.shadowRoot.querySelector('#confirmPasswordInput'); + const confirmPasswordInput = + this.shadowRoot.querySelector('#confirmPasswordInput'); if (!confirmPasswordInput.validate()) { return; }
diff --git a/chrome/browser/resources/chromeos/login/screens/login/arc_vm_data_migration.js b/chrome/browser/resources/chromeos/login/screens/login/arc_vm_data_migration.js index 8ab2160..f4fa78d 100644 --- a/chrome/browser/resources/chromeos/login/screens/login/arc_vm_data_migration.js +++ b/chrome/browser/resources/chromeos/login/screens/login/arc_vm_data_migration.js
@@ -23,7 +23,7 @@ import {OOBE_UI_STATE} from '../../components/display_manager_types.js'; // Keep in sync with ArcVmDataMigrationScreenView::UIState. -var ArcVmDataMigrationUIState = { +const ArcVmDataMigrationUIState = { LOADING: 'loading', WELCOME: 'welcome', RESUM: 'resume', @@ -33,7 +33,7 @@ }; // Keep in sync with kUserAction* in arc_vm_data_migration_screen.cc. -var ArcVmDataMigrationUserAction = { +const ArcVmDataMigrationUserAction = { SKIP: 'skip', UPDATE: 'update', RESUME: 'resume',
diff --git a/chrome/browser/resources/chromeos/login/screens/login/checking_downloading_update.js b/chrome/browser/resources/chromeos/login/screens/login/checking_downloading_update.js index 1a91d42b..0125c489 100644 --- a/chrome/browser/resources/chromeos/login/screens/login/checking_downloading_update.js +++ b/chrome/browser/resources/chromeos/login/screens/login/checking_downloading_update.js
@@ -174,7 +174,7 @@ computeEstimatedTimeLeftMsg_(estimatedTimeLeft) { const seconds = estimatedTimeLeft; const minutes = Math.ceil(seconds / 60); - var message = ''; + let message = ''; if (minutes > 60) { message = loadTimeData.getString('downloadingTimeLeftLong'); } else if (minutes > 55) {
diff --git a/chrome/browser/resources/chromeos/login/screens/login/encryption_migration.js b/chrome/browser/resources/chromeos/login/screens/login/encryption_migration.js index 3257f14..bf5fefb 100644 --- a/chrome/browser/resources/chromeos/login/screens/login/encryption_migration.js +++ b/chrome/browser/resources/chromeos/login/screens/login/encryption_migration.js
@@ -29,7 +29,7 @@ * enum must be the same. * @enum {string} */ -var EncryptionMigrationUIState = { +const EncryptionMigrationUIState = { INITIAL: 'initial', READY: 'ready', MIGRATING: 'migrating',
diff --git a/chrome/browser/resources/chromeos/login/screens/oobe/enterprise_enrollment.js b/chrome/browser/resources/chromeos/login/screens/oobe/enterprise_enrollment.js index a2cfdee2..6ac94bb1 100644 --- a/chrome/browser/resources/chromeos/login/screens/oobe/enterprise_enrollment.js +++ b/chrome/browser/resources/chromeos/login/screens/oobe/enterprise_enrollment.js
@@ -560,7 +560,7 @@ } onAuthCompleted_(e) { - var detail = e.detail; + const detail = e.detail; if (!detail.email) { this.showError(loadTimeData.getString('fatalEnrollmentError'), false); return;
diff --git a/chrome/browser/resources/chromeos/login/screens/oobe/hid_detection.js b/chrome/browser/resources/chromeos/login/screens/oobe/hid_detection.js index 65f6da37..968e619b 100644 --- a/chrome/browser/resources/chromeos/login/screens/oobe/hid_detection.js +++ b/chrome/browser/resources/chromeos/login/screens/oobe/hid_detection.js
@@ -26,8 +26,7 @@ import {OobeTextButton} from '../../components/buttons/oobe_text_button.js'; -(function() { -/** @const {number} */ var PINCODE_LENGTH = 6; +/** @const {number} */ const PINCODE_LENGTH = 6; // Enumeration of possible connection states of a device. const CONNECTION = { @@ -416,4 +415,3 @@ } customElements.define(HidDetectionScreen.is, HidDetectionScreen); -})();
diff --git a/chrome/browser/resources/chromeos/login/screens/oobe/welcome.js b/chrome/browser/resources/chromeos/login/screens/oobe/welcome.js index 8fab9970..0777c054 100644 --- a/chrome/browser/resources/chromeos/login/screens/oobe/welcome.js +++ b/chrome/browser/resources/chromeos/login/screens/oobe/welcome.js
@@ -303,12 +303,12 @@ this.$.welcomeScreen.i18nUpdateLocale(); this.i18nUpdateLocale(); - var currentLanguage = loadTimeData.getString('language'); + const currentLanguage = loadTimeData.getString('language'); // We might have changed language via configuration. In this case // we need to proceed with rest of configuration after language change // was fully resolved. - var configuration = Oobe.getInstance().getOobeConfiguration(); + const configuration = Oobe.getInstance().getOobeConfiguration(); if (configuration && configuration.language && configuration.language == currentLanguage) { window.setTimeout(() => void this.applyOobeConfiguration_(), 0); @@ -334,13 +334,13 @@ if (this.configuration_applied_) { return; } - var configuration = Oobe.getInstance().getOobeConfiguration(); + const configuration = Oobe.getInstance().getOobeConfiguration(); if (!configuration) { return; } if (configuration.language) { - var currentLanguage = loadTimeData.getString('language'); + const currentLanguage = loadTimeData.getString('language'); if (currentLanguage != configuration.language) { this.applySelectedLanguage_(configuration.language); // Trigger language change without marking it as applied. @@ -455,8 +455,8 @@ * @private */ onLanguageSelected_(event) { - var item = event.detail; - var languageId = item.value; + const item = event.detail; + const languageId = item.value; this.currentLanguage = item.title; this.applySelectedLanguage_(languageId); } @@ -478,8 +478,8 @@ * @private */ onKeyboardSelected_(event) { - var item = event.detail; - var inputMethodId = item.value; + const item = event.detail; + const inputMethodId = item.value; this.currentKeyboard = item.title; this.applySelectedLkeyboard_(inputMethodId); } @@ -500,8 +500,8 @@ } onInputMethodIdSetFromBackend(keyboard_id) { - var found = false; - for (var i = 0; i < this.keyboards.length; ++i) { + let found = false; + for (let i = 0; i < this.keyboards.length; ++i) { if (this.keyboards[i].value != keyboard_id) { this.keyboards[i].selected = false; continue; @@ -650,8 +650,9 @@ * @param {!Event} event */ onA11yOptionChanged_(event) { - var a11ytarget = /** @type {{chromeMessage: string, checked: boolean}} */ ( - event.currentTarget); + const a11ytarget = + /** @type {{chromeMessage: string, checked: boolean}} */ ( + event.currentTarget); if (a11ytarget.checked) { this.userActed(a11ytarget.id + '-enable'); } else { @@ -677,7 +678,7 @@ * @private */ onTimezoneSelected_(event) { - var item = event.detail; + const item = event.detail; if (!item) { return; }
diff --git a/chrome/browser/resources/chromeos/login/screens/osauth/BUILD.gn b/chrome/browser/resources/chromeos/login/screens/osauth/BUILD.gn new file mode 100644 index 0000000..c2ff67a --- /dev/null +++ b/chrome/browser/resources/chromeos/login/screens/osauth/BUILD.gn
@@ -0,0 +1,12 @@ +# Copyright 2023 The Chromium Authors +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//chrome/common/features.gni") +import("//third_party/closure_compiler/compile_js.gni") + +js_type_check("closure_compile") { + is_polymer3 = true + closure_flags = default_closure_args + deps = [] +}
diff --git a/chrome/browser/resources/chromeos/login/screens/osauth/DIR_METADATA b/chrome/browser/resources/chromeos/login/screens/osauth/DIR_METADATA new file mode 100644 index 0000000..88df346 --- /dev/null +++ b/chrome/browser/resources/chromeos/login/screens/osauth/DIR_METADATA
@@ -0,0 +1 @@ +mixins: "//ash/login/LOGIN_LOCK_METADATA"
diff --git a/chrome/browser/resources/chromeos/login/screens/osauth/OWNERS b/chrome/browser/resources/chromeos/login/screens/osauth/OWNERS new file mode 100644 index 0000000..ba0b4474 --- /dev/null +++ b/chrome/browser/resources/chromeos/login/screens/osauth/OWNERS
@@ -0,0 +1,5 @@ +# Functional aspects: +file://ash/login/LOGIN_LOCK_OWNERS + +# UI aspects: +file://ash/login/OOBE_WEBUI_OWNERS \ No newline at end of file
diff --git a/chrome/browser/resources/chromeos/login/security_token_pin_browsertest.js b/chrome/browser/resources/chromeos/login/security_token_pin_browsertest.js index dc8d46e..85c9068 100644 --- a/chrome/browser/resources/chromeos/login/security_token_pin_browsertest.js +++ b/chrome/browser/resources/chromeos/login/security_token_pin_browsertest.js
@@ -13,6 +13,8 @@ GEN('#include "ash/constants/ash_features.h"'); GEN('#include "content/public/test/browser_test.h"'); +// TODO(https://crbug.com/1033337): js2gtest fixtures require var here. +// eslint-disable-next-line no-var var PolymerSecurityTokenPinTest = class extends PolymerTest { /** @override */ get browsePreload() {
diff --git a/chrome/browser/resources/chromeos/login/test_api/test_api.js b/chrome/browser/resources/chromeos/login/test_api/test_api.js index 1f488dc0..1e71087 100644 --- a/chrome/browser/resources/chromeos/login/test_api/test_api.js +++ b/chrome/browser/resources/chromeos/login/test_api/test_api.js
@@ -1175,7 +1175,7 @@ // There are cases when we have different element with the same slot, so // we must find all of them for a given adaptive dialog. - var result = []; + const result = []; for (const child of dialog.children) { if (child.hidden) {
diff --git a/chrome/browser/resources/tab_search/tab_organization_not_started.ts b/chrome/browser/resources/tab_search/tab_organization_not_started.ts index 811d261f..4485b08a 100644 --- a/chrome/browser/resources/tab_search/tab_organization_not_started.ts +++ b/chrome/browser/resources/tab_search/tab_organization_not_started.ts
@@ -135,16 +135,17 @@ private onButtonClick_() { switch (this.getSyncState_()) { case SyncState.SIGNED_OUT: - // TODO(emshack): Trigger sign in & sync flow - break; case SyncState.UNSYNCED: - // TODO(emshack): Trigger sync flow + this.dispatchEvent( + new CustomEvent('sync-click', {bubbles: true, composed: true})); break; case SyncState.SYNC_PAUSED: - // TODO(emshack): Trigger sign in flow + this.dispatchEvent( + new CustomEvent('sign-in-click', {bubbles: true, composed: true})); break; case SyncState.UNSYNCED_HISTORY: - // TODO(emshack): Trigger opening sync settings + this.dispatchEvent( + new CustomEvent('settings-click', {bubbles: true, composed: true})); break; case SyncState.SYNCED: // Start a tab organization
diff --git a/chrome/browser/resources/tab_search/tab_organization_page.html b/chrome/browser/resources/tab_search/tab_organization_page.html index 7b7f656..b701381a 100644 --- a/chrome/browser/resources/tab_search/tab_organization_page.html +++ b/chrome/browser/resources/tab_search/tab_organization_page.html
@@ -64,6 +64,9 @@ <div class="body"> <tab-organization-not-started hidden="[[!isState_(tabOrganizationStateEnum_.kNotStarted, state_)]]" + on-sync-click="onSyncClick_" + on-sign-in-click="onSignInClick_" + on-settings-click="onSettingsClick_" on-organize-tabs-click="onOrganizeTabsClick_" show-fre="[[showFRE_]]"> </tab-organization-not-started>
diff --git a/chrome/browser/resources/tab_search/tab_organization_page.ts b/chrome/browser/resources/tab_search/tab_organization_page.ts index 31de1e1..7160c89 100644 --- a/chrome/browser/resources/tab_search/tab_organization_page.ts +++ b/chrome/browser/resources/tab_search/tab_organization_page.ts
@@ -107,6 +107,18 @@ return this.state_ === TabOrganizationState.kFailure && this.showFRE_; } + private onSyncClick_() { + this.apiProxy_.triggerSync(); + } + + private onSignInClick_() { + this.apiProxy_.triggerSignIn(); + } + + private onSettingsClick_() { + this.apiProxy_.openSyncSettings(); + } + private onOrganizeTabsClick_() { this.apiProxy_.requestTabOrganization(); }
diff --git a/chrome/browser/resources/tab_search/tab_search_api_proxy.ts b/chrome/browser/resources/tab_search/tab_search_api_proxy.ts index 55f8c92c..e46f8c20 100644 --- a/chrome/browser/resources/tab_search/tab_search_api_proxy.ts +++ b/chrome/browser/resources/tab_search/tab_search_api_proxy.ts
@@ -43,6 +43,12 @@ startTabGroupTutorial(): void; + triggerSync(): void; + + triggerSignIn(): void; + + openSyncSettings(): void; + showUi(): void; } @@ -119,6 +125,18 @@ this.handler.startTabGroupTutorial(); } + triggerSync() { + this.handler.triggerSync(); + } + + triggerSignIn() { + this.handler.triggerSignIn(); + } + + openSyncSettings() { + this.handler.openSyncSettings(); + } + showUi() { this.handler.showUI(); }
diff --git a/chrome/browser/search/search.cc b/chrome/browser/search/search.cc index 369bea03..d817594 100644 --- a/chrome/browser/search/search.cc +++ b/chrome/browser/search/search.cc
@@ -33,6 +33,7 @@ #include "chrome/browser/supervised_user/supervised_user_service_factory.h" #include "components/supervised_user/core/browser/supervised_user_service.h" #include "components/supervised_user/core/browser/supervised_user_url_filter.h" // nogncheck +#include "components/supervised_user/core/common/supervised_user_utils.h" #endif #if !BUILDFLAG(IS_ANDROID) @@ -150,7 +151,7 @@ supervised_user::SupervisedUserURLFilter* url_filter = supervised_user_service->GetURLFilter(); if (url_filter->GetFilteringBehaviorForURL(url) == - supervised_user::SupervisedUserURLFilter::BLOCK) { + supervised_user::FilteringBehavior::kBlock) { return false; } #endif
diff --git a/chrome/browser/search_engine_choice/search_engine_choice_service.cc b/chrome/browser/search_engine_choice/search_engine_choice_service.cc index 7023719..205f4e3a 100644 --- a/chrome/browser/search_engine_choice/search_engine_choice_service.cc +++ b/chrome/browser/search_engine_choice/search_engine_choice_service.cc
@@ -172,6 +172,12 @@ search_engines::SearchEngineChoiceScreenConditions SearchEngineChoiceService::ComputeDialogConditions(Browser& browser) { + if (!search_engines::IsChoiceScreenFlagEnabled( + search_engines::ChoicePromo::kDialog)) { + return search_engines::SearchEngineChoiceScreenConditions:: + kFeatureSuppressed; + } + if (web_app::AppBrowserController::IsWebApp(&browser)) { // Showing a Chrome-specific search engine dialog on top of a window // dedicated to a specific web app is a horrible UX, we suppress it for this
diff --git a/chrome/browser/search_engine_choice/search_engine_choice_service_unittest.cc b/chrome/browser/search_engine_choice/search_engine_choice_service_unittest.cc index c7110b7..ca13f8e 100644 --- a/chrome/browser/search_engine_choice/search_engine_choice_service_unittest.cc +++ b/chrome/browser/search_engine_choice/search_engine_choice_service_unittest.cc
@@ -4,80 +4,90 @@ #include "chrome/browser/search_engine_choice/search_engine_choice_service.h" #include "base/functional/bind.h" -#include "base/memory/raw_ptr.h" #include "base/test/metrics/histogram_tester.h" #include "base/test/scoped_feature_list.h" #include "chrome/browser/profiles/profile.h" +#include "chrome/browser/search_engine_choice/search_engine_choice_service_factory.h" #include "chrome/browser/search_engines/template_url_service_factory.h" -#include "chrome/browser/ui/webui/settings/search_engines_handler.h" +#include "chrome/test/base/browser_with_test_window_test.h" #include "chrome/test/base/testing_browser_process.h" -#include "chrome/test/base/testing_profile_manager.h" #include "components/country_codes/country_codes.h" #include "components/search_engines/search_engine_choice_utils.h" #include "components/search_engines/template_url_service.h" #include "components/signin/public/base/signin_switches.h" -#include "content/public/test/browser_task_environment.h" #include "testing/gtest/include/gtest/gtest.h" -class SearchEngineChoiceServiceTest : public testing::Test { +class SearchEngineChoiceServiceTest : public BrowserWithTestWindowTest { public: - SearchEngineChoiceServiceTest() - : profile_manager_(TestingBrowserProcess::GetGlobal()) {} + SearchEngineChoiceServiceTest() { + feature_list_.InitWithFeatures( + /*enabled_features=*/{switches::kSearchEngineChoice, + switches::kSearchEngineChoiceFre}, + /*disabled_features=*/{}); + + scoped_chrome_build_override_ = std::make_unique<base::AutoReset<bool>>( + SearchEngineChoiceServiceFactory::ScopedChromeBuildOverrideForTesting( + /*force_chrome_build=*/true)); + } void SetUp() override { - testing::Test::SetUp(); - ASSERT_TRUE(profile_manager_.SetUp()); - profile_ = profile_manager_.CreateTestingProfile("Profile 1"); - + BrowserWithTestWindowTest::SetUp(); TemplateURLServiceFactory::GetInstance()->SetTestingFactoryAndUse( profile(), base::BindRepeating(&TemplateURLServiceFactory::BuildInstanceFor)); PrefService* pref_service = profile()->GetPrefs(); - // The search engine choice feature is only enabled for countries in the EEA - // region. + // The search engine choice feature is only enabled for countries in the + // EEA region. const int kBelgiumCountryId = country_codes::CountryCharsToCountryID('B', 'E'); pref_service->SetInteger(country_codes::kCountryIDAtInstall, kBelgiumCountryId); - - TemplateURLService* template_url_service = - TemplateURLServiceFactory::GetForProfile(profile()); - search_engine_choice_service_ = std::make_unique<SearchEngineChoiceService>( - *profile_, *template_url_service); - } - - Profile* profile() const { return profile_; } - - SearchEngineChoiceService* search_engine_choice_service() { - return search_engine_choice_service_.get(); } const base::HistogramTester& histogram_tester() const { return histogram_tester_; } + base::test::ScopedFeatureList& feature_list() { return feature_list_; } + private: - base::test::ScopedFeatureList feature_list_{switches::kSearchEngineChoice}; - content::BrowserTaskEnvironment task_environment_; - TestingProfileManager profile_manager_; - raw_ptr<Profile> profile_ = nullptr; - std::unique_ptr<SearchEngineChoiceService> search_engine_choice_service_; + base::test::ScopedFeatureList feature_list_; base::HistogramTester histogram_tester_; + std::unique_ptr<base::AutoReset<bool>> scoped_chrome_build_override_; }; TEST_F(SearchEngineChoiceServiceTest, HandleLearnMoreLinkClicked) { - search_engine_choice_service()->NotifyLearnMoreLinkClicked( + SearchEngineChoiceService* search_engine_choice_service = + SearchEngineChoiceServiceFactory::GetForProfile(profile()); + + search_engine_choice_service->NotifyLearnMoreLinkClicked( SearchEngineChoiceService::EntryPoint::kDialog); histogram_tester().ExpectBucketCount( search_engines::kSearchEngineChoiceScreenEventsHistogram, search_engines::SearchEngineChoiceScreenEvents::kLearnMoreWasDisplayed, 1); - search_engine_choice_service()->NotifyLearnMoreLinkClicked( + search_engine_choice_service->NotifyLearnMoreLinkClicked( SearchEngineChoiceService::EntryPoint::kProfilePicker); histogram_tester().ExpectBucketCount( search_engines::kSearchEngineChoiceScreenEventsHistogram, search_engines::SearchEngineChoiceScreenEvents::kFreLearnMoreWasDisplayed, 1); } + +TEST_F(SearchEngineChoiceServiceTest, CanShowDialog) { + feature_list().Reset(); + feature_list().InitWithFeatures( + /*enabled_features=*/{switches::kSearchEngineChoiceFre}, + /*disabled_features=*/{switches::kSearchEngineChoice}); + + SearchEngineChoiceService* search_engine_choice_service = + SearchEngineChoiceServiceFactory::GetForProfile(profile()); + + EXPECT_FALSE(search_engine_choice_service->CanShowDialog(*browser())); + histogram_tester().ExpectUniqueSample( + search_engines::kSearchEngineChoiceScreenNavigationConditionsHistogram, + search_engines::SearchEngineChoiceScreenConditions::kFeatureSuppressed, + 1); +}
diff --git a/chrome/browser/supervised_user/supervised_user_navigation_observer.cc b/chrome/browser/supervised_user/supervised_user_navigation_observer.cc index 379cc9c..dc9ef14c 100644 --- a/chrome/browser/supervised_user/supervised_user_navigation_observer.cc +++ b/chrome/browser/supervised_user/supervised_user_navigation_observer.cc
@@ -131,7 +131,7 @@ } void SupervisedUserNavigationObserver::UpdateMainFrameFilteringStatus( - supervised_user::SupervisedUserURLFilter::FilteringBehavior behavior, + supervised_user::FilteringBehavior behavior, supervised_user::FilteringBehaviorReason reason) { main_frame_filtering_behavior_ = behavior; main_frame_filtering_behavior_reason_ = reason; @@ -284,7 +284,7 @@ const GURL& url, int render_frame_process_id, int render_frame_routing_id, - supervised_user::SupervisedUserURLFilter::FilteringBehavior behavior, + supervised_user::FilteringBehavior behavior, supervised_user::FilteringBehaviorReason reason, bool uncertain) { auto* render_frame_host = content::RenderFrameHost::FromID( @@ -301,8 +301,7 @@ bool is_showing_interstitial = base::Contains(supervised_user_interstitials_, frame_id); bool should_show_interstitial = - behavior == - supervised_user::SupervisedUserURLFilter::FilteringBehavior::BLOCK; + behavior == supervised_user::FilteringBehavior::kBlock; // If an interstitial is being shown where it shouldn't (for e.g. because a // parent just approved a request) reloading will clear it. On the other hand, @@ -422,16 +421,14 @@ } void SupervisedUserNavigationObserver::MaybeUpdateRequestedHosts() { - supervised_user::SupervisedUserURLFilter::FilteringBehavior - filtering_behavior; + supervised_user::FilteringBehavior filtering_behavior; for (auto iter = requested_hosts_.begin(); iter != requested_hosts_.end();) { bool is_manual = url_filter_->GetManualFilteringBehaviorForURL( GURL(*iter), &filtering_behavior); - if (is_manual && filtering_behavior == - supervised_user::SupervisedUserURLFilter:: - FilteringBehavior::ALLOW) { + if (is_manual && + filtering_behavior == supervised_user::FilteringBehavior::kAllow) { iter = requested_hosts_.erase(iter); } else { iter++;
diff --git a/chrome/browser/supervised_user/supervised_user_navigation_observer.h b/chrome/browser/supervised_user/supervised_user_navigation_observer.h index c23c734..3b63174 100644 --- a/chrome/browser/supervised_user/supervised_user_navigation_observer.h +++ b/chrome/browser/supervised_user/supervised_user_navigation_observer.h
@@ -17,6 +17,7 @@ #include "components/supervised_user/core/browser/supervised_user_error_page.h" #include "components/supervised_user/core/browser/supervised_user_service_observer.h" #include "components/supervised_user/core/browser/supervised_user_url_filter.h" +#include "components/supervised_user/core/common/supervised_user_utils.h" #include "components/supervised_user/core/common/supervised_users.h" #include "content/public/browser/render_frame_host_receiver_set.h" #include "content/public/browser/web_contents_observer.h" @@ -68,11 +69,10 @@ const OnInterstitialResultCallback& callback); void UpdateMainFrameFilteringStatus( - supervised_user::SupervisedUserURLFilter::FilteringBehavior behavior, + supervised_user::FilteringBehavior behavior, supervised_user::FilteringBehaviorReason reason); - supervised_user::SupervisedUserURLFilter::FilteringBehavior - main_frame_filtering_behavior() const { + supervised_user::FilteringBehavior main_frame_filtering_behavior() const { return main_frame_filtering_behavior_; } @@ -116,13 +116,12 @@ int frame_id, const OnInterstitialResultCallback& callback); - void URLFilterCheckCallback( - const GURL& url, - int render_frame_process_id, - int render_frame_routing_id, - supervised_user::SupervisedUserURLFilter::FilteringBehavior behavior, - supervised_user::FilteringBehaviorReason reason, - bool uncertain); + void URLFilterCheckCallback(const GURL& url, + int render_frame_process_id, + int render_frame_routing_id, + supervised_user::FilteringBehavior behavior, + supervised_user::FilteringBehaviorReason reason, + bool uncertain); void MaybeShowInterstitial(const GURL& url, supervised_user::FilteringBehaviorReason reason, @@ -164,9 +163,8 @@ std::set<std::string> requested_hosts_; - supervised_user::SupervisedUserURLFilter::FilteringBehavior - main_frame_filtering_behavior_ = - supervised_user::SupervisedUserURLFilter::FilteringBehavior::ALLOW; + supervised_user::FilteringBehavior main_frame_filtering_behavior_ = + supervised_user::FilteringBehavior::kAllow; supervised_user::FilteringBehaviorReason main_frame_filtering_behavior_reason_ = supervised_user::FilteringBehaviorReason::DEFAULT;
diff --git a/chrome/browser/supervised_user/supervised_user_navigation_throttle.cc b/chrome/browser/supervised_user/supervised_user_navigation_throttle.cc index 3be66f2d..289c15e4 100644 --- a/chrome/browser/supervised_user/supervised_user_navigation_throttle.cc +++ b/chrome/browser/supervised_user/supervised_user_navigation_throttle.cc
@@ -19,6 +19,7 @@ #include "components/supervised_user/core/browser/supervised_user_interstitial.h" #include "components/supervised_user/core/browser/supervised_user_service.h" #include "components/supervised_user/core/browser/supervised_user_url_filter.h" +#include "components/supervised_user/core/common/supervised_user_utils.h" #include "content/public/browser/navigation_handle.h" #include "ui/base/page_transition_types.h" #include "url/gurl.h" @@ -51,14 +52,14 @@ navigation_handle->GetWebContents()->GetBrowserContext())) ->GetURLFilter()), deferred_(false), - behavior_(supervised_user::SupervisedUserURLFilter::INVALID) {} + behavior_(supervised_user::FilteringBehavior::kInvalid) {} SupervisedUserNavigationThrottle::~SupervisedUserNavigationThrottle() {} content::NavigationThrottle::ThrottleCheckResult SupervisedUserNavigationThrottle::CheckURL() { deferred_ = false; - DCHECK_EQ(supervised_user::SupervisedUserURLFilter::INVALID, behavior_); + DCHECK_EQ(supervised_user::FilteringBehavior::kInvalid, behavior_); // We do not yet support prerendering for supervised users. if (navigation_handle()->IsInPrerenderedMainFrame()) { @@ -87,12 +88,12 @@ } DCHECK_EQ(got_result, - behavior_ != supervised_user::SupervisedUserURLFilter::INVALID); + behavior_ != supervised_user::FilteringBehavior::kInvalid); // If we got a "not blocked" result synchronously, don't defer. - deferred_ = !got_result || - (behavior_ == supervised_user::SupervisedUserURLFilter::BLOCK); + deferred_ = + !got_result || (behavior_ == supervised_user::FilteringBehavior::kBlock); if (got_result) { - behavior_ = supervised_user::SupervisedUserURLFilter::INVALID; + behavior_ = supervised_user::FilteringBehavior::kInvalid; } if (deferred_) { return NavigationThrottle::DEFER; @@ -144,10 +145,10 @@ void SupervisedUserNavigationThrottle::OnCheckDone( const GURL& url, - supervised_user::SupervisedUserURLFilter::FilteringBehavior behavior, + supervised_user::FilteringBehavior behavior, supervised_user::FilteringBehaviorReason reason, bool uncertain) { - DCHECK_EQ(supervised_user::SupervisedUserURLFilter::INVALID, behavior_); + DCHECK_EQ(supervised_user::FilteringBehavior::kInvalid, behavior_); // If we got a result synchronously, pass it back to ShowInterstitialIfNeeded. if (!deferred_) { @@ -171,7 +172,7 @@ } } - if (behavior == supervised_user::SupervisedUserURLFilter::BLOCK) { + if (behavior == supervised_user::FilteringBehavior::kBlock) { ShowInterstitial(url, reason); } else if (deferred_) { Resume();
diff --git a/chrome/browser/supervised_user/supervised_user_navigation_throttle.h b/chrome/browser/supervised_user/supervised_user_navigation_throttle.h index 9eb60b7..7e1ee7ff 100644 --- a/chrome/browser/supervised_user/supervised_user_navigation_throttle.h +++ b/chrome/browser/supervised_user/supervised_user_navigation_throttle.h
@@ -11,6 +11,7 @@ #include "base/memory/weak_ptr.h" #include "components/supervised_user/core/browser/supervised_user_error_page.h" #include "components/supervised_user/core/browser/supervised_user_url_filter.h" +#include "components/supervised_user/core/common/supervised_user_utils.h" #include "components/supervised_user/core/common/supervised_users.h" #include "content/public/browser/navigation_throttle.h" @@ -49,11 +50,10 @@ void ShowInterstitialAsync(supervised_user::FilteringBehaviorReason reason); - void OnCheckDone( - const GURL& url, - supervised_user::SupervisedUserURLFilter::FilteringBehavior behavior, - supervised_user::FilteringBehaviorReason reason, - bool uncertain); + void OnCheckDone(const GURL& url, + supervised_user::FilteringBehavior behavior, + supervised_user::FilteringBehaviorReason reason, + bool uncertain); void OnInterstitialResult(CallbackActions continue_request, bool already_requested_permission, @@ -62,7 +62,7 @@ raw_ptr<supervised_user::SupervisedUserURLFilter> url_filter_; bool deferred_; supervised_user::FilteringBehaviorReason reason_; - supervised_user::SupervisedUserURLFilter::FilteringBehavior behavior_; + supervised_user::FilteringBehavior behavior_; base::WeakPtrFactory<SupervisedUserNavigationThrottle> weak_ptr_factory_{ this}; };
diff --git a/chrome/browser/supervised_user/supervised_user_navigation_throttle_browsertest.cc b/chrome/browser/supervised_user/supervised_user_navigation_throttle_browsertest.cc index 36dda8f..3d483d4 100644 --- a/chrome/browser/supervised_user/supervised_user_navigation_throttle_browsertest.cc +++ b/chrome/browser/supervised_user/supervised_user_navigation_throttle_browsertest.cc
@@ -38,6 +38,7 @@ #include "components/supervised_user/core/browser/supervised_user_url_filter.h" #include "components/supervised_user/core/common/features.h" #include "components/supervised_user/core/common/supervised_user_constants.h" +#include "components/supervised_user/core/common/supervised_user_utils.h" #include "content/public/browser/navigation_controller.h" #include "content/public/browser/navigation_entry.h" #include "content/public/browser/navigation_handle.h" @@ -343,7 +344,8 @@ profile->GetProfileKey()); supervised_user_settings_service->SetLocalSetting( supervised_user::kContentPackDefaultFilteringBehavior, - base::Value(supervised_user::SupervisedUserURLFilter::BLOCK)); + base::Value( + static_cast<int>(supervised_user::FilteringBehavior::kBlock))); std::unique_ptr<WebContents> web_contents( WebContents::Create(WebContents::CreateParams(profile))); @@ -875,7 +877,7 @@ // Set the default behavior to block. filter->SetDefaultFilteringBehavior( - supervised_user::SupervisedUserURLFilter::BLOCK); + supervised_user::FilteringBehavior::kBlock); // The async checker will make rpc calls to check if the url should be // blocked or not. This may cause flakiness.
diff --git a/chrome/browser/supervised_user/supervised_user_navigation_throttle_unittest.cc b/chrome/browser/supervised_user/supervised_user_navigation_throttle_unittest.cc index bbee7d1..7596abd 100644 --- a/chrome/browser/supervised_user/supervised_user_navigation_throttle_unittest.cc +++ b/chrome/browser/supervised_user/supervised_user_navigation_throttle_unittest.cc
@@ -12,6 +12,7 @@ #include "components/supervised_user/core/browser/supervised_user_url_filter.h" #include "components/supervised_user/core/common/features.h" #include "components/supervised_user/core/common/supervised_user_constants.h" +#include "components/supervised_user/core/common/supervised_user_utils.h" #include "components/supervised_user/test_support/kids_management_api_server_mock.h" #include "components/supervised_user/test_support/supervised_user_url_filter_test_utils.h" #include "content/public/browser/navigation_throttle.h" @@ -95,7 +96,7 @@ hosts[blocked_url.host()] = false; GetSupervisedUserURLFilter()->SetManualHosts(std::move(hosts)); ASSERT_EQ( - supervised_user::SupervisedUserURLFilter::FilteringBehavior::BLOCK, + supervised_user::FilteringBehavior::kBlock, GetSupervisedUserURLFilter()->GetFilteringBehaviorForURL(blocked_url)); CreateNavigationThrottle(blocked_url)->WillStartRequest(); @@ -108,7 +109,7 @@ TEST_F(SupervisedUserNavigationThrottleTest, AllSitesBlockedRecordedInBlockNotInAllowlistBucket) { GetSupervisedUserURLFilter()->SetDefaultFilteringBehavior( - supervised_user::SupervisedUserURLFilter::BLOCK); + supervised_user::FilteringBehavior::kBlock); CreateNavigationThrottle(GURL(kExampleURL))->WillStartRequest(); @@ -126,8 +127,7 @@ .WillByDefault([](const GURL& url, supervised_user::FilteringBehaviorReason* reason) { *reason = supervised_user::FilteringBehaviorReason::ASYNC_CHECKER; - return supervised_user::SupervisedUserURLFilter::FilteringBehavior:: - BLOCK; + return supervised_user::FilteringBehavior::kBlock; }); SupervisedUserServiceFactory::GetForProfile(profile()) ->SetURLFilterForTesting(std::move(mock_url_filter));
diff --git a/chrome/browser/supervised_user/supervised_user_url_filter_browsertest.cc b/chrome/browser/supervised_user/supervised_user_url_filter_browsertest.cc index fa57c129..8543a04 100644 --- a/chrome/browser/supervised_user/supervised_user_url_filter_browsertest.cc +++ b/chrome/browser/supervised_user/supervised_user_url_filter_browsertest.cc
@@ -39,6 +39,7 @@ #include "components/supervised_user/core/browser/supervised_user_url_filter.h" #include "components/supervised_user/core/common/features.h" #include "components/supervised_user/core/common/supervised_user_constants.h" +#include "components/supervised_user/core/common/supervised_user_utils.h" #include "content/public/browser/navigation_controller.h" #include "content/public/browser/navigation_entry.h" #include "content/public/browser/navigation_handle.h" @@ -161,7 +162,8 @@ profile->GetProfileKey()); supervised_user_settings_service->SetLocalSetting( supervised_user::kContentPackDefaultFilteringBehavior, - base::Value(supervised_user::SupervisedUserURLFilter::BLOCK)); + base::Value( + static_cast<int>(supervised_user::FilteringBehavior::kBlock))); } }; @@ -284,11 +286,12 @@ browser()->profile()->GetProfileKey()); supervised_user_settings_service->SetLocalSetting( supervised_user::kContentPackDefaultFilteringBehavior, - base::Value(supervised_user::SupervisedUserURLFilter::BLOCK)); + base::Value( + static_cast<int>(supervised_user::FilteringBehavior::kBlock))); supervised_user::SupervisedUserURLFilter* filter = GetSupervisedUserService()->GetURLFilter(); - ASSERT_EQ(supervised_user::SupervisedUserURLFilter::BLOCK, + ASSERT_EQ(supervised_user::FilteringBehavior::kBlock, filter->GetFilteringBehaviorForURL(test_url)); content::TestNavigationObserver observer(tab); @@ -330,11 +333,12 @@ browser()->profile()->GetProfileKey()); supervised_user_settings_service->SetLocalSetting( supervised_user::kContentPackDefaultFilteringBehavior, - base::Value(supervised_user::SupervisedUserURLFilter::BLOCK)); + base::Value( + static_cast<int>(supervised_user::FilteringBehavior::kBlock))); supervised_user::SupervisedUserURLFilter* filter = GetSupervisedUserService()->GetURLFilter(); - ASSERT_EQ(supervised_user::SupervisedUserURLFilter::BLOCK, + ASSERT_EQ(supervised_user::FilteringBehavior::kBlock, filter->GetFilteringBehaviorForURL(test_url)); content::TestNavigationObserver observer(tab); @@ -387,9 +391,9 @@ browser()->profile()->GetProfileKey()); supervised_user_settings_service->SetLocalSetting( supervised_user::kContentPackManualBehaviorHosts, std::move(dict)); - EXPECT_EQ(supervised_user::SupervisedUserURLFilter::ALLOW, + EXPECT_EQ(supervised_user::FilteringBehavior::kAllow, filter->GetFilteringBehaviorForURL(allowed_url)); - EXPECT_EQ(supervised_user::SupervisedUserURLFilter::ALLOW, + EXPECT_EQ(supervised_user::FilteringBehavior::kAllow, filter->GetFilteringBehaviorForURL(allowed_url.GetWithEmptyPath())); ASSERT_TRUE(ui_test_utils::NavigateToURL(browser(), allowed_url)); @@ -414,9 +418,9 @@ GoBackAndWaitForNavigation(tab); EXPECT_EQ(allowed_url.spec(), tab->GetLastCommittedURL().spec()); - EXPECT_EQ(supervised_user::SupervisedUserURLFilter::ALLOW, + EXPECT_EQ(supervised_user::FilteringBehavior::kAllow, filter->GetFilteringBehaviorForURL(allowed_url.GetWithEmptyPath())); - EXPECT_EQ(supervised_user::SupervisedUserURLFilter::BLOCK, + EXPECT_EQ(supervised_user::FilteringBehavior::kBlock, filter->GetFilteringBehaviorForURL(blocked_url.GetWithEmptyPath())); // Query the history entry. @@ -456,7 +460,7 @@ supervised_user::SupervisedUserURLFilter* filter = GetSupervisedUserService()->GetURLFilter(); - ASSERT_EQ(supervised_user::SupervisedUserURLFilter::BLOCK, + ASSERT_EQ(supervised_user::FilteringBehavior::kBlock, filter->GetFilteringBehaviorForURL(test_url)); content::TestNavigationObserver block_observer(web_contents); @@ -495,7 +499,7 @@ supervised_user::SupervisedUserURLFilter* filter = GetSupervisedUserService()->GetURLFilter(); - ASSERT_EQ(supervised_user::SupervisedUserURLFilter::BLOCK, + ASSERT_EQ(supervised_user::FilteringBehavior::kBlock, filter->GetFilteringBehaviorForURL(test_url)); // Verify that there is no crash when closing the blocked tab @@ -527,7 +531,7 @@ supervised_user::SupervisedUserURLFilter* filter = GetSupervisedUserService()->GetURLFilter(); - ASSERT_EQ(supervised_user::SupervisedUserURLFilter::BLOCK, + ASSERT_EQ(supervised_user::FilteringBehavior::kBlock, filter->GetFilteringBehaviorForURL(test_url)); content::TestNavigationObserver block_observer(web_contents); @@ -539,7 +543,7 @@ dict.Set(test_url.host(), true); supervised_user_settings_service->SetLocalSetting( supervised_user::kContentPackManualBehaviorHosts, std::move(dict)); - ASSERT_EQ(supervised_user::SupervisedUserURLFilter::ALLOW, + ASSERT_EQ(supervised_user::FilteringBehavior::kAllow, filter->GetFilteringBehaviorForURL(test_url)); } @@ -574,7 +578,7 @@ supervised_user::SupervisedUserURLFilter* filter = GetSupervisedUserService()->GetURLFilter(); - EXPECT_EQ(supervised_user::SupervisedUserURLFilter::ALLOW, + EXPECT_EQ(supervised_user::FilteringBehavior::kAllow, filter->GetFilteringBehaviorForURL(test_url.GetWithEmptyPath())); observer.Wait(); @@ -598,14 +602,13 @@ // SupervisedUserURLFilter::Observer: void OnSiteListUpdated() override {} - MOCK_METHOD( - void, - OnURLChecked, - (const GURL& url, - supervised_user::SupervisedUserURLFilter::FilteringBehavior behavior, - supervised_user::FilteringBehaviorReason reason, - bool uncertain), - (override)); + MOCK_METHOD(void, + OnURLChecked, + (const GURL& url, + supervised_user::FilteringBehavior behavior, + supervised_user::FilteringBehaviorReason reason, + bool uncertain), + (override)); private: const raw_ptr<supervised_user::SupervisedUserURLFilter> filter_;
diff --git a/chrome/browser/supervised_user/supervised_user_url_filter_extensions_unittest.cc b/chrome/browser/supervised_user/supervised_user_url_filter_extensions_unittest.cc index ee760f54..0d79874 100644 --- a/chrome/browser/supervised_user/supervised_user_url_filter_extensions_unittest.cc +++ b/chrome/browser/supervised_user/supervised_user_url_filter_extensions_unittest.cc
@@ -11,6 +11,7 @@ #include "base/functional/callback.h" #include "base/test/task_environment.h" #include "chrome/browser/supervised_user/supervised_user_browser_utils.h" +#include "components/supervised_user/core/common/supervised_user_utils.h" #include "extensions/buildflags/buildflags.h" #include "testing/gtest/include/gtest/gtest.h" #include "url/gurl.h" @@ -21,7 +22,7 @@ public: SupervisedUserURLFilterExtensionsTest() { filter_.SetDefaultFilteringBehavior( - supervised_user::SupervisedUserURLFilter::BLOCK); + supervised_user::FilteringBehavior::kBlock); } protected: @@ -62,16 +63,16 @@ GURL new_webstore_url("https://chromewebstore.google.com/"); filter_.SetDefaultFilteringBehavior( - supervised_user::SupervisedUserURLFilter::BLOCK); - EXPECT_EQ(supervised_user::SupervisedUserURLFilter::ALLOW, + supervised_user::FilteringBehavior::kBlock); + EXPECT_EQ(supervised_user::FilteringBehavior::kAllow, filter_.GetFilteringBehaviorForURL(crx_download_url1)); - EXPECT_EQ(supervised_user::SupervisedUserURLFilter::ALLOW, + EXPECT_EQ(supervised_user::FilteringBehavior::kAllow, filter_.GetFilteringBehaviorForURL(crx_download_url2)); - EXPECT_EQ(supervised_user::SupervisedUserURLFilter::ALLOW, + EXPECT_EQ(supervised_user::FilteringBehavior::kAllow, filter_.GetFilteringBehaviorForURL(crx_download_url3)); - EXPECT_EQ(supervised_user::SupervisedUserURLFilter::ALLOW, + EXPECT_EQ(supervised_user::FilteringBehavior::kAllow, filter_.GetFilteringBehaviorForURL(webstore_url)); - EXPECT_EQ(supervised_user::SupervisedUserURLFilter::ALLOW, + EXPECT_EQ(supervised_user::FilteringBehavior::kAllow, filter_.GetFilteringBehaviorForURL(new_webstore_url)); // Set explicit host rules to block those website, and make sure the @@ -83,15 +84,15 @@ hosts["chromewebstore.google.com"] = false; filter_.SetManualHosts(std::move(hosts)); filter_.SetDefaultFilteringBehavior( - supervised_user::SupervisedUserURLFilter::ALLOW); - EXPECT_EQ(supervised_user::SupervisedUserURLFilter::ALLOW, + supervised_user::FilteringBehavior::kAllow); + EXPECT_EQ(supervised_user::FilteringBehavior::kAllow, filter_.GetFilteringBehaviorForURL(crx_download_url1)); - EXPECT_EQ(supervised_user::SupervisedUserURLFilter::ALLOW, + EXPECT_EQ(supervised_user::FilteringBehavior::kAllow, filter_.GetFilteringBehaviorForURL(crx_download_url2)); - EXPECT_EQ(supervised_user::SupervisedUserURLFilter::ALLOW, + EXPECT_EQ(supervised_user::FilteringBehavior::kAllow, filter_.GetFilteringBehaviorForURL(crx_download_url3)); - EXPECT_EQ(supervised_user::SupervisedUserURLFilter::ALLOW, + EXPECT_EQ(supervised_user::FilteringBehavior::kAllow, filter_.GetFilteringBehaviorForURL(webstore_url)); - EXPECT_EQ(supervised_user::SupervisedUserURLFilter::ALLOW, + EXPECT_EQ(supervised_user::FilteringBehavior::kAllow, filter_.GetFilteringBehaviorForURL(new_webstore_url)); }
diff --git a/chrome/browser/sync_file_system/drive_backend/sync_engine_unittest.cc b/chrome/browser/sync_file_system/drive_backend/sync_engine_unittest.cc index 9ff5d0e..dcdf5867 100644 --- a/chrome/browser/sync_file_system/drive_backend/sync_engine_unittest.cc +++ b/chrome/browser/sync_file_system/drive_backend/sync_engine_unittest.cc
@@ -29,8 +29,7 @@ namespace sync_file_system { namespace drive_backend { -class SyncEngineTest : public testing::Test, - public base::SupportsWeakPtr<SyncEngineTest> { +class SyncEngineTest : public testing::Test { public: typedef RemoteFileSyncService::OriginStatusMap RemoteOriginStatusMap;
diff --git a/chrome/browser/sync_file_system/drive_backend/sync_task_manager_unittest.cc b/chrome/browser/sync_file_system/drive_backend/sync_task_manager_unittest.cc index 076b104a..b04fb0f 100644 --- a/chrome/browser/sync_file_system/drive_backend/sync_task_manager_unittest.cc +++ b/chrome/browser/sync_file_system/drive_backend/sync_task_manager_unittest.cc
@@ -47,9 +47,7 @@ *status_out = status; } -class TaskManagerClient - : public SyncTaskManager::Client, - public base::SupportsWeakPtr<TaskManagerClient> { +class TaskManagerClient : public SyncTaskManager::Client { public: explicit TaskManagerClient(int64_t maximum_background_task) : maybe_schedule_next_task_count_(0), @@ -57,7 +55,7 @@ idle_task_scheduled_count_(0), last_operation_status_(SYNC_STATUS_OK) { task_manager_ = std::make_unique<SyncTaskManager>( - AsWeakPtr(), maximum_background_task, + weak_ptr_factory_.GetWeakPtr(), maximum_background_task, base::SingleThreadTaskRunner::GetCurrentDefault()); task_manager_->Initialize(SYNC_STATUS_OK); base::RunLoop().RunUntilIdle(); @@ -82,16 +80,18 @@ SyncStatusCallback callback) { task_manager_->ScheduleTask( FROM_HERE, - base::BindOnce(&TaskManagerClient::DoTask, AsWeakPtr(), - status_to_return, false /* idle */), + base::BindOnce(&TaskManagerClient::DoTask, + weak_ptr_factory_.GetWeakPtr(), status_to_return, + false /* idle */), SyncTaskManager::PRIORITY_MED, std::move(callback)); } void ScheduleTaskIfIdle(SyncStatusCode status_to_return) { task_manager_->ScheduleTaskIfIdle( FROM_HERE, - base::BindOnce(&TaskManagerClient::DoTask, AsWeakPtr(), - status_to_return, true /* idle */), + base::BindOnce(&TaskManagerClient::DoTask, + weak_ptr_factory_.GetWeakPtr(), status_to_return, + true /* idle */), SyncStatusCallback()); } @@ -122,6 +122,8 @@ int idle_task_scheduled_count_; SyncStatusCode last_operation_status_; + + base::WeakPtrFactory<TaskManagerClient> weak_ptr_factory_{this}; }; class MultihopSyncTask : public ExclusiveTask {
diff --git a/chrome/browser/sync_file_system/drive_backend/sync_worker_unittest.cc b/chrome/browser/sync_file_system/drive_backend/sync_worker_unittest.cc index aa65e7e..78c3a697 100644 --- a/chrome/browser/sync_file_system/drive_backend/sync_worker_unittest.cc +++ b/chrome/browser/sync_file_system/drive_backend/sync_worker_unittest.cc
@@ -98,8 +98,7 @@ extensions::ExtensionRegistry registry_; }; -class SyncWorkerTest : public testing::Test, - public base::SupportsWeakPtr<SyncWorkerTest> { +class SyncWorkerTest : public testing::Test { public: SyncWorkerTest() {} @@ -162,6 +161,10 @@ return sync_worker_->GetMetadataDatabase(); } + base::WeakPtr<SyncWorkerTest> AsWeakPtr() { + return weak_ptr_factory_.GetWeakPtr(); + } + private: content::BrowserTaskEnvironment task_environment_; base::ScopedTempDir profile_dir_; @@ -169,6 +172,7 @@ std::unique_ptr<MockExtensionService> extension_service_; std::unique_ptr<SyncWorker> sync_worker_; + base::WeakPtrFactory<SyncWorkerTest> weak_ptr_factory_{this}; }; TEST_F(SyncWorkerTest, EnableOrigin) {
diff --git a/chrome/browser/tabmodel/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelSelectorFactory.java b/chrome/browser/tabmodel/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelSelectorFactory.java index b5f6a0f9..f3e9b184 100644 --- a/chrome/browser/tabmodel/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelSelectorFactory.java +++ b/chrome/browser/tabmodel/android/java/src/org/chromium/chrome/browser/tabmodel/TabModelSelectorFactory.java
@@ -6,6 +6,8 @@ import android.app.Activity; +import org.chromium.base.supplier.OneshotSupplier; +import org.chromium.chrome.browser.profiles.ProfileProvider; import org.chromium.chrome.browser.tabmodel.NextTabPolicy.NextTabPolicySupplier; /** @@ -16,11 +18,16 @@ * Builds a {@link TabModelSelector}. * * @param activity An {@link Activity} instance. + * @param profileProviderSupplier Provides the Profiles used in this selector. * @param tabCreatorManager A {@link TabCreatorManager} instance. * @param nextTabPolicySupplier A {@link NextTabPolicySupplier} instance. * @param selectorIndex The index of the {@link TabModelSelector}. * @return A new {@link TabModelSelector} instance. */ - TabModelSelector buildSelector(Activity activity, TabCreatorManager tabCreatorManager, - NextTabPolicySupplier nextTabPolicySupplier, int selectorIndex); + TabModelSelector buildSelector( + Activity activity, + OneshotSupplier<ProfileProvider> profileProviderSupplier, + TabCreatorManager tabCreatorManager, + NextTabPolicySupplier nextTabPolicySupplier, + int selectorIndex); }
diff --git a/chrome/browser/tabmodel/android/java/src/org/chromium/chrome/browser/tabmodel/TabWindowManager.java b/chrome/browser/tabmodel/android/java/src/org/chromium/chrome/browser/tabmodel/TabWindowManager.java index b09a0029..8a4fe61 100644 --- a/chrome/browser/tabmodel/android/java/src/org/chromium/chrome/browser/tabmodel/TabWindowManager.java +++ b/chrome/browser/tabmodel/android/java/src/org/chromium/chrome/browser/tabmodel/TabWindowManager.java
@@ -7,6 +7,8 @@ import android.app.Activity; import android.util.Pair; +import org.chromium.base.supplier.OneshotSupplier; +import org.chromium.chrome.browser.profiles.ProfileProvider; import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.browser.tabmodel.NextTabPolicy.NextTabPolicySupplier; import org.chromium.ui.base.WindowAndroid; @@ -36,20 +38,23 @@ int getMaxSimultaneousSelectors(); /** - * Called to request a {@link TabModelSelector} based on {@code index}. Note that the - * {@link TabModelSelector} returned might not actually be the one related to {@code index} and - * {@link #getIndexForWindow(Activity)} should be called to grab the actual index if required. + * Called to request a {@link TabModelSelector} based on {@code index}. Note that the {@link + * TabModelSelector} returned might not actually be the one related to {@code index} and {@link + * #getIndexForWindow(Activity)} should be called to grab the actual index if required. * + * @param profileProviderSupplier The provider of the Profiles used in the selector. * @param tabCreatorManager An instance of {@link TabCreatorManager}. * @param nextTabPolicySupplier An instance of {@link NextTabPolicySupplier}. * @param index The index of the requested {@link TabModelSelector}. Not guaranteed to be the - * index of the {@link TabModelSelector} returned. + * index of the {@link TabModelSelector} returned. * @return {@link Pair} of the index and the {@link TabModelSelector} assigned to that index, or - * {@code null} if there are too many - * {@link TabModelSelector}s already built. + * {@code null} if there are too many {@link TabModelSelector}s already built. */ - Pair<Integer, TabModelSelector> requestSelector(Activity activity, - TabCreatorManager tabCreatorManager, NextTabPolicySupplier nextTabPolicySupplier, + Pair<Integer, TabModelSelector> requestSelector( + Activity activity, + OneshotSupplier<ProfileProvider> profileProviderSupplier, + TabCreatorManager tabCreatorManager, + NextTabPolicySupplier nextTabPolicySupplier, int index); /**
diff --git a/chrome/browser/tabmodel/android/java/src/org/chromium/chrome/browser/tabmodel/TabWindowManagerTest.java b/chrome/browser/tabmodel/android/java/src/org/chromium/chrome/browser/tabmodel/TabWindowManagerTest.java index 50d1d58..06a1ac4 100644 --- a/chrome/browser/tabmodel/android/java/src/org/chromium/chrome/browser/tabmodel/TabWindowManagerTest.java +++ b/chrome/browser/tabmodel/android/java/src/org/chromium/chrome/browser/tabmodel/TabWindowManagerTest.java
@@ -22,9 +22,12 @@ import org.robolectric.annotation.Config; import org.chromium.base.ThreadUtils; +import org.chromium.base.supplier.OneshotSupplier; +import org.chromium.base.supplier.OneshotSupplierImpl; import org.chromium.base.test.BaseRobolectricTestRunner; import org.chromium.base.test.util.Feature; import org.chromium.chrome.browser.profiles.Profile; +import org.chromium.chrome.browser.profiles.ProfileProvider; import org.chromium.chrome.browser.tab.MockTab; import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.browser.tabmodel.NextTabPolicy.NextTabPolicySupplier; @@ -44,21 +47,26 @@ public class TabWindowManagerTest { private TabWindowManager mSubject; private AsyncTabParamsManager mAsyncTabParamsManager; + @Mock private ProfileProvider mProfileProvider; @Mock private TabCreatorManager mTabCreatorManager; @Mock private Profile mProfile; @Mock private Profile mIncognitoProfile; private NextTabPolicySupplier mNextTabPolicySupplier = () -> NextTabPolicy.HIERARCHICAL; + private OneshotSupplierImpl<ProfileProvider> mProfileProviderSupplier = + new OneshotSupplierImpl<>(); @Before public void setUp() { MockitoAnnotations.initMocks(this); Mockito.when(mIncognitoProfile.isOffTheRecord()).thenReturn(true); + mProfileProviderSupplier.set(mProfileProvider); TabModelSelectorFactory mockTabModelSelectorFactory = new TabModelSelectorFactory() { @Override public TabModelSelector buildSelector( Activity activity, + OneshotSupplier<ProfileProvider> profileProviderSupplier, TabCreatorManager tabCreatorManager, NextTabPolicySupplier nextTabPolicySupplier, int selectorIndex) { @@ -99,7 +107,12 @@ ActivityController<Activity> activityController0 = createActivity(); Activity activity0 = activityController0.get(); Pair<Integer, TabModelSelector> assignment0 = - mSubject.requestSelector(activity0, mTabCreatorManager, mNextTabPolicySupplier, 0); + mSubject.requestSelector( + activity0, + mProfileProviderSupplier, + mTabCreatorManager, + mNextTabPolicySupplier, + 0); Assert.assertEquals(0, assignment0.first.intValue()); TabModelSelector selector0 = assignment0.second; @@ -121,9 +134,19 @@ ActivityController<Activity> activityController1 = createActivity(); Activity activity1 = activityController1.get(); Pair<Integer, TabModelSelector> assignment0 = - mSubject.requestSelector(activity0, mTabCreatorManager, mNextTabPolicySupplier, 0); + mSubject.requestSelector( + activity0, + mProfileProviderSupplier, + mTabCreatorManager, + mNextTabPolicySupplier, + 0); Pair<Integer, TabModelSelector> assignment1 = - mSubject.requestSelector(activity1, mTabCreatorManager, mNextTabPolicySupplier, 1); + mSubject.requestSelector( + activity1, + mProfileProviderSupplier, + mTabCreatorManager, + mNextTabPolicySupplier, + 1); Assert.assertEquals(0, assignment0.first.intValue()); Assert.assertEquals(1, assignment1.first.intValue()); @@ -151,7 +174,11 @@ Assert.assertNotNull( "Could not build selector", mSubject.requestSelector( - c.get(), mTabCreatorManager, mNextTabPolicySupplier, 0)); + c.get(), + mProfileProviderSupplier, + mTabCreatorManager, + mNextTabPolicySupplier, + 0)); } ActivityController<Activity> activityController = createActivity(); @@ -159,7 +186,11 @@ Assert.assertNull( "Built selectors past the max number supported", mSubject.requestSelector( - activityController.get(), mTabCreatorManager, mNextTabPolicySupplier, 0)); + activityController.get(), + mProfileProviderSupplier, + mTabCreatorManager, + mNextTabPolicySupplier, + 0)); for (ActivityController<Activity> c : activityControllerList) { destroyActivity(c); @@ -181,10 +212,20 @@ ActivityController<Activity> activityController1 = createActivity(); Activity activity1 = activityController1.get(); Pair<Integer, TabModelSelector> assignment0 = - mSubject.requestSelector(activity0, mTabCreatorManager, mNextTabPolicySupplier, 0); + mSubject.requestSelector( + activity0, + mProfileProviderSupplier, + mTabCreatorManager, + mNextTabPolicySupplier, + 0); // Request 0 again, but should get 1 instead. Pair<Integer, TabModelSelector> assignment1 = - mSubject.requestSelector(activity1, mTabCreatorManager, mNextTabPolicySupplier, 0); + mSubject.requestSelector( + activity1, + mProfileProviderSupplier, + mTabCreatorManager, + mNextTabPolicySupplier, + 0); Assert.assertEquals(0, assignment0.first.intValue()); Assert.assertEquals(1, assignment1.first.intValue()); @@ -212,10 +253,20 @@ ActivityController<Activity> activityController1 = createActivity(); Activity activity1 = activityController1.get(); Pair<Integer, TabModelSelector> assignment0 = - mSubject.requestSelector(activity0, mTabCreatorManager, mNextTabPolicySupplier, 2); + mSubject.requestSelector( + activity0, + mProfileProviderSupplier, + mTabCreatorManager, + mNextTabPolicySupplier, + 2); // Request 2 again, but should get 0 instead. Pair<Integer, TabModelSelector> assignment1 = - mSubject.requestSelector(activity1, mTabCreatorManager, mNextTabPolicySupplier, 2); + mSubject.requestSelector( + activity1, + mProfileProviderSupplier, + mTabCreatorManager, + mNextTabPolicySupplier, + 2); Assert.assertEquals(2, assignment0.first.intValue()); Assert.assertEquals(0, assignment1.first.intValue()); @@ -239,7 +290,12 @@ ActivityController<Activity> activityController0 = createActivity(); Activity activity0 = activityController0.get(); Pair<Integer, TabModelSelector> assignment0 = - mSubject.requestSelector(activity0, mTabCreatorManager, mNextTabPolicySupplier, 0); + mSubject.requestSelector( + activity0, + mProfileProviderSupplier, + mTabCreatorManager, + mNextTabPolicySupplier, + 0); Assert.assertEquals(0, assignment0.first.intValue()); Assert.assertNotNull("Was not able to build the TabModelSelector", assignment0.second); @@ -264,7 +320,12 @@ ActivityController<Activity> activityController0 = createActivity(); Activity activity0 = activityController0.get(); Pair<Integer, TabModelSelector> assignment0 = - mSubject.requestSelector(activity0, mTabCreatorManager, mNextTabPolicySupplier, 0); + mSubject.requestSelector( + activity0, + mProfileProviderSupplier, + mTabCreatorManager, + mNextTabPolicySupplier, + 0); Assert.assertEquals(0, assignment0.first.intValue()); Assert.assertNotNull("Was not able to build the TabModelSelector", assignment0.second); @@ -280,7 +341,12 @@ ActivityController<Activity> activityController1 = createActivity(); Activity activity1 = activityController1.get(); Pair<Integer, TabModelSelector> assignment1 = - mSubject.requestSelector(activity1, mTabCreatorManager, mNextTabPolicySupplier, 0); + mSubject.requestSelector( + activity1, + mProfileProviderSupplier, + mTabCreatorManager, + mNextTabPolicySupplier, + 0); Assert.assertEquals(0, assignment1.first.intValue()); Assert.assertNotNull("Was not able to build the TabModelSelector", assignment1.second); @@ -305,9 +371,19 @@ ActivityController<Activity> activityController1 = createActivity(); Activity activity1 = activityController1.get(); Pair<Integer, TabModelSelector> assignment0 = - mSubject.requestSelector(activity0, mTabCreatorManager, mNextTabPolicySupplier, 0); + mSubject.requestSelector( + activity0, + mProfileProviderSupplier, + mTabCreatorManager, + mNextTabPolicySupplier, + 0); Pair<Integer, TabModelSelector> assignment1 = - mSubject.requestSelector(activity1, mTabCreatorManager, mNextTabPolicySupplier, 1); + mSubject.requestSelector( + activity1, + mProfileProviderSupplier, + mTabCreatorManager, + mNextTabPolicySupplier, + 1); Assert.assertEquals(0, assignment0.first.intValue()); Assert.assertEquals(1, assignment1.first.intValue()); @@ -326,7 +402,12 @@ ActivityController<Activity> activityController2 = createActivity(); Activity activity2 = activityController2.get(); Pair<Integer, TabModelSelector> assignment2 = - mSubject.requestSelector(activity2, mTabCreatorManager, mNextTabPolicySupplier, 1); + mSubject.requestSelector( + activity2, + mProfileProviderSupplier, + mTabCreatorManager, + mNextTabPolicySupplier, + 1); Assert.assertEquals(1, assignment2.first.intValue()); Assert.assertNotNull("Was not able to build the TabModelSelector", assignment2.second); @@ -347,9 +428,19 @@ ActivityController<Activity> activityController1 = createActivity(); Activity activity1 = activityController1.get(); Pair<Integer, TabModelSelector> assignment0 = - mSubject.requestSelector(activity0, mTabCreatorManager, mNextTabPolicySupplier, 0); + mSubject.requestSelector( + activity0, + mProfileProviderSupplier, + mTabCreatorManager, + mNextTabPolicySupplier, + 0); Pair<Integer, TabModelSelector> assignment1 = - mSubject.requestSelector(activity1, mTabCreatorManager, mNextTabPolicySupplier, 1); + mSubject.requestSelector( + activity1, + mProfileProviderSupplier, + mTabCreatorManager, + mNextTabPolicySupplier, + 1); MockTabModelSelector selector0 = (MockTabModelSelector) assignment0.second; MockTabModelSelector selector1 = (MockTabModelSelector) assignment1.second; Tab tab1 = selector0.addMockTab(); @@ -386,9 +477,19 @@ ActivityController<Activity> activityController1 = createActivity(); Activity activity1 = activityController1.get(); Pair<Integer, TabModelSelector> assignment0 = - mSubject.requestSelector(activity0, mTabCreatorManager, mNextTabPolicySupplier, 0); + mSubject.requestSelector( + activity0, + mProfileProviderSupplier, + mTabCreatorManager, + mNextTabPolicySupplier, + 0); Pair<Integer, TabModelSelector> assignment1 = - mSubject.requestSelector(activity1, mTabCreatorManager, mNextTabPolicySupplier, 1); + mSubject.requestSelector( + activity1, + mProfileProviderSupplier, + mTabCreatorManager, + mNextTabPolicySupplier, + 1); MockTabModelSelector selector0 = (MockTabModelSelector) assignment0.second; MockTabModelSelector selector1 = (MockTabModelSelector) assignment1.second; Tab tab1 = selector0.addMockTab(); @@ -425,9 +526,19 @@ ActivityController<Activity> activityController1 = createActivity(); Activity activity1 = activityController1.get(); Pair<Integer, TabModelSelector> assignment0 = - mSubject.requestSelector(activity0, mTabCreatorManager, mNextTabPolicySupplier, 0); + mSubject.requestSelector( + activity0, + mProfileProviderSupplier, + mTabCreatorManager, + mNextTabPolicySupplier, + 0); Pair<Integer, TabModelSelector> assignment1 = - mSubject.requestSelector(activity1, mTabCreatorManager, mNextTabPolicySupplier, 1); + mSubject.requestSelector( + activity1, + mProfileProviderSupplier, + mTabCreatorManager, + mNextTabPolicySupplier, + 1); MockTabModelSelector selector0 = (MockTabModelSelector) assignment0.second; MockTabModelSelector selector1 = (MockTabModelSelector) assignment1.second; Tab tab1 = selector0.addMockTab();
diff --git a/chrome/browser/tabmodel/internal/BUILD.gn b/chrome/browser/tabmodel/internal/BUILD.gn index 2b6969c0..0ab65690 100644 --- a/chrome/browser/tabmodel/internal/BUILD.gn +++ b/chrome/browser/tabmodel/internal/BUILD.gn
@@ -23,6 +23,7 @@ ] deps = [ "//base:base_java", + "//chrome/browser/profiles/android:java", "//chrome/browser/tab:java", "//chrome/browser/tabmodel:java", "//third_party/kotlin_stdlib:kotlin_stdlib_java",
diff --git a/chrome/browser/tabmodel/internal/android/java/src/org/chromium/chrome/browser/tabmodel/TabWindowManagerImpl.java b/chrome/browser/tabmodel/internal/android/java/src/org/chromium/chrome/browser/tabmodel/TabWindowManagerImpl.java index 02139be..4dc661c 100644 --- a/chrome/browser/tabmodel/internal/android/java/src/org/chromium/chrome/browser/tabmodel/TabWindowManagerImpl.java +++ b/chrome/browser/tabmodel/internal/android/java/src/org/chromium/chrome/browser/tabmodel/TabWindowManagerImpl.java
@@ -11,6 +11,8 @@ import org.chromium.base.ActivityState; import org.chromium.base.ApplicationStatus; import org.chromium.base.ApplicationStatus.ActivityStateListener; +import org.chromium.base.supplier.OneshotSupplier; +import org.chromium.chrome.browser.profiles.ProfileProvider; import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.browser.tabmodel.NextTabPolicy.NextTabPolicySupplier; @@ -48,8 +50,11 @@ } @Override - public Pair<Integer, TabModelSelector> requestSelector(Activity activity, - TabCreatorManager tabCreatorManager, NextTabPolicySupplier nextTabPolicySupplier, + public Pair<Integer, TabModelSelector> requestSelector( + Activity activity, + OneshotSupplier<ProfileProvider> profileProviderSupplier, + TabCreatorManager tabCreatorManager, + NextTabPolicySupplier nextTabPolicySupplier, int index) { if (index < 0 || index >= mSelectors.size()) return null; @@ -79,8 +84,13 @@ // Too many activities going at once. if (mSelectors.get(index) != null) return null; - TabModelSelector selector = mSelectorFactory.buildSelector( - activity, tabCreatorManager, nextTabPolicySupplier, index); + TabModelSelector selector = + mSelectorFactory.buildSelector( + activity, + profileProviderSupplier, + tabCreatorManager, + nextTabPolicySupplier, + index); mSelectors.set(index, selector); mAssignments.put(activity, selector);
diff --git a/chrome/browser/touch_to_fill/password_generation/android/internal/java/res/layout/touch_to_fill_password_generation.xml b/chrome/browser/touch_to_fill/password_generation/android/internal/java/res/layout/touch_to_fill_password_generation.xml index 2e798e5..19809c5a 100644 --- a/chrome/browser/touch_to_fill/password_generation/android/internal/java/res/layout/touch_to_fill_password_generation.xml +++ b/chrome/browser/touch_to_fill/password_generation/android/internal/java/res/layout/touch_to_fill_password_generation.xml
@@ -13,64 +13,74 @@ android:layout_marginVertical="@dimen/ttf_drag_handlebar_margin" android:importantForAccessibility="no" app:srcCompat="@drawable/drag_handlebar" /> - <ImageView - android:id="@+id/touch_to_fill_sheet_header_image" - android:layout_width="@dimen/touch_to_fill_favicon_size_modern" - android:layout_height="@dimen/touch_to_fill_favicon_size_modern" - android:layout_gravity="center_horizontal" - android:layout_marginVertical="16dp" - android:importantForAccessibility="no" /> - <LinearLayout + <org.chromium.components.browser_ui.widget.FadingEdgeScrollView android:layout_width="match_parent" - android:layout_height="wrap_content" - android:orientation="vertical" - android:focusable="true"> - <TextView - android:id="@+id/touch_to_fill_sheet_title" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center_horizontal" - android:layout_marginHorizontal="@dimen/ttf_sheet_padding" - android:textAlignment="center" - android:textAppearance="@style/TextAppearance.Headline.Primary" - android:text="@string/password_generation_bottom_sheet_title"/> - <TextView - android:id="@+id/touch_to_fill_sheet_subtitle" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center_horizontal" - android:layout_marginHorizontal="@dimen/ttf_sheet_padding" - android:layout_marginBottom="24dp" - android:textAlignment="center" - android:textAppearance="@style/TextAppearance.TextMedium.Secondary"/> - </LinearLayout> - <TextView - android:id="@+id/password" - android:layout_width="match_parent" - android:layout_height="52dp" - android:layout_marginHorizontal="@dimen/ttf_sheet_padding" - android:layout_marginBottom="24dp" - android:gravity="center" - android:background="@drawable/touch_to_fill_credential_background_modern_rounded_all" - android:singleLine="true" - android:textAppearance="@style/TextAppearance.TextMedium.Primary" - android:focusable="true"/> - <org.chromium.ui.widget.ButtonCompat - android:id="@+id/use_password_button" - android:text="@string/password_generation_bottom_sheet_use_password_button" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginBottom="14dp" - android:layout_marginHorizontal="@dimen/ttf_sheet_padding" - android:gravity="center" - style="@style/FilledButton.Flat"/> - <org.chromium.ui.widget.ButtonCompat - android:id="@+id/reject_password_button" - android:text="@string/password_generation_bottom_sheet_dismiss_button" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginBottom="20dp" - android:layout_marginHorizontal="@dimen/ttf_sheet_padding" - android:gravity="center" - style="@style/TextButton"/> + android:layout_height="0dp" + android:layout_weight="1"> + <LinearLayout + android:orientation="vertical" + android:layout_width="match_parent" + android:layout_height="wrap_content"> + <ImageView + android:id="@+id/touch_to_fill_sheet_header_image" + android:layout_width="@dimen/touch_to_fill_favicon_size_modern" + android:layout_height="@dimen/touch_to_fill_favicon_size_modern" + android:layout_gravity="center_horizontal" + android:layout_marginVertical="16dp" + android:importantForAccessibility="no" /> + <LinearLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:orientation="vertical" + android:focusable="true"> + <TextView + android:id="@+id/touch_to_fill_sheet_title" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + android:layout_marginHorizontal="@dimen/ttf_sheet_padding" + android:textAlignment="center" + android:textAppearance="@style/TextAppearance.Headline.Primary" + android:text="@string/password_generation_bottom_sheet_title"/> + <TextView + android:id="@+id/touch_to_fill_sheet_subtitle" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_gravity="center_horizontal" + android:layout_marginHorizontal="@dimen/ttf_sheet_padding" + android:layout_marginBottom="24dp" + android:textAlignment="center" + android:textAppearance="@style/TextAppearance.TextMedium.Secondary"/> + </LinearLayout> + <TextView + android:id="@+id/password" + android:layout_width="match_parent" + android:layout_height="52dp" + android:layout_marginHorizontal="@dimen/ttf_sheet_padding" + android:layout_marginBottom="24dp" + android:gravity="center" + android:background="@drawable/touch_to_fill_credential_background_modern_rounded_all" + android:singleLine="true" + android:textAppearance="@style/TextAppearance.TextMedium.Primary" + android:focusable="true"/> + <org.chromium.ui.widget.ButtonCompat + android:id="@+id/use_password_button" + android:text="@string/password_generation_bottom_sheet_use_password_button" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="14dp" + android:layout_marginHorizontal="@dimen/ttf_sheet_padding" + android:gravity="center" + style="@style/FilledButton.Flat"/> + <org.chromium.ui.widget.ButtonCompat + android:id="@+id/reject_password_button" + android:text="@string/password_generation_bottom_sheet_dismiss_button" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginBottom="20dp" + android:layout_marginHorizontal="@dimen/ttf_sheet_padding" + android:gravity="center" + style="@style/TextButton"/> + </LinearLayout> + </org.chromium.components.browser_ui.widget.FadingEdgeScrollView> </LinearLayout> \ No newline at end of file
diff --git a/chrome/browser/touch_to_fill/password_generation/android/internal/java/src/org/chromium/chrome/browser/touch_to_fill/password_generation/TouchToFillPasswordGenerationCoordinator.java b/chrome/browser/touch_to_fill/password_generation/android/internal/java/src/org/chromium/chrome/browser/touch_to_fill/password_generation/TouchToFillPasswordGenerationCoordinator.java index 6c75111..fa4f8401 100644 --- a/chrome/browser/touch_to_fill/password_generation/android/internal/java/src/org/chromium/chrome/browser/touch_to_fill/password_generation/TouchToFillPasswordGenerationCoordinator.java +++ b/chrome/browser/touch_to_fill/password_generation/android/internal/java/src/org/chromium/chrome/browser/touch_to_fill/password_generation/TouchToFillPasswordGenerationCoordinator.java
@@ -166,17 +166,6 @@ private void onGeneratedPasswordRejected() { mTouchToFillPasswordGenerationDelegate.onGeneratedPasswordRejected(); onDismissed(InteractionResult.REJECTED_GENERATED_PASSWORD); - restoreKeyboardFocus(); - } - - private void restoreKeyboardFocus() { - if (mWebContents.getViewAndroidDelegate() == null) return; - if (mWebContents.getViewAndroidDelegate().getContainerView() == null) return; - - View webContentView = mWebContents.getViewAndroidDelegate().getContainerView(); - if (webContentView.requestFocus()) { - mKeyboardVisibilityDelegate.showKeyboard(webContentView); - } } private void hideKeyboard() {
diff --git a/chrome/browser/touch_to_fill/password_generation/android/internal/java/src/org/chromium/chrome/browser/touch_to_fill/password_generation/TouchToFillPasswordGenerationModuleTest.java b/chrome/browser/touch_to_fill/password_generation/android/internal/java/src/org/chromium/chrome/browser/touch_to_fill/password_generation/TouchToFillPasswordGenerationModuleTest.java index 61cdca3..e609009 100644 --- a/chrome/browser/touch_to_fill/password_generation/android/internal/java/src/org/chromium/chrome/browser/touch_to_fill/password_generation/TouchToFillPasswordGenerationModuleTest.java +++ b/chrome/browser/touch_to_fill/password_generation/android/internal/java/src/org/chromium/chrome/browser/touch_to_fill/password_generation/TouchToFillPasswordGenerationModuleTest.java
@@ -183,17 +183,6 @@ } @Test - public void testKeyboardIsDisplayedWhenPasswordRejected() { - ViewAndroidDelegate viewAndroidDelegate = ViewAndroidDelegate.createBasicDelegate(mContent); - when(mWebContents.getViewAndroidDelegate()).thenReturn(viewAndroidDelegate); - show(); - - Button rejectPasswordButton = mContent.findViewById(R.id.reject_password_button); - rejectPasswordButton.performClick(); - verify(mKeyboardVisibilityDelegate).showKeyboard(mContent); - } - - @Test public void testKeyboardIsHiddenWhenBottomSheetIsDisplayed() { ViewAndroidDelegate viewAndroidDelegate = ViewAndroidDelegate.createBasicDelegate(mContent); when(mWebContents.getViewAndroidDelegate()).thenReturn(viewAndroidDelegate);
diff --git a/chrome/browser/touch_to_fill/password_generation/android/touch_to_fill_password_generation_controller.cc b/chrome/browser/touch_to_fill/password_generation/android/touch_to_fill_password_generation_controller.cc index 6296d317..77af105a 100644 --- a/chrome/browser/touch_to_fill/password_generation/android/touch_to_fill_password_generation_controller.cc +++ b/chrome/browser/touch_to_fill/password_generation/android/touch_to_fill_password_generation_controller.cc
@@ -100,9 +100,7 @@ } void TouchToFillPasswordGenerationController::OnGeneratedPasswordRejected() { - manual_filling_controller_->OnAccessoryActionAvailabilityChanged( - ShouldShowAction(true), - autofill::AccessoryAction::GENERATE_PASSWORD_AUTOMATIC); + // TODO (crbug.com/1495639) Trigger Keyboard Accessory here. } void TouchToFillPasswordGenerationController::AddSuppressShowingImeCallback() {
diff --git a/chrome/browser/touch_to_fill/password_generation/android/touch_to_fill_password_generation_controller_unittest.cc b/chrome/browser/touch_to_fill/password_generation/android/touch_to_fill_password_generation_controller_unittest.cc index d284539..ab2cf1a 100644 --- a/chrome/browser/touch_to_fill/password_generation/android/touch_to_fill_password_generation_controller_unittest.cc +++ b/chrome/browser/touch_to_fill/password_generation/android/touch_to_fill_password_generation_controller_unittest.cc
@@ -129,25 +129,6 @@ controller.reset(); } -TEST_F(TouchToFillPasswordGenerationControllerTest, - TriggersKeyboardAccessoryWhenGeneratedPasswordRejected) { - auto controller = std::make_unique<TouchToFillPasswordGenerationController>( - password_mananger_driver(), web_contents(), - PasswordGenerationElementData(), - std::make_unique<MockTouchToFillPasswordGenerationBridge>(), - on_dismissed_callback_.Get(), - mock_manual_filling_controller_.AsWeakPtr()); - - controller->ShowTouchToFill( - test_user_account_, PasswordGenerationType::kAutomatic, pref_service()); - - EXPECT_CALL(mock_manual_filling_controller_, - OnAccessoryActionAvailabilityChanged( - ShouldShowAction(true), - autofill::AccessoryAction::GENERATE_PASSWORD_AUTOMATIC)); - controller->OnGeneratedPasswordRejected(); -} - class TouchToFillPasswordGenerationControllerMetricsTest : public TouchToFillPasswordGenerationControllerTest, public testing::WithParamInterface<
diff --git a/chrome/browser/tpcd/heuristics/opener_heuristic_browsertest.cc b/chrome/browser/tpcd/heuristics/opener_heuristic_browsertest.cc index e771504..b1c1a063 100644 --- a/chrome/browser/tpcd/heuristics/opener_heuristic_browsertest.cc +++ b/chrome/browser/tpcd/heuristics/opener_heuristic_browsertest.cc
@@ -476,6 +476,11 @@ GURL opener_url = embedded_test_server()->GetURL("a.test", "/title1.html"); GURL popup_url = embedded_test_server()->GetURL("b.test", "/title1.html"); + // Allow access for third-party cookies from popup_url. + auto cookie_settings = CookieSettingsFactory::GetForProfile( + Profile::FromBrowserContext(GetActiveWebContents()->GetBrowserContext())); + cookie_settings->SetCookieSetting(popup_url, CONTENT_SETTING_ALLOW); + // Initialize interaction and popup. RecordInteraction(popup_url, clock_.Now() - base::Hours(3)); ASSERT_TRUE(content::NavigateToURL(GetActiveWebContents(), opener_url)); @@ -700,6 +705,13 @@ embedded_test_server()->GetURL("b.test", "/server-redirect?title1.html"); GURL popup_url_3 = embedded_test_server()->GetURL("b.test", "/title1.html"); + // Allow access for third-party cookies from the popup URLs. + auto cookie_settings = CookieSettingsFactory::GetForProfile( + Profile::FromBrowserContext(GetActiveWebContents()->GetBrowserContext())); + cookie_settings->SetCookieSetting(popup_url_1, CONTENT_SETTING_ALLOW); + cookie_settings->SetCookieSetting(popup_url_2, CONTENT_SETTING_ALLOW); + cookie_settings->SetCookieSetting(popup_url_3, CONTENT_SETTING_ALLOW); + // Initialize popup and interaction. ASSERT_TRUE(content::NavigateToURL(GetActiveWebContents(), opener_url)); auto maybe_popup = OpenPopup(popup_url_1);
diff --git a/chrome/browser/ui/android/multiwindow/java/res/layout/instance_switcher_item.xml b/chrome/browser/ui/android/multiwindow/java/res/layout/instance_switcher_item.xml index 776f7630..321c580 100644 --- a/chrome/browser/ui/android/multiwindow/java/res/layout/instance_switcher_item.xml +++ b/chrome/browser/ui/android/multiwindow/java/res/layout/instance_switcher_item.xml
@@ -87,7 +87,7 @@ android:importantForAccessibility="no" style="@style/ListItemEndIcon" /> - <org.chromium.components.browser_ui.widget.listmenu.ListMenuButton + <org.chromium.ui.listmenu.ListMenuButton android:id="@+id/more" android:src="@drawable/ic_more_vert_24dp" android:layout_width="@dimen/min_touch_target_size"
diff --git a/chrome/browser/ui/android/multiwindow/java/src/org/chromium/chrome/browser/multiwindow/InstanceSwitcherCoordinator.java b/chrome/browser/ui/android/multiwindow/java/src/org/chromium/chrome/browser/multiwindow/InstanceSwitcherCoordinator.java index fa3f423..77bd83d 100644 --- a/chrome/browser/ui/android/multiwindow/java/src/org/chromium/chrome/browser/multiwindow/InstanceSwitcherCoordinator.java +++ b/chrome/browser/ui/android/multiwindow/java/src/org/chromium/chrome/browser/multiwindow/InstanceSwitcherCoordinator.java
@@ -26,10 +26,10 @@ import org.chromium.chrome.browser.preferences.ChromePreferenceKeys; import org.chromium.chrome.browser.preferences.ChromeSharedPreferences; import org.chromium.components.browser_ui.widget.BrowserUiListMenuUtils; -import org.chromium.components.browser_ui.widget.listmenu.BasicListMenu; -import org.chromium.components.browser_ui.widget.listmenu.ListMenu; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuItemProperties; import org.chromium.components.favicon.LargeIconBridge; +import org.chromium.ui.listmenu.BasicListMenu; +import org.chromium.ui.listmenu.ListMenu; +import org.chromium.ui.listmenu.ListMenuItemProperties; import org.chromium.ui.modaldialog.DialogDismissalCause; import org.chromium.ui.modaldialog.ModalDialogManager; import org.chromium.ui.modaldialog.ModalDialogManager.ModalDialogType;
diff --git a/chrome/browser/ui/android/multiwindow/java/src/org/chromium/chrome/browser/multiwindow/InstanceSwitcherItemProperties.java b/chrome/browser/ui/android/multiwindow/java/src/org/chromium/chrome/browser/multiwindow/InstanceSwitcherItemProperties.java index a6c4299..eae96a6 100644 --- a/chrome/browser/ui/android/multiwindow/java/src/org/chromium/chrome/browser/multiwindow/InstanceSwitcherItemProperties.java +++ b/chrome/browser/ui/android/multiwindow/java/src/org/chromium/chrome/browser/multiwindow/InstanceSwitcherItemProperties.java
@@ -7,7 +7,7 @@ import android.graphics.drawable.Drawable; import android.view.View; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButtonDelegate; +import org.chromium.ui.listmenu.ListMenuButtonDelegate; import org.chromium.ui.modelutil.PropertyKey; import org.chromium.ui.modelutil.PropertyModel;
diff --git a/chrome/browser/ui/android/multiwindow/java/src/org/chromium/chrome/browser/multiwindow/InstanceSwitcherItemViewBinder.java b/chrome/browser/ui/android/multiwindow/java/src/org/chromium/chrome/browser/multiwindow/InstanceSwitcherItemViewBinder.java index be392f6f..012fb5f8 100644 --- a/chrome/browser/ui/android/multiwindow/java/src/org/chromium/chrome/browser/multiwindow/InstanceSwitcherItemViewBinder.java +++ b/chrome/browser/ui/android/multiwindow/java/src/org/chromium/chrome/browser/multiwindow/InstanceSwitcherItemViewBinder.java
@@ -8,8 +8,8 @@ import android.widget.ImageView; import android.widget.TextView; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButton; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButtonDelegate; +import org.chromium.ui.listmenu.ListMenuButton; +import org.chromium.ui.listmenu.ListMenuButtonDelegate; import org.chromium.ui.modelutil.PropertyKey; import org.chromium.ui.modelutil.PropertyModel;
diff --git a/chrome/browser/ui/android/strings/translations/android_chrome_strings_ar.xtb b/chrome/browser/ui/android/strings/translations/android_chrome_strings_ar.xtb index c0e28f7..7a68d6cb 100644 --- a/chrome/browser/ui/android/strings/translations/android_chrome_strings_ar.xtb +++ b/chrome/browser/ui/android/strings/translations/android_chrome_strings_ar.xtb
@@ -31,6 +31,7 @@ <translation id="1142732900304639782">عدم اقتراح ترجمة لهذه المواقع الإلكترونية</translation> <translation id="1145536944570833626">سيتم حذف البيانات الحالية.</translation> <translation id="1150263420752757504">سيتم فتح تطبيق "<ph name="APP_NAME" />" في Chrome. تعني المتابعة موافقتك على <ph name="BEGIN_LINK1" />بنود خدمة Google<ph name="END_LINK1" /> و<ph name="BEGIN_LINK2" />بنود الخدمة الإضافية لكل من متصفّح Google Chrome ونظام التشغيل Chrome<ph name="END_LINK2" />.</translation> +<translation id="115483310321669804">استخدام كلمة المرور "<ph name="PASSWORD" />"</translation> <translation id="1173894706177603556">إعادة تسمية</translation> <translation id="1174479719160874822">Chrome سيطلب الوصول إلى الموقع الإلكتروني المتوافق مع الأجهزة الجوّالة عندما يكون عرض الشاشة محدودًا</translation> <translation id="1177863135347784049">مخصص</translation> @@ -143,6 +144,7 @@ <translation id="1779766957982586368">إغلاق النافذة</translation> <translation id="1791662854739702043">تم التثبيت</translation> <translation id="1792959175193046959">تغيير موقع التنزيل التلقائي في أي وقت</translation> +<translation id="1796666869097395659">تصغير علامة التبويب للرجوع إليها لاحقًا</translation> <translation id="1807246157184219062">فاتح</translation> <translation id="1810845389119482123">إعداد المزامنة الأولية لم يكتمل</translation> <translation id="1812027881030482584">ليس بإمكان "<ph name="SITE_ETLD_PLUS_ONE" />" مواصلة استخدام "<ph name="IDENTITY_PROVIDER_ETLD_PLUS_ONE" />".</translation>
diff --git a/chrome/browser/ui/android/strings/translations/android_chrome_strings_be.xtb b/chrome/browser/ui/android/strings/translations/android_chrome_strings_be.xtb index 76ed165..9ea689b 100644 --- a/chrome/browser/ui/android/strings/translations/android_chrome_strings_be.xtb +++ b/chrome/browser/ui/android/strings/translations/android_chrome_strings_be.xtb
@@ -140,6 +140,7 @@ <translation id="1750259112639922169">Група ўкладак – Колькасць: <ph name="TAB_COUNT" /></translation> <translation id="17513872634828108">Адкрытыя ўкладкі</translation> <translation id="1757620656501361327">Паведамленне Менеджара пароляў Google</translation> +<translation id="1760873718737761808">{FILE_COUNT,plural, =1{Старонкі, 1 старонка ў спісе}one{Старонкі, # старонка ў спісе}few{Старонкі, # старонкі ў спісе}many{Старонкі, # старонак у спісе}other{Старонкі, # старонкі ў спісе}}</translation> <translation id="1778457539567749232">Пазначыць як непрачытанае</translation> <translation id="1779766957982586368">Закрыць акно</translation> <translation id="1791662854739702043">Усталявана</translation> @@ -249,6 +250,7 @@ <translation id="2414886740292270097">Цёмная</translation> <translation id="2421705177906985956">Пакуль што сайтаў няма</translation> <translation id="2426805022920575512">Выбраць іншы ўліковы запіс</translation> +<translation id="2427025860753516072">{FILE_COUNT,plural, =1{Відэа, 1 відэа ў спісе}one{Відэа, # відэа ў спісе}few{Відэа, # відэа ў спісе}many{Відэа, # відэа ў спісе}other{Відэа, # відэа ў спісе}}</translation> <translation id="2433507940547922241">Выгляд</translation> <translation id="2435457462613246316">Паказаць пароль</translation> <translation id="2439153523196674349">Перадпрагляд сайта "<ph name="SITE_NAME" />"</translation> @@ -724,6 +726,7 @@ <translation id="4864369630010738180">Уваход...</translation> <translation id="4866368707455379617">Не ўдалося ўсталяваць модуль "<ph name="MODULE" />" для Chrome</translation> <translation id="4871568871368204250">Выключыць сінхранізацыю</translation> +<translation id="4874961007154620743">Калі гэта налада выключана, вы ўсё роўна будзеце бачыць лакальныя прапановы ад Chrome</translation> <translation id="4875775213178255010">Рэкамендацыі змесціва</translation> <translation id="4877678010818027629">Увайсці ў рэжым інкогніта</translation> <translation id="4878404682131129617">Не ўдалося стварыць тунэль праз проксі-сервер</translation> @@ -1100,6 +1103,7 @@ <translation id="6795633245022906657">Хуткае адкрыццё новай укладкі. Каб змяніць функцыю гэтай кнопкі, перайдзіце ў Налады.</translation> <translation id="6802555630140434547">Акно будзе закрыта</translation> <translation id="6811034713472274749">Старонка гатовая да прагляду</translation> +<translation id="6813359536773993594">{FILE_COUNT,plural, =1{Відарысы, 1 відарыс у спісе}one{Відарысы, # відарыс у спісе}few{Відарысы, # відарысы ў спісе}many{Відарысы, # відарысаў у спісе}other{Відарысы, # відарыса ў спісе}}</translation> <translation id="6813446258015311409">Аркуш "Увайсці ў Chrome" адкрыты.</translation> <translation id="6817747507826986771">Хуткае абагульванне гэтай старонкі. Каб змяніць функцыю гэтай кнопкі, націсніце на яе і ўтрымлівайце.</translation> <translation id="6819199143469632133">Увайдзіце ва ўліковы запіс, каб карыстацца прадуктамі Google на некалькіх прыладах</translation> @@ -1113,6 +1117,7 @@ <translation id="6846298663435243399">Ідзе загрузка…</translation> <translation id="6850409657436465440">Спампоўка ўсё яшчэ працягваецца</translation> <translation id="6850830437481525139">Закрытыя ўкладкі (<ph name="TAB_COUNT" />)</translation> +<translation id="685340923442249391">{FILE_COUNT,plural, =1{Аўдыяфайлы, 1 аўдыяфайл у спісе}one{Аўдыяфайлы, # аўдыяфайл у спісе}few{Аўдыяфайлы, # аўдыяфайлы ў спісе}many{Аўдыяфайлы, # аўдыяфайлаў у спісе}other{Аўдыяфайлы, # аўдыяфайла ў спісе}}</translation> <translation id="685850645784703949">Рэкамендацыі ад Google выключаны</translation> <translation id="686366188661646310">Выдаліць пароль?</translation> <translation id="6864459304226931083">Спампаваць відарыс</translation> @@ -1218,6 +1223,7 @@ <translation id="7379900596734708416">Цёмная тэма для сайтаў даступная</translation> <translation id="7388615499319468910">Сайты і рэкламадаўцы могуць ацэньваць эфектыўнасць рэкламы. Гэта налада выключана.</translation> <translation id="7397416715506917976">Праглядзець статыстыку</translation> +<translation id="7400003506822844357">{FILE_COUNT,plural, =1{Іншае, 1 файл у спісе}one{Іншае, # файл у спісе}few{Іншае, # файлы ў спісе}many{Іншае, # файлаў у спісе}other{Іншае, # файла ў спісе}}</translation> <translation id="7400418766976504921">URL-адрас</translation> <translation id="7403691278183511381">Першы запуск Chrome</translation> <translation id="7411224099004328643">Карыстальнік Уліковага запісу Google</translation> @@ -1311,6 +1317,7 @@ <translation id="780301667611848630">Не, дзякуй</translation> <translation id="7808889146555843082">Пры выдаленні гэтага пароля ўліковы запіс на сайце <ph name="SITE" /> не выдаліцца. Каб абараніць свой уліковы запіс (на <ph name="SITE" />), выдаліце яго або змяніце пароль.</translation> <translation id="7810647596859435254">Адкрыць з дапамогай…</translation> +<translation id="7814066895362068701">{FILE_COUNT,plural, =1{Усе файлы, 1 файл у спісе}one{Усе файлы, # файл у спісе}few{Усе файлы, # файлы ў спісе}many{Усе файлы, # файлаў у спісе}other{Усе файлы, # файла ў спісе}}</translation> <translation id="7815484226266492798">Доўгі здымак экрана</translation> <translation id="7822705602465980873">Даныя будуць звязаны з Уліковым запісам Google, у які вы ўвайшлі. Гэта дазволіць абараніць вас у сэрвісах Google (напрыклад, узмацніць абарону ў Gmail пасля парушэння бяспекі).</translation> <translation id="782705168687182233">Гісторыя вашых дзеянняў захоўваецца ва <ph name="BEGIN_LINK" />Уліковым запісе Google<ph name="END_LINK" />.</translation> @@ -1535,6 +1542,7 @@ <translation id="8924575305646776101"><ph name="BEGIN_LINK" />Даведацца больш<ph name="END_LINK" /></translation> <translation id="892496902842311796"><ph name="LANG" />: спампавана</translation> <translation id="8937772741022875483">Выдаліць вашы дзеянні ў Chrome са службы лічбавага камфорту?</translation> +<translation id="893938492099608175">У залежнасці ад выбраных налад Chrome можа таксама перадаваць файлы cookie, ваш бягучы URL-адрас і геаданыя</translation> <translation id="8942627711005830162">Адкрыць у іншым акне</translation> <translation id="8945143127965743188"><ph name="LANG" /> – не ўдалося спампаваць гэты моўны пакет. Паўтарыце спробу пазней.</translation> <translation id="8955719471735800169">Наверх</translation>
diff --git a/chrome/browser/ui/android/strings/translations/android_chrome_strings_bs.xtb b/chrome/browser/ui/android/strings/translations/android_chrome_strings_bs.xtb index 26d1c54..6153ade9a 100644 --- a/chrome/browser/ui/android/strings/translations/android_chrome_strings_bs.xtb +++ b/chrome/browser/ui/android/strings/translations/android_chrome_strings_bs.xtb
@@ -140,6 +140,7 @@ <translation id="1750259112639922169">Grupa kartica – <ph name="TAB_COUNT" /> kart.</translation> <translation id="17513872634828108">Otvorene kartice</translation> <translation id="1757620656501361327">Ažuriranje Google upravitelja lozinki</translation> +<translation id="1760873718737761808">{FILE_COUNT,plural, =1{Stranice, 1 stranica na popisu}one{Stranice, # stranica na popisu}few{Stranice, # stranice na popisu}other{Stranice, # stranica na popisu}}</translation> <translation id="1778457539567749232">Označi kao nepročitano</translation> <translation id="1779766957982586368">Zatvori prozor</translation> <translation id="1791662854739702043">Instalirano</translation> @@ -249,6 +250,7 @@ <translation id="2414886740292270097">Tamno</translation> <translation id="2421705177906985956">Trenutno nema nijedne web lokacije za prikaz</translation> <translation id="2426805022920575512">Odaberite drugi račun</translation> +<translation id="2427025860753516072">{FILE_COUNT,plural, =1{Videozapisi, 1 videozapis na popisu}one{Videozapisi, # videozapis na popisu}few{Videozapisi, # videozapisa na popisu}other{Videozapisi, # videozapisa na popisu}}</translation> <translation id="2433507940547922241">Izgled</translation> <translation id="2435457462613246316">Prikaži lozinku</translation> <translation id="2439153523196674349">Pregled web lokacije <ph name="SITE_NAME" /></translation> @@ -724,6 +726,7 @@ <translation id="4864369630010738180">Prijavljivanje…</translation> <translation id="4866368707455379617">Nije moguće instalirati modul <ph name="MODULE" /> za Chrome</translation> <translation id="4871568871368204250">Isključi sinhronizaciju</translation> +<translation id="4874961007154620743">Kad je isključeno, i dalje ćete vidjeti prijedloge koje Chrome pruža lokalno</translation> <translation id="4875775213178255010">Prijedlozi za sadržaj</translation> <translation id="4877678010818027629">Uđite u anonimni način rada</translation> <translation id="4878404682131129617">Uspostavljanje tunela putem proksi servera nije uspjelo</translation> @@ -1100,6 +1103,7 @@ <translation id="6795633245022906657">Brzo otvorite novu karticu. Da uredite ovu prečicu, idite u Postavke.</translation> <translation id="6802555630140434547">Prozor će se zatvoriti</translation> <translation id="6811034713472274749">Stranica je sprema za prikaz</translation> +<translation id="6813359536773993594">{FILE_COUNT,plural, =1{Slike, 1 slika na popisu}one{Slike, # slika na popisu}few{Slike, # slike na popisu}other{Slike, # slika na popisu}}</translation> <translation id="6813446258015311409">Prijava na Chrome je otvorena.</translation> <translation id="6817747507826986771">Brzo dijelite ovu stranicu. Dodirnite i zadržite da uredite ovu prečicu.</translation> <translation id="6819199143469632133">Da imate sve Googleove proizvode koje koristite na svim uređajima, prijavite se</translation> @@ -1113,6 +1117,7 @@ <translation id="6846298663435243399">Učitavanje…</translation> <translation id="6850409657436465440">Vaše preuzimanje je još uvijek u toku</translation> <translation id="6850830437481525139">Broj zatvorenih kartica: <ph name="TAB_COUNT" /></translation> +<translation id="685340923442249391">{FILE_COUNT,plural, =1{Audiodatoteke, 1 audiodatoteka na popisu}one{Audiodatoteke, # audiodatoteka na popisu}few{Audiodatoteke, # audiodatoteke na popisu}other{Audiodatoteke, # audiodatoteka na popisu}}</translation> <translation id="685850645784703949">Googleov Discover - isključeno</translation> <translation id="686366188661646310">Izbrisati lozinku?</translation> <translation id="6864459304226931083">Preuzmi sliku</translation> @@ -1218,6 +1223,7 @@ <translation id="7379900596734708416">Dostupna je tamna tema za web lokacije</translation> <translation id="7388615499319468910">Web lokacije i oglašivači mogu razumjeti performanse oglasa. Postavka je isključena.</translation> <translation id="7397416715506917976">Prikaži uvide u stranice</translation> +<translation id="7400003506822844357">{FILE_COUNT,plural, =1{Drugo, 1 datoteka na popisu}one{Drugo, # datoteka na popisu}few{Drugo, # datoteke na popisu}other{Drugo, # datoteka na popisu}}</translation> <translation id="7400418766976504921">URL</translation> <translation id="7403691278183511381">Iskustvo prvog pokretanja Chromea</translation> <translation id="7411224099004328643">Korisnik Google računa</translation> @@ -1311,6 +1317,7 @@ <translation id="780301667611848630">Ne, hvala</translation> <translation id="7808889146555843082">Brisanjem ove lozinke se neće izbrisati vaš račun na web lokaciji <ph name="SITE" />. Promijenite lozinku ili izbrišite račun na web lokaciji <ph name="SITE" /> da ga zaštitite od drugih.</translation> <translation id="7810647596859435254">Otvori koristeći…</translation> +<translation id="7814066895362068701">{FILE_COUNT,plural, =1{Sve datoteke, 1 datoteka na popisu}one{Sve datoteke, # datoteka na popisu}few{Sve datoteke, # datoteke na popisu}other{Sve datoteke, # datoteka na popisu}}</translation> <translation id="7815484226266492798">Dugi snimak ekrana</translation> <translation id="7822705602465980873">Kada ste prijavljeni, ovi podaci se povezuju s vašim Google računom radi vaše zaštite na svim Googleovim uslugama, naprimjer, povećavanjem zaštite na Gmailu nakon sigurnosnog incidenta.</translation> <translation id="782705168687182233">Vaša aktivnost se pohranjuje na <ph name="BEGIN_LINK" />Google račun<ph name="END_LINK" />.</translation> @@ -1535,6 +1542,7 @@ <translation id="8924575305646776101"><ph name="BEGIN_LINK" />Saznajte više<ph name="END_LINK" /></translation> <translation id="892496902842311796"><ph name="LANG" /> je spreman</translation> <translation id="8937772741022875483">Ukloniti aktivnosti Chromea iz Digitalnog blagostanja?</translation> +<translation id="893938492099608175">Ovisno o vašim postavkama, Chrome može slati i kolačiće, vaš trenutačni URL i lokaciju</translation> <translation id="8942627711005830162">Otvori u drugom prozoru</translation> <translation id="8945143127965743188"><ph name="LANG" /> – Preuzimanje ovog jezika nije uspjelo. Pokušajte ponovo kasnije.</translation> <translation id="8955719471735800169">Nazad na vrh</translation>
diff --git a/chrome/browser/ui/android/strings/translations/android_chrome_strings_eu.xtb b/chrome/browser/ui/android/strings/translations/android_chrome_strings_eu.xtb index 7602776f..9d5c3fa 100644 --- a/chrome/browser/ui/android/strings/translations/android_chrome_strings_eu.xtb +++ b/chrome/browser/ui/android/strings/translations/android_chrome_strings_eu.xtb
@@ -31,6 +31,7 @@ <translation id="1142732900304639782">Ez eskaini webgune hauek itzultzea</translation> <translation id="1145536944570833626">Ezabatu lehendik dauden datuak.</translation> <translation id="1150263420752757504">Chrome-n irekiko da <ph name="APP_NAME" />. Aurrera egiten baduzu, onartu egingo dituzu <ph name="BEGIN_LINK1" />Google-ren Zerbitzu-baldintzak<ph name="END_LINK1" /> eta <ph name="BEGIN_LINK2" />Google Chrome-ren eta Chrome OS-ren Zerbitzu-baldintza gehigarriak<ph name="END_LINK2" />.</translation> +<translation id="115483310321669804">Erabili <ph name="PASSWORD" /> pasahitza</translation> <translation id="1173894706177603556">Aldatu izena</translation> <translation id="1174479719160874822">Chrome-k mugikorretarako webgunea erabiltzeko eskaera egingo du pantaila estua denean</translation> <translation id="1177863135347784049">Pertsonalizatua</translation> @@ -143,6 +144,7 @@ <translation id="1779766957982586368">Itxi leihoa</translation> <translation id="1791662854739702043">Instalatu da</translation> <translation id="1792959175193046959">Deskargen kokapen lehenetsia aldatzeko aukera duzu</translation> +<translation id="1796666869097395659">Minimizatu fitxa geroago itzultzeko</translation> <translation id="1807246157184219062">Argia</translation> <translation id="1810845389119482123">Ez da amaitu hasierako sinkronizazioa konfiguratzen</translation> <translation id="1812027881030482584"><ph name="SITE_ETLD_PLUS_ONE" /> webguneak ezin du egin aurrera <ph name="IDENTITY_PROVIDER_ETLD_PLUS_ONE" /> hornitzailearekin</translation>
diff --git a/chrome/browser/ui/android/strings/translations/android_chrome_strings_hr.xtb b/chrome/browser/ui/android/strings/translations/android_chrome_strings_hr.xtb index dd882f6d..a9b0d7a 100644 --- a/chrome/browser/ui/android/strings/translations/android_chrome_strings_hr.xtb +++ b/chrome/browser/ui/android/strings/translations/android_chrome_strings_hr.xtb
@@ -140,6 +140,7 @@ <translation id="1750259112639922169">Grupa kartica – broj kartica: <ph name="TAB_COUNT" /></translation> <translation id="17513872634828108">Otvorene kartice</translation> <translation id="1757620656501361327">Ažuriranje Google upravitelja zaporki</translation> +<translation id="1760873718737761808">{FILE_COUNT,plural, =1{Stranice, 1 stranica na popisu}one{Stranice, # stranica na popisu}few{Stranice, # stranice na popisu}other{Stranice, # stranica na popisu}}</translation> <translation id="1778457539567749232">Označi kao nepročitano</translation> <translation id="1779766957982586368">Zatvori prozor</translation> <translation id="1791662854739702043">Instalirano</translation> @@ -249,6 +250,7 @@ <translation id="2414886740292270097">Tamno</translation> <translation id="2421705177906985956">Trenutačno nema web-lokacija za prikaz</translation> <translation id="2426805022920575512">Odaberi drugi račun</translation> +<translation id="2427025860753516072">{FILE_COUNT,plural, =1{Videozapisi, 1 videozapis na popisu}one{Videozapisi, # videozapis na popisu}few{Videozapisi, # videozapisa na popisu}other{Videozapisi, # videozapisa na popisu}}</translation> <translation id="2433507940547922241">Prikaz</translation> <translation id="2435457462613246316">Pokaži zaporku</translation> <translation id="2439153523196674349">Pregled feeda <ph name="SITE_NAME" /></translation> @@ -724,6 +726,7 @@ <translation id="4864369630010738180">Prijavljivanje...</translation> <translation id="4866368707455379617">Instaliranje modula <ph name="MODULE" /> za Chrome nije uspjelo</translation> <translation id="4871568871368204250">Isključivanje sinkronizacije</translation> +<translation id="4874961007154620743">Kad je isključeno, i dalje ćete vidjeti prijedloge koje Chrome pruža lokalno</translation> <translation id="4875775213178255010">Prijedlozi sadržaja</translation> <translation id="4877678010818027629">Otvori anonimni način</translation> <translation id="4878404682131129617">Uspostava tunela putem proxy poslužitelja nije uspjela</translation> @@ -1100,6 +1103,7 @@ <translation id="6795633245022906657">Brzo otvorite novu karticu. Da biste uredili prečac, otvorite Postavke.</translation> <translation id="6802555630140434547">Prozor će se zatvoriti</translation> <translation id="6811034713472274749">Stranica je spremna za prikaz</translation> +<translation id="6813359536773993594">{FILE_COUNT,plural, =1{Slike, 1 slika na popisu}one{Slike, # slika na popisu}few{Slike, # slike na popisu}other{Slike, # slika na popisu}}</translation> <translation id="6813446258015311409">Prijava u Chrome; otvoreno.</translation> <translation id="6817747507826986771">Brzo podijelite ovu stranicu. Da biste uredili taj prečac, dodirnite ga i zadržite pritisak.</translation> <translation id="6819199143469632133">Prijavite se da biste imali pristup Googleovim stvarima na svim uređajima</translation> @@ -1113,6 +1117,7 @@ <translation id="6846298663435243399">Učitavanje…</translation> <translation id="6850409657436465440">Preuzimanje je još u tijeku</translation> <translation id="6850830437481525139">Kartice su zatvorene (njih <ph name="TAB_COUNT" />)</translation> +<translation id="685340923442249391">{FILE_COUNT,plural, =1{Audiodatoteke, 1 audiodatoteka na popisu}one{Audiodatoteke, # audiodatoteka na popisu}few{Audiodatoteke, # audiodatoteke na popisu}other{Audiodatoteke, # audiodatoteka na popisu}}</translation> <translation id="685850645784703949">Googleov Discover – isključeno</translation> <translation id="686366188661646310">Izbrisati zaporku?</translation> <translation id="6864459304226931083">Preuzmi sliku</translation> @@ -1218,6 +1223,7 @@ <translation id="7379900596734708416">Dostupna je tamna tema za web-lokacije</translation> <translation id="7388615499319468910">Web-lokacije i oglašivači mogu razumjeti izvedbu oglasa. Postavka je isključena.</translation> <translation id="7397416715506917976">Prikaži uvide na stranici</translation> +<translation id="7400003506822844357">{FILE_COUNT,plural, =1{Drugo, 1 datoteka na popisu}one{Drugo, # datoteka na popisu}few{Drugo, # datoteke na popisu}other{Drugo, # datoteka na popisu}}</translation> <translation id="7400418766976504921">URL</translation> <translation id="7403691278183511381">Chromeov doživljaj prvog pokretanja</translation> <translation id="7411224099004328643">Korisnik Google računa</translation> @@ -1311,6 +1317,7 @@ <translation id="780301667611848630">Ne, hvala</translation> <translation id="7808889146555843082">Brisanjem zaporke neće se izbrisati vaš račun na <ph name="SITE" />. Izmijenite zaporku ili izbrišite račun na <ph name="SITE" /> da biste ga zaštitili od drugih.</translation> <translation id="7810647596859435254">Otvori aplikacijom…</translation> +<translation id="7814066895362068701">{FILE_COUNT,plural, =1{Sve datoteke, 1 datoteka na popisu}one{Sve datoteke, # datoteka na popisu}few{Sve datoteke, # datoteke na popisu}other{Sve datoteke, # datoteka na popisu}}</translation> <translation id="7815484226266492798">Duga snimka zaslona</translation> <translation id="7822705602465980873">Kad ste prijavljeni, ti se podaci povezuju s vašim Google računom kako biste dobili zaštitu na svim Googleovim uslugama, na primjer radi poboljšanja zaštite na Gmailu nakon sigurnosnog incidenta.</translation> <translation id="782705168687182233">Vaša aktivnost sprema se na vaš <ph name="BEGIN_LINK" />Google račun<ph name="END_LINK" />.</translation> @@ -1535,6 +1542,7 @@ <translation id="8924575305646776101"><ph name="BEGIN_LINK" />Saznajte više<ph name="END_LINK" /></translation> <translation id="892496902842311796">Spremno: <ph name="LANG" /></translation> <translation id="8937772741022875483">Želite li ukloniti svoju aktivnost u Chromeu iz Digitalne ravnoteže?</translation> +<translation id="893938492099608175">Ovisno o vašim postavkama, Chrome može slati i kolačiće, vaš trenutačni URL i lokaciju</translation> <translation id="8942627711005830162">Otvori u drugom prozoru</translation> <translation id="8945143127965743188"><ph name="LANG" /> – preuzimanje tog jezika nije uspjelo. Pokušajte ponovo kasnije.</translation> <translation id="8955719471735800169">Natrag na vrh</translation>
diff --git a/chrome/browser/ui/android/strings/translations/android_chrome_strings_iw.xtb b/chrome/browser/ui/android/strings/translations/android_chrome_strings_iw.xtb index fce5566f..447cd954 100644 --- a/chrome/browser/ui/android/strings/translations/android_chrome_strings_iw.xtb +++ b/chrome/browser/ui/android/strings/translations/android_chrome_strings_iw.xtb
@@ -741,6 +741,7 @@ <translation id="4925120120285606924">צילום מסך <ph name="CURRENT_DATE_ISO" /></translation> <translation id="49268022542405662">המערכת תייצא את הסיסמאות ותוריד אותן כקובץ טקסט. הן יהיו גלויות לכל המשתמשים והאפליקציות שיש להם גישה לתיקיית היעד.</translation> <translation id="4926901776383726965">אפשר לשמור תמונות וקבצים לצפייה במצב אופליין או לשיתוף באפליקציות אחרות</translation> +<translation id="4928144016283278047">הגנה מפני כלי מעקב (קובצי cookie של צד שלישי, מעקב אחר כתובות IP, סקריפטים פולשניים ועוד)</translation> <translation id="4932247056774066048">מכיוון שבחרת לצאת מחשבון שמנוהל על ידי <ph name="DOMAIN_NAME" />, נתוני Chrome שלך יימחקו מהמכשיר הזה. הם יישמרו בחשבון Google שלך.</translation> <translation id="4943703118917034429">מציאות מדומה</translation> <translation id="4943872375798546930">אין תוצאות</translation> @@ -1190,6 +1191,7 @@ <translation id="727288900855680735">לשלוח את <ph name="ONE_TIME_CODE" /> אל <ph name="ORIGIN" />?</translation> <translation id="7274013316676448362">אתר חסום</translation> <translation id="7276100255011548441">נושאים שנוספו לפני יותר מ-4 שבועות נמחקים מ-Chrome באופן אוטומטי. ככל שממשיכים לגלוש, נושא מסוים עשוי להופיע שוב ברשימה. אפשר גם לחסום נושאים כדי ש-Chrome לא ישתף אותם עם אתרים. <ph name="BEGIN_LINK" />מידע נוסף על ניהול הפרטיות בפרסום ב-Chrome<ph name="END_LINK" /></translation> +<translation id="7284878711178835966">תוך כדי הקלדה, Chrome שולח את התוכן של סרגל הכתובות או תיבת החיפוש למנוע החיפוש שמוגדר כברירת מחדל</translation> <translation id="7286703216224610554">שיתוף התגובה בלבד</translation> <translation id="7289303553784750393">אם יש חיבור לאינטרנט אבל הבעיה נמשכת, אפשר לנסות להמשיך בדרכים אחרות ב-<ph name="SITE_ETLD_PLUS_ONE" />.</translation> <translation id="7290209999329137901">לא ניתן היה לשנת את השם מפני שהפריט לא זמין</translation>
diff --git a/chrome/browser/ui/android/strings/translations/android_chrome_strings_ms.xtb b/chrome/browser/ui/android/strings/translations/android_chrome_strings_ms.xtb index bf72375..7cbd943 100644 --- a/chrome/browser/ui/android/strings/translations/android_chrome_strings_ms.xtb +++ b/chrome/browser/ui/android/strings/translations/android_chrome_strings_ms.xtb
@@ -1296,6 +1296,7 @@ <translation id="7691043218961417207">Terokai kandungan untuk diikuti</translation> <translation id="7697383401610880082">Pemegang seret</translation> <translation id="7698359219371678927">Buat e-mel dalam <ph name="APP_NAME" /></translation> +<translation id="7702029078562412515">Jubin pertanyaan</translation> <translation id="7702388902581909985">Tindakan mengosongkan data semakan imbas anda tidak membuat anda log keluar dari Google Account anda. Untuk berbuat demikian, <ph name="BEGIN_LINK1" />log keluar dari Chrome<ph name="END_LINK1" />.</translation> <translation id="7707922173985738739">Gunakan data mudah alih</translation> <translation id="7709918231054955894">Dapatkan semua tab anda</translation>
diff --git a/chrome/browser/ui/android/strings/translations/android_chrome_strings_my.xtb b/chrome/browser/ui/android/strings/translations/android_chrome_strings_my.xtb index 88e9966..24a81a10 100644 --- a/chrome/browser/ui/android/strings/translations/android_chrome_strings_my.xtb +++ b/chrome/browser/ui/android/strings/translations/android_chrome_strings_my.xtb
@@ -140,6 +140,7 @@ <translation id="1750259112639922169">တဘ်အုပ်စု - တဘ် <ph name="TAB_COUNT" /> ခု</translation> <translation id="17513872634828108">တဲဘ်များ ဖွင့်ရန်</translation> <translation id="1757620656501361327">Google Password Manager အပ်ဒိတ်</translation> +<translation id="1760873718737761808">{FILE_COUNT,plural, =1{စာမျက်နှာများ၊ စာရင်းရှိ စာမျက်နှာ ၁ ခု}other{စာမျက်နှာများ၊ စာရင်းရှိ စာမျက်နှာ # ခု}}</translation> <translation id="1778457539567749232">မဖတ်ရသေးဟု မှတ်သားရန်</translation> <translation id="1779766957982586368">ဝင်ဒိုး ပိတ်ရန်</translation> <translation id="1791662854739702043">ထည့်သွင်းပြီးပါပြီ</translation> @@ -249,6 +250,7 @@ <translation id="2414886740292270097">အမှောင်</translation> <translation id="2421705177906985956">ယခုပြရန် ဝဘ်ဆိုက် မရှိပါ</translation> <translation id="2426805022920575512">အခြားအကောင့် ရွေးရန်</translation> +<translation id="2427025860753516072">{FILE_COUNT,plural, =1{ဗီဒီယိုများ၊ စာရင်းရှိ ဗီဒီယို ၁ ခု}other{ဗီဒီယိုများ၊ စာရင်းရှိ ဗီဒီယို # ခု}}</translation> <translation id="2433507940547922241">ပုံပန်း</translation> <translation id="2435457462613246316">စကားဝှက်ကို ပြပါ</translation> <translation id="2439153523196674349"><ph name="SITE_NAME" /> အစမ်းကြည့်ခြင်း</translation> @@ -724,6 +726,7 @@ <translation id="4864369630010738180">လက်မှတ်ထိုးဝင်နေသည်...</translation> <translation id="4866368707455379617">Chrome အတွက် <ph name="MODULE" /> ကို စနစ်ထည့်သွင်း၍ မရပါ</translation> <translation id="4871568871368204250">စင့်ခ်လုပ်ခြင်းကို ပိတ်ရန်</translation> +<translation id="4874961007154620743">ပိတ်ထားပါက Chrome ကပေးသော ဒေသတွင်း အကြံပြုချက်များကို တွေ့နိုင်ပါသေးသည်</translation> <translation id="4875775213178255010">အကြောင်းအရာ အကြံပြုချက်များ</translation> <translation id="4877678010818027629">ရုပ်ဖျက်မုဒ်သို့ ဝင်ရန်</translation> <translation id="4878404682131129617">ပရောက်စီဆာဗာမှ လမ်းကြောင်းတစ်ခု စတင်မှု မအောင်မြင်ပါ</translation> @@ -1099,6 +1102,7 @@ <translation id="6795633245022906657">တဘ်အသစ် အမြန်ဖွင့်ပါ။ ဤဖြတ်လမ်းလင့်ခ်ကို ပြင်ဆင်ရန် ‘ဆက်တင်များ’ သို့ သွားပါ။</translation> <translation id="6802555630140434547">ဝင်းဒိုးကို ပိတ်ပါမည်</translation> <translation id="6811034713472274749">စာမျက်နှာကိုကြည့်ရန် အသင့်ဖြစ်ပါပြီ</translation> +<translation id="6813359536773993594">{FILE_COUNT,plural, =1{ဓာတ်ပုံများ၊ စာရင်းရှိ ပုံ ၁ ပုံ}other{ဓာတ်ပုံများ၊ စာရင်းရှိ ပုံ # ပုံ}}</translation> <translation id="6813446258015311409">Chrome သို့ လက်မှတ်ထိုးဝင်ရန်၊ ဖွင့်ထားသည်။</translation> <translation id="6817747507826986771">ဤစာမျက်နှာကို အမြန်မျှဝေပါ။ ဤဖြတ်လမ်းလင့်ခ်ကို ပြင်ဆင်ရန် တို့ထိ၍ဖိထားပါ။</translation> <translation id="6819199143469632133">စက်အားလုံးတွင် သင်၏ Google ဝန်ဆောင်မှုများ ရယူရန် လက်မှတ်ထိုးဝင်ပါ</translation> @@ -1112,6 +1116,7 @@ <translation id="6846298663435243399">တင်ပေးနေ…</translation> <translation id="6850409657436465440">သင်၏ ဒေါင်းလုဒ်ကို လုပ်နေဆဲဖြစ်သည်</translation> <translation id="6850830437481525139">တဘ် <ph name="TAB_COUNT" /> ခု ပိတ်လိုက်သည်</translation> +<translation id="685340923442249391">{FILE_COUNT,plural, =1{အသံဖိုင်များ၊ စာရင်းရှိ အသံဖိုင် ၁ ဖိုင်}other{အသံဖိုင်များ၊ စာရင်းရှိ အသံဖိုင် # ဖိုင်}}</translation> <translation id="685850645784703949">Discover by Google - ပိတ်ထားသည်</translation> <translation id="686366188661646310">စကားဝှက်ကို ဖျက်မလား။</translation> <translation id="6864459304226931083">ပုံကို ဒေါင်းလုဒ်လုပ်ပါ</translation> @@ -1217,6 +1222,7 @@ <translation id="7379900596734708416">ဝဘ်ဆိုက်များအတွက် အမှောင်နောက်ခံ ရနိုင်သည်</translation> <translation id="7388615499319468910">ဝဘ်ဆိုက်နှင့် ကြော်ငြာရှင်များက ကြော်ငြာလုပ်ဆောင်ပုံကို နားလည်နိုင်သည်။ ဤဆက်တင်ကို ပိတ်ထားသည်။</translation> <translation id="7397416715506917976">စာမျက်နှာ၏ သိကောင်းစရာ</translation> +<translation id="7400003506822844357">{FILE_COUNT,plural, =1{စာရင်းရှိ အခြားဖိုင် ၁ ဖိုင်}other{စာရင်းရှိ အခြားဖိုင် # ဖိုင်}}</translation> <translation id="7400418766976504921">URL</translation> <translation id="7403691278183511381">Chrome ကို ပထမဆုံး ဖွင့်ခြင်း အတွေ့အကြုံ</translation> <translation id="7411224099004328643">Google Account အသုံးပြုသူ</translation> @@ -1310,6 +1316,7 @@ <translation id="780301667611848630">မလိုပါ</translation> <translation id="7808889146555843082">ဤစကားဝှက်ကို ဖျက်ခြင်းဖြင့် <ph name="SITE" /> ရှိ သင့်အကောင့်ကို ဖျက်မည်မဟုတ်ပါ။ အခြားသူများ၏ ရန်မှကာကွယ်ရန် သင့်စကားဝှက်ကို ပြောင်းပါ သို့မဟုတ် <ph name="SITE" /> ရှိ သင့်အကောင့်ကို ဖျက်ပါ။</translation> <translation id="7810647596859435254">… ဖြင့် ဖွင့်ရန်</translation> +<translation id="7814066895362068701">{FILE_COUNT,plural, =1{ဖိုင်အားလုံး၊ စာရင်းရှိ ဖိုင် ၁ ဖိုင်}other{ဖိုင်အားလုံး၊ စာရင်းရှိ ဖိုင် # ဖိုင်}}</translation> <translation id="7815484226266492798">ဖန်သားပြင်ဓာတ်ပုံ အရှည်</translation> <translation id="7822705602465980873">သင်လက်မှတ်ထိုးဝင်ထားချိန်၌ Google ဝန်ဆောင်မှုများတွင် သင့်ကိုကာကွယ်ပေးရန် (ဥပမာ လုံခြုံရေးဆိုင်ရာ ဖြစ်ရပ်တစ်ခု ဖြစ်ပေါ်ပြီးနောက် Gmail တွင် ကာကွယ်မှု တိုးမြှင့်ခြင်း) ဤဒေတာကို သင့် Google Account တွင် လင့်ခ်ချိတ်ပါသည်။</translation> <translation id="782705168687182233">သင့် <ph name="BEGIN_LINK" />Google Account<ph name="END_LINK" /> တွင် သင်၏လုပ်ဆောင်ချက်ကို သိမ်းထားသည်။</translation> @@ -1534,6 +1541,7 @@ <translation id="8924575305646776101"><ph name="BEGIN_LINK" />ပိုမိုလေ့လာရန်<ph name="END_LINK" /></translation> <translation id="892496902842311796"><ph name="LANG" /> အသင့်ဖြစ်ပါပြီ</translation> <translation id="8937772741022875483">'ဒစ်ဂျစ်တယ် အာရောဂျံ' မှနေ၍ သင်၏ Chrome လုပ်ဆောင်ချက်ကို ဖယ်ရှားလိုပါသလား။</translation> +<translation id="893938492099608175">သင့်ဆက်တင်များအပေါ် မူတည်ပြီး Chrome က ကွတ်ကီးများ၊ သင်၏လက်ရှိ URL နှင့် သင့်တည်နေရာကိုလည်း ပို့နိုင်သည်</translation> <translation id="8942627711005830162">အခြားဝင်းဒိုးတွင် ဖွင့်ရန်</translation> <translation id="8945143127965743188"><ph name="LANG" /> - ဤဘာသာစကားကို ဒေါင်းလုဒ်လုပ်၍ မရပါ။ နောက်မှ ထပ်စမ်းပါ။</translation> <translation id="8955719471735800169">ထိပ်သို့ ပြန်သွားရန်</translation>
diff --git a/chrome/browser/ui/android/strings/translations/android_chrome_strings_uz.xtb b/chrome/browser/ui/android/strings/translations/android_chrome_strings_uz.xtb index 46e9a15..4be7143a 100644 --- a/chrome/browser/ui/android/strings/translations/android_chrome_strings_uz.xtb +++ b/chrome/browser/ui/android/strings/translations/android_chrome_strings_uz.xtb
@@ -741,6 +741,7 @@ <translation id="4925120120285606924">Skrinshot: <ph name="CURRENT_DATE_ISO" /></translation> <translation id="49268022542405662">Parolingiz eksport qilinadi va matn fayli sifatida yuklab olinadi. Ularni hamma koʻra oladi va har qanday ilova u joylashgan jildga kira oladi.</translation> <translation id="4926901776383726965">Rasm va fayllarni oflayn ochish uchun saqlash yoki boshqa ilovalarda ulashish mumkin</translation> +<translation id="4928144016283278047">Trekerlardan (tashqi cookie fayllar, IP orqali kuzatuv, zararli skriptlar) himoya</translation> <translation id="4932247056774066048">Chunki siz <ph name="DOMAIN_NAME" /> tomonidan boshqariladigan hisobingizdan chiqish arafasidasiz. Barcha axborotlar Google Chrome brauzeridan tozalab tashlanadi, lekin Google hisobingizda saqlanib qoladi.</translation> <translation id="4943703118917034429">Virtual reallik</translation> <translation id="4943872375798546930">Hech narsa topilmadi</translation> @@ -1190,6 +1191,7 @@ <translation id="727288900855680735"><ph name="ONE_TIME_CODE" /> kodi <ph name="ORIGIN" /> saytiga joylansinmi?</translation> <translation id="7274013316676448362">Bloklangan sayt</translation> <translation id="7276100255011548441">Chrome 4 haftadan eskirgan mavzularni avtomatik oʻchiradi. Takroriy tashriflar asosida mavzu roʻyxatga qayta kiritilishi mumkin. Yoki Chrome saytlarga ulashmasligi uchun istalgan mavzularni bloklash mumkin. <ph name="BEGIN_LINK" />Chrome brauzerida reklamada maxfiylikni boshqarish<ph name="END_LINK" /> haqida batafsil.</translation> +<translation id="7284878711178835966">Matn kiritishni boshlashingiz bilan Chrome manzil qatori yoki qidiruv maydonchasi kontentini asosiy qidiruv vositasiga yuboradi</translation> <translation id="7286703216224610554">Faqat munosabatni ulashish</translation> <translation id="7289303553784750393">Onlayn boʻlsangiz, lekin muammo qayta takrorlansa, <ph name="SITE_ETLD_PLUS_ONE" /> orqali boshqa usulda davom eting.</translation> <translation id="7290209999329137901">Qayta nomlash imkonsiz</translation>
diff --git a/chrome/browser/ui/android/toolbar/java/res/layout/optional_button_layout.xml b/chrome/browser/ui/android/toolbar/java/res/layout/optional_button_layout.xml index 2618c5f3..c3df01f8 100644 --- a/chrome/browser/ui/android/toolbar/java/res/layout/optional_button_layout.xml +++ b/chrome/browser/ui/android/toolbar/java/res/layout/optional_button_layout.xml
@@ -21,7 +21,7 @@ android:layout_gravity="center" android:visibility="gone" android:importantForAccessibility="no" /> - <org.chromium.components.browser_ui.widget.listmenu.ListMenuButton + <org.chromium.ui.listmenu.ListMenuButton android:layout_width="match_parent" android:scaleType="fitStart" android:id="@+id/optional_toolbar_button"
diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/TabSwitcherButtonView.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/TabSwitcherButtonView.java index 73c8741..cfc4187 100644 --- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/TabSwitcherButtonView.java +++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/TabSwitcherButtonView.java
@@ -9,7 +9,7 @@ import android.util.AttributeSet; import org.chromium.chrome.browser.ui.theme.BrandedColorScheme; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButton; +import org.chromium.ui.listmenu.ListMenuButton; /** * The Button used for switching tabs. Currently this class is only being used for the bottom
diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveButtonActionMenuCoordinator.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveButtonActionMenuCoordinator.java index 7c9f465..71e63fef 100644 --- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveButtonActionMenuCoordinator.java +++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveButtonActionMenuCoordinator.java
@@ -17,11 +17,11 @@ import org.chromium.chrome.browser.toolbar.MenuBuilderHelper; import org.chromium.chrome.browser.toolbar.R; import org.chromium.components.browser_ui.widget.BrowserUiListMenuUtils; -import org.chromium.components.browser_ui.widget.listmenu.BasicListMenu; -import org.chromium.components.browser_ui.widget.listmenu.ListMenu; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButton; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButtonDelegate; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuItemProperties; +import org.chromium.ui.listmenu.BasicListMenu; +import org.chromium.ui.listmenu.ListMenu; +import org.chromium.ui.listmenu.ListMenuButton; +import org.chromium.ui.listmenu.ListMenuButtonDelegate; +import org.chromium.ui.listmenu.ListMenuItemProperties; import org.chromium.ui.modelutil.MVCListAdapter.ModelList; import org.chromium.ui.widget.RectProvider;
diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveButtonActionMenuCoordinatorTest.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveButtonActionMenuCoordinatorTest.java index a58e161..63eb5d0 100644 --- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveButtonActionMenuCoordinatorTest.java +++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/adaptive/AdaptiveButtonActionMenuCoordinatorTest.java
@@ -34,7 +34,7 @@ import org.chromium.chrome.test.util.browser.Features; import org.chromium.chrome.test.util.browser.Features.DisableFeatures; import org.chromium.chrome.test.util.browser.Features.EnableFeatures; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButton; +import org.chromium.ui.listmenu.ListMenuButton; import org.chromium.ui.widget.AnchoredPopupWindow; /** Unit tests for the {@link AdaptiveButtonActionMenuCoordinator}. */
diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/home_button/HomeButton.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/home_button/HomeButton.java index 90b68b00..6567137 100644 --- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/home_button/HomeButton.java +++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/home_button/HomeButton.java
@@ -8,7 +8,7 @@ import android.util.AttributeSet; import org.chromium.base.TraceEvent; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButton; +import org.chromium.ui.listmenu.ListMenuButton; /** The home button. */ public class HomeButton extends ListMenuButton {
diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/home_button/HomeButtonCoordinator.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/home_button/HomeButtonCoordinator.java index 2cb1b85..f1f65b2e 100644 --- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/home_button/HomeButtonCoordinator.java +++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/home_button/HomeButtonCoordinator.java
@@ -28,11 +28,11 @@ import org.chromium.components.browser_ui.widget.BrowserUiListMenuUtils; import org.chromium.components.browser_ui.widget.highlight.ViewHighlighter.HighlightParams; import org.chromium.components.browser_ui.widget.highlight.ViewHighlighter.HighlightShape; -import org.chromium.components.browser_ui.widget.listmenu.BasicListMenu; -import org.chromium.components.browser_ui.widget.listmenu.ListMenu; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButtonDelegate; import org.chromium.components.embedder_support.util.UrlUtilities; import org.chromium.components.feature_engagement.FeatureConstants; +import org.chromium.ui.listmenu.BasicListMenu; +import org.chromium.ui.listmenu.ListMenu; +import org.chromium.ui.listmenu.ListMenuButtonDelegate; import org.chromium.ui.modelutil.MVCListAdapter; import org.chromium.ui.widget.RectProvider; import org.chromium.url.GURL;
diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/optional_button/OptionalButtonView.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/optional_button/OptionalButtonView.java index 21ce2e7..8fb9932 100644 --- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/optional_button/OptionalButtonView.java +++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/optional_button/OptionalButtonView.java
@@ -47,7 +47,7 @@ import org.chromium.chrome.browser.toolbar.adaptive.AdaptiveToolbarButtonVariant; import org.chromium.chrome.browser.toolbar.adaptive.AdaptiveToolbarFeatures; import org.chromium.chrome.browser.toolbar.optional_button.OptionalButtonConstants.TransitionType; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButton; +import org.chromium.ui.listmenu.ListMenuButton; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy;
diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/optional_button/OptionalButtonViewTest.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/optional_button/OptionalButtonViewTest.java index fd613ab6..01d4af8 100644 --- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/optional_button/OptionalButtonViewTest.java +++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/optional_button/OptionalButtonViewTest.java
@@ -62,7 +62,7 @@ import org.chromium.chrome.browser.toolbar.R; import org.chromium.chrome.browser.toolbar.adaptive.AdaptiveToolbarButtonVariant; import org.chromium.chrome.browser.toolbar.optional_button.OptionalButtonConstants.TransitionType; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButton; +import org.chromium.ui.listmenu.ListMenuButton; import java.util.function.BooleanSupplier;
diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/TabSwitcherActionMenuCoordinator.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/TabSwitcherActionMenuCoordinator.java index ece5229..418ce31 100644 --- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/TabSwitcherActionMenuCoordinator.java +++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/TabSwitcherActionMenuCoordinator.java
@@ -5,7 +5,7 @@ package org.chromium.chrome.browser.toolbar.top; import static org.chromium.components.browser_ui.widget.BrowserUiListMenuUtils.buildMenuListItem; -import static org.chromium.components.browser_ui.widget.listmenu.BasicListMenu.buildMenuDivider; +import static org.chromium.ui.listmenu.BasicListMenu.buildMenuDivider; import android.content.Context; import android.view.View; @@ -22,11 +22,11 @@ import org.chromium.chrome.browser.toolbar.MenuBuilderHelper; import org.chromium.chrome.browser.toolbar.R; import org.chromium.components.browser_ui.widget.BrowserUiListMenuUtils; -import org.chromium.components.browser_ui.widget.listmenu.BasicListMenu; -import org.chromium.components.browser_ui.widget.listmenu.ListMenu; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButton; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButtonDelegate; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuItemProperties; +import org.chromium.ui.listmenu.BasicListMenu; +import org.chromium.ui.listmenu.ListMenu; +import org.chromium.ui.listmenu.ListMenuButton; +import org.chromium.ui.listmenu.ListMenuButtonDelegate; +import org.chromium.ui.listmenu.ListMenuItemProperties; import org.chromium.ui.modelutil.MVCListAdapter.ListItem; import org.chromium.ui.modelutil.MVCListAdapter.ModelList; import org.chromium.ui.widget.RectProvider;
diff --git a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToggleTabStackButton.java b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToggleTabStackButton.java index 8f5d7fb4f..81ea903 100644 --- a/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToggleTabStackButton.java +++ b/chrome/browser/ui/android/toolbar/java/src/org/chromium/chrome/browser/toolbar/top/ToggleTabStackButton.java
@@ -16,7 +16,7 @@ import org.chromium.chrome.browser.toolbar.TabCountProvider; import org.chromium.chrome.browser.toolbar.TabSwitcherDrawable; import org.chromium.chrome.browser.ui.theme.BrandedColorScheme; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButton; +import org.chromium.ui.listmenu.ListMenuButton; import org.chromium.ui.widget.Toast; /**
diff --git a/chrome/browser/ui/autofill/autofill_context_menu_manager.cc b/chrome/browser/ui/autofill/autofill_context_menu_manager.cc index ad061e52..b148c95 100644 --- a/chrome/browser/ui/autofill/autofill_context_menu_manager.cc +++ b/chrome/browser/ui/autofill/autofill_context_menu_manager.cc
@@ -11,9 +11,11 @@ #include "chrome/app/chrome_command_ids.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/ui/browser.h" +#include "chrome/browser/ui/browser_finder.h" #include "chrome/browser/ui/chrome_pages.h" #include "chrome/browser/ui/user_education/scoped_new_badge_tracker.h" #include "chrome/grit/generated_resources.h" +#include "components/autofill/content/browser/content_autofill_client.h" #include "components/autofill/content/browser/content_autofill_driver.h" #include "components/autofill/core/browser/autofill_feedback_data.h" #include "components/autofill/core/browser/browser_autofill_manager.h" @@ -118,12 +120,10 @@ AutofillContextMenuManager::AutofillContextMenuManager( PersonalDataManager* personal_data_manager, RenderViewContextMenuBase* delegate, - ui::SimpleMenuModel* menu_model, - Browser* browser) + ui::SimpleMenuModel* menu_model) : personal_data_manager_(personal_data_manager), menu_model_(menu_model), - delegate_(delegate), - browser_(browser) { + delegate_(delegate) { DCHECK(delegate_); params_ = delegate_->params(); } @@ -151,9 +151,7 @@ } // Includes the option of submitting feedback on Autofill. - if (personal_data_manager_->IsAutofillEnabled() && - base::FeatureList::IsEnabled(features::kAutofillFeedback) && - IsLikelyDogfoodClient()) { + if (personal_data_manager_->IsAutofillEnabled() && IsLikelyDogfoodClient()) { menu_model_->AddItemWithStringIdAndIcon( IDC_CONTENT_CONTEXT_AUTOFILL_FEEDBACK, IDS_CONTENT_CONTEXT_AUTOFILL_FEEDBACK, @@ -207,8 +205,11 @@ void AutofillContextMenuManager::ExecuteAutofillFeedbackCommand( const LocalFrameToken& frame_token, AutofillManager& manager) { + // The cast is safe since the context menu is only available on Desktop. + auto& client = static_cast<ContentAutofillClient&>(manager.client()); + Browser* browser = chrome::FindBrowserWithTab(&client.GetWebContents()); chrome::ShowFeedbackPage( - browser_, chrome::kFeedbackSourceAutofillContextMenu, + browser, chrome::kFeedbackSourceAutofillContextMenu, /*description_template=*/std::string(), /*description_placeholder_text=*/kFeedbackPlaceholder, /*category_tag=*/"dogfood_autofill_feedback",
diff --git a/chrome/browser/ui/autofill/autofill_context_menu_manager.h b/chrome/browser/ui/autofill/autofill_context_menu_manager.h index 8fff6a7..f052ede 100644 --- a/chrome/browser/ui/autofill/autofill_context_menu_manager.h +++ b/chrome/browser/ui/autofill/autofill_context_menu_manager.h
@@ -14,8 +14,6 @@ #include "content/public/browser/context_menu_params.h" #include "ui/base/models/simple_menu_model.h" -class Browser; - namespace autofill { class AutofillField; @@ -39,8 +37,7 @@ AutofillContextMenuManager(PersonalDataManager* personal_data_manager, RenderViewContextMenuBase* delegate, - ui::SimpleMenuModel* menu_model, - Browser* browser); + ui::SimpleMenuModel* menu_model); ~AutofillContextMenuManager() override; AutofillContextMenuManager(const AutofillContextMenuManager&) = delete; AutofillContextMenuManager& operator=(const AutofillContextMenuManager&) = @@ -99,7 +96,6 @@ const raw_ptr<PersonalDataManager> personal_data_manager_; const raw_ptr<ui::SimpleMenuModel> menu_model_; const raw_ptr<RenderViewContextMenuBase> delegate_; - const raw_ptr<Browser> browser_; content::ContextMenuParams params_; };
diff --git a/chrome/browser/ui/autofill/autofill_context_menu_manager_browsertest.cc b/chrome/browser/ui/autofill/autofill_context_menu_manager_browsertest.cc index 779bd8b8..70ccc74 100644 --- a/chrome/browser/ui/autofill/autofill_context_menu_manager_browsertest.cc +++ b/chrome/browser/ui/autofill/autofill_context_menu_manager_browsertest.cc
@@ -173,8 +173,7 @@ render_view_context_menu_->Init(); autofill_context_menu_manager_ = std::make_unique<AutofillContextMenuManager>( - personal_data_, render_view_context_menu_.get(), menu_model_.get(), - nullptr); + personal_data_, render_view_context_menu_.get(), menu_model_.get()); autofill_context_menu_manager()->set_params_for_testing( CreateContextMenuParams()); } @@ -332,8 +331,7 @@ {{"show_on_all_address_fields", "true"}}}}, // Intentionally disable the Autofill feedback so that corresponding // entry doesn't appear in the context menu model. - {features::kAutofillFeedback, - features::kAutofillForUnclassifiedFieldsAvailable}); + {features::kAutofillForUnclassifiedFieldsAvailable}); } private: @@ -510,8 +508,7 @@ UnclassifiedFieldsTest() { feature_.InitWithFeatures( {features::kAutofillForUnclassifiedFieldsAvailable}, - {features::kAutofillFeedback, - features::kAutofillPredictionsForAutocompleteUnrecognized, + {features::kAutofillPredictionsForAutocompleteUnrecognized, features::kAutofillFallbackForAutocompleteUnrecognized}); }
diff --git a/chrome/browser/ui/autofill/autofill_context_menu_manager_interactive_uitest.cc b/chrome/browser/ui/autofill/autofill_context_menu_manager_interactive_uitest.cc index f723606f..a00b2ffd 100644 --- a/chrome/browser/ui/autofill/autofill_context_menu_manager_interactive_uitest.cc +++ b/chrome/browser/ui/autofill/autofill_context_menu_manager_interactive_uitest.cc
@@ -8,7 +8,6 @@ #include "base/run_loop.h" #include "base/task/single_thread_task_runner.h" #include "base/test/metrics/histogram_tester.h" -#include "base/test/scoped_feature_list.h" #include "build/chromeos_buildflags.h" #include "chrome/app/chrome_command_ids.h" #include "chrome/browser/renderer_context_menu/render_view_context_menu_test_util.h" @@ -66,11 +65,7 @@ class AutofillContextMenuManagerFeedbackUIBrowserTest : public InProcessBrowserTest { public: - AutofillContextMenuManagerFeedbackUIBrowserTest() { - feature_.InitWithFeatures( - /*enabled_features=*/{features::kAutofillFeedback}, - /*disabled_features=*/{}); - } + AutofillContextMenuManagerFeedbackUIBrowserTest() = default; void SetUpOnMainThread() override { render_view_context_menu_ = std::make_unique<TestRenderViewContextMenu>( @@ -78,7 +73,7 @@ render_view_context_menu_->Init(); autofill_context_menu_manager_ = std::make_unique<AutofillContextMenuManager>( - nullptr, render_view_context_menu_.get(), nullptr, nullptr); + nullptr, render_view_context_menu_.get(), nullptr); browser()->profile()->GetPrefs()->SetBoolean(prefs::kUserFeedbackAllowed, true); @@ -103,7 +98,6 @@ test::AutofillBrowserTestEnvironment autofill_test_environment_; std::unique_ptr<TestRenderViewContextMenu> render_view_context_menu_; std::unique_ptr<AutofillContextMenuManager> autofill_context_menu_manager_; - base::test::ScopedFeatureList feature_; TestAutofillManagerInjector<TestAutofillManager> autofill_manager_injector_; }; @@ -171,6 +165,22 @@ feedback_dialog->GetWidget()->Close(); } +// Regression test for crbug.com/1493774. +IN_PROC_BROWSER_TEST_F(AutofillContextMenuManagerFeedbackUIBrowserTest, + TabMoveToOtherBrowserDoesNotCrash) { + // Create another browser. + Browser* other_browser = CreateBrowser(browser()->profile()); + + // Move the tab to the other browser. + other_browser->tab_strip_model()->InsertWebContentsAt( + 0, browser()->tab_strip_model()->DetachWebContentsAtForInsertion(0), + AddTabTypes::ADD_ACTIVE); + ASSERT_EQ(other_browser->tab_strip_model()->count(), 2); + + // Close the first browser. + CloseBrowserSynchronously(browser()); +} + IN_PROC_BROWSER_TEST_F(AutofillContextMenuManagerFeedbackUIBrowserTest, FeedbackDialogArgsAutofillMetadata) { std::string expected_metadata;
diff --git a/chrome/browser/ui/autofill/autofill_context_menu_manager_lacros_browsertest.cc b/chrome/browser/ui/autofill/autofill_context_menu_manager_lacros_browsertest.cc index 3de5b89..e2e15baf 100644 --- a/chrome/browser/ui/autofill/autofill_context_menu_manager_lacros_browsertest.cc +++ b/chrome/browser/ui/autofill/autofill_context_menu_manager_lacros_browsertest.cc
@@ -38,7 +38,7 @@ render_view_context_menu_->Init(); autofill_context_menu_manager_ = std::make_unique<AutofillContextMenuManager>( - nullptr, render_view_context_menu_.get(), nullptr, nullptr); + nullptr, render_view_context_menu_.get(), nullptr); browser()->profile()->GetPrefs()->SetBoolean(prefs::kUserFeedbackAllowed, true);
diff --git a/chrome/browser/ui/content_settings/content_setting_image_model.cc b/chrome/browser/ui/content_settings/content_setting_image_model.cc index c860edb..3c59ba4 100644 --- a/chrome/browser/ui/content_settings/content_setting_image_model.cc +++ b/chrome/browser/ui/content_settings/content_setting_image_model.cc
@@ -300,8 +300,8 @@ raw_ptr<const gfx::VectorIcon>* icon) { switch (type) { case ContentSettingsType::COOKIES: - *icon = blocked ? &vector_icons::kCookieOffChromeRefreshIcon - : &vector_icons::kCookieChromeRefreshIcon; + *icon = blocked ? &vector_icons::kDatabaseOffIcon + : &vector_icons::kDatabaseIcon; return; case ContentSettingsType::IMAGES: *icon = blocked ? &vector_icons::kPhotoOffChromeRefreshIcon @@ -391,7 +391,7 @@ *badge = (blocked ? &vector_icons::kBlockedBadgeIcon : &gfx::kNoneIcon); switch (type) { case ContentSettingsType::COOKIES: - *icon = &vector_icons::kCookieIcon; + *icon = &vector_icons::kDatabaseIcon; return; case ContentSettingsType::IMAGES: *icon = &vector_icons::kPhotoIcon;
diff --git a/chrome/browser/ui/toolbar/pinned_toolbar_actions_model_factory.cc b/chrome/browser/ui/toolbar/pinned_toolbar_actions_model_factory.cc index f6bc51f1..0f151fad 100644 --- a/chrome/browser/ui/toolbar/pinned_toolbar_actions_model_factory.cc +++ b/chrome/browser/ui/toolbar/pinned_toolbar_actions_model_factory.cc
@@ -26,6 +26,7 @@ "PinnedToolbarActionsModel", ProfileSelections::Builder() .WithRegular(ProfileSelection::kOwnInstance) + .WithGuest(ProfileSelection::kOwnInstance) .Build()) {} PinnedToolbarActionsModelFactory::~PinnedToolbarActionsModelFactory() = default;
diff --git a/chrome/browser/ui/views/omnibox/omnibox_popup_presenter.cc b/chrome/browser/ui/views/omnibox/omnibox_popup_presenter.cc index 89e6b17..6d6470d 100644 --- a/chrome/browser/ui/views/omnibox/omnibox_popup_presenter.cc +++ b/chrome/browser/ui/views/omnibox/omnibox_popup_presenter.cc
@@ -8,6 +8,7 @@ #include "base/metrics/histogram_macros.h" #include "base/observer_list_types.h" #include "chrome/browser/profiles/profile.h" +#include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/views/location_bar/location_bar_view.h" #include "chrome/browser/ui/views/omnibox/rounded_omnibox_results_frame.h" #include "chrome/browser/ui/views/theme_copying_widget.h" @@ -25,11 +26,22 @@ requested_handler_(false) { set_owned_by_client(); - // Prepare for instantiation of a `RealboxHandler` that will connect with - // this omnibox controller. The URL load will instantiate and bind - // the handler asynchronously. - OmniboxPopupUI::SetOmniboxController(controller); - LoadInitialURL(GURL(chrome::kChromeUIOmniboxPopupURL)); + // Build URL with SessionID to ensure correct omnibox controller binding + // without relying on mutable state subject to timing and destruction issues. + // The webui's page handler (RealboxHandler) needs to know what omnibox + // controller to use, but the native pointer value can't safely be passed in, + // and hacks like getting last active browser or any other shared mutable + // state can result in subtle races and even use-after-free bugs. The + // window and its omnibox could destruct, or the browser changed, or even + // a new omnibox could be constructed to overwrite the shared value, within + // the time window of loading the URL in a separate process. Using a unique + // session ID avoids these problems and ensures that only the omnibox + // controller that owns this popup presenter will be selected. + GURL url(base::StringPrintf("%s?session_id=%d", + chrome::kChromeUIOmniboxPopupURL, + location_bar_view->browser()->session_id().id())); + LoadInitialURL(url); + location_bar_view_->AddObserver(this); }
diff --git a/chrome/browser/ui/views/page_info/page_info_cookies_content_view.h b/chrome/browser/ui/views/page_info/page_info_cookies_content_view.h index 5054e30..89f5c55 100644 --- a/chrome/browser/ui/views/page_info/page_info_cookies_content_view.h +++ b/chrome/browser/ui/views/page_info/page_info_cookies_content_view.h
@@ -46,7 +46,7 @@ void SetInitializedCallbackForTesting(base::OnceClosure initialized_callback); private: - friend class PageInfoCookiesContentViewTest; + friend class PageInfoCookiesContentViewBaseTestClass; friend class PageInfoBubbleViewCookiesSubpageBrowserTest; // Ensures the allowed sites information UI is present, with placeholder
diff --git a/chrome/browser/ui/views/page_info/page_info_cookies_content_view_unittest.cc b/chrome/browser/ui/views/page_info/page_info_cookies_content_view_unittest.cc index 12a7d65..046e9c2 100644 --- a/chrome/browser/ui/views/page_info/page_info_cookies_content_view_unittest.cc +++ b/chrome/browser/ui/views/page_info/page_info_cookies_content_view_unittest.cc
@@ -40,22 +40,36 @@ return image_view->GetImageModel().GetVectorIcon().vector_icon()->name; } +PageInfoCookiesContentView::CookiesNewInfo DefaultCookieInfoForTests( + int days_to_expiration = 0) { + PageInfoCookiesContentView::CookiesNewInfo cookie_info; + cookie_info.blocked_third_party_sites_count = 8; + cookie_info.allowed_third_party_sites_count = 3; + cookie_info.allowed_sites_count = 10; + // base::Time() represents a null when used as an expiration. + cookie_info.expiration = + days_to_expiration ? base::Time::Now() + base::Days(days_to_expiration) + : base::Time(); + cookie_info.status = CookieControlsStatus::kEnabled; + cookie_info.enforcement = CookieControlsEnforcement::kNoEnforcement; + cookie_info.confidence = CookieControlsBreakageConfidenceLevel::kMedium; + cookie_info.blocking_status = CookieBlocking3pcdStatus::kNotIn3pcd; + cookie_info.is_otr = false; + return cookie_info; +} + +const int kDaysToExpiration = 30; + } // namespace -class PageInfoCookiesContentViewTest - : public TestWithBrowserView, - public testing::WithParamInterface<bool> { +class PageInfoCookiesContentViewBaseTestClass : public TestWithBrowserView { public: - PageInfoCookiesContentViewTest() + PageInfoCookiesContentViewBaseTestClass() : TestWithBrowserView( base::test::SingleThreadTaskEnvironment::TimeSource::MOCK_TIME) {} void SetUp() override { - std::string expiration = GetParam() ? "30d" : "0d"; - feature_list_.InitWithFeaturesAndParameters( - {{content_settings::features::kUserBypassUI, - {{"expiration", expiration}}}}, - {}); + feature_list_.InitWithFeaturesAndParameters(EnabledFeatures(), {}); TestWithBrowserView::SetUp(); const GURL url("http://a.com"); @@ -83,6 +97,10 @@ PageInfoCookiesContentView* content_view() { return content_view_.get(); } + views::StyledLabel* third_party_cookies_description_label() { + return content_view_->cookies_description_label_; + } + views::BoxLayoutView* third_party_cookies_container() { return content_view_->third_party_cookies_container_; } @@ -111,7 +129,10 @@ return content_view_->third_party_cookies_toggle_subtitle_; } - private: + virtual std::vector<base::test::FeatureRefAndParams> EnabledFeatures() { + return {}; + } + base::test::ScopedFeatureList feature_list_; std::unique_ptr<PageInfo> presenter_; std::unique_ptr<PageInfoCookiesContentView> content_view_; @@ -122,18 +143,23 @@ #endif }; -TEST_P(PageInfoCookiesContentViewTest, ThirdPartyCookiesAllowedByDefault) { - PageInfoCookiesContentView::CookiesNewInfo cookie_info; - cookie_info.blocked_third_party_sites_count = 8; - cookie_info.allowed_third_party_sites_count = 3; - cookie_info.allowed_sites_count = 10; - cookie_info.status = CookieControlsStatus::kDisabled; - cookie_info.enforcement = CookieControlsEnforcement::kNoEnforcement; - cookie_info.expiration = base::Time(); +class PageInfoCookiesContentViewPre3pcdTest + : public PageInfoCookiesContentViewBaseTestClass, + public testing::WithParamInterface<bool> { + std::vector<base::test::FeatureRefAndParams> EnabledFeatures() override { + // Permanent exceptions are represented as expiration = 0d. + std::string expiration = GetParam() ? "30d" : "0d"; + return {{content_settings::features::kUserBypassUI, + {{"expiration", expiration}}}}; + } +}; + +TEST_P(PageInfoCookiesContentViewPre3pcdTest, + ThirdPartyCookiesAllowedByDefault) { + PageInfoCookiesContentView::CookiesNewInfo cookie_info = + DefaultCookieInfoForTests(); cookie_info.confidence = CookieControlsBreakageConfidenceLevel::kUninitialized; - cookie_info.blocking_status = CookieBlocking3pcdStatus::kNotIn3pcd; - content_view()->SetCookieInfo(cookie_info); // Third-party cookies section: @@ -146,16 +172,9 @@ cookie_info.allowed_sites_count)); } -TEST_P(PageInfoCookiesContentViewTest, ThirdPartyCookiesBlocked) { - PageInfoCookiesContentView::CookiesNewInfo cookie_info; - cookie_info.blocked_third_party_sites_count = 8; - cookie_info.allowed_third_party_sites_count = 3; - cookie_info.allowed_sites_count = 10; - cookie_info.status = CookieControlsStatus::kEnabled; - cookie_info.enforcement = CookieControlsEnforcement::kNoEnforcement; - cookie_info.expiration = base::Time(); - cookie_info.confidence = CookieControlsBreakageConfidenceLevel::kMedium; - cookie_info.blocking_status = CookieBlocking3pcdStatus::kNotIn3pcd; +TEST_P(PageInfoCookiesContentViewPre3pcdTest, ThirdPartyCookiesBlocked) { + PageInfoCookiesContentView::CookiesNewInfo cookie_info = + DefaultCookieInfoForTests(); content_view()->SetCookieInfo(cookie_info); @@ -172,7 +191,7 @@ ? IDS_PAGE_INFO_COOKIES_SITE_NOT_WORKING_DESCRIPTION_TEMPORARY : IDS_PAGE_INFO_COOKIES_SITE_NOT_WORKING_DESCRIPTION_PERMANENT)); EXPECT_TRUE(third_party_cookies_label_wrapper()->GetVisible()); - // TODO(crbug.com/1446230): Verify the toggle row icon. + // TODO(http://b/308988593): Verify the toggle row icon. EXPECT_TRUE(third_party_cookies_toggle()->GetVisible()); EXPECT_FALSE(third_party_cookies_toggle()->GetIsOn()); EXPECT_FALSE(third_party_cookies_enforced_icon()->GetVisible()); @@ -189,16 +208,12 @@ cookie_info.allowed_sites_count)); } -TEST_P(PageInfoCookiesContentViewTest, ThirdPartyCookiesAllowedPermanent) { - PageInfoCookiesContentView::CookiesNewInfo cookie_info; - cookie_info.blocked_third_party_sites_count = 8; - cookie_info.allowed_third_party_sites_count = 3; - cookie_info.allowed_sites_count = 10; +TEST_P(PageInfoCookiesContentViewPre3pcdTest, + ThirdPartyCookiesAllowedPermanent) { + PageInfoCookiesContentView::CookiesNewInfo cookie_info = + DefaultCookieInfoForTests(); cookie_info.status = CookieControlsStatus::kDisabledForSite; - cookie_info.enforcement = CookieControlsEnforcement::kNoEnforcement; - cookie_info.expiration = base::Time(); cookie_info.confidence = CookieControlsBreakageConfidenceLevel::kMedium; - cookie_info.blocking_status = CookieBlocking3pcdStatus::kNotIn3pcd; content_view()->SetCookieInfo(cookie_info); @@ -212,7 +227,7 @@ l10n_util::GetStringUTF16( IDS_PAGE_INFO_COOKIES_PERMANENT_ALLOWED_DESCRIPTION)); EXPECT_TRUE(third_party_cookies_label_wrapper()->GetVisible()); - // TODO(crbug.com/1446230): Verify the toggle row icon. + // TODO(http://b/308988593): Verify the toggle row icon. EXPECT_TRUE(third_party_cookies_toggle()->GetVisible()); EXPECT_TRUE(third_party_cookies_toggle()->GetIsOn()); EXPECT_FALSE(third_party_cookies_enforced_icon()->GetVisible()); @@ -229,18 +244,12 @@ cookie_info.allowed_sites_count)); } -TEST_P(PageInfoCookiesContentViewTest, ThirdPartyCookiesAllowedTemporary) { - const int kDaysToExpiration = 30; - - PageInfoCookiesContentView::CookiesNewInfo cookie_info; - cookie_info.blocked_third_party_sites_count = 8; - cookie_info.allowed_third_party_sites_count = 3; - cookie_info.allowed_sites_count = 10; +TEST_P(PageInfoCookiesContentViewPre3pcdTest, + ThirdPartyCookiesAllowedTemporary) { + PageInfoCookiesContentView::CookiesNewInfo cookie_info = + DefaultCookieInfoForTests(kDaysToExpiration); cookie_info.status = CookieControlsStatus::kDisabledForSite; - cookie_info.enforcement = CookieControlsEnforcement::kNoEnforcement; - cookie_info.expiration = base::Time::Now() + base::Days(kDaysToExpiration); cookie_info.confidence = CookieControlsBreakageConfidenceLevel::kMedium; - cookie_info.blocking_status = CookieBlocking3pcdStatus::kNotIn3pcd; content_view()->SetCookieInfo(cookie_info); @@ -255,7 +264,7 @@ l10n_util::GetStringUTF16( IDS_PAGE_INFO_COOKIES_BLOCKING_RESTART_DESCRIPTION_TODAY)); EXPECT_TRUE(third_party_cookies_label_wrapper()->GetVisible()); - // TODO(crbug.com/1446230): Verify the toggle row icon. + // TODO(http://b/308988593): Verify the toggle row icon. EXPECT_TRUE(third_party_cookies_toggle()->GetVisible()); EXPECT_TRUE(third_party_cookies_toggle()->GetIsOn()); EXPECT_FALSE(third_party_cookies_enforced_icon()->GetVisible()); @@ -272,23 +281,19 @@ cookie_info.allowed_sites_count)); } -TEST_P(PageInfoCookiesContentViewTest, ThirdPartyCookiesBlockedByPolicy) { - PageInfoCookiesContentView::CookiesNewInfo cookie_info; - cookie_info.blocked_third_party_sites_count = 8; - cookie_info.allowed_third_party_sites_count = 3; - cookie_info.allowed_sites_count = 10; - cookie_info.status = CookieControlsStatus::kEnabled; +TEST_P(PageInfoCookiesContentViewPre3pcdTest, + ThirdPartyCookiesBlockedByPolicy) { + PageInfoCookiesContentView::CookiesNewInfo cookie_info = + DefaultCookieInfoForTests(); cookie_info.enforcement = CookieControlsEnforcement::kEnforcedByPolicy; - cookie_info.expiration = base::Time(); cookie_info.confidence = CookieControlsBreakageConfidenceLevel::kMedium; - cookie_info.blocking_status = CookieBlocking3pcdStatus::kNotIn3pcd; content_view()->SetCookieInfo(cookie_info); // Third-party cookies section: EXPECT_TRUE(third_party_cookies_container()->GetVisible()); - // TODO(crbug.com/1446230): Verify the toggle row icon. + // TODO(http://b/308988593): Verify the toggle row icon. EXPECT_FALSE(third_party_cookies_label_wrapper()->GetVisible()); EXPECT_FALSE(third_party_cookies_toggle()->GetVisible()); EXPECT_FALSE(third_party_cookies_toggle()->GetIsOn()); @@ -312,23 +317,20 @@ cookie_info.allowed_sites_count)); } -TEST_P(PageInfoCookiesContentViewTest, ThirdPartyCookiesAllowedByPolicy) { - PageInfoCookiesContentView::CookiesNewInfo cookie_info; - cookie_info.blocked_third_party_sites_count = 8; - cookie_info.allowed_third_party_sites_count = 3; - cookie_info.allowed_sites_count = 10; +TEST_P(PageInfoCookiesContentViewPre3pcdTest, + ThirdPartyCookiesAllowedByPolicy) { + PageInfoCookiesContentView::CookiesNewInfo cookie_info = + DefaultCookieInfoForTests(); cookie_info.status = CookieControlsStatus::kDisabledForSite; cookie_info.enforcement = CookieControlsEnforcement::kEnforcedByPolicy; - cookie_info.expiration = base::Time(); cookie_info.confidence = CookieControlsBreakageConfidenceLevel::kMedium; - cookie_info.blocking_status = CookieBlocking3pcdStatus::kNotIn3pcd; content_view()->SetCookieInfo(cookie_info); // Third-party cookies section: EXPECT_TRUE(third_party_cookies_container()->GetVisible()); - // TODO(crbug.com/1446230): Verify that the toggle row has correct subtitle. + // TODO(http://b/308988593): Verify that the toggle row has correct subtitle. EXPECT_FALSE(third_party_cookies_label_wrapper()->GetVisible()); EXPECT_FALSE(third_party_cookies_toggle()->GetVisible()); EXPECT_TRUE(third_party_cookies_toggle()->GetIsOn()); @@ -352,23 +354,19 @@ cookie_info.allowed_sites_count)); } -TEST_P(PageInfoCookiesContentViewTest, ThirdPartyCookiesBlockedByExtension) { - PageInfoCookiesContentView::CookiesNewInfo cookie_info; - cookie_info.blocked_third_party_sites_count = 8; - cookie_info.allowed_third_party_sites_count = 3; - cookie_info.allowed_sites_count = 10; - cookie_info.status = CookieControlsStatus::kEnabled; +TEST_P(PageInfoCookiesContentViewPre3pcdTest, + ThirdPartyCookiesBlockedByExtension) { + PageInfoCookiesContentView::CookiesNewInfo cookie_info = + DefaultCookieInfoForTests(); cookie_info.enforcement = CookieControlsEnforcement::kEnforcedByExtension; - cookie_info.expiration = base::Time(); cookie_info.confidence = CookieControlsBreakageConfidenceLevel::kMedium; - cookie_info.blocking_status = CookieBlocking3pcdStatus::kNotIn3pcd; content_view()->SetCookieInfo(cookie_info); // Third-party cookies section: EXPECT_TRUE(third_party_cookies_container()->GetVisible()); - // TODO(crbug.com/1446230): Verify the toggle row icon. + // TODO(http://b/308988593): Verify the toggle row icon. EXPECT_FALSE(third_party_cookies_label_wrapper()->GetVisible()); EXPECT_FALSE(third_party_cookies_toggle()->GetVisible()); EXPECT_FALSE(third_party_cookies_toggle()->GetIsOn()); @@ -392,23 +390,20 @@ cookie_info.allowed_sites_count)); } -TEST_P(PageInfoCookiesContentViewTest, ThirdPartyCookiesAllowedByExtension) { - PageInfoCookiesContentView::CookiesNewInfo cookie_info; - cookie_info.blocked_third_party_sites_count = 8; - cookie_info.allowed_third_party_sites_count = 3; - cookie_info.allowed_sites_count = 10; +TEST_P(PageInfoCookiesContentViewPre3pcdTest, + ThirdPartyCookiesAllowedByExtension) { + PageInfoCookiesContentView::CookiesNewInfo cookie_info = + DefaultCookieInfoForTests(); cookie_info.status = CookieControlsStatus::kDisabledForSite; cookie_info.enforcement = CookieControlsEnforcement::kEnforcedByExtension; - cookie_info.expiration = base::Time(); cookie_info.confidence = CookieControlsBreakageConfidenceLevel::kMedium; - cookie_info.blocking_status = CookieBlocking3pcdStatus::kNotIn3pcd; content_view()->SetCookieInfo(cookie_info); // Third-party cookies section: EXPECT_TRUE(third_party_cookies_container()->GetVisible()); - // TODO(crbug.com/1446230): Verify the toggle row icon. + // TODO(http://b/308988593): Verify the toggle row icon. EXPECT_FALSE(third_party_cookies_label_wrapper()->GetVisible()); EXPECT_FALSE(third_party_cookies_toggle()->GetVisible()); EXPECT_TRUE(third_party_cookies_toggle()->GetIsOn()); @@ -432,25 +427,21 @@ cookie_info.allowed_sites_count)); } -TEST_P(PageInfoCookiesContentViewTest, ThirdPartyCookiesBlockedBySetting) { +TEST_P(PageInfoCookiesContentViewPre3pcdTest, + ThirdPartyCookiesBlockedBySetting) { // This is not be possible, but the UI still should be able to handle this // state correctly. - PageInfoCookiesContentView::CookiesNewInfo cookie_info; - cookie_info.blocked_third_party_sites_count = 8; - cookie_info.allowed_third_party_sites_count = 3; - cookie_info.allowed_sites_count = 10; - cookie_info.status = CookieControlsStatus::kEnabled; + PageInfoCookiesContentView::CookiesNewInfo cookie_info = + DefaultCookieInfoForTests(); cookie_info.enforcement = CookieControlsEnforcement::kEnforcedByCookieSetting; - cookie_info.expiration = base::Time(); cookie_info.confidence = CookieControlsBreakageConfidenceLevel::kMedium; - cookie_info.blocking_status = CookieBlocking3pcdStatus::kNotIn3pcd; content_view()->SetCookieInfo(cookie_info); // Third-party cookies section: EXPECT_TRUE(third_party_cookies_container()->GetVisible()); - // TODO(crbug.com/1446230): Verify the toggle row icon. + // TODO(http://b/308988593): Verify the toggle row icon. EXPECT_FALSE(third_party_cookies_label_wrapper()->GetVisible()); EXPECT_FALSE(third_party_cookies_toggle()->GetVisible()); EXPECT_FALSE(third_party_cookies_toggle()->GetIsOn()); @@ -475,23 +466,20 @@ cookie_info.allowed_sites_count)); } -TEST_P(PageInfoCookiesContentViewTest, ThirdPartyCookiesAllowedBySetting) { - PageInfoCookiesContentView::CookiesNewInfo cookie_info; - cookie_info.blocked_third_party_sites_count = 8; - cookie_info.allowed_third_party_sites_count = 3; - cookie_info.allowed_sites_count = 10; +TEST_P(PageInfoCookiesContentViewPre3pcdTest, + ThirdPartyCookiesAllowedBySetting) { + PageInfoCookiesContentView::CookiesNewInfo cookie_info = + DefaultCookieInfoForTests(); cookie_info.status = CookieControlsStatus::kDisabledForSite; cookie_info.enforcement = CookieControlsEnforcement::kEnforcedByCookieSetting; - cookie_info.expiration = base::Time(); cookie_info.confidence = CookieControlsBreakageConfidenceLevel::kMedium; - cookie_info.blocking_status = CookieBlocking3pcdStatus::kNotIn3pcd; content_view()->SetCookieInfo(cookie_info); // Third-party cookies section: EXPECT_TRUE(third_party_cookies_container()->GetVisible()); - // TODO(crbug.com/1446230): Verify the toggle row icon. + // TODO(http://b/308988593): Verify the toggle row icon. EXPECT_FALSE(third_party_cookies_label_wrapper()->GetVisible()); EXPECT_FALSE(third_party_cookies_toggle()->GetVisible()); EXPECT_TRUE(third_party_cookies_toggle()->GetIsOn()); @@ -518,4 +506,344 @@ // Runs all tests with two versions of user bypass - one that creates temporary // exceptions and one that creates permanent exceptions. -INSTANTIATE_TEST_SUITE_P(All, PageInfoCookiesContentViewTest, testing::Bool()); +INSTANTIATE_TEST_SUITE_P(All, + PageInfoCookiesContentViewPre3pcdTest, + testing::Bool()); + +class PageInfoCookiesContentView3pcdTitleAndDescriptionTest + : public PageInfoCookiesContentViewBaseTestClass, + public testing::WithParamInterface<CookieBlocking3pcdStatus> {}; + +TEST_F(PageInfoCookiesContentView3pcdTitleAndDescriptionTest, + DisplaysTitleAndDescriptionWhenCookiesLimitedWithTemporaryException) { + PageInfoCookiesContentView::CookiesNewInfo cookie_info = + DefaultCookieInfoForTests(kDaysToExpiration); + cookie_info.status = CookieControlsStatus::kDisabledForSite; + cookie_info.blocking_status = CookieBlocking3pcdStatus::kLimited; + content_view()->SetCookieInfo(cookie_info); + + EXPECT_EQ( + third_party_cookies_title()->GetText(), + l10n_util::GetPluralStringFUTF16( + IDS_PAGE_INFO_TRACKING_PROTECTION_COOKIES_LIMITING_RESTART_TITLE, + kDaysToExpiration)); + EXPECT_EQ( + third_party_cookies_description()->GetText(), + l10n_util::GetStringUTF16( + IDS_PAGE_INFO_COOKIES_TRACKING_PROTECTION_COOKIES_RESTART_DESCRIPTION)); +} + +TEST_F(PageInfoCookiesContentView3pcdTitleAndDescriptionTest, + DisplaysTitleAndDescriptionWhenCookiesBlockedWithTemporaryException) { + PageInfoCookiesContentView::CookiesNewInfo cookie_info = + DefaultCookieInfoForTests(kDaysToExpiration); + cookie_info.status = CookieControlsStatus::kDisabledForSite; + cookie_info.blocking_status = CookieBlocking3pcdStatus::kAll; + content_view()->SetCookieInfo(cookie_info); + + EXPECT_EQ( + third_party_cookies_title()->GetText(), + l10n_util::GetPluralStringFUTF16( + IDS_PAGE_INFO_TRACKING_PROTECTION_COOKIES_3PC_BLOCKED_RESTART_TITLE, + kDaysToExpiration)); + EXPECT_EQ( + third_party_cookies_description()->GetText(), + l10n_util::GetStringUTF16( + IDS_PAGE_INFO_COOKIES_TRACKING_PROTECTION_COOKIES_RESTART_DESCRIPTION)); +} + +TEST_F(PageInfoCookiesContentView3pcdTitleAndDescriptionTest, + DisplaysBubbleDescriptionLabelWhenCookiesLimited) { + PageInfoCookiesContentView::CookiesNewInfo cookie_info = + DefaultCookieInfoForTests(); + cookie_info.blocking_status = CookieBlocking3pcdStatus::kLimited; + content_view()->SetCookieInfo(cookie_info); + + EXPECT_EQ(third_party_cookies_description_label()->GetText(), + l10n_util::GetStringFUTF16( + IDS_PAGE_INFO_TRACKING_PROTECTION_DESCRIPTION, + l10n_util::GetStringUTF16( + IDS_PAGE_INFO_TRACKING_PROTECTION_SETTINGS_LINK))); +} + +TEST_F(PageInfoCookiesContentView3pcdTitleAndDescriptionTest, + DisplaysBubbleDescriptionLabelWhenCookiesBlocked) { + PageInfoCookiesContentView::CookiesNewInfo cookie_info = + DefaultCookieInfoForTests(); + cookie_info.blocking_status = CookieBlocking3pcdStatus::kAll; + content_view()->SetCookieInfo(cookie_info); + + EXPECT_EQ(third_party_cookies_description_label()->GetText(), + l10n_util::GetStringFUTF16( + IDS_PAGE_INFO_TRACKING_PROTECTION_BLOCKED_COOKIES_DESCRIPTION, + l10n_util::GetStringUTF16( + IDS_PAGE_INFO_TRACKING_PROTECTION_SETTINGS_LINK))); +} + +TEST_F(PageInfoCookiesContentView3pcdTitleAndDescriptionTest, + DisplaysLabelsWhenCookiesBlockedInIncognitoMode) { + PageInfoCookiesContentView::CookiesNewInfo cookie_info = + DefaultCookieInfoForTests(); + cookie_info.blocking_status = CookieBlocking3pcdStatus::kAll; + cookie_info.is_otr = true; + content_view()->SetCookieInfo(cookie_info); + + EXPECT_EQ( + third_party_cookies_title()->GetText(), + l10n_util::GetStringUTF16(IDS_PAGE_INFO_COOKIES_SITE_NOT_WORKING_TITLE)); + EXPECT_EQ( + third_party_cookies_description()->GetText(), + l10n_util::GetStringUTF16( + IDS_PAGE_INFO_TRACKING_PROTECTION_SITE_NOT_WORKING_DESCRIPTION_TEMPORARY)); + EXPECT_EQ( + third_party_cookies_description_label()->GetText(), + l10n_util::GetStringFUTF16( + IDS_PAGE_INFO_TRACKING_PROTECTION_INCOGNITO_BLOCKED_COOKIES_DESCRIPTION, + l10n_util::GetStringUTF16( + IDS_PAGE_INFO_TRACKING_PROTECTION_SETTINGS_LINK))); +} + +TEST_F(PageInfoCookiesContentView3pcdTitleAndDescriptionTest, + DisplaysLabelsWhenCookiesAllowedInIncognitoMode) { + PageInfoCookiesContentView::CookiesNewInfo cookie_info = + DefaultCookieInfoForTests(); + cookie_info.status = CookieControlsStatus::kDisabledForSite; + cookie_info.blocking_status = CookieBlocking3pcdStatus::kAll; + cookie_info.is_otr = true; + content_view()->SetCookieInfo(cookie_info); + + EXPECT_EQ(third_party_cookies_title()->GetText(), + l10n_util::GetStringUTF16( + IDS_PAGE_INFO_TRACKING_PROTECTION_PERMANENT_ALLOWED_TITLE)); + EXPECT_EQ( + third_party_cookies_description()->GetText(), + l10n_util::GetStringUTF16( + IDS_PAGE_INFO_TRACKING_PROTECTION_COOKIES_PERMANENT_ALLOWED_DESCRIPTION)); + EXPECT_EQ( + third_party_cookies_description_label()->GetText(), + l10n_util::GetStringFUTF16( + IDS_PAGE_INFO_TRACKING_PROTECTION_INCOGNITO_BLOCKED_COOKIES_DESCRIPTION, + l10n_util::GetStringUTF16( + IDS_PAGE_INFO_TRACKING_PROTECTION_SETTINGS_LINK))); +} + +TEST_F(PageInfoCookiesContentView3pcdTitleAndDescriptionTest, + DisplaysDescriptionWhenCookiesAllowedEnforcedByTpcdGrant) { + PageInfoCookiesContentView::CookiesNewInfo cookie_info = + DefaultCookieInfoForTests(); + cookie_info.status = CookieControlsStatus::kDisabledForSite; + cookie_info.blocking_status = CookieBlocking3pcdStatus::kLimited; + cookie_info.enforcement = CookieControlsEnforcement::kEnforcedByTpcdGrant; + content_view()->SetCookieInfo(cookie_info); + + EXPECT_EQ(third_party_cookies_description_label()->GetText(), + l10n_util::GetStringFUTF16( + IDS_PAGE_INFO_TRACKING_PROTECTION_SITE_GRANT_DESCRIPTION, + l10n_util::GetStringUTF16( + IDS_PAGE_INFO_TRACKING_PROTECTION_SETTINGS_LINK))); +} + +TEST_P(PageInfoCookiesContentView3pcdTitleAndDescriptionTest, + DisplaysTitleAndDescriptionWhenCookiesBlocked) { + PageInfoCookiesContentView::CookiesNewInfo cookie_info = + DefaultCookieInfoForTests(kDaysToExpiration); + cookie_info.blocking_status = GetParam(); + content_view()->SetCookieInfo(cookie_info); + + EXPECT_EQ( + third_party_cookies_title()->GetText(), + l10n_util::GetStringUTF16(IDS_PAGE_INFO_COOKIES_SITE_NOT_WORKING_TITLE)); + EXPECT_EQ( + third_party_cookies_description()->GetText(), + l10n_util::GetStringUTF16( + IDS_PAGE_INFO_TRACKING_PROTECTION_SITE_NOT_WORKING_DESCRIPTION_TEMPORARY)); +} + +TEST_P(PageInfoCookiesContentView3pcdTitleAndDescriptionTest, + DisplaysTitleAndDescriptionWhenCookiesAllowedWithPermanentException) { + PageInfoCookiesContentView::CookiesNewInfo cookie_info = + DefaultCookieInfoForTests(); + cookie_info.status = CookieControlsStatus::kDisabledForSite; + cookie_info.blocking_status = GetParam(); + content_view()->SetCookieInfo(cookie_info); + + EXPECT_EQ(third_party_cookies_title()->GetText(), + l10n_util::GetStringUTF16( + IDS_PAGE_INFO_TRACKING_PROTECTION_PERMANENT_ALLOWED_TITLE)); + EXPECT_EQ( + third_party_cookies_description()->GetText(), + l10n_util::GetStringUTF16( + IDS_PAGE_INFO_TRACKING_PROTECTION_COOKIES_PERMANENT_ALLOWED_DESCRIPTION)); +} + +INSTANTIATE_TEST_SUITE_P(All, + PageInfoCookiesContentView3pcdTitleAndDescriptionTest, + testing::Values(CookieBlocking3pcdStatus::kLimited, + CookieBlocking3pcdStatus::kAll)); + +class PageInfoCookiesContentView3pcdCookieToggleTest + : public PageInfoCookiesContentViewBaseTestClass, + public testing::WithParamInterface<CookieBlocking3pcdStatus> {}; + +TEST_F(PageInfoCookiesContentView3pcdCookieToggleTest, + DisplaysOffToggleWhenCookiesLimited) { + PageInfoCookiesContentView::CookiesNewInfo cookie_info = + DefaultCookieInfoForTests(); + cookie_info.blocking_status = CookieBlocking3pcdStatus::kLimited; + content_view()->SetCookieInfo(cookie_info); + + EXPECT_TRUE(third_party_cookies_label_wrapper()->GetVisible()); + // TODO(http://b/308988593): Verify the toggle row icon. + EXPECT_TRUE(third_party_cookies_toggle()->GetVisible()); + EXPECT_FALSE(third_party_cookies_toggle()->GetIsOn()); + EXPECT_FALSE(third_party_cookies_enforced_icon()->GetVisible()); + + EXPECT_EQ(third_party_cookies_toggle_subtitle()->GetText(), + l10n_util::GetStringUTF16( + IDS_PAGE_INFO_TRACKING_PROTECTION_COOKIES_LIMITED)); +} + +TEST_F(PageInfoCookiesContentView3pcdCookieToggleTest, + DisplaysOffToggleWhenCookiesBlocked) { + PageInfoCookiesContentView::CookiesNewInfo cookie_info = + DefaultCookieInfoForTests(); + cookie_info.blocking_status = CookieBlocking3pcdStatus::kAll; + content_view()->SetCookieInfo(cookie_info); + + EXPECT_TRUE(third_party_cookies_label_wrapper()->GetVisible()); + // TODO(http://b/308988593): Verify the toggle row icon. + EXPECT_TRUE(third_party_cookies_toggle()->GetVisible()); + EXPECT_FALSE(third_party_cookies_toggle()->GetIsOn()); + EXPECT_FALSE(third_party_cookies_enforced_icon()->GetVisible()); + + EXPECT_EQ(third_party_cookies_toggle_subtitle()->GetText(), + l10n_util::GetStringUTF16( + IDS_PAGE_INFO_TRACKING_PROTECTION_COOKIES_BLOCKED)); +} + +TEST_F(PageInfoCookiesContentView3pcdCookieToggleTest, + DisplaysOffToggleWhenCookiesBlockedInIncognitoMode) { + PageInfoCookiesContentView::CookiesNewInfo cookie_info = + DefaultCookieInfoForTests(); + cookie_info.blocking_status = CookieBlocking3pcdStatus::kAll; + cookie_info.is_otr = true; + content_view()->SetCookieInfo(cookie_info); + + EXPECT_TRUE(third_party_cookies_label_wrapper()->GetVisible()); + // TODO(http://b/308988593): Verify the toggle row icon. + EXPECT_TRUE(third_party_cookies_toggle()->GetVisible()); + EXPECT_FALSE(third_party_cookies_toggle()->GetIsOn()); + EXPECT_FALSE(third_party_cookies_enforced_icon()->GetVisible()); + + EXPECT_EQ(third_party_cookies_toggle_subtitle()->GetText(), + l10n_util::GetStringUTF16( + IDS_PAGE_INFO_TRACKING_PROTECTION_COOKIES_BLOCKED)); +} + +TEST_F(PageInfoCookiesContentView3pcdCookieToggleTest, + DisplaysOnToggleWhenCookiesAllowedInIncognitoMode) { + PageInfoCookiesContentView::CookiesNewInfo cookie_info = + DefaultCookieInfoForTests(); + cookie_info.status = CookieControlsStatus::kDisabledForSite; + cookie_info.blocking_status = CookieBlocking3pcdStatus::kAll; + cookie_info.is_otr = true; + content_view()->SetCookieInfo(cookie_info); + + EXPECT_TRUE(third_party_cookies_label_wrapper()->GetVisible()); + // TODO(http://b/308988593): Verify the toggle row icon. + EXPECT_TRUE(third_party_cookies_toggle()->GetVisible()); + EXPECT_TRUE(third_party_cookies_toggle()->GetIsOn()); + EXPECT_FALSE(third_party_cookies_enforced_icon()->GetVisible()); + + EXPECT_EQ(third_party_cookies_toggle_subtitle()->GetText(), + l10n_util::GetStringUTF16( + IDS_PAGE_INFO_TRACKING_PROTECTION_COOKIES_ALLOWED)); +} + +TEST_P(PageInfoCookiesContentView3pcdCookieToggleTest, + DisplaysOnToggleWhenCookiesAllowed) { + PageInfoCookiesContentView::CookiesNewInfo cookie_info = + DefaultCookieInfoForTests(); + cookie_info.blocking_status = GetParam(); + cookie_info.status = CookieControlsStatus::kDisabledForSite; + content_view()->SetCookieInfo(cookie_info); + + EXPECT_TRUE(third_party_cookies_label_wrapper()->GetVisible()); + // TODO(http://b/308988593): Verify the toggle row icon. + EXPECT_TRUE(third_party_cookies_toggle()->GetVisible()); + EXPECT_TRUE(third_party_cookies_toggle()->GetIsOn()); + EXPECT_FALSE(third_party_cookies_enforced_icon()->GetVisible()); + + EXPECT_EQ(third_party_cookies_toggle_subtitle()->GetText(), + l10n_util::GetStringUTF16( + IDS_PAGE_INFO_TRACKING_PROTECTION_COOKIES_ALLOWED)); +} + +TEST_P(PageInfoCookiesContentView3pcdCookieToggleTest, + LabelAndEnforcementShownWhenCookiesAllowedEnforcedBySetting) { + PageInfoCookiesContentView::CookiesNewInfo cookie_info = + DefaultCookieInfoForTests(); + cookie_info.enforcement = CookieControlsEnforcement::kEnforcedByCookieSetting; + cookie_info.status = CookieControlsStatus::kDisabledForSite; + cookie_info.blocking_status = GetParam(); + content_view()->SetCookieInfo(cookie_info); + + EXPECT_TRUE(third_party_cookies_label_wrapper()->GetVisible()); + // TODO(http://b/308988593): Verify the toggle row icon. + EXPECT_FALSE(third_party_cookies_toggle()->GetVisible()); + EXPECT_TRUE(third_party_cookies_enforced_icon()->GetVisible()); + + EXPECT_EQ(third_party_cookies_title()->GetText(), + l10n_util::GetStringUTF16( + IDS_PAGE_INFO_TRACKING_PROTECTION_PERMANENT_ALLOWED_TITLE)); + EXPECT_EQ( + third_party_cookies_description()->GetText(), + l10n_util::GetStringUTF16( + IDS_PAGE_INFO_TRACKING_PROTECTION_COOKIES_PERMANENT_ALLOWED_DESCRIPTION)); + EXPECT_EQ(third_party_cookies_toggle_subtitle()->GetText(), + l10n_util::GetStringUTF16( + IDS_PAGE_INFO_TRACKING_PROTECTION_COOKIES_ALLOWED)); +} + +TEST_P(PageInfoCookiesContentView3pcdCookieToggleTest, + LabelHiddenAndEnforcementShownWhenCookiesAllowedEnforcedByPolicy) { + PageInfoCookiesContentView::CookiesNewInfo cookie_info = + DefaultCookieInfoForTests(); + cookie_info.enforcement = CookieControlsEnforcement::kEnforcedByPolicy; + cookie_info.status = CookieControlsStatus::kDisabledForSite; + cookie_info.blocking_status = GetParam(); + content_view()->SetCookieInfo(cookie_info); + + EXPECT_FALSE(third_party_cookies_label_wrapper()->GetVisible()); + // TODO(http://b/308988593): Verify the toggle row icon. + EXPECT_FALSE(third_party_cookies_toggle()->GetVisible()); + EXPECT_TRUE(third_party_cookies_enforced_icon()->GetVisible()); + + EXPECT_EQ(third_party_cookies_toggle_subtitle()->GetText(), + l10n_util::GetStringUTF16( + IDS_PAGE_INFO_TRACKING_PROTECTION_COOKIES_ALLOWED)); +} + +TEST_P(PageInfoCookiesContentView3pcdCookieToggleTest, + LabelHiddenAndEnforcementShownWhenCookiesAllowedEnforcedByExtension) { + PageInfoCookiesContentView::CookiesNewInfo cookie_info = + DefaultCookieInfoForTests(); + cookie_info.enforcement = CookieControlsEnforcement::kEnforcedByExtension; + cookie_info.status = CookieControlsStatus::kDisabledForSite; + cookie_info.blocking_status = GetParam(); + content_view()->SetCookieInfo(cookie_info); + + EXPECT_FALSE(third_party_cookies_label_wrapper()->GetVisible()); + // TODO(http://b/308988593): Verify the toggle row icon. + EXPECT_FALSE(third_party_cookies_toggle()->GetVisible()); + EXPECT_TRUE(third_party_cookies_enforced_icon()->GetVisible()); + + EXPECT_EQ(third_party_cookies_toggle_subtitle()->GetText(), + l10n_util::GetStringUTF16( + IDS_PAGE_INFO_TRACKING_PROTECTION_COOKIES_ALLOWED)); +} + +INSTANTIATE_TEST_SUITE_P(All, + PageInfoCookiesContentView3pcdCookieToggleTest, + testing::Values(CookieBlocking3pcdStatus::kLimited, + CookieBlocking3pcdStatus::kAll));
diff --git a/chrome/browser/ui/views/page_info/page_info_main_view.cc b/chrome/browser/ui/views/page_info/page_info_main_view.cc index a12df12..ad451d5 100644 --- a/chrome/browser/ui/views/page_info/page_info_main_view.cc +++ b/chrome/browser/ui/views/page_info/page_info_main_view.cc
@@ -189,7 +189,7 @@ IDS_PAGE_INFO_TRACKING_PROTECTION_SITE_INFO_BUTTON_LABEL_LIMITED); } } else { - icon = PageInfoViewFactory::GetPermissionIcon(info); + icon = PageInfoViewFactory::GetCookiesAndSiteDataIcon(); title = l10n_util::GetStringUTF16(IDS_PAGE_INFO_COOKIES_HEADER); tooltip = l10n_util::GetStringUTF16(IDS_PAGE_INFO_COOKIES_TOOLTIP); }
diff --git a/chrome/browser/ui/views/page_info/page_info_view_factory.cc b/chrome/browser/ui/views/page_info/page_info_view_factory.cc index f8c4c10..02de1ec 100644 --- a/chrome/browser/ui/views/page_info/page_info_view_factory.cc +++ b/chrome/browser/ui/views/page_info/page_info_view_factory.cc
@@ -271,8 +271,8 @@ const gfx::VectorIcon* icon = nullptr; switch (info.type) { case ContentSettingsType::COOKIES: - icon = show_blocked_badge ? &vector_icons::kCookieOffChromeRefreshIcon - : &vector_icons::kCookieChromeRefreshIcon; + icon = show_blocked_badge ? &vector_icons::kDatabaseOffIcon + : &vector_icons::kDatabaseIcon; break; case ContentSettingsType::FEDERATED_IDENTITY_API: icon = show_blocked_badge @@ -417,7 +417,7 @@ const gfx::VectorIcon* icon = &gfx::kNoneIcon; switch (info.type) { case ContentSettingsType::COOKIES: - icon = &vector_icons::kCookieIcon; + icon = &vector_icons::kDatabaseIcon; break; case ContentSettingsType::FEDERATED_IDENTITY_API: icon = &vector_icons::kAccountCircleIcon; @@ -690,6 +690,13 @@ } // static +const ui::ImageModel PageInfoViewFactory::GetCookiesAndSiteDataIcon() { + return GetImageModel(features::IsChromeRefresh2023() + ? vector_icons::kCookieChromeRefreshIcon + : vector_icons::kCookieIcon); +} + +// static const ui::ImageModel PageInfoViewFactory::GetFpsIcon() { return GetImageModel(vector_icons::kTenancyIcon); }
diff --git a/chrome/browser/ui/views/page_info/page_info_view_factory.h b/chrome/browser/ui/views/page_info/page_info_view_factory.h index c4f39bf..719e7808 100644 --- a/chrome/browser/ui/views/page_info/page_info_view_factory.h +++ b/chrome/browser/ui/views/page_info/page_info_view_factory.h
@@ -145,6 +145,9 @@ // Returns the icon for the 'Block third party cookies' button. static const ui::ImageModel GetBlockingThirdPartyCookiesIcon(); + // Returns the icon for the 'Cookies and site data' button. + static const ui::ImageModel GetCookiesAndSiteDataIcon(); + // Returns the icon for the first party sets button. static const ui::ImageModel GetFpsIcon();
diff --git a/chrome/browser/ui/views/permissions/chip_controller.cc b/chrome/browser/ui/views/permissions/chip_controller.cc index b94e846..1e6726ae 100644 --- a/chrome/browser/ui/views/permissions/chip_controller.cc +++ b/chrome/browser/ui/views/permissions/chip_controller.cc
@@ -121,6 +121,9 @@ } void ChipController::OnRequestsFinalized() { + // Due to a permissions requests queue reordering, currently active + // permission request may get finalized without a user deciding on a + // permission prompt. That means `OnRequestDecided` will not be executed. ResetPermissionRequestChip(); } @@ -132,9 +135,15 @@ permissions::PermissionAction permission_action) { RemoveBubbleObserverAndResetTimersAndChipCallbacks(); if (!GetLocationBarView()->IsDrawn() || - GetLocationBarView()->GetWidget()->GetTopLevelWidget()->IsFullscreen()) { - // If the location bar isn't drawn or during fullscreen, the chip can't be - // shown anywhere. + GetLocationBarView()->GetWidget()->GetTopLevelWidget()->IsFullscreen() || + permission_action == permissions::PermissionAction::IGNORED || + permission_action == permissions::PermissionAction::DISMISSED || + permission_action == permissions::PermissionAction::REVOKED) { + // Reset everything and hide chip if: + // - `LocationBarView` isn't visible + // - `kConfirmationChip` isn't enabled + // - Permission request was ignored or denied as we do not confirm such + // actions. ResetPermissionPromptChip(); } else { HandleConfirmation(permission_action); @@ -159,6 +168,8 @@ collapse_timer_.Start(FROM_HERE, kConfirmationDisplayDuration, this, &ChipController::CollapseConfirmation); } else if (chip_->is_fully_collapsed()) { + // Quiet chip can collapse from a verbose state to an icon state. After it + // is collapsed, it should be dismissed. StartDismissTimer(); } else { StartCollapseTimer(); @@ -174,13 +185,10 @@ observation_.Reset(); - if (widget->closed_reason() == views::Widget::ClosedReason::kEscKeyPressed || - widget->closed_reason() == - views::Widget::ClosedReason::kCloseButtonClicked) { - OnPromptBubbleDismissed(); - } else { - CollapsePrompt(/*allow_restart=*/false); - } + // This method will be called only if a user dismissed permission prompt + // popup bubble. In all other cases, `OnRequestDecided` is called and Widget + // observer gets unsubscribed. + OnPromptBubbleDismissed(); } void ChipController::OnWidgetActivationChanged(views::Widget* widget, @@ -350,7 +358,7 @@ if (entry->IsInitialEntry()) return; - // prevent chip from collapsing while prompt bubble is open + // Prevent chip from collapsing while prompt bubble is open. ResetTimers(); auto initialized_callback = @@ -400,9 +408,7 @@ DCHECK(permission_prompt_model_); permission_prompt_model_->UpdateWithUserDecision(user_decision); SyncChipWithModel(); - if (user_decision != permissions::PermissionAction::IGNORED && - user_decision != permissions::PermissionAction::DISMISSED && - active_chip_permission_request_manager_.has_value() && + if (active_chip_permission_request_manager_.has_value() && !active_chip_permission_request_manager_.value() ->has_pending_requests() && permission_prompt_model_->CanDisplayConfirmation()) { @@ -493,12 +499,12 @@ ->GetAssociatedWebContents() ->CreateDisallowCustomCursorScope(); - // prevent chip from collapsing while prompt bubble is open + // Prevent chip from collapsing while prompt bubble is open. ResetTimers(); if (permission_prompt_model_->GetPromptStyle() == PermissionPromptStyle::kChip) { - // Loud prompt bubble + // Loud prompt bubble. raw_ptr<PermissionPromptBubbleBaseView> prompt_bubble = CreatePermissionPromptBubbleView( browser_, permission_prompt_model_->GetDelegate(), @@ -507,7 +513,7 @@ prompt_bubble->Show(); } else if (permission_prompt_model_->GetPromptStyle() == PermissionPromptStyle::kQuietChip) { - // Quiet prompt bubble + // Quiet prompt bubble. LocationBarView* lbv = GetLocationBarView(); content::WebContents* web_contents = lbv->GetContentSettingWebContents();
diff --git a/chrome/browser/ui/views/profiles/first_run_interactive_uitest.cc b/chrome/browser/ui/views/profiles/first_run_interactive_uitest.cc index de4e8009..bf1923c 100644 --- a/chrome/browser/ui/views/profiles/first_run_interactive_uitest.cc +++ b/chrome/browser/ui/views/profiles/first_run_interactive_uitest.cc
@@ -12,6 +12,7 @@ #include "chrome/browser/privacy_sandbox/privacy_sandbox_service.h" #include "chrome/browser/privacy_sandbox/privacy_sandbox_service_factory.h" #include "chrome/browser/profiles/profile.h" +#include "chrome/browser/search_engine_choice/search_engine_choice_service.h" #include "chrome/browser/signin/chrome_signin_client_test_util.h" #include "chrome/browser/signin/dice_tab_helper.h" #include "chrome/browser/signin/identity_manager_factory.h" @@ -29,6 +30,7 @@ #include "chrome/test/base/ui_test_utils.h" #include "chrome/test/interaction/interactive_browser_test.h" #include "components/privacy_sandbox/privacy_sandbox_features.h" +#include "components/search_engines/prepopulated_engines.h" #include "components/search_engines/search_engine_choice_utils.h" #include "components/search_engines/search_engines_switches.h" #include "components/signin/public/base/consent_level.h" @@ -71,6 +73,7 @@ "#cancelButton"}; const DeepQuery kOptInSyncButton{"sync-confirmation-app", "#confirmButton"}; const DeepQuery kDontSyncButton{"sync-confirmation-app", "#notNowButton"}; +const DeepQuery kSettingsButton{"sync-confirmation-app", "#settingsButton"}; const DeepQuery kConfirmDefaultBrowserButton{"default-browser-app", "#confirmButton"}; const DeepQuery kSubmitSearchEngineChoiceButton{"search-engine-choice-app", @@ -98,20 +101,20 @@ {.test_suffix = "WithDefaultBrowserAndSearchEngineChoiceSteps", .with_default_browser_step = true, .with_search_engine_choice_step = true}, -#endif {.test_suffix = "WithSearchEngineChoiceAndPrivacySandboxEnabled", .with_search_engine_choice_step = true, .with_privacy_sandbox_enabled = true}, +#endif }; } // namespace -class FirstRunInteractiveUiTest +class FirstRunInteractiveUiTestBase : public InteractiveBrowserTestT<FirstRunServiceBrowserTestBase>, public WithProfilePickerInteractiveUiTestHelpers { public: - FirstRunInteractiveUiTest() = default; - ~FirstRunInteractiveUiTest() override = default; + FirstRunInteractiveUiTestBase() = default; + ~FirstRunInteractiveUiTestBase() override = default; protected: const std::string kTestGivenName = "Joe"; @@ -238,7 +241,130 @@ ChromeSigninClientWithURLLoaderHelper url_loader_factory_helper_; }; -IN_PROC_BROWSER_TEST_F(FirstRunInteractiveUiTest, CloseWindow) { +class FirstRunParameterizedInteractiveUiTest + : public FirstRunInteractiveUiTestBase, + public testing::WithParamInterface<TestParam> { + public: + FirstRunParameterizedInteractiveUiTest() { + std::vector<base::test::FeatureRefAndParams> enabled_features_and_params; + enabled_features_and_params.push_back( + {kForYouFre, + {{kForYouFreWithDefaultBrowserStep.name, + WithDefaultBrowserStep() ? "forced" : "no"}}}); + +#if BUILDFLAG(ENABLE_SEARCH_ENGINE_CHOICE) + if (WithSearchEngineChoiceStep()) { + scoped_chrome_build_override_ = std::make_unique<base::AutoReset<bool>>( + SearchEngineChoiceServiceFactory::ScopedChromeBuildOverrideForTesting( + /*force_chrome_build=*/true)); + + enabled_features_and_params.push_back( + {switches::kSearchEngineChoiceFre, {}}); + enabled_features_and_params.push_back( + {switches::kSearchEngineChoice, {}}); + } +#endif + + if (WithPrivacySandboxEnabled()) { + enabled_features_and_params.push_back( + {privacy_sandbox::kPrivacySandboxSettings4, + {{privacy_sandbox::kPrivacySandboxSettings4ForceShowConsentForTesting + .name, + "true"}}}); + } + + scoped_feature_list_.InitWithFeaturesAndParameters( + enabled_features_and_params, {}); + } + + // FirstRunInteractiveUiTestBase: + void SetUpCommandLine(base::CommandLine* command_line) override { + FirstRunInteractiveUiTestBase::SetUpCommandLine(command_line); + + // Change the country to belgium so that the search engine choice test works + // as intended. + command_line->AppendSwitchASCII(switches::kSearchEngineChoiceCountry, "BE"); + } + + void SetUp() override { + if (WithPrivacySandboxEnabled()) { + ASSERT_TRUE(embedded_test_server()->InitializeAndListen()); + } + FirstRunInteractiveUiTestBase::SetUp(); + } + + void SetUpInProcessBrowserTestFixture() override { + FirstRunInteractiveUiTestBase::SetUpInProcessBrowserTestFixture(); + if (WithPrivacySandboxEnabled()) { + PrivacySandboxService::SetPromptDisabledForTests(false); + } + } + + void SetUpOnMainThread() override { + FirstRunInteractiveUiTestBase::SetUpOnMainThread(); + + if (WithPrivacySandboxEnabled()) { + host_resolver()->AddRule("*", "127.0.0.1"); + embedded_test_server()->StartAcceptingConnections(); + } + +#if BUILDFLAG(ENABLE_SEARCH_ENGINE_CHOICE) + if (WithSearchEngineChoiceStep()) { + SearchEngineChoiceService::SetDialogDisabledForTests( + /*dialog_disabled=*/false); + } +#endif + } + + bool WithDefaultBrowserStep() const { + return GetParam().with_default_browser_step; + } + +#if BUILDFLAG(ENABLE_SEARCH_ENGINE_CHOICE) + bool WithSearchEngineChoiceStep() const { + return GetParam().with_search_engine_choice_step; + } +#endif + + bool WithPrivacySandboxEnabled() const { + return GetParam().with_privacy_sandbox_enabled; + } + +#if BUILDFLAG(ENABLE_SEARCH_ENGINE_CHOICE) + auto CompleteSearchEngineChoiceStep() { + const DeepQuery first_search_engine = {"search-engine-choice-app", + "cr-radio-button"}; + return Steps( + WaitForWebContentsNavigation( + kWebContentsId, GURL(chrome::kChromeUISearchEngineChoiceURL)), + PressJsButton(kWebContentsId, first_search_engine), + WaitForButtonEnabled(kWebContentsId, kSubmitSearchEngineChoiceButton), + PressJsButton(kWebContentsId, kSubmitSearchEngineChoiceButton)); + } +#endif + + auto CompleteDefaultBrowserStep() { + return Steps( + WaitForWebContentsNavigation( + kWebContentsId, GURL(chrome::kChromeUIIntroDefaultBrowserURL)), + EnsurePresent(kWebContentsId, kConfirmDefaultBrowserButton), + PressJsButton(kWebContentsId, kConfirmDefaultBrowserButton)); + } + + private: + base::test::ScopedFeatureList scoped_feature_list_; + std::unique_ptr<base::AutoReset<bool>> scoped_chrome_build_override_; +}; + +INSTANTIATE_TEST_SUITE_P(, + FirstRunParameterizedInteractiveUiTest, + testing::ValuesIn(kTestParams), + &ParamToTestSuffix); + +// This test doesn't check for the search engine choice and privacy sandbox +// dialogs because the point of the test suite is to check what's happening in +// the FRE and not after it is closed. +IN_PROC_BROWSER_TEST_P(FirstRunParameterizedInteractiveUiTest, CloseWindow) { base::test::TestFuture<bool> proceed_future; base::HistogramTester histogram_tester; @@ -254,6 +380,7 @@ // Send "Close window" keyboard shortcut and wait for view to close. SendAccelerator(kProfilePickerViewId, GetAccelerator(IDC_CLOSE_WINDOW)) .SetMustRemainVisible(false)); + WaitForPickerClosed(); EXPECT_EQ(kForYouFreCloseShouldProceed.Get(), proceed_future.Get()); @@ -269,7 +396,7 @@ } #if BUILDFLAG(IS_MAC) -IN_PROC_BROWSER_TEST_F(FirstRunInteractiveUiTest, +IN_PROC_BROWSER_TEST_P(FirstRunParameterizedInteractiveUiTest, CloseChromeWithKeyboardShortcut) { base::test::TestFuture<bool> proceed_future; base::HistogramTester histogram_tester; @@ -297,98 +424,6 @@ } #endif -class FirstRunParameterizedInteractiveUiTest - : public FirstRunInteractiveUiTest, - public testing::WithParamInterface<TestParam> { - public: - FirstRunParameterizedInteractiveUiTest() { - std::vector<base::test::FeatureRefAndParams> enabled_features_and_params; - enabled_features_and_params.push_back( - {kForYouFre, - {{kForYouFreWithDefaultBrowserStep.name, - WithDefaultBrowserStep() ? "forced" : "no"}}}); - -#if BUILDFLAG(ENABLE_SEARCH_ENGINE_CHOICE) - if (WithSearchEngineChoiceStep()) { - scoped_chrome_build_override_ = std::make_unique<base::AutoReset<bool>>( - SearchEngineChoiceServiceFactory::ScopedChromeBuildOverrideForTesting( - /*force_chrome_build=*/true)); - - enabled_features_and_params.push_back( - {switches::kSearchEngineChoiceFre, {}}); - } -#endif - - if (WithPrivacySandboxEnabled()) { - enabled_features_and_params.push_back( - {privacy_sandbox::kPrivacySandboxSettings4, - {{privacy_sandbox::kPrivacySandboxSettings4ForceShowConsentForTesting - .name, - "true"}}}); - } - - scoped_feature_list_.InitWithFeaturesAndParameters( - enabled_features_and_params, {}); - } - - // FirstRunInteractiveUiTest: - void SetUpCommandLine(base::CommandLine* command_line) override { - FirstRunInteractiveUiTest::SetUpCommandLine(command_line); - -#if BUILDFLAG(ENABLE_SEARCH_ENGINE_CHOICE) - if (WithSearchEngineChoiceStep()) { - command_line->AppendSwitchASCII(switches::kSearchEngineChoiceCountry, - "BE"); - } -#endif - } - - void SetUp() override { - if (WithPrivacySandboxEnabled()) { - ASSERT_TRUE(embedded_test_server()->InitializeAndListen()); - } - FirstRunInteractiveUiTest::SetUp(); - } - - void SetUpInProcessBrowserTestFixture() override { - FirstRunInteractiveUiTest::SetUpInProcessBrowserTestFixture(); - if (WithPrivacySandboxEnabled()) { - PrivacySandboxService::SetPromptDisabledForTests(false); - } - } - - void SetUpOnMainThread() override { - FirstRunInteractiveUiTest::SetUpOnMainThread(); - if (WithPrivacySandboxEnabled()) { - host_resolver()->AddRule("*", "127.0.0.1"); - embedded_test_server()->StartAcceptingConnections(); - } - } - - bool WithDefaultBrowserStep() const { - return GetParam().with_default_browser_step; - } - -#if BUILDFLAG(ENABLE_SEARCH_ENGINE_CHOICE) - bool WithSearchEngineChoiceStep() const { - return GetParam().with_search_engine_choice_step; - } -#endif - - bool WithPrivacySandboxEnabled() const { - return GetParam().with_privacy_sandbox_enabled; - } - - private: - base::test::ScopedFeatureList scoped_feature_list_; - std::unique_ptr<base::AutoReset<bool>> scoped_chrome_build_override_; -}; - -INSTANTIATE_TEST_SUITE_P(, - FirstRunParameterizedInteractiveUiTest, - testing::ValuesIn(kTestParams), - &ParamToTestSuffix); - IN_PROC_BROWSER_TEST_P(FirstRunParameterizedInteractiveUiTest, SignInAndSync) { base::test::TestFuture<bool> proceed_future; base::HistogramTester histogram_tester; @@ -461,21 +496,11 @@ #if BUILDFLAG(ENABLE_SEARCH_ENGINE_CHOICE) If([&] { return WithSearchEngineChoiceStep(); }, - Steps( - WaitForWebContentsNavigation( - kWebContentsId, GURL(chrome::kChromeUISearchEngineChoiceURL)), - PressJsButton(kWebContentsId, first_search_engine), - WaitForButtonEnabled(kWebContentsId, - kSubmitSearchEngineChoiceButton), - PressJsButton(kWebContentsId, kSubmitSearchEngineChoiceButton))), + CompleteSearchEngineChoiceStep()), #endif If([&] { return WithDefaultBrowserStep(); }, - Steps( - WaitForWebContentsNavigation( - kWebContentsId, GURL(chrome::kChromeUIIntroDefaultBrowserURL)), - EnsurePresent(kWebContentsId, kConfirmDefaultBrowserButton), - PressJsButton(kWebContentsId, kConfirmDefaultBrowserButton)))); + CompleteDefaultBrowserStep())); WaitForPickerClosed(); @@ -538,7 +563,7 @@ ProfilePicker::FirstRunExitStatus::kCompleted, 1); } -IN_PROC_BROWSER_TEST_F(FirstRunInteractiveUiTest, DeclineSync) { +IN_PROC_BROWSER_TEST_P(FirstRunParameterizedInteractiveUiTest, DeclineSync) { base::test::TestFuture<bool> proceed_future; base::HistogramTester histogram_tester; @@ -567,9 +592,15 @@ AppendSyncConfirmationQueryParams(GURL("chrome://sync-confirmation/"), SyncConfirmationStyle::kWindow)), - // Click "Don't sign in" to proceed to the browser. EnsurePresent(kWebContentsId, kDontSyncButton), - PressJsButton(kWebContentsId, kDontSyncButton)); + PressJsButton(kWebContentsId, kDontSyncButton), + +#if BUILDFLAG(ENABLE_SEARCH_ENGINE_CHOICE) + If([&] { return WithSearchEngineChoiceStep(); }, + CompleteSearchEngineChoiceStep()), +#endif + If([&] { return WithDefaultBrowserStep(); }, + CompleteDefaultBrowserStep())); // Wait for the picker to be closed and deleted. WaitForPickerClosed(); @@ -597,7 +628,76 @@ ProfilePicker::FirstRunExitStatus::kCompleted, 1); } -IN_PROC_BROWSER_TEST_F(FirstRunInteractiveUiTest, PeekAndDeclineSignIn) { +IN_PROC_BROWSER_TEST_P(FirstRunParameterizedInteractiveUiTest, GoToSettings) { + base::test::TestFuture<bool> proceed_future; + base::HistogramTester histogram_tester; + + ASSERT_TRUE(IsProfileNameDefault()); + + OpenFirstRun(proceed_future.GetCallback()); + RunTestSequenceInContext( + views::ElementTrackerViews::GetContextForView(view()), + + // Wait for the profile picker to show the intro. + WaitForShow(kProfilePickerViewId), + InstrumentNonTabWebView(kWebContentsId, web_view()), + CompleteIntroStep(/*sign_in=*/true), + // Wait for switch to the Gaia sign-in page to complete. + // Note: kPickerWebContentsId now points to the new profile's WebContents. + WaitForWebContentsNavigation(kWebContentsId, + GetSigninChromeSyncDiceUrl())); + + // Pulled out of the test sequence because it waits using `RunLoop`s. + SimulateSignIn(kTestEmail, kTestGivenName); + + RunTestSequenceInContext( + views::ElementTrackerViews::GetContextForView(view()), + WaitForWebContentsNavigation( + kWebContentsId, + AppendSyncConfirmationQueryParams(GURL("chrome://sync-confirmation/"), + SyncConfirmationStyle::kWindow)), + + // Click "Settings" to proceed to the browser. + EnsurePresent(kWebContentsId, kSettingsButton), + PressJsButton(kWebContentsId, kSettingsButton)); + + // Wait for the picker to be closed and deleted. + WaitForPickerClosed(); + ASSERT_EQ( + browser()->tab_strip_model()->GetActiveWebContents()->GetVisibleURL(), + GURL(chrome::kChromeUISettingsURL).Resolve(chrome::kSyncSetupSubPage)); + +#if BUILDFLAG(ENABLE_SEARCH_ENGINE_CHOICE) + if (WithSearchEngineChoiceStep()) { + SearchEngineChoiceService* search_engine_choice_service = + SearchEngineChoiceServiceFactory::GetForProfile(profile()); + EXPECT_FALSE(search_engine_choice_service->IsShowingDialog(browser())); + } +#endif + + EXPECT_TRUE(proceed_future.Get()); + EXPECT_EQ(base::ASCIIToUTF16(kTestGivenName), GetProfileName()); + + // Checking the expected metrics from this flow. + histogram_tester.ExpectUniqueSample( + "Signin.SignIn.Offered", + signin_metrics::AccessPoint::ACCESS_POINT_FOR_YOU_FRE, 1); + histogram_tester.ExpectUniqueSample( + "Signin.SignIn.Started", + signin_metrics::AccessPoint::ACCESS_POINT_FOR_YOU_FRE, 1); + histogram_tester.ExpectUniqueSample( + "Signin.SignIn.Completed", + signin_metrics::AccessPoint::ACCESS_POINT_FOR_YOU_FRE, 1); + histogram_tester.ExpectUniqueSample( + "Signin.SyncOptIn.Started", + signin_metrics::AccessPoint::ACCESS_POINT_FOR_YOU_FRE, 1); + histogram_tester.ExpectUniqueSample( + "ProfilePicker.FirstRun.ExitStatus", + ProfilePicker::FirstRunExitStatus::kCompleted, 1); +} + +IN_PROC_BROWSER_TEST_P(FirstRunParameterizedInteractiveUiTest, + PeekAndDeclineSignIn) { base::HistogramTester histogram_tester; base::test::TestFuture<bool> proceed_future; @@ -627,7 +727,14 @@ EnsurePresent(kWebContentsId, kDontSignInButton), CheckJsResultAt(kWebContentsId, kSignInButton, "(e) => !e.disabled"), CheckJsResultAt(kWebContentsId, kDontSignInButton, "(e) => !e.disabled"), - PressJsButton(kWebContentsId, kDontSignInButton)); + PressJsButton(kWebContentsId, kDontSignInButton), + +#if BUILDFLAG(ENABLE_SEARCH_ENGINE_CHOICE) + If([&] { return WithSearchEngineChoiceStep(); }, + CompleteSearchEngineChoiceStep()), +#endif + If([&] { return WithDefaultBrowserStep(); }, + CompleteDefaultBrowserStep())); WaitForPickerClosed(); EXPECT_EQ(kForYouFreCloseShouldProceed.Get(), proceed_future.Get()); @@ -646,7 +753,8 @@ ProfilePicker::FirstRunExitStatus::kCompleted, 1); } -IN_PROC_BROWSER_TEST_F(FirstRunInteractiveUiTest, DeclineProfileManagement) { +IN_PROC_BROWSER_TEST_P(FirstRunParameterizedInteractiveUiTest, + DeclineProfileManagement) { base::test::TestFuture<bool> proceed_future; base::HistogramTester histogram_tester; @@ -691,9 +799,15 @@ WaitForWebContentsNavigation( kWebContentsId, GURL(chrome::kChromeUIEnterpriseProfileWelcomeURL)), - // Click "Don't sign in" to proceed to the browser. EnsurePresent(kWebContentsId, kDeclineManagementButton), - PressJsButton(kWebContentsId, kDeclineManagementButton)); + PressJsButton(kWebContentsId, kDeclineManagementButton), + +#if BUILDFLAG(ENABLE_SEARCH_ENGINE_CHOICE) + If([&] { return WithSearchEngineChoiceStep(); }, + CompleteSearchEngineChoiceStep()), +#endif + If([&] { return WithDefaultBrowserStep(); }, + CompleteDefaultBrowserStep())); // Wait for the picker to be closed and deleted. WaitForPickerClosed();
diff --git a/chrome/browser/ui/views/side_panel/side_panel_coordinator.cc b/chrome/browser/ui/views/side_panel/side_panel_coordinator.cc index 1981e7a..6150dfe4 100644 --- a/chrome/browser/ui/views/side_panel/side_panel_coordinator.cc +++ b/chrome/browser/ui/views/side_panel/side_panel_coordinator.cc
@@ -1177,6 +1177,7 @@ CHECK(action_id.has_value()); header_pin_button_->SetToggled(actions_model->Contains(action_id.value())); header_pin_button_->SetVisible( + !profile->IsIncognitoProfile() && !profile->IsGuestSession() && action_item->GetProperty(actions::kActionItemPinnableKey)); } else { PrefService* pref_service = profile->GetPrefs();
diff --git a/chrome/browser/ui/views/side_panel/side_panel_coordinator_unittest.cc b/chrome/browser/ui/views/side_panel/side_panel_coordinator_unittest.cc index 3528f20..3c6dd7d 100644 --- a/chrome/browser/ui/views/side_panel/side_panel_coordinator_unittest.cc +++ b/chrome/browser/ui/views/side_panel/side_panel_coordinator_unittest.cc
@@ -13,6 +13,7 @@ #include "base/test/icu_test_util.h" #include "base/test/scoped_feature_list.h" #include "chrome/app/vector_icons/vector_icons.h" +#include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/toolbar/pinned_toolbar_actions_model.h" #include "chrome/browser/ui/toolbar/pinned_toolbar_actions_model_factory.h" #include "chrome/browser/ui/ui_features.h" @@ -28,6 +29,7 @@ #include "chrome/browser/ui/views/side_panel/side_panel_view_state_observer.h" #include "chrome/common/pref_names.h" #include "chrome/grit/generated_resources.h" +#include "chrome/test/base/testing_profile.h" #include "components/strings/grit/components_strings.h" #include "testing/gmock/include/gmock/gmock.h" #include "ui/base/l10n/l10n_util.h" @@ -1743,6 +1745,16 @@ l10n_util::GetStringUTF16(IDS_PAGE_INFO_ABOUT_THIS_PAGE_TITLE)); } +TEST_F(SidePanelPinningCoordinatorTest, SidePanelPinButtonsHideInGuestMode) { + coordinator_->Show(SidePanelEntry::Id::kBookmarks); + EXPECT_TRUE(coordinator_->GetHeaderPinButtonForTesting()->GetVisible()); + coordinator_->Close(); + TestingProfile* const testprofile = browser()->profile()->AsTestingProfile(); + testprofile->SetGuestSession(true); + coordinator_->Show(SidePanelEntry::Id::kBookmarks); + EXPECT_FALSE(coordinator_->GetHeaderPinButtonForTesting()->GetVisible()); +} + // Test that the SidePanelCoordinator behaves and updates corrected when dealing // with entries that load/display asynchronously. class SidePanelCoordinatorLoadingContentTest : public SidePanelCoordinatorTest {
diff --git a/chrome/browser/ui/views/side_panel/side_panel_interactive_uitest.cc b/chrome/browser/ui/views/side_panel/side_panel_interactive_uitest.cc index a98366a6..f4068ecf 100644 --- a/chrome/browser/ui/views/side_panel/side_panel_interactive_uitest.cc +++ b/chrome/browser/ui/views/side_panel/side_panel_interactive_uitest.cc
@@ -347,6 +347,18 @@ } IN_PROC_BROWSER_TEST_F(PinnedSidePanelInteractiveTest, + SidePanelPinButtonsHideInIncognitoMode) { + Browser* const incognito = CreateIncognitoBrowser(); + RunTestSequence( + InContext(incognito->window()->GetElementContext(), + WaitForShow(kBrowserViewElementId)), + InSameContext(Steps(ActivateSurface(kBrowserViewElementId), FlushEvents(), + EnsureNotPresent(kSidePanelElementId), + OpenBookmarksSidePanel(), + EnsureNotPresent(kSidePanelPinButtonElementId)))); +} + +IN_PROC_BROWSER_TEST_F(PinnedSidePanelInteractiveTest, PinnedToolbarButtonsHighlightWhileSidePanelVisible) { // Replace the contents of the ReadingMode side panel with an empty view so it // loads faster.
diff --git a/chrome/browser/ui/webui/ash/login/local_password_setup_handler.cc b/chrome/browser/ui/webui/ash/login/local_password_setup_handler.cc index f99a41b..b6e7f4e 100644 --- a/chrome/browser/ui/webui/ash/login/local_password_setup_handler.cc +++ b/chrome/browser/ui/webui/ash/login/local_password_setup_handler.cc
@@ -42,6 +42,8 @@ builder->Add("confirmPasswordInputPlaceholderText", IDS_LOGIN_CONFIRM_PASSWORD_LABEL); builder->Add("passwordMismatchError", IDS_LOGIN_MANUAL_PASSWORD_MISMATCH); + builder->Add("showPassword", IDS_AUTH_SETUP_SHOW_PASSWORD); + builder->Add("hidePassword", IDS_AUTH_SETUP_HIDE_PASSWORD); builder->Add("setLocalPasswordPlaceholder", IDS_AUTH_SETUP_SET_LOCAL_PASSWORD_PLACEHOLDER); builder->Add("setLocalPasswordConfirmPlaceholder",
diff --git a/chrome/browser/ui/webui/ash/settings/integration_tests/os_settings_password_setup_browsertest.cc b/chrome/browser/ui/webui/ash/settings/integration_tests/os_settings_password_setup_browsertest.cc index 923f9d9..e2ae455 100644 --- a/chrome/browser/ui/webui/ash/settings/integration_tests/os_settings_password_setup_browsertest.cc +++ b/chrome/browser/ui/webui/ash/settings/integration_tests/os_settings_password_setup_browsertest.cc
@@ -53,16 +53,13 @@ lock_screen_settings.AssertPasswordControlVisibility(true); } +// The selected password type is settings is correct. IN_PROC_BROWSER_TEST_F(OSSettingsPasswordSetupTestWithLocalPassword, Selected) { mojom::LockScreenSettingsAsyncWaiter lock_screen_settings = OpenLockScreenSettingsAndAuthenticate(); mojom::PasswordSettingsApiAsyncWaiter password_settings = GoToPasswordSettings(lock_screen_settings); - - // TODO(b/304961785): Reenable this check. This check did not succeed in a - // debug build, where the tests seems to have timed out. - // - // password_settings.AssertSelectedPasswordType(mojom::PasswordType::kLocal); + password_settings.AssertSelectedPasswordType(mojom::PasswordType::kLocal); } } // namespace ash::settings
diff --git a/chrome/browser/ui/webui/ash/settings/pages/people/people_section.cc b/chrome/browser/ui/webui/ash/settings/pages/people/people_section.cc index 8f4a6b10..b40b1813 100644 --- a/chrome/browser/ui/webui/ash/settings/pages/people/people_section.cc +++ b/chrome/browser/ui/webui/ash/settings/pages/people/people_section.cc
@@ -297,6 +297,8 @@ IDS_OS_SETTINGS_PEOPLE_SET_LOCAL_PASSWORD_DIALOG_TITLE}, {"setLocalPasswordDialogInternalError", IDS_OS_SETTINGS_PEOPLE_SET_LOCAL_PASSWORD_DIALOG_INTERNAL_ERROR}, + {"showPassword", IDS_AUTH_SETUP_SHOW_PASSWORD}, + {"hidePassword", IDS_AUTH_SETUP_HIDE_PASSWORD}, {"setLocalPasswordPlaceholder", IDS_AUTH_SETUP_SET_LOCAL_PASSWORD_PLACEHOLDER}, {"setLocalPasswordConfirmPlaceholder",
diff --git a/chrome/browser/ui/webui/family_link_user_internals/family_link_user_internals_message_handler.cc b/chrome/browser/ui/webui/family_link_user_internals/family_link_user_internals_message_handler.cc index e4484a87..ae39157 100644 --- a/chrome/browser/ui/webui/family_link_user_internals/family_link_user_internals_message_handler.cc +++ b/chrome/browser/ui/webui/family_link_user_internals/family_link_user_internals_message_handler.cc
@@ -74,20 +74,20 @@ } std::string FilteringBehaviorToString( - supervised_user::SupervisedUserURLFilter::FilteringBehavior behavior) { + supervised_user::FilteringBehavior behavior) { switch (behavior) { - case supervised_user::SupervisedUserURLFilter::ALLOW: + case supervised_user::FilteringBehavior::kAllow: return "Allow"; - case supervised_user::SupervisedUserURLFilter::BLOCK: + case supervised_user::FilteringBehavior::kBlock: return "Block"; - case supervised_user::SupervisedUserURLFilter::INVALID: + case supervised_user::FilteringBehavior::kInvalid: return "Invalid"; } return "Unknown"; } std::string FilteringBehaviorToString( - supervised_user::SupervisedUserURLFilter::FilteringBehavior behavior, + supervised_user::FilteringBehavior behavior, bool uncertain) { std::string result = FilteringBehaviorToString(behavior); if (uncertain) @@ -251,14 +251,14 @@ void FamilyLinkUserInternalsMessageHandler::OnTryURLResult( const std::string& callback_id, - supervised_user::SupervisedUserURLFilter::FilteringBehavior behavior, + supervised_user::FilteringBehavior behavior, supervised_user::FilteringBehaviorReason reason, bool uncertain) { base::Value::Dict result; result.Set("allowResult", FilteringBehaviorToString(behavior, uncertain)); result.Set("manual", reason == supervised_user::FilteringBehaviorReason::MANUAL && - behavior == supervised_user::SupervisedUserURLFilter::ALLOW); + behavior == supervised_user::FilteringBehavior::kAllow); ResolveJavascriptCallback(base::Value(callback_id), result); } @@ -266,7 +266,7 @@ void FamilyLinkUserInternalsMessageHandler::OnURLChecked( const GURL& url, - supervised_user::SupervisedUserURLFilter::FilteringBehavior behavior, + supervised_user::FilteringBehavior behavior, supervised_user::FilteringBehaviorReason reason, bool uncertain) { DCHECK_CURRENTLY_ON(BrowserThread::UI);
diff --git a/chrome/browser/ui/webui/family_link_user_internals/family_link_user_internals_message_handler.h b/chrome/browser/ui/webui/family_link_user_internals/family_link_user_internals_message_handler.h index 242e3265b..c267db30 100644 --- a/chrome/browser/ui/webui/family_link_user_internals/family_link_user_internals_message_handler.h +++ b/chrome/browser/ui/webui/family_link_user_internals/family_link_user_internals_message_handler.h
@@ -12,6 +12,7 @@ #include "components/supervised_user/core/browser/supervised_user_service.h" #include "components/supervised_user/core/browser/supervised_user_service_observer.h" #include "components/supervised_user/core/browser/supervised_user_url_filter.h" +#include "components/supervised_user/core/common/supervised_user_utils.h" #include "content/public/browser/web_ui_message_handler.h" // The implementation for the chrome://family-link-user-internals page. @@ -46,19 +47,17 @@ void SendBasicInfo(); void SendFamilyLinkUserSettings(const base::Value::Dict& settings); - void OnTryURLResult( - const std::string& callback_id, - supervised_user::SupervisedUserURLFilter::FilteringBehavior behavior, - supervised_user::FilteringBehaviorReason reason, - bool uncertain); + void OnTryURLResult(const std::string& callback_id, + supervised_user::FilteringBehavior behavior, + supervised_user::FilteringBehaviorReason reason, + bool uncertain); // SupervisedUserURLFilter::Observer: void OnSiteListUpdated() override; - void OnURLChecked( - const GURL& url, - supervised_user::SupervisedUserURLFilter::FilteringBehavior behavior, - supervised_user::FilteringBehaviorReason reason, - bool uncertain) override; + void OnURLChecked(const GURL& url, + supervised_user::FilteringBehavior behavior, + supervised_user::FilteringBehaviorReason reason, + bool uncertain) override; base::CallbackListSubscription user_settings_subscription_;
diff --git a/chrome/browser/ui/webui/history/browsing_history_handler.cc b/chrome/browser/ui/webui/history/browsing_history_handler.cc index d7c07df..7fc51d4 100644 --- a/chrome/browser/ui/webui/history/browsing_history_handler.cc +++ b/chrome/browser/ui/webui/history/browsing_history_handler.cc
@@ -6,6 +6,7 @@ #include <stddef.h> +#include <optional> #include <set> #include "base/check_op.h" @@ -265,10 +266,10 @@ supervised_user_service->IsURLFilteringEnabled()) { supervised_user::SupervisedUserURLFilter* url_filter = supervised_user_service->GetURLFilter(); - int filtering_behavior = + supervised_user::FilteringBehavior filtering_behavior = url_filter->GetFilteringBehaviorForURL(entry.url.GetWithEmptyPath()); is_blocked_visit = entry.blocked_visit; - host_filtering_behavior = filtering_behavior; + host_filtering_behavior = static_cast<int>(filtering_behavior); } #endif
diff --git a/chrome/browser/ui/webui/omnibox_popup/omnibox_popup_ui.cc b/chrome/browser/ui/webui/omnibox_popup/omnibox_popup_ui.cc index 26df361..59de7572 100644 --- a/chrome/browser/ui/webui/omnibox_popup/omnibox_popup_ui.cc +++ b/chrome/browser/ui/webui/omnibox_popup/omnibox_popup_ui.cc
@@ -6,7 +6,11 @@ #include <atomic> +#include "base/strings/string_number_conversions.h" #include "chrome/browser/profiles/profile.h" +#include "chrome/browser/ui/browser_finder.h" +#include "chrome/browser/ui/browser_window.h" +#include "chrome/browser/ui/location_bar/location_bar.h" #include "chrome/browser/ui/webui/favicon_source.h" #include "chrome/browser/ui/webui/realbox/realbox_handler.h" #include "chrome/browser/ui/webui/sanitized_image_source.h" @@ -15,27 +19,10 @@ #include "chrome/grit/omnibox_popup_resources.h" #include "chrome/grit/omnibox_popup_resources_map.h" #include "components/favicon_base/favicon_url_parser.h" +#include "components/omnibox/browser/omnibox_view.h" #include "content/public/browser/web_ui_data_source.h" #include "ui/webui/color_change_listener/color_change_handler.h" -namespace { - -// This exists to avoid a race condition in RealboxHandler. It's better to -// rely on a specific variable controlled by local omnibox logic than to -// get the last active browser which could be changed by anything at any time. -// This can be eliminated if we find a way to cleanly pass pointers into WebUI -// construction, but currently they appear designed to avoid such things, -// sensibly relying on the URL only. -std::atomic<OmniboxController*> g_omnibox_controller = nullptr; - -} // namespace - -// static -void OmniboxPopupUI::SetOmniboxController( - OmniboxController* omnibox_controller) { - g_omnibox_controller = omnibox_controller; -} - OmniboxPopupUI::OmniboxPopupUI(content::WebUI* web_ui) : ui::MojoWebUIController(web_ui, /*enable_chrome_send=*/true), profile_(Profile::FromWebUI(web_ui)) { @@ -63,13 +50,42 @@ WEB_UI_CONTROLLER_TYPE_IMPL(OmniboxPopupUI) void OmniboxPopupUI::BindInterface( + content::RenderFrameHost* host, mojo::PendingReceiver<omnibox::mojom::PageHandler> pending_page_handler) { - OmniboxController* controller = g_omnibox_controller; - g_omnibox_controller = nullptr; + // Extract SessionID from URL to select the omnibox that initiated page load. + const GURL& url = host->GetWebUI()->GetWebContents()->GetLastCommittedURL(); + SessionID id = SessionID::InvalidValue(); + if (url.is_valid() && url.has_query()) { + base::StringPiece spec(url.query_piece()); + url::Component query, key, value; + query.len = static_cast<int>(spec.size()); + while (url::ExtractQueryKeyValue(spec.data(), &query, &key, &value)) { + if (key.is_nonempty() && value.is_nonempty()) { + const base::StringPiece key_piece = spec.substr(key.begin, key.len); + constexpr char kSessionIdKey[] = "session_id"; + if (key_piece == kSessionIdKey) { + const base::StringPiece value_piece = + spec.substr(value.begin, value.len); + int value_int = 0; + if (base::StringToInt(value_piece, &value_int)) { + id = SessionID::FromSerializedValue(value_int); + } + break; + } + } + } + } - handler_ = std::make_unique<RealboxHandler>( - std::move(pending_page_handler), Profile::FromWebUI(web_ui()), - web_ui()->GetWebContents(), &metrics_reporter_, controller); + if (id.is_valid()) { + if (Browser* browser = chrome::FindBrowserWithID(id)) { + OmniboxController* controller = + browser->window()->GetLocationBar()->GetOmniboxView()->controller(); + + handler_ = std::make_unique<RealboxHandler>( + std::move(pending_page_handler), Profile::FromWebUI(web_ui()), + web_ui()->GetWebContents(), &metrics_reporter_, controller); + } + } } void OmniboxPopupUI::BindInterface(
diff --git a/chrome/browser/ui/webui/omnibox_popup/omnibox_popup_ui.h b/chrome/browser/ui/webui/omnibox_popup/omnibox_popup_ui.h index 786167f..480040a 100644 --- a/chrome/browser/ui/webui/omnibox_popup/omnibox_popup_ui.h +++ b/chrome/browser/ui/webui/omnibox_popup/omnibox_popup_ui.h
@@ -10,12 +10,12 @@ #include "build/build_config.h" #include "chrome/browser/ui/webui/metrics_reporter/metrics_reporter.h" #include "components/omnibox/browser/omnibox.mojom-forward.h" +#include "content/public/browser/render_frame_host.h" #include "mojo/public/cpp/bindings/pending_receiver.h" #include "ui/webui/mojo_web_ui_controller.h" #include "ui/webui/resources/cr_components/color_change_listener/color_change_listener.mojom-forward.h" #include "ui/webui/resources/js/metrics_reporter/metrics_reporter.mojom-forward.h" -class OmniboxController; class Profile; class RealboxHandler; @@ -26,11 +26,6 @@ // The Web UI controller for the chrome://omnibox-popup.top-chrome. class OmniboxPopupUI : public ui::MojoWebUIController { public: - // Called in advance of navigation for the webui omnibox popup, - // this lets the next instance of the webui handler connect with the - // `OmniboxController` instance owned by the `OmniboxView`. - static void SetOmniboxController(OmniboxController* omnibox_controller); - explicit OmniboxPopupUI(content::WebUI* web_ui); OmniboxPopupUI(const OmniboxPopupUI&) = delete; OmniboxPopupUI& operator=(const OmniboxPopupUI&) = delete; @@ -39,6 +34,7 @@ // Instantiates the implementor of the omnibox::mojom::PageHandler mojo // interface passing the pending receiver that will be internally bound. void BindInterface( + content::RenderFrameHost* host, mojo::PendingReceiver<omnibox::mojom::PageHandler> pending_page_handler); // Instantiates the implementor of metrics_reporter::mojom::PageMetricsHost // mojo interface passing the pending receiver that will be internally bound.
diff --git a/chrome/browser/ui/webui/print_preview/pdf_printer_handler.cc b/chrome/browser/ui/webui/print_preview/pdf_printer_handler.cc index 2d165615..161d59e 100644 --- a/chrome/browser/ui/webui/print_preview/pdf_printer_handler.cc +++ b/chrome/browser/ui/webui/print_preview/pdf_printer_handler.cc
@@ -45,6 +45,7 @@ #include "printing/units.h" #include "ui/base/l10n/l10n_util.h" #include "ui/gfx/geometry/size.h" +#include "ui/gfx/native_widget_types.h" #include "url/gurl.h" #if BUILDFLAG(IS_MAC) @@ -63,6 +64,10 @@ #include "chromeos/lacros/lacros_service.h" #endif +#if defined(USE_AURA) +#include "ui/aura/window.h" +#endif + namespace printing { namespace { @@ -529,13 +534,24 @@ file_type_info.allowed_paths = ui::SelectFileDialog::FileTypeInfo::NATIVE_PATH; + gfx::NativeView owning_window = preview_web_contents_->GetNativeView(); +#if defined(USE_AURA) + if (!owning_window->IsVisible()) { + auto* dialog_controller = PrintPreviewDialogController::GetInstance(); + CHECK(dialog_controller); + auto* initiator = dialog_controller->GetInitiator(preview_web_contents_); + if (initiator) { + owning_window = initiator->GetNativeView(); + } + } +#endif + select_file_dialog_ = ui::SelectFileDialog::Create(this, nullptr /*policy already checked*/); select_file_dialog_->SelectFile( ui::SelectFileDialog::SELECT_SAVEAS_FILE, std::u16string(), path, &file_type_info, 0, kPdfExtension, - platform_util::GetTopLevel(preview_web_contents_->GetNativeView()), - nullptr); + platform_util::GetTopLevel(owning_window), nullptr); } base::FilePath PdfPrinterHandler::GetSaveLocation() const {
diff --git a/chrome/browser/ui/webui/settings/site_settings_helper.cc b/chrome/browser/ui/webui/settings/site_settings_helper.cc index c0cc4dbb..d657bff 100644 --- a/chrome/browser/ui/webui/settings/site_settings_helper.cc +++ b/chrome/browser/ui/webui/settings/site_settings_helper.cc
@@ -204,6 +204,7 @@ // for the integration with Safety Hub. {ContentSettingsType::FILE_SYSTEM_ACCESS_EXTENDED_PERMISSION, nullptr}, {ContentSettingsType::TPCD_HEURISTICS_GRANTS, nullptr}, + {ContentSettingsType::FILE_SYSTEM_ACCESS_RESTORE_PERMISSION, nullptr}, }; static_assert(std::size(kContentSettingsTypeGroupNames) ==
diff --git a/chrome/browser/ui/webui/tab_search/tab_search.mojom b/chrome/browser/ui/webui/tab_search/tab_search.mojom index 3e609e7..0e2e99e5 100644 --- a/chrome/browser/ui/webui/tab_search/tab_search.mojom +++ b/chrome/browser/ui/webui/tab_search/tab_search.mojom
@@ -230,6 +230,15 @@ // Force trigger the tab group tutorial. StartTabGroupTutorial(); + // Initiate the sync flow. + TriggerSync(); + + // Initiate the sign in flow. + TriggerSignIn(); + + // Open the user's sync settings in a new tab. + OpenSyncSettings(); + // Notify the backend that the UI is ready to be shown. ShowUI(); };
diff --git a/chrome/browser/ui/webui/tab_search/tab_search_page_handler.cc b/chrome/browser/ui/webui/tab_search/tab_search_page_handler.cc index f18146a1..4b7ebbd 100644 --- a/chrome/browser/ui/webui/tab_search/tab_search_page_handler.cc +++ b/chrome/browser/ui/webui/tab_search/tab_search_page_handler.cc
@@ -24,10 +24,13 @@ #include "chrome/browser/favicon/favicon_utils.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/sessions/tab_restore_service_factory.h" +#include "chrome/browser/signin/identity_manager_factory.h" +#include "chrome/browser/signin/signin_ui_util.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/browser_finder.h" #include "chrome/browser/ui/browser_list.h" #include "chrome/browser/ui/browser_live_tab_context.h" +#include "chrome/browser/ui/browser_navigator.h" #include "chrome/browser/ui/browser_window.h" #include "chrome/browser/ui/color/chrome_color_id.h" #include "chrome/browser/ui/tabs/tab_enums.h" @@ -41,6 +44,7 @@ #include "chrome/browser/user_education/user_education_service.h" #include "chrome/browser/user_education/user_education_service_factory.h" #include "chrome/common/webui_url_constants.h" +#include "components/signin/public/base/signin_metrics.h" #include "components/user_education/common/tutorial_identifier.h" #include "components/user_education/common/tutorial_service.h" #include "ui/base/l10n/time_format.h" @@ -310,6 +314,30 @@ tutorial_service->StartTutorial(tutorial_id, context); } +void TabSearchPageHandler::TriggerSync() { + Profile* profile = chrome::FindLastActive()->profile(); + signin_ui_util::EnableSyncFromSingleAccountPromo( + profile, + IdentityManagerFactory::GetForProfile(profile)->GetPrimaryAccountInfo( + signin::ConsentLevel::kSignin), + signin_metrics::AccessPoint::ACCESS_POINT_TAB_ORGANIZATION); +} + +void TabSearchPageHandler::TriggerSignIn() { + Profile* profile = chrome::FindLastActive()->profile(); + signin_ui_util::ShowSigninPromptFromPromo( + profile, signin_metrics::AccessPoint::ACCESS_POINT_TAB_ORGANIZATION); +} + +void TabSearchPageHandler::OpenSyncSettings() { + Browser* browser = chrome::FindLastActive(); + GURL settings_url("chrome://settings/syncSetup/advanced"); + NavigateParams params(browser, settings_url, + ui::PageTransition::PAGE_TRANSITION_LINK); + params.disposition = WindowOpenDisposition::NEW_FOREGROUND_TAB; + Navigate(¶ms); +} + void TabSearchPageHandler::ShowUI() { auto embedder = webui_controller_->embedder(); if (embedder)
diff --git a/chrome/browser/ui/webui/tab_search/tab_search_page_handler.h b/chrome/browser/ui/webui/tab_search/tab_search_page_handler.h index 04bdd67..fd830149 100644 --- a/chrome/browser/ui/webui/tab_search/tab_search_page_handler.h +++ b/chrome/browser/ui/webui/tab_search/tab_search_page_handler.h
@@ -78,6 +78,9 @@ void SaveRecentlyClosedExpandedPref(bool expanded) override; void SetTabIndex(int32_t index) override; void StartTabGroupTutorial() override; + void TriggerSync() override; + void TriggerSignIn() override; + void OpenSyncSettings() override; void ShowUI() override; // TabStripModelObserver:
diff --git a/chrome/build/lacros64.pgo.txt b/chrome/build/lacros64.pgo.txt index fc5a48e..d2bafaf6 100644 --- a/chrome/build/lacros64.pgo.txt +++ b/chrome/build/lacros64.pgo.txt
@@ -1 +1 @@ -chrome-chromeos-amd64-generic-main-1699228309-2a213b4865bb35f4668f7ec09d0dae5ff361d09a.profdata +chrome-chromeos-amd64-generic-main-1699272180-5cde2f730aee284c1f73d4187cb624d690c2aefd.profdata
diff --git a/chrome/build/linux.pgo.txt b/chrome/build/linux.pgo.txt index ac493042..cf3e1f7 100644 --- a/chrome/build/linux.pgo.txt +++ b/chrome/build/linux.pgo.txt
@@ -1 +1 @@ -chrome-linux-main-1699250047-1dbf5e56cbcdfa11606c5ea54ebe904d99b8d230.profdata +chrome-linux-main-1699271769-0ba4682db450259f61f4ca95793e089e22e26b22.profdata
diff --git a/chrome/build/mac-arm.pgo.txt b/chrome/build/mac-arm.pgo.txt index 32839ee3..60ea540 100644 --- a/chrome/build/mac-arm.pgo.txt +++ b/chrome/build/mac-arm.pgo.txt
@@ -1 +1 @@ -chrome-mac-arm-main-1699264736-168812b2d94854878fccb74eb0ba1a08ed7631d2.profdata +chrome-mac-arm-main-1699286368-f1fadcb32372055ef1f3b603d2459ddfff655fc4.profdata
diff --git a/chrome/build/mac.pgo.txt b/chrome/build/mac.pgo.txt index 84faf630..0dbdaf5 100644 --- a/chrome/build/mac.pgo.txt +++ b/chrome/build/mac.pgo.txt
@@ -1 +1 @@ -chrome-mac-main-1699250047-6403ed1ff39051e61de538ae6d5b33f30c8a13ab.profdata +chrome-mac-main-1699271769-c15a0bed1db235b92e098cab7fb31f1caa67db14.profdata
diff --git a/chrome/build/win32.pgo.txt b/chrome/build/win32.pgo.txt index d97e59b1..bf6360d1 100644 --- a/chrome/build/win32.pgo.txt +++ b/chrome/build/win32.pgo.txt
@@ -1 +1 @@ -chrome-win32-main-1699261119-0e0943106dfdab392564c1a27ed63a5eff8b9e81.profdata +chrome-win32-main-1699271769-7c32034967be5aa85665bf8fed49b4877cad64f5.profdata
diff --git a/chrome/build/win64.pgo.txt b/chrome/build/win64.pgo.txt index 2ddb27f37..1800244a 100644 --- a/chrome/build/win64.pgo.txt +++ b/chrome/build/win64.pgo.txt
@@ -1 +1 @@ -chrome-win64-main-1699261119-3f3189d26a3c7239f29572c8d5044d986a6a1b92.profdata +chrome-win64-main-1699271769-ba183339a05941ba0b1af215964a1fd6068d8880.profdata
diff --git a/chrome/chrome_paks.gni b/chrome/chrome_paks.gni index d04046b..5b1d8342 100644 --- a/chrome/chrome_paks.gni +++ b/chrome/chrome_paks.gni
@@ -117,7 +117,6 @@ "$root_gen_dir/content/indexed_db_resources.pak", "$root_gen_dir/content/private_aggregation_internals_resources.pak", "$root_gen_dir/content/quota_internals_resources.pak", - "$root_gen_dir/content/traces_internals_resources.pak", "$root_gen_dir/mojo/public/js/mojo_bindings_resources.pak", "$root_gen_dir/net/net_resources.pak", "$root_gen_dir/third_party/blink/public/resources/blink_resources.pak", @@ -193,6 +192,7 @@ "$root_gen_dir/chrome/whats_new_resources.pak", "$root_gen_dir/content/browser/devtools/devtools_resources.pak", "$root_gen_dir/content/browser/tracing/tracing_resources.pak", + "$root_gen_dir/content/traces_internals_resources.pak", ] deps += [ "//chrome/browser/resources:component_extension_resources",
diff --git a/chrome/common/extensions/api/accessibility_private.json b/chrome/common/extensions/api/accessibility_private.json index ab8d7b3..40a531d 100644 --- a/chrome/common/extensions/api/accessibility_private.json +++ b/chrome/common/extensions/api/accessibility_private.json
@@ -6,6 +6,7 @@ { "namespace": "accessibilityPrivate", "compiler_options": { + "modernised_enums": true, "implemented_in": "chrome/browser/accessibility/accessibility_extension_api_ash.h" }, "description": "none",
diff --git a/chrome/test/data/background_fetch/background_fetch.html b/chrome/test/data/background_fetch/background_fetch.html index 95d417e..e954a70 100644 --- a/chrome/test/data/background_fetch/background_fetch.html +++ b/chrome/test/data/background_fetch/background_fetch.html
@@ -3,7 +3,7 @@ <head> <meta charset="utf-8" /> <title>BackgroundFetchBrowserTest helper page</title> - <script src="../result_queue.js"></script> + <script src="../format_error.js"></script> <script src="background_fetch.js"></script> </head> <body>
diff --git a/chrome/test/data/background_sync/background_sync_browsertest.html b/chrome/test/data/background_sync/background_sync_browsertest.html index 3365847..225c8676 100644 --- a/chrome/test/data/background_sync/background_sync_browsertest.html +++ b/chrome/test/data/background_sync/background_sync_browsertest.html
@@ -3,7 +3,7 @@ <head> <meta charset="utf-8" /> <title>BackgroundSyncBrowserTest helper page</title> - <script src="../result_queue.js"></script> + <script src="../format_error.js"></script> <script src="background_sync_browsertest.js"></script> </head> <body>
diff --git a/chrome/test/data/content_index/content_index.html b/chrome/test/data/content_index/content_index.html index 52f6857c..aff5468 100644 --- a/chrome/test/data/content_index/content_index.html +++ b/chrome/test/data/content_index/content_index.html
@@ -3,7 +3,7 @@ <head> <meta charset="utf-8" /> <title>ContentIndexBrowserTest helper page</title> - <script src="../result_queue.js"></script> + <script src="../format_error.js"></script> <script src="content_index.js"></script> <iframe src="content_index_iframe.html" id="iframe-id"></iframe> </head>
diff --git a/chrome/test/data/content_index/content_index_iframe.html b/chrome/test/data/content_index/content_index_iframe.html index d1a9070..7c035be9d 100644 --- a/chrome/test/data/content_index/content_index_iframe.html +++ b/chrome/test/data/content_index/content_index_iframe.html
@@ -3,7 +3,7 @@ <head> <meta charset="utf-8" /> <title>ContentIndexBrowserTest helper (iframe) page</title> - <script src="../result_queue.js"></script> + <script src="../format_error.js"></script> <script src="content_index.js"></script> </head> <body>
diff --git a/chrome/test/data/fenced_frames/background_fetch.html b/chrome/test/data/fenced_frames/background_fetch.html index c3c196ff..63024c7 100644 --- a/chrome/test/data/fenced_frames/background_fetch.html +++ b/chrome/test/data/fenced_frames/background_fetch.html
@@ -3,7 +3,7 @@ <head> <meta charset="utf-8" /> <title>BackgroundFetchBrowserTest helper page</title> - <script src="../result_queue.js"></script> + <script src="../format_error.js"></script> <script> const kBackgroundFetchId = 'bg-fetch-id'; const kBackgroundFetchResource = [ '/background_fetch/types_of_cheese.txt' ];
diff --git a/chrome/browser/resources/chromeos/login/.eslintrc.js b/chrome/test/data/format_error.js similarity index 64% rename from chrome/browser/resources/chromeos/login/.eslintrc.js rename to chrome/test/data/format_error.js index 7481f707..aef6532 100644 --- a/chrome/browser/resources/chromeos/login/.eslintrc.js +++ b/chrome/test/data/format_error.js
@@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -module.exports = { - 'rules' : { - 'no-var' : 'off', - }, -}; +function formatError(error) { + return error.name + ' - ' + error.message; +}
diff --git a/chrome/test/data/privacy_budget/scrape_screen.js b/chrome/test/data/privacy_budget/sample_surfaces.js similarity index 91% rename from chrome/test/data/privacy_budget/scrape_screen.js rename to chrome/test/data/privacy_budget/sample_surfaces.js index 2ecafa7..1d577917 100644 --- a/chrome/test/data/privacy_budget/scrape_screen.js +++ b/chrome/test/data/privacy_budget/sample_surfaces.js
@@ -17,6 +17,9 @@ "availTop" : window.screen.availTop, "left" : window.screen.left, "top" : window.screen.top + }, + "Navigator": { + "doNotTrack" : navigator.doNotTrack } })); });
diff --git a/chrome/test/data/privacy_budget/samples_screen_attributes.html b/chrome/test/data/privacy_budget/samples_screen_attributes.html deleted file mode 100644 index 918069b6..0000000 --- a/chrome/test/data/privacy_budget/samples_screen_attributes.html +++ /dev/null
@@ -1,5 +0,0 @@ -<!DOCTYPE html> -<meta charset="utf-8"> -<title>Privacy Budget: Test page that samples Screen attributes.</title> -<script src="test_utils.js"></script> -<script src="scrape_screen.js"></script>
diff --git a/chrome/test/data/privacy_budget/samples_some_surfaces.html b/chrome/test/data/privacy_budget/samples_some_surfaces.html new file mode 100644 index 0000000..b44de04 --- /dev/null +++ b/chrome/test/data/privacy_budget/samples_some_surfaces.html
@@ -0,0 +1,5 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>Privacy Budget: Test page that samples some surfaces.</title> +<script src="test_utils.js"></script> +<script src="sample_surfaces.js"></script>
diff --git a/chrome/test/data/push_messaging/subscope1/test.html b/chrome/test/data/push_messaging/subscope1/test.html index 153cb50..11f43b4 100644 --- a/chrome/test/data/push_messaging/subscope1/test.html +++ b/chrome/test/data/push_messaging/subscope1/test.html
@@ -3,6 +3,7 @@ <head> <title>Push API Sub-scope 1 Test</title> <link rel="manifest" href="../manifest.json"> + <script src="../../format_error.js"></script> <script src="../../result_queue.js"></script> <script src="../push_constants.js"></script> <script src="../push_test.js"></script>
diff --git a/chrome/test/data/push_messaging/subscope2/test.html b/chrome/test/data/push_messaging/subscope2/test.html index 1a12467..5b89449 100644 --- a/chrome/test/data/push_messaging/subscope2/test.html +++ b/chrome/test/data/push_messaging/subscope2/test.html
@@ -3,6 +3,7 @@ <head> <title>Push API Sub-scope 2 Test</title> <link rel="manifest" href="../manifest.json"> + <script src="../../format_error.js"></script> <script src="../../result_queue.js"></script> <script src="../push_constants.js"></script> <script src="../push_test.js"></script>
diff --git a/chrome/test/data/push_messaging/test.html b/chrome/test/data/push_messaging/test.html index ffead961..5565634 100644 --- a/chrome/test/data/push_messaging/test.html +++ b/chrome/test/data/push_messaging/test.html
@@ -3,6 +3,7 @@ <head> <title>Push API Test</title> <link rel="manifest" href="manifest.json"> + <script src="../format_error.js"></script> <script src="../result_queue.js"></script> <script src="push_constants.js"></script> <script src="push_test.js"></script>
diff --git a/chrome/test/data/push_messaging/test_no_manifest.html b/chrome/test/data/push_messaging/test_no_manifest.html index 96c2ce4..82a591bd 100644 --- a/chrome/test/data/push_messaging/test_no_manifest.html +++ b/chrome/test/data/push_messaging/test_no_manifest.html
@@ -2,6 +2,7 @@ <html> <head> <title>Push API Test</title> + <script src="../format_error.js"></script> <script src="../result_queue.js"></script> <script src="push_constants.js"></script> <script src="push_test.js"></script>
diff --git a/chrome/test/data/result_queue.js b/chrome/test/data/result_queue.js index beb9185..9e9ae60 100644 --- a/chrome/test/data/result_queue.js +++ b/chrome/test/data/result_queue.js
@@ -37,7 +37,3 @@ ResultQueue.prototype.popImmediately = function() { return this.queue.length ? this.queue.pop() : null; }; - -function formatError(error) { - return error.name + ' - ' + error.message; -}
diff --git a/chrome/test/data/webui/chromeos/scanning/scanning_app_browsertest.js b/chrome/test/data/webui/chromeos/scanning/scanning_app_browsertest.js index dc3b35a..d24e1605 100644 --- a/chrome/test/data/webui/chromeos/scanning/scanning_app_browsertest.js +++ b/chrome/test/data/webui/chromeos/scanning/scanning_app_browsertest.js
@@ -27,7 +27,8 @@ ['MultiPageScan', 'multi_page_scan_test.js'], ['PageSizeSelect', 'page_size_select_test.js'], ['ResolutionSelect', 'resolution_select_test.js'], - ['ScanApp', 'scanning_app_test.js'], + // TODO(https://crbug.com/1499761): Re-enable after fixing flaky test. + ['ScanApp', 'scanning_app_test.js', 'DISABLED_All'], ['ScanDoneSection', 'scan_done_section_test.js'], ['ScannerSelect', 'scanner_select_test.js'], ['ScanPreview', 'scan_preview_test.js'],
diff --git a/chrome/test/data/webui/chromeos/scanning/scanning_app_test.ts b/chrome/test/data/webui/chromeos/scanning/scanning_app_test.ts index ba0d302..7e1cdaa 100644 --- a/chrome/test/data/webui/chromeos/scanning/scanning_app_test.ts +++ b/chrome/test/data/webui/chromeos/scanning/scanning_app_test.ts
@@ -2149,10 +2149,7 @@ // Verify that no scanners get evicted when the number of scanners in saved // scan settings is equal to |MAX_NUM_SAVED_SCANNERS|. - // - // Flaky test - // TODO(https://crbug.com/1499761): Reenable it. - test.skip('doNotEvictScannersAtMax', async () => { + test('doNotEvictScannersAtMax', async () => { const scanners: ScannerSetting[] = new Array(MAX_NUM_SAVED_SCANNERS); for (let i = 0; i < MAX_NUM_SAVED_SCANNERS; i++) { scanners[i] = {
diff --git a/chrome/test/data/webui/settings/dropdown_menu_test.ts b/chrome/test/data/webui/settings/dropdown_menu_test.ts index a214eae..822fcef 100644 --- a/chrome/test/data/webui/settings/dropdown_menu_test.ts +++ b/chrome/test/data/webui/settings/dropdown_menu_test.ts
@@ -12,14 +12,10 @@ suite('SettingsDropdownMenu', function() { let dropdown: SettingsDropdownMenuElement; - /** - * The <select> used internally by the dropdown menu. - */ + // The <select> used internally by the dropdown menu. let selectElement: HTMLSelectElement; - /** - * The "Custom" option in the <select> menu. - */ + // The "Custom" option in the <select> menu. let customOption: HTMLOptionElement; function waitUntilDropdownUpdated(): Promise<void> { @@ -43,7 +39,7 @@ assertTrue(!!customOption); }); - test('with number options', function testNumberOptions() { + test('with number options', async function() { dropdown.pref = { key: 'test.number', type: chrome.settingsPrivate.PrefType.NUMBER, @@ -55,30 +51,23 @@ {value: 300, name: 'Option 300'}, {value: 400, name: 'Option 400'}, ]; + await waitUntilDropdownUpdated(); - return waitUntilDropdownUpdated() - .then(function() { - // Initially selected item. - assertEquals( - 'Option 100', - selectElement.selectedOptions[0]!.textContent!.trim()); + // Initially selected item. + assertEquals( + 'Option 100', selectElement.selectedOptions[0]!.textContent!.trim()); - // Selecting an item updates the pref. - return simulateChangeEvent('200'); - }) - .then(function() { - assertEquals(200, dropdown.pref!.value); + // Selecting an item updates the pref. + await simulateChangeEvent('200'); + assertEquals(200, dropdown.pref!.value); - // Updating the pref selects an item. - dropdown.set('pref.value', 400); - return waitUntilDropdownUpdated(); - }) - .then(function() { - assertEquals('400', selectElement.value); - }); + // Updating the pref selects an item. + dropdown.set('pref.value', 400); + await waitUntilDropdownUpdated(); + assertEquals('400', selectElement.value); }); - test('with string options', function testStringOptions() { + test('with string options', async function() { dropdown.pref = { key: 'test.string', type: chrome.settingsPrivate.PrefType.STRING, @@ -90,31 +79,23 @@ {value: 'c', name: 'CCC'}, {value: 'd', name: 'DDD'}, ]; + await waitUntilDropdownUpdated(); - return waitUntilDropdownUpdated() - .then(function() { - // Initially selected item. - assertEquals( - 'CCC', selectElement.selectedOptions[0]!.textContent!.trim()); + // Initially selected item. + assertEquals('CCC', selectElement.selectedOptions[0]!.textContent!.trim()); - // Selecting an item updates the pref. - return simulateChangeEvent('a'); - }) - .then(function() { - assertEquals('a', dropdown.pref!.value); + // Selecting an item updates the pref. + await simulateChangeEvent('a'); + assertEquals('a', dropdown.pref!.value); - // Item remains selected after updating menu items. - const newMenuOptions = dropdown.menuOptions.slice().reverse(); - dropdown.menuOptions = newMenuOptions; - return waitUntilDropdownUpdated(); - }) - .then(function() { - assertEquals( - 'AAA', selectElement.selectedOptions[0]!.textContent!.trim()); - }); + // Item remains selected after updating menu items. + const newMenuOptions = dropdown.menuOptions.slice().reverse(); + dropdown.menuOptions = newMenuOptions; + await waitUntilDropdownUpdated(); + assertEquals('AAA', selectElement.selectedOptions[0]!.textContent!.trim()); }); - test('with custom value', function testCustomValue() { + test('with custom value', async function() { dropdown.pref = { key: 'test.string', type: chrome.settingsPrivate.PrefType.STRING, @@ -132,15 +113,14 @@ 'settings-control-change should not be triggered for custom value'); }); - return waitUntilDropdownUpdated().then(function() { - // "Custom" initially selected. - assertEquals(dropdown.notFoundValue, selectElement.value); - assertEquals('block', getComputedStyle(customOption).display); - assertFalse(customOption.disabled); + await waitUntilDropdownUpdated(); + // "Custom" initially selected. + assertEquals(dropdown.notFoundValue, selectElement.value); + assertEquals('block', getComputedStyle(customOption).display); + assertFalse(customOption.disabled); - // Pref should not have changed. - assertEquals('f', dropdown.pref!.value); - }); + // Pref should not have changed. + assertEquals('f', dropdown.pref!.value); }); test('with hidden options', async function() { @@ -171,43 +151,37 @@ }); } - test('delay setting options', function testDelayedOptions() { + test('delay setting options', async function() { dropdown.pref = { key: 'test.number2', type: chrome.settingsPrivate.PrefType.NUMBER, value: 200, }; - return waitForTimeout(100) - .then(function() { - return waitUntilDropdownUpdated(); - }) - .then(function() { - assertTrue(selectElement.disabled); - assertEquals('SETTINGS_DROPDOWN_NOT_FOUND_ITEM', selectElement.value); + await waitForTimeout(100); + await waitUntilDropdownUpdated(); + assertTrue(selectElement.disabled); + assertEquals('SETTINGS_DROPDOWN_NOT_FOUND_ITEM', selectElement.value); - dropdown.menuOptions = [ - {value: 100, name: 'Option 100'}, - {value: 200, name: 'Option 200'}, - {value: 300, name: 'Option 300'}, - {value: 400, name: 'Option 400'}, - ]; - return waitUntilDropdownUpdated(); - }) - .then(function() { - // Dropdown menu enables itself and selects the new menu option - // correpsonding to the pref value. - assertFalse(selectElement.disabled); - assertEquals('200', selectElement.value); + dropdown.menuOptions = [ + {value: 100, name: 'Option 100'}, + {value: 200, name: 'Option 200'}, + {value: 300, name: 'Option 300'}, + {value: 400, name: 'Option 400'}, + ]; + await waitUntilDropdownUpdated(); + // Dropdown menu enables itself and selects the new menu option + // corresponding to the pref value. + assertFalse(selectElement.disabled); + assertEquals('200', selectElement.value); - // The "Custom" option should not show up in the dropdown list or be - // reachable via type-ahead. - assertEquals('none', getComputedStyle(customOption).display); - assertTrue(customOption.disabled); - }); + // The "Custom" option should not show up in the dropdown list or be + // reachable via type-ahead. + assertEquals('none', getComputedStyle(customOption).display); + assertTrue(customOption.disabled); }); - test('works with dictionary pref', function testDictionaryPref() { + test('works with dictionary pref', async function() { let settingsControlChangeCount = 0; dropdown.pref = { key: 'test.dictionary', @@ -227,37 +201,30 @@ ++settingsControlChangeCount; }); - return waitUntilDropdownUpdated() - .then(function() { - // Initially selected item. - assertEquals( - 'Option 2', - selectElement.selectedOptions[0]!.textContent!.trim()); + await waitUntilDropdownUpdated(); + // Initially selected item. + assertEquals( + 'Option 2', selectElement.selectedOptions[0]!.textContent!.trim()); - // Setup does not call the settings-control-change event. - assertEquals(0, settingsControlChangeCount); + // Setup does not call the settings-control-change event. + assertEquals(0, settingsControlChangeCount); - // Selecting an item updates the pref. - return simulateChangeEvent('value3'); - }) - .then(function() { - assertEquals('value3', dropdown.pref!.value['key2']); + // Selecting an item updates the pref. + await simulateChangeEvent('value3'); + assertEquals('value3', dropdown.pref!.value['key2']); - // The settings-control-change callback should have been triggered - // exactly once. - assertEquals(1, settingsControlChangeCount); + // The settings-control-change callback should have been triggered + // exactly once. + assertEquals(1, settingsControlChangeCount); - // Updating the pref selects an item. - dropdown.set('pref.value.key2', 'value4'); - return waitUntilDropdownUpdated(); - }) - .then(function() { - assertEquals('value4', selectElement.value); + // Updating the pref selects an item. + dropdown.set('pref.value.key2', 'value4'); + await waitUntilDropdownUpdated(); + assertEquals('value4', selectElement.value); - // The settings-control-change callback should have been triggered - // exactly once still -- manually updating the pref is not a user - // action so the count should not be incremented. - assertEquals(1, settingsControlChangeCount); - }); + // The settings-control-change callback should have been triggered + // exactly once still -- manually updating the pref is not a user + // action so the count should not be incremented. + assertEquals(1, settingsControlChangeCount); }); });
diff --git a/chrome/test/data/webui/tab_search/tab_organization_page_test.ts b/chrome/test/data/webui/tab_search/tab_organization_page_test.ts index f3b6eca..ebb25e4 100644 --- a/chrome/test/data/webui/tab_search/tab_organization_page_test.ts +++ b/chrome/test/data/webui/tab_search/tab_organization_page_test.ts
@@ -194,6 +194,66 @@ assertEquals(0, testApiProxy.getCallCount('requestTabOrganization')); }); + test('Triggers sync when not syncing', async () => { + const syncInfo: SyncInfo = { + syncing: false, + syncingHistory: true, + paused: false, + }; + await tabOrganizationPageSetup(syncInfo); + + const notStarted = tabOrganizationPage.shadowRoot!.querySelector( + 'tab-organization-not-started'); + assertTrue(!!notStarted); + assertTrue(isVisible(notStarted)); + + const actionButton = notStarted.shadowRoot!.querySelector('cr-button'); + assertTrue(!!actionButton); + actionButton.click(); + + assertEquals(1, testApiProxy.getCallCount('triggerSync')); + }); + + test('Triggers sign in when paused', async () => { + const syncInfo: SyncInfo = { + syncing: true, + syncingHistory: true, + paused: true, + }; + await tabOrganizationPageSetup(syncInfo); + + const notStarted = tabOrganizationPage.shadowRoot!.querySelector( + 'tab-organization-not-started'); + assertTrue(!!notStarted); + assertTrue(isVisible(notStarted)); + + const actionButton = notStarted.shadowRoot!.querySelector('cr-button'); + assertTrue(!!actionButton); + actionButton.click(); + + assertEquals(1, testApiProxy.getCallCount('triggerSignIn')); + }); + + test('Opens settings when not syncing history', async () => { + const syncInfo: SyncInfo = { + syncing: true, + syncingHistory: false, + paused: false, + }; + await tabOrganizationPageSetup(syncInfo); + + const notStarted = tabOrganizationPage.shadowRoot!.querySelector( + 'tab-organization-not-started'); + assertTrue(!!notStarted); + assertTrue(isVisible(notStarted)); + + const actionButton = notStarted.shadowRoot!.querySelector('cr-button'); + assertTrue(!!actionButton); + actionButton.click(); + + assertEquals(1, testApiProxy.getCallCount('openSyncSettings')); + }); + test('Updates with sync changes', async () => { await tabOrganizationPageSetup();
diff --git a/chrome/test/data/webui/tab_search/test_tab_search_api_proxy.ts b/chrome/test/data/webui/tab_search/test_tab_search_api_proxy.ts index cb0039d..6eb7513 100644 --- a/chrome/test/data/webui/tab_search/test_tab_search_api_proxy.ts +++ b/chrome/test/data/webui/tab_search/test_tab_search_api_proxy.ts
@@ -25,6 +25,9 @@ 'saveRecentlyClosedExpandedPref', 'setTabIndex', 'startTabGroupTutorial', + 'triggerSync', + 'triggerSignIn', + 'openSyncSettings', 'showUi', ]); @@ -85,6 +88,18 @@ this.methodCalled('startTabGroupTutorial'); } + triggerSync() { + this.methodCalled('triggerSync'); + } + + triggerSignIn() { + this.methodCalled('triggerSignIn'); + } + + openSyncSettings() { + this.methodCalled('openSyncSettings'); + } + showUi() { this.methodCalled('showUi'); }
diff --git a/chrome/test/variations/drivers/chromeos.py b/chrome/test/variations/drivers/chromeos.py index 18de03f..5a4f32c4 100644 --- a/chrome/test/variations/drivers/chromeos.py +++ b/chrome/test/variations/drivers/chromeos.py
@@ -207,6 +207,9 @@ service=service.Service(self.chromedriver_path, service_args=['--disable-build-check']), options=options) + # VM may not be fully ready before it returns, wait for window handle + # to double confirm. + self.wait_for_window(driver) try: yield driver finally:
diff --git a/chrome/test/variations/drivers/driver_factory.py b/chrome/test/variations/drivers/driver_factory.py index fcb9964..8768e90 100644 --- a/chrome/test/variations/drivers/driver_factory.py +++ b/chrome/test/variations/drivers/driver_factory.py
@@ -3,7 +3,9 @@ # found in the LICENSE file. import functools +import logging import subprocess +import time from contextlib import contextmanager from pkg_resources import packaging @@ -12,6 +14,11 @@ import attr from selenium import webdriver +from selenium.common.exceptions import WebDriverException + + +DEFAULT_WAIT_TIMEOUT = 10 # 10 seconds timeout +DEFAULT_WAIT_INTERVAL = 0.3 # 0.3 seconds wait intervals @attr.attrs() class DriverFactory: @@ -43,6 +50,20 @@ options.add_experimental_option('browserStartupTimeout', 10000) return options + def wait_for_window(self, + driver: webdriver.Remote, + timeout: float = DEFAULT_WAIT_TIMEOUT): + """Waits for the window handle to be available.""" + start_time = time.time() + while time.time() - start_time <= timeout: + try: + driver.current_window_handle + return + except WebDriverException: + logging.info('continue to wait on window handles.') + time.sleep(DEFAULT_WAIT_INTERVAL) + raise RuntimeError('Failed to get window handles.') + @contextmanager def create_driver(self, seed_file: Optional[str] = None,
diff --git a/chromeos/ash/components/chaps_util/chaps_slot_session.cc b/chromeos/ash/components/chaps_util/chaps_slot_session.cc index dde76d5d..42268d50 100644 --- a/chromeos/ash/components/chaps_util/chaps_slot_session.cc +++ b/chromeos/ash/components/chaps_util/chaps_slot_session.cc
@@ -8,13 +8,11 @@ #include <pkcs11.h> #include <pkcs11t.h> -#include "base/check.h" #include "base/location.h" #include "base/logging.h" #include "base/memory/ptr_util.h" #include "base/memory/raw_ptr.h" #include "base/threading/scoped_blocking_call.h" -#include "third_party/abseil-cpp/absl/types/optional.h" namespace chromeos { @@ -71,13 +69,14 @@ CK_C_OpenSession open_session = function_list->C_OpenSession; CK_C_CloseSession close_session = function_list->C_CloseSession; CK_C_CreateObject create_object = function_list->C_CreateObject; + CK_C_GenerateKey generate_key = function_list->C_GenerateKey; CK_C_GenerateKeyPair generate_key_pair = function_list->C_GenerateKeyPair; CK_C_GetAttributeValue get_attribute_value = function_list->C_GetAttributeValue; CK_C_SetAttributeValue set_attribute_value = function_list->C_SetAttributeValue; - if (!open_session || !close_session || !create_object || + if (!open_session || !close_session || !create_object || !generate_key || !generate_key_pair || !get_attribute_value || !set_attribute_value) { LogError(ErrorCode::kRequiredFunctionMissing); return nullptr; @@ -99,7 +98,7 @@ return nullptr; } return base::WrapUnique(new ChapsSlotSessionImpl( - chaps_handle, open_session, close_session, create_object, + chaps_handle, open_session, close_session, create_object, generate_key, generate_key_pair, get_attribute_value, set_attribute_value, slot_id, session_handle)); } @@ -158,6 +157,16 @@ return create_object_(session_handle_, pTemplate, ulCount, phObject); } + CK_RV GenerateKey(CK_MECHANISM_PTR pMechanism, + CK_ATTRIBUTE_PTR pTemplate, + CK_ULONG ulCount, + CK_OBJECT_HANDLE_PTR phKey) override { + base::ScopedBlockingCall scoped_blocking_call( + FROM_HERE, base::BlockingType::WILL_BLOCK); + return generate_key_(session_handle_, pMechanism, pTemplate, ulCount, + phKey); + } + CK_RV GenerateKeyPair(CK_MECHANISM_PTR pMechanism, CK_ATTRIBUTE_PTR pPublicKeyTemplate, CK_ULONG ulPublicKeyAttributeCount, @@ -194,6 +203,7 @@ CK_C_OpenSession open_session, CK_C_CloseSession close_session, CK_C_CreateObject create_object, + CK_C_GenerateKey generate_key, CK_C_GenerateKeyPair generate_key_pair, CK_C_GetAttributeValue get_attribute_value, CK_C_SetAttributeValue set_attribute_value, @@ -203,12 +213,13 @@ open_session_(open_session), close_session_(close_session), create_object_(create_object), + generate_key_(generate_key), generate_key_pair_(generate_key_pair), get_attribute_value_(get_attribute_value), set_attribute_value_(set_attribute_value), slot_id_(slot_id), session_handle_(session_handle) {} - // Pass CKF_RW_SESSION because the intention is to generate key pairs. + // Pass CKF_RW_SESSION because the intention is to generate keys. // CKF_SERIAL_SESSION should always be set according to // http://docs.oasis-open.org/pkcs11/pkcs11-base/v2.40/os/pkcs11-base-v2.40-os.html#_Toc416959688 // and chaps verifies that. @@ -219,6 +230,7 @@ CK_C_OpenSession open_session_ = nullptr; CK_C_CloseSession close_session_ = nullptr; CK_C_CreateObject create_object_ = nullptr; + CK_C_GenerateKey generate_key_ = nullptr; CK_C_GenerateKeyPair generate_key_pair_ = nullptr; CK_C_GetAttributeValue get_attribute_value_ = nullptr; CK_C_SetAttributeValue set_attribute_value_ = nullptr;
diff --git a/chromeos/ash/components/chaps_util/chaps_slot_session.h b/chromeos/ash/components/chaps_util/chaps_slot_session.h index aa6aa939..dd84d86 100644 --- a/chromeos/ash/components/chaps_util/chaps_slot_session.h +++ b/chromeos/ash/components/chaps_util/chaps_slot_session.h
@@ -12,7 +12,7 @@ namespace chromeos { // A PKCS#11 session for a slot provided by the chaps daemon. -// This class provides a subset of PKCS#11 operations relevant for Chrome OS. +// This class provides a subset of PKCS#11 operations relevant for ChromeOS. // When a ChapsSlotSession is destructed, the PKCS#11 session is closed. // Operations on a ChapsSlotSession are blocking and expensive, so they may only // be performed on a worker thread. @@ -29,6 +29,13 @@ CK_ULONG ulCount, CK_OBJECT_HANDLE_PTR phObject) = 0; + // Calls C_GenerateKey. + // PKCS #11 v2.20 section 11.14 page 175. + virtual CK_RV GenerateKey(CK_MECHANISM_PTR pMechanism, + CK_ATTRIBUTE_PTR pTemplate, + CK_ULONG ulCount, + CK_OBJECT_HANDLE_PTR phKey) = 0; + // Calls C_GenerateKeyPair. // PKCS #11 v2.20 section 11.14 page 176. virtual CK_RV GenerateKeyPair(CK_MECHANISM_PTR pMechanism,
diff --git a/chromeos/ash/components/chaps_util/chaps_util_impl_unittest.cc b/chromeos/ash/components/chaps_util/chaps_util_impl_unittest.cc index 82e7518..2cfeffbf 100644 --- a/chromeos/ash/components/chaps_util/chaps_util_impl_unittest.cc +++ b/chromeos/ash/components/chaps_util/chaps_util_impl_unittest.cc
@@ -231,21 +231,26 @@ struct PassedData { // Controls whether ChapsSlotSessionFactory::CreateChapsSlotSession succeeds. bool factory_success = true; + // Assigns results to operations. The key is the operation index, i.e. the // sequence number of an operation performed on the ChapsSlotSession. // The value is the operation result. CKR_INVALID_SESSION_HANDLE and // CKR_SESSION_CLOSED have special meaning. std::map<int, CK_RV> operation_results; + // If set to false, calls to ChapsSlotSession::ReopenSession will fail. bool reopen_session_success = true; - // Counts how often teh code under test called + // Counts how often the code under test called // ChapsSlotSession::ReopenSession. int reopen_session_call_count = 0; // The slot_id passed into FakeChapsSlotSessionFactory. absl::optional<CK_SLOT_ID> slot_id; + // Attributes passed for the secret key template to GenerateKey. + ObjectAttributes secret_key_gen_attributes; + // Attributes passed for the public key template to GenerateKeyPair. ObjectAttributes public_key_gen_attributes; @@ -272,9 +277,9 @@ std::vector<ObjectAttributes> pkcs12_cert_attributes; }; -// The FakeChapsSlotSession actually generating a key pair on a NSS slot. -// This is useful so it's possible to test whether the CKA_ID that the code -// under test would assign matches the CKA_ID that NSS computed for the key. +// FakeChapsSlotSession actually generates a key pair on a NSS slot. This is +// useful so it's possible to test whether the CKA_ID that the code under test +// would assign matches the CKA_ID that NSS computed for the key. class FakeChapsSlotSession : public ChapsSlotSession { public: explicit FakeChapsSlotSession(PK11SlotInfo* slot, PassedData* passed_data) @@ -294,6 +299,49 @@ return false; } + CK_RV CreateObject(CK_ATTRIBUTE_PTR pTemplate, + CK_ULONG ulCount, + CK_OBJECT_HANDLE_PTR phObject) override { + EXPECT_TRUE(session_ok_); + CK_RV configured_result = ApplyConfiguredResult(); + if (configured_result != CKR_OK) { + return configured_result; + } + + ObjectAttributes parsing_result = + ObjectAttributes::ParseFrom(pTemplate, ulCount); + + AttributeData parsed_object_type = + parsing_result.parsed_attributes_map[CKA_CLASS]; + if (parsed_object_type.CkULong() == CKO_PRIVATE_KEY) { + passed_data_->pkcs12_key_attributes = parsing_result; + } + if (parsed_object_type.CkULong() == CKO_CERTIFICATE) { + passed_data_->pkcs12_cert_attributes.push_back(parsing_result); + } + + return CKR_OK; + } + + CK_RV GenerateKey(CK_MECHANISM_PTR pMechanism, + CK_ATTRIBUTE_PTR pTemplate, + CK_ULONG ulCount, + CK_OBJECT_HANDLE_PTR phKey) override { + EXPECT_TRUE(session_ok_); + CK_RV configured_result = ApplyConfiguredResult(); + if (configured_result != CKR_OK) { + return configured_result; + } + + passed_data_->secret_key_gen_attributes = + ObjectAttributes::ParseFrom(pTemplate, ulCount); + + // TODO(b/288880151): Finish fake implementation of `GenerateKey()`, when it + // becomes necessary for testing `ChapsUtilImpl`. + + return CKR_OK; + } + CK_RV GenerateKeyPair(CK_MECHANISM_PTR pMechanism, CK_ATTRIBUTE_PTR pPublicKeyTemplate, CK_ULONG ulPublicKeyAttributeCount, @@ -388,30 +436,6 @@ return CKR_OBJECT_HANDLE_INVALID; } - CK_RV CreateObject(CK_ATTRIBUTE_PTR pTemplate, - CK_ULONG ulCount, - CK_OBJECT_HANDLE_PTR phObject) override { - EXPECT_TRUE(session_ok_); - CK_RV configured_result = ApplyConfiguredResult(); - if (configured_result != CKR_OK) { - return configured_result; - } - - ObjectAttributes parsing_result = - ObjectAttributes::ParseFrom(pTemplate, ulCount); - - AttributeData parsed_object_type = - parsing_result.parsed_attributes_map[CKA_CLASS]; - if (parsed_object_type.CkULong() == CKO_PRIVATE_KEY) { - passed_data_->pkcs12_key_attributes = parsing_result; - } - if (parsed_object_type.CkULong() == CKO_CERTIFICATE) { - passed_data_->pkcs12_cert_attributes.push_back(parsing_result); - } - - return CKR_OK; - } - private: // Applies a result configured for the current operation, if any. CK_RV ApplyConfiguredResult() { @@ -472,8 +496,8 @@ const raw_ptr<PassedData, ExperimentalAsh> passed_data_; }; -// FakePkcs12Reader helper, by default it will call methods for the -// original object. +// FakePkcs12Reader helper, by default it will call methods for the original +// object. class FakePkcs12Reader : public Pkcs12Reader { public: FakePkcs12Reader() = default; @@ -611,8 +635,8 @@ } // By default nothing is returned from PK11_FindCertsFromNickname() and - // is_nickname_present will be false, this will override - // is_nickname_present to true for tests. + // is_nickname_present will be false, this will override is_nickname_present + // to true for tests. if (is_certs_nickname_used_) { is_nickname_present = is_certs_nickname_used_; return Pkcs12ReaderStatusCode::kSuccess; @@ -1187,8 +1211,7 @@ EXPECT_TRUE(KeyImportNeverDone()); } -// CheckRelation between cert and key failed, validation failed. -// Import failed. +// CheckRelation between cert and key failed, validation failed. Import failed. TEST_F(ChapsUtilPKCS12ImportTest, CheckRelationFailedPKCS12ImportFailed) { fake_pkcs12_reader_.check_relation_status_ = Pkcs12ReaderStatusCode::kKeyDataMissed; @@ -1202,8 +1225,7 @@ EXPECT_TRUE(KeyImportNeverDone()); } -// Cert is not related to key, validation failed. -// Import failed. +// Cert is not related to key, validation failed. Import failed. TEST_F(ChapsUtilPKCS12ImportTest, CertNotRelatedToKeyPKCS12ImportFailed) { fake_pkcs12_reader_.check_relation_status_ = Pkcs12ReaderStatusCode::kPkcs12NoValidCertificatesFound; @@ -1217,8 +1239,8 @@ EXPECT_TRUE(KeyImportNeverDone()); } -// Cert has no DER subject name, GetNickname failed, validation failed. -// Import failed. +// Cert has no DER subject name, GetNickname failed, validation failed. Import +// failed. TEST_F(ChapsUtilPKCS12ImportTest, CertHasNoDERSubjectNamePKCS12ImportFailed) { fake_pkcs12_reader_.get_subject_name_der_status_ = Pkcs12ReaderStatusCode::kPkcs12CertSubjectNameMissed; @@ -1232,8 +1254,7 @@ } // FindRawCertsWithSubject failed during searching for cert with required -// subject in slot. GetNickname failed, validation failed. -// Import failed. +// subject in slot. GetNickname failed, validation failed. Import failed. TEST_F(ChapsUtilPKCS12ImportTest, FindRawCertsWithSubjectFailedPKCS12ImportFailed) { fake_pkcs12_reader_.find_raw_certs_with_subject_ = @@ -1249,8 +1270,7 @@ } // There is one certificate with the same subject in slot, but GetLabel for it -// failed. -// Import successful with the currents cert's nickname. +// failed. Import successful with the currents cert's nickname. TEST_F(ChapsUtilPKCS12ImportTest, GetLabelForFoundCertFailedPKCS12ImportSucess) { fake_pkcs12_reader_.fake_some_certs_in_slot_ = true; @@ -1265,8 +1285,8 @@ EXPECT_TRUE(import_result); } -// There is one certificate with the same subject in slot. -// Import successful with already stored test cert's nickname. +// There is one certificate with the same subject in slot. Import successful +// with already stored test cert's nickname. TEST_F(ChapsUtilPKCS12ImportTest, CertWithSameSubjectInSlotPKCS12ImportSuccess) { fake_pkcs12_reader_.fake_some_certs_in_slot_ = true; @@ -1346,8 +1366,7 @@ } // No certificate with same subject exists, MakeNicknameUnique is called, but -// isCertsWithNicknamesInSlot has failed. -// Import failed. +// isCertsWithNicknamesInSlot has failed. Import failed. TEST_F(ChapsUtilPKCS12ImportTest, CertsSearchInSlotFailedPKCS12ImportFailed) { fake_pkcs12_reader_.is_certs_with_nickname_in_slot_status_ = Pkcs12ReaderStatusCode::kPkcs12MissedNickname; @@ -1377,8 +1396,7 @@ EXPECT_TRUE(KeyImportDone()); } -// GetScopedCert is failed in CanFindInstalledKey/GetScopedCert. -// Import failed. +// GetScopedCert is failed in CanFindInstalledKey/GetScopedCert. Import failed. TEST_F(ChapsUtilPKCS12ImportTest, GetScopedCertFailedPKCS12ImportFailed) { fake_pkcs12_reader_.get_der_encoded_cert_status_ = Pkcs12ReaderStatusCode::kPkcs12CertDerMissed; @@ -1405,8 +1423,8 @@ EXPECT_TRUE(KeyImportNeverDone()); } -// Private key found by cert in CanFindInstalledKey. -// Key import is never happened, but cert is imported. +// Private key found by cert in CanFindInstalledKey. Key import is never +// happened, but cert is imported. TEST_F(ChapsUtilPKCS12ImportTest, FindPrivateKeyFromCertSuccPKCS12ImportSucc) { fake_pkcs12_reader_.find_key_by_cert_status_ = Pkcs12ReaderStatusCode::kSuccess; @@ -1432,8 +1450,8 @@ EXPECT_TRUE(KeyImportNeverDone()); } -// Private key found in slot by DER cert inside CanFindInstalledKey. -// Key import is never happened, but cert is imported. +// Private key found in slot by DER cert inside CanFindInstalledKey. Key import +// is never happened, but cert is imported. TEST_F(ChapsUtilPKCS12ImportTest, FindKeyByDERCertSuccPKCS12ImportSucc) { fake_pkcs12_reader_.find_key_by_der_cert_status_ = Pkcs12ReaderStatusCode::kSuccess;
diff --git a/chromeos/ash/components/dbus/userdataauth/fake_userdataauth_client.cc b/chromeos/ash/components/dbus/userdataauth/fake_userdataauth_client.cc index aa24a89..0f5fcb59 100644 --- a/chromeos/ash/components/dbus/userdataauth/fake_userdataauth_client.cc +++ b/chromeos/ash/components/dbus/userdataauth/fake_userdataauth_client.cc
@@ -1171,7 +1171,6 @@ ExtendAuthSessionCallback callback) { ::user_data_auth::ExtendAuthSessionReply reply; ReplyOnReturn auto_reply(&reply, std::move(callback)); - auto error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; auto* session_data = GetAuthenticatedAuthSession(request.auth_session_id(), &error);
diff --git a/chromeos/ash/components/language_packs/BUILD.gn b/chromeos/ash/components/language_packs/BUILD.gn index 9fe7c8f..ff07e114b 100644 --- a/chromeos/ash/components/language_packs/BUILD.gn +++ b/chromeos/ash/components/language_packs/BUILD.gn
@@ -55,6 +55,6 @@ data = [ # enums.xml is analyzed by LanguagePackMetricsTest, so this dependency # is needed to make commit bots run unit_tests on enums.xml changes. - "//tools/metrics/histograms/enums.xml", + "//tools/metrics/histograms/metadata/chromeos/enums.xml", ] }
diff --git a/chromeos/ash/components/language_packs/metrics_unittest.cc b/chromeos/ash/components/language_packs/metrics_unittest.cc index 8f6e76c0..50beb2a 100644 --- a/chromeos/ash/components/language_packs/metrics_unittest.cc +++ b/chromeos/ash/components/language_packs/metrics_unittest.cc
@@ -26,10 +26,11 @@ "ti", "tl", "tr", "uk", "ur", "vi", "yue", "zh"}; absl::optional<base::HistogramEnumEntryMap> language_codes_map = - base::ReadEnumFromEnumsXml("LanguagePackLanguageCodes"); + base::ReadEnumFromEnumsXml("LanguagePackLanguageCodes", + /*subdirectory=*/"chromeos"); ASSERT_TRUE(language_codes_map) << "Error reading enum 'LanguagePackLanguageCodes' from " - "tools/metrics/histograms/enums.xml."; + "tools/metrics/histograms/metadata/chromeos/enums.xml."; // We prepare the already formatted output in case any code is missing. std::string missing_codes;
diff --git a/chromeos/ash/components/login/auth/auth_performer.cc b/chromeos/ash/components/login/auth/auth_performer.cc index 2903d70c..092e51f 100644 --- a/chromeos/ash/components/login/auth/auth_performer.cc +++ b/chromeos/ash/components/login/auth/auth_performer.cc
@@ -421,6 +421,7 @@ AuthOperationCallback callback) { if (context->GetAuthSessionId().empty()) { NOTREACHED() << "Auth session should exist"; + return; } LOGIN_LOG(EVENT) << "Requesting authsession lifetime extension"; user_data_auth::ExtendAuthSessionRequest request;
diff --git a/chromeos/ash/components/login/auth/public/user_context.cc b/chromeos/ash/components/login/auth/public/user_context.cc index 61d1db0e..41ae8a3 100644 --- a/chromeos/ash/components/login/auth/public/user_context.cc +++ b/chromeos/ash/components/login/auth/public/user_context.cc
@@ -99,6 +99,8 @@ void UserContext::CryptohomeContext::ResetAuthSessionIds() { authsession_id_.clear(); broadcast_id_.clear(); + authorized_for_.Clear(); + valid_until_ = base::Time(); } base::Time UserContext::CryptohomeContext::GetSessionLifetime() const {
diff --git a/chromeos/ash/components/login/auth/stub_authenticator.cc b/chromeos/ash/components/login/auth/stub_authenticator.cc index af9c5dc..8c16016 100644 --- a/chromeos/ash/components/login/auth/stub_authenticator.cc +++ b/chromeos/ash/components/login/auth/stub_authenticator.cc
@@ -9,6 +9,8 @@ #include "base/location.h" #include "base/notreached.h" #include "base/task/single_thread_task_runner.h" +#include "base/time/time.h" +#include "chromeos/ash/components/cryptohome/constants.h" #include "chromeos/ash/components/login/auth/public/auth_failure.h" #include "chromeos/ash/components/login/auth/public/cryptohome_key_constants.h" @@ -220,6 +222,8 @@ user_context.SetAuthFactorsConfiguration( AuthFactorsConfiguration{{password}, factors}); user_context.SetAuthSessionIds("someauthsessionid", "broadcast"); + user_context.SetSessionLifetime(base::Time::Now() + + cryptohome::kAuthsessionInitialLifetime); return user_context; }
diff --git a/chromeos/ash/components/osauth/impl/auth_session_storage_impl.cc b/chromeos/ash/components/osauth/impl/auth_session_storage_impl.cc index afe7913..1a7829c 100644 --- a/chromeos/ash/components/osauth/impl/auth_session_storage_impl.cc +++ b/chromeos/ash/components/osauth/impl/auth_session_storage_impl.cc
@@ -8,10 +8,13 @@ #include <string> #include "base/check.h" +#include "base/check_op.h" #include "base/functional/callback.h" #include "base/location.h" +#include "base/memory/ptr_util.h" #include "base/task/sequenced_task_runner.h" #include "base/unguessable_token.h" +#include "chromeos/ash/components/cryptohome/constants.h" #include "chromeos/ash/components/login/auth/auth_performer.h" #include "chromeos/ash/components/login/auth/public/user_context.h" #include "chromeos/ash/components/osauth/public/common_types.h" @@ -36,9 +39,11 @@ AuthProofToken AuthSessionStorageImpl::Store( std::unique_ptr<UserContext> context) { CHECK(context); + CHECK(!context->GetSessionLifetime().is_null()); auto token = base::UnguessableToken::Create().ToString(); tokens_[token] = std::make_unique<AuthSessionStorageImpl::TokenData>(std::move(context)); + HandleSessionRefresh(token); return token; } @@ -50,8 +55,15 @@ switch (data_it->second->state) { case TokenState::kBorrowed: return !data_it->second->invalidate_on_return; - case TokenState::kOwned: - return true; + case TokenState::kOwned: { + base::Time lifetime = data_it->second->context->GetSessionLifetime(); + // Edge case: non-authenticated session. Consider it invalid. + if (lifetime.is_null()) { + return false; + } + base::TimeDelta remaining_lifetime = lifetime - clock_->Now(); + return remaining_lifetime.is_positive(); + } case TokenState::kInvalidating: return false; } @@ -73,8 +85,8 @@ << data_it->second->borrow_location.ToString() << " when trying to borrow from " << borrow_location.ToString(); } - CHECK(data_it->second->state == TokenState::kOwned) - << static_cast<int>(data_it->second->state); + + CHECK_EQ(data_it->second->state, TokenState::kOwned); data_it->second->state = TokenState::kBorrowed; data_it->second->borrow_location = borrow_location; @@ -114,7 +126,7 @@ LOG(ERROR) << "Context was already borrowed from " << data_it->second->borrow_location.ToString(); } - CHECK(data_it->second->state == TokenState::kOwned); + CHECK_EQ(data_it->second->state, TokenState::kOwned); CHECK(data_it->second->context); return data_it->second->context.get(); } @@ -124,16 +136,29 @@ CHECK(context); auto data_it = tokens_.find(token); CHECK(data_it != std::end(tokens_)); - CHECK(data_it->second->state == TokenState::kBorrowed); + CHECK_EQ(data_it->second->state, TokenState::kBorrowed); data_it->second->state = TokenState::kOwned; CHECK(!data_it->second->context); data_it->second->context = std::move(context); if (data_it->second->invalidate_on_return) { data_it->second->invalidate_on_return = false; - Invalidate(token, std::move(data_it->second->invalidation_closure)); + Invalidate(token, absl::nullopt); return; } + if (data_it->second->keep_alive_counter > 0) { + HandleSessionRefresh(token); + auto check_still_alive = tokens_.find(token); + if (check_still_alive == std::end(tokens_)) { + // Session was invalidated as it was returned + // too late. + return; + } + if (data_it->second->state != TokenState::kOwned) { + return; + } + } + if (!data_it->second->borrow_queue.empty()) { std::pair<base::Location, BorrowCallback> pending_borrow = std::move(data_it->second->borrow_queue.front()); @@ -142,33 +167,59 @@ } } -void AuthSessionStorageImpl::Invalidate(const AuthProofToken& token, - base::OnceClosure on_invalidated) { +void AuthSessionStorageImpl::Invalidate( + const AuthProofToken& token, + absl::optional<InvalidationCallback> on_invalidated) { auto data_it = tokens_.find(token); - CHECK(data_it != std::end(tokens_)); - if (data_it->second->state == TokenState::kBorrowed) { - data_it->second->invalidate_on_return = true; - data_it->second->invalidation_closure = std::move(on_invalidated); - while (!data_it->second->borrow_queue.empty()) { - std::pair<base::Location, BorrowCallback> pending_borrow = - std::move(data_it->second->borrow_queue.front()); - data_it->second->borrow_queue.pop(); - std::move(pending_borrow.second).Run(nullptr); + // If token was already invalidated, just call a callback. + if (data_it == std::end(tokens_)) { + if (on_invalidated) { + std::move(*on_invalidated).Run(); } return; } - CHECK(data_it->second->state == TokenState::kOwned); + + if (on_invalidated) { + data_it->second->invalidation_queue.push(std::move(*on_invalidated)); + } + // Drain borrow queue. + while (!data_it->second->borrow_queue.empty()) { + std::pair<base::Location, BorrowCallback> pending_borrow = + std::move(data_it->second->borrow_queue.front()); + data_it->second->borrow_queue.pop(); + std::move(pending_borrow.second).Run(nullptr); + } + + if (data_it->second->state == TokenState::kBorrowed) { + data_it->second->invalidate_on_return = true; + return; + } + if (data_it->second->state == TokenState::kInvalidating) { + return; + } + + CHECK_EQ(data_it->second->state, TokenState::kOwned); + data_it->second->state = TokenState::kInvalidating; + data_it->second->next_action_timer_.reset(); + auth_performer_->InvalidateAuthSession( std::move(data_it->second->context), base::BindOnce(&AuthSessionStorageImpl::OnSessionInvalidated, - weak_factory_.GetWeakPtr(), token, - std::move(on_invalidated))); + weak_factory_.GetWeakPtr(), token)); +} + +std::unique_ptr<ScopedSessionRefresher> AuthSessionStorageImpl::KeepAlive( + const AuthProofToken& token) { + auto data_it = tokens_.find(token); + CHECK(data_it != std::end(tokens_)); + // Not using make_unique due to private constructor. + return base::WrapUnique( + new ScopedSessionRefresherImpl(weak_factory_.GetWeakPtr(), token)); } void AuthSessionStorageImpl::OnSessionInvalidated( const AuthProofToken& token, - base::OnceClosure on_invalidated, std::unique_ptr<UserContext> context, absl::optional<AuthenticationError> error) { if (error.has_value()) { @@ -178,9 +229,138 @@ }; auto data_it = tokens_.find(token); CHECK(data_it != std::end(tokens_)); - CHECK(data_it->second->state == TokenState::kInvalidating); + CHECK_EQ(data_it->second->state, TokenState::kInvalidating); + std::queue<InvalidationCallback> invalidation_queue = + std::move(data_it->second->invalidation_queue); tokens_.erase(data_it); - std::move(on_invalidated).Run(); + while (!invalidation_queue.empty()) { + InvalidationCallback callback = std::move(invalidation_queue.front()); + invalidation_queue.pop(); + std::move(callback).Run(); + } +} + +void AuthSessionStorageImpl::IncreaseKeepAliveCounter( + const AuthProofToken& token) { + auto data_it = tokens_.find(token); + CHECK(data_it != std::end(tokens_)); + data_it->second->keep_alive_counter++; + if (data_it->second->keep_alive_counter == 1) { + HandleSessionRefresh(token); + } +} + +void AuthSessionStorageImpl::HandleSessionRefresh(const AuthProofToken& token) { + auto data_it = tokens_.find(token); + CHECK(data_it != std::end(tokens_)); + if (data_it->second->state != TokenState::kOwned) { + // Retry once we have context. + return; + } + base::Time valid_until = data_it->second->context->GetSessionLifetime(); + if (valid_until.is_null()) { + // Non-authenticated session. + LOG(WARNING) << "Non-authenticated session in AuthSessionStorage"; + return; + } + base::TimeDelta remaining_lifetime = valid_until - clock_->Now(); + if (remaining_lifetime.is_negative()) { + // Too late. + LOG(ERROR) << "Could not extend authsession lifetime before it timed out."; + Invalidate(token, absl::nullopt); + return; + } + if (data_it->second->keep_alive_counter <= 0) { + // No need to keep session alive, set timer to invalidate session. + data_it->second->next_action_timer_ = + std::make_unique<base::OneShotTimer>(); + data_it->second->next_action_timer_->Start( + FROM_HERE, remaining_lifetime, + base::BindOnce(&AuthSessionStorageImpl::HandleSessionRefresh, + weak_factory_.GetWeakPtr(), token)); + return; + } + if (remaining_lifetime <= cryptohome::kAuthsessionExtendThreshold) { + // Trigger extension immediately. + ExtendAuthSession(token); + return; + } + base::TimeDelta refresh_after = + remaining_lifetime - cryptohome::kAuthsessionExtendThreshold; + if (refresh_after.is_negative()) { + return; + } + data_it->second->next_action_timer_ = std::make_unique<base::OneShotTimer>(); + data_it->second->next_action_timer_->Start( + FROM_HERE, refresh_after, + base::BindOnce(&AuthSessionStorageImpl::HandleSessionRefresh, + weak_factory_.GetWeakPtr(), token)); +} + +void AuthSessionStorageImpl::ExtendAuthSession(const AuthProofToken& token) { + auto data_it = tokens_.find(token); + CHECK(data_it != std::end(tokens_)); + CHECK_EQ(data_it->second->state, TokenState::kOwned); + CHECK_GT(data_it->second->keep_alive_counter, 0); + auth_performer_->ExtendAuthSessionLifetime( + Borrow(FROM_HERE, token), + base::BindOnce(&AuthSessionStorageImpl::OnExtendAuthSession, + weak_factory_.GetWeakPtr(), token)); +} + +void AuthSessionStorageImpl::OnExtendAuthSession( + const AuthProofToken& token, + std::unique_ptr<UserContext> context, + absl::optional<AuthenticationError> error) { + if (error.has_value()) { + LOG(ERROR) + << "There was an error during attempt to extend auth session lifetime " + << error.value().get_cryptohome_code(); + } + auto data_it = tokens_.find(token); + CHECK(data_it != std::end(tokens_)); + CHECK_EQ(data_it->second->state, TokenState::kBorrowed); + + data_it->second->context = std::move(context); + data_it->second->state = TokenState::kOwned; + + if (data_it->second->invalidate_on_return) { + data_it->second->invalidate_on_return = false; + Invalidate(token, absl::nullopt); + return; + } + // Schedule next refresh if needed. + if (!error.has_value()) { + HandleSessionRefresh(token); + } +} + +void AuthSessionStorageImpl::DecreaseKeepAliveCounter( + const AuthProofToken& token) { + auto data_it = tokens_.find(token); + if (data_it == std::end(tokens_)) { + // Token could be explicitly invalidated by now. + return; + } + data_it->second->keep_alive_counter--; + if (data_it->second->keep_alive_counter == 0) { + data_it->second->next_action_timer_.reset(); + // Maybe start invalidation timer. + HandleSessionRefresh(token); + } +} + +ScopedSessionRefresherImpl::ScopedSessionRefresherImpl( + base::WeakPtr<AuthSessionStorageImpl> storage, + const AuthProofToken& token) + : storage_(std::move(storage)), token_(token) { + storage_->IncreaseKeepAliveCounter(token_); +} + +ScopedSessionRefresherImpl::~ScopedSessionRefresherImpl() { + if (storage_) { + storage_->DecreaseKeepAliveCounter(token_); + } } } // namespace ash
diff --git a/chromeos/ash/components/osauth/impl/auth_session_storage_impl.h b/chromeos/ash/components/osauth/impl/auth_session_storage_impl.h index 27358877..59ca6e0 100644 --- a/chromeos/ash/components/osauth/impl/auth_session_storage_impl.h +++ b/chromeos/ash/components/osauth/impl/auth_session_storage_impl.h
@@ -14,6 +14,8 @@ #include "base/location.h" #include "base/time/clock.h" #include "base/time/default_clock.h" +#include "base/time/time.h" +#include "base/timer/timer.h" #include "chromeos/ash/components/login/auth/public/auth_callbacks.h" #include "chromeos/ash/components/osauth/public/auth_session_storage.h" #include "chromeos/ash/components/osauth/public/common_types.h" @@ -60,9 +62,12 @@ void Return(const AuthProofToken& token, std::unique_ptr<UserContext> context) override; void Invalidate(const AuthProofToken& token, - base::OnceClosure on_invalidated) override; + absl::optional<InvalidationCallback> on_invalidated) override; + std::unique_ptr<ScopedSessionRefresher> KeepAlive( + const AuthProofToken& token) override; private: + friend class ScopedSessionRefresherImpl; enum class TokenState { kOwned, // UserContext is owned by storage kBorrowed, // UserContext is currently borrowed @@ -83,17 +88,33 @@ // Data required to invalidate context upon return, if invalidation was // requested while context is borrowed. bool invalidate_on_return = false; - base::OnceClosure invalidation_closure; + + std::queue<InvalidationCallback> invalidation_queue; std::queue<std::pair<base::Location, BorrowCallback>> borrow_queue; + + // Timer to perform next action (extending or invalidating session). + std::unique_ptr<base::OneShotTimer> next_action_timer_; + + // Number of entities that requested to keep session alive. + int keep_alive_counter = 0; }; std::unique_ptr<UserContext> Borrow(const base::Location& location, const AuthProofToken& token); void OnSessionInvalidated(const AuthProofToken& token, - base::OnceClosure on_invalidated, std::unique_ptr<UserContext> context, absl::optional<AuthenticationError> error); + void HandleSessionRefresh(const AuthProofToken& token); + void ExtendAuthSession(const AuthProofToken& token); + void OnExtendAuthSession(const AuthProofToken& token, + std::unique_ptr<UserContext> context, + absl::optional<AuthenticationError> error); + + // Internal API for ScopedSessionRefresher. + void IncreaseKeepAliveCounter(const AuthProofToken& token); + void DecreaseKeepAliveCounter(const AuthProofToken& token); + // Stored data for currently active tokens. base::flat_map<AuthProofToken, std::unique_ptr<TokenData>> tokens_; @@ -104,6 +125,20 @@ base::WeakPtrFactory<AuthSessionStorageImpl> weak_factory_{this}; }; +class ScopedSessionRefresherImpl : public ScopedSessionRefresher { + public: + ~ScopedSessionRefresherImpl() override; + + private: + friend class AuthSessionStorageImpl; + + ScopedSessionRefresherImpl(base::WeakPtr<AuthSessionStorageImpl> storage, + const AuthProofToken& token); + + base::WeakPtr<AuthSessionStorageImpl> storage_; + AuthProofToken token_; +}; + } // namespace ash #endif // CHROMEOS_ASH_COMPONENTS_OSAUTH_IMPL_AUTH_SESSION_STORAGE_IMPL_H_
diff --git a/chromeos/ash/components/osauth/impl/auth_session_storage_impl_unittest.cc b/chromeos/ash/components/osauth/impl/auth_session_storage_impl_unittest.cc index 5b3bf9c..78a5c586 100644 --- a/chromeos/ash/components/osauth/impl/auth_session_storage_impl_unittest.cc +++ b/chromeos/ash/components/osauth/impl/auth_session_storage_impl_unittest.cc
@@ -12,6 +12,7 @@ #include "base/run_loop.h" #include "base/test/task_environment.h" #include "base/test/test_future.h" +#include "base/time/default_clock.h" #include "chromeos/ash/components/dbus/userdataauth/mock_userdataauth_client.h" #include "chromeos/ash/components/login/auth/public/user_context.h" #include "testing/gmock/include/gmock/gmock.h" @@ -21,28 +22,47 @@ using testing::_; using testing::Eq; +using testing::Invoke; class AuthSessionStorageImplTest : public ::testing::Test { protected: AuthSessionStorageImplTest() { - storage_ = std::make_unique<AuthSessionStorageImpl>(&mock_udac_); + storage_ = std::make_unique<AuthSessionStorageImpl>( + &mock_udac_, base::DefaultClock::GetInstance()); } - base::test::SingleThreadTaskEnvironment task_environment; + + std::unique_ptr<UserContext> CreateContext() { + std::unique_ptr<UserContext> context = std::make_unique<UserContext>(); + context->SetAuthSessionIds("some-id", "broadcast"); + context->SetSessionLifetime(base::Time::Now() + base::Seconds(60)); + return context; + } + + void ExpectExtendAuthsession(ash::MockUserDataAuthClient& mock_client) { + EXPECT_CALL(mock_udac_, ExtendAuthSession(_, _)) + .WillOnce( + Invoke([](const ::user_data_auth::ExtendAuthSessionRequest& request, + UserDataAuthClient::ExtendAuthSessionCallback callback) { + ::user_data_auth::ExtendAuthSessionReply reply; + reply.set_error(::user_data_auth::CRYPTOHOME_ERROR_NOT_SET); + reply.set_seconds_left(request.extension_duration()); + std::move(callback).Run(reply); + })); + } + + base::test::SingleThreadTaskEnvironment task_environment{ + base::test::TaskEnvironment::TimeSource::MOCK_TIME}; ash::MockUserDataAuthClient mock_udac_; std::unique_ptr<AuthSessionStorageImpl> storage_; }; TEST_F(AuthSessionStorageImplTest, Basic) { - std::unique_ptr<UserContext> context = std::make_unique<UserContext>(); - context->SetAuthSessionIds("some-id", "broadcast"); + AuthProofToken token = storage_->Store(CreateContext()); - // Store UserContext; - - AuthProofToken token = storage_->Store(std::move(context)); ASSERT_TRUE(storage_->IsValid(token)); // Borrow context, token is still valid. - context = storage_->BorrowForTests(FROM_HERE, token); + auto context = storage_->BorrowForTests(FROM_HERE, token); ASSERT_TRUE(storage_->IsValid(token)); // Return context, token still valid @@ -57,14 +77,11 @@ } TEST_F(AuthSessionStorageImplTest, InvalidateOnReturn) { - std::unique_ptr<UserContext> context = std::make_unique<UserContext>(); - context->SetAuthSessionIds("some-id", "broadcast"); + AuthProofToken token = storage_->Store(CreateContext()); - // Store UserContext; - AuthProofToken token = storage_->Store(std::move(context)); ASSERT_TRUE(storage_->IsValid(token)); // Borrow context, token is still valid. - context = storage_->BorrowForTests(FROM_HERE, token); + auto context = storage_->BorrowForTests(FROM_HERE, token); ASSERT_TRUE(storage_->IsValid(token)); // Do not expect to have any calls before context is returned. @@ -84,8 +101,7 @@ } TEST_F(AuthSessionStorageImplTest, AsyncBorrow) { - std::unique_ptr<UserContext> context = std::make_unique<UserContext>(); - context->SetAuthSessionIds("some-id", "broadcast"); + std::unique_ptr<UserContext> context = CreateContext(); // Unknown token, callback should // be called with nullptr immediately. @@ -168,4 +184,114 @@ } } +TEST_F(AuthSessionStorageImplTest, LifetimeInvalidateUponTimer) { + AuthProofToken token = storage_->Store(CreateContext()); + + ASSERT_TRUE(storage_->IsValid(token)); + + EXPECT_CALL(mock_udac_, InvalidateAuthSession(_, _)); + + // Should trigger invalidating AuthSession. + task_environment.AdvanceClock(base::Seconds(61)); + base::RunLoop().RunUntilIdle(); + + ASSERT_FALSE(storage_->IsValid(token)); +} + +TEST_F(AuthSessionStorageImplTest, LifetimeExtendWhenIdle) { + AuthProofToken token = storage_->Store(CreateContext()); + base::Time start = base::Time::Now(); + + ASSERT_TRUE(storage_->IsValid(token)); + auto keep_alive = storage_->KeepAlive(token); + + ExpectExtendAuthsession(mock_udac_); + + // Should trigger extending AuthSession. + task_environment.AdvanceClock(base::Seconds(59)); + base::RunLoop().RunUntilIdle(); + task_environment.AdvanceClock(base::Seconds(31)); + base::RunLoop().RunUntilIdle(); + + ASSERT_TRUE(storage_->IsValid(token)); + ASSERT_GE(storage_->Peek(token)->GetSessionLifetime(), + start + base::Seconds(90)); + keep_alive.reset(); +} + +TEST_F(AuthSessionStorageImplTest, LifetimeExtendUponReturn) { + AuthProofToken token = storage_->Store(CreateContext()); + base::Time start = base::Time::Now(); + + ASSERT_TRUE(storage_->IsValid(token)); + auto keep_alive = storage_->KeepAlive(token); + + auto borrowed = storage_->BorrowForTests(FROM_HERE, token); + + // Not extending session as context is borrowed. + task_environment.AdvanceClock(base::Seconds(59)); + base::RunLoop().RunUntilIdle(); + testing::Mock::VerifyAndClearExpectations(&mock_udac_); + + // Session would be extended as soon as context is returned. + ExpectExtendAuthsession(mock_udac_); + + storage_->Return(token, std::move(borrowed)); + base::RunLoop().RunUntilIdle(); + + ASSERT_TRUE(storage_->IsValid(token)); + ASSERT_GE(storage_->Peek(token)->GetSessionLifetime(), + start + base::Seconds(60)); + keep_alive.reset(); +} + +TEST_F(AuthSessionStorageImplTest, LifetimeInvalidateUponReturningTooLate) { + AuthProofToken token = storage_->Store(CreateContext()); + + ASSERT_TRUE(storage_->IsValid(token)); + auto keep_alive = storage_->KeepAlive(token); + + auto borrowed = storage_->BorrowForTests(FROM_HERE, token); + + // Not invalidating session as context is borrowed. + task_environment.AdvanceClock(base::Seconds(61)); + base::RunLoop().RunUntilIdle(); + testing::Mock::VerifyAndClearExpectations(&mock_udac_); + + // Session would be extended as soon as context is returned. + EXPECT_CALL(mock_udac_, InvalidateAuthSession(_, _)) + .WillOnce(Invoke( + [](const ::user_data_auth::InvalidateAuthSessionRequest& request, + UserDataAuthClient::InvalidateAuthSessionCallback callback) { + ::user_data_auth::InvalidateAuthSessionReply reply; + reply.set_error(::user_data_auth::CRYPTOHOME_ERROR_NOT_SET); + std::move(callback).Run(reply); + })); + + storage_->Return(token, std::move(borrowed)); + base::RunLoop().RunUntilIdle(); + + ASSERT_FALSE(storage_->IsValid(token)); + keep_alive.reset(); +} + +TEST_F(AuthSessionStorageImplTest, LifetimeInvalidateUponTimerHadKeepalive) { + // Store UserContext; + AuthProofToken token = storage_->Store(CreateContext()); + ASSERT_TRUE(storage_->IsValid(token)); + auto keep_alive = storage_->KeepAlive(token); + + task_environment.AdvanceClock(base::Seconds(30)); + base::RunLoop().RunUntilIdle(); + keep_alive.reset(); + + EXPECT_CALL(mock_udac_, InvalidateAuthSession(_, _)); + + // Should trigger invalidating AuthSession. + task_environment.AdvanceClock(base::Seconds(31)); + base::RunLoop().RunUntilIdle(); + + ASSERT_FALSE(storage_->IsValid(token)); +} + } // namespace ash \ No newline at end of file
diff --git a/chromeos/ash/components/osauth/public/auth_session_storage.h b/chromeos/ash/components/osauth/public/auth_session_storage.h index 1f29c75..f41eeff 100644 --- a/chromeos/ash/components/osauth/public/auth_session_storage.h +++ b/chromeos/ash/components/osauth/public/auth_session_storage.h
@@ -21,6 +21,16 @@ class UserContext; +class ScopedSessionRefresher { + public: + ScopedSessionRefresher(const ScopedSessionRefresher&) = delete; + ScopedSessionRefresher& operator=(const ScopedSessionRefresher&) = delete; + virtual ~ScopedSessionRefresher() = default; + + protected: + ScopedSessionRefresher() = default; +}; + // Helper class that stores and manages lifetime of authenticated UserContext. // Main usa cases for this class are the situations where authenticated // operations do not happen immediately after authentication, but require some @@ -37,6 +47,7 @@ class COMPONENT_EXPORT(CHROMEOS_ASH_COMPONENTS_OSAUTH) AuthSessionStorage { public: using BorrowCallback = base::OnceCallback<void(std::unique_ptr<UserContext>)>; + using InvalidationCallback = base::OnceCallback<void(void)>; // TODO (b/271249180): Define an observer for notifications about token // expiration/borrowing. @@ -81,8 +92,18 @@ // AuthSession) once authentication is no longer needed. // In case when context is borrowed at the time of this call, // it would be properly invalidated once it is returned. - virtual void Invalidate(const AuthProofToken& token, - base::OnceClosure on_invalidated) = 0; + virtual void Invalidate( + const AuthProofToken& token, + absl::optional<InvalidationCallback> on_invalidated) = 0; + + // This method allows caller to make sure that authenticated authsession + // associated with `token` would not expire by timeout as long as returned + // object exists. AuthSessionStorage would automatically issue refresh calls + // at required intervals. Note that this would only happen while Storage + // actually has a UserContext. If it was borrowed, it's lifetime would be + // refreshed only upon returning. + virtual std::unique_ptr<ScopedSessionRefresher> KeepAlive( + const AuthProofToken& token) = 0; }; } // namespace ash
diff --git a/chromeos/components/kcer/kcer_nss/kcer_nss_fuzzer.cc b/chromeos/components/kcer/kcer_nss/kcer_nss_fuzzer.cc index 7779b0e..afe03ab1 100644 --- a/chromeos/components/kcer/kcer_nss/kcer_nss_fuzzer.cc +++ b/chromeos/components/kcer/kcer_nss/kcer_nss_fuzzer.cc
@@ -27,6 +27,9 @@ #include "net/test/cert_builder.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" +#include "third_party/boringssl/src/pki/extended_key_usage.h" +#include "third_party/boringssl/src/pki/input.h" +#include "third_party/boringssl/src/pki/parse_certificate.h" #include "url/gurl.h" using testing::UnorderedElementsAreArray; @@ -364,8 +367,8 @@ issuer_.get()); // Set some default values to increases the chances for a correct cert. cert_builder_->SetSignatureAlgorithm( - issuer_uses_rsa_key ? net::SignatureAlgorithm::kRsaPkcs1Sha256 - : net::SignatureAlgorithm::kEcdsaSha256); + issuer_uses_rsa_key ? bssl::SignatureAlgorithm::kRsaPkcs1Sha256 + : bssl::SignatureAlgorithm::kEcdsaSha256); auto now = base::Time::Now(); cert_builder_->SetValidity(now, now + base::Days(30)); cert_builder_->SetSubjectCommonName("SubjectCommonName"); @@ -379,7 +382,7 @@ // RFC 5280 guarantees that these values are from [0,2]. int version = data_provider_.ConsumeIntegralInRange(0, 2); cert_builder_->SetCertificateVersion( - static_cast<net::CertificateVersion>(version)); + static_cast<bssl::CertificateVersion>(version)); } if (GetBool()) { cert_builder_->ClearExtensions(); @@ -389,7 +392,7 @@ std::string oid_str = GetString(); std::string value = GetString(); bool critical = GetBool(); - cert_builder_->SetExtension(net::der::Input(oid_str), std::move(value), + cert_builder_->SetExtension(bssl::der::Input(oid_str), std::move(value), critical); } if (GetBool()) { @@ -454,7 +457,7 @@ } if (GetBool()) { std::vector<std::string> memory_holder; - std::vector<net::der::Input> purpose_oids; + std::vector<bssl::der::Input> purpose_oids; while (GetBool()) { memory_holder.push_back(GetString()); purpose_oids.emplace_back(memory_holder.back()); @@ -505,7 +508,7 @@ } if (GetBool()) { cert_builder_->SetSignatureAlgorithm( - data_provider_.ConsumeEnum<net::SignatureAlgorithm>()); + data_provider_.ConsumeEnum<bssl::SignatureAlgorithm>()); } if (GetBool()) { cert_builder_->SetSignatureAlgorithmTLV(GetString());
diff --git a/chromeos/profiles/arm.afdo.newest.txt b/chromeos/profiles/arm.afdo.newest.txt index e3f3dce..d48d21df 100644 --- a/chromeos/profiles/arm.afdo.newest.txt +++ b/chromeos/profiles/arm.afdo.newest.txt
@@ -1 +1 @@ -chromeos-chrome-arm-none-120-6045.38-1698665925-benchmark-121.0.6108.0-r1-redacted.afdo.xz +chromeos-chrome-arm-none-120-6045.38-1698665925-benchmark-121.0.6109.0-r1-redacted.afdo.xz
diff --git a/chromeos/profiles/atom.afdo.newest.txt b/chromeos/profiles/atom.afdo.newest.txt index 2582ca9..7ec76c7 100644 --- a/chromeos/profiles/atom.afdo.newest.txt +++ b/chromeos/profiles/atom.afdo.newest.txt
@@ -1 +1 @@ -chromeos-chrome-amd64-atom-120-6085.0-1698659522-benchmark-121.0.6108.0-r1-redacted.afdo.xz +chromeos-chrome-amd64-atom-120-6085.0-1698659522-benchmark-121.0.6109.0-r1-redacted.afdo.xz
diff --git a/chromeos/strings/chromeos_strings_ar.xtb b/chromeos/strings/chromeos_strings_ar.xtb index c3f8827..5a7c7bd 100644 --- a/chromeos/strings/chromeos_strings_ar.xtb +++ b/chromeos/strings/chromeos_strings_ar.xtb
@@ -189,6 +189,7 @@ <translation id="2236746079896696523">إيقاف/تفعيل الإضاءة الخلفية للوحة المفاتيح</translation> <translation id="2240366984605217732">مفتاح التبديل بين تنسيقات لوحة المفاتيح</translation> <translation id="225692081236532131">حالة التفعيل</translation> +<translation id="2267285889943769271">إضافة لقطة شاشة</translation> <translation id="2271469253353559191">الجدول الزمني للوضع المُعتِم</translation> <translation id="2276999893457278469">أهم مقالات المحتوى المساعِد ذات الصلة</translation> <translation id="2279051792571591988">استعادة الإعدادات التلقائية</translation> @@ -432,6 +433,7 @@ <translation id="4297501883039923494">توقّفت الطابعة - خطأ غير معروف</translation> <translation id="4300073214558989"><ph name="IMAGE_COUNT" /> صورة</translation> <translation id="4333390807948134856">تم الضغط على المفتاح <ph name="KEY_NAME" />.</translation> +<translation id="4354430579665871434">مفتاح</translation> <translation id="435692326371619097">يمكنك إدارة إعدادات اسم نقطة الوصول (APN) للشبكة. تنشئ أسماء نقاط الوصول (APN) اتصالاً بين شبكة الجوّال والإنترنت. <ph name="BEGIN_LINK" />مزيد من المعلومات<ph name="END_LINK" /></translation> <translation id="437294888293595148">إعادة ضبط جميع الاختصارات</translation> <translation id="4378373042927530923">لم يتم التشغيل</translation>
diff --git a/chromeos/strings/chromeos_strings_be.xtb b/chromeos/strings/chromeos_strings_be.xtb index c61a0fe96..3b3b7c5 100644 --- a/chromeos/strings/chromeos_strings_be.xtb +++ b/chromeos/strings/chromeos_strings_be.xtb
@@ -134,6 +134,7 @@ <translation id="1852934301711881861">Усталяваць Chrome OS Flex</translation> <translation id="1856388568474281774">Стрэлка ўніз</translation> <translation id="1858620243986915808">Далучыць здымак экрана</translation> +<translation id="1871413952174074704">Максімальная колькасць сімвалаў у назве пункта доступу: <ph name="CHAR_LIMIT" /></translation> <translation id="1871569928317311284">Выключыць цёмную тэму</translation> <translation id="1874612839560830905">MTU</translation> <translation id="188114911237521550">Выключыць цёмны рэжым</translation> @@ -1103,4 +1104,5 @@ <translation id="979450713603643090">Светла-ружовы</translation> <translation id="982713511914535780">Выканаць праверку разрадкі</translation> <translation id="987264212798334818">Агульныя</translation> +<translation id="995062385528875723">Нельга выкарыстоўваць сімвалы, дыякрытычныя знакі і літары нелацінскага алфавіта</translation> </translationbundle> \ No newline at end of file
diff --git a/chromeos/strings/chromeos_strings_bs.xtb b/chromeos/strings/chromeos_strings_bs.xtb index bd0f4548..1c5518b 100644 --- a/chromeos/strings/chromeos_strings_bs.xtb +++ b/chromeos/strings/chromeos_strings_bs.xtb
@@ -134,6 +134,7 @@ <translation id="1852934301711881861">Instaliraj ChromeOS Flex</translation> <translation id="1856388568474281774">Strelica nadolje</translation> <translation id="1858620243986915808">Priloži snimak ekrana</translation> +<translation id="1871413952174074704">APN ne može imati više od sljedećeg broja znakova: <ph name="CHAR_LIMIT" /></translation> <translation id="1871569928317311284">Isključi tamnu temu</translation> <translation id="1874612839560830905">MTU</translation> <translation id="188114911237521550">Isključi tamni način rada</translation> @@ -1103,4 +1104,5 @@ <translation id="979450713603643090">Svijetloružičasto</translation> <translation id="982713511914535780">Pokreni test pražnjenja</translation> <translation id="987264212798334818">Opće</translation> +<translation id="995062385528875723">Ne možete koristiti slova s dijakritičkim znakovima, pismo koje nije latinično ili simbole</translation> </translationbundle> \ No newline at end of file
diff --git a/chromeos/strings/chromeos_strings_eu.xtb b/chromeos/strings/chromeos_strings_eu.xtb index 0bbc7b61..ce2093b 100644 --- a/chromeos/strings/chromeos_strings_eu.xtb +++ b/chromeos/strings/chromeos_strings_eu.xtb
@@ -189,6 +189,7 @@ <translation id="2236746079896696523">Teklatuaren atzeko argiztapenaren etengailua</translation> <translation id="2240366984605217732">Diseinua aldatzeko etengailua</translation> <translation id="225692081236532131">Aktibazioaren egoera</translation> +<translation id="2267285889943769271">Gehitu pantaila-argazki bat</translation> <translation id="2271469253353559191">Modu ilunaren programazioa</translation> <translation id="2276999893457278469">Laguntza-eduki nagusia</translation> <translation id="2279051792571591988">Leheneratu balio lehenetsiak</translation> @@ -432,6 +433,7 @@ <translation id="4297501883039923494">Geldituta: errore ezezaguna</translation> <translation id="4300073214558989"><ph name="IMAGE_COUNT" /> irudi</translation> <translation id="4333390807948134856"><ph name="KEY_NAME" /> sakatuta dago</translation> +<translation id="4354430579665871434">tekla</translation> <translation id="435692326371619097">Kudeatu sarearen APNaren ezarpenak. Sare mugikorren eta Interneten arteko konexioak ezartzen dituzte APNek. <ph name="BEGIN_LINK" />Lortu informazio gehiago<ph name="END_LINK" /></translation> <translation id="437294888293595148">Berrezarri lasterbide guztiak</translation> <translation id="4378373042927530923">Ez da exekutatu</translation>
diff --git a/chromeos/strings/chromeos_strings_hr.xtb b/chromeos/strings/chromeos_strings_hr.xtb index c79e55df..ece3a4a 100644 --- a/chromeos/strings/chromeos_strings_hr.xtb +++ b/chromeos/strings/chromeos_strings_hr.xtb
@@ -134,6 +134,7 @@ <translation id="1852934301711881861">Instaliraj ChromeOS Flex</translation> <translation id="1856388568474281774">Strelica prema dolje</translation> <translation id="1858620243986915808">Priloži snimku zaslona</translation> +<translation id="1871413952174074704">APN ne može imati više od sljedećeg broja znakova: <ph name="CHAR_LIMIT" /></translation> <translation id="1871569928317311284">Isključivanje tamne teme</translation> <translation id="1874612839560830905">MTU</translation> <translation id="188114911237521550">Isključivanje tamnog načina</translation> @@ -1103,4 +1104,5 @@ <translation id="979450713603643090">Svijetloružičasta</translation> <translation id="982713511914535780">Pokreni test pražnjenja</translation> <translation id="987264212798334818">Općenito</translation> +<translation id="995062385528875723">Ne možete koristiti slova s dijakritičkim znakovima, pismo koje nije latinično ili simbole</translation> </translationbundle> \ No newline at end of file
diff --git a/chromeos/strings/chromeos_strings_my.xtb b/chromeos/strings/chromeos_strings_my.xtb index 3515c0d..916878e 100644 --- a/chromeos/strings/chromeos_strings_my.xtb +++ b/chromeos/strings/chromeos_strings_my.xtb
@@ -134,6 +134,7 @@ <translation id="1852934301711881861">ChromeOS Flex ထည့်သွင်းရန်</translation> <translation id="1856388568474281774">အောက်ညွှန်မြား</translation> <translation id="1858620243986915808">ဖန်သားပြင်ဓာတ်ပုံ ပူးတွဲရန်</translation> +<translation id="1871413952174074704">APN တွင် အက္ခရာ <ph name="CHAR_LIMIT" /> လုံးထက် ပိုရှိ၍မရပါ</translation> <translation id="1871569928317311284">အမှောင်နောက်ခံ ပိတ်ရန်</translation> <translation id="1874612839560830905">MTU</translation> <translation id="188114911237521550">အမှောင်မုဒ် ပိတ်ရန်</translation> @@ -1103,4 +1104,5 @@ <translation id="979450713603643090">ပန်းရောင်ဖျော့</translation> <translation id="982713511914535780">အားသုံးစွဲမှု စစ်ဆေးရန်</translation> <translation id="987264212798334818">အထွေထွေ</translation> +<translation id="995062385528875723">အသံပြောင်း စာလုံးများ၊ လက်တင်မဟုတ်သော အက္ခရာ (သို့) သင်္ကေတများ သုံး၍မရပါ</translation> </translationbundle> \ No newline at end of file
diff --git a/clank b/clank index 32b4d47..f75c7cbd 160000 --- a/clank +++ b/clank
@@ -1 +1 @@ -Subproject commit 32b4d47fa67b9ee0f1df72a4284d726ec63f0b21 +Subproject commit f75c7cbd6dde5dd650d3052569eef08b0375ec10
diff --git a/components/android_autofill/browser/android_autofill_manager.cc b/components/android_autofill/browser/android_autofill_manager.cc index 8996eb4..ff45247 100644 --- a/components/android_autofill/browser/android_autofill_manager.cc +++ b/components/android_autofill/browser/android_autofill_manager.cc
@@ -209,7 +209,7 @@ forms_with_server_predictions_.insert(form); if (auto* provider = GetAutofillProvider()) { - provider->OnServerPredictionsAvailable(this, form); + provider->OnServerPredictionsAvailable(form); } }
diff --git a/components/android_autofill/browser/autofill_provider.h b/components/android_autofill/browser/autofill_provider.h index 972e5ca3..e61b209 100644 --- a/components/android_autofill/browser/autofill_provider.h +++ b/components/android_autofill/browser/autofill_provider.h
@@ -77,8 +77,7 @@ virtual void OnHidePopup(AndroidAutofillManager* manager) = 0; - virtual void OnServerPredictionsAvailable(AndroidAutofillManager* manager, - FormGlobalId form) = 0; + virtual void OnServerPredictionsAvailable(FormGlobalId form) = 0; virtual void OnServerQueryRequestError(AndroidAutofillManager* manager, FormSignature form_signature) = 0;
diff --git a/components/android_autofill/browser/autofill_provider_android.cc b/components/android_autofill/browser/autofill_provider_android.cc index c87f22f..b1cf406 100644 --- a/components/android_autofill/browser/autofill_provider_android.cc +++ b/components/android_autofill/browser/autofill_provider_android.cc
@@ -9,7 +9,6 @@ #include "base/android/jni_android.h" #include "base/android/jni_array.h" #include "base/android/jni_string.h" -#include "base/debug/crash_logging.h" #include "base/feature_list.h" #include "components/android_autofill/browser/android_autofill_bridge_factory.h" #include "components/android_autofill/browser/android_autofill_features.h" @@ -342,27 +341,13 @@ } void AutofillProviderAndroid::OnServerPredictionsAvailable( - AndroidAutofillManager* manager_for_debugging, FormGlobalId form) { DCHECK_CURRENTLY_ON(BrowserThread::UI); if (!form_ || form_->form().global_id() != form) { return; } - if (!manager_) { - // TODO(crbug.com/1479006): This should never be reachable. Remove once it - // is clear how it can happen. - SCOPED_CRASH_KEY_STRING32("crbug1479006", "form_ token", - form_->form().global_id().frame_token.ToString()); - SCOPED_CRASH_KEY_STRING32("crbug1479006", "form token", - form.frame_token.ToString()); - SCOPED_CRASH_KEY_STRING32( - "crbug1479006", "manager token", - manager_for_debugging->driver().GetFrameToken().ToString()); - base::debug::DumpWithoutCrashing(); - return; - } - + CHECK(manager_); const FormStructure* form_structure = manager_->FindCachedFormById(form); if (!form_structure) { return;
diff --git a/components/android_autofill/browser/autofill_provider_android.h b/components/android_autofill/browser/autofill_provider_android.h index 057b8c63..5ea7e5fa 100644 --- a/components/android_autofill/browser/autofill_provider_android.h +++ b/components/android_autofill/browser/autofill_provider_android.h
@@ -74,10 +74,7 @@ const FormData& form, base::TimeTicks timestamp) override; void OnHidePopup(AndroidAutofillManager* manager) override; - // TODO(crbug.com/1479006): Remove the `manager_for_debugging` parameter. - void OnServerPredictionsAvailable( - AndroidAutofillManager* manager_for_debugging, - FormGlobalId form) override; + void OnServerPredictionsAvailable(FormGlobalId form) override; void OnServerQueryRequestError(AndroidAutofillManager* manager, FormSignature form_signature) override;
diff --git a/components/android_autofill/browser/test_autofill_provider.h b/components/android_autofill/browser/test_autofill_provider.h index c83c916..cca017b 100644 --- a/components/android_autofill/browser/test_autofill_provider.h +++ b/components/android_autofill/browser/test_autofill_provider.h
@@ -51,9 +51,7 @@ const FormData& form, base::TimeTicks timestamp) override {} void OnHidePopup(AndroidAutofillManager* manager) override {} - void OnServerPredictionsAvailable( - AndroidAutofillManager* manager_for_debugging, - FormGlobalId form) override {} + void OnServerPredictionsAvailable(FormGlobalId form) override {} void OnServerQueryRequestError(AndroidAutofillManager* manager, FormSignature form_signature) override {} void OnManagerResetOrDestroyed(AndroidAutofillManager* manager) override {}
diff --git a/components/attribution_reporting/BUILD.gn b/components/attribution_reporting/BUILD.gn index be62b3e..f3d483b 100644 --- a/components/attribution_reporting/BUILD.gn +++ b/components/attribution_reporting/BUILD.gn
@@ -55,6 +55,8 @@ "event_trigger_data.h", "filters.cc", "filters.h", + "max_event_level_reports.cc", + "max_event_level_reports.h", "os_registration.cc", "os_registration.h", "parsing_utils.cc", @@ -116,6 +118,7 @@ "event_report_windows_unittest.cc", "event_trigger_data_unittest.cc", "filters_unittest.cc", + "max_event_level_reports_unittest.cc", "os_registration_unittest.cc", "parsing_utils_unittest.cc", "source_registration_unittest.cc",
diff --git a/components/attribution_reporting/constants.h b/components/attribution_reporting/constants.h index 56acd07..7a65eda90 100644 --- a/components/attribution_reporting/constants.h +++ b/components/attribution_reporting/constants.h
@@ -26,8 +26,6 @@ constexpr int kMaxAggregatableValue = 65536; -constexpr int kMaxSettableEventLevelAttributions = 20; - constexpr base::TimeDelta kMinSourceExpiry = base::Days(1); constexpr base::TimeDelta kMaxSourceExpiry = base::Days(30);
diff --git a/components/attribution_reporting/max_event_level_reports.cc b/components/attribution_reporting/max_event_level_reports.cc new file mode 100644 index 0000000..c6230a9f --- /dev/null +++ b/components/attribution_reporting/max_event_level_reports.cc
@@ -0,0 +1,83 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "components/attribution_reporting/max_event_level_reports.h" + +#include "base/check.h" +#include "base/types/expected.h" +#include "base/values.h" +#include "components/attribution_reporting/source_registration_error.mojom.h" +#include "components/attribution_reporting/source_type.mojom.h" +#include "third_party/abseil-cpp/absl/types/optional.h" + +namespace attribution_reporting { + +namespace { + +using ::attribution_reporting::mojom::SourceRegistrationError; +using ::attribution_reporting::mojom::SourceType; + +constexpr int kMaxSettableEventLevelAttributionsPerSource = 20; + +constexpr char kMaxEventLevelReports[] = "max_event_level_reports"; + +bool IsMaxEventLevelReportsValid(int i) { + return i >= 0 && i <= kMaxSettableEventLevelAttributionsPerSource; +} + +int DefaultMaxEventLevelReports(SourceType source_type) { + switch (source_type) { + case SourceType::kNavigation: + return 3; + case SourceType::kEvent: + return 1; + } +} + +} // namespace + +// static +base::expected<MaxEventLevelReports, SourceRegistrationError> +MaxEventLevelReports::Parse(const base::Value::Dict& dict, + SourceType source_type) { + const base::Value* value = dict.Find(kMaxEventLevelReports); + if (!value) { + return MaxEventLevelReports(source_type); + } + + absl::optional<int> i = value->GetIfInt(); + if (!i.has_value() || !IsMaxEventLevelReportsValid(*i)) { + return base::unexpected( + SourceRegistrationError::kMaxEventLevelReportsValueInvalid); + } + + return MaxEventLevelReports(*i); +} + +// static +MaxEventLevelReports MaxEventLevelReports::Max() { + return MaxEventLevelReports(kMaxSettableEventLevelAttributionsPerSource); +} + +MaxEventLevelReports::MaxEventLevelReports(int max_event_level_reports) + : max_event_level_reports_(max_event_level_reports) { + CHECK(IsMaxEventLevelReportsValid(max_event_level_reports_)); +} + +MaxEventLevelReports::MaxEventLevelReports(SourceType source_type) + : MaxEventLevelReports(DefaultMaxEventLevelReports(source_type)) {} + +bool MaxEventLevelReports::SetIfValid(int max_event_level_reports) { + if (!IsMaxEventLevelReportsValid(max_event_level_reports)) { + return false; + } + max_event_level_reports_ = max_event_level_reports; + return true; +} + +void MaxEventLevelReports::Serialize(base::Value::Dict& dict) const { + dict.Set(kMaxEventLevelReports, max_event_level_reports_); +} + +} // namespace attribution_reporting
diff --git a/components/attribution_reporting/max_event_level_reports.h b/components/attribution_reporting/max_event_level_reports.h new file mode 100644 index 0000000..008a04e --- /dev/null +++ b/components/attribution_reporting/max_event_level_reports.h
@@ -0,0 +1,58 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef COMPONENTS_ATTRIBUTION_REPORTING_MAX_EVENT_LEVEL_REPORTS_H_ +#define COMPONENTS_ATTRIBUTION_REPORTING_MAX_EVENT_LEVEL_REPORTS_H_ + +#include "base/component_export.h" +#include "base/types/expected.h" +#include "base/values.h" +#include "components/attribution_reporting/source_registration_error.mojom-forward.h" +#include "components/attribution_reporting/source_type.mojom-forward.h" + +namespace attribution_reporting { + +// Represents the maximum number of event-level reports that can be created for +// a single attribution source. +// +// https://wicg.github.io/attribution-reporting-api/#attribution-source-max-number-of-event-level-reports +class COMPONENT_EXPORT(ATTRIBUTION_REPORTING) MaxEventLevelReports { + public: + static base::expected<MaxEventLevelReports, mojom::SourceRegistrationError> + Parse(const base::Value::Dict&, mojom::SourceType); + + // https://wicg.github.io/attribution-reporting-api/#max-settable-event-level-attributions-per-source + static MaxEventLevelReports Max(); + + MaxEventLevelReports() = default; + + // `CHECK()`s that the given value is valid. + explicit MaxEventLevelReports(int); + + // https://wicg.github.io/attribution-reporting-api/#default-event-level-attributions-per-source + explicit MaxEventLevelReports(mojom::SourceType); + + MaxEventLevelReports(const MaxEventLevelReports&) = default; + MaxEventLevelReports& operator=(const MaxEventLevelReports&) = default; + + MaxEventLevelReports(MaxEventLevelReports&&) = default; + MaxEventLevelReports& operator=(MaxEventLevelReports&&) = default; + + // This implicit conversion is allowed to ease drop-in use of + // this type in places currently requiring `int` with prior validation. + operator int() const { // NOLINT + return max_event_level_reports_; + } + + [[nodiscard]] bool SetIfValid(int); + + void Serialize(base::Value::Dict&) const; + + private: + int max_event_level_reports_ = 0; +}; + +} // namespace attribution_reporting + +#endif // COMPONENTS_ATTRIBUTION_REPORTING_MAX_EVENT_LEVEL_REPORTS_H_
diff --git a/components/attribution_reporting/max_event_level_reports_unittest.cc b/components/attribution_reporting/max_event_level_reports_unittest.cc new file mode 100644 index 0000000..a60d815 --- /dev/null +++ b/components/attribution_reporting/max_event_level_reports_unittest.cc
@@ -0,0 +1,95 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "components/attribution_reporting/max_event_level_reports.h" + +#include "base/test/gmock_expected_support.h" +#include "base/test/values_test_util.h" +#include "base/types/expected.h" +#include "base/values.h" +#include "components/attribution_reporting/source_registration_error.mojom.h" +#include "components/attribution_reporting/source_type.mojom.h" +#include "components/attribution_reporting/test_utils.h" +#include "testing/gmock/include/gmock/gmock.h" +#include "testing/gtest/include/gtest/gtest.h" + +namespace attribution_reporting { +namespace { + +using ::attribution_reporting::mojom::SourceRegistrationError; +using ::attribution_reporting::mojom::SourceType; +using ::base::test::ErrorIs; +using ::base::test::ValueIs; + +TEST(MaxEventLevelReportsTest, Parse) { + const struct { + const char* desc; + const char* json; + ::testing::Matcher<base::expected<int, SourceRegistrationError>> matches; + SourceType source_type = SourceType::kNavigation; + } kTestCases[] = { + { + "omitted_event", + R"json({})json", + ValueIs(1), + SourceType::kEvent, + }, + { + "omitted_navigation", + R"json({})json", + ValueIs(3), + SourceType::kNavigation, + }, + { + "valid", + R"json({"max_event_level_reports": 5})json", + ValueIs(5), + }, + { + "wrong_type", + R"json({"max_event_level_reports": "5"})json", + ErrorIs(SourceRegistrationError::kMaxEventLevelReportsValueInvalid), + }, + { + "negative", + R"json({"max_event_level_reports": -5})json", + ErrorIs(SourceRegistrationError::kMaxEventLevelReportsValueInvalid), + }, + { + "zero", + R"json({"max_event_level_reports": 0})json", + ValueIs(0), + }, + { + "max", + R"json({"max_event_level_reports": 20})json", + ValueIs(20), + }, + { + "higher_than_max", + R"json({"max_event_level_reports": 21})json", + ErrorIs(SourceRegistrationError::kMaxEventLevelReportsValueInvalid), + }, + }; + + for (const auto& test_case : kTestCases) { + SCOPED_TRACE(test_case.desc); + + base::Value::Dict input = base::test::ParseJsonDict(test_case.json); + + EXPECT_THAT(MaxEventLevelReports::Parse(input, test_case.source_type), + test_case.matches); + } +} + +TEST(MaxEventLevelReportsTest, Serialize) { + base::Value::Dict dict; + MaxEventLevelReports(5).Serialize(dict); + + EXPECT_THAT(dict, + base::test::IsJson(R"json({"max_event_level_reports": 5})json")); +} + +} // namespace +} // namespace attribution_reporting
diff --git a/components/attribution_reporting/registration_mojom_traits.cc b/components/attribution_reporting/registration_mojom_traits.cc index 83949f0..6f6fde5 100644 --- a/components/attribution_reporting/registration_mojom_traits.cc +++ b/components/attribution_reporting/registration_mojom_traits.cc
@@ -248,8 +248,12 @@ return false; } + if (!out->max_event_level_reports.SetIfValid( + data.max_event_level_reports())) { + return false; + } + out->source_event_id = data.source_event_id(); - out->max_event_level_reports = data.max_event_level_reports(); out->priority = data.priority(); out->debug_key = data.debug_key(); out->debug_reporting = data.debug_reporting();
diff --git a/components/attribution_reporting/source_registration.cc b/components/attribution_reporting/source_registration.cc index 56eb010..2666787 100644 --- a/components/attribution_reporting/source_registration.cc +++ b/components/attribution_reporting/source_registration.cc
@@ -23,6 +23,7 @@ #include "components/attribution_reporting/destination_set.h" #include "components/attribution_reporting/event_report_windows.h" #include "components/attribution_reporting/filters.h" +#include "components/attribution_reporting/max_event_level_reports.h" #include "components/attribution_reporting/parsing_utils.h" #include "components/attribution_reporting/source_registration_error.mojom.h" #include "components/attribution_reporting/source_type.mojom.h" @@ -43,33 +44,8 @@ constexpr char kDestination[] = "destination"; constexpr char kExpiry[] = "expiry"; constexpr char kFilterData[] = "filter_data"; -constexpr char kMaxEventLevelReports[] = "max_event_level_reports"; constexpr char kSourceEventId[] = "source_event_id"; -bool IsMaxEventLevelReportsValid(int i) { - return i >= 0 && i <= kMaxSettableEventLevelAttributions; -} - -base::expected<int, SourceRegistrationError> ParseMaxEventLevelReports( - const base::Value& value) { - absl::optional<int> i = value.GetIfInt(); - if (!i.has_value() || !IsMaxEventLevelReportsValid(*i)) { - return base::unexpected( - SourceRegistrationError::kMaxEventLevelReportsValueInvalid); - } - - return *i; -} - -int DefaultMaxEventLevelReports(SourceType source_type) { - switch (source_type) { - case SourceType::kNavigation: - return 3; - case SourceType::kEvent: - return 1; - } -} - base::TimeDelta AdjustExpiry(base::TimeDelta expiry, SourceType source_type) { switch (source_type) { case SourceType::kNavigation: @@ -163,12 +139,8 @@ result.event_report_windows, EventReportWindows::FromJSON(registration, result.expiry, source_type)); - if (const base::Value* value = registration.Find(kMaxEventLevelReports)) { - ASSIGN_OR_RETURN(result.max_event_level_reports, - ParseMaxEventLevelReports(*value)); - } else { - result.max_event_level_reports = DefaultMaxEventLevelReports(source_type); - } + ASSIGN_OR_RETURN(result.max_event_level_reports, + MaxEventLevelReports::Parse(registration, source_type)); ASSIGN_OR_RETURN(result.trigger_config, TriggerConfig::Parse(registration)); @@ -231,7 +203,7 @@ SerializeDebugKey(dict, debug_key); SerializeDebugReporting(dict, debug_reporting); - dict.Set(kMaxEventLevelReports, max_event_level_reports); + max_event_level_reports.Serialize(dict); trigger_config.Serialize(dict); @@ -252,10 +224,6 @@ return false; } - if (!IsMaxEventLevelReportsValid(max_event_level_reports)) { - return false; - } - return true; }
diff --git a/components/attribution_reporting/source_registration.h b/components/attribution_reporting/source_registration.h index 310b2d4..a9be7fa 100644 --- a/components/attribution_reporting/source_registration.h +++ b/components/attribution_reporting/source_registration.h
@@ -17,6 +17,7 @@ #include "components/attribution_reporting/destination_set.h" #include "components/attribution_reporting/event_report_windows.h" #include "components/attribution_reporting/filters.h" +#include "components/attribution_reporting/max_event_level_reports.h" #include "components/attribution_reporting/source_registration_error.mojom-forward.h" #include "components/attribution_reporting/source_type.mojom-forward.h" #include "components/attribution_reporting/trigger_config.h" @@ -63,9 +64,7 @@ base::TimeDelta expiry = kMaxSourceExpiry; EventReportWindows event_report_windows; base::TimeDelta aggregatable_report_window = expiry; - // Must be non-negative and <= `kMaxSettableEventLevelAttributions`. - // This is verified by the `Parse()` and `IsValid()` methods. - int max_event_level_reports = 0; + MaxEventLevelReports max_event_level_reports; int64_t priority = 0; FilterData filter_data; absl::optional<uint64_t> debug_key;
diff --git a/components/attribution_reporting/source_registration_unittest.cc b/components/attribution_reporting/source_registration_unittest.cc index 4e16918..2e6f44e 100644 --- a/components/attribution_reporting/source_registration_unittest.cc +++ b/components/attribution_reporting/source_registration_unittest.cc
@@ -17,6 +17,7 @@ #include "components/attribution_reporting/destination_set.h" #include "components/attribution_reporting/event_report_windows.h" #include "components/attribution_reporting/filters.h" +#include "components/attribution_reporting/max_event_level_reports.h" #include "components/attribution_reporting/source_registration_error.mojom.h" #include "components/attribution_reporting/source_type.mojom.h" #include "components/attribution_reporting/test_utils.h" @@ -79,7 +80,8 @@ SourceType::kNavigation)), Field(&SourceRegistration::aggregatable_report_window, base::Days(30)), - Field(&SourceRegistration::max_event_level_reports, 3), + Field(&SourceRegistration::max_event_level_reports, + MaxEventLevelReports(SourceType::kNavigation)), Field(&SourceRegistration::priority, 0), Field(&SourceRegistration::filter_data, FilterData()), Field(&SourceRegistration::debug_key, absl::nullopt), @@ -200,7 +202,6 @@ ValueIs(Field(&SourceRegistration::event_report_windows, *EventReportWindows::Create(base::Seconds(0), {base::Seconds(86401)}))), - }, { "aggregatable_report_window_valid", @@ -257,38 +258,16 @@ base::Seconds(172800))), }, { - "max_event_level_reports_omitted_event", - R"json({"destination":"https://d.example"})json", - ValueIs(Field(&SourceRegistration::max_event_level_reports, 1)), - SourceType::kEvent, - }, - { + // Tested more thoroughly in `max_event_level_reports_unittest.cc` "max_event_level_reports_valid", R"json({"max_event_level_reports":5, "destination":"https://d.example"})json", ValueIs(Field(&SourceRegistration::max_event_level_reports, 5)), }, { - "max_event_level_reports_wrong_type", - R"json({"max_event_level_reports":"5", - "destination":"https://d.example"})json", - ErrorIs(SourceRegistrationError::kMaxEventLevelReportsValueInvalid), - }, - { - "max_event_level_reports_negative", - R"json({"max_event_level_reports":-5, - "destination":"https://d.example"})json", - ErrorIs(SourceRegistrationError::kMaxEventLevelReportsValueInvalid), - }, - { - "max_event_level_reports_zero", - R"json({"max_event_level_reports":0, - "destination":"https://d.example"})json", - ValueIs(Field(&SourceRegistration::max_event_level_reports, 0)), - }, - { - "max_event_level_reports_higher_than_max", - R"json({"max_event_level_reports":25, + // Tested more thoroughly in `max_event_level_reports_unittest.cc` + "max_event_level_reports_invalid", + R"json({"max_event_level_reports":null, "destination":"https://d.example"})json", ErrorIs(SourceRegistrationError::kMaxEventLevelReportsValueInvalid), }, @@ -398,7 +377,7 @@ r.filter_data = *FilterData::Create({{"b", {}}}); r.priority = -6; r.source_event_id = 7; - r.max_event_level_reports = 8; + r.max_event_level_reports = MaxEventLevelReports(8); }), R"json({ "aggregatable_report_window": 1, @@ -482,22 +461,6 @@ EXPECT_TRUE(SourceRegistrationWith(destination, [](SourceRegistration& r) { r.aggregatable_report_window = base::Hours(1); }).IsValid()); - - EXPECT_FALSE(SourceRegistrationWith(destination, [](SourceRegistration& r) { - r.max_event_level_reports = -1; - }).IsValid()); - - EXPECT_FALSE(SourceRegistrationWith(destination, [](SourceRegistration& r) { - r.max_event_level_reports = 21; - }).IsValid()); - - EXPECT_TRUE(SourceRegistrationWith(destination, [](SourceRegistration& r) { - r.max_event_level_reports = 0; - }).IsValid()); - - EXPECT_TRUE(SourceRegistrationWith(destination, [](SourceRegistration& r) { - r.max_event_level_reports = 20; - }).IsValid()); } TEST(SourceRegistrationTest, IsValidForSourceType) {
diff --git a/components/attribution_reporting/test_utils.cc b/components/attribution_reporting/test_utils.cc index 4b91617..0eb5c1b 100644 --- a/components/attribution_reporting/test_utils.cc +++ b/components/attribution_reporting/test_utils.cc
@@ -216,9 +216,7 @@ } std::ostream& operator<<(std::ostream& out, const TriggerSpecs& specs) { - base::Value::Dict dict; - specs.Serialize(dict); - return out << dict; + return out << specs.ToJson(); } } // namespace attribution_reporting
diff --git a/components/attribution_reporting/trigger_config.cc b/components/attribution_reporting/trigger_config.cc index 635e6a7..0854112 100644 --- a/components/attribution_reporting/trigger_config.cc +++ b/components/attribution_reporting/trigger_config.cc
@@ -345,7 +345,7 @@ return specs_.size() == 1 ? &specs_[0] : nullptr; } -void TriggerSpecs::Serialize(base::Value::Dict& dict) const { +base::Value::List TriggerSpecs::ToJson() const { base::Value::List spec_list; spec_list.reserve(specs_.size()); @@ -366,7 +366,11 @@ } } - dict.Set(kTriggerSpecs, std::move(spec_list)); + return spec_list; +} + +void TriggerSpecs::Serialize(base::Value::Dict& dict) const { + dict.Set(kTriggerSpecs, ToJson()); } TriggerSpecs::Iterator::Iterator(const TriggerSpecs& specs,
diff --git a/components/attribution_reporting/trigger_config.h b/components/attribution_reporting/trigger_config.h index 19db9e8..4e43c0c 100644 --- a/components/attribution_reporting/trigger_config.h +++ b/components/attribution_reporting/trigger_config.h
@@ -97,6 +97,8 @@ // lookup for a given trigger data value and use it in // `content::AttributionStorageSql`. + base::Value::List ToJson() const; + void Serialize(base::Value::Dict&) const; class COMPONENT_EXPORT(ATTRIBUTION_REPORTING) Iterator {
diff --git a/components/autofill/content/renderer/form_autofill_util.cc b/components/autofill/content/renderer/form_autofill_util.cc index 5a8fab4..68104cb 100644 --- a/components/autofill/content/renderer/form_autofill_util.cc +++ b/components/autofill/content/renderer/form_autofill_util.cc
@@ -1558,7 +1558,7 @@ // Build a map from entries in |form_control_renderer_ids| to their indices, // for more efficient lookup. base::flat_map<FieldRendererId, size_t> BuildRendererIdToIndex( - const std::vector<FieldRendererId>& form_control_renderer_ids) { + base::span<const FieldRendererId> form_control_renderer_ids) { std::vector<std::pair<FieldRendererId, size_t>> items; items.reserve(form_control_renderer_ids.size()); for (size_t i = 0; i < form_control_renderer_ids.size(); i++) @@ -2690,7 +2690,7 @@ std::vector<WebFormControlElement> FindFormControlsByRendererId( const WebDocument& doc, - const std::vector<FieldRendererId>& queried_form_controls) { + base::span<const FieldRendererId> queried_form_controls) { if (base::FeatureList::IsEnabled( blink::features::kAutofillUseDomNodeIdForRendererId)) { std::vector<WebFormControlElement> control_elements; @@ -2723,7 +2723,7 @@ std::vector<WebFormControlElement> FindFormControlsByRendererId( const WebDocument& doc, FormRendererId form_renderer_id, - const std::vector<FieldRendererId>& queried_form_controls) { + base::span<const FieldRendererId> queried_form_controls) { if (base::FeatureList::IsEnabled( blink::features::kAutofillUseDomNodeIdForRendererId)) { return FindFormControlsByRendererId(doc, queried_form_controls);
diff --git a/components/autofill/content/renderer/form_autofill_util.h b/components/autofill/content/renderer/form_autofill_util.h index 2f32fd2..91b7b4c 100644 --- a/components/autofill/content/renderer/form_autofill_util.h +++ b/components/autofill/content/renderer/form_autofill_util.h
@@ -456,7 +456,7 @@ // expensive, because it retrieves all DOM elements. std::vector<blink::WebFormControlElement> FindFormControlsByRendererId( const blink::WebDocument& doc, - const std::vector<FieldRendererId>& queried_form_controls); + base::span<const FieldRendererId> queried_form_controls); // Returns form control elements by unique renderer id. The result has the same // number elements as |queried_form_controls| and the i-th element of the result @@ -467,7 +467,7 @@ std::vector<blink::WebFormControlElement> FindFormControlsByRendererId( const blink::WebDocument& doc, FormRendererId form_renderer_id, - const std::vector<FieldRendererId>& queried_form_controls); + base::span<const FieldRendererId> queried_form_controls); blink::WebElement FindContentEditableByRendererId( FieldRendererId field_renderer_id);
diff --git a/components/autofill/content/renderer/password_autofill_agent.cc b/components/autofill/content/renderer/password_autofill_agent.cc index 6aa76c1f..4ca77b5 100644 --- a/components/autofill/content/renderer/password_autofill_agent.cc +++ b/components/autofill/content/renderer/password_autofill_agent.cc
@@ -1521,8 +1521,8 @@ // Clear the actual field values. WebDocument doc = render_frame()->GetWebFrame()->GetDocument(); std::vector<WebFormControlElement> elements = FindFormControlsByRendererId( - doc, std::vector<FieldRendererId>(all_autofilled_elements_.begin(), - all_autofilled_elements_.end())); + doc, base::make_span(all_autofilled_elements_.begin(), + all_autofilled_elements_.end())); for (WebFormControlElement& element : elements) { if (element.IsNull()) continue;
diff --git a/components/autofill/content/renderer/password_autofill_agent.h b/components/autofill/content/renderer/password_autofill_agent.h index 22a31f2..e84ed24 100644 --- a/components/autofill/content/renderer/password_autofill_agent.h +++ b/components/autofill/content/renderer/password_autofill_agent.h
@@ -7,11 +7,11 @@ #include <map> #include <memory> -#include <set> #include <string> #include <utility> #include <vector> +#include "base/containers/flat_set.h" #include "base/memory/raw_ptr.h" #include "base/memory/weak_ptr.h" #include "base/types/strong_alias.h" @@ -535,7 +535,7 @@ // Keeps autofilled values for the form elements until a user gesture // is observed. At that point, the map is cleared. std::map<FieldRendererId, blink::WebString> autofilled_elements_cache_; - std::set<FieldRendererId> all_autofilled_elements_; + base::flat_set<FieldRendererId> all_autofilled_elements_; // Keeps forms structure (amount of elements, element types etc). // TODO(crbug/898109): It's too expensive to keep the whole FormData // structure. Replace FormData with a smaller structure.
diff --git a/components/autofill/core/browser/autofill_feedback_data_unittest.cc b/components/autofill/core/browser/autofill_feedback_data_unittest.cc index a143f74..3c9c4ae 100644 --- a/components/autofill/core/browser/autofill_feedback_data_unittest.cc +++ b/components/autofill/core/browser/autofill_feedback_data_unittest.cc
@@ -6,7 +6,6 @@ #include "base/json/json_reader.h" #include "base/test/gmock_expected_support.h" -#include "base/test/scoped_feature_list.h" #include "base/test/task_environment.h" #include "base/values.h" #include "components/autofill/core/browser/autofill_test_utils.h" @@ -125,11 +124,7 @@ class AutofillFeedbackDataUnitTest : public testing::Test { protected: - AutofillFeedbackDataUnitTest() { - feature_.InitWithFeatures( - /*enabled_features=*/{features::kAutofillFeedback}, - /*disabled_features=*/{}); - } + AutofillFeedbackDataUnitTest() = default; void SetUp() override { autofill_driver_ = std::make_unique<TestAutofillDriver>(); browser_autofill_manager_ = std::make_unique<TestBrowserAutofillManager>( @@ -141,7 +136,6 @@ TestAutofillClient autofill_client_; std::unique_ptr<TestAutofillDriver> autofill_driver_; std::unique_ptr<TestBrowserAutofillManager> browser_autofill_manager_; - base::test::ScopedFeatureList feature_; }; TEST_F(AutofillFeedbackDataUnitTest, CreatesCompleteReport) {
diff --git a/components/autofill/core/browser/autofill_field.cc b/components/autofill/core/browser/autofill_field.cc index ddf475f6..c7d89d7 100644 --- a/components/autofill/core/browser/autofill_field.cc +++ b/components/autofill/core/browser/autofill_field.cc
@@ -565,18 +565,6 @@ // recording log events into |field_log_events_| to save memory when // |field_log_events_| reaches certain threshold, e.g. 1000. - // Disable it for now until we find a selection criterion to select forms to - // be recorded into UKM. Always enable for clients with - // `features::kAutofillFeedback` and - // `features::kAutofillGranularFillingAvailable` enabled. - if (!base::FeatureList::IsEnabled( - features::kAutofillLogUKMEventsWithSampleRate) && - !base::FeatureList::IsEnabled(features::kAutofillFeedback) && - !base::FeatureList::IsEnabled( - features::kAutofillGranularFillingAvailable)) { - return; - } - if (field_log_events_.empty() || field_log_events_.back().index() != log_event.index() || !AreCollapsibleLogEvents(field_log_events_.back(), log_event)) {
diff --git a/components/autofill/core/browser/autofill_field.h b/components/autofill/core/browser/autofill_field.h index a622bce1..c46d020e 100644 --- a/components/autofill/core/browser/autofill_field.h +++ b/components/autofill/core/browser/autofill_field.h
@@ -231,6 +231,13 @@ void set_initial_value_hash(uint32_t value) { initial_value_hash_ = value; } absl::optional<uint32_t> initial_value_hash() { return initial_value_hash_; } + void set_initial_value_changed(std::optional<bool> initial_value_changed) { + initial_value_changed_ = initial_value_changed; + } + std::optional<bool> initial_value_changed() const { + return initial_value_changed_; + } + void set_credit_card_number_offset(size_t position) { credit_card_number_offset_ = position; } @@ -412,6 +419,13 @@ // automatic fillings. This field is used to detect static placeholders. absl::optional<uint32_t> initial_value_hash_; + // On form submission, set to `true` if the field had a value on page load and + // it was changed between page load and form submission. Set to `false` if the + // pre-filled value wasn't changed. Not set if the field didn't have a + // pre-filled value. + // Currently not implemented for <select> fields. + std::optional<bool> initial_value_changed_; + // Used to hold the position of the first digit to be copied as a substring // from credit card number. size_t credit_card_number_offset_ = 0;
diff --git a/components/autofill/core/browser/browser_autofill_manager.cc b/components/autofill/core/browser/browser_autofill_manager.cc index c389c8ce..40b9f6e 100644 --- a/components/autofill/core/browser/browser_autofill_manager.cc +++ b/components/autofill/core/browser/browser_autofill_manager.cc
@@ -3721,12 +3721,7 @@ const FormStructure& form_structure) { // TODO(crbug.com/1325851): Log metrics if at least one field in the form was // classified as a certain type. - - if (base::FeatureList::IsEnabled( - features::kAutofillLogUKMEventsWithSampleRate) || - base::FeatureList::IsEnabled(features::kAutofillFeedback)) { - LogEventCountsUMAMetric(form_structure); - } + LogEventCountsUMAMetric(form_structure); // ShouldUploadUkm reduces the UKM load by ignoring e.g. search boxes at best // effort.
diff --git a/components/autofill/core/browser/browser_autofill_manager_unittest.cc b/components/autofill/core/browser/browser_autofill_manager_unittest.cc index 89c369a..3f6f65fc 100644 --- a/components/autofill/core/browser/browser_autofill_manager_unittest.cc +++ b/components/autofill/core/browser/browser_autofill_manager_unittest.cc
@@ -5702,8 +5702,7 @@ BrowserAutofillManagerWithLogEventsTest() { scoped_features_.InitWithFeatures( /*enabled_features=*/{features::kAutofillLogUKMEventsWithSampleRate, - features::kAutofillParsingPatternProvider, - features::kAutofillFeedback}, + features::kAutofillParsingPatternProvider}, /*disabled_features=*/{}); }
diff --git a/components/autofill/core/browser/form_structure.cc b/components/autofill/core/browser/form_structure.cc index 3142169..fcfc0b28 100644 --- a/components/autofill/core/browser/form_structure.cc +++ b/components/autofill/core/browser/form_structure.cc
@@ -1169,6 +1169,10 @@ // GeoIP, we want to hold on to these values. const bool same_value_as_on_page_load = field->value == cached_field->value; + if (!cached_field->value.empty() && + !field->IsSelectOrSelectListElement()) { + field->set_initial_value_changed(!same_value_as_on_page_load); + } const bool field_is_neither_state_nor_country = field->server_type() != ADDRESS_HOME_COUNTRY && field->server_type() != ADDRESS_HOME_STATE; @@ -1529,6 +1533,11 @@ added_field->set_initial_value_hash(field->initial_value_hash().value()); } + if (field->initial_value_changed().has_value()) { + added_field->set_initial_value_changed( + field->initial_value_changed().value()); + } + added_field->set_signature(field->GetFieldSignature().value()); if (field->properties_mask)
diff --git a/components/autofill/core/browser/form_structure_unittest.cc b/components/autofill/core/browser/form_structure_unittest.cc index 5f9da55..46e57c12d 100644 --- a/components/autofill/core/browser/form_structure_unittest.cc +++ b/components/autofill/core/browser/form_structure_unittest.cc
@@ -6822,4 +6822,39 @@ } } +TEST_F(FormStructureTestImpl, EncodeUploadRequest_SetsInitialValueChanged) { + FormData form = test::GetFormData( + {.fields = {{.role = NAME_FIRST}, + {.role = NAME_LAST, .value = u"Doe"}, + {.role = EMAIL_ADDRESS, .value = u"test@example.com"}}}); + // Form structure preserving the state from page load. + FormStructure cached_form_structure(form); + // Form structure containing the state on submit. + FormStructure form_structure(form); + + // Simulate user changed non-pre-filled field value. + form_structure.field(0)->value = u"John"; + // Simulate user changed pre-filled field value. + form_structure.field(2)->value = u"changed@example.com"; + + // Sets `initial_value_changed` on `form_structure::fields_`. + form_structure.RetrieveFromCache( + cached_form_structure, + FormStructure::RetrieveFromCacheReason::kFormImport); + + const std::vector<AutofillUploadContents> uploads = + form_structure.EncodeUploadRequest( + /*available_field_types=*/{}, /*form_was_autofilled=*/false, + /*login_form_signature=*/"", /*observed_submission=*/true); + ASSERT_EQ(uploads.size(), 1UL); + const AutofillUploadContents& upload = uploads[0]; + + ASSERT_EQ(upload.field_size(), 3); + EXPECT_FALSE(upload.field(0).has_initial_value_changed()); + EXPECT_TRUE(upload.field(1).has_initial_value_changed()); + EXPECT_FALSE(upload.field(1).initial_value_changed()); + EXPECT_TRUE(upload.field(2).has_initial_value_changed()); + EXPECT_TRUE(upload.field(2).initial_value_changed()); +} + } // namespace autofill
diff --git a/components/autofill/core/browser/proto/server.proto b/components/autofill/core/browser/proto/server.proto index 22d5c6b5..c82bde9 100644 --- a/components/autofill/core/browser/proto/server.proto +++ b/components/autofill/core/browser/proto/server.proto
@@ -225,7 +225,7 @@ // This message contains information about the field types in a single form. // It is sent by the toolbar to contribute to the field type statistics. -// Next available id: 47 +// Next available id: 48 message AutofillUploadContents { required string client_version = 1; required fixed64 form_signature = 2; @@ -391,6 +391,11 @@ // but has intermediate fields between the candidate and the password // form. optional bool is_most_recent_single_username_candidate = 46; + + // Set to `true` if the field had a value on page load and it was changed + // between then and form submission. Set to `false` if the pre-filled value + // wasn't changed. Not set if the field didn't have a pre-filled value. + optional bool initial_value_changed = 47; } // Signature of the form action host (e.g. Hash64Bit("example.com")). optional fixed64 action_signature = 13;
diff --git a/components/autofill/core/common/autofill_features.cc b/components/autofill/core/common/autofill_features.cc index 22ab467..76774b26 100644 --- a/components/autofill/core/common/autofill_features.cc +++ b/components/autofill/core/common/autofill_features.cc
@@ -329,11 +329,6 @@ "AutofillExtractAllDatalists", base::FEATURE_DISABLED_BY_DEFAULT); -// Enables support to submit feedback on Autofill. Used only in Desktop. -BASE_FEATURE(kAutofillFeedback, - "AutofillFeedback", - base::FEATURE_ENABLED_BY_DEFAULT); - // Replaces cached web elements in AutofillAgent and FormTracker by their // renderer ids. // DONOTSUMBIT: Disable.
diff --git a/components/autofill/core/common/autofill_features.h b/components/autofill/core/common/autofill_features.h index 6f0cafe..b65483e 100644 --- a/components/autofill/core/common/autofill_features.h +++ b/components/autofill/core/common/autofill_features.h
@@ -115,8 +115,6 @@ COMPONENT_EXPORT(AUTOFILL) BASE_DECLARE_FEATURE(kAutofillEnableSupportForPhoneNumberTrunkTypes); COMPONENT_EXPORT(AUTOFILL) -BASE_DECLARE_FEATURE(kAutofillFeedback); -COMPONENT_EXPORT(AUTOFILL) BASE_DECLARE_FEATURE(kAutofillReplaceCachedWebElementsByRendererIds); COMPONENT_EXPORT(AUTOFILL) BASE_DECLARE_FEATURE(kAutofillUseAddressRewriterInProfileSubsetComparison);
diff --git a/components/browser_ui/strings/android/browser_ui_strings.grd b/components/browser_ui/strings/android/browser_ui_strings.grd index 00713ca..e2f01dc 100644 --- a/components/browser_ui/strings/android/browser_ui_strings.grd +++ b/components/browser_ui/strings/android/browser_ui_strings.grd
@@ -323,9 +323,6 @@ Provided by Google </message> - <message name="IDS_ACCESSIBILITY_TOOLBAR_BTN_MENU" desc="Content description for the settings menu button."> - Customize and control Google Chrome - </message> <message name="IDS_ACCESSIBILITY_TOOLBAR_BTN_FORWARD" desc="Content description for the forward navigation button."> Go forward </message> @@ -335,9 +332,6 @@ <message name="IDS_ACCESSIBILITY_TOOLBAR_BTN_DELETE_URL" desc="Content description for the clear text input button."> Clear input </message> - <message name="IDS_ACCESSIBILITY_LIST_MENU_BUTTON" desc="Content description for the button that shows option menu for a list item."> - <ph name="NAME_OF_LIST_ITEM">%1$s<ex>Movie Title</ex></ph> Options - </message> <message name="IDS_ACCESSIBILITY_LIST_REMOVE_BUTTON" desc="Content description for the button that removes a list item."> <ph name="NAME_OF_LIST_ITEM">%1$s<ex>Movie Title</ex></ph> Remove </message>
diff --git a/components/browser_ui/strings/android/translations/browser_ui_strings_ar.xtb b/components/browser_ui/strings/android/translations/browser_ui_strings_ar.xtb index dc43e53..dd3cf7c 100644 --- a/components/browser_ui/strings/android/translations/browser_ui_strings_ar.xtb +++ b/components/browser_ui/strings/android/translations/browser_ui_strings_ar.xtb
@@ -115,6 +115,7 @@ <translation id="2910701580606108292">السؤال قبل السماح للمواقع الإلكترونية بتشغيل المحتوى المحمي</translation> <translation id="2932883381142163287">الإبلاغ عن إساءة الاستخدام</translation> <translation id="2968755619301702150">عارض الشهادات</translation> +<translation id="2979365474350987274">ملفات تعريف الارتباط التابعة لجهات خارجية محدودة</translation> <translation id="3008272652534848354">إعادة ضبط الأذونات</translation> <translation id="3013291976881901233">أجهزة MIDI</translation> <translation id="301521992641321250">تم الحظر تلقائيًا</translation>
diff --git a/components/browser_ui/strings/android/translations/browser_ui_strings_be.xtb b/components/browser_ui/strings/android/translations/browser_ui_strings_be.xtb index 34ba4d4b..c5d18af 100644 --- a/components/browser_ui/strings/android/translations/browser_ui_strings_be.xtb +++ b/components/browser_ui/strings/android/translations/browser_ui_strings_be.xtb
@@ -80,6 +80,7 @@ <translation id="2404630663942400771">{PERMISSIONS_SUMMARY_ALLOWED,plural, =1{Дазволены <ph name="PERMISSION_1" />, <ph name="PERMISSION_2" /> і яшчэ <ph name="NUM_MORE" />}one{Дазволены <ph name="PERMISSION_1" />, <ph name="PERMISSION_2" /> і яшчэ <ph name="NUM_MORE" />}few{Дазволены <ph name="PERMISSION_1" />, <ph name="PERMISSION_2" /> і яшчэ <ph name="NUM_MORE" />}many{Дазволены <ph name="PERMISSION_1" />, <ph name="PERMISSION_2" /> і яшчэ <ph name="NUM_MORE" />}other{Дазволены <ph name="PERMISSION_1" />, <ph name="PERMISSION_2" /> і яшчэ <ph name="NUM_MORE" />}}</translation> <translation id="2410940059315936967">На сайце, які вы наведваеце, можа быць убудаванае змесціва з іншых сайтаў (напрыклад, відарысы, рэклама або тэкст). Файлы cookie, зададзеныя такімі сайтамі, называюцца староннімі файламі cookie.</translation> <translation id="2434158240863470628">Спампоўванне завершана <ph name="SEPARATOR" /> <ph name="BYTES_DOWNLOADED" /></translation> +<translation id="2438120137003069591">Вы часова дазволілі гэтаму сайту выкарыстоўваць староннія файлы cookie. Гэта знізіць вашу абароненасць падчас прагляду вэб-старонак, але функцыі сайта з большай імавернасцю будуць працаваць правільна. <ph name="BEGIN_LINK" />Адправіць водгук<ph name="END_LINK" /></translation> <translation id="244264527810019436">На некаторых сайтах у рэжыме інкогніта можа не працаваць частка функцый</translation> <translation id="2442870161001914531">Заўсёды запытваць версію сайта для настольнага камп'ютара</translation> <translation id="2469312991797799607">Будуць выдалены ўсе даныя і файлы cookie дамена <ph name="ORIGIN" /> і сайтаў, якія да яго належаць.</translation> @@ -208,6 +209,7 @@ <translation id="4644713492825682049">Выдаліць і скінуць</translation> <translation id="4645575059429386691">Пад кіраваннем бацькоў</translation> <translation id="4670064810192446073">Віртуальная рэальнасць</translation> +<translation id="4673958474310291465">Паспрабуйце часова дазволіць староннія файлы cookie. Гэта знізіць вашу абароненасць, але функцыі сайта з большай імавернасцю будуць працаваць правільна</translation> <translation id="4751476147751820511">Датчыкі руху або святла</translation> <translation id="4779083564647765204">Маштаб</translation> <translation id="4811450222531576619">Даведайцеся пра яе крыніцу і тэму</translation> @@ -345,6 +347,7 @@ <translation id="7053983685419859001">Заблакіраваць</translation> <translation id="7066151586745993502">{NUM_SELECTED,plural, =1{Выбраны 1 элемент}one{Выбраны # элемент}few{Выбрана # элементы}many{Выбрана # элементаў}other{Выбрана # элемента}}</translation> <translation id="7087918508125750058">Выбрана: <ph name="ITEM_COUNT" />. Параметры знаходзяцца ўверсе экрана</translation> +<translation id="7137403271056944713">Кіраванне/перапраграмаванне MIDI</translation> <translation id="7141896414559753902">Заблакіраваць сайтам паказ выплыўных вокнаў і перанакіраванні (рэкамендуецца)</translation> <translation id="7176368934862295254"><ph name="KILOBYTES" /> КБ</translation> <translation id="7180611975245234373">Абнавіць</translation>
diff --git a/components/browser_ui/strings/android/translations/browser_ui_strings_bs.xtb b/components/browser_ui/strings/android/translations/browser_ui_strings_bs.xtb index c963c26d..a8369c4b 100644 --- a/components/browser_ui/strings/android/translations/browser_ui_strings_bs.xtb +++ b/components/browser_ui/strings/android/translations/browser_ui_strings_bs.xtb
@@ -80,6 +80,7 @@ <translation id="2404630663942400771">{PERMISSIONS_SUMMARY_ALLOWED,plural, =1{Dozvoljeno: <ph name="PERMISSION_1" />, <ph name="PERMISSION_2" /> i još <ph name="NUM_MORE" />}one{Dozvoljeno: <ph name="PERMISSION_1" />, <ph name="PERMISSION_2" /> i još <ph name="NUM_MORE" />}few{Dozvoljeno: <ph name="PERMISSION_1" />, <ph name="PERMISSION_2" /> i još <ph name="NUM_MORE" />}other{Dozvoljeno: <ph name="PERMISSION_1" />, <ph name="PERMISSION_2" /> i još <ph name="NUM_MORE" />}}</translation> <translation id="2410940059315936967">Web lokacija koju posjetite može ugraditi sadržaj s drugih web lokacija, naprimjer slike, oglase i tekst. Kolačići koje postavljaju ove druge web lokacije se nazivaju kolačićima treće strane.</translation> <translation id="2434158240863470628">Preuzimanje je završeno <ph name="SEPARATOR" /> <ph name="BYTES_DOWNLOADED" /></translation> +<translation id="2438120137003069591">Privremeno ste dopustili ovoj web-lokaciji upotrebu kolačića trećih strana, što znači da će biti manje zaštite pregledavanja, ali će značajke web-lokacije vjerojatnije funkcionirati u skladu s očekivanjima. <ph name="BEGIN_LINK" />Pošaljite svoje dojmove<ph name="END_LINK" /></translation> <translation id="244264527810019436">Funkcije na nekim web lokacijama možda neće funkcionirati u anonimnom načinu rada</translation> <translation id="2442870161001914531">Uvijek zatraži verziju web lokacije za računar</translation> <translation id="2469312991797799607">Ova radnja će izbrisati sve podatke i kolačiće za domenu <ph name="ORIGIN" /> i sve njene web lokacije</translation> @@ -208,6 +209,7 @@ <translation id="4644713492825682049">Izbriši i poništi</translation> <translation id="4645575059429386691">Upravlja roditelj</translation> <translation id="4670064810192446073">Virtuelna realnost</translation> +<translation id="4673958474310291465">Pokušajte privremeno dopustiti kolačiće trećih strana, što znači da će biti manje zaštite, ali će značajke web-lokacije vjerojatnije funkcionirati prema očekivanjima</translation> <translation id="4751476147751820511">Senzori pokreta ili svjetla</translation> <translation id="4779083564647765204">Uvećaj</translation> <translation id="4811450222531576619">Saznajte o njenom izvoru i temi</translation> @@ -345,6 +347,7 @@ <translation id="7053983685419859001">Blokiraj</translation> <translation id="7066151586745993502">{NUM_SELECTED,plural, =1{1 odabrana kartica}one{# odabrana kartica}few{# odabrane kartice}other{# odabranih kartica}}</translation> <translation id="7087918508125750058">Odabrali ste <ph name="ITEM_COUNT" />. Opcije su dostupne pri vrhu ekrana</translation> +<translation id="7137403271056944713">Kontrola/reprogramiranje MIDI uređaja</translation> <translation id="7141896414559753902">Blokiranje prikazivanja skočnih prozora na web lokacijama i preusmjeravanje (preporučeno)</translation> <translation id="7176368934862295254"><ph name="KILOBYTES" /> kB</translation> <translation id="7180611975245234373">Osvježi</translation>
diff --git a/components/browser_ui/strings/android/translations/browser_ui_strings_eu.xtb b/components/browser_ui/strings/android/translations/browser_ui_strings_eu.xtb index 60db88f1..8a9ddfd 100644 --- a/components/browser_ui/strings/android/translations/browser_ui_strings_eu.xtb +++ b/components/browser_ui/strings/android/translations/browser_ui_strings_eu.xtb
@@ -114,6 +114,7 @@ <translation id="2910701580606108292">Webguneei eduki babestua erreproduzitzeko baimena eman aurretik, eskatu onespena</translation> <translation id="2932883381142163287">Eman erabilera okerren berri</translation> <translation id="2968755619301702150">Ziurtagiri-ikustailea</translation> +<translation id="2979365474350987274">Hirugarrenen cookieek murriztapenak dituzte</translation> <translation id="3008272652534848354">Berrezarri baimenak</translation> <translation id="3013291976881901233">MIDI gailuak</translation> <translation id="301521992641321250">Automatikoki blokeatuta</translation>
diff --git a/components/browser_ui/strings/android/translations/browser_ui_strings_hr.xtb b/components/browser_ui/strings/android/translations/browser_ui_strings_hr.xtb index 7212138..f47cc0a 100644 --- a/components/browser_ui/strings/android/translations/browser_ui_strings_hr.xtb +++ b/components/browser_ui/strings/android/translations/browser_ui_strings_hr.xtb
@@ -80,6 +80,7 @@ <translation id="2404630663942400771">{PERMISSIONS_SUMMARY_ALLOWED,plural, =1{Odobrena su dopuštenja <ph name="PERMISSION_1" />, <ph name="PERMISSION_2" /> i još <ph name="NUM_MORE" />}one{Odobrena su dopuštenja <ph name="PERMISSION_1" />, <ph name="PERMISSION_2" /> i još <ph name="NUM_MORE" />}few{Odobrena su dopuštenja <ph name="PERMISSION_1" />, <ph name="PERMISSION_2" /> i još <ph name="NUM_MORE" />}other{Odobrena su dopuštenja <ph name="PERMISSION_1" />, <ph name="PERMISSION_2" /> i još <ph name="NUM_MORE" />}}</translation> <translation id="2410940059315936967">Web-lokacija koju posjetite može ugraditi sadržaj s drugih web-lokacija, primjerice slike, oglase i tekst. Kolačići koje postavljaju te druge web-lokacije nazivaju se kolačićima treće strane.</translation> <translation id="2434158240863470628">Preuzimanje je dovršeno: <ph name="SEPARATOR" /> <ph name="BYTES_DOWNLOADED" /></translation> +<translation id="2438120137003069591">Privremeno ste dopustili ovoj web-lokaciji upotrebu kolačića trećih strana, što znači da će biti manje zaštite pregledavanja, ali će značajke web-lokacije vjerojatnije funkcionirati u skladu s očekivanjima. <ph name="BEGIN_LINK" />Pošaljite svoje dojmove<ph name="END_LINK" /></translation> <translation id="244264527810019436">Značajke na nekim web-lokacijama možda neće funkcionirati u anonimnom načinu rada</translation> <translation id="2442870161001914531">Uvijek zahtijevaj web-lokaciju za računalo</translation> <translation id="2469312991797799607">Tom ćete radnjom izbrisati sve podatke i kolačiće za web-lokaciju <ph name="ORIGIN" /> te sve njoj podređene web-lokacije</translation> @@ -208,6 +209,7 @@ <translation id="4644713492825682049">Izbriši i poništi</translation> <translation id="4645575059429386691">Upravlja tvoj roditelj</translation> <translation id="4670064810192446073">Virtualna stvarnost</translation> +<translation id="4673958474310291465">Pokušajte privremeno dopustiti kolačiće trećih strana, što znači da će biti manje zaštite, ali će značajke web-lokacije vjerojatnije funkcionirati prema očekivanjima</translation> <translation id="4751476147751820511">Senzori pokreta ili osvjetljenja</translation> <translation id="4779083564647765204">Zumiranje</translation> <translation id="4811450222531576619">Saznajte više o njenom izvoru i temi</translation> @@ -345,6 +347,7 @@ <translation id="7053983685419859001">Blokiraj</translation> <translation id="7066151586745993502">{NUM_SELECTED,plural, =1{1 odabrana stavka}one{# odabrana stavka}few{# odabrane stavke}other{# odabranih stavki}}</translation> <translation id="7087918508125750058">Odabrano: <ph name="ITEM_COUNT" />. Opcije su dostupne pri vrhu zaslona</translation> +<translation id="7137403271056944713">Kontrola/reprogramiranje MIDI uređaja</translation> <translation id="7141896414559753902">Web-lokacijama nije dopušteno prikazivanje skočnih prozora i preusmjeravanja (preporučeno)</translation> <translation id="7176368934862295254"><ph name="KILOBYTES" /> KB</translation> <translation id="7180611975245234373">Osvježi</translation>
diff --git a/components/browser_ui/strings/android/translations/browser_ui_strings_my.xtb b/components/browser_ui/strings/android/translations/browser_ui_strings_my.xtb index 39209a4..cfb760f 100644 --- a/components/browser_ui/strings/android/translations/browser_ui_strings_my.xtb +++ b/components/browser_ui/strings/android/translations/browser_ui_strings_my.xtb
@@ -80,6 +80,7 @@ <translation id="2404630663942400771">{PERMISSIONS_SUMMARY_ALLOWED,plural, =1{<ph name="PERMISSION_1" />၊ <ph name="PERMISSION_2" /> နှင့် နောက်ထပ် <ph name="NUM_MORE" /> ခု ခွင့်ပြုထားသည်}other{<ph name="PERMISSION_1" />၊ <ph name="PERMISSION_2" /> နှင့် နောက်ထပ် <ph name="NUM_MORE" /> ခု ခွင့်ပြုထားသည်}}</translation> <translation id="2410940059315936967">သင်ဝင်ကြည့်သောဝဘ်ဆိုက်သည် ပုံ၊ ကြော်ငြာနှင့် စာတိုတို့ကဲ့သို့ အခြားဝဘ်ဆိုက်များမှ အကြောင်းအရာကို မြှုပ်သွင်းနိုင်သည်။ ဤကဲ့သို့ အခြားဝဘ်ဆိုက်များက သတ်မှတ်သည့် ကွတ်ကီးများကို ပြင်ပကုမ္ပဏီ၏ကွတ်ကီးဟု ခေါ်သည်။</translation> <translation id="2434158240863470628">ဒေါင်းလုဒ်လုပ်ပြီးပါပြီ <ph name="SEPARATOR" /> <ph name="BYTES_DOWNLOADED" /></translation> +<translation id="2438120137003069591">သင်သည် ဤဝဘ်ဆိုက်အား ပြင်ပကုမ္ပဏီ၏ကွတ်ကီးများသုံးရန် ယာယီခွင့်ပြုထားသောကြောင့် ဘရောက်စ်လုပ်ချိန် ကာကွယ်မှုနည်းသွားသော်လည်း ဝဘ်ဆိုက်အင်္ဂါရပ်များသည် မျှော်လင့်ထားသည့်အတိုင်း အလုပ်လုပ်နိုင်ခြေ ပိုများသွားသည်။ <ph name="BEGIN_LINK" />အကြံပြုချက် ပို့ရန်<ph name="END_LINK" /></translation> <translation id="244264527810019436">‘ရုပ်ဖျက်မုဒ်’ တွင် အချို့ဝဘ်ဆိုက်များရှိ ဝန်ဆောင်မှုများ အလုပ်မလုပ်နိုင်ပါ</translation> <translation id="2442870161001914531">ဒက်စ်တော့ဝဘ်ဆိုက် အမြဲတောင်းဆိုပါ</translation> <translation id="2469312991797799607">ဤလုပ်ဆောင်ချက်သည် <ph name="ORIGIN" /> နှင့် ၎င်းအောက်ရှိ ဝဘ်ဆိုက်အားလုံးအတွက် ဒေတာနှင့် ကွတ်ကီးအားလုံးကို ဖျက်လိုက်ပါမည်</translation> @@ -208,6 +209,7 @@ <translation id="4644713492825682049">ဖျက်ပြီး ပြင်ဆင်သတ်မှတ်ရန်</translation> <translation id="4645575059429386691">သင့်မိဘမှ စီမံသည်</translation> <translation id="4670064810192446073">ပကတိအသွင်</translation> +<translation id="4673958474310291465">ပြင်ပကုမ္ပဏီ၏ကွတ်ကီးများကို ယာယီ ခွင့်ပြုကြည့်ပါ။ ကာကွယ်မှု လျော့နည်းသွားသော်လည်း ဝဘ်ဆိုက်အင်္ဂါရပ်များ မျှော်လင့်ထားသည့်အတိုင်း ပိုမိုလုပ်ဆောင်နိုင်ပါမည်</translation> <translation id="4751476147751820511">လှုပ်ရှားမှု သို့မဟုတ် အလင်းအာရုံခံကိရိယာများ</translation> <translation id="4779083564647765204">ဇူးမ်</translation> <translation id="4811450222531576619">၎င်း၏အကြောင်းအရာနှင့် ရင်းမြစ်အကြောင်းကို ပိုမိုလေ့လာနိုင်ပါသည်</translation> @@ -345,6 +347,7 @@ <translation id="7053983685419859001">ပိတ်ဆို့ရန်</translation> <translation id="7066151586745993502">{NUM_SELECTED,plural, =1{1 ခု ရွေးထားသည်}other{# ခု ရွေးထားသည်}}</translation> <translation id="7087918508125750058"><ph name="ITEM_COUNT" /> ခု ရွေးထားသည်။ မျက်နှာပြင်၏ ထိပ်နားတွင် ရွေးချယ်စရာများ ရှိသည်</translation> +<translation id="7137403271056944713">MIDI စက်ထိန်းစနစ် / ပရိုဂရမ်ပြန်လုပ်ခြင်း</translation> <translation id="7141896414559753902">ပေါ့ပ်အပ်နှင့် တစ်ဆင့်ပြန်ညွှန်ချက်များကို မဖော်ပြနိုင်စေရန် ဝဘ်ဆိုက်များအား ပိတ်ပါ (အကြံပြုထားသည်)</translation> <translation id="7176368934862295254"><ph name="KILOBYTES" /> KB</translation> <translation id="7180611975245234373">ပြန်လည်စတင်ရန်</translation>
diff --git a/components/browser_ui/widget/android/BUILD.gn b/components/browser_ui/widget/android/BUILD.gn index 91b89bf..e272488 100644 --- a/components/browser_ui/widget/android/BUILD.gn +++ b/components/browser_ui/widget/android/BUILD.gn
@@ -87,13 +87,6 @@ "java/src/org/chromium/components/browser_ui/widget/image_tiles/TileViewHolderFactory.java", "java/src/org/chromium/components/browser_ui/widget/impression/ImpressionTracker.java", "java/src/org/chromium/components/browser_ui/widget/impression/OneShotImpressionListener.java", - "java/src/org/chromium/components/browser_ui/widget/listmenu/BasicListMenu.java", - "java/src/org/chromium/components/browser_ui/widget/listmenu/ListMenu.java", - "java/src/org/chromium/components/browser_ui/widget/listmenu/ListMenuButton.java", - "java/src/org/chromium/components/browser_ui/widget/listmenu/ListMenuButtonDelegate.java", - "java/src/org/chromium/components/browser_ui/widget/listmenu/ListMenuItemAdapter.java", - "java/src/org/chromium/components/browser_ui/widget/listmenu/ListMenuItemProperties.java", - "java/src/org/chromium/components/browser_ui/widget/listmenu/ListMenuItemViewBinder.java", "java/src/org/chromium/components/browser_ui/widget/promo/PromoCardCoordinator.java", "java/src/org/chromium/components/browser_ui/widget/promo/PromoCardProperties.java", "java/src/org/chromium/components/browser_ui/widget/promo/PromoCardView.java", @@ -243,7 +236,6 @@ "java/res/layout/empty_state_view.xml", "java/res/layout/expand_arrow_with_separator.xml", "java/res/layout/indeterminate_progress_view.xml", - "java/res/layout/list_menu_item.xml", "java/res/layout/modern_list_item_view.xml", "java/res/layout/more_progress_button.xml", "java/res/layout/number_roll_view.xml", @@ -325,8 +317,7 @@ "java/src/org/chromium/components/browser_ui/widget/WrappingLayoutTest.java", "java/src/org/chromium/components/browser_ui/widget/dragreorder/DragReorderableRecyclerViewAdapterTest.java", "java/src/org/chromium/components/browser_ui/widget/highlight/ViewHighlighterTest.java", - "java/src/org/chromium/components/browser_ui/widget/listmenu/ListMenuButtonTest.java", - "java/src/org/chromium/components/browser_ui/widget/listmenu/ListMenuRenderTest.java", + "java/src/org/chromium/components/browser_ui/widget/listmenu/BrowserUiListMenuRenderTest.java", "java/src/org/chromium/components/browser_ui/widget/promo/PromoCardImpressionTest.java", "java/src/org/chromium/components/browser_ui/widget/promo/PromoCardViewRenderTest.java", "java/src/org/chromium/components/browser_ui/widget/scrim/ScrimTest.java",
diff --git a/components/browser_ui/widget/android/java/res/values/attrs.xml b/components/browser_ui/widget/android/java/res/values/attrs.xml index 4546793..3d9a83e 100644 --- a/components/browser_ui/widget/android/java/res/values/attrs.xml +++ b/components/browser_ui/widget/android/java/res/values/attrs.xml
@@ -25,16 +25,6 @@ <attr name="dualControlLayoutHorizontalPadding" format="dimension"/> </declare-styleable> - <declare-styleable name="ListMenuButton"> - <attr name="menuMaxWidth" format="reference|dimension" /> - <attr name="menuVerticalOverlapAnchor" format="boolean" /> - <attr name="menuHorizontalOverlapAnchor" format="boolean" /> - <!-- Used to specify if a menu button is positioned at the start or at - the end of a layout so the correct menu popup anim file can be applied. - The default is set to true --> - <attr name="menuPositionedAtEnd" format="boolean" /> - </declare-styleable> - <declare-styleable name="AsyncImageView"> <attr name="unavailableSrc" format="reference" /> <attr name="waitingSrc" format="reference" />
diff --git a/components/browser_ui/widget/android/java/res/values/dimens.xml b/components/browser_ui/widget/android/java/res/values/dimens.xml index 89ab1d3c..7eee70a 100644 --- a/components/browser_ui/widget/android/java/res/values/dimens.xml +++ b/components/browser_ui/widget/android/java/res/values/dimens.xml
@@ -41,13 +41,6 @@ <dimen name="radio_button_with_description_and_aux_button_aux_button_length" tools:ignore="UnusedResources">61dp</dimen> - <!-- List menu item dimensions --> - <dimen name="list_menu_width">180dp</dimen> - <dimen name="list_menu_item_icon_size">24dp</dimen> - - <!-- Custom Menu dimensions --> - <dimen name="menu_padding_start">16dp</dimen> - <!-- Drag-Reorderable List dimensions --> <dimen name="list_item_dragged_elevation">6dp</dimen> @@ -109,9 +102,6 @@ <dimen name="text_bubble_with_snooze_padding_horizontal">24dp</dimen> <dimen name="text_bubble_with_snooze_padding_end">4dp</dimen> - <!-- Default list dimensions --> - <dimen name="default_list_row_padding">16dp</dimen> - <!-- Swipe gesture listener dimensions --> <dimen name="swipe_vertical_drag_threshold">5dp</dimen> <dimen name="swipe_horizontal_drag_threshold">10dp</dimen>
diff --git a/components/browser_ui/widget/android/java/res/values/styles.xml b/components/browser_ui/widget/android/java/res/values/styles.xml index c081752..0218452 100644 --- a/components/browser_ui/widget/android/java/res/values/styles.xml +++ b/components/browser_ui/widget/android/java/res/values/styles.xml
@@ -51,25 +51,6 @@ <item name="android:textSize">16sp</item> </style> - <!-- ListMenuButton --> - <style name="ListMenuItemStyle"> - <item name="android:paddingStart">@dimen/default_list_row_padding</item> - <item name="android:paddingEnd">@dimen/default_list_row_padding</item> - </style> - <style name="ListMenuItemIconStyle"> - <item name="android:layout_width">@dimen/list_menu_item_icon_size</item> - <item name="android:layout_height">@dimen/list_menu_item_icon_size</item> - </style> - <style name="ListMenuItemIconStyle.Start"> - <item name="android:layout_marginStart">0dp</item> - <item name="android:layout_marginEnd">@dimen/menu_padding_start</item> - </style> - - <style name="EndIconMenuAnim" parent="AnchoredPopupAnimEndTop" /> - <style name="EndIconMenuAnimBottom" parent="AnchoredPopupAnimEndBottom" /> - <style name="StartIconMenuAnim" parent="AnchoredPopupAnimStartTop" /> - <style name="StartIconMenuAnimBottom" parent="AnchoredPopupAnimStartBottom" /> - <!-- Modern List Item --> <style name="ListItemContainer"> <item name="android:layout_width">match_parent</item>
diff --git a/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/BrowserUiListMenuUtils.java b/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/BrowserUiListMenuUtils.java index 65410f8d..2f0383a 100644 --- a/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/BrowserUiListMenuUtils.java +++ b/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/BrowserUiListMenuUtils.java
@@ -17,10 +17,10 @@ import androidx.annotation.StringRes; import androidx.annotation.StyleRes; -import org.chromium.components.browser_ui.widget.listmenu.BasicListMenu; -import org.chromium.components.browser_ui.widget.listmenu.BasicListMenu.ListMenuItemType; -import org.chromium.components.browser_ui.widget.listmenu.ListMenu; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuItemProperties; +import org.chromium.ui.listmenu.BasicListMenu; +import org.chromium.ui.listmenu.BasicListMenu.ListMenuItemType; +import org.chromium.ui.listmenu.ListMenu; +import org.chromium.ui.listmenu.ListMenuItemProperties; import org.chromium.ui.modelutil.MVCListAdapter; import org.chromium.ui.modelutil.MVCListAdapter.ListItem; import org.chromium.ui.modelutil.PropertyModel; @@ -164,8 +164,7 @@ if (contentDescription != null) { builder.with(ListMenuItemProperties.CONTENT_DESCRIPTION, contentDescription); } - return new MVCListAdapter.ListItem( - BasicListMenu.ListMenuItemType.MENU_ITEM, builder.build()); + return new MVCListAdapter.ListItem(ListMenuItemType.MENU_ITEM, builder.build()); } /**
diff --git a/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/BrowserUiWidgetUtils.java b/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/BrowserUiWidgetUtils.java new file mode 100644 index 0000000..60395c9 --- /dev/null +++ b/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/BrowserUiWidgetUtils.java
@@ -0,0 +1,48 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package org.chromium.components.browser_ui.widget; + +import android.content.Context; +import android.view.LayoutInflater; +import android.view.View; +import android.widget.ListView; + +import androidx.annotation.ColorRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + +import org.chromium.ui.listmenu.BasicListMenu; +import org.chromium.ui.listmenu.ListMenu; +import org.chromium.ui.modelutil.MVCListAdapter; + +/** Collection of utility methods related to the browser UI widgets. */ +public class BrowserUiWidgetUtils { + + /** + * Convenience method for constructing a {@link BasicListMenu} with the preferred content view. + */ + @NonNull + public static BasicListMenu getBasicListMenu( + @NonNull Context context, + @NonNull MVCListAdapter.ModelList data, + @Nullable ListMenu.Delegate delegate) { + return getBasicListMenu(context, data, delegate, 0); + } + + /** + * Convenience method for constructing a {@link BasicListMenu} with the preferred content view. + */ + @NonNull + public static BasicListMenu getBasicListMenu( + @NonNull Context context, + @NonNull MVCListAdapter.ModelList data, + @Nullable ListMenu.Delegate delegate, + @ColorRes int backgroundTintColor) { + View contentView = LayoutInflater.from(context).inflate(R.layout.app_menu_layout, null); + ListView listView = contentView.findViewById(R.id.app_menu_list); + return new BasicListMenu( + context, data, contentView, listView, delegate, backgroundTintColor); + } +}
diff --git a/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/listmenu/ListMenuRenderTest.java b/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/listmenu/BrowserUiListMenuRenderTest.java similarity index 95% rename from components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/listmenu/ListMenuRenderTest.java rename to components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/listmenu/BrowserUiListMenuRenderTest.java index 2ae4eda..809127c 100644 --- a/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/listmenu/ListMenuRenderTest.java +++ b/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/listmenu/BrowserUiListMenuRenderTest.java
@@ -17,6 +17,7 @@ import org.junit.Test; import org.junit.runner.RunWith; +import org.chromium.components.browser_ui.widget.test.R; import org.chromium.base.test.params.BaseJUnit4RunnerDelegate; import org.chromium.base.test.params.ParameterAnnotations; import org.chromium.base.test.params.ParameterAnnotations.UseRunnerDelegate; @@ -25,8 +26,9 @@ import org.chromium.base.test.util.Batch; import org.chromium.base.test.util.Feature; import org.chromium.components.browser_ui.widget.BrowserUiListMenuUtils; -import org.chromium.components.browser_ui.widget.test.R; import org.chromium.content_public.browser.test.util.TestThreadUtils; +import org.chromium.ui.listmenu.BasicListMenu; +import org.chromium.ui.listmenu.ListMenu; import org.chromium.ui.modelutil.MVCListAdapter.ModelList; import org.chromium.ui.test.util.BlankUiTestActivityTestCase; import org.chromium.ui.test.util.NightModeTestUtils; @@ -39,7 +41,7 @@ @RunWith(ParameterizedRunner.class) @UseRunnerDelegate(BaseJUnit4RunnerDelegate.class) @Batch(Batch.UNIT_TESTS) -public class ListMenuRenderTest extends BlankUiTestActivityTestCase { +public class BrowserUiListMenuRenderTest extends BlankUiTestActivityTestCase { @ParameterAnnotations.ClassParameter private static List<ParameterSet> sClassParams = new NightModeTestUtils.NightModeParams().getParameters(); @@ -52,7 +54,7 @@ private View mView; - public ListMenuRenderTest(boolean nightModeEnabled) { + public BrowserUiListMenuRenderTest(boolean nightModeEnabled) { NightModeTestUtils.setUpNightModeForBlankUiTestActivity(nightModeEnabled); mRenderTestRule.setNightModeEnabled(nightModeEnabled); }
diff --git a/components/constrained_window/constrained_window_views.cc b/components/constrained_window/constrained_window_views.cc index 819da6b0..9e074123 100644 --- a/components/constrained_window/constrained_window_views.cc +++ b/components/constrained_window/constrained_window_views.cc
@@ -123,31 +123,36 @@ position.set_y(position.y() - widget->non_client_view()->frame_view()->GetInsets().top()); - const bool supports_global_screen_coordinates = -#if !BUILDFLAG(IS_OZONE) - true; -#else - ui::OzonePlatform::GetInstance() - ->GetPlatformProperties() - .supports_global_screen_coordinates; -#endif + gfx::Rect dialog_bounds(position, size); - if (widget->is_top_level() && supports_global_screen_coordinates) { - position += host_widget->GetClientAreaBoundsInScreen().OffsetFromOrigin(); - // If the dialog extends partially off any display, clamp its position to - // be fully visible within that display. If the dialog doesn't intersect - // with any display clamp its position to be fully on the nearest display. - gfx::Rect display_rect = gfx::Rect(position, size); - const display::Display display = - display::Screen::GetScreen()->GetDisplayNearestView( - dialog_host->GetHostView()); - const gfx::Rect work_area = display.work_area(); - if (!work_area.Contains(display_rect)) - display_rect.AdjustToFit(work_area); - position = display_rect.origin(); + if (widget->is_top_level() && SupportsGlobalScreenCoordinates()) { + const gfx::Rect initial_dialog_bounds = + dialog_bounds + + host_widget->GetClientAreaBoundsInScreen().OffsetFromOrigin(); + const gfx::Rect initial_host_bounds = + host_widget->GetWindowBoundsInScreen(); + + // TODO(crbug.com/1341530): The requested dialog bounds should never fall + // outside the bounds of the transient parent. + DCHECK(initial_dialog_bounds.Intersects(initial_host_bounds)); + + // We should not show a window-modal dialog for a window that exists outside + // the bounds of the screen. This risks the modal window becoming + // effectively deadlocked as controls to dismiss the dialog may become + // inaccessible. + // It is also insufficient to reposition only the dialog but not the host + // window as many systems will clip child dialogs to their transient + // parents. Further, if the window-constrained dialog is visually + // disassociated with its parent window it may be difficult to discern which + // window the dialog is modal to. + host_widget->SetBoundsConstrained(initial_host_bounds); + const gfx::Rect adjusted_host_bounds = + host_widget->GetClientAreaBoundsInScreen(); + dialog_bounds += adjusted_host_bounds.OffsetFromOrigin(); + dialog_bounds.AdjustToFit(adjusted_host_bounds); } - widget->SetBounds(gfx::Rect(position, size)); + widget->SetBounds(dialog_bounds); } } // namespace @@ -290,4 +295,14 @@ web_contents); } +bool SupportsGlobalScreenCoordinates() { +#if !BUILDFLAG(IS_OZONE) + return true; +#else + return ui::OzonePlatform::GetInstance() + ->GetPlatformProperties() + .supports_global_screen_coordinates; +#endif +} + } // namespace constrained_window
diff --git a/components/constrained_window/constrained_window_views.h b/components/constrained_window/constrained_window_views.h index 5810ddc..a274a5e 100644 --- a/components/constrained_window/constrained_window_views.h +++ b/components/constrained_window/constrained_window_views.h
@@ -99,6 +99,10 @@ views::Widget* ShowWebModal(std::unique_ptr<ui::DialogModel> dialog_model, content::WebContents* web_contents); +// True if the platform supports global screen coordinates. This is typically +// supported by most platforms except linux-wayland. +bool SupportsGlobalScreenCoordinates(); + } // namespace constrained_window #endif // COMPONENTS_CONSTRAINED_WINDOW_CONSTRAINED_WINDOW_VIEWS_H_
diff --git a/components/constrained_window/constrained_window_views_unittest.cc b/components/constrained_window/constrained_window_views_unittest.cc index a403132..f606b71 100644 --- a/components/constrained_window/constrained_window_views_unittest.cc +++ b/components/constrained_window/constrained_window_views_unittest.cc
@@ -135,6 +135,7 @@ web_modal::TestWebContentsModalDialogHost* dialog_host() { return dialog_host_.get(); } + Widget* dialog_host_widget() { return dialog_host_widget_.get(); } Widget* dialog() { return dialog_; } private: @@ -232,11 +233,17 @@ widget->CloseNow(); } -// Make sure dialogs presented off-screen are properly clamped to the nearest -// screen. -TEST_F(ConstrainedWindowViewsTest, ClampDialogToNearestDisplay) { - // Make sure the dialog will fit fully on the display +// Make sure windows with modal dialogs that are positioned off-screen are +// properly clamped to the nearest screen. +TEST_F(ConstrainedWindowViewsTest, ClampDialogHostWindowToNearestDisplay) { + views::Widget* host_widget = dialog_host_widget(); + const gfx::Rect original_host_bounds = host_widget->GetWindowBoundsInScreen(); + + // Make sure the dialog will fit fully within the bounds of the window. + constexpr gfx::Size kPreferredDialogSize = gfx::Size(200, 100); contents()->SetPreferredSize(gfx::Size(200, 100)); + EXPECT_LE(kPreferredDialogSize.width(), original_host_bounds.width()); + EXPECT_LE(kPreferredDialogSize.height(), original_host_bounds.height()); // First, make sure the host and dialog are sized and positioned. UpdateWebContentsModalDialogPosition(dialog(), dialog_host()); @@ -248,22 +255,32 @@ const gfx::Rect extents = display.work_area(); // Move the host completely off the screen. - views::Widget* host_widget = - views::Widget::GetWidgetForNativeView(dialog_host()->GetHostView()); - gfx::Rect host_bounds = host_widget->GetWindowBoundsInScreen(); - host_bounds.set_origin(gfx::Point(extents.right(), extents.bottom())); - host_widget->SetBounds(host_bounds); + gfx::Rect offscreen_host_bounds = host_widget->GetWindowBoundsInScreen(); + offscreen_host_bounds.set_origin( + gfx::Point(extents.right(), extents.bottom())); + host_widget->SetBounds(offscreen_host_bounds); // Make sure the host is fully off the screen. EXPECT_FALSE(extents.Intersects(host_widget->GetWindowBoundsInScreen())); - // Now reposition the modal dialog into the display. + // Update the dialog's position. The dialog and its host should be + // repositioned into the work area of the host display. UpdateWebContentsModalDialogPosition(dialog(), dialog_host()); - + gfx::Rect repositioned_host_bounds = host_widget->GetWindowBoundsInScreen(); const gfx::Rect dialog_bounds = dialog()->GetRootView()->GetBoundsInScreen(); - // The dialog should now be fully on the display. - EXPECT_TRUE(extents.Contains(dialog_bounds)); + if (SupportsGlobalScreenCoordinates()) { + // The host window should be completely within the work area of the display. + EXPECT_TRUE(extents.Contains(repositioned_host_bounds)); + + // The dialog should be completely within the host's client area. + EXPECT_TRUE(repositioned_host_bounds.Contains(dialog_bounds)); + } else { + // The dialog with bounds set using relative positioning should fit within + // the bounds of the host. + repositioned_host_bounds.set_origin({0, 0}); + EXPECT_TRUE(repositioned_host_bounds.Contains(dialog_bounds)); + } } } // namespace constrained_window
diff --git a/components/content_settings/core/browser/content_settings_registry.cc b/components/content_settings/core/browser/content_settings_registry.cc index 8021bd8..1349c49 100644 --- a/components/content_settings/core/browser/content_settings_registry.cc +++ b/components/content_settings/core/browser/content_settings_registry.cc
@@ -423,6 +423,16 @@ ContentSettingsInfo::INHERIT_IF_LESS_PERMISSIVE, ContentSettingsInfo::EXCEPTIONS_ON_SECURE_ORIGINS_ONLY); + Register(ContentSettingsType::FILE_SYSTEM_ACCESS_RESTORE_PERMISSION, + "file-system-access-restore-permission", CONTENT_SETTING_ASK, + WebsiteSettingsInfo::UNSYNCABLE, /*allowlisted_schemes=*/{}, + /*valid_settings=*/ + {CONTENT_SETTING_ASK, CONTENT_SETTING_BLOCK}, + WebsiteSettingsInfo::TOP_ORIGIN_ONLY_SCOPE, + WebsiteSettingsRegistry::DESKTOP, + ContentSettingsInfo::INHERIT_IF_LESS_PERMISSIVE, + ContentSettingsInfo::EXCEPTIONS_ON_SECURE_ORIGINS_ONLY); + Register(ContentSettingsType::FILE_SYSTEM_WRITE_GUARD, "file-system-write-guard", CONTENT_SETTING_ASK, WebsiteSettingsInfo::UNSYNCABLE, /*allowlisted_schemes=*/{},
diff --git a/components/content_settings/core/browser/content_settings_uma_util.cc b/components/content_settings/core/browser/content_settings_uma_util.cc index a625c71..5b96bb7f 100644 --- a/components/content_settings/core/browser/content_settings_uma_util.cc +++ b/components/content_settings/core/browser/content_settings_uma_util.cc
@@ -121,6 +121,7 @@ {ContentSettingsType::TPCD_METADATA_GRANTS, 107}, {ContentSettingsType::FILE_SYSTEM_ACCESS_EXTENDED_PERMISSION, 108}, {ContentSettingsType::TPCD_HEURISTICS_GRANTS, 109}, + {ContentSettingsType::FILE_SYSTEM_ACCESS_RESTORE_PERMISSION, 110}, // As mentioned at the top, please don't forget to update ContentType in // enums.xml when you add entries here!
diff --git a/components/content_settings/core/common/content_settings_types.h b/components/content_settings/core/common/content_settings_types.h index 0a38dcd..8f9c863 100644 --- a/components/content_settings/core/common/content_settings_types.h +++ b/components/content_settings/core/common/content_settings_types.h
@@ -369,6 +369,10 @@ // heuristics. TPCD_HEURISTICS_GRANTS, + // Whether the FSA Persistent Permissions restore prompt is eligible to be + // shown to the user, for a given origin. + FILE_SYSTEM_ACCESS_RESTORE_PERMISSION, + NUM_TYPES, };
diff --git a/components/cronet/android/java/src/org/chromium/net/impl/AndroidHttpEngineWrapper.java b/components/cronet/android/java/src/org/chromium/net/impl/AndroidHttpEngineWrapper.java index 5bde0abf..e4a1ff2 100644 --- a/components/cronet/android/java/src/org/chromium/net/impl/AndroidHttpEngineWrapper.java +++ b/components/cronet/android/java/src/org/chromium/net/impl/AndroidHttpEngineWrapper.java
@@ -11,6 +11,7 @@ import org.chromium.net.ExperimentalCronetEngine; import java.io.IOException; +import java.net.Proxy; import java.net.URL; import java.net.URLConnection; import java.net.URLStreamHandlerFactory; @@ -57,6 +58,20 @@ } @Override + public URLConnection openConnection(URL url, Proxy proxy) throws IOException { + // HttpEngine doesn't expose an openConnection(URL, Proxy) method. To maintain compatibility + // copy-paste CronetUrlRequestContext's logic here. + if (proxy.type() != Proxy.Type.DIRECT) { + throw new UnsupportedOperationException(); + } + String protocol = url.getProtocol(); + if ("http".equals(protocol) || "https".equals(protocol)) { + return openConnection(url); + } + throw new UnsupportedOperationException("Unexpected protocol:" + protocol); + } + + @Override public URLStreamHandlerFactory createURLStreamHandlerFactory() { return mBackend.createUrlStreamHandlerFactory(); }
diff --git a/components/cronet/android/test/javatests/src/org/chromium/net/urlconnection/CronetHttpURLStreamHandlerTest.java b/components/cronet/android/test/javatests/src/org/chromium/net/urlconnection/CronetHttpURLStreamHandlerTest.java index d0ff41d..53315e5b 100644 --- a/components/cronet/android/test/javatests/src/org/chromium/net/urlconnection/CronetHttpURLStreamHandlerTest.java +++ b/components/cronet/android/test/javatests/src/org/chromium/net/urlconnection/CronetHttpURLStreamHandlerTest.java
@@ -93,9 +93,6 @@ @Test @SmallTest - @IgnoreFor( - implementations = {CronetImplementation.AOSP_PLATFORM}, - reason = "crbug.com/1494845: Proxy config gets lost during translation") public void testOpenConnectionWithProxy() throws Exception { URL url = new URL(NativeTestServer.getEchoMethodURL()); CronetHttpURLStreamHandler streamHandler =
diff --git a/components/custom_handlers/protocol_handler_registry_unittest.cc b/components/custom_handlers/protocol_handler_registry_unittest.cc index 4e86ee4..84fd3abf 100644 --- a/components/custom_handlers/protocol_handler_registry_unittest.cc +++ b/components/custom_handlers/protocol_handler_registry_unittest.cc
@@ -1169,37 +1169,57 @@ namespace { -enum class FtpTestMode { - kFtpNotSafeListed, - kFtpSafeListed, +enum class ProtocolTestMode { + kFtpOffPaytoOn, + kFtpOnPaytoOff, + kFtpOnPaytoOn, + kFtpOffPaytoOff, }; } // namespace class ProtocolHandlerRegistrySchemeTest : public ProtocolHandlerRegistryTest, - public ::testing::WithParamInterface<FtpTestMode> { + public ::testing::WithParamInterface<ProtocolTestMode> { public: ~ProtocolHandlerRegistrySchemeTest() override = default; private: void SetUp() override { ProtocolHandlerRegistryTest::SetUp(); - if (GetParam() == FtpTestMode::kFtpSafeListed) { - scoped_feature_list_.InitAndEnableFeature( - blink::features::kSafelistFTPToRegisterProtocolHandler); - } else { - scoped_feature_list_.InitAndDisableFeature( - blink::features::kSafelistFTPToRegisterProtocolHandler); + switch (GetParam()) { + case ProtocolTestMode::kFtpOffPaytoOn: + scoped_feature_list_.InitWithFeatures( + {blink::features::kSafelistPaytoToRegisterProtocolHandler}, + {blink::features::kSafelistFTPToRegisterProtocolHandler}); + break; + case ProtocolTestMode::kFtpOnPaytoOff: + scoped_feature_list_.InitWithFeatures( + {blink::features::kSafelistFTPToRegisterProtocolHandler}, + {blink::features::kSafelistPaytoToRegisterProtocolHandler}); + break; + case ProtocolTestMode::kFtpOnPaytoOn: + scoped_feature_list_.InitWithFeatures( + {blink::features::kSafelistFTPToRegisterProtocolHandler, + blink::features::kSafelistPaytoToRegisterProtocolHandler}, {}); + break; + case ProtocolTestMode::kFtpOffPaytoOff: + default: + scoped_feature_list_.InitWithFeatures({}, + {blink::features::kSafelistFTPToRegisterProtocolHandler, + blink::features::kSafelistPaytoToRegisterProtocolHandler}); + break; } } + base::test::ScopedFeatureList scoped_feature_list_; }; INSTANTIATE_TEST_SUITE_P(All, ProtocolHandlerRegistrySchemeTest, - testing::Values(FtpTestMode::kFtpNotSafeListed, - FtpTestMode::kFtpSafeListed)); - + testing::Values(ProtocolTestMode::kFtpOffPaytoOn, + ProtocolTestMode::kFtpOnPaytoOff, + ProtocolTestMode::kFtpOnPaytoOn, + ProtocolTestMode::kFtpOffPaytoOff)); // See // https://html.spec.whatwg.org/multipage/system-state.html#safelisted-scheme TEST_P(ProtocolHandlerRegistrySchemeTest, SafelistedSchemes) { @@ -1210,6 +1230,7 @@ "nntp", "openpgp4fpr", "sip", "sms", "smsto", "ssb", "ssh", "tel", "urn", "webcal", "wtai", "xmpp"}; const std::string kFtpSchemes[] = {"ftp", "ftps", "sftp"}; + const std::string kPaytoScheme = "payto"; for (auto& scheme : kSchemes) { registry()->OnAcceptRegisterProtocolHandler( CreateProtocolHandler(scheme, GURL("https://example.com/url=%s"))); @@ -1218,12 +1239,21 @@ for (auto& scheme : kFtpSchemes) { registry()->OnAcceptRegisterProtocolHandler( CreateProtocolHandler(scheme, GURL("https://example.com/url=%s"))); - if (GetParam() == FtpTestMode::kFtpSafeListed) { + if (GetParam() == ProtocolTestMode::kFtpOnPaytoOff || + GetParam() == ProtocolTestMode::kFtpOnPaytoOn) { ASSERT_TRUE(registry()->IsHandledProtocol(scheme)); } else { ASSERT_FALSE(registry()->IsHandledProtocol(scheme)); } } + registry()->OnAcceptRegisterProtocolHandler( + CreateProtocolHandler(kPaytoScheme, GURL("https://example.com/url=%s"))); + if (GetParam() == ProtocolTestMode::kFtpOffPaytoOn || + GetParam() == ProtocolTestMode::kFtpOnPaytoOn) { + ASSERT_TRUE(registry()->IsHandledProtocol(kPaytoScheme)); + } else { + ASSERT_FALSE(registry()->IsHandledProtocol(kPaytoScheme)); + } } namespace {
diff --git a/components/external_intents/android/java/src/org/chromium/components/external_intents/ExternalNavigationHandler.java b/components/external_intents/android/java/src/org/chromium/components/external_intents/ExternalNavigationHandler.java index b4de59a..dfe542a1 100644 --- a/components/external_intents/android/java/src/org/chromium/components/external_intents/ExternalNavigationHandler.java +++ b/components/external_intents/android/java/src/org/chromium/components/external_intents/ExternalNavigationHandler.java
@@ -845,8 +845,6 @@ @MimeTypeUtils.Type int mimeType = MimeTypeUtils.getMimeTypeForUrl(params.getUrl()); - RecordHistogram.recordEnumeratedHistogram( - "Android.Intent.OpenFileType", mimeType, MimeTypeUtils.NUM_MIME_TYPE_ENTRIES); String permissionNeeded = MimeTypeUtils.getPermissionNameForMimeType(mimeType); if (permissionNeeded == null) return false;
diff --git a/components/feed/core/v2/api_test/feed_api_supervised_feed_unittest.cc b/components/feed/core/v2/api_test/feed_api_supervised_feed_unittest.cc index a0fa2849..5ff6355 100644 --- a/components/feed/core/v2/api_test/feed_api_supervised_feed_unittest.cc +++ b/components/feed/core/v2/api_test/feed_api_supervised_feed_unittest.cc
@@ -23,10 +23,7 @@ class FeedApiSupervisedUserTest : public FeedApiTest { public: void SetUp() override { - supervised_user::SupervisedUserService::RegisterProfilePrefs( - profile_prefs_.registry()); - supervised_user::ChildAccountService::RegisterProfilePrefs( - profile_prefs_.registry()); + supervised_user::RegisterProfilePrefs(profile_prefs_.registry()); supervised_user::EnableParentalControls(profile_prefs_); feature_list_.InitAndEnableFeature(
diff --git a/components/messages/android/internal/java/res/layout/message_banner_view.xml b/components/messages/android/internal/java/res/layout/message_banner_view.xml index 3b5f818..8a5619f 100644 --- a/components/messages/android/internal/java/res/layout/message_banner_view.xml +++ b/components/messages/android/internal/java/res/layout/message_banner_view.xml
@@ -66,7 +66,7 @@ </LinearLayout> <!-- Content description is set programmatically according to secondary button icon. --> - <org.chromium.components.browser_ui.widget.listmenu.ListMenuButton + <org.chromium.ui.listmenu.ListMenuButton android:id="@+id/message_secondary_button" app:tint="@macro/default_icon_color_secondary" app:menuVerticalOverlapAnchor="false"
diff --git a/components/messages/android/internal/java/src/org/chromium/components/messages/MessageBannerCoordinator.java b/components/messages/android/internal/java/src/org/chromium/components/messages/MessageBannerCoordinator.java index 2da53fa..5581e7d3 100644 --- a/components/messages/android/internal/java/src/org/chromium/components/messages/MessageBannerCoordinator.java +++ b/components/messages/android/internal/java/src/org/chromium/components/messages/MessageBannerCoordinator.java
@@ -13,8 +13,8 @@ import org.chromium.base.supplier.Supplier; import org.chromium.build.annotations.MockedInTests; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButton.PopupMenuShownListener; import org.chromium.components.messages.MessageStateHandler.Position; +import org.chromium.ui.listmenu.ListMenuButton.PopupMenuShownListener; import org.chromium.ui.modelutil.PropertyModel; import org.chromium.ui.modelutil.PropertyModelChangeProcessor;
diff --git a/components/messages/android/internal/java/src/org/chromium/components/messages/MessageBannerCoordinatorUnitTest.java b/components/messages/android/internal/java/src/org/chromium/components/messages/MessageBannerCoordinatorUnitTest.java index ff39e7d..55f1328d 100644 --- a/components/messages/android/internal/java/src/org/chromium/components/messages/MessageBannerCoordinatorUnitTest.java +++ b/components/messages/android/internal/java/src/org/chromium/components/messages/MessageBannerCoordinatorUnitTest.java
@@ -9,7 +9,7 @@ import org.mockito.Mockito; import org.chromium.base.test.BaseRobolectricTestRunner; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButton.PopupMenuShownListener; +import org.chromium.ui.listmenu.ListMenuButton.PopupMenuShownListener; /** Unit tests for MessageBannerCoordinator. */ @RunWith(BaseRobolectricTestRunner.class)
diff --git a/components/messages/android/internal/java/src/org/chromium/components/messages/MessageBannerView.java b/components/messages/android/internal/java/src/org/chromium/components/messages/MessageBannerView.java index b057e27..795c3a2 100644 --- a/components/messages/android/internal/java/src/org/chromium/components/messages/MessageBannerView.java +++ b/components/messages/android/internal/java/src/org/chromium/components/messages/MessageBannerView.java
@@ -32,13 +32,13 @@ import org.chromium.components.browser_ui.widget.BrowserUiListMenuUtils; import org.chromium.components.browser_ui.widget.gesture.SwipeGestureListener; import org.chromium.components.browser_ui.widget.gesture.SwipeGestureListener.SwipeHandler; -import org.chromium.components.browser_ui.widget.listmenu.BasicListMenu; -import org.chromium.components.browser_ui.widget.listmenu.ListMenu; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButton; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButton.PopupMenuShownListener; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButtonDelegate; import org.chromium.components.browser_ui.widget.text.TextViewWithCompoundDrawables; import org.chromium.ui.base.ViewUtils; +import org.chromium.ui.listmenu.BasicListMenu; +import org.chromium.ui.listmenu.ListMenu; +import org.chromium.ui.listmenu.ListMenuButton; +import org.chromium.ui.listmenu.ListMenuButton.PopupMenuShownListener; +import org.chromium.ui.listmenu.ListMenuButtonDelegate; import org.chromium.ui.modelutil.MVCListAdapter; import org.chromium.ui.modelutil.PropertyModel;
diff --git a/components/messages/android/internal/java/src/org/chromium/components/messages/MessageBannerViewTest.java b/components/messages/android/internal/java/src/org/chromium/components/messages/MessageBannerViewTest.java index ec440755..2a46ac8 100644 --- a/components/messages/android/internal/java/src/org/chromium/components/messages/MessageBannerViewTest.java +++ b/components/messages/android/internal/java/src/org/chromium/components/messages/MessageBannerViewTest.java
@@ -37,12 +37,12 @@ import org.chromium.base.test.BaseJUnit4ClassRunner; import org.chromium.base.test.util.Batch; import org.chromium.components.browser_ui.widget.BrowserUiListMenuUtils; -import org.chromium.components.browser_ui.widget.listmenu.BasicListMenu; -import org.chromium.components.browser_ui.widget.listmenu.ListMenu; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButton; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButton.PopupMenuShownListener; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButtonDelegate; import org.chromium.content_public.browser.test.util.TestThreadUtils; +import org.chromium.ui.listmenu.BasicListMenu; +import org.chromium.ui.listmenu.ListMenu; +import org.chromium.ui.listmenu.ListMenuButton; +import org.chromium.ui.listmenu.ListMenuButton.PopupMenuShownListener; +import org.chromium.ui.listmenu.ListMenuButtonDelegate; import org.chromium.ui.modelutil.MVCListAdapter; import org.chromium.ui.modelutil.PropertyModel; import org.chromium.ui.modelutil.PropertyModelChangeProcessor;
diff --git a/components/messages/android/java/src/org/chromium/components/messages/MessageBannerProperties.java b/components/messages/android/java/src/org/chromium/components/messages/MessageBannerProperties.java index b0f4b91..d23fef3b 100644 --- a/components/messages/android/java/src/org/chromium/components/messages/MessageBannerProperties.java +++ b/components/messages/android/java/src/org/chromium/components/messages/MessageBannerProperties.java
@@ -12,7 +12,7 @@ import org.chromium.base.Callback; import org.chromium.base.supplier.Supplier; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButtonDelegate; +import org.chromium.ui.listmenu.ListMenuButtonDelegate; import org.chromium.ui.modelutil.PropertyKey; import org.chromium.ui.modelutil.PropertyModel.ReadableIntPropertyKey; import org.chromium.ui.modelutil.PropertyModel.WritableBooleanPropertyKey;
diff --git a/components/messages/android/java/src/org/chromium/components/messages/MessageSecondaryMenuItems.java b/components/messages/android/java/src/org/chromium/components/messages/MessageSecondaryMenuItems.java index 3a2aa5a..528f41a8 100644 --- a/components/messages/android/java/src/org/chromium/components/messages/MessageSecondaryMenuItems.java +++ b/components/messages/android/java/src/org/chromium/components/messages/MessageSecondaryMenuItems.java
@@ -9,8 +9,8 @@ import androidx.annotation.VisibleForTesting; import org.chromium.components.browser_ui.widget.BrowserUiListMenuUtils; -import org.chromium.components.browser_ui.widget.listmenu.BasicListMenu.ListMenuItemType; -import org.chromium.components.browser_ui.widget.listmenu.ListMenu; +import org.chromium.ui.listmenu.BasicListMenu.ListMenuItemType; +import org.chromium.ui.listmenu.ListMenu; import org.chromium.ui.modelutil.MVCListAdapter.ListItem; import org.chromium.ui.modelutil.MVCListAdapter.ModelList; import org.chromium.ui.modelutil.PropertyModel;
diff --git a/components/messages/android/java/src/org/chromium/components/messages/MessageWrapper.java b/components/messages/android/java/src/org/chromium/components/messages/MessageWrapper.java index ddb2ce2..0e99c4f 100644 --- a/components/messages/android/java/src/org/chromium/components/messages/MessageWrapper.java +++ b/components/messages/android/java/src/org/chromium/components/messages/MessageWrapper.java
@@ -16,9 +16,9 @@ import org.jni_zero.JNINamespace; import org.jni_zero.NativeMethods; -import org.chromium.components.browser_ui.widget.listmenu.ListMenu; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuItemProperties; import org.chromium.ui.base.WindowAndroid; +import org.chromium.ui.listmenu.ListMenu; +import org.chromium.ui.listmenu.ListMenuItemProperties; import org.chromium.ui.modelutil.PropertyModel; /**
diff --git a/components/metrics/generate_expired_histograms_array.gni b/components/metrics/generate_expired_histograms_array.gni index 9a08d56..dea89aef7 100644 --- a/components/metrics/generate_expired_histograms_array.gni +++ b/components/metrics/generate_expired_histograms_array.gni
@@ -60,6 +60,7 @@ "//tools/metrics/histograms/metadata/browsing_topics/enums.xml", "//tools/metrics/histograms/metadata/browsing_topics/histograms.xml", "//tools/metrics/histograms/metadata/chrome/histograms.xml", + "//tools/metrics/histograms/metadata/chromeos/enums.xml", "//tools/metrics/histograms/metadata/chromeos/histograms.xml", "//tools/metrics/histograms/metadata/chromeos_hps/histograms.xml", "//tools/metrics/histograms/metadata/chromeos_settings/histograms.xml",
diff --git a/components/navigation_interception/intercept_navigation_delegate.cc b/components/navigation_interception/intercept_navigation_delegate.cc index 29432de3..728aa726 100644 --- a/components/navigation_interception/intercept_navigation_delegate.cc +++ b/components/navigation_interception/intercept_navigation_delegate.cc
@@ -199,8 +199,9 @@ ->GetFrameToken()) { content::RenderFrameHost* initiator_frame_host = content::RenderFrameHost::FromFrameToken( - navigation_handle->GetInitiatorProcessId(), - navigation_handle->GetInitiatorFrameToken().value()); + content::GlobalRenderFrameHostToken( + navigation_handle->GetInitiatorProcessId(), + navigation_handle->GetInitiatorFrameToken().value())); // If the initiator is gone treat it as not visible. hidden_cross_frame = !initiator_frame_host || initiator_frame_host->GetVisibilityState() !=
diff --git a/components/optimization_guide/proto/BUILD.gn b/components/optimization_guide/proto/BUILD.gn index 803c97c..5b1f20f 100644 --- a/components/optimization_guide/proto/BUILD.gn +++ b/components/optimization_guide/proto/BUILD.gn
@@ -15,6 +15,7 @@ "autofill_field_classification_model_metadata.proto", "client_side_phishing_model_metadata.proto", "common_types.proto", + "features/common_quality_data.proto", "features/compose.proto", "features/default.proto", "features/tab_organization.proto",
diff --git a/components/optimization_guide/proto/features/common_quality_data.proto b/components/optimization_guide/proto/features/common_quality_data.proto new file mode 100644 index 0000000..5b0f5bf6 --- /dev/null +++ b/components/optimization_guide/proto/features/common_quality_data.proto
@@ -0,0 +1,22 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +syntax = "proto3"; + +option optimize_for = LITE_RUNTIME; +option java_package = "org.chromium.components.optimization_guide.features.proto"; + +option java_outer_classname = "CommonFeatureDataProto"; + +package optimization_guide.proto; + +// Contains common quality data that goes in FeatureQuality message for various +// features. + +// Type of Feedback provided by the user. +enum UserFeedback { + USER_FEEDBACK_UNSPECIFIED = 0; + USER_FEEDBACK_THUMBS_DOWN = 1; + USER_FEEDBACK_THUMBS_UP = 2; +}
diff --git a/components/optimization_guide/proto/features/compose.proto b/components/optimization_guide/proto/features/compose.proto index e648cc1..fd7f46b 100644 --- a/components/optimization_guide/proto/features/compose.proto +++ b/components/optimization_guide/proto/features/compose.proto
@@ -11,6 +11,8 @@ package optimization_guide.proto; +import "components/optimization_guide/proto/features/common_quality_data.proto"; + // ComposeFeatureLoggingData is the wrapper containing of ModelExecution // request, response and quality data for one compose execution run. message ComposeLoggingData { @@ -83,13 +85,6 @@ STATUS_FINISHED_WITHOUT_INSERT = 3; } -// The explicit feedback provided by the user. -enum UserFeedback { - FEEDBACK_UNSPECIFIED = 0; - FEEDBACK_THUMBS_UP = 1; - FEEDBACK_THUMBS_DOWN = 2; -} - // How the user used their clipboard with the feature. enum ClipboardUse { CLIPBOARD_UNSPECIFIED = 0; @@ -133,5 +128,5 @@ int64 request_latency_ms = 4; // How much was the text modified before commit only valid iff // final_status = INSERTED. - optional int64 edit_distance = 5; + int64 edit_distance = 5; }
diff --git a/components/optimization_guide/proto/features/wallpaper_search.proto b/components/optimization_guide/proto/features/wallpaper_search.proto index 7aa95624..c546ea4 100644 --- a/components/optimization_guide/proto/features/wallpaper_search.proto +++ b/components/optimization_guide/proto/features/wallpaper_search.proto
@@ -11,6 +11,8 @@ package optimization_guide.proto; +import "components/optimization_guide/proto/features/common_quality_data.proto"; + // WallpaperSearchLoggingData consists of ModelExecutionRequest, Response // and Quality data. message WallpaperSearchLoggingData { @@ -30,6 +32,13 @@ bytes encoded_image = 1; } +message WallpaperSearchImageQuality { + int64 image_id = 1; + bool previewed = 2; + bool selected = 3; + int32 preview_latency_ms = 4; +} + message WallpaperSearchRequest { reserved 1; Descriptors descriptors = 2; @@ -40,5 +49,12 @@ repeated Image images = 2; } -// TODO(b/307692084): Add model quality data for wallpaper search. -message WallpaperSearchQuality {} +message WallpaperSearchQuality { + int64 session_id = 1; + repeated WallpaperSearchImageQuality images_quality = 2; + int32 index = 3; + UserFeedback user_feedback = 4; + bool final_request_in_session = 5; + int32 request_latency_ms = 6; + int32 complete_latency_ms = 7; +}
diff --git a/components/page_info/page_info_ui.cc b/components/page_info/page_info_ui.cc index 3eb82df..98d79d0 100644 --- a/components/page_info/page_info_ui.cc +++ b/components/page_info/page_info_ui.cc
@@ -403,7 +403,8 @@ } // namespace PageInfoUI::CookiesNewInfo::CookiesNewInfo() = default; - +PageInfoUI::CookiesNewInfo::CookiesNewInfo(CookiesNewInfo&& cookie_info) = + default; PageInfoUI::CookiesNewInfo::~CookiesNewInfo() = default; PageInfoUI::CookiesFpsInfo::CookiesFpsInfo(const std::u16string& owner_name)
diff --git a/components/page_info/page_info_ui.h b/components/page_info/page_info_ui.h index c2b9827..63f2ffb4 100644 --- a/components/page_info/page_info_ui.h +++ b/components/page_info/page_info_ui.h
@@ -91,6 +91,7 @@ // cookies subpage implementation struct CookiesNewInfo { CookiesNewInfo(); + CookiesNewInfo(CookiesNewInfo&&); ~CookiesNewInfo(); // The number of third-party sites blocked.
diff --git a/components/payments/content/payment_response_helper.h b/components/payments/content/payment_response_helper.h index e71b24a4..935f4fc 100644 --- a/components/payments/content/payment_response_helper.h +++ b/components/payments/content/payment_response_helper.h
@@ -10,6 +10,8 @@ #include "base/memory/raw_ptr.h" #include "base/memory/raw_ref.h" #include "base/memory/weak_ptr.h" +#include "components/autofill/core/browser/country_type.h" +#include "components/autofill/core/browser/data_model/autofill_i18n_api.h" #include "components/autofill/core/browser/data_model/autofill_profile.h" #include "components/payments/content/payment_app.h" #include "third_party/blink/public/mojom/payments/payment_request.mojom.h" @@ -80,7 +82,8 @@ // A normalized copy of the shipping address, which will be included in the // PaymentResponse. - autofill::AutofillProfile shipping_address_; + autofill::AutofillProfile shipping_address_{ + autofill::i18n_model_definition::kLegacyHierarchyCountryCode}; // Instrument Details. std::string method_name_;
diff --git a/components/payments/content/payment_response_helper_unittest.cc b/components/payments/content/payment_response_helper_unittest.cc index c13876dd..6590168 100644 --- a/components/payments/content/payment_response_helper_unittest.cc +++ b/components/payments/content/payment_response_helper_unittest.cc
@@ -29,9 +29,10 @@ PaymentResponseHelperTest() : test_payment_request_delegate_( std::make_unique<base::SingleThreadTaskExecutor>(), - &test_personal_data_manager_), - address_(autofill::test::GetFullProfile()) { - test_personal_data_manager_.AddProfile(address_); + &test_personal_data_manager_) { + address_ = std::make_unique<autofill::AutofillProfile>( + autofill::test::GetFullProfile()); + test_personal_data_manager_.AddProfile(*address_); test_app_ = std::make_unique<TestPaymentApp>("method-name"); } ~PaymentResponseHelperTest() override {} @@ -83,7 +84,7 @@ base::WeakPtr<PaymentRequestSpec> spec() { return spec_->AsWeakPtr(); } const mojom::PaymentResponsePtr& response() { return payment_response_; } - autofill::AutofillProfile* test_address() { return &address_; } + autofill::AutofillProfile* test_address() { return address_.get(); } base::WeakPtr<PaymentApp> test_app() { return test_app_->AsWeakPtr(); } base::WeakPtr<PaymentRequestDelegate> test_payment_request_delegate() { return test_payment_request_delegate_.GetWeakPtr(); @@ -100,7 +101,7 @@ TestPaymentRequestDelegate test_payment_request_delegate_; // Test data. - autofill::AutofillProfile address_; + std::unique_ptr<autofill::AutofillProfile> address_; std::unique_ptr<PaymentApp> test_app_; base::WeakPtrFactory<PaymentResponseHelperTest> weak_ptr_factory_{this};
diff --git a/components/permissions/permission_decision_auto_blocker.cc b/components/permissions/permission_decision_auto_blocker.cc index 5792197..898d87c 100644 --- a/components/permissions/permission_decision_auto_blocker.cc +++ b/components/permissions/permission_decision_auto_blocker.cc
@@ -83,8 +83,9 @@ return "FederatedIdentityAutoReauthn"; } - if (content_type == ContentSettingsType::FILE_SYSTEM_WRITE_GUARD) { - return "FileSystemWriteGuard"; + if (content_type == + ContentSettingsType::FILE_SYSTEM_ACCESS_RESTORE_PERMISSION) { + return "FileSystemAccessRestorePermission"; } if (content_type == ContentSettingsType::AUTO_PICTURE_IN_PICTURE) { @@ -244,7 +245,8 @@ content_setting == ContentSettingsType::FEDERATED_IDENTITY_API || content_setting == ContentSettingsType::FEDERATED_IDENTITY_AUTO_REAUTHN_PERMISSION || - content_setting == ContentSettingsType::FILE_SYSTEM_WRITE_GUARD || + content_setting == + ContentSettingsType::FILE_SYSTEM_ACCESS_RESTORE_PERMISSION || content_setting == ContentSettingsType::AUTO_PICTURE_IN_PICTURE; }
diff --git a/components/permissions/permission_request_manager.cc b/components/permissions/permission_request_manager.cc index c688abb..15cbbe3f 100644 --- a/components/permissions/permission_request_manager.cc +++ b/components/permissions/permission_request_manager.cc
@@ -675,6 +675,7 @@ } void PermissionRequestManager::FinalizeCurrentRequests() { + CHECK(IsRequestInProgress()); ResetViewStateForCurrentRequest(); std::vector<PermissionRequest*>::iterator requests_iter; for (requests_iter = requests_.begin(); requests_iter != requests_.end();
diff --git a/components/permissions/permission_uma_util.cc b/components/permissions/permission_uma_util.cc index efdc295..74f6c0e 100644 --- a/components/permissions/permission_uma_util.cc +++ b/components/permissions/permission_uma_util.cc
@@ -256,6 +256,8 @@ void RecordEngagementMetric(const std::vector<PermissionRequest*>& requests, content::WebContents* web_contents, const std::string& action) { + CHECK(!requests.empty()); + RequestTypeForUma type = GetUmaValueForRequestType(requests[0]->request_type()); if (requests.size() > 1)
diff --git a/components/policy_strings.grdp b/components/policy_strings.grdp index 3e027358..33f84fd 100644 --- a/components/policy_strings.grdp +++ b/components/policy_strings.grdp
@@ -391,6 +391,16 @@ <message name="IDS_POLICY_SITE_SEARCH_SETTINGS_NAME_IS_EMPTY" desc="The text displayed in the status column of the SiteSearchSettings policy when a name is defined as an empty string."> Name can't be empty </message> + <message name="IDS_POLICY_SITE_SEARCH_SETTINGS_URL_IS_EMPTY" desc="The text displayed in the status column of the SiteSearchSettings policy when a URL is defined as an empty string."> + URL can't be empty + </message> + <message name="IDS_POLICY_SITE_SEARCH_SETTINGS_URL_DOESNT_SUPPORT_REPLACEMENT" desc="The text displayed in the status column of the SiteSearchSettings policy when a URL doesn't contain the replacement string '{searchTerms}'. Please do not translate '{searchTerms}' because it's part of the expected syntax."> + URL doesn't include required replacement string <ph name="SEARCH_TERMS_REPLACEMENT">"{searchTerms}"</ph>: <ph name="SEARCH_URL">$1<ex>https://www.example.com</ex></ph> + </message> + <message name="IDS_POLICY_SITE_SEARCH_SETTINGS_SHORTCUT_EQUALS_DSP_KEYWORD" desc="The text displayed in the status column of the SiteSearchSettings policy when a shortcut is the same as the keyword defined by the DefaultSearchProviderKeyword policy."> + Shortcut can't be the same as the default search provider keyword defined by <ph name="DEFAULT_SEARCH_PROVIDER_KEYWORD_POLICY_NAME">DefaultSearchProviderKeyword</ph>: <ph name="SHORTCUT_NAME">$1<ex>shortcut</ex></ph> + </message> + <!-- chrome://policy --> <message name="IDS_POLICY_TITLE" desc="Page title and the title of the section that lists policies.">
diff --git a/components/policy_strings_grdp/IDS_POLICY_SITE_SEARCH_SETTINGS_SHORTCUT_EQUALS_DSP_KEYWORD.png.sha1 b/components/policy_strings_grdp/IDS_POLICY_SITE_SEARCH_SETTINGS_SHORTCUT_EQUALS_DSP_KEYWORD.png.sha1 new file mode 100644 index 0000000..9c19867 --- /dev/null +++ b/components/policy_strings_grdp/IDS_POLICY_SITE_SEARCH_SETTINGS_SHORTCUT_EQUALS_DSP_KEYWORD.png.sha1
@@ -0,0 +1 @@ +818727382a19b5a4d310ec2093dc412de5997293 \ No newline at end of file
diff --git a/components/policy_strings_grdp/IDS_POLICY_SITE_SEARCH_SETTINGS_URL_DOESNT_SUPPORT_REPLACEMENT.png.sha1 b/components/policy_strings_grdp/IDS_POLICY_SITE_SEARCH_SETTINGS_URL_DOESNT_SUPPORT_REPLACEMENT.png.sha1 new file mode 100644 index 0000000..dfc9a20 --- /dev/null +++ b/components/policy_strings_grdp/IDS_POLICY_SITE_SEARCH_SETTINGS_URL_DOESNT_SUPPORT_REPLACEMENT.png.sha1
@@ -0,0 +1 @@ +919df0d77a50bbb876aec2de3601bbb18139f2be \ No newline at end of file
diff --git a/components/policy_strings_grdp/IDS_POLICY_SITE_SEARCH_SETTINGS_URL_IS_EMPTY.png.sha1 b/components/policy_strings_grdp/IDS_POLICY_SITE_SEARCH_SETTINGS_URL_IS_EMPTY.png.sha1 new file mode 100644 index 0000000..8cac01c --- /dev/null +++ b/components/policy_strings_grdp/IDS_POLICY_SITE_SEARCH_SETTINGS_URL_IS_EMPTY.png.sha1
@@ -0,0 +1 @@ +0e3ac413b1a53012b248b9a2e222a75e20e52b2d \ No newline at end of file
diff --git a/components/safe_browsing/content/browser/safe_browsing_navigation_observer.cc b/components/safe_browsing/content/browser/safe_browsing_navigation_observer.cc index 6ae290da..dce0d3a 100644 --- a/components/safe_browsing/content/browser/safe_browsing_navigation_observer.cc +++ b/components/safe_browsing/content/browser/safe_browsing_navigation_observer.cc
@@ -253,8 +253,9 @@ content::RenderFrameHost* initiator_frame_host = navigation_handle->GetInitiatorFrameToken().has_value() ? content::RenderFrameHost::FromFrameToken( - navigation_handle->GetInitiatorProcessId(), - navigation_handle->GetInitiatorFrameToken().value()) + content::GlobalRenderFrameHostToken( + navigation_handle->GetInitiatorProcessId(), + navigation_handle->GetInitiatorFrameToken().value())) : nullptr; base::UmaHistogramBoolean( @@ -377,8 +378,9 @@ auto* initiator_frame_host = navigation_handle->GetInitiatorFrameToken().has_value() ? content::RenderFrameHost::FromFrameToken( - navigation_handle->GetInitiatorProcessId(), - navigation_handle->GetInitiatorFrameToken().value()) + content::GlobalRenderFrameHostToken( + navigation_handle->GetInitiatorProcessId(), + navigation_handle->GetInitiatorFrameToken().value())) : nullptr; if (initiator_frame_host) { nav_event->initiator_outermost_main_frame_id =
diff --git a/components/search/ntp_features.cc b/components/search/ntp_features.cc index 5f14a554..a8f06d2 100644 --- a/components/search/ntp_features.cc +++ b/components/search/ntp_features.cc
@@ -64,6 +64,12 @@ "NtpRealboxCr23ExpandedStateIcons", base::FEATURE_DISABLED_BY_DEFAULT); +// If enabled, NTP "realbox" expanded state layout CR23 updates will +// appear. +BASE_FEATURE(kRealboxCr23ExpandedStateLayout, + "NtpRealboxCr23ExpandedStateLayout", + base::FEATURE_DISABLED_BY_DEFAULT); + // If enabled, the NTP "realbox" will have same border/drop shadow in hover // state as searchbox. BASE_FEATURE(kRealboxMatchSearchboxTheme,
diff --git a/components/search/ntp_features.h b/components/search/ntp_features.h index 83be8db..72502fb 100644 --- a/components/search/ntp_features.h +++ b/components/search/ntp_features.h
@@ -31,6 +31,7 @@ BASE_DECLARE_FEATURE(kOneGoogleBarModalOverlays); BASE_DECLARE_FEATURE(kRealboxCr23All); BASE_DECLARE_FEATURE(kRealboxCr23ExpandedStateIcons); +BASE_DECLARE_FEATURE(kRealboxCr23ExpandedStateLayout); BASE_DECLARE_FEATURE(kRealboxMatchOmniboxTheme); BASE_DECLARE_FEATURE(kRealboxMatchSearchboxTheme); BASE_DECLARE_FEATURE(kRealboxUseGoogleGIcon);
diff --git a/components/search_engines/site_search_policy_handler.cc b/components/search_engines/site_search_policy_handler.cc index 33c87b3..9b4dc43d 100644 --- a/components/search_engines/site_search_policy_handler.cc +++ b/components/search_engines/site_search_policy_handler.cc
@@ -17,7 +17,9 @@ #include "components/prefs/pref_value_map.h" #include "components/search_engines/default_search_manager.h" #include "components/search_engines/enterprise_site_search_manager.h" +#include "components/search_engines/search_terms_data.h" #include "components/search_engines/template_url.h" +#include "components/search_engines/template_url_data.h" #include "components/strings/grit/components_strings.h" namespace policy { @@ -35,8 +37,8 @@ base::FeatureList::IsEnabled(omnibox::kSiteSearchSettingsPolicy); } -// Converts a site search policy entry |policy_dict| into a dictionary to be -// saved to prefs, with fields corresponding to |TemplateURLData|. +// Converts a site search policy entry `policy_dict` into a dictionary to be +// saved to prefs, with fields corresponding to `TemplateURLData`. base::Value SiteSearchDictFromPolicyValue( const base::Value::Dict& policy_dict) { base::Value::Dict dict; @@ -92,6 +94,10 @@ return GetField(provider, SiteSearchPolicyHandler::kName); } +const std::string& GetUrl(const base::Value& provider) { + return GetField(provider, SiteSearchPolicyHandler::kUrl); +} + bool ShortcutIsEmpty(const std::string& policy_name, const std::string& shortcut, PolicyErrorMap* errors) { @@ -115,6 +121,17 @@ return true; } +bool UrlIsEmpty(const std::string& policy_name, + const std::string& url, + PolicyErrorMap* errors) { + if (!url.empty()) { + return false; + } + + errors->AddError(policy_name, IDS_POLICY_SITE_SEARCH_SETTINGS_URL_IS_EMPTY); + return true; +} + bool ShortcutHasWhitespace(const std::string& policy_name, const std::string& shortcut, PolicyErrorMap* errors) { @@ -141,6 +158,44 @@ return true; } +bool ShortcutEqualsDefaultSearchProviderKeyword(const std::string& policy_name, + const std::string& shortcut, + const PolicyMap& policies, + PolicyErrorMap* errors) { + const base::Value* provider_enabled = policies.GetValue( + key::kDefaultSearchProviderEnabled, base::Value::Type::BOOLEAN); + const base::Value* provider_keyword = policies.GetValue( + key::kDefaultSearchProviderKeyword, base::Value::Type::STRING); + // Ignore if `DefaultSearchProviderEnabled` is not set, invalid, or disabled. + // Ignore if `DefaultSearchProviderKeyword` is not set, invalid, or different + // from `shortcut`. + if (!provider_enabled || !provider_enabled->GetBool() || !provider_keyword || + shortcut != provider_keyword->GetString()) { + return false; + } + + errors->AddError(policy_name, + IDS_POLICY_SITE_SEARCH_SETTINGS_SHORTCUT_EQUALS_DSP_KEYWORD, + shortcut); + return true; +} + +bool ReplacementStringIsMissingFromUrl(const std::string& policy_name, + const std::string& url, + PolicyErrorMap* errors) { + TemplateURLData data; + data.SetURL(url); + SearchTermsData search_terms_data; + if (TemplateURL(data).SupportsReplacement(search_terms_data)) { + return false; + } + + errors->AddError( + policy_name, + IDS_POLICY_SITE_SEARCH_SETTINGS_URL_DOESNT_SUPPORT_REPLACEMENT, url); + return true; +} + bool ShortcutAlreadySeen( const std::string& policy_name, const std::string& shortcut, @@ -208,15 +263,18 @@ base::flat_set<std::string> duplicated_shortcuts; for (const base::Value& provider : site_search_providers) { const std::string& shortcut = GetShortcut(provider); - - // TODO(b/306201833): Implement remaining validation rules. + const std::string& url = GetUrl(provider); if (ShortcutIsEmpty(policy_name(), shortcut, errors) || NameIsEmpty(policy_name(), GetName(provider), errors) || + UrlIsEmpty(policy_name(), url, errors) || ShortcutHasWhitespace(policy_name(), shortcut, errors) || ShortcutStartsWithAtSymbol(policy_name(), shortcut, errors) || + ShortcutEqualsDefaultSearchProviderKeyword(policy_name(), shortcut, + policies, errors) || ShortcutAlreadySeen(policy_name(), shortcut, shortcuts_already_seen, - errors, &duplicated_shortcuts)) { + errors, &duplicated_shortcuts) || + ReplacementStringIsMissingFromUrl(policy_name(), url, errors)) { ignored_shortcuts_.insert(shortcut); }
diff --git a/components/search_engines/site_search_policy_handler_unittest.cc b/components/search_engines/site_search_policy_handler_unittest.cc index 6adec86..cc8d4b9 100644 --- a/components/search_engines/site_search_policy_handler_unittest.cc +++ b/components/search_engines/site_search_policy_handler_unittest.cc
@@ -79,6 +79,10 @@ .shortcut = "", .url = "https://empty_shortcut.com/{searchTerms}", .favicon = nullptr}, + {.name = "empty_url name", + .shortcut = "empty_url", + .url = "", + .favicon = nullptr}, }; // Used for tests that require a list of providers with a duplicated shortcut, @@ -140,6 +144,36 @@ .favicon = "https://work.com/favicon.ico"}, }; +// Used for tests that require a provider with invalid non-empty URLs. +TestProvider kInvalidUrlTestProviders[] = { + {.name = "invalid1 name", + .shortcut = "invalid1", + .url = "https://work.com/q=searchTerms", + .favicon = nullptr}, + {.name = "invalid2 name", + .shortcut = "invalid2", + .url = "https://work.com/q=%s", + .favicon = nullptr}, + {.name = "invalid3 name", + .shortcut = "invalid3", + .url = "https://work.com", + .favicon = nullptr}, +}; + +constexpr char kDSPKeyword[] = "dsp_keyword"; + +// Used for tests that require a provider with invalid non-empty URLs. +TestProvider kShortcutSameAsDSPKeywordTestProviders[] = { + {.name = "same as keyword", + .shortcut = kDSPKeyword, + .url = "https://work.com/q={searchTerms}&x", + .favicon = "https://work.com/favicon.ico"}, + {.name = "something else", + .shortcut = "something_else", + .url = "https://work.com/q={searchTerms}&y", + .favicon = "https://work.com/favicon.ico"}, +}; + // Creates a simple list item for the site search policy. base::Value::Dict GenerateSiteSearchPolicyEntry(const std::string& name, const std::string& shortcut, @@ -165,8 +199,8 @@ return entry; } -// Accepts a dictionary that has a string field |field_name| with value -// |expected_value|. +// Accepts a dictionary that has a string field `field_name` with value +// `expected_value`. MATCHER_P2(HasStringField, field_name, expected_value, @@ -178,8 +212,8 @@ return dict_value && *dict_value == expected_value; } -// Accepts a dictionary that has a boolean field |field_name| with value -// |expected_value|. +// Accepts a dictionary that has a boolean field `field_name` with value +// `expected_value`. MATCHER_P2(HasBooleanField, field_name, expected_value, @@ -191,7 +225,7 @@ return dict_value && *dict_value == expected_value; } -// Accepts a dictionary that has a double field |field_name| with non-zero +// Accepts a dictionary that has a double field `field_name` with non-zero // value. MATCHER_P(HasDoubleField, field_name, @@ -451,7 +485,7 @@ u"work"))); } -TEST(SiteSearchPolicyHandlerTest, EmptyShortcut) { +TEST(SiteSearchPolicyHandlerTest, EmptyRequiredField) { base::test::ScopedFeatureList scoped_feature_list; scoped_feature_list.InitAndEnableFeature(omnibox::kSiteSearchSettingsPolicy); @@ -477,6 +511,8 @@ IDS_POLICY_SITE_SEARCH_SETTINGS_SHORTCUT_IS_EMPTY))); EXPECT_THAT(&errors, HasValidationError(l10n_util::GetStringUTF16( IDS_POLICY_SITE_SEARCH_SETTINGS_NAME_IS_EMPTY))); + EXPECT_THAT(&errors, HasValidationError(l10n_util::GetStringUTF16( + IDS_POLICY_SITE_SEARCH_SETTINGS_URL_IS_EMPTY))); } TEST(SiteSearchPolicyHandlerTest, ShortcutWithSpace) { @@ -549,6 +585,166 @@ ElementsAre(IsSiteSearchEntry(kShortcutStartsWithAtTestProviders[1]))); } +TEST(SiteSearchPolicyHandlerTest, InvalidUrl) { + base::test::ScopedFeatureList scoped_feature_list; + scoped_feature_list.InitAndEnableFeature(omnibox::kSiteSearchSettingsPolicy); + + SiteSearchPolicyHandler handler( + policy::Schema::Wrap(policy::GetChromeSchemaData())); + + policy::PolicyMap policies; + PolicyErrorMap errors; + PrefValueMap prefs; + + base::Value::List policy_value; + for (auto* it = std::begin(kInvalidUrlTestProviders); + it != std::end(kInvalidUrlTestProviders); ++it) { + policy_value.Append(GenerateSiteSearchPolicyEntry(*it)); + } + + policies.Set(key::kSiteSearchSettings, policy::POLICY_LEVEL_MANDATORY, + policy::POLICY_SCOPE_USER, policy::POLICY_SOURCE_CLOUD, + base::Value(std::move(policy_value)), nullptr); + + ASSERT_FALSE(handler.CheckPolicySettings(policies, &errors)); + for (auto* it = std::begin(kInvalidUrlTestProviders); + it != std::end(kInvalidUrlTestProviders); ++it) { + EXPECT_THAT( + &errors, + HasValidationError(l10n_util::GetStringFUTF16( + IDS_POLICY_SITE_SEARCH_SETTINGS_URL_DOESNT_SUPPORT_REPLACEMENT, + base::UTF8ToUTF16(it->url)))); + } +} + +TEST(SiteSearchPolicyHandlerTest, ShortcutSameAsDSPKeyword_DSPEnabledNotSet) { + base::test::ScopedFeatureList scoped_feature_list; + scoped_feature_list.InitAndEnableFeature(omnibox::kSiteSearchSettingsPolicy); + + SiteSearchPolicyHandler handler( + policy::Schema::Wrap(policy::GetChromeSchemaData())); + + policy::PolicyMap policies; + PolicyErrorMap errors; + PrefValueMap prefs; + + base::Value::List policy_value; + for (auto* it = std::begin(kShortcutSameAsDSPKeywordTestProviders); + it != std::end(kShortcutSameAsDSPKeywordTestProviders); ++it) { + policy_value.Append(GenerateSiteSearchPolicyEntry(*it)); + } + + policies.Set(key::kDefaultSearchProviderKeyword, + policy::POLICY_LEVEL_MANDATORY, policy::POLICY_SCOPE_USER, + policy::POLICY_SOURCE_CLOUD, base::Value(kDSPKeyword), nullptr); + policies.Set(key::kSiteSearchSettings, policy::POLICY_LEVEL_MANDATORY, + policy::POLICY_SCOPE_USER, policy::POLICY_SOURCE_CLOUD, + base::Value(std::move(policy_value)), nullptr); + + ASSERT_TRUE(handler.CheckPolicySettings(policies, &errors)); + EXPECT_TRUE(errors.empty()); + + handler.ApplyPolicySettings(policies, &prefs); + base::Value* providers = nullptr; + ASSERT_TRUE(prefs.GetValue( + EnterpriseSiteSearchManager::kSiteSearchSettingsPrefName, &providers)); + ASSERT_NE(providers, nullptr); + ASSERT_TRUE(providers->is_list()); + EXPECT_THAT( + providers->GetList(), + ElementsAre( + IsSiteSearchEntry(kShortcutSameAsDSPKeywordTestProviders[0]), + IsSiteSearchEntry(kShortcutSameAsDSPKeywordTestProviders[1]))); +} + +TEST(SiteSearchPolicyHandlerTest, ShortcutSameAsDSPKeyword_DSPDisabled) { + base::test::ScopedFeatureList scoped_feature_list; + scoped_feature_list.InitAndEnableFeature(omnibox::kSiteSearchSettingsPolicy); + + SiteSearchPolicyHandler handler( + policy::Schema::Wrap(policy::GetChromeSchemaData())); + + policy::PolicyMap policies; + PolicyErrorMap errors; + PrefValueMap prefs; + + base::Value::List policy_value; + for (auto* it = std::begin(kShortcutSameAsDSPKeywordTestProviders); + it != std::end(kShortcutSameAsDSPKeywordTestProviders); ++it) { + policy_value.Append(GenerateSiteSearchPolicyEntry(*it)); + } + + policies.Set(key::kDefaultSearchProviderEnabled, + policy::POLICY_LEVEL_MANDATORY, policy::POLICY_SCOPE_USER, + policy::POLICY_SOURCE_CLOUD, base::Value(false), nullptr); + policies.Set(key::kDefaultSearchProviderKeyword, + policy::POLICY_LEVEL_MANDATORY, policy::POLICY_SCOPE_USER, + policy::POLICY_SOURCE_CLOUD, base::Value(kDSPKeyword), nullptr); + policies.Set(key::kSiteSearchSettings, policy::POLICY_LEVEL_MANDATORY, + policy::POLICY_SCOPE_USER, policy::POLICY_SOURCE_CLOUD, + base::Value(std::move(policy_value)), nullptr); + + ASSERT_TRUE(handler.CheckPolicySettings(policies, &errors)); + EXPECT_TRUE(errors.empty()); + + handler.ApplyPolicySettings(policies, &prefs); + base::Value* providers = nullptr; + ASSERT_TRUE(prefs.GetValue( + EnterpriseSiteSearchManager::kSiteSearchSettingsPrefName, &providers)); + ASSERT_NE(providers, nullptr); + ASSERT_TRUE(providers->is_list()); + EXPECT_THAT( + providers->GetList(), + ElementsAre( + IsSiteSearchEntry(kShortcutSameAsDSPKeywordTestProviders[0]), + IsSiteSearchEntry(kShortcutSameAsDSPKeywordTestProviders[1]))); +} + +TEST(SiteSearchPolicyHandlerTest, ShortcutSameAsDSPKeyword_DSPEnabled) { + base::test::ScopedFeatureList scoped_feature_list; + scoped_feature_list.InitAndEnableFeature(omnibox::kSiteSearchSettingsPolicy); + + SiteSearchPolicyHandler handler( + policy::Schema::Wrap(policy::GetChromeSchemaData())); + + policy::PolicyMap policies; + PolicyErrorMap errors; + PrefValueMap prefs; + + base::Value::List policy_value; + for (auto* it = std::begin(kShortcutSameAsDSPKeywordTestProviders); + it != std::end(kShortcutSameAsDSPKeywordTestProviders); ++it) { + policy_value.Append(GenerateSiteSearchPolicyEntry(*it)); + } + + policies.Set(key::kDefaultSearchProviderEnabled, + policy::POLICY_LEVEL_MANDATORY, policy::POLICY_SCOPE_USER, + policy::POLICY_SOURCE_CLOUD, base::Value(true), nullptr); + policies.Set(key::kDefaultSearchProviderKeyword, + policy::POLICY_LEVEL_MANDATORY, policy::POLICY_SCOPE_USER, + policy::POLICY_SOURCE_CLOUD, base::Value(kDSPKeyword), nullptr); + policies.Set(key::kSiteSearchSettings, policy::POLICY_LEVEL_MANDATORY, + policy::POLICY_SCOPE_USER, policy::POLICY_SOURCE_CLOUD, + base::Value(std::move(policy_value)), nullptr); + + ASSERT_TRUE(handler.CheckPolicySettings(policies, &errors)); + EXPECT_THAT(&errors, + HasValidationError(l10n_util::GetStringFUTF16( + IDS_POLICY_SITE_SEARCH_SETTINGS_SHORTCUT_EQUALS_DSP_KEYWORD, + base::UTF8ToUTF16( + kShortcutSameAsDSPKeywordTestProviders[0].shortcut)))); + + handler.ApplyPolicySettings(policies, &prefs); + base::Value* providers = nullptr; + ASSERT_TRUE(prefs.GetValue( + EnterpriseSiteSearchManager::kSiteSearchSettingsPrefName, &providers)); + ASSERT_NE(providers, nullptr); + ASSERT_TRUE(providers->is_list()); + EXPECT_THAT(providers->GetList(), + ElementsAre(IsSiteSearchEntry( + kShortcutSameAsDSPKeywordTestProviders[1]))); +} + TEST(SiteSearchPolicyHandlerTest, NoValidEntry) { base::test::ScopedFeatureList scoped_feature_list; scoped_feature_list.InitAndEnableFeature(omnibox::kSiteSearchSettingsPolicy);
diff --git a/components/services/font/public/cpp/font_loader.cc b/components/services/font/public/cpp/font_loader.cc index 0248f7e0..870b76f 100644 --- a/components/services/font/public/cpp/font_loader.cc +++ b/components/services/font/public/cpp/font_loader.cc
@@ -11,6 +11,8 @@ #include "base/trace_event/trace_event.h" #include "components/services/font/public/cpp/font_service_thread.h" #include "pdf/buildflags.h" +#include "skia/ext/font_utils.h" +#include "third_party/skia/include/core/SkFontMgr.h" namespace font_service { @@ -64,7 +66,7 @@ sk_sp<SkTypeface> FontLoader::makeTypeface(const FontIdentity& identity) { TRACE_EVENT0("fonts", "FontServiceThread::makeTypeface"); - return SkFontConfigInterface::makeTypeface(identity); + return SkFontConfigInterface::makeTypeface(identity, skia::GetFontMgr()); } // Additional cross-thread accessible methods.
diff --git a/components/signin/internal/identity_manager/account_tracker_service.cc b/components/signin/internal/identity_manager/account_tracker_service.cc index e6700ff..4a9b0aa 100644 --- a/components/signin/internal/identity_manager/account_tracker_service.cc +++ b/components/signin/internal/identity_manager/account_tracker_service.cc
@@ -633,89 +633,95 @@ std::set<CoreAccountId> to_remove; for (size_t i = 0; i < list.size(); ++i) { const base::Value::Dict* dict = list[i].GetIfDict(); - if (dict) { - if (const std::string* account_key = dict->FindString(kAccountKeyKey)) { - // Ignore empty account ids. - if (account_key->empty()) { - to_remove.insert(CoreAccountId()); - continue; - } - // Ignore incorrectly persisted non-canonical account ids. - if (account_key->find('@') != std::string::npos && - *account_key != gaia::CanonicalizeEmail(*account_key)) { - to_remove.insert(CoreAccountId::FromString(*account_key)); - continue; - } + if (!dict) { + continue; + } - CoreAccountId account_id = CoreAccountId::FromString(*account_key); - StartTrackingAccount(account_id); - AccountInfo& account_info = accounts_[account_id]; + const std::string* account_key = dict->FindString(kAccountKeyKey); + if (!account_key) { + continue; + } - GetString(*dict, kAccountGaiaKey, account_info.gaia); - GetString(*dict, kAccountEmailKey, account_info.email); - GetString(*dict, kAccountHostedDomainKey, account_info.hosted_domain); - GetString(*dict, kAccountFullNameKey, account_info.full_name); - GetString(*dict, kAccountGivenNameKey, account_info.given_name); - GetString(*dict, kAccountLocaleKey, account_info.locale); - GetString(*dict, kAccountPictureURLKey, account_info.picture_url); - GetString(*dict, kLastDownloadedImageURLWithSizeKey, - account_info.last_downloaded_image_url_with_size); + // Ignore empty account ids. + if (account_key->empty()) { + to_remove.insert(CoreAccountId()); + continue; + } + // Ignore incorrectly persisted non-canonical account ids. + if (account_key->find('@') != std::string::npos && + *account_key != gaia::CanonicalizeEmail(*account_key)) { + to_remove.insert(CoreAccountId::FromString(*account_key)); + continue; + } - if (absl::optional<bool> is_child_status = - dict->FindBool(kDeprecatedChildStatusKey)) { - account_info.is_child_account = is_child_status.value() - ? signin::Tribool::kTrue - : signin::Tribool::kFalse; - // Migrate to kAccountChildAttributeKey. - ScopedListPrefUpdate update(pref_service_, prefs::kAccountInfo); - base::Value::Dict& update_dict = (*update)[i].GetDict(); - update_dict.Set(kAccountChildAttributeKey, - static_cast<int>(account_info.is_child_account)); - update_dict.Remove(kDeprecatedChildStatusKey); - } else { - account_info.is_child_account = - ParseTribool(dict->FindInt(kAccountChildAttributeKey)); - } + CoreAccountId account_id = CoreAccountId::FromString(*account_key); + StartTrackingAccount(account_id); + AccountInfo& account_info = accounts_[account_id]; - absl::optional<bool> is_under_advanced_protection = - dict->FindBool(kAdvancedProtectionAccountStatusKey); - if (is_under_advanced_protection.has_value()) { - account_info.is_under_advanced_protection = - is_under_advanced_protection.value(); - } + GetString(*dict, kAccountGaiaKey, account_info.gaia); + GetString(*dict, kAccountEmailKey, account_info.email); + GetString(*dict, kAccountHostedDomainKey, account_info.hosted_domain); + GetString(*dict, kAccountFullNameKey, account_info.full_name); + GetString(*dict, kAccountGivenNameKey, account_info.given_name); + GetString(*dict, kAccountLocaleKey, account_info.locale); + GetString(*dict, kAccountPictureURLKey, account_info.picture_url); + GetString(*dict, kLastDownloadedImageURLWithSizeKey, + account_info.last_downloaded_image_url_with_size); - if (absl::optional<int> can_offer_extended_chrome_sync_promos = - dict->FindIntByDottedPath( - kDeprecatedCanOfferExtendedChromeSyncPromosPrefPath)) { - // Migrate to Capability names based pref paths. - ScopedListPrefUpdate update(pref_service_, prefs::kAccountInfo); - base::Value::Dict& update_dict = (*update)[i].GetDict(); - SetAccountCapabilityState( - update_dict, kCanOfferExtendedChromeSyncPromosCapabilityName, - ParseTribool(can_offer_extended_chrome_sync_promos)); - update_dict.RemoveByDottedPath( - kDeprecatedCanOfferExtendedChromeSyncPromosPrefPath); - } + if (absl::optional<bool> is_child_status = + dict->FindBool(kDeprecatedChildStatusKey)) { + account_info.is_child_account = is_child_status.value() + ? signin::Tribool::kTrue + : signin::Tribool::kFalse; + // Migrate to kAccountChildAttributeKey. + ScopedListPrefUpdate update(pref_service_, prefs::kAccountInfo); + base::Value::Dict& update_dict = (*update)[i].GetDict(); + update_dict.Set(kAccountChildAttributeKey, + static_cast<int>(account_info.is_child_account)); + update_dict.Remove(kDeprecatedChildStatusKey); + } else { + account_info.is_child_account = + ParseTribool(dict->FindInt(kAccountChildAttributeKey)); + } - for (const std::string& name : - AccountCapabilities::GetSupportedAccountCapabilityNames()) { - switch (FindAccountCapabilityState(*dict, name)) { - case signin::Tribool::kUnknown: - account_info.capabilities.capabilities_map_.erase(name); - break; - case signin::Tribool::kTrue: - account_info.capabilities.capabilities_map_[name] = true; - break; - case signin::Tribool::kFalse: - account_info.capabilities.capabilities_map_[name] = false; - break; - } - } + absl::optional<bool> is_under_advanced_protection = + dict->FindBool(kAdvancedProtectionAccountStatusKey); + if (is_under_advanced_protection.has_value()) { + account_info.is_under_advanced_protection = + is_under_advanced_protection.value(); + } - if (!account_info.gaia.empty()) - NotifyAccountUpdated(account_info); + if (absl::optional<int> can_offer_extended_chrome_sync_promos = + dict->FindIntByDottedPath( + kDeprecatedCanOfferExtendedChromeSyncPromosPrefPath)) { + // Migrate to Capability names based pref paths. + ScopedListPrefUpdate update(pref_service_, prefs::kAccountInfo); + base::Value::Dict& update_dict = (*update)[i].GetDict(); + SetAccountCapabilityState( + update_dict, kCanOfferExtendedChromeSyncPromosCapabilityName, + ParseTribool(can_offer_extended_chrome_sync_promos)); + update_dict.RemoveByDottedPath( + kDeprecatedCanOfferExtendedChromeSyncPromosPrefPath); + } + + for (const std::string& name : + AccountCapabilities::GetSupportedAccountCapabilityNames()) { + switch (FindAccountCapabilityState(*dict, name)) { + case signin::Tribool::kUnknown: + account_info.capabilities.capabilities_map_.erase(name); + break; + case signin::Tribool::kTrue: + account_info.capabilities.capabilities_map_[name] = true; + break; + case signin::Tribool::kFalse: + account_info.capabilities.capabilities_map_[name] = false; + break; } } + + if (!account_info.gaia.empty()) { + NotifyAccountUpdated(account_info); + } } // Remove any obsolete prefs.
diff --git a/components/signin/public/base/signin_metrics.cc b/components/signin/public/base/signin_metrics.cc index c3081f7..d05b04e7 100644 --- a/components/signin/public/base/signin_metrics.cc +++ b/components/signin/public/base/signin_metrics.cc
@@ -484,6 +484,10 @@ base::RecordAction(base::UserMetricsAction( "Signin_Signin_FromPasswordMigrationWarningAndroid")); break; + case AccessPoint::ACCESS_POINT_TAB_ORGANIZATION: + base::RecordAction( + base::UserMetricsAction("Signin_Signin_FromTabOrganization")); + break; case AccessPoint::ACCESS_POINT_MAX: NOTREACHED(); break; @@ -636,6 +640,7 @@ case AccessPoint::ACCESS_POINT_PASSWORD_MIGRATION_WARNING_ANDROID: case AccessPoint::ACCESS_POINT_CHROME_SIGNIN_INTERCEPT_BUBBLE: case AccessPoint::ACCESS_POINT_RESTORE_PRIMARY_ACCOUNT_ON_PROFILE_LOAD: + case AccessPoint::ACCESS_POINT_TAB_ORGANIZATION: case AccessPoint::ACCESS_POINT_MAX: NOTREACHED() << "Signin_Impression_From* user actions" << " are not recorded for access point "
diff --git a/components/signin/public/base/signin_metrics.h b/components/signin/public/base/signin_metrics.h index 7ffda598..0a934f3 100644 --- a/components/signin/public/base/signin_metrics.h +++ b/components/signin/public/base/signin_metrics.h
@@ -212,6 +212,8 @@ ACCESS_POINT_CHROME_SIGNIN_INTERCEPT_BUBBLE = 54, // Restore primary account info in case it was lost. ACCESS_POINT_RESTORE_PRIMARY_ACCOUNT_ON_PROFILE_LOAD = 55, + // Access point for the tab organization UI within the tab search bubble. + ACCESS_POINT_TAB_ORGANIZATION = 56, // Add values above this line with a corresponding label to the // "SigninAccessPoint" enum in tools/metrics/histograms/enums.xml
diff --git a/components/signin/public/base/signin_metrics_unittest.cc b/components/signin/public/base/signin_metrics_unittest.cc index 918b81f9..d7a9532 100644 --- a/components/signin/public/base/signin_metrics_unittest.cc +++ b/components/signin/public/base/signin_metrics_unittest.cc
@@ -44,6 +44,7 @@ AccessPoint::ACCESS_POINT_CREATOR_FEED_FOLLOW, AccessPoint::ACCESS_POINT_READING_LIST, AccessPoint::ACCESS_POINT_SET_UP_LIST, + AccessPoint::ACCESS_POINT_TAB_ORGANIZATION, }; const AccessPoint kAccessPointsThatSupportImpression[] = { @@ -179,6 +180,8 @@ return "ChromeSigninInterceptBubble"; case AccessPoint::ACCESS_POINT_RESTORE_PRIMARY_ACCOUNT_ON_PROFILE_LOAD: return "RestorePrimaryAccountiinfoOnProfileLoad"; + case AccessPoint::ACCESS_POINT_TAB_ORGANIZATION: + return "TabOrganization"; case AccessPoint::ACCESS_POINT_MAX: NOTREACHED(); return "";
diff --git a/components/strings/components_strings_ar.xtb b/components/strings/components_strings_ar.xtb index d23eee3..4effa5b9 100644 --- a/components/strings/components_strings_ar.xtb +++ b/components/strings/components_strings_ar.xtb
@@ -98,6 +98,7 @@ <translation id="1178581264944972037">الإيقاف مؤقتًا</translation> <translation id="1178821169867863726">12 × 16 بوصة</translation> <translation id="1181037720776840403">إزالة</translation> +<translation id="1181381397492575884">يحظر Chrome المواقع الإلكترونية من استخدام ملفات تعريف الارتباط التابعة لجهات خارجية لتتبُّع نشاطك أثناء التصفُّح. انتقِل إلى الإعدادات حتى تتمكّن من <ph name="LINK" />.</translation> <translation id="1186201132766001848">التحقق من كلمات المرور</translation> <translation id="1190491977647722791">ورق (ثقيل الوزن)</translation> <translation id="1195073053842921378">سيتم حذف هذا العنوان من هذا الجهاز.</translation> @@ -118,6 +119,7 @@ <translation id="1225570101506606926">بيلياردو</translation> <translation id="1225607422885279949">سترصد Google أي خصومات متوفّرة</translation> <translation id="1227224963052638717">سياسة غير معروفة.</translation> +<translation id="1227677022489889280">أدخِل سببًا للنقل (مطلوب).</translation> <translation id="1228893227497259893">معرف الكيان خاطئ</translation> <translation id="1230244617745022071"><ph name="SOURCE" /> (تم التعرّف عليها تلقائيًا)</translation> <translation id="1232569758102978740">بلا عنوان</translation> @@ -1042,6 +1044,7 @@ <translation id="3140646734028448730">خدمات أنشطة تجارية</translation> <translation id="3141093262818886744">الفتح على أي حال</translation> <translation id="3141641372357166056">لم يتم اتخاذ قرار بشأن الموافقة.</translation> +<translation id="3142736425087361223">يحتاج Chrome إلى إذن <ph name="PERMISSION" /> لاستخدامه على الموقع الإلكتروني <ph name="ORIGIN" />.</translation> <translation id="3144458715650412431">تم تطبيق سياسات الاختبار. يمكنك الانتقال إلى chrome://policy/test للاطّلاع عليها وإعادة ضبطها. لن يتم تطبيق سياسات المشرف.</translation> <translation id="3145945101586104090">تعذّر فك ترميز الاستجابة</translation> <translation id="3150653042067488994">خطأ مؤقت في الخادم</translation> @@ -1205,6 +1208,7 @@ <translation id="3447644283769633681">حظر جميع ملفات تعريف الارتباط للأطراف الثالثة</translation> <translation id="3447661539832366887">أوقف مالك هذا الجهاز تشغيل لعبة الديناصور.</translation> <translation id="3447884698081792621">عرض الشهادة (من إصدار <ph name="ISSUER" />)</translation> +<translation id="3450323514459570273">السماح للموقع الإلكتروني بطلب التحكُّم في أجهزة MIDI وإعادة برمجتها</translation> <translation id="3452404311384756672">الفاصل الزمني للجلب:</translation> <translation id="3453962258458347894">عدد مرات إعادة المحاولة</translation> <translation id="3461266716147554923">يريد <ph name="URL" /> الاطلاع على النصوص والصور التي تم نسخها إلى الحافظة.</translation> @@ -2003,6 +2007,7 @@ <translation id="5045550434625856497">كلمة مرور غير صحيحة</translation> <translation id="5051305769747448211">عروض كوميدية مباشرة</translation> <translation id="5056425809654826431">{NUM_FILES,plural, =1{لإرسال هذا الملف باستخدام ميزة "المشاركة عن قرب"، عليك إخلاء مساحة قدرها (<ph name="DISK_SPACE_SIZE" />) على جهازك.}zero{لإرسال هذه الملفات باستخدام ميزة "المشاركة عن قرب"، عليك إخلاء مساحة قدرها (<ph name="DISK_SPACE_SIZE" />) على جهازك.}two{لإرسال هذين الملفَين باستخدام ميزة "المشاركة عن قرب"، عليك إخلاء مساحة قدرها (<ph name="DISK_SPACE_SIZE" />) على جهازك.}few{لإرسال هذه الملفات باستخدام ميزة "المشاركة عن قرب"، عليك إخلاء مساحة قدرها (<ph name="DISK_SPACE_SIZE" />) على جهازك.}many{لإرسال هذه الملفات باستخدام ميزة "المشاركة عن قرب"، عليك إخلاء مساحة قدرها (<ph name="DISK_SPACE_SIZE" />) على جهازك.}other{لإرسال هذه الملفات باستخدام ميزة "المشاركة عن قرب"، عليك إخلاء مساحة قدرها (<ph name="DISK_SPACE_SIZE" />) على جهازك.}}</translation> +<translation id="505757197798929356">أدخِل سببًا للفتح (مطلوب).</translation> <translation id="5060419232449737386">إعدادات الترجمة والشرح</translation> <translation id="5060483733937416656">لقد اخترت إثبات هويتك باستخدام Windows Hello على المواقع الإلكترونية التي تستخدم مقدِّم الخدمة <ph name="PROVIDER_ORIGIN" />. قد يكون مقدِّم الخدمة احتفظ بمعلومات حول طريقة الدفع التي تم استخدامها، ويمكنك <ph name="LINK_TEXT" />.</translation> <translation id="5061227663725596739">هل كنت تقصد <ph name="LOOKALIKE_DOMAIN" />؟</translation> @@ -2120,6 +2125,7 @@ <translation id="5288393065350884210">محاسبة ومراجعة مالية</translation> <translation id="5289384342738547352">معالجة المستندات المتعددة</translation> <translation id="5291770543968339335">{DAYS_UNTIL_DEADLINE,plural, =1{يجب إجراء التحديث اليوم.}=2{يجب إجراء التحديث بحلول الغد.}zero{يجب إجراء التحديث في غضون # يوم.}few{يجب إجراء التحديث في غضون # أيام.}many{يجب إجراء التحديث في غضون # يومًا.}other{يجب إجراء التحديث في غضون # يوم.}}</translation> +<translation id="5292714443869769806">الانتقال إلى إعدادات <ph name="OPERATING_SYSTEM" /></translation> <translation id="5293919335876685914">سيارات كوبيه</translation> <translation id="5296589789433599000">طهي ووصفات طعام</translation> <translation id="5299298092464848405">خطأ في تحليل السياسة</translation> @@ -2427,6 +2433,7 @@ <translation id="5951495562196540101">لا يمكن التسجيل باستخدام حساب المستهلك (الترخيص المجمّع متوفّر).</translation> <translation id="5953516610448771166">لا تتوفّر ميزة "النسخ النصي التلقائي" لهذه الوسائط. للحصول على الشرح، يمكنك إيقاف <ph name="CONTENT_SETTINGS" /> على هذا الموقع الإلكتروني.</translation> <translation id="5955063559762970069">فنادق وأماكن إقامة</translation> +<translation id="595873925609605681">إذا لم تعمل ميزات الموقع الإلكتروني، <ph name="BEGIN_LINK" />جرِّب السماح مؤقتًا بملفات تعريف الارتباط التابعة لجهات خارجية<ph name="END_LINK" />.</translation> <translation id="5963413905009737549">قسم</translation> <translation id="5964247741333118902">المحتوى المضمَّن</translation> <translation id="5967260682280773804">36 × 48 بوصة</translation> @@ -2730,6 +2737,7 @@ <translation id="6556866813142980365">إعادة</translation> <translation id="6557715786897013164">14 × 17 بوصة</translation> <translation id="6560786330438719938">التطبيقات المثبّتة أو التي تم إلغاء تثبيتها ومعدّل استخدامها</translation> +<translation id="6567084950885568327">التحكّم في أجهزة MIDI وإعادة برمجتها</translation> <translation id="6568793038316600992">زر إدارة طرق الدفع: انقر على هذا الزر لإدارة الدفعات ومعلومات بطاقة الائتمان في إعدادات Chrome.</translation> <translation id="6569060085658103619">أنت تعرض صفحة إضافة</translation> <translation id="6569366777234823130">أفلام درامية</translation> @@ -2896,6 +2904,7 @@ <ph name="END_LIST" /></translation> <translation id="691024665142758461">تنزيل ملفات متعددة</translation> <translation id="6915804003454593391">المستخدم:</translation> +<translation id="6916193791494646625">أدخِل سببًا للتنزيل (مطلوب).</translation> <translation id="6916954549222464607">إدارة وتخطيط الشؤون المالية</translation> <translation id="6917795328362592458">استُخدمت كلمة المرور التي أدخلتها للتو في عملية اختراق للبيانات. لتأمين حساباتك، ينصح "مدير كلمات المرور" في Google بالتحقّق من كلمات المرور المحفوظة.</translation> <translation id="6925267999184670015">B+ شمال أمريكا</translation> @@ -3097,6 +3106,7 @@ <translation id="7308436126008021607">المزامنة في الخلفية</translation> <translation id="7310392214323165548">ستتم إعادة تشغيل الجهاز قريبًا.</translation> <translation id="7311244614769792472">لم يتم العثور على نتائج.</translation> +<translation id="7311837626618954149">يحظر Chromium المواقع الإلكترونية من استخدام ملفات تعريف الارتباط التابعة لجهات خارجية لتتبُّع نشاطك أثناء التصفُّح.</translation> <translation id="7319430975418800333">A3</translation> <translation id="7320336641823683070">المساعدة بشأن الاتصال</translation> <translation id="7323804146520582233">إخفاء قسم "<ph name="SECTION" />"</translation> @@ -3188,6 +3198,8 @@ <translation id="7465036432780054056">سيتم إعلام <ph name="EMBEDDED_URL" /> بأنّك زرت <ph name="TOP_LEVEL_URL" />.</translation> <translation id="7465963048299965912">10 × 13 بوصة</translation> <translation id="7469935732330206581">النموذج غير آمن</translation> +<translation id="7470854469646445678">أدخِل سببًا للنسخ (مطلوب).</translation> +<translation id="7471007961486718967">أدخِل سببًا للنقل (مطلوب).</translation> <translation id="7473891865547856676">لا، شكرًا</translation> <translation id="7481312909269577407">إلى الأمام</translation> <translation id="7481603210197454575">ظرف إيطالي</translation> @@ -3234,6 +3246,7 @@ <translation id="7550637293666041147">اسم مستخدم الجهاز واسم مستخدم Chrome</translation> <translation id="7551484245293639699">تأمين على السفر</translation> <translation id="7552846755917812628">جرّب النصائح التالية:</translation> +<translation id="7554242657529665960">رسالة من المشرف: <ph name="ADMIN_MESSAGE" /></translation> <translation id="7554475479213504905">إعادة التحميل والعرض على أيّ حال</translation> <translation id="7554791636758816595">علامة تبويب جديدة</translation> <translation id="7555777498260651025">برامج تلفزيونية للأسرة</translation> @@ -3350,6 +3363,7 @@ <translation id="7744505202669469867">جدول العناوين المحفوظة</translation> <translation id="774634243536837715">تم حظر المحتوى الخطير.</translation> <translation id="7748758200357401411">قطع غيار من سوق السيارات الثانوي للسيارات العالية الأداء</translation> +<translation id="7751019142333897329"><ph name="FIRST_STRING" /> <ph name="SECOND_STRING" /></translation> <translation id="7751971323486164747">تخصيص أحجام الخطوط وأنماطها في Chrome</translation> <translation id="7752995774971033316">غير مُدار</translation> <translation id="7754587126786572336">سيتم إغلاق علامات تبويب Chrome وتطبيقاته عند بدء التحديث</translation> @@ -3430,6 +3444,7 @@ <translation id="7942349550061667556">أحمر</translation> <translation id="7943397946612013052">تنزيل الملفات محظور</translation> <translation id="7943893128817522649">السماح للموقع الإلكتروني بطلب تنزيل ملفات متعدّدة تلقائيًا</translation> +<translation id="794567586469801724">نظام التشغيل macOS</translation> <translation id="7946724693008564269">لغة تم التعرّف عليها</translation> <translation id="7947285636476623132">تحقق من عام انتهاء الصلاحية وأعِد المحاولة مرة أخرى</translation> <translation id="7947813448670013867"><ph name="SEE_CHROME_TIPS_FOCUSED_FRIENDLY_MATCH_TEXT" />: اضغط على مفتاح التبويب (Tab) ثم Enter للتعرّف على ميزات Chrome.</translation> @@ -3690,6 +3705,7 @@ <translation id="8428213095426709021">الإعدادات</translation> <translation id="8428634594422941299">حسنًا</translation> <translation id="8431194080598727332"><ph name="MANAGE_COOKIES_FOCUSED_FRIENDLY_MATCH_TEXT" />، اضغط على مفتاح التبويب (Tab) ثم مفتاح Enter لإدارة الإعدادات المفضّلة لملفات تعريف الارتباط في إعدادات متصفّح Chrome.</translation> +<translation id="8432419784006585012">السماح للموقع الإلكتروني بطلب استخدام أجهزة MIDI</translation> <translation id="8433057134996913067">سيؤدي هذا إلى خروجك من معظم المواقع الإلكترونية.</translation> <translation id="8434014327286137412">للدفع بشكل أسرع في المرة المقبلة، احفظ رقم الحساب بصيغة IBAN في حسابك على Google.</translation> <translation id="8434840396568290395">حيوانات أليفة</translation> @@ -3737,6 +3753,7 @@ <translation id="853246364274116957">مسرح موسيقي وبرودواي</translation> <translation id="853332391023689529">شاحنات نقل</translation> <translation id="8533619373899488139">انتقِل إلى <strong>chrome://policy</strong> للاطّلاع على قائمة عناوين URL المحظورة والسياسات الأخرى التي يفرضها مشرف النظام.</translation> +<translation id="8534934518812659742">لقد أوقفت إذن <ph name="PERMISSION" /> في Chrome.</translation> <translation id="8536234749087605613">ظرف (نافذة)</translation> <translation id="8539500321752640291">هل تريد السماح بهذين الإذنين؟</translation> <translation id="8541158209346794904">جهاز بلوتوث</translation> @@ -3747,6 +3764,7 @@ <translation id="8543181531796978784">يمكنك <ph name="BEGIN_ERROR_LINK" />الإبلاغ عن اكتشاف مشكلة<ph name="END_ERROR_LINK" /> أو، إذا كنت تدرك المخاطر المتعلقة بالأمان، يمكنك <ph name="BEGIN_LINK" />زيارة هذا الموقع غير الآمن<ph name="END_LINK" />.</translation> <translation id="8544303911974837265">بوليستر</translation> <translation id="854548366864113872">خيار السعر العالي</translation> +<translation id="8546254312340305428">أدخِل سببًا للتحميل (مطلوب).</translation> <translation id="8546350655047701518">تصدير السجلّات بتنسيق JSON</translation> <translation id="8546667245446052521">ورق (أرشفة)</translation> <translation id="854892890027593466">ظرف C6/C5</translation> @@ -4076,6 +4094,7 @@ <translation id="939736085109172342">مجلد جديد</translation> <translation id="940053046584497293">سفر ووسائل نقل</translation> <translation id="944540589955480312">استخدام كلمات المرور ومفاتيح المرور المحفوظة في حسابك على Google</translation> +<translation id="945646848072568856">يحظر Chrome المواقع الإلكترونية من استخدام ملفات تعريف الارتباط التابعة لجهات خارجية لتتبُّع نشاطك أثناء التصفُّح.</translation> <translation id="945855313015696284">يجب التحقُّق من المعلومات الواردة أدناه وحذف أي بطاقات غير صالحة</translation> <translation id="947370374845726940"><ph name="CREATE_GOOGLE_SITE_FOCUSED_FRIENDLY_MATCH_TEXT" />: اضغط على مفتاح التبويب (Tab) ثم Enter لإنشاء موقع إلكتروني جديد في "مواقع Google" بسرعة.</translation> <translation id="947974362755924771">{COUNT,plural, =0{سيُعيد متصفّح Chrome تقييد ملفات تعريف الارتباط اليوم}=1{سيُعيد متصفّح Chrome تقييد ملفات تعريف الارتباط غدًا}two{يتبقى يومان على إعادة تقييد ملفات تعريف الارتباط في متصفّح Chrome}few{يتبقى # أيام على إعادة تقييد ملفات تعريف الارتباط في متصفّح Chrome}many{يتبقى # يومًا على إعادة تقييد ملفات تعريف الارتباط في متصفّح Chrome}other{يتبقى # يوم على إعادة تقييد ملفات تعريف الارتباط في متصفّح Chrome}}</translation>
diff --git a/components/strings/components_strings_be.xtb b/components/strings/components_strings_be.xtb index 82798b15..045aeb83 100644 --- a/components/strings/components_strings_be.xtb +++ b/components/strings/components_strings_be.xtb
@@ -1193,6 +1193,7 @@ <translation id="3427342743765426898">&Узнавіць змену</translation> <translation id="342781501876943858">Chromium рэкамендуе скінуць ваш пароль, калі вы карысталіся ім на іншых сайтах.</translation> <translation id="3428151540071562330">Адзін або некалькі URI шаблонаў сервераў з палітыкі DnsOverHttpsTemplates няправільныя і выкарыстоўвацца не будуць.</translation> +<translation id="3428789896412418755">Згрупаваная гісторыя</translation> <translation id="3431216045099978607">Націсніце |<ph name="ACCELERATOR" />|, каб выйсці з поўнаэкраннага рэжыму і паглядзець спампоўку.</translation> <translation id="3432601291244612633">Закрыць старонку</translation> <translation id="3433111389595862568">Праграмнае забеспячэнне для сумеснай працы і канферэнцый</translation> @@ -3178,6 +3179,7 @@ <translation id="7423283032694727565">Кнопка "Кіраваць файламі cookie". Каб кіраваць параметрамі файлаў cookie праз налады Chrome, націсніце яе.</translation> <translation id="7427366580982928791">Бяспека дзяцей у інтэрнэце</translation> <translation id="7429429656042611765">Executive</translation> +<translation id="7432774160230062882">Пацвердзіце сваю асобу, каб запоўніць плацежную інфармацыю ў Chromium.</translation> <translation id="7437289804838430631">Дадаць кантактную інфармацыю</translation> <translation id="7437490109271760224">Картачныя гульні</translation> <translation id="7438338505272634288">На сайце, які вы спрабуеце наведаць, дзейнічаюць зламыснікі. Яны могуць падманам прымусіць вас усталяваць шкоднае праграмнае забеспячэнне, якое перашкаджае прагляду змесціва ў інтэрнэце (напрыклад, змяняе галоўную старонку ці паказвае дадатковую рэкламу на сайтах). Chrome настойліва рэкамендуе вярнуцца на бяспечную старонку, каб пазбегнуць шкоды. <ph name="BEGIN_LEARN_MORE_LINK" />Даведацца больш<ph name="END_LEARN_MORE_LINK" /></translation> @@ -3412,6 +3414,7 @@ <translation id="7831993212387676366">Што такое спіс пакупак?</translation> <translation id="7840103971441592723">Здыманне экрана пачалося</translation> <translation id="784137052867620416">Статыстыка купляў</translation> +<translation id="784404208867107517">Згрупаваная гісторыя</translation> <translation id="7844689747373518809">{COUNT,plural, =0{Няма}=1{1 праграма (<ph name="EXAMPLE_APP_1" />)}=2{2 праграмы (<ph name="EXAMPLE_APP_1" />, <ph name="EXAMPLE_APP_2" />)}one{# праграма (<ph name="EXAMPLE_APP_1" />, <ph name="EXAMPLE_APP_2" />, <ph name="AND_MORE" />)}few{# праграмы (<ph name="EXAMPLE_APP_1" />, <ph name="EXAMPLE_APP_2" />, <ph name="AND_MORE" />)}many{# праграм (<ph name="EXAMPLE_APP_1" />, <ph name="EXAMPLE_APP_2" />, <ph name="AND_MORE" />)}other{# праграмы (<ph name="EXAMPLE_APP_1" />, <ph name="EXAMPLE_APP_2" />, <ph name="AND_MORE" />)}}</translation> <translation id="7855695075675558090"><ph name="TOTAL_LABEL" /> <ph name="FORMATTED_TOTAL_AMOUNT" /> <ph name="CURRENCY_CODE" /></translation> <translation id="7857116075376571629">Сайты, якія вы будзеце наведваць пазней, могуць запытваць у браўзера Chrome тэмы, каб персаналізаваць для вас рэкламу. Chrome абагульвае не больш за 3 тэмы. Пры гэтым гісторыя прагляду вамі сайтаў і звесткі, якія маглі б раскрыць вашу асобу, застаюцца пад надзейнай абаронай.</translation> @@ -3438,6 +3441,7 @@ <translation id="79338296614623784">Увядзіце сапраўдны нумар тэлефона</translation> <translation id="7934414805353235750"><ph name="URL" /> запытвае дазвол на прайграванне абароненага змесціва. Google спраўдзіць ідэнтыфікатар вашай прылады.</translation> <translation id="7935318582918952113">DOM Distiller</translation> +<translation id="7936775433939783906">Пацвердзіце сваю асобу, каб запоўніць плацежную інфармацыю ў Google Chrome.</translation> <translation id="7937163678541954811">Код CVC карткі будзе зашыфраваны і захаваны на гэтай прыладзе для больш хуткай аплаты</translation> <translation id="7937554595067888181">Тэрмін дзеяння: <ph name="EXPIRATION_DATE_ABBR" /></translation> <translation id="7938958445268990899">Сертыфікат сервера яшчэ не сапраўдны.</translation>
diff --git a/components/strings/components_strings_bs.xtb b/components/strings/components_strings_bs.xtb index f121f17..1f25e583 100644 --- a/components/strings/components_strings_bs.xtb +++ b/components/strings/components_strings_bs.xtb
@@ -1193,6 +1193,7 @@ <translation id="3427342743765426898">&Poništi uređivanje</translation> <translation id="342781501876943858">Chromium preporučuje ponovno postavljanje lozinke ukoliko ste je iskoristili na drugim web lokacijama.</translation> <translation id="3428151540071562330">Jedan ili više URI-ja šablona servera DnsOverHttpsTemplates su nevažeći i neće se koristiti.</translation> +<translation id="3428789896412418755">Grupirana povijest</translation> <translation id="3431216045099978607">Pritisnite |<ph name="ACCELERATOR" />| da izađete iz prikaza preko cijelog ekrana i vidite preuzimanje.</translation> <translation id="3432601291244612633">Zatvori stranicu</translation> <translation id="3433111389595862568">Softver za saradnju i konferencije</translation> @@ -3178,6 +3179,7 @@ <translation id="7423283032694727565">Dugme Upravljaj kolačićima, aktivirajte da upravljate postavkama za kolačiće u postavkama Chromea</translation> <translation id="7427366580982928791">Sigurnost djece na internetu</translation> <translation id="7429429656042611765">Executive</translation> +<translation id="7432774160230062882">Potvrdite svoj identitet kako bi Chromium mogao unijeti vaše podatke o plaćanju.</translation> <translation id="7437289804838430631">Dodaj kontakt podatke</translation> <translation id="7437490109271760224">Kartaške igre</translation> <translation id="7438338505272634288">Napadači na web lokaciji koju pokušavate posjetiti vas mogu prevariti da instalirate štetan softver koji utiče na način na koji pregledate internet – naprimjer, promjenom početne stranice ili prikazivanjem dodatnih oglasa na web lokacijama koje posjetite. Chrome strogo preporučuje da se vratite na sigurne web lokacije radi izbjegavanja štete. <ph name="BEGIN_LEARN_MORE_LINK" />Saznajte više<ph name="END_LEARN_MORE_LINK" /></translation> @@ -3412,6 +3414,7 @@ <translation id="7831993212387676366">Šta je lista za kupovinu?</translation> <translation id="7840103971441592723">Snimanje ekrana nije pokrenuto</translation> <translation id="784137052867620416">Uvidi u kupovinu</translation> +<translation id="784404208867107517">Grupirana povijest</translation> <translation id="7844689747373518809">{COUNT,plural, =0{Ništa}=1{1 aplikacija (<ph name="EXAMPLE_APP_1" />)}=2{2 aplikacije (<ph name="EXAMPLE_APP_1" />, <ph name="EXAMPLE_APP_2" />)}one{# aplikacija (<ph name="EXAMPLE_APP_1" />, <ph name="EXAMPLE_APP_2" />, <ph name="AND_MORE" />)}few{# aplikacije (<ph name="EXAMPLE_APP_1" />, <ph name="EXAMPLE_APP_2" />, <ph name="AND_MORE" />)}other{# aplikacija (<ph name="EXAMPLE_APP_1" />, <ph name="EXAMPLE_APP_2" />, <ph name="AND_MORE" />)}}</translation> <translation id="7855695075675558090"><ph name="TOTAL_LABEL" /> <ph name="CURRENCY_CODE" /> <ph name="FORMATTED_TOTAL_AMOUNT" /></translation> <translation id="7857116075376571629">Kasnije, web lokacija koju ste posjetili može zatražiti od Chromea vaše teme da personalizira oglase koje vidite. Chrome dijeli najviše 3 teme i štiti vašu historiju pregledanja i vaš identitet.</translation> @@ -3438,6 +3441,7 @@ <translation id="79338296614623784">Unesite važeći broj telefona</translation> <translation id="7934414805353235750">URL <ph name="URL" /> želi reproducirati zaštićeni sadržaj. Google će potvrditi identitet vašeg uređaja.</translation> <translation id="7935318582918952113">DOM Distiller</translation> +<translation id="7936775433939783906">Potvrdite svoj identitet kako bi Google Chrome mogao unijeti vaše podatke o plaćanju.</translation> <translation id="7937163678541954811">CVC kartice će se šifrirati i sačuvati na uređaj radi bržeg nastavka na plaćanje</translation> <translation id="7937554595067888181">Ističe <ph name="EXPIRATION_DATE_ABBR" /></translation> <translation id="7938958445268990899">Potvrda sa servera još uvijek nije ispravna.</translation>
diff --git a/components/strings/components_strings_eu.xtb b/components/strings/components_strings_eu.xtb index 08ef0c9..4320fda 100644 --- a/components/strings/components_strings_eu.xtb +++ b/components/strings/components_strings_eu.xtb
@@ -98,6 +98,7 @@ <translation id="1178581264944972037">Pausatu</translation> <translation id="1178821169867863726">30,48 × 40,64 cm (12 × 16 in)</translation> <translation id="1181037720776840403">Kendu</translation> +<translation id="1181381397492575884">Arakatzen duzun bitartean hirugarrenen cookieen bidez zure jarraipena egitea galarazten die Chrome-k webguneei. Joan ezarpenetara <ph name="LINK" />.</translation> <translation id="1186201132766001848">Egiaztatu pasahitzak</translation> <translation id="1190491977647722791">Papera (astuna)</translation> <translation id="1195073053842921378">Helbidea gailutik ezabatuko da</translation> @@ -118,6 +119,7 @@ <translation id="1225570101506606926">Billarra</translation> <translation id="1225607422885279949">Deskontuak bilatuko dizkizu Google-k</translation> <translation id="1227224963052638717">Gidalerro ezezaguna.</translation> +<translation id="1227677022489889280">Mugitzeko arrazoia (beharrezkoa)</translation> <translation id="1228893227497259893">Entitate-identifikatzaile okerra</translation> <translation id="1230244617745022071"><ph name="SOURCE" /> (automatikoki hauteman da)</translation> <translation id="1232569758102978740">Izengabea</translation> @@ -1041,6 +1043,7 @@ <translation id="3140646734028448730">Enpresa-zerbitzuak</translation> <translation id="3141093262818886744">Ireki halere</translation> <translation id="3141641372357166056">Ez da hartu baimenaren inguruko erabakirik</translation> +<translation id="3142736425087361223">Chrome-k zure <ph name="PERMISSION" /> erabiltzeko baimena behar du <ph name="ORIGIN" /> webgunean erabiltzeko</translation> <translation id="3144458715650412431">Probako gidalerroak aplikatu dira. Haiek berrikusteko eta berrezartzeko, joan chrome://policy/test atalera. Administratzaileen gidalerroak ez dira aplikatuko.</translation> <translation id="3145945101586104090">Ezin izan da deskodetu erantzuna</translation> <translation id="3150653042067488994">Aldi baterako zerbitzariko errorea</translation> @@ -1201,6 +1204,7 @@ <translation id="3447644283769633681">Blokeatu hirugarrenen cookie guztiak</translation> <translation id="3447661539832366887">Gailuaren jabeak Dinosaur jokoa desaktibatu du.</translation> <translation id="3447884698081792621">Erakutsi ziurtagiria (jaulkitzailea: <ph name="ISSUER" />)</translation> +<translation id="3450323514459570273">Zure MIDI gailuak kontrolatu eta berriro programatzeko eska dezake</translation> <translation id="3452404311384756672">Eskuratzeko denbora tartea:</translation> <translation id="3453962258458347894">Saiakera kopurua</translation> <translation id="3461266716147554923"><ph name="URL" /> webguneak arbelean kopiatzen dituzun testuak eta irudiak ikusi nahi ditu</translation> @@ -1995,6 +1999,7 @@ <translation id="5045550434625856497">Pasahitz okerra</translation> <translation id="5051305769747448211">Zuzeneko komedia</translation> <translation id="5056425809654826431">{NUM_FILES,plural, =1{Fitxategia Nearby Share bidez bidaltzeko, egin tokia (<ph name="DISK_SPACE_SIZE" />) gailuan}other{Fitxategiak Nearby Share bidez bidaltzeko, egin tokia (<ph name="DISK_SPACE_SIZE" />) gailuan}}</translation> +<translation id="505757197798929356">Irekitzeko arrazoia (beharrezkoa)</translation> <translation id="5060419232449737386">Azpitituluen ezarpenak</translation> <translation id="5060483733937416656"><ph name="PROVIDER_ORIGIN" /> darabilten webguneetan Windows Hello-rekin egiaztatzea aukeratu duzu. Baliteke hornitzaile horrek zure ordainketa-metodoari buruzko informazioa gorde izatea, baina <ph name="LINK_TEXT" />.</translation> <translation id="5061227663725596739"><ph name="LOOKALIKE_DOMAIN" /> esan nahi al zenuen?</translation> @@ -2112,6 +2117,7 @@ <translation id="5288393065350884210">Kontabilitatea eta auditoretzak</translation> <translation id="5289384342738547352">Dokumentu bat baino gehiago kudeatzea</translation> <translation id="5291770543968339335">{DAYS_UNTIL_DEADLINE,plural, =1{Gaur eguneratu behar da}=2{Bihar baino lehen eguneratu behar da}other{# eguneko epean eguneratu behar da}}</translation> +<translation id="5292714443869769806">Joan <ph name="OPERATING_SYSTEM" /> sistema eragilearen ezarpenetara</translation> <translation id="5293919335876685914">Coupéak</translation> <translation id="5296589789433599000">Sukaldaritza eta errezetak</translation> <translation id="5299298092464848405">Errore bat gertatu da gidalerroak analizatzean</translation> @@ -2419,6 +2425,7 @@ <translation id="5951495562196540101">Ezin da kontsumitzaile-kontuarekin erregistratu (paketatutako lizentzia eskuragarri).</translation> <translation id="5953516610448771166">Istanteko azpitituluak ez daude erabilgarri multimedia-eduki honetan. Azpitituluak ikusi ahal izateko, blokeatu webgune honen <ph name="CONTENT_SETTINGS" />.</translation> <translation id="5955063559762970069">Hotelak eta ostatuak</translation> +<translation id="595873925609605681">Webgunearen eginbideek funtzionatzen ez badute, <ph name="BEGIN_LINK" />onartu hirugarrenen cookieak aldi baterako<ph name="END_LINK" />.</translation> <translation id="5963413905009737549">Atala</translation> <translation id="5964247741333118902">Eduki kapsulatua</translation> <translation id="5967260682280773804">91,44 × 121,92 cm (36 × 48 in)</translation> @@ -2721,6 +2728,7 @@ <translation id="6556866813142980365">Berregin</translation> <translation id="6557715786897013164">35,56 × 43,18 cm (14 × 17 in)</translation> <translation id="6560786330438719938">Instalatuta edo desinstalatuta dauden aplikazioak eta zer maiztasunekin erabiltzen diren</translation> +<translation id="6567084950885568327">MIDI gailuak kontrolatzea eta berriro programatzea</translation> <translation id="6568793038316600992">Ordainketa-metodoak kudeatzeko botoia: aktiba ezazu ordainketak eta kreditu-txartelaren informazioa kudeatzeko Chrome-ren ezarpenetan</translation> <translation id="6569060085658103619">Luzapen baten orria ari zara ikusten</translation> <translation id="6569366777234823130">Drama-filmak</translation> @@ -2887,6 +2895,7 @@ <ph name="END_LIST" /></translation> <translation id="691024665142758461">Hainbat fitxategi deskargatu.</translation> <translation id="6915804003454593391">Erabiltzailea:</translation> +<translation id="6916193791494646625">Deskargatzeko arrazoia (beharrezkoa)</translation> <translation id="6916954549222464607">Finantzen planifikazioa eta kudeaketa</translation> <translation id="6917795328362592458">Erabili berri duzun pasahitza datuen isilpekotasunaren urratze batean aurkitu da. Kontuak babesteko, Pasahitz-kudeatzailea aplikazioak gordeta dauzkazun pasahitzak seguruak direla egiaztatzea gomendatzen du.</translation> <translation id="6925267999184670015">B+ iparramerikarra</translation> @@ -3088,6 +3097,7 @@ <translation id="7308436126008021607">atzeko planoko sinkronizazioa</translation> <translation id="7310392214323165548">Gailua laster berrabiaraziko da</translation> <translation id="7311244614769792472">Ez da aurkitu emaitzarik</translation> +<translation id="7311837626618954149">Arakatzen duzun bitartean hirugarrenen cookieen bidez zure jarraipena egitea galarazten die Chromium-ek webguneei.</translation> <translation id="7319430975418800333">A3</translation> <translation id="7320336641823683070">Konexioari buruzko laguntza</translation> <translation id="7323804146520582233">Ezkutatu "<ph name="SECTION" />" atala</translation> @@ -3179,6 +3189,8 @@ <translation id="7465036432780054056"><ph name="EMBEDDED_URL" /> webguneak <ph name="TOP_LEVEL_URL" /> bisitatu duzula jakingo du</translation> <translation id="7465963048299965912">25,4 × 33,02 cm (10 × 13 in)</translation> <translation id="7469935732330206581">Inprimakia ez da segurua</translation> +<translation id="7470854469646445678">Kopiatzeko arrazoia (beharrezkoa)</translation> +<translation id="7471007961486718967">Transferitzeko arrazoia (beharrezkoa)</translation> <translation id="7473891865547856676">Ez, eskerrik asko</translation> <translation id="7481312909269577407">Aurrera</translation> <translation id="7481603210197454575">Gutun-azal italiarra</translation> @@ -3225,6 +3237,7 @@ <translation id="7550637293666041147">Gailuko eta Chrome-ko erabiltzaile-izenak</translation> <translation id="7551484245293639699">Bidaia-aseguruak</translation> <translation id="7552846755917812628">Saiatu hauek egiten:</translation> +<translation id="7554242657529665960">Zure administratzaileak dio: "<ph name="ADMIN_MESSAGE" />"</translation> <translation id="7554475479213504905">Kargatu berriro eta erakutsi, hala ere</translation> <translation id="7554791636758816595">Fitxa berria</translation> <translation id="7555777498260651025">Familientzako saioak</translation> @@ -3341,6 +3354,7 @@ <translation id="7744505202669469867">Gordetako helbideen taula</translation> <translation id="774634243536837715">Eduki arriskutsua blokeatu da.</translation> <translation id="7748758200357401411">Errendimendu handiko eta saldu ondoko auto-piezak</translation> +<translation id="7751019142333897329"><ph name="FIRST_STRING" /> <ph name="SECOND_STRING" /></translation> <translation id="7751971323486164747">Kudeatu letra-tamaina eta -tipoa Chrome-n</translation> <translation id="7752995774971033316">Kudeatu gabe</translation> <translation id="7754587126786572336">Eguneratzen hastean, Chrome-ko fitxak eta aplikazioak itxi egingo dira</translation> @@ -3421,6 +3435,7 @@ <translation id="7942349550061667556">Gorria</translation> <translation id="7943397946612013052">Deskargatzeko aukera blokeatuta dago</translation> <translation id="7943893128817522649">Fitxategi bat baino gehiago automatikoki deskargatzea eska dezake</translation> +<translation id="794567586469801724">macOS</translation> <translation id="7946724693008564269">Hautemandako hizkuntza</translation> <translation id="7947285636476623132">Egiaztatu iraungitze-urtea eta saiatu berriro</translation> <translation id="7947813448670013867"><ph name="SEE_CHROME_TIPS_FOCUSED_FRIENDLY_MATCH_TEXT" />: sakatu tabuladorea eta, ondoren, "Sartu" Chrome-ren eginbideei buruzko informazioa lortzeko</translation> @@ -3679,6 +3694,7 @@ <translation id="8428213095426709021">Ezarpenak</translation> <translation id="8428634594422941299">Ados</translation> <translation id="8431194080598727332"><ph name="MANAGE_COOKIES_FOCUSED_FRIENDLY_MATCH_TEXT" />, sakatu tabuladorea eta, ondoren, sakatu Sartu Chrome-ren ezarpenetara joan, eta cookieen hobespenak kudeatzeko</translation> +<translation id="8432419784006585012">MIDI gailuak erabiltzeko eska dezake</translation> <translation id="8433057134996913067">Hori eginez gero, webgune gehienetako saioa amaituko duzu.</translation> <translation id="8434014327286137412">Hurrengoan bizkorrago ordaintzeko, gorde IBANa Google-ko kontuan</translation> <translation id="8434840396568290395">Konpainia-animaliak</translation> @@ -3702,7 +3718,7 @@ <translation id="8473863474539038330">Helbideak eta beste</translation> <translation id="8474910779563686872">Erakutsi garatzailearen xehetasunak</translation> <translation id="8479754468255770962">Grapa bat behean, ezkerretara</translation> -<translation id="8479926481822108747">Jarraipenaren aurkako babesak kudeatzeko</translation> +<translation id="8479926481822108747">jarraipenaren aurkako babesak kudeatzeko</translation> <translation id="8483229036294884935">Helbidea zure Google-ko kontutik (<ph name="ACCOUNT" />) ezabatuko da</translation> <translation id="8488350697529856933">Honi aplikatzen zaio:</translation> <translation id="8490137692873530638">10. pilatzailea</translation> @@ -3726,6 +3742,7 @@ <translation id="853246364274116957">Broadway eta musikal-antzokiak</translation> <translation id="853332391023689529">Pickup kamioiak</translation> <translation id="8533619373899488139">Joan <strong>chrome://policy</strong> orrira sistemaren administratzaileak blokeatutako URLen zerrenda eta aplikatutako gidalerroak ikusteko.</translation> +<translation id="8534934518812659742">Kendu egin diozu <ph name="PERMISSION" /> erabiltzeko baimena Chrome-ri.</translation> <translation id="8536234749087605613">Gutun-azala (leihoduna)</translation> <translation id="8539500321752640291">Mikrofonoa eta kamera erabiltzeko baimenak eman nahi dizkiozu?</translation> <translation id="8541158209346794904">Bluetooth bidezko gailua</translation> @@ -3736,6 +3753,7 @@ <translation id="8543181531796978784"><ph name="BEGIN_ERROR_LINK" />Detekzio-arazoaren berri eman dezakezu<ph name="END_ERROR_LINK" /> edo, segurtasunari eragiten dioten arriskuak ulertzen badituzu, <ph name="BEGIN_LINK" />webgune ez-segurura joan zaitezke<ph name="END_LINK" />.</translation> <translation id="8544303911974837265">Poliesterra</translation> <translation id="854548366864113872">Aukera garestia</translation> +<translation id="8546254312340305428">Kargatzeko arrazoia (beharrezkoa)</translation> <translation id="8546350655047701518">Esportatu erregistroak JSONera</translation> <translation id="8546667245446052521">Papera (artxibistikoa)</translation> <translation id="854892890027593466">C6/C5 gutun-azala</translation> @@ -4064,6 +4082,7 @@ <translation id="939736085109172342">Karpeta berria</translation> <translation id="940053046584497293">Bidaiak eta garraioa</translation> <translation id="944540589955480312">Erabili Google-ko kontuan gordetako pasahitzak eta sarbide-gakoak</translation> +<translation id="945646848072568856">Arakatzen duzun bitartean hirugarrenen cookieen bidez zure jarraipena egitea galarazten die Chrome-k webguneei.</translation> <translation id="945855313015696284">Egiaztatu beheko informazioa eta ezabatu txartel baliogabeak</translation> <translation id="947370374845726940"><ph name="CREATE_GOOGLE_SITE_FOCUSED_FRIENDLY_MATCH_TEXT" />: sakatu tabuladorea eta, ondoren, "Sartu", Google Sites-en webgune bat bizkor sortzeko</translation> <translation id="947974362755924771">{COUNT,plural, =0{Gaur mugatuko ditu cookieak berriro Chrome-k}=1{Bihar mugatuko ditu cookieak berriro Chrome-k}other{# egun barru mugatuko ditu cookieak berriro Chrome-k}}</translation>
diff --git a/components/strings/components_strings_hr.xtb b/components/strings/components_strings_hr.xtb index abf7bf3..741d753 100644 --- a/components/strings/components_strings_hr.xtb +++ b/components/strings/components_strings_hr.xtb
@@ -1193,6 +1193,7 @@ <translation id="3427342743765426898">&Ponovi uređivanje</translation> <translation id="342781501876943858">Chromium preporučuje poništavanje zaporke ako ste je upotrebljavali za druge web-lokacije.</translation> <translation id="3428151540071562330">Jedan ili više URI-ja predloška poslužitelja DnsOverHttpsTemplates nije točan i neće se koristiti.</translation> +<translation id="3428789896412418755">Grupirana povijest</translation> <translation id="3431216045099978607">Pritisnite |<ph name="ACCELERATOR" />| da biste zatvorili prikaz na cijelom zaslonu i vidjeli preuzimanje.</translation> <translation id="3432601291244612633">Zatvori stranicu</translation> <translation id="3433111389595862568">Softver za suradnju i konferencije</translation> @@ -3177,6 +3178,7 @@ <translation id="7423283032694727565">Gumb Upravljaj kolačićima, aktivirajte ga za upravljanje postavkama kolačića u postavkama Chromea</translation> <translation id="7427366580982928791">Sigurnost djece na internetu</translation> <translation id="7429429656042611765">Executive</translation> +<translation id="7432774160230062882">Potvrdite svoj identitet kako bi Chromium mogao unijeti vaše podatke o plaćanju.</translation> <translation id="7437289804838430631">Dodajte podatke za kontakt</translation> <translation id="7437490109271760224">Kartaške igre</translation> <translation id="7438338505272634288">Napadači na web-lokaciji koju pokušavate posjetiti mogu vas na prijevaru navesti da instalirate štetan softver koji utječe na način na koji pregledavate, primjerice promjenom početne stranice ili prikazivanjem dodatnih oglasa na web-lokacijama koje posjetite. Chrome preporučuje povratak u sigurnost kako biste izbjegli štetu. <ph name="BEGIN_LEARN_MORE_LINK" />Saznajte više<ph name="END_LEARN_MORE_LINK" /></translation> @@ -3411,6 +3413,7 @@ <translation id="7831993212387676366">Što je popis za kupnju?</translation> <translation id="7840103971441592723">Snimanje zaslona je počelo</translation> <translation id="784137052867620416">Uvidi za Shopping</translation> +<translation id="784404208867107517">Grupirana povijest</translation> <translation id="7844689747373518809">{COUNT,plural, =0{Ništa}=1{1 aplikacija (<ph name="EXAMPLE_APP_1" />)}=2{2 aplikacije (<ph name="EXAMPLE_APP_1" />, <ph name="EXAMPLE_APP_2" />)}one{# aplikacija (<ph name="EXAMPLE_APP_1" />, <ph name="EXAMPLE_APP_2" />, <ph name="AND_MORE" />)}few{# aplikacije (<ph name="EXAMPLE_APP_1" />, <ph name="EXAMPLE_APP_2" />, <ph name="AND_MORE" />)}other{# aplikacija (<ph name="EXAMPLE_APP_1" />, <ph name="EXAMPLE_APP_2" />, <ph name="AND_MORE" />)}}</translation> <translation id="7855695075675558090"><ph name="TOTAL_LABEL" /> <ph name="CURRENCY_CODE" /> <ph name="FORMATTED_TOTAL_AMOUNT" /></translation> <translation id="7857116075376571629">Web-lokacija koju posjetite nakon toga može od Chromea tražiti vaše teme kako bi personalizirala oglase koji će vam se prikazivati. Chrome dijeli do tri teme istovremeno štiteći vašu povijest pregledavanja i identitet.</translation> @@ -3437,6 +3440,7 @@ <translation id="79338296614623784">Unesite važeći telefonski broj</translation> <translation id="7934414805353235750"><ph name="URL" /> želi reproducirati zaštićeni sadržaj. Identitet vašeg uređaja potvrdit će Google.</translation> <translation id="7935318582918952113">DOM Distiller</translation> +<translation id="7936775433939783906">Potvrdite svoj identitet kako bi Google Chrome mogao unijeti vaše podatke o plaćanju.</translation> <translation id="7937163678541954811">CVC te kartice šifrirat će se i spremiti na vaš uređaj radi brže naplate</translation> <translation id="7937554595067888181">Istječe <ph name="EXPIRATION_DATE_ABBR" /></translation> <translation id="7938958445268990899">Certifkat poslužitelja još nije valjan.</translation>
diff --git a/components/strings/components_strings_iw.xtb b/components/strings/components_strings_iw.xtb index 18bab82..8ad88cf 100644 --- a/components/strings/components_strings_iw.xtb +++ b/components/strings/components_strings_iw.xtb
@@ -349,6 +349,7 @@ <translation id="1640244768702815859">יש לנסות <ph name="BEGIN_LINK" />להיכנס לדף הבית של האתר<ph name="END_LINK" />.</translation> <translation id="1641976391427233992">עיכוב הפלט עד</translation> <translation id="164212631332220697">תשלום בקופה עם <ph name="CARD_DETAIL" />.</translation> +<translation id="1643651787397909318">ניגשים ללחצן בדיקת האבטחה ב-Chrome, מפעילים אותו כדי להיכנס לדף בדיקת האבטחה ב-Chrome בהגדרות</translation> <translation id="1644574205037202324">היסטוריה</translation> <translation id="1645368109819982629">פרוטוקול לא נתמך</translation> <translation id="1650602712345345441">ניהול הגדרות Chrome</translation> @@ -2052,6 +2053,8 @@ <translation id="5137761395480718572">האפליקציה הזו מבקשת הרשאה להתקין פרטי כניסה ל-Wi-Fi. לאחר ההגדרה, <ph name="DEVICE_TYPE" /> יתחבר באופן אוטומטי לרשתות ה-Wi-Fi הקיימות. כדי להסיר את פרטי הכניסה האלה, צריך להסיר את האפליקציה. <ph name="LEARN_MORE" /></translation> <translation id="5138014172396933048">הכרטיס הווירטואלי לא זמין כרגע. עליך לפנות לבנק</translation> <translation id="5138227688689900538">פחות מידע</translation> +<translation id="5143309888746105072">Chromium מונע מאתרים להשתמש בקובצי Cookie של צד שלישי כדי לעקוב אחריך במהלך הגלישה. + <ph name="NEW_LINE" />אם תכונות האתר לא פועלות, <ph name="START_LINK" />כדאי לנסות להתיר את השימוש בקובצי Cookie של צד שלישי באופן זמני<ph name="END_LINK" />.</translation> <translation id="5145883236150621069">קיים קוד שגיאה בתגובת המדיניות</translation> <translation id="5146995429444047494">התראות של <ph name="ORIGIN" /> נחסמו</translation> <translation id="514704532284964975">נשלחה בקשה מהכתובת <ph name="URL" /> לראות ולשנות מידע במכשירי NFC בזמן ההקשה בטלפון</translation> @@ -2398,6 +2401,7 @@ <translation id="5873297634595728366">רכבי דיזל</translation> <translation id="5877831137320480913">יופי וכושר גופני</translation> <translation id="5879989559903563723">אין הרשאה במצב אורח</translation> +<translation id="5880050725127890683">מעבר אל בדיקת האבטחה ב-Chrome</translation> <translation id="5883861433316751031">רוצה לשלוט במכשירי MIDI ולתכנת אותם מחדש?</translation> <translation id="5884465125445718607">מעטפה – סינית 6</translation> <translation id="5887400589839399685">הכרטיס נשמר</translation> @@ -2579,6 +2583,7 @@ <translation id="6251906504834538140">{0,plural, =1{אין אפשרות להעביר את הקובץ}one{אין אפשרות להעביר <ph name="FILE_COUNT" /> קבצים}two{אין אפשרות להעביר <ph name="FILE_COUNT" /> קבצים}other{אין אפשרות להעביר <ph name="FILE_COUNT" /> קבצים}}</translation> <translation id="6252613631861574218"><ph name="MANAGE_CHROME_DOWNLOADS_FOCUSED_FRIENDLY_MATCH_TEXT" />, מקישים על Tab ואז על Enter כדי לנהל קבצים שהורדת ב-Chrome</translation> <translation id="6254436959401408446">אין מספיק זיכרון כדי לפתוח את הדף</translation> +<translation id="625463612687472648">ביטול ההרשאה</translation> <translation id="6259156558325130047">&ביצוע מחדש של שינוי סדר</translation> <translation id="6263376278284652872">סימניות <ph name="DOMAIN" /></translation> <translation id="6264376385120300461">להוריד בכל זאת</translation> @@ -2754,6 +2759,8 @@ <translation id="6596325263575161958">אפשרויות הצפנה</translation> <translation id="6597665340361269064">90 מעלות</translation> <translation id="6599642189720630047">מוצרים במעקב</translation> +<translation id="6606309334576464871">Chrome מונע מאתרים להשתמש בקובצי Cookie של צד שלישי כדי לעקוב אחריך במהלך הגלישה. + <ph name="NEW_LINE" />אם תכונות האתר לא פועלות, <ph name="START_LINK" />כדאי לנסות להתיר את השימוש בקובצי Cookie של צד שלישי באופן זמני<ph name="END_LINK" />.</translation> <translation id="6611723696964473273">חדשות כלכלה</translation> <translation id="6612010098632894193">סרטונים אונליין</translation> <translation id="6613866251791999074">מידע נוסף על מנוע החיפוש ב-Chrome</translation> @@ -3428,6 +3435,7 @@ <translation id="7888575728750733395">Rendering Intent בהדפסה</translation> <translation id="7894280532028510793">אם האיות תקין, <ph name="BEGIN_LINK" />יש לנסות להפעיל את אבחון הרשת<ph name="END_LINK" />.</translation> <translation id="7901831439558593470">מעטפה – 7x9 אינץ'</translation> +<translation id="7909498058929404306"><ph name="RUN_CHROME_SAFETY_CHECK_FOCUSED_FRIENDLY_MATCH_TEXT" />, לוחצים על Tab ואז על Enter כדי לעבור לדף בדיקת האבטחה ב-Chrome בהגדרות</translation> <translation id="7916162853251942238">Flexo Base</translation> <translation id="7927971017714848357">חלקות וקרקעות</translation> <translation id="793209273132572360">לעדכן את הכתובת?</translation> @@ -3723,6 +3731,7 @@ <translation id="8460854335417802511">להפעלת ההגדרה</translation> <translation id="8461694314515752532">הצפנת נתונים מסונכרנים בעזרת ביטוי סיסמה אישי לסנכרון</translation> <translation id="8466379296835108687">{COUNT,plural, =1{כרטיס אשראי אחד}one{# כרטיסי אשראי}two{שני כרטיסי אשראי}other{# כרטיסי אשראי}}</translation> +<translation id="8467494337615822642">מעבר לדף בדיקת האבטחה ב-Chrome בהגדרות</translation> <translation id="8468358362970107653">מעטפה – C3</translation> <translation id="8473626140772740486">300x450 מ"מ</translation> <translation id="8473863474539038330">כתובות ועוד</translation>
diff --git a/components/strings/components_strings_ms.xtb b/components/strings/components_strings_ms.xtb index e341427..9fbee75 100644 --- a/components/strings/components_strings_ms.xtb +++ b/components/strings/components_strings_ms.xtb
@@ -559,6 +559,7 @@ <translation id="2072275792380684364">Fesyen & gaya</translation> <translation id="2075497153347571252">Pentadbir anda telah menyekat <ph name="PERMISSION" /> pada <ph name="ORIGIN" /></translation> <translation id="2079545284768500474">Buat asal</translation> +<translation id="2080021694978766903">Dasar ini tidak boleh mengandungi lebih daripada <ph name="MAX_ITEMS_LIMIT" /> entri.</translation> <translation id="20817612488360358">Tetapan proksi sistem telah sedia untuk digunakan tetapi konfigurasi proksi jelas juga telah ditentukan.</translation> <translation id="2082238445998314030">Hasil carian <ph name="RESULT_NUMBER" /> daripada <ph name="TOTAL_RESULTS" /></translation> <translation id="2083256696566019397">Benarkan setiap kali melawat</translation> @@ -638,6 +639,7 @@ <translation id="2225927550500503913">Kad maya dihidupkan</translation> <translation id="2226636330183131181"><ph name="BEGIN_LINK" />Log masuk<ph name="END_LINK" /> ke rangkaian Wi-Fi</translation> <translation id="2228057197024893428">Alamat ini disimpan dalam Chrome pada masa ini. Untuk menggunakan alamat ini pada seluruh produk Google, simpan alamat ini dalam Google Account anda, <ph name="ACCOUNT" />.</translation> +<translation id="2229456043301340598">Pintasan tidak unik diabaikan: <ph name="SHORTCUT_NAME" /></translation> <translation id="2233745931693710080">Cakera Padat</translation> <translation id="2235344399760031203">Kuki pihak ketiga disekat</translation> <translation id="2239100178324503013">Hantar sekarang</translation> @@ -2333,6 +2335,7 @@ <translation id="5720705177508910913">Pengguna semasa</translation> <translation id="572328651809341494">Tab terbaharu</translation> <translation id="5723287205918986743">Industri pertahanan</translation> +<translation id="5725297205162868298">Pintasan tidak boleh dimulakan dengan aksara @: "<ph name="SHORTCUT_NAME" />"</translation> <translation id="5730040223043577876">Chrome mengesyorkan penetapan semula kata laluan jika anda menggunakan semula kata laluan itu di tapak lain.</translation> <translation id="5732392974455271431">Ibu bapa anda boleh menyahsekatnya untuk anda</translation> <translation id="573555826359077410">Butang buat borang, aktifkan untuk membuat borang baharu dalam Google Forms dengan pantas</translation> @@ -2850,6 +2853,7 @@ <translation id="6793213097893210590">Kadbod</translation> <translation id="679355240208270552">Diabaikan kerana carian lalai tidak didayakan oleh dasar.</translation> <translation id="6794951432696553238">Sahkan kad anda dengan lebih cepat dengan menggunakan Windows Hello mulai sekarang</translation> +<translation id="6798066466127540426">Senarai ini mengandungi penyedia carian yang tidak sah.</translation> <translation id="6798460514924505775">Sampul Chou 3</translation> <translation id="6799145206637008376">Isikan CVC untuk kad maya ini</translation> <translation id="6805030849054648206">Sampul B6/C4</translation> @@ -3239,6 +3243,7 @@ <translation id="7521825010239864438">Bahagian "<ph name="SECTION" />" disembunyikan</translation> <translation id="752189128961566325">Anda boleh menggunakan alamat ini merentas produk Google</translation> <translation id="7523408071729642236">Pembuatan</translation> +<translation id="7525804896095537619">Nama tidak boleh dibiarkan kosong</translation> <translation id="7526934274050461096">Sambungan anda ke tapak ini tidak berciri peribadi</translation> <translation id="7529884293139707752">Persekolahan di rumah</translation> <translation id="7534987659046836932">Sampul C7</translation> @@ -3460,6 +3465,7 @@ <translation id="7950027195171824198">Urus pilihan kuki anda dalam tetapan Chrome</translation> <translation id="7951415247503192394">(32-bit)</translation> <translation id="7952192831285741665">EDP Eropah</translation> +<translation id="7952250633095257243">Pintasan tidak boleh dibiarkan kosong</translation> <translation id="7952327717479677595">Butang urus enjin carian, aktifkan untuk mengurus enjin carian lalai dan carian laman anda</translation> <translation id="7953236668995583915">Muatkan semula halaman ini untuk menggunakan tetapan anda yang dikemaskinikan pada laman ini</translation> <translation id="7953569069500808819">Jahitan tepi atas</translation> @@ -3671,6 +3677,7 @@ <translation id="8344776605855290140">Pendaftaran kad maya dibuka pada ketinggian penuh</translation> <translation id="8347658365704983341">Pembelajaran jarak jauh</translation> <translation id="8349305172487531364">Bar penanda halaman</translation> +<translation id="8350416046273606058">Pintasan tidak boleh mengandungi ruang: "<ph name="SHORTCUT_NAME" />"</translation> <translation id="8351131234907093545">Buat nota</translation> <translation id="8352849934814541340">Pentadbir peranti ini telah memasang aplikasi untuk fungsi tambahan. Aplikasi memiliki akses kepada sesetengah data anda.</translation> <translation id="8355270400102541638">Konteks Ranap Sistem Setempat:</translation>
diff --git a/components/strings/components_strings_my.xtb b/components/strings/components_strings_my.xtb index 2a85a17..b4449732 100644 --- a/components/strings/components_strings_my.xtb +++ b/components/strings/components_strings_my.xtb
@@ -1195,6 +1195,7 @@ <translation id="3427342743765426898">&တည်းဖြတ်မှု ပြန်လုပ်ရန်</translation> <translation id="342781501876943858">အခြားဝဘ်ဆိုက်များတွင် သင့်စကားဝှက်ကို ပြန်သုံးထားပါက ၎င်းကို ပြင်ဆင်သတ်မှတ်ရန် Chromium က အကြံပြုပါသည်။</translation> <translation id="3428151540071562330">DnsOverHttpsTemplates ဆာဗာ နမူနာပုံစံ URI များအနက် တစ်ခုနှင့်အထက် မှားနေသဖြင့် အသုံးပြုမည်မဟုတ်ပါ။</translation> +<translation id="3428789896412418755">ဖွဲ့ထားသောမှတ်တမ်း</translation> <translation id="3431216045099978607">ဖန်သားပြင် အပြည့်မှ ထွက်ပြီး ဒေါင်းလုဒ်ကို ကြည့်ရန် |<ph name="ACCELERATOR" />| ကို နှိပ်ပါ။</translation> <translation id="3432601291244612633">စာမျက်နှာကို ပိတ်ရန်</translation> <translation id="3433111389595862568">ပူးတွဲထုတ်လုပ်ခြင်းနှင့် အစည်းအဝေးလုပ်ခြင်းဆိုင်ရာ ဆော့ဖ်ဝဲ</translation> @@ -3179,6 +3180,7 @@ <translation id="7423283032694727565">Chrome ဆက်တင်များတွင် သင့်ကွတ်ကီးသတ်မှတ်ချက်များကို စီမံရန်အတွက် ‘ကွတ်ကီးစီမံရန်’ ခလုတ်ကို နှိပ်နိုင်သည်</translation> <translation id="7427366580982928791">ကလေးအတွက် အင်တာနက်လုံခြုံမှု</translation> <translation id="7429429656042611765">အိတ်ဇက်ကူတစ်ဆိုဒ်</translation> +<translation id="7432774160230062882">သင့်ငွေချေအချက်အလက်တွင် Chromium ကဖြည့်နိုင်ရန် သင်ဖြစ်ကြောင်း အတည်ပြုနေသည်။</translation> <translation id="7437289804838430631">အဆက်အသွယ် အချက်အလက်ကို ထည့်ရန်</translation> <translation id="7437490109271760224">ဖဲဂိမ်းများ</translation> <translation id="7438338505272634288">တိုက်ခိုက်သူများက သင်ဝင်ကြည့်သောဝဘ်ဆိုက်များတွင် ပင်မစာမျက်နှာပြောင်းခြင်း (သို့) ထပ်ဆောင်းကြော်ငြာများ ပြခြင်းတို့ကဲ့သို့ သင်၏ ဘရောက်စ်လုပ်ခြင်းကို ထိခိုက်စေသော အန္တရာယ်ရှိသည့်ဆော့ဖ်ဝဲ ထည့်သွင်းရန် သင့်ကို လှည့်စားနိုင်သည်။ အန္တရာယ်ရှောင်ရှားရန်အတွက် ဘေးကင်းသည့် နောက်သို့ပြန်သွားရန် အလေးအနက် အကြံပြုပါသည်။ <ph name="BEGIN_LEARN_MORE_LINK" />ပိုမိုလေ့လာရန်<ph name="END_LEARN_MORE_LINK" /></translation> @@ -3413,6 +3415,7 @@ <translation id="7831993212387676366">‘စျေးဝယ်စာရင်း‘ ဆိုတာ ဘာလဲ။</translation> <translation id="7840103971441592723">ဖန်သားပြင် ပုံဖမ်းခြင်း စတင်လိုက်သည်</translation> <translation id="784137052867620416">Shopping သိကောင်းစရာများ</translation> +<translation id="784404208867107517">ဖွဲ့ထားသောမှတ်တမ်း</translation> <translation id="7844689747373518809">{COUNT,plural, =0{မရှိ}=1{အက်ပ် ၁ ခု (<ph name="EXAMPLE_APP_1" />)}=2{အက်ပ် ၂ ခု (<ph name="EXAMPLE_APP_1" />၊ <ph name="EXAMPLE_APP_2" />)}other{အက်ပ် # ခု (<ph name="EXAMPLE_APP_1" />၊ <ph name="EXAMPLE_APP_2" />၊ <ph name="AND_MORE" />)}}</translation> <translation id="7855695075675558090"><ph name="TOTAL_LABEL" /> <ph name="CURRENCY_CODE" /> <ph name="FORMATTED_TOTAL_AMOUNT" /></translation> <translation id="7857116075376571629">နောက်ပိုင်းတွင် သင်ဝင်ကြည့်သည့် ဝဘ်ဆိုက်က သင်မြင်ရမည့်ကြော်ငြာများကို ပုဂ္ဂိုလ်ရေးသီးသန့်ပြုလုပ်ရန် သင့်အကြောင်းအရာများကို Chrome ထံမှ တောင်းဆိုနိုင်သည်။ Chrome က အကြောင်းအရာ ၃ ခုအထိသာ မျှဝေပြီး သင့်ကြည့်ရှုမှုမှတ်တမ်းနှင့် အထောက်အထားကို ကာကွယ်ပေးသည်။</translation> @@ -3439,6 +3442,7 @@ <translation id="79338296614623784">မှန်ကန်သောဖုန်းနံပါတ်ကို ထည့်ပါ</translation> <translation id="7934414805353235750"><ph name="URL" /> သည် ကာကွယ်ထားသည့် အကြောင်းအရာကို ဖွင့်လိုသည်။ သင့်စက်ပစ္စည်း၏ အထောက်အထားကို Google က စိစစ်သွားပါမည်။</translation> <translation id="7935318582918952113">DOM စစ်ထုတ်ပေးသူ</translation> +<translation id="7936775433939783906">သင့်ငွေချေအချက်အလက်တွင် Google Chrome ကဖြည့်နိုင်ရန် သင်ဖြစ်ကြောင်း အတည်ပြုနေသည်။</translation> <translation id="7937163678541954811">ပိုမိုမြန်ဆန်စွာ ငွေရှင်းနိုင်ရန် ဤကတ်၏ CVC နံပါတ်ကို သင့်စက်တွင် အသွင်ဝှက်ပြီး သိမ်းပါမည်</translation> <translation id="7937554595067888181"><ph name="EXPIRATION_DATE_ABBR" /> တွင် သက်တမ်းကုန်မည်</translation> <translation id="7938958445268990899">ဆာဗာ၏ အသိမှတ်ပြုလက်မှတ် မမှန်ကန်ပါ။</translation>
diff --git a/components/strings/components_strings_uz.xtb b/components/strings/components_strings_uz.xtb index 8a41768..6b3612cb 100644 --- a/components/strings/components_strings_uz.xtb +++ b/components/strings/components_strings_uz.xtb
@@ -348,6 +348,7 @@ <translation id="1640244768702815859"><ph name="BEGIN_LINK" />Saytning bosh sahifasiga kirishga<ph name="END_LINK" /> urinib ko‘ring.</translation> <translation id="1641976391427233992">Natijalar chiqishini kechiktirish</translation> <translation id="164212631332220697">Hisob-kitob vaqtida <ph name="CARD_DETAIL" /> bilan toʻlang.</translation> +<translation id="1643651787397909318">Chrome xavfsizlik tekshiruvi tugmasi sozlamalarda Chrome xavfsizlik tekshiruviga kirish imkonini beradi</translation> <translation id="1644574205037202324">Tarix</translation> <translation id="1645368109819982629">Protokol qo‘llab-quvvatlanmaydi</translation> <translation id="1650602712345345441">Chrome sozlamalari orqali boshqarish</translation> @@ -2043,6 +2044,8 @@ <translation id="5137761395480718572">Bu ilova Wi-Fi maʼlumotlarini oʻrnatish uchun ruxsat soʻramoqda. Sozlashdan keyin <ph name="DEVICE_TYPE" /> qurilmasi tegishli Wi-Fi tarmoqlarga avtomatik ulanadi. Bu maʼlumotlarni olib tashlash uchun ilovani oʻchirib tashlang. <ph name="LEARN_MORE" /></translation> <translation id="5138014172396933048">Hozirda virtual karta mavjud emas. Bankka murojaat qiling</translation> <translation id="5138227688689900538">Kamroq chiqsin</translation> +<translation id="5143309888746105072">Chromium saytlarni kezishda sizni kuzatish uchun tashqi cookie fayllardan foydalanuvchi saytlarni bloklaydi. + <ph name="NEW_LINE" />Sayt funksiyalari ishlamay qolsa, <ph name="START_LINK" />tashqi cookie fayllariga vaqtincha ruxsat bering<ph name="END_LINK" />.</translation> <translation id="5145883236150621069">Siyosat javobida xato kodi bor</translation> <translation id="5146995429444047494"><ph name="ORIGIN" /> bildirishnomalari bloklandi</translation> <translation id="514704532284964975">Telefonga teginganingizda <ph name="URL" /> sayti NFC qurilmalarni koʻrmoqchi va ulardagi axborotni oʻzgartirmoqchi</translation> @@ -2388,6 +2391,7 @@ <translation id="5873297634595728366">Dizel transport vositalari</translation> <translation id="5877831137320480913">Goʻzallik va fitnes</translation> <translation id="5879989559903563723">Mehmon rejimida ruxsat berilmagan</translation> +<translation id="5880050725127890683">Chrome xavfsizlik tekshiruviga kirish</translation> <translation id="5883861433316751031">MIDI qurilmalar boshqarilsinmi va qayta dasturlansinmi?</translation> <translation id="5884465125445718607">Envelope Chinese #6</translation> <translation id="5887400589839399685">Karta saqlandi</translation> @@ -2568,6 +2572,7 @@ <translation id="6251906504834538140">{0,plural, =1{Faylni koʻchirish taqiqlangan}other{<ph name="FILE_COUNT" /> ta faylni koʻchirish taqiqlangan}}</translation> <translation id="6252613631861574218"><ph name="MANAGE_CHROME_DOWNLOADS_FOCUSED_FRIENDLY_MATCH_TEXT" />, Chromeda yuklab olingan fayllarni boshqarish uchun avval Tab, keyin Enter tugmasini bosing</translation> <translation id="6254436959401408446">Sahifani ochish uchun xotira yetishmayapti</translation> +<translation id="625463612687472648">Ruxsat bekor qilinsin</translation> <translation id="6259156558325130047">&Qayta tartiblashni qaytarish</translation> <translation id="6263376278284652872"><ph name="DOMAIN" /> xatcho‘plari</translation> <translation id="6264376385120300461">Baribir yuklab olish</translation> @@ -2743,6 +2748,8 @@ <translation id="6596325263575161958">Shifrlash parametrlari</translation> <translation id="6597665340361269064">90 daraja</translation> <translation id="6599642189720630047">Kuzatiladigan mahsulotlar</translation> +<translation id="6606309334576464871">Chrome saytlarni kezishda sizni kuzatish uchun tashqi cookie fayllardan foydalanuvchi saytlarni bloklaydi. + <ph name="NEW_LINE" />Sayt funksiyalari ishlamay qolsa, <ph name="START_LINK" />tashqi cookie fayllariga vaqtincha ruxsat bering<ph name="END_LINK" />.</translation> <translation id="6611723696964473273">Iqtisodiyot yangiliklari</translation> <translation id="6612010098632894193">Onlayn video</translation> <translation id="6613866251791999074">Chromedagi qidiruv tizimi haqida batafsil</translation> @@ -3417,6 +3424,7 @@ <translation id="7888575728750733395">Bosma uchun rangli renderlash usuli</translation> <translation id="7894280532028510793">Xatosiz kiritilgan boʻlsa, <ph name="BEGIN_LINK" />Tarmoq diagnostikasini<ph name="END_LINK" /> ishga tushiring.</translation> <translation id="7901831439558593470">Envelope 7 x 9 in</translation> +<translation id="7909498058929404306"><ph name="RUN_CHROME_SAFETY_CHECK_FOCUSED_FRIENDLY_MATCH_TEXT" />, sozlamalarda Chrome xavfsizlik tekshiruvi sahifasiga kirish uchun Tab tugmasini, keyin Enter tugmasini bosing</translation> <translation id="7916162853251942238">Flekso bosib chiqarish uchun asos</translation> <translation id="7927971017714848357">Yer uchastkalari</translation> <translation id="793209273132572360">Manzil yangilansinmi?</translation> @@ -3712,6 +3720,7 @@ <translation id="8460854335417802511">Yoqish</translation> <translation id="8461694314515752532">Sinxronlangan ma’lumotlarni kodli ibora bilan shifrlash</translation> <translation id="8466379296835108687">{COUNT,plural, =1{1 ta kredit karta}other{# ta kredit karta}}</translation> +<translation id="8467494337615822642">Sozlamalarda Chrome xavfsizlik tekshiruvi sahifasiga kirish</translation> <translation id="8468358362970107653">Envelope C3</translation> <translation id="8473626140772740486">300 x 450 mm</translation> <translation id="8473863474539038330">Mazillar va boshqa ma’lumotlar</translation>
diff --git a/components/supervised_user/core/browser/BUILD.gn b/components/supervised_user/core/browser/BUILD.gn index 4076b01d..81950956 100644 --- a/components/supervised_user/core/browser/BUILD.gn +++ b/components/supervised_user/core/browser/BUILD.gn
@@ -2,10 +2,6 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -if (is_android) { - import("//build/config/android/rules.gni") -} - static_library("supervised_user_preferences") { sources = [ "supervised_user_preferences.cc", @@ -15,6 +11,7 @@ deps = [ "//base", "//components/keyed_service/core", + "//components/pref_registry:pref_registry", "//components/prefs", "//components/supervised_user/core/browser/proto", "//components/supervised_user/core/common", @@ -220,9 +217,3 @@ "//ui/base", ] } - -if (is_android) { - java_cpp_enum("supervised_user_url_filter_enum_javagen") { - sources = [ "supervised_user_url_filter.h" ] - } -}
diff --git a/components/supervised_user/core/browser/child_account_service.h b/components/supervised_user/core/browser/child_account_service.h index 3c44b27..37265bf 100644 --- a/components/supervised_user/core/browser/child_account_service.h +++ b/components/supervised_user/core/browser/child_account_service.h
@@ -13,7 +13,6 @@ #include "base/memory/raw_ptr.h" #include "base/memory/weak_ptr.h" #include "components/keyed_service/core/keyed_service.h" -#include "components/pref_registry/pref_registry_syncable.h" #include "components/signin/public/identity_manager/identity_manager.h" #include "components/supervised_user/core/browser/list_family_members_service.h" #include "components/supervised_user/core/browser/proto/kidschromemanagement_messages.pb.h" @@ -42,10 +41,6 @@ public: enum class AuthState { AUTHENTICATED, NOT_AUTHENTICATED, PENDING }; - static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterBooleanPref(prefs::kChildAccountStatusKnown, false); - } - ChildAccountService(const ChildAccountService&) = delete; ChildAccountService& operator=(const ChildAccountService&) = delete;
diff --git a/components/supervised_user/core/browser/child_account_service_unittest.cc b/components/supervised_user/core/browser/child_account_service_unittest.cc index 26ff0b0..7f4e0ce 100644 --- a/components/supervised_user/core/browser/child_account_service_unittest.cc +++ b/components/supervised_user/core/browser/child_account_service_unittest.cc
@@ -67,10 +67,7 @@ identity_test_environment_->identity_manager()); settings_service_.Init(syncable_pref_service_.user_prefs_store()); - SupervisedUserService::RegisterProfilePrefs( - syncable_pref_service_.registry()); - ChildAccountService::RegisterProfilePrefs( - syncable_pref_service_.registry()); + supervised_user::RegisterProfilePrefs(syncable_pref_service_.registry()); // Set the user to be supervised. supervised_user::EnableParentalControls(GetUserPerferences());
diff --git a/components/supervised_user/core/browser/parental_control_metrics_unittest.cc b/components/supervised_user/core/browser/parental_control_metrics_unittest.cc index 503d490e..1753048 100644 --- a/components/supervised_user/core/browser/parental_control_metrics_unittest.cc +++ b/components/supervised_user/core/browser/parental_control_metrics_unittest.cc
@@ -23,6 +23,7 @@ #include "components/supervised_user/core/browser/supervised_user_settings_service.h" #include "components/supervised_user/core/browser/supervised_user_url_filter.h" #include "components/supervised_user/core/common/pref_names.h" +#include "components/supervised_user/core/common/supervised_user_utils.h" #include "components/supervised_user/test_support/supervised_user_url_filter_test_utils.h" #include "components/sync/test/mock_sync_service.h" #include "components/sync_preferences/testing_pref_service_syncable.h" @@ -33,10 +34,7 @@ class ParentalControlMetricsTest : public testing::Test { public: void SetUp() override { - supervised_user::SupervisedUserService::RegisterProfilePrefs( - pref_service_.registry()); - supervised_user::ChildAccountService::RegisterProfilePrefs( - pref_service_.registry()); + supervised_user::RegisterProfilePrefs(pref_service_.registry()); // Prepare args for the AsyncURLChecker. kids_chrome_management_client_ = @@ -134,8 +132,9 @@ TEST_F(ParentalControlMetricsTest, WebFilterTypeMetric) { // Override the value of prefs::kSupervisedUserSafeSites and // prefs::kDefaultSupervisedUserFilteringBehavior in default storage. - pref_service_.SetInteger(prefs::kDefaultSupervisedUserFilteringBehavior, - supervised_user::SupervisedUserURLFilter::ALLOW); + pref_service_.SetInteger( + prefs::kDefaultSupervisedUserFilteringBehavior, + static_cast<int>(supervised_user::FilteringBehavior::kAllow)); pref_service_.SetBoolean(prefs::kSupervisedUserSafeSites, true); // Tests filter "try to block mature sites". @@ -158,10 +157,11 @@ /*expected_count=*/1); // Tests filter "only allow certain sites". - pref_service_.SetInteger(prefs::kDefaultSupervisedUserFilteringBehavior, - supervised_user::SupervisedUserURLFilter::BLOCK); + pref_service_.SetInteger( + prefs::kDefaultSupervisedUserFilteringBehavior, + static_cast<int>(supervised_user::FilteringBehavior::kBlock)); filter_.SetDefaultFilteringBehavior( - supervised_user::SupervisedUserURLFilter::BLOCK); + supervised_user::FilteringBehavior::kBlock); histogram_tester_.ExpectBucketCount( supervised_user::SupervisedUserURLFilter:: GetWebFilterTypeHistogramNameForTest(), @@ -180,8 +180,9 @@ // needed, otherwise no report could be triggered by policies change or // OnNewDay(). Since the default values are the same of override values, the // WebFilterType doesn't change and no report here. - pref_service_.SetInteger(prefs::kDefaultSupervisedUserFilteringBehavior, - supervised_user::SupervisedUserURLFilter::ALLOW); + pref_service_.SetInteger( + prefs::kDefaultSupervisedUserFilteringBehavior, + static_cast<int>(supervised_user::FilteringBehavior::kAllow)); pref_service_.SetBoolean(prefs::kSupervisedUserSafeSites, true); // Tests daily report.
diff --git a/components/supervised_user/core/browser/supervised_user_metrics_service_unittest.cc b/components/supervised_user/core/browser/supervised_user_metrics_service_unittest.cc index 54d4c68..a526a33 100644 --- a/components/supervised_user/core/browser/supervised_user_metrics_service_unittest.cc +++ b/components/supervised_user/core/browser/supervised_user_metrics_service_unittest.cc
@@ -12,6 +12,7 @@ #include "components/prefs/testing_pref_service.h" #include "components/supervised_user/core/browser/supervised_user_url_filter.h" #include "components/supervised_user/core/common/pref_names.h" +#include "components/supervised_user/core/common/supervised_user_utils.h" #include "components/supervised_user/test_support/supervised_user_url_filter_test_utils.h" #include "testing/gtest/include/gtest/gtest.h" @@ -23,11 +24,11 @@ pref_service_.registry()); pref_service_.registry()->RegisterIntegerPref( prefs::kDefaultSupervisedUserFilteringBehavior, - supervised_user::SupervisedUserURLFilter::ALLOW); + static_cast<int>(supervised_user::FilteringBehavior::kAllow)); pref_service_.registry()->RegisterBooleanPref( prefs::kSupervisedUserSafeSites, true); filter_.SetDefaultFilteringBehavior( - supervised_user::SupervisedUserURLFilter::ALLOW); + supervised_user::FilteringBehavior::kAllow); filter_.SetFilterInitialized(true); supervised_user_metrics_service_ =
diff --git a/components/supervised_user/core/browser/supervised_user_pref_store.cc b/components/supervised_user/core/browser/supervised_user_pref_store.cc index b3c4313..871aa49 100644 --- a/components/supervised_user/core/browser/supervised_user_pref_store.cc +++ b/components/supervised_user/core/browser/supervised_user_pref_store.cc
@@ -26,6 +26,7 @@ #include "components/supervised_user/core/common/features.h" #include "components/supervised_user/core/common/pref_names.h" #include "components/supervised_user/core/common/supervised_user_constants.h" +#include "components/supervised_user/core/common/supervised_user_utils.h" #include "components/sync/base/user_selectable_type.h" #include "components/sync/service/sync_prefs.h" #include "extensions/buildflags/buildflags.h" @@ -129,8 +130,9 @@ prefs_ = std::make_unique<PrefValueMap>(); if (!settings.empty()) { // Set hardcoded prefs and defaults. - prefs_->SetInteger(prefs::kDefaultSupervisedUserFilteringBehavior, - supervised_user::SupervisedUserURLFilter::ALLOW); + prefs_->SetInteger( + prefs::kDefaultSupervisedUserFilteringBehavior, + static_cast<int>(supervised_user::FilteringBehavior::kAllow)); if (base::FeatureList::IsEnabled( supervised_user::kForceGoogleSafeSearchForSupervisedUsers)) {
diff --git a/components/supervised_user/core/browser/supervised_user_preferences.cc b/components/supervised_user/core/browser/supervised_user_preferences.cc index a2b30c2..3719fc9 100644 --- a/components/supervised_user/core/browser/supervised_user_preferences.cc +++ b/components/supervised_user/core/browser/supervised_user_preferences.cc
@@ -137,6 +137,22 @@ } } +void RegisterProfilePrefs(PrefRegistrySimple* registry) { + registry->RegisterStringPref(prefs::kSupervisedUserId, std::string()); + registry->RegisterDictionaryPref(prefs::kSupervisedUserManualHosts); + registry->RegisterDictionaryPref(prefs::kSupervisedUserManualURLs); + registry->RegisterIntegerPref(prefs::kDefaultSupervisedUserFilteringBehavior, + static_cast<int>(FilteringBehavior::kAllow)); + registry->RegisterBooleanPref(prefs::kSupervisedUserSafeSites, true); + for (const char* pref : kCustodianInfoPrefs) { + registry->RegisterStringPref(pref, std::string()); + } + registry->RegisterIntegerPref( + prefs::kFirstTimeInterstitialBannerState, + static_cast<int>(FirstTimeInterstitialBannerState::kUnknown)); + registry->RegisterBooleanPref(prefs::kChildAccountStatusKnown, false); +} + void EnableParentalControls(PrefService& pref_service) { pref_service.SetString(prefs::kSupervisedUserId, supervised_user::kChildAccountSUID);
diff --git a/components/supervised_user/core/browser/supervised_user_preferences.h b/components/supervised_user/core/browser/supervised_user_preferences.h index 873bb9c..bd95e84 100644 --- a/components/supervised_user/core/browser/supervised_user_preferences.h +++ b/components/supervised_user/core/browser/supervised_user_preferences.h
@@ -5,6 +5,7 @@ #ifndef COMPONENTS_SUPERVISED_USER_CORE_BROWSER_SUPERVISED_USER_PREFERENCES_H_ #define COMPONENTS_SUPERVISED_USER_CORE_BROWSER_SUPERVISED_USER_PREFERENCES_H_ +#include "components/prefs/pref_registry_simple.h" #include "components/prefs/pref_service.h" #include "components/supervised_user/core/browser/proto/kidschromemanagement_messages.pb.h" @@ -13,11 +14,13 @@ // family. namespace supervised_user { +// Register preferences that describe parental controls. void RegisterFamilyPrefs( PrefService& pref_service, const kids_chrome_management::ListFamilyMembersResponse& response); +void RegisterProfilePrefs(PrefRegistrySimple* registry); -// Sets preferences that describe parental controls. +// Set preferences that describe parental controls. void EnableParentalControls(PrefService& pref_service); void DisableParentalControls(PrefService& pref_service);
diff --git a/components/supervised_user/core/browser/supervised_user_preferences_unittest.cc b/components/supervised_user/core/browser/supervised_user_preferences_unittest.cc index 7632314d..0e29d80 100644 --- a/components/supervised_user/core/browser/supervised_user_preferences_unittest.cc +++ b/components/supervised_user/core/browser/supervised_user_preferences_unittest.cc
@@ -8,33 +8,38 @@ #include "components/prefs/testing_pref_service.h" #include "components/supervised_user/core/common/pref_names.h" #include "components/supervised_user/core/common/supervised_user_constants.h" +#include "components/supervised_user/core/common/supervised_user_utils.h" #include "components/supervised_user/test_support/kids_chrome_management_test_utils.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" +namespace supervised_user { namespace { using ::testing::IsEmpty; using ::testing::Not; -} // namespace - class SupervisedUserPreferencesTest : public ::testing::Test { public: void SetUp() override { - pref_service_.registry()->RegisterStringPref(prefs::kSupervisedUserId, - std::string()); - pref_service_.registry()->RegisterBooleanPref( - prefs::kChildAccountStatusKnown, false); - for (const char* pref : supervised_user::kCustodianInfoPrefs) { - pref_service_.registry()->RegisterStringPref(pref, std::string()); - } + auto* registry = pref_service_.registry(); + supervised_user::RegisterProfilePrefs(registry); } protected: TestingPrefServiceSimple pref_service_; }; +TEST_F(SupervisedUserPreferencesTest, RegisterProfilePrefs) { + // Checks the preference registration from the Setup. + EXPECT_EQ( + pref_service_.GetInteger(prefs::kDefaultSupervisedUserFilteringBehavior), + static_cast<int>(supervised_user::FilteringBehavior::kAllow)); + EXPECT_EQ(pref_service_.GetBoolean(prefs::kSupervisedUserSafeSites), true); + // TODO(b/306376651): When we migrate more preference reading methods in this + // library, add more test cases for their correct default values. +} + TEST_F(SupervisedUserPreferencesTest, ToggleParentalControls) { supervised_user::EnableParentalControls(pref_service_); EXPECT_EQ(pref_service_.GetString(prefs::kSupervisedUserId), @@ -100,3 +105,6 @@ } } } + +} // namespace +} // namespace supervised_user
diff --git a/components/supervised_user/core/browser/supervised_user_service.cc b/components/supervised_user/core/browser/supervised_user_service.cc index 3e03faf..4027d69 100644 --- a/components/supervised_user/core/browser/supervised_user_service.cc +++ b/components/supervised_user/core/browser/supervised_user_service.cc
@@ -19,7 +19,6 @@ #include "base/version.h" #include "build/build_config.h" #include "components/google/core/common/google_util.h" -#include "components/pref_registry/pref_registry_syncable.h" #include "components/prefs/pref_service.h" #include "components/signin/public/identity_manager/identity_manager.h" #include "components/supervised_user/core/browser/kids_chrome_management_client.h" @@ -29,6 +28,7 @@ #include "components/supervised_user/core/common/features.h" #include "components/supervised_user/core/common/pref_names.h" #include "components/supervised_user/core/common/supervised_user_constants.h" +#include "components/supervised_user/core/common/supervised_user_utils.h" #include "components/sync/service/sync_service.h" #include "components/sync/service/sync_user_settings.h" #include "ui/base/l10n/l10n_util.h" @@ -42,23 +42,6 @@ url_filter_->RemoveObserver(this); } -// static -void SupervisedUserService::RegisterProfilePrefs( - user_prefs::PrefRegistrySyncable* registry) { - registry->RegisterStringPref(prefs::kSupervisedUserId, std::string()); - registry->RegisterDictionaryPref(prefs::kSupervisedUserManualHosts); - registry->RegisterDictionaryPref(prefs::kSupervisedUserManualURLs); - registry->RegisterIntegerPref(prefs::kDefaultSupervisedUserFilteringBehavior, - SupervisedUserURLFilter::ALLOW); - registry->RegisterBooleanPref(prefs::kSupervisedUserSafeSites, true); - for (const char* pref : kCustodianInfoPrefs) { - registry->RegisterStringPref(pref, std::string()); - } - registry->RegisterIntegerPref( - prefs::kFirstTimeInterstitialBannerState, - static_cast<int>(FirstTimeInterstitialBannerState::kUnknown)); -} - void SupervisedUserService::Init() { DCHECK(!did_init_); did_init_ = true; @@ -310,7 +293,7 @@ void SupervisedUserService::OnDefaultFilteringBehaviorChanged() { int behavior_value = user_prefs_->GetInteger(prefs::kDefaultSupervisedUserFilteringBehavior); - SupervisedUserURLFilter::FilteringBehavior behavior = + supervised_user::FilteringBehavior behavior = SupervisedUserURLFilter::BehaviorFromInt(behavior_value); url_filter_->SetDefaultFilteringBehavior(behavior); UpdateAsyncUrlChecker(); @@ -348,12 +331,12 @@ void SupervisedUserService::UpdateAsyncUrlChecker() { int behavior_value = user_prefs_->GetInteger(prefs::kDefaultSupervisedUserFilteringBehavior); - SupervisedUserURLFilter::FilteringBehavior behavior = + supervised_user::FilteringBehavior behavior = SupervisedUserURLFilter::BehaviorFromInt(behavior_value); bool use_online_check = IsSafeSitesEnabled() || - behavior == SupervisedUserURLFilter::FilteringBehavior::BLOCK; + behavior == supervised_user::FilteringBehavior::kBlock; if (use_online_check != url_filter_->HasAsyncURLChecker()) { if (use_online_check) {
diff --git a/components/supervised_user/core/browser/supervised_user_service.h b/components/supervised_user/core/browser/supervised_user_service.h index 7430d336..443c63ac 100644 --- a/components/supervised_user/core/browser/supervised_user_service.h +++ b/components/supervised_user/core/browser/supervised_user_service.h
@@ -37,10 +37,6 @@ class SyncService; } // namespace syncer -namespace user_prefs { -class PrefRegistrySyncable; -} // namespace user_prefs - namespace supervised_user { class SupervisedUserSettingsService; @@ -62,8 +58,6 @@ ~SupervisedUserService() override; - static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); - supervised_user::RemoteWebApprovalsManager& remote_web_approvals_manager() { return remote_web_approvals_manager_; }
diff --git a/components/supervised_user/core/browser/supervised_user_service_unittest.cc b/components/supervised_user/core/browser/supervised_user_service_unittest.cc index bf23647..7655cecf 100644 --- a/components/supervised_user/core/browser/supervised_user_service_unittest.cc +++ b/components/supervised_user/core/browser/supervised_user_service_unittest.cc
@@ -27,10 +27,12 @@ #include "components/signin/public/identity_manager/account_info.h" #include "components/signin/public/identity_manager/identity_test_environment.h" #include "components/supervised_user/core/browser/kids_chrome_management_client.h" +#include "components/supervised_user/core/browser/supervised_user_preferences.h" #include "components/supervised_user/core/browser/supervised_user_settings_service.h" #include "components/supervised_user/core/common/features.h" #include "components/supervised_user/core/common/pref_names.h" #include "components/supervised_user/core/common/supervised_user_constants.h" +#include "components/supervised_user/core/common/supervised_user_utils.h" #include "components/supervised_user/test_support/supervised_user_url_filter_test_utils.h" #include "components/sync/test/mock_sync_service.h" #include "components/sync_preferences/testing_pref_service_syncable.h" @@ -55,8 +57,7 @@ &test_url_loader_factory_), identity_test_env_.identity_manager()) { settings_service_.Init(syncable_pref_service_.user_prefs_store()); - SupervisedUserService::RegisterProfilePrefs( - syncable_pref_service_.registry()); + supervised_user::RegisterProfilePrefs(syncable_pref_service_.registry()); if (is_supervised) { syncable_pref_service_.SetString(prefs::kSupervisedUserId, kChildAccountSUID); @@ -154,7 +155,7 @@ // doesn't change and no report here. syncable_pref_service_.SetInteger( prefs::kDefaultSupervisedUserFilteringBehavior, - SupervisedUserURLFilter::ALLOW); + static_cast<int>(FilteringBehavior::kAllow)); syncable_pref_service_.SetBoolean(prefs::kSupervisedUserSafeSites, true); // Blocks `kExampleUrl0`. @@ -333,7 +334,7 @@ TEST_F(SupervisedUserServiceTest, MAYBE_DeprecatedFilterPolicy) { ASSERT_EQ(syncable_pref_service_.GetInteger( prefs::kDefaultSupervisedUserFilteringBehavior), - SupervisedUserURLFilter::ALLOW); + static_cast<int>(FilteringBehavior::kAllow)); EXPECT_DCHECK_DEATH(syncable_pref_service_.SetInteger( prefs::kDefaultSupervisedUserFilteringBehavior, /* SupervisedUserURLFilter::WARN */ 1));
diff --git a/components/supervised_user/core/browser/supervised_user_url_filter.cc b/components/supervised_user/core/browser/supervised_user_url_filter.cc index 87aa89a..30245a55 100644 --- a/components/supervised_user/core/browser/supervised_user_url_filter.cc +++ b/components/supervised_user/core/browser/supervised_user_url_filter.cc
@@ -33,17 +33,16 @@ namespace supervised_user { -SupervisedUserURLFilter::FilteringBehavior -GetBehaviorFromSafeSearchClassification( +supervised_user::FilteringBehavior GetBehaviorFromSafeSearchClassification( safe_search_api::Classification classification) { switch (classification) { case safe_search_api::Classification::SAFE: - return SupervisedUserURLFilter::ALLOW; + return FilteringBehavior::kAllow; case safe_search_api::Classification::UNSAFE: - return SupervisedUserURLFilter::BLOCK; + return FilteringBehavior::kBlock; } NOTREACHED(); - return SupervisedUserURLFilter::BLOCK; + return FilteringBehavior::kBlock; } bool IsSameDomain(const GURL& url1, const GURL& url2) { @@ -225,7 +224,7 @@ SupervisedUserURLFilter::SupervisedUserURLFilter( ValidateURLSupportCallback check_webstore_url_callback, std::unique_ptr<Delegate> service_delegate) - : default_behavior_(ALLOW), + : default_behavior_(FilteringBehavior::kAllow), service_delegate_(std::move(service_delegate)), blocking_task_runner_(base::ThreadPool::CreateTaskRunner( {base::MayBlock(), base::TaskPriority::BEST_EFFORT, @@ -271,9 +270,10 @@ } // static -SupervisedUserURLFilter::FilteringBehavior -SupervisedUserURLFilter::BehaviorFromInt(int behavior_value) { - DCHECK(behavior_value == ALLOW || behavior_value == BLOCK) +supervised_user::FilteringBehavior SupervisedUserURLFilter::BehaviorFromInt( + int behavior_value) { + DCHECK(behavior_value == static_cast<int>(FilteringBehavior::kAllow) || + behavior_value == static_cast<int>(FilteringBehavior::kBlock)) << "SupervisedUserURLFilter value not supported: " << behavior_value; return static_cast<FilteringBehavior>(behavior_value); } @@ -357,9 +357,9 @@ FilteringBehaviorReason reason, bool is_filtering_behavior_known) { switch (behavior) { - case ALLOW: + case FilteringBehavior::kAllow: return SupervisedUserFilterTopLevelResult::kAllow; - case BLOCK: + case FilteringBehavior::kBlock: switch (reason) { case FilteringBehaviorReason::ASYNC_CHECKER: return SupervisedUserFilterTopLevelResult::kBlockSafeSites; @@ -374,7 +374,7 @@ NOTREACHED(); } [[fallthrough]]; - case INVALID: + case FilteringBehavior::kInvalid: NOTREACHED(); } NOTREACHED(); @@ -387,7 +387,7 @@ FilteringBehaviorReason reason, bool is_filtering_behavior_known) { switch (behavior) { - case ALLOW: + case FilteringBehavior::kAllow: if (reason == FilteringBehaviorReason::ALLOWLIST) { return SupervisedUserSafetyFilterResult:: FILTERING_BEHAVIOR_ALLOW_ALLOWLIST; @@ -396,7 +396,7 @@ ? SupervisedUserSafetyFilterResult::FILTERING_BEHAVIOR_ALLOW : SupervisedUserSafetyFilterResult:: FILTERING_BEHAVIOR_ALLOW_UNCERTAIN; - case BLOCK: + case FilteringBehavior::kBlock: switch (reason) { case FilteringBehaviorReason::ASYNC_CHECKER: return SupervisedUserSafetyFilterResult:: @@ -415,7 +415,7 @@ NOTREACHED(); } [[fallthrough]]; - case INVALID: + case FilteringBehavior::kInvalid: NOTREACHED(); } return 0; @@ -443,7 +443,7 @@ value); } -SupervisedUserURLFilter::FilteringBehavior +supervised_user::FilteringBehavior SupervisedUserURLFilter::GetFilteringBehaviorForURL(const GURL& url) { supervised_user::FilteringBehaviorReason reason; return GetFilteringBehaviorForURL(url, &reason); @@ -467,7 +467,7 @@ return reason == supervised_user::FilteringBehaviorReason::MANUAL; } -SupervisedUserURLFilter::FilteringBehavior +supervised_user::FilteringBehavior SupervisedUserURLFilter::GetFilteringBehaviorForURL( const GURL& url, supervised_user::FilteringBehaviorReason* reason) { @@ -481,13 +481,13 @@ *reason = supervised_user::FilteringBehaviorReason::MANUAL; if (IsExemptedFromGuardianApproval(effective_url)) { - return ALLOW; + return FilteringBehavior::kAllow; } // Check manual denylists and allowlists. FilteringBehavior manual_result = GetManualFilteringBehaviorForURL(effective_url); - if (manual_result != INVALID) { + if (manual_result != FilteringBehavior::kInvalid) { return manual_result; } @@ -499,16 +499,16 @@ // There may be conflicting patterns, say, "allow *.google.com" and "block // www.google.*". To break the tie, we prefer blocklists over allowlists. // If there are no applicable manual overrides, we return INVALID. -SupervisedUserURLFilter::FilteringBehavior +supervised_user::FilteringBehavior SupervisedUserURLFilter::GetManualFilteringBehaviorForURL(const GURL& url) { - FilteringBehavior result = INVALID; + FilteringBehavior result = FilteringBehavior::kInvalid; std::optional<FilteringSubdomainConflictType> conflict_type = std::nullopt; // Records the conflict metrics when the current scope exits. base::ScopedClosureRunner histogram_recorder(base::BindOnce( [](const FilteringBehavior& result, const std::optional<FilteringSubdomainConflictType>& conflict_type) { - if (result != INVALID) { + if (result != FilteringBehavior::kInvalid) { // Record the potential conflict and its type. bool conflict = conflict_type.has_value(); UMA_HISTOGRAM_BOOLEAN(kManagedSiteListConflictHistogramName, @@ -525,22 +525,23 @@ // Check manual overrides for the exact URL. auto url_it = url_map_.find(url_matcher::util::Normalize(url)); if (url_it != url_map_.end()) { - result = url_it->second ? ALLOW : BLOCK; + result = + url_it->second ? FilteringBehavior::kAllow : FilteringBehavior::kBlock; } const std::string host = url.host(); - if (result != BLOCK) { + if (result != FilteringBehavior::kBlock) { // If there is a match with Block behaviour, set the result to Block. auto it = base::ranges::find_if( blocked_host_list_, [&host](const std::string& host_entry) { return HostMatchesPattern(host, host_entry); }); if (it != blocked_host_list_.end()) { - result = BLOCK; + result = FilteringBehavior::kBlock; } } - if (result == ALLOW) { + if (result == FilteringBehavior::kAllow) { // Return if there are no BLOCK matches and the resut is ALLOW from the // exact url search. return result; @@ -552,12 +553,12 @@ if (!HostMatchesPattern(host, host_entry)) { continue; } - if (result == INVALID) { + if (result == FilteringBehavior::kInvalid) { // If the result is still unset, there are no conflicts from the // blocklist. Set the result and exit the loop early. - result = ALLOW; + result = FilteringBehavior::kAllow; break; - } else if (result == BLOCK) { + } else if (result == FilteringBehavior::kBlock) { // The current matching allowed entry is a conflict. conflict_type = AddConflict( conflict_type, @@ -581,7 +582,7 @@ supervised_user::FilteringBehaviorReason::DEFAULT; FilteringBehavior behavior = GetFilteringBehaviorForURL(url, &reason); - if (behavior == ALLOW && + if (behavior == FilteringBehavior::kAllow && reason != supervised_user::FilteringBehaviorReason::DEFAULT) { std::move(callback).Run(behavior, reason, false); for (Observer& observer : observers_) { @@ -594,7 +595,7 @@ // Any non-default reason trumps the async checker. // Also, if we're blocking anyway, then there's no need to check it. if (reason != supervised_user::FilteringBehaviorReason::DEFAULT || - behavior == BLOCK || !async_url_checker_) { + behavior == FilteringBehavior::kBlock || !async_url_checker_) { std::move(callback).Run(behavior, reason, false); for (Observer& observer : observers_) { observer.OnURLChecked(url, behavior, reason, false); @@ -626,7 +627,7 @@ // If the reason is default and behavior is block and the subframe url is not // the same domain as the main frame, block the subframe. - if (behavior == FilteringBehavior::BLOCK && + if (behavior == FilteringBehavior::kBlock && !IsSameDomain(url, main_frame_url)) { // It is not in the same domain and is blocked. std::move(callback).Run(behavior, reason, false); @@ -646,7 +647,7 @@ default_behavior_ = behavior; } -SupervisedUserURLFilter::FilteringBehavior +supervised_user::FilteringBehavior SupervisedUserURLFilter::GetDefaultFilteringBehavior() const { return default_behavior_; } @@ -693,7 +694,7 @@ } void SupervisedUserURLFilter::Clear() { - default_behavior_ = ALLOW; + default_behavior_ = FilteringBehavior::kAllow; url_map_.clear(); allowed_host_list_.clear(); blocked_host_list_.clear(); @@ -718,7 +719,7 @@ SupervisedUserURLFilter::GetWebFilterType() const { // If the default filtering behavior is not block, it means the web filter // was set to either "allow all sites" or "try to block mature sites". - if (default_behavior_ == BLOCK) { + if (default_behavior_ == FilteringBehavior::kBlock) { return WebFilterType::kCertainSites; } @@ -790,7 +791,7 @@ // The parental setting may allow all sites to be visited. In such case, the // |async_url_checker_| will not be created. if (!async_url_checker_) { - std::move(callback).Run(FilteringBehavior::ALLOW, + std::move(callback).Run(FilteringBehavior::kAllow, supervised_user::FilteringBehaviorReason::DEFAULT, false); return true;
diff --git a/components/supervised_user/core/browser/supervised_user_url_filter.h b/components/supervised_user/core/browser/supervised_user_url_filter.h index 81058b9..32271417 100644 --- a/components/supervised_user/core/browser/supervised_user_url_filter.h +++ b/components/supervised_user/core/browser/supervised_user_url_filter.h
@@ -19,6 +19,7 @@ #include "components/safe_search_api/url_checker.h" #include "components/supervised_user/core/browser/supervised_user_error_page.h" #include "components/supervised_user/core/common/supervised_user_constants.h" +#include "components/supervised_user/core/common/supervised_user_utils.h" #include "ui/base/page_transition_types.h" class GURL; @@ -43,16 +44,6 @@ // sources. class SupervisedUserURLFilter { public: - // A Java counterpart will be generated for this enum. - // Values are stored in prefs under kDefaultSupervisedUserFilteringBehavior. - // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.superviseduser - enum FilteringBehavior { - ALLOW = 0, - // Deprecated, WARN = 1. - BLOCK = 2, - INVALID = 3, - }; - // This enum describes the filter types of Chrome, which is // set by Family Link App or at families.google.com/families. These values // are logged to UMA. Entries should not be renumbered and numeric values @@ -125,7 +116,7 @@ }; using FilteringBehaviorCallback = - base::OnceCallback<void(FilteringBehavior, + base::OnceCallback<void(supervised_user::FilteringBehavior, supervised_user::FilteringBehaviorReason, bool /* uncertain */)>;
diff --git a/components/supervised_user/core/browser/supervised_user_url_filter_unittest.cc b/components/supervised_user/core/browser/supervised_user_url_filter_unittest.cc index 093ff8b..af47e270 100644 --- a/components/supervised_user/core/browser/supervised_user_url_filter_unittest.cc +++ b/components/supervised_user/core/browser/supervised_user_url_filter_unittest.cc
@@ -14,6 +14,7 @@ #include "base/run_loop.h" #include "base/test/metrics/histogram_tester.h" #include "base/test/task_environment.h" +#include "components/supervised_user/core/common/supervised_user_utils.h" #include "components/supervised_user/test_support/supervised_user_url_filter_test_utils.h" #include "testing/gtest/include/gtest/gtest.h" #include "url/gurl.h" @@ -24,7 +25,7 @@ public SupervisedUserURLFilter::Observer { public: SupervisedUserURLFilterTest() { - filter_.SetDefaultFilteringBehavior(SupervisedUserURLFilter::BLOCK); + filter_.SetDefaultFilteringBehavior(FilteringBehavior::kBlock); filter_.AddObserver(this); } @@ -33,7 +34,7 @@ // SupervisedUserURLFilter::Observer: void OnSiteListUpdated() override { run_loop_.Quit(); } void OnURLChecked(const GURL& url, - SupervisedUserURLFilter::FilteringBehavior behavior, + supervised_user::FilteringBehavior behavior, supervised_user::FilteringBehaviorReason reason, bool uncertain) override { behavior_ = behavior; @@ -43,26 +44,26 @@ protected: bool IsURLAllowlisted(const std::string& url) { return filter_.GetFilteringBehaviorForURL(GURL(url)) == - SupervisedUserURLFilter::ALLOW; + FilteringBehavior::kAllow; } void ExpectURLInDefaultAllowlist(const std::string& url) { - ExpectURLCheckMatches(url, SupervisedUserURLFilter::ALLOW, + ExpectURLCheckMatches(url, FilteringBehavior::kAllow, supervised_user::FilteringBehaviorReason::DEFAULT); } void ExpectURLInDefaultDenylist(const std::string& url) { - ExpectURLCheckMatches(url, SupervisedUserURLFilter::BLOCK, + ExpectURLCheckMatches(url, FilteringBehavior::kBlock, supervised_user::FilteringBehaviorReason::DEFAULT); } void ExpectURLInManualAllowlist(const std::string& url) { - ExpectURLCheckMatches(url, SupervisedUserURLFilter::ALLOW, + ExpectURLCheckMatches(url, FilteringBehavior::kAllow, supervised_user::FilteringBehaviorReason::MANUAL); } void ExpectURLInManualDenylist(const std::string& url) { - ExpectURLCheckMatches(url, SupervisedUserURLFilter::BLOCK, + ExpectURLCheckMatches(url, FilteringBehavior::kBlock, supervised_user::FilteringBehaviorReason::MANUAL); } @@ -71,13 +72,13 @@ SupervisedUserURLFilter filter_ = SupervisedUserURLFilter( base::BindRepeating([](const GURL& url) { return false; }), std::make_unique<FakeURLFilterDelegate>()); - SupervisedUserURLFilter::FilteringBehavior behavior_; + supervised_user::FilteringBehavior behavior_; supervised_user::FilteringBehaviorReason reason_; private: void ExpectURLCheckMatches( const std::string& url, - SupervisedUserURLFilter::FilteringBehavior expected_behavior, + supervised_user::FilteringBehavior expected_behavior, supervised_user::FilteringBehaviorReason expected_reason, bool skip_manual_parent_filter = false) { bool called_synchronously = @@ -95,7 +96,7 @@ hosts["*.google.com"] = true; filter_.SetManualHosts(std::move(hosts)); - filter_.SetDefaultFilteringBehavior(SupervisedUserURLFilter::BLOCK); + filter_.SetDefaultFilteringBehavior(FilteringBehavior::kBlock); EXPECT_TRUE(IsURLAllowlisted("http://google.com")); EXPECT_TRUE(IsURLAllowlisted("http://google.com/")); @@ -120,7 +121,7 @@ hosts["example.com"] = true; filter_.SetManualHosts(std::move(hosts)); - filter_.SetDefaultFilteringBehavior(SupervisedUserURLFilter::BLOCK); + filter_.SetDefaultFilteringBehavior(FilteringBehavior::kBlock); ASSERT_TRUE(IsURLAllowlisted("http://example.com")); ASSERT_TRUE(IsURLAllowlisted("https://example.com")); @@ -193,7 +194,7 @@ } TEST_F(SupervisedUserURLFilterTest, Inactive) { - filter_.SetDefaultFilteringBehavior(SupervisedUserURLFilter::ALLOW); + filter_.SetDefaultFilteringBehavior(FilteringBehavior::kAllow); std::map<std::string, bool> hosts; hosts["google.com"] = true; @@ -209,7 +210,7 @@ hosts["123.123.123.123"] = true; filter_.SetManualHosts(std::move(hosts)); - filter_.SetDefaultFilteringBehavior(SupervisedUserURLFilter::BLOCK); + filter_.SetDefaultFilteringBehavior(FilteringBehavior::kBlock); EXPECT_TRUE(IsURLAllowlisted("http://123.123.123.123/")); EXPECT_FALSE(IsURLAllowlisted("http://123.123.123.124/")); @@ -359,14 +360,14 @@ hosts["mail.google.com"] = true; filter_.SetManualHosts(std::move(hosts)); - filter_.SetDefaultFilteringBehavior(SupervisedUserURLFilter::BLOCK); + filter_.SetDefaultFilteringBehavior(FilteringBehavior::kBlock); EXPECT_TRUE(IsURLAllowlisted("http://www.google.com/foo/")); EXPECT_FALSE(IsURLAllowlisted("http://calendar.google.com/bar/")); EXPECT_TRUE(IsURLAllowlisted("http://mail.google.com/moose/")); EXPECT_FALSE(IsURLAllowlisted("http://www.google.co.uk/blurp/")); - filter_.SetDefaultFilteringBehavior(SupervisedUserURLFilter::ALLOW); + filter_.SetDefaultFilteringBehavior(FilteringBehavior::kAllow); EXPECT_TRUE(IsURLAllowlisted("http://www.google.com/foo/")); EXPECT_FALSE(IsURLAllowlisted("http://calendar.google.com/bar/")); @@ -387,7 +388,7 @@ hosts["www.google.*"] = false; filter_.SetManualHosts(std::move(hosts)); - filter_.SetDefaultFilteringBehavior(SupervisedUserURLFilter::BLOCK); + filter_.SetDefaultFilteringBehavior(FilteringBehavior::kBlock); EXPECT_FALSE(IsURLAllowlisted("http://www.google.com/foo/")); histogram_tester.ExpectBucketCount( @@ -411,7 +412,7 @@ SupervisedUserURLFilter::GetManagedSiteListConflictHistogramNameForTest(), 0, 2); - filter_.SetDefaultFilteringBehavior(SupervisedUserURLFilter::ALLOW); + filter_.SetDefaultFilteringBehavior(FilteringBehavior::kAllow); EXPECT_FALSE(IsURLAllowlisted("http://www.google.com/foo/")); EXPECT_FALSE(IsURLAllowlisted("http://calendar.google.com/bar/")); @@ -442,7 +443,7 @@ filter_.SetManualHosts(std::move(hosts)); filter_.SetManualURLs(std::move(urls)); - filter_.SetDefaultFilteringBehavior(SupervisedUserURLFilter::BLOCK); + filter_.SetDefaultFilteringBehavior(FilteringBehavior::kBlock); ExpectURLInDefaultDenylist("https://m.youtube.com/feed/trending"); ExpectURLInDefaultDenylist("https://com.google"); @@ -451,7 +452,7 @@ ExpectURLInManualDenylist("https://youtube.com/robots.txt"); ExpectURLInManualDenylist("https://google.co.uk/robots.txt"); - filter_.SetDefaultFilteringBehavior(SupervisedUserURLFilter::ALLOW); + filter_.SetDefaultFilteringBehavior(FilteringBehavior::kAllow); ExpectURLInDefaultAllowlist("https://m.youtube.com/feed/trending"); ExpectURLInDefaultAllowlist("https://com.google"); @@ -462,7 +463,7 @@ } TEST_F(SupervisedUserURLFilterTest, UrlsNotRequiringGuardianApprovalAllowed) { - filter_.SetDefaultFilteringBehavior(SupervisedUserURLFilter::BLOCK); + filter_.SetDefaultFilteringBehavior(FilteringBehavior::kBlock); EXPECT_TRUE(IsURLAllowlisted("https://families.google.com/")); EXPECT_TRUE(IsURLAllowlisted("https://families.google.com")); EXPECT_TRUE(IsURLAllowlisted("https://families.google.com/something")); @@ -483,7 +484,7 @@ } TEST_F(SupervisedUserURLFilterTest, PlayTermsAlwaysAllowed) { - filter_.SetDefaultFilteringBehavior(SupervisedUserURLFilter::BLOCK); + filter_.SetDefaultFilteringBehavior(FilteringBehavior::kBlock); EXPECT_TRUE(IsURLAllowlisted("https://play.google.com/about/play-terms")); EXPECT_TRUE(IsURLAllowlisted("https://play.google.com/about/play-terms/")); EXPECT_TRUE(IsURLAllowlisted( @@ -504,7 +505,7 @@ SupervisedUserURLFilter::FilteringSubdomainConflictType>>> { public: SupervisedUserURLFilteringWithConflictsTest() { - filter_.SetDefaultFilteringBehavior(SupervisedUserURLFilter::BLOCK); + filter_.SetDefaultFilteringBehavior(FilteringBehavior::kBlock); } protected: @@ -512,7 +513,7 @@ GURL gurl = GURL(url); CHECK(gurl.is_valid()); return filter_.GetFilteringBehaviorForURL(gurl) == - SupervisedUserURLFilter::ALLOW; + FilteringBehavior::kAllow; } base::test::TaskEnvironment task_environment_;
diff --git a/components/supervised_user/core/common/BUILD.gn b/components/supervised_user/core/common/BUILD.gn index a539482..33a29bc 100644 --- a/components/supervised_user/core/common/BUILD.gn +++ b/components/supervised_user/core/common/BUILD.gn
@@ -2,6 +2,10 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +if (is_android) { + import("//build/config/android/rules.gni") +} + import("//build/buildflag_header.gni") import("//components/supervised_user/buildflags.gni") @@ -57,3 +61,9 @@ "//testing/gtest", ] } + +if (is_android) { + java_cpp_enum("supervised_user_utils_enum_javagen") { + sources = [ "supervised_user_utils.h" ] + } +}
diff --git a/components/supervised_user/core/common/supervised_user_utils.h b/components/supervised_user/core/common/supervised_user_utils.h index dac3cb31..6e575e30 100644 --- a/components/supervised_user/core/common/supervised_user_utils.h +++ b/components/supervised_user/core/common/supervised_user_utils.h
@@ -25,6 +25,16 @@ NOT_SIGNED_IN = 5, }; +// A Java counterpart will be generated for this enum. +// Values are stored in prefs under kDefaultSupervisedUserFilteringBehavior. +// GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser.superviseduser +enum class FilteringBehavior : int { + kAllow = 0, + // Deprecated, kWarn = 1. + kBlock = 2, + kInvalid = 3, +}; + // This enum describes the state of the interstitial banner that is shown for // when previous supervised users of desktop see the interstitial for the first // time after desktop controls are enabled.
diff --git a/components/translate/content/android/java/src/org/chromium/components/translate/TranslateMessage.java b/components/translate/content/android/java/src/org/chromium/components/translate/TranslateMessage.java index 5607e98..0603244 100644 --- a/components/translate/content/android/java/src/org/chromium/components/translate/TranslateMessage.java +++ b/components/translate/content/android/java/src/org/chromium/components/translate/TranslateMessage.java
@@ -17,8 +17,6 @@ import org.jni_zero.JNINamespace; import org.jni_zero.NativeMethods; -import org.chromium.components.browser_ui.widget.listmenu.ListMenu; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButtonDelegate; import org.chromium.components.messages.DismissReason; import org.chromium.components.messages.MessageBannerProperties; import org.chromium.components.messages.MessageDispatcher; @@ -30,6 +28,8 @@ import org.chromium.components.messages.SecondaryMenuMaxSize; import org.chromium.content_public.browser.WebContents; import org.chromium.ui.base.WindowAndroid; +import org.chromium.ui.listmenu.ListMenu; +import org.chromium.ui.listmenu.ListMenuButtonDelegate; import org.chromium.ui.modelutil.PropertyModel; import org.chromium.ui.widget.RectProvider; import org.chromium.ui.widget.Toast;
diff --git a/components/translate/content/android/java/src/org/chromium/components/translate/TranslateMessageSecondaryMenu.java b/components/translate/content/android/java/src/org/chromium/components/translate/TranslateMessageSecondaryMenu.java index 9a1d81ea..12ecea91 100644 --- a/components/translate/content/android/java/src/org/chromium/components/translate/TranslateMessageSecondaryMenu.java +++ b/components/translate/content/android/java/src/org/chromium/components/translate/TranslateMessageSecondaryMenu.java
@@ -12,9 +12,9 @@ import android.widget.AdapterView.OnItemClickListener; import android.widget.ListView; -import org.chromium.components.browser_ui.widget.listmenu.ListMenu; import org.chromium.components.translate.TranslateMessage.MenuItem; import org.chromium.ui.UiUtils; +import org.chromium.ui.listmenu.ListMenu; import java.util.LinkedList; import java.util.List;
diff --git a/components/translate/content/android/java/src/org/chromium/components/translate/TranslateMessageSecondaryMenuTest.java b/components/translate/content/android/java/src/org/chromium/components/translate/TranslateMessageSecondaryMenuTest.java index 6c0360d..e5e196cc 100644 --- a/components/translate/content/android/java/src/org/chromium/components/translate/TranslateMessageSecondaryMenuTest.java +++ b/components/translate/content/android/java/src/org/chromium/components/translate/TranslateMessageSecondaryMenuTest.java
@@ -46,13 +46,13 @@ import org.chromium.base.test.BaseJUnit4ClassRunner; import org.chromium.base.test.util.Batch; import org.chromium.base.test.util.JniMocker; -import org.chromium.components.browser_ui.widget.listmenu.ListMenuButton; import org.chromium.components.messages.MessageBannerProperties; import org.chromium.components.messages.MessageDispatcher; import org.chromium.components.messages.MessageScopeType; import org.chromium.components.translate.TranslateMessage.MenuItem; import org.chromium.content_public.browser.WebContents; import org.chromium.content_public.browser.test.util.TestThreadUtils; +import org.chromium.ui.listmenu.ListMenuButton; import org.chromium.ui.modelutil.PropertyModel; import org.chromium.ui.test.util.BlankUiTestActivity; import org.chromium.ui.test.util.DisableAnimationsTestRule;
diff --git a/components/vector_icons/BUILD.gn b/components/vector_icons/BUILD.gn index f7b9de0..c85801cd 100644 --- a/components/vector_icons/BUILD.gn +++ b/components/vector_icons/BUILD.gn
@@ -65,6 +65,8 @@ "cookie_off_chrome_refresh.icon", "dangerous.icon", "dangerous_chrome_refresh.icon", + "database.icon", + "database_off.icon", "description.icon", "devices.icon", "devices_chrome_refresh.icon",
diff --git a/components/vector_icons/database.icon b/components/vector_icons/database.icon new file mode 100644 index 0000000..2154597 --- /dev/null +++ b/components/vector_icons/database.icon
@@ -0,0 +1,64 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +CANVAS_DIMENSIONS, 24, +MOVE_TO, 12, 21.2f, +R_CUBIC_TO, -2.58f, 0, -4.75f, -0.41f, -6.53f, -1.22f, +R_CUBIC_TO, -1.78f, -0.81f, -2.67f, -1.81f, -2.67f, -2.98f, +V_LINE_TO, 7, +R_CUBIC_TO, 0, -1.16f, 0.9f, -2.14f, 2.7f, -2.97f, +CUBIC_TO, 7.29f, 3.21f, 9.46f, 2.8f, 12, 2.8f, +R_CUBIC_TO, 2.54f, 0, 4.7f, 0.41f, 6.5f, 1.23f, +R_CUBIC_TO, 1.8f, 0.82f, 2.7f, 1.81f, 2.7f, 2.97f, +R_V_LINE_TO, 10, +R_CUBIC_TO, 0, 1.17f, -0.89f, 2.17f, -2.67f, 2.98f, +R_CUBIC_TO, -1.78f, 0.82f, -3.96f, 1.22f, -6.53f, 1.22f, +CLOSE, +MOVE_TO, 12, 9.02f, +R_CUBIC_TO, 1.48f, 0, 2.97f, -0.21f, 4.46f, -0.64f, +R_CUBIC_TO, 1.49f, -0.42f, 2.34f, -0.87f, 2.53f, -1.36f, +R_CUBIC_TO, -0.19f, -0.48f, -1.03f, -0.94f, -2.52f, -1.37f, +ARC_TO, 16.03f, 16.03f, 0, 0, 0, 12, 5.01f, +R_CUBIC_TO, -1.5f, 0, -2.98f, 0.21f, -4.44f, 0.63f, +R_CUBIC_TO, -1.46f, 0.43f, -2.3f, 0.88f, -2.55f, 1.38f, +R_CUBIC_TO, 0.24f, 0.5f, 1.09f, 0.96f, 2.54f, 1.38f, +R_CUBIC_TO, 1.45f, 0.42f, 2.94f, 0.62f, 4.45f, 0.62f, +CLOSE, +R_MOVE_TO, 0, 4.96f, +R_ARC_TO, 18.47f, 18.47f, 0, 0, 0, 3.86f, -0.39f, +R_CUBIC_TO, 0.59f, -0.13f, 1.15f, -0.28f, 1.68f, -0.47f, +R_ARC_TO, 10.22f, 10.22f, 0, 0, 0, 1.46f, -0.64f, +V_LINE_TO, 9.73f, +R_CUBIC_TO, -0.44f, 0.24f, -0.92f, 0.44f, -1.45f, 0.62f, +R_ARC_TO, 13.17f, 13.17f, 0, 0, 1, -1.67f, 0.46f, +R_CUBIC_TO, -0.59f, 0.13f, -1.21f, 0.22f, -1.85f, 0.28f, +R_CUBIC_TO, -0.65f, 0.07f, -1.32f, 0.1f, -2.02f, 0.1f, +R_CUBIC_TO, -0.69f, 0, -1.37f, -0.03f, -2.03f, -0.1f, +R_ARC_TO, 16.51f, 16.51f, 0, 0, 1, -1.88f, -0.28f, +R_ARC_TO, 13.92f, 13.92f, 0, 0, 1, -1.66f, -0.46f, +R_ARC_TO, 9.92f, 9.92f, 0, 0, 1, -1.42f, -0.62f, +R_V_LINE_TO, 2.74f, +R_CUBIC_TO, 0.42f, 0.23f, 0.89f, 0.45f, 1.41f, 0.64f, +R_CUBIC_TO, 0.52f, 0.19f, 1.07f, 0.35f, 1.67f, 0.48f, +ARC_TO, 18.84f, 18.84f, 0, 0, 0, 12, 13.98f, +CLOSE, +R_MOVE_TO, 0, 5.01f, +R_CUBIC_TO, 0.75f, 0, 1.52f, -0.06f, 2.31f, -0.17f, +R_ARC_TO, 16.13f, 16.13f, 0, 0, 0, 2.17f, -0.46f, +R_CUBIC_TO, 0.66f, -0.19f, 1.22f, -0.41f, 1.68f, -0.65f, +R_CUBIC_TO, 0.45f, -0.24f, 0.73f, -0.48f, 0.83f, -0.73f, +R_V_LINE_TO, -2.27f, +R_CUBIC_TO, -0.44f, 0.24f, -0.92f, 0.45f, -1.44f, 0.64f, +R_CUBIC_TO, -0.52f, 0.19f, -1.08f, 0.34f, -1.67f, 0.47f, +R_CUBIC_TO, -0.59f, 0.13f, -1.21f, 0.22f, -1.86f, 0.29f, +R_ARC_TO, 20.24f, 20.24f, 0, 0, 1, -4.04f, 0, +R_ARC_TO, 16.47f, 16.47f, 0, 0, 1, -1.88f, -0.29f, +R_ARC_TO, 13.08f, 13.08f, 0, 0, 1, -1.67f, -0.47f, +R_ARC_TO, 8.76f, 8.76f, 0, 0, 1, -1.41f, -0.63f, +V_LINE_TO, 17, +R_CUBIC_TO, 0.09f, 0.25f, 0.37f, 0.48f, 0.82f, 0.72f, +R_CUBIC_TO, 0.45f, 0.23f, 1.01f, 0.45f, 1.67f, 0.64f, +R_CUBIC_TO, 0.66f, 0.19f, 1.39f, 0.34f, 2.18f, 0.46f, +R_CUBIC_TO, 0.79f, 0.12f, 1.57f, 0.18f, 2.32f, 0.18f, +CLOSE
diff --git a/components/vector_icons/database_off.icon b/components/vector_icons/database_off.icon new file mode 100644 index 0000000..6399803c --- /dev/null +++ b/components/vector_icons/database_off.icon
@@ -0,0 +1,72 @@ +// Copyright 2023 The Chromium Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +CANVAS_DIMENSIONS, 24, +MOVE_TO, 3.57f, 2.56f, +LINE_TO, 2.15f, 3.98f, +R_LINE_TO, 18.59f, 18.59f, +R_LINE_TO, 1.41f, -1.41f, +LINE_TO, 3.57f, 2.56f, +CLOSE, +NEW_PATH, +MOVE_TO, 5.31f, 4.3f, +CUBIC_TO, 4.27f, 4.96f, 3.75f, 5.71f, 3.75f, 6.56f, +R_V_LINE_TO, 10, +R_CUBIC_TO, 0, 1.12f, 0.87f, 2.07f, 2.6f, 2.85f, +R_CUBIC_TO, 1.75f, 0.77f, 3.88f, 1.15f, 6.4f, 1.15f, +R_CUBIC_TO, 2.52f, 0, 4.64f, -0.38f, 6.38f, -1.15f, +R_CUBIC_TO, 0.32f, -0.14f, 0.6f, -0.29f, 0.86f, -0.44f, +R_LINE_TO, -1.48f, -1.48f, +R_CUBIC_TO, -0.36f, 0.16f, -0.77f, 0.3f, -1.23f, 0.44f, +R_CUBIC_TO, -0.67f, 0.18f, -1.4f, 0.33f, -2.2f, 0.45f, +R_ARC_TO, 15.76f, 15.76f, 0, 0, 1, -2.33f, 0.17f, +R_CUBIC_TO, -0.77f, 0, -1.55f, -0.06f, -2.35f, -0.17f, +R_CUBIC_TO, -0.8f, -0.12f, -1.53f, -0.27f, -2.2f, -0.45f, +R_CUBIC_TO, -0.67f, -0.2f, -1.23f, -0.42f, -1.67f, -0.65f, +R_CUBIC_TO, -0.43f, -0.23f, -0.69f, -0.47f, -0.77f, -0.72f, +R_V_LINE_TO, -2.47f, +R_CUBIC_TO, 0.42f, 0.23f, 0.88f, 0.44f, 1.4f, 0.63f, +R_CUBIC_TO, 0.52f, 0.18f, 1.07f, 0.34f, 1.65f, 0.48f, +R_ARC_TO, 20.81f, 20.81f, 0, 0, 0, 3.95f, 0.37f, +R_ARC_TO, 19.84f, 19.84f, 0, 0, 0, 3.52f, -0.31f, +LINE_TO, 14.5f, 13.49f, +R_CUBIC_TO, -0.56f, 0.05f, -1.15f, 0.07f, -1.75f, 0.07f, +R_ARC_TO, 20.81f, 20.81f, 0, 0, 1, -3.95f, -0.37f, +R_ARC_TO, 14.79f, 14.79f, 0, 0, 1, -1.65f, -0.47f, +R_ARC_TO, 9.07f, 9.07f, 0, 0, 1, -1.4f, -0.62f, +R_V_LINE_TO, -3, +R_CUBIC_TO, 0.42f, 0.23f, 0.88f, 0.44f, 1.4f, 0.63f, +R_CUBIC_TO, 0.52f, 0.18f, 1.07f, 0.34f, 1.65f, 0.48f, +R_ARC_TO, 20.81f, 20.81f, 0, 0, 0, 2.74f, 0.34f, +LINE_TO, 9.21f, 8.2f, +R_ARC_TO, 16.62f, 16.62f, 0, 0, 1, -0.94f, -0.24f, +R_CUBIC_TO, -1.45f, -0.42f, -2.29f, -0.87f, -2.52f, -1.37f, +R_CUBIC_TO, 0.14f, -0.29f, 0.48f, -0.57f, 1.02f, -0.83f, +LINE_TO, 5.31f, 4.3f, +CLOSE, +R_MOVE_TO, 3.57f, 0.75f, +LINE_TO, 7.24f, 3.4f, +R_CUBIC_TO, 1.58f, -0.56f, 3.42f, -0.83f, 5.51f, -0.83f, +R_CUBIC_TO, 2.48f, 0, 4.6f, 0.39f, 6.35f, 1.17f, +R_CUBIC_TO, 1.77f, 0.78f, 2.65f, 1.73f, 2.65f, 2.83f, +R_V_LINE_TO, 10, +R_CUBIC_TO, 0, 0.37f, -0.1f, 0.72f, -0.29f, 1.06f, +R_LINE_TO, -1.71f, -1.71f, +R_V_LINE_TO, -1.82f, +R_ARC_TO, 9.49f, 9.49f, 0, 0, 1, -1.26f, 0.56f, +R_LINE_TO, -1.53f, -1.54f, +R_CUBIC_TO, 0.48f, -0.12f, 0.93f, -0.25f, 1.35f, -0.4f, +R_ARC_TO, 9.73f, 9.73f, 0, 0, 0, 1.45f, -0.62f, +R_V_LINE_TO, -3, +R_ARC_TO, 9.73f, 9.73f, 0, 0, 1, -1.45f, 0.63f, +R_CUBIC_TO, -0.52f, 0.18f, -1.07f, 0.34f, -1.67f, 0.48f, +R_ARC_TO, 19.68f, 19.68f, 0, 0, 1, -2.28f, 0.31f, +R_LINE_TO, -1.92f, -1.92f, +R_CUBIC_TO, 0.11f, 0, 0.22f, 0, 0.33f, 0, +R_CUBIC_TO, 1.48f, 0, 2.98f, -0.21f, 4.47f, -0.62f, +R_CUBIC_TO, 1.5f, -0.43f, 2.34f, -0.89f, 2.53f, -1.37f, +R_CUBIC_TO, -0.18f, -0.48f, -1.02f, -0.94f, -2.52f, -1.37f, +R_ARC_TO, 15.89f, 15.89f, 0, 0, 0, -4.47f, -0.65f, +R_CUBIC_TO, -1.31f, 0, -2.59f, 0.16f, -3.86f, 0.48f, +CLOSE
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn index 012b390c..d89bcc5 100644 --- a/content/browser/BUILD.gn +++ b/content/browser/BUILD.gn
@@ -2220,8 +2220,6 @@ "tracing/trace_report/trace_report_database.h", "tracing/trace_report/trace_report_handler.cc", "tracing/trace_report/trace_report_handler.h", - "tracing/trace_report/trace_report_internals_ui.cc", - "tracing/trace_report/trace_report_internals_ui.h", "tracing/trace_report/trace_upload_list.h", "tracing/tracing_controller_impl.cc", "tracing/tracing_controller_impl.h", @@ -3329,6 +3327,8 @@ "speech/speech_recognition_engine.h", "speech/speech_recognizer_impl.cc", "speech/speech_recognizer_impl.h", + "tracing/trace_report/trace_report_internals_ui.cc", + "tracing/trace_report/trace_report_internals_ui.h", "tracing/tracing_ui.cc", "tracing/tracing_ui.h",
diff --git a/content/browser/attribution_reporting/attribution_internals.mojom b/content/browser/attribution_reporting/attribution_internals.mojom index 77a5102..d9242cd 100644 --- a/content/browser/attribution_reporting/attribution_internals.mojom +++ b/content/browser/attribution_reporting/attribution_internals.mojom
@@ -94,7 +94,11 @@ url.mojom.Origin reporting_origin; double source_time; double expiry_time; - attribution_reporting.mojom.EventReportWindows event_report_windows; + // String instead of mojo_base.mojom.DictionaryValue because the value is + // simply displayed in the UI, never inspected. JSON is used instead of + // attribution_reporting.mojom.TriggerSpecs to avoid complex TypeScript-based + // formatting. + string trigger_specs_json; double aggregatable_report_window_time; int32 max_event_level_reports; attribution_reporting.mojom.SourceType source_type;
diff --git a/content/browser/attribution_reporting/attribution_internals_handler_impl.cc b/content/browser/attribution_reporting/attribution_internals_handler_impl.cc index 67bd39c..e2c132f 100644 --- a/content/browser/attribution_reporting/attribution_internals_handler_impl.cc +++ b/content/browser/attribution_reporting/attribution_internals_handler_impl.cc
@@ -78,7 +78,11 @@ source.destination_sites(), common_info.reporting_origin(), source.source_time().InMillisecondsFSinceUnixEpoch(), source.expiry_time().InMillisecondsFSinceUnixEpoch(), - source.event_report_windows(), + SerializeAttributionJson( + attribution_reporting::TriggerSpecs::Default( + common_info.source_type(), source.event_report_windows()) + .ToJson(), + /*pretty_print=*/true), source.aggregatable_report_window_time().InMillisecondsFSinceUnixEpoch(), source.max_event_level_reports(), common_info.source_type(), source.priority(), source.debug_key(), source.dedup_keys(),
diff --git a/content/browser/attribution_reporting/attribution_storage_delegate.h b/content/browser/attribution_reporting/attribution_storage_delegate.h index 3227846..c6fa28b 100644 --- a/content/browser/attribution_reporting/attribution_storage_delegate.h +++ b/content/browser/attribution_reporting/attribution_storage_delegate.h
@@ -21,6 +21,7 @@ namespace attribution_reporting { class EventReportWindows; +class MaxEventLevelReports; } // namespace attribution_reporting namespace base { @@ -141,7 +142,7 @@ virtual double GetRandomizedResponseRate( attribution_reporting::mojom::SourceType, const attribution_reporting::EventReportWindows&, - int max_event_level_reports) const = 0; + attribution_reporting::MaxEventLevelReports) const = 0; using GetRandomizedResponseResult = base::expected<RandomizedResponseData, ExceedsChannelCapacityLimit>; @@ -152,7 +153,7 @@ virtual GetRandomizedResponseResult GetRandomizedResponse( attribution_reporting::mojom::SourceType, const attribution_reporting::EventReportWindows&, - int max_event_level_reports, + attribution_reporting::MaxEventLevelReports, base::Time source_time) const = 0; int GetMaxAggregatableReportsPerSource() const;
diff --git a/content/browser/attribution_reporting/attribution_storage_delegate_impl.cc b/content/browser/attribution_reporting/attribution_storage_delegate_impl.cc index 58a539b..2f34cf7 100644 --- a/content/browser/attribution_reporting/attribution_storage_delegate_impl.cc +++ b/content/browser/attribution_reporting/attribution_storage_delegate_impl.cc
@@ -20,6 +20,7 @@ #include "components/attribution_reporting/constants.h" #include "components/attribution_reporting/event_report_windows.h" #include "components/attribution_reporting/features.h" +#include "components/attribution_reporting/max_event_level_reports.h" #include "components/attribution_reporting/source_registration_time_config.mojom.h" #include "components/attribution_reporting/source_type.mojom.h" #include "components/attribution_reporting/trigger_config.h" @@ -198,7 +199,7 @@ double AttributionStorageDelegateImpl::GetRandomizedResponseRate( SourceType source_type, const EventReportWindows& event_report_windows, - int max_event_level_reports) const { + attribution_reporting::MaxEventLevelReports max_event_level_reports) const { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); return content::GetRandomizedResponseRate( GetNumStates(attribution_reporting::TriggerSpecs::Default( @@ -211,7 +212,7 @@ AttributionStorageDelegateImpl::GetRandomizedResponse( SourceType source_type, const EventReportWindows& event_report_windows, - int max_event_level_reports, + attribution_reporting::MaxEventLevelReports max_event_level_reports, base::Time source_time) const { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); RandomizedResponseData response = DoRandomizedResponse(
diff --git a/content/browser/attribution_reporting/attribution_storage_delegate_impl.h b/content/browser/attribution_reporting/attribution_storage_delegate_impl.h index 09a90fa..aa80792 100644 --- a/content/browser/attribution_reporting/attribution_storage_delegate_impl.h +++ b/content/browser/attribution_reporting/attribution_storage_delegate_impl.h
@@ -15,10 +15,6 @@ #include "content/browser/attribution_reporting/attribution_storage_delegate.h" #include "content/common/content_export.h" -namespace attribution_reporting { -class EventReportWindows; -} // namespace attribution_reporting - namespace base { class Time; class TimeDelta; @@ -92,11 +88,11 @@ double GetRandomizedResponseRate( attribution_reporting::mojom::SourceType, const attribution_reporting::EventReportWindows&, - int max_event_level_reports) const override; + attribution_reporting::MaxEventLevelReports) const override; GetRandomizedResponseResult GetRandomizedResponse( attribution_reporting::mojom::SourceType, const attribution_reporting::EventReportWindows&, - int max_event_level_reports, + attribution_reporting::MaxEventLevelReports, base::Time source_time) const override; std::vector<NullAggregatableReport> GetNullAggregatableReports( const AttributionTrigger&,
diff --git a/content/browser/attribution_reporting/attribution_storage_sql.cc b/content/browser/attribution_reporting/attribution_storage_sql.cc index 4494ef2a..d9b1afa 100644 --- a/content/browser/attribution_reporting/attribution_storage_sql.cc +++ b/content/browser/attribution_reporting/attribution_storage_sql.cc
@@ -304,8 +304,11 @@ return absl::nullopt; } - int max_event_level_reports = - read_only_source_data_msg->max_event_level_reports(); + attribution_reporting::MaxEventLevelReports max_event_level_reports; + if (!max_event_level_reports.SetIfValid( + read_only_source_data_msg->max_event_level_reports())) { + return absl::nullopt; + } absl::optional<EventReportWindows> event_report_windows = DeserializeEventReportWindows(*read_only_source_data_msg); @@ -758,11 +761,9 @@ AttributionStorageSql::MaybeReplaceLowerPriorityEventLevelReport( const AttributionReport& report, int num_conversions, - int max_event_level_reports, int64_t conversion_priority, absl::optional<AttributionReport>& replaced_report) { DCHECK_GE(num_conversions, 0); - DCHECK_GE(max_event_level_reports, 0); const auto* data = absl::get_if<AttributionReport::EventLevelData>(&report.data()); @@ -771,7 +772,7 @@ const StoredSource& source = data->source; // If there's already capacity for the new report, there's nothing to do. - if (num_conversions < max_event_level_reports) { + if (num_conversions < source.max_event_level_reports()) { return MaybeReplaceLowerPriorityEventLevelReportResult::kAddNewReport; } @@ -1374,8 +1375,7 @@ const auto maybe_replace_lower_priority_report_result = MaybeReplaceLowerPriorityEventLevelReport( - report, num_conversions, source.max_event_level_reports(), - event_level_data->priority, replaced_report); + report, num_conversions, event_level_data->priority, replaced_report); if (maybe_replace_lower_priority_report_result == MaybeReplaceLowerPriorityEventLevelReportResult::kError) { return EventLevelResult::kInternalError;
diff --git a/content/browser/attribution_reporting/attribution_storage_sql.h b/content/browser/attribution_reporting/attribution_storage_sql.h index 64f248b..9df3e89 100644 --- a/content/browser/attribution_reporting/attribution_storage_sql.h +++ b/content/browser/attribution_reporting/attribution_storage_sql.h
@@ -219,7 +219,6 @@ MaybeReplaceLowerPriorityEventLevelReport( const AttributionReport& report, int num_conversions, - int max_event_level_reports, int64_t conversion_priority, absl::optional<AttributionReport>& replaced_report) VALID_CONTEXT_REQUIRED(sequence_checker_);
diff --git a/content/browser/attribution_reporting/attribution_storage_sql_migrations.cc b/content/browser/attribution_reporting/attribution_storage_sql_migrations.cc index f34ae30..3ad630f 100644 --- a/content/browser/attribution_reporting/attribution_storage_sql_migrations.cc +++ b/content/browser/attribution_reporting/attribution_storage_sql_migrations.cc
@@ -10,6 +10,7 @@ #include "base/metrics/histogram_functions.h" #include "base/time/time.h" #include "components/attribution_reporting/event_report_windows.h" +#include "components/attribution_reporting/max_event_level_reports.h" #include "components/attribution_reporting/source_type.mojom.h" #include "content/browser/attribution_reporting/attribution_reporting.pb.h" #include "content/browser/attribution_reporting/attribution_storage_sql.h" @@ -306,16 +307,6 @@ continue; } - int max_event_level_reports; - switch (source_type.value()) { - case attribution_reporting::mojom::SourceType::kNavigation: - max_event_level_reports = 3; - break; - case attribution_reporting::mojom::SourceType::kEvent: - max_event_level_reports = 1; - break; - } - auto event_report_windows = attribution_reporting::EventReportWindows::FromDefaults( event_report_window_time - source_time, *source_type); @@ -324,7 +315,9 @@ } proto::AttributionReadOnlySourceData msg; - SetReadOnlySourceData(*event_report_windows, max_event_level_reports, msg); + SetReadOnlySourceData( + *event_report_windows, + attribution_reporting::MaxEventLevelReports(*source_type), msg); set_statement.Reset(/*clear_bound_vars=*/true); set_statement.BindBlob(0, msg.SerializeAsString());
diff --git a/content/browser/attribution_reporting/attribution_test_utils.cc b/content/browser/attribution_reporting/attribution_test_utils.cc index c70cdf4..0832628 100644 --- a/content/browser/attribution_reporting/attribution_test_utils.cc +++ b/content/browser/attribution_reporting/attribution_test_utils.cc
@@ -16,11 +16,11 @@ #include "base/time/time.h" #include "components/attribution_reporting/aggregatable_dedup_key.h" #include "components/attribution_reporting/aggregatable_trigger_data.h" -#include "components/attribution_reporting/constants.h" #include "components/attribution_reporting/destination_set.h" #include "components/attribution_reporting/event_report_windows.h" #include "components/attribution_reporting/event_trigger_data.h" #include "components/attribution_reporting/filters.h" +#include "components/attribution_reporting/max_event_level_reports.h" #include "components/attribution_reporting/source_type.mojom.h" #include "components/attribution_reporting/suitable_origin.h" #include "components/attribution_reporting/test_utils.h" @@ -73,7 +73,7 @@ reporting_origin_(*SuitableOrigin::Deserialize(kDefaultReportOrigin)) { registration_.source_event_id = 123; registration_.max_event_level_reports = - attribution_reporting::kMaxSettableEventLevelAttributions; + attribution_reporting::MaxEventLevelReports::Max(); } SourceBuilder::~SourceBuilder() = default; @@ -205,7 +205,8 @@ SourceBuilder& SourceBuilder::SetMaxEventLevelReports( int max_event_level_reports) { - registration_.max_event_level_reports = max_event_level_reports; + registration_.max_event_level_reports = + attribution_reporting::MaxEventLevelReports(max_event_level_reports); return *this; }
diff --git a/content/browser/attribution_reporting/privacy_math.cc b/content/browser/attribution_reporting/privacy_math.cc index 6db37c07..227199b 100644 --- a/content/browser/attribution_reporting/privacy_math.cc +++ b/content/browser/attribution_reporting/privacy_math.cc
@@ -19,6 +19,7 @@ #include "base/rand_util.h" #include "base/ranges/algorithm.h" #include "components/attribution_reporting/event_report_windows.h" +#include "components/attribution_reporting/max_event_level_reports.h" #include "components/attribution_reporting/trigger_config.h" #include "third_party/abseil-cpp/absl/numeric/int128.h" #include "third_party/abseil-cpp/absl/types/optional.h" @@ -239,15 +240,16 @@ return num_states_double / (num_states_double - 1 + std::exp(epsilon)); } -absl::uint128 GetNumStates(const attribution_reporting::TriggerSpecs& specs, - int max_reports) { +absl::uint128 GetNumStates( + const attribution_reporting::TriggerSpecs& specs, + attribution_reporting::MaxEventLevelReports max_reports) { internal::StateMap map; return GetNumStatesCached(specs, max_reports, map); } RandomizedResponseData DoRandomizedResponse( const attribution_reporting::TriggerSpecs& specs, - int max_reports, + attribution_reporting::MaxEventLevelReports max_reports, double epsilon) { internal::StateMap map; return internal::DoRandomizedResponseWithCache(specs, max_reports, epsilon,
diff --git a/content/browser/attribution_reporting/privacy_math.h b/content/browser/attribution_reporting/privacy_math.h index a486cb00..76e5ec7 100644 --- a/content/browser/attribution_reporting/privacy_math.h +++ b/content/browser/attribution_reporting/privacy_math.h
@@ -17,6 +17,7 @@ namespace attribution_reporting { class EventReportWindows; +class MaxEventLevelReports; class TriggerSpecs; } @@ -68,7 +69,7 @@ // Returns the number of possible output states for the given API configuration. CONTENT_EXPORT absl::uint128 GetNumStates( const attribution_reporting::TriggerSpecs& specs, - int max_reports); + attribution_reporting::MaxEventLevelReports); // Determines the randomized response flip probability for the given API // configuration, and performs randomized response on that otutput space. @@ -77,7 +78,7 @@ // Otherwise will return a vector of fake reports. CONTENT_EXPORT RandomizedResponseData DoRandomizedResponse(const attribution_reporting::TriggerSpecs& specs, - int max_reports, + attribution_reporting::MaxEventLevelReports, double epsilon); // Exposed for testing purposes.
diff --git a/content/browser/attribution_reporting/privacy_math_unittest.cc b/content/browser/attribution_reporting/privacy_math_unittest.cc index 5f24765..961db46 100644 --- a/content/browser/attribution_reporting/privacy_math_unittest.cc +++ b/content/browser/attribution_reporting/privacy_math_unittest.cc
@@ -15,6 +15,7 @@ #include "base/time/time.h" #include "components/attribution_reporting/constants.h" #include "components/attribution_reporting/event_report_windows.h" +#include "components/attribution_reporting/max_event_level_reports.h" #include "components/attribution_reporting/source_type.mojom.h" #include "components/attribution_reporting/trigger_config.h" #include "content/browser/attribution_reporting/attribution_test_utils.h" @@ -25,6 +26,7 @@ namespace { using ::attribution_reporting::EventReportWindows; +using ::attribution_reporting::MaxEventLevelReports; using ::attribution_reporting::mojom::SourceType; TEST(PrivacyMathTest, BinomialCoefficient) { @@ -379,7 +381,7 @@ } void RunRandomFakeReportsTest(const attribution_reporting::TriggerSpecs& specs, - const int max_reports, + const MaxEventLevelReports max_reports, const int num_samples, const double tolerance) { base::flat_map<std::vector<FakeEventLevelReport>, int> output_counts; @@ -444,7 +446,7 @@ attribution_reporting::TriggerSpecs::Default( SourceType::kEvent, *EventReportWindows::FromDefaults( base::Days(30), SourceType::kEvent)), - /*max_reports=*/1, + MaxEventLevelReports(1), /*num_samples=*/100'000, /*tolerance=*/0.03); } @@ -461,7 +463,7 @@ SourceType::kNavigation, *EventReportWindows::FromDefaults( base::Days(30), SourceType::kNavigation)), - /*max_reports=*/3, + MaxEventLevelReports(3), /*num_samples=*/150'000, /*tolerance=*/0.9); } @@ -491,7 +493,7 @@ }, kSpecList); - int kMaxReports = 2; + MaxEventLevelReports kMaxReports(2); // The distribution check will fail with probability 6e-7. EXPECT_EQ(28, GetNumStates(kSpecs, kMaxReports)); @@ -502,24 +504,24 @@ TEST(PrivacyMathTest, NumStatesForTriggerSpecs_UniqueSampling) { const struct { - int max_reports; + MaxEventLevelReports max_reports; std::vector<int> windows_per_type; absl::uint128 expected_num_states; } kTestCases[] = { - {3, {3, 3, 3, 3, 3, 3, 3, 3}, 2925}, - {1, {1, 1}, 3}, + {MaxEventLevelReports(3), {3, 3, 3, 3, 3, 3, 3, 3}, 2925}, + {MaxEventLevelReports(1), {1, 1}, 3}, - {1, {1}, 2}, - {5, {1}, 6}, - {2, {1, 1, 2, 2}, 28}, - {3, {1, 1, 2, 2, 3, 3}, 455}, + {MaxEventLevelReports(1), {1}, 2}, + {MaxEventLevelReports(5), {1}, 6}, + {MaxEventLevelReports(2), {1, 1, 2, 2}, 28}, + {MaxEventLevelReports(3), {1, 1, 2, 2, 3, 3}, 455}, // Cases for # of states > 10000 will skip the unique check, otherwise the // tests won't ever finish. - {20, {5, 5, 5, 5, 5, 5, 5, 5}, 4191844505805495}, + {MaxEventLevelReports(20), {5, 5, 5, 5, 5, 5, 5, 5}, 4191844505805495}, // This input would overflow any 64 bit integer. - {20, + {MaxEventLevelReports(20), {5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5}, absl::MakeUint128(/*high=*/9494472u, /*low=*/10758590974061625903u)},
diff --git a/content/browser/attribution_reporting/sql_utils.cc b/content/browser/attribution_reporting/sql_utils.cc index d835b12d..47a1592 100644 --- a/content/browser/attribution_reporting/sql_utils.cc +++ b/content/browser/attribution_reporting/sql_utils.cc
@@ -11,7 +11,6 @@ #include <utility> #include <vector> -#include "base/check_op.h" #include "base/feature_list.h" #include "base/time/time.h" #include "components/aggregation_service/features.h" @@ -19,6 +18,7 @@ #include "components/attribution_reporting/constants.h" #include "components/attribution_reporting/event_report_windows.h" #include "components/attribution_reporting/filters.h" +#include "components/attribution_reporting/max_event_level_reports.h" #include "components/attribution_reporting/source_registration_time_config.mojom.h" #include "components/attribution_reporting/source_type.mojom.h" #include "components/attribution_reporting/suitable_origin.h" @@ -130,10 +130,8 @@ void SetReadOnlySourceData( const attribution_reporting::EventReportWindows& event_report_windows, - int max_event_level_reports, + attribution_reporting::MaxEventLevelReports max_event_level_reports, proto::AttributionReadOnlySourceData& msg) { - DCHECK_GE(max_event_level_reports, 0); - msg.set_max_event_level_reports(max_event_level_reports); msg.set_event_level_report_window_start_time( event_report_windows.start_time().InMicroseconds()); @@ -145,7 +143,7 @@ std::string SerializeReadOnlySourceData( const attribution_reporting::EventReportWindows& event_report_windows, - int max_event_level_reports, + attribution_reporting::MaxEventLevelReports max_event_level_reports, double randomized_response_rate, const attribution_reporting::TriggerConfig& trigger_config, bool debug_cookie_set) {
diff --git a/content/browser/attribution_reporting/sql_utils.h b/content/browser/attribution_reporting/sql_utils.h index b35310c..37f0be5 100644 --- a/content/browser/attribution_reporting/sql_utils.h +++ b/content/browser/attribution_reporting/sql_utils.h
@@ -18,6 +18,7 @@ class AggregationKeys; class EventReportWindows; class FilterData; +class MaxEventLevelReports; class TriggerConfig; } // namespace attribution_reporting @@ -43,12 +44,12 @@ // Exposed for use with earlier DB migrations that only contained a subset of // fields. void SetReadOnlySourceData(const attribution_reporting::EventReportWindows&, - int max_event_level_reports, + attribution_reporting::MaxEventLevelReports, proto::AttributionReadOnlySourceData&); std::string SerializeReadOnlySourceData( const attribution_reporting::EventReportWindows&, - int max_event_level_reports, + attribution_reporting::MaxEventLevelReports, double randomized_response_rate, const attribution_reporting::TriggerConfig&, bool debug_cookie_set);
diff --git a/content/browser/attribution_reporting/stored_source.cc b/content/browser/attribution_reporting/stored_source.cc index b07b29b..5463ecc 100644 --- a/content/browser/attribution_reporting/stored_source.cc +++ b/content/browser/attribution_reporting/stored_source.cc
@@ -16,6 +16,7 @@ #include "components/attribution_reporting/destination_set.h" #include "components/attribution_reporting/event_report_windows.h" #include "components/attribution_reporting/filters.h" +#include "components/attribution_reporting/max_event_level_reports.h" #include "components/attribution_reporting/trigger_config.h" #include "content/browser/attribution_reporting/common_source_info.h" #include "third_party/abseil-cpp/absl/types/optional.h" @@ -33,15 +34,14 @@ } bool AreFieldsValid(int64_t aggregatable_budget_consumed, - int max_event_level_reports, double randomized_response_rate, base::Time source_time, base::Time expiry_time, base::Time aggregatable_report_window_time, absl::optional<uint64_t> debug_key, bool debug_cookie_set) { - return aggregatable_budget_consumed >= 0 && max_event_level_reports >= 0 && - randomized_response_rate >= 0 && randomized_response_rate <= 1 && + return aggregatable_budget_consumed >= 0 && randomized_response_rate >= 0 && + randomized_response_rate <= 1 && IsExpiryOrReportWindowTimeValid(expiry_time, source_time) && IsExpiryOrReportWindowTimeValid(aggregatable_report_window_time, source_time) && @@ -59,7 +59,7 @@ base::Time expiry_time, attribution_reporting::EventReportWindows event_report_windows, base::Time aggregatable_report_window_time, - int max_event_level_reports, + attribution_reporting::MaxEventLevelReports max_event_level_reports, int64_t priority, attribution_reporting::FilterData filter_data, absl::optional<uint64_t> debug_key, @@ -71,10 +71,9 @@ double randomized_response_rate, attribution_reporting::TriggerConfig trigger_config, bool debug_cookie_set) { - if (!AreFieldsValid(aggregatable_budget_consumed, max_event_level_reports, - randomized_response_rate, source_time, expiry_time, - aggregatable_report_window_time, debug_key, - debug_cookie_set)) { + if (!AreFieldsValid(aggregatable_budget_consumed, randomized_response_rate, + source_time, expiry_time, aggregatable_report_window_time, + debug_key, debug_cookie_set)) { return absl::nullopt; } @@ -95,7 +94,7 @@ base::Time expiry_time, attribution_reporting::EventReportWindows event_report_windows, base::Time aggregatable_report_window_time, - int max_event_level_reports, + attribution_reporting::MaxEventLevelReports max_event_level_reports, int64_t priority, attribution_reporting::FilterData filter_data, absl::optional<uint64_t> debug_key, @@ -126,7 +125,7 @@ randomized_response_rate_(randomized_response_rate), trigger_config_(std::move(trigger_config)), debug_cookie_set_(debug_cookie_set) { - DCHECK(AreFieldsValid(aggregatable_budget_consumed_, max_event_level_reports_, + DCHECK(AreFieldsValid(aggregatable_budget_consumed_, randomized_response_rate_, source_time_, expiry_time_, aggregatable_report_window_time_, debug_key_, debug_cookie_set_));
diff --git a/content/browser/attribution_reporting/stored_source.h b/content/browser/attribution_reporting/stored_source.h index dcfc4a4..b17f961 100644 --- a/content/browser/attribution_reporting/stored_source.h +++ b/content/browser/attribution_reporting/stored_source.h
@@ -15,6 +15,7 @@ #include "components/attribution_reporting/destination_set.h" #include "components/attribution_reporting/event_report_windows.h" #include "components/attribution_reporting/filters.h" +#include "components/attribution_reporting/max_event_level_reports.h" #include "components/attribution_reporting/trigger_config.h" #include "content/browser/attribution_reporting/common_source_info.h" #include "content/common/content_export.h" @@ -44,6 +45,7 @@ kReachedEventLevelAttributionLimit = 2, kMaxValue = kReachedEventLevelAttributionLimit, }; + static absl::optional<StoredSource> Create( CommonSourceInfo common_info, uint64_t source_event_id, @@ -52,7 +54,7 @@ base::Time expiry_time, attribution_reporting::EventReportWindows, base::Time aggregatable_report_window_time, - int max_event_level_reports, + attribution_reporting::MaxEventLevelReports, int64_t priority, attribution_reporting::FilterData, absl::optional<uint64_t> debug_key, @@ -94,7 +96,9 @@ return event_report_windows_; } - int max_event_level_reports() const { return max_event_level_reports_; } + attribution_reporting::MaxEventLevelReports max_event_level_reports() const { + return max_event_level_reports_; + } int64_t priority() const { return priority_; } @@ -148,7 +152,7 @@ base::Time expiry_time, attribution_reporting::EventReportWindows, base::Time aggregatable_report_window_time, - int max_event_level_reports, + attribution_reporting::MaxEventLevelReports, int64_t priority, attribution_reporting::FilterData, absl::optional<uint64_t> debug_key, @@ -169,7 +173,7 @@ base::Time expiry_time_; attribution_reporting::EventReportWindows event_report_windows_; base::Time aggregatable_report_window_time_; - int max_event_level_reports_; + attribution_reporting::MaxEventLevelReports max_event_level_reports_; int64_t priority_; attribution_reporting::FilterData filter_data_; absl::optional<uint64_t> debug_key_;
diff --git a/content/browser/attribution_reporting/test/configurable_storage_delegate.cc b/content/browser/attribution_reporting/test/configurable_storage_delegate.cc index a84e9bb..0ab8328c 100644 --- a/content/browser/attribution_reporting/test/configurable_storage_delegate.cc +++ b/content/browser/attribution_reporting/test/configurable_storage_delegate.cc
@@ -16,6 +16,7 @@ #include "base/sequence_checker.h" #include "base/time/time.h" #include "base/types/expected.h" +#include "components/attribution_reporting/max_event_level_reports.h" #include "content/browser/attribution_reporting/attribution_config.h" #include "content/browser/attribution_reporting/attribution_report.h" #include "content/browser/attribution_reporting/attribution_storage_delegate.h" @@ -117,7 +118,7 @@ double ConfigurableStorageDelegate::GetRandomizedResponseRate( attribution_reporting::mojom::SourceType, const attribution_reporting::EventReportWindows&, - int max_event_level_reports) const { + attribution_reporting::MaxEventLevelReports) const { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); return randomized_response_rate_; } @@ -126,7 +127,7 @@ ConfigurableStorageDelegate::GetRandomizedResponse( attribution_reporting::mojom::SourceType, const attribution_reporting::EventReportWindows&, - int max_event_level_reports, + attribution_reporting::MaxEventLevelReports, base::Time source_time) const { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); if (exceeds_channel_capacity_limit_) {
diff --git a/content/browser/attribution_reporting/test/configurable_storage_delegate.h b/content/browser/attribution_reporting/test/configurable_storage_delegate.h index 8d8c802..1c58f95 100644 --- a/content/browser/attribution_reporting/test/configurable_storage_delegate.h +++ b/content/browser/attribution_reporting/test/configurable_storage_delegate.h
@@ -38,11 +38,11 @@ double GetRandomizedResponseRate( attribution_reporting::mojom::SourceType, const attribution_reporting::EventReportWindows&, - int max_event_level_reports) const override; + attribution_reporting::MaxEventLevelReports) const override; GetRandomizedResponseResult GetRandomizedResponse( attribution_reporting::mojom::SourceType, const attribution_reporting::EventReportWindows&, - int max_event_level_reports, + attribution_reporting::MaxEventLevelReports, base::Time source_time) const override; std::vector<NullAggregatableReport> GetNullAggregatableReports( const AttributionTrigger&,
diff --git a/content/browser/browser_interface_binders.cc b/content/browser/browser_interface_binders.cc index 16572349..d34a332 100644 --- a/content/browser/browser_interface_binders.cc +++ b/content/browser/browser_interface_binders.cc
@@ -1207,9 +1207,11 @@ ProcessInternalsUI>(map); RegisterWebUIControllerInterfaceBinder<storage::mojom::QuotaInternalsHandler, QuotaInternalsUI>(map); +#if !BUILDFLAG(IS_ANDROID) RegisterWebUIControllerInterfaceBinder< trace_report::mojom::TraceReportHandlerFactory, TraceReportInternalsUI>( map); +#endif #if BUILDFLAG(ENABLE_VR) RegisterWebUIControllerInterfaceBinder<webxr::mojom::WebXrInternalsHandler, WebXrInternalsUI>(map);
diff --git a/content/browser/media/android/media_resource_getter_impl.cc b/content/browser/media/android/media_resource_getter_impl.cc index d073eae..d169b75 100644 --- a/content/browser/media/android/media_resource_getter_impl.cc +++ b/content/browser/media/android/media_resource_getter_impl.cc
@@ -167,7 +167,7 @@ cookie_manager.get(); cookie_manager_ptr->GetCookiesString( url, site_for_cookies, top_frame_origin, has_storage_access, - /*get_version_shared_memory=*/false, + /*get_version_shared_memory=*/false, /*is_ad_tagged=*/false, base::BindOnce(&ReturnResultOnUIThreadAndClosePipe, std::move(cookie_manager), std::move(callback))); }
diff --git a/content/browser/navigation_browsertest.cc b/content/browser/navigation_browsertest.cc index a877fdba..91922e6 100644 --- a/content/browser/navigation_browsertest.cc +++ b/content/browser/navigation_browsertest.cc
@@ -454,9 +454,7 @@ } RenderFrameHost* initial_rfh = current_frame_host(); - - blink::LocalFrameToken initial_rfh_frame_token = initial_rfh->GetFrameToken(); - int initial_rfh_process_id = initial_rfh->GetProcess()->GetID(); + auto initial_rfh_global_token = initial_rfh->GetGlobalFrameToken(); // Simulate clicking on a same-site link. { @@ -476,9 +474,10 @@ // RenderDocument is enabled, the navigation will result in a new RFH, so // we need to compare with |initial_rfh|. EXPECT_NE(current_frame_host(), initial_rfh); - EXPECT_EQ(initial_rfh_frame_token, + EXPECT_EQ(initial_rfh_global_token.frame_token, observer.last_initiator_frame_token().value()); - EXPECT_EQ(initial_rfh_process_id, observer.last_initiator_process_id()); + EXPECT_EQ(initial_rfh_global_token.child_id, + observer.last_initiator_process_id()); } else { EXPECT_EQ(current_frame_host(), initial_rfh); EXPECT_EQ(current_frame_host()->GetFrameToken(), @@ -513,8 +512,7 @@ RenderFrameHost* initial_rfh = current_frame_host(); url::Origin initial_origin = initial_rfh->GetLastCommittedOrigin(); - blink::LocalFrameToken initiator_frame_token = initial_rfh->GetFrameToken(); - int initiator_process_id = initial_rfh->GetProcess()->GetID(); + auto initial_rfh_global_token = initial_rfh->GetGlobalFrameToken(); // Simulate clicking on a cross-site link. { @@ -530,9 +528,10 @@ EXPECT_TRUE(observer.last_navigation_succeeded()); EXPECT_EQ(initial_origin, observer.last_initiator_origin().value()); EXPECT_TRUE(observer.last_initiator_frame_token().has_value()); - EXPECT_EQ(initiator_frame_token, + EXPECT_EQ(initial_rfh_global_token.frame_token, observer.last_initiator_frame_token().value()); - EXPECT_EQ(initiator_process_id, observer.last_initiator_process_id()); + EXPECT_EQ(initial_rfh_global_token.child_id, + observer.last_initiator_process_id()); } // The RenderFrameHost should have changed unless default SiteInstances @@ -1063,9 +1062,7 @@ GURL url(embedded_test_server()->GetURL("/simple_links.html")); EXPECT_TRUE(NavigateToURL(shell(), url)); - blink::LocalFrameToken initiator_frame_token = - current_frame_host()->GetFrameToken(); - int initiator_process_id = current_frame_host()->GetProcess()->GetID(); + auto initiator_global_token = current_frame_host()->GetGlobalFrameToken(); // Simulate clicking on a cross-site link. { @@ -1083,9 +1080,10 @@ EXPECT_EQ(url, observer.last_navigation_url()); EXPECT_TRUE(observer.last_navigation_succeeded()); EXPECT_TRUE(observer.last_initiator_frame_token().has_value()); - EXPECT_EQ(initiator_frame_token, + EXPECT_EQ(initiator_global_token.frame_token, observer.last_initiator_frame_token().value()); - EXPECT_EQ(initiator_process_id, observer.last_initiator_process_id()); + EXPECT_EQ(initiator_global_token.child_id, + observer.last_initiator_process_id()); } } @@ -1098,8 +1096,7 @@ RenderFrameHost* initial_rfh = current_frame_host(); url::Origin initial_origin = initial_rfh->GetLastCommittedOrigin(); - blink::LocalFrameToken initiator_frame_token = initial_rfh->GetFrameToken(); - int initiator_process_id = initial_rfh->GetProcess()->GetID(); + auto initiator_global_token = initial_rfh->GetGlobalFrameToken(); // Simulate clicking on a cross-site link which has rel="noopener". { @@ -1119,9 +1116,10 @@ EXPECT_TRUE(observer.last_navigation_succeeded()); EXPECT_EQ(initial_origin, observer.last_initiator_origin().value()); EXPECT_TRUE(observer.last_initiator_frame_token().has_value()); - EXPECT_EQ(initiator_frame_token, + EXPECT_EQ(initiator_global_token.frame_token, observer.last_initiator_frame_token().value()); - EXPECT_EQ(initiator_process_id, observer.last_initiator_process_id()); + EXPECT_EQ(initiator_global_token.child_id, + observer.last_initiator_process_id()); } } @@ -1138,8 +1136,7 @@ RenderFrameHostImpl* subframe_rfh = current_frame_host()->child_at(0)->current_frame_host(); - blink::LocalFrameToken initiator_frame_token = subframe_rfh->GetFrameToken(); - int initiator_process_id = subframe_rfh->GetProcess()->GetID(); + auto initiator_global_token = subframe_rfh->GetGlobalFrameToken(); // Simulate clicking on a cross-site link. { @@ -1157,9 +1154,10 @@ EXPECT_EQ(url, observer.last_navigation_url()); EXPECT_TRUE(observer.last_navigation_succeeded()); EXPECT_TRUE(observer.last_initiator_frame_token().has_value()); - EXPECT_EQ(initiator_frame_token, + EXPECT_EQ(initiator_global_token.frame_token, observer.last_initiator_frame_token().value()); - EXPECT_EQ(initiator_process_id, observer.last_initiator_process_id()); + EXPECT_EQ(initiator_global_token.child_id, + observer.last_initiator_process_id()); } } @@ -1211,9 +1209,7 @@ GURL url(embedded_test_server()->GetURL("/simple_links.html")); EXPECT_TRUE(NavigateToURL(shell(), url)); - blink::LocalFrameToken initiator_frame_token = - current_frame_host()->GetFrameToken(); - int initiator_process_id = current_frame_host()->GetProcess()->GetID(); + auto initiator_global_token = current_frame_host()->GetGlobalFrameToken(); // Simulate middle-clicking on a cross-site link. { @@ -1234,9 +1230,10 @@ EXPECT_EQ(url, observer.last_navigation_url()); EXPECT_TRUE(observer.last_navigation_succeeded()); EXPECT_TRUE(observer.last_initiator_frame_token().has_value()); - EXPECT_EQ(initiator_frame_token, + EXPECT_EQ(initiator_global_token.frame_token, observer.last_initiator_frame_token().value()); - EXPECT_EQ(initiator_process_id, observer.last_initiator_process_id()); + EXPECT_EQ(initiator_global_token.child_id, + observer.last_initiator_process_id()); } } @@ -3697,8 +3694,7 @@ RenderFrameHost* openee_rfh = static_cast<WebContentsImpl*>(openee_shell->web_contents()) ->GetPrimaryMainFrame(); - blink::LocalFrameToken initiator_frame_token = openee_rfh->GetFrameToken(); - int initiator_process_id = openee_rfh->GetProcess()->GetID(); + auto initiator_global_token = openee_rfh->GetGlobalFrameToken(); base::RunLoop loop; DidStartNavigationCallback callback( web_contents(), base::BindLambdaForTesting([&](NavigationHandle* handle) { @@ -3707,8 +3703,9 @@ const absl::optional<blink::LocalFrameToken>& frame_token = request->GetInitiatorFrameToken(); EXPECT_TRUE(frame_token.has_value()); - EXPECT_EQ(initiator_frame_token, frame_token.value()); - EXPECT_EQ(initiator_process_id, request->GetInitiatorProcessId()); + EXPECT_EQ(initiator_global_token.frame_token, frame_token.value()); + EXPECT_EQ(initiator_global_token.child_id, + request->GetInitiatorProcessId()); auto* initiator_rfh = RenderFrameHostImpl::FromFrameToken( request->GetInitiatorProcessId(), *frame_token); @@ -3786,8 +3783,7 @@ ->GetPrimaryMainFrame() ->child_at(0) ->current_frame_host(); - blink::LocalFrameToken initiator_frame_token = initiator_rfh->GetFrameToken(); - int initiator_process_id = initiator_rfh->GetProcess()->GetID(); + auto initiator_global_token = initiator_rfh->GetGlobalFrameToken(); base::RunLoop loop; DidStartNavigationCallback callback( web_contents(), base::BindLambdaForTesting([&](NavigationHandle* handle) { @@ -3797,8 +3793,9 @@ const absl::optional<blink::LocalFrameToken>& frame_token = request->GetInitiatorFrameToken(); EXPECT_TRUE(frame_token.has_value()); - EXPECT_EQ(initiator_frame_token, frame_token.value()); - EXPECT_EQ(initiator_process_id, request->GetInitiatorProcessId()); + EXPECT_EQ(initiator_global_token.frame_token, frame_token.value()); + EXPECT_EQ(initiator_global_token.child_id, + request->GetInitiatorProcessId()); auto* initiator_rfh = RenderFrameHostImpl::FromFrameToken( request->GetInitiatorProcessId(), frame_token.value()); @@ -3890,8 +3887,7 @@ RenderFrameHost* initiator_rfh = middle_rfh->child_at(0)->current_frame_host(); - blink::LocalFrameToken initiator_frame_token = initiator_rfh->GetFrameToken(); - int initiator_process_id = initiator_rfh->GetProcess()->GetID(); + auto initiator_global_token = initiator_rfh->GetGlobalFrameToken(); base::RunLoop loop; DidStartNavigationCallback callback( @@ -3903,8 +3899,9 @@ const absl::optional<blink::LocalFrameToken>& frame_token = request->GetInitiatorFrameToken(); EXPECT_TRUE(frame_token.has_value()); - EXPECT_EQ(initiator_frame_token, frame_token.value()); - EXPECT_EQ(initiator_process_id, request->GetInitiatorProcessId()); + EXPECT_EQ(initiator_global_token.frame_token, frame_token.value()); + EXPECT_EQ(initiator_global_token.child_id, + request->GetInitiatorProcessId()); auto* initiator_rfh = RenderFrameHostImpl::FromFrameToken( request->GetInitiatorProcessId(), frame_token.value());
diff --git a/content/browser/renderer_host/cookie_browsertest.cc b/content/browser/renderer_host/cookie_browsertest.cc index 2f9c10c0..ee45542 100644 --- a/content/browser/renderer_host/cookie_browsertest.cc +++ b/content/browser/renderer_host/cookie_browsertest.cc
@@ -454,10 +454,11 @@ const url::Origin& top_frame_origin, bool has_storage_access, bool get_version_shared_memory, + bool is_ad_tagged, GetCookiesStringCallback callback) override { GetForwardingInterface()->GetCookiesString( URLToUse(url), site_for_cookies, top_frame_origin, has_storage_access, - get_version_shared_memory, std::move(callback)); + get_version_shared_memory, is_ad_tagged, std::move(callback)); } private:
diff --git a/content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.cc b/content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.cc index 2aa6af85..05def70 100644 --- a/content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.cc +++ b/content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.cc
@@ -1233,9 +1233,6 @@ int32_t pp_result, const PP_NetAddress_Private& local_addr, const PP_NetAddress_Private& remote_addr) { - UMA_HISTOGRAM_BOOLEAN("Pepper.PluginContextSecurity.TCPConnect", - is_potentially_secure_plugin_context_); - ppapi::host::ReplyMessageContext reply_context(context); reply_context.params.set_result(pp_result); SendReply(reply_context,
diff --git a/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc b/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc index 5239dbf..f3f318e6 100644 --- a/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc +++ b/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc
@@ -695,9 +695,6 @@ const ppapi::host::ReplyMessageContext& context, int32_t result, const PP_NetAddress_Private& addr) { - UMA_HISTOGRAM_BOOLEAN("Pepper.PluginContextSecurity.UDPBind", - is_potentially_secure_plugin_context_); - ppapi::host::ReplyMessageContext reply_context(context); reply_context.params.set_result(result); SendReply(reply_context, PpapiPluginMsg_UDPSocket_BindReply(addr));
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc index 6a2f498..2debb49 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -1362,9 +1362,8 @@ // static RenderFrameHost* RenderFrameHost::FromFrameToken( - int process_id, - const blink::LocalFrameToken& token) { - return RenderFrameHostImpl::FromFrameToken(process_id, token); + const GlobalRenderFrameHostToken& frame_token) { + return RenderFrameHostImpl::FromFrameToken(frame_token); } // static @@ -1389,6 +1388,15 @@ // static RenderFrameHostImpl* RenderFrameHostImpl::FromFrameToken( + const GlobalRenderFrameHostToken& global_frame_token, + mojo::ReportBadMessageCallback* process_mismatch_callback) { + return RenderFrameHostImpl::FromFrameToken(global_frame_token.child_id, + global_frame_token.frame_token, + process_mismatch_callback); +} + +// static +RenderFrameHostImpl* RenderFrameHostImpl::FromFrameToken( int process_id, const blink::LocalFrameToken& frame_token, mojo::ReportBadMessageCallback* process_mismatch_callback) { @@ -5103,6 +5111,10 @@ return GlobalRenderFrameHostId(GetProcess()->GetID(), GetRoutingID()); } +GlobalRenderFrameHostToken RenderFrameHostImpl::GetGlobalFrameToken() const { + return GlobalRenderFrameHostToken(GetProcess()->GetID(), GetFrameToken()); +} + bool RenderFrameHostImpl::HasPendingCommitNavigation() const { return HasPendingCommitForCrossDocumentNavigation() || !same_document_navigation_requests_.empty();
diff --git a/content/browser/renderer_host/render_frame_host_impl.h b/content/browser/renderer_host/render_frame_host_impl.h index 79a3b05..cc7a44e 100644 --- a/content/browser/renderer_host/render_frame_host_impl.h +++ b/content/browser/renderer_host/render_frame_host_impl.h
@@ -347,6 +347,9 @@ // matching local frame token but not a matching process ID, invokes // `process_mismatch_callback` (if non-null) and returns `nullptr`. static RenderFrameHostImpl* FromFrameToken( + const GlobalRenderFrameHostToken& frame_token, + mojo::ReportBadMessageCallback* process_mismatch_callback = nullptr); + static RenderFrameHostImpl* FromFrameToken( int process_id, const blink::LocalFrameToken& frame_token, mojo::ReportBadMessageCallback* process_mismatch_callback = nullptr); @@ -399,6 +402,7 @@ SiteInstanceImpl* GetSiteInstance() const override; RenderProcessHost* GetProcess() const override; GlobalRenderFrameHostId GetGlobalId() const override; + GlobalRenderFrameHostToken GetGlobalFrameToken() const override; RenderWidgetHostImpl* GetRenderWidgetHost() override; RenderWidgetHostView* GetView() override; RenderFrameHostImpl* GetParent() const override;
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc index a1ce7be..22eccd1 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -1603,14 +1603,6 @@ } void RenderWidgetHostImpl::WaitForInputProcessed(base::OnceClosure callback) { - // TODO(bokan): The RequestPresentationCallback mechanism doesn't seem to - // work in OOPIFs. For now, just callback immediately. Remove when fixed. - // https://crbug.com/924646. - if (GetView()->IsRenderWidgetHostViewChildFrame()) { - std::move(callback).Run(); - return; - } - input_router_->WaitForInputProcessed(std::move(callback)); }
diff --git a/content/browser/resources/BUILD.gn b/content/browser/resources/BUILD.gn index e2a738a..f0f2edc 100644 --- a/content/browser/resources/BUILD.gn +++ b/content/browser/resources/BUILD.gn
@@ -2,6 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +import("//chrome/browser/buildflags.gni") import("//device/vr/buildflags/buildflags.gni") group("resources") { @@ -15,9 +16,12 @@ "process:resources", "quota:resources", "service_worker:resources", - "traces_internals:resources", ] + if (!is_android) { + public_deps += [ "traces_internals:resources" ] + } + if (enable_vr) { public_deps += [ "webxr_internals:resources" ] }
diff --git a/content/browser/resources/attribution_reporting/attribution_internals.ts b/content/browser/resources/attribution_reporting/attribution_internals.ts index 0676535..76c0638c 100644 --- a/content/browser/resources/attribution_reporting/attribution_internals.ts +++ b/content/browser/resources/attribution_reporting/attribution_internals.ts
@@ -13,7 +13,6 @@ import {AttributionInternalsTableElement} from './attribution_internals_table.js'; import {OsRegistrationResult, RegistrationType} from './attribution_reporting.mojom-webui.js'; import {EventLevelResult} from './event_level_result.mojom-webui.js'; -import {EventReportWindows} from './registration.mojom-webui.js'; import {SourceType} from './source_type.mojom-webui.js'; import {StoreSourceResult} from './store_source_result.mojom-webui.js'; import {Column, TableModel} from './table_model.js'; @@ -237,7 +236,7 @@ reportingOrigin: string; sourceTime: Date; expiryTime: Date; - eventReportWindows: Date[]; + triggerSpecs: string; aggregatableReportWindowTime: Date; maxEventLevelReports: bigint; sourceType: string; @@ -260,8 +259,7 @@ this.reportingOrigin = originToText(mojo.reportingOrigin); this.sourceTime = new Date(mojo.sourceTime); this.expiryTime = new Date(mojo.expiryTime); - this.eventReportWindows = - windowsAbsoluteTime(mojo.eventReportWindows, this.sourceTime); + this.triggerSpecs = mojo.triggerSpecsJson; this.aggregatableReportWindowTime = new Date(mojo.aggregatableReportWindowTime); this.maxEventLevelReports = BigInt(mojo.maxEventLevelReports); @@ -281,23 +279,6 @@ } } -const EVENT_REPORT_WINDOWS_COLS: Array<Column<Source>> = [ - new DateColumn<Source>('Start Time', e => e.eventReportWindows[0]!), - new ListColumn<Source, Date>( - 'End Times', e => e.eventReportWindows.slice(1), /*flatten=*/ false, - (v) => v.toLocaleString()), -]; - -class EventReportWindowsColumn implements Column<Source> { - renderHeader(th: HTMLElement) { - th.innerText = 'Event Report Windows'; - } - - render(td: HTMLElement, row: Source) { - renderDL(td, row, EVENT_REPORT_WINDOWS_COLS); - } -} - class SourceTableModel extends TableModel<Source> { private storedSources: Source[] = []; @@ -316,7 +297,7 @@ new DateColumn<Source>( 'Source Registration Time', (e) => e.sourceTime), new DateColumn<Source>('Expiry Time', (e) => e.expiryTime), - new EventReportWindowsColumn(), + new CodeColumn<Source>('Trigger Specs', (e) => e.triggerSpecs), new DateColumn<Source>( 'Aggregatable Report Window Time', (e) => e.aggregatableReportWindowTime), @@ -332,7 +313,8 @@ 'Aggregatable Budget Consumed', (e) => `${e.aggregatableBudgetConsumed} / ${BUDGET_PER_SOURCE}`), new ValueColumn<Source, string>('Debug Key', (e) => e.debugKey), - new ValueColumn<Source, boolean>('Debug Cookie Set', (e) => e.debugCookieSet), + new ValueColumn<Source, boolean>( + 'Debug Cookie Set', (e) => e.debugCookieSet), new ListColumn<Source, bigint>('Dedup Keys', (e) => e.dedupKeys), new ListColumn<Source, bigint>( 'Aggregatable Dedup Keys', (e) => e.aggregatableDedupKeys), @@ -903,18 +885,6 @@ return result; } -function windowsAbsoluteTime( - eventReportWindows: EventReportWindows, sourceTime: Date): Date[] { - const dates: Date[] = [new Date( - sourceTime.getTime() + - (Number(eventReportWindows.startTime.microseconds) / 1000))]; - for (const endTime of eventReportWindows.endTimes) { - dates.push( - new Date(sourceTime.getTime() + (Number(endTime.microseconds) / 1000))); - } - return dates; -} - const sourceTypeText: Readonly<Record<SourceType, string>> = { [SourceType.kNavigation]: 'Navigation', [SourceType.kEvent]: 'Event',
diff --git a/content/browser/resources/traces_internals/trace_report.ts b/content/browser/resources/traces_internals/trace_report.ts index a7a48d7..ed3fe2e 100644 --- a/content/browser/resources/traces_internals/trace_report.ts +++ b/content/browser/resources/traces_internals/trace_report.ts
@@ -16,6 +16,7 @@ import {getTemplate} from './trace_report.html.js'; import {ClientTraceReport} from './trace_report.mojom-webui.js'; import {TraceReportBrowserProxy} from './trace_report_browser_proxy.js'; +import {Notification, NotificationTypeEnum} from './trace_report_list.js'; enum UploadState { NOT_UPLOADED = 0, @@ -148,19 +149,19 @@ const {trace} = await this.traceReportProxy_.handler.downloadTrace(this.trace.uuid); if (trace !== null) { - // TODO(b/299476756): |result| can be empty/null/false in some - // methods which should be handled differently than currently - // for the user to know if an action has return the value - // expected or not. Not simply if the call to the method failed this.downloadData_( `${this.trace.uuid.high}-${this.trace.uuid.low}.gz`, trace); + } else { + this.dispatchToast_(`Failed to download trace ${this.trace.uuid.high}-${ + this.trace.uuid.low}.`); } this.isLoading = false; } private downloadData_(fileName: string, data: BigBuffer): void { if (data.invalidBuffer) { - console.error('Invalid buffer received'); + this.dispatchToast_(`Invalid buffer received for ${ + this.trace.uuid.high}-${this.trace.uuid.low}.`); return; } try { @@ -179,7 +180,8 @@ new Blob([bytes], {type: 'application/octet-stream'})); downloadUrl(fileName, url); } catch (e) { - console.error('Unable to create blob from trace data', e); + this.dispatchToast_(`Unable to create blob from trace data for ${ + this.trace.uuid.high}-${this.trace.uuid.low}.`); } } @@ -187,11 +189,9 @@ this.isLoading = true; const {success} = await this.traceReportProxy_.handler.deleteSingleTrace(this.trace.uuid); - if (success) { - // TODO(b/299476756): |result| can be empty/null/false in some - // methods which should be handled differently than currently - // for the user to know if an action has return the value - // expected or not. Not simply if the call to the method failed + if (!success) { + this.dispatchToast_( + `Failed to delete ${this.trace.uuid.high}-${this.trace.uuid.low}.`); } this.isLoading = false; } @@ -201,11 +201,9 @@ const {success} = await this.traceReportProxy_.handler.userUploadSingleTrace( this.trace.uuid); - if (success) { - // TODO(b/299476756): |result| can be empty/null/false in some - // methods which should be handled differently than currently - // for the user to know if an action has return the value - // expected or not. Not simply if the call to the method failed + if (!success) { + this.dispatchToast_(`Failed to upload trace ${this.trace.uuid.high}-${ + this.trace.uuid.low}.`); } this.isLoading = false; } @@ -213,6 +211,14 @@ private uploadStateEqual(value1: number, value2: UploadState): boolean { return value1 === value2; } + + private dispatchToast_(message: string): void { + this.dispatchEvent(new CustomEvent('show-toast', { + bubbles: true, + composed: true, + detail: new Notification(NotificationTypeEnum.ERROR, message), + })); + } } declare global {
diff --git a/content/browser/resources/traces_internals/trace_report_list.html b/content/browser/resources/traces_internals/trace_report_list.html index 7a88147..c2cc8b24 100644 --- a/content/browser/resources/traces_internals/trace_report_list.html +++ b/content/browser/resources/traces_internals/trace_report_list.html
@@ -10,15 +10,94 @@ width: 60px; height: 60px; } + + #notification-card { + display: flex; + } + + .notification-message { + display: flex; + flex-direction: column; + margin-bottom: 12px + } + + .notification-type { + text-transform: uppercase; + margin: 8px 0; + font-size: 13px; + } + + .notification-type.error { + color: rgb(195, 40, 40); + } + + .notification-type.accouncement { + color: rgb(98, 133, 52); + } + + .notification-type.update { + color: rgb(34, 135, 211); + } + + .notification-label { + color: white; + } + + .icon-container { + width: 60px; + display: flex; + justify-content: center; + align-items: center; + margin-right: 24px; + height: auto; + } + + .icon-container > iron-icon { + --iron-icon-fill-color: white; + --iron-icon-width: 40px; + --iron-icon-height: 40px; + } + + .icon-container.error > iron-icon { + --iron-icon-fill-color: rgb(195, 40, 40); + } + + .icon-container.accouncement > iron-icon { + --iron-icon-fill-color: rgb(98, 133, 52); + } + + .icon-container.update > iron-icon { + --iron-icon-fill-color: rgb(34, 135, 211); + } </style> + <template is="dom-if" if="[[isLoading]]"> <div class="loading-spinner"> <paper-spinner-lite active="[[isLoading]]"> </paper-spinner-lite> </div> </template> + <template is="dom-if" if="[[!isLoading]]"> <template is="dom-repeat" items="[[traces]]"> - <trace-report trace="[[item]]"></trace-report> + <trace-report trace="[[item]]" on-show-toast="showToastHandler_"> + </trace-report> </template> -</template> \ No newline at end of file +</template> + +<cr-toast id="toast" duration="5000"> + <div id="notification-card"> + <div class$="icon-container [[getNotificationStyling_(notification.type)]]"> + <iron-icon icon="[[getNotificationIcon_(notification.type)]]" + aria-hidden="true"> + </iron-icon> + </div> + <div class="notification-message"> + <h4 class$="notification-type + [[getNotificationStyling_(notification.type)]]"> + [[notification.type]] + </h4> + <span class="notification-label">[[notification.label]]</span> + </div> + </div> +</cr-toast> \ No newline at end of file
diff --git a/content/browser/resources/traces_internals/trace_report_list.ts b/content/browser/resources/traces_internals/trace_report_list.ts index 33cdd45..4bece1e 100644 --- a/content/browser/resources/traces_internals/trace_report_list.ts +++ b/content/browser/resources/traces_internals/trace_report_list.ts
@@ -3,14 +3,42 @@ // found in the LICENSE file. import './trace_report.js'; +import 'chrome://resources/cr_elements/cr_toast/cr_toast.js'; +import 'chrome://resources/cr_elements/icons.html.js'; import 'chrome://resources/polymer/v3_0/paper-spinner/paper-spinner-lite.js'; -import {PolymerElement} from '//resources/polymer/v3_0/polymer/polymer_bundled.min.js'; +import {CrToastElement} from 'chrome://resources/cr_elements/cr_toast/cr_toast.js'; +import {assert} from 'chrome://resources/js/assert.js'; +import {PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; import {ClientTraceReport} from './trace_report.mojom-webui.js'; import {TraceReportBrowserProxy} from './trace_report_browser_proxy.js'; import {getTemplate} from './trace_report_list.html.js'; +export enum NotificationTypeEnum { + UPDATE = 'Update', + ERROR = 'Error', + ANNOUNCEMENT = 'Announcement' +} + +export class Notification { + readonly type: NotificationTypeEnum; + readonly label: string; + readonly icon: string; + readonly style: string; + + constructor(type: NotificationTypeEnum, label: string) { + this.type = type; + this.label = label; + } +} + +export interface TraceReportListElement { + $: { + toast: CrToastElement, + }; +} + export class TraceReportListElement extends PolymerElement { static get is() { return 'trace-report-list'; @@ -24,6 +52,7 @@ return { traces: Array, isLoading: Boolean, + notification: Notification, }; } @@ -31,22 +60,59 @@ TraceReportBrowserProxy.getInstance(); private traces: ClientTraceReport[] = []; private isLoading: boolean = false; + private notification: Readonly<Notification>; - override connectedCallback() { + override connectedCallback(): void { super.connectedCallback(); this.initializeList(); } private async initializeList(): Promise<void> { this.isLoading = true; - // TODO(b/299476756): |result| can be empty/null/false in some methods - // which should be handled differently than currently for the user to - // know if an action has return the value expected or not. Not simply - // if the call to the method failed. const {reports} = await this.traceReportProxy_.handler.getAllTraceReports(); - this.traces = reports; + if (reports) { + this.traces = reports; + } else { + this.traces = []; + this.notification = new Notification( + NotificationTypeEnum.ERROR, + 'Error: Could not retrieve any trace reports.'); + this.$.toast.show(); + } this.isLoading = false; } + + private showToastHandler_(e: CustomEvent<Notification>): void { + assert(e.detail); + this.notification = e.detail; + this.$.toast.show(); + } + + private getNotificationIcon_(type: NotificationTypeEnum): string { + switch (type) { + case NotificationTypeEnum.ANNOUNCEMENT: + return 'cr:info-outline'; + case NotificationTypeEnum.ERROR: + return 'cr:error-outline'; + case NotificationTypeEnum.UPDATE: + return 'cr:sync'; + default: + return ''; + } + } + + private getNotificationStyling_(type: NotificationTypeEnum): string { + switch (type) { + case NotificationTypeEnum.ANNOUNCEMENT: + return 'announcement'; + case NotificationTypeEnum.ERROR: + return 'error'; + case NotificationTypeEnum.UPDATE: + return 'update'; + default: + return ''; + } + } } declare global {
diff --git a/content/browser/web_package/prefetched_signed_exchange_cache.cc b/content/browser/web_package/prefetched_signed_exchange_cache.cc index e7305b1f..09c5307 100644 --- a/content/browser/web_package/prefetched_signed_exchange_cache.cc +++ b/content/browser/web_package/prefetched_signed_exchange_cache.cc
@@ -555,6 +555,7 @@ request.url, request.trusted_params->isolation_info.site_for_cookies(), *request.trusted_params->isolation_info.top_frame_origin(), request.has_storage_access, std::move(match_options), + request.is_ad_tagged, base::BindOnce(&PrefetchedNavigationLoaderInterceptor::OnGetCookies, weak_factory_.GetWeakPtr(), std::move(callback), std::move(fallback_callback)));
diff --git a/content/browser/web_package/signed_exchange_handler.cc b/content/browser/web_package/signed_exchange_handler.cc index 98db17b..c914787 100644 --- a/content/browser/web_package/signed_exchange_handler.cc +++ b/content/browser/web_package/signed_exchange_handler.cc
@@ -745,7 +745,7 @@ cookie_manager_->GetAllForUrl( envelope_->request_url().url, isolation_info.site_for_cookies(), *isolation_info.top_frame_origin(), /*has_storage_access=*/true, - std::move(match_options), + std::move(match_options), /*is_ad_tagged=*/false, base::BindOnce(&SignedExchangeHandler::OnGetCookies, weak_factory_.GetWeakPtr(), std::move(callback))); }
diff --git a/content/browser/webid/federated_auth_request_impl_unittest.cc b/content/browser/webid/federated_auth_request_impl_unittest.cc index 70a0d9b..bb5bb49 100644 --- a/content/browser/webid/federated_auth_request_impl_unittest.cc +++ b/content/browser/webid/federated_auth_request_impl_unittest.cc
@@ -2549,15 +2549,20 @@ namespace { // TestDialogController subclass which supports WeakPtr. -class WeakTestDialogController - : public TestDialogController, - public base::SupportsWeakPtr<WeakTestDialogController> { +class WeakTestDialogController : public TestDialogController { public: explicit WeakTestDialogController(MockConfiguration configuration) : TestDialogController(configuration) {} ~WeakTestDialogController() override = default; WeakTestDialogController(WeakTestDialogController&) = delete; WeakTestDialogController& operator=(WeakTestDialogController&) = delete; + + base::WeakPtr<WeakTestDialogController> AsWeakPtr() { + return weak_ptr_factory_.GetWeakPtr(); + } + + private: + base::WeakPtrFactory<WeakTestDialogController> weak_ptr_factory_{this}; }; } // namespace
diff --git a/content/browser/webui/content_web_ui_configs.cc b/content/browser/webui/content_web_ui_configs.cc index 725dfa0..17d550f 100644 --- a/content/browser/webui/content_web_ui_configs.cc +++ b/content/browser/webui/content_web_ui_configs.cc
@@ -16,12 +16,12 @@ #include "content/browser/process_internals/process_internals_ui.h" #include "content/browser/quota/quota_internals_ui.h" #include "content/browser/service_worker/service_worker_internals_ui.h" -#include "content/browser/tracing/trace_report/trace_report_internals_ui.h" #include "content/browser/ukm_internals_ui.h" #include "content/browser/webrtc/webrtc_internals_ui.h" #include "content/public/browser/webui_config_map.h" #if !BUILDFLAG(IS_ANDROID) +#include "content/browser/tracing/trace_report/trace_report_internals_ui.h" #include "content/browser/tracing/tracing_ui.h" #endif @@ -43,7 +43,6 @@ map.AddWebUIConfig(std::make_unique<ProcessInternalsUIConfig>()); map.AddWebUIConfig(std::make_unique<QuotaInternalsUIConfig>()); map.AddWebUIConfig(std::make_unique<ServiceWorkerInternalsUIConfig>()); - map.AddWebUIConfig(std::make_unique<TraceReportInternalsUIConfig>()); map.AddWebUIConfig(std::make_unique<UkmInternalsUIConfig>()); map.AddWebUIConfig(std::make_unique<WebRTCInternalsUIConfig>()); @@ -52,6 +51,7 @@ #endif #if !BUILDFLAG(IS_ANDROID) + map.AddWebUIConfig(std::make_unique<TraceReportInternalsUIConfig>()); map.AddWebUIConfig(std::make_unique<TracingUIConfig>()); #endif }
diff --git a/content/public/browser/global_routing_id.h b/content/public/browser/global_routing_id.h index 40f386d..e7b582f 100644 --- a/content/public/browser/global_routing_id.h +++ b/content/public/browser/global_routing_id.h
@@ -11,7 +11,9 @@ #include "base/hash/hash.h" #include "base/i18n/number_formatting.h" #include "content/common/content_export.h" +#include "content/public/common/content_constants.h" #include "ipc/ipc_message.h" +#include "third_party/blink/public/common/tokens/tokens.h" #include "third_party/perfetto/include/perfetto/tracing/traced_value_forward.h" namespace perfetto::protos::pbzero { @@ -33,20 +35,25 @@ // The unique ID of the child process (this is different from OS's PID / this // should come from RenderProcessHost::GetID()). - int child_id = -1; + int child_id = kInvalidChildProcessUniqueId; // The route ID. int route_id = -1; - bool operator<(const GlobalRoutingID& other) const { - return std::tie(child_id, route_id) < - std::tie(other.child_id, other.route_id); + friend bool operator<(const GlobalRoutingID& lhs, + const GlobalRoutingID& rhs) { + return std::tie(lhs.child_id, lhs.route_id) < + std::tie(rhs.child_id, rhs.route_id); } - bool operator==(const GlobalRoutingID& other) const { - return child_id == other.child_id && route_id == other.route_id; + + friend bool operator==(const GlobalRoutingID& lhs, + const GlobalRoutingID& rhs) { + return lhs.child_id == rhs.child_id && lhs.route_id == rhs.route_id; } - bool operator!=(const GlobalRoutingID& other) const { - return !(*this == other); + + friend bool operator!=(const GlobalRoutingID& lhs, + const GlobalRoutingID& rhs) { + return !(lhs == rhs); } }; @@ -79,16 +86,21 @@ // RenderFrameHost::GetRoutingID(). int frame_routing_id = MSG_ROUTING_NONE; - bool operator<(const GlobalRenderFrameHostId& other) const { - return std::tie(child_id, frame_routing_id) < - std::tie(other.child_id, other.frame_routing_id); + friend bool operator<(const GlobalRenderFrameHostId& lhs, + const GlobalRenderFrameHostId& rhs) { + return std::tie(lhs.child_id, lhs.frame_routing_id) < + std::tie(rhs.child_id, rhs.frame_routing_id); } - bool operator==(const GlobalRenderFrameHostId& other) const { - return child_id == other.child_id && - frame_routing_id == other.frame_routing_id; + + friend bool operator==(const GlobalRenderFrameHostId& lhs, + const GlobalRenderFrameHostId& rhs) { + return lhs.child_id == rhs.child_id && + lhs.frame_routing_id == rhs.frame_routing_id; } - bool operator!=(const GlobalRenderFrameHostId& other) const { - return !(*this == other); + + friend bool operator!=(const GlobalRenderFrameHostId& lhs, + const GlobalRenderFrameHostId& rhs) { + return !(lhs == rhs); } explicit operator bool() const { return frame_routing_id != MSG_ROUTING_NONE; @@ -99,6 +111,48 @@ void WriteIntoTrace(perfetto::TracedProto<TraceProto> proto) const; }; +// Similar to GlobalRenderFrameHostId except that it uses FrameTokens instead +// of routing ids. +// +// These tokens can be considered to be unique for the lifetime of the browser +// process. +struct GlobalRenderFrameHostToken { + GlobalRenderFrameHostToken() = default; + + // GlobalRenderFrameHostToken is copyable. + GlobalRenderFrameHostToken(const GlobalRenderFrameHostToken&) = default; + GlobalRenderFrameHostToken& operator=(const GlobalRenderFrameHostToken&) = + default; + + GlobalRenderFrameHostToken(int child_id, + const blink::LocalFrameToken& frame_token) + : child_id(child_id), frame_token(frame_token) {} + + // The unique ID of the child process (this is different from OS's PID / this + // should come from RenderProcessHost::GetID()). + int child_id = kInvalidChildProcessUniqueId; + + // The `LocalFrameToken` of blink::WebLocalFrame - should come from + // RenderFrameHost::GetFrameToken(). + blink::LocalFrameToken frame_token; + + friend bool operator<(const GlobalRenderFrameHostToken& lhs, + const GlobalRenderFrameHostToken& rhs) { + return std::tie(lhs.child_id, lhs.frame_token) < + std::tie(rhs.child_id, rhs.frame_token); + } + + friend bool operator==(const GlobalRenderFrameHostToken& lhs, + const GlobalRenderFrameHostToken& rhs) { + return lhs.child_id == rhs.child_id && lhs.frame_token == rhs.frame_token; + } + + friend bool operator!=(const GlobalRenderFrameHostToken& lhs, + const GlobalRenderFrameHostToken& rhs) { + return !(lhs == rhs); + } +}; + inline std::ostream& operator<<(std::ostream& os, const GlobalRenderFrameHostId& id) { os << "GlobalRenderFrameHostId(" << id.child_id << ", " << id.frame_routing_id
diff --git a/content/public/browser/render_frame_host.h b/content/public/browser/render_frame_host.h index 5655f7e..7a53e2c 100644 --- a/content/public/browser/render_frame_host.h +++ b/content/public/browser/render_frame_host.h
@@ -109,6 +109,7 @@ class BrowserContext; class DocumentRef; struct GlobalRenderFrameHostId; +struct GlobalRenderFrameHostToken; class RenderProcessHost; class RenderViewHost; class RenderWidgetHost; @@ -134,12 +135,10 @@ static RenderFrameHost* FromID(const GlobalRenderFrameHostId& id); static RenderFrameHost* FromID(int render_process_id, int render_frame_id); - // Returns the RenderFrameHost given its frame token and its process - // ID. Returns nullptr if the frame token does not correspond to a live - // RenderFrameHost. + // Returns the RenderFrameHost given its global frame token. Returns nullptr + // if the frame token does not correspond to a live RenderFrameHost. static RenderFrameHost* FromFrameToken( - int initiator_process_id, - const blink::LocalFrameToken& frame_token); + const GlobalRenderFrameHostToken& frame_token); // Globally allows for injecting JavaScript into the main world. This feature // is present only to support Android WebView, WebLayer, Fuchsia web.Contexts, @@ -215,9 +214,15 @@ virtual RenderProcessHost* GetProcess() const = 0; // Returns the GlobalRenderFrameHostId for this frame. Embedders should store - // this instead of a raw RenderFrameHost pointer. + // this instead of a raw RenderFrameHost pointer. This API is based on routing + // IDs from legacy IPC. The renderer may not have routing IDs for frames so it + // is preferred to use `GetGlobalFrameToken` over this API. virtual GlobalRenderFrameHostId GetGlobalId() const = 0; + // Returns the GlobalRenderFrameHostToken for this frame. Embedders should + // store this instead of a raw RenderFrameHost pointer. + virtual GlobalRenderFrameHostToken GetGlobalFrameToken() const = 0; + // Returns a StoragePartition associated with this RenderFrameHost. // Associated StoragePartition never changes. virtual StoragePartition* GetStoragePartition() = 0;
diff --git a/content/renderer/pepper/ppb_graphics_3d_impl.cc b/content/renderer/pepper/ppb_graphics_3d_impl.cc index de19c2a..73118791 100644 --- a/content/renderer/pepper/ppb_graphics_3d_impl.cc +++ b/content/renderer/pepper/ppb_graphics_3d_impl.cc
@@ -351,7 +351,6 @@ attrib_helper.context_type = gpu::CONTEXT_TYPE_OPENGLES2; gpu::CommandBufferProxyImpl* share_buffer = nullptr; - UMA_HISTOGRAM_BOOLEAN("Pepper.Graphics3DHasShareGroup", !!share_context); if (share_context) { PPB_Graphics3D_Impl* share_graphics = static_cast<PPB_Graphics3D_Impl*>(share_context);
diff --git a/content/shell/BUILD.gn b/content/shell/BUILD.gn index 5cc4261f3..4719563 100644 --- a/content/shell/BUILD.gn +++ b/content/shell/BUILD.gn
@@ -500,7 +500,6 @@ "$root_gen_dir/content/service_worker_resources.pak", "$root_gen_dir/content/shell/shell_resources.pak", "$root_gen_dir/content/test/web_ui_mojo_test_resources.pak", - "$root_gen_dir/content/traces_internals_resources.pak", "$root_gen_dir/mojo/public/js/mojo_bindings_resources.pak", "$root_gen_dir/net/net_resources.pak", "$root_gen_dir/third_party/blink/public/resources/blink_resources.pak", @@ -541,7 +540,10 @@ if (!is_android) { deps += [ "//content/browser/tracing:resources" ] - sources += [ "$root_gen_dir/content/browser/tracing/tracing_resources.pak" ] + sources += [ + "$root_gen_dir/content/browser/tracing/tracing_resources.pak", + "$root_gen_dir/content/traces_internals_resources.pak", + ] } if (is_ios) {
diff --git a/content/test/content_test_bundle_data.filelist b/content/test/content_test_bundle_data.filelist index 6435bb51..d25a379 100644 --- a/content/test/content_test_bundle_data.filelist +++ b/content/test/content_test_bundle_data.filelist
@@ -5785,6 +5785,7 @@ data/form_that_posts_cross_site.html data/form_that_posts_to_echoall.html data/form_that_posts_to_echoall_nocache.html +data/format_error.js data/forms/form_controls_browsertest_button.png data/forms/form_controls_browsertest_button_android.png data/forms/form_controls_browsertest_button_fuchsia.png
diff --git a/content/test/data/background_sync/test.html b/content/test/data/background_sync/test.html index 4975da1..fc1f3af 100644 --- a/content/test/data/background_sync/test.html +++ b/content/test/data/background_sync/test.html
@@ -2,6 +2,7 @@ <html> <head> <title>Background Sync API Test</title> + <script src="../format_error.js"></script> <script src="../result_queue.js"></script> <script src="background_sync_test_helpers.js"></script> </head>
diff --git a/content/test/data/content_index/test.html b/content/test/data/content_index/test.html index aa16827..656dec6a 100644 --- a/content/test/data/content_index/test.html +++ b/content/test/data/content_index/test.html
@@ -2,7 +2,7 @@ <html> <head> <title>Content Index API Test</title> - <script src="../result_queue.js"></script> + <script src="../format_error.js"></script> </head> <body> <h1>Content Index Test</h1>
diff --git a/chrome/browser/resources/chromeos/login/.eslintrc.js b/content/test/data/format_error.js similarity index 64% copy from chrome/browser/resources/chromeos/login/.eslintrc.js copy to content/test/data/format_error.js index 7481f707..aef6532 100644 --- a/chrome/browser/resources/chromeos/login/.eslintrc.js +++ b/content/test/data/format_error.js
@@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -module.exports = { - 'rules' : { - 'no-var' : 'off', - }, -}; +function formatError(error) { + return error.name + ' - ' + error.message; +}
diff --git a/content/test/data/result_queue.js b/content/test/data/result_queue.js index e6f00f1..feb0b623 100644 --- a/content/test/data/result_queue.js +++ b/content/test/data/result_queue.js
@@ -37,7 +37,3 @@ ResultQueue.prototype.popImmediately = function() { return this.queue.length ? this.queue.pop() : null; }; - -function formatError(error) { - return error.name + ' - ' + error.message; -}
diff --git a/gin/OWNERS b/gin/OWNERS index 15d93775..e1ffbf82 100644 --- a/gin/OWNERS +++ b/gin/OWNERS
@@ -8,7 +8,9 @@ # For adding JS/Wasm feature kill-switches. per-file gin_features.*=adamk@chromium.org +per-file gin_features.*=syg@chromium.org per-file v8_initializer.cc=adamk@chromium.org +per-file v8_initializer.cc=syg@chromium.org # For ThreadIsolation related changes. per-file thread_isolation.*=sroettger@google.com
diff --git a/gpu/command_buffer/service/graphite_image_provider.cc b/gpu/command_buffer/service/graphite_image_provider.cc index e989688..1941839 100644 --- a/gpu/command_buffer/service/graphite_image_provider.cc +++ b/gpu/command_buffer/service/graphite_image_provider.cc
@@ -3,6 +3,7 @@ // found in the LICENSE file. #include "gpu/command_buffer/service/graphite_image_provider.h" +#include "base/metrics/histogram_macros.h" #include "third_party/skia/include/gpu/graphite/Image.h" namespace gpu { @@ -37,7 +38,11 @@ // Check whether this image has an entry in the cache and return it if so. auto result = cache_.find(key); - if (result != cache_.end()) { + bool hit_in_cache = result != cache_.end(); + UMA_HISTOGRAM_BOOLEAN("Gpu.Graphite.GraphiteImageProviderAccessHitInCache", + hit_in_cache); + + if (hit_in_cache) { return result->second; }
diff --git a/gpu/ipc/service/gpu_init.cc b/gpu/ipc/service/gpu_init.cc index d6a0a215..c5ab7f07 100644 --- a/gpu/ipc/service/gpu_init.cc +++ b/gpu/ipc/service/gpu_init.cc
@@ -446,6 +446,10 @@ gl_display = gl::init::InitializeGLNoExtensionsOneOff( /*init_bindings*/ false, gl::GpuPreference::kDefault); if (!gl_display) { + // If GL initialization failed, GPU process will be teardown later, sp set + // gpu_preferences_.gr_context_type to kGL to avoid initializing + // DawnContextProvider later. + gpu_preferences_.gr_context_type = GrContextType::kGL; VLOG(1) << "gl::init::InitializeGLNoExtensionsOneOff failed"; return false; }
diff --git a/ios/chrome/app/application_delegate/app_state.h b/ios/chrome/app/application_delegate/app_state.h index 7bb56bb4..fd89caa 100644 --- a/ios/chrome/app/application_delegate/app_state.h +++ b/ios/chrome/app/application_delegate/app_state.h
@@ -15,7 +15,6 @@ @class AppState; class ChromeBrowserState; @class CommandDispatcher; -@protocol ConnectionInformation; @class SceneState; @class MemoryWarningHelper; @class MetricsMediator; @@ -80,9 +79,6 @@ // YES if the app is resuming from safe mode. @property(nonatomic) BOOL resumingFromSafeMode; -// The last window which received a tap. -@property(nonatomic, weak) UIWindow* lastTappedWindow; - // The SceneSession ID for the last session, where the Device doesn't support // multiple windows. @property(nonatomic, strong) NSString* previousSingleWindowSessionID;
diff --git a/ios/chrome/app/application_delegate/app_state.mm b/ios/chrome/app/application_delegate/app_state.mm index fdf2e460..430387e 100644 --- a/ios/chrome/app/application_delegate/app_state.mm +++ b/ios/chrome/app/application_delegate/app_state.mm
@@ -521,14 +521,6 @@ }]]; } -- (void)setLastTappedWindow:(UIWindow*)window { - if (_lastTappedWindow == window) { - return; - } - _lastTappedWindow = window; - [self.observers appState:self lastTappedWindowChanged:window]; -} - - (void)initializeUIPreSafeMode { // TODO(crbug.com/1197330): Consider replacing this with a DCHECK once we // make sure that #initializeUIPreSafeMode is only called once. This should
diff --git a/ios/chrome/app/application_delegate/app_state_observer.h b/ios/chrome/app/application_delegate/app_state_observer.h index bb56723c..a1a2736 100644 --- a/ios/chrome/app/application_delegate/app_state_observer.h +++ b/ios/chrome/app/application_delegate/app_state_observer.h
@@ -5,7 +5,6 @@ #define IOS_CHROME_APP_APPLICATION_DELEGATE_APP_STATE_OBSERVER_H_ @class AppState; -@class UIWindow; @class SceneState; // App initialization stages. The app will go sequentially in-order through each @@ -71,9 +70,6 @@ - (void)appState:(AppState*)appState firstSceneHasInitializedUI:(SceneState*)sceneState; -// Called when `AppState.lastTappedWindow` changes. -- (void)appState:(AppState*)appState lastTappedWindowChanged:(UIWindow*)window; - // Called when the app is about to transition to `nextInitStage`. The init stage // of the app at that moment is still `nextInitStage` - 1. - (void)appState:(AppState*)appState
diff --git a/ios/chrome/app/strings/resources/ios_chromium_strings_iw.xtb b/ios/chrome/app/strings/resources/ios_chromium_strings_iw.xtb index c986d78..d110c38 100644 --- a/ios/chrome/app/strings/resources/ios_chromium_strings_iw.xtb +++ b/ios/chrome/app/strings/resources/ios_chromium_strings_iw.xtb
@@ -96,6 +96,7 @@ <translation id="4654936625574199632">כדי לעזור בשיפור האפליקציה, Chromium ישלח נתוני שימוש וקריסות אל Google. <ph name="BEGIN_LINK" />ניהול<ph name="END_LINK" /></translation> <translation id="4681781466797808448">הפעלת הסורק של Chromium</translation> <translation id="4736424910885271643">החשבון שלך מנוהל על ידי <ph name="HOSTED_DOMAIN" />, ולכן הנתונים שלך מ-Chromium יימחקו מהמכשיר הזה</translation> +<translation id="4773487571745795781">השבתת את הכניסה אל Chromium.</translation> <translation id="4790638144988730920">המשך השימוש בנתוני Chromium בחשבון Google שלך.</translation> <translation id="4828317641996116749">Chromium לא הצליח לבדוק את כל הסיסמאות. אפשר לנסות שוב מאוחר יותר.</translation> <translation id="4985291216379576555">אופליין, Chromium לא יכול לחפש עדכונים</translation>
diff --git a/ios/chrome/app/strings/resources/ios_chromium_strings_uz.xtb b/ios/chrome/app/strings/resources/ios_chromium_strings_uz.xtb index fdc2be5..3fff7e09 100644 --- a/ios/chrome/app/strings/resources/ios_chromium_strings_uz.xtb +++ b/ios/chrome/app/strings/resources/ios_chromium_strings_uz.xtb
@@ -95,6 +95,7 @@ <translation id="4654936625574199632">Ilovani yaxshilash maqsadida Chrome foydalanish statistikasi va ishdan chiqishlar axborotini Googlega yuboradi. <ph name="BEGIN_LINK" />Boshqarish<ph name="END_LINK" /></translation> <translation id="4681781466797808448">Chromium skanerini ochish</translation> <translation id="4736424910885271643">Hisobingiz <ph name="HOSTED_DOMAIN" /> domenida boshqariladi, shuning uchun bu qurilmadagi Chromium maʼlumotlari tozalanadi</translation> +<translation id="4773487571745795781">Chromiumga kirish funksiyasini faolsizlantirdingiz</translation> <translation id="4790638144988730920">Chromium maʼlumotlari Google hisobingizda saqlanishda davom etsin.</translation> <translation id="4828317641996116749">Chromium barcha parollarni tekshira olmadi. Keyinroq qayta urining.</translation> <translation id="4985291216379576555">Oflayn, Chromium yangilanishlar chiqqanini tekshira olmadi</translation>
diff --git a/ios/chrome/app/strings/resources/ios_google_chrome_strings_iw.xtb b/ios/chrome/app/strings/resources/ios_google_chrome_strings_iw.xtb index f6c7dd08..8841add 100644 --- a/ios/chrome/app/strings/resources/ios_google_chrome_strings_iw.xtb +++ b/ios/chrome/app/strings/resources/ios_google_chrome_strings_iw.xtb
@@ -6,6 +6,7 @@ <translation id="1180362651362502943">המשך השימוש בנתוני Chrome בחשבון Google שלך</translation> <translation id="1200396280085622191">שימוש ב-Chrome בכל פעם שמקישים על קישורים בהודעות ובאפליקציות אחרות.</translation> <translation id="1282031177488366470">עזרה בשיפור התכונות והביצועים של Chrome</translation> +<translation id="1320619893013575407">השבתת את הכניסה אל Chrome.</translation> <translation id="1333745675627230582">הפעלת המשחק Chrome Dino</translation> <translation id="1352919863522755794">למנהל הסיסמאות של Google לא הייתה אפשרות לבדוק את הסיסמאות. יש לבדוק את החיבור לאינטרנט.</translation> <translation id="1407843355326180937">יש להיכנס לאתר הזה ול-Chrome כדי שהסימניות ונתונים נוספים יופיעו בכל המכשירים שלך.</translation>
diff --git a/ios/chrome/app/strings/resources/ios_google_chrome_strings_uz.xtb b/ios/chrome/app/strings/resources/ios_google_chrome_strings_uz.xtb index 8f54bdb..5ff4d17 100644 --- a/ios/chrome/app/strings/resources/ios_google_chrome_strings_uz.xtb +++ b/ios/chrome/app/strings/resources/ios_google_chrome_strings_uz.xtb
@@ -6,6 +6,7 @@ <translation id="1180362651362502943">Chrome maʼlumotlari Google hisobingizda saqlanishda davom etsin.</translation> <translation id="1200396280085622191">Xabarlar va boshqa ilovalardagi havolalar bosilganda Chrome ochilsin.</translation> <translation id="1282031177488366470">Chrome funksiyalari va unumdorligini yaxshilashga yordam bering</translation> +<translation id="1320619893013575407">Chromega kirish funksiyasini faolsizlantirdingiz</translation> <translation id="1333745675627230582">Chrome Dino oʻyinini boshlash</translation> <translation id="1352919863522755794">Google Parollar menejeri parollarni tekshira olmadi. Internet aloqasini tekshiring.</translation> <translation id="1407843355326180937">Bukmarklar va boshqalarni barcha qurilmalarda olish uchun bu sayt va Chromega Google hisobingizdan kiring.</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_ar.xtb b/ios/chrome/app/strings/resources/ios_strings_ar.xtb index 48b9ac5..4b640475 100644 --- a/ios/chrome/app/strings/resources/ios_strings_ar.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_ar.xtb
@@ -48,6 +48,7 @@ <translation id="1219674500290482172">يتعذر الاتصال بالإنترنت.</translation> <translation id="1226238226094914652">كلمات المرور على جميع أجهزتك</translation> <translation id="122699739164161391">إغلاق جميع علامات التبويب</translation> +<translation id="1227866575467023566">{count,plural, =1{تمت إضافة صفحة واحدة إلى قائمة القراءة في عنوان حسابك {email}.}zero{تمت إضافة {count} صفحة إلى قائمة القراءة في عنوان حسابك {email}.}two{تمت إضافة صفحتَين ({count}) إلى قائمة القراءة في عنوان حسابك {email}.}few{تمت إضافة {count} صفحات إلى قائمة القراءة في عنوان حسابك {email}.}many{تمت إضافة {count} صفحة إلى قائمة القراءة في عنوان حسابك {email}.}other{تمت إضافة {count} صفحة إلى قائمة القراءة في عنوان حسابك {email}.}}</translation> <translation id="1229222343402087523">البحث عن ${searchPhrase} في متصفِّح Chrome</translation> <translation id="1242044645101871359">تسجيل الدخول مرة أخرى</translation> <translation id="1248276223555153952">إدارة الحسابات على هذا الجهاز…</translation> @@ -125,6 +126,7 @@ <translation id="1580715474678097352">الحماية من المواقع الإلكترونية الضارّة</translation> <translation id="1580783302095112590">تم إرسال البريد.</translation> <translation id="1582732959743469162">سيؤدي ذلك إلى إيقاف تقدّم جميع عمليات التنزيل الحالية.</translation> +<translation id="158591023028013564">{count,plural, =1{تمت إضافة صفحة واحدة إلى قائمة القراءة.}zero{تمت إضافة {count} صفحة إلى قائمة القراءة.}two{تمت إضافة صفحتَين ({count}) إلى قائمة القراءة.}few{تمت إضافة {count} صفحات إلى قائمة القراءة.}many{تمت إضافة {count} صفحة إلى قائمة القراءة.}other{تمت إضافة {count} صفحة إلى قائمة القراءة.}}</translation> <translation id="1594034544529347967">البدء</translation> <translation id="160275202205869636">عند تفعيل هذا الإعداد، يمكنك استخدام البيانات وحفظها في حسابك على Google. أمّا في حال إيقاف هذا الإعداد، فسيتم حفظ البيانات على هذا الجهاز فقط.</translation> <translation id="1605405588277479165">غير مفعّل - (غير مستحسَن)</translation> @@ -424,6 +426,7 @@ <translation id="3157387275655328056">إضافة إلى قائمة القراءة</translation> <translation id="3157684681743766797">وضع علامة على الكل...</translation> <translation id="315778507796115851">السجلّ</translation> +<translation id="31652791196570636">إغلاق</translation> <translation id="3169472444629675720">اقتراحات</translation> <translation id="3174662312949010067">يمكنك أيضًا استخدام كلمات المرور المحفوظة على أجهزتك الأخرى.</translation> <translation id="3175081911749765310">خدمات الويب</translation> @@ -587,6 +590,7 @@ <translation id="4112644173421521737">بحث</translation> <translation id="4113030288477039509">يديره المسؤول</translation> <translation id="4113957097611235433">تغيير كلمات المرور</translation> +<translation id="4120936477286528673">يحاول هذا الموقع الإلكتروني فتح تطبيق آخر بشكل متكرر.</translation> <translation id="4121993058175073134">لإرسال بيانات تصدير الشبكة، يُرجى إعداد حساب بريدك الإلكتروني في التطبيق "الإعدادات".</translation> <translation id="4124987746317609294">النطاق الزمني</translation> <translation id="4133265950310064865">حماية مُحسّنة</translation> @@ -781,6 +785,7 @@ <translation id="5142890110117755815">{COUNT,plural, =1{كلمة مرور واحدة ضعيفة ({COUNT})}zero{{COUNT} كلمة مرور ضعيفة}two{كلِمتا مرور ضعيفتان ({COUNT})}few{{COUNT} كلمات مرور ضعيفة}many{{COUNT} كلمة مرور ضعيفة}other{{COUNT} كلمة مرور ضعيفة}}</translation> <translation id="5149188072385105201">إضافة كلمة مرور…</translation> <translation id="5150492518600715772">الإرسال إلى جهازك</translation> +<translation id="5157638238828697074">حدث خطأ. تعذَّر فتح التطبيق.</translation> <translation id="5168414296986405587">مصمّم لنظام التشغيل iPadOS</translation> <translation id="5173088371991956744">تحتاج ميزة المزامنة إلى التحقّق من هويتك</translation> <translation id="5173493422621051500">استخدام لوحة المفاتيح</translation> @@ -807,6 +812,8 @@ <translation id="5235389474593199952">إخفاء السجل</translation> <translation id="5238301240406177137">الحفظ في الحساب</translation> <translation id="5245322853195994030">إلغاء المزامنة</translation> +<translation id="5248640482715684545">يحاول هذا الموقع الإلكتروني فتح تطبيق آخر.</translation> +<translation id="5256661381001734217">يحاول هذا الموقع الإلكتروني فتح أحد التطبيقات. وسيؤدي هذا إلى الخروج من وضع التصفُّح المتخفي.</translation> <translation id="5256908199795498284">سيكتشف Chrome أرقام تتبُّع الطرود على المواقع الإلكترونية التي تزورها ويعرض لك إشعارات الطرود في صفحة "علامة تبويب جديدة". ستتم مشاركة بياناتك مع Google لتوفير هذه الميزة وتحسين خدمة Shopping للجميع.</translation> <translation id="5271265092610673171">{count,plural, =1{هناك حقل مطلوب فارغ. يُرجى ملء هذا الحقل قبل الحفظ.}zero{بعض الحقول المطلوبة فارغة. يُرجى ملء هذه الحقول قبل الحفظ.}two{هناك حقلان مطلوبان فارغان. يُرجى ملء هذين الحقلين قبل الحفظ.}few{بعض الحقول المطلوبة فارغة. يُرجى ملء هذه الحقول قبل الحفظ.}many{بعض الحقول المطلوبة فارغة. يُرجى ملء هذه الحقول قبل الحفظ.}other{بعض الحقول المطلوبة فارغة. يُرجى ملء هذه الحقول قبل الحفظ.}}</translation> <translation id="5271549068863921519">حفظ كلمة المرور</translation> @@ -906,6 +913,7 @@ <translation id="5834415013958049700">البحث باستخدام "عدسة Google" عن الصورة المنسوخة</translation> <translation id="5844284118433003733">عند تسجيل الدخول، يتم ربط هذه البيانات بحسابك على Google لحمايتك على خدمات Google، مثلاً تتم زيادة مستوى الحماية في Gmail بعد وقوع محاولة اختراق أمني.</translation> <translation id="5846482154967366008">محرك بحث</translation> +<translation id="5850913622988109693">خيارات تتبُّع الحِزم</translation> <translation id="5854790677617711513">مرّ عليها أكثر من 30 يومًا</translation> <translation id="5857090052475505287">مجلد جديد</translation> <translation id="5857770089550859117">عبارة المرور مطلوبة لبدء المزامنة.</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_eu.xtb b/ios/chrome/app/strings/resources/ios_strings_eu.xtb index 779c9ed..4ed846a 100644 --- a/ios/chrome/app/strings/resources/ios_strings_eu.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_eu.xtb
@@ -48,6 +48,7 @@ <translation id="1219674500290482172">Ezin da konektatu Internetera.</translation> <translation id="1226238226094914652">Pasahitzak gailu guztietan</translation> <translation id="122699739164161391">Itxi fitxa guztiak</translation> +<translation id="1227866575467023566">{count,plural, =1{Gehitu da orria zure kontuaren ({email}) irakurketa-zerrendan}other{{count} orri gehitu dira zure kontuaren ({email}) irakurketa-zerrendan}}</translation> <translation id="1229222343402087523">Bilatu "${searchPhrase}" Chrome-n</translation> <translation id="1242044645101871359">Hasi saioa berriro</translation> <translation id="1248276223555153952">Kudeatu gailuko kontuak…</translation> @@ -123,6 +124,7 @@ <translation id="1580715474678097352">Webgune arriskutsuen aurka babestuta mantentzen zaitu</translation> <translation id="1580783302095112590">Mezua bidali da.</translation> <translation id="1582732959743469162">Eten egingo da abian den deskarga.</translation> +<translation id="158591023028013564">{count,plural, =1{Gehitu da orria zure irakurketa-zerrendan}other{{count} orri gehitu dira zure irakurketa-zerrendan}}</translation> <translation id="1594034544529347967">Hasiera</translation> <translation id="160275202205869636">Aktibatuta badago, datuak Google-ko kontuan erabiltzen eta gordetzen dira. Desaktibatuta badago, datuak gailu honetan soilik gordetzen dira.</translation> <translation id="1605405588277479165">Desaktibatuta: ez da gomendagarria</translation> @@ -422,6 +424,7 @@ <translation id="3157387275655328056">Gehitu zerrendan</translation> <translation id="3157684681743766797">Markatu guztiak…</translation> <translation id="315778507796115851">Historia</translation> +<translation id="31652791196570636">Baztertu</translation> <translation id="3169472444629675720">Ezagutu</translation> <translation id="3174662312949010067">Gordetako pasahitzak zure gainerako gailuetan ere erabil ditzakezu.</translation> <translation id="3175081911749765310">Web-zerbitzuak</translation> @@ -585,6 +588,7 @@ <translation id="4112644173421521737">Bilatu</translation> <translation id="4113030288477039509">Administratzaileak kudeatuta</translation> <translation id="4113957097611235433">Aldatu pasahitzak</translation> +<translation id="4120936477286528673">Webgunea behin eta berriro saiatzen ari da beste aplikazio bat irekitzen.</translation> <translation id="4121993058175073134">Sare-esportazioaren datuak bidaltzeko, konfiguratu posta-kontu elektronikoa Ezarpenak aplikazioan.</translation> <translation id="4124987746317609294">Denbora tartea</translation> <translation id="4133265950310064865">Babes hobetua</translation> @@ -779,6 +783,7 @@ <translation id="5142890110117755815">{COUNT,plural, =1{{COUNT} pasahitz ez da segurua}other{{COUNT} pasahitz ez dira seguruak}}</translation> <translation id="5149188072385105201">Gehitu pasahitz bat…</translation> <translation id="5150492518600715772">Bidali beste gailu batera</translation> +<translation id="5157638238828697074">Arazoren bat izan da. Ezin izan da ireki aplikazioa.</translation> <translation id="5168414296986405587">iPadOS-erako sortua</translation> <translation id="5173088371991956744">Sinkronizazioak zure identitatea egiaztatu behar du</translation> <translation id="5173493422621051500">Erabili teklatua</translation> @@ -805,6 +810,8 @@ <translation id="5235389474593199952">Ezkutatu "Historia"</translation> <translation id="5238301240406177137">Gorde kontuan</translation> <translation id="5245322853195994030">Utzi sinkronizazioa bertan behera</translation> +<translation id="5248640482715684545">Webgunea beste aplikazio bat irekitzen saiatzen ari da.</translation> +<translation id="5256661381001734217">Webgunea aplikazio bat irekitzen saiatzen ari da. Horrek ezkutuko modutik aterako zaitu.</translation> <translation id="5256908199795498284">Chrome-k paketeen jarraipen-zenbakiak hautemango ditu bisitatzen dituzun webguneetan, eta paketeei buruzko informazio eguneratua erakutsiko dizu Fitxa berria orrian. Eginbide hori emateko eta erosketak guztientzat hobetzeko, datuak Google-rekin partekatuko dira.</translation> <translation id="5271265092610673171">{count,plural, =1{Nahitaezko eremu bat hutsik dago. Bete ezazu gorde aurretik.}other{Nahitaezko eremu batzuk hutsik daude. Bete itzazu gorde aurretik.}}</translation> <translation id="5271549068863921519">Gorde pasahitza</translation> @@ -904,6 +911,7 @@ <translation id="5834415013958049700">Lens-en kopiatu duzun irudia</translation> <translation id="5844284118433003733">Saioa hasita daukazunean, datuak Google-ko kontuarekin lotzen dira Google-ren zerbitzu guztietan babestuta egon zaitezen; adibidez, Gmail-en babesa handiagotzen da segurtasun-gertakariren bat izan bada.</translation> <translation id="5846482154967366008">Bilatzailea</translation> +<translation id="5850913622988109693">Paketeen jarraipena egiteko aukerak</translation> <translation id="5854790677617711513">Duela 30 egunetik gorakoak</translation> <translation id="5857090052475505287">Karpeta berria</translation> <translation id="5857770089550859117">Pasaesaldia behar da sinkronizatzen hasteko.</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_iw.xtb b/ios/chrome/app/strings/resources/ios_strings_iw.xtb index 7b48d618..e32a9c10 100644 --- a/ios/chrome/app/strings/resources/ios_strings_iw.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_iw.xtb
@@ -524,6 +524,7 @@ <translation id="371230970611282515">המערכת חוזה אירועים מסוכנים ומזהירה אותך לגביהם לפני שהם מתרחשים.</translation> <translation id="371398631992790800">הסתרת הסימניות</translation> <translation id="37207012422556617">שאילתות חיפוש פופולריות</translation> +<translation id="3725081662140949903">כדי למנוע מאנשים אחרים להשתמש בסיסמה שלך, צריך לפתוח את האפליקציה <ph name="APP" /> ולשנות את הסיסמה</translation> <translation id="3740397331642243698">פתיחת כתובות ה-URL שהוזנו ב-Google Chrome במצב אנונימי.</translation> <translation id="374357899112510277">הסתרת ההורדות</translation> <translation id="3745190878148784130">הסתרה של 'הגדלת הטקסט'</translation> @@ -641,6 +642,7 @@ <translation id="4389019817280890563">צריך להקיש לשינוי שפה</translation> <translation id="4405320213589929829">אפשר להיעזר בכתובות בדפי אינטרנט כדי לקבל מידע מקומי ומסלולים.</translation> <translation id="4420409367264901497">עריכת סימנייה</translation> +<translation id="4431224949908513835">צריך לבחור אמצעי תשלום למילוי.</translation> <translation id="4442550905108052454">פותחים את ה<ph name="BEGIN_BOLD" />הגדרות<ph name="END_BOLD" />.</translation> <translation id="4454246407045105932">הוספת שפה</translation> <translation id="4461286950227634995">הצגת הצעות לשמירת סיסמאות</translation> @@ -1198,6 +1200,7 @@ <translation id="7221173315674413369">בתכונה 'מה חדש' אפשר לגלות תכונות וטיפים חדשים</translation> <translation id="7223102419539744003">סגירת הכרטיסייה</translation> <translation id="722454870747268814">כרטיסייה פרטית חדשה</translation> +<translation id="7233006041370588369">צריך לבחור סיסמה למילוי.</translation> <translation id="7265758999917665941">אף פעם עבור אתר זה</translation> <translation id="7272437679830969316">לא ניתן לאמת את הזהות שלך. הסיסמה לא הועתקה.</translation> <translation id="7284359491594949826">{COUNT,plural, =1{החבילה החדשה נמצאת במעקב}one{החבילות החדשות נמצאות במעקב}two{החבילות החדשות נמצאות במעקב}other{החבילות החדשות נמצאות במעקב}}</translation>
diff --git a/ios/chrome/app/strings/resources/ios_strings_uz.xtb b/ios/chrome/app/strings/resources/ios_strings_uz.xtb index e6173dca..377baf2e 100644 --- a/ios/chrome/app/strings/resources/ios_strings_uz.xtb +++ b/ios/chrome/app/strings/resources/ios_strings_uz.xtb
@@ -524,6 +524,7 @@ <translation id="371230970611282515">Xavfli tahdidlarni aniqlaydi va sizni ulardan himoya qiladi.</translation> <translation id="371398631992790800">Bukmarklarni yashirish</translation> <translation id="37207012422556617">Qidiruv trendlari</translation> +<translation id="3725081662140949903">Boshqalar parolingizni ishlatmasligi uchun <ph name="APP" /> ilovasini ochib, parolni almashtiring</translation> <translation id="3740397331642243698">Kiritilgan URL manzillar Google Chrome brauzerida Inkognito rejimda ochiladi.</translation> <translation id="374357899112510277">Yuklanmalarni yashirish</translation> <translation id="3745190878148784130">Matn masshtabini berkitish</translation> @@ -641,6 +642,7 @@ <translation id="4389019817280890563">Tilni almashtirish uchun bosing.</translation> <translation id="4405320213589929829">Mahalliy maʼlumotlar va marshrutlarni olish uchun veb-sahifalarda manzillardan foydalaning.</translation> <translation id="4420409367264901497">Bukmarkni tahrirlash</translation> +<translation id="4431224949908513835">Kiritish uchun toʻlov usulini tanlang.</translation> <translation id="4442550905108052454"><ph name="BEGIN_BOLD" />Sozlamalarni<ph name="END_BOLD" /> oching</translation> <translation id="4454246407045105932">Til kiritish</translation> <translation id="4461286950227634995">Parollarni saqlashni taklif qilish</translation> @@ -1198,6 +1200,7 @@ <translation id="7221173315674413369">Nima yangiliklar ruknida yangi funksiyalar va maslahatlar bilan tanishing</translation> <translation id="7223102419539744003">Varaqni yopish</translation> <translation id="722454870747268814">Yangi Inkognito varaq</translation> +<translation id="7233006041370588369">Kiritish uchun parolni tanlang.</translation> <translation id="7265758999917665941">Bu saytda hech qachon</translation> <translation id="7272437679830969316">Shaxsingiz tasdiqlanmadi. Paroldan nusxa olinmadi.</translation> <translation id="7284359491594949826">{COUNT,plural, =1{Yangi paketni kuzatish boshlandi}other{Yangi paketlarni kuzatish boshlandi}}</translation>
diff --git a/ios/chrome/browser/shared/model/prefs/BUILD.gn b/ios/chrome/browser/shared/model/prefs/BUILD.gn index d906117..650ec12 100644 --- a/ios/chrome/browser/shared/model/prefs/BUILD.gn +++ b/ios/chrome/browser/shared/model/prefs/BUILD.gn
@@ -70,6 +70,7 @@ "//components/signin/public/identity_manager", "//components/strings", "//components/supervised_user/core/browser", + "//components/supervised_user/core/browser:supervised_user_preferences", "//components/supervised_user/core/common", "//components/supervised_user/core/common:buildflags", "//components/sync",
diff --git a/ios/chrome/browser/shared/model/prefs/browser_prefs.mm b/ios/chrome/browser/shared/model/prefs/browser_prefs.mm index 198fce74..82d2887 100644 --- a/ios/chrome/browser/shared/model/prefs/browser_prefs.mm +++ b/ios/chrome/browser/shared/model/prefs/browser_prefs.mm
@@ -58,6 +58,7 @@ #import "components/strings/grit/components_locale_settings.h" #import "components/supervised_user/core/browser/child_account_service.h" #import "components/supervised_user/core/browser/supervised_user_metrics_service.h" +#import "components/supervised_user/core/browser/supervised_user_preferences.h" #import "components/supervised_user/core/browser/supervised_user_service.h" #import "components/supervised_user/core/common/buildflags.h" #import "components/supervised_user/core/common/pref_names.h" @@ -460,8 +461,7 @@ segmentation_platform::DeviceSwitcherResultDispatcher::RegisterProfilePrefs( registry); #if BUILDFLAG(ENABLE_SUPERVISED_USERS) - supervised_user::ChildAccountService::RegisterProfilePrefs(registry); - supervised_user::SupervisedUserService::RegisterProfilePrefs(registry); + supervised_user::RegisterProfilePrefs(registry); supervised_user::SupervisedUserMetricsService::RegisterProfilePrefs(registry); #endif // BUILDFLAG(ENABLE_SUPERVISED_USERS) sync_sessions::SessionSyncPrefs::RegisterProfilePrefs(registry);
diff --git a/ios/chrome/browser/shared/public/features/features.h b/ios/chrome/browser/shared/public/features/features.h index 0a1eb66..d9278f34 100644 --- a/ios/chrome/browser/shared/public/features/features.h +++ b/ios/chrome/browser/shared/public/features/features.h
@@ -230,10 +230,6 @@ // Whether the Safety Check module should be shown in the Magic Stack. bool IsSafetyCheckMagicStackEnabled(); -// Kill switch to control the blocking of the simultaneous cell selection in -// LegacyChromeTableViewController. -BASE_DECLARE_FEATURE(kBlockSimultaneousCellSelectionKillSwitch); - // Feature flag enabling Save to Drive. BASE_DECLARE_FEATURE(kIOSSaveToDrive);
diff --git a/ios/chrome/browser/shared/public/features/features.mm b/ios/chrome/browser/shared/public/features/features.mm index 70401b13..c01aa08 100644 --- a/ios/chrome/browser/shared/public/features/features.mm +++ b/ios/chrome/browser/shared/public/features/features.mm
@@ -270,10 +270,6 @@ return base::FeatureList::IsEnabled(kSafetyCheckMagicStack); } -BASE_FEATURE(kBlockSimultaneousCellSelectionKillSwitch, - "BlockSimultaneousCellSelectionKillSwitch", - base::FEATURE_ENABLED_BY_DEFAULT); - BASE_FEATURE(kIOSSaveToDrive, "IOSSaveToDrive", base::FEATURE_DISABLED_BY_DEFAULT);
diff --git a/ios/chrome/browser/shared/ui/table_view/cells/table_view_illustrated_item.mm b/ios/chrome/browser/shared/ui/table_view/cells/table_view_illustrated_item.mm index f3b47bc..2afff5b0 100644 --- a/ios/chrome/browser/shared/ui/table_view/cells/table_view_illustrated_item.mm +++ b/ios/chrome/browser/shared/ui/table_view/cells/table_view_illustrated_item.mm
@@ -66,18 +66,14 @@ cell.subtitleLabel.hidden = YES; } if ([self.buttonText length]) { - if (IsUIButtonConfigurationEnabled()) { - UIButtonConfiguration* buttonConfiguration = cell.button.configuration; - UIFont* font = [UIFont preferredFontForTextStyle:UIFontTextStyleHeadline]; - NSDictionary* attributes = @{NSFontAttributeName : font}; - NSMutableAttributedString* attributedString = - [[NSMutableAttributedString alloc] initWithString:self.buttonText - attributes:attributes]; - buttonConfiguration.attributedTitle = attributedString; - cell.button.configuration = buttonConfiguration; - } else { - [cell.button setTitle:self.buttonText forState:UIControlStateNormal]; - } + UIButtonConfiguration* buttonConfiguration = cell.button.configuration; + UIFont* font = [UIFont preferredFontForTextStyle:UIFontTextStyleHeadline]; + NSDictionary* attributes = @{NSFontAttributeName : font}; + NSMutableAttributedString* attributedString = + [[NSMutableAttributedString alloc] initWithString:self.buttonText + attributes:attributes]; + buttonConfiguration.attributedTitle = attributedString; + cell.button.configuration = buttonConfiguration; } else { cell.buttonContainer.hidden = YES; } @@ -127,26 +123,16 @@ _button.layer.cornerRadius = kButtonCornerRadius; _button.translatesAutoresizingMaskIntoConstraints = NO; - if (IsUIButtonConfigurationEnabled()) { - UIButtonConfiguration* buttonConfiguration = - [UIButtonConfiguration plainButtonConfiguration]; - buttonConfiguration.contentInsets = NSDirectionalEdgeInsetsMake( - kButtonTitleVerticalContentInset, kButtonTitleHorizontalContentInset, - kButtonTitleVerticalContentInset, kButtonTitleHorizontalContentInset); - buttonConfiguration.baseForegroundColor = - [UIColor colorNamed:kSolidButtonTextColor]; - buttonConfiguration.background.backgroundColor = - [UIColor colorNamed:kBlueColor]; - _button.configuration = buttonConfiguration; - } else { - _button.backgroundColor = [UIColor colorNamed:kBlueColor]; - [_button.titleLabel - setFont:[UIFont preferredFontForTextStyle:UIFontTextStyleHeadline]]; - UIEdgeInsets contentInsets = UIEdgeInsetsMake( - kButtonTitleVerticalContentInset, kButtonTitleHorizontalContentInset, - kButtonTitleVerticalContentInset, kButtonTitleHorizontalContentInset); - SetContentEdgeInsets(_button, contentInsets); - } + UIButtonConfiguration* buttonConfiguration = + [UIButtonConfiguration plainButtonConfiguration]; + buttonConfiguration.contentInsets = NSDirectionalEdgeInsetsMake( + kButtonTitleVerticalContentInset, kButtonTitleHorizontalContentInset, + kButtonTitleVerticalContentInset, kButtonTitleHorizontalContentInset); + buttonConfiguration.baseForegroundColor = + [UIColor colorNamed:kSolidButtonTextColor]; + buttonConfiguration.background.backgroundColor = + [UIColor colorNamed:kBlueColor]; + _button.configuration = buttonConfiguration; _buttonContainer = [[UIView alloc] init]; _buttonContainer.translatesAutoresizingMaskIntoConstraints = NO;
diff --git a/ios/chrome/browser/shared/ui/table_view/legacy_chrome_table_view_controller.mm b/ios/chrome/browser/shared/ui/table_view/legacy_chrome_table_view_controller.mm index 7b7c950..204408e 100644 --- a/ios/chrome/browser/shared/ui/table_view/legacy_chrome_table_view_controller.mm +++ b/ios/chrome/browser/shared/ui/table_view/legacy_chrome_table_view_controller.mm
@@ -6,7 +6,6 @@ #import "base/apple/foundation_util.h" #import "base/check.h" -#import "ios/chrome/browser/shared/public/features/features.h" #import "ios/chrome/browser/shared/ui/table_view/cells/table_view_cell.h" #import "ios/chrome/browser/shared/ui/table_view/cells/table_view_header_footer_item.h" #import "ios/chrome/browser/shared/ui/table_view/cells/table_view_item.h" @@ -271,18 +270,16 @@ base::apple::ObjCCastStrict<TableViewCell>(cell); [item configureCell:tableViewCell withStyler:self.styler]; - if (base::FeatureList::IsEnabled(kBlockSimultaneousCellSelectionKillSwitch)) { - // Enabling `exclusiveTouch` for all cells to prevent simultanoeus cell - // selection. Not blocking simultaneous cell selection can lead to starting - // one or more of a coordinator's child coordinators multiple times, which - // can result in multiple view controllers being presented back-to-back. If - // there's a need for `exclusiveTouch` to be disabled for some cells, - // `exclusiveTouch` can be overridden for those cells in the - // LegacyChromeTableViewController subclass that implments them. - // TODO(crbug.com/1471527): Make Chrome Coordinators robust against the - // launch of multiple child coordinators. - cell.exclusiveTouch = YES; - } + // Enabling `exclusiveTouch` for all cells to prevent simultanoeus cell + // selection. Not blocking simultaneous cell selection can lead to starting + // one or more of a coordinator's child coordinators multiple times, which + // can result in multiple view controllers being presented back-to-back. If + // there's a need for `exclusiveTouch` to be disabled for some cells, + // `exclusiveTouch` can be overridden for those cells in the + // LegacyChromeTableViewController subclass that implments them. + // TODO(crbug.com/1471527): Make Chrome Coordinators robust against the + // launch of multiple child coordinators. + cell.exclusiveTouch = YES; return cell; }
diff --git a/ios/chrome/browser/signin/model/fake_system_identity_manager.h b/ios/chrome/browser/signin/model/fake_system_identity_manager.h index dd7d1657..e69bc17 100644 --- a/ios/chrome/browser/signin/model/fake_system_identity_manager.h +++ b/ios/chrome/browser/signin/model/fake_system_identity_manager.h
@@ -5,6 +5,6 @@ #ifndef IOS_CHROME_BROWSER_SIGNIN_MODEL_FAKE_SYSTEM_IDENTITY_MANAGER_H_ #define IOS_CHROME_BROWSER_SIGNIN_MODEL_FAKE_SYSTEM_IDENTITY_MANAGER_H_ -#include "ios/chrome/browser/signin/fake_system_identity_manager" +#include "ios/chrome/browser/signin/fake_system_identity_manager.h" #endif // IOS_CHROME_BROWSER_SIGNIN_MODEL_FAKE_SYSTEM_IDENTITY_MANAGER_H_
diff --git a/ios/chrome/browser/supervised_user/model/supervised_user_error_container.h b/ios/chrome/browser/supervised_user/model/supervised_user_error_container.h index 5919b75d..d55bfa1 100644 --- a/ios/chrome/browser/supervised_user/model/supervised_user_error_container.h +++ b/ios/chrome/browser/supervised_user/model/supervised_user_error_container.h
@@ -101,11 +101,10 @@ const GURL& url, bool successfully_created_request); void MaybeUpdatePendingApprovals(); - void URLFilterCheckCallback( - const GURL& url, - supervised_user::SupervisedUserURLFilter::FilteringBehavior behavior, - supervised_user::FilteringBehaviorReason reason, - bool uncertain); + void URLFilterCheckCallback(const GURL& url, + supervised_user::FilteringBehavior behavior, + supervised_user::FilteringBehaviorReason reason, + bool uncertain); WEB_STATE_USER_DATA_KEY_DECL(); std::unique_ptr<SupervisedUserErrorInfo> supervised_user_error_info_;
diff --git a/ios/chrome/browser/supervised_user/model/supervised_user_error_container.mm b/ios/chrome/browser/supervised_user/model/supervised_user_error_container.mm index 7a1b1d2..974b697 100644 --- a/ios/chrome/browser/supervised_user/model/supervised_user_error_container.mm +++ b/ios/chrome/browser/supervised_user/model/supervised_user_error_container.mm
@@ -120,7 +120,7 @@ void SupervisedUserErrorContainer::URLFilterCheckCallback( const GURL& url, - supervised_user::SupervisedUserURLFilter::FilteringBehavior behavior, + supervised_user::FilteringBehavior behavior, supervised_user::FilteringBehaviorReason reason, bool uncertain) { auto* blocking_tab_helper = @@ -151,8 +151,7 @@ } bool should_show_interstitial = - behavior == - supervised_user::SupervisedUserURLFilter::FilteringBehavior::BLOCK; + behavior == supervised_user::FilteringBehavior::kBlock; if (is_showing_supervised_user_interstitial_for_url != should_show_interstitial) { @@ -188,8 +187,7 @@ } void SupervisedUserErrorContainer::MaybeUpdatePendingApprovals() { - supervised_user::SupervisedUserURLFilter::FilteringBehavior - filtering_behavior; + supervised_user::FilteringBehavior filtering_behavior; supervised_user::SupervisedUserURLFilter* url_filter = supervised_user_service_->GetURLFilter(); @@ -197,9 +195,8 @@ bool is_manual = url_filter->GetManualFilteringBehaviorForURL( GURL(*iter), &filtering_behavior); - if (is_manual && filtering_behavior == - supervised_user::SupervisedUserURLFilter:: - FilteringBehavior::ALLOW) { + if (is_manual && + filtering_behavior == supervised_user::FilteringBehavior::kAllow) { iter = requested_hosts_.erase(iter); } else { iter++;
diff --git a/ios/chrome/browser/supervised_user/model/supervised_user_url_filter_tab_helper.mm b/ios/chrome/browser/supervised_user/model/supervised_user_url_filter_tab_helper.mm index f1617d4..f0f2ba9 100644 --- a/ios/chrome/browser/supervised_user/model/supervised_user_url_filter_tab_helper.mm +++ b/ios/chrome/browser/supervised_user/model/supervised_user_url_filter_tab_helper.mm
@@ -36,8 +36,7 @@ GURL request_url, web::WebStatePolicyDecider::RequestInfo request_info, web::WebStatePolicyDecider::PolicyDecisionCallback policy_decision_callback, - supervised_user::SupervisedUserURLFilter::FilteringBehavior - filtering_behavior, + supervised_user::FilteringBehavior filtering_behavior, supervised_user::FilteringBehaviorReason reason, bool uncertain) { // Allow navigation by default. @@ -47,8 +46,7 @@ if (!web_state) { // Cancel the request if the corresponding `web_state` is destroyed. decision = PolicyDecision::Cancel(); - } else if (filtering_behavior == supervised_user::SupervisedUserURLFilter:: - FilteringBehavior::BLOCK) { + } else if (filtering_behavior == supervised_user::FilteringBehavior::kBlock) { SupervisedUserErrorContainer* container = SupervisedUserErrorContainer::FromWebState(web_state); CHECK(container);
diff --git a/ios/chrome/browser/supervised_user/model/supervised_user_url_filter_tab_helper_unittest.mm b/ios/chrome/browser/supervised_user/model/supervised_user_url_filter_tab_helper_unittest.mm index 9a695d29..d0d568c1 100644 --- a/ios/chrome/browser/supervised_user/model/supervised_user_url_filter_tab_helper_unittest.mm +++ b/ios/chrome/browser/supervised_user/model/supervised_user_url_filter_tab_helper_unittest.mm
@@ -15,6 +15,7 @@ #import "components/supervised_user/core/browser/supervised_user_settings_service.h" #import "components/supervised_user/core/common/features.h" #import "components/supervised_user/core/common/supervised_user_constants.h" +#import "components/supervised_user/core/common/supervised_user_utils.h" #import "components/sync_preferences/pref_service_mock_factory.h" #import "components/sync_preferences/pref_service_syncable.h" #import "ios/chrome/browser/shared/model/application_context/application_context.h" @@ -135,7 +136,7 @@ hosts["example.com"] = true; supervised_user_service->GetURLFilter()->SetManualHosts(hosts); supervised_user_service->GetURLFilter()->SetDefaultFilteringBehavior( - supervised_user::SupervisedUserURLFilter::ALLOW); + supervised_user::FilteringBehavior::kAllow); } void RestrictAllSitesForSupervisedUser() { @@ -143,7 +144,7 @@ SupervisedUserServiceFactory::GetForBrowserState( chrome_browser_state_.get()); supervised_user_service->GetURLFilter()->SetDefaultFilteringBehavior( - supervised_user::SupervisedUserURLFilter::BLOCK); + supervised_user::FilteringBehavior::kBlock); } private:
diff --git a/ios/chrome/browser/ui/alert_view/alert_view_controller.mm b/ios/chrome/browser/ui/alert_view/alert_view_controller.mm index 10638f19..166c797 100644 --- a/ios/chrome/browser/ui/alert_view/alert_view_controller.mm +++ b/ios/chrome/browser/ui/alert_view/alert_view_controller.mm
@@ -142,32 +142,20 @@ textColor = [UIColor colorNamed:kRedColor]; } - GrayHighlightButton* button = nil; - if (IsUIButtonConfigurationEnabled()) { - UIButtonConfiguration* buttonConfiguration = - [UIButtonConfiguration plainButtonConfiguration]; - buttonConfiguration.contentInsets = - NSDirectionalEdgeInsetsMake(kButtonInsetTop, kButtonInsetLeading, - kButtonInsetBottom, kButtonInsetTrailing); - NSDictionary* attributes = @{NSFontAttributeName : font}; - NSAttributedString* title = - [[NSAttributedString alloc] initWithString:action.title - attributes:attributes]; - buttonConfiguration.attributedTitle = title; - buttonConfiguration.baseForegroundColor = textColor; - button = [GrayHighlightButton buttonWithConfiguration:buttonConfiguration - primaryAction:nil]; - } else { - button = [[GrayHighlightButton alloc] init]; - UIEdgeInsets contentEdgeInsets = - UIEdgeInsetsMake(kButtonInsetTop, kButtonInsetLeading, - kButtonInsetBottom, kButtonInsetTrailing); - SetContentEdgeInsets(button, contentEdgeInsets); - button.titleLabel.font = font; - button.titleLabel.adjustsFontForContentSizeCategory = YES; - [button setTitleColor:textColor forState:UIControlStateNormal]; - [button setTitle:action.title forState:UIControlStateNormal]; - } + UIButtonConfiguration* buttonConfiguration = + [UIButtonConfiguration plainButtonConfiguration]; + buttonConfiguration.contentInsets = + NSDirectionalEdgeInsetsMake(kButtonInsetTop, kButtonInsetLeading, + kButtonInsetBottom, kButtonInsetTrailing); + NSDictionary* attributes = @{NSFontAttributeName : font}; + NSAttributedString* title = + [[NSAttributedString alloc] initWithString:action.title + attributes:attributes]; + buttonConfiguration.attributedTitle = title; + buttonConfiguration.baseForegroundColor = textColor; + GrayHighlightButton* button = + [GrayHighlightButton buttonWithConfiguration:buttonConfiguration + primaryAction:nil]; button.contentHorizontalAlignment = UIControlContentHorizontalAlignmentCenter; button.translatesAutoresizingMaskIntoConstraints = NO;
diff --git a/ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/consistency_default_account/consistency_default_account_mediator.mm b/ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/consistency_default_account/consistency_default_account_mediator.mm index eedcaca6..df7ee55 100644 --- a/ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/consistency_default_account/consistency_default_account_mediator.mm +++ b/ios/chrome/browser/ui/authentication/signin/consistency_promo_signin/consistency_default_account/consistency_default_account_mediator.mm
@@ -141,6 +141,7 @@ ACCESS_POINT_CHROME_SIGNIN_INTERCEPT_BUBBLE: case signin_metrics::AccessPoint:: ACCESS_POINT_RESTORE_PRIMARY_ACCOUNT_ON_PROFILE_LOAD: + case signin_metrics::AccessPoint::ACCESS_POINT_TAB_ORGANIZATION: // Nothing prevents instantiating ConsistencyDefaultAccountViewController // with an arbitrary entry point, API-wise. In doubt, no label is a good, // generic default that fits all entry points.
diff --git a/ios/chrome/browser/ui/authentication/signin_promo_view_mediator.mm b/ios/chrome/browser/ui/authentication/signin_promo_view_mediator.mm index a6d10f76..a7a78c2b 100644 --- a/ios/chrome/browser/ui/authentication/signin_promo_view_mediator.mm +++ b/ios/chrome/browser/ui/authentication/signin_promo_view_mediator.mm
@@ -113,6 +113,7 @@ ACCESS_POINT_CHROME_SIGNIN_INTERCEPT_BUBBLE: case signin_metrics::AccessPoint:: ACCESS_POINT_RESTORE_PRIMARY_ACCOUNT_ON_PROFILE_LOAD: + case signin_metrics::AccessPoint::ACCESS_POINT_TAB_ORGANIZATION: case signin_metrics::AccessPoint::ACCESS_POINT_MAX: return false; } @@ -194,6 +195,7 @@ ACCESS_POINT_CHROME_SIGNIN_INTERCEPT_BUBBLE: case signin_metrics::AccessPoint:: ACCESS_POINT_RESTORE_PRIMARY_ACCOUNT_ON_PROFILE_LOAD: + case signin_metrics::AccessPoint::ACCESS_POINT_TAB_ORGANIZATION: case signin_metrics::AccessPoint::ACCESS_POINT_MAX: NOTREACHED() << "Unexpected value for access point " << static_cast<int>(access_point); @@ -277,6 +279,7 @@ ACCESS_POINT_CHROME_SIGNIN_INTERCEPT_BUBBLE: case signin_metrics::AccessPoint:: ACCESS_POINT_RESTORE_PRIMARY_ACCOUNT_ON_PROFILE_LOAD: + case signin_metrics::AccessPoint::ACCESS_POINT_TAB_ORGANIZATION: case signin_metrics::AccessPoint::ACCESS_POINT_MAX: NOTREACHED() << "Unexpected value for access point " << static_cast<int>(access_point); @@ -360,6 +363,7 @@ ACCESS_POINT_CHROME_SIGNIN_INTERCEPT_BUBBLE: case signin_metrics::AccessPoint:: ACCESS_POINT_RESTORE_PRIMARY_ACCOUNT_ON_PROFILE_LOAD: + case signin_metrics::AccessPoint::ACCESS_POINT_TAB_ORGANIZATION: case signin_metrics::AccessPoint::ACCESS_POINT_MAX: NOTREACHED() << "Unexpected value for access point " << static_cast<int>(access_point); @@ -432,6 +436,7 @@ ACCESS_POINT_CHROME_SIGNIN_INTERCEPT_BUBBLE: case signin_metrics::AccessPoint:: ACCESS_POINT_RESTORE_PRIMARY_ACCOUNT_ON_PROFILE_LOAD: + case signin_metrics::AccessPoint::ACCESS_POINT_TAB_ORGANIZATION: case signin_metrics::AccessPoint::ACCESS_POINT_MAX: return nullptr; } @@ -502,6 +507,7 @@ ACCESS_POINT_CHROME_SIGNIN_INTERCEPT_BUBBLE: case signin_metrics::AccessPoint:: ACCESS_POINT_RESTORE_PRIMARY_ACCOUNT_ON_PROFILE_LOAD: + case signin_metrics::AccessPoint::ACCESS_POINT_TAB_ORGANIZATION: case signin_metrics::AccessPoint::ACCESS_POINT_MAX: return nullptr; }
diff --git a/ios/chrome/browser/ui/bubble/bubble_view.mm b/ios/chrome/browser/ui/bubble/bubble_view.mm index f5ca2e2..c43d1b2f0 100644 --- a/ios/chrome/browser/ui/bubble/bubble_view.mm +++ b/ios/chrome/browser/ui/bubble/bubble_view.mm
@@ -187,35 +187,17 @@ const CGFloat closeButtonLeadingPadding = kCloseButtonSize - kCloseButtonTopTrailingPadding - buttonImage.size.width; - UIButton* button; - // TODO(crbug.com/1418068): Simplify after minimum version required is >= - // iOS 15. - if (base::ios::IsRunningOnIOS15OrLater() && - IsUIButtonConfigurationEnabled()) { - if (@available(iOS 15, *)) { - UIButtonConfiguration* buttonConfiguration = - [UIButtonConfiguration plainButtonConfiguration]; - [buttonConfiguration setImage:buttonImage]; - [buttonConfiguration - setContentInsets:NSDirectionalEdgeInsetsMake( - kCloseButtonTopTrailingPadding, - closeButtonLeadingPadding, - closeButtonBottomPadding, - kCloseButtonTopTrailingPadding)]; - button = [UIButton buttonWithConfiguration:buttonConfiguration - primaryAction:nil]; - } - } else { - button = [UIButton buttonWithType:UIButtonTypeSystem]; - [button setImage:buttonImage forState:UIControlStateNormal]; - [button.imageView setBounds:CGRectZero]; - [button.imageView setContentMode:UIViewContentModeScaleAspectFit]; - UIEdgeInsets contentEdgeInsets = UIEdgeInsetsMakeDirected( - kCloseButtonTopTrailingPadding, closeButtonLeadingPadding, - closeButtonBottomPadding, kCloseButtonTopTrailingPadding); - SetImageEdgeInsets(button, contentEdgeInsets); - } + UIButtonConfiguration* buttonConfiguration = + [UIButtonConfiguration plainButtonConfiguration]; + [buttonConfiguration setImage:buttonImage]; + [buttonConfiguration + setContentInsets:NSDirectionalEdgeInsetsMake( + kCloseButtonTopTrailingPadding, + closeButtonLeadingPadding, closeButtonBottomPadding, + kCloseButtonTopTrailingPadding)]; + UIButton* button = [UIButton buttonWithConfiguration:buttonConfiguration + primaryAction:nil]; [button setTintColor:[UIColor colorNamed:kSolidButtonTextColor]]; [button setAccessibilityLabel:l10n_util::GetNSString(IDS_IOS_ICON_CLOSE)]; [button setAccessibilityIdentifier:kBubbleViewCloseButtonIdentifier];
diff --git a/ios/chrome/browser/ui/content_suggestions/ntp_home_egtest.mm b/ios/chrome/browser/ui/content_suggestions/ntp_home_egtest.mm index 03cab34..48cea4e 100644 --- a/ios/chrome/browser/ui/content_suggestions/ntp_home_egtest.mm +++ b/ios/chrome/browser/ui/content_suggestions/ntp_home_egtest.mm
@@ -109,6 +109,11 @@ id<GREYMatcher> notPracticallyVisible() { return grey_not(grey_minimumVisiblePercent(0.01)); } + +// Returns a matcher which is true if the view is mostly not visible. +id<GREYMatcher> mostlyNotVisible() { + return grey_not(grey_minimumVisiblePercent(0.33)); +} } // Test case for the NTP home UI. More precisely, this tests the positions of @@ -360,8 +365,9 @@ [ChromeEarlGrey sceneOpenURL:GURL("chromewidgetkit://search-widget/search")]; [ChromeEarlGrey waitForSufficientlyVisibleElementWithMatcher:chrome_test_util::Omnibox()]; + // Fakebox should be mostly covered. [[EarlGrey selectElementWithMatcher:chrome_test_util::FakeOmnibox()] - assertWithMatcher:grey_notVisible()]; + assertWithMatcher:mostlyNotVisible()]; } // Tests that the fake omnibox width is correctly updated after a rotation. @@ -754,9 +760,9 @@ // page. [self focusFakebox]; - // Check the fake omnibox is not visible. + // Check the fake omnibox is mostly not visible. [[EarlGrey selectElementWithMatcher:chrome_test_util::FakeOmnibox()] - assertWithMatcher:grey_notVisible()]; + assertWithMatcher:mostlyNotVisible()]; [[EarlGrey selectElementWithMatcher:chrome_test_util::Omnibox()] assertWithMatcher:grey_sufficientlyVisible()]; @@ -820,9 +826,11 @@ // Offset after the fake omnibox has been tapped. CGPoint offsetAfterTap = collectionView.contentOffset; - // Make sure the fake omnibox has been hidden and the collection has moved. + // Make sure the fake omnibox has been mostly covered and the collection has + // moved. [[EarlGrey selectElementWithMatcher:chrome_test_util::FakeOmnibox()] - assertWithMatcher:grey_notVisible()]; + assertWithMatcher:mostlyNotVisible()]; + [[EarlGrey selectElementWithMatcher:chrome_test_util::Omnibox()] assertWithMatcher:grey_sufficientlyVisible()]; GREYAssertTrue(offsetAfterTap.y >= origin.y, @@ -1360,9 +1368,9 @@ [[EarlGrey selectElementWithMatcher:chrome_test_util::DefocusedLocationView()] assertWithMatcher:grey_notVisible()]; - // Fakebox should be covered. + // Fakebox should be mostly covered. [[EarlGrey selectElementWithMatcher:chrome_test_util::FakeOmnibox()] - assertWithMatcher:grey_notVisible()]; + assertWithMatcher:mostlyNotVisible()]; GREYWaitForAppToIdle(@"App failed to idle"); } @@ -1395,9 +1403,9 @@ [[EarlGrey selectElementWithMatcher:chrome_test_util::DefocusedLocationView()] assertWithMatcher:grey_notVisible()]; - // Fakebox should be covered. + // Fakebox should be mostly covered. [[EarlGrey selectElementWithMatcher:chrome_test_util::FakeOmnibox()] - assertWithMatcher:grey_notVisible()]; + assertWithMatcher:mostlyNotVisible()]; GREYWaitForAppToIdle(@"App failed to idle"); }
diff --git a/ios/chrome/browser/ui/content_suggestions/tab_resumption/tab_resumption_egtest.mm b/ios/chrome/browser/ui/content_suggestions/tab_resumption/tab_resumption_egtest.mm index 88be5dd7..a6e3759 100644 --- a/ios/chrome/browser/ui/content_suggestions/tab_resumption/tab_resumption_egtest.mm +++ b/ios/chrome/browser/ui/content_suggestions/tab_resumption/tab_resumption_egtest.mm
@@ -237,7 +237,7 @@ [EarlGrey rotateDeviceToOrientation:UIDeviceOrientationLandscapeLeft error:nil]; [[EarlGrey selectElementWithMatcher:chrome_test_util::NTPCollectionView()] - performAction:grey_scrollInDirection(kGREYDirectionDown, 150)]; + performAction:grey_scrollInDirection(kGREYDirectionDown, 180)]; } [[[EarlGrey selectElementWithMatcher: grey_allOf(chrome_test_util::ButtonWithAccessibilityLabelId(
diff --git a/ios/chrome/browser/ui/omnibox/popup/omnibox_popup_mediator.mm b/ios/chrome/browser/ui/omnibox/popup/omnibox_popup_mediator.mm index 5da2d09..43b1977 100644 --- a/ios/chrome/browser/ui/omnibox/popup/omnibox_popup_mediator.mm +++ b/ios/chrome/browser/ui/omnibox/popup/omnibox_popup_mediator.mm
@@ -207,7 +207,7 @@ _debugInfoConsumer = debugInfoConsumer; } -- (void)setPrefService:(PrefService*)originalPrefService { +- (void)setOriginalPrefService:(PrefService*)originalPrefService { _originalPrefService = originalPrefService; if (IsBottomOmniboxSteadyStateEnabled() && _originalPrefService) { _bottomOmniboxEnabled =
diff --git a/ios/chrome/browser/ui/settings/BUILD.gn b/ios/chrome/browser/ui/settings/BUILD.gn index 97909c4..1e5e022c 100644 --- a/ios/chrome/browser/ui/settings/BUILD.gn +++ b/ios/chrome/browser/ui/settings/BUILD.gn
@@ -395,6 +395,7 @@ "//components/search_engines", "//components/supervised_user/core/browser", "//components/supervised_user/core/browser:mocked", + "//components/supervised_user/core/browser:supervised_user_preferences", "//components/supervised_user/core/common", "//ios/chrome/app:app_internal", "//ios/chrome/browser/content_settings/model", @@ -424,6 +425,8 @@ deps = [ "//base", "//components/supervised_user/core/browser", + "//components/supervised_user/core/browser:supervised_user_preferences", + "//components/supervised_user/core/common", "//ios/testing/earl_grey:eg_test_support+eg2", ] }
diff --git a/ios/chrome/browser/ui/settings/cells/inline_promo_item_unittest.mm b/ios/chrome/browser/ui/settings/cells/inline_promo_item_unittest.mm index d6065d0b..ea795e53 100644 --- a/ios/chrome/browser/ui/settings/cells/inline_promo_item_unittest.mm +++ b/ios/chrome/browser/ui/settings/cells/inline_promo_item_unittest.mm
@@ -77,26 +77,15 @@ close_button.configuration; UIButtonConfiguration* more_info_button_configuration = more_info_button.configuration; - if (IsUIButtonConfigurationEnabled()) { - EXPECT_NSEQ(close_button_configuration.image, GetCloseButtonImage()); - EXPECT_TRUE([close_button_configuration.baseForegroundColor - isEqual:[UIColor colorNamed:kTextTertiaryColor]]); - EXPECT_TRUE([more_info_button_configuration.baseForegroundColor - isEqual:[UIColor colorNamed:kBlue600Color]]); - EXPECT_NSEQ(more_info_button_configuration.attributedTitle.string, - more_info_button_title); - EXPECT_EQ(GetMoreInfoButtonTitleFont(more_info_button_configuration), - [UIFont preferredFontForTextStyle:UIFontTextStyleBody]); - } else { - EXPECT_NSEQ(GetCloseButtonImage(), - [close_button imageForState:UIControlStateNormal]); - EXPECT_TRUE([[UIColor colorNamed:kTextTertiaryColor] - isEqual:close_button.tintColor]); - EXPECT_NSEQ([more_info_button titleForState:UIControlStateNormal], - more_info_button_title); - EXPECT_EQ([UIFont preferredFontForTextStyle:UIFontTextStyleBody], - more_info_button.titleLabel.font); - } + EXPECT_NSEQ(close_button_configuration.image, GetCloseButtonImage()); + EXPECT_TRUE([close_button_configuration.baseForegroundColor + isEqual:[UIColor colorNamed:kTextTertiaryColor]]); + EXPECT_TRUE([more_info_button_configuration.baseForegroundColor + isEqual:[UIColor colorNamed:kBlue600Color]]); + EXPECT_NSEQ(more_info_button_configuration.attributedTitle.string, + more_info_button_title); + EXPECT_EQ(GetMoreInfoButtonTitleFont(more_info_button_configuration), + [UIFont preferredFontForTextStyle:UIFontTextStyleBody]); } // Tests that the close button visibility follows the item's
diff --git a/ios/chrome/browser/ui/settings/supervised_user_settings_app_interface.h b/ios/chrome/browser/ui/settings/supervised_user_settings_app_interface.h index 24e41e1..6172286 100644 --- a/ios/chrome/browser/ui/settings/supervised_user_settings_app_interface.h +++ b/ios/chrome/browser/ui/settings/supervised_user_settings_app_interface.h
@@ -7,14 +7,14 @@ #import <UIKit/UIKit.h> -#import "components/supervised_user/core/browser/supervised_user_url_filter.h" +#import "components/supervised_user/core/common/supervised_user_utils.h" // The app interface for supervised user settings tests. @interface SupervisedUserSettingsAppInterface : NSObject // Sets the parental control setting to filter websites for supervised users. + (void)setSupervisedUserURLFilterBehavior: - (supervised_user::SupervisedUserURLFilter::FilteringBehavior)behavior; + (supervised_user::FilteringBehavior)behavior; // Resets to default parental control settings for website filtering. + (void)resetSupervisedUserURLFilterBehavior;
diff --git a/ios/chrome/browser/ui/settings/supervised_user_settings_app_interface.mm b/ios/chrome/browser/ui/settings/supervised_user_settings_app_interface.mm index 8925180..3be1758 100644 --- a/ios/chrome/browser/ui/settings/supervised_user_settings_app_interface.mm +++ b/ios/chrome/browser/ui/settings/supervised_user_settings_app_interface.mm
@@ -108,15 +108,14 @@ @implementation SupervisedUserSettingsAppInterface : NSObject + (void)setSupervisedUserURLFilterBehavior: - (supervised_user::SupervisedUserURLFilter::FilteringBehavior)behavior { + (supervised_user::FilteringBehavior)behavior { supervised_user::SupervisedUserSettingsService* settings_service = SupervisedUserSettingsServiceFactory::GetForBrowserState( chrome_test_util::GetOriginalBrowserState()); settings_service->SetLocalSetting( supervised_user::kContentPackDefaultFilteringBehavior, - base::Value(behavior)); - if (behavior == - supervised_user::SupervisedUserURLFilter::FilteringBehavior::ALLOW) { + base::Value(static_cast<int>(behavior))); + if (behavior == supervised_user::FilteringBehavior::kAllow) { settings_service->SetLocalSetting(supervised_user::kSafeSitesEnabled, base::Value(true)); } @@ -168,13 +167,13 @@ } + (void)setFilteringToAllowAllSites { - [self setSupervisedUserURLFilterBehavior:supervised_user:: - SupervisedUserURLFilter::ALLOW]; + [self setSupervisedUserURLFilterBehavior:supervised_user::FilteringBehavior:: + kAllow]; } + (void)setFilteringToAllowApprovedSites { - [self setSupervisedUserURLFilterBehavior:supervised_user:: - SupervisedUserURLFilter::BLOCK]; + [self setSupervisedUserURLFilterBehavior:supervised_user::FilteringBehavior:: + kBlock]; } + (void)addWebsiteToAllowList:(NSURL*)host {
diff --git a/ios/chrome/browser/ui/tabs/tab_strip_controller.mm b/ios/chrome/browser/ui/tabs/tab_strip_controller.mm index f90d22c..37a555c 100644 --- a/ios/chrome/browser/ui/tabs/tab_strip_controller.mm +++ b/ios/chrome/browser/ui/tabs/tab_strip_controller.mm
@@ -506,39 +506,31 @@ UIImage* buttonNewTabImage = DefaultSymbolWithPointSize(kPlusSymbol, kSymbolSize); - if (IsUIButtonConfigurationEnabled()) { - UIButtonConfiguration* buttonConfiguration = - [UIButtonConfiguration plainButtonConfiguration]; - buttonConfiguration.contentInsets = NSDirectionalEdgeInsetsMake( - 0, kNewTabButtonLeadingImageInset, kNewTabButtonBottomImageInset, 0); - buttonConfiguration.image = buttonNewTabImage; - buttonConfiguration.baseForegroundColor = - [UIColor colorNamed:kGrey500Color]; - _buttonNewTab.configurationUpdateHandler = ^(UIButton* incomingButton) { - UIButtonConfiguration* updatedConfig = incomingButton.configuration; - switch (incomingButton.state) { - case UIControlStateHighlighted: { - updatedConfig.baseForegroundColor = - [UIColor colorNamed:kGrey700Color]; - break; - } - case UIControlStateNormal: - updatedConfig.baseForegroundColor = - [UIColor colorNamed:kGrey500Color]; - break; - default: - break; + UIButtonConfiguration* buttonConfiguration = + [UIButtonConfiguration plainButtonConfiguration]; + buttonConfiguration.contentInsets = NSDirectionalEdgeInsetsMake( + 0, kNewTabButtonLeadingImageInset, kNewTabButtonBottomImageInset, 0); + buttonConfiguration.image = buttonNewTabImage; + buttonConfiguration.baseForegroundColor = + [UIColor colorNamed:kGrey500Color]; + _buttonNewTab.configurationUpdateHandler = ^(UIButton* incomingButton) { + UIButtonConfiguration* updatedConfig = incomingButton.configuration; + switch (incomingButton.state) { + case UIControlStateHighlighted: { + updatedConfig.baseForegroundColor = + [UIColor colorNamed:kGrey700Color]; + break; } - incomingButton.configuration = updatedConfig; - }; - _buttonNewTab.configuration = buttonConfiguration; - } else { - UIEdgeInsets imageInsets = UIEdgeInsetsMake( - 0, kNewTabButtonLeadingImageInset, kNewTabButtonBottomImageInset, 0); - SetImageEdgeInsets(_buttonNewTab, imageInsets); - [_buttonNewTab setImage:buttonNewTabImage forState:UIControlStateNormal]; - [_buttonNewTab.imageView setTintColor:[UIColor colorNamed:kGrey500Color]]; - } + case UIControlStateNormal: + updatedConfig.baseForegroundColor = + [UIColor colorNamed:kGrey500Color]; + break; + default: + break; + } + incomingButton.configuration = updatedConfig; + }; + _buttonNewTab.configuration = buttonConfiguration; _buttonNewTabSpotlightView = [[UIView alloc] init]; _buttonNewTabSpotlightView.hidden = YES; @@ -636,15 +628,9 @@ #pragma mark - TabStripCommands - (void)setNewTabButtonOnTabStripIPHHighlighted:(BOOL)IPHHighlighted { - if (IsUIButtonConfigurationEnabled()) { - _buttonNewTab.tintColor = IPHHighlighted - ? [UIColor colorNamed:kSolidWhiteColor] - : [UIColor colorNamed:kGrey500Color]; - } else { - _buttonNewTab.imageView.tintColor = - IPHHighlighted ? [UIColor colorNamed:kSolidWhiteColor] - : [UIColor colorNamed:kGrey500Color]; - } + _buttonNewTab.tintColor = IPHHighlighted + ? [UIColor colorNamed:kSolidWhiteColor] + : [UIColor colorNamed:kGrey500Color]; _buttonNewTabSpotlightView.backgroundColor = IPHHighlighted ? [UIColor colorNamed:kBlueColor] : nil; _buttonNewTabSpotlightView.hidden = !IPHHighlighted;
diff --git a/ios/chrome/browser/ui/tabs/tab_view.mm b/ios/chrome/browser/ui/tabs/tab_view.mm index 6833458..527ca28 100644 --- a/ios/chrome/browser/ui/tabs/tab_view.mm +++ b/ios/chrome/browser/ui/tabs/tab_view.mm
@@ -275,21 +275,13 @@ UIImage* closeButton = DefaultSymbolTemplateWithPointSize(kXMarkSymbol, kXmarkSymbolPointSize); - if (IsUIButtonConfigurationEnabled()) { - UIButtonConfiguration* buttonConfiguration = - [UIButtonConfiguration plainButtonConfiguration]; - buttonConfiguration.contentInsets = - NSDirectionalEdgeInsetsMake(kTabCloseTopInset, kTabCloseLeftInset, - kTabCloseBottomInset, kTabCloseRightInset); - buttonConfiguration.image = closeButton; - _closeButton.configuration = buttonConfiguration; - } else { - [_closeButton setImage:closeButton forState:UIControlStateNormal]; - UIEdgeInsets contentInsets = - UIEdgeInsetsMake(kTabCloseTopInset, kTabCloseLeftInset, - kTabCloseBottomInset, kTabCloseRightInset); - SetContentEdgeInsets(_closeButton, contentInsets); - } + UIButtonConfiguration* buttonConfiguration = + [UIButtonConfiguration plainButtonConfiguration]; + buttonConfiguration.contentInsets = + NSDirectionalEdgeInsetsMake(kTabCloseTopInset, kTabCloseLeftInset, + kTabCloseBottomInset, kTabCloseRightInset); + buttonConfiguration.image = closeButton; + _closeButton.configuration = buttonConfiguration; [_closeButton setAccessibilityLabel:l10n_util::GetNSString( IDS_IOS_TOOLS_MENU_CLOSE_TAB)];
diff --git a/ios/chrome/browser/web/model/BUILD.gn b/ios/chrome/browser/web/model/BUILD.gn index a9b0436e..89f5e3e5 100644 --- a/ios/chrome/browser/web/model/BUILD.gn +++ b/ios/chrome/browser/web/model/BUILD.gn
@@ -10,8 +10,6 @@ sources = [ "web_navigation_util.h" ] deps = [ ":feature_flags", - ":page_placeholder", - ":tab_helper_delegates", "//base", "//components/content_settings/core/browser", "//components/error_page/common",
diff --git a/ios/chrome/browser/web/model/font_size/BUILD.gn b/ios/chrome/browser/web/model/font_size/BUILD.gn index 3e104f81..ee8f05d 100644 --- a/ios/chrome/browser/web/model/font_size/BUILD.gn +++ b/ios/chrome/browser/web/model/font_size/BUILD.gn
@@ -7,7 +7,6 @@ source_set("font_size") { sources = [ "font_size_java_script_feature.h" ] deps = [ - ":font_size_js", "//base", "//components/google/core/common", "//components/pref_registry",
diff --git a/ios_internal b/ios_internal index 75fcd16..e93c9eb 160000 --- a/ios_internal +++ b/ios_internal
@@ -1 +1 @@ -Subproject commit 75fcd16c47f80a829a83279d3aecf56a874d5b21 +Subproject commit e93c9eb21e418da5953bd8239704c166ee419d57
diff --git a/net/extras/sqlite/OWNERS b/net/extras/sqlite/OWNERS index e8ec655cd..5986112 100644 --- a/net/extras/sqlite/OWNERS +++ b/net/extras/sqlite/OWNERS
@@ -1,11 +1,5 @@ -# Primary -asully@chromium.org +file://net/cookies/OWNERS -# Secondary -ayui@chromium.org -estade@chromium.org - -per-file sqlite_persistent_cookie_store*=file://net/cookies/OWNERS per-file sqlite_persistent_reporting_and_nel_store*=file://net/reporting/OWNERS per-file sqlite_persistent_reporting_and_nel_store*=file://net/network_error_logging/OWNERS per-file sqlite_persistent_shared_dictionary_store*=file://net/extras/shared_dictionary/OWNERS
diff --git a/net/http/transport_security_state_static.pins b/net/http/transport_security_state_static.pins index 9375666..c071b61f 100644 --- a/net/http/transport_security_state_static.pins +++ b/net/http/transport_security_state_static.pins
@@ -43,9 +43,9 @@ # hash function for preloaded entries again (we have already done so once). # -# Last updated: 2023-11-05 12:56 UTC +# Last updated: 2023-11-06 12:57 UTC PinsListTimestamp -1699188990 +1699275466 TestSPKI sha256/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
diff --git a/net/http/transport_security_state_static_pins.json b/net/http/transport_security_state_static_pins.json index 7bfe328..86e6eac5 100644 --- a/net/http/transport_security_state_static_pins.json +++ b/net/http/transport_security_state_static_pins.json
@@ -31,7 +31,7 @@ // the 'static_spki_hashes' and 'bad_static_spki_hashes' fields in 'pinsets' // refer to, and the timestamp at which the pins list was last updated. // -// Last updated: 2023-11-05 12:56 UTC +// Last updated: 2023-11-06 12:57 UTC // { "pinsets": [
diff --git a/services/network/public/cpp/cors/cors.cc b/services/network/public/cpp/cors/cors.cc index 391588c1..85710e1 100644 --- a/services/network/public/cpp/cors/cors.cc +++ b/services/network/public/cpp/cors/cors.cc
@@ -9,6 +9,7 @@ #include "base/containers/contains.h" #include "base/containers/fixed_flat_set.h" +#include "base/feature_list.h" #include "base/metrics/histogram_functions.h" #include "base/ranges/algorithm.h" #include "base/strings/string_piece.h" @@ -35,6 +36,10 @@ namespace { +BASE_FEATURE(kCorsSafelistedHeaderValueSizeRelaxed, + "CorsSafelistedHeaderValueSizeRelaxed", + base::FEATURE_DISABLED_BY_DEFAULT); + const char kAsterisk[] = "*"; const char kLowerCaseTrue[] = "true"; @@ -277,10 +282,14 @@ bool IsCorsSafelistedHeader(const std::string& name, const std::string& value) { const std::string lower_name = base::ToLowerASCII(name); + const size_t kValueLimit = + base::FeatureList::IsEnabled(kCorsSafelistedHeaderValueSizeRelaxed) ? 256 + : 128; // If |value|’s length is greater than 128, then return false. - if (value.size() > 128) + if (value.size() > kValueLimit) { return false; + } // CORS-Safelisted headers are the only headers permitted in a CORS request. static constexpr auto safe_names = base::MakeFixedFlatSet<base::StringPiece>({
diff --git a/services/network/public/mojom/restricted_cookie_manager.mojom b/services/network/public/mojom/restricted_cookie_manager.mojom index 37ae47a..72b16bb 100644 --- a/services/network/public/mojom/restricted_cookie_manager.mojom +++ b/services/network/public/mojom/restricted_cookie_manager.mojom
@@ -64,7 +64,8 @@ // in service workers. |top_frame_origin| is the actual origin of the top // level frame or the script url for service workers. |site_for_cookies| is // used to determine if a cookie is accessed in a third-party context. - // |top_frame_origin| is used to check for content settings. + // |top_frame_origin| is used to check for content settings. |is_ad_tagged| + // indicates whether this cookie access is being used for advertising. // |has_storage_access| is used to opt-in to using Storage Access API // permission grants. (Note: it does *not* grant access on its own, but rather // allows an existing permission grant to be used, if one exists.) @@ -77,7 +78,8 @@ url.mojom.Url url, SiteForCookies site_for_cookies, url.mojom.Origin top_frame_origin, bool has_storage_access, - CookieManagerGetOptions options) => ( + CookieManagerGetOptions options, + bool is_ad_tagged) => ( array<CookieWithAccessResult> cookies); // Sets a canonical cookie. |status| must be an inclusion status as defined @@ -135,7 +137,8 @@ GetCookiesString(url.mojom.Url url, SiteForCookies site_for_cookies, url.mojom.Origin top_frame_origin, - bool has_storage_access, bool get_version_shared_memory) => ( + bool has_storage_access, bool get_version_shared_memory, + bool is_ad_tagged) => ( uint64 version, mojo_base.mojom.ReadOnlySharedMemoryRegion? version_buffer, string cookies);
diff --git a/services/network/restricted_cookie_manager.cc b/services/network/restricted_cookie_manager.cc index 22260b7..29da92e 100644 --- a/services/network/restricted_cookie_manager.cc +++ b/services/network/restricted_cookie_manager.cc
@@ -555,6 +555,7 @@ const url::Origin& top_frame_origin, bool has_storage_access, mojom::CookieManagerGetOptionsPtr options, + bool is_ad_tagged, GetAllForUrlCallback callback) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); @@ -575,8 +576,8 @@ url, net_options, cookie_partition_key_collection_, base::BindOnce(&RestrictedCookieManager::CookieListToGetAllForUrlCallback, weak_ptr_factory_.GetWeakPtr(), url, site_for_cookies, - top_frame_origin, has_storage_access, net_options, - std::move(options), std::move(callback))); + top_frame_origin, has_storage_access, is_ad_tagged, + net_options, std::move(options), std::move(callback))); } void RestrictedCookieManager::CookieListToGetAllForUrlCallback( @@ -584,6 +585,7 @@ const net::SiteForCookies& site_for_cookies, const url::Origin& top_frame_origin, bool has_storage_access, + bool is_ad_tagged, const net::CookieOptions& net_options, mojom::CookieManagerGetOptionsPtr options, GetAllForUrlCallback callback, @@ -637,7 +639,7 @@ OnCookiesAccessed(mojom::CookieAccessDetails::New( mojom::CookieAccessDetails::Type::kRead, url, site_for_cookies, std::move(on_cookies_accessed_result), absl::nullopt, /*count=*/1, - /*is_ad_tagged=*/false)); + is_ad_tagged)); } }; @@ -946,6 +948,7 @@ const url::Origin& top_frame_origin, bool has_storage_access, bool get_version_shared_memory, + bool is_ad_tagged, GetCookiesStringCallback callback) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); // Checks done by GetAllForUrl @@ -989,7 +992,7 @@ match_options->name = ""; match_options->match_type = mojom::CookieMatchType::STARTS_WITH; GetAllForUrl(url, site_for_cookies, top_frame_origin, has_storage_access, - std::move(match_options), + std::move(match_options), is_ad_tagged, base::BindOnce([](const std::vector<net::CookieWithAccessResult>& cookies) { return net::CanonicalCookie::BuildCookieLine(cookies);
diff --git a/services/network/restricted_cookie_manager.h b/services/network/restricted_cookie_manager.h index f4cab62..12595dd 100644 --- a/services/network/restricted_cookie_manager.h +++ b/services/network/restricted_cookie_manager.h
@@ -134,6 +134,7 @@ const url::Origin& top_frame_origin, bool has_storage_access, mojom::CookieManagerGetOptionsPtr options, + bool is_ad_tagged, GetAllForUrlCallback callback) override; void SetCanonicalCookie(const net::CanonicalCookie& cookie, @@ -164,6 +165,7 @@ const url::Origin& top_frame_origin, bool has_storage_access, bool get_version_shared_memory, + bool is_ad_tagged, GetCookiesStringCallback callback) override; void CookiesEnabledFor(const GURL& url, const net::SiteForCookies& site_for_cookies, @@ -221,6 +223,7 @@ const net::SiteForCookies& site_for_cookies, const url::Origin& top_frame_origin, bool has_storage_access, + bool is_ad_tagged, const net::CookieOptions& net_options, mojom::CookieManagerGetOptionsPtr options, GetAllForUrlCallback callback,
diff --git a/services/network/restricted_cookie_manager_unittest.cc b/services/network/restricted_cookie_manager_unittest.cc index 8c702e48e..4017efc 100644 --- a/services/network/restricted_cookie_manager_unittest.cc +++ b/services/network/restricted_cookie_manager_unittest.cc
@@ -99,13 +99,15 @@ net::SiteForCookies site_for_cookies; mojom::CookieOrLinePtr cookie_or_line; net::CookieInclusionStatus status; + bool is_ad_tagged; friend void PrintTo(const CookieOp& op, std::ostream* os) { *os << "{type=" << op.type << ", url=" << op.url << ", site_for_cookies=" << op.site_for_cookies.RepresentativeUrl() << ", cookie_or_line=(" << CookieOrLineToString(op.cookie_or_line) << ", " << static_cast<int>(op.cookie_or_line->which()) << ")" - << ", status=" << op.status.GetDebugString() << "}"; + << ", status=" << op.status.GetDebugString() + << ", is_ad_tagged=" << op.is_ad_tagged << "}"; } static std::string CookieOrLineToString( @@ -164,6 +166,7 @@ op.cookie_or_line = std::move(cookie_and_access_result->cookie_or_line); op.status = cookie_and_access_result->access_result.status; + op.is_ad_tagged = details->is_ad_tagged; recorded_activity_.push_back(std::move(op)); } } @@ -207,12 +210,13 @@ const net::SiteForCookies& site_for_cookies, const url::Origin& top_frame_origin, bool has_storage_access, - mojom::CookieManagerGetOptionsPtr options) { + mojom::CookieManagerGetOptionsPtr options, + bool is_ad_tagged = false) { base::test::TestFuture<const std::vector<net::CookieWithAccessResult>&> future; cookie_service_->GetAllForUrl(url, site_for_cookies, top_frame_origin, has_storage_access, std::move(options), - future.GetCallback()); + is_ad_tagged, future.GetCallback()); return net::cookie_util::StripAccessResults(future.Take()); } @@ -601,14 +605,14 @@ EXPECT_TRUE(backend()->GetCookiesString( kDefaultUrlWithPath, kDefaultSiteForCookies, kDefaultOrigin, /*has_storage_access=*/false, /*get_version_shared_memory=*/false, - &version, &mapped_region, &cookies_out)); + /*is_ad_tagged=*/false, &version, &mapped_region, &cookies_out)); // Version is at initial value on first query. EXPECT_EQ(version, mojom::kInitialCookieVersion); EXPECT_TRUE(backend()->GetCookiesString( kDefaultUrlWithPath, kDefaultSiteForCookies, kDefaultOrigin, /*has_storage_access=*/false, /*get_version_shared_memory=*/false, - &version, &mapped_region, &cookies_out)); + /*is_ad_tagged=*/false, &version, &mapped_region, &cookies_out)); // Version is still at initial value since nothing modified the cookie. EXPECT_EQ(version, mojom::kInitialCookieVersion); @@ -619,7 +623,7 @@ EXPECT_TRUE(backend()->GetCookiesString( kDefaultUrlWithPath, kDefaultSiteForCookies, kDefaultOrigin, /*has_storage_access=*/false, /*get_version_shared_memory=*/false, - &version, &mapped_region, &cookies_out)); + /*is_ad_tagged=*/false, &version, &mapped_region, &cookies_out)); // Version has been incremented by the set operation. EXPECT_NE(version, mojom::kInitialCookieVersion); } @@ -649,7 +653,7 @@ EXPECT_TRUE(backend()->GetCookiesString( kDefaultUrlWithPath, kDefaultSiteForCookies, kDefaultOrigin, /*has_storage_access=*/false, /*get_version_shared_memory=*/false, - &version, &mapped_region, &cookies_out)); + /*is_ad_tagged=*/false, &version, &mapped_region, &cookies_out)); EXPECT_FALSE(mapped_region.IsValid()); EXPECT_EQ("cookie-name=cookie-value; cookie-name-2=cookie-value-2", cookies_out); @@ -658,7 +662,7 @@ EXPECT_TRUE(backend()->GetCookiesString( kDefaultUrlWithPath, kDefaultSiteForCookies, kDefaultOrigin, /*has_storage_access=*/false, /*get_version_shared_memory=*/true, - &version, &mapped_region, &cookies_out)); + /*is_ad_tagged=*/false, &version, &mapped_region, &cookies_out)); EXPECT_TRUE(mapped_region.IsValid()); EXPECT_EQ("cookie-name=cookie-value; cookie-name-2=cookie-value-2", cookies_out); @@ -812,7 +816,7 @@ EXPECT_TRUE(backend()->GetCookiesString( kOtherUrlWithPath, kDefaultSiteForCookies, kDefaultOrigin, /*has_storage_access=*/false, /*get_version_shared_memory=*/false, - &version, &mapped_region, &cookies_out)); + /*is_ad_tagged=*/false, &version, &mapped_region, &cookies_out)); EXPECT_TRUE(received_bad_message()); EXPECT_THAT(cookies_out, IsEmpty()); @@ -820,11 +824,36 @@ EXPECT_TRUE(backend()->GetCookiesString( kOtherUrlWithPath, kDefaultSiteForCookies, kDefaultOrigin, /*has_storage_access=*/false, /*get_version_shared_memory=*/true, - &version, &mapped_region, &cookies_out)); + /*is_ad_tagged=*/false, &version, &mapped_region, &cookies_out)); EXPECT_TRUE(received_bad_message()); EXPECT_THAT(cookies_out, IsEmpty()); } +TEST_P(RestrictedCookieManagerTest, GetAllAdTagged) { + service_->OverrideIsolationInfoForTesting(kOtherIsolationInfo); + SetSessionCookie("cookie-name", "cookie-value", "example.com", "/"); + + auto options = mojom::CookieManagerGetOptions::New(); + options->name = "cookie-name"; + options->match_type = mojom::CookieMatchType::STARTS_WITH; + sync_service_->GetAllForUrl( + kDefaultUrlWithPath, net::SiteForCookies(), kDefaultOrigin, + /*has_storage_access=*/false, std::move(options), /*is_ad_tagged=*/true); + WaitForCallback(); + EXPECT_THAT(recorded_activity().back().is_ad_tagged, true); + + SetSessionCookie("cookie-name", "cookie-value", "example.com", "/"); + options = mojom::CookieManagerGetOptions::New(); + options->name = "cookie-name"; + options->match_type = mojom::CookieMatchType::STARTS_WITH; + sync_service_->GetAllForUrl( + kDefaultUrlWithPath, net::SiteForCookies(), kDefaultOrigin, + /*has_storage_access=*/false, std::move(options), /*is_ad_tagged=*/false); + WaitForCallback(); + + EXPECT_THAT(recorded_activity().back().is_ad_tagged, false); +} + TEST_P(RestrictedCookieManagerTest, GetAllForUrlPolicy) { service_->OverrideIsolationInfoForTesting(kOtherIsolationInfo); SetSessionCookie("cookie-name", "cookie-value", "example.com", "/");
diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json index 66bef3b..a3bddeb 100644 --- a/testing/variations/fieldtrial_testing_config.json +++ b/testing/variations/fieldtrial_testing_config.json
@@ -14,26 +14,6 @@ ] } ], - "AboutThisSiteAsyncFetching": [ - { - "platforms": [ - "android", - "chromeos", - "chromeos_lacros", - "linux", - "mac", - "windows" - ], - "experiments": [ - { - "name": "Enabled", - "enable_features": [ - "AboutThisSiteAsyncFetching" - ] - } - ] - } - ], "AccessibilityIncludeLongClickAction": [ { "platforms": [ @@ -3622,21 +3602,6 @@ ] } ], - "ChromeStartRefactor": [ - { - "platforms": [ - "android" - ], - "experiments": [ - { - "name": "Enabled", - "enable_features": [ - "StartSurfaceRefactor" - ] - } - ] - } - ], "ChromeStartReturnTime": [ { "platforms": [ @@ -4028,7 +3993,6 @@ "enable_features": [ "DelayFirstPeriodicPAPurgeOrReclaim", "DelayFirstWorkerWake", - "ExplicitHighResolutionTimerWin", "InhibitLoadingStateUpdate", "MainThreadCompositingPriority", "QuickIntensiveWakeUpThrottlingAfterLoading", @@ -4053,6 +4017,7 @@ "AboveNormalCompositingBrowserWin", "DelayFirstPeriodicPAPurgeOrReclaim", "DelayFirstWorkerWake", + "ExplicitHighResolutionTimerWin", "InhibitLoadingStateUpdate", "MainThreadCompositingPriority", "QuickIntensiveWakeUpThrottlingAfterLoading", @@ -5715,9 +5680,10 @@ ], "experiments": [ { - "name": "Enabled", + "name": "ConnecMigrationAndBlackhole_20231106", "enable_features": [ - "DisableBlackHoleOnNoNewNetwork" + "DisableBlackHoleOnNoNewNetwork", + "MigrateSessionsOnNetworkChangeV2" ] } ] @@ -8616,6 +8582,21 @@ ] } ], + "IOSLargeFakebox": [ + { + "platforms": [ + "ios" + ], + "experiments": [ + { + "name": "Enabled", + "enable_features": [ + "IOSLargeFakebox" + ] + } + ] + } + ], "IOSLogApplicationStorageSizeMetrics": [ { "platforms": [ @@ -17918,6 +17899,27 @@ ] } ], + "ThirdPartyCookieDeprecationMetadataGrants": [ + { + "platforms": [ + "android", + "chromeos", + "chromeos_lacros", + "fuchsia", + "linux", + "mac", + "windows" + ], + "experiments": [ + { + "name": "Enabled", + "enable_features": [ + "TpcdMetadataGrants" + ] + } + ] + } + ], "ThirdPartyCookieDeprecationTrialService": [ { "platforms": [
diff --git a/third_party/blink/common/custom_handlers/protocol_handler_utils.cc b/third_party/blink/common/custom_handlers/protocol_handler_utils.cc index 5ab4bb7..2e60820 100644 --- a/third_party/blink/common/custom_handlers/protocol_handler_utils.cc +++ b/third_party/blink/common/custom_handlers/protocol_handler_utils.cc
@@ -65,6 +65,7 @@ } return true; } + static constexpr const char* const kProtocolSafelist[] = { "bitcoin", "cabal", "dat", "did", "doi", "dweb", "ethereum", "geo", "hyper", "im", "ipfs", "ipns", "irc", "ircs", @@ -72,19 +73,22 @@ "sip", "sms", "smsto", "ssb", "ssh", "tel", "urn", "webcal", "wtai", "xmpp"}; - static constexpr const char* const kProtocolSafelistFtpEnabled[] = { - "bitcoin", "cabal", "dat", "did", "doi", "dweb", - "ethereum", "ftp", "ftps", "geo", "hyper", "im", - "ipfs", "ipns", "irc", "ircs", "magnet", "mailto", - "matrix", "mms", "news", "nntp", "openpgp4fpr", "sftp", - "sip", "sms", "smsto", "ssb", "ssh", "tel", - "urn", "webcal", "wtai", "xmpp"}; - - return base::FeatureList::IsEnabled( - features::kSafelistFTPToRegisterProtocolHandler) - ? base::Contains(kProtocolSafelistFtpEnabled, - base::ToLowerASCII(scheme)) - : base::Contains(kProtocolSafelist, base::ToLowerASCII(scheme)); + std::string lower_scheme = base::ToLowerASCII(scheme); + if (base::Contains(kProtocolSafelist, lower_scheme)) { + return true; + } + if (base::FeatureList::IsEnabled( + features::kSafelistFTPToRegisterProtocolHandler) && + (lower_scheme == "ftp" || lower_scheme == "ftps" || + lower_scheme == "sftp")) { + return true; + } + if (base::FeatureList::IsEnabled( + features::kSafelistPaytoToRegisterProtocolHandler) && + lower_scheme == "payto") { + return true; + } + return false; } bool IsAllowedCustomHandlerURL(const GURL& url,
diff --git a/third_party/blink/common/features.cc b/third_party/blink/common/features.cc index 633a6b4..3a7f61c 100644 --- a/third_party/blink/common/features.cc +++ b/third_party/blink/common/features.cc
@@ -1635,6 +1635,11 @@ "SafelistFTPToRegisterProtocolHandler", base::FEATURE_ENABLED_BY_DEFAULT); +// https://html.spec.whatwg.org/multipage/system-state.html#safelisted-scheme +BASE_FEATURE(kSafelistPaytoToRegisterProtocolHandler, + "SafelistPaytoToRegisterProtocolHandler", + base::FEATURE_DISABLED_BY_DEFAULT); + BASE_FEATURE(kSSVTrailerEnforceExposureAssertion, "SSVTrailerEnforceExposureAssertion", base::FEATURE_ENABLED_BY_DEFAULT);
diff --git a/third_party/blink/public/common/features.h b/third_party/blink/public/common/features.h index f344303..5b7a9269 100644 --- a/third_party/blink/public/common/features.h +++ b/third_party/blink/public/common/features.h
@@ -1018,6 +1018,12 @@ // https://html.spec.whatwg.org/multipage/system-state.html#safelisted-scheme BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kSafelistFTPToRegisterProtocolHandler); +// When enabled, it adds Payto URI Scheme to the safe list for +// registerProtocolHandler. This feature is disabled by default +// Payto URI Scheme explanation https://datatracker.ietf.org/doc/html/rfc8905 +// https://html.spec.whatwg.org/multipage/system-state.html#safelisted-scheme +BLINK_COMMON_EXPORT BASE_DECLARE_FEATURE(kSafelistPaytoToRegisterProtocolHandler); + // These control a major serialization change to include information about // exposed interfaces in trailer data, to allow emergency fixes. // Regardless, data which might have been serialized to disk must continue to be
diff --git a/third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom b/third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom index b896c24..ee2d89e5 100644 --- a/third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom +++ b/third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom
@@ -4056,6 +4056,8 @@ kElementCheckVisibilityOptionOpacityProperty = 4717, kElementCheckVisibilityOptionVisibilityProperty = 4718, kAdClickMainFrameNavigation = 4719, + kLinkRelPrivacyPolicy = 4720, + kLinkRelTermsOfService = 4721, // Add new features immediately above this line. Don't change assigned // numbers of any item, and don't reuse removed slots.
diff --git a/third_party/blink/public/strings/translations/blink_strings_iw.xtb b/third_party/blink/public/strings/translations/blink_strings_iw.xtb index 059c3e6..f31cd67 100644 --- a/third_party/blink/public/strings/translations/blink_strings_iw.xtb +++ b/third_party/blink/public/strings/translations/blink_strings_iw.xtb
@@ -78,6 +78,7 @@ <translation id="4975562563186953947"><ph name="SELECTED_COUNT" /> נבחרו</translation> <translation id="4992066212339426712">ביטול השתקה</translation> <translation id="49969490063480558">יש להזין חלק ואחריו '<ph name="ATSIGN" />'. השדה '<ph name="INVALIDADDRESS" />' אינו מלא.</translation> +<translation id="5037575921016181960">סיסמה חזקה</translation> <translation id="5090250355906949916">מחוון זמן הסרטון</translation> <translation id="509897012892853729">הערוץ הכחול</translation> <translation id="5117590920725113268">הצגת החודש הבא</translation>
diff --git a/third_party/blink/public/strings/translations/blink_strings_uz.xtb b/third_party/blink/public/strings/translations/blink_strings_uz.xtb index 59fce562..346a389 100644 --- a/third_party/blink/public/strings/translations/blink_strings_uz.xtb +++ b/third_party/blink/public/strings/translations/blink_strings_uz.xtb
@@ -78,6 +78,7 @@ <translation id="4975562563186953947"><ph name="SELECTED_COUNT" /> ta element tanlandi</translation> <translation id="4992066212339426712">Ovozni yoqish</translation> <translation id="49969490063480558">Elektron manzilning qolgan qismini “<ph name="ATSIGN" />” belgisidan keyin kiriting. “<ph name="INVALIDADDRESS" />” manzili to‘liq emas.</translation> +<translation id="5037575921016181960">Kuchli parol</translation> <translation id="5090250355906949916">video ijro yoʻlagi</translation> <translation id="509897012892853729">Koʻk kanal</translation> <translation id="5117590920725113268">Keyingi oyni ko‘rsatish</translation>
diff --git a/third_party/blink/renderer/core/animation/animation_test.cc b/third_party/blink/renderer/core/animation/animation_test.cc index 8630362a..b46d911e 100644 --- a/third_party/blink/renderer/core/animation/animation_test.cc +++ b/third_party/blink/renderer/core/animation/animation_test.cc
@@ -112,8 +112,8 @@ static CSSNumberInterpolationType opacity_type(PropertyHandleOpacity); TransitionKeyframe* start_keyframe = MakeGarbageCollected<TransitionKeyframe>(PropertyHandleOpacity); - start_keyframe->SetValue(std::make_unique<TypedInterpolationValue>( - opacity_type, std::make_unique<InterpolableNumber>(1.0))); + start_keyframe->SetValue(MakeGarbageCollected<TypedInterpolationValue>( + opacity_type, MakeGarbageCollected<InterpolableNumber>(1.0))); start_keyframe->SetOffset(0.0); // Egregious hack: Sideload the compositor value. // This is usually set in a part of the rendering process SimulateFrame @@ -122,8 +122,8 @@ MakeGarbageCollected<CompositorKeyframeDouble>(1.0)); TransitionKeyframe* end_keyframe = MakeGarbageCollected<TransitionKeyframe>(PropertyHandleOpacity); - end_keyframe->SetValue(std::make_unique<TypedInterpolationValue>( - opacity_type, std::make_unique<InterpolableNumber>(0.0))); + end_keyframe->SetValue(MakeGarbageCollected<TypedInterpolationValue>( + opacity_type, MakeGarbageCollected<InterpolableNumber>(0.0))); end_keyframe->SetOffset(1.0); // Egregious hack: Sideload the compositor value. end_keyframe->SetCompositorValue(
diff --git a/third_party/blink/renderer/core/animation/basic_shape_interpolation_functions.cc b/third_party/blink/renderer/core/animation/basic_shape_interpolation_functions.cc index b2b54e8..049205a1 100644 --- a/third_party/blink/renderer/core/animation/basic_shape_interpolation_functions.cc +++ b/third_party/blink/renderer/core/animation/basic_shape_interpolation_functions.cc
@@ -37,8 +37,9 @@ } bool IsCompatibleWith(const BasicShapeNonInterpolableValue& other) const { - if (GetShapeType() != other.GetShapeType()) + if (GetShapeType() != other.GetShapeType()) { return false; + } switch (GetShapeType()) { case BasicShape::kBasicShapeCircleType: case BasicShape::kBasicShapeEllipseType: @@ -84,28 +85,28 @@ namespace { -std::unique_ptr<InterpolableValue> Unwrap(InterpolationValue&& value) { +InterpolableValue* Unwrap(InterpolationValue&& value) { DCHECK(value.interpolable_value); return std::move(value.interpolable_value); } -std::unique_ptr<InterpolableValue> ConvertCSSCoordinate( - const CSSValue* coordinate) { - if (coordinate) +InterpolableValue* ConvertCSSCoordinate(const CSSValue* coordinate) { + if (coordinate) { return Unwrap( CSSPositionAxisListInterpolationType::ConvertPositionAxisCSSValue( *coordinate)); + } return InterpolableLength::MaybeConvertLength(Length::Percent(50), 1); } -std::unique_ptr<InterpolableValue> ConvertCoordinate( +InterpolableValue* ConvertCoordinate( const BasicShapeCenterCoordinate& coordinate, double zoom) { return InterpolableLength::MaybeConvertLength(coordinate.ComputedLength(), zoom); } -std::unique_ptr<InterpolableValue> CreateNeutralInterpolableCoordinate() { +InterpolableValue* CreateNeutralInterpolableCoordinate() { return InterpolableLength::CreateNeutral(); } @@ -118,20 +119,21 @@ .CreateLength(conversion_data, Length::ValueRange::kAll)); } -std::unique_ptr<InterpolableValue> ConvertCSSRadius(const CSSValue* radius) { - if (!radius || radius->IsIdentifierValue()) +InterpolableValue* ConvertCSSRadius(const CSSValue* radius) { + if (!radius || radius->IsIdentifierValue()) { return nullptr; + } return InterpolableLength::MaybeConvertCSSValue(*radius); } -std::unique_ptr<InterpolableValue> ConvertRadius(const BasicShapeRadius& radius, - double zoom) { - if (radius.GetType() != BasicShapeRadius::kValue) +InterpolableValue* ConvertRadius(const BasicShapeRadius& radius, double zoom) { + if (radius.GetType() != BasicShapeRadius::kValue) { return nullptr; + } return InterpolableLength::MaybeConvertLength(radius.Value(), zoom); } -std::unique_ptr<InterpolableValue> CreateNeutralInterpolableRadius() { +InterpolableValue* CreateNeutralInterpolableRadius() { return InterpolableLength::CreateNeutral(); } @@ -143,15 +145,15 @@ .CreateLength(conversion_data, Length::ValueRange::kNonNegative)); } -std::unique_ptr<InterpolableValue> ConvertCSSLength(const CSSValue* length) { - if (!length) +InterpolableValue* ConvertCSSLength(const CSSValue* length) { + if (!length) { return InterpolableLength::CreateNeutral(); + } return InterpolableLength::MaybeConvertCSSValue(*length); } -std::unique_ptr<InterpolableValue> ConvertCSSLengthOrAuto( - const CSSValue* length, - double auto_percent) { +InterpolableValue* ConvertCSSLengthOrAuto(const CSSValue* length, + double auto_percent) { if (!length) { return InterpolableLength::CreateNeutral(); } @@ -162,27 +164,24 @@ return InterpolableLength::MaybeConvertCSSValue(*length); } -std::unique_ptr<InterpolableValue> ConvertLength(const Length& length, - double zoom) { +InterpolableValue* ConvertLength(const Length& length, double zoom) { return InterpolableLength::MaybeConvertLength(length, zoom); } -std::unique_ptr<InterpolableValue> ConvertLengthOrAuto(const Length& length, - double zoom, - double auto_percent) { +InterpolableValue* ConvertLengthOrAuto(const Length& length, + double zoom, + double auto_percent) { if (length.IsAuto()) { return InterpolableLength::CreatePercent(auto_percent); } return ConvertLength(length, zoom); } -std::unique_ptr<InterpolableValue> ConvertCSSBorderRadiusWidth( - const CSSValuePair* pair) { +InterpolableValue* ConvertCSSBorderRadiusWidth(const CSSValuePair* pair) { return ConvertCSSLength(pair ? &pair->First() : nullptr); } -std::unique_ptr<InterpolableValue> ConvertCSSBorderRadiusHeight( - const CSSValuePair* pair) { +InterpolableValue* ConvertCSSBorderRadiusHeight(const CSSValuePair* pair) { return ConvertCSSLength(pair ? &pair->Second() : nullptr); } @@ -208,16 +207,18 @@ InterpolationValue ConvertCSSValue( const cssvalue::CSSBasicShapeCircleValue& circle) { - auto list = std::make_unique<InterpolableList>(kCircleComponentIndexCount); + auto* list = + MakeGarbageCollected<InterpolableList>(kCircleComponentIndexCount); list->Set(kCircleCenterXIndex, ConvertCSSCoordinate(circle.CenterX())); list->Set(kCircleCenterYIndex, ConvertCSSCoordinate(circle.CenterY())); list->Set(kCircleHasExplicitCenterIndex, - std::make_unique<InterpolableNumber>(!!circle.CenterX())); + MakeGarbageCollected<InterpolableNumber>(!!circle.CenterX())); - std::unique_ptr<InterpolableValue> radius; - if (!(radius = ConvertCSSRadius(circle.Radius()))) + InterpolableValue* radius = nullptr; + if (!(radius = ConvertCSSRadius(circle.Radius()))) { return nullptr; - list->Set(kCircleRadiusIndex, std::move(radius)); + } + list->Set(kCircleRadiusIndex, radius); return InterpolationValue(std::move(list), BasicShapeNonInterpolableValue::Create( @@ -226,30 +227,34 @@ InterpolationValue ConvertBasicShape(const BasicShapeCircle& circle, double zoom) { - auto list = std::make_unique<InterpolableList>(kCircleComponentIndexCount); + auto* list = + MakeGarbageCollected<InterpolableList>(kCircleComponentIndexCount); list->Set(kCircleCenterXIndex, ConvertCoordinate(circle.CenterX(), zoom)); list->Set(kCircleCenterYIndex, ConvertCoordinate(circle.CenterY(), zoom)); - list->Set(kCircleHasExplicitCenterIndex, - std::make_unique<InterpolableNumber>(circle.HasExplicitCenter())); + list->Set( + kCircleHasExplicitCenterIndex, + MakeGarbageCollected<InterpolableNumber>(circle.HasExplicitCenter())); - std::unique_ptr<InterpolableValue> radius; - if (!(radius = ConvertRadius(circle.Radius(), zoom))) + InterpolableValue* radius = nullptr; + if (!(radius = ConvertRadius(circle.Radius(), zoom))) { return nullptr; - list->Set(kCircleRadiusIndex, std::move(radius)); + } + list->Set(kCircleRadiusIndex, radius); return InterpolationValue(std::move(list), BasicShapeNonInterpolableValue::Create( BasicShape::kBasicShapeCircleType)); } -std::unique_ptr<InterpolableValue> CreateNeutralValue() { - auto list = std::make_unique<InterpolableList>(kCircleComponentIndexCount); +InterpolableValue* CreateNeutralValue() { + auto* list = + MakeGarbageCollected<InterpolableList>(kCircleComponentIndexCount); list->Set(kCircleCenterXIndex, CreateNeutralInterpolableCoordinate()); list->Set(kCircleCenterYIndex, CreateNeutralInterpolableCoordinate()); list->Set(kCircleRadiusIndex, CreateNeutralInterpolableRadius()); list->Set(kCircleHasExplicitCenterIndex, - std::make_unique<InterpolableNumber>(0)); - return std::move(list); + MakeGarbageCollected<InterpolableNumber>(0)); + return list; } scoped_refptr<BasicShape> CreateBasicShape( @@ -283,54 +288,60 @@ InterpolationValue ConvertCSSValue( const cssvalue::CSSBasicShapeEllipseValue& ellipse) { - auto list = std::make_unique<InterpolableList>(kEllipseComponentIndexCount); + auto* list = + MakeGarbageCollected<InterpolableList>(kEllipseComponentIndexCount); list->Set(kEllipseCenterXIndex, ConvertCSSCoordinate(ellipse.CenterX())); list->Set(kEllipseCenterYIndex, ConvertCSSCoordinate(ellipse.CenterY())); list->Set(kEllipseHasExplicitCenter, - std::make_unique<InterpolableNumber>(!!ellipse.CenterX())); + MakeGarbageCollected<InterpolableNumber>(!!ellipse.CenterX())); - std::unique_ptr<InterpolableValue> radius; - if (!(radius = ConvertCSSRadius(ellipse.RadiusX()))) + InterpolableValue* radius = nullptr; + if (!(radius = ConvertCSSRadius(ellipse.RadiusX()))) { return nullptr; - list->Set(kEllipseRadiusXIndex, std::move(radius)); - if (!(radius = ConvertCSSRadius(ellipse.RadiusY()))) + } + list->Set(kEllipseRadiusXIndex, radius); + if (!(radius = ConvertCSSRadius(ellipse.RadiusY()))) { return nullptr; - list->Set(kEllipseRadiusYIndex, std::move(radius)); + } + list->Set(kEllipseRadiusYIndex, radius); - return InterpolationValue(std::move(list), - BasicShapeNonInterpolableValue::Create( - BasicShape::kBasicShapeEllipseType)); + return InterpolationValue(list, BasicShapeNonInterpolableValue::Create( + BasicShape::kBasicShapeEllipseType)); } InterpolationValue ConvertBasicShape(const BasicShapeEllipse& ellipse, double zoom) { - auto list = std::make_unique<InterpolableList>(kEllipseComponentIndexCount); + auto* list = + MakeGarbageCollected<InterpolableList>(kEllipseComponentIndexCount); list->Set(kEllipseCenterXIndex, ConvertCoordinate(ellipse.CenterX(), zoom)); list->Set(kEllipseCenterYIndex, ConvertCoordinate(ellipse.CenterY(), zoom)); - list->Set(kEllipseHasExplicitCenter, - std::make_unique<InterpolableNumber>(ellipse.HasExplicitCenter())); + list->Set(kEllipseHasExplicitCenter, MakeGarbageCollected<InterpolableNumber>( + ellipse.HasExplicitCenter())); - std::unique_ptr<InterpolableValue> radius; - if (!(radius = ConvertRadius(ellipse.RadiusX(), zoom))) + InterpolableValue* radius = nullptr; + if (!(radius = ConvertRadius(ellipse.RadiusX(), zoom))) { return nullptr; - list->Set(kEllipseRadiusXIndex, std::move(radius)); - if (!(radius = ConvertRadius(ellipse.RadiusY(), zoom))) + } + list->Set(kEllipseRadiusXIndex, radius); + if (!(radius = ConvertRadius(ellipse.RadiusY(), zoom))) { return nullptr; - list->Set(kEllipseRadiusYIndex, std::move(radius)); + } + list->Set(kEllipseRadiusYIndex, radius); - return InterpolationValue(std::move(list), - BasicShapeNonInterpolableValue::Create( - BasicShape::kBasicShapeEllipseType)); + return InterpolationValue(list, BasicShapeNonInterpolableValue::Create( + BasicShape::kBasicShapeEllipseType)); } -std::unique_ptr<InterpolableValue> CreateNeutralValue() { - auto list = std::make_unique<InterpolableList>(kEllipseComponentIndexCount); +InterpolableValue* CreateNeutralValue() { + auto* list = + MakeGarbageCollected<InterpolableList>(kEllipseComponentIndexCount); list->Set(kEllipseCenterXIndex, CreateNeutralInterpolableCoordinate()); list->Set(kEllipseCenterYIndex, CreateNeutralInterpolableCoordinate()); list->Set(kEllipseRadiusXIndex, CreateNeutralInterpolableRadius()); list->Set(kEllipseRadiusYIndex, CreateNeutralInterpolableRadius()); - list->Set(kEllipseHasExplicitCenter, std::make_unique<InterpolableNumber>(0)); - return std::move(list); + list->Set(kEllipseHasExplicitCenter, + MakeGarbageCollected<InterpolableNumber>(0)); + return list; } scoped_refptr<BasicShape> CreateBasicShape( @@ -381,7 +392,8 @@ type = BasicShape::kBasicShapeRectType; } - auto list = std::make_unique<InterpolableList>(kInsetComponentIndexCount); + auto* list = + MakeGarbageCollected<InterpolableList>(kInsetComponentIndexCount); // 'auto' can only appear in the rect() function, but passing for inset() // where it won't be used for simplicity. list->Set(kInsetTopIndex, ConvertCSSLengthOrAuto(inset.Top(), 0)); @@ -405,13 +417,13 @@ ConvertCSSBorderRadiusWidth(inset.BottomLeftRadius())); list->Set(kInsetBorderBottomLeftHeightIndex, ConvertCSSBorderRadiusHeight(inset.BottomLeftRadius())); - return InterpolationValue(std::move(list), - BasicShapeNonInterpolableValue::Create(type)); + return InterpolationValue(list, BasicShapeNonInterpolableValue::Create(type)); } InterpolationValue ConvertBasicShape(const BasicShapeRectCommon& inset, double zoom) { - auto list = std::make_unique<InterpolableList>(kInsetComponentIndexCount); + auto* list = + MakeGarbageCollected<InterpolableList>(kInsetComponentIndexCount); // 'auto' can only appear in the rect() function, but passing for inset() // where it won't be used for simplicity. list->Set(kInsetTopIndex, ConvertLengthOrAuto(inset.Top(), zoom, 0)); @@ -436,11 +448,12 @@ list->Set(kInsetBorderBottomLeftHeightIndex, ConvertLength(inset.BottomLeftRadius().Height(), zoom)); return InterpolationValue( - std::move(list), BasicShapeNonInterpolableValue::Create(inset.GetType())); + list, BasicShapeNonInterpolableValue::Create(inset.GetType())); } -std::unique_ptr<InterpolableValue> CreateNeutralValue() { - auto list = std::make_unique<InterpolableList>(kInsetComponentIndexCount); +InterpolableValue* CreateNeutralValue() { + auto* list = + MakeGarbageCollected<InterpolableList>(kInsetComponentIndexCount); list->Set(kInsetTopIndex, InterpolableLength::CreateNeutral()); list->Set(kInsetRightIndex, InterpolableLength::CreateNeutral()); list->Set(kInsetBottomIndex, InterpolableLength::CreateNeutral()); @@ -461,7 +474,7 @@ InterpolableLength::CreateNeutral()); list->Set(kInsetBorderBottomLeftHeightIndex, InterpolableLength::CreateNeutral()); - return std::move(list); + return list; } scoped_refptr<BasicShape> CreateBasicShape( @@ -524,7 +537,7 @@ InterpolationValue ConvertCSSValue( const cssvalue::CSSBasicShapeXYWHValue& value) { - auto list = std::make_unique<InterpolableList>(kXywhComponentIndexCount); + auto* list = MakeGarbageCollected<InterpolableList>(kXywhComponentIndexCount); list->Set(kXywhXIndex, ConvertCSSLength(value.X())); list->Set(kXywhYIndex, ConvertCSSLength(value.Y())); list->Set(kXywhWidthIndex, ConvertCSSLength(value.Width())); @@ -546,13 +559,12 @@ ConvertCSSBorderRadiusWidth(value.BottomLeftRadius())); list->Set(kXywhBorderBottomLeftHeightIndex, ConvertCSSBorderRadiusHeight(value.BottomLeftRadius())); - return InterpolationValue( - std::move(list), - BasicShapeNonInterpolableValue::Create(BasicShape::kBasicShapeXYWHType)); + return InterpolationValue(list, BasicShapeNonInterpolableValue::Create( + BasicShape::kBasicShapeXYWHType)); } InterpolationValue ConvertBasicShape(const BasicShapeXYWH& shape, double zoom) { - auto list = std::make_unique<InterpolableList>(kXywhComponentIndexCount); + auto* list = MakeGarbageCollected<InterpolableList>(kXywhComponentIndexCount); list->Set(kXywhXIndex, ConvertLength(shape.X(), zoom)); list->Set(kXywhYIndex, ConvertLength(shape.Y(), zoom)); list->Set(kXywhWidthIndex, ConvertLength(shape.Width(), zoom)); @@ -574,13 +586,12 @@ ConvertLength(shape.BottomLeftRadius().Width(), zoom)); list->Set(kXywhBorderBottomLeftHeightIndex, ConvertLength(shape.BottomLeftRadius().Height(), zoom)); - return InterpolationValue( - std::move(list), - BasicShapeNonInterpolableValue::Create(BasicShape::kBasicShapeXYWHType)); + return InterpolationValue(list, BasicShapeNonInterpolableValue::Create( + BasicShape::kBasicShapeXYWHType)); } -std::unique_ptr<InterpolableValue> CreateNeutralValue() { - auto list = std::make_unique<InterpolableList>(kXywhComponentIndexCount); +InterpolableValue* CreateNeutralValue() { + auto* list = MakeGarbageCollected<InterpolableList>(kXywhComponentIndexCount); list->Set(kXywhXIndex, InterpolableLength::CreateNeutral()); list->Set(kXywhYIndex, InterpolableLength::CreateNeutral()); list->Set(kXywhWidthIndex, InterpolableLength::CreateNeutral()); @@ -599,7 +610,7 @@ InterpolableLength::CreateNeutral()); list->Set(kXywhBorderBottomLeftHeightIndex, InterpolableLength::CreateNeutral()); - return std::move(list); + return list; } scoped_refptr<BasicShape> CreateBasicShape( @@ -639,31 +650,33 @@ InterpolationValue ConvertCSSValue( const cssvalue::CSSBasicShapePolygonValue& polygon) { wtf_size_t size = polygon.Values().size(); - auto list = std::make_unique<InterpolableList>(size); - for (wtf_size_t i = 0; i < size; i++) + auto* list = MakeGarbageCollected<InterpolableList>(size); + for (wtf_size_t i = 0; i < size; i++) { list->Set(i, ConvertCSSLength(polygon.Values()[i].Get())); - return InterpolationValue(std::move(list), - BasicShapeNonInterpolableValue::CreatePolygon( - polygon.GetWindRule(), size)); + } + return InterpolationValue(list, BasicShapeNonInterpolableValue::CreatePolygon( + polygon.GetWindRule(), size)); } InterpolationValue ConvertBasicShape(const BasicShapePolygon& polygon, double zoom) { wtf_size_t size = polygon.Values().size(); - auto list = std::make_unique<InterpolableList>(size); - for (wtf_size_t i = 0; i < size; i++) + auto* list = MakeGarbageCollected<InterpolableList>(size); + for (wtf_size_t i = 0; i < size; i++) { list->Set(i, ConvertLength(polygon.Values()[i], zoom)); - return InterpolationValue(std::move(list), - BasicShapeNonInterpolableValue::CreatePolygon( - polygon.GetWindRule(), size)); + } + return InterpolationValue(list, BasicShapeNonInterpolableValue::CreatePolygon( + polygon.GetWindRule(), size)); } -std::unique_ptr<InterpolableValue> CreateNeutralValue( +InterpolableValue* CreateNeutralValue( const BasicShapeNonInterpolableValue& non_interpolable_value) { - auto list = std::make_unique<InterpolableList>(non_interpolable_value.size()); - for (wtf_size_t i = 0; i < non_interpolable_value.size(); i++) + auto* list = + MakeGarbageCollected<InterpolableList>(non_interpolable_value.size()); + for (wtf_size_t i = 0; i < non_interpolable_value.size(); i++) { list->Set(i, InterpolableLength::CreateNeutral()); - return std::move(list); + } + return list; } scoped_refptr<BasicShape> CreateBasicShape( @@ -720,8 +733,9 @@ InterpolationValue basic_shape_interpolation_functions::MaybeConvertBasicShape( const BasicShape* shape, double zoom) { - if (!shape) + if (!shape) { return nullptr; + } switch (shape->GetType()) { case BasicShape::kBasicShapeCircleType: return circle_functions::ConvertBasicShape(To<BasicShapeCircle>(*shape), @@ -748,8 +762,7 @@ } } -std::unique_ptr<InterpolableValue> -basic_shape_interpolation_functions::CreateNeutralValue( +InterpolableValue* basic_shape_interpolation_functions::CreateNeutralValue( const NonInterpolableValue& untyped_non_interpolable_value) { const auto& non_interpolable_value = To<BasicShapeNonInterpolableValue>(untyped_non_interpolable_value);
diff --git a/third_party/blink/renderer/core/animation/basic_shape_interpolation_functions.h b/third_party/blink/renderer/core/animation/basic_shape_interpolation_functions.h index 08044ac0..6f1048d 100644 --- a/third_party/blink/renderer/core/animation/basic_shape_interpolation_functions.h +++ b/third_party/blink/renderer/core/animation/basic_shape_interpolation_functions.h
@@ -20,8 +20,7 @@ InterpolationValue MaybeConvertCSSValue(const CSSValue&); CORE_EXPORT InterpolationValue MaybeConvertBasicShape(const BasicShape*, double zoom); -std::unique_ptr<InterpolableValue> CreateNeutralValue( - const NonInterpolableValue&); +InterpolableValue* CreateNeutralValue(const NonInterpolableValue&); CORE_EXPORT bool ShapesAreCompatible(const NonInterpolableValue&, const NonInterpolableValue&); CORE_EXPORT scoped_refptr<BasicShape> CreateBasicShape(
diff --git a/third_party/blink/renderer/core/animation/css/css_animations.cc b/third_party/blink/renderer/core/animation/css/css_animations.cc index 5895dd9..bba6877 100644 --- a/third_party/blink/renderer/core/animation/css/css_animations.cc +++ b/third_party/blink/renderer/core/animation/css/css_animations.cc
@@ -2343,10 +2343,10 @@ return; } start = InterpolationValue( - std::make_unique<InterpolableList>(0), + MakeGarbageCollected<InterpolableList>(0), CSSDefaultNonInterpolableValue::Create(start_css_value)); end = InterpolationValue( - std::make_unique<InterpolableList>(0), + MakeGarbageCollected<InterpolableList>(0), CSSDefaultNonInterpolableValue::Create(end_css_value)); } // If we have multiple transitions on the same property, we will use the @@ -2391,7 +2391,7 @@ TransitionKeyframe* start_keyframe = MakeGarbageCollected<TransitionKeyframe>(property); - start_keyframe->SetValue(std::make_unique<TypedInterpolationValue>( + start_keyframe->SetValue(MakeGarbageCollected<TypedInterpolationValue>( *transition_type, start.interpolable_value->Clone(), start.non_interpolable_value)); start_keyframe->SetOffset(0); @@ -2399,7 +2399,7 @@ TransitionKeyframe* end_keyframe = MakeGarbageCollected<TransitionKeyframe>(property); - end_keyframe->SetValue(std::make_unique<TypedInterpolationValue>( + end_keyframe->SetValue(MakeGarbageCollected<TypedInterpolationValue>( *transition_type, end.interpolable_value->Clone(), end.non_interpolable_value)); end_keyframe->SetOffset(1);
diff --git a/third_party/blink/renderer/core/animation/css_angle_interpolation_type.cc b/third_party/blink/renderer/core/animation/css_angle_interpolation_type.cc index 93b6b0fb..a27c1e9 100644 --- a/third_party/blink/renderer/core/animation/css_angle_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/css_angle_interpolation_type.cc
@@ -12,7 +12,7 @@ InterpolationValue CSSAngleInterpolationType::MaybeConvertNeutral( const InterpolationValue&, ConversionCheckers&) const { - return InterpolationValue(std::make_unique<InterpolableNumber>(0)); + return InterpolationValue(MakeGarbageCollected<InterpolableNumber>(0)); } InterpolationValue CSSAngleInterpolationType::MaybeConvertValue( @@ -20,10 +20,11 @@ const StyleResolverState*, ConversionCheckers&) const { auto* primitive_value = DynamicTo<CSSPrimitiveValue>(value); - if (!primitive_value || !primitive_value->IsAngle()) + if (!primitive_value || !primitive_value->IsAngle()) { return nullptr; - return InterpolationValue( - std::make_unique<InterpolableNumber>(primitive_value->ComputeDegrees())); + } + return InterpolationValue(MakeGarbageCollected<InterpolableNumber>( + primitive_value->ComputeDegrees())); } const CSSValue* CSSAngleInterpolationType::CreateCSSValue(
diff --git a/third_party/blink/renderer/core/animation/css_aspect_ratio_interpolation_type.cc b/third_party/blink/renderer/core/animation/css_aspect_ratio_interpolation_type.cc index ab0e551..5ffb4337 100644 --- a/third_party/blink/renderer/core/animation/css_aspect_ratio_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/css_aspect_ratio_interpolation_type.cc
@@ -71,12 +71,10 @@ const StyleAspectRatio aspect_ratio_; }; -std::unique_ptr<InterpolableValue> +InterpolableValue* CSSAspectRatioInterpolationType::CreateInterpolableAspectRatio( const StyleAspectRatio& aspect_ratio) { - std::unique_ptr<InterpolableAspectRatio> result = - InterpolableAspectRatio::MaybeCreate(aspect_ratio); - return std::move(result); + return InterpolableAspectRatio::MaybeCreate(aspect_ratio); } PairwiseInterpolationValue CSSAspectRatioInterpolationType::MaybeMergeSingles(
diff --git a/third_party/blink/renderer/core/animation/css_aspect_ratio_interpolation_type.h b/third_party/blink/renderer/core/animation/css_aspect_ratio_interpolation_type.h index 38039dc9..fd15c26 100644 --- a/third_party/blink/renderer/core/animation/css_aspect_ratio_interpolation_type.h +++ b/third_party/blink/renderer/core/animation/css_aspect_ratio_interpolation_type.h
@@ -34,7 +34,7 @@ const InterpolationValue&, double interpolation_fraction) const final; - static std::unique_ptr<InterpolableValue> CreateInterpolableAspectRatio( + static InterpolableValue* CreateInterpolableAspectRatio( const StyleAspectRatio&); private:
diff --git a/third_party/blink/renderer/core/animation/css_border_image_length_box_interpolation_type.cc b/third_party/blink/renderer/core/animation/css_border_image_length_box_interpolation_type.cc index 0c712eb..2b4d8c8 100644 --- a/third_party/blink/renderer/core/animation/css_border_image_length_box_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/css_border_image_length_box_interpolation_type.cc
@@ -219,20 +219,19 @@ InterpolationValue ConvertBorderImageNumberSide(double number) { return InterpolationValue( - std::make_unique<InterpolableNumber>(number), + MakeGarbageCollected<InterpolableNumber>(number), CSSBorderImageLengthBoxSideNonInterpolableValue::Create( SideType::kNumber)); } InterpolationValue ConvertBorderImageAutoSide() { return InterpolationValue( - std::make_unique<InterpolableList>(0), + MakeGarbageCollected<InterpolableList>(0), CSSBorderImageLengthBoxSideNonInterpolableValue::Create(SideType::kAuto)); } InterpolationValue ConvertBorderImageLengthBox(const BorderImageLengthBox& box, double zoom) { - auto list = std::make_unique<InterpolableList>(kSideIndexCount); Vector<scoped_refptr<const NonInterpolableValue>> non_interpolable_values( kSideIndexCount); const BorderImageLength* sides[kSideIndexCount] = {}; @@ -319,7 +318,6 @@ if (!quad) return nullptr; - auto list = std::make_unique<InterpolableList>(kSideIndexCount); Vector<scoped_refptr<const NonInterpolableValue>> non_interpolable_values( kSideIndexCount); const CSSValue* sides[kSideIndexCount] = {};
diff --git a/third_party/blink/renderer/core/animation/css_clip_interpolation_type.cc b/third_party/blink/renderer/core/animation/css_clip_interpolation_type.cc index 404b788..fa70282c 100644 --- a/third_party/blink/renderer/core/animation/css_clip_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/css_clip_interpolation_type.cc
@@ -152,22 +152,22 @@ kClipComponentIndexCount, }; -static std::unique_ptr<InterpolableValue> ConvertClipComponent( - const Length& length, - double zoom) { - if (length.IsAuto()) - return std::make_unique<InterpolableList>(0); +static InterpolableValue* ConvertClipComponent(const Length& length, + double zoom) { + if (length.IsAuto()) { + return MakeGarbageCollected<InterpolableList>(0); + } return InterpolableLength::MaybeConvertLength(length, zoom); } static InterpolationValue CreateClipValue(const LengthBox& clip, double zoom) { - auto list = std::make_unique<InterpolableList>(kClipComponentIndexCount); + auto* list = MakeGarbageCollected<InterpolableList>(kClipComponentIndexCount); list->Set(kClipTop, ConvertClipComponent(clip.Top(), zoom)); list->Set(kClipRight, ConvertClipComponent(clip.Right(), zoom)); list->Set(kClipBottom, ConvertClipComponent(clip.Bottom(), zoom)); list->Set(kClipLeft, ConvertClipComponent(clip.Left(), zoom)); return InterpolationValue( - std::move(list), CSSClipNonInterpolableValue::Create(ClipAutos(clip))); + list, CSSClipNonInterpolableValue::Create(ClipAutos(clip))); } InterpolationValue CSSClipInterpolationType::MaybeConvertNeutral( @@ -210,10 +210,9 @@ identifier_value->GetValueID() == CSSValueID::kAuto; } -static std::unique_ptr<InterpolableValue> ConvertClipComponent( - const CSSValue& length) { +static InterpolableValue* ConvertClipComponent(const CSSValue& length) { if (IsCSSAuto(length)) - return std::make_unique<InterpolableList>(0); + return MakeGarbageCollected<InterpolableList>(0); return InterpolableLength::MaybeConvertCSSValue(length); } @@ -224,15 +223,14 @@ const auto* quad = DynamicTo<CSSQuadValue>(value); if (!quad) return nullptr; - auto list = std::make_unique<InterpolableList>(kClipComponentIndexCount); + auto* list = MakeGarbageCollected<InterpolableList>(kClipComponentIndexCount); list->Set(kClipTop, ConvertClipComponent(*quad->Top())); list->Set(kClipRight, ConvertClipComponent(*quad->Right())); list->Set(kClipBottom, ConvertClipComponent(*quad->Bottom())); list->Set(kClipLeft, ConvertClipComponent(*quad->Left())); ClipAutos autos(IsCSSAuto(*quad->Top()), IsCSSAuto(*quad->Right()), IsCSSAuto(*quad->Bottom()), IsCSSAuto(*quad->Left())); - return InterpolationValue(std::move(list), - CSSClipNonInterpolableValue::Create(autos)); + return InterpolationValue(list, CSSClipNonInterpolableValue::Create(autos)); } InterpolationValue
diff --git a/third_party/blink/renderer/core/animation/css_color_interpolation_type.cc b/third_party/blink/renderer/core/animation/css_color_interpolation_type.cc index 8096cdc..c3858dc 100644 --- a/third_party/blink/renderer/core/animation/css_color_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/css_color_interpolation_type.cc
@@ -19,25 +19,25 @@ namespace blink { -std::unique_ptr<InterpolableColor> -CSSColorInterpolationType::CreateInterpolableColor(const Color& color) { +InterpolableColor* CSSColorInterpolationType::CreateInterpolableColor( + const Color& color) { return InterpolableColor::Create(color); } -std::unique_ptr<InterpolableColor> -CSSColorInterpolationType::CreateInterpolableColor(CSSValueID keyword) { +InterpolableColor* CSSColorInterpolationType::CreateInterpolableColor( + CSSValueID keyword) { return InterpolableColor::Create(keyword); } -std::unique_ptr<InterpolableColor> -CSSColorInterpolationType::CreateInterpolableColor(const StyleColor& color) { +InterpolableColor* CSSColorInterpolationType::CreateInterpolableColor( + const StyleColor& color) { if (!color.IsNumeric()) return CreateInterpolableColor(color.GetColorKeyword()); return CreateInterpolableColor(color.GetColor()); } -std::unique_ptr<InterpolableColor> -CSSColorInterpolationType::MaybeCreateInterpolableColor(const CSSValue& value) { +InterpolableColor* CSSColorInterpolationType::MaybeCreateInterpolableColor( + const CSSValue& value) { if (auto* color_value = DynamicTo<cssvalue::CSSColor>(value)) { return CreateInterpolableColor(color_value->Value()); } @@ -238,15 +238,14 @@ } } - std::unique_ptr<InterpolableColor> interpolable_color = - MaybeCreateInterpolableColor(value); + InterpolableColor* interpolable_color = MaybeCreateInterpolableColor(value); if (!interpolable_color) return nullptr; - auto color_pair = - std::make_unique<InterpolableList>(kInterpolableColorPairIndexCount); + auto* color_pair = + MakeGarbageCollected<InterpolableList>(kInterpolableColorPairIndexCount); color_pair->Set(kUnvisited, interpolable_color->Clone()); - color_pair->Set(kVisited, std::move(interpolable_color)); - return InterpolationValue(std::move(color_pair)); + color_pair->Set(kVisited, interpolable_color); + return InterpolationValue(color_pair); } PairwiseInterpolationValue CSSColorInterpolationType::MaybeMergeSingles( @@ -287,11 +286,11 @@ InterpolationValue CSSColorInterpolationType::ConvertStyleColorPair( const StyleColor& unvisited_color, const StyleColor& visited_color) { - auto color_pair = - std::make_unique<InterpolableList>(kInterpolableColorPairIndexCount); + auto* color_pair = + MakeGarbageCollected<InterpolableList>(kInterpolableColorPairIndexCount); color_pair->Set(kUnvisited, CreateInterpolableColor(unvisited_color)); color_pair->Set(kVisited, CreateInterpolableColor(visited_color)); - return InterpolationValue(std::move(color_pair)); + return InterpolationValue(color_pair); } InterpolationValue
diff --git a/third_party/blink/renderer/core/animation/css_color_interpolation_type.h b/third_party/blink/renderer/core/animation/css_color_interpolation_type.h index cf926fe..06b3aca 100644 --- a/third_party/blink/renderer/core/animation/css_color_interpolation_type.h +++ b/third_party/blink/renderer/core/animation/css_color_interpolation_type.h
@@ -33,13 +33,10 @@ const InterpolationValue& value, double interpolation_fraction) const final; - static std::unique_ptr<InterpolableColor> CreateInterpolableColor( - const Color&); - static std::unique_ptr<InterpolableColor> CreateInterpolableColor(CSSValueID); - static std::unique_ptr<InterpolableColor> CreateInterpolableColor( - const StyleColor&); - static std::unique_ptr<InterpolableColor> MaybeCreateInterpolableColor( - const CSSValue&); + static InterpolableColor* CreateInterpolableColor(const Color&); + static InterpolableColor* CreateInterpolableColor(CSSValueID); + static InterpolableColor* CreateInterpolableColor(const StyleColor&); + static InterpolableColor* MaybeCreateInterpolableColor(const CSSValue&); static Color ResolveInterpolableColor( const InterpolableValue& interpolable_color, const StyleResolverState&,
diff --git a/third_party/blink/renderer/core/animation/css_color_interpolation_type_test.cc b/third_party/blink/renderer/core/animation/css_color_interpolation_type_test.cc index d624791..c12fea4 100644 --- a/third_party/blink/renderer/core/animation/css_color_interpolation_type_test.cc +++ b/third_party/blink/renderer/core/animation/css_color_interpolation_type_test.cc
@@ -42,11 +42,11 @@ TEST(CSSColorInterpolationTypeTest, RGBBounds) { Color from_color(0, 0, 0, 0); Color to_color(255, 255, 255, 255); - std::unique_ptr<InterpolableValue> from = + InterpolableValue* from = CSSColorInterpolationType::CreateInterpolableColor(from_color); - std::unique_ptr<InterpolableValue> to = + InterpolableValue* to = CSSColorInterpolationType::CreateInterpolableColor(to_color); - std::unique_ptr<InterpolableValue> result = + InterpolableValue* result = CSSColorInterpolationType::CreateInterpolableColor(to_color); from->Interpolate(*to, 1e30, *result); @@ -61,9 +61,9 @@ Color from_color = Color::FromRGBAFloat(1, 1, 1, 1); Color to_color = Color::FromColorSpace(Color::ColorSpace::kOklab, 0, 0, 0, 0.5); - std::unique_ptr<InterpolableColor> from = + InterpolableColor* from = CSSColorInterpolationType::CreateInterpolableColor(from_color); - std::unique_ptr<InterpolableColor> to = + InterpolableColor* to = CSSColorInterpolationType::CreateInterpolableColor(to_color); from_color = CSSColorInterpolationType::GetColor(*from); @@ -86,11 +86,11 @@ Color::FromColorSpace(Color::ColorSpace::kOklab, 100, 1, 1, 1); Color to_color = Color::FromColorSpace(Color::ColorSpace::kOklab, 0, 0, 0, 0.5); - std::unique_ptr<InterpolableValue> from = + InterpolableValue* from = CSSColorInterpolationType::CreateInterpolableColor(from_color); - std::unique_ptr<InterpolableValue> to = + InterpolableValue* to = CSSColorInterpolationType::CreateInterpolableColor(to_color); - std::unique_ptr<InterpolableValue> result = + InterpolableValue* result = CSSColorInterpolationType::CreateInterpolableColor(to_color); Color result_color;
diff --git a/third_party/blink/renderer/core/animation/css_content_visibility_interpolation_type.cc b/third_party/blink/renderer/core/animation/css_content_visibility_interpolation_type.cc index 0df0993..5839814 100644 --- a/third_party/blink/renderer/core/animation/css_content_visibility_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/css_content_visibility_interpolation_type.cc
@@ -111,7 +111,7 @@ InterpolationValue CSSContentVisibilityInterpolationType::CreateContentVisibilityValue( EContentVisibility content_visibility) const { - return InterpolationValue(std::make_unique<InterpolableNumber>(0), + return InterpolationValue(MakeGarbageCollected<InterpolableNumber>(0), CSSContentVisibilityNonInterpolableValue::Create( content_visibility, content_visibility)); } @@ -191,8 +191,8 @@ To<CSSContentVisibilityNonInterpolableValue>(*end.non_interpolable_value) .ContentVisibility(); return PairwiseInterpolationValue( - std::make_unique<InterpolableNumber>(0), - std::make_unique<InterpolableNumber>(1), + MakeGarbageCollected<InterpolableNumber>(0), + MakeGarbageCollected<InterpolableNumber>(1), CSSContentVisibilityNonInterpolableValue::Create(start_content_visibility, end_content_visibility)); }
diff --git a/third_party/blink/renderer/core/animation/css_custom_length_interpolation_type.cc b/third_party/blink/renderer/core/animation/css_custom_length_interpolation_type.cc index f7d3dae..7d750520 100644 --- a/third_party/blink/renderer/core/animation/css_custom_length_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/css_custom_length_interpolation_type.cc
@@ -19,11 +19,11 @@ const CSSValue& value, const StyleResolverState*, ConversionCheckers&) const { - std::unique_ptr<InterpolableLength> maybe_length = + InterpolableLength* maybe_length = InterpolableLength::MaybeConvertCSSValue(value); if (!maybe_length || maybe_length->HasPercentage()) return nullptr; - return InterpolationValue(std::move(maybe_length)); + return InterpolationValue(maybe_length); } const CSSValue* CSSCustomLengthInterpolationType::CreateCSSValue(
diff --git a/third_party/blink/renderer/core/animation/css_custom_transform_function_interpolation_type.cc b/third_party/blink/renderer/core/animation/css_custom_transform_function_interpolation_type.cc index b232e30..d123001 100644 --- a/third_party/blink/renderer/core/animation/css_custom_transform_function_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/css_custom_transform_function_interpolation_type.cc
@@ -13,7 +13,7 @@ CSSCustomTransformFunctionInterpolationType::MaybeConvertNeutral( const InterpolationValue& underlying, ConversionCheckers&) const { - return InterpolationValue(std::make_unique<InterpolableTransformList>( + return InterpolationValue(MakeGarbageCollected<InterpolableTransformList>( EmptyTransformOperations(), TransformOperations::BoxSizeDependentMatrixBlending::kDisallow)); } @@ -28,7 +28,7 @@ return nullptr; } - std::unique_ptr<InterpolableTransformList> interpolable = + InterpolableTransformList* interpolable = InterpolableTransformList::ConvertCSSValue( value, CSSToLengthConversionData(), TransformOperations::BoxSizeDependentMatrixBlending::kDisallow);
diff --git a/third_party/blink/renderer/core/animation/css_custom_transform_interpolation_type.cc b/third_party/blink/renderer/core/animation/css_custom_transform_interpolation_type.cc index 80f1d38d..961bf5e 100644 --- a/third_party/blink/renderer/core/animation/css_custom_transform_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/css_custom_transform_interpolation_type.cc
@@ -12,7 +12,7 @@ InterpolationValue CSSCustomTransformInterpolationType::MaybeConvertNeutral( const InterpolationValue& underlying, ConversionCheckers&) const { - return InterpolationValue(std::make_unique<InterpolableTransformList>( + return InterpolationValue(MakeGarbageCollected<InterpolableTransformList>( EmptyTransformOperations(), TransformOperations::BoxSizeDependentMatrixBlending::kDisallow)); }
diff --git a/third_party/blink/renderer/core/animation/css_default_interpolation_type.cc b/third_party/blink/renderer/core/animation/css_default_interpolation_type.cc index 788f293..59fdf26 100644 --- a/third_party/blink/renderer/core/animation/css_default_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/css_default_interpolation_type.cc
@@ -35,7 +35,7 @@ if (!css_value) return nullptr; - return InterpolationValue(std::make_unique<InterpolableList>(0), + return InterpolationValue(MakeGarbageCollected<InterpolableList>(0), CSSDefaultNonInterpolableValue::Create(css_value)); }
diff --git a/third_party/blink/renderer/core/animation/css_display_interpolation_type.cc b/third_party/blink/renderer/core/animation/css_display_interpolation_type.cc index 29152dc..dbe7b60 100644 --- a/third_party/blink/renderer/core/animation/css_display_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/css_display_interpolation_type.cc
@@ -100,7 +100,7 @@ InterpolationValue CSSDisplayInterpolationType::CreateDisplayValue( EDisplay display) const { return InterpolationValue( - std::make_unique<InterpolableNumber>(0), + MakeGarbageCollected<InterpolableNumber>(0), CSSDisplayNonInterpolableValue::Create(display, display)); } @@ -182,8 +182,8 @@ EDisplay end_display = To<CSSDisplayNonInterpolableValue>(*end.non_interpolable_value).Display(); return PairwiseInterpolationValue( - std::make_unique<InterpolableNumber>(0), - std::make_unique<InterpolableNumber>(1), + MakeGarbageCollected<InterpolableNumber>(0), + MakeGarbageCollected<InterpolableNumber>(1), CSSDisplayNonInterpolableValue::Create(start_display, end_display)); }
diff --git a/third_party/blink/renderer/core/animation/css_filter_list_interpolation_type.cc b/third_party/blink/renderer/core/animation/css_filter_list_interpolation_type.cc index 3f1c010..abfbe00 100644 --- a/third_party/blink/renderer/core/animation/css_filter_list_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/css_filter_list_interpolation_type.cc
@@ -66,13 +66,15 @@ const InterpolationValue& underlying) const final { const auto& underlying_list = To<InterpolableList>(*underlying.interpolable_value); - if (underlying_list.length() != types_.size()) + if (underlying_list.length() != types_.size()) { return false; + } for (wtf_size_t i = 0; i < types_.size(); i++) { FilterOperation::OperationType other_type = To<InterpolableFilter>(underlying_list.Get(i))->GetType(); - if (types_[i] != other_type) + if (types_[i] != other_type) { return false; + } } return true; } @@ -105,16 +107,16 @@ InterpolationValue ConvertFilterList(const FilterOperations& filter_operations, double zoom) { wtf_size_t length = filter_operations.size(); - auto interpolable_list = std::make_unique<InterpolableList>(length); + auto* interpolable_list = MakeGarbageCollected<InterpolableList>(length); for (wtf_size_t i = 0; i < length; i++) { - std::unique_ptr<InterpolableFilter> result = - InterpolableFilter::MaybeCreate(*filter_operations.Operations()[i], - zoom); - if (!result) + InterpolableFilter* result = InterpolableFilter::MaybeCreate( + *filter_operations.Operations()[i], zoom); + if (!result) { return nullptr; - interpolable_list->Set(i, std::move(result)); + } + interpolable_list->Set(i, result); } - return InterpolationValue(std::move(interpolable_list)); + return InterpolationValue(interpolable_list); } class AlwaysInvalidateChecker @@ -131,13 +133,13 @@ const InterpolationValue& underlying, ConversionCheckers& conversion_checkers) const { const auto* interpolable_list = - To<InterpolableList>(underlying.interpolable_value.get()); + To<InterpolableList>(underlying.interpolable_value.Get()); conversion_checkers.push_back( std::make_unique<UnderlyingFilterListChecker>(interpolable_list)); // The neutral value for composition for a filter list is the empty list, as // the additive operator is concatenation, so concat(underlying, []) == // underlying. - return InterpolationValue(std::make_unique<InterpolableList>(0)); + return InterpolationValue(MakeGarbageCollected<InterpolableList>(0)); } InterpolationValue CSSFilterListInterpolationType::MaybeConvertInitial( @@ -165,23 +167,26 @@ const StyleResolverState*, ConversionCheckers&) const { auto* identifier_value = DynamicTo<CSSIdentifierValue>(value); - if (identifier_value && identifier_value->GetValueID() == CSSValueID::kNone) - return InterpolationValue(std::make_unique<InterpolableList>(0)); + if (identifier_value && identifier_value->GetValueID() == CSSValueID::kNone) { + return InterpolationValue(MakeGarbageCollected<InterpolableList>(0)); + } - if (!value.IsBaseValueList()) + if (!value.IsBaseValueList()) { return nullptr; + } const auto& list = To<CSSValueList>(value); wtf_size_t length = list.length(); - auto interpolable_list = std::make_unique<InterpolableList>(length); + auto* interpolable_list = MakeGarbageCollected<InterpolableList>(length); for (wtf_size_t i = 0; i < length; i++) { - std::unique_ptr<InterpolableFilter> result = + InterpolableFilter* result = InterpolableFilter::MaybeConvertCSSValue(list.Item(i)); - if (!result) + if (!result) { return nullptr; - interpolable_list->Set(i, std::move(result)); + } + interpolable_list->Set(i, result); } - return InterpolationValue(std::move(interpolable_list)); + return InterpolationValue(interpolable_list); } InterpolationValue @@ -202,8 +207,9 @@ for (wtf_size_t i = 0; i < start_length && i < end_length; i++) { if (To<InterpolableFilter>(start_interpolable_list.Get(i))->GetType() != - To<InterpolableFilter>(end_interpolable_list.Get(i))->GetType()) + To<InterpolableFilter>(end_interpolable_list.Get(i))->GetType()) { return nullptr; + } } if (start_length == end_length) { @@ -222,17 +228,18 @@ const InterpolableList& longer_interpolable_list = start_length < end_length ? end_interpolable_list : start_interpolable_list; - auto extended_interpolable_list = - std::make_unique<InterpolableList>(longer_length); + auto* extended_interpolable_list = + MakeGarbageCollected<InterpolableList>(longer_length); for (wtf_size_t i = 0; i < longer_length; i++) { - if (i < shorter_length) + if (i < shorter_length) { extended_interpolable_list->Set( i, std::move(shorter_interpolable_list.GetMutable(i))); - else + } else { extended_interpolable_list->Set( i, InterpolableFilter::CreateInitialValue( To<InterpolableFilter>(longer_interpolable_list.Get(i)) ->GetType())); + } } shorter.interpolable_value = std::move(extended_interpolable_list); @@ -287,34 +294,34 @@ // The non_interpolable_value can be non-null, for example, it contains a // single frame url(). - if (underlying.non_interpolable_value) + if (underlying.non_interpolable_value) { return nullptr; + } // The underlying value can be nullptr, most commonly if it contains a url(). // TODO(crbug.com/1009229): Properly handle url() in filter composite. - if (!underlying.interpolable_value) + if (!underlying.interpolable_value) { return nullptr; + } - auto interpolable_list = std::unique_ptr<InterpolableList>( - To<InterpolableList>(value.interpolable_value.release())); + auto* interpolable_list = + To<InterpolableList>(value.interpolable_value.Release()); const auto& underlying_list = To<InterpolableList>(*underlying.interpolable_value); if (composite == EffectModel::CompositeOperation::kCompositeAdd) { - return PerformAdditiveComposition(std::move(interpolable_list), - underlying_list); + return PerformAdditiveComposition(interpolable_list, underlying_list); } DCHECK_EQ(composite, EffectModel::CompositeOperation::kCompositeAccumulate); - return PerformAccumulativeComposition(std::move(interpolable_list), - underlying_list); + return PerformAccumulativeComposition(interpolable_list, underlying_list); } InterpolationValue CSSFilterListInterpolationType::PerformAdditiveComposition( - std::unique_ptr<InterpolableList> interpolable_list, + InterpolableList* interpolable_list, const InterpolableList& underlying_list) const { // Per the spec, addition of filter lists is defined as concatenation. // https://drafts.fxtf.org/filter-effects-1/#addition - auto composited_list = std::make_unique<InterpolableList>( + auto* composited_list = MakeGarbageCollected<InterpolableList>( underlying_list.length() + interpolable_list->length()); for (wtf_size_t i = 0; i < composited_list->length(); i++) { if (i < underlying_list.length()) { @@ -324,12 +331,12 @@ i, interpolable_list->Get(i - underlying_list.length())->Clone()); } } - return InterpolationValue(std::move(composited_list)); + return InterpolationValue(composited_list); } InterpolationValue CSSFilterListInterpolationType::PerformAccumulativeComposition( - std::unique_ptr<InterpolableList> interpolable_list, + InterpolableList* interpolable_list, const InterpolableList& underlying_list) const { // Per the spec, accumulation of filter lists operates on pairwise addition of // the underlying components. @@ -340,25 +347,27 @@ // If any of the types don't match, fallback to replace behavior. for (wtf_size_t i = 0; i < underlying_length && i < length; i++) { if (To<InterpolableFilter>(underlying_list.Get(i))->GetType() != - To<InterpolableFilter>(interpolable_list->Get(i))->GetType()) - return InterpolationValue(std::move(interpolable_list)); + To<InterpolableFilter>(interpolable_list->Get(i))->GetType()) { + return InterpolationValue(interpolable_list); + } } // Otherwise, arithmetically combine the matching prefix of the lists then // concatenate the remainder of the longer one. wtf_size_t max_length = std::max(length, underlying_length); - auto composited_list = std::make_unique<InterpolableList>(max_length); + auto* composited_list = MakeGarbageCollected<InterpolableList>(max_length); for (wtf_size_t i = 0; i < max_length; i++) { if (i < underlying_length) { composited_list->Set(i, underlying_list.Get(i)->Clone()); - if (i < length) + if (i < length) { composited_list->GetMutable(i)->Add(*interpolable_list->Get(i)); + } } else { composited_list->Set(i, interpolable_list->Get(i)->Clone()); } } - return InterpolationValue(std::move(composited_list)); + return InterpolationValue(composited_list); } } // namespace blink
diff --git a/third_party/blink/renderer/core/animation/css_filter_list_interpolation_type.h b/third_party/blink/renderer/core/animation/css_filter_list_interpolation_type.h index ffc2eb2f..c0b61c4 100644 --- a/third_party/blink/renderer/core/animation/css_filter_list_interpolation_type.h +++ b/third_party/blink/renderer/core/animation/css_filter_list_interpolation_type.h
@@ -47,10 +47,10 @@ // defined in https://drafts.fxtf.org/filter-effects-1/#addition and // https://drafts.fxtf.org/filter-effects-1/#accumulation InterpolationValue PerformAdditiveComposition( - std::unique_ptr<InterpolableList> interpolable_list, + InterpolableList* interpolable_list, const InterpolableList& underlying_list) const; InterpolationValue PerformAccumulativeComposition( - std::unique_ptr<InterpolableList> interpolable_list, + InterpolableList* interpolable_list, const InterpolableList& underlying_list) const; };
diff --git a/third_party/blink/renderer/core/animation/css_font_palette_interpolation_type_test.cc b/third_party/blink/renderer/core/animation/css_font_palette_interpolation_type_test.cc index 5174066..289184a 100644 --- a/third_party/blink/renderer/core/animation/css_font_palette_interpolation_type_test.cc +++ b/third_party/blink/renderer/core/animation/css_font_palette_interpolation_type_test.cc
@@ -61,7 +61,7 @@ *element->GetComputedStyle()); const InterpolableFontPalette* interpolable_font_palette = - To<InterpolableFontPalette>(result.interpolable_value.get()); + To<InterpolableFontPalette>(result.interpolable_value.Get()); scoped_refptr<FontPalette> font_palette = interpolable_font_palette->GetFontPalette(); @@ -80,7 +80,7 @@ conversion_checkers); const InterpolableFontPalette* interpolable_font_palette = - To<InterpolableFontPalette>(result.interpolable_value.get()); + To<InterpolableFontPalette>(result.interpolable_value.Get()); scoped_refptr<FontPalette> font_palette = interpolable_font_palette->GetFontPalette();
diff --git a/third_party/blink/renderer/core/animation/css_font_size_adjust_interpolation_type.cc b/third_party/blink/renderer/core/animation/css_font_size_adjust_interpolation_type.cc index be9bae45..a47e1ca 100644 --- a/third_party/blink/renderer/core/animation/css_font_size_adjust_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/css_font_size_adjust_interpolation_type.cc
@@ -63,7 +63,7 @@ } return InterpolationValue( - std::make_unique<InterpolableNumber>(font_size_adjust.Value()), + MakeGarbageCollected<InterpolableNumber>(font_size_adjust.Value()), CSSFontSizeAdjustNonInterpolableValue::Create( font_size_adjust.GetMetric())); }
diff --git a/third_party/blink/renderer/core/animation/css_font_size_interpolation_type.cc b/third_party/blink/renderer/core/animation/css_font_size_interpolation_type.cc index 1dfd1c1..526915c8 100644 --- a/third_party/blink/renderer/core/animation/css_font_size_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/css_font_size_interpolation_type.cc
@@ -112,10 +112,9 @@ ConversionCheckers& conversion_checkers) const { DCHECK(state); - std::unique_ptr<InterpolableValue> result = - InterpolableLength::MaybeConvertCSSValue(value); + InterpolableValue* result = InterpolableLength::MaybeConvertCSSValue(value); if (result) - return InterpolationValue(std::move(result)); + return InterpolationValue(result); if (auto* identifier_value = DynamicTo<CSSIdentifierValue>(value)) { return MaybeConvertKeyword(identifier_value->GetValueID(), *state,
diff --git a/third_party/blink/renderer/core/animation/css_font_stretch_interpolation_type.cc b/third_party/blink/renderer/core/animation/css_font_stretch_interpolation_type.cc index ddb004cef..d25f2dce 100644 --- a/third_party/blink/renderer/core/animation/css_font_stretch_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/css_font_stretch_interpolation_type.cc
@@ -31,13 +31,14 @@ InterpolationValue CSSFontStretchInterpolationType::CreateFontStretchValue( FontSelectionValue font_stretch) const { - return InterpolationValue(std::make_unique<InterpolableNumber>(font_stretch)); + return InterpolationValue( + MakeGarbageCollected<InterpolableNumber>(font_stretch)); } InterpolationValue CSSFontStretchInterpolationType::MaybeConvertNeutral( const InterpolationValue&, ConversionCheckers&) const { - return InterpolationValue(std::make_unique<InterpolableNumber>(0)); + return InterpolationValue(MakeGarbageCollected<InterpolableNumber>(0)); } InterpolationValue CSSFontStretchInterpolationType::MaybeConvertInitial(
diff --git a/third_party/blink/renderer/core/animation/css_font_style_interpolation_type.cc b/third_party/blink/renderer/core/animation/css_font_style_interpolation_type.cc index ccd6d02..417731f 100644 --- a/third_party/blink/renderer/core/animation/css_font_style_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/css_font_style_interpolation_type.cc
@@ -31,13 +31,14 @@ InterpolationValue CSSFontStyleInterpolationType::CreateFontStyleValue( FontSelectionValue font_style) const { - return InterpolationValue(std::make_unique<InterpolableNumber>(font_style)); + return InterpolationValue( + MakeGarbageCollected<InterpolableNumber>(font_style)); } InterpolationValue CSSFontStyleInterpolationType::MaybeConvertNeutral( const InterpolationValue&, ConversionCheckers&) const { - return InterpolationValue(std::make_unique<InterpolableNumber>(0)); + return InterpolationValue(MakeGarbageCollected<InterpolableNumber>(0)); } InterpolationValue CSSFontStyleInterpolationType::MaybeConvertInitial(
diff --git a/third_party/blink/renderer/core/animation/css_font_variation_settings_interpolation_type.cc b/third_party/blink/renderer/core/animation/css_font_variation_settings_interpolation_type.cc index 778514c4..1ca0a1f6 100644 --- a/third_party/blink/renderer/core/animation/css_font_variation_settings_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/css_font_variation_settings_interpolation_type.cc
@@ -106,15 +106,15 @@ return nullptr; } wtf_size_t length = settings->size(); - auto numbers = std::make_unique<InterpolableList>(length); + auto* numbers = MakeGarbageCollected<InterpolableList>(length); Vector<uint32_t> tags; for (wtf_size_t i = 0; i < length; ++i) { - numbers->Set(i, - std::make_unique<InterpolableNumber>(settings->at(i).Value())); + numbers->Set( + i, MakeGarbageCollected<InterpolableNumber>(settings->at(i).Value())); tags.push_back(settings->at(i).Tag()); } return InterpolationValue( - std::move(numbers), + numbers, CSSFontVariationSettingsNonInterpolableValue::Create(std::move(tags))); }
diff --git a/third_party/blink/renderer/core/animation/css_font_weight_interpolation_type.cc b/third_party/blink/renderer/core/animation/css_font_weight_interpolation_type.cc index c900bfa..41d4833 100644 --- a/third_party/blink/renderer/core/animation/css_font_weight_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/css_font_weight_interpolation_type.cc
@@ -31,13 +31,14 @@ InterpolationValue CSSFontWeightInterpolationType::CreateFontWeightValue( FontSelectionValue font_weight) const { - return InterpolationValue(std::make_unique<InterpolableNumber>(font_weight)); + return InterpolationValue( + MakeGarbageCollected<InterpolableNumber>(font_weight)); } InterpolationValue CSSFontWeightInterpolationType::MaybeConvertNeutral( const InterpolationValue&, ConversionCheckers&) const { - return InterpolationValue(std::make_unique<InterpolableNumber>(0)); + return InterpolationValue(MakeGarbageCollected<InterpolableNumber>(0)); } InterpolationValue CSSFontWeightInterpolationType::MaybeConvertInitial(
diff --git a/third_party/blink/renderer/core/animation/css_grid_template_property_interpolation_type.cc b/third_party/blink/renderer/core/animation/css_grid_template_property_interpolation_type.cc index ccea8c9..732d0b4 100644 --- a/third_party/blink/renderer/core/animation/css_grid_template_property_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/css_grid_template_property_interpolation_type.cc
@@ -103,22 +103,23 @@ : public CSSInterpolationType::CSSConversionChecker { public: explicit UnderlyingGridTrackListChecker(const InterpolationValue& underlying) - : underlying_(underlying.Clone()) {} + : underlying_(MakeGarbageCollected<InterpolationValueGCed>(underlying)) {} ~UnderlyingGridTrackListChecker() final = default; private: bool IsValid(const StyleResolverState&, const InterpolationValue& underlying) const final { - return To<InterpolableGridTrackList>(*underlying_.interpolable_value) + return To<InterpolableGridTrackList>( + *underlying_->underlying().interpolable_value) .Equals(To<InterpolableGridTrackList>( *underlying.interpolable_value)) && To<CSSGridTrackListNonInterpolableValue>( - *underlying_.non_interpolable_value) + *underlying_->underlying().non_interpolable_value) .Equals(To<CSSGridTrackListNonInterpolableValue>( *underlying.non_interpolable_value)); } - const InterpolationValue underlying_; + const Persistent<const InterpolationValueGCed> underlying_; }; class InheritedGridTrackListChecker @@ -160,7 +161,7 @@ }; // static -std::unique_ptr<InterpolableValue> +InterpolableValue* CSSGridTemplatePropertyInterpolationType::CreateInterpolableGridTrackList( const NGGridTrackList& track_list, float zoom) {
diff --git a/third_party/blink/renderer/core/animation/css_grid_template_property_interpolation_type.h b/third_party/blink/renderer/core/animation/css_grid_template_property_interpolation_type.h index 7a0a39a..b6063e3c 100644 --- a/third_party/blink/renderer/core/animation/css_grid_template_property_interpolation_type.h +++ b/third_party/blink/renderer/core/animation/css_grid_template_property_interpolation_type.h
@@ -31,7 +31,7 @@ const InterpolationValue& value, double interpolation_fraction) const final; - static std::unique_ptr<InterpolableValue> CreateInterpolableGridTrackList( + static InterpolableValue* CreateInterpolableGridTrackList( const NGGridTrackList& track_list, float zoom);
diff --git a/third_party/blink/renderer/core/animation/css_image_interpolation_type.cc b/third_party/blink/renderer/core/animation/css_image_interpolation_type.cc index fc451e5..d39e6b8 100644 --- a/third_party/blink/renderer/core/animation/css_image_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/css_image_interpolation_type.cc
@@ -111,7 +111,7 @@ bool accept_gradients) { if (value.IsImageValue() || (value.IsGradientValue() && accept_gradients)) { CSSValue* refable_css_value = const_cast<CSSValue*>(&value); - return InterpolationValue(std::make_unique<InterpolableNumber>(1), + return InterpolationValue(MakeGarbageCollected<InterpolableNumber>(1), CSSImageNonInterpolableValue::Create( refable_css_value, refable_css_value)); } @@ -129,8 +129,8 @@ return nullptr; } return PairwiseInterpolationValue( - std::make_unique<InterpolableNumber>(0), - std::make_unique<InterpolableNumber>(1), + MakeGarbageCollected<InterpolableNumber>(0), + MakeGarbageCollected<InterpolableNumber>(1), CSSImageNonInterpolableValue::Merge(start.non_interpolable_value, end.non_interpolable_value)); } @@ -170,24 +170,26 @@ : public CSSInterpolationType::CSSConversionChecker { public: UnderlyingImageChecker(const InterpolationValue& underlying) - : underlying_(underlying.Clone()) {} + : underlying_(MakeGarbageCollected<InterpolationValueGCed>(underlying)) {} ~UnderlyingImageChecker() final = default; private: bool IsValid(const StyleResolverState&, const InterpolationValue& underlying) const final { - if (!underlying && !underlying_) + if (!underlying && !underlying_) { return true; - if (!underlying || !underlying_) + } + if (!underlying || !underlying_) { return false; - return underlying_.interpolable_value->Equals( + } + return underlying_->underlying().interpolable_value->Equals( *underlying.interpolable_value) && CSSImageInterpolationType::EqualNonInterpolableValues( - underlying_.non_interpolable_value.get(), + underlying_->underlying().non_interpolable_value.get(), underlying.non_interpolable_value.get()); } - const InterpolationValue underlying_; + const Persistent<InterpolationValueGCed> underlying_; }; InterpolationValue CSSImageInterpolationType::MaybeConvertNeutral(
diff --git a/third_party/blink/renderer/core/animation/css_image_list_interpolation_type.cc b/third_party/blink/renderer/core/animation/css_image_list_interpolation_type.cc index eb874b6..c051d1b 100644 --- a/third_party/blink/renderer/core/animation/css_image_list_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/css_image_list_interpolation_type.cc
@@ -22,18 +22,18 @@ : public CSSInterpolationType::CSSConversionChecker { public: explicit UnderlyingImageListChecker(const InterpolationValue& underlying) - : underlying_(underlying.Clone()) {} + : underlying_(MakeGarbageCollected<InterpolationValueGCed>(underlying)) {} ~UnderlyingImageListChecker() final = default; private: bool IsValid(const StyleResolverState&, const InterpolationValue& underlying) const final { return ListInterpolationFunctions::EqualValues( - underlying_, underlying, + underlying_->underlying(), underlying, CSSImageInterpolationType::EqualNonInterpolableValues); } - const InterpolationValue underlying_; + const Persistent<InterpolationValueGCed> underlying_; }; InterpolationValue CSSImageListInterpolationType::MaybeConvertNeutral( @@ -118,7 +118,7 @@ const auto& value_list = temp_list ? *temp_list : To<CSSValueList>(value); const wtf_size_t length = value_list.length(); - auto interpolable_list = std::make_unique<InterpolableList>(length); + auto* interpolable_list = MakeGarbageCollected<InterpolableList>(length); Vector<scoped_refptr<const NonInterpolableValue>> non_interpolable_values( length); for (wtf_size_t i = 0; i < length; i++) {
diff --git a/third_party/blink/renderer/core/animation/css_image_slice_interpolation_type.cc b/third_party/blink/renderer/core/animation/css_image_slice_interpolation_type.cc index e11c12a..1eb9e45 100644 --- a/third_party/blink/renderer/core/animation/css_image_slice_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/css_image_slice_interpolation_type.cc
@@ -139,7 +139,7 @@ }; InterpolationValue ConvertImageSlice(const ImageSlice& slice, double zoom) { - auto list = std::make_unique<InterpolableList>(kSideIndexCount); + auto* list = MakeGarbageCollected<InterpolableList>(kSideIndexCount); const Length* sides[kSideIndexCount] = {}; sides[kSideTop] = &slice.slices.Top(); sides[kSideRight] = &slice.slices.Right(); @@ -148,7 +148,7 @@ for (wtf_size_t i = 0; i < kSideIndexCount; i++) { const Length& side = *sides[i]; - list->Set(i, std::make_unique<InterpolableNumber>( + list->Set(i, MakeGarbageCollected<InterpolableNumber>( side.IsFixed() ? side.Pixels() / zoom : side.Percent())); } @@ -208,7 +208,7 @@ const cssvalue::CSSBorderImageSliceValue& slice = To<cssvalue::CSSBorderImageSliceValue>(value); - auto list = std::make_unique<InterpolableList>(kSideIndexCount); + auto* list = MakeGarbageCollected<InterpolableList>(kSideIndexCount); const CSSValue* sides[kSideIndexCount]; sides[kSideTop] = slice.Slices().Top(); sides[kSideRight] = slice.Slices().Right(); @@ -218,12 +218,12 @@ for (wtf_size_t i = 0; i < kSideIndexCount; i++) { const auto& side = *To<CSSPrimitiveValue>(sides[i]); DCHECK(side.IsNumber() || side.IsPercentage()); - list->Set(i, std::make_unique<InterpolableNumber>(side.GetDoubleValue())); + list->Set(i, + MakeGarbageCollected<InterpolableNumber>(side.GetDoubleValue())); } return InterpolationValue( - std::move(list), - CSSImageSliceNonInterpolableValue::Create(SliceTypes(slice))); + list, CSSImageSliceNonInterpolableValue::Create(SliceTypes(slice))); } InterpolationValue
diff --git a/third_party/blink/renderer/core/animation/css_intrinsic_length_interpolation_type.cc b/third_party/blink/renderer/core/animation/css_intrinsic_length_interpolation_type.cc index a0b57f3..e68f371 100644 --- a/third_party/blink/renderer/core/animation/css_intrinsic_length_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/css_intrinsic_length_interpolation_type.cc
@@ -94,7 +94,7 @@ const StyleIntrinsicLength intrinsic_dimension_; }; -std::unique_ptr<InterpolableValue> +InterpolableValue* CSSIntrinsicLengthInterpolationType::CreateInterpolableIntrinsicDimension( const StyleIntrinsicLength& intrinsic_dimension) { const auto& length = intrinsic_dimension.GetLength();
diff --git a/third_party/blink/renderer/core/animation/css_intrinsic_length_interpolation_type.h b/third_party/blink/renderer/core/animation/css_intrinsic_length_interpolation_type.h index 38d7c32..12b98b1 100644 --- a/third_party/blink/renderer/core/animation/css_intrinsic_length_interpolation_type.h +++ b/third_party/blink/renderer/core/animation/css_intrinsic_length_interpolation_type.h
@@ -36,8 +36,8 @@ const InterpolationValue&, double interpolation_fraction) const final; - static std::unique_ptr<InterpolableValue> - CreateInterpolableIntrinsicDimension(const StyleIntrinsicLength&); + static InterpolableValue* CreateInterpolableIntrinsicDimension( + const StyleIntrinsicLength&); private: StyleIntrinsicLength GetIntrinsicDimension(const ComputedStyle&) const;
diff --git a/third_party/blink/renderer/core/animation/css_number_interpolation_type.cc b/third_party/blink/renderer/core/animation/css_number_interpolation_type.cc index 3935d8b1..a0305f6b 100644 --- a/third_party/blink/renderer/core/animation/css_number_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/css_number_interpolation_type.cc
@@ -46,7 +46,7 @@ InterpolationValue CSSNumberInterpolationType::CreateNumberValue( double number) const { - return InterpolationValue(std::make_unique<InterpolableNumber>(number)); + return InterpolationValue(MakeGarbageCollected<InterpolableNumber>(number)); } InterpolationValue CSSNumberInterpolationType::MaybeConvertNeutral(
diff --git a/third_party/blink/renderer/core/animation/css_offset_rotate_interpolation_type.cc b/third_party/blink/renderer/core/animation/css_offset_rotate_interpolation_type.cc index bc94debbf..2c9ea757 100644 --- a/third_party/blink/renderer/core/animation/css_offset_rotate_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/css_offset_rotate_interpolation_type.cc
@@ -87,7 +87,7 @@ InterpolationValue ConvertOffsetRotate(const StyleOffsetRotation& rotation) { return InterpolationValue( - std::make_unique<InterpolableNumber>(rotation.angle), + MakeGarbageCollected<InterpolableNumber>(rotation.angle), CSSOffsetRotationNonInterpolableValue::Create(rotation.type)); }
diff --git a/third_party/blink/renderer/core/animation/css_overlay_interpolation_type.cc b/third_party/blink/renderer/core/animation/css_overlay_interpolation_type.cc index 444a723..f4c47ce 100644 --- a/third_party/blink/renderer/core/animation/css_overlay_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/css_overlay_interpolation_type.cc
@@ -100,7 +100,7 @@ InterpolationValue CSSOverlayInterpolationType::CreateOverlayValue( EOverlay overlay) const { return InterpolationValue( - std::make_unique<InterpolableNumber>(0), + MakeGarbageCollected<InterpolableNumber>(0), CSSOverlayNonInterpolableValue::Create(overlay, overlay)); } @@ -171,8 +171,8 @@ EOverlay end_overlay = To<CSSOverlayNonInterpolableValue>(*end.non_interpolable_value).Overlay(); return PairwiseInterpolationValue( - std::make_unique<InterpolableNumber>(0), - std::make_unique<InterpolableNumber>(1), + MakeGarbageCollected<InterpolableNumber>(0), + MakeGarbageCollected<InterpolableNumber>(1), CSSOverlayNonInterpolableValue::Create(start_overlay, end_overlay)); }
diff --git a/third_party/blink/renderer/core/animation/css_paint_interpolation_type.cc b/third_party/blink/renderer/core/animation/css_paint_interpolation_type.cc index 5d1eb6d3b..8e0da92 100644 --- a/third_party/blink/renderer/core/animation/css_paint_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/css_paint_interpolation_type.cc
@@ -120,11 +120,11 @@ const CSSValue& value, const StyleResolverState*, ConversionCheckers&) const { - std::unique_ptr<InterpolableValue> interpolable_color = + InterpolableValue* interpolable_color = CSSColorInterpolationType::MaybeCreateInterpolableColor(value); if (!interpolable_color) return nullptr; - return InterpolationValue(std::move(interpolable_color)); + return InterpolationValue(interpolable_color); } InterpolationValue
diff --git a/third_party/blink/renderer/core/animation/css_percentage_interpolation_type.cc b/third_party/blink/renderer/core/animation/css_percentage_interpolation_type.cc index 048d2ea..ecf0552 100644 --- a/third_party/blink/renderer/core/animation/css_percentage_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/css_percentage_interpolation_type.cc
@@ -11,7 +11,7 @@ InterpolationValue CSSPercentageInterpolationType::MaybeConvertNeutral( const InterpolationValue&, ConversionCheckers&) const { - return InterpolationValue(std::make_unique<InterpolableNumber>(0)); + return InterpolationValue(MakeGarbageCollected<InterpolableNumber>(0)); } InterpolationValue CSSPercentageInterpolationType::MaybeConvertValue( @@ -19,10 +19,11 @@ const StyleResolverState*, ConversionCheckers&) const { auto* primitive_value = DynamicTo<CSSPrimitiveValue>(value); - if (!primitive_value || !primitive_value->IsPercentage()) + if (!primitive_value || !primitive_value->IsPercentage()) { return nullptr; - return InterpolationValue( - std::make_unique<InterpolableNumber>(primitive_value->GetDoubleValue())); + } + return InterpolationValue(MakeGarbageCollected<InterpolableNumber>( + primitive_value->GetDoubleValue())); } const CSSValue* CSSPercentageInterpolationType::CreateCSSValue(
diff --git a/third_party/blink/renderer/core/animation/css_ray_interpolation_type.cc b/third_party/blink/renderer/core/animation/css_ray_interpolation_type.cc index 4b1e937..95f5461 100644 --- a/third_party/blink/renderer/core/animation/css_ray_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/css_ray_interpolation_type.cc
@@ -131,14 +131,14 @@ CoordBox coord_box_; }; -std::unique_ptr<InterpolableValue> ConvertCoordinate( +InterpolableValue* ConvertCoordinate( const BasicShapeCenterCoordinate& coordinate, double zoom) { return InterpolableLength::MaybeConvertLength(coordinate.ComputedLength(), zoom); } -std::unique_ptr<InterpolableValue> CreateNeutralInterpolableCoordinate() { +InterpolableValue* CreateNeutralInterpolableCoordinate() { return InterpolableLength::CreateNeutral(); } @@ -162,25 +162,25 @@ InterpolationValue CreateValue(const StyleRay& ray, CoordBox coord_box, double zoom) { - auto list = std::make_unique<InterpolableList>(kRayComponentIndexCount); - list->Set(kRayAngleIndex, std::make_unique<InterpolableNumber>(ray.Angle())); + auto* list = MakeGarbageCollected<InterpolableList>(kRayComponentIndexCount); + list->Set(kRayAngleIndex, + MakeGarbageCollected<InterpolableNumber>(ray.Angle())); list->Set(kRayCenterXIndex, ConvertCoordinate(ray.CenterX(), zoom)); list->Set(kRayCenterYIndex, ConvertCoordinate(ray.CenterY(), zoom)); list->Set(kRayHasExplicitCenterIndex, - std::make_unique<InterpolableNumber>(ray.HasExplicitCenter())); - return InterpolationValue(std::move(list), CSSRayNonInterpolableValue::Create( - RayMode(ray, coord_box))); + MakeGarbageCollected<InterpolableNumber>(ray.HasExplicitCenter())); + return InterpolationValue( + list, CSSRayNonInterpolableValue::Create(RayMode(ray, coord_box))); } InterpolationValue CreateNeutralValue(const RayMode& mode) { - auto list = std::make_unique<InterpolableList>(kRayComponentIndexCount); - list->Set(kRayAngleIndex, std::make_unique<InterpolableNumber>(0)); + auto* list = MakeGarbageCollected<InterpolableList>(kRayComponentIndexCount); + list->Set(kRayAngleIndex, MakeGarbageCollected<InterpolableNumber>(0)); list->Set(kRayCenterXIndex, CreateNeutralInterpolableCoordinate()); list->Set(kRayCenterYIndex, CreateNeutralInterpolableCoordinate()); list->Set(kRayHasExplicitCenterIndex, - std::make_unique<InterpolableNumber>(0)); - return InterpolationValue(std::move(list), - CSSRayNonInterpolableValue::Create(mode)); + MakeGarbageCollected<InterpolableNumber>(0)); + return InterpolationValue(list, CSSRayNonInterpolableValue::Create(mode)); } } // namespace
diff --git a/third_party/blink/renderer/core/animation/css_resolution_interpolation_type.cc b/third_party/blink/renderer/core/animation/css_resolution_interpolation_type.cc index 7c32608..0d1d1389 100644 --- a/third_party/blink/renderer/core/animation/css_resolution_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/css_resolution_interpolation_type.cc
@@ -12,7 +12,7 @@ InterpolationValue CSSResolutionInterpolationType::MaybeConvertNeutral( const InterpolationValue&, ConversionCheckers&) const { - return InterpolationValue(std::make_unique<InterpolableNumber>(0)); + return InterpolationValue(MakeGarbageCollected<InterpolableNumber>(0)); } InterpolationValue CSSResolutionInterpolationType::MaybeConvertValue( @@ -22,7 +22,7 @@ auto* primitive_value = DynamicTo<CSSPrimitiveValue>(value); if (!primitive_value || !primitive_value->IsResolution()) return nullptr; - return InterpolationValue(std::make_unique<InterpolableNumber>( + return InterpolationValue(MakeGarbageCollected<InterpolableNumber>( primitive_value->ComputeDotsPerPixel())); }
diff --git a/third_party/blink/renderer/core/animation/css_rotate_interpolation_type.cc b/third_party/blink/renderer/core/animation/css_rotate_interpolation_type.cc index 9b53049..644e206df 100644 --- a/third_party/blink/renderer/core/animation/css_rotate_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/css_rotate_interpolation_type.cc
@@ -156,7 +156,7 @@ } InterpolationValue ConvertRotation(const OptionalRotation& rotation) { - return InterpolationValue(std::make_unique<InterpolableNumber>(0), + return InterpolationValue(MakeGarbageCollected<InterpolableNumber>(0), CSSRotateNonInterpolableValue::Create(rotation)); } @@ -231,8 +231,8 @@ InterpolationValue&& start, InterpolationValue&& end) const { return PairwiseInterpolationValue( - std::make_unique<InterpolableNumber>(0), - std::make_unique<InterpolableNumber>(1), + MakeGarbageCollected<InterpolableNumber>(0), + MakeGarbageCollected<InterpolableNumber>(1), CSSRotateNonInterpolableValue::Create( To<CSSRotateNonInterpolableValue>(*start.non_interpolable_value), To<CSSRotateNonInterpolableValue>(*end.non_interpolable_value)));
diff --git a/third_party/blink/renderer/core/animation/css_scale_interpolation_type.cc b/third_party/blink/renderer/core/animation/css_scale_interpolation_type.cc index 2239001..c9b1e1c 100644 --- a/third_party/blink/renderer/core/animation/css_scale_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/css_scale_interpolation_type.cc
@@ -58,11 +58,11 @@ bool is_none; }; -std::unique_ptr<InterpolableValue> CreateScaleIdentity() { - auto list = std::make_unique<InterpolableList>(3); +InterpolableValue* CreateScaleIdentity() { + auto* list = MakeGarbageCollected<InterpolableList>(3); for (wtf_size_t i = 0; i < 3; i++) - list->Set(i, std::make_unique<InterpolableNumber>(1)); - return std::move(list); + list->Set(i, MakeGarbageCollected<InterpolableNumber>(1)); + return list; } class InheritedScaleChecker @@ -142,15 +142,15 @@ InterpolationValue Scale::CreateInterpolationValue() const { if (is_none) { - return InterpolationValue(std::make_unique<InterpolableList>(0), + return InterpolationValue(MakeGarbageCollected<InterpolableList>(0), CSSScaleNonInterpolableValue::Create(*this)); } - auto list = std::make_unique<InterpolableList>(3); - for (wtf_size_t i = 0; i < 3; i++) - list->Set(i, std::make_unique<InterpolableNumber>(array[i])); - return InterpolationValue(std::move(list), - CSSScaleNonInterpolableValue::Create(*this)); + auto* list = MakeGarbageCollected<InterpolableList>(3); + for (wtf_size_t i = 0; i < 3; i++) { + list->Set(i, MakeGarbageCollected<InterpolableNumber>(array[i])); + } + return InterpolationValue(list, CSSScaleNonInterpolableValue::Create(*this)); } InterpolationValue CSSScaleInterpolationType::MaybeConvertNeutral(
diff --git a/third_party/blink/renderer/core/animation/css_scrollbar_color_interpolation_type.cc b/third_party/blink/renderer/core/animation/css_scrollbar_color_interpolation_type.cc index 48d91b6..97b8fab 100644 --- a/third_party/blink/renderer/core/animation/css_scrollbar_color_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/css_scrollbar_color_interpolation_type.cc
@@ -223,7 +223,7 @@ state.StyleBuilder().SetScrollbarColor(scrollbar_color); } -std::unique_ptr<InterpolableScrollbarColor> +InterpolableScrollbarColor* CSSScrollbarColorInterpolationType::CreateScrollbarColorValue( absl::optional<StyleScrollbarColor> scrollbar_color) const { if (!scrollbar_color.has_value()) {
diff --git a/third_party/blink/renderer/core/animation/css_scrollbar_color_interpolation_type.h b/third_party/blink/renderer/core/animation/css_scrollbar_color_interpolation_type.h index 1ed5ae77..60e328e 100644 --- a/third_party/blink/renderer/core/animation/css_scrollbar_color_interpolation_type.h +++ b/third_party/blink/renderer/core/animation/css_scrollbar_color_interpolation_type.h
@@ -37,7 +37,7 @@ StyleResolverState&) const final; private: - std::unique_ptr<InterpolableScrollbarColor> CreateScrollbarColorValue( + InterpolableScrollbarColor* CreateScrollbarColorValue( absl::optional<StyleScrollbarColor>) const; InterpolationValue MaybeConvertNeutral(const InterpolationValue& underlying, ConversionCheckers&) const final;
diff --git a/third_party/blink/renderer/core/animation/css_shadow_list_interpolation_type.cc b/third_party/blink/renderer/core/animation/css_shadow_list_interpolation_type.cc index 47ec7902..b1ddb85 100644 --- a/third_party/blink/renderer/core/animation/css_shadow_list_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/css_shadow_list_interpolation_type.cc
@@ -208,24 +208,24 @@ // TODO(crbug.com/1009230): Remove this once our interpolation code isn't // caching composited values. conversion_checkers.push_back(std::make_unique<AlwaysInvalidateChecker>()); - auto interpolable_list = std::unique_ptr<InterpolableList>( - To<InterpolableList>(value.interpolable_value.release())); + auto* interpolable_list = + To<InterpolableList>(value.interpolable_value.Release()); if (composite == EffectModel::CompositeOperation::kCompositeAdd) { - return PerformAdditiveComposition(std::move(interpolable_list), underlying); + return PerformAdditiveComposition(interpolable_list, underlying); } DCHECK_EQ(composite, EffectModel::CompositeOperation::kCompositeAccumulate); - return PerformAccumulativeComposition(std::move(interpolable_list), + return PerformAccumulativeComposition(interpolable_list, std::move(underlying)); } InterpolationValue CSSShadowListInterpolationType::PerformAdditiveComposition( - std::unique_ptr<InterpolableList> interpolable_list, + InterpolableList* interpolable_list, const InterpolationValue& underlying) const { // Per the spec, addition of shadow lists is defined as concatenation. // https://w3.org/TR/web-animations-1/#combining-shadow-lists const InterpolableList& underlying_list = To<InterpolableList>(*underlying.interpolable_value); - auto composited_list = std::make_unique<InterpolableList>( + auto* composited_list = MakeGarbageCollected<InterpolableList>( underlying_list.length() + interpolable_list->length()); for (wtf_size_t i = 0; i < composited_list->length(); i++) { if (i < underlying_list.length()) { @@ -235,13 +235,12 @@ i, interpolable_list->Get(i - underlying_list.length())->Clone()); } } - return InterpolationValue(std::move(composited_list), - underlying.non_interpolable_value); + return InterpolationValue(composited_list, underlying.non_interpolable_value); } InterpolationValue CSSShadowListInterpolationType::PerformAccumulativeComposition( - std::unique_ptr<InterpolableList> interpolable_list, + InterpolableList* interpolable_list, const InterpolationValue& underlying) const { // Per the spec, accumulation of shadow lists operates on pairwise addition of // the underlying components. @@ -255,14 +254,14 @@ for (wtf_size_t i = 0; i < underlying_length && i < length; i++) { if (To<InterpolableShadow>(underlying_list.Get(i))->GetShadowStyle() != To<InterpolableShadow>(interpolable_list->Get(i))->GetShadowStyle()) { - return InterpolationValue(std::move(interpolable_list)); + return InterpolationValue(interpolable_list); } } // Otherwise, arithmetically combine the matching prefix of the lists then // concatenate the remainder of the longer one. wtf_size_t max_length = std::max(length, underlying_length); - auto composited_list = std::make_unique<InterpolableList>(max_length); + auto* composited_list = MakeGarbageCollected<InterpolableList>(max_length); for (wtf_size_t i = 0; i < max_length; i++) { if (i < underlying_length) { composited_list->Set(i, underlying_list.Get(i)->Clone()); @@ -272,8 +271,7 @@ composited_list->Set(i, interpolable_list->Get(i)->Clone()); } } - return InterpolationValue(std::move(composited_list), - underlying.non_interpolable_value); + return InterpolationValue(composited_list, underlying.non_interpolable_value); } } // namespace blink
diff --git a/third_party/blink/renderer/core/animation/css_shadow_list_interpolation_type.h b/third_party/blink/renderer/core/animation/css_shadow_list_interpolation_type.h index 6e46898..988dbc23 100644 --- a/third_party/blink/renderer/core/animation/css_shadow_list_interpolation_type.h +++ b/third_party/blink/renderer/core/animation/css_shadow_list_interpolation_type.h
@@ -48,10 +48,10 @@ EffectModel::CompositeOperation, ConversionCheckers&) const final; InterpolationValue PerformAdditiveComposition( - std::unique_ptr<InterpolableList> interpolable_list, + InterpolableList* interpolable_list, const InterpolationValue& underlying) const; InterpolationValue PerformAccumulativeComposition( - std::unique_ptr<InterpolableList> interpolable_list, + InterpolableList* interpolable_list, const InterpolationValue& underlying) const; };
diff --git a/third_party/blink/renderer/core/animation/css_time_interpolation_type.cc b/third_party/blink/renderer/core/animation/css_time_interpolation_type.cc index dab5fc2..cc46ce0 100644 --- a/third_party/blink/renderer/core/animation/css_time_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/css_time_interpolation_type.cc
@@ -39,7 +39,7 @@ InterpolationValue CSSTimeInterpolationType::CreateTimeValue( double seconds) const { - return InterpolationValue(std::make_unique<InterpolableNumber>(seconds)); + return InterpolationValue(MakeGarbageCollected<InterpolableNumber>(seconds)); } // static
diff --git a/third_party/blink/renderer/core/animation/css_transform_interpolation_type.cc b/third_party/blink/renderer/core/animation/css_transform_interpolation_type.cc index c4e77f52b..26701c67 100644 --- a/third_party/blink/renderer/core/animation/css_transform_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/css_transform_interpolation_type.cc
@@ -22,7 +22,7 @@ namespace blink { namespace { InterpolationValue ConvertTransform(TransformOperations&& transform) { - return InterpolationValue(std::make_unique<InterpolableTransformList>( + return InterpolationValue(MakeGarbageCollected<InterpolableTransformList>( std::move(transform), TransformOperations::BoxSizeDependentMatrixBlending::kAllow)); }
diff --git a/third_party/blink/renderer/core/animation/css_translate_interpolation_type.cc b/third_party/blink/renderer/core/animation/css_translate_interpolation_type.cc index cad477e2..98e5f93 100644 --- a/third_party/blink/renderer/core/animation/css_translate_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/css_translate_interpolation_type.cc
@@ -19,7 +19,7 @@ namespace { InterpolationValue CreateNoneValue() { - return InterpolationValue(std::make_unique<InterpolableList>(0)); + return InterpolationValue(MakeGarbageCollected<InterpolableList>(0)); } bool IsNoneValue(const InterpolationValue& value) { @@ -57,13 +57,13 @@ kTranslateComponentIndexCount, }; -std::unique_ptr<InterpolableValue> CreateTranslateIdentity() { - auto result = - std::make_unique<InterpolableList>(kTranslateComponentIndexCount); +InterpolableValue* CreateTranslateIdentity() { + auto* result = + MakeGarbageCollected<InterpolableList>(kTranslateComponentIndexCount); result->Set(kTranslateX, InterpolableLength::CreateNeutral()); result->Set(kTranslateY, InterpolableLength::CreateNeutral()); result->Set(kTranslateZ, InterpolableLength::CreateNeutral()); - return std::move(result); + return result; } InterpolationValue ConvertTranslateOperation( @@ -72,15 +72,15 @@ if (!translate) return CreateNoneValue(); - auto result = - std::make_unique<InterpolableList>(kTranslateComponentIndexCount); + auto* result = + MakeGarbageCollected<InterpolableList>(kTranslateComponentIndexCount); result->Set(kTranslateX, InterpolableLength::MaybeConvertLength(translate->X(), zoom)); result->Set(kTranslateY, InterpolableLength::MaybeConvertLength(translate->Y(), zoom)); result->Set(kTranslateZ, InterpolableLength::MaybeConvertLength( Length::Fixed(translate->Z()), zoom)); - return InterpolationValue(std::move(result)); + return InterpolationValue(result); } } // namespace @@ -120,8 +120,8 @@ if (list.length() < 1 || list.length() > 3) return nullptr; - auto result = - std::make_unique<InterpolableList>(kTranslateComponentIndexCount); + auto* result = + MakeGarbageCollected<InterpolableList>(kTranslateComponentIndexCount); for (wtf_size_t i = 0; i < kTranslateComponentIndexCount; i++) { InterpolationValue component = nullptr; if (i < list.length()) { @@ -134,7 +134,7 @@ } result->Set(i, std::move(component.interpolable_value)); } - return InterpolationValue(std::move(result)); + return InterpolationValue(result); } PairwiseInterpolationValue CSSTranslateInterpolationType::MaybeMergeSingles(
diff --git a/third_party/blink/renderer/core/animation/css_var_cycle_interpolation_type.cc b/third_party/blink/renderer/core/animation/css_var_cycle_interpolation_type.cc index 85b3425e0b..2ac45ea9 100644 --- a/third_party/blink/renderer/core/animation/css_var_cycle_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/css_var_cycle_interpolation_type.cc
@@ -47,7 +47,7 @@ } static InterpolationValue CreateCycleDetectedValue() { - return InterpolationValue(std::make_unique<InterpolableList>(0)); + return InterpolationValue(MakeGarbageCollected<InterpolableList>(0)); } InterpolationValue CSSVarCycleInterpolationType::MaybeConvertSingle(
diff --git a/third_party/blink/renderer/core/animation/css_visibility_interpolation_type.cc b/third_party/blink/renderer/core/animation/css_visibility_interpolation_type.cc index 9c3237c..451ddba 100644 --- a/third_party/blink/renderer/core/animation/css_visibility_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/css_visibility_interpolation_type.cc
@@ -100,7 +100,7 @@ InterpolationValue CSSVisibilityInterpolationType::CreateVisibilityValue( EVisibility visibility) const { return InterpolationValue( - std::make_unique<InterpolableNumber>(0), + MakeGarbageCollected<InterpolableNumber>(0), CSSVisibilityNonInterpolableValue::Create(visibility, visibility)); } @@ -176,8 +176,8 @@ end_visibility != EVisibility::kVisible) { return nullptr; } - return PairwiseInterpolationValue(std::make_unique<InterpolableNumber>(0), - std::make_unique<InterpolableNumber>(1), + return PairwiseInterpolationValue(MakeGarbageCollected<InterpolableNumber>(0), + MakeGarbageCollected<InterpolableNumber>(1), CSSVisibilityNonInterpolableValue::Create( start_visibility, end_visibility)); }
diff --git a/third_party/blink/renderer/core/animation/interpolable_aspect_ratio.cc b/third_party/blink/renderer/core/animation/interpolable_aspect_ratio.cc index 976759d..4593e50d1 100644 --- a/third_party/blink/renderer/core/animation/interpolable_aspect_ratio.cc +++ b/third_party/blink/renderer/core/animation/interpolable_aspect_ratio.cc
@@ -11,12 +11,13 @@ namespace blink { // static -std::unique_ptr<InterpolableAspectRatio> InterpolableAspectRatio::MaybeCreate( +InterpolableAspectRatio* InterpolableAspectRatio::MaybeCreate( const StyleAspectRatio& aspect_ratio) { // Auto aspect ratio cannot be interpolated to / from. - if (aspect_ratio.IsAuto()) + if (aspect_ratio.IsAuto()) { return nullptr; - return std::make_unique<InterpolableAspectRatio>(aspect_ratio.GetRatio()); + } + return MakeGarbageCollected<InterpolableAspectRatio>(aspect_ratio.GetRatio()); } InterpolableAspectRatio::InterpolableAspectRatio( @@ -25,7 +26,7 @@ // have a degenerate aspect ratio. DCHECK(aspect_ratio.height() > 0 && aspect_ratio.width() > 0); - value_ = std::make_unique<InterpolableNumber>( + value_ = MakeGarbageCollected<InterpolableNumber>( log(aspect_ratio.width() / aspect_ratio.height())); }
diff --git a/third_party/blink/renderer/core/animation/interpolable_aspect_ratio.h b/third_party/blink/renderer/core/animation/interpolable_aspect_ratio.h index b3b50d4a..bdb6167 100644 --- a/third_party/blink/renderer/core/animation/interpolable_aspect_ratio.h +++ b/third_party/blink/renderer/core/animation/interpolable_aspect_ratio.h
@@ -19,11 +19,9 @@ class CORE_EXPORT InterpolableAspectRatio final : public InterpolableValue { public: explicit InterpolableAspectRatio(const gfx::SizeF& ratio); - explicit InterpolableAspectRatio(std::unique_ptr<InterpolableValue> value) - : value_(std::move(value)) {} + explicit InterpolableAspectRatio(InterpolableValue* value) : value_(value) {} - static std::unique_ptr<InterpolableAspectRatio> MaybeCreate( - const StyleAspectRatio&); + static InterpolableAspectRatio* MaybeCreate(const StyleAspectRatio&); gfx::SizeF GetRatio() const; @@ -40,17 +38,23 @@ void Add(const InterpolableValue& other) final; void AssertCanInterpolateWith(const InterpolableValue& other) const final; + void Trace(Visitor* v) const override { + InterpolableValue::Trace(v); + v->Trace(value_); + } + private: InterpolableAspectRatio* RawClone() const final { - return new InterpolableAspectRatio(value_->Clone()); + return MakeGarbageCollected<InterpolableAspectRatio>(value_->Clone()); } InterpolableAspectRatio* RawCloneAndZero() const final { - return new InterpolableAspectRatio(value_->CloneAndZero()); + return MakeGarbageCollected<InterpolableAspectRatio>( + value_->CloneAndZero()); } // Interpolable aspect ratio value is stored and interpolated as the log of // the real aspect ratio. - std::unique_ptr<InterpolableValue> value_; + Member<InterpolableValue> value_; }; template <>
diff --git a/third_party/blink/renderer/core/animation/interpolable_color.cc b/third_party/blink/renderer/core/animation/interpolable_color.cc index 60780d4..25fc736 100644 --- a/third_party/blink/renderer/core/animation/interpolable_color.cc +++ b/third_party/blink/renderer/core/animation/interpolable_color.cc
@@ -14,12 +14,8 @@ namespace blink { -// All colors are zero-initialized (transparent black). -InterpolableColor::InterpolableColor() = default; - -std::unique_ptr<InterpolableColor> InterpolableColor::Create(Color color) { - std::unique_ptr<InterpolableColor> result = - std::make_unique<InterpolableColor>(); +InterpolableColor* InterpolableColor::Create(Color color) { + InterpolableColor* result = MakeGarbageCollected<InterpolableColor>(); result->color_space_ = color.GetColorInterpolationSpace(); // A color is not necessarily "in" it's desired interpolation space. @@ -35,27 +31,35 @@ return result; } -std::unique_ptr<InterpolableColor> InterpolableColor::Create( - ColorKeyword color_keyword) { - std::unique_ptr<InterpolableColor> result = - std::make_unique<InterpolableColor>(); - unsigned keyword_index = static_cast<int>(color_keyword); - DCHECK_LT(keyword_index, kColorKeywordCount); +InterpolableColor* InterpolableColor::Create(ColorKeyword color_keyword) { + InterpolableColor* result = MakeGarbageCollected<InterpolableColor>(); // color_keyword_fractions_ keeps track of keyword colors (like // "currentcolor") for interpolation. These keyword colors are not known at // specified value time, so we need to wait until we resolve them. Upon // creation the entry for the correct keyword is set to "1" and all others are // "0". These values are interpolated as normal. When the color is resolved // the proper fraction of the keyword color is added in. - result->color_keyword_fractions_.Set(keyword_index, InterpolableNumber(1)); + switch (color_keyword) { + case ColorKeyword::kCurrentcolor: + result->current_color_ = InlinedInterpolableNumber(1); + break; + case ColorKeyword::kWebkitActivelink: + result->webkit_active_link_ = InlinedInterpolableNumber(1); + break; + case ColorKeyword::kWebkitLink: + result->webkit_link_ = InlinedInterpolableNumber(1); + break; + case ColorKeyword::kQuirkInherit: + result->quirk_inherit_ = InlinedInterpolableNumber(1); + break; + } // Keyword colors are functionally legacy colors for interpolation. result->color_space_ = Color::ColorSpace::kSRGBLegacy; return result; } -std::unique_ptr<InterpolableColor> InterpolableColor::Create( - CSSValueID keyword) { +InterpolableColor* InterpolableColor::Create(CSSValueID keyword) { switch (keyword) { case CSSValueID::kCurrentcolor: return Create(ColorKeyword::kCurrentcolor); @@ -78,38 +82,44 @@ } InterpolableColor::InterpolableColor( - InterpolableNumber param0, - InterpolableNumber param1, - InterpolableNumber param2, - InterpolableNumber alpha, - InterpolableNumberList color_keyword_fractions, + InlinedInterpolableNumber param0, + InlinedInterpolableNumber param1, + InlinedInterpolableNumber param2, + InlinedInterpolableNumber alpha, + InlinedInterpolableNumber current_color, + InlinedInterpolableNumber webkit_active_link, + InlinedInterpolableNumber webkit_link, + InlinedInterpolableNumber quirk_inherit, Color::ColorSpace color_space) : param0_(std::move(param0)), param1_(std::move(param1)), param2_(std::move(param2)), alpha_(std::move(alpha)), - color_keyword_fractions_(std::move(color_keyword_fractions)), - color_space_(color_space) { - DCHECK_EQ(color_keyword_fractions_.length(), kColorKeywordCount); -} + current_color_(std::move(current_color)), + webkit_active_link_(std::move(webkit_active_link)), + webkit_link_(std::move(webkit_link)), + quirk_inherit_(std::move(quirk_inherit)), + color_space_(std::move(color_space)) {} InterpolableColor* InterpolableColor::RawClone() const { - DCHECK_EQ(color_keyword_fractions_.length(), kColorKeywordCount); - return new InterpolableColor(param0_, param1_, param2_, alpha_, - color_keyword_fractions_.Clone(), color_space_); + return MakeGarbageCollected<InterpolableColor>( + param0_, param1_, param2_, alpha_, current_color_, webkit_active_link_, + webkit_link_, quirk_inherit_, color_space_); } InterpolableColor* InterpolableColor::RawCloneAndZero() const { - return new InterpolableColor(InterpolableNumber(0), InterpolableNumber(0), - InterpolableNumber(0), InterpolableNumber(0), - color_keyword_fractions_.CloneAndZero(), - color_space_); + return MakeGarbageCollected<InterpolableColor>( + InlinedInterpolableNumber(0), InlinedInterpolableNumber(0), + InlinedInterpolableNumber(0), InlinedInterpolableNumber(0), + InlinedInterpolableNumber(0), InlinedInterpolableNumber(0), + InlinedInterpolableNumber(0), InlinedInterpolableNumber(0), color_space_); } Color InterpolableColor::GetColor() const { // Prevent dividing by zero. - if (alpha_.Value() == 0) + if (alpha_.Value() == 0) { return Color::kTransparent; + } // All params are stored pre-multiplied. float param0 = param0_.Value() / alpha_.Value(); @@ -134,12 +144,6 @@ const InterpolableValue& other) const { const InterpolableColor& other_color = To<InterpolableColor>(other); DCHECK_EQ(color_space_, other_color.color_space_); - param0_.AssertCanInterpolateWith(other_color.param0_); - param1_.AssertCanInterpolateWith(other_color.param1_); - param2_.AssertCanInterpolateWith(other_color.param2_); - alpha_.AssertCanInterpolateWith(other_color.alpha_); - color_keyword_fractions_.AssertCanInterpolateWith( - other_color.color_keyword_fractions_); } bool InterpolableColor::IsKeywordColor() const { @@ -147,12 +151,8 @@ // important for resolving the color. If any of these store a non-zero value, // then the interpolated color is not the same as the color produced by simply // looking at the param values and color interpolation space. - for (wtf_size_t i = 0; i < color_keyword_fractions_.length(); i++) { - double keyword_fraction = color_keyword_fractions_.Get(i).Value(); - if (keyword_fraction != 0) - return false; - } - return true; + return current_color_.Value() || webkit_active_link_.Value() || + webkit_link_.Value() || quirk_inherit_.Value(); } void InterpolableColor::ConvertToColorSpace(Color::ColorSpace color_space) { @@ -200,28 +200,37 @@ param1_.Scale(scale); param2_.Scale(scale); alpha_.Scale(scale); - color_keyword_fractions_.Scale(scale); + current_color_.Scale(scale); + webkit_active_link_.Scale(scale); + webkit_link_.Scale(scale); + quirk_inherit_.Scale(scale); #if DCHECK_IS_ON() DCHECK_EQ(param0_is_positive * (scale > 0), param0_.Value() > 0.0); DCHECK_EQ(param1_is_positive * (scale > 0), param1_.Value() > 0.0); DCHECK_EQ(param2_is_positive * (scale > 0), param2_.Value() > 0.0); DCHECK_EQ(alpha_is_positive * (scale > 0), alpha_.Value() > 0.0); - for (unsigned i = 0; i < color_keyword_fractions_.length(); i++) { - double fraction = color_keyword_fractions_.Get(i).Value(); - DCHECK_GE(fraction, 0); - DCHECK_LE(fraction, 1); - } + DCHECK_GE(current_color_.Value(), 0.); + DCHECK_LE(current_color_.Value(), 1.); + DCHECK_GE(webkit_active_link_.Value(), 0.); + DCHECK_LE(webkit_active_link_.Value(), 1.); + DCHECK_GE(webkit_link_.Value(), 0.); + DCHECK_LE(webkit_link_.Value(), 1.); + DCHECK_GE(quirk_inherit_.Value(), 0.); + DCHECK_LE(quirk_inherit_.Value(), 1.); #endif } void InterpolableColor::Add(const InterpolableValue& other) { const InterpolableColor& other_color = To<InterpolableColor>(other); - param0_.Add(other_color.param0_); - param1_.Add(other_color.param1_); - param2_.Add(other_color.param2_); - alpha_.Add(other_color.alpha_); - color_keyword_fractions_.Add(other_color.color_keyword_fractions_); + param0_.Add(other_color.param0_.Value()); + param1_.Add(other_color.param1_.Value()); + param2_.Add(other_color.param2_.Value()); + alpha_.Add(other_color.alpha_.Value()); + current_color_.Add(other_color.current_color_.Value()); + webkit_active_link_.Add(other_color.webkit_active_link_.Value()); + webkit_link_.Add(other_color.webkit_link_.Value()); + quirk_inherit_.Add(other_color.quirk_inherit_.Value()); } void InterpolableColor::Interpolate(const InterpolableValue& to, @@ -233,29 +242,41 @@ DCHECK_EQ(to_color.color_space_, color_space_); DCHECK_EQ(result_color.color_space_, color_space_); - param0_.Interpolate(to_color.param0_, progress, result_color.param0_); - param1_.Interpolate(to_color.param1_, progress, result_color.param1_); - param2_.Interpolate(to_color.param2_, progress, result_color.param2_); - alpha_.Interpolate(to_color.alpha_, progress, result_color.alpha_); + result_color.param0_.Set( + param0_.Interpolate(to_color.param0_.Value(), progress)); + result_color.param1_.Set( + param1_.Interpolate(to_color.param1_.Value(), progress)); + result_color.param2_.Set( + param2_.Interpolate(to_color.param2_.Value(), progress)); + result_color.alpha_.Set( + alpha_.Interpolate(to_color.alpha_.Value(), progress)); - color_keyword_fractions_.Interpolate(to_color.color_keyword_fractions_, - progress, - result_color.color_keyword_fractions_); + result_color.current_color_.Set( + current_color_.Interpolate(to_color.current_color_.Value(), progress)); + result_color.webkit_active_link_.Set(webkit_active_link_.Interpolate( + to_color.webkit_active_link_.Value(), progress)); + result_color.webkit_link_.Set( + webkit_link_.Interpolate(to_color.webkit_link_.Value(), progress)); + result_color.quirk_inherit_.Set( + quirk_inherit_.Interpolate(to_color.quirk_inherit_.Value(), progress)); } void InterpolableColor::Composite(const InterpolableColor& other, double fraction) { - param0_.ScaleAndAdd(fraction, other.param0_); - param1_.ScaleAndAdd(fraction, other.param1_); - param2_.ScaleAndAdd(fraction, other.param2_); + param0_.ScaleAndAdd(fraction, other.param0_.Value()); + param1_.ScaleAndAdd(fraction, other.param1_.Value()); + param2_.ScaleAndAdd(fraction, other.param2_.Value()); // TODO(crbug.com/981326): Test coverage has historically been missing for // composition of transparent colors. We should aim for interop with Firefox // and Safari. - if (alpha_.Value() != other.alpha_.Value()) - alpha_.ScaleAndAdd(fraction, other.alpha_); + if (alpha_.Value() != other.alpha_.Value()) { + alpha_.ScaleAndAdd(fraction, other.alpha_.Value()); + } - color_keyword_fractions_.ScaleAndAdd(fraction, - other.color_keyword_fractions_); + current_color_.ScaleAndAdd(fraction, other.current_color_.Value()); + webkit_active_link_.ScaleAndAdd(fraction, other.webkit_active_link_.Value()); + webkit_link_.ScaleAndAdd(fraction, other.webkit_link_.Value()); + quirk_inherit_.ScaleAndAdd(fraction, other.quirk_inherit_.Value()); } } // namespace blink
diff --git a/third_party/blink/renderer/core/animation/interpolable_color.h b/third_party/blink/renderer/core/animation/interpolable_color.h index f39fa8d3..58df81d 100644 --- a/third_party/blink/renderer/core/animation/interpolable_color.h +++ b/third_party/blink/renderer/core/animation/interpolable_color.h
@@ -20,7 +20,11 @@ // verified and adjusted in CSSColorInterpolationType::MaybeMergeSingles. class CORE_EXPORT InterpolableColor : public InterpolableValue { public: - InterpolableColor(); + InterpolableColor() { + // All colors are zero-initialized (transparent black). + static_assert(std::is_trivially_destructible_v<InterpolableColor>, + "Require trivial destruction for faster sweeping"); + } // Certain color keywords cannot be eagerly evaluated at specified value time. // For these keywords we store a separate entry in a list here, interpolate @@ -32,14 +36,11 @@ kWebkitActivelink, kWebkitLink, kQuirkInherit, - kCount, }; - constexpr static unsigned kColorKeywordCount = - static_cast<int>(ColorKeyword::kCount); - static std::unique_ptr<InterpolableColor> Create(Color color); - static std::unique_ptr<InterpolableColor> Create(ColorKeyword color_keyword); - static std::unique_ptr<InterpolableColor> Create(CSSValueID keyword); + static InterpolableColor* Create(Color color); + static InterpolableColor* Create(ColorKeyword color_keyword); + static InterpolableColor* Create(CSSValueID keyword); Color GetColor() const; bool IsColor() const final { return true; } @@ -70,43 +71,62 @@ Color::ColorSpace ColorSpace() const { return color_space_; } double GetColorFraction(ColorKeyword keyword) const { - int keyword_index = static_cast<int>(keyword); - return color_keyword_fractions_.Get(keyword_index).Value(); + switch (keyword) { + case ColorKeyword::kCurrentcolor: + return current_color_.Value(); + case ColorKeyword::kWebkitActivelink: + return webkit_active_link_.Value(); + case ColorKeyword::kWebkitLink: + return webkit_link_.Value(); + case ColorKeyword::kQuirkInherit: + return quirk_inherit_.Value(); + } } - std::unique_ptr<InterpolableColor> Clone() const { - return std::unique_ptr<InterpolableColor>(RawClone()); - } + InterpolableColor* Clone() const { return RawClone(); } - std::unique_ptr<InterpolableColor> CloneAndZero() const { - return std::unique_ptr<InterpolableColor>(RawCloneAndZero()); - } + InterpolableColor* CloneAndZero() const { return RawCloneAndZero(); } void Composite(const InterpolableColor& other, double fraction); - private: - using InterpolableNumberList = - StaticInterpolableList<InterpolableNumber, kColorKeywordCount>; + void Trace(Visitor* v) const override { + InterpolableValue::Trace(v); + v->Trace(param0_); + v->Trace(param1_); + v->Trace(param2_); + v->Trace(alpha_); + v->Trace(current_color_); + v->Trace(webkit_active_link_); + v->Trace(webkit_link_); + v->Trace(quirk_inherit_); + } - InterpolableColor(InterpolableNumber param0, - InterpolableNumber param1, - InterpolableNumber param2, - InterpolableNumber alpha, - InterpolableNumberList color_keyword_fractions, + InterpolableColor(InlinedInterpolableNumber param0, + InlinedInterpolableNumber param1, + InlinedInterpolableNumber param2, + InlinedInterpolableNumber alpha, + InlinedInterpolableNumber current_color, + InlinedInterpolableNumber webkit_active_link, + InlinedInterpolableNumber webkit_link, + InlinedInterpolableNumber quirk_inherit, Color::ColorSpace color_space); + private: void ConvertToColorSpace(Color::ColorSpace color_space); InterpolableColor* RawClone() const final; InterpolableColor* RawCloneAndZero() const final; // All color params are stored premultiplied by alpha. // https://csswg.sesse.net/css-color-4/#interpolation-space - InterpolableNumber param0_; - InterpolableNumber param1_; - InterpolableNumber param2_; - InterpolableNumber alpha_; + InlinedInterpolableNumber param0_; + InlinedInterpolableNumber param1_; + InlinedInterpolableNumber param2_; + InlinedInterpolableNumber alpha_; - InterpolableNumberList color_keyword_fractions_; + InlinedInterpolableNumber current_color_; + InlinedInterpolableNumber webkit_active_link_; + InlinedInterpolableNumber webkit_link_; + InlinedInterpolableNumber quirk_inherit_; Color::ColorSpace color_space_ = Color::ColorSpace::kNone; };
diff --git a/third_party/blink/renderer/core/animation/interpolable_filter.cc b/third_party/blink/renderer/core/animation/interpolable_filter.cc index c1c2ddd9a..31c9545 100644 --- a/third_party/blink/renderer/core/animation/interpolable_filter.cc +++ b/third_party/blink/renderer/core/animation/interpolable_filter.cc
@@ -38,17 +38,17 @@ } // namespace // static -std::unique_ptr<InterpolableFilter> InterpolableFilter::MaybeCreate( +InterpolableFilter* InterpolableFilter::MaybeCreate( const FilterOperation& filter, double zoom) { - std::unique_ptr<InterpolableValue> value; + InterpolableValue* value = nullptr; FilterOperation::OperationType type = filter.GetType(); switch (type) { case FilterOperation::OperationType::kGrayscale: case FilterOperation::OperationType::kHueRotate: case FilterOperation::OperationType::kSaturate: case FilterOperation::OperationType::kSepia: - value = std::make_unique<InterpolableNumber>( + value = MakeGarbageCollected<InterpolableNumber>( To<BasicColorMatrixFilterOperation>(filter).Amount()); break; @@ -56,7 +56,7 @@ case FilterOperation::OperationType::kContrast: case FilterOperation::OperationType::kInvert: case FilterOperation::OperationType::kOpacity: - value = std::make_unique<InterpolableNumber>( + value = MakeGarbageCollected<InterpolableNumber>( To<BasicComponentTransferFilterOperation>(filter).Amount()); break; @@ -80,11 +80,11 @@ if (!value) return nullptr; - return std::make_unique<InterpolableFilter>(std::move(value), type); + return MakeGarbageCollected<InterpolableFilter>(std::move(value), type); } // static -std::unique_ptr<InterpolableFilter> InterpolableFilter::MaybeConvertCSSValue( +InterpolableFilter* InterpolableFilter::MaybeConvertCSSValue( const CSSValue& css_value) { if (css_value.IsURIValue()) return nullptr; @@ -92,7 +92,7 @@ const auto& filter = To<CSSFunctionValue>(css_value); DCHECK_LE(filter.length(), 1u); - std::unique_ptr<InterpolableValue> value; + InterpolableValue* value = nullptr; FilterOperation::OperationType type = FilterOperationResolver::FilterOperationForType(filter.FunctionType()); switch (type) { @@ -104,7 +104,7 @@ case FilterOperation::OperationType::kSaturate: case FilterOperation::OperationType::kSepia: case FilterOperation::OperationType::kHueRotate: - value = std::make_unique<InterpolableNumber>( + value = MakeGarbageCollected<InterpolableNumber>( FilterOperationResolver::ResolveNumericArgumentForFunction(filter)); break; @@ -125,28 +125,28 @@ if (!value) return nullptr; - return std::make_unique<InterpolableFilter>(std::move(value), type); + return MakeGarbageCollected<InterpolableFilter>(value, type); } // static -std::unique_ptr<InterpolableFilter> InterpolableFilter::CreateInitialValue( +InterpolableFilter* InterpolableFilter::CreateInitialValue( FilterOperation::OperationType type) { // See https://drafts.fxtf.org/filter-effects-1/#filter-functions for the // mapping of OperationType to initial value. - std::unique_ptr<InterpolableValue> value; + InterpolableValue* value = nullptr; switch (type) { case FilterOperation::OperationType::kGrayscale: case FilterOperation::OperationType::kInvert: case FilterOperation::OperationType::kSepia: case FilterOperation::OperationType::kHueRotate: - value = std::make_unique<InterpolableNumber>(0); + value = MakeGarbageCollected<InterpolableNumber>(0); break; case FilterOperation::OperationType::kBrightness: case FilterOperation::OperationType::kContrast: case FilterOperation::OperationType::kOpacity: case FilterOperation::OperationType::kSaturate: - value = std::make_unique<InterpolableNumber>(1); + value = MakeGarbageCollected<InterpolableNumber>(1); break; case FilterOperation::OperationType::kBlur: @@ -162,7 +162,7 @@ return nullptr; } - return std::make_unique<InterpolableFilter>(std::move(value), type); + return MakeGarbageCollected<InterpolableFilter>(value, type); } FilterOperation* InterpolableFilter::CreateFilterOperation( @@ -218,7 +218,7 @@ case FilterOperation::OperationType::kOpacity: case FilterOperation::OperationType::kSaturate: case FilterOperation::OperationType::kSepia: - value_->Add(*std::make_unique<InterpolableNumber>(-1)); + value_->Add(*MakeGarbageCollected<InterpolableNumber>(-1)); break; default: break;
diff --git a/third_party/blink/renderer/core/animation/interpolable_filter.h b/third_party/blink/renderer/core/animation/interpolable_filter.h index f36a72b..f4f27b34f 100644 --- a/third_party/blink/renderer/core/animation/interpolable_filter.h +++ b/third_party/blink/renderer/core/animation/interpolable_filter.h
@@ -20,21 +20,20 @@ // interpolated from/to. class CORE_EXPORT InterpolableFilter final : public InterpolableValue { public: - InterpolableFilter(std::unique_ptr<InterpolableValue> value, + InterpolableFilter(InterpolableValue* value, FilterOperation::OperationType type) - : value_(std::move(value)), type_(type) { + : value_(value), type_(type) { + static_assert(std::is_trivially_destructible_v<InterpolableFilter>, + "Require trivial destruction for faster sweeping"); DCHECK(value_); } - static std::unique_ptr<InterpolableFilter> MaybeCreate(const FilterOperation&, - double zoom); - static std::unique_ptr<InterpolableFilter> MaybeConvertCSSValue( - const CSSValue&); + static InterpolableFilter* MaybeCreate(const FilterOperation&, double zoom); + static InterpolableFilter* MaybeConvertCSSValue(const CSSValue&); // Create an InterpolableFilter representing the 'initial value for // interpolation' for the given OperationType. - static std::unique_ptr<InterpolableFilter> CreateInitialValue( - FilterOperation::OperationType); + static InterpolableFilter* CreateInitialValue(FilterOperation::OperationType); FilterOperation::OperationType GetType() const { return type_; } @@ -55,17 +54,23 @@ void Add(const InterpolableValue& other) final; void AssertCanInterpolateWith(const InterpolableValue& other) const final; + void Trace(Visitor* v) const override { + InterpolableValue::Trace(v); + v->Trace(value_); + } + private: InterpolableFilter* RawClone() const final { - return new InterpolableFilter(value_->Clone(), type_); + return MakeGarbageCollected<InterpolableFilter>(value_->Clone(), type_); } InterpolableFilter* RawCloneAndZero() const final { - return new InterpolableFilter(value_->CloneAndZero(), type_); + return MakeGarbageCollected<InterpolableFilter>(value_->CloneAndZero(), + type_); } // Stores the interpolable data for the filter. The form varies depending on // the |type_|; see the implementation file for details of the mapping. - std::unique_ptr<InterpolableValue> value_; + Member<InterpolableValue> value_; FilterOperation::OperationType type_; };
diff --git a/third_party/blink/renderer/core/animation/interpolable_font_palette.cc b/third_party/blink/renderer/core/animation/interpolable_font_palette.cc index a1562e19..4c7d55e 100644 --- a/third_party/blink/renderer/core/animation/interpolable_font_palette.cc +++ b/third_party/blink/renderer/core/animation/interpolable_font_palette.cc
@@ -20,9 +20,9 @@ } // static -std::unique_ptr<InterpolableFontPalette> InterpolableFontPalette::Create( +InterpolableFontPalette* InterpolableFontPalette::Create( scoped_refptr<FontPalette> font_palette) { - return std::make_unique<InterpolableFontPalette>(font_palette); + return MakeGarbageCollected<InterpolableFontPalette>(font_palette); } scoped_refptr<FontPalette> InterpolableFontPalette::GetFontPalette() const { @@ -30,11 +30,11 @@ } InterpolableFontPalette* InterpolableFontPalette::RawClone() const { - return new InterpolableFontPalette(font_palette_); + return MakeGarbageCollected<InterpolableFontPalette>(font_palette_); } InterpolableFontPalette* InterpolableFontPalette::RawCloneAndZero() const { - return new InterpolableFontPalette(FontPalette::Create()); + return MakeGarbageCollected<InterpolableFontPalette>(FontPalette::Create()); } bool InterpolableFontPalette::Equals(const InterpolableValue& other) const {
diff --git a/third_party/blink/renderer/core/animation/interpolable_font_palette.h b/third_party/blink/renderer/core/animation/interpolable_font_palette.h index 5b35d1f..b15060c 100644 --- a/third_party/blink/renderer/core/animation/interpolable_font_palette.h +++ b/third_party/blink/renderer/core/animation/interpolable_font_palette.h
@@ -19,7 +19,7 @@ public: explicit InterpolableFontPalette(scoped_refptr<FontPalette> mix_value); - static std::unique_ptr<InterpolableFontPalette> Create( + static InterpolableFontPalette* Create( scoped_refptr<FontPalette> font_palette); scoped_refptr<FontPalette> GetFontPalette() const; @@ -39,6 +39,8 @@ } void AssertCanInterpolateWith(const InterpolableValue& other) const final; + void Trace(Visitor* v) const override { InterpolableValue::Trace(v); } + private: InterpolableFontPalette* RawClone() const final; InterpolableFontPalette* RawCloneAndZero() const final;
diff --git a/third_party/blink/renderer/core/animation/interpolable_font_palette_test.cc b/third_party/blink/renderer/core/animation/interpolable_font_palette_test.cc index de80b60..0f86896f 100644 --- a/third_party/blink/renderer/core/animation/interpolable_font_palette_test.cc +++ b/third_party/blink/renderer/core/animation/interpolable_font_palette_test.cc
@@ -19,12 +19,12 @@ scoped_refptr<FontPalette> palette2 = FontPalette::Create(FontPalette::kDarkPalette); - std::unique_ptr<InterpolableFontPalette> interpolable_palette_from = + InterpolableFontPalette* interpolable_palette_from = InterpolableFontPalette::Create(palette1); - std::unique_ptr<InterpolableFontPalette> interpolable_palette_to = + InterpolableFontPalette* interpolable_palette_to = InterpolableFontPalette::Create(palette2); - std::unique_ptr<InterpolableValue> interpolable_value = + InterpolableValue* interpolable_value = interpolable_palette_from->CloneAndZero(); interpolable_palette_from->Interpolate(*interpolable_palette_to, 0.3, *interpolable_value); @@ -42,12 +42,12 @@ FontPalette::Create(), FontPalette::Create(FontPalette::kDarkPalette), 30, 70, 0.7, 1.0, Color::ColorSpace::kSRGB, absl::nullopt); - std::unique_ptr<InterpolableFontPalette> interpolable_palette_from = + InterpolableFontPalette* interpolable_palette_from = InterpolableFontPalette::Create(palette1); - std::unique_ptr<InterpolableFontPalette> interpolable_palette_to = + InterpolableFontPalette* interpolable_palette_to = InterpolableFontPalette::Create(palette2); - std::unique_ptr<InterpolableValue> interpolable_value = + InterpolableValue* interpolable_value = interpolable_palette_from->CloneAndZero(); interpolable_palette_from->Interpolate(*interpolable_palette_to, 0.3, *interpolable_value); @@ -68,9 +68,9 @@ 70, 0.7, 1.0, Color::ColorSpace::kOklab, absl::nullopt); scoped_refptr<FontPalette> palette2 = FontPalette::Create(FontPalette::kLightPalette); - std::unique_ptr<InterpolableFontPalette> interpolable_palette1 = + InterpolableFontPalette* interpolable_palette1 = InterpolableFontPalette::Create(palette1); - std::unique_ptr<InterpolableFontPalette> interpolable_palette2 = + InterpolableFontPalette* interpolable_palette2 = InterpolableFontPalette::Create(palette2); interpolable_palette1->Scale(0.5); @@ -92,9 +92,9 @@ FontPalette::Create(FontPalette::kLightPalette), FontPalette::Create(), 70, 30, 0.3, 1.0, Color::ColorSpace::kOklab, absl::nullopt); - std::unique_ptr<InterpolableFontPalette> interpolable_palette1 = + InterpolableFontPalette* interpolable_palette1 = InterpolableFontPalette::Create(palette1); - std::unique_ptr<InterpolableFontPalette> interpolable_palette2 = + InterpolableFontPalette* interpolable_palette2 = InterpolableFontPalette::Create(palette2); EXPECT_TRUE(interpolable_palette1->Equals(*interpolable_palette2)); @@ -112,9 +112,9 @@ FontPalette::Create(FontPalette::kLightPalette), 70, 30, 0.3, 1.0, Color::ColorSpace::kSRGB, absl::nullopt); - std::unique_ptr<InterpolableFontPalette> interpolable_palette1 = + InterpolableFontPalette* interpolable_palette1 = InterpolableFontPalette::Create(palette1); - std::unique_ptr<InterpolableFontPalette> interpolable_palette2 = + InterpolableFontPalette* interpolable_palette2 = InterpolableFontPalette::Create(palette2); EXPECT_FALSE(interpolable_palette1->Equals(*interpolable_palette2));
diff --git a/third_party/blink/renderer/core/animation/interpolable_grid_length.cc b/third_party/blink/renderer/core/animation/interpolable_grid_length.cc index 73e952f..4f71809b 100644 --- a/third_party/blink/renderer/core/animation/interpolable_grid_length.cc +++ b/third_party/blink/renderer/core/animation/interpolable_grid_length.cc
@@ -43,35 +43,35 @@ } } // namespace -InterpolableGridLength::InterpolableGridLength( - std::unique_ptr<InterpolableValue> value, - InterpolableGridLengthType type) - : value_(std::move(value)), type_(type) { +InterpolableGridLength::InterpolableGridLength(InterpolableValue* value, + InterpolableGridLengthType type) + : value_(value), type_(type) { DCHECK(value_ || IsContentSized()); } // static -std::unique_ptr<InterpolableGridLength> InterpolableGridLength::Create( - const Length& length, - float zoom) { +InterpolableGridLength* InterpolableGridLength::Create(const Length& length, + float zoom) { InterpolableGridLengthType type = GetInterpolableGridLengthType(length); - std::unique_ptr<InterpolableValue> value; + InterpolableValue* value = nullptr; if (length.IsFlex()) { - value = std::make_unique<InterpolableNumber>(length.GetFloatValue()); + value = MakeGarbageCollected<InterpolableNumber>(length.GetFloatValue()); } else { value = InterpolableLength::MaybeConvertLength(length, zoom); } - return std::make_unique<InterpolableGridLength>(std::move(value), type); + return MakeGarbageCollected<InterpolableGridLength>(std::move(value), type); } Length InterpolableGridLength::CreateGridLength( const CSSToLengthConversionData& conversion_data) const { - if (IsContentSized()) + if (IsContentSized()) { return CreateContentSizedLength(type_); + } DCHECK(value_); - if (type_ == kFlex) + if (type_ == kFlex) { return Length::Flex(To<InterpolableNumber>(*value_).Value()); + } return To<InterpolableLength>(*value_).CreateLength( conversion_data, Length::ValueRange::kNonNegative); } @@ -86,12 +86,13 @@ } InterpolableGridLength* InterpolableGridLength::RawClone() const { - return new InterpolableGridLength(value_ ? value_->Clone() : nullptr, type_); + return MakeGarbageCollected<InterpolableGridLength>( + value_ ? value_->Clone() : nullptr, type_); } InterpolableGridLength* InterpolableGridLength::RawCloneAndZero() const { - return new InterpolableGridLength(value_ ? value_->CloneAndZero() : nullptr, - type_); + return MakeGarbageCollected<InterpolableGridLength>( + value_ ? value_->CloneAndZero() : nullptr, type_); } bool InterpolableGridLength::Equals(const InterpolableValue& other) const {
diff --git a/third_party/blink/renderer/core/animation/interpolable_grid_length.h b/third_party/blink/renderer/core/animation/interpolable_grid_length.h index 91f60f2f..d3b8231 100644 --- a/third_party/blink/renderer/core/animation/interpolable_grid_length.h +++ b/third_party/blink/renderer/core/animation/interpolable_grid_length.h
@@ -28,11 +28,9 @@ kMaxContent, }; - InterpolableGridLength(std::unique_ptr<InterpolableValue> value, + InterpolableGridLength(InterpolableValue* value, InterpolableGridLengthType type); - static std::unique_ptr<InterpolableGridLength> Create( - const Length& grid_length, - float zoom); + static InterpolableGridLength* Create(const Length& grid_length, float zoom); Length CreateGridLength( const CSSToLengthConversionData& conversion_data) const; @@ -47,6 +45,11 @@ void Add(const InterpolableValue& other) final; void AssertCanInterpolateWith(const InterpolableValue& other) const final; + void Trace(Visitor* v) const override { + InterpolableValue::Trace(v); + v->Trace(value_); + } + private: // An |InterpolableGridLength| is content sized when it's 'auto', // 'max-content' or 'min-content'. @@ -62,7 +65,7 @@ // If the type is flex, form is |InterpolableNumber|. // If the type is length, form is |InterpolableLength|. // Everything else, |value_| is nulllptr. - std::unique_ptr<InterpolableValue> value_; + Member<InterpolableValue> value_; InterpolableGridLengthType type_; };
diff --git a/third_party/blink/renderer/core/animation/interpolable_grid_track_list.cc b/third_party/blink/renderer/core/animation/interpolable_grid_track_list.cc index 7ce6395..03df87f 100644 --- a/third_party/blink/renderer/core/animation/interpolable_grid_track_list.cc +++ b/third_party/blink/renderer/core/animation/interpolable_grid_track_list.cc
@@ -10,25 +10,24 @@ namespace blink { -InterpolableGridTrackList::InterpolableGridTrackList( - std::unique_ptr<InterpolableList> values, - double progress) - : values_(std::move(values)), progress_(progress) { +InterpolableGridTrackList::InterpolableGridTrackList(InterpolableList* values, + double progress) + : values_(values), progress_(progress) { DCHECK(values_); } // static -std::unique_ptr<InterpolableGridTrackList> -InterpolableGridTrackList::MaybeCreate(const NGGridTrackList& track_list, - float zoom) { +InterpolableGridTrackList* InterpolableGridTrackList::MaybeCreate( + const NGGridTrackList& track_list, + float zoom) { // Subgrids do not have sizes stored on their track list to interpolate. if (track_list.HasAutoRepeater() || track_list.IsSubgriddedAxis()) { return nullptr; } wtf_size_t repeater_count = track_list.RepeaterCount(); - std::unique_ptr<InterpolableList> values = - std::make_unique<InterpolableList>(repeater_count); + InterpolableList* values = + MakeGarbageCollected<InterpolableList>(repeater_count); for (wtf_size_t i = 0; i < repeater_count; ++i) { Vector<GridTrackSize, 1> repeater_track_sizes; @@ -39,13 +38,13 @@ track_list.RepeatIndex(i), track_list.RepeatSize(i), track_list.RepeatCount(i, 0), track_list.LineNameIndicesCount(i), track_list.RepeatType(i)); - std::unique_ptr<InterpolableGridTrackRepeater> result = + InterpolableGridTrackRepeater* result = InterpolableGridTrackRepeater::Create(repeater, repeater_track_sizes, zoom); DCHECK(result); - values->Set(i, std::move(result)); + values->Set(i, result); } - return std::make_unique<InterpolableGridTrackList>(std::move(values), 0); + return MakeGarbageCollected<InterpolableGridTrackList>(values, 0); } NGGridTrackList InterpolableGridTrackList::CreateNGGridTrackList( @@ -61,15 +60,16 @@ } InterpolableGridTrackList* InterpolableGridTrackList::RawClone() const { - std::unique_ptr<InterpolableList> values( - DynamicTo<InterpolableList>(values_->Clone().release())); - return new InterpolableGridTrackList(std::move(values), progress_); + InterpolableList* values(DynamicTo<InterpolableList>(values_->Clone())); + return MakeGarbageCollected<InterpolableGridTrackList>(std::move(values), + progress_); } InterpolableGridTrackList* InterpolableGridTrackList::RawCloneAndZero() const { - std::unique_ptr<InterpolableList> values( - DynamicTo<InterpolableList>(values_->CloneAndZero().release())); - return new InterpolableGridTrackList(std::move(values), progress_); + InterpolableList* values( + DynamicTo<InterpolableList>(values_->CloneAndZero())); + return MakeGarbageCollected<InterpolableGridTrackList>(std::move(values), + progress_); } bool InterpolableGridTrackList::Equals(const InterpolableValue& other) const {
diff --git a/third_party/blink/renderer/core/animation/interpolable_grid_track_list.h b/third_party/blink/renderer/core/animation/interpolable_grid_track_list.h index daea915..29dc122 100644 --- a/third_party/blink/renderer/core/animation/interpolable_grid_track_list.h +++ b/third_party/blink/renderer/core/animation/interpolable_grid_track_list.h
@@ -16,9 +16,8 @@ // interpolated from/to. class CORE_EXPORT InterpolableGridTrackList : public InterpolableValue { public: - InterpolableGridTrackList(std::unique_ptr<InterpolableList> values, - double progress); - static std::unique_ptr<InterpolableGridTrackList> MaybeCreate( + InterpolableGridTrackList(InterpolableList* values, double progress); + static InterpolableGridTrackList* MaybeCreate( const NGGridTrackList& track_list, float zoom); @@ -41,12 +40,17 @@ bool IsCompatibleWith(const InterpolableValue& other) const; double GetProgress() const { return progress_; } + void Trace(Visitor* v) const override { + InterpolableValue::Trace(v); + v->Trace(values_); + } + private: InterpolableGridTrackList* RawClone() const final; InterpolableGridTrackList* RawCloneAndZero() const final; // Represents a list of repeaters. - std::unique_ptr<InterpolableList> values_; + Member<InterpolableList> values_; // Represents the progress of the interpolation, this is needed to flip // |CSSGridTrackListNonInterpolableValue|. double progress_;
diff --git a/third_party/blink/renderer/core/animation/interpolable_grid_track_repeater.cc b/third_party/blink/renderer/core/animation/interpolable_grid_track_repeater.cc index 70e2edd0..7c41598 100644 --- a/third_party/blink/renderer/core/animation/interpolable_grid_track_repeater.cc +++ b/third_party/blink/renderer/core/animation/interpolable_grid_track_repeater.cc
@@ -11,30 +11,28 @@ namespace blink { InterpolableGridTrackRepeater::InterpolableGridTrackRepeater( - std::unique_ptr<InterpolableList> values, + InterpolableList* values, const NGGridTrackRepeater& repeater) : values_(std::move(values)), repeater_(repeater) { DCHECK(values_); } // static -std::unique_ptr<InterpolableGridTrackRepeater> -InterpolableGridTrackRepeater::Create( +InterpolableGridTrackRepeater* InterpolableGridTrackRepeater::Create( const NGGridTrackRepeater& repeater, const Vector<GridTrackSize, 1>& repeater_track_sizes, float zoom) { DCHECK_EQ(repeater_track_sizes.size(), repeater.repeat_size); - std::unique_ptr<InterpolableList> values = - std::make_unique<InterpolableList>(repeater_track_sizes.size()); + InterpolableList* values = + MakeGarbageCollected<InterpolableList>(repeater_track_sizes.size()); for (wtf_size_t i = 0; i < repeater_track_sizes.size(); ++i) { - std::unique_ptr<InterpolableGridTrackSize> result = + InterpolableGridTrackSize* result = InterpolableGridTrackSize::Create(repeater_track_sizes[i], zoom); DCHECK(result); values->Set(i, std::move(result)); } - return std::make_unique<InterpolableGridTrackRepeater>(std::move(values), - repeater); + return MakeGarbageCollected<InterpolableGridTrackRepeater>(values, repeater); } Vector<GridTrackSize, 1> InterpolableGridTrackRepeater::CreateTrackSizes( @@ -53,16 +51,15 @@ } InterpolableGridTrackRepeater* InterpolableGridTrackRepeater::RawClone() const { - std::unique_ptr<InterpolableList> values( - DynamicTo<InterpolableList>(values_->Clone().release())); - return new InterpolableGridTrackRepeater(std::move(values), repeater_); + InterpolableList* values(DynamicTo<InterpolableList>(values_->Clone())); + return MakeGarbageCollected<InterpolableGridTrackRepeater>(values, repeater_); } InterpolableGridTrackRepeater* InterpolableGridTrackRepeater::RawCloneAndZero() const { - std::unique_ptr<InterpolableList> values( - DynamicTo<InterpolableList>(values_->CloneAndZero().release())); - return new InterpolableGridTrackRepeater(std::move(values), repeater_); + InterpolableList* values( + DynamicTo<InterpolableList>(values_->CloneAndZero())); + return MakeGarbageCollected<InterpolableGridTrackRepeater>(values, repeater_); } bool InterpolableGridTrackRepeater::Equals(
diff --git a/third_party/blink/renderer/core/animation/interpolable_grid_track_repeater.h b/third_party/blink/renderer/core/animation/interpolable_grid_track_repeater.h index 0ee696d..0633ca22 100644 --- a/third_party/blink/renderer/core/animation/interpolable_grid_track_repeater.h +++ b/third_party/blink/renderer/core/animation/interpolable_grid_track_repeater.h
@@ -17,9 +17,9 @@ class CORE_EXPORT InterpolableGridTrackRepeater final : public InterpolableValue { public: - InterpolableGridTrackRepeater(std::unique_ptr<InterpolableList> values, + InterpolableGridTrackRepeater(InterpolableList* values, const NGGridTrackRepeater& repeater); - static std::unique_ptr<InterpolableGridTrackRepeater> Create( + static InterpolableGridTrackRepeater* Create( const NGGridTrackRepeater& repeater, const Vector<GridTrackSize, 1>& repeater_track_sizes, float zoom); @@ -50,12 +50,17 @@ // they combine discretely. bool IsCompatibleWith(const InterpolableValue& other) const; + void Trace(Visitor* v) const override { + InterpolableValue::Trace(v); + v->Trace(values_); + } + private: InterpolableGridTrackRepeater* RawClone() const final; InterpolableGridTrackRepeater* RawCloneAndZero() const final; // Stores the track sizes of a repeater. - std::unique_ptr<InterpolableList> values_; + Member<InterpolableList> values_; NGGridTrackRepeater repeater_; };
diff --git a/third_party/blink/renderer/core/animation/interpolable_grid_track_size.cc b/third_party/blink/renderer/core/animation/interpolable_grid_track_size.cc index d4b9feb..162ed35 100644 --- a/third_party/blink/renderer/core/animation/interpolable_grid_track_size.cc +++ b/third_party/blink/renderer/core/animation/interpolable_grid_track_size.cc
@@ -10,22 +10,20 @@ namespace blink { InterpolableGridTrackSize::InterpolableGridTrackSize( - std::unique_ptr<InterpolableValue> min_value, - std::unique_ptr<InterpolableValue> max_value, + InterpolableValue* min_value, + InterpolableValue* max_value, const GridTrackSizeType type) - : min_value_(std::move(min_value)), - max_value_(std::move(max_value)), - type_(type) { + : min_value_(min_value), max_value_(max_value), type_(type) { DCHECK(min_value_); DCHECK(max_value_); } // static -std::unique_ptr<InterpolableGridTrackSize> InterpolableGridTrackSize::Create( +InterpolableGridTrackSize* InterpolableGridTrackSize::Create( const GridTrackSize& grid_track_size, float zoom) { - std::unique_ptr<InterpolableValue> min_value; - std::unique_ptr<InterpolableValue> max_value; + InterpolableValue* min_value = nullptr; + InterpolableValue* max_value = nullptr; min_value = InterpolableGridLength::Create( grid_track_size.MinOrFitContentTrackBreadth(), zoom); @@ -34,8 +32,8 @@ DCHECK(min_value); DCHECK(max_value); - return std::make_unique<InterpolableGridTrackSize>( - std::move(min_value), std::move(max_value), grid_track_size.GetType()); + return MakeGarbageCollected<InterpolableGridTrackSize>( + min_value, max_value, grid_track_size.GetType()); } GridTrackSize InterpolableGridTrackSize::CreateTrackSize( @@ -56,13 +54,13 @@ } InterpolableGridTrackSize* InterpolableGridTrackSize::RawClone() const { - return new InterpolableGridTrackSize(min_value_->Clone(), max_value_->Clone(), - type_); + return MakeGarbageCollected<InterpolableGridTrackSize>( + min_value_->Clone(), max_value_->Clone(), type_); } InterpolableGridTrackSize* InterpolableGridTrackSize::RawCloneAndZero() const { - return new InterpolableGridTrackSize(min_value_->CloneAndZero(), - max_value_->CloneAndZero(), type_); + return MakeGarbageCollected<InterpolableGridTrackSize>( + min_value_->CloneAndZero(), max_value_->CloneAndZero(), type_); } bool InterpolableGridTrackSize::Equals(const InterpolableValue& other) const {
diff --git a/third_party/blink/renderer/core/animation/interpolable_grid_track_size.h b/third_party/blink/renderer/core/animation/interpolable_grid_track_size.h index 7c167206..7219b018 100644 --- a/third_party/blink/renderer/core/animation/interpolable_grid_track_size.h +++ b/third_party/blink/renderer/core/animation/interpolable_grid_track_size.h
@@ -19,12 +19,11 @@ // fit-content( <length-percentage> ) class CORE_EXPORT InterpolableGridTrackSize final : public InterpolableValue { public: - InterpolableGridTrackSize(std::unique_ptr<InterpolableValue> min_value, - std::unique_ptr<InterpolableValue> max_value, + InterpolableGridTrackSize(InterpolableValue* min_value, + InterpolableValue* max_value, const GridTrackSizeType type); - static std::unique_ptr<InterpolableGridTrackSize> Create( - const GridTrackSize& grid_track_size, - float zoom); + static InterpolableGridTrackSize* Create(const GridTrackSize& grid_track_size, + float zoom); GridTrackSize CreateTrackSize( const CSSToLengthConversionData& conversion_data) const; @@ -39,14 +38,20 @@ void Add(const InterpolableValue& other) final; void AssertCanInterpolateWith(const InterpolableValue& other) const final; + void Trace(Visitor* v) const override { + InterpolableValue::Trace(v); + v->Trace(min_value_); + v->Trace(max_value_); + } + private: InterpolableGridTrackSize* RawClone() const final; InterpolableGridTrackSize* RawCloneAndZero() const final; // We have a min and max representation as a generalization of the three // different <track-size> types. - std::unique_ptr<InterpolableValue> min_value_; - std::unique_ptr<InterpolableValue> max_value_; + Member<InterpolableValue> min_value_; + Member<InterpolableValue> max_value_; GridTrackSizeType type_; };
diff --git a/third_party/blink/renderer/core/animation/interpolable_length.cc b/third_party/blink/renderer/core/animation/interpolable_length.cc index 3571a0a..f34f316 100644 --- a/third_party/blink/renderer/core/animation/interpolable_length.cc +++ b/third_party/blink/renderer/core/animation/interpolable_length.cc
@@ -32,30 +32,28 @@ } // namespace // static -std::unique_ptr<InterpolableLength> InterpolableLength::CreatePixels( - double pixels) { +InterpolableLength* InterpolableLength::CreatePixels(double pixels) { CSSLengthArray length_array; length_array.values[CSSPrimitiveValue::kUnitTypePixels] = pixels; length_array.type_flags.set(CSSPrimitiveValue::kUnitTypePixels); - return std::make_unique<InterpolableLength>(std::move(length_array)); + return MakeGarbageCollected<InterpolableLength>(std::move(length_array)); } // static -std::unique_ptr<InterpolableLength> InterpolableLength::CreatePercent( - double percent) { +InterpolableLength* InterpolableLength::CreatePercent(double percent) { CSSLengthArray length_array; length_array.values[CSSPrimitiveValue::kUnitTypePercentage] = percent; length_array.type_flags.set(CSSPrimitiveValue::kUnitTypePercentage); - return std::make_unique<InterpolableLength>(std::move(length_array)); + return MakeGarbageCollected<InterpolableLength>(std::move(length_array)); } // static -std::unique_ptr<InterpolableLength> InterpolableLength::CreateNeutral() { - return std::make_unique<InterpolableLength>(CSSLengthArray()); +InterpolableLength* InterpolableLength::CreateNeutral() { + return MakeGarbageCollected<InterpolableLength>(CSSLengthArray()); } // static -std::unique_ptr<InterpolableLength> InterpolableLength::MaybeConvertCSSValue( +InterpolableLength* InterpolableLength::MaybeConvertCSSValue( const CSSValue& value) { const auto* primitive_value = DynamicTo<CSSPrimitiveValue>(value); if (!primitive_value) @@ -67,7 +65,7 @@ CSSLengthArray length_array; if (primitive_value->AccumulateLengthArray(length_array)) - return std::make_unique<InterpolableLength>(std::move(length_array)); + return MakeGarbageCollected<InterpolableLength>(std::move(length_array)); const CSSMathExpressionNode* expression_node = nullptr; @@ -80,19 +78,18 @@ To<CSSMathFunctionValue>(primitive_value)->ExpressionNode(); } - return std::make_unique<InterpolableLength>(*expression_node); + return MakeGarbageCollected<InterpolableLength>(*expression_node); } // static -std::unique_ptr<InterpolableLength> InterpolableLength::MaybeConvertLength( - const Length& length, - float zoom) { +InterpolableLength* InterpolableLength::MaybeConvertLength(const Length& length, + float zoom) { if (!length.IsSpecified()) return nullptr; if (length.IsCalculated() && length.GetCalculationValue().IsExpression()) { auto unzoomed_calc = length.GetCalculationValue().Zoom(1.0 / zoom); - return std::make_unique<InterpolableLength>( + return MakeGarbageCollected<InterpolableLength>( *CSSMathExpressionNode::Create(*unzoomed_calc)); } @@ -108,13 +105,13 @@ pixels_and_percent.percent; length_array.type_flags[CSSPrimitiveValue::kUnitTypePercentage] = length.IsPercentOrCalc(); - return std::make_unique<InterpolableLength>(std::move(length_array)); + return MakeGarbageCollected<InterpolableLength>(std::move(length_array)); } // static PairwiseInterpolationValue InterpolableLength::MergeSingles( - std::unique_ptr<InterpolableValue> start, - std::unique_ptr<InterpolableValue> end) { + InterpolableValue* start, + InterpolableValue* end) { // TODO(crbug.com/991672): We currently have a lot of "fast paths" that do not // go through here, and hence, do not merge the percentage info of two // lengths. We should stop doing that. @@ -128,7 +125,7 @@ start_length.SetExpression(start_length.AsExpression()); end_length.SetExpression(end_length.AsExpression()); } - return PairwiseInterpolationValue(std::move(start), std::move(end)); + return PairwiseInterpolationValue(start, end); } InterpolableLength::InterpolableLength(CSSLengthArray&& length_array) { @@ -153,7 +150,7 @@ } InterpolableLength* InterpolableLength::RawClone() const { - return new InterpolableLength(*this); + return MakeGarbageCollected<InterpolableLength>(*this); } bool InterpolableLength::HasPercentage() const { @@ -430,4 +427,9 @@ HasPercentage() || to_length.HasPercentage()); } +void InterpolableLength::Trace(Visitor* v) const { + InterpolableValue::Trace(v); + v->Trace(expression_); +} + } // namespace blink
diff --git a/third_party/blink/renderer/core/animation/interpolable_length.h b/third_party/blink/renderer/core/animation/interpolable_length.h index 1e2386c..7478e82 100644 --- a/third_party/blink/renderer/core/animation/interpolable_length.h +++ b/third_party/blink/renderer/core/animation/interpolable_length.h
@@ -23,23 +23,19 @@ class CORE_EXPORT InterpolableLength final : public InterpolableValue { public: - ~InterpolableLength() final {} InterpolableLength(CSSLengthArray&& length_array); explicit InterpolableLength(const CSSMathExpressionNode& expression); - static std::unique_ptr<InterpolableLength> CreatePixels(double pixels); - static std::unique_ptr<InterpolableLength> CreatePercent(double pixels); - static std::unique_ptr<InterpolableLength> CreateNeutral(); + static InterpolableLength* CreatePixels(double pixels); + static InterpolableLength* CreatePercent(double pixels); + static InterpolableLength* CreateNeutral(); - static std::unique_ptr<InterpolableLength> MaybeConvertCSSValue( - const CSSValue& value); - static std::unique_ptr<InterpolableLength> MaybeConvertLength( - const Length& length, - float zoom); + static InterpolableLength* MaybeConvertCSSValue(const CSSValue& value); + static InterpolableLength* MaybeConvertLength(const Length& length, + float zoom); - static PairwiseInterpolationValue MergeSingles( - std::unique_ptr<InterpolableValue> start, - std::unique_ptr<InterpolableValue> end); + static PairwiseInterpolationValue MergeSingles(InterpolableValue* start, + InterpolableValue* end); Length CreateLength(const CSSToLengthConversionData& conversion_data, Length::ValueRange range) const; @@ -52,12 +48,8 @@ bool HasPercentage() const; void SubtractFromOneHundredPercent(); - std::unique_ptr<InterpolableLength> Clone() const { - return std::unique_ptr<InterpolableLength>(RawClone()); - } - std::unique_ptr<InterpolableLength> CloneAndZero() const { - return std::unique_ptr<InterpolableLength>(RawCloneAndZero()); - } + InterpolableLength* Clone() const { return RawClone(); } + InterpolableLength* CloneAndZero() const { return RawCloneAndZero(); } // InterpolableValue: void Interpolate(const InterpolableValue& to, @@ -74,10 +66,12 @@ void ScaleAndAdd(double scale, const InterpolableValue& other) final; void AssertCanInterpolateWith(const InterpolableValue& other) const final; + void Trace(Visitor* v) const override; + private: InterpolableLength* RawClone() const final; InterpolableLength* RawCloneAndZero() const final { - return new InterpolableLength(CSSLengthArray()); + return MakeGarbageCollected<InterpolableLength>(CSSLengthArray()); } bool IsLengthArray() const { return type_ == Type::kLengthArray; } @@ -90,7 +84,7 @@ enum class Type { kLengthArray, kExpression }; Type type_; CSSLengthArray length_array_; - Persistent<const CSSMathExpressionNode> expression_; + Member<const CSSMathExpressionNode> expression_; }; template <>
diff --git a/third_party/blink/renderer/core/animation/interpolable_scrollbar_color.cc b/third_party/blink/renderer/core/animation/interpolable_scrollbar_color.cc index b5d0e9a..5d33733 100644 --- a/third_party/blink/renderer/core/animation/interpolable_scrollbar_color.cc +++ b/third_party/blink/renderer/core/animation/interpolable_scrollbar_color.cc
@@ -19,61 +19,60 @@ InterpolableScrollbarColor::InterpolableScrollbarColor() = default; InterpolableScrollbarColor::InterpolableScrollbarColor( - InterpolableColor thumb_color, - InterpolableColor track_color) - : thumb_color_(std::move(thumb_color)), - track_color_(std::move(track_color)) {} + InterpolableColor* thumb_color, + InterpolableColor* track_color) + : thumb_color_(thumb_color), track_color_(track_color) {} -std::unique_ptr<InterpolableScrollbarColor> InterpolableScrollbarColor::Create( +InterpolableScrollbarColor* InterpolableScrollbarColor::Create( StyleScrollbarColor scrollbar_color) { - std::unique_ptr<InterpolableScrollbarColor> result = - std::make_unique<InterpolableScrollbarColor>(); + InterpolableScrollbarColor* result = + MakeGarbageCollected<InterpolableScrollbarColor>(); result->thumb_color_ = - *InterpolableColor::Create(scrollbar_color.GetThumbColor().GetColor()); + InterpolableColor::Create(scrollbar_color.GetThumbColor().GetColor()); result->track_color_ = - *InterpolableColor::Create(scrollbar_color.GetTrackColor().GetColor()); + InterpolableColor::Create(scrollbar_color.GetTrackColor().GetColor()); return result; } InterpolableScrollbarColor* InterpolableScrollbarColor::RawClone() const { - return new InterpolableScrollbarColor(*thumb_color_.Clone(), - *track_color_.Clone()); + return MakeGarbageCollected<InterpolableScrollbarColor>( + thumb_color_->Clone(), track_color_->Clone()); } InterpolableScrollbarColor* InterpolableScrollbarColor::RawCloneAndZero() const { - return new InterpolableScrollbarColor(*thumb_color_.CloneAndZero(), - *track_color_.CloneAndZero()); + return MakeGarbageCollected<InterpolableScrollbarColor>( + thumb_color_->CloneAndZero(), track_color_->CloneAndZero()); } StyleScrollbarColor InterpolableScrollbarColor::GetScrollbarColor( const StyleResolverState& state) const { return StyleScrollbarColor( StyleColor(CSSColorInterpolationType::ResolveInterpolableColor( - thumb_color_, state)), + *thumb_color_, state)), StyleColor(CSSColorInterpolationType::ResolveInterpolableColor( - track_color_, state))); + *track_color_, state))); } void InterpolableScrollbarColor::AssertCanInterpolateWith( const InterpolableValue& other) const { const InterpolableScrollbarColor& other_scrollbar_color = To<InterpolableScrollbarColor>(other); - thumb_color_.AssertCanInterpolateWith(other_scrollbar_color.thumb_color_); - track_color_.AssertCanInterpolateWith(other_scrollbar_color.track_color_); + thumb_color_->AssertCanInterpolateWith(*other_scrollbar_color.thumb_color_); + track_color_->AssertCanInterpolateWith(*other_scrollbar_color.track_color_); } void InterpolableScrollbarColor::Scale(double scale) { - thumb_color_.Scale(scale); - track_color_.Scale(scale); + thumb_color_->Scale(scale); + track_color_->Scale(scale); } void InterpolableScrollbarColor::Add(const InterpolableValue& other) { const InterpolableScrollbarColor& other_scrollbar_color = To<InterpolableScrollbarColor>(other); - thumb_color_.Add(other_scrollbar_color.thumb_color_); - track_color_.Add(other_scrollbar_color.track_color_); + thumb_color_->Add(*other_scrollbar_color.thumb_color_); + track_color_->Add(*other_scrollbar_color.track_color_); } void InterpolableScrollbarColor::Interpolate(const InterpolableValue& to, @@ -84,17 +83,17 @@ InterpolableScrollbarColor& result_scrollbar_color = To<InterpolableScrollbarColor>(result); - thumb_color_.Interpolate(to_scrollbar_color.thumb_color_, progress, - result_scrollbar_color.thumb_color_); - track_color_.Interpolate(to_scrollbar_color.track_color_, progress, - result_scrollbar_color.track_color_); + thumb_color_->Interpolate(*to_scrollbar_color.thumb_color_, progress, + *result_scrollbar_color.thumb_color_); + track_color_->Interpolate(*to_scrollbar_color.track_color_, progress, + *result_scrollbar_color.track_color_); } void InterpolableScrollbarColor::Composite( const InterpolableScrollbarColor& other, double fraction) { - thumb_color_.Composite(other.thumb_color_, fraction); - track_color_.Composite(other.track_color_, fraction); + thumb_color_->Composite(*other.thumb_color_, fraction); + track_color_->Composite(*other.track_color_, fraction); } } // namespace blink
diff --git a/third_party/blink/renderer/core/animation/interpolable_scrollbar_color.h b/third_party/blink/renderer/core/animation/interpolable_scrollbar_color.h index 669b2cba..7b854e8 100644 --- a/third_party/blink/renderer/core/animation/interpolable_scrollbar_color.h +++ b/third_party/blink/renderer/core/animation/interpolable_scrollbar_color.h
@@ -20,9 +20,10 @@ class CORE_EXPORT InterpolableScrollbarColor : public InterpolableValue { public: InterpolableScrollbarColor(); + InterpolableScrollbarColor(InterpolableColor* thumb_color, + InterpolableColor* track_color); - static std::unique_ptr<InterpolableScrollbarColor> Create( - StyleScrollbarColor); + static InterpolableScrollbarColor* Create(StyleScrollbarColor); bool IsScrollbarColor() const final { return true; } StyleScrollbarColor GetScrollbarColor(const StyleResolverState&) const; @@ -39,21 +40,22 @@ const double progress, InterpolableValue& result) const final; - std::unique_ptr<InterpolableScrollbarColor> Clone() const { - return std::unique_ptr<InterpolableScrollbarColor>(RawClone()); - } + InterpolableScrollbarColor* Clone() const { return RawClone(); } void Composite(const InterpolableScrollbarColor& other, double fraction); - private: - InterpolableScrollbarColor(InterpolableColor thumb_color, - InterpolableColor track_color); + void Trace(Visitor* v) const override { + InterpolableValue::Trace(v); + v->Trace(thumb_color_); + v->Trace(track_color_); + } + private: InterpolableScrollbarColor* RawClone() const final; InterpolableScrollbarColor* RawCloneAndZero() const final; - InterpolableColor thumb_color_; - InterpolableColor track_color_; + Member<InterpolableColor> thumb_color_; + Member<InterpolableColor> track_color_; }; template <>
diff --git a/third_party/blink/renderer/core/animation/interpolable_shadow.cc b/third_party/blink/renderer/core/animation/interpolable_shadow.cc index d57bba74..532d1dc7 100644 --- a/third_party/blink/renderer/core/animation/interpolable_shadow.cc +++ b/third_party/blink/renderer/core/animation/interpolable_shadow.cc
@@ -16,33 +16,33 @@ namespace blink { namespace { -std::unique_ptr<InterpolableLength> MaybeConvertLength( - const CSSPrimitiveValue* value) { - if (value) +InterpolableLength* MaybeConvertLength(const CSSPrimitiveValue* value) { + if (value) { return InterpolableLength::MaybeConvertCSSValue(*value); + } return InterpolableLength::CreatePixels(0); } -std::unique_ptr<InterpolableColor> MaybeConvertColor(const CSSValue* value) { - if (value) +InterpolableColor* MaybeConvertColor(const CSSValue* value) { + if (value) { return CSSColorInterpolationType::MaybeCreateInterpolableColor(*value); + } return CSSColorInterpolationType::CreateInterpolableColor( StyleColor::CurrentColor()); } } // namespace -InterpolableShadow::InterpolableShadow( - std::unique_ptr<InterpolableLength> x, - std::unique_ptr<InterpolableLength> y, - std::unique_ptr<InterpolableLength> blur, - std::unique_ptr<InterpolableLength> spread, - std::unique_ptr<InterpolableColor> color, - ShadowStyle shadow_style) - : x_(std::move(x)), - y_(std::move(y)), - blur_(std::move(blur)), - spread_(std::move(spread)), - color_(std::move(color)), +InterpolableShadow::InterpolableShadow(InterpolableLength* x, + InterpolableLength* y, + InterpolableLength* blur, + InterpolableLength* spread, + InterpolableColor* color, + ShadowStyle shadow_style) + : x_(x), + y_(y), + blur_(blur), + spread_(spread), + color_(color), shadow_style_(shadow_style) { DCHECK(x_); DCHECK(y_); @@ -52,10 +52,9 @@ } // static -std::unique_ptr<InterpolableShadow> InterpolableShadow::Create( - const ShadowData& shadow_data, - double zoom) { - return std::make_unique<InterpolableShadow>( +InterpolableShadow* InterpolableShadow::Create(const ShadowData& shadow_data, + double zoom) { + return MakeGarbageCollected<InterpolableShadow>( InterpolableLength::CreatePixels(shadow_data.X() / zoom), InterpolableLength::CreatePixels(shadow_data.Y() / zoom), InterpolableLength::CreatePixels(shadow_data.Blur() / zoom), @@ -66,47 +65,47 @@ } // static -std::unique_ptr<InterpolableShadow> InterpolableShadow::CreateNeutral() { +InterpolableShadow* InterpolableShadow::CreateNeutral() { return Create(ShadowData::NeutralValue(), 1); } // static -std::unique_ptr<InterpolableShadow> InterpolableShadow::MaybeConvertCSSValue( +InterpolableShadow* InterpolableShadow::MaybeConvertCSSValue( const CSSValue& value) { const auto* shadow = DynamicTo<CSSShadowValue>(value); - if (!shadow) + if (!shadow) { return nullptr; + } ShadowStyle shadow_style = ShadowStyle::kNormal; if (shadow->style) { - if (shadow->style->GetValueID() != CSSValueID::kInset) + if (shadow->style->GetValueID() != CSSValueID::kInset) { return nullptr; + } shadow_style = ShadowStyle::kInset; } - std::unique_ptr<InterpolableLength> x = MaybeConvertLength(shadow->x.Get()); - std::unique_ptr<InterpolableLength> y = MaybeConvertLength(shadow->y.Get()); - std::unique_ptr<InterpolableLength> blur = - MaybeConvertLength(shadow->blur.Get()); - std::unique_ptr<InterpolableLength> spread = - MaybeConvertLength(shadow->spread.Get()); - std::unique_ptr<InterpolableColor> color = MaybeConvertColor(shadow->color); + InterpolableLength* x = MaybeConvertLength(shadow->x.Get()); + InterpolableLength* y = MaybeConvertLength(shadow->y.Get()); + InterpolableLength* blur = MaybeConvertLength(shadow->blur.Get()); + InterpolableLength* spread = MaybeConvertLength(shadow->spread.Get()); + InterpolableColor* color = MaybeConvertColor(shadow->color); // If any of the conversations failed, we can't represent this CSSValue. - if (!x || !y || !blur || !spread || !color) + if (!x || !y || !blur || !spread || !color) { return nullptr; + } - return std::make_unique<InterpolableShadow>( - std::move(x), std::move(y), std::move(blur), std::move(spread), - std::move(color), shadow_style); + return MakeGarbageCollected<InterpolableShadow>(x, y, blur, spread, color, + shadow_style); } // static PairwiseInterpolationValue InterpolableShadow::MaybeMergeSingles( - std::unique_ptr<InterpolableValue> start, - std::unique_ptr<InterpolableValue> end) { - InterpolableShadow* start_shadow = To<InterpolableShadow>(start.get()); - InterpolableShadow* end_shadow = To<InterpolableShadow>(end.get()); + InterpolableValue* start, + InterpolableValue* end) { + InterpolableShadow* start_shadow = To<InterpolableShadow>(start); + InterpolableShadow* end_shadow = To<InterpolableShadow>(end); if (start_shadow->shadow_style_ != end_shadow->shadow_style_) { return nullptr; @@ -114,10 +113,10 @@ // Confirm that both colors are in the same colorspace and adjust if // necessary. - InterpolableColor::SetupColorInterpolationSpaces(*start_shadow->color_.get(), - *end_shadow->color_.get()); + InterpolableColor::SetupColorInterpolationSpaces(*start_shadow->color_, + *end_shadow->color_); - return PairwiseInterpolationValue(std::move(start), std::move(end)); + return PairwiseInterpolationValue(start, end); } // static @@ -162,15 +161,15 @@ } InterpolableShadow* InterpolableShadow::RawClone() const { - return new InterpolableShadow(x_->Clone(), y_->Clone(), blur_->Clone(), - spread_->Clone(), color_->Clone(), - shadow_style_); + return MakeGarbageCollected<InterpolableShadow>( + x_->Clone(), y_->Clone(), blur_->Clone(), spread_->Clone(), + color_->Clone(), shadow_style_); } InterpolableShadow* InterpolableShadow::RawCloneAndZero() const { - return new InterpolableShadow(x_->CloneAndZero(), y_->CloneAndZero(), - blur_->CloneAndZero(), spread_->CloneAndZero(), - color_->CloneAndZero(), shadow_style_); + return MakeGarbageCollected<InterpolableShadow>( + x_->CloneAndZero(), y_->CloneAndZero(), blur_->CloneAndZero(), + spread_->CloneAndZero(), color_->CloneAndZero(), shadow_style_); } void InterpolableShadow::Scale(double scale) {
diff --git a/third_party/blink/renderer/core/animation/interpolable_shadow.h b/third_party/blink/renderer/core/animation/interpolable_shadow.h index 1b3c8aa..0717ddb 100644 --- a/third_party/blink/renderer/core/animation/interpolable_shadow.h +++ b/third_party/blink/renderer/core/animation/interpolable_shadow.h
@@ -28,24 +28,21 @@ // [1]: https://drafts.fxtf.org/filter-effects/#funcdef-filter-drop-shadow class InterpolableShadow : public InterpolableValue { public: - InterpolableShadow(std::unique_ptr<InterpolableLength> x, - std::unique_ptr<InterpolableLength> y, - std::unique_ptr<InterpolableLength> blur, - std::unique_ptr<InterpolableLength> spread, - std::unique_ptr<InterpolableColor> color, + InterpolableShadow(InterpolableLength* x, + InterpolableLength* y, + InterpolableLength* blur, + InterpolableLength* spread, + InterpolableColor* color, ShadowStyle); - static std::unique_ptr<InterpolableShadow> Create(const ShadowData&, - double zoom); - static std::unique_ptr<InterpolableShadow> CreateNeutral(); + static InterpolableShadow* Create(const ShadowData&, double zoom); + static InterpolableShadow* CreateNeutral(); - static std::unique_ptr<InterpolableShadow> MaybeConvertCSSValue( - const CSSValue&); + static InterpolableShadow* MaybeConvertCSSValue(const CSSValue&); // Helpers for CSSListInterpolationFunctions. - static PairwiseInterpolationValue MaybeMergeSingles( - std::unique_ptr<InterpolableValue> start, - std::unique_ptr<InterpolableValue> end); + static PairwiseInterpolationValue MaybeMergeSingles(InterpolableValue* start, + InterpolableValue* end); static bool CompatibleForCompositing(const InterpolableValue*, const InterpolableValue*); static void Composite(UnderlyingValue&, @@ -70,16 +67,25 @@ void Add(const InterpolableValue& other) final; void AssertCanInterpolateWith(const InterpolableValue& other) const final; + void Trace(Visitor* v) const override { + InterpolableValue::Trace(v); + v->Trace(x_); + v->Trace(y_); + v->Trace(blur_); + v->Trace(spread_); + v->Trace(color_); + } + private: InterpolableShadow* RawClone() const final; InterpolableShadow* RawCloneAndZero() const final; // The interpolable components of a shadow. These should all be non-null. - std::unique_ptr<InterpolableLength> x_; - std::unique_ptr<InterpolableLength> y_; - std::unique_ptr<InterpolableLength> blur_; - std::unique_ptr<InterpolableLength> spread_; - std::unique_ptr<InterpolableColor> color_; + Member<InterpolableLength> x_; + Member<InterpolableLength> y_; + Member<InterpolableLength> blur_; + Member<InterpolableLength> spread_; + Member<InterpolableColor> color_; ShadowStyle shadow_style_; };
diff --git a/third_party/blink/renderer/core/animation/interpolable_transform_list.cc b/third_party/blink/renderer/core/animation/interpolable_transform_list.cc index 9ef4038..e8fdf49 100644 --- a/third_party/blink/renderer/core/animation/interpolable_transform_list.cc +++ b/third_party/blink/renderer/core/animation/interpolable_transform_list.cc
@@ -10,15 +10,14 @@ namespace blink { // static -std::unique_ptr<InterpolableTransformList> -InterpolableTransformList::ConvertCSSValue( +InterpolableTransformList* InterpolableTransformList::ConvertCSSValue( const CSSValue& css_value, const CSSToLengthConversionData& conversion_data, TransformOperations::BoxSizeDependentMatrixBlending box_size_dependent) { TransformOperations transform = TransformBuilder::CreateTransformOperations(css_value, conversion_data); - return std::make_unique<InterpolableTransformList>(std::move(transform), - box_size_dependent); + return MakeGarbageCollected<InterpolableTransformList>(std::move(transform), + box_size_dependent); } void InterpolableTransformList::PreConcat(
diff --git a/third_party/blink/renderer/core/animation/interpolable_transform_list.h b/third_party/blink/renderer/core/animation/interpolable_transform_list.h index 252d668..5447b3b6 100644 --- a/third_party/blink/renderer/core/animation/interpolable_transform_list.h +++ b/third_party/blink/renderer/core/animation/interpolable_transform_list.h
@@ -28,7 +28,7 @@ : operations_(std::move(operations)), box_size_dependent_(box_size_dependent) {} - static std::unique_ptr<InterpolableTransformList> ConvertCSSValue( + static InterpolableTransformList* ConvertCSSValue( const CSSValue&, const CSSToLengthConversionData&, TransformOperations::BoxSizeDependentMatrixBlending); @@ -53,10 +53,12 @@ void Add(const InterpolableValue& other) final { NOTREACHED(); } void AssertCanInterpolateWith(const InterpolableValue& other) const final; + void Trace(Visitor* v) const override { InterpolableValue::Trace(v); } + private: InterpolableTransformList* RawClone() const final { - return new InterpolableTransformList(TransformOperations(operations_), - box_size_dependent_); + return MakeGarbageCollected<InterpolableTransformList>( + TransformOperations(operations_), box_size_dependent_); } InterpolableTransformList* RawCloneAndZero() const final { NOTREACHED();
diff --git a/third_party/blink/renderer/core/animation/interpolable_value.cc b/third_party/blink/renderer/core/animation/interpolable_value.cc index 567fb62a..c256086c 100644 --- a/third_party/blink/renderer/core/animation/interpolable_value.cc +++ b/third_party/blink/renderer/core/animation/interpolable_value.cc
@@ -9,7 +9,7 @@ namespace blink { bool InterpolableNumber::Equals(const InterpolableValue& other) const { - return value_ == To<InterpolableNumber>(other).value_; + return value_.Value() == To<InterpolableNumber>(other).value_.Value(); } bool InterpolableList::Equals(const InterpolableValue& other) const { @@ -23,6 +23,17 @@ return true; } +double InlinedInterpolableNumber::Interpolate(double to, + const double progress) const { + if (progress == 0 || value_ == to) { + return value_; + } else if (progress == 1) { + return to; + } else { + return value_ * (1 - progress) + to * progress; + } +} + void InterpolableNumber::AssertCanInterpolateWith( const InterpolableValue& other) const { DCHECK(other.IsNumber()); @@ -34,13 +45,7 @@ const auto& to_number = To<InterpolableNumber>(to); auto& result_number = To<InterpolableNumber>(result); - if (progress == 0 || value_ == to_number.value_) - result_number.value_ = value_; - else if (progress == 1) - result_number.value_ = to_number.value_; - else - result_number.value_ = - value_ * (1 - progress) + to_number.value_ * progress; + result_number.Set(value_.Interpolate(to_number.Value(), progress)); } void InterpolableList::AssertCanInterpolateWith( @@ -64,14 +69,15 @@ } InterpolableList* InterpolableList::RawCloneAndZero() const { - auto* result = new InterpolableList(length()); - for (wtf_size_t i = 0; i < length(); i++) + auto* result = MakeGarbageCollected<InterpolableList>(length()); + for (wtf_size_t i = 0; i < length(); i++) { result->Set(i, values_[i]->CloneAndZero()); + } return result; } void InterpolableNumber::Scale(double scale) { - value_ = value_ * scale; + value_.Scale(scale); } void InterpolableList::Scale(double scale) { @@ -80,7 +86,7 @@ } void InterpolableNumber::Add(const InterpolableValue& other) { - value_ += To<InterpolableNumber>(other).value_; + value_.Add(To<InterpolableNumber>(other).value_.Value()); } void InterpolableList::Add(const InterpolableValue& other) {
diff --git a/third_party/blink/renderer/core/animation/interpolable_value.h b/third_party/blink/renderer/core/animation/interpolable_value.h index c3f0544..a15fd1e 100644 --- a/third_party/blink/renderer/core/animation/interpolable_value.h +++ b/third_party/blink/renderer/core/animation/interpolable_value.h
@@ -10,6 +10,8 @@ #include <utility> #include "third_party/blink/renderer/core/core_export.h" +#include "third_party/blink/renderer/platform/heap/collection_support/heap_vector.h" +#include "third_party/blink/renderer/platform/heap/garbage_collected.h" #include "third_party/blink/renderer/platform/wtf/casting.h" #include "third_party/blink/renderer/platform/wtf/vector.h" #include "third_party/blink/renderer/platform/wtf/wtf_size_t.h" @@ -18,12 +20,9 @@ // Represents the components of a PropertySpecificKeyframe's value that change // smoothly as it interpolates to an adjacent value. -class CORE_EXPORT InterpolableValue { - USING_FAST_MALLOC(InterpolableValue); - +class CORE_EXPORT InterpolableValue + : public GarbageCollected<InterpolableValue> { public: - virtual ~InterpolableValue() = default; - // Interpolates from |this| InterpolableValue towards |to| at the given // |progress|, placing the output in |result|. That is: // @@ -67,12 +66,10 @@ // Clone this value, optionally zeroing out the components at the same time. // These are not virtual to allow for covariant return types; see // documentation on RawClone/RawCloneAndZero. - std::unique_ptr<InterpolableValue> Clone() const { - return std::unique_ptr<InterpolableValue>(RawClone()); - } - std::unique_ptr<InterpolableValue> CloneAndZero() const { - return std::unique_ptr<InterpolableValue>(RawCloneAndZero()); - } + InterpolableValue* Clone() const { return RawClone(); } + InterpolableValue* CloneAndZero() const { return RawCloneAndZero(); } + + virtual void Trace(Visitor*) const {} private: // Helper methods to allow covariant Clone/CloneAndZero methods. Concrete @@ -83,14 +80,41 @@ virtual InterpolableValue* RawCloneAndZero() const = 0; }; -class CORE_EXPORT InterpolableNumber final : public InterpolableValue { +class CORE_EXPORT InlinedInterpolableNumber final { + DISALLOW_NEW(); + public: - InterpolableNumber() = default; - explicit InterpolableNumber(double value) : value_(value) {} + InlinedInterpolableNumber() = default; + explicit InlinedInterpolableNumber(double d) : value_(d) {} double Value() const { return value_; } void Set(double value) { value_ = value; } + double Interpolate(double to, const double progress) const; + + void Scale(double scale) { value_ *= scale; } + void Add(double other) { value_ += other; } + void ScaleAndAdd(double scale, double other) { + value_ = value_ * scale + other; + } + + void Trace(Visitor*) const {} + + private: + double value_ = 0.; +}; + +class CORE_EXPORT InterpolableNumber final : public InterpolableValue { + public: + InterpolableNumber() = default; + explicit InterpolableNumber(double value) : value_(value) { + static_assert(std::is_trivially_destructible_v<InterpolableNumber>, + "Require trivial destruction for faster sweeping"); + } + + double Value() const { return value_.Value(); } + void Set(double value) { value_.Set(value); } + // InterpolableValue void Interpolate(const InterpolableValue& to, const double progress, @@ -101,27 +125,34 @@ void Add(const InterpolableValue& other) final; void AssertCanInterpolateWith(const InterpolableValue& other) const final; - std::unique_ptr<InterpolableNumber> Clone() const { - return std::unique_ptr<InterpolableNumber>(RawClone()); - } - std::unique_ptr<InterpolableNumber> CloneAndZero() const { - return std::unique_ptr<InterpolableNumber>(RawCloneAndZero()); + InterpolableNumber* Clone() const { return RawClone(); } + InterpolableNumber* CloneAndZero() const { return RawCloneAndZero(); } + + void Trace(Visitor* v) const override { + InterpolableValue::Trace(v); + v->Trace(value_); } private: InterpolableNumber* RawClone() const final { - return new InterpolableNumber(value_); + return MakeGarbageCollected<InterpolableNumber>(value_.Value()); } InterpolableNumber* RawCloneAndZero() const final { - return new InterpolableNumber(0); + return MakeGarbageCollected<InterpolableNumber>(0); } - double value_ = 0.; + InlinedInterpolableNumber value_; }; class CORE_EXPORT InterpolableList final : public InterpolableValue { public: - explicit InterpolableList(wtf_size_t size) : values_(size) {} + explicit InterpolableList(wtf_size_t size) : values_(size) { + static_assert(std::is_trivially_destructible_v<InterpolableList>, + "Require trivial destruction for faster sweeping"); + } + + explicit InterpolableList(HeapVector<Member<InterpolableValue>>&& values) + : values_(std::move(values)) {} InterpolableList(const InterpolableList&) = delete; InterpolableList& operator=(const InterpolableList&) = delete; @@ -129,22 +160,18 @@ InterpolableList& operator=(InterpolableList&&) = default; const InterpolableValue* Get(wtf_size_t position) const { - return values_[position].get(); + return values_[position]; } - std::unique_ptr<InterpolableValue>& GetMutable(wtf_size_t position) { + Member<InterpolableValue>& GetMutable(wtf_size_t position) { return values_[position]; } wtf_size_t length() const { return values_.size(); } - void Set(wtf_size_t position, std::unique_ptr<InterpolableValue> value) { + void Set(wtf_size_t position, InterpolableValue* value) { values_[position] = std::move(value); } - std::unique_ptr<InterpolableList> Clone() const { - return std::unique_ptr<InterpolableList>(RawClone()); - } - std::unique_ptr<InterpolableList> CloneAndZero() const { - return std::unique_ptr<InterpolableList>(RawCloneAndZero()); - } + InterpolableList* Clone() const { return RawClone(); } + InterpolableList* CloneAndZero() const { return RawCloneAndZero(); } // InterpolableValue void Interpolate(const InterpolableValue& to, @@ -158,71 +185,22 @@ void ScaleAndAdd(double scale, const InterpolableValue& other) final; void AssertCanInterpolateWith(const InterpolableValue& other) const final; + void Trace(Visitor* v) const override { + InterpolableValue::Trace(v); + v->Trace(values_); + } + private: InterpolableList* RawClone() const final { - auto* result = new InterpolableList(length()); - for (wtf_size_t i = 0; i < length(); i++) + auto* result = MakeGarbageCollected<InterpolableList>(length()); + for (wtf_size_t i = 0; i < length(); i++) { result->Set(i, values_[i]->Clone()); + } return result; } InterpolableList* RawCloneAndZero() const final; - Vector<std::unique_ptr<InterpolableValue>> values_; -}; - -template <typename T, size_t Size> -class CORE_EXPORT StaticInterpolableList final { - public: - const T& Get(wtf_size_t position) const { return values_[position]; } - T& GetMutable(wtf_size_t position) { return values_[position]; } - - wtf_size_t length() const { return static_cast<wtf_size_t>(values_.size()); } - - void Set(wtf_size_t position, T value) { - values_[position] = std::move(value); - } - - StaticInterpolableList Clone() const { return *this; } - StaticInterpolableList CloneAndZero() const { return {}; } - - void Interpolate(const StaticInterpolableList& to, - const double progress, - StaticInterpolableList& result) const { - for (wtf_size_t i = 0; i < length(); i++) { - values_[i].Interpolate(to.values_[i], progress, result.values_[i]); - } - } - - bool Equals(const StaticInterpolableList& other) const { - for (wtf_size_t i = 0; i < length(); i++) { - if (!values_[i].Equals(other.values_[i])) - return false; - } - return true; - } - - void Scale(double scale) { - for (auto& val : values_) - val.Scale(scale); - } - - void Add(const StaticInterpolableList& other) { - for (wtf_size_t i = 0; i < length(); i++) - values_[i].Add(other.values_[i]); - } - - // We override this to avoid two passes on the list from the base version. - void ScaleAndAdd(double scale, const StaticInterpolableList& other) { - for (wtf_size_t i = 0; i < length(); i++) - values_[i].ScaleAndAdd(scale, other.values_[i]); - } - - void AssertCanInterpolateWith(const StaticInterpolableList& other) const { - DCHECK_EQ(other.length(), length()); - } - - private: - std::array<T, Size> values_; + HeapVector<Member<InterpolableValue>> values_; }; template <>
diff --git a/third_party/blink/renderer/core/animation/interpolable_value_test.cc b/third_party/blink/renderer/core/animation/interpolable_value_test.cc index 5056eb33..d975e350 100644 --- a/third_party/blink/renderer/core/animation/interpolable_value_test.cc +++ b/third_party/blink/renderer/core/animation/interpolable_value_test.cc
@@ -23,15 +23,14 @@ // the compositor (as z-index isn't compositor-compatible). PropertyHandle property_handle(GetCSSPropertyZIndex()); CSSNumberInterpolationType interpolation_type(property_handle); - InterpolationValue start(std::make_unique<InterpolableNumber>(a)); - InterpolationValue end(std::make_unique<InterpolableNumber>(b)); + InterpolationValue start(MakeGarbageCollected<InterpolableNumber>(a)); + InterpolationValue end(MakeGarbageCollected<InterpolableNumber>(b)); TransitionInterpolation* i = MakeGarbageCollected<TransitionInterpolation>( property_handle, interpolation_type, std::move(start), std::move(end), nullptr, nullptr); i->Interpolate(0, progress); - std::unique_ptr<TypedInterpolationValue> interpolated_value = - i->GetInterpolatedValue(); + TypedInterpolationValue* interpolated_value = i->GetInterpolatedValue(); EXPECT_TRUE(interpolated_value); return To<InterpolableNumber>(interpolated_value->GetInterpolableValue()) .Value(); @@ -43,11 +42,10 @@ base.ScaleAndAdd(scale, add); } - std::unique_ptr<InterpolableValue> InterpolateLists( - std::unique_ptr<InterpolableValue> list_a, - std::unique_ptr<InterpolableValue> list_b, - double progress) { - std::unique_ptr<InterpolableValue> result = list_a->CloneAndZero(); + InterpolableValue* InterpolateLists(InterpolableValue* list_a, + InterpolableValue* list_b, + double progress) { + InterpolableValue* result = list_a->CloneAndZero(); list_a->Interpolate(*list_b, progress, *result); return result; } @@ -63,17 +61,17 @@ } TEST_F(AnimationInterpolableValueTest, SimpleList) { - auto list_a = std::make_unique<InterpolableList>(3); - list_a->Set(0, std::make_unique<InterpolableNumber>(0)); - list_a->Set(1, std::make_unique<InterpolableNumber>(42)); - list_a->Set(2, std::make_unique<InterpolableNumber>(20.5)); + auto* list_a = MakeGarbageCollected<InterpolableList>(3); + list_a->Set(0, MakeGarbageCollected<InterpolableNumber>(0)); + list_a->Set(1, MakeGarbageCollected<InterpolableNumber>(42)); + list_a->Set(2, MakeGarbageCollected<InterpolableNumber>(20.5)); - auto list_b = std::make_unique<InterpolableList>(3); - list_b->Set(0, std::make_unique<InterpolableNumber>(100)); - list_b->Set(1, std::make_unique<InterpolableNumber>(-200)); - list_b->Set(2, std::make_unique<InterpolableNumber>(300)); + auto* list_b = MakeGarbageCollected<InterpolableList>(3); + list_b->Set(0, MakeGarbageCollected<InterpolableNumber>(100)); + list_b->Set(1, MakeGarbageCollected<InterpolableNumber>(-200)); + list_b->Set(2, MakeGarbageCollected<InterpolableNumber>(300)); - std::unique_ptr<InterpolableValue> interpolated_value = + InterpolableValue* interpolated_value = InterpolateLists(std::move(list_a), std::move(list_b), 0.3); const auto& out_list = To<InterpolableList>(*interpolated_value); @@ -83,22 +81,21 @@ } TEST_F(AnimationInterpolableValueTest, NestedList) { - auto list_a = std::make_unique<InterpolableList>(3); - list_a->Set(0, std::make_unique<InterpolableNumber>(0)); - auto sub_list_a = std::make_unique<InterpolableList>(1); - sub_list_a->Set(0, std::make_unique<InterpolableNumber>(100)); - list_a->Set(1, std::move(sub_list_a)); - list_a->Set(2, std::make_unique<InterpolableNumber>(0)); + auto* list_a = MakeGarbageCollected<InterpolableList>(3); + list_a->Set(0, MakeGarbageCollected<InterpolableNumber>(0)); + auto* sub_list_a = MakeGarbageCollected<InterpolableList>(1); + sub_list_a->Set(0, MakeGarbageCollected<InterpolableNumber>(100)); + list_a->Set(1, sub_list_a); + list_a->Set(2, MakeGarbageCollected<InterpolableNumber>(0)); - auto list_b = std::make_unique<InterpolableList>(3); - list_b->Set(0, std::make_unique<InterpolableNumber>(100)); - auto sub_list_b = std::make_unique<InterpolableList>(1); - sub_list_b->Set(0, std::make_unique<InterpolableNumber>(50)); - list_b->Set(1, std::move(sub_list_b)); - list_b->Set(2, std::make_unique<InterpolableNumber>(1)); + auto* list_b = MakeGarbageCollected<InterpolableList>(3); + list_b->Set(0, MakeGarbageCollected<InterpolableNumber>(100)); + auto* sub_list_b = MakeGarbageCollected<InterpolableList>(1); + sub_list_b->Set(0, MakeGarbageCollected<InterpolableNumber>(50)); + list_b->Set(1, sub_list_b); + list_b->Set(2, MakeGarbageCollected<InterpolableNumber>(1)); - std::unique_ptr<InterpolableValue> interpolated_value = - InterpolateLists(std::move(list_a), std::move(list_b), 0.5); + InterpolableValue* interpolated_value = InterpolateLists(list_a, list_b, 0.5); const auto& out_list = To<InterpolableList>(*interpolated_value); EXPECT_FLOAT_EQ(50, To<InterpolableNumber>(out_list.Get(0))->Value()); @@ -109,29 +106,28 @@ } TEST_F(AnimationInterpolableValueTest, ScaleAndAddNumbers) { - std::unique_ptr<InterpolableNumber> base = - std::make_unique<InterpolableNumber>(10); - ScaleAndAdd(*base, 2, *std::make_unique<InterpolableNumber>(1)); + InterpolableNumber* base = MakeGarbageCollected<InterpolableNumber>(10); + ScaleAndAdd(*base, 2, *MakeGarbageCollected<InterpolableNumber>(1)); EXPECT_FLOAT_EQ(21, base->Value()); - base = std::make_unique<InterpolableNumber>(10); - ScaleAndAdd(*base, 0, *std::make_unique<InterpolableNumber>(5)); + base = MakeGarbageCollected<InterpolableNumber>(10); + ScaleAndAdd(*base, 0, *MakeGarbageCollected<InterpolableNumber>(5)); EXPECT_FLOAT_EQ(5, base->Value()); - base = std::make_unique<InterpolableNumber>(10); - ScaleAndAdd(*base, -1, *std::make_unique<InterpolableNumber>(8)); + base = MakeGarbageCollected<InterpolableNumber>(10); + ScaleAndAdd(*base, -1, *MakeGarbageCollected<InterpolableNumber>(8)); EXPECT_FLOAT_EQ(-2, base->Value()); } TEST_F(AnimationInterpolableValueTest, ScaleAndAddLists) { - auto base_list = std::make_unique<InterpolableList>(3); - base_list->Set(0, std::make_unique<InterpolableNumber>(5)); - base_list->Set(1, std::make_unique<InterpolableNumber>(10)); - base_list->Set(2, std::make_unique<InterpolableNumber>(15)); - auto add_list = std::make_unique<InterpolableList>(3); - add_list->Set(0, std::make_unique<InterpolableNumber>(1)); - add_list->Set(1, std::make_unique<InterpolableNumber>(2)); - add_list->Set(2, std::make_unique<InterpolableNumber>(3)); + auto* base_list = MakeGarbageCollected<InterpolableList>(3); + base_list->Set(0, MakeGarbageCollected<InterpolableNumber>(5)); + base_list->Set(1, MakeGarbageCollected<InterpolableNumber>(10)); + base_list->Set(2, MakeGarbageCollected<InterpolableNumber>(15)); + auto* add_list = MakeGarbageCollected<InterpolableList>(3); + add_list->Set(0, MakeGarbageCollected<InterpolableNumber>(1)); + add_list->Set(1, MakeGarbageCollected<InterpolableNumber>(2)); + add_list->Set(2, MakeGarbageCollected<InterpolableNumber>(3)); ScaleAndAdd(*base_list, 2, *add_list); EXPECT_FLOAT_EQ(11, To<InterpolableNumber>(base_list->Get(0))->Value()); EXPECT_FLOAT_EQ(22, To<InterpolableNumber>(base_list->Get(1))->Value());
diff --git a/third_party/blink/renderer/core/animation/interpolation_effect_test.cc b/third_party/blink/renderer/core/animation/interpolation_effect_test.cc index 55ca278..640802ef 100644 --- a/third_party/blink/renderer/core/animation/interpolation_effect_test.cc +++ b/third_party/blink/renderer/core/animation/interpolation_effect_test.cc
@@ -16,7 +16,7 @@ double GetInterpolableNumber(Interpolation* value) { auto* interpolation = To<TransitionInterpolation>(value); - std::unique_ptr<TypedInterpolationValue> interpolated_value = + TypedInterpolationValue* interpolated_value = interpolation->GetInterpolatedValue(); return To<InterpolableNumber>(interpolated_value->GetInterpolableValue()) .Value(); @@ -28,8 +28,8 @@ // the compositor (as z-index isn't compositor-compatible). PropertyHandle property_handle(GetCSSPropertyZIndex()); CSSNumberInterpolationType interpolation_type(property_handle); - InterpolationValue start(std::make_unique<InterpolableNumber>(from)); - InterpolationValue end(std::make_unique<InterpolableNumber>(to)); + InterpolationValue start(MakeGarbageCollected<InterpolableNumber>(from)); + InterpolationValue end(MakeGarbageCollected<InterpolableNumber>(to)); return MakeGarbageCollected<TransitionInterpolation>( property_handle, interpolation_type, std::move(start), std::move(end), nullptr, nullptr);
diff --git a/third_party/blink/renderer/core/animation/interpolation_value.h b/third_party/blink/renderer/core/animation/interpolation_value.h index 14085b2..42fa6c6 100644 --- a/third_party/blink/renderer/core/animation/interpolation_value.h +++ b/third_party/blink/renderer/core/animation/interpolation_value.h
@@ -19,11 +19,10 @@ struct CORE_EXPORT InterpolationValue { DISALLOW_NEW(); - explicit InterpolationValue( - std::unique_ptr<InterpolableValue> interpolable_value, - scoped_refptr<const NonInterpolableValue> non_interpolable_value = - nullptr) - : interpolable_value(std::move(interpolable_value)), + explicit InterpolationValue(InterpolableValue* interpolable_value, + scoped_refptr<const NonInterpolableValue> + non_interpolable_value = nullptr) + : interpolable_value(interpolable_value), non_interpolable_value(std::move(non_interpolable_value)) {} InterpolationValue(std::nullptr_t) {} @@ -37,7 +36,7 @@ non_interpolable_value = std::move(other.non_interpolable_value); } - operator bool() const { return interpolable_value.get(); } + operator bool() const { return interpolable_value.Get(); } InterpolationValue Clone() const { return InterpolationValue( @@ -46,14 +45,33 @@ } void Clear() { - interpolable_value.reset(); + interpolable_value.Clear(); non_interpolable_value = nullptr; } - std::unique_ptr<InterpolableValue> interpolable_value; + void Trace(Visitor* v) const { v->Trace(interpolable_value); } + + Member<InterpolableValue> interpolable_value; scoped_refptr<const NonInterpolableValue> non_interpolable_value; }; +// Wrapper to be used with MakeGarbageCollected<>. +class InterpolationValueGCed : public GarbageCollected<InterpolationValueGCed> { + public: + explicit InterpolationValueGCed(const InterpolationValue& underlying) + : underlying_(underlying.Clone()) {} + + void Trace(Visitor* v) const { v->Trace(underlying_); } + + InterpolationValue& underlying() { return underlying_; } + const InterpolationValue& underlying() const { return underlying_; } + + private: + InterpolationValue underlying_; +}; + } // namespace blink +WTF_ALLOW_CLEAR_UNUSED_SLOTS_WITH_MEM_FUNCTIONS(blink::InterpolationValue) + #endif // THIRD_PARTY_BLINK_RENDERER_CORE_ANIMATION_INTERPOLATION_VALUE_H_
diff --git a/third_party/blink/renderer/core/animation/invalidatable_interpolation.cc b/third_party/blink/renderer/core/animation/invalidatable_interpolation.cc index af47be4..f2e5e90 100644 --- a/third_party/blink/renderer/core/animation/invalidatable_interpolation.cc +++ b/third_party/blink/renderer/core/animation/invalidatable_interpolation.cc
@@ -13,25 +13,28 @@ namespace blink { void InvalidatableInterpolation::Interpolate(int, double fraction) { - if (fraction == current_fraction_) + if (fraction == current_fraction_) { return; + } current_fraction_ = fraction; - if (is_conversion_cached_ && cached_pair_conversion_) + if (is_conversion_cached_ && cached_pair_conversion_) { cached_pair_conversion_->InterpolateValue(fraction, cached_value_); + } // We defer the interpolation to ensureValidConversion() if // |cached_pair_conversion_| is null. } -std::unique_ptr<PairwisePrimitiveInterpolation> +PairwisePrimitiveInterpolation* InvalidatableInterpolation::MaybeConvertPairwise( const InterpolationEnvironment& environment, const UnderlyingValueOwner& underlying_value_owner) const { for (const auto& interpolation_type : *interpolation_types_) { if ((start_keyframe_->IsNeutral() || end_keyframe_->IsNeutral()) && (!underlying_value_owner || - underlying_value_owner.GetType() != *interpolation_type)) + underlying_value_owner.GetType() != *interpolation_type)) { continue; + } ConversionCheckers conversion_checkers; PairwiseInterpolationValue result = interpolation_type->MaybeConvertPairwise( @@ -39,7 +42,7 @@ underlying_value_owner.Value(), conversion_checkers); AddConversionCheckers(*interpolation_type, conversion_checkers); if (result) { - return std::make_unique<PairwisePrimitiveInterpolation>( + return MakeGarbageCollected<PairwisePrimitiveInterpolation>( *interpolation_type, std::move(result.start_interpolable_value), std::move(result.end_interpolable_value), std::move(result.non_interpolable_value)); @@ -48,24 +51,25 @@ return nullptr; } -std::unique_ptr<TypedInterpolationValue> -InvalidatableInterpolation::ConvertSingleKeyframe( +TypedInterpolationValue* InvalidatableInterpolation::ConvertSingleKeyframe( const PropertySpecificKeyframe& keyframe, const InterpolationEnvironment& environment, const UnderlyingValueOwner& underlying_value_owner) const { - if (keyframe.IsNeutral() && !underlying_value_owner) + if (keyframe.IsNeutral() && !underlying_value_owner) { return nullptr; + } for (const auto& interpolation_type : *interpolation_types_) { if (keyframe.IsNeutral() && - underlying_value_owner.GetType() != *interpolation_type) + underlying_value_owner.GetType() != *interpolation_type) { continue; + } ConversionCheckers conversion_checkers; InterpolationValue result = interpolation_type->MaybeConvertSingle( keyframe, environment, underlying_value_owner.Value(), conversion_checkers); AddConversionCheckers(*interpolation_type, conversion_checkers); if (result) { - return std::make_unique<TypedInterpolationValue>( + return MakeGarbageCollected<TypedInterpolationValue>( *interpolation_type, std::move(result.interpolable_value), std::move(result.non_interpolable_value)); } @@ -83,14 +87,14 @@ } } -std::unique_ptr<TypedInterpolationValue> +TypedInterpolationValue* InvalidatableInterpolation::MaybeConvertUnderlyingValue( const InterpolationEnvironment& environment) const { for (const auto& interpolation_type : *interpolation_types_) { InterpolationValue result = interpolation_type->MaybeConvertUnderlyingValue(environment); if (result) { - return std::make_unique<TypedInterpolationValue>( + return MakeGarbageCollected<TypedInterpolationValue>( *interpolation_type, std::move(result.interpolable_value), std::move(result.non_interpolable_value)); } @@ -115,19 +119,21 @@ } is_conversion_cached_ = false; - cached_pair_conversion_.reset(); + cached_pair_conversion_.Clear(); conversion_checkers_.clear(); - cached_value_.reset(); + cached_value_.Clear(); } bool InvalidatableInterpolation::IsConversionCacheValid( const InterpolationEnvironment& environment, const UnderlyingValueOwner& underlying_value_owner) const { - if (!is_conversion_cached_) + if (!is_conversion_cached_) { return false; + } if (IsNeutralKeyframeActive()) { - if (cached_pair_conversion_ && cached_pair_conversion_->IsFlip()) + if (cached_pair_conversion_ && cached_pair_conversion_->IsFlip()) { return false; + } // Pairwise interpolation can never happen between different // InterpolationTypes, neutral values always represent the underlying value. if (!underlying_value_owner || !cached_value_ || @@ -151,17 +157,18 @@ DCHECK(interpolation_types_ && interpolation_types_version_ == environment.GetInterpolationTypesMap().Version()); - if (IsConversionCacheValid(environment, underlying_value_owner)) - return cached_value_.get(); + if (IsConversionCacheValid(environment, underlying_value_owner)) { + return cached_value_.Get(); + } ClearConversionCache(environment); - std::unique_ptr<PairwisePrimitiveInterpolation> pairwise_conversion = + PairwisePrimitiveInterpolation* pairwise_conversion = MaybeConvertPairwise(environment, underlying_value_owner); if (pairwise_conversion) { cached_value_ = pairwise_conversion->InitialValue(); cached_pair_conversion_ = std::move(pairwise_conversion); } else { - cached_pair_conversion_ = std::make_unique<FlipPrimitiveInterpolation>( + cached_pair_conversion_ = MakeGarbageCollected<FlipPrimitiveInterpolation>( ConvertSingleKeyframe(*start_keyframe_, environment, underlying_value_owner), ConvertSingleKeyframe(*end_keyframe_, environment, @@ -169,7 +176,7 @@ } cached_pair_conversion_->InterpolateValue(current_fraction_, cached_value_); is_conversion_cached_ = true; - return cached_value_.get(); + return cached_value_.Get(); } void InvalidatableInterpolation::EnsureValidInterpolationTypes( @@ -190,12 +197,14 @@ void InvalidatableInterpolation::SetFlagIfInheritUsed( InterpolationEnvironment& environment) const { - if (!property_.IsCSSProperty() && !property_.IsPresentationAttribute()) + if (!property_.IsCSSProperty() && !property_.IsPresentationAttribute()) { return; + } StyleResolverState& state = To<CSSInterpolationEnvironment>(environment).GetState(); - if (!state.ParentStyle()) + if (!state.ParentStyle()) { return; + } const CSSValue* start_value = To<CSSPropertySpecificKeyframe>(*start_keyframe_).Value(); const CSSValue* end_value = @@ -207,10 +216,12 @@ } double InvalidatableInterpolation::UnderlyingFraction() const { - if (current_fraction_ == 0) + if (current_fraction_ == 0) { return start_keyframe_->UnderlyingFraction(); - if (current_fraction_ == 1) + } + if (current_fraction_ == 1) { return end_keyframe_->UnderlyingFraction(); + } return cached_pair_conversion_->InterpolateUnderlyingFraction( start_keyframe_->UnderlyingFraction(), end_keyframe_->UnderlyingFraction(), current_fraction_); @@ -259,8 +270,9 @@ const TypedInterpolationValue* current_value = current_interpolation.EnsureValidConversion(environment, underlying_value_owner); - if (!current_value) + if (!current_value) { continue; + } should_apply = true; current_interpolation.SetFlagIfInheritUsed(environment);
diff --git a/third_party/blink/renderer/core/animation/invalidatable_interpolation.h b/third_party/blink/renderer/core/animation/invalidatable_interpolation.h index 9a9769b..19faa0d 100644 --- a/third_party/blink/renderer/core/animation/invalidatable_interpolation.h +++ b/third_party/blink/renderer/core/animation/invalidatable_interpolation.h
@@ -53,19 +53,21 @@ bool IsInvalidatableInterpolation() const override { return true; } const TypedInterpolationValue* GetCachedValueForTesting() const { - return cached_value_.get(); + return cached_value_.Get(); } void Trace(Visitor* visitor) const override { visitor->Trace(start_keyframe_); visitor->Trace(end_keyframe_); + visitor->Trace(cached_pair_conversion_); + visitor->Trace(cached_value_); Interpolation::Trace(visitor); } private: using ConversionCheckers = InterpolationType::ConversionCheckers; - std::unique_ptr<TypedInterpolationValue> MaybeConvertUnderlyingValue( + TypedInterpolationValue* MaybeConvertUnderlyingValue( const InterpolationEnvironment&) const; const TypedInterpolationValue* EnsureValidConversion( InterpolationEnvironment&, @@ -75,10 +77,10 @@ bool IsConversionCacheValid(const InterpolationEnvironment&, const UnderlyingValueOwner&) const; bool IsNeutralKeyframeActive() const; - std::unique_ptr<PairwisePrimitiveInterpolation> MaybeConvertPairwise( + PairwisePrimitiveInterpolation* MaybeConvertPairwise( const InterpolationEnvironment&, const UnderlyingValueOwner&) const; - std::unique_ptr<TypedInterpolationValue> ConvertSingleKeyframe( + TypedInterpolationValue* ConvertSingleKeyframe( const PropertySpecificKeyframe&, const InterpolationEnvironment&, const UnderlyingValueOwner&) const; @@ -94,9 +96,9 @@ Member<PropertySpecificKeyframe> end_keyframe_; double current_fraction_; mutable bool is_conversion_cached_; - mutable std::unique_ptr<PrimitiveInterpolation> cached_pair_conversion_; + mutable Member<PrimitiveInterpolation> cached_pair_conversion_; mutable ConversionCheckers conversion_checkers_; - mutable std::unique_ptr<TypedInterpolationValue> cached_value_; + mutable Member<TypedInterpolationValue> cached_value_; }; template <>
diff --git a/third_party/blink/renderer/core/animation/list_interpolation_functions.cc b/third_party/blink/renderer/core/animation/list_interpolation_functions.cc index dbfa259..d2c5d25 100644 --- a/third_party/blink/renderer/core/animation/list_interpolation_functions.cc +++ b/third_party/blink/renderer/core/animation/list_interpolation_functions.cc
@@ -35,8 +35,7 @@ return *To<InterpolableList>(underlying_list_.MutableInterpolableValue()) .GetMutable(index_); } - void SetInterpolableValue( - std::unique_ptr<InterpolableValue> interpolable_value) final { + void SetInterpolableValue(InterpolableValue* interpolable_value) final { To<InterpolableList>(underlying_list_.MutableInterpolableValue()) .Set(index_, std::move(interpolable_value)); } @@ -138,27 +137,27 @@ } if (start_length == 0) { - std::unique_ptr<InterpolableValue> start_interpolable_value = + InterpolableValue* start_interpolable_value = end.interpolable_value->CloneAndZero(); - return PairwiseInterpolationValue(std::move(start_interpolable_value), + return PairwiseInterpolationValue(start_interpolable_value, std::move(end.interpolable_value), std::move(end.non_interpolable_value)); } if (end_length == 0) { - std::unique_ptr<InterpolableValue> end_interpolable_value = + InterpolableValue* end_interpolable_value = start.interpolable_value->CloneAndZero(); return PairwiseInterpolationValue(std::move(start.interpolable_value), - std::move(end_interpolable_value), + end_interpolable_value, std::move(start.non_interpolable_value)); } const wtf_size_t final_length = MatchLengths(start_length, end_length, length_matching_strategy); - auto result_start_interpolable_list = - std::make_unique<InterpolableList>(final_length); - auto result_end_interpolable_list = - std::make_unique<InterpolableList>(final_length); + auto* result_start_interpolable_list = + MakeGarbageCollected<InterpolableList>(final_length); + auto* result_end_interpolable_list = + MakeGarbageCollected<InterpolableList>(final_length); Vector<scoped_refptr<const NonInterpolableValue>> result_non_interpolable_values(final_length); @@ -237,13 +236,13 @@ if (current_length == length) return; DCHECK_LT(current_length, length); - auto new_interpolable_list = std::make_unique<InterpolableList>(length); + auto* new_interpolable_list = MakeGarbageCollected<InterpolableList>(length); Vector<scoped_refptr<const NonInterpolableValue>> new_non_interpolable_values( length); for (wtf_size_t i = length; i-- > 0;) { new_interpolable_list->Set( i, i < current_length - ? std::move(interpolable_list.GetMutable(i)) + ? std::move(interpolable_list.GetMutable(i).Get()) : interpolable_list.Get(i % current_length)->Clone()); new_non_interpolable_values[i] = non_interpolable_list.Get(i % current_length); @@ -267,8 +266,8 @@ To<NonInterpolableList>(*length_value.non_interpolable_value); const wtf_size_t target_length = target_interpolable_list.length(); DCHECK_LT(current_length, target_length); - auto new_interpolable_list = - std::make_unique<InterpolableList>(target_length); + auto* new_interpolable_list = + MakeGarbageCollected<InterpolableList>(target_length); Vector<scoped_refptr<const NonInterpolableValue>> new_non_interpolable_values( target_length); wtf_size_t index = 0;
diff --git a/third_party/blink/renderer/core/animation/list_interpolation_functions.h b/third_party/blink/renderer/core/animation/list_interpolation_functions.h index ef66772..84b8347 100644 --- a/third_party/blink/renderer/core/animation/list_interpolation_functions.h +++ b/third_party/blink/renderer/core/animation/list_interpolation_functions.h
@@ -25,7 +25,7 @@ template <typename CreateItemCallback> static InterpolationValue CreateList(wtf_size_t length, CreateItemCallback); static InterpolationValue CreateEmptyList() { - return InterpolationValue(std::make_unique<InterpolableList>(0)); + return InterpolationValue(MakeGarbageCollected<InterpolableList>(0)); } enum class LengthMatchingStrategy { @@ -145,7 +145,7 @@ CreateItemCallback create_item) { if (length == 0) return CreateEmptyList(); - auto interpolable_list = std::make_unique<InterpolableList>(length); + auto* interpolable_list = MakeGarbageCollected<InterpolableList>(length); Vector<scoped_refptr<const NonInterpolableValue>> non_interpolable_values( length); for (wtf_size_t i = 0; i < length; i++) { @@ -156,7 +156,7 @@ non_interpolable_values[i] = std::move(item.non_interpolable_value); } return InterpolationValue( - std::move(interpolable_list), + interpolable_list, NonInterpolableList::Create(std::move(non_interpolable_values))); }
diff --git a/third_party/blink/renderer/core/animation/list_interpolation_functions_test.cc b/third_party/blink/renderer/core/animation/list_interpolation_functions_test.cc index 697d1223..e13dba1f 100644 --- a/third_party/blink/renderer/core/animation/list_interpolation_functions_test.cc +++ b/third_party/blink/renderer/core/animation/list_interpolation_functions_test.cc
@@ -56,8 +56,7 @@ return *interpolation_value_.interpolable_value; } - void SetInterpolableValue( - std::unique_ptr<InterpolableValue> interpolable_value) final { + void SetInterpolableValue(InterpolableValue* interpolable_value) final { interpolation_value_.interpolable_value = std::move(interpolable_value); } @@ -81,7 +80,7 @@ return ListInterpolationFunctions::CreateList( values.size(), [&values](wtf_size_t i) { return InterpolationValue( - std::make_unique<InterpolableNumber>(values[i].first), + MakeGarbageCollected<InterpolableNumber>(values[i].first), TestNonInterpolableValue::Create(values[i].second)); }); } @@ -92,7 +91,7 @@ return ListInterpolationFunctions::CreateList( values.size(), [&values](wtf_size_t i) { return InterpolationValue( - std::make_unique<InterpolableNumber>(values[i]), nullptr); + MakeGarbageCollected<InterpolableNumber>(values[i]), nullptr); }); } @@ -101,7 +100,7 @@ InterpolationValue CreateNonInterpolableList(const Vector<int>& values) { return ListInterpolationFunctions::CreateList( values.size(), [&values](wtf_size_t i) { - return InterpolationValue(std::make_unique<InterpolableNumber>(0), + return InterpolationValue(MakeGarbageCollected<InterpolableNumber>(0), TestNonInterpolableValue::Create(values[i])); }); }
diff --git a/third_party/blink/renderer/core/animation/pairwise_interpolation_value.h b/third_party/blink/renderer/core/animation/pairwise_interpolation_value.h index fef0c32..e3da5ce 100644 --- a/third_party/blink/renderer/core/animation/pairwise_interpolation_value.h +++ b/third_party/blink/renderer/core/animation/pairwise_interpolation_value.h
@@ -17,26 +17,30 @@ struct PairwiseInterpolationValue { DISALLOW_NEW(); - PairwiseInterpolationValue( - std::unique_ptr<InterpolableValue> start_interpolable_value, - std::unique_ptr<InterpolableValue> end_interpolable_value, - scoped_refptr<const NonInterpolableValue> non_interpolable_value = - nullptr) - : start_interpolable_value(std::move(start_interpolable_value)), - end_interpolable_value(std::move(end_interpolable_value)), + PairwiseInterpolationValue(InterpolableValue* start_interpolable_value, + InterpolableValue* end_interpolable_value, + scoped_refptr<const NonInterpolableValue> + non_interpolable_value = nullptr) + : start_interpolable_value(start_interpolable_value), + end_interpolable_value(end_interpolable_value), non_interpolable_value(std::move(non_interpolable_value)) {} PairwiseInterpolationValue(std::nullptr_t) {} PairwiseInterpolationValue(PairwiseInterpolationValue&& other) - : start_interpolable_value(std::move(other.start_interpolable_value)), - end_interpolable_value(std::move(other.end_interpolable_value)), + : start_interpolable_value(other.start_interpolable_value), + end_interpolable_value(other.end_interpolable_value), non_interpolable_value(std::move(other.non_interpolable_value)) {} - operator bool() const { return start_interpolable_value.get(); } + operator bool() const { return start_interpolable_value.Get(); } - std::unique_ptr<InterpolableValue> start_interpolable_value; - std::unique_ptr<InterpolableValue> end_interpolable_value; + void Trace(Visitor* v) const { + v->Trace(start_interpolable_value); + v->Trace(end_interpolable_value); + } + + Member<InterpolableValue> start_interpolable_value; + Member<InterpolableValue> end_interpolable_value; scoped_refptr<const NonInterpolableValue> non_interpolable_value; };
diff --git a/third_party/blink/renderer/core/animation/path_interpolation_functions.cc b/third_party/blink/renderer/core/animation/path_interpolation_functions.cc index 900a8be..dd81551 100644 --- a/third_party/blink/renderer/core/animation/path_interpolation_functions.cc +++ b/third_party/blink/renderer/core/animation/path_interpolation_functions.cc
@@ -72,7 +72,7 @@ SVGPathByteStreamSource path_source(style_path->ByteStream()); wtf_size_t length = 0; PathCoordinates current_coordinates; - Vector<std::unique_ptr<InterpolableValue>> interpolable_path_segs; + HeapVector<Member<InterpolableValue>> interpolable_path_segs; Vector<SVGPathSegType> path_seg_types; while (path_source.HasMoreData()) { @@ -87,17 +87,18 @@ length++; } - auto path_args = std::make_unique<InterpolableList>(length); + auto* path_args = MakeGarbageCollected<InterpolableList>(length); for (wtf_size_t i = 0; i < interpolable_path_segs.size(); i++) path_args->Set(i, std::move(interpolable_path_segs[i])); - auto result = std::make_unique<InterpolableList>(kPathComponentIndexCount); - result->Set(kPathArgsIndex, std::move(path_args)); - result->Set(kPathNeutralIndex, std::make_unique<InterpolableNumber>(0)); + auto* result = + MakeGarbageCollected<InterpolableList>(kPathComponentIndexCount); + result->Set(kPathArgsIndex, path_args); + result->Set(kPathNeutralIndex, MakeGarbageCollected<InterpolableNumber>(0)); - return InterpolationValue(std::move(result), - SVGPathNonInterpolableValue::Create( - path_seg_types, style_path->GetWindRule())); + return InterpolationValue( + result, SVGPathNonInterpolableValue::Create(path_seg_types, + style_path->GetWindRule())); } class UnderlyingPathSegTypesChecker final @@ -142,14 +143,14 @@ InterpolationType::ConversionCheckers& conversion_checkers) { conversion_checkers.push_back( UnderlyingPathSegTypesChecker::Create(underlying)); - auto result = std::make_unique<InterpolableList>(kPathComponentIndexCount); + auto* result = + MakeGarbageCollected<InterpolableList>(kPathComponentIndexCount); result->Set(kPathArgsIndex, To<InterpolableList>(*underlying.interpolable_value) .Get(kPathArgsIndex) ->CloneAndZero()); - result->Set(kPathNeutralIndex, std::make_unique<InterpolableNumber>(1)); - return InterpolationValue(std::move(result), - underlying.non_interpolable_value.get()); + result->Set(kPathNeutralIndex, MakeGarbageCollected<InterpolableNumber>(1)); + return InterpolationValue(result, underlying.non_interpolable_value.get()); } static bool PathSegTypesMatch(const Vector<SVGPathSegType>& a,
diff --git a/third_party/blink/renderer/core/animation/primitive_interpolation.h b/third_party/blink/renderer/core/animation/primitive_interpolation.h index 2191e77..5028661 100644 --- a/third_party/blink/renderer/core/animation/primitive_interpolation.h +++ b/third_party/blink/renderer/core/animation/primitive_interpolation.h
@@ -21,9 +21,7 @@ // Represents an animation's effect between an adjacent pair of // PropertySpecificKeyframes after converting the keyframes to an internal // format with respect to the animation environment and underlying values. -class PrimitiveInterpolation { - USING_FAST_MALLOC(PrimitiveInterpolation); - +class PrimitiveInterpolation : public GarbageCollected<PrimitiveInterpolation> { public: PrimitiveInterpolation(const PrimitiveInterpolation&) = delete; PrimitiveInterpolation& operator=(const PrimitiveInterpolation&) = delete; @@ -31,12 +29,14 @@ virtual void InterpolateValue( double fraction, - std::unique_ptr<TypedInterpolationValue>& result) const = 0; + Member<TypedInterpolationValue>& result) const = 0; virtual double InterpolateUnderlyingFraction(double start, double end, double fraction) const = 0; virtual bool IsFlip() const { return false; } + virtual void Trace(Visitor*) const {} + protected: PrimitiveInterpolation() = default; }; @@ -47,12 +47,12 @@ public: PairwisePrimitiveInterpolation( const InterpolationType& type, - std::unique_ptr<InterpolableValue> start, - std::unique_ptr<InterpolableValue> end, + InterpolableValue* start, + InterpolableValue* end, scoped_refptr<const NonInterpolableValue> non_interpolable_value) : type_(type), - start_(std::move(start)), - end_(std::move(end)), + start_(start), + end_(end), non_interpolable_value_(std::move(non_interpolable_value)) { DCHECK(start_); DCHECK(end_); @@ -62,15 +62,20 @@ const InterpolationType& GetType() const { return type_; } - std::unique_ptr<TypedInterpolationValue> InitialValue() const { - return std::make_unique<TypedInterpolationValue>(type_, start_->Clone(), - non_interpolable_value_); + TypedInterpolationValue* InitialValue() const { + return MakeGarbageCollected<TypedInterpolationValue>( + type_, start_->Clone(), non_interpolable_value_); + } + + void Trace(Visitor* v) const override { + PrimitiveInterpolation::Trace(v); + v->Trace(start_); + v->Trace(end_); } private: - void InterpolateValue( - double fraction, - std::unique_ptr<TypedInterpolationValue>& result) const final { + void InterpolateValue(double fraction, + Member<TypedInterpolationValue>& result) const final { DCHECK(result); DCHECK_EQ(&result->GetType(), &type_); DCHECK_EQ(result->GetNonInterpolableValue(), non_interpolable_value_.get()); @@ -86,8 +91,8 @@ } const InterpolationType& type_; - std::unique_ptr<InterpolableValue> start_; - std::unique_ptr<InterpolableValue> end_; + Member<InterpolableValue> start_; + Member<InterpolableValue> end_; scoped_refptr<const NonInterpolableValue> non_interpolable_value_; }; @@ -95,23 +100,29 @@ // behaviour eg. "auto" and "0px". class FlipPrimitiveInterpolation : public PrimitiveInterpolation { public: - FlipPrimitiveInterpolation(std::unique_ptr<TypedInterpolationValue> start, - std::unique_ptr<TypedInterpolationValue> end) - : start_(std::move(start)), - end_(std::move(end)), + FlipPrimitiveInterpolation(TypedInterpolationValue* start, + TypedInterpolationValue* end) + : start_(start), + end_(end), last_fraction_(std::numeric_limits<double>::quiet_NaN()) {} ~FlipPrimitiveInterpolation() override = default; + void Trace(Visitor* v) const override { + PrimitiveInterpolation::Trace(v); + v->Trace(start_); + v->Trace(end_); + } + private: - void InterpolateValue( - double fraction, - std::unique_ptr<TypedInterpolationValue>& result) const final { + void InterpolateValue(double fraction, + Member<TypedInterpolationValue>& result) const final { if (!std::isnan(last_fraction_) && - (fraction < 0.5) == (last_fraction_ < 0.5)) + (fraction < 0.5) == (last_fraction_ < 0.5)) { return; + } const TypedInterpolationValue* side = - ((fraction < 0.5) ? start_ : end_).get(); + ((fraction < 0.5) ? start_ : end_).Get(); result = side ? side->Clone() : nullptr; last_fraction_ = fraction; } @@ -124,8 +135,8 @@ bool IsFlip() const final { return true; } - std::unique_ptr<TypedInterpolationValue> start_; - std::unique_ptr<TypedInterpolationValue> end_; + Member<TypedInterpolationValue> start_; + Member<TypedInterpolationValue> end_; mutable double last_fraction_; };
diff --git a/third_party/blink/renderer/core/animation/size_interpolation_functions.cc b/third_party/blink/renderer/core/animation/size_interpolation_functions.cc index b3fb215..d5e0805 100644 --- a/third_party/blink/renderer/core/animation/size_interpolation_functions.cc +++ b/third_party/blink/renderer/core/animation/size_interpolation_functions.cc
@@ -65,7 +65,7 @@ }; static InterpolationValue ConvertKeyword(CSSValueID keyword) { - return InterpolationValue(std::make_unique<InterpolableList>(0), + return InterpolationValue(MakeGarbageCollected<InterpolableList>(0), CSSSizeNonInterpolableValue::Create(keyword)); }
diff --git a/third_party/blink/renderer/core/animation/svg_angle_interpolation_type.cc b/third_party/blink/renderer/core/animation/svg_angle_interpolation_type.cc index 918a037..e239e7ed0 100644 --- a/third_party/blink/renderer/core/animation/svg_angle_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/svg_angle_interpolation_type.cc
@@ -14,15 +14,15 @@ InterpolationValue SVGAngleInterpolationType::MaybeConvertNeutral( const InterpolationValue&, ConversionCheckers&) const { - return InterpolationValue(std::make_unique<InterpolableNumber>(0)); + return InterpolationValue(MakeGarbageCollected<InterpolableNumber>(0)); } InterpolationValue SVGAngleInterpolationType::MaybeConvertSVGValue( const SVGPropertyBase& svg_value) const { if (!To<SVGAngle>(svg_value).IsNumeric()) return nullptr; - return InterpolationValue( - std::make_unique<InterpolableNumber>(To<SVGAngle>(svg_value).Value())); + return InterpolationValue(MakeGarbageCollected<InterpolableNumber>( + To<SVGAngle>(svg_value).Value())); } SVGPropertyBase* SVGAngleInterpolationType::AppliedSVGValue(
diff --git a/third_party/blink/renderer/core/animation/svg_integer_interpolation_type.cc b/third_party/blink/renderer/core/animation/svg_integer_interpolation_type.cc index 634ea5b..5a62a13 100644 --- a/third_party/blink/renderer/core/animation/svg_integer_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/svg_integer_interpolation_type.cc
@@ -13,15 +13,16 @@ InterpolationValue SVGIntegerInterpolationType::MaybeConvertNeutral( const InterpolationValue&, ConversionCheckers&) const { - return InterpolationValue(std::make_unique<InterpolableNumber>(0)); + return InterpolationValue(MakeGarbageCollected<InterpolableNumber>(0)); } InterpolationValue SVGIntegerInterpolationType::MaybeConvertSVGValue( const SVGPropertyBase& svg_value) const { - if (svg_value.GetType() != kAnimatedInteger) + if (svg_value.GetType() != kAnimatedInteger) { return nullptr; - return InterpolationValue( - std::make_unique<InterpolableNumber>(To<SVGInteger>(svg_value).Value())); + } + return InterpolationValue(MakeGarbageCollected<InterpolableNumber>( + To<SVGInteger>(svg_value).Value())); } SVGPropertyBase* SVGIntegerInterpolationType::AppliedSVGValue(
diff --git a/third_party/blink/renderer/core/animation/svg_integer_optional_integer_interpolation_type.cc b/third_party/blink/renderer/core/animation/svg_integer_optional_integer_interpolation_type.cc index 2683899f..55dc1fa 100644 --- a/third_party/blink/renderer/core/animation/svg_integer_optional_integer_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/svg_integer_optional_integer_interpolation_type.cc
@@ -17,26 +17,27 @@ SVGIntegerOptionalIntegerInterpolationType::MaybeConvertNeutral( const InterpolationValue&, ConversionCheckers&) const { - auto result = std::make_unique<InterpolableList>(2); - result->Set(0, std::make_unique<InterpolableNumber>(0)); - result->Set(1, std::make_unique<InterpolableNumber>(0)); - return InterpolationValue(std::move(result)); + auto* result = MakeGarbageCollected<InterpolableList>(2); + result->Set(0, MakeGarbageCollected<InterpolableNumber>(0)); + result->Set(1, MakeGarbageCollected<InterpolableNumber>(0)); + return InterpolationValue(result); } InterpolationValue SVGIntegerOptionalIntegerInterpolationType::MaybeConvertSVGValue( const SVGPropertyBase& svg_value) const { - if (svg_value.GetType() != kAnimatedIntegerOptionalInteger) + if (svg_value.GetType() != kAnimatedIntegerOptionalInteger) { return nullptr; + } const auto& integer_optional_integer = To<SVGIntegerOptionalInteger>(svg_value); - auto result = std::make_unique<InterpolableList>(2); - result->Set(0, std::make_unique<InterpolableNumber>( + auto* result = MakeGarbageCollected<InterpolableList>(2); + result->Set(0, MakeGarbageCollected<InterpolableNumber>( integer_optional_integer.FirstInteger()->Value())); - result->Set(1, std::make_unique<InterpolableNumber>( + result->Set(1, MakeGarbageCollected<InterpolableNumber>( integer_optional_integer.SecondInteger()->Value())); - return InterpolationValue(std::move(result)); + return InterpolationValue(result); } static SVGInteger* ToPositiveInteger(const InterpolableValue* number) {
diff --git a/third_party/blink/renderer/core/animation/svg_length_interpolation_type.cc b/third_party/blink/renderer/core/animation/svg_length_interpolation_type.cc index 96a7958..2bcee48 100644 --- a/third_party/blink/renderer/core/animation/svg_length_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/svg_length_interpolation_type.cc
@@ -11,8 +11,7 @@ namespace blink { -std::unique_ptr<InterpolableValue> -SVGLengthInterpolationType::NeutralInterpolableValue() { +InterpolableValue* SVGLengthInterpolationType::NeutralInterpolableValue() { return InterpolableLength::CreateNeutral(); }
diff --git a/third_party/blink/renderer/core/animation/svg_length_interpolation_type.h b/third_party/blink/renderer/core/animation/svg_length_interpolation_type.h index 1978155..f67d402 100644 --- a/third_party/blink/renderer/core/animation/svg_length_interpolation_type.h +++ b/third_party/blink/renderer/core/animation/svg_length_interpolation_type.h
@@ -22,7 +22,7 @@ SVGLength::NegativeValuesForbiddenForAnimatedLengthAttribute( attribute)) {} - static std::unique_ptr<InterpolableValue> NeutralInterpolableValue(); + static InterpolableValue* NeutralInterpolableValue(); static InterpolationValue MaybeConvertSVGLength(const SVGLength&); static SVGLength* ResolveInterpolableSVGLength( const InterpolableValue&,
diff --git a/third_party/blink/renderer/core/animation/svg_length_list_interpolation_type.cc b/third_party/blink/renderer/core/animation/svg_length_list_interpolation_type.cc index 8073487..9bf1efe1 100644 --- a/third_party/blink/renderer/core/animation/svg_length_list_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/svg_length_list_interpolation_type.cc
@@ -25,10 +25,10 @@ if (underlying_length == 0) return nullptr; - auto result = std::make_unique<InterpolableList>(underlying_length); + auto* result = MakeGarbageCollected<InterpolableList>(underlying_length); for (wtf_size_t i = 0; i < underlying_length; i++) result->Set(i, SVGLengthInterpolationType::NeutralInterpolableValue()); - return InterpolationValue(std::move(result)); + return InterpolationValue(result); } InterpolationValue SVGLengthListInterpolationType::MaybeConvertSVGValue( @@ -37,7 +37,7 @@ return nullptr; const auto& length_list = To<SVGLengthList>(svg_value); - auto result = std::make_unique<InterpolableList>(length_list.length()); + auto* result = MakeGarbageCollected<InterpolableList>(length_list.length()); for (wtf_size_t i = 0; i < length_list.length(); i++) { InterpolationValue component = SVGLengthInterpolationType::MaybeConvertSVGLength(*length_list.at(i)); @@ -45,7 +45,7 @@ return nullptr; result->Set(i, std::move(component.interpolable_value)); } - return InterpolationValue(std::move(result)); + return InterpolationValue(result); } PairwiseInterpolationValue SVGLengthListInterpolationType::MaybeMergeSingles(
diff --git a/third_party/blink/renderer/core/animation/svg_number_interpolation_type.cc b/third_party/blink/renderer/core/animation/svg_number_interpolation_type.cc index 3421e386..279eed7f 100644 --- a/third_party/blink/renderer/core/animation/svg_number_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/svg_number_interpolation_type.cc
@@ -24,15 +24,16 @@ InterpolationValue SVGNumberInterpolationType::MaybeConvertNeutral( const InterpolationValue&, ConversionCheckers&) const { - return InterpolationValue(std::make_unique<InterpolableNumber>(0)); + return InterpolationValue(MakeGarbageCollected<InterpolableNumber>(0)); } InterpolationValue SVGNumberInterpolationType::MaybeConvertSVGValue( const SVGPropertyBase& svg_value) const { - if (svg_value.GetType() != kAnimatedNumber) + if (svg_value.GetType() != kAnimatedNumber) { return nullptr; - return InterpolationValue( - std::make_unique<InterpolableNumber>(To<SVGNumber>(svg_value).Value())); + } + return InterpolationValue(MakeGarbageCollected<InterpolableNumber>( + To<SVGNumber>(svg_value).Value())); } SVGPropertyBase* SVGNumberInterpolationType::AppliedSVGValue(
diff --git a/third_party/blink/renderer/core/animation/svg_number_list_interpolation_type.cc b/third_party/blink/renderer/core/animation/svg_number_list_interpolation_type.cc index 790c28a..f9c23374 100644 --- a/third_party/blink/renderer/core/animation/svg_number_list_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/svg_number_list_interpolation_type.cc
@@ -25,10 +25,10 @@ if (underlying_length == 0) return nullptr; - auto result = std::make_unique<InterpolableList>(underlying_length); + auto* result = MakeGarbageCollected<InterpolableList>(underlying_length); for (wtf_size_t i = 0; i < underlying_length; i++) - result->Set(i, std::make_unique<InterpolableNumber>(0)); - return InterpolationValue(std::move(result)); + result->Set(i, MakeGarbageCollected<InterpolableNumber>(0)); + return InterpolationValue(result); } InterpolationValue SVGNumberListInterpolationType::MaybeConvertSVGValue( @@ -37,12 +37,12 @@ return nullptr; const SVGNumberList& number_list = To<SVGNumberList>(svg_value); - auto result = std::make_unique<InterpolableList>(number_list.length()); + auto* result = MakeGarbageCollected<InterpolableList>(number_list.length()); for (wtf_size_t i = 0; i < number_list.length(); i++) { - result->Set( - i, std::make_unique<InterpolableNumber>(number_list.at(i)->Value())); + result->Set(i, MakeGarbageCollected<InterpolableNumber>( + number_list.at(i)->Value())); } - return InterpolationValue(std::move(result)); + return InterpolationValue(result); } PairwiseInterpolationValue SVGNumberListInterpolationType::MaybeMergeSingles( @@ -56,20 +56,20 @@ return InterpolationType::MaybeMergeSingles(std::move(start), std::move(end)); } -static void PadWithZeroes(std::unique_ptr<InterpolableValue>& list_pointer, +static void PadWithZeroes(Member<InterpolableValue>& list_pointer, wtf_size_t padded_length) { auto& list = To<InterpolableList>(*list_pointer); if (list.length() >= padded_length) return; - auto result = std::make_unique<InterpolableList>(padded_length); + auto* result = MakeGarbageCollected<InterpolableList>(padded_length); wtf_size_t i = 0; for (; i < list.length(); i++) result->Set(i, std::move(list.GetMutable(i))); for (; i < padded_length; i++) - result->Set(i, std::make_unique<InterpolableNumber>(0)); - list_pointer = std::move(result); + result->Set(i, MakeGarbageCollected<InterpolableNumber>(0)); + list_pointer = result; } void SVGNumberListInterpolationType::Composite(
diff --git a/third_party/blink/renderer/core/animation/svg_number_optional_number_interpolation_type.cc b/third_party/blink/renderer/core/animation/svg_number_optional_number_interpolation_type.cc index 39032cc6..ab221ce 100644 --- a/third_party/blink/renderer/core/animation/svg_number_optional_number_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/svg_number_optional_number_interpolation_type.cc
@@ -17,25 +17,26 @@ SVGNumberOptionalNumberInterpolationType::MaybeConvertNeutral( const InterpolationValue&, ConversionCheckers&) const { - auto result = std::make_unique<InterpolableList>(2); - result->Set(0, std::make_unique<InterpolableNumber>(0)); - result->Set(1, std::make_unique<InterpolableNumber>(0)); - return InterpolationValue(std::move(result)); + auto* result = MakeGarbageCollected<InterpolableList>(2); + result->Set(0, MakeGarbageCollected<InterpolableNumber>(0)); + result->Set(1, MakeGarbageCollected<InterpolableNumber>(0)); + return InterpolationValue(result); } InterpolationValue SVGNumberOptionalNumberInterpolationType::MaybeConvertSVGValue( const SVGPropertyBase& svg_value) const { - if (svg_value.GetType() != kAnimatedNumberOptionalNumber) + if (svg_value.GetType() != kAnimatedNumberOptionalNumber) { return nullptr; + } const auto& number_optional_number = To<SVGNumberOptionalNumber>(svg_value); - auto result = std::make_unique<InterpolableList>(2); - result->Set(0, std::make_unique<InterpolableNumber>( + auto* result = MakeGarbageCollected<InterpolableList>(2); + result->Set(0, MakeGarbageCollected<InterpolableNumber>( number_optional_number.FirstNumber()->Value())); - result->Set(1, std::make_unique<InterpolableNumber>( + result->Set(1, MakeGarbageCollected<InterpolableNumber>( number_optional_number.SecondNumber()->Value())); - return InterpolationValue(std::move(result)); + return InterpolationValue(result); } SVGPropertyBase* SVGNumberOptionalNumberInterpolationType::AppliedSVGValue(
diff --git a/third_party/blink/renderer/core/animation/svg_path_seg_interpolation_functions.cc b/third_party/blink/renderer/core/animation/svg_path_seg_interpolation_functions.cc index 931e8e6..25d3b497 100644 --- a/third_party/blink/renderer/core/animation/svg_path_seg_interpolation_functions.cc +++ b/third_party/blink/renderer/core/animation/svg_path_seg_interpolation_functions.cc
@@ -10,10 +10,10 @@ namespace blink { -std::unique_ptr<InterpolableNumber> ConsumeControlAxis(double value, - bool is_absolute, - double current_value) { - return std::make_unique<InterpolableNumber>( +InterpolableNumber* ConsumeControlAxis(double value, + bool is_absolute, + double current_value) { + return MakeGarbageCollected<InterpolableNumber>( is_absolute ? value : current_value + value); } @@ -24,13 +24,15 @@ return ClampTo<float>(is_absolute ? value : value - current_value); } -std::unique_ptr<InterpolableNumber> -ConsumeCoordinateAxis(double value, bool is_absolute, double& current_value) { - if (is_absolute) +InterpolableNumber* ConsumeCoordinateAxis(double value, + bool is_absolute, + double& current_value) { + if (is_absolute) { current_value = value; - else + } else { current_value += value; - return std::make_unique<InterpolableNumber>(current_value); + } + return MakeGarbageCollected<InterpolableNumber>(current_value); } float ConsumeInterpolableCoordinateAxis(const InterpolableValue* number, @@ -42,12 +44,11 @@ : current_value - previous_value); } -std::unique_ptr<InterpolableValue> ConsumeClosePath( - const PathSegmentData&, - PathCoordinates& coordinates) { +InterpolableValue* ConsumeClosePath(const PathSegmentData&, + PathCoordinates& coordinates) { coordinates.current_x = coordinates.initial_x; coordinates.current_y = coordinates.initial_y; - return std::make_unique<InterpolableList>(0); + return MakeGarbageCollected<InterpolableList>(0); } PathSegmentData ConsumeInterpolableClosePath(const InterpolableValue&, @@ -61,11 +62,10 @@ return segment; } -std::unique_ptr<InterpolableValue> ConsumeSingleCoordinate( - const PathSegmentData& segment, - PathCoordinates& coordinates) { +InterpolableValue* ConsumeSingleCoordinate(const PathSegmentData& segment, + PathCoordinates& coordinates) { bool is_absolute = IsAbsolutePathSegType(segment.command); - auto result = std::make_unique<InterpolableList>(2); + auto* result = MakeGarbageCollected<InterpolableList>(2); result->Set(0, ConsumeCoordinateAxis(segment.X(), is_absolute, coordinates.current_x)); result->Set(1, ConsumeCoordinateAxis(segment.Y(), is_absolute, @@ -78,7 +78,7 @@ coordinates.initial_y = coordinates.current_y; } - return std::move(result); + return result; } PathSegmentData ConsumeInterpolableSingleCoordinate( @@ -104,11 +104,10 @@ return segment; } -std::unique_ptr<InterpolableValue> ConsumeCurvetoCubic( - const PathSegmentData& segment, - PathCoordinates& coordinates) { +InterpolableValue* ConsumeCurvetoCubic(const PathSegmentData& segment, + PathCoordinates& coordinates) { bool is_absolute = IsAbsolutePathSegType(segment.command); - auto result = std::make_unique<InterpolableList>(6); + auto* result = MakeGarbageCollected<InterpolableList>(6); result->Set( 0, ConsumeControlAxis(segment.X1(), is_absolute, coordinates.current_x)); result->Set( @@ -121,7 +120,7 @@ coordinates.current_x)); result->Set(5, ConsumeCoordinateAxis(segment.Y(), is_absolute, coordinates.current_y)); - return std::move(result); + return result; } PathSegmentData ConsumeInterpolableCurvetoCubic(const InterpolableValue& value, @@ -146,11 +145,10 @@ return segment; } -std::unique_ptr<InterpolableValue> ConsumeCurvetoQuadratic( - const PathSegmentData& segment, - PathCoordinates& coordinates) { +InterpolableValue* ConsumeCurvetoQuadratic(const PathSegmentData& segment, + PathCoordinates& coordinates) { bool is_absolute = IsAbsolutePathSegType(segment.command); - auto result = std::make_unique<InterpolableList>(4); + auto* result = MakeGarbageCollected<InterpolableList>(4); result->Set( 0, ConsumeControlAxis(segment.X1(), is_absolute, coordinates.current_x)); result->Set( @@ -159,7 +157,7 @@ coordinates.current_x)); result->Set(3, ConsumeCoordinateAxis(segment.Y(), is_absolute, coordinates.current_y)); - return std::move(result); + return result; } PathSegmentData ConsumeInterpolableCurvetoQuadratic( @@ -181,21 +179,24 @@ return segment; } -std::unique_ptr<InterpolableValue> ConsumeArc(const PathSegmentData& segment, - PathCoordinates& coordinates) { +InterpolableValue* ConsumeArc(const PathSegmentData& segment, + PathCoordinates& coordinates) { bool is_absolute = IsAbsolutePathSegType(segment.command); - auto result = std::make_unique<InterpolableList>(7); + auto* result = MakeGarbageCollected<InterpolableList>(7); result->Set(0, ConsumeCoordinateAxis(segment.X(), is_absolute, coordinates.current_x)); result->Set(1, ConsumeCoordinateAxis(segment.Y(), is_absolute, coordinates.current_y)); - result->Set(2, std::make_unique<InterpolableNumber>(segment.ArcRadiusX())); - result->Set(3, std::make_unique<InterpolableNumber>(segment.ArcRadiusY())); - result->Set(4, std::make_unique<InterpolableNumber>(segment.ArcAngle())); + result->Set(2, + MakeGarbageCollected<InterpolableNumber>(segment.ArcRadiusX())); + result->Set(3, + MakeGarbageCollected<InterpolableNumber>(segment.ArcRadiusY())); + result->Set(4, MakeGarbageCollected<InterpolableNumber>(segment.ArcAngle())); // TODO(alancutter): Make these flags part of the NonInterpolableValue. - result->Set(5, std::make_unique<InterpolableNumber>(segment.LargeArcFlag())); - result->Set(6, std::make_unique<InterpolableNumber>(segment.SweepFlag())); - return std::move(result); + result->Set(5, + MakeGarbageCollected<InterpolableNumber>(segment.LargeArcFlag())); + result->Set(6, MakeGarbageCollected<InterpolableNumber>(segment.SweepFlag())); + return result; } PathSegmentData ConsumeInterpolableArc(const InterpolableValue& value, @@ -217,9 +218,8 @@ return segment; } -std::unique_ptr<InterpolableValue> ConsumeLinetoHorizontal( - const PathSegmentData& segment, - PathCoordinates& coordinates) { +InterpolableValue* ConsumeLinetoHorizontal(const PathSegmentData& segment, + PathCoordinates& coordinates) { bool is_absolute = IsAbsolutePathSegType(segment.command); return ConsumeCoordinateAxis(segment.X(), is_absolute, coordinates.current_x); } @@ -236,9 +236,8 @@ return segment; } -std::unique_ptr<InterpolableValue> ConsumeLinetoVertical( - const PathSegmentData& segment, - PathCoordinates& coordinates) { +InterpolableValue* ConsumeLinetoVertical(const PathSegmentData& segment, + PathCoordinates& coordinates) { bool is_absolute = IsAbsolutePathSegType(segment.command); return ConsumeCoordinateAxis(segment.Y(), is_absolute, coordinates.current_y); } @@ -255,11 +254,10 @@ return segment; } -std::unique_ptr<InterpolableValue> ConsumeCurvetoCubicSmooth( - const PathSegmentData& segment, - PathCoordinates& coordinates) { +InterpolableValue* ConsumeCurvetoCubicSmooth(const PathSegmentData& segment, + PathCoordinates& coordinates) { bool is_absolute = IsAbsolutePathSegType(segment.command); - auto result = std::make_unique<InterpolableList>(4); + auto* result = MakeGarbageCollected<InterpolableList>(4); result->Set( 0, ConsumeControlAxis(segment.X2(), is_absolute, coordinates.current_x)); result->Set( @@ -290,9 +288,9 @@ return segment; } -std::unique_ptr<InterpolableValue> -SVGPathSegInterpolationFunctions::ConsumePathSeg(const PathSegmentData& segment, - PathCoordinates& coordinates) { +InterpolableValue* SVGPathSegInterpolationFunctions::ConsumePathSeg( + const PathSegmentData& segment, + PathCoordinates& coordinates) { switch (segment.command) { case kPathSegClosePath: return ConsumeClosePath(segment, coordinates);
diff --git a/third_party/blink/renderer/core/animation/svg_path_seg_interpolation_functions.h b/third_party/blink/renderer/core/animation/svg_path_seg_interpolation_functions.h index c900054f..7ee3356 100644 --- a/third_party/blink/renderer/core/animation/svg_path_seg_interpolation_functions.h +++ b/third_party/blink/renderer/core/animation/svg_path_seg_interpolation_functions.h
@@ -22,7 +22,7 @@ STATIC_ONLY(SVGPathSegInterpolationFunctions); public: - static std::unique_ptr<InterpolableValue> ConsumePathSeg( + static InterpolableValue* ConsumePathSeg( const PathSegmentData&, PathCoordinates& current_coordinates); static PathSegmentData ConsumeInterpolablePathSeg(
diff --git a/third_party/blink/renderer/core/animation/svg_point_list_interpolation_type.cc b/third_party/blink/renderer/core/animation/svg_point_list_interpolation_type.cc index a9ff9dab..bad45ed 100644 --- a/third_party/blink/renderer/core/animation/svg_point_list_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/svg_point_list_interpolation_type.cc
@@ -26,10 +26,10 @@ if (underlying_length == 0) return nullptr; - auto result = std::make_unique<InterpolableList>(underlying_length); + auto* result = MakeGarbageCollected<InterpolableList>(underlying_length); for (wtf_size_t i = 0; i < underlying_length; i++) - result->Set(i, std::make_unique<InterpolableNumber>(0)); - return InterpolationValue(std::move(result)); + result->Set(i, MakeGarbageCollected<InterpolableNumber>(0)); + return InterpolationValue(result); } InterpolationValue SVGPointListInterpolationType::MaybeConvertSVGValue( @@ -38,14 +38,15 @@ return nullptr; const auto& point_list = To<SVGPointList>(svg_value); - auto result = std::make_unique<InterpolableList>(point_list.length() * 2); + auto* result = + MakeGarbageCollected<InterpolableList>(point_list.length() * 2); for (wtf_size_t i = 0; i < point_list.length(); i++) { const SVGPoint& point = *point_list.at(i); - result->Set(2 * i, std::make_unique<InterpolableNumber>(point.X())); - result->Set(2 * i + 1, std::make_unique<InterpolableNumber>(point.Y())); + result->Set(2 * i, MakeGarbageCollected<InterpolableNumber>(point.X())); + result->Set(2 * i + 1, MakeGarbageCollected<InterpolableNumber>(point.Y())); } - return InterpolationValue(std::move(result)); + return InterpolationValue(result); } PairwiseInterpolationValue SVGPointListInterpolationType::MaybeMergeSingles(
diff --git a/third_party/blink/renderer/core/animation/svg_rect_interpolation_type.cc b/third_party/blink/renderer/core/animation/svg_rect_interpolation_type.cc index 39a5e5fa7..32b8a125 100644 --- a/third_party/blink/renderer/core/animation/svg_rect_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/svg_rect_interpolation_type.cc
@@ -25,10 +25,11 @@ InterpolationValue SVGRectInterpolationType::MaybeConvertNeutral( const InterpolationValue&, ConversionCheckers&) const { - auto result = std::make_unique<InterpolableList>(kRectComponentIndexCount); + auto* result = + MakeGarbageCollected<InterpolableList>(kRectComponentIndexCount); for (wtf_size_t i = 0; i < kRectComponentIndexCount; i++) - result->Set(i, std::make_unique<InterpolableNumber>(0)); - return InterpolationValue(std::move(result)); + result->Set(i, MakeGarbageCollected<InterpolableNumber>(0)); + return InterpolationValue(result); } InterpolationValue SVGRectInterpolationType::MaybeConvertSVGValue( @@ -37,12 +38,15 @@ return nullptr; const auto& rect = To<SVGRect>(svg_value); - auto result = std::make_unique<InterpolableList>(kRectComponentIndexCount); - result->Set(kRectX, std::make_unique<InterpolableNumber>(rect.X())); - result->Set(kRectY, std::make_unique<InterpolableNumber>(rect.Y())); - result->Set(kRectWidth, std::make_unique<InterpolableNumber>(rect.Width())); - result->Set(kRectHeight, std::make_unique<InterpolableNumber>(rect.Height())); - return InterpolationValue(std::move(result)); + auto* result = + MakeGarbageCollected<InterpolableList>(kRectComponentIndexCount); + result->Set(kRectX, MakeGarbageCollected<InterpolableNumber>(rect.X())); + result->Set(kRectY, MakeGarbageCollected<InterpolableNumber>(rect.Y())); + result->Set(kRectWidth, + MakeGarbageCollected<InterpolableNumber>(rect.Width())); + result->Set(kRectHeight, + MakeGarbageCollected<InterpolableNumber>(rect.Height())); + return InterpolationValue(result); } SVGPropertyBase* SVGRectInterpolationType::AppliedSVGValue(
diff --git a/third_party/blink/renderer/core/animation/svg_transform_list_interpolation_type.cc b/third_party/blink/renderer/core/animation/svg_transform_list_interpolation_type.cc index ea51990..f0ff690 100644 --- a/third_party/blink/renderer/core/animation/svg_transform_list_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/svg_transform_list_interpolation_type.cc
@@ -56,13 +56,12 @@ namespace { -std::unique_ptr<InterpolableValue> TranslateToInterpolableValue( - SVGTransform* transform) { +InterpolableValue* TranslateToInterpolableValue(SVGTransform* transform) { gfx::Vector2dF translate = transform->Translate(); - auto result = std::make_unique<InterpolableList>(2); - result->Set(0, std::make_unique<InterpolableNumber>(translate.x())); - result->Set(1, std::make_unique<InterpolableNumber>(translate.y())); - return std::move(result); + auto* result = MakeGarbageCollected<InterpolableList>(2); + result->Set(0, MakeGarbageCollected<InterpolableNumber>(translate.x())); + result->Set(1, MakeGarbageCollected<InterpolableNumber>(translate.y())); + return result; } SVGTransform* TranslateFromInterpolableValue(const InterpolableValue& value) { @@ -75,13 +74,12 @@ return transform; } -std::unique_ptr<InterpolableValue> ScaleToInterpolableValue( - SVGTransform* transform) { +InterpolableValue* ScaleToInterpolableValue(SVGTransform* transform) { gfx::Vector2dF scale = transform->Scale(); - auto result = std::make_unique<InterpolableList>(2); - result->Set(0, std::make_unique<InterpolableNumber>(scale.x())); - result->Set(1, std::make_unique<InterpolableNumber>(scale.y())); - return std::move(result); + auto* result = MakeGarbageCollected<InterpolableList>(2); + result->Set(0, MakeGarbageCollected<InterpolableNumber>(scale.x())); + result->Set(1, MakeGarbageCollected<InterpolableNumber>(scale.y())); + return result; } SVGTransform* ScaleFromInterpolableValue(const InterpolableValue& value) { @@ -94,14 +92,13 @@ return transform; } -std::unique_ptr<InterpolableValue> RotateToInterpolableValue( - SVGTransform* transform) { +InterpolableValue* RotateToInterpolableValue(SVGTransform* transform) { gfx::PointF rotation_center = transform->RotationCenter(); - auto result = std::make_unique<InterpolableList>(3); - result->Set(0, std::make_unique<InterpolableNumber>(transform->Angle())); - result->Set(1, std::make_unique<InterpolableNumber>(rotation_center.x())); - result->Set(2, std::make_unique<InterpolableNumber>(rotation_center.y())); - return std::move(result); + auto* result = MakeGarbageCollected<InterpolableList>(3); + result->Set(0, MakeGarbageCollected<InterpolableNumber>(transform->Angle())); + result->Set(1, MakeGarbageCollected<InterpolableNumber>(rotation_center.x())); + result->Set(2, MakeGarbageCollected<InterpolableNumber>(rotation_center.y())); + return result; } SVGTransform* RotateFromInterpolableValue(const InterpolableValue& value) { @@ -115,9 +112,8 @@ return transform; } -std::unique_ptr<InterpolableValue> SkewXToInterpolableValue( - SVGTransform* transform) { - return std::make_unique<InterpolableNumber>(transform->Angle()); +InterpolableValue* SkewXToInterpolableValue(SVGTransform* transform) { + return MakeGarbageCollected<InterpolableNumber>(transform->Angle()); } SVGTransform* SkewXFromInterpolableValue(const InterpolableValue& value) { @@ -127,9 +123,8 @@ return transform; } -std::unique_ptr<InterpolableValue> SkewYToInterpolableValue( - SVGTransform* transform) { - return std::make_unique<InterpolableNumber>(transform->Angle()); +InterpolableValue* SkewYToInterpolableValue(SVGTransform* transform) { + return MakeGarbageCollected<InterpolableNumber>(transform->Angle()); } SVGTransform* SkewYFromInterpolableValue(const InterpolableValue& value) { @@ -139,9 +134,8 @@ return transform; } -std::unique_ptr<InterpolableValue> ToInterpolableValue( - SVGTransform* transform, - SVGTransformType transform_type) { +InterpolableValue* ToInterpolableValue(SVGTransform* transform, + SVGTransformType transform_type) { switch (transform_type) { case SVGTransformType::kTranslate: return TranslateToInterpolableValue(transform); @@ -191,23 +185,26 @@ class SVGTransformListChecker : public InterpolationType::ConversionChecker { public: explicit SVGTransformListChecker(const InterpolationValue& underlying) - : underlying_(underlying.Clone()) {} + : underlying_(MakeGarbageCollected<InterpolationValueGCed>(underlying)) {} bool IsValid(const InterpolationEnvironment&, const InterpolationValue& underlying) const final { // TODO(suzyh): change maybeConvertSingle so we don't have to recalculate // for changes to the interpolable values - if (!underlying && !underlying_) + if (!underlying && !underlying_) { return true; - if (!underlying || !underlying_) + } + if (!underlying || !underlying_) { return false; - return underlying_.interpolable_value->Equals( + } + return underlying_->underlying().interpolable_value->Equals( *underlying.interpolable_value) && - GetTransformTypes(underlying_) == GetTransformTypes(underlying); + GetTransformTypes(underlying_->underlying()) == + GetTransformTypes(underlying); } private: - const InterpolationValue underlying_; + const Persistent<const InterpolationValueGCed> underlying_; }; } // namespace @@ -224,10 +221,11 @@ InterpolationValue SVGTransformListInterpolationType::MaybeConvertSVGValue( const SVGPropertyBase& svg_value) const { const auto* svg_list = DynamicTo<SVGTransformList>(svg_value); - if (!svg_list) + if (!svg_list) { return nullptr; + } - auto result = std::make_unique<InterpolableList>(svg_list->length()); + auto* result = MakeGarbageCollected<InterpolableList>(svg_list->length()); Vector<SVGTransformType> transform_types; for (wtf_size_t i = 0; i < svg_list->length(); i++) { @@ -241,8 +239,7 @@ transform_types.push_back(transform_type); } return InterpolationValue( - std::move(result), - SVGTransformNonInterpolableValue::Create(transform_types)); + result, SVGTransformNonInterpolableValue::Create(transform_types)); } InterpolationValue SVGTransformListInterpolationType::MaybeConvertSingle( @@ -251,7 +248,7 @@ const InterpolationValue& underlying, ConversionCheckers& conversion_checkers) const { Vector<SVGTransformType> types; - Vector<std::unique_ptr<InterpolableValue>> interpolable_parts; + HeapVector<Member<InterpolableValue>> interpolable_parts; if (keyframe.Composite() == EffectModel::kCompositeAdd) { if (underlying) { @@ -271,13 +268,15 @@ .CloneForAnimation( To<SVGPropertySpecificKeyframe>(keyframe).Value()); InterpolationValue value = MaybeConvertSVGValue(*svg_value); - if (!value) + if (!value) { return nullptr; + } types.AppendVector(GetTransformTypes(value)); interpolable_parts.push_back(std::move(value.interpolable_value)); } - auto interpolable_list = std::make_unique<InterpolableList>(types.size()); + auto* interpolable_list = + MakeGarbageCollected<InterpolableList>(types.size()); wtf_size_t interpolable_list_index = 0; for (auto& part : interpolable_parts) { auto& list = To<InterpolableList>(*part); @@ -288,7 +287,7 @@ } } - return InterpolationValue(std::move(interpolable_list), + return InterpolationValue(interpolable_list, SVGTransformNonInterpolableValue::Create(types)); } @@ -300,16 +299,18 @@ const Vector<SVGTransformType>& transform_types = To<SVGTransformNonInterpolableValue>(non_interpolable_value) ->TransformTypes(); - for (wtf_size_t i = 0; i < list.length(); ++i) + for (wtf_size_t i = 0; i < list.length(); ++i) { result->Append(FromInterpolableValue(*list.Get(i), transform_types.at(i))); + } return result; } PairwiseInterpolationValue SVGTransformListInterpolationType::MaybeMergeSingles( InterpolationValue&& start, InterpolationValue&& end) const { - if (GetTransformTypes(start) != GetTransformTypes(end)) + if (GetTransformTypes(start) != GetTransformTypes(end)) { return nullptr; + } return PairwiseInterpolationValue(std::move(start.interpolable_value), std::move(end.interpolable_value),
diff --git a/third_party/blink/renderer/core/animation/svg_value_interpolation_type.cc b/third_party/blink/renderer/core/animation/svg_value_interpolation_type.cc index 9dc4cc2..cd68532d 100644 --- a/third_party/blink/renderer/core/animation/svg_value_interpolation_type.cc +++ b/third_party/blink/renderer/core/animation/svg_value_interpolation_type.cc
@@ -46,7 +46,7 @@ SVGPropertyBase* referenced_value = const_cast<SVGPropertyBase*>(&value); // Take ref. return InterpolationValue( - std::make_unique<InterpolableList>(0), + MakeGarbageCollected<InterpolableList>(0), SVGValueNonInterpolableValue::Create(referenced_value)); }
diff --git a/third_party/blink/renderer/core/animation/transition_interpolation.cc b/third_party/blink/renderer/core/animation/transition_interpolation.cc index 5155a5e2..94bb162c 100644 --- a/third_party/blink/renderer/core/animation/transition_interpolation.cc +++ b/third_party/blink/renderer/core/animation/transition_interpolation.cc
@@ -46,9 +46,8 @@ environment); } -std::unique_ptr<TypedInterpolationValue> -TransitionInterpolation::GetInterpolatedValue() const { - return std::make_unique<TypedInterpolationValue>( +TypedInterpolationValue* TransitionInterpolation::GetInterpolatedValue() const { + return MakeGarbageCollected<TypedInterpolationValue>( type_, CurrentInterpolableValue().Clone(), CurrentNonInterpolableValue()); }
diff --git a/third_party/blink/renderer/core/animation/transition_interpolation.h b/third_party/blink/renderer/core/animation/transition_interpolation.h index a0fb0fc..b3f364e 100644 --- a/third_party/blink/renderer/core/animation/transition_interpolation.h +++ b/third_party/blink/renderer/core/animation/transition_interpolation.h
@@ -77,13 +77,17 @@ const PropertyHandle& GetProperty() const final { return property_; } - std::unique_ptr<TypedInterpolationValue> GetInterpolatedValue() const; + TypedInterpolationValue* GetInterpolatedValue() const; void Interpolate(int iteration, double fraction) final; void Trace(Visitor* visitor) const override { + visitor->Trace(start_); + visitor->Trace(end_); + visitor->Trace(merge_); visitor->Trace(compositor_start_); visitor->Trace(compositor_end_); + visitor->Trace(cached_interpolable_value_); Interpolation::Trace(visitor); } @@ -101,7 +105,7 @@ mutable absl::optional<double> cached_fraction_; mutable int cached_iteration_ = 0; - mutable std::unique_ptr<InterpolableValue> cached_interpolable_value_; + mutable Member<InterpolableValue> cached_interpolable_value_; }; template <>
diff --git a/third_party/blink/renderer/core/animation/transition_keyframe.cc b/third_party/blink/renderer/core/animation/transition_keyframe.cc index 64784cf..053bd9d7 100644 --- a/third_party/blink/renderer/core/animation/transition_keyframe.cc +++ b/third_party/blink/renderer/core/animation/transition_keyframe.cc
@@ -63,6 +63,7 @@ } void TransitionKeyframe::Trace(Visitor* visitor) const { + visitor->Trace(value_); visitor->Trace(compositor_value_); Keyframe::Trace(visitor); } @@ -95,6 +96,7 @@ void TransitionKeyframe::PropertySpecificKeyframe::Trace( Visitor* visitor) const { + visitor->Trace(value_); visitor->Trace(compositor_value_); Keyframe::PropertySpecificKeyframe::Trace(visitor); }
diff --git a/third_party/blink/renderer/core/animation/transition_keyframe.h b/third_party/blink/renderer/core/animation/transition_keyframe.h index 8095b12..f6787b8 100644 --- a/third_party/blink/renderer/core/animation/transition_keyframe.h +++ b/third_party/blink/renderer/core/animation/transition_keyframe.h
@@ -34,14 +34,14 @@ value_(copy_from.value_->Clone()), compositor_value_(copy_from.compositor_value_) {} - void SetValue(std::unique_ptr<TypedInterpolationValue> value) { + void SetValue(TypedInterpolationValue* value) { // Speculative CHECK to help investigate crbug.com/826627. The theory is // that |SetValue| is being called with a |value| that has no underlying // InterpolableValue. This then would later cause a crash in the // TransitionInterpolation constructor. // TODO(crbug.com/826627): Revert once bug is fixed. CHECK(!!value->Value()); - value_ = std::move(value); + value_ = value; } void SetCompositorValue(CompositorKeyframeValue*); PropertyHandleSet Properties() const final; @@ -56,12 +56,12 @@ PropertySpecificKeyframe(double offset, scoped_refptr<TimingFunction> easing, EffectModel::CompositeOperation composite, - std::unique_ptr<TypedInterpolationValue> value, + TypedInterpolationValue* value, CompositorKeyframeValue* compositor_value) : Keyframe::PropertySpecificKeyframe(offset, std::move(easing), composite), - value_(std::move(value)), + value_(value), compositor_value_(compositor_value) {} const CompositorKeyframeValue* GetCompositorKeyframeValue() const final { @@ -83,7 +83,7 @@ bool IsTransitionPropertySpecificKeyframe() const final { return true; } - const TypedInterpolationValue* GetValue() const { return value_.get(); } + const TypedInterpolationValue* GetValue() const { return value_.Get(); } void Trace(Visitor*) const override; @@ -94,7 +94,7 @@ offset, easing_, composite_, value_->Clone(), compositor_value_); } - std::unique_ptr<TypedInterpolationValue> value_; + Member<TypedInterpolationValue> value_; Member<CompositorKeyframeValue> compositor_value_; }; @@ -111,7 +111,7 @@ double offset) const final; PropertyHandle property_; - std::unique_ptr<TypedInterpolationValue> value_; + Member<TypedInterpolationValue> value_; Member<CompositorKeyframeValue> compositor_value_; };
diff --git a/third_party/blink/renderer/core/animation/typed_interpolation_value.h b/third_party/blink/renderer/core/animation/typed_interpolation_value.h index 6f91905e..89e75075 100644 --- a/third_party/blink/renderer/core/animation/typed_interpolation_value.h +++ b/third_party/blink/renderer/core/animation/typed_interpolation_value.h
@@ -18,25 +18,22 @@ // Represents an interpolated value between an adjacent pair of // PropertySpecificKeyframes. -class TypedInterpolationValue { - USING_FAST_MALLOC(TypedInterpolationValue); - +class TypedInterpolationValue + : public GarbageCollected<TypedInterpolationValue> { public: TypedInterpolationValue(const InterpolationType& type, - std::unique_ptr<InterpolableValue> interpolable_value, + InterpolableValue* interpolable_value, scoped_refptr<const NonInterpolableValue> non_interpolable_value = nullptr) : type_(type), - value_(std::move(interpolable_value), - std::move(non_interpolable_value)) { + value_(interpolable_value, std::move(non_interpolable_value)) { DCHECK(value_.interpolable_value); } - std::unique_ptr<TypedInterpolationValue> Clone() const { + TypedInterpolationValue* Clone() const { InterpolationValue copy = value_.Clone(); - return std::make_unique<TypedInterpolationValue>( - type_, std::move(copy.interpolable_value), - std::move(copy.non_interpolable_value)); + return MakeGarbageCollected<TypedInterpolationValue>( + type_, copy.interpolable_value, std::move(copy.non_interpolable_value)); } const InterpolationType& GetType() const { return type_; } @@ -50,6 +47,8 @@ InterpolationValue& MutableValue() { return value_; } + void Trace(Visitor* v) const { v->Trace(value_); } + private: const InterpolationType& type_; InterpolationValue value_;
diff --git a/third_party/blink/renderer/core/animation/underlying_value.h b/third_party/blink/renderer/core/animation/underlying_value.h index 1987576d..dc3ff31 100644 --- a/third_party/blink/renderer/core/animation/underlying_value.h +++ b/third_party/blink/renderer/core/animation/underlying_value.h
@@ -24,7 +24,7 @@ public: virtual InterpolableValue& MutableInterpolableValue() = 0; - virtual void SetInterpolableValue(std::unique_ptr<InterpolableValue>) = 0; + virtual void SetInterpolableValue(InterpolableValue*) = 0; virtual const NonInterpolableValue* GetNonInterpolableValue() const = 0;
diff --git a/third_party/blink/renderer/core/animation/underlying_value_owner.cc b/third_party/blink/renderer/core/animation/underlying_value_owner.cc index 9a74432..63ca1915 100644 --- a/third_party/blink/renderer/core/animation/underlying_value_owner.cc +++ b/third_party/blink/renderer/core/animation/underlying_value_owner.cc
@@ -3,14 +3,17 @@ // found in the LICENSE file. #include "third_party/blink/renderer/core/animation/underlying_value_owner.h" +#include "third_party/blink/renderer/platform/heap/persistent.h" #include <memory> namespace blink { struct NullValueWrapper { - NullValueWrapper() : value(nullptr) {} - const InterpolationValue value; + NullValueWrapper() + : value(MakeGarbageCollected<InterpolationValueGCed>(nullptr)) {} + + const Persistent<const InterpolationValueGCed> value; }; InterpolableValue& UnderlyingValueOwner::MutableInterpolableValue() { @@ -18,9 +21,9 @@ } void UnderlyingValueOwner::SetInterpolableValue( - std::unique_ptr<InterpolableValue> interpolable_value) { + InterpolableValue* interpolable_value) { DCHECK(type_); - MutableValue().interpolable_value = std::move(interpolable_value); + MutableValue().interpolable_value = interpolable_value; } const NonInterpolableValue* UnderlyingValueOwner::GetNonInterpolableValue() @@ -36,7 +39,7 @@ const InterpolationValue& UnderlyingValueOwner::Value() const { DEFINE_STATIC_LOCAL(NullValueWrapper, null_value_wrapper, ()); - return *this ? *value_ : null_value_wrapper.value; + return *this ? *value_ : null_value_wrapper.value->underlying(); } void UnderlyingValueOwner::Set(std::nullptr_t) { @@ -64,7 +67,7 @@ value_ = &value_owner_; } -void UnderlyingValueOwner::Set(std::unique_ptr<TypedInterpolationValue> value) { +void UnderlyingValueOwner::Set(TypedInterpolationValue* value) { if (value) Set(value->GetType(), std::move(value->MutableValue())); else
diff --git a/third_party/blink/renderer/core/animation/underlying_value_owner.h b/third_party/blink/renderer/core/animation/underlying_value_owner.h index 40e2fdfe..ca80f84 100644 --- a/third_party/blink/renderer/core/animation/underlying_value_owner.h +++ b/third_party/blink/renderer/core/animation/underlying_value_owner.h
@@ -35,7 +35,7 @@ // UnderlyingValue InterpolableValue& MutableInterpolableValue() final; - void SetInterpolableValue(std::unique_ptr<InterpolableValue>) final; + void SetInterpolableValue(InterpolableValue*) final; const NonInterpolableValue* GetNonInterpolableValue() const final; void SetNonInterpolableValue(scoped_refptr<const NonInterpolableValue>) final; @@ -49,7 +49,7 @@ void Set(std::nullptr_t); void Set(const InterpolationType&, const InterpolationValue&); void Set(const InterpolationType&, InterpolationValue&&); - void Set(std::unique_ptr<TypedInterpolationValue>); + void Set(TypedInterpolationValue*); void Set(const TypedInterpolationValue*); InterpolationValue& MutableValue();
diff --git a/third_party/blink/renderer/core/css/css_properties.json5 b/third_party/blink/renderer/core/css/css_properties.json5 index fc5ec0b..84ace57 100644 --- a/third_party/blink/renderer/core/css/css_properties.json5 +++ b/third_party/blink/renderer/core/css/css_properties.json5
@@ -5335,7 +5335,6 @@ interpolable: true, compositable: true, layout_dependent: true, - runtime_flag: "CSSIndependentTransformProperties", field_group: "*", field_template: "pointer", include_paths: ["third_party/blink/renderer/platform/transforms/translate_transform_operation.h"], @@ -5350,7 +5349,6 @@ property_methods: ["ParseSingleValue", "CSSValueFromComputedStyleInternal"], interpolable: true, compositable: true, - runtime_flag: "CSSIndependentTransformProperties", field_group: "*", field_template: "pointer", include_paths: ["third_party/blink/renderer/platform/transforms/rotate_transform_operation.h"], @@ -5365,7 +5363,6 @@ property_methods: ["ParseSingleValue", "CSSValueFromComputedStyleInternal"], interpolable: true, compositable: true, - runtime_flag: "CSSIndependentTransformProperties", field_group: "*", field_template: "pointer", include_paths: ["third_party/blink/renderer/platform/transforms/scale_transform_operation.h"],
diff --git a/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc b/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc index d871ef3..f36e2c1 100644 --- a/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc +++ b/third_party/blink/renderer/core/css/properties/longhands/longhands_custom.cc
@@ -6684,8 +6684,6 @@ const CSSValue* Rotate::ParseSingleValue(CSSParserTokenRange& range, const CSSParserContext& context, const CSSParserLocalContext&) const { - DCHECK(RuntimeEnabledFeatures::CSSIndependentTransformPropertiesEnabled()); - CSSValueID id = range.Peek().Id(); if (id == CSSValueID::kNone) { return css_parsing_utils::ConsumeIdent(range); @@ -6789,8 +6787,6 @@ const CSSValue* Scale::ParseSingleValue(CSSParserTokenRange& range, const CSSParserContext& context, const CSSParserLocalContext&) const { - DCHECK(RuntimeEnabledFeatures::CSSIndependentTransformPropertiesEnabled()); - CSSValueID id = range.Peek().Id(); if (id == CSSValueID::kNone) { return css_parsing_utils::ConsumeIdent(range); @@ -8569,7 +8565,6 @@ CSSParserTokenRange& range, const CSSParserContext& context, const CSSParserLocalContext&) const { - DCHECK(RuntimeEnabledFeatures::CSSIndependentTransformPropertiesEnabled()); CSSValueID id = range.Peek().Id(); if (id == CSSValueID::kNone) { return css_parsing_utils::ConsumeIdent(range);
diff --git a/third_party/blink/renderer/core/frame/dactyloscoper.cc b/third_party/blink/renderer/core/frame/dactyloscoper.cc index 17983d3..b8539e57 100644 --- a/third_party/blink/renderer/core/frame/dactyloscoper.cc +++ b/third_party/blink/renderer/core/frame/dactyloscoper.cc
@@ -121,8 +121,6 @@ const String& str) { if (!context || !ShouldSample(feature)) return; - if (str.empty()) - return; Dactyloscoper::RecordDirectSurface(context, feature, IdentifiabilitySensitiveStringToken(str)); } @@ -133,8 +131,6 @@ const Vector<String>& strs) { if (!context || !ShouldSample(feature)) return; - if (strs.empty()) - return; IdentifiableTokenBuilder builder; for (const auto& str : strs) { builder.AddToken(IdentifiabilitySensitiveStringToken(str)); @@ -148,10 +144,11 @@ const DOMArrayBufferView* buffer) { if (!context || !ShouldSample(feature)) return; - if (!buffer || buffer->byteLength() == 0) - return; - IdentifiableTokenBuilder builder(base::make_span( - static_cast<uint8_t*>(buffer->BaseAddress()), buffer->byteLength())); + IdentifiableTokenBuilder builder; + if (buffer && buffer->byteLength() > 0) { + builder.AddBytes(base::make_span( + static_cast<uint8_t*>(buffer->BaseAddress()), buffer->byteLength())); + } Dactyloscoper::RecordDirectSurface(context, feature, builder.GetToken()); }
diff --git a/third_party/blink/renderer/core/html/html_anchor_element.cc b/third_party/blink/renderer/core/html/html_anchor_element.cc index bd2945c4..b47582a 100644 --- a/third_party/blink/renderer/core/html/html_anchor_element.cc +++ b/third_party/blink/renderer/core/html/html_anchor_element.cc
@@ -401,6 +401,22 @@ if (new_link_relations.Contains(AtomicString("opener"))) { link_relations_ |= kRelationOpener; } + + // These don't currently have web-facing behavior, but embedders may wish to + // expose their presence to users: + if (new_link_relations.Contains(AtomicString("privacy-policy"))) { + link_relations_ |= kRelationPrivacyPolicy; + UseCounter::Count(GetDocument(), WebFeature::kLinkRelPrivacyPolicy); + } + if (new_link_relations.Contains(AtomicString("terms-of-service"))) { + link_relations_ |= kRelationTermsOfService; + UseCounter::Count(GetDocument(), WebFeature::kLinkRelTermsOfService); + } + + // Adding or removing a value here whose processing model is web-visible + // (e.g. if the value is listed as a "supported token" for `<a>`'s `rel` + // attribute in HTML) also requires you to update the list of tokens in + // RelList::SupportedTokensAnchorAndAreaAndForm(). } const AtomicString& HTMLAnchorElement::GetName() const {
diff --git a/third_party/blink/renderer/core/html/html_anchor_element.h b/third_party/blink/renderer/core/html/html_anchor_element.h index 5d7b2d8..4d0ce46 100644 --- a/third_party/blink/renderer/core/html/html_anchor_element.h +++ b/third_party/blink/renderer/core/html/html_anchor_element.h
@@ -59,7 +59,9 @@ // RelationTag = 0x00010000, // RelationUp = 0x00020000, kRelationNoOpener = 0x00040000, - kRelationOpener = 0x00080000 + kRelationOpener = 0x00080000, + kRelationPrivacyPolicy = 0x00100000, + kRelationTermsOfService = 0x00200000, }; class CORE_EXPORT HTMLAnchorElement : public HTMLElement, public DOMURLUtils {
diff --git a/third_party/blink/renderer/core/html/html_anchor_element_test.cc b/third_party/blink/renderer/core/html/html_anchor_element_test.cc index 93128a1..fd2f1b09 100644 --- a/third_party/blink/renderer/core/html/html_anchor_element_test.cc +++ b/third_party/blink/renderer/core/html/html_anchor_element_test.cc
@@ -25,5 +25,35 @@ EXPECT_FALSE(GetDocument().NeedsLayoutTreeUpdate()); } +// This tests whether `rel=privacy-policy` is properly counted. +TEST_F(HTMLAnchorElementTest, PrivacyPolicyCounter) { + // <a rel="privacy-policy"> is not counted when absent + SetBodyInnerHTML(R"HTML( + <a rel="not-privacy-policy" href="/">Test</a> + )HTML"); + EXPECT_FALSE(GetDocument().IsUseCounted(WebFeature::kLinkRelPrivacyPolicy)); + + // <a rel="privacy-policy"> is counted when present. + SetBodyInnerHTML(R"HTML( + <a rel="privacy-policy" href="/">Test</a> + )HTML"); + EXPECT_TRUE(GetDocument().IsUseCounted(WebFeature::kLinkRelPrivacyPolicy)); +} + +// This tests whether `rel=terms-of-service` is properly counted. +TEST_F(HTMLAnchorElementTest, TermsOfServiceCounter) { + // <a rel="terms-of-service"> is not counted when absent + SetBodyInnerHTML(R"HTML( + <a rel="not-terms-of-service" href="/">Test</a> + )HTML"); + EXPECT_FALSE(GetDocument().IsUseCounted(WebFeature::kLinkRelTermsOfService)); + + // <a rel="terms-of-service"> is counted when present. + SetBodyInnerHTML(R"HTML( + <a rel="terms-of-service" href="/">Test</a> + )HTML"); + EXPECT_TRUE(GetDocument().IsUseCounted(WebFeature::kLinkRelTermsOfService)); +} + } // namespace } // namespace blink
diff --git a/third_party/blink/renderer/core/html/html_link_element.cc b/third_party/blink/renderer/core/html/html_link_element.cc index 219beabfe1..4aed8f0 100644 --- a/third_party/blink/renderer/core/html/html_link_element.cc +++ b/third_party/blink/renderer/core/html/html_link_element.cc
@@ -84,6 +84,12 @@ GetDocument().IsInOutermostMainFrame()) { UseCounter::Count(&GetDocument(), WebFeature::kLinkRelCanonical); } + if (rel_attribute_.IsPrivacyPolicy()) { + UseCounter::Count(&GetDocument(), WebFeature::kLinkRelPrivacyPolicy); + } + if (rel_attribute_.IsTermsOfService()) { + UseCounter::Count(&GetDocument(), WebFeature::kLinkRelTermsOfService); + } rel_list_->DidUpdateAttributeValue(params.old_value, value); Process(); } else if (name == html_names::kBlockingAttr) {
diff --git a/third_party/blink/renderer/core/html/html_link_element_test.cc b/third_party/blink/renderer/core/html/html_link_element_test.cc index ac7c4c33..9352ae7 100644 --- a/third_party/blink/renderer/core/html/html_link_element_test.cc +++ b/third_party/blink/renderer/core/html/html_link_element_test.cc
@@ -132,4 +132,34 @@ EXPECT_FALSE(GetDocument().IsUseCounted(WebFeature::kLinkRelCanonical)); } +// This tests whether `rel=privacy-policy` is properly counted. +TEST_F(HTMLLinkElementTest, PrivacyPolicyCounter) { + // <link rel="privacy-policy"> is not counted when absent + GetDocument().head()->setInnerHTML(R"HTML( + <link rel="not-privacy-policy" href="/"> + )HTML"); + EXPECT_FALSE(GetDocument().IsUseCounted(WebFeature::kLinkRelPrivacyPolicy)); + + // <link rel="privacy-policy"> is counted when present. + GetDocument().head()->setInnerHTML(R"HTML( + <link rel="privacy-policy" href="/"> + )HTML"); + EXPECT_TRUE(GetDocument().IsUseCounted(WebFeature::kLinkRelPrivacyPolicy)); +} + +// This tests whether `rel=terms-of-service` is properly counted. +TEST_F(HTMLLinkElementTest, TermsOfServiceCounter) { + // <link rel="terms-of-service"> is not counted when absent + GetDocument().head()->setInnerHTML(R"HTML( + <link rel="not-terms-of-service" href="/"> + )HTML"); + EXPECT_FALSE(GetDocument().IsUseCounted(WebFeature::kLinkRelTermsOfService)); + + // <link rel="terms-of-service"> is counted when present. + GetDocument().head()->setInnerHTML(R"HTML( + <link rel="terms-of-service" href="/"> + )HTML"); + EXPECT_TRUE(GetDocument().IsUseCounted(WebFeature::kLinkRelTermsOfService)); +} + } // namespace blink
diff --git a/third_party/blink/renderer/core/html/html_permission_element.cc b/third_party/blink/renderer/core/html/html_permission_element.cc index 8ff189bd..d40696e5 100644 --- a/third_party/blink/renderer/core/html/html_permission_element.cc +++ b/third_party/blink/renderer/core/html/html_permission_element.cc
@@ -32,6 +32,7 @@ using mojom::blink::PermissionDescriptor; using mojom::blink::PermissionDescriptorPtr; using mojom::blink::PermissionName; +using mojom::blink::PermissionObserver; using mojom::blink::PermissionService; using mojom::blink::PermissionStatus; @@ -148,7 +149,8 @@ HTMLPermissionElement::HTMLPermissionElement(Document& document) : HTMLElement(html_names::kPermissionTag, document), - permission_service_(document.GetExecutionContext()) { + permission_service_(document.GetExecutionContext()), + receivers_(this, document.GetExecutionContext()) { DCHECK(RuntimeEnabledFeatures::PermissionElementEnabled()); EnsureUserAgentShadowRoot(); } @@ -161,6 +163,7 @@ void HTMLPermissionElement::Trace(Visitor* visitor) const { visitor->Trace(permission_service_); + visitor->Trace(receivers_); visitor->Trace(shadow_element_); visitor->Trace(permission_text_span_); HTMLElement::Trace(visitor); @@ -273,6 +276,24 @@ WrapWeakPersistent(this))); } +void HTMLPermissionElement::RegisterPermissionObserver( + const PermissionDescriptorPtr& descriptor, + PermissionStatus current_status) { + mojo::PendingRemote<PermissionObserver> observer; + receivers_.Add(observer.InitWithNewPipeAndPassReceiver(), descriptor->name, + GetTaskRunner()); + GetPermissionService()->AddPermissionObserver( + descriptor.Clone(), current_status, std::move(observer)); +} + +void HTMLPermissionElement::OnPermissionStatusChange(PermissionStatus status) { + auto permission_name = receivers_.current_context(); + auto it = permission_status_map_.find(permission_name); + CHECK(it != permission_status_map_.end()); + it->value = status; + UpdateAppearance(); +} + void HTMLPermissionElement::OnPageEmbeddedPermissionControlRegistered( bool allowed, const absl::optional<Vector<PermissionStatus>>& statuses) { @@ -295,6 +316,7 @@ permission_status_map_.insert(descriptor->name, status); CHECK(inserted_result.is_new_entry); permissions_granted_ &= (status == PermissionStatus::GRANTED); + RegisterPermissionObserver(descriptor, status); } UpdateAppearance(); @@ -308,7 +330,6 @@ return; case EmbeddedPermissionControlResult::kGranted: permissions_granted_ = true; - UpdateAppearance(); DispatchEvent(*Event::Create(event_type_names::kResolve)); return; case EmbeddedPermissionControlResult::kDenied:
diff --git a/third_party/blink/renderer/core/html/html_permission_element.h b/third_party/blink/renderer/core/html/html_permission_element.h index a6b0fa3..c43c4f4 100644 --- a/third_party/blink/renderer/core/html/html_permission_element.h +++ b/third_party/blink/renderer/core/html/html_permission_element.h
@@ -14,6 +14,7 @@ #include "third_party/blink/renderer/core/html/html_element.h" #include "third_party/blink/renderer/core/html/shadow/permission_shadow_element.h" #include "third_party/blink/renderer/platform/heap/collection_support/heap_vector.h" +#include "third_party/blink/renderer/platform/mojo/heap_mojo_receiver_set.h" #include "third_party/blink/renderer/platform/mojo/heap_mojo_remote.h" #include "third_party/blink/renderer/platform/wtf/hash_map.h" #include "third_party/blink/renderer/platform/wtf/hash_set.h" @@ -21,7 +22,9 @@ namespace blink { -class CORE_EXPORT HTMLPermissionElement final : public HTMLElement { +class CORE_EXPORT HTMLPermissionElement final + : public HTMLElement, + public mojom::blink::PermissionObserver { DEFINE_WRAPPERTYPEINFO(); public: @@ -69,6 +72,13 @@ // PermissionService's API. void RequestPageEmbededPermissions(); + void RegisterPermissionObserver( + const mojom::blink::PermissionDescriptorPtr& descriptor, + mojom::blink::PermissionStatus current_status); + + // mojom::blink::PermissionObserver override. + void OnPermissionStatusChange(mojom::blink::PermissionStatus status) override; + // Callback triggered when <permission> element is registered from browser // process. void OnPageEmbeddedPermissionControlRegistered( @@ -111,6 +121,17 @@ HeapMojoRemote<mojom::blink::PermissionService> permission_service_; + // Holds all `PermissionObserver` receivers connected with remotes in browser + // process. Each of them corresponds to a permission observer of one + // descriptor in `permission_descriptors_`. + // This set uses `PermissionName` as context type. Once a receiver call is + // triggered, we look into its name to determine which permission is changed. + HeapMojoReceiverSet<mojom::blink::PermissionObserver, + HTMLPermissionElement, + HeapMojoWrapperMode::kWithContextObserver, + mojom::blink::PermissionName> + receivers_; + // Map holds all current permission statuses, keyed by permission name. using PermissionStatusMap = HashMap<mojom::blink::PermissionName, mojom::blink::PermissionStatus>;
diff --git a/third_party/blink/renderer/core/html/html_permission_element_test.cc b/third_party/blink/renderer/core/html/html_permission_element_test.cc index 64745ff4..fb17d5d9 100644 --- a/third_party/blink/renderer/core/html/html_permission_element_test.cc +++ b/third_party/blink/renderer/core/html/html_permission_element_test.cc
@@ -129,6 +129,26 @@ } } +// Helper class used to wait until receiving a permission status change event. +class PermissionStatusChangeWaiter : public PermissionObserver { + public: + explicit PermissionStatusChangeWaiter( + mojo::PendingReceiver<PermissionObserver> receiver, + base::OnceClosure callback) + : receiver_(this, std::move(receiver)), callback_(std::move(callback)) {} + + // PermissionObserver override + void OnPermissionStatusChange(PermissionStatus status) override { + if (callback_) { + std::move(callback_).Run(); + } + } + + private: + mojo::Receiver<PermissionObserver> receiver_; + base::OnceClosure callback_; +}; + class TestPermissionService : public PermissionService { public: explicit TestPermissionService( @@ -165,12 +185,42 @@ void AddPermissionObserver( PermissionDescriptorPtr permission, PermissionStatus last_known_status, - mojo::PendingRemote<PermissionObserver> observer) override {} + mojo::PendingRemote<PermissionObserver> observer) override { + auto inserted_result = observers_.insert( + permission->name, + mojo::Remote<PermissionObserver>(std::move(observer))); + CHECK(inserted_result.is_new_entry); + if (run_loop_) { + run_loop_->Quit(); + } + } void NotifyEventListener(PermissionDescriptorPtr permission, const String& event_type, bool is_added) override {} + void NotifyPermissionStatusChange(PermissionName name, + PermissionStatus status) { + auto it = observers_.find(name); + CHECK(it != observers_.end()); + it->value->OnPermissionStatusChange(status); + WaitForPermissionStatusChange(status); + } + + void WaitForPermissionStatusChange(PermissionStatus status) { + mojo::Remote<PermissionObserver> observer; + base::RunLoop run_loop; + auto waiter = std::make_unique<PermissionStatusChangeWaiter>( + observer.BindNewPipeAndPassReceiver(), run_loop.QuitClosure()); + observer->OnPermissionStatusChange(status); + run_loop.Run(); + } + + void WaitForPermissionObserverAdded() { + run_loop_ = std::make_unique<base::RunLoop>(); + run_loop_->Run(); + } + void set_initial_statuses(const Vector<PermissionStatus>& statuses) { initial_statuses_ = statuses; } @@ -178,6 +228,7 @@ private: mojo::Receiver<PermissionService> receiver_; HashMap<PermissionName, mojo::Remote<PermissionObserver>> observers_; + std::unique_ptr<base::RunLoop> run_loop_; Vector<PermissionStatus> initial_statuses_; }; @@ -315,4 +366,78 @@ } } +TEST_F(HTMLPemissionElementTest, StatusChangeSinglePermissionElement) { + const struct { + const char* type; + PermissionName name; + PermissionStatus status; + String expected_text; + } kTestData[] = {{"geolocation", PermissionName::GEOLOCATION, + PermissionStatus::ASK, kGeolocationString}, + {"microphone", PermissionName::AUDIO_CAPTURE, + PermissionStatus::ASK, kMicrophoneString}, + {"camera", PermissionName::VIDEO_CAPTURE, + PermissionStatus::ASK, kCameraString}, + {"geolocation", PermissionName::GEOLOCATION, + PermissionStatus::DENIED, kGeolocationString}, + {"microphone", PermissionName::AUDIO_CAPTURE, + PermissionStatus::DENIED, kMicrophoneString}, + {"camera", PermissionName::VIDEO_CAPTURE, + PermissionStatus::DENIED, kCameraString}, + {"geolocation", PermissionName::GEOLOCATION, + PermissionStatus::GRANTED, kGeolocationAllowedString}, + {"microphone", PermissionName::AUDIO_CAPTURE, + PermissionStatus::GRANTED, kMicrophoneAllowedString}, + {"camera", PermissionName::VIDEO_CAPTURE, + PermissionStatus::GRANTED, kCameraAllowedString}}; + for (const auto& data : kTestData) { + auto* permission_element = + MakeGarbageCollected<HTMLPermissionElement>(GetDocument()); + permission_element->setAttribute(html_names::kTypeAttr, + AtomicString(data.type)); + permission_service()->WaitForPermissionObserverAdded(); + permission_service()->NotifyPermissionStatusChange(data.name, data.status); + EXPECT_EQ( + data.expected_text, + permission_element->permission_text_span_for_testing()->innerText()); + } +} + +TEST_F(HTMLPemissionElementTest, + StatusesChangeCameraMicrophonePermissionsElement) { + const struct { + PermissionStatus camera_status; + PermissionStatus microphone_status; + String expected_text; + } kTestData[] = { + {PermissionStatus::DENIED, PermissionStatus::DENIED, + kCameraMicrophoneString}, + {PermissionStatus::DENIED, PermissionStatus::ASK, + kCameraMicrophoneString}, + {PermissionStatus::DENIED, PermissionStatus::GRANTED, kCameraString}, + {PermissionStatus::ASK, PermissionStatus::ASK, kCameraMicrophoneString}, + {PermissionStatus::ASK, PermissionStatus::GRANTED, kCameraString}, + {PermissionStatus::ASK, PermissionStatus::DENIED, + kCameraMicrophoneString}, + {PermissionStatus::GRANTED, PermissionStatus::ASK, kMicrophoneString}, + {PermissionStatus::GRANTED, PermissionStatus::DENIED, kMicrophoneString}, + {PermissionStatus::GRANTED, PermissionStatus::GRANTED, + kCameraMicrophoneAllowedString}, + }; + for (const auto& data : kTestData) { + auto* permission_element = + MakeGarbageCollected<HTMLPermissionElement>(GetDocument()); + permission_element->setAttribute(html_names::kTypeAttr, + AtomicString("camera microphone")); + permission_service()->WaitForPermissionObserverAdded(); + permission_service()->NotifyPermissionStatusChange( + PermissionName::VIDEO_CAPTURE, data.camera_status); + permission_service()->NotifyPermissionStatusChange( + PermissionName::AUDIO_CAPTURE, data.microphone_status); + EXPECT_EQ( + data.expected_text, + permission_element->permission_text_span_for_testing()->innerText()); + } +} + } // namespace blink
diff --git a/third_party/blink/renderer/core/html/link_rel_attribute.cc b/third_party/blink/renderer/core/html/link_rel_attribute.cc index 6cc591e..4b3d65d 100644 --- a/third_party/blink/renderer/core/html/link_rel_attribute.cc +++ b/third_party/blink/renderer/core/html/link_rel_attribute.cc
@@ -49,7 +49,9 @@ is_service_worker_(false), is_canonical_(false), is_monetization_(false), - is_dictionary_(false) {} + is_dictionary_(false), + is_privacy_policy_(false), + is_terms_of_service_(false) {} LinkRelAttribute::LinkRelAttribute(const String& rel) : LinkRelAttribute() { if (rel.empty()) @@ -96,10 +98,16 @@ is_monetization_ = true; } else if (EqualIgnoringASCIICase(link_type, "dictionary")) { is_dictionary_ = true; + } else if (EqualIgnoringASCIICase(link_type, "privacy-policy")) { + is_privacy_policy_ = true; + } else if (EqualIgnoringASCIICase(link_type, "terms-of-service")) { + is_terms_of_service_ = true; } - // Adding or removing a value here requires you to update - // RelList::supportedTokens() + // Adding or removing a value here whose processing model is web-visible + // (e.g. if the value is listed as a "supported token" for `<link>`'s `rel` + // attribute in HTML) also requires you to update the list of tokens in + // RelList::SupportedTokensLink(). } }
diff --git a/third_party/blink/renderer/core/html/link_rel_attribute.h b/third_party/blink/renderer/core/html/link_rel_attribute.h index 40b855a..f76fa88 100644 --- a/third_party/blink/renderer/core/html/link_rel_attribute.h +++ b/third_party/blink/renderer/core/html/link_rel_attribute.h
@@ -61,6 +61,8 @@ bool IsCanonical() const { return is_canonical_; } bool IsMonetization() const { return is_monetization_; } bool IsDictionary() const { return is_dictionary_; } + bool IsPrivacyPolicy() const { return is_privacy_policy_; } + bool IsTermsOfService() const { return is_terms_of_service_; } private: mojom::blink::FaviconIconType icon_type_; @@ -78,6 +80,8 @@ bool is_canonical_ : 1; bool is_monetization_ : 1; bool is_dictionary_ : 1; + bool is_privacy_policy_ : 1; + bool is_terms_of_service_ : 1; }; } // namespace blink
diff --git a/third_party/blink/renderer/core/inspector/inspector_overlay_agent.cc b/third_party/blink/renderer/core/inspector/inspector_overlay_agent.cc index 794baa4..805da1c 100644 --- a/third_party/blink/renderer/core/inspector/inspector_overlay_agent.cc +++ b/third_party/blink/renderer/core/inspector/inspector_overlay_agent.cc
@@ -528,6 +528,7 @@ } persistent_tool_ = nullptr; + hinge_ = nullptr; PickTheRightTool(); SetNeedsUnbufferedInput(false); document_to_ax_context_.clear();
diff --git a/third_party/blink/renderer/core/layout/build.gni b/third_party/blink/renderer/core/layout/build.gni index 0ebc6e3..5f2e29c7 100644 --- a/third_party/blink/renderer/core/layout/build.gni +++ b/third_party/blink/renderer/core/layout/build.gni
@@ -251,6 +251,7 @@ "inline/text_item_type.h", "inline/text_offset_range.cc", "inline/text_offset_range.h", + "intrinsic_sizing_info.cc", "intrinsic_sizing_info.h", "layout_block.cc", "layout_block.h",
diff --git a/third_party/blink/renderer/core/layout/intrinsic_sizing_info.cc b/third_party/blink/renderer/core/layout/intrinsic_sizing_info.cc new file mode 100644 index 0000000..1063b2f --- /dev/null +++ b/third_party/blink/renderer/core/layout/intrinsic_sizing_info.cc
@@ -0,0 +1,76 @@ +/* + * Copyright (C) 2006 Eric Seidel <eric@webkit.org> + * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. + * Copyright (C) Research In Motion Limited 2011. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``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 APPLE INC. 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. + */ + +#include "third_party/blink/renderer/core/layout/intrinsic_sizing_info.h" + +namespace blink { + +// https://www.w3.org/TR/css3-images/#default-sizing +gfx::SizeF ConcreteObjectSize(const IntrinsicSizingInfo& sizing_info, + const gfx::SizeF& default_object_size) { + if (sizing_info.has_width && sizing_info.has_height) { + return sizing_info.size; + } + + if (sizing_info.has_width) { + if (sizing_info.aspect_ratio.IsEmpty()) { + return gfx::SizeF(sizing_info.size.width(), default_object_size.height()); + } + return gfx::SizeF(sizing_info.size.width(), + ResolveHeightForRatio(sizing_info.size.width(), + sizing_info.aspect_ratio)); + } + + if (sizing_info.has_height) { + if (sizing_info.aspect_ratio.IsEmpty()) { + return gfx::SizeF(default_object_size.width(), sizing_info.size.height()); + } + return gfx::SizeF(ResolveWidthForRatio(sizing_info.size.height(), + sizing_info.aspect_ratio), + sizing_info.size.height()); + } + + if (!sizing_info.aspect_ratio.IsEmpty()) { + // "A contain constraint is resolved by setting the concrete object size to + // the largest rectangle that has the object's intrinsic aspect ratio and + // additionally has neither width nor height larger than the constraint + // rectangle's width and height, respectively." + float solution_width = ResolveWidthForRatio(default_object_size.height(), + sizing_info.aspect_ratio); + if (solution_width <= default_object_size.width()) { + return gfx::SizeF(solution_width, default_object_size.height()); + } + + float solution_height = ResolveHeightForRatio(default_object_size.width(), + sizing_info.aspect_ratio); + return gfx::SizeF(default_object_size.width(), solution_height); + } + + return default_object_size; +} + +} // namespace blink
diff --git a/third_party/blink/renderer/core/layout/intrinsic_sizing_info.h b/third_party/blink/renderer/core/layout/intrinsic_sizing_info.h index aa14b92..1c0db672 100644 --- a/third_party/blink/renderer/core/layout/intrinsic_sizing_info.h +++ b/third_party/blink/renderer/core/layout/intrinsic_sizing_info.h
@@ -5,6 +5,7 @@ #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_INTRINSIC_SIZING_INFO_H_ #define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_INTRINSIC_SIZING_INFO_H_ +#include "third_party/blink/renderer/core/core_export.h" #include "third_party/blink/renderer/platform/wtf/allocator/allocator.h" #include "ui/gfx/geometry/size_f.h" @@ -25,6 +26,23 @@ bool has_height = true; }; +inline float ResolveWidthForRatio(float height, + const gfx::SizeF& natural_ratio) { + return height * natural_ratio.width() / natural_ratio.height(); +} + +inline float ResolveHeightForRatio(float width, + const gfx::SizeF& natural_ratio) { + return width * natural_ratio.height() / natural_ratio.width(); +} + +// Implements the algorithm at +// https://www.w3.org/TR/css3-images/#default-sizing with a specified size with +// no constraints and a contain constraint. +CORE_EXPORT gfx::SizeF ConcreteObjectSize( + const IntrinsicSizingInfo& sizing_info, + const gfx::SizeF& default_object_size); + } // namespace blink #endif // THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_INTRINSIC_SIZING_INFO_H_
diff --git a/third_party/blink/renderer/core/layout/ng/ng_fragment_builder.h b/third_party/blink/renderer/core/layout/ng/ng_fragment_builder.h index 86ccbc6..c0bb7e29 100644 --- a/third_party/blink/renderer/core/layout/ng/ng_fragment_builder.h +++ b/third_party/blink/renderer/core/layout/ng/ng_fragment_builder.h
@@ -378,6 +378,9 @@ void SetAdjoiningObjectTypes(NGAdjoiningObjectTypes adjoining_object_types) { adjoining_object_types_ = adjoining_object_types; } + void SetHasAdjoiningObjectDescendants(bool has_adjoining_object_descendants) { + has_adjoining_object_descendants_ = has_adjoining_object_descendants; + } NGAdjoiningObjectTypes AdjoiningObjectTypes() const { return adjoining_object_types_; }
diff --git a/third_party/blink/renderer/core/layout/ng/ng_physical_box_fragment.cc b/third_party/blink/renderer/core/layout/ng/ng_physical_box_fragment.cc index daae8181..7e14ba4 100644 --- a/third_party/blink/renderer/core/layout/ng/ng_physical_box_fragment.cc +++ b/third_party/blink/renderer/core/layout/ng/ng_physical_box_fragment.cc
@@ -1726,6 +1726,8 @@ DCHECK_EQ(is_math_operator_, other.is_math_operator_); // |has_floating_descendants_for_paint_| can change during simplified layout. + DCHECK_EQ(has_adjoining_object_descendants_, + other.has_adjoining_object_descendants_); DCHECK_EQ(may_have_descendant_above_block_start_, other.may_have_descendant_above_block_start_); DCHECK_EQ(depends_on_percentage_block_size_,
diff --git a/third_party/blink/renderer/core/layout/ng/ng_simplified_layout_algorithm.cc b/third_party/blink/renderer/core/layout/ng/ng_simplified_layout_algorithm.cc index ad55a4a3..cd7af015 100644 --- a/third_party/blink/renderer/core/layout/ng/ng_simplified_layout_algorithm.cc +++ b/third_party/blink/renderer/core/layout/ng/ng_simplified_layout_algorithm.cc
@@ -307,6 +307,8 @@ .ToLogical(*previous_fragment.InflowBounds()); container_builder_.SetInflowBounds(inflow_bounds); } + container_builder_.SetHasAdjoiningObjectDescendants( + previous_fragment.HasAdjoiningObjectDescendants()); container_builder_.SetMayHaveDescendantAboveBlockStart( previous_fragment.MayHaveDescendantAboveBlockStart()); container_builder_.SetHasDescendantThatDependsOnPercentageBlockSize(
diff --git a/third_party/blink/renderer/core/layout/svg/layout_svg_image.cc b/third_party/blink/renderer/core/layout/svg/layout_svg_image.cc index 79f98f60..659476de 100644 --- a/third_party/blink/renderer/core/layout/svg/layout_svg_image.cc +++ b/third_party/blink/renderer/core/layout/svg/layout_svg_image.cc
@@ -75,16 +75,6 @@ LayoutSVGModelObject::WillBeDestroyed(); } -static float ResolveWidthForRatio(float height, - const gfx::SizeF& intrinsic_ratio) { - return height * intrinsic_ratio.width() / intrinsic_ratio.height(); -} - -static float ResolveHeightForRatio(float width, - const gfx::SizeF& intrinsic_ratio) { - return width * intrinsic_ratio.height() / intrinsic_ratio.width(); -} - bool LayoutSVGImage::HasOverriddenIntrinsicSize() const { NOT_DESTROYED(); if (!RuntimeEnabledFeatures::ExperimentalPoliciesEnabled())
diff --git a/third_party/blink/renderer/core/loader/cookie_jar.cc b/third_party/blink/renderer/core/loader/cookie_jar.cc index 495e0cd8..ec1e75e 100644 --- a/third_party/blink/renderer/core/loader/cookie_jar.cc +++ b/third_party/blink/renderer/core/loader/cookie_jar.cc
@@ -94,12 +94,15 @@ // ipc is required. uint64_t new_version = last_version_; if (IPCNeeded()) { + bool is_ad_tagged = + document_->GetFrame() ? document_->GetFrame()->IsAdFrame() : false; + if (!backend_->GetCookiesString( cookie_url, document_->SiteForCookies(), document_->TopFrameOrigin(), document_->GetExecutionContext()->HasStorageAccess(), - get_version_shared_memory, &new_version, &new_mapped_region, - &value)) { + get_version_shared_memory, is_ad_tagged, &new_version, + &new_mapped_region, &value)) { // On IPC failure invalidate cached values and return empty string since // there is no guarantee the client can still validly access cookies in // the current context. See crbug.com/1468909.
diff --git a/third_party/blink/renderer/core/paint/svg_mask_painter.cc b/third_party/blink/renderer/core/paint/svg_mask_painter.cc index 3bea27d..6e19eda5 100644 --- a/third_party/blink/renderer/core/paint/svg_mask_painter.cc +++ b/third_party/blink/renderer/core/paint/svg_mask_painter.cc
@@ -169,14 +169,6 @@ return tile_extent ? tile_extent - std::fmod(position, tile_extent) : 0; } -float ResolveWidthForRatio(float height, const gfx::SizeF& natural_ratio) { - return height * natural_ratio.width() / natural_ratio.height(); -} - -float ResolveHeightForRatio(float width, const gfx::SizeF& natural_ratio) { - return width * natural_ratio.height() / natural_ratio.width(); -} - gfx::SizeF FitToAspectRatio(const gfx::RectF& rect, const gfx::SizeF& aspect_ratio, bool grow) {
diff --git a/third_party/blink/renderer/core/svg/graphics/svg_image.cc b/third_party/blink/renderer/core/svg/graphics/svg_image.cc index aab0fe57..46b5777 100644 --- a/third_party/blink/renderer/core/svg/graphics/svg_image.cc +++ b/third_party/blink/renderer/core/svg/graphics/svg_image.cc
@@ -244,16 +244,6 @@ return ToRoundedSize(intrinsic_size_); } -static float ResolveWidthForRatio(float height, - const gfx::SizeF& intrinsic_ratio) { - return height * intrinsic_ratio.width() / intrinsic_ratio.height(); -} - -static float ResolveHeightForRatio(float width, - const gfx::SizeF& intrinsic_ratio) { - return width * intrinsic_ratio.height() / intrinsic_ratio.width(); -} - bool SVGImage::HasIntrinsicSizingInfo() const { return LayoutRoot(); } @@ -286,50 +276,10 @@ gfx::SizeF SVGImage::ConcreteObjectSize( const gfx::SizeF& default_object_size) const { IntrinsicSizingInfo intrinsic_sizing_info; - if (!GetIntrinsicSizingInfo(intrinsic_sizing_info)) + if (!GetIntrinsicSizingInfo(intrinsic_sizing_info)) { return gfx::SizeF(); - - // https://www.w3.org/TR/css3-images/#default-sizing - if (intrinsic_sizing_info.has_width && intrinsic_sizing_info.has_height) - return intrinsic_sizing_info.size; - - if (intrinsic_sizing_info.has_width) { - if (intrinsic_sizing_info.aspect_ratio.IsEmpty()) { - return gfx::SizeF(intrinsic_sizing_info.size.width(), - default_object_size.height()); - } - return gfx::SizeF( - intrinsic_sizing_info.size.width(), - ResolveHeightForRatio(intrinsic_sizing_info.size.width(), - intrinsic_sizing_info.aspect_ratio)); } - - if (intrinsic_sizing_info.has_height) { - if (intrinsic_sizing_info.aspect_ratio.IsEmpty()) { - return gfx::SizeF(default_object_size.width(), - intrinsic_sizing_info.size.height()); - } - return gfx::SizeF(ResolveWidthForRatio(intrinsic_sizing_info.size.height(), - intrinsic_sizing_info.aspect_ratio), - intrinsic_sizing_info.size.height()); - } - - if (!intrinsic_sizing_info.aspect_ratio.IsEmpty()) { - // "A contain constraint is resolved by setting the concrete object size to - // the largest rectangle that has the object's intrinsic aspect ratio and - // additionally has neither width nor height larger than the constraint - // rectangle's width and height, respectively." - float solution_width = ResolveWidthForRatio( - default_object_size.height(), intrinsic_sizing_info.aspect_ratio); - if (solution_width <= default_object_size.width()) - return gfx::SizeF(solution_width, default_object_size.height()); - - float solution_height = ResolveHeightForRatio( - default_object_size.width(), intrinsic_sizing_info.aspect_ratio); - return gfx::SizeF(default_object_size.width(), solution_height); - } - - return default_object_size; + return blink::ConcreteObjectSize(intrinsic_sizing_info, default_object_size); } SVGImage::DrawInfo::DrawInfo(const gfx::SizeF& container_size,
diff --git a/third_party/blink/renderer/modules/cookie_store/cookie_store.cc b/third_party/blink/renderer/modules/cookie_store/cookie_store.cc index 6b8588a..47c4b40 100644 --- a/third_party/blink/renderer/modules/cookie_store/cookie_store.cc +++ b/third_party/blink/renderer/modules/cookie_store/cookie_store.cc
@@ -436,11 +436,18 @@ return ScriptPromise(); } + bool is_ad_tagged = false; + if (auto* window = DynamicTo<LocalDOMWindow>(context)) { + if (auto* local_frame = window->GetFrame()) { + is_ad_tagged = local_frame->IsAdFrame(); + } + } + auto* resolver = MakeGarbageCollected<ScriptPromiseResolver>( script_state, exception_state.GetContext()); backend_->GetAllForUrl( cookie_url, default_site_for_cookies_, default_top_frame_origin_, - context->HasStorageAccess(), std::move(backend_options), + context->HasStorageAccess(), std::move(backend_options), is_ad_tagged, WTF::BindOnce(backend_result_converter, WrapPersistent(resolver))); return resolver->Promise(); }
diff --git a/third_party/blink/renderer/modules/csspaint/nativepaint/background_color_paint_definition.cc b/third_party/blink/renderer/modules/csspaint/nativepaint/background_color_paint_definition.cc index ccb8e4a8..9e8ba2c 100644 --- a/third_party/blink/renderer/modules/csspaint/nativepaint/background_color_paint_definition.cc +++ b/third_party/blink/renderer/modules/csspaint/nativepaint/background_color_paint_definition.cc
@@ -120,7 +120,7 @@ const auto* keyframe = To<TransitionKeyframe::PropertySpecificKeyframe>(frame); InterpolableValue* value = - keyframe->GetValue()->Value().interpolable_value.get(); + keyframe->GetValue()->Value().interpolable_value.Get(); const auto& list = To<InterpolableList>(*value); DCHECK(CSSColorInterpolationType::IsNonKeywordColor(*(list.Get(0)))); @@ -260,17 +260,15 @@ // Because the progress is a global one, we need to adjust it with offsets. float adjusted_progress = (progress - offsets[result_index]) / (offsets[result_index + 1] - offsets[result_index]); - std::unique_ptr<InterpolableValue> from = - CSSColorInterpolationType::CreateInterpolableColor( - animated_colors[result_index]); - std::unique_ptr<InterpolableValue> to = - CSSColorInterpolationType::CreateInterpolableColor( - animated_colors[result_index + 1]); - std::unique_ptr<InterpolableValue> result = + InterpolableValue* from = CSSColorInterpolationType::CreateInterpolableColor( + animated_colors[result_index]); + InterpolableValue* to = CSSColorInterpolationType::CreateInterpolableColor( + animated_colors[result_index + 1]); + InterpolableValue* result = CSSColorInterpolationType::CreateInterpolableColor( animated_colors[result_index + 1]); from->Interpolate(*to, adjusted_progress, *result); - Color color = CSSColorInterpolationType::GetColor(*(result.get())); + Color color = CSSColorInterpolationType::GetColor(*result); // TODO(crbug/1308932): Remove toSkColor4f and make all SkColor4f. SkColor4f current_color = color.toSkColor4f();
diff --git a/third_party/blink/renderer/modules/csspaint/nativepaint/clip_path_paint_definition.cc b/third_party/blink/renderer/modules/csspaint/nativepaint/clip_path_paint_definition.cc index 84ffe4e..57f56a9 100644 --- a/third_party/blink/renderer/modules/csspaint/nativepaint/clip_path_paint_definition.cc +++ b/third_party/blink/renderer/modules/csspaint/nativepaint/clip_path_paint_definition.cc
@@ -143,7 +143,7 @@ // CreateBasicShape function. : BasicShape::kBasicShapeCircleType; basic_shape = CreateBasicShape( - type, *keyframe->GetValue()->Value().interpolable_value.get(), + type, *keyframe->GetValue()->Value().interpolable_value.Get(), *non_interpolable_value); } DCHECK(basic_shape);
diff --git a/third_party/blink/renderer/modules/csspaint/nativepaint/native_css_paint_definition.cc b/third_party/blink/renderer/modules/csspaint/nativepaint/native_css_paint_definition.cc index de3e72a..9f3e91f 100644 --- a/third_party/blink/renderer/modules/csspaint/nativepaint/native_css_paint_definition.cc +++ b/third_party/blink/renderer/modules/csspaint/nativepaint/native_css_paint_definition.cc
@@ -32,7 +32,7 @@ const TransitionKeyframe::PropertySpecificKeyframe* keyframe = To<TransitionKeyframe::PropertySpecificKeyframe>(frame); InterpolableValue* value = - keyframe->GetValue()->Value().interpolable_value.get(); + keyframe->GetValue()->Value().interpolable_value.Get(); return filter(element, nullptr, value); } }
diff --git a/third_party/blink/renderer/modules/webaudio/async_audio_decoder.cc b/third_party/blink/renderer/modules/webaudio/async_audio_decoder.cc index e803b1c..eb68d62 100644 --- a/third_party/blink/renderer/modules/webaudio/async_audio_decoder.cc +++ b/third_party/blink/renderer/modules/webaudio/async_audio_decoder.cc
@@ -58,11 +58,15 @@ context->GetExecutionContext()->GetTaskRunner( blink::TaskType::kInternalMedia); + // ArrayBufferContents is a thread-safe smart pointer around the backing + // store. + ArrayBufferContents audio_data_contents = *audio_data->Content(); + worker_pool::PostTask( FROM_HERE, CrossThreadBindOnce( &AsyncAudioDecoder::DecodeOnBackgroundThread, - WrapCrossThreadPersistent(audio_data), sample_rate, + std::move(audio_data_contents), sample_rate, MakeCrossThreadHandle(success_callback), MakeCrossThreadHandle(error_callback), MakeCrossThreadHandle(resolver), MakeCrossThreadHandle(context), @@ -70,7 +74,7 @@ } void AsyncAudioDecoder::DecodeOnBackgroundThread( - DOMArrayBuffer* audio_data, + ArrayBufferContents audio_data_contents, float sample_rate, CrossThreadHandle<V8DecodeSuccessCallback> success_callback, CrossThreadHandle<V8DecodeErrorCallback> error_callback, @@ -80,25 +84,24 @@ const ExceptionContext& exception_context) { DCHECK(!IsMainThread()); scoped_refptr<AudioBus> bus = AudioBus::CreateBusFromInMemoryAudioFile( - audio_data->Data(), audio_data->ByteLength(), false, sample_rate); + audio_data_contents.Data(), audio_data_contents.DataLength(), false, + sample_rate); - // Decoding is finished, but we need to do the callbacks on the main thread. // A reference to `bus` is retained by base::OnceCallback and will be removed // after `NotifyComplete()` is done. PostCrossThreadTask( *task_runner, FROM_HERE, - CrossThreadBindOnce(&AsyncAudioDecoder::NotifyComplete, - WrapCrossThreadPersistent(audio_data), - MakeUnwrappingCrossThreadHandle(success_callback), - MakeUnwrappingCrossThreadHandle(error_callback), - WTF::RetainedRef(std::move(bus)), - MakeUnwrappingCrossThreadHandle(resolver), - MakeUnwrappingCrossThreadHandle(context), - exception_context)); + CrossThreadBindOnce( + &AsyncAudioDecoder::NotifyComplete, std::move(audio_data_contents), + MakeUnwrappingCrossThreadHandle(success_callback), + MakeUnwrappingCrossThreadHandle(error_callback), + WTF::RetainedRef(std::move(bus)), + MakeUnwrappingCrossThreadHandle(resolver), + MakeUnwrappingCrossThreadHandle(context), exception_context)); } void AsyncAudioDecoder::NotifyComplete( - DOMArrayBuffer*, + ArrayBufferContents, V8DecodeSuccessCallback* success_callback, V8DecodeErrorCallback* error_callback, AudioBus* audio_bus,
diff --git a/third_party/blink/renderer/modules/webaudio/async_audio_decoder.h b/third_party/blink/renderer/modules/webaudio/async_audio_decoder.h index a6852f0..d961cb55 100644 --- a/third_party/blink/renderer/modules/webaudio/async_audio_decoder.h +++ b/third_party/blink/renderer/modules/webaudio/async_audio_decoder.h
@@ -28,6 +28,7 @@ #include "third_party/blink/renderer/bindings/modules/v8/v8_decode_error_callback.h" #include "third_party/blink/renderer/bindings/modules/v8/v8_decode_success_callback.h" +#include "third_party/blink/renderer/core/typed_arrays/array_buffer/array_buffer_contents.h" #include "third_party/blink/renderer/platform/heap/cross_thread_handle.h" namespace base { @@ -75,7 +76,7 @@ private: AudioBuffer* CreateAudioBufferFromAudioBus(AudioBus*); static void DecodeOnBackgroundThread( - DOMArrayBuffer* audio_data, + ArrayBufferContents audio_data_contents, float sample_rate, CrossThreadHandle<V8DecodeSuccessCallback>, CrossThreadHandle<V8DecodeErrorCallback>, @@ -83,7 +84,7 @@ CrossThreadHandle<BaseAudioContext>, scoped_refptr<base::SingleThreadTaskRunner>, const ExceptionContext&); - static void NotifyComplete(DOMArrayBuffer* audio_data, + static void NotifyComplete(ArrayBufferContents audio_data_contents, V8DecodeSuccessCallback*, V8DecodeErrorCallback*, AudioBus*,
diff --git a/third_party/blink/renderer/platform/fonts/skia/sktypeface_factory.cc b/third_party/blink/renderer/platform/fonts/skia/sktypeface_factory.cc index 7ef353f..873a256 100644 --- a/third_party/blink/renderer/platform/fonts/skia/sktypeface_factory.cc +++ b/third_party/blink/renderer/platform/fonts/skia/sktypeface_factory.cc
@@ -6,6 +6,7 @@ #include "base/notreached.h" #include "build/build_config.h" +#include "skia/ext/font_utils.h" #include "third_party/skia/include/core/SkFontMgr.h" #include "third_party/skia/include/ports/SkFontConfigInterface.h" @@ -21,7 +22,7 @@ SkFontConfigInterface::FontIdentity font_identity; font_identity.fID = config_id; font_identity.fTTCIndex = ttc_index; - return fci->makeTypeface(font_identity); + return fci->makeTypeface(font_identity, skia::GetFontMgr()); #else NOTREACHED(); return nullptr; @@ -34,7 +35,7 @@ int ttc_index) { #if !BUILDFLAG(IS_WIN) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_FUCHSIA) && \ !BUILDFLAG(IS_APPLE) - return SkTypeface::MakeFromFile(filename.c_str(), ttc_index); + return skia::GetFontMgr()->makeFromFile(filename.c_str(), ttc_index); #else NOTREACHED(); return nullptr;
diff --git a/third_party/blink/renderer/platform/fonts/web_font_typeface_factory.cc b/third_party/blink/renderer/platform/fonts/web_font_typeface_factory.cc index 43f6a494d..91944b1 100644 --- a/third_party/blink/renderer/platform/fonts/web_font_typeface_factory.cc +++ b/third_party/blink/renderer/platform/fonts/web_font_typeface_factory.cc
@@ -115,7 +115,7 @@ sk_sp<SkTypeface> MakeUseFallbackIfNeeded( sk_sp<SkData> data, const WebFontTypefaceFactory::FontInstantiator& instantiator) { -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) return instantiator.make_fallback(data); #else return instantiator.make_system(data);
diff --git a/third_party/blink/renderer/platform/fonts/web_font_typeface_factory.h b/third_party/blink/renderer/platform/fonts/web_font_typeface_factory.h index 4b519d7..6cb36ca 100644 --- a/third_party/blink/renderer/platform/fonts/web_font_typeface_factory.h +++ b/third_party/blink/renderer/platform/fonts/web_font_typeface_factory.h
@@ -27,7 +27,7 @@ using FontInstantiator = struct { InstantiationFunction make_system; -#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_APPLE) InstantiationFunction make_fallback; #endif };
diff --git a/third_party/blink/renderer/platform/fonts/web_font_typeface_factory_test.cc b/third_party/blink/renderer/platform/fonts/web_font_typeface_factory_test.cc index bd8772a..eb92eea17 100644 --- a/third_party/blink/renderer/platform/fonts/web_font_typeface_factory_test.cc +++ b/third_party/blink/renderer/platform/fonts/web_font_typeface_factory_test.cc
@@ -149,7 +149,13 @@ mock_font_format_check, expectation); } -TEST(WebFontTypefaceFactoryTest, SbixFallbackWindows) { +#if BUILDFLAG(IS_IOS) +// TODO(crbug.com/1499557): Currently fails on the platform. +#define MAYBE_SbixFallbackWindows DISABLED_SbixFallbackWindows +#else +#define MAYBE_SbixFallbackWindows SbixFallbackWindows +#endif +TEST(WebFontTypefaceFactoryTest, MAYBE_SbixFallbackWindows) { sk_sp<SkData> data = SkData::MakeEmpty(); MockFontFormatCheck mock_font_format_check(data); EXPECT_CALL(mock_font_format_check, IsSbixColorFont()) @@ -166,7 +172,14 @@ ); } -TEST(WebFontTypefaceFactoryTest, VariationsWinFallbackIfNeeded) { +#if BUILDFLAG(IS_IOS) +// TODO(crbug.com/1499557): Currently fails on the platform. +#define MAYBE_VariationsWinFallbackIfNeeded \ + DISABLED_VariationsWinFallbackIfNeeded +#else +#define MAYBE_VariationsWinFallbackIfNeeded VariationsWinFallbackIfNeeded +#endif +TEST(WebFontTypefaceFactoryTest, MAYBE_VariationsWinFallbackIfNeeded) { sk_sp<SkData> data = SkData::MakeEmpty(); MockFontFormatCheck mock_font_format_check(data); EXPECT_CALL(mock_font_format_check, IsVariableFont())
diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 index a4931cd..c15de220 100644 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
@@ -952,11 +952,6 @@ status: "stable", }, { - name: "CSSIndependentTransformProperties", - status: "stable", - base_feature: "none", - }, - { name: "CSSLayoutAPI", status: "experimental", base_feature: "none",
diff --git a/third_party/blink/web_tests/VirtualTestSuites b/third_party/blink/web_tests/VirtualTestSuites index 357df085..d2353ed9 100644 --- a/third_party/blink/web_tests/VirtualTestSuites +++ b/third_party/blink/web_tests/VirtualTestSuites
@@ -57,7 +57,7 @@ "prefix": "pna-iframes-enabled", "platforms": ["Linux", "Mac", "win"], "bases": ["external/wpt/fetch/private-network-access"], - "args": ["--enable-features=PrivateNetworkAccessForIframes", + "args": ["--enable-features=PrivateNetworkAccessForIframes,CorsSafelistedHeaderValueSizeRelaxed", "--disable-threaded-compositing", "--disable-threaded-animation"], "owners": ["phao@google.com", "lyf@google.com"], "expires": "Jan 1, 2024" @@ -66,7 +66,7 @@ "prefix": "pna-iframes-warning", "platforms": ["Linux", "Mac", "win"], "bases": ["external/wpt/fetch/private-network-access"], - "args": ["--enable-features=PrivateNetworkAccessForIframes,PrivateNetworkAccessForIframesWarningOnly", + "args": ["--enable-features=PrivateNetworkAccessForIframes,PrivateNetworkAccessForIframesWarningOnly,CorsSafelistedHeaderValueSizeRelaxed", "--disable-threaded-compositing", "--disable-threaded-animation"], "owners": ["phao@google.com", "lyf@google.com"], "expires": "Jan 1, 2024" @@ -1629,6 +1629,19 @@ "expires": "Jul 1, 2023" }, { + "prefix": "fledge-kanon-status-below-threshold", + "platforms": ["Linux", "Mac", "Win"], + "owners": ["behamilton@google.com", "caraitto@chromium.org", "pauljensen@chromium.org", "mmenke@chromium.org", "morlovich@chromium.org", "qingxinwu@google.com"], + "bases": [ + "external/wpt/fledge/tentative/kanon-status-below-threshold.https.window.js" + ], + "args": [ + "--enable-features=InterestGroupStorage,PrivacySandboxAdsAPIsOverride,FencedFrames:implementation_type/mparch,FledgeConsiderKAnonymity", + "--disable-features=CookieDeprecationFacilitatedTesting,FledgeEnforceKAnonymity" + ], + "expires": "Sep 1, 2024" + }, + { "prefix": "fledge-rounding", "platforms": ["Linux", "Mac", "Win"], "owners": ["behamilton@google.com", "caraitto@chromium.org", "pauljensen@chromium.org", "mmenke@chromium.org", "morlovich@chromium.org", "qingxinwu@google.com"],
diff --git a/third_party/blink/web_tests/external/wpt/css/css-position/position-absolute-dynamic-relayout-004.html b/third_party/blink/web_tests/external/wpt/css/css-position/position-absolute-dynamic-relayout-004.html new file mode 100644 index 0000000..b94a8cdb --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/css/css-position/position-absolute-dynamic-relayout-004.html
@@ -0,0 +1,20 @@ +<!DOCTYPE html> +<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1493929"> +<link rel="match" href="../reference/ref-filled-green-100px-square.xht"> +<p>Test passes if there is a filled green square and <strong>no red</strong>.</p> +<div style="width:100px; height:100px; background:red;"> + <div style="float:left; width:100px;"> + <div id="target1" style="height:10px; background:green;"></div> + </div> + <div> + <div style="float:left; position:relative; width:100px; height:50px; background:green;"> + <div id="target2" style="position:absolute; width:10px; height:10px;"></div> + </div> + </div> +</div> +<script> +document.body.offsetTop; +target2.style.width = '20px'; +document.body.offsetTop; +target1.style.height = '50px'; +</script>
diff --git a/third_party/blink/web_tests/external/wpt/fetch/private-network-access/iframe.tentative.https.window.js b/third_party/blink/web_tests/external/wpt/fetch/private-network-access/iframe.tentative.https.window.js index 0c129705..bf16b6c 100644 --- a/third_party/blink/web_tests/external/wpt/fetch/private-network-access/iframe.tentative.https.window.js +++ b/third_party/blink/web_tests/external/wpt/fetch/private-network-access/iframe.tentative.https.window.js
@@ -100,7 +100,7 @@ source, target: { server: targetServer, - behavior: { preflight: PreflightBehavior.success(token()) }, + behavior: { preflight: PreflightBehavior.navigation(token()) }, }, expected: FrameTestResult.SUCCESS, }), prefix + "success."); @@ -242,7 +242,7 @@ grandparentServer: Server.HTTPS_PUBLIC, child: { server: Server.HTTPS_LOCAL, - behavior: { preflight: PreflightBehavior.success(token()) }, + behavior: { preflight: PreflightBehavior.navigation(token()) }, }, grandchild: { server: Server.HTTPS_LOCAL, @@ -256,11 +256,11 @@ grandparentServer: Server.HTTPS_PUBLIC, child: { server: Server.HTTPS_LOCAL, - behavior: { preflight: PreflightBehavior.success(token()) }, + behavior: { preflight: PreflightBehavior.navigation(token()) }, }, grandchild: { server: Server.HTTPS_LOCAL, - behavior: { preflight: PreflightBehavior.success(token()) }, + behavior: { preflight: PreflightBehavior.navigation(token()) }, }, expected: FrameTestResult.SUCCESS, });
diff --git a/third_party/blink/web_tests/external/wpt/fetch/private-network-access/resources/preflight.py b/third_party/blink/web_tests/external/wpt/fetch/private-network-access/resources/preflight.py index be3abdbb2..255bd56 100644 --- a/third_party/blink/web_tests/external/wpt/fetch/private-network-access/resources/preflight.py +++ b/third_party/blink/web_tests/external/wpt/fetch/private-network-access/resources/preflight.py
@@ -62,7 +62,7 @@ _ACAPN = ("Access-Control-Allow-Private-Network", "true") _ACAH = ("Access-Control-Allow-Headers", "Service-Worker") -def _get_response_headers(method, mode): +def _get_response_headers(method, mode, origin): acam = ("Access-Control-Allow-Methods", method) if mode == b"cors": @@ -74,6 +74,15 @@ if mode == b"cors+pna+sw": return [acam, _ACAO, _ACAPN, _ACAH] + if mode == b"navigation": + return [ + acam, + ("Access-Control-Allow-Origin", origin), + _ACAPN, + ("Access-Control-Allow-Credentials", "true"), + ("Access-Control-Allow-Headers", "Upgrade-Insecure-Requests") + ] + return [] def _get_expect_single_preflight(request): @@ -115,7 +124,8 @@ method = request.headers.get("Access-Control-Request-Method") mode = request.GET.get(b"preflight-headers") - headers = _get_response_headers(method, mode) + origin = request.headers.get("Origin") + headers = _get_response_headers(method, mode, origin) return (headers, "preflight") @@ -147,7 +157,8 @@ request.server.stash.put(uuid, "final") mode = request.GET.get(b"final-headers") - headers = _get_response_headers(request.method, mode) + origin = request.headers.get("Origin") + headers = _get_response_headers(request.method, mode, origin) redirect = request.GET.get(b"redirect") if redirect is not None:
diff --git a/third_party/blink/web_tests/external/wpt/fetch/private-network-access/resources/support.sub.js b/third_party/blink/web_tests/external/wpt/fetch/private-network-access/resources/support.sub.js index f8621338c..3d71b2d 100644 --- a/third_party/blink/web_tests/external/wpt/fetch/private-network-access/resources/support.sub.js +++ b/third_party/blink/web_tests/external/wpt/fetch/private-network-access/resources/support.sub.js
@@ -269,6 +269,13 @@ "preflight-headers": "cors+pna", "expect-single-preflight": true, }), + + // The preflight response should succeed and allow origins and headers for + // navigations. + navigation: (uuid) => ({ + "preflight-uuid": uuid, + "preflight-headers": "navigation", + }), }; // Methods generate behavior specifications for how `resources/preflight.py`
diff --git a/third_party/blink/web_tests/external/wpt/fledge/tentative/currency.https.window.js b/third_party/blink/web_tests/external/wpt/fledge/tentative/currency.https.window.js index 3ae9ef5..21b3f9af 100644 --- a/third_party/blink/web_tests/external/wpt/fledge/tentative/currency.https.window.js +++ b/third_party/blink/web_tests/external/wpt/fledge/tentative/currency.https.window.js
@@ -4,10 +4,15 @@ // META: script=/common/subset-tests.js // META: timeout=long // META: variant=?1-4 -// META: variant=?5-last +// META: variant=?5-8 +// META: variant=?9-12 +// META: variant=?13-16 +// META: variant=?17-last 'use strict;' +const ORIGIN = window.location.origin; + // The tests in this file focus on calls to runAdAuction involving currency // handling. @@ -30,30 +35,52 @@ test, uuid, OTHER_ORIGIN1, {biddingLogicURL: otherBiddingURL}); } -function createBiddingScriptURLWithCurrency( - uuid, currency, currencyInReporting) { +function createBiddingScriptURLWithCurrency(uuid, currency) { return createBiddingScriptURL({ bidCurrency: currency, + allowComponentAuction: true, reportWin: ` - if (browserSignals.bidCurrency !== '${currencyInReporting}') - throw 'Wrong currency'; - sendReportTo('${createBidderReportURL(uuid)}');` + sendReportTo('${createBidderReportURL(uuid, /*id=*/ '')}' + + browserSignals.bid + encodeURIComponent(browserSignals.bidCurrency));`, }); } -function createDecisionURLExpectCurrency( - uuid, currencyInScore, currencyInReporting) { +function createDecisionURLExpectCurrency(uuid, currencyInScore) { return createDecisionScriptURL(uuid, { scoreAd: ` if (browserSignals.bidCurrency !== '${currencyInScore}') throw 'Wrong currency';`, reportResult: ` - if (browserSignals.bidCurrency !== '${currencyInReporting}') - throw 'Wrong currency'; - sendReportTo('${createSellerReportURL(uuid)}');`, + sendReportTo('${createSellerReportURL(uuid, /*id=*/ '')}' + + browserSignals.bid + encodeURIComponent(browserSignals.bidCurrency) );`, }); } +async function runCurrencyComponentAuction(test, uuid, params = {}) { + let auctionConfigOverrides = { + interestGroupBuyers: [], + decisionLogicURL: createDecisionScriptURL(uuid, { + reportResult: ` + sendReportTo('${createSellerReportURL(uuid, 'top_')}' + + browserSignals.bid + encodeURIComponent(browserSignals.bidCurrency))`, + ...params.topLevelSellerScriptParamsOverride + }), + componentAuctions: [{ + seller: ORIGIN, + decisionLogicURL: createDecisionScriptURL(uuid, { + reportResult: ` + sendReportTo('${createSellerReportURL(uuid, 'component_')}' + + browserSignals.bid + encodeURIComponent(browserSignals.bidCurrency))`, + ...params.componentSellerScriptParamsOverride + }), + interestGroupBuyers: [ORIGIN], + ...params.componentAuctionConfigOverrides + }], + ...params.topLevelAuctionConfigOverrides + }; + return await runBasicFledgeAuction(test, uuid, auctionConfigOverrides); +} + subsetTest(promise_test, async test => { const uuid = generateUuid(test); await joinInterestGroup( @@ -64,40 +91,43 @@ subsetTest(promise_test, async test => { const uuid = generateUuid(test); - await joinInterestGroup(test, uuid, { - biddingLogicURL: createBiddingScriptURLWithCurrency(uuid, 'USD', '???') - }); + await joinInterestGroup( + test, uuid, + {biddingLogicURL: createBiddingScriptURLWithCurrency(uuid, 'USD')}); await runBasicFledgeAuctionAndNavigate( test, uuid, - {decisionLogicURL: createDecisionURLExpectCurrency(uuid, 'USD', '???')}); - await waitForObservedRequests( - uuid, [createSellerReportURL(uuid), createBidderReportURL(uuid)]); + {decisionLogicURL: createDecisionURLExpectCurrency(uuid, 'USD')}); + await waitForObservedRequests(uuid, [ + createSellerReportURL(uuid, '9???'), createBidderReportURL(uuid, '9???') + ]); }, 'Returning bid with currency, configuration w/o currency.'); subsetTest(promise_test, async test => { const uuid = generateUuid(test); - await joinInterestGroup(test, uuid, { - biddingLogicURL: createBiddingScriptURLWithCurrency(uuid, undefined, 'USD') - }); + await joinInterestGroup( + test, uuid, + {biddingLogicURL: createBiddingScriptURLWithCurrency(uuid, undefined)}); await runBasicFledgeAuctionAndNavigate(test, uuid, { perBuyerCurrencies: {'*': 'USD'}, - decisionLogicURL: createDecisionURLExpectCurrency(uuid, '???', 'USD') + decisionLogicURL: createDecisionURLExpectCurrency(uuid, '???') }); - await waitForObservedRequests( - uuid, [createSellerReportURL(uuid), createBidderReportURL(uuid)]); + await waitForObservedRequests(uuid, [ + createSellerReportURL(uuid, '9USD'), createBidderReportURL(uuid, '9USD') + ]); }, 'Returning bid w/o currency, configuration w/currency.'); subsetTest(promise_test, async test => { const uuid = generateUuid(test); - await joinInterestGroup(test, uuid, { - biddingLogicURL: createBiddingScriptURLWithCurrency(uuid, 'USD', 'USD') - }); + await joinInterestGroup( + test, uuid, + {biddingLogicURL: createBiddingScriptURLWithCurrency(uuid, 'USD')}); await runBasicFledgeAuctionAndNavigate(test, uuid, { perBuyerCurrencies: {'*': 'USD'}, - decisionLogicURL: createDecisionURLExpectCurrency(uuid, 'USD', 'USD') + decisionLogicURL: createDecisionURLExpectCurrency(uuid, 'USD') }); - await waitForObservedRequests( - uuid, [createSellerReportURL(uuid), createBidderReportURL(uuid)]); + await waitForObservedRequests(uuid, [ + createSellerReportURL(uuid, '9USD'), createBidderReportURL(uuid, '9USD') + ]); }, 'Returning bid w/currency, configuration w/matching currency.'); subsetTest(promise_test, async test => { @@ -113,7 +143,7 @@ const uuid = generateUuid(test); await joinTwoCurrencyGroups(test, uuid); let auctionConfigOverrides = { - interestGroupBuyers: [window.location.origin, OTHER_ORIGIN1], + interestGroupBuyers: [ORIGIN, OTHER_ORIGIN1], perBuyerCurrencies: {} }; auctionConfigOverrides.perBuyerCurrencies['*'] = 'USD'; @@ -132,10 +162,10 @@ const uuid = generateUuid(test); await joinTwoCurrencyGroups(test, uuid); let auctionConfigOverrides = { - interestGroupBuyers: [window.location.origin, OTHER_ORIGIN1], + interestGroupBuyers: [ORIGIN, OTHER_ORIGIN1], perBuyerCurrencies: {} }; - auctionConfigOverrides.perBuyerCurrencies[window.location.origin] = 'USD'; + auctionConfigOverrides.perBuyerCurrencies[ORIGIN] = 'USD'; auctionConfigOverrides.perBuyerCurrencies[OTHER_ORIGIN1] = 'EUR'; await runBasicFledgeAuctionAndNavigate(test, uuid, auctionConfigOverrides); @@ -149,15 +179,298 @@ const uuid = generateUuid(test); await joinTwoCurrencyGroups(test, uuid); let auctionConfigOverrides = { - interestGroupBuyers: [window.location.origin, OTHER_ORIGIN1], + interestGroupBuyers: [ORIGIN, OTHER_ORIGIN1], perBuyerCurrencies: {} }; auctionConfigOverrides.perBuyerCurrencies['*'] = 'EUR'; }, 'Different currencies for different origins, none match.'); +subsetTest(promise_test, async test => { + const uuid = generateUuid(test); + await joinInterestGroup( + test, uuid, + {biddingLogicURL: createBiddingScriptURLWithCurrency(uuid, 'USD')}); + let config = await runCurrencyComponentAuction(test, uuid, { + topLevelSellerScriptParamsOverride: { + scoreAd: ` + if (browserSignals.bidCurrency !== 'USD') + throw 'Wrong currency';` + } + }); + expectSuccess(config); + createAndNavigateFencedFrame(test, config); + // While scoring sees the original currency tag, reporting currency tags are + // config-based. + await waitForObservedRequests(uuid, [ + createSellerReportURL(uuid, 'top_9???'), + createSellerReportURL(uuid, 'component_9???'), + createBidderReportURL(uuid, '9???') + ]); +}, 'Multi-seller auction --- no currency restriction.'); -// TODO: // Conversion to uniform currency (integrate private aggregation -// to check --- also the passthrough and can't modify rule for things already -// in it. -// Basic sellerCurrency checks (requires component auctions; can be -// pass-through or modified bid). + +subsetTest(promise_test, async test => { + const uuid = generateUuid(test); + await joinInterestGroup( + test, uuid, + {biddingLogicURL: createBiddingScriptURLWithCurrency(uuid, 'USD')}); + let config = await runCurrencyComponentAuction(test, uuid, { + componentAuctionConfigOverrides: {sellerCurrency: 'USD'}, + topLevelSellerScriptParamsOverride: { + scoreAd: ` + if (browserSignals.bidCurrency !== 'USD') + throw 'Wrong currency';` + } + }); + expectSuccess(config); + createAndNavigateFencedFrame(test, config); + // Because component's sellerCurrency is USD, the bid it makes is seen to be + // in dollars by top-level reporting. That doesn't affect reporting in its + // own auction. + await waitForObservedRequests(uuid, [ + createSellerReportURL(uuid, 'top_9USD'), + createSellerReportURL(uuid, 'component_9???'), + createBidderReportURL(uuid, '9???') + ]); +}, 'Multi-seller auction --- component sellerCurrency matches bid.'); + +subsetTest(promise_test, async test => { + const uuid = generateUuid(test); + await joinInterestGroup( + test, uuid, + {biddingLogicURL: createBiddingScriptURLWithCurrency(uuid, 'USD')}); + let config = await runCurrencyComponentAuction(test, uuid, { + componentAuctionConfigOverrides: {sellerCurrency: 'EUR'}, + componentSellerScriptParamsOverride: { + scoreAd: ` + return {desirability: 2 * bid, allowComponentAuction: true, + bid: 1.5 * bid, bidCurrency: 'EUR'} + ` + }, + topLevelSellerScriptParamsOverride: { + scoreAd: ` + if (browserSignals.bidCurrency !== 'EUR') + throw 'Wrong currency';` + } + }); + expectSuccess(config); + createAndNavigateFencedFrame(test, config); + // Because component's sellerCurrency is USD, the bid it makes is seen to be + // in dollars by top-level reporting. That doesn't affect reporting in its + // own auction. + await waitForObservedRequests(uuid, [ + createSellerReportURL(uuid, 'top_13.5EUR'), + createSellerReportURL(uuid, 'component_9???'), + createBidderReportURL(uuid, '9???') + ]); +}, 'Multi-seller auction --- component scoreAd modifies bid into its sellerCurrency.'); + +subsetTest(promise_test, async test => { + const uuid = generateUuid(test); + await joinInterestGroup( + test, uuid, + {biddingLogicURL: createBiddingScriptURLWithCurrency(uuid, 'USD')}); + let config = await runCurrencyComponentAuction(test, uuid, { + componentAuctionConfigOverrides: {sellerCurrency: 'EUR'}, + componentSellerScriptParamsOverride: { + scoreAd: ` + return {desirability: 2 * bid, allowComponentAuction: true, + bid: 1.5 * bid} + ` + }, + topLevelSellerScriptParamsOverride: { + scoreAd: ` + // scoreAd sees what's actually passed in. + if (browserSignals.bidCurrency !== '???') + throw 'Wrong currency';` + } + }); + expectSuccess(config); + createAndNavigateFencedFrame(test, config); + await waitForObservedRequests(uuid, [ + createSellerReportURL(uuid, 'top_13.5EUR'), + createSellerReportURL(uuid, 'component_9???'), + createBidderReportURL(uuid, '9???') + ]); +}, 'Multi-seller auction --- component scoreAd modifies bid, no explicit currency.'); + +subsetTest(promise_test, async test => { + const uuid = generateUuid(test); + await joinInterestGroup( + test, uuid, + {biddingLogicURL: createBiddingScriptURLWithCurrency(uuid, 'USD')}); + let config = await runCurrencyComponentAuction(test, uuid, { + componentAuctionConfigOverrides: + {sellerCurrency: 'EUR', perBuyerCurrencies: {'*': 'USD'}}, + componentSellerScriptParamsOverride: { + scoreAd: ` + return {desirability: 2 * bid, allowComponentAuction: true, + bid: 1.5 * bid} + ` + }, + topLevelSellerScriptParamsOverride: { + scoreAd: ` + // scoreAd sees what's actually passed in. + if (browserSignals.bidCurrency !== '???') + throw 'Wrong currency';` + } + }); + expectSuccess(config); + createAndNavigateFencedFrame(test, config); + await waitForObservedRequests(uuid, [ + createSellerReportURL(uuid, 'top_13.5EUR'), + createSellerReportURL(uuid, 'component_9USD'), + createBidderReportURL(uuid, '9USD') + ]); +}, 'Multi-seller auction --- component scoreAd modifies bid, bidder has bidCurrency.'); + +subsetTest(promise_test, async test => { + const uuid = generateUuid(test); + await joinInterestGroup( + test, uuid, + {biddingLogicURL: createBiddingScriptURLWithCurrency(uuid, 'USD')}); + let config = await runCurrencyComponentAuction(test, uuid, { + componentAuctionConfigOverrides: {perBuyerCurrencies: {'*': 'USD'}}, + componentSellerScriptParamsOverride: { + scoreAd: ` + return {desirability: 2 * bid, allowComponentAuction: true, + bid: 1.5 * bid} + ` + }, + topLevelSellerScriptParamsOverride: { + scoreAd: ` + // scoreAd sees what's actually passed in. + if (browserSignals.bidCurrency !== '???') + throw 'Wrong currency';` + } + }); + expectSuccess(config); + createAndNavigateFencedFrame(test, config); + await waitForObservedRequests(uuid, [ + createSellerReportURL(uuid, 'top_13.5???'), + createSellerReportURL(uuid, 'component_9USD'), + createBidderReportURL(uuid, '9USD') + ]); +}, 'Multi-seller auction --- only bidder currency specified.'); + +subsetTest(promise_test, async test => { + const uuid = generateUuid(test); + await joinInterestGroup( + test, uuid, + {biddingLogicURL: createBiddingScriptURLWithCurrency(uuid, 'USD')}); + let result = await runCurrencyComponentAuction(test, uuid, { + componentAuctionConfigOverrides: {sellerCurrency: 'EUR'}, + componentSellerScriptParamsOverride: { + scoreAd: ` + return {desirability: 2 * bid, allowComponentAuction: true, + bid: 1.5 * bid, bidCurrency: 'CAD'} + ` + } + }); + expectNoWinner(result); +}, 'Multi-seller auction --- component scoreAd modifies bid to wrong currency.'); + +subsetTest(promise_test, async test => { + const uuid = generateUuid(test); + await joinInterestGroup( + test, uuid, + {biddingLogicURL: createBiddingScriptURLWithCurrency(uuid, 'USD')}); + let topLevelConfigOverride = {perBuyerCurrencies: {}}; + topLevelConfigOverride.perBuyerCurrencies[ORIGIN] = 'USD'; + let config = await runCurrencyComponentAuction(test, uuid, { + topLevelAuctionConfigOverrides: topLevelConfigOverride, + topLevelSellerScriptParamsOverride: { + scoreAd: ` + if (browserSignals.bidCurrency !== 'USD') + throw 'Wrong currency';` + } + }); + expectSuccess(config); + createAndNavigateFencedFrame(test, config); + // Because component is constrained by perBuyerCurrencies for it on top-level + // to USD, the bid it makes is seen to be in dollars by top-level reporting. + // That doesn't affect reporting in its own auction. + await waitForObservedRequests(uuid, [ + createSellerReportURL(uuid, 'top_9USD'), + createSellerReportURL(uuid, 'component_9???'), + createBidderReportURL(uuid, '9???') + ]); +}, 'Multi-seller auction --- top-level perBuyerCurrencies matches bid.'); + +subsetTest(promise_test, async test => { + const uuid = generateUuid(test); + await joinInterestGroup( + test, uuid, + {biddingLogicURL: createBiddingScriptURLWithCurrency(uuid, 'USD')}); + let topLevelConfigOverride = {perBuyerCurrencies: {}}; + topLevelConfigOverride.perBuyerCurrencies[ORIGIN] = 'USD'; + let config = await runCurrencyComponentAuction(test, uuid, { + componentAuctionConfigOverrides: {sellerCurrency: 'USD'}, + topLevelAuctionConfigOverrides: topLevelConfigOverride, + topLevelSellerScriptParamsOverride: { + scoreAd: ` + if (browserSignals.bidCurrency !== 'USD') + throw 'Wrong currency';` + } + }); + expectSuccess(config); + createAndNavigateFencedFrame(test, config); + // Because component is constrained by perBuyerCurrencies for it on top-level + // to USD, the bid it makes is seen to be in dollars by top-level reporting. + // That doesn't affect reporting in its own auction. + await waitForObservedRequests(uuid, [ + createSellerReportURL(uuid, 'top_9USD'), + createSellerReportURL(uuid, 'component_9???'), + createBidderReportURL(uuid, '9???') + ]); +}, 'Multi-seller auction --- consistent sellerConfig and top-level perBuyerCurrencies.'); + +subsetTest(promise_test, async test => { + const uuid = generateUuid(test); + await joinInterestGroup( + test, uuid, + {biddingLogicURL: createBiddingScriptURLWithCurrency(uuid, 'USD')}); + let topLevelConfigOverride = {perBuyerCurrencies: {}}; + topLevelConfigOverride.perBuyerCurrencies[ORIGIN] = 'EUR'; + let result = await runCurrencyComponentAuction(test, uuid, { + componentAuctionConfigOverrides: {sellerCurrency: 'USD'}, + topLevelAuctionConfigOverrides: topLevelConfigOverride, + topLevelSellerScriptParamsOverride: { + scoreAd: ` + if (browserSignals.bidCurrency !== 'USD') + throw 'Wrong currency';` + } + }); + expectNoWinner(result); +}, 'Multi-seller auction --- inconsistent sellerConfig and top-level perBuyerCurrencies.'); + +subsetTest(promise_test, async test => { + const uuid = generateUuid(test); + await joinInterestGroup( + test, uuid, + {biddingLogicURL: createBiddingScriptURLWithCurrency(uuid, 'USD')}); + let topLevelConfigOverride = {perBuyerCurrencies: {}}; + topLevelConfigOverride.perBuyerCurrencies[ORIGIN] = 'EUR'; + + let result = await runCurrencyComponentAuction( + test, uuid, {componentAuctionConfigOverrides: topLevelConfigOverride}); + expectNoWinner(result); +}, 'Multi-seller auction --- top-level perBuyerCurrencies different from bid.'); + +subsetTest(promise_test, async test => { + const uuid = generateUuid(test); + await joinInterestGroup( + test, uuid, + {biddingLogicURL: createBiddingScriptURLWithCurrency(uuid, 'USD')}); + let result = await runCurrencyComponentAuction( + test, uuid, {componentAuctionConfigOverrides: {sellerCurrency: 'EUR'}}); + expectNoWinner(result); +}, 'Multi-seller auction --- component sellerCurrency different from bid.'); + + +// TODO: highestScoringOtherBid bid stuff: +// --- combination of sellerCurrency on/off, different conversion cases. +// Rules on conversion. Not strictly highestScoringOtherBid, but it makes it +// easier to check. +// +// PrivateAggregation stuff.
diff --git a/third_party/blink/web_tests/external/wpt/fledge/tentative/kanon-status-below-threshold.https.window-expected.txt b/third_party/blink/web_tests/external/wpt/fledge/tentative/kanon-status-below-threshold.https.window-expected.txt new file mode 100644 index 0000000..89e64d0 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/fledge/tentative/kanon-status-below-threshold.https.window-expected.txt
@@ -0,0 +1,5 @@ +This is a testharness.js-based test. +[FAIL] Check kAnonStatus is "belowThreshold" when FledgeConsiderKAnonymityis enabled and FledgeEnforceKAnonymity is disabled + assert_array_equals: expected property 0 to be "https://web-platform.test:8444/fledge/tentative/resources/request-tracker.py?uuid=<uuid>&dispatch=track_get&id=bidder_report_1" but got "https://web-platform.test:8444/fledge/tentative/resources/request-tracker.py?uuid=<uuid>&dispatch=track_get&id=bidder_report_error" (expected array ["https://web-platform.test:8444/fledge/tentative/resources/request-tracker.py?uuid=<uuid>&dispatch=track_get&id=bidder_report_1"] got ["https://web-platform.test:8444/fledge/tentative/resources/request-tracker.py?uuid=<uuid>&dispatch=track_get&id=bidder_report_error"]) +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/external/wpt/fledge/tentative/kanon-status-below-threshold.https.window.js b/third_party/blink/web_tests/external/wpt/fledge/tentative/kanon-status-below-threshold.https.window.js new file mode 100644 index 0000000..4eac4a8 --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/fledge/tentative/kanon-status-below-threshold.https.window.js
@@ -0,0 +1,20 @@ +// META: script=/resources/testdriver.js +// META: script=/common/utils.js +// META: script=resources/fledge-util.sub.js +// META: script=/common/subset-tests.js + +"use strict;" + +subsetTest(promise_test, async test => { + const uuid = generateUuid(test); + await runReportTest( + test, uuid, + { reportWinSuccessCondition: + `browserSignals.kAnonStatus === "belowThreshold"`, + reportWin: + `sendReportTo('${createBidderReportURL(uuid)}');` }, + // expectedReportUrls: + [createBidderReportURL(uuid)]); + }, + 'Check kAnonStatus is "belowThreshold" when FledgeConsiderKAnonymity' + + 'is enabled and FledgeEnforceKAnonymity is disabled');
diff --git a/third_party/blink/web_tests/external/wpt/fledge/tentative/kanon-status-not-calculated.https.window.js b/third_party/blink/web_tests/external/wpt/fledge/tentative/kanon-status-not-calculated.https.window.js new file mode 100644 index 0000000..a3ac19b --- /dev/null +++ b/third_party/blink/web_tests/external/wpt/fledge/tentative/kanon-status-not-calculated.https.window.js
@@ -0,0 +1,20 @@ +// META: script=/resources/testdriver.js +// META: script=/common/utils.js +// META: script=resources/fledge-util.sub.js +// META: script=/common/subset-tests.js + +"use strict;" + +subsetTest(promise_test, async test => { + const uuid = generateUuid(test); + await runReportTest( + test, uuid, + { reportWinSuccessCondition: + `browserSignals.kAnonStatus === "notCalculated"`, + reportWin: + `sendReportTo('${createBidderReportURL(uuid)}');` }, + // expectedReportUrls: + [createBidderReportURL(uuid)]); + }, + 'Check kAnonStatus is "notCalculated" when FledgeConsiderKAnonymity' + + 'and FledgeEnforceKAnonymity are both disabled');
diff --git a/third_party/blink/web_tests/external/wpt/fledge/tentative/resources/fledge-util.sub.js b/third_party/blink/web_tests/external/wpt/fledge/tentative/resources/fledge-util.sub.js index 4dd971d..b547c3c 100644 --- a/third_party/blink/web_tests/external/wpt/fledge/tentative/resources/fledge-util.sub.js +++ b/third_party/blink/web_tests/external/wpt/fledge/tentative/resources/fledge-util.sub.js
@@ -31,6 +31,7 @@ // `dispatch` affects what the tracker script does. // `id` can be used to uniquely identify tracked requests. It has no effect // on behavior of the script; it only serves to make the URL unique. +// `id` will always be the last query parameter. function createTrackerURL(origin, uuid, dispatch, id = null) { let url = new URL(`${origin}${BASE_PATH}resources/request-tracker.py`); url.searchParams.append('uuid', uuid); @@ -50,6 +51,7 @@ // Create tracked bidder/seller URLs. The only difference is the prefix added // to the `id` passed to createTrackerURL. The optional `id` field allows // multiple bidder/seller report URLs to be distinguishable from each other. +// `id` will always be the last query parameter. function createBidderReportURL(uuid, id = '1', origin = window.location.origin) { return createTrackerURL(origin, uuid, `track_get`, `bidder_report_${id}`); } @@ -278,14 +280,27 @@ return await navigator.runAdAuction(auctionConfig); } +// Checks that await'ed return value of runAdAuction() denotes a successful +// auction with a winner. +function expectSuccess(config) { + assert_true(config !== null, `Auction unexpectedly had no winner`); + assert_true( + config instanceof FencedFrameConfig, + `Wrong value type returned from auction: ${config.constructor.type}`); +} + +// Checks that await'ed return value of runAdAuction() denotes an auction +// without a winner (but no fatal error). +function expectNoWinner(result) { + assert_true(result === null, 'Auction unexpectedly had a winner'); +} + // Wrapper around runBasicFledgeAuction() that runs an auction with the specified // arguments, expecting the auction to have a winner. Returns the FencedFrameConfig // from the auction. async function runBasicFledgeTestExpectingWinner(test, uuid, auctionConfigOverrides = {}) { let config = await runBasicFledgeAuction(test, uuid, auctionConfigOverrides); - assert_true(config !== null, `Auction unexpectedly had no winner`); - assert_true(config instanceof FencedFrameConfig, - `Wrong value type returned from auction: ${config.constructor.type}`); + expectSuccess(config); return config; } @@ -294,7 +309,7 @@ async function runBasicFledgeTestExpectingNoWinner( test, uuid, auctionConfigOverrides = {}) { let result = await runBasicFledgeAuction(test, uuid, auctionConfigOverrides); - assert_true(result === null, 'Auction unexpectedly had a winner'); + expectNoWinner(result); } // Creates a fenced frame and applies fencedFrameConfig to it. Also adds a cleanup @@ -393,7 +408,7 @@ if (reportWinSuccessCondition) { reportWin = `if (!(${reportWinSuccessCondition})) { - sendReportTo('${createSellerReportURL(uuid, 'error')}'); + sendReportTo('${createBidderReportURL(uuid, 'error')}'); return false; } ${reportWin}`;
diff --git a/third_party/blink/web_tests/external/wpt/fledge/tentative/round-a-value.https.window-expected.txt b/third_party/blink/web_tests/external/wpt/fledge/tentative/round-a-value.https.window-expected.txt index 77a8bb39..ea45d0a 100644 --- a/third_party/blink/web_tests/external/wpt/fledge/tentative/round-a-value.https.window-expected.txt +++ b/third_party/blink/web_tests/external/wpt/fledge/tentative/round-a-value.https.window-expected.txt
@@ -1,7 +1,7 @@ This is a testharness.js-based test. [PASS] Check adCost is stochastically rounded with 8 bit mantissa and exponent. [FAIL] Check bid is stochastically rounded with 8 bit mantissa and exponent. - assert_array_equals: expected property 0 to be "https://web-platform.test:8444/fledge/tentative/resources/request-tracker.py?uuid=<uuid>&dispatch=track_get&id=bidder_report_1" but got "https://web-platform.test:8444/fledge/tentative/resources/request-tracker.py?uuid=<uuid>&dispatch=track_get&id=seller_report_error" (expected array ["https://web-platform.test:8444/fledge/tentative/resources/request-tracker.py?uuid=<uuid>&dispatch=track_get&id=bidder_report_1"] got ["https://web-platform.test:8444/fledge/tentative/resources/request-tracker.py?uuid=<uuid>&dispatch=track_get&id=seller_report_error"]) + assert_array_equals: expected property 0 to be "https://web-platform.test:8444/fledge/tentative/resources/request-tracker.py?uuid=<uuid>&dispatch=track_get&id=bidder_report_1" but got "https://web-platform.test:8444/fledge/tentative/resources/request-tracker.py?uuid=<uuid>&dispatch=track_get&id=bidder_report_error" (expected array ["https://web-platform.test:8444/fledge/tentative/resources/request-tracker.py?uuid=<uuid>&dispatch=track_get&id=bidder_report_1"] got ["https://web-platform.test:8444/fledge/tentative/resources/request-tracker.py?uuid=<uuid>&dispatch=track_get&id=bidder_report_error"]) [FAIL] Check desirability is stochastically rounded with 8 bit mantissa and exponent. assert_array_equals: expected property 0 to be "https://web-platform.test:8444/fledge/tentative/resources/request-tracker.py?uuid=<uuid>&dispatch=track_get&id=bidder_report_1" but got "https://web-platform.test:8444/fledge/tentative/resources/request-tracker.py?uuid=<uuid>&dispatch=track_get&id=seller_report_error" (expected array ["https://web-platform.test:8444/fledge/tentative/resources/request-tracker.py?uuid=<uuid>&dispatch=track_get&id=bidder_report_1"] got ["https://web-platform.test:8444/fledge/tentative/resources/request-tracker.py?uuid=<uuid>&dispatch=track_get&id=seller_report_error"]) [FAIL] Check highestScoringOtherBid is stochastically rounded with 8 bit mantissa and exponent.
diff --git a/third_party/blink/web_tests/virtual/fledge-kanon-status-below-threshold/README.md b/third_party/blink/web_tests/virtual/fledge-kanon-status-below-threshold/README.md new file mode 100644 index 0000000..d8cf3c19 --- /dev/null +++ b/third_party/blink/web_tests/virtual/fledge-kanon-status-below-threshold/README.md
@@ -0,0 +1,15 @@ +This directory is to test kAnonStatus in reportWin() for Protected Audience with FLEDGE (https://github.com/WICG/turtledove/blob/main/FLEDGE.md) on. + +This parameter has four enum string values: +* `passedAndEnforced` The ad was k-anonymous and k-anonymity was required to win the auction. +* `passedNotEnforced` The ad was k-anonymous though k-anonymity was not required to win the auction. +* `belowThreshold` The ad was not k-anonymous but k-anonymity was not required to win the auction. +* `notCalculated` The browser did not calculate the k-anonymity status of the ad, and k-anonymity was not required to win the auction. + +The `kAnonStatus` is governed by the following flags: `CookieDeprecationFacilitatedTesting`, `FledgeEnforceKAnonymity`, and `FledgeConsiderKAnonymity`. + +If `CookieDeprecationFacilitatedTesting` is enabled, `KAnonymityBidMode` is set to `kNone`, resulting in a `kAnonStatus` of `notCalculated`. + +If `CookieDeprecationFacilitatedTesting` is disabled, and `FledgeConsiderKAnonymity` is enabled while `FledgeEnforceKAnonymity` is disabled, it results in a `kAnonStatus` of `belowThreshold`. + +The values `passedAndEnforced` and `passedNotEnforced` are determined by the Chrome KAnonymous service, but due to the complexity of simulating this service in web platform tests, they are currently omitted from the test.
diff --git a/third_party/blink/web_tests/virtual/fledge-kanon-status-below-threshold/external/wpt/fledge/tentative/kanon-status-below-threshold.https.window-expected.txt b/third_party/blink/web_tests/virtual/fledge-kanon-status-below-threshold/external/wpt/fledge/tentative/kanon-status-below-threshold.https.window-expected.txt new file mode 100644 index 0000000..7aebd66 --- /dev/null +++ b/third_party/blink/web_tests/virtual/fledge-kanon-status-below-threshold/external/wpt/fledge/tentative/kanon-status-below-threshold.https.window-expected.txt
@@ -0,0 +1,4 @@ +This is a testharness.js-based test. +[PASS] Check kAnonStatus is "belowThreshold" when FledgeConsiderKAnonymityis enabled and FledgeEnforceKAnonymity is disabled +Harness: the test ran to completion. +
diff --git a/third_party/blink/web_tests/virtual/pna-iframes-enabled/external/wpt/fetch/private-network-access/iframe.tentative.https.window_include=from-private-expected.txt b/third_party/blink/web_tests/virtual/pna-iframes-enabled/external/wpt/fetch/private-network-access/iframe.tentative.https.window_include=from-private-expected.txt index cab1a9a6..5d769ff 100644 --- a/third_party/blink/web_tests/virtual/pna-iframes-enabled/external/wpt/fetch/private-network-access/iframe.tentative.https.window_include=from-private-expected.txt +++ b/third_party/blink/web_tests/virtual/pna-iframes-enabled/external/wpt/fetch/private-network-access/iframe.tentative.https.window_include=from-private-expected.txt
@@ -2,8 +2,7 @@ [PASS] private to local: failed preflight. [PASS] private to local: missing CORS headers. [PASS] private to local: missing PNA header. -[FAIL] private to local: success. - assert_equals: expected "loaded" but got "timeout" +[PASS] private to local: success. [PASS] private to private: no preflight required. [PASS] private to public: no preflight required. Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/virtual/pna-iframes-enabled/external/wpt/fetch/private-network-access/iframe.tentative.https.window_include=from-public-expected.txt b/third_party/blink/web_tests/virtual/pna-iframes-enabled/external/wpt/fetch/private-network-access/iframe.tentative.https.window_include=from-public-expected.txt index b385b4c..23cba6b 100644 --- a/third_party/blink/web_tests/virtual/pna-iframes-enabled/external/wpt/fetch/private-network-access/iframe.tentative.https.window_include=from-public-expected.txt +++ b/third_party/blink/web_tests/virtual/pna-iframes-enabled/external/wpt/fetch/private-network-access/iframe.tentative.https.window_include=from-public-expected.txt
@@ -2,13 +2,11 @@ [PASS] public to local: failed preflight. [PASS] public to local: missing CORS headers. [PASS] public to local: missing PNA header. -[FAIL] public to local: success. - assert_equals: expected "loaded" but got "timeout" +[PASS] public to local: success. [PASS] public to private: failed preflight. [PASS] public to private: missing CORS headers. [PASS] public to private: missing PNA header. -[FAIL] public to private: success. - assert_equals: expected "loaded" but got "timeout" +[PASS] public to private: success. [PASS] public to public: no preflight required. Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/virtual/pna-iframes-enabled/external/wpt/fetch/private-network-access/iframe.tentative.https.window_include=from-treat-as-public-expected.txt b/third_party/blink/web_tests/virtual/pna-iframes-enabled/external/wpt/fetch/private-network-access/iframe.tentative.https.window_include=from-treat-as-public-expected.txt index 949d659..f775927 100644 --- a/third_party/blink/web_tests/virtual/pna-iframes-enabled/external/wpt/fetch/private-network-access/iframe.tentative.https.window_include=from-treat-as-public-expected.txt +++ b/third_party/blink/web_tests/virtual/pna-iframes-enabled/external/wpt/fetch/private-network-access/iframe.tentative.https.window_include=from-treat-as-public-expected.txt
@@ -2,14 +2,12 @@ [PASS] treat-as-public-address to local: failed preflight. [PASS] treat-as-public-address to local: missing CORS headers. [PASS] treat-as-public-address to local: missing PNA header. -[FAIL] treat-as-public-address to local: success. - assert_equals: expected "loaded" but got "timeout" +[PASS] treat-as-public-address to local: success. [PASS] treat-as-public-address to local (same-origin): no preflight required. [PASS] treat-as-public-address to private: failed preflight. [PASS] treat-as-public-address to private: missing CORS headers. [PASS] treat-as-public-address to private: missing PNA header. -[FAIL] treat-as-public-address to private: success. - assert_equals: expected "loaded" but got "timeout" +[PASS] treat-as-public-address to private: success. [PASS] treat-as-public-address to public: no preflight required. [PASS] treat-as-public-address to local: optional preflight Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/virtual/pna-iframes-enabled/external/wpt/fetch/private-network-access/iframe.tentative.https.window_include=grandparent-expected.txt b/third_party/blink/web_tests/virtual/pna-iframes-enabled/external/wpt/fetch/private-network-access/iframe.tentative.https.window_include=grandparent-expected.txt new file mode 100644 index 0000000..4697239 --- /dev/null +++ b/third_party/blink/web_tests/virtual/pna-iframes-enabled/external/wpt/fetch/private-network-access/iframe.tentative.https.window_include=grandparent-expected.txt
@@ -0,0 +1,7 @@ +This is a testharness.js-based test. +[PASS] local to local, grandparent navigates: no preflight required. +[PASS] local to local (same-origin), grandparent navigates: no preflight required. +[PASS] public to local, grandparent navigates: failure. +[PASS] public to local, grandparent navigates: success. +Harness: the test ran to completion. +
diff --git a/third_party/catapult b/third_party/catapult index f3e882d..448b931 160000 --- a/third_party/catapult +++ b/third_party/catapult
@@ -1 +1 @@ -Subproject commit f3e882d6319dab1c71e0b86dacf13f7ef859701f +Subproject commit 448b931d9af81cee1f1bcf89672ccbad21a2513e
diff --git a/third_party/dawn b/third_party/dawn index 450cd4e..3ec3339 160000 --- a/third_party/dawn +++ b/third_party/dawn
@@ -1 +1 @@ -Subproject commit 450cd4e14242c9e2a87ac3b9a2bb3cc41006d528 +Subproject commit 3ec333906a355a569954ce4822852cda98dd7f23
diff --git a/third_party/depot_tools b/third_party/depot_tools index b4e466e..0c5e865 160000 --- a/third_party/depot_tools +++ b/third_party/depot_tools
@@ -1 +1 @@ -Subproject commit b4e466e610accd97629e2a8f3e4fdb307bc54f4a +Subproject commit 0c5e8652fe1fefee1c291cbf05ca3a41b9f66890
diff --git a/third_party/freetype/README.chromium b/third_party/freetype/README.chromium index 0c5e46a..fff697b 100644 --- a/third_party/freetype/README.chromium +++ b/third_party/freetype/README.chromium
@@ -1,7 +1,7 @@ Name: FreeType URL: http://www.freetype.org/ -Version: VER-2-13-2-53-g6d6607b8b -Revision: 6d6607b8b3a78a305cc92d6016c411344c8c7b89 +Version: VER-2-13-2-58-ge92027377 +Revision: e9202737747ac008819d24a39c54584200c7a254 CPEPrefix: cpe:/a:freetype:freetype:2.13.2 License: Custom license "inspired by the BSD, Artistic, and IJG (Independent JPEG Group) licenses"
diff --git a/third_party/freetype/src b/third_party/freetype/src index 6d6607b..e920273 160000 --- a/third_party/freetype/src +++ b/third_party/freetype/src
@@ -1 +1 @@ -Subproject commit 6d6607b8b3a78a305cc92d6016c411344c8c7b89 +Subproject commit e9202737747ac008819d24a39c54584200c7a254
diff --git a/third_party/harfbuzz-ng/README.chromium b/third_party/harfbuzz-ng/README.chromium index 48956e5..1588c33 100644 --- a/third_party/harfbuzz-ng/README.chromium +++ b/third_party/harfbuzz-ng/README.chromium
@@ -1,10 +1,10 @@ Name: harfbuzz-ng Short Name: harfbuzz-ng URL: http://harfbuzz.org -Version: 8.2.1-42 -CPEPrefix: cpe:/a:harfbuzz_project:harfbuzz:8.2.1 -Date: 2023-10-05 -Revision: f26fd69d858642d76413b8f4068eaf9b57c40a5f +Version: 8.2.2-53 +CPEPrefix: cpe:/a:harfbuzz_project:harfbuzz:8.2.2 +Date: 2023-11-06 +Revision: 920c40cd43dd7b10b7ecba3d82a46f5fea88536f Security Critical: yes Shipped: yes License: MIT
diff --git a/third_party/harfbuzz-ng/src b/third_party/harfbuzz-ng/src index f26fd69..920c40c 160000 --- a/third_party/harfbuzz-ng/src +++ b/third_party/harfbuzz-ng/src
@@ -1 +1 @@ -Subproject commit f26fd69d858642d76413b8f4068eaf9b57c40a5f +Subproject commit 920c40cd43dd7b10b7ecba3d82a46f5fea88536f
diff --git a/third_party/leveldatabase/OWNERS b/third_party/leveldatabase/OWNERS index 1cd1c1dd..aa6c26f7 100644 --- a/third_party/leveldatabase/OWNERS +++ b/third_party/leveldatabase/OWNERS
@@ -1,5 +1,5 @@ # Primary for bugs, reviews: -asully@chromium.org +estade@chromium.org # Secondary: ayui@chromium.org
diff --git a/third_party/ml b/third_party/ml index 05e8032..12e73e8 160000 --- a/third_party/ml +++ b/third_party/ml
@@ -1 +1 @@ -Subproject commit 05e8032fd4cbe1508963eb1357b979e3d28e48e0 +Subproject commit 12e73e8a007bd7ceaabfc1c0c8baa54c9c8348ff
diff --git a/third_party/perfetto b/third_party/perfetto index eaa388e..79b45f6 160000 --- a/third_party/perfetto +++ b/third_party/perfetto
@@ -1 +1 @@ -Subproject commit eaa388ea811c973cbc86d6c304cbdc847cebe47d +Subproject commit 79b45f60dfbe97cbbc8f8be3a3807ae186bfd60a
diff --git a/third_party/webrtc b/third_party/webrtc index 2bb4872..9272771 160000 --- a/third_party/webrtc +++ b/third_party/webrtc
@@ -1 +1 @@ -Subproject commit 2bb48727a04b6d8742f5ded3646b352ab30d5800 +Subproject commit 9272771418491e6ec56d6ea11167d1d1cbf2b81f
diff --git a/tools/metrics/actions/actions.xml b/tools/metrics/actions/actions.xml index 98bd4411..a4e06ec 100644 --- a/tools/metrics/actions/actions.xml +++ b/tools/metrics/actions/actions.xml
@@ -34022,6 +34022,15 @@ </description> </action> +<action name="Signin_Signin_FromTabOrganization"> + <owner>emshack@chromium.org</owner> + <owner>chrome-desktop-ui-sea@google.com</owner> + <description> + Recorded on sign in start from access point + signin_metrics::AccessPoint::ACCESS_POINT_TAB_ORGANIZATION. + </description> +</action> + <action name="Signin_Signin_FromTabSwitcher"> <owner>bzanotti@chromium.org</owner> <description>
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml index 406cb879..014d248 100644 --- a/tools/metrics/histograms/enums.xml +++ b/tools/metrics/histograms/enums.xml
@@ -67,189 +67,6 @@ <int value="17" label="kMissingMoreAbout">MoreAbout URL is missing.</int> </enum> -<enum name="AbslErrorCode"> - <int value="0" label="Ok"/> - <int value="1" label="Cancelled"/> - <int value="2" label="Unknown"/> - <int value="3" label="InvalidArgument"/> - <int value="4" label="DeadlineExceeded"/> - <int value="5" label="NotFound"/> - <int value="6" label="AlreadyExists"/> - <int value="7" label="PermissionDenied"/> - <int value="8" label="ResourceExhausted"/> - <int value="9" label="FailedPrecondition"/> - <int value="10" label="Aborted"/> - <int value="11" label="OutOfRange"/> - <int value="12" label="Unimplemented"/> - <int value="13" label="Internal"/> - <int value="14" label="Unavailable"/> - <int value="15" label="DataLoss"/> - <int value="16" label="Unauthenticated"/> - <int value="17" label="Reserved (17)"/> - <int value="18" label="Reserved (18)"/> - <int value="19" label="Reserved (19)"/> - <int value="20" label="Reserved (20)"/> -</enum> - -<enum name="AcceleratorAction"> - <int value="0" label="BrightnessDown"/> - <int value="1" label="BrightnessUp"/> - <int value="2" label="CycleBackwardMru"/> - <int value="3" label="CycleForwardMru"/> - <int value="4" label="CycleSameAppWindowsBackward"/> - <int value="5" label="CycleSameAppWindowsForward"/> - <int value="6" label="DesksActivateDeskLeft"/> - <int value="7" label="DesksActivateDeskRight"/> - <int value="8" label="DesksMoveActiveItemLeft"/> - <int value="9" label="DesksMoveActiveItemRight"/> - <int value="10" label="DesksNewDesk"/> - <int value="11" label="DesksRemoveCurrentDesk"/> - <int value="12" label="DesksActivate0"/> - <int value="13" label="DesksActivate1"/> - <int value="14" label="DesksActivate2"/> - <int value="15" label="DesksActivate3"/> - <int value="16" label="DesksActivate4"/> - <int value="17" label="DesksActivate5"/> - <int value="18" label="DesksActivate6"/> - <int value="19" label="DesksActivate7"/> - <int value="20" label="DesksToggleAssignToAllDesks"/> - <int value="21" label="DisableCapsLock"/> - <int value="22" label="EnableOrToggleDictation"/> - <int value="23" label="Exit"/> - <int value="24" label="FocusCameraPreview"/> - <int value="25" label="FocusNextPane"/> - <int value="26" label="FocusPreviousPane"/> - <int value="27" label="FocusShelf"/> - <int value="28" label="FocusPip"/> - <int value="29" label="KeyboardBacklightToggle"/> - <int value="30" label="KeyboardBrightnessDown"/> - <int value="31" label="KeyboardBrightnessUp"/> - <int value="32" label="LaunchApp0"/> - <int value="33" label="LaunchApp1"/> - <int value="34" label="LaunchApp2"/> - <int value="35" label="LaunchApp3"/> - <int value="36" label="LaunchApp4"/> - <int value="37" label="LaunchApp5"/> - <int value="38" label="LaunchApp6"/> - <int value="39" label="LaunchApp7"/> - <int value="40" label="LaunchLastApp"/> - <int value="41" label="LockPressed"/> - <int value="42" label="LockReleased"/> - <int value="43" label="LockScreen"/> - <int value="44" label="MagnifierZoomIn"/> - <int value="45" label="MagnifierZoomOut"/> - <int value="46" label="MediaFastForward"/> - <int value="47" label="MediaNextTrack"/> - <int value="48" label="MediaPause"/> - <int value="49" label="MediaPlay"/> - <int value="50" label="MediaPlayPause"/> - <int value="51" label="MediaPrevTrack"/> - <int value="52" label="MediaRewind"/> - <int value="53" label="MediaStop"/> - <int value="54" label="MicrophoneMuteToggle"/> - <int value="55" label="MoveActiveWindowBetweenDisplays"/> - <int value="56" label="NewIncognitoWindow"/> - <int value="57" label="NewTab"/> - <int value="58" label="NewWindow"/> - <int value="59" label="OpenCalculator"/> - <int value="60" label="OpenCrosh"/> - <int value="61" label="OpenDiagnostics"/> - <int value="62" label="OpenFeedbackPage"/> - <int value="63" label="OpenFileManager"/> - <int value="64" label="OpenGetHelp"/> - <int value="65" label="PasteClipboardHistoryPlainText"/> - <int value="66" label="PowerPressed"/> - <int value="67" label="PowerReleased"/> - <int value="68" label="PrintUiHierarchies"/> - <int value="69" label="PrivacyScreenToggle"/> - <int value="70" label="RestoreTab"/> - <int value="71" label="RotateScreen"/> - <int value="72" label="RotateWindow"/> - <int value="73" label="ScaleUiDown"/> - <int value="74" label="ScaleUiReset"/> - <int value="75" label="ScaleUiUp"/> - <int value="76" label="ShowEmojiPicker"/> - <int value="77" label="ToggleImeMenuBubble"/> - <int value="78" label="ShowShortcutViewer"/> - <int value="79" label="ShowTaskManager"/> - <int value="80" label="StartAssistant"/> - <int value="81" label="StopScreenRecording"/> - <int value="82" label="Suspend"/> - <int value="83" label="SwapPrimaryDisplay"/> - <int value="84" label="SwitchIme"/> - <int value="85" label="SwitchToLastUsedIme"/> - <int value="86" label="SwitchToNextIme"/> - <int value="87" label="SwitchToNextUser"/> - <int value="88" label="SwitchToPreviousUser"/> - <int value="89" label="TakePartialScreenshot"/> - <int value="90" label="TakeScreenshot"/> - <int value="91" label="TakeWindowScreenshot"/> - <int value="92" label="ToggleAppList"/> - <int value="93" label="ToggleCalendar"/> - <int value="94" label="ToggleCapsLock"/> - <int value="95" label="ToggleClipboardHistory"/> - <int value="96" label="ToggleDockedMagnifier"/> - <int value="97" label="ToggleFloating"/> - <int value="98" label="ToggleFullscreen"/> - <int value="99" label="ToggleFullscreenMagnifier"/> - <int value="100" label="ToggleGameDashboard"/> - <int value="101" label="ToggleHighContrast"/> - <int value="102" label="ToggleMaximized"/> - <int value="103" label="ToggleMessageCenterBubble"/> - <int value="104" label="ToggleMirrorMode"/> - <int value="105" label="ToggleMultitaskMenu"/> - <int value="106" label="ToggleOverview"/> - <int value="107" label="ToggleProjectorMarker"/> - <int value="108" label="ToggleResizeLockMenu"/> - <int value="109" label="ToggleSnapGroupWindowsGroupAndUngroup"/> - <int value="110" label="ToggleSnapGroupWindowsMinimizeAndRestore"/> - <int value="111" label="ToggleSpokenFeedback"/> - <int value="112" label="ToggleStylusTools"/> - <int value="113" label="ToggleSystemTrayBubble"/> - <int value="114" label="ToggleWifi"/> - <int value="115" label="TouchHudClear"/> - <int value="116" label="TouchHudModeChange"/> - <int value="117" label="TouchFingerprintSensor111"/> - <int value="118" label="TouchFingerprintSensor2"/> - <int value="119" label="TouchFingerprintSensor3"/> - <int value="120" label="Unpin"/> - <int value="121" label="VolumeDown"/> - <int value="122" label="VolumeMute"/> - <int value="123" label="VolumeUp"/> - <int value="124" label="WindowCycleSnapLeft"/> - <int value="125" label="WindowCycleSnapRight"/> - <int value="126" label="WindowMinimize"/> - <int value="127" label="MinimizeTopWindowOnBack"/> - <int value="128" label="VolumeMuteToggle"/> - <int value="129" label="DebugClearUseKMeansPref"/> - <int value="130" label="DebugKeyboardBacklightToggle"/> - <int value="131" label="DebugMicrophoneMuteToggle"/> - <int value="132" label="DebugPrintLayerHierarchy"/> - <int value="133" label="DebugPrintViewHierarchy"/> - <int value="134" label="DebugPrintWindowHierarchy"/> - <int value="135" label="DebugShowInformedRestore"/> - <int value="136" label="DebugShowToast"/> - <int value="137" label="DebugShowSystemNudge"/> - <int value="138" label="DebugSystemUiStyleViewer"/> - <int value="139" label="DebugToggleDarkMode"/> - <int value="140" label="DebugToggleDynamicColor"/> - <int value="141" label="DebugTogglePowerButtonMenu"/> - <int value="142" label="DebugToggleShowDebugBorders"/> - <int value="143" label="DebugToggleShowFpsCounter"/> - <int value="144" label="DebugToggleShowPaintRects"/> - <int value="145" label="DebugToggleTouchPad"/> - <int value="146" label="DebugToggleTouchScreen"/> - <int value="147" label="DebugToggleTabletMode"/> - <int value="148" label="DebugToggleVideoConferenceCameraTrayIcon"/> - <int value="149" label="DebugToggleWallpaperMode"/> - <int value="150" label="DebugTriggerCrash"/> - <int value="151" label="DebugToggleHudDisplay"/> - <int value="152" label="DebugToggleVirtualTrackpad"/> - <int value="153" label="DevAddRemoveDisplay"/> - <int value="154" label="DevToggleAppList"/> - <int value="155" label="DevToggleUnifiedDesktop"/> -</enum> - <enum name="AcceptChEntries"> <int value="0" label="no entries"/> <int value="1" label="only valid entries"/> @@ -2928,17 +2745,6 @@ <int value="4" label="Snapped"/> </enum> -<enum name="ArcIntentHandlerDestinationPlatform"> - <summary> - Defines ARC intent handler platforms to continue the navigation. - </summary> - <int value="0" label="ARC"/> - <int value="1" label="Chrome"/> - <int value="2" label="Progressive web app"/> - <int value="3" label="External device"/> - <int value="4" label="Mac OS app"/> -</enum> - <!-- These values must be in sync with ProvisionConstants in CloudDPC code --> <enum name="ArcTosScreenUserActions"> @@ -3188,23 +2994,6 @@ <int value="2" label="FINISHED">AsyncTask is done.</int> </enum> -<enum name="AttachmentForm"> - <int value="0" label="Mouse"/> - <int value="1" label="Pointing Stick"/> - <int value="2" label="Touchpad"/> - <int value="3" label="Touchscreen"/> - <int value="4" label="Stylus"/> - <int value="5" label="Gamepad"/> - <int value="6" label="Keyboard"/> -</enum> - -<enum name="AttachmentType"> - <int value="0" label="Internal"/> - <int value="1" label="USB"/> - <int value="2" label="Bluetooth"/> - <int value="3" label="Unknown"/> -</enum> - <enum name="AttemptingMultipleOverlays"> <int value="0" label="Yes"/> <int value="1" label="No, feature is disabled"/> @@ -3212,38 +3001,6 @@ <int value="3" label="No, candidate uses an unsupported strategy"/> </enum> -<enum name="AttestationFlowStatus"> -<!-- - Uninteresting/unused values are not labeled. - See "ChromeOS.Attestation.AttestationFlowStatus" histogram ---> - - <int value="10" label="Failure w/o proxy"/> - <int value="11" label="Fallback w/o proxy"/> - <int value="12" label="Success w/o proxy"/> - <int value="34" label="Failure w/ default flow being skipped w/ proxy"/> - <int value="35" label="Success w/ default flow being skipped w/ proxy"/> -</enum> - -<enum name="AttestationStatus"> -<!-- - The alias of `enum AttestationStatus` defined in - `system_api/dbus/attestation/interface.proto` in - `chromiumos/platform2` repository. ---> - - <int value="0" label="STATUS_SUCCESS"/> - <int value="1" label="STATUS_UNEXPECTED_DEVICE_ERROR"/> - <int value="2" label="STATUS_NOT_AVAILABLE"/> - <int value="3" label="STATUS_NOT_READY"/> - <int value="4" label="STATUS_NOT_ALLOWED"/> - <int value="5" label="STATUS_INVALID_PARAMETER"/> - <int value="6" label="STATUS_REQUEST_DENIED_BY_CA"/> - <int value="7" label="STATUS_CA_NOT_AVAILABLE"/> - <int value="8" label="STATUS_NOT_SUPPORTED"/> - <int value="9" label="STATUS_DBUS_ERROR"/> -</enum> - <enum name="AttributionDestinationRateLimitResult"> <int value="0" label="Allowed"/> <int value="1" label="Disallowed (global limit)"/> @@ -6869,17 +6626,6 @@ <int value="273" label="ClearLocalCvcs: Failure"/> </enum> -<enum name="AutoFramingError"> - <int value="0" label="No error"/> - <int value="1" label="Initialization error"/> - <int value="2" label="Configuration error"/> - <int value="3" label="Processing capture request error"/> - <int value="4" label="Processing capture result error"/> - <int value="5" label="Auto Framing pipeline initialization error"/> - <int value="6" label="Auto Framing pipeline input error"/> - <int value="7" label="Auto Framing pipeline output error"/> -</enum> - <enum name="AutomaticBeaconOutcome"> <int value="0" label="Success"/> <int value="1" label="No transient user activation"/> @@ -7058,6 +6804,9 @@ <int value="1" label="No WebFrame in RenderFrame"/> <int value="2" label="No active Document in WebAXContext"/> <int value="3" label="No existing AXObjectCache in WebAXContext"/> + <int value="4" label="Max nodes limit reached"/> + <int value="5" label="Timeout limit reached"/> + <int value="6" label="Max nodes and timeout limits both reached"/> </enum> <enum name="BackForwardCacheBrowsingInstanceNotSwappedReason"> @@ -9495,17 +9244,6 @@ <int value="3" label="Channel rollback required"/> </enum> -<enum name="CableSpeedMetric"> - <int value="0" label="Other"/> - <int value="1" label="USB 2.0"/> - <int value="2" label="USB 3.2 - Gen1"/> - <int value="3" label="USB 3.2 / USB4 - Gen2"/> - <int value="4" label="USB 3.1 - Gen1"/> - <int value="5" label="USB 3.1 - Gen1,Gen2"/> - <int value="6" label="USB4 - Gen3"/> - <int value="7" label="Thunderbolt Only - 10G,20G"/> -</enum> - <enum name="CachedMetadataHandlerState"> <int value="0" label="Present"/> <int value="1" label="DataType mismatch"/> @@ -9655,26 +9393,6 @@ <int value="3" label="By Stylus"/> </enum> -<enum name="CameraEffectError"> - <int value="0" label="kNoError"/> - <int value="1" label="kGPUInitializationError"/> - <int value="2" label="kBufferAllocationError"/> - <int value="3" label="kReceivedFailedBuffer"/> - <int value="4" label="kSyncWaitTimeout"/> - <int value="5" label="kBufferRegistrationFailed"/> - <int value="6" label="kBufferUnregistrationFailed"/> - <int value="7" label="kGPUImageInitializationFailed"/> - <int value="8" label="kYUVConversionFailed"/> - <int value="9" label="kPipelineFailed"/> -</enum> - -<enum name="CameraEffectType"> - <int value="0" label="kNone"/> - <int value="1" label="kBlur"/> - <int value="2" label="kRelight"/> - <int value="3" label="kBlurAndRelight"/> -</enum> - <enum name="CameraOpenEntryPoint"> <int value="0" label="Omnibox"/> <int value="1" label="New Tab Page (NTP)"/> @@ -10682,36 +10400,6 @@ <int value="3" label="Dropped or ignored"/> </enum> -<enum name="CertProvisioningEvent"> - <int value="0" label="kRegisteredToInvalidationTopic"/> - <int value="1" label="kInvalidationReceived"/> - <int value="2" label="kWorkerRetryWithoutInvalidation"/> - <int value="3" label="kWorkerRetrySucceededWithoutInvalidation"/> - <int value="4" label="kProfileRetriedManually"/> - <int value="5" label="kWorkerCreated"/> - <int value="6" label="kWorkerDeserialized"/> - <int value="7" label="kWorkerDeserializationFailed"/> -</enum> - -<enum name="CertProvisioningWorkerState"> - <int value="0" label="kInitState"/> - <int value="1" label="kKeypairGenerated"/> - <int value="2" label="kStartCsrResponseReceived"/> - <int value="3" label="kVaChallengeFinished"/> - <int value="4" label="kKeyRegistered"/> - <int value="5" label="kKeypairMarked"/> - <int value="6" label="kSignCsrFinished"/> - <int value="7" label="kFinishCsrResponseReceived"/> - <int value="8" label="kSucceeded"/> - <int value="9" label="kInconsistentDataError"/> - <int value="10" label="kFailed"/> - <int value="11" label="kCanceled"/> - <int value="12" label="kReadyForNextOperation"/> - <int value="13" label="kAuthorizeInstructionReceived"/> - <int value="14" label="kProofOfPossessionInstructionReceived"/> - <int value="15" label="kImportCertificateInstructionReceived"/> -</enum> - <enum name="ChannelLayout"> <int value="0" label="CHANNEL_LAYOUT_NONE"/> <int value="1" label="CHANNEL_LAYOUT_UNSUPPORTED"/> @@ -11012,44 +10700,6 @@ <int value="4" label="kEFI"/> </enum> -<enum name="ChromeOSCameraClientType"> - <int value="0" label="Unknown"/> - <int value="1" label="Testing"/> - <int value="2" label="Chrome"/> - <int value="3" label="Android"/> - <int value="4" label="PluginVM"/> - <int value="5" label="AshChrome"/> - <int value="6" label="LacrosChrome"/> -</enum> - -<enum name="ChromeOSCameraErrorType"> - <int value="1" label="Device"/> - <int value="2" label="Request"/> - <int value="3" label="Result"/> - <int value="4" label="Buffer"/> -</enum> - -<enum name="ChromeOSCameraFaceAutoExposureFunctionStatus"> - <int value="0" label="Unsupported"/> - <int value="1" label="NotEnabled"/> - <int value="2" label="Enabled"/> - <int value="3" label="ForceDisabled"/> -</enum> - -<enum name="ChromeOSCameraFacing"> - <int value="0" label="Back"/> - <int value="1" label="Front"/> - <int value="2" label="External"/> -</enum> - -<enum name="ChromeOSChannel"> - <int value="0" label="Unknown"/> - <int value="1" label="Canary"/> - <int value="2" label="Dev"/> - <int value="3" label="Beta"/> - <int value="4" label="Stable"/> -</enum> - <enum name="ChromeOSEfiManagementEvent"> <int value="0" label="RequiredEntryManagementFailed"/> <int value="1" label="OptionalEntryManagementFailed"/> @@ -11062,211 +10712,6 @@ <int value="2" label="Blocked by invalid sync token"/> </enum> -<enum name="ChromeOSIioServiceSensorUsage"> - <int value="0" label="ACCEL_base"/> - <int value="1" label="ACCEL_lid"/> - <int value="2" label="ACCEL_camera"/> - <int value="3" label="ACCEL_others"/> - <int value="4" label="ANGLVEL_base"/> - <int value="5" label="ANGLVEL_lid"/> - <int value="6" label="ANGLVEL_camera"/> - <int value="7" label="ANGLVEL_others"/> - <int value="8" label="LIGHT_base"/> - <int value="9" label="LIGHT_lid"/> - <int value="10" label="LIGHT_camera"/> - <int value="11" label="LIGHT_others"/> - <int value="12" label="COUNT_base"/> - <int value="13" label="COUNT_lid"/> - <int value="14" label="COUNT_camera"/> - <int value="15" label="COUNT_others"/> - <int value="16" label="MAGN_base"/> - <int value="17" label="MAGN_lid"/> - <int value="18" label="MAGN_camera"/> - <int value="19" label="MAGN_others"/> - <int value="20" label="ANGL_base"/> - <int value="21" label="ANGL_lid"/> - <int value="22" label="ANGL_camera"/> - <int value="23" label="ANGL_others"/> - <int value="24" label="BARO_base"/> - <int value="25" label="BARO_lid"/> - <int value="26" label="BARO_camera"/> - <int value="27" label="BARO_others"/> - <int value="28" label="ACCEL_UNCALIBRATED_base"/> - <int value="29" label="ACCEL_UNCALIBRATED_lid"/> - <int value="30" label="ACCEL_UNCALIBRATED_camera"/> - <int value="31" label="ACCEL_UNCALIBRATED_others"/> - <int value="32" label="ANGLVEL_UNCALIBRATED_base"/> - <int value="33" label="ANGLVEL_UNCALIBRATED_lid"/> - <int value="34" label="ANGLVEL_UNCALIBRATED_camera"/> - <int value="35" label="ANGLVEL_UNCALIBRATED_others"/> - <int value="36" label="MAGN_UNCALIBRATED_base"/> - <int value="37" label="MAGN_UNCALIBRATED_lid"/> - <int value="38" label="MAGN_UNCALIBRATED_camera"/> - <int value="39" label="MAGN_UNCALIBRATED_others"/> - <int value="40" label="GRAVITY_base"/> - <int value="41" label="GRAVITY_lid"/> - <int value="42" label="GRAVITY_camera"/> - <int value="43" label="GRAVITY_others"/> - <int value="44" label="PROXIMITY_base"/> - <int value="45" label="PROXIMITY_lid"/> - <int value="46" label="PROXIMITY_camera"/> - <int value="47" label="PROXIMITY_others"/> -</enum> - -<enum name="ChromeOSJankinessTriggerStatus"> - <int value="0" label="CollectionAttempted"/> - <int value="1" label="Throttled"/> -</enum> - -<enum name="ChromeOSMachineIdReason"> - <int value="0" label="Unknown"/> - <int value="1" label="Network"/> - <int value="2" label="Periodic"/> -</enum> - -<enum name="ChromeOSMessageCenterScrollActionReason"> - <int value="0" label="Unknown"/> - <int value="1" label="By mouse wheel"/> - <int value="2" label="By touch"/> - <int value="3" label="By arrow key"/> -</enum> - -<enum name="ChromeOSParseCPUFrequencyStatus"> - <int value="0" label="Success"/> - <int value="1" label="Zero logical CPUs"/> - <int value="2" label="Some CPUs have zero frequencies"/> - <int value="3" label="All CPUs have zero frequencies"/> - <int value="4" label="Success after retry"/> -</enum> - -<enum name="ChromeOSParseLacrosPath"> - <int value="0" label="Rootfs"/> - <int value="1" label="Stateful"/> - <int value="2" label="Unrecognized"/> -</enum> - -<enum name="ChromeOSParsePSICPUStatus"> - <int value="0" label="Success"/> - <int value="1" label="Fail to read file /proc/pressure/cpu"/> - <int value="2" label="Unexpected data format in PSI CPU file"/> - <int value="3" label="Fail to parse PSI CPU values"/> -</enum> - -<enum name="ChromeOSParsePSIMemStatus"> - <int value="0" label="Success"/> - <int value="1" label="Fail to read file /proc/pressure/memory"/> - <int value="2" label="Unexpected data format in PSI Memory file"/> - <int value="3" label="Unexpected numeric format in PSI Memory file"/> - <int value="4" label="Fail to parse PSI Memory values"/> -</enum> - -<enum name="ChromeOSPlatformVerificationResult2"> - <summary> - Possible results of a platform verification attempt. See - chrome/browser/ash/attestation/platform_verification.h. - </summary> - <int value="0" label="Success"/> - <int value="1" label="Internal Error"/> - <int value="2" label="Platform Not Verified"/> - <int value="3" label="Rejected by Policy"/> - <int value="4" label="Timeout"/> -</enum> - -<enum name="ChromeOSProcessTypeCollectionStatus"> - <int value="0" label="PS command errored during process types collection"> - Process types couldn't be collected as PS command errored. - </int> - <int value="1" label="PS command errored during thread types collection"> - Thread types couldn't be collected as PS command errored. - </int> - <int value="2" label="Empty process type output"> - Process type parsing returned empty output. - </int> - <int value="3" label="Empty thread type output"> - Thread type parsing returned empty output. - </int> - <int value="4" label="Truncated process type output"> - Process types were partially collected. - </int> - <int value="5" label="Truncated thread type output"> - Thread types were partially collected. - </int> - <int value="6" label="Complete process type output"> - Process types were completely collected. - </int> - <int value="7" label="Complete thread type output"> - Thread types were completely collected. - </int> -</enum> - -<enum name="ChromeOSProfileCollectionStatus"> - <int value="0" label="Success">Profile was collected successfully.</int> - <int value="1" label="Collection timer triggered but buffer is full"> - Profile timer triggered but the collector's buffer is full. - </int> - <int value="2" label="Collection timer triggered but incognito window active"> - Profile timer triggered but an incognito window was open. - </int> - <int value="3" label="Incognito window launched during collection"> - Profile was collected but an incognito window was opened during the - collection. - </int> - <int value="4" label="Protobuf cannot be deserialized"> - Profile data was collected and sent to Chrome as a serialized protobuf but - it could not be deserialized by Chrome. - </int> - <int value="5" label="Illegal data returned by collector"> - The profile data sent back to Chrome is invalid. - </int> - <int value="6" label="Already collecting"> - Another profile collection was already active. - </int> - <int value="7" label="Failed to start collection"> - Collection could not start due to failing prerequisites. - </int> - <int value="8" label="Data collection failure"> - Failure while collecting data. - </int> - <int value="9" label="Session has zero samples"> - The profile session has zero samples. - </int> -</enum> - -<enum name="ChromeOSProfileRecordStatus"> - <int value="0" label="Metrics recording is disabled"> - Profile data was not recorded since metric recording is disabled. - </int> - <int value="1" label="Profile manager is unset"> - Profile data was redacted since the profile manager used to obtain user - profile(s) is unset. - </int> - <int value="2" label="No loaded user profile is found"> - Profile data was redacted since there is no user profile initialized. When - looking at user profile(s), the Default profile in Chrome OS is skipped. - </int> - <int value="3" label="App sync is disabled"> - Profile data was redacted since App Sync is disabled. - </int> - <int value="4" label="App sync is enabled"> - Profile data was recorded in full since App Sync is enabled. - </int> - <int value="5" label="Sync service is unavailable"> - Profile data was redacted since sync service is unavailable. - </int> - <int value="6" label="Chrome sync feature is disabled"> - Profile data was redacted since Chrome sync feature is disabled. - </int> - <int value="7" label="Chrome App Sync is disabled"> - Profile data was redacted since Chrome App Sync is disabled. - </int> - <int value="8" label="Chrome OS sync feature is disabled"> - Profile data was redacted since Chrome OS sync feature is disabled. - </int> - <int value="9" label="Chrome OS App Sync is disabled"> - Profile data was redacted since Chrome OS App Sync is disabled. - </int> -</enum> - <enum name="ChromeOSRecoveryReason"> <summary> Reason for entering Recovery Mode. See @@ -11380,116 +10825,6 @@ <int value="10" label="kMigrationNotAllowed"/> </enum> -<enum name="ChromeOSSamlApiUsed"> - <summary> - ChromeOS login flow by Identity Provider. Can be either GAIA-based, SAML - with API or pure SAML with password scraping. - </summary> - <int value="0" label="Default GAIA authentication"/> - <int value="1" label="SAML Chrome Credentials Passing API used"/> - <int value="2" label="SAML Chrome Credentials Passing API not used"/> -</enum> - -<enum name="ChromeOSSamlProvider"> - <summary> - Different SAML providers that uses SAML login flow in ChromeOS. - </summary> - <int value="0" label="unknown"/> - <int value="1" label="failure"/> - <int value="2" label="adfs"/> - <int value="3" label="azure"/> - <int value="4" label="okta"/> - <int value="5" label="ping"/> - <int value="6" label="onelogin"/> - <int value="7" label="microsoft"/> - <int value="8" label="clever"/> - <int value="9" label="cloudgate"/> - <int value="10" label="windows"/> - <int value="11" label="salesforce"/> -</enum> - -<enum name="ChromeOSSharesheetAction"> - <summary>Defines Chrome OS sharesheet actions.</summary> - <int value="0" label="Cancelled by user clicking outside bubble"/> - <int value="1" label="Launch ARC app"/> - <int value="2" label="Launch Nearby Share action"/> - <int value="3" label="Cancelled by user pressing Esc key"/> - <int value="4" label="Launch Web app"/> - <int value="5" label="Launch Drive share action"/> - <int value="6" label="Launch Copy share action"/> -</enum> - -<enum name="ChromeOSSharesheetFormFactor"> - <summary>Different form factors.</summary> - <int value="0" label="Tablet form factor"/> - <int value="1" label="Clamshell form factor"/> -</enum> - -<enum name="ChromeOSSharesheetLaunchSource"> - <summary>The source from which sharesheet is invoked.</summary> - <int value="0" label="Invoked from an unknown source"/> - <int value="1" label="Invoked from the share button in the Files app"/> - <int value="2" label="Invoked from the context menu in the Files app"/> - <int value="3" label="Invoked through WebShare"/> - <int value="4" label="Invoked from ARC++ to directly trigger Nearby Share"/> - <int value="5" label="Invoked through the omnibox entry point"/> -</enum> - -<enum name="ChromeOSSharesheetMimeType"> - <summary> - The mime types of the content the user is trying to share from the - sharesheet. - </summary> - <int value="0" label="Unknown mime type"/> - <int value="1" label="Text"/> - <int value="2" label="Url"/> - <int value="3" label="Text file"/> - <int value="4" label="Image file"/> - <int value="5" label="Video file"/> - <int value="6" label="Audio file"/> - <int value="7" label="Pdf file"/> -</enum> - -<enum name="ChromeOSUsbDeviceClass"> - <summary>https://www.usb.org/defined-class-codes</summary> - <int value="0" label="Application Specific"/> - <int value="1" label="Audio"/> - <int value="2" label="Audio/Video"/> - <int value="3" label="Card"/> - <int value="4" label="Communication"/> - <int value="5" label="Healthcare"/> - <int value="6" label="HID"/> - <int value="7" label="Hub"/> - <int value="8" label="Image"/> - <int value="9" label="Miscellaneous"/> - <int value="10" label="Other"/> - <int value="11" label="Physical"/> - <int value="12" label="Printer"/> - <int value="13" label="Security"/> - <int value="14" label="Storage"/> - <int value="15" label="Vendor Specific"/> - <int value="16" label="Video"/> - <int value="17" label="Wireless"/> -</enum> - -<enum name="ChromeOSUsbDeviceSpeed"> - <int value="0" label="Other"/> - <int value="1" label="1.5 Mbps (USB 1.1)"/> - <int value="2" label="12 Mbps (USB 1.1)"/> - <int value="3" label="480 Mbps (USB 2.0)"/> - <int value="4" - label="480 Mbps fallback (USB 2.0 fallen back from SuperSpeed)"/> - <int value="5" label="5000 Mbps (USB 3.2 Gen 1)"/> - <int value="6" label="10000 Mbps (USB 3.2 Gen 2)"/> - <int value="7" label="20000 Mbps (USB 3.2 Gen 2x2)"/> -</enum> - -<enum name="ChromeOSUsbEventTiming"> - <int value="0" label="kLoggedOut"/> - <int value="1" label="kLoggedIn"/> - <int value="2" label="kLocked"/> -</enum> - <enum name="ChromeOSUserImageId2"> <summary> Special images and default images as defined in @@ -12222,13 +11557,6 @@ <int value="505" label="505: HTTP Version Not Supported"/> </enum> -<enum name="ComboDeviceClassification"> - <int value="0" label="KnownKeyboardImposter"/> - <int value="1" label="KnownMouseImposter"/> - <int value="2" label="KnownComboDevice"/> - <int value="3" label="UnknownClassification"/> -</enum> - <enum name="CommerceHeuristicsDataSource"> <summary>Sources of commerce heuristics data.</summary> <int value="0" label="FromComponent"/> @@ -12843,6 +12171,7 @@ <int value="107" label="3PCD Metadata Grants"/> <int value="108" label="File System Access extended permission"/> <int value="109" label="3PCD Heuristics Grants"/> + <int value="110" label="File System Access Restore Permission"/> </enum> <enum name="ContextLostReason"> @@ -15332,15 +14661,6 @@ <int value="250477278" label="(Delphi exception)"/> </enum> -<enum name="CrashSeverityProductType"> - <int value="0" label="Unspecified"/> - <int value="1" label="UI"/> - <int value="2" label="Platform"/> - <int value="3" label="Arc"/> - <int value="4" label="Lacros"/> - <int value="5" label="Unknown Value"/> -</enum> - <enum name="CrashVisibility"> <summary> This enum describes the timing of a renderer crash in relation to whether a @@ -15538,13 +14858,6 @@ <int value="2" label="ExpectationNotMet"/> </enum> -<enum name="CrosDiagnosticsRoutineResult"> - <int value="0" label="TestPassed"/> - <int value="1" label="TestFailed"/> - <int value="2" label="ExecutionError"/> - <int value="3" label="UnableToRun"/> -</enum> - <enum name="CrosDictationMacroName"> <summary> List of Dictation macro names. This list should be aligned with macro list @@ -15995,42 +15308,6 @@ <int value="34" label="Crostini.OomEvent"/> </enum> -<enum name="CrosHealthdDiagnosticResult"> - <int value="0" label="Passed"/> - <int value="1" label="Failed"/> - <int value="2" label="Error"/> - <int value="3" label="Cancelled"/> - <int value="4" label="FailedToStart"/> - <int value="5" label="Removed"/> - <int value="6" label="Unsupported"/> - <int value="7" label="NotRun"/> -</enum> - -<enum name="CrosHealthdEventCategory"> - <int value="0" label="Unknown"/> - <int value="1" label="Usb"/> - <int value="2" label="Thunderbolt"/> - <int value="3" label="Lid"/> - <int value="4" label="Bluetooth"/> - <int value="5" label="Power"/> - <int value="6" label="Audio"/> - <int value="7" label="AudioJack"/> - <int value="8" label="SdCard"/> - <int value="9" label="Network"/> - <int value="10" label="KeyboardDiagnostic"/> - <int value="11" label="Touchpad"/> - <int value="12" label="ExternalDisplay"/> - <int value="13" label="Touchscreen"/> - <int value="14" label="StylusGarage"/> - <int value="15" label="Stylus"/> - <int value="16" label="Crash"/> -</enum> - -<enum name="CrosHealthdTelemetryResult"> - <int value="0" label="Success"/> - <int value="1" label="Error"/> -</enum> - <enum name="CrosHibernateAbortReason"> <int value="0" label="Unknown"/> <int value="1" label="Not enough free memory"/> @@ -16146,21 +15423,6 @@ <int value="15" label="Invalid selection bounds"/> </enum> -<enum name="CrosSystemTrayFirstInteraction"> - <int value="0" label="Quick Settings"/> - <int value="1" label="Message Center"/> -</enum> - -<enum name="CrosSystemTrayInteraction"> - <int value="0" label="Tap"/> - <int value="1" label="Click"/> -</enum> - -<enum name="CrosSystemTrayToggleExpanded"> - <int value="0" label="Toggled by button"/> - <int value="1" label="Toggled by gesture"/> -</enum> - <enum name="CrostiniAppLaunchAppType"> <int value="0" label="Unknown App"/> <int value="1" label="Terminal"/> @@ -18211,16 +17473,6 @@ <int value="3" label="Compliance not evaluated, build not timely"/> </enum> -<enum name="CustomizableButton"> - <int value="0" label="Left"/> - <int value="1" label="Right"/> - <int value="2" label="Middle"/> - <int value="3" label="Forward"/> - <int value="4" label="Back"/> - <int value="5" label="Extra"/> - <int value="6" label="Side"/> -</enum> - <enum name="D3D11FeatureLevel"> <int value="0" label="Unknown"/> <int value="1" label="No D3D11 DLL"/> @@ -18893,14 +18145,6 @@ <int value="4" label="RollbackDisallowed"/> </enum> -<enum name="DetailedViewSection"> - <int value="0" label="WiFi section shown"/> - <int value="1" label="Mobile section shown"/> - <int value="2" label="Ethernet section shown"/> - <int value="3" label="Detailed view shown"/> - <int value="4" label="Tether Hosts section shown"/> -</enum> - <enum name="DeviceAuthFinalResult"> <int value="0" label="Success with unknown method"/> <int value="1" label="Success with biometrics"/> @@ -19009,18 +18253,6 @@ <int value="44" label="Unknown owner no key, no policy"/> </enum> -<enum name="DeviceSettingsStaticShortcutAction"> - <int value="0" label="Disable"/> - <int value="1" label="Copy"/> - <int value="2" label="Paste"/> - <int value="3" label="Undo"/> - <int value="4" label="Redo"/> - <int value="5" label="Zoom In"/> - <int value="6" label="Zoom Out"/> - <int value="7" label="Previous page"/> - <int value="8" label="Next Page"/> -</enum> - <enum name="DeviceSettingsStatus"> <int value="0" label="STORE_SUCCESS"/> <int value="1" label="STORE_KEY_UNAVAILABLE"/> @@ -21599,12 +20831,6 @@ <int value="4" label="DOWNLOAD_PROMPT"/> </enum> -<enum name="DpSuccessMetric"> - <int value="0" label="Success with HotPlug Detect(HPD)"/> - <int value="1" label="Success without HotPlug Detect(HPD)"/> - <int value="2" label="Failure"/> -</enum> - <enum name="DriveFileError"> <!-- Represents drive::FileError enum values defined in @@ -25077,13 +24303,6 @@ </int> </enum> -<enum name="ExtendedFkeysModifier"> - <int value="0" label="Disabled"/> - <int value="1" label="Alt"/> - <int value="3" label="Shift"/> - <int value="4" label="CtrlShift"/> -</enum> - <enum name="ExtensionActionInvocationSource"> <int value="0" label="Keyboard Shortcut"/> <int value="1" label="Toolbar Button"/> @@ -33608,6 +32827,8 @@ <int value="4717" label="ElementCheckVisibilityOptionOpacityProperty"/> <int value="4718" label="ElementCheckVisibilityOptionVisibilityProperty"/> <int value="4719" label="AdClickMainFrameNavigation"/> + <int value="4720" label="LinkRelPrivacyPolicy"/> + <int value="4721" label="LinkRelTermsOfService"/> </enum> <enum name="FeaturePolicyFeature"> @@ -33732,17 +32953,6 @@ <int value="113" label="WebPrinting"/> </enum> -<enum name="FeatureUsageEvent"> - <int value="0" - label="Device is eligible for this feature. Recorded periodically."/> - <int value="1" label="Feature is enabled by user. Recorded periodically."/> - <int value="2" - label="Successful attempt to use the feature. Recorded on each event."/> - <int value="3" - label="Failed attempt to use the feature. Recorded on each event."/> - <int value="4" label="Feature is accessible to user. Recorded periodically."/> -</enum> - <enum name="FedCmAccountsResponseInvalidReason"> <int value="0" label="Response is not JSON or dict"/> <int value="1" label="No accounts key"/> @@ -35110,15 +34320,6 @@ <int value="5" label="Disabled, First Open already recorded"/> </enum> -<enum name="FirmwareUpdateInstallResult"> - <int value="0" label="Success"/> - <int value="1" label="InstallFailed"/> - <int value="2" label="FailedToCreateUpdateDirectory"/> - <int value="3" label="InvalidDestinationFile"/> - <int value="4" label="InvalidFileDescriptor"/> - <int value="5" label="FailedToDownloadToFile"/> -</enum> - <enum name="FirstPartySetsDatabaseInitStatus"> <int value="0" label="Unattempted"/> <int value="1" label="Success"/> @@ -38167,18 +37368,6 @@ <int value="5" label="5"/> </enum> -<enum name="HardwareVerifierQualificationStatus"> - <summary> - List of the possible qualification status of a component. This is defined in - https://chromium.googlesource.com/chromiumos/platform2/+/refs/heads/main/hardware_verifier/proto/hardware_verifier.proto - (enum QualificationStatus). - </summary> - <int value="0" label="UNQUALIFIED">Unqualified</int> - <int value="1" label="REJECTED">Rejected</int> - <int value="2" label="QUALIFIED">Qualified</int> - <int value="3" label="NO_MATCH">No_Match</int> -</enum> - <enum name="HasDiscreteGpu"> <int value="0" label="No"/> <int value="1" label="Yes"/> @@ -38200,43 +37389,6 @@ <int value="5" label="User opened survey"/> </enum> -<enum name="HaTSSurvey"> - <summary>Possible survey states and answers for each question.</summary> - <int value="1" label="Survey Triggered"/> - <int value="2" label="Survey Displayed"/> - <int value="3" label="Survey Completed"/> - <int value="101" label="Question 1 - Answer 1"/> - <int value="102" label="Question 1 - Answer 2"/> - <int value="103" label="Question 1 - Answer 3"/> - <int value="104" label="Question 1 - Answer 4"/> - <int value="105" label="Question 1 - Answer 5"/> - <int value="106" label="Question 1 - Answer 6"/> - <int value="107" label="Question 1 - Answer 7"/> - <int value="108" label="Question 1 - Answer 8"/> - <int value="109" label="Question 1 - Answer 9"/> - <int value="110" label="Question 1 - Answer 10"/> - <int value="201" label="Question 2 - Answer 1"/> - <int value="202" label="Question 2 - Answer 2"/> - <int value="203" label="Question 2 - Answer 3"/> - <int value="204" label="Question 2 - Answer 4"/> - <int value="205" label="Question 2 - Answer 5"/> - <int value="206" label="Question 2 - Answer 6"/> - <int value="207" label="Question 2 - Answer 7"/> - <int value="208" label="Question 2 - Answer 8"/> - <int value="209" label="Question 2 - Answer 9"/> - <int value="210" label="Question 2 - Answer 10"/> - <int value="301" label="Question 3 - Answer 1"/> - <int value="302" label="Question 3 - Answer 2"/> - <int value="303" label="Question 3 - Answer 3"/> - <int value="304" label="Question 3 - Answer 4"/> - <int value="305" label="Question 3 - Answer 5"/> - <int value="306" label="Question 3 - Answer 6"/> - <int value="307" label="Question 3 - Answer 7"/> - <int value="308" label="Question 3 - Answer 8"/> - <int value="309" label="Question 3 - Answer 9"/> - <int value="310" label="Question 3 - Answer 10"/> -</enum> - <enum name="HdcpVersion"> <int value="0" label="HdcpVersionNone"/> <int value="1" label="HdcpVersion1_0"/> @@ -38250,27 +37402,6 @@ <int value="9" label="HdcpVersion2_3"/> </enum> -<enum name="HdrnetError"> - <int value="0" label="No error"/> - <int value="1" label="Initialization error"/> - <int value="2" label="Sync wait error"/> - <int value="3" label="HDRnet processor error"/> - <int value="4" label="Pre-processing error"/> - <int value="5" label="RGB pipeline error"/> - <int value="6" label="Post-processing error"/> - <int value="7" label="Camera HAL3 error"/> -</enum> - -<enum name="HdrnetStreamConfiguration"> - <int value="0" label="Single YUV stream"/> - <int value="1" label="Single YUV stream with BLOB"/> - <int value="2" label="Multiple YUV streams"/> - <int value="3" label="Multiple YUV streams with BLOB"/> - <int value="4" label="Multiple YUV streams of different aspect ratio"/> - <int value="5" - label="Multiple YUV streams of different aspect ratio with BLOB"/> -</enum> - <enum name="HeadlessChromeAction"> <int value="0" label="None"/> <int value="1" label="RemoteDebuggingPipe"/> @@ -41124,21 +40255,6 @@ <int value="9" label="FMA3"/> </enum> -<enum name="IntentPickerDialogAction"> - <summary> - Defines actions taken by the user in the Intent Picker dialog - </summary> - <int value="0" label="Invalid"/> - <int value="1" label="Error"/> - <int value="2" label="Dialog deactivated"/> - <int value="3" label="Chrome selected"/> - <int value="4" label="Chrome selected and preferred"/> - <int value="5" label="ARC app selected"/> - <int value="6" label="ARC app selected and preferred"/> - <int value="7" label="PWA selected"/> - <int value="8" label="PWA selected and preferred"/> -</enum> - <enum name="IntentPickerIconEvent"> <int value="0" label="Intent picker icon shown in Omnibox"/> <int value="1" label="Intent picker icon clicked in Omnibox"/> @@ -42853,13 +41969,6 @@ <int value="256" label="NONE"/> </enum> -<enum name="KeyPermissionsManagerMigrationStatus"> - <int value="0" label="kStarted"/> - <int value="1" label="kSucceeded"/> - <int value="2" label="kFailed"/> - <int value="3" label="kNecessary"/> -</enum> - <enum name="KioskBrowserWindowType"> <int value="0" label="Settings Page"/> <int value="1" label="Closed regular browser"/> @@ -43553,132 +42662,6 @@ <int value="8026721" label="Zaza"/> </enum> -<enum name="LanguagePackDlcErrorType"> -<!-- This enum needs to match DlcErrorTypeEnum in -chromeos/ash/components/language/language_packs/language_pack_manager.h --> - - <summary>List of all the error types that DLC Service returns.</summary> - <int value="0" label="Unknown"/> - <int value="1" label="None"/> - <int value="2" label="Internal"/> - <int value="3" label="Busy"/> - <int value="4" label="Need reboot"/> - <int value="5" label="Invalid DLC"/> - <int value="6" label="Allocation"/> - <int value="7" label="No image found"/> -</enum> - -<enum name="LanguagePackFeatureIds"> -<!-- This must be kept current with FeatureIdsEnum in -chromeos/ash/components/language/language_packs/language_pack_manager.h --> - - <summary> - List of all the Features that are supported by Language Packs. A Feature is - a synonym for client. - </summary> - <int value="0" label="UNKNOWN"/> - <int value="1" label="HANDWRITING"/> - <int value="2" label="TTS"/> -</enum> - -<enum name="LanguagePackFeatureSuccess"> -<!-- This enum needs to match FeatureSuccessEnum in -chromeos/ash/components/language/language_packs/language_pack_manager.h --> - - <summary> - Multidimension Enum that captures success and failures broken down by - Feature ID. We use this approach based on the Histograms guidelines to - represent a MxN matrix. - </summary> - <int value="0" label="Unknown success"/> - <int value="1" label="Unknown failure"/> - <int value="2" label="Handwriting success"/> - <int value="3" label="Handwriting failure"/> - <int value="4" label="TTS success"/> - <int value="5" label="TTS failure"/> -</enum> - -<enum name="LanguagePackLanguageCodes"> - <summary> - Hash values of language codes that correspond to a Language Pack. The hash - is created by computing base::PersistentHash() of the label, then cast to - int32. To generate new values in a way that is consistent, use the unit test - at chromeos/ash/components/language/language_packs/metrics_unittest.cc. - </summary> - <int value="-1954182822" label="et"/> - <int value="-1902856059" label="tr"/> - <int value="-1858573686" label="ga"/> - <int value="-1840989837" label="ar"/> - <int value="-1823490855" label="be"/> - <int value="-1784800271" label="tl"/> - <int value="-1781321693" label="my"/> - <int value="-1760656795" label="kk"/> - <int value="-1728890006" label="kn"/> - <int value="-1722334576" label="sv"/> - <int value="-1667118147" label="bg"/> - <int value="-1660178764" label="bn"/> - <int value="-1391374456" label="ur"/> - <int value="-1340196252" label="en-gb"/> - <int value="-1339452358" label="hu"/> - <int value="-1319436779" label="lt"/> - <int value="-1142714117" label="nb"/> - <int value="-1060081087" label="te"/> - <int value="-1001508648" label="nl"/> - <int value="-854196551" label="ko"/> - <int value="-795149789" label="en-au"/> - <int value="-763755563" label="ru"/> - <int value="-703387832" label="ml"/> - <int value="-651240163" label="am"/> - <int value="-622454823" label="cs"/> - <int value="-554160101" label="es"/> - <int value="-468417265" label="ca"/> - <int value="-414170858" label="ne"/> - <int value="-344966328" label="en-us"/> - <int value="-232429543" label="fi"/> - <int value="-155273274" label="ka"/> - <int value="-132861449" label="or"/> - <int value="-103735858" label="is"/> - <int value="-100682548" label="hr"/> - <int value="-76675939" label="hy"/> - <int value="0" label="Unknown"/> - <int value="13936671" label="fa"/> - <int value="37698508" label="si"/> - <int value="76742708" label="mn"/> - <int value="126997093" label="sk"/> - <int value="202713180" label="ms"/> - <int value="218790103" label="es-us"/> - <int value="385084822" label="pt"/> - <int value="411897228" label="fr"/> - <int value="579959091" label="iw"/> - <int value="592207805" label="pl"/> - <int value="656523220" label="zh"/> - <int value="771718923" label="yue"/> - <int value="771844654" label="uk"/> - <int value="916296240" label="id"/> - <int value="934072607" label="ta"/> - <int value="942489058" label="gu"/> - <int value="943542304" label="sl"/> - <int value="1005034866" label="es-es"/> - <int value="1136549914" label="it"/> - <int value="1176966558" label="de"/> - <int value="1229318713" label="vi"/> - <int value="1242216658" label="el"/> - <int value="1256230022" label="km"/> - <int value="1299213554" label="mr"/> - <int value="1305993605" label="mt"/> - <int value="1347501577" label="lo"/> - <int value="1396205312" label="no"/> - <int value="1438566975" label="hi"/> - <int value="1445641954" label="lv"/> - <int value="1505395693" label="th"/> - <int value="1652267726" label="ja"/> - <int value="1840739667" label="ti"/> - <int value="1889238869" label="pa"/> - <int value="1938425968" label="ro"/> - <int value="2017029213" label="sr"/> - <int value="2026210505" label="da"/> -</enum> - <enum name="LanguagePackState"> <int value="0" label="Error"/> <int value="1" label="Not installed"/> @@ -44289,13 +43272,6 @@ <int value="2" label="yes"/> </enum> -<enum name="LinkCapturingEvent"> - <summary>Defines events in the link capturing user flow</summary> - <int value="0" label="Entry point shown"/> - <int value="1" label="App opened"/> - <int value="2" label="Settings changed"/> -</enum> - <enum name="LinkGenerationCopiedLinkType"> <int value="0" label="Copied from new right-click menu generation"/> <int value="1" label="Copied from existing highlight right-click menu"/> @@ -48272,6 +47248,7 @@ <int value="-728187009" label="NtpRealboxSuggestionAnswers:enabled"/> <int value="-727860269" label="WebAuthenticationBle:disabled"/> <int value="-727539088" label="AndroidExtendedKeyboardShortcuts:disabled"/> + <int value="-727364947" label="NtpRealboxCr23ExpandedStateLayout:enabled"/> <int value="-726892130" label="AndroidMessagesIntegration:disabled"/> <int value="-726844226" label="AutofillSuggestVirtualCardsOnIncompleteForm:enabled"/> @@ -54143,6 +53120,7 @@ <int value="2097585272" label="ProductivityLauncherImageSearch:enabled"/> <int value="2098059607" label="WifiSyncAllowDeletes:disabled"/> <int value="2098114768" label="DocumentPictureInPictureAPI:disabled"/> + <int value="2098274741" label="NtpRealboxCr23ExpandedStateLayout:disabled"/> <int value="2098597721" label="WebAuthenticationPasskeysUIExperiment:disabled"/> <int value="2098714203" label="enable-generic-sensors"/> @@ -56439,21 +55417,6 @@ <int value="3" label="Failure"/> </enum> -<enum name="ModifierKeyDomCodes"> - <int value="0" label="MetaLeft"/> - <int value="1" label="MetaRight"/> - <int value="2" label="ControlLeft"/> - <int value="3" label="ControlRight"/> - <int value="4" label="AltLeft"/> - <int value="5" label="AltRight"/> - <int value="6" label="ShiftLeft"/> - <int value="7" label="ShiftRight"/> - <int value="8" label="CapsLock"/> - <int value="9" label="Backspace"/> - <int value="10" label="Escape"/> - <int value="11" label="Assistant"/> -</enum> - <enum name="ModuleTypeOnStartAndNTP"> <int value="0" label="Most visited tiles"/> <int value="1" label="Omnibox"/> @@ -59548,13 +58511,6 @@ <int value="1" label="DNS Failure"/> </enum> -<enum name="NetworkRowClickedAction"> - <int value="0" label="Connect to Network"/> - <int value="1" label="Open Network settings page"/> - <int value="2" label="Open SIM unlock dialog"/> - <int value="3" label="Open portal signin"/> -</enum> - <enum name="NetworkSandboxState"> <summary> The possible states for the network service sandbox. See @@ -62496,124 +61452,6 @@ <int value="12" label="Entering overview with the faster split screen setup"/> </enum> -<enum name="OwnerKeyUmaEvent"> - <int value="0" label="DeviceSettingsServiceIsNull"> - DeviceSettingsService was null, owner key was not loaded. - </int> - <int value="1" label="ManagedDeviceSuccess"> - Managed device successfully loaded the public owner key. - </int> - <int value="2" label="ManagedDeviceFail"> - Managed device failed to load the public owner key. - </int> - <int value="3" label="OwnerHasKeysSuccess"> - Consumer owner user successfully loaded both public and private keys. - </int> - <int value="4" label="OwnerHasKeysFail"> - Consumer owner received both public and private keys, but at least one of - them wasn't actually loaded. - </int> - <int value="5" label="EstablishingConsumerOwnershipSuccess"> - ChromeOS decided to establish consumer ownership when there was no existing - public key. - </int> - <int value="6" label="EstablishingConsumerOwnershipFail"> - ChromeOS decided to establish consumer ownership when there was an existing - public key. - </int> - <int value="7" label="RegeneratingOwnerKeyBasedOnPolicySuccess"> - ChromeOS decided to re-generate the lost owner key based on the data from - device policies after the public key was found (the private part is what was - lost). - </int> - <int value="8" label="RegeneratingOwnerKeyBasedOnPolicyFail"> - ChromeOS decided to re-generate the lost owner key based on the data from - device policies and the public key was also not found. (Strictly speaking - not a failure, but still an unusual situation). - </int> - <int value="9" label="UserNotAnOwnerBasedOnPolicySuccess"> - A user was categorized as not an owner based on the data from device - policies, the public key was successfully loaded. - </int> - <int value="10" label="UserNotAnOwnerBasedOnPolicyFail"> - A user was categorized as not an owner based on the data from device - policies, the public key failed to load. - </int> - <int value="11" label="RegeneratingOwnerKeyBasedOnLocalStateSuccess"> - ChromeOS decided to re-generate the lost owner key based on the data from - local state and the public key was not present. - </int> - <int value="12" label="RegeneratingOwnerKeyBasedOnLocalStateFail"> - ChromeOS decided to re-generate the lost owner key based on the data from - local state after the public key was found (in such a case device policies - should be used, relying on local state is unexpected). - </int> - <int value="13" label="UserNotAnOwnerBasedOnLocalStateSuccess"> - A user was categorized as not an owner based on the data from local state, - the public key was successfully loaded. - </int> - <int value="14" label="UserNotAnOwnerBasedOnLocalStateFail"> - A user was categorized as not an owner based on the data from local state, - the public key failed to load. - </int> - <int value="15" label="UnsureUserNotAnOwnerSuccess"> - ChromeOS assumed that a user is not an owner based on the lack of data, the - public key was successfully loaded. - </int> - <int value="16" label="UnsureUserNotAnOwnerFail"> - ChromeOS assumed that a user is not an owner based on the lack of data, the - public key failed to load. - </int> - <int value="17" label="OwnerKeyGeneratedSuccess"> - New owner key was generated on the first attempt. - </int> - <int value="18" label="OwnerKeyGeneratedFail"> - New owner key was generated after 1+ failures. - </int> - <int value="19" label="FailedToGenerateOwnerKeySuccess"> - Failed to generate new owner key, at least the old public key was returned. - </int> - <int value="20" label="FailedToGenerateOwnerKeyFail"> - Failed to generate new owner key, the old public key also failed to load (or - was not present). - </int> - <int value="21" label="StartSigningPolicySuccess"> - Successfully started signing policies. - </int> - <int value="22" label="StartSigningPolicyFail"> - Failed to start signing policies. - </int> - <int value="23" label="SignedPolicySuccess"> - Successfully signed policies. - </int> - <int value="24" label="SignedPolicyFail">Failed to sign policies.</int> - <int value="25" label="StoredPolicySuccess"> - Successfully stored policies. - </int> - <int value="26" label="StoredPolicyFail">Failed to store policies.</int> - <int value="27" label="UserNotAnOwnerBasedOnUserTypeSuccess"> - A user was categorized as not an owner based on the user type, the public - key was successfully loaded. - </int> - <int value="28" label="UserNotAnOwnerBasedOnUserTypeFail"> - A user was categorized as not an owner based on the user type, the public - key failed to load. - </int> - <int value="29" label="UserNotAnOwnerBasedOnEmptyUsernameSuccess"> - A user was categorized as not an owner because the user name was empty, this - is not expected to happen, the public key was successfully loaded. - </int> - <int value="30" label="UserNotAnOwnerBasedOnEmptyUsernameFail"> - A user was categorized as not an owner because the user name was empty, this - is not expected to happen, the public key failed to load. - </int> - <int value="31" label="UnsureTakeOwnership"> - ChromeOS decided to establish consumer ownership when there was no - indication that it's the first user, but also no public key, no policies and - no local state entry. - </int> -</enum> - <enum name="OwnershipStatus"> <int value="0" label="ownership unknown"/> <int value="1" label="not yet owned"/> @@ -63135,22 +61973,6 @@ <int value="6" label="PreloadApk: not system provider"/> </enum> -<enum name="PartnerLocationMetric"> - <int value="0" label="Other"/> - <int value="1" - label="User has no choice since all open ports are only on one side"/> - <int value="2" label="Left: first partner"/> - <int value="3" label="Left: second partner (same side with first)"/> - <int value="4" label="Left: second partner (opposite side to first)"/> - <int value="5" label="Left: third or later partner"/> - <int value="6" label="Left: coldplugged on boot"/> - <int value="7" label="Right: first partner"/> - <int value="8" label="Right: second partner (same side with first)"/> - <int value="9" label="Right: second partner (opposite side to first)"/> - <int value="10" label="Right: third or later partner"/> - <int value="11" label="Right: coldplugged on boot"/> -</enum> - <enum name="PartnerTaskCompletion"> <int value="0" label="None valid"/> <int value="1" label="Completed in time for tab creation"/> @@ -63160,27 +61982,6 @@ <int value="5" label="Task skipped"/> </enum> -<enum name="PartnerTypeMetric"> - <int value="0" label="Other"/> - <int value="1" label="Thunderbolt + DisplayPort Alt Mode Hub"/> - <int value="2" label="Thunderbolt + DisplayPort Alt Mode Peripheral"/> - <int value="3" label="Thunderbolt Hub"/> - <int value="4" label="Thunderbolt Peripheral"/> - <int value="5" label="USB4 Hub"/> - <int value="6" label="USB4 Peripheral"/> - <int value="7" label="DisplayPort Alt Mode Hub"/> - <int value="8" label="DisplayPort Alt Mode Peripheral"/> - <int value="9" label="USB Hub"/> - <int value="10" label="USB Peripheral"/> - <int value="11" label="PD Power Source"/> - <int value="12" label="PD Sourcing Device"/> - <int value="13" label="Non-PD Power Source"/> - <int value="14" label="PD Sink"/> - <int value="15" label="PD Sinking Host"/> - <int value="16" label="Non-PD Sink"/> - <int value="17" label="Power Brick"/> -</enum> - <enum name="PasspointMatch"> <int value="0" label="No match"/> <int value="1" label="Service not found"/> @@ -64595,27 +63396,6 @@ <int value="2" label="Suppress"/> </enum> -<enum name="PopularCamPeriphModuleID"> - <int value="0" label="Others"/> - <int value="73271312" label="LifeCamHD3000_Microsoft"/> - <int value="74254373" label="C270_Logitech"/> - <int value="74254380" label="HDC615_Logitech"/> - <int value="74254381" label="HDProC920_Logitech"/> - <int value="74254403" label="C930e_Logitech"/> - <int value="74254427" label="C925e_Logitech"/> - <int value="74254428" label="C922ProStream_Logitech"/> - <int value="74254430" label="BRIOUltraHD_Logitech"/> - <int value="74254482" label="C920HDPro_Logitech"/> - <int value="74254565" label="C920PROHD_Logitech"/> - <int value="94606129" label="Cam_ARC"/> - <int value="130691386" label="LiveStreamer313_Sunplus"/> - <int value="205874022" label="VitadeAF_Microdia"/> - <int value="205874027" label="Cam_Sonix"/> - <int value="393793569" label="VZR_IPEVO"/> - <int value="457121794" label="808Camera9_Generalplus"/> - <int value="493617411" label="NexiGoN60FHD_2MUVC"/> -</enum> - <enum name="PopularOSErrno"> <summary> Popular errno values. See the descriptions on "*/*/*" labels for @@ -64752,14 +63532,6 @@ <int value="12" label="Online"/> </enum> -<enum name="PortraitModeError"> - <int value="0" label="No error"/> - <int value="1" label="Initialization error"/> - <int value="2" label="Configuration error"/> - <int value="3" label="Processing capture request error"/> - <int value="4" label="Processing capture result error"/> -</enum> - <enum name="Ports"> <int value="80" label="Port 80"/> <int value="443" label="Port 443"/> @@ -64951,18 +63723,6 @@ <int value="16" label="kScriptExecution"/> </enum> -<enum name="PowerSourceLocationMetric"> - <int value="0" label="Other"/> - <int value="1" - label="User has no choice since all ports are only on one side"/> - <int value="2" label="Left: first connection during a session"/> - <int value="3" label="Left: same side with previous connection"/> - <int value="4" label="Left: opposite side from previous connection"/> - <int value="5" label="Right: first connectoin during a session"/> - <int value="6" label="Right: same side with previous connection"/> - <int value="7" label="Right: opposite side with previous connection"/> -</enum> - <enum name="PowerwashDialogViewType"> <int value="0" label="Invoked on settings page"/> <int value="1" label="Shortcut. Confirmation for powerwash only."/> @@ -66945,11 +65705,6 @@ <int value="6" label="Cancelled due to client unauthorized"/> </enum> -<enum name="PrintManagementLaunchSourceType"> - <int value="0" label="Launch Printer settings from empty state button"/> - <int value="1" label="Launch Printer settings from header button"/> -</enum> - <enum name="PrintOopResult"> <int value="0" label="Successful"/> <int value="1" label="Cancelled"/> @@ -67086,17 +65841,6 @@ <int value="3" label="DroppedMaxTrackedPerSurfacePerSource"/> </enum> -<enum name="PrivacyHubLearnMoreSensor"> - <int value="0" label="Microphone"/> - <int value="1" label="Camera"/> - <int value="2" label="Geolocation"/> -</enum> - -<enum name="PrivacyHubNavigationOrigin"> - <int value="0" label="System settings"/> - <int value="1" label="Notification"/> -</enum> - <enum name="PrivacyIndicatorsSource"> <int value="0" label="Apps"/> <int value="1" label="Linux VM"/> @@ -70460,25 +69204,11 @@ <int value="5" label="PreviouslyDeferredLoad"/> </enum> -<enum name="RgbKeyboardBacklightChangeType"> - <int value="0" label="StaticBackgroundColorChanged"/> - <int value="1" label="RainbowModeSelected"/> - <int value="2" label="StaticZoneColorChanged"/> -</enum> - <!-- This must be kept current with RgbKeyboardCapabilities located in third_party/cros_system_api/dbus/rgbkbd/dbus-constants.h. --> -<enum name="RgbKeyboardCapabilityType"> - <int value="0" label="None"/> - <int value="1" label="IndividualKey"/> - <int value="2" label="FourZoneFortyLed"/> - <int value="3" label="FourZoneTwelveLed"/> - <int value="4" label="FourZoneFourLed"/> -</enum> - <enum name="Rollback_OobeRestoreResult"> <int value="0" label="Succeeded"/> <int value="1" label="Stage 1 Failure"/> @@ -70681,43 +69411,6 @@ <int value="2" label="Strict Mode"/> </enum> -<enum name="SamlInSessionPasswordChangeEvent"> - <summary> - Track how often we try to guide users through the in-session flow to change - their SAML password, and how often they complete the flow. - </summary> - <int value="0" label="In-session PW-change manager enabled and created."/> - <int value="1" label="User notified that password will soon expire."/> - <int value="2" label="User notified urgently: password will soon expire."/> - <int value="3" label="User notified urgently: password already expired."/> - <int value="4" label="User acknowledges and begins change password flow."/> - <int value="5" label="SAML password is changed during in-session flow."/> - <int value="6" label="Password scraping succeeds during in-session change."/> - <int value="7" label="Password scraping partial success - 1 password only."/> - <int value="8" label="Password scraping fails - no passwords scraped."/> - <int value="9" label="Cryptohome password changed using scraped passwords."/> - <int value="10" label="Cryptohome password changed using retyped passwords."/> - <int value="11" label="Cryptohome change failed: wrong password scraped."/> - <int value="12" label="Cryptohome change failed: wrong password retyped."/> - <int value="13" label="In-session change password flow complete."/> -</enum> - -<enum name="SamlInSessionPasswordSyncEvent"> - <summary> - Track how often we call password sync token API and records its result. - </summary> - <int value="0" label="Start of sync token validation polling in-session."/> - <int value="1" - label="Start of sync token validation polling on the login screen."/> - <int value="2" label="Successful sync token validation."/> - <int value="3" label="Failed sync token validation."/> - <int value="4" label="API error: missing access token."/> - <int value="5" label="API error: wrong server response code."/> - <int value="6" label="API error: incorrect serlialized response data."/> - <int value="7" label="API error: no sync token in Create response."/> - <int value="8" label="API error: no sync token in Get response."/> -</enum> - <enum name="SamplingProfilerUnwindResult"> <summary>Track reason for unwind failures in sampling profiler.</summary> <int value="0" label="Futex wait for signal handler failed."/> @@ -71418,75 +70111,6 @@ start)"/> </enum> -<enum name="SecagentdBootmodeCros"> - <int value="0" label="Bootmode successfully retrieved"/> - <int value="1" label="Bootmode manager did not respond"/> - <int value="2" label="Bootmode service unavailable"/> - <int value="3" label="Failed to retrieve bootmode"/> -</enum> - -<enum name="SecagentdBootmodeUefi"> - <int value="0" label="Bootmode successfully retrieved"/> - <int value="1" label="Boot params file not found"/> - <int value="2" label="Failed to read boot params file"/> - <int value="3" label="Boot params file invalid size"/> -</enum> - -<enum name="SecagentdBpfAttachResult"> - <int value="0" label="BPF loaded and attached successfully"/> - <int value="1" label="BPF failed to Open"/> - <int value="2" label="BPF failed to Load"/> - <int value="3" label="BPF failed to Attach"/> - <int value="4" label="BPF failed Ring Buffer creation"/> -</enum> - -<enum name="SecagentdCache"> - <int value="0" label="Cache hit"/> - <int value="1" label="Cache miss"/> - <int value="2" label="Cache miss but filled from procfs"/> -</enum> - -<enum name="SecagentdPolicy"> - <int value="0" - label="Device XDR reporting policy was checked at startup (baseline)"/> - <int value="1" label="XDR reporting was enabled by Device policy"/> -</enum> - -<enum name="SecagentdProcessEvent"> - <int value="0" label="Process hierarchy filled"/> - <int value="1" label="Spawn process not found"/> - <int value="2" label="Process not found"/> - <int value="3" label="Parent process not found"/> - <int value="4" label="Parent process still alive"/> -</enum> - -<enum name="SecagentdSendMessageResult"> - <int value="0" label="Message successfully sent"/> - <int value="1" label="CANCELLED"/> - <int value="2" label="UNKNOWN"/> - <int value="3" label="INVALID_ARGUMENT"/> - <int value="4" label="DEADLINE_EXCEEDED"/> - <int value="5" label="NOT_FOUND"/> - <int value="6" label="ALREADY_EXISTS"/> - <int value="7" label="PERMISSION_DENIED"/> - <int value="8" label="RESOURCE_EXHAUSTED"/> - <int value="9" label="FAILED_PRECONDITION"/> - <int value="10" label="ABORTED"/> - <int value="11" label="OUT_OF_RANGE"/> - <int value="12" label="UNIMPLEMENTED"/> - <int value="13" label="INTERNAL"/> - <int value="14" label="UNAVAILABLE"/> - <int value="15" label="DATA_LOSS"/> - <int value="16" label="UNAUTHENTICATED"/> -</enum> - -<enum name="SecagentdTpm"> - <int value="0" label="TPM info successfully retrieved"/> - <int value="1" label="TPM manager did not respond"/> - <int value="2" label="TPM service unavailable"/> - <int value="3" label="Failed to retrieve TPM"/> -</enum> - <enum name="SecondaryActivity"> <int value="0" label="Download"/> <int value="1" label="Bookmark"/> @@ -71584,23 +70208,6 @@ <int value="1" label="Accepted"/> </enum> -<enum name="SecurityAnomaly"> - <int value="0" - label="Writable+executable mount found in the init mount namespace - (deprecated)"/> - <int value="1" - label="Writable+executable mount found in the init mount namespace, on - or under /usr/local (this suggests a dev image)"/> - <int value="2" - label="Writable+executable mount found in the init mount namespace, not - on, nor under, /usr/local"/> - <int value="3" - label="Successful create_memfd syscall detected in the audit log file. - (Baseline for memfd execution attempt)."/> - <int value="4" - label="Memfd execution attempt detected in the audit log file."/> -</enum> - <enum name="SecurityDomainId"> <int value="0" label="Invalid"/> <int value="1" label="Chrome Sync"/> @@ -73314,6 +71921,7 @@ <int value="52" label="Password migration warning on Android only"/> <int value="53" label="Save to photos iOS"/> <int value="54" label="Chrome Sign-in intercept bubble."/> + <int value="55" label="Tab organization"/> </enum> <enum name="SigninAccountReconcilorState"> @@ -73772,12 +72380,6 @@ <int value="3" label="Fresh index with cache updated since backend start"/> </enum> -<enum name="SimulateRightClickModifier"> - <int value="0" label="None"/> - <int value="1" label="Alt"/> - <int value="2" label="Search"/> -</enum> - <enum name="SingleWebFeedEntryPoint"> <int value="0" label="Menu"/> <int value="1" label="Attribtuion"/> @@ -73877,12 +72479,6 @@ <int value="1" label="Desktop"/> </enum> -<enum name="SixPackKeyModifier"> - <int value="0" label="None"/> - <int value="1" label="Alt"/> - <int value="2" label="Search"/> -</enum> - <enum name="SlopBucketDisabledReason"> <int value="0" label="Enabled"/> <int value="1" label="LowEnd"/> @@ -80490,33 +79086,6 @@ <int value="2" label="Other"/> </enum> -<enum name="WebApkInstallResultChromeOS"> - <int value="0" label="Success">Installed successfully.</int> - <int value="1" label="App invalid"> - Installation failed because the app was in an invalid state (e.g., it had no - suitable icon). - </int> - <int value="2" label="ARC unavailable"> - Installation failed because the ARC system was not available. - </int> - <int value="3" label="Update cancelled"> - Update was cancelled because the existing WebAPK was found to be up-to-date. - </int> - <int value="4" label="Update failed during GetWebApkInfo"> - Updating failed because there was an error while fetching information about - the existing WebAPK from ARC. - </int> - <int value="5" label="Network error"> - The network request to the WebAPK server failed with an error. - </int> - <int value="6" label="Network timeout"> - The network request to the WebAPK server timed out. - </int> - <int value="7" label="Google Play error"> - Installing the WebAPK through Google Play failed with an error. - </int> -</enum> - <enum name="WebApkLifetimeLaunchCount"> <int value="0" label="Never launched."/> <int value="1" label="Launched once."/> @@ -84406,14 +82975,6 @@ <int value="83" label="Show performance settings"/> </enum> -<enum name="WrongConfigurationMetric"> - <int value="0" label="Thunderbolt peripheral - wrong cable"/> - <int value="1" label="USB4 peripheral - wrong cable"/> - <int value="2" label="DisplayPort peripheral - wrong cable"/> - <int value="3" label="Cable Limiting Speed"/> - <int value="4" label="None"/> -</enum> - <enum name="XHRPageDismissalState"> <int value="0" label="No page dismissal."/> <int value="1" label="Page dismissal: beforeunload."/>
diff --git a/tools/metrics/histograms/histograms_index.txt b/tools/metrics/histograms/histograms_index.txt index 193fbf0..fcb854e 100644 --- a/tools/metrics/histograms/histograms_index.txt +++ b/tools/metrics/histograms/histograms_index.txt
@@ -26,6 +26,7 @@ tools/metrics/histograms/metadata/browsing_topics/histograms.xml tools/metrics/histograms/metadata/bruschetta/histograms.xml tools/metrics/histograms/metadata/chrome/histograms.xml +tools/metrics/histograms/metadata/chromeos/enums.xml tools/metrics/histograms/metadata/chromeos/histograms.xml tools/metrics/histograms/metadata/chromeos_hps/histograms.xml tools/metrics/histograms/metadata/chromeos_settings/histograms.xml
diff --git a/tools/metrics/histograms/metadata/android/histograms.xml b/tools/metrics/histograms/metadata/android/histograms.xml index d5757e5..fd1d2dec 100644 --- a/tools/metrics/histograms/metadata/android/histograms.xml +++ b/tools/metrics/histograms/metadata/android/histograms.xml
@@ -1899,16 +1899,6 @@ </summary> </histogram> -<histogram name="Android.Intent.OpenFileType" enum="AndroidUtilsMimeTypes" - expires_after="2023-09-18"> - <owner>twellington@chromium.org</owner> - <owner>mthiesse@chromium.org</owner> - <summary> - When a user attempts to navigate a file: URI, records the mime type of the - file. - </summary> -</histogram> - <histogram name="Android.Intent.ShareIntentUrlCount" units="URLs" expires_after="2024-04-28"> <owner>mthiesse@chromium.org</owner>
diff --git a/tools/metrics/histograms/metadata/chromeos/enums.xml b/tools/metrics/histograms/metadata/chromeos/enums.xml new file mode 100644 index 0000000..697fba3 --- /dev/null +++ b/tools/metrics/histograms/metadata/chromeos/enums.xml
@@ -0,0 +1,1479 @@ +<!-- +Copyright 2023 The Chromium Authors +Use of this source code is governed by a BSD-style license that can be +found in the LICENSE file. +--> + +<!-- + +This file describes the enumerations referenced by entries in histograms.xml for +this directory. Some enums may instead be listed in the central enums.xml file +at src/tools/metrics/histograms/enums.xml when multiple files use them. + +For best practices on writing enumerations descriptions, see +https://chromium.googlesource.com/chromium/src.git/+/HEAD/tools/metrics/histograms/README.md#Enum-Histograms + +Please follow the instructions in the OWNERS file in this directory to find a +reviewer. If no OWNERS file exists, please consider signing up at +go/reviewing-metrics (Googlers only), as all subdirectories are expected to +have an OWNERS file. As a last resort you can send the CL to +chromium-metrics-reviews@google.com. +--> + +<histogram-configuration> + +<!-- Enum types --> + +<enums> + +<enum name="AbslErrorCode"> + <int value="0" label="Ok"/> + <int value="1" label="Cancelled"/> + <int value="2" label="Unknown"/> + <int value="3" label="InvalidArgument"/> + <int value="4" label="DeadlineExceeded"/> + <int value="5" label="NotFound"/> + <int value="6" label="AlreadyExists"/> + <int value="7" label="PermissionDenied"/> + <int value="8" label="ResourceExhausted"/> + <int value="9" label="FailedPrecondition"/> + <int value="10" label="Aborted"/> + <int value="11" label="OutOfRange"/> + <int value="12" label="Unimplemented"/> + <int value="13" label="Internal"/> + <int value="14" label="Unavailable"/> + <int value="15" label="DataLoss"/> + <int value="16" label="Unauthenticated"/> + <int value="17" label="Reserved (17)"/> + <int value="18" label="Reserved (18)"/> + <int value="19" label="Reserved (19)"/> + <int value="20" label="Reserved (20)"/> +</enum> + +<enum name="AcceleratorAction"> + <int value="0" label="BrightnessDown"/> + <int value="1" label="BrightnessUp"/> + <int value="2" label="CycleBackwardMru"/> + <int value="3" label="CycleForwardMru"/> + <int value="4" label="CycleSameAppWindowsBackward"/> + <int value="5" label="CycleSameAppWindowsForward"/> + <int value="6" label="DesksActivateDeskLeft"/> + <int value="7" label="DesksActivateDeskRight"/> + <int value="8" label="DesksMoveActiveItemLeft"/> + <int value="9" label="DesksMoveActiveItemRight"/> + <int value="10" label="DesksNewDesk"/> + <int value="11" label="DesksRemoveCurrentDesk"/> + <int value="12" label="DesksActivate0"/> + <int value="13" label="DesksActivate1"/> + <int value="14" label="DesksActivate2"/> + <int value="15" label="DesksActivate3"/> + <int value="16" label="DesksActivate4"/> + <int value="17" label="DesksActivate5"/> + <int value="18" label="DesksActivate6"/> + <int value="19" label="DesksActivate7"/> + <int value="20" label="DesksToggleAssignToAllDesks"/> + <int value="21" label="DisableCapsLock"/> + <int value="22" label="EnableOrToggleDictation"/> + <int value="23" label="Exit"/> + <int value="24" label="FocusCameraPreview"/> + <int value="25" label="FocusNextPane"/> + <int value="26" label="FocusPreviousPane"/> + <int value="27" label="FocusShelf"/> + <int value="28" label="FocusPip"/> + <int value="29" label="KeyboardBacklightToggle"/> + <int value="30" label="KeyboardBrightnessDown"/> + <int value="31" label="KeyboardBrightnessUp"/> + <int value="32" label="LaunchApp0"/> + <int value="33" label="LaunchApp1"/> + <int value="34" label="LaunchApp2"/> + <int value="35" label="LaunchApp3"/> + <int value="36" label="LaunchApp4"/> + <int value="37" label="LaunchApp5"/> + <int value="38" label="LaunchApp6"/> + <int value="39" label="LaunchApp7"/> + <int value="40" label="LaunchLastApp"/> + <int value="41" label="LockPressed"/> + <int value="42" label="LockReleased"/> + <int value="43" label="LockScreen"/> + <int value="44" label="MagnifierZoomIn"/> + <int value="45" label="MagnifierZoomOut"/> + <int value="46" label="MediaFastForward"/> + <int value="47" label="MediaNextTrack"/> + <int value="48" label="MediaPause"/> + <int value="49" label="MediaPlay"/> + <int value="50" label="MediaPlayPause"/> + <int value="51" label="MediaPrevTrack"/> + <int value="52" label="MediaRewind"/> + <int value="53" label="MediaStop"/> + <int value="54" label="MicrophoneMuteToggle"/> + <int value="55" label="MoveActiveWindowBetweenDisplays"/> + <int value="56" label="NewIncognitoWindow"/> + <int value="57" label="NewTab"/> + <int value="58" label="NewWindow"/> + <int value="59" label="OpenCalculator"/> + <int value="60" label="OpenCrosh"/> + <int value="61" label="OpenDiagnostics"/> + <int value="62" label="OpenFeedbackPage"/> + <int value="63" label="OpenFileManager"/> + <int value="64" label="OpenGetHelp"/> + <int value="65" label="PasteClipboardHistoryPlainText"/> + <int value="66" label="PowerPressed"/> + <int value="67" label="PowerReleased"/> + <int value="68" label="PrintUiHierarchies"/> + <int value="69" label="PrivacyScreenToggle"/> + <int value="70" label="RestoreTab"/> + <int value="71" label="RotateScreen"/> + <int value="72" label="RotateWindow"/> + <int value="73" label="ScaleUiDown"/> + <int value="74" label="ScaleUiReset"/> + <int value="75" label="ScaleUiUp"/> + <int value="76" label="ShowEmojiPicker"/> + <int value="77" label="ToggleImeMenuBubble"/> + <int value="78" label="ShowShortcutViewer"/> + <int value="79" label="ShowTaskManager"/> + <int value="80" label="StartAssistant"/> + <int value="81" label="StopScreenRecording"/> + <int value="82" label="Suspend"/> + <int value="83" label="SwapPrimaryDisplay"/> + <int value="84" label="SwitchIme"/> + <int value="85" label="SwitchToLastUsedIme"/> + <int value="86" label="SwitchToNextIme"/> + <int value="87" label="SwitchToNextUser"/> + <int value="88" label="SwitchToPreviousUser"/> + <int value="89" label="TakePartialScreenshot"/> + <int value="90" label="TakeScreenshot"/> + <int value="91" label="TakeWindowScreenshot"/> + <int value="92" label="ToggleAppList"/> + <int value="93" label="ToggleCalendar"/> + <int value="94" label="ToggleCapsLock"/> + <int value="95" label="ToggleClipboardHistory"/> + <int value="96" label="ToggleDockedMagnifier"/> + <int value="97" label="ToggleFloating"/> + <int value="98" label="ToggleFullscreen"/> + <int value="99" label="ToggleFullscreenMagnifier"/> + <int value="100" label="ToggleGameDashboard"/> + <int value="101" label="ToggleHighContrast"/> + <int value="102" label="ToggleMaximized"/> + <int value="103" label="ToggleMessageCenterBubble"/> + <int value="104" label="ToggleMirrorMode"/> + <int value="105" label="ToggleMultitaskMenu"/> + <int value="106" label="ToggleOverview"/> + <int value="107" label="ToggleProjectorMarker"/> + <int value="108" label="ToggleResizeLockMenu"/> + <int value="109" label="ToggleSnapGroupWindowsGroupAndUngroup"/> + <int value="110" label="ToggleSnapGroupWindowsMinimizeAndRestore"/> + <int value="111" label="ToggleSpokenFeedback"/> + <int value="112" label="ToggleStylusTools"/> + <int value="113" label="ToggleSystemTrayBubble"/> + <int value="114" label="ToggleWifi"/> + <int value="115" label="TouchHudClear"/> + <int value="116" label="TouchHudModeChange"/> + <int value="117" label="TouchFingerprintSensor111"/> + <int value="118" label="TouchFingerprintSensor2"/> + <int value="119" label="TouchFingerprintSensor3"/> + <int value="120" label="Unpin"/> + <int value="121" label="VolumeDown"/> + <int value="122" label="VolumeMute"/> + <int value="123" label="VolumeUp"/> + <int value="124" label="WindowCycleSnapLeft"/> + <int value="125" label="WindowCycleSnapRight"/> + <int value="126" label="WindowMinimize"/> + <int value="127" label="MinimizeTopWindowOnBack"/> + <int value="128" label="VolumeMuteToggle"/> + <int value="129" label="DebugClearUseKMeansPref"/> + <int value="130" label="DebugKeyboardBacklightToggle"/> + <int value="131" label="DebugMicrophoneMuteToggle"/> + <int value="132" label="DebugPrintLayerHierarchy"/> + <int value="133" label="DebugPrintViewHierarchy"/> + <int value="134" label="DebugPrintWindowHierarchy"/> + <int value="135" label="DebugShowInformedRestore"/> + <int value="136" label="DebugShowToast"/> + <int value="137" label="DebugShowSystemNudge"/> + <int value="138" label="DebugSystemUiStyleViewer"/> + <int value="139" label="DebugToggleDarkMode"/> + <int value="140" label="DebugToggleDynamicColor"/> + <int value="141" label="DebugTogglePowerButtonMenu"/> + <int value="142" label="DebugToggleShowDebugBorders"/> + <int value="143" label="DebugToggleShowFpsCounter"/> + <int value="144" label="DebugToggleShowPaintRects"/> + <int value="145" label="DebugToggleTouchPad"/> + <int value="146" label="DebugToggleTouchScreen"/> + <int value="147" label="DebugToggleTabletMode"/> + <int value="148" label="DebugToggleVideoConferenceCameraTrayIcon"/> + <int value="149" label="DebugToggleWallpaperMode"/> + <int value="150" label="DebugTriggerCrash"/> + <int value="151" label="DebugToggleHudDisplay"/> + <int value="152" label="DebugToggleVirtualTrackpad"/> + <int value="153" label="DevAddRemoveDisplay"/> + <int value="154" label="DevToggleAppList"/> + <int value="155" label="DevToggleUnifiedDesktop"/> +</enum> + +<enum name="ArcIntentHandlerDestinationPlatform"> + <summary> + Defines ARC intent handler platforms to continue the navigation. + </summary> + <int value="0" label="ARC"/> + <int value="1" label="Chrome"/> + <int value="2" label="Progressive web app"/> + <int value="3" label="External device"/> + <int value="4" label="Mac OS app"/> +</enum> + +<enum name="AttachmentForm"> + <int value="0" label="Mouse"/> + <int value="1" label="Pointing Stick"/> + <int value="2" label="Touchpad"/> + <int value="3" label="Touchscreen"/> + <int value="4" label="Stylus"/> + <int value="5" label="Gamepad"/> + <int value="6" label="Keyboard"/> +</enum> + +<enum name="AttachmentType"> + <int value="0" label="Internal"/> + <int value="1" label="USB"/> + <int value="2" label="Bluetooth"/> + <int value="3" label="Unknown"/> +</enum> + +<enum name="AttestationFlowStatus"> +<!-- + Uninteresting/unused values are not labeled. + See "ChromeOS.Attestation.AttestationFlowStatus" histogram +--> + + <int value="10" label="Failure w/o proxy"/> + <int value="11" label="Fallback w/o proxy"/> + <int value="12" label="Success w/o proxy"/> + <int value="34" label="Failure w/ default flow being skipped w/ proxy"/> + <int value="35" label="Success w/ default flow being skipped w/ proxy"/> +</enum> + +<enum name="AttestationStatus"> +<!-- + The alias of `enum AttestationStatus` defined in + `system_api/dbus/attestation/interface.proto` in + `chromiumos/platform2` repository. +--> + + <int value="0" label="STATUS_SUCCESS"/> + <int value="1" label="STATUS_UNEXPECTED_DEVICE_ERROR"/> + <int value="2" label="STATUS_NOT_AVAILABLE"/> + <int value="3" label="STATUS_NOT_READY"/> + <int value="4" label="STATUS_NOT_ALLOWED"/> + <int value="5" label="STATUS_INVALID_PARAMETER"/> + <int value="6" label="STATUS_REQUEST_DENIED_BY_CA"/> + <int value="7" label="STATUS_CA_NOT_AVAILABLE"/> + <int value="8" label="STATUS_NOT_SUPPORTED"/> + <int value="9" label="STATUS_DBUS_ERROR"/> +</enum> + +<enum name="AutoFramingError"> + <int value="0" label="No error"/> + <int value="1" label="Initialization error"/> + <int value="2" label="Configuration error"/> + <int value="3" label="Processing capture request error"/> + <int value="4" label="Processing capture result error"/> + <int value="5" label="Auto Framing pipeline initialization error"/> + <int value="6" label="Auto Framing pipeline input error"/> + <int value="7" label="Auto Framing pipeline output error"/> +</enum> + +<enum name="CableSpeedMetric"> + <int value="0" label="Other"/> + <int value="1" label="USB 2.0"/> + <int value="2" label="USB 3.2 - Gen1"/> + <int value="3" label="USB 3.2 / USB4 - Gen2"/> + <int value="4" label="USB 3.1 - Gen1"/> + <int value="5" label="USB 3.1 - Gen1,Gen2"/> + <int value="6" label="USB4 - Gen3"/> + <int value="7" label="Thunderbolt Only - 10G,20G"/> +</enum> + +<enum name="CameraEffectError"> + <int value="0" label="kNoError"/> + <int value="1" label="kGPUInitializationError"/> + <int value="2" label="kBufferAllocationError"/> + <int value="3" label="kReceivedFailedBuffer"/> + <int value="4" label="kSyncWaitTimeout"/> + <int value="5" label="kBufferRegistrationFailed"/> + <int value="6" label="kBufferUnregistrationFailed"/> + <int value="7" label="kGPUImageInitializationFailed"/> + <int value="8" label="kYUVConversionFailed"/> + <int value="9" label="kPipelineFailed"/> +</enum> + +<enum name="CameraEffectType"> + <int value="0" label="kNone"/> + <int value="1" label="kBlur"/> + <int value="2" label="kRelight"/> + <int value="3" label="kBlurAndRelight"/> +</enum> + +<enum name="CertProvisioningEvent"> + <int value="0" label="kRegisteredToInvalidationTopic"/> + <int value="1" label="kInvalidationReceived"/> + <int value="2" label="kWorkerRetryWithoutInvalidation"/> + <int value="3" label="kWorkerRetrySucceededWithoutInvalidation"/> + <int value="4" label="kProfileRetriedManually"/> + <int value="5" label="kWorkerCreated"/> + <int value="6" label="kWorkerDeserialized"/> + <int value="7" label="kWorkerDeserializationFailed"/> +</enum> + +<enum name="CertProvisioningWorkerState"> + <int value="0" label="kInitState"/> + <int value="1" label="kKeypairGenerated"/> + <int value="2" label="kStartCsrResponseReceived"/> + <int value="3" label="kVaChallengeFinished"/> + <int value="4" label="kKeyRegistered"/> + <int value="5" label="kKeypairMarked"/> + <int value="6" label="kSignCsrFinished"/> + <int value="7" label="kFinishCsrResponseReceived"/> + <int value="8" label="kSucceeded"/> + <int value="9" label="kInconsistentDataError"/> + <int value="10" label="kFailed"/> + <int value="11" label="kCanceled"/> + <int value="12" label="kReadyForNextOperation"/> + <int value="13" label="kAuthorizeInstructionReceived"/> + <int value="14" label="kProofOfPossessionInstructionReceived"/> + <int value="15" label="kImportCertificateInstructionReceived"/> +</enum> + +<enum name="ChromeOSCameraClientType"> + <int value="0" label="Unknown"/> + <int value="1" label="Testing"/> + <int value="2" label="Chrome"/> + <int value="3" label="Android"/> + <int value="4" label="PluginVM"/> + <int value="5" label="AshChrome"/> + <int value="6" label="LacrosChrome"/> +</enum> + +<enum name="ChromeOSCameraErrorType"> + <int value="1" label="Device"/> + <int value="2" label="Request"/> + <int value="3" label="Result"/> + <int value="4" label="Buffer"/> +</enum> + +<enum name="ChromeOSCameraFaceAutoExposureFunctionStatus"> + <int value="0" label="Unsupported"/> + <int value="1" label="NotEnabled"/> + <int value="2" label="Enabled"/> + <int value="3" label="ForceDisabled"/> +</enum> + +<enum name="ChromeOSCameraFacing"> + <int value="0" label="Back"/> + <int value="1" label="Front"/> + <int value="2" label="External"/> +</enum> + +<enum name="ChromeOSChannel"> + <int value="0" label="Unknown"/> + <int value="1" label="Canary"/> + <int value="2" label="Dev"/> + <int value="3" label="Beta"/> + <int value="4" label="Stable"/> +</enum> + +<enum name="ChromeOSIioServiceSensorUsage"> + <int value="0" label="ACCEL_base"/> + <int value="1" label="ACCEL_lid"/> + <int value="2" label="ACCEL_camera"/> + <int value="3" label="ACCEL_others"/> + <int value="4" label="ANGLVEL_base"/> + <int value="5" label="ANGLVEL_lid"/> + <int value="6" label="ANGLVEL_camera"/> + <int value="7" label="ANGLVEL_others"/> + <int value="8" label="LIGHT_base"/> + <int value="9" label="LIGHT_lid"/> + <int value="10" label="LIGHT_camera"/> + <int value="11" label="LIGHT_others"/> + <int value="12" label="COUNT_base"/> + <int value="13" label="COUNT_lid"/> + <int value="14" label="COUNT_camera"/> + <int value="15" label="COUNT_others"/> + <int value="16" label="MAGN_base"/> + <int value="17" label="MAGN_lid"/> + <int value="18" label="MAGN_camera"/> + <int value="19" label="MAGN_others"/> + <int value="20" label="ANGL_base"/> + <int value="21" label="ANGL_lid"/> + <int value="22" label="ANGL_camera"/> + <int value="23" label="ANGL_others"/> + <int value="24" label="BARO_base"/> + <int value="25" label="BARO_lid"/> + <int value="26" label="BARO_camera"/> + <int value="27" label="BARO_others"/> + <int value="28" label="ACCEL_UNCALIBRATED_base"/> + <int value="29" label="ACCEL_UNCALIBRATED_lid"/> + <int value="30" label="ACCEL_UNCALIBRATED_camera"/> + <int value="31" label="ACCEL_UNCALIBRATED_others"/> + <int value="32" label="ANGLVEL_UNCALIBRATED_base"/> + <int value="33" label="ANGLVEL_UNCALIBRATED_lid"/> + <int value="34" label="ANGLVEL_UNCALIBRATED_camera"/> + <int value="35" label="ANGLVEL_UNCALIBRATED_others"/> + <int value="36" label="MAGN_UNCALIBRATED_base"/> + <int value="37" label="MAGN_UNCALIBRATED_lid"/> + <int value="38" label="MAGN_UNCALIBRATED_camera"/> + <int value="39" label="MAGN_UNCALIBRATED_others"/> + <int value="40" label="GRAVITY_base"/> + <int value="41" label="GRAVITY_lid"/> + <int value="42" label="GRAVITY_camera"/> + <int value="43" label="GRAVITY_others"/> + <int value="44" label="PROXIMITY_base"/> + <int value="45" label="PROXIMITY_lid"/> + <int value="46" label="PROXIMITY_camera"/> + <int value="47" label="PROXIMITY_others"/> +</enum> + +<enum name="ChromeOSJankinessTriggerStatus"> + <int value="0" label="CollectionAttempted"/> + <int value="1" label="Throttled"/> +</enum> + +<enum name="ChromeOSMachineIdReason"> + <int value="0" label="Unknown"/> + <int value="1" label="Network"/> + <int value="2" label="Periodic"/> +</enum> + +<enum name="ChromeOSMessageCenterScrollActionReason"> + <int value="0" label="Unknown"/> + <int value="1" label="By mouse wheel"/> + <int value="2" label="By touch"/> + <int value="3" label="By arrow key"/> +</enum> + +<enum name="ChromeOSParseCPUFrequencyStatus"> + <int value="0" label="Success"/> + <int value="1" label="Zero logical CPUs"/> + <int value="2" label="Some CPUs have zero frequencies"/> + <int value="3" label="All CPUs have zero frequencies"/> + <int value="4" label="Success after retry"/> +</enum> + +<enum name="ChromeOSParseLacrosPath"> + <int value="0" label="Rootfs"/> + <int value="1" label="Stateful"/> + <int value="2" label="Unrecognized"/> +</enum> + +<enum name="ChromeOSParsePSICPUStatus"> + <int value="0" label="Success"/> + <int value="1" label="Fail to read file /proc/pressure/cpu"/> + <int value="2" label="Unexpected data format in PSI CPU file"/> + <int value="3" label="Fail to parse PSI CPU values"/> +</enum> + +<enum name="ChromeOSParsePSIMemStatus"> + <int value="0" label="Success"/> + <int value="1" label="Fail to read file /proc/pressure/memory"/> + <int value="2" label="Unexpected data format in PSI Memory file"/> + <int value="3" label="Unexpected numeric format in PSI Memory file"/> + <int value="4" label="Fail to parse PSI Memory values"/> +</enum> + +<enum name="ChromeOSPlatformVerificationResult2"> + <summary> + Possible results of a platform verification attempt. See + chrome/browser/ash/attestation/platform_verification.h. + </summary> + <int value="0" label="Success"/> + <int value="1" label="Internal Error"/> + <int value="2" label="Platform Not Verified"/> + <int value="3" label="Rejected by Policy"/> + <int value="4" label="Timeout"/> +</enum> + +<enum name="ChromeOSProcessTypeCollectionStatus"> + <int value="0" label="PS command errored during process types collection"> + Process types couldn't be collected as PS command errored. + </int> + <int value="1" label="PS command errored during thread types collection"> + Thread types couldn't be collected as PS command errored. + </int> + <int value="2" label="Empty process type output"> + Process type parsing returned empty output. + </int> + <int value="3" label="Empty thread type output"> + Thread type parsing returned empty output. + </int> + <int value="4" label="Truncated process type output"> + Process types were partially collected. + </int> + <int value="5" label="Truncated thread type output"> + Thread types were partially collected. + </int> + <int value="6" label="Complete process type output"> + Process types were completely collected. + </int> + <int value="7" label="Complete thread type output"> + Thread types were completely collected. + </int> +</enum> + +<enum name="ChromeOSProfileCollectionStatus"> + <int value="0" label="Success">Profile was collected successfully.</int> + <int value="1" label="Collection timer triggered but buffer is full"> + Profile timer triggered but the collector's buffer is full. + </int> + <int value="2" label="Collection timer triggered but incognito window active"> + Profile timer triggered but an incognito window was open. + </int> + <int value="3" label="Incognito window launched during collection"> + Profile was collected but an incognito window was opened during the + collection. + </int> + <int value="4" label="Protobuf cannot be deserialized"> + Profile data was collected and sent to Chrome as a serialized protobuf but + it could not be deserialized by Chrome. + </int> + <int value="5" label="Illegal data returned by collector"> + The profile data sent back to Chrome is invalid. + </int> + <int value="6" label="Already collecting"> + Another profile collection was already active. + </int> + <int value="7" label="Failed to start collection"> + Collection could not start due to failing prerequisites. + </int> + <int value="8" label="Data collection failure"> + Failure while collecting data. + </int> + <int value="9" label="Session has zero samples"> + The profile session has zero samples. + </int> +</enum> + +<enum name="ChromeOSProfileRecordStatus"> + <int value="0" label="Metrics recording is disabled"> + Profile data was not recorded since metric recording is disabled. + </int> + <int value="1" label="Profile manager is unset"> + Profile data was redacted since the profile manager used to obtain user + profile(s) is unset. + </int> + <int value="2" label="No loaded user profile is found"> + Profile data was redacted since there is no user profile initialized. When + looking at user profile(s), the Default profile in Chrome OS is skipped. + </int> + <int value="3" label="App sync is disabled"> + Profile data was redacted since App Sync is disabled. + </int> + <int value="4" label="App sync is enabled"> + Profile data was recorded in full since App Sync is enabled. + </int> + <int value="5" label="Sync service is unavailable"> + Profile data was redacted since sync service is unavailable. + </int> + <int value="6" label="Chrome sync feature is disabled"> + Profile data was redacted since Chrome sync feature is disabled. + </int> + <int value="7" label="Chrome App Sync is disabled"> + Profile data was redacted since Chrome App Sync is disabled. + </int> + <int value="8" label="Chrome OS sync feature is disabled"> + Profile data was redacted since Chrome OS sync feature is disabled. + </int> + <int value="9" label="Chrome OS App Sync is disabled"> + Profile data was redacted since Chrome OS App Sync is disabled. + </int> +</enum> + +<enum name="ChromeOSSamlApiUsed"> + <summary> + ChromeOS login flow by Identity Provider. Can be either GAIA-based, SAML + with API or pure SAML with password scraping. + </summary> + <int value="0" label="Default GAIA authentication"/> + <int value="1" label="SAML Chrome Credentials Passing API used"/> + <int value="2" label="SAML Chrome Credentials Passing API not used"/> +</enum> + +<enum name="ChromeOSSamlProvider"> + <summary> + Different SAML providers that uses SAML login flow in ChromeOS. + </summary> + <int value="0" label="unknown"/> + <int value="1" label="failure"/> + <int value="2" label="adfs"/> + <int value="3" label="azure"/> + <int value="4" label="okta"/> + <int value="5" label="ping"/> + <int value="6" label="onelogin"/> + <int value="7" label="microsoft"/> + <int value="8" label="clever"/> + <int value="9" label="cloudgate"/> + <int value="10" label="windows"/> + <int value="11" label="salesforce"/> +</enum> + +<enum name="ChromeOSSharesheetAction"> + <summary>Defines Chrome OS sharesheet actions.</summary> + <int value="0" label="Cancelled by user clicking outside bubble"/> + <int value="1" label="Launch ARC app"/> + <int value="2" label="Launch Nearby Share action"/> + <int value="3" label="Cancelled by user pressing Esc key"/> + <int value="4" label="Launch Web app"/> + <int value="5" label="Launch Drive share action"/> + <int value="6" label="Launch Copy share action"/> +</enum> + +<enum name="ChromeOSSharesheetFormFactor"> + <summary>Different form factors.</summary> + <int value="0" label="Tablet form factor"/> + <int value="1" label="Clamshell form factor"/> +</enum> + +<enum name="ChromeOSSharesheetLaunchSource"> + <summary>The source from which sharesheet is invoked.</summary> + <int value="0" label="Invoked from an unknown source"/> + <int value="1" label="Invoked from the share button in the Files app"/> + <int value="2" label="Invoked from the context menu in the Files app"/> + <int value="3" label="Invoked through WebShare"/> + <int value="4" label="Invoked from ARC++ to directly trigger Nearby Share"/> + <int value="5" label="Invoked through the omnibox entry point"/> +</enum> + +<enum name="ChromeOSSharesheetMimeType"> + <summary> + The mime types of the content the user is trying to share from the + sharesheet. + </summary> + <int value="0" label="Unknown mime type"/> + <int value="1" label="Text"/> + <int value="2" label="Url"/> + <int value="3" label="Text file"/> + <int value="4" label="Image file"/> + <int value="5" label="Video file"/> + <int value="6" label="Audio file"/> + <int value="7" label="Pdf file"/> +</enum> + +<enum name="ChromeOSUsbDeviceClass"> + <summary>https://www.usb.org/defined-class-codes</summary> + <int value="0" label="Application Specific"/> + <int value="1" label="Audio"/> + <int value="2" label="Audio/Video"/> + <int value="3" label="Card"/> + <int value="4" label="Communication"/> + <int value="5" label="Healthcare"/> + <int value="6" label="HID"/> + <int value="7" label="Hub"/> + <int value="8" label="Image"/> + <int value="9" label="Miscellaneous"/> + <int value="10" label="Other"/> + <int value="11" label="Physical"/> + <int value="12" label="Printer"/> + <int value="13" label="Security"/> + <int value="14" label="Storage"/> + <int value="15" label="Vendor Specific"/> + <int value="16" label="Video"/> + <int value="17" label="Wireless"/> +</enum> + +<enum name="ChromeOSUsbDeviceSpeed"> + <int value="0" label="Other"/> + <int value="1" label="1.5 Mbps (USB 1.1)"/> + <int value="2" label="12 Mbps (USB 1.1)"/> + <int value="3" label="480 Mbps (USB 2.0)"/> + <int value="4" + label="480 Mbps fallback (USB 2.0 fallen back from SuperSpeed)"/> + <int value="5" label="5000 Mbps (USB 3.2 Gen 1)"/> + <int value="6" label="10000 Mbps (USB 3.2 Gen 2)"/> + <int value="7" label="20000 Mbps (USB 3.2 Gen 2x2)"/> +</enum> + +<enum name="ChromeOSUsbEventTiming"> + <int value="0" label="kLoggedOut"/> + <int value="1" label="kLoggedIn"/> + <int value="2" label="kLocked"/> +</enum> + +<enum name="ComboDeviceClassification"> + <int value="0" label="KnownKeyboardImposter"/> + <int value="1" label="KnownMouseImposter"/> + <int value="2" label="KnownComboDevice"/> + <int value="3" label="UnknownClassification"/> +</enum> + +<enum name="CrashSeverityProductType"> + <int value="0" label="Unspecified"/> + <int value="1" label="UI"/> + <int value="2" label="Platform"/> + <int value="3" label="Arc"/> + <int value="4" label="Lacros"/> + <int value="5" label="Unknown Value"/> +</enum> + +<enum name="CrosDiagnosticsRoutineResult"> + <int value="0" label="TestPassed"/> + <int value="1" label="TestFailed"/> + <int value="2" label="ExecutionError"/> + <int value="3" label="UnableToRun"/> +</enum> + +<enum name="CrosHealthdDiagnosticResult"> + <int value="0" label="Passed"/> + <int value="1" label="Failed"/> + <int value="2" label="Error"/> + <int value="3" label="Cancelled"/> + <int value="4" label="FailedToStart"/> + <int value="5" label="Removed"/> + <int value="6" label="Unsupported"/> + <int value="7" label="NotRun"/> +</enum> + +<enum name="CrosHealthdEventCategory"> + <int value="0" label="Unknown"/> + <int value="1" label="Usb"/> + <int value="2" label="Thunderbolt"/> + <int value="3" label="Lid"/> + <int value="4" label="Bluetooth"/> + <int value="5" label="Power"/> + <int value="6" label="Audio"/> + <int value="7" label="AudioJack"/> + <int value="8" label="SdCard"/> + <int value="9" label="Network"/> + <int value="10" label="KeyboardDiagnostic"/> + <int value="11" label="Touchpad"/> + <int value="12" label="ExternalDisplay"/> + <int value="13" label="Touchscreen"/> + <int value="14" label="StylusGarage"/> + <int value="15" label="Stylus"/> + <int value="16" label="Crash"/> +</enum> + +<enum name="CrosHealthdTelemetryResult"> + <int value="0" label="Success"/> + <int value="1" label="Error"/> +</enum> + +<enum name="CrosSystemTrayFirstInteraction"> + <int value="0" label="Quick Settings"/> + <int value="1" label="Message Center"/> +</enum> + +<enum name="CrosSystemTrayInteraction"> + <int value="0" label="Tap"/> + <int value="1" label="Click"/> +</enum> + +<enum name="CrosSystemTrayToggleExpanded"> + <int value="0" label="Toggled by button"/> + <int value="1" label="Toggled by gesture"/> +</enum> + +<enum name="CustomizableButton"> + <int value="0" label="Left"/> + <int value="1" label="Right"/> + <int value="2" label="Middle"/> + <int value="3" label="Forward"/> + <int value="4" label="Back"/> + <int value="5" label="Extra"/> + <int value="6" label="Side"/> +</enum> + +<enum name="DetailedViewSection"> + <int value="0" label="WiFi section shown"/> + <int value="1" label="Mobile section shown"/> + <int value="2" label="Ethernet section shown"/> + <int value="3" label="Detailed view shown"/> + <int value="4" label="Tether Hosts section shown"/> +</enum> + +<enum name="DeviceSettingsStaticShortcutAction"> + <int value="0" label="Disable"/> + <int value="1" label="Copy"/> + <int value="2" label="Paste"/> + <int value="3" label="Undo"/> + <int value="4" label="Redo"/> + <int value="5" label="Zoom In"/> + <int value="6" label="Zoom Out"/> + <int value="7" label="Previous page"/> + <int value="8" label="Next Page"/> +</enum> + +<enum name="DpSuccessMetric"> + <int value="0" label="Success with HotPlug Detect(HPD)"/> + <int value="1" label="Success without HotPlug Detect(HPD)"/> + <int value="2" label="Failure"/> +</enum> + +<enum name="ExtendedFkeysModifier"> + <int value="0" label="Disabled"/> + <int value="1" label="Alt"/> + <int value="3" label="Shift"/> + <int value="4" label="CtrlShift"/> +</enum> + +<enum name="FeatureUsageEvent"> + <int value="0" + label="Device is eligible for this feature. Recorded periodically."/> + <int value="1" label="Feature is enabled by user. Recorded periodically."/> + <int value="2" + label="Successful attempt to use the feature. Recorded on each event."/> + <int value="3" + label="Failed attempt to use the feature. Recorded on each event."/> + <int value="4" label="Feature is accessible to user. Recorded periodically."/> +</enum> + +<enum name="FirmwareUpdateInstallResult"> + <int value="0" label="Success"/> + <int value="1" label="InstallFailed"/> + <int value="2" label="FailedToCreateUpdateDirectory"/> + <int value="3" label="InvalidDestinationFile"/> + <int value="4" label="InvalidFileDescriptor"/> + <int value="5" label="FailedToDownloadToFile"/> +</enum> + +<enum name="HardwareVerifierQualificationStatus"> + <summary> + List of the possible qualification status of a component. This is defined in + https://chromium.googlesource.com/chromiumos/platform2/+/refs/heads/main/hardware_verifier/proto/hardware_verifier.proto + (enum QualificationStatus). + </summary> + <int value="0" label="UNQUALIFIED">Unqualified</int> + <int value="1" label="REJECTED">Rejected</int> + <int value="2" label="QUALIFIED">Qualified</int> + <int value="3" label="NO_MATCH">No_Match</int> +</enum> + +<enum name="HaTSSurvey"> + <summary>Possible survey states and answers for each question.</summary> + <int value="1" label="Survey Triggered"/> + <int value="2" label="Survey Displayed"/> + <int value="3" label="Survey Completed"/> + <int value="101" label="Question 1 - Answer 1"/> + <int value="102" label="Question 1 - Answer 2"/> + <int value="103" label="Question 1 - Answer 3"/> + <int value="104" label="Question 1 - Answer 4"/> + <int value="105" label="Question 1 - Answer 5"/> + <int value="106" label="Question 1 - Answer 6"/> + <int value="107" label="Question 1 - Answer 7"/> + <int value="108" label="Question 1 - Answer 8"/> + <int value="109" label="Question 1 - Answer 9"/> + <int value="110" label="Question 1 - Answer 10"/> + <int value="201" label="Question 2 - Answer 1"/> + <int value="202" label="Question 2 - Answer 2"/> + <int value="203" label="Question 2 - Answer 3"/> + <int value="204" label="Question 2 - Answer 4"/> + <int value="205" label="Question 2 - Answer 5"/> + <int value="206" label="Question 2 - Answer 6"/> + <int value="207" label="Question 2 - Answer 7"/> + <int value="208" label="Question 2 - Answer 8"/> + <int value="209" label="Question 2 - Answer 9"/> + <int value="210" label="Question 2 - Answer 10"/> + <int value="301" label="Question 3 - Answer 1"/> + <int value="302" label="Question 3 - Answer 2"/> + <int value="303" label="Question 3 - Answer 3"/> + <int value="304" label="Question 3 - Answer 4"/> + <int value="305" label="Question 3 - Answer 5"/> + <int value="306" label="Question 3 - Answer 6"/> + <int value="307" label="Question 3 - Answer 7"/> + <int value="308" label="Question 3 - Answer 8"/> + <int value="309" label="Question 3 - Answer 9"/> + <int value="310" label="Question 3 - Answer 10"/> +</enum> + +<enum name="HdrnetError"> + <int value="0" label="No error"/> + <int value="1" label="Initialization error"/> + <int value="2" label="Sync wait error"/> + <int value="3" label="HDRnet processor error"/> + <int value="4" label="Pre-processing error"/> + <int value="5" label="RGB pipeline error"/> + <int value="6" label="Post-processing error"/> + <int value="7" label="Camera HAL3 error"/> +</enum> + +<enum name="HdrnetStreamConfiguration"> + <int value="0" label="Single YUV stream"/> + <int value="1" label="Single YUV stream with BLOB"/> + <int value="2" label="Multiple YUV streams"/> + <int value="3" label="Multiple YUV streams with BLOB"/> + <int value="4" label="Multiple YUV streams of different aspect ratio"/> + <int value="5" + label="Multiple YUV streams of different aspect ratio with BLOB"/> +</enum> + +<enum name="IntentPickerDialogAction"> + <summary> + Defines actions taken by the user in the Intent Picker dialog + </summary> + <int value="0" label="Invalid"/> + <int value="1" label="Error"/> + <int value="2" label="Dialog deactivated"/> + <int value="3" label="Chrome selected"/> + <int value="4" label="Chrome selected and preferred"/> + <int value="5" label="ARC app selected"/> + <int value="6" label="ARC app selected and preferred"/> + <int value="7" label="PWA selected"/> + <int value="8" label="PWA selected and preferred"/> +</enum> + +<enum name="KeyPermissionsManagerMigrationStatus"> + <int value="0" label="kStarted"/> + <int value="1" label="kSucceeded"/> + <int value="2" label="kFailed"/> + <int value="3" label="kNecessary"/> +</enum> + +<enum name="LanguagePackDlcErrorType"> +<!-- This enum needs to match DlcErrorTypeEnum in +chromeos/ash/components/language/language_packs/language_pack_manager.h --> + + <summary>List of all the error types that DLC Service returns.</summary> + <int value="0" label="Unknown"/> + <int value="1" label="None"/> + <int value="2" label="Internal"/> + <int value="3" label="Busy"/> + <int value="4" label="Need reboot"/> + <int value="5" label="Invalid DLC"/> + <int value="6" label="Allocation"/> + <int value="7" label="No image found"/> +</enum> + +<enum name="LanguagePackFeatureIds"> +<!-- This must be kept current with FeatureIdsEnum in +chromeos/ash/components/language/language_packs/language_pack_manager.h --> + + <summary> + List of all the Features that are supported by Language Packs. A Feature is + a synonym for client. + </summary> + <int value="0" label="UNKNOWN"/> + <int value="1" label="HANDWRITING"/> + <int value="2" label="TTS"/> +</enum> + +<enum name="LanguagePackFeatureSuccess"> +<!-- This enum needs to match FeatureSuccessEnum in +chromeos/ash/components/language/language_packs/language_pack_manager.h --> + + <summary> + Multidimension Enum that captures success and failures broken down by + Feature ID. We use this approach based on the Histograms guidelines to + represent a MxN matrix. + </summary> + <int value="0" label="Unknown success"/> + <int value="1" label="Unknown failure"/> + <int value="2" label="Handwriting success"/> + <int value="3" label="Handwriting failure"/> + <int value="4" label="TTS success"/> + <int value="5" label="TTS failure"/> +</enum> + +<enum name="LanguagePackLanguageCodes"> + <summary> + Hash values of language codes that correspond to a Language Pack. The hash + is created by computing base::PersistentHash() of the label, then cast to + int32. To generate new values in a way that is consistent, use the unit test + at chromeos/ash/components/language/language_packs/metrics_unittest.cc. + </summary> + <int value="-1954182822" label="et"/> + <int value="-1902856059" label="tr"/> + <int value="-1858573686" label="ga"/> + <int value="-1840989837" label="ar"/> + <int value="-1823490855" label="be"/> + <int value="-1784800271" label="tl"/> + <int value="-1781321693" label="my"/> + <int value="-1760656795" label="kk"/> + <int value="-1728890006" label="kn"/> + <int value="-1722334576" label="sv"/> + <int value="-1667118147" label="bg"/> + <int value="-1660178764" label="bn"/> + <int value="-1391374456" label="ur"/> + <int value="-1340196252" label="en-gb"/> + <int value="-1339452358" label="hu"/> + <int value="-1319436779" label="lt"/> + <int value="-1142714117" label="nb"/> + <int value="-1060081087" label="te"/> + <int value="-1001508648" label="nl"/> + <int value="-854196551" label="ko"/> + <int value="-795149789" label="en-au"/> + <int value="-763755563" label="ru"/> + <int value="-703387832" label="ml"/> + <int value="-651240163" label="am"/> + <int value="-622454823" label="cs"/> + <int value="-554160101" label="es"/> + <int value="-468417265" label="ca"/> + <int value="-414170858" label="ne"/> + <int value="-344966328" label="en-us"/> + <int value="-232429543" label="fi"/> + <int value="-155273274" label="ka"/> + <int value="-132861449" label="or"/> + <int value="-103735858" label="is"/> + <int value="-100682548" label="hr"/> + <int value="-76675939" label="hy"/> + <int value="0" label="Unknown"/> + <int value="13936671" label="fa"/> + <int value="37698508" label="si"/> + <int value="76742708" label="mn"/> + <int value="126997093" label="sk"/> + <int value="202713180" label="ms"/> + <int value="218790103" label="es-us"/> + <int value="385084822" label="pt"/> + <int value="411897228" label="fr"/> + <int value="579959091" label="iw"/> + <int value="592207805" label="pl"/> + <int value="656523220" label="zh"/> + <int value="771718923" label="yue"/> + <int value="771844654" label="uk"/> + <int value="916296240" label="id"/> + <int value="934072607" label="ta"/> + <int value="942489058" label="gu"/> + <int value="943542304" label="sl"/> + <int value="1005034866" label="es-es"/> + <int value="1136549914" label="it"/> + <int value="1176966558" label="de"/> + <int value="1229318713" label="vi"/> + <int value="1242216658" label="el"/> + <int value="1256230022" label="km"/> + <int value="1299213554" label="mr"/> + <int value="1305993605" label="mt"/> + <int value="1347501577" label="lo"/> + <int value="1396205312" label="no"/> + <int value="1438566975" label="hi"/> + <int value="1445641954" label="lv"/> + <int value="1505395693" label="th"/> + <int value="1652267726" label="ja"/> + <int value="1840739667" label="ti"/> + <int value="1889238869" label="pa"/> + <int value="1938425968" label="ro"/> + <int value="2017029213" label="sr"/> + <int value="2026210505" label="da"/> +</enum> + +<enum name="LinkCapturingEvent"> + <summary>Defines events in the link capturing user flow</summary> + <int value="0" label="Entry point shown"/> + <int value="1" label="App opened"/> + <int value="2" label="Settings changed"/> +</enum> + +<enum name="ModifierKeyDomCodes"> + <int value="0" label="MetaLeft"/> + <int value="1" label="MetaRight"/> + <int value="2" label="ControlLeft"/> + <int value="3" label="ControlRight"/> + <int value="4" label="AltLeft"/> + <int value="5" label="AltRight"/> + <int value="6" label="ShiftLeft"/> + <int value="7" label="ShiftRight"/> + <int value="8" label="CapsLock"/> + <int value="9" label="Backspace"/> + <int value="10" label="Escape"/> + <int value="11" label="Assistant"/> +</enum> + +<enum name="NetworkRowClickedAction"> + <int value="0" label="Connect to Network"/> + <int value="1" label="Open Network settings page"/> + <int value="2" label="Open SIM unlock dialog"/> + <int value="3" label="Open portal signin"/> +</enum> + +<enum name="OwnerKeyUmaEvent"> + <int value="0" label="DeviceSettingsServiceIsNull"> + DeviceSettingsService was null, owner key was not loaded. + </int> + <int value="1" label="ManagedDeviceSuccess"> + Managed device successfully loaded the public owner key. + </int> + <int value="2" label="ManagedDeviceFail"> + Managed device failed to load the public owner key. + </int> + <int value="3" label="OwnerHasKeysSuccess"> + Consumer owner user successfully loaded both public and private keys. + </int> + <int value="4" label="OwnerHasKeysFail"> + Consumer owner received both public and private keys, but at least one of + them wasn't actually loaded. + </int> + <int value="5" label="EstablishingConsumerOwnershipSuccess"> + ChromeOS decided to establish consumer ownership when there was no existing + public key. + </int> + <int value="6" label="EstablishingConsumerOwnershipFail"> + ChromeOS decided to establish consumer ownership when there was an existing + public key. + </int> + <int value="7" label="RegeneratingOwnerKeyBasedOnPolicySuccess"> + ChromeOS decided to re-generate the lost owner key based on the data from + device policies after the public key was found (the private part is what was + lost). + </int> + <int value="8" label="RegeneratingOwnerKeyBasedOnPolicyFail"> + ChromeOS decided to re-generate the lost owner key based on the data from + device policies and the public key was also not found. (Strictly speaking + not a failure, but still an unusual situation). + </int> + <int value="9" label="UserNotAnOwnerBasedOnPolicySuccess"> + A user was categorized as not an owner based on the data from device + policies, the public key was successfully loaded. + </int> + <int value="10" label="UserNotAnOwnerBasedOnPolicyFail"> + A user was categorized as not an owner based on the data from device + policies, the public key failed to load. + </int> + <int value="11" label="RegeneratingOwnerKeyBasedOnLocalStateSuccess"> + ChromeOS decided to re-generate the lost owner key based on the data from + local state and the public key was not present. + </int> + <int value="12" label="RegeneratingOwnerKeyBasedOnLocalStateFail"> + ChromeOS decided to re-generate the lost owner key based on the data from + local state after the public key was found (in such a case device policies + should be used, relying on local state is unexpected). + </int> + <int value="13" label="UserNotAnOwnerBasedOnLocalStateSuccess"> + A user was categorized as not an owner based on the data from local state, + the public key was successfully loaded. + </int> + <int value="14" label="UserNotAnOwnerBasedOnLocalStateFail"> + A user was categorized as not an owner based on the data from local state, + the public key failed to load. + </int> + <int value="15" label="UnsureUserNotAnOwnerSuccess"> + ChromeOS assumed that a user is not an owner based on the lack of data, the + public key was successfully loaded. + </int> + <int value="16" label="UnsureUserNotAnOwnerFail"> + ChromeOS assumed that a user is not an owner based on the lack of data, the + public key failed to load. + </int> + <int value="17" label="OwnerKeyGeneratedSuccess"> + New owner key was generated on the first attempt. + </int> + <int value="18" label="OwnerKeyGeneratedFail"> + New owner key was generated after 1+ failures. + </int> + <int value="19" label="FailedToGenerateOwnerKeySuccess"> + Failed to generate new owner key, at least the old public key was returned. + </int> + <int value="20" label="FailedToGenerateOwnerKeyFail"> + Failed to generate new owner key, the old public key also failed to load (or + was not present). + </int> + <int value="21" label="StartSigningPolicySuccess"> + Successfully started signing policies. + </int> + <int value="22" label="StartSigningPolicyFail"> + Failed to start signing policies. + </int> + <int value="23" label="SignedPolicySuccess"> + Successfully signed policies. + </int> + <int value="24" label="SignedPolicyFail">Failed to sign policies.</int> + <int value="25" label="StoredPolicySuccess"> + Successfully stored policies. + </int> + <int value="26" label="StoredPolicyFail">Failed to store policies.</int> + <int value="27" label="UserNotAnOwnerBasedOnUserTypeSuccess"> + A user was categorized as not an owner based on the user type, the public + key was successfully loaded. + </int> + <int value="28" label="UserNotAnOwnerBasedOnUserTypeFail"> + A user was categorized as not an owner based on the user type, the public + key failed to load. + </int> + <int value="29" label="UserNotAnOwnerBasedOnEmptyUsernameSuccess"> + A user was categorized as not an owner because the user name was empty, this + is not expected to happen, the public key was successfully loaded. + </int> + <int value="30" label="UserNotAnOwnerBasedOnEmptyUsernameFail"> + A user was categorized as not an owner because the user name was empty, this + is not expected to happen, the public key failed to load. + </int> + <int value="31" label="UnsureTakeOwnership"> + ChromeOS decided to establish consumer ownership when there was no + indication that it's the first user, but also no public key, no policies and + no local state entry. + </int> +</enum> + +<enum name="PartnerLocationMetric"> + <int value="0" label="Other"/> + <int value="1" + label="User has no choice since all open ports are only on one side"/> + <int value="2" label="Left: first partner"/> + <int value="3" label="Left: second partner (same side with first)"/> + <int value="4" label="Left: second partner (opposite side to first)"/> + <int value="5" label="Left: third or later partner"/> + <int value="6" label="Left: coldplugged on boot"/> + <int value="7" label="Right: first partner"/> + <int value="8" label="Right: second partner (same side with first)"/> + <int value="9" label="Right: second partner (opposite side to first)"/> + <int value="10" label="Right: third or later partner"/> + <int value="11" label="Right: coldplugged on boot"/> +</enum> + +<enum name="PartnerTypeMetric"> + <int value="0" label="Other"/> + <int value="1" label="Thunderbolt + DisplayPort Alt Mode Hub"/> + <int value="2" label="Thunderbolt + DisplayPort Alt Mode Peripheral"/> + <int value="3" label="Thunderbolt Hub"/> + <int value="4" label="Thunderbolt Peripheral"/> + <int value="5" label="USB4 Hub"/> + <int value="6" label="USB4 Peripheral"/> + <int value="7" label="DisplayPort Alt Mode Hub"/> + <int value="8" label="DisplayPort Alt Mode Peripheral"/> + <int value="9" label="USB Hub"/> + <int value="10" label="USB Peripheral"/> + <int value="11" label="PD Power Source"/> + <int value="12" label="PD Sourcing Device"/> + <int value="13" label="Non-PD Power Source"/> + <int value="14" label="PD Sink"/> + <int value="15" label="PD Sinking Host"/> + <int value="16" label="Non-PD Sink"/> + <int value="17" label="Power Brick"/> +</enum> + +<enum name="PopularCamPeriphModuleID"> + <int value="0" label="Others"/> + <int value="73271312" label="LifeCamHD3000_Microsoft"/> + <int value="74254373" label="C270_Logitech"/> + <int value="74254380" label="HDC615_Logitech"/> + <int value="74254381" label="HDProC920_Logitech"/> + <int value="74254403" label="C930e_Logitech"/> + <int value="74254427" label="C925e_Logitech"/> + <int value="74254428" label="C922ProStream_Logitech"/> + <int value="74254430" label="BRIOUltraHD_Logitech"/> + <int value="74254482" label="C920HDPro_Logitech"/> + <int value="74254565" label="C920PROHD_Logitech"/> + <int value="94606129" label="Cam_ARC"/> + <int value="130691386" label="LiveStreamer313_Sunplus"/> + <int value="205874022" label="VitadeAF_Microdia"/> + <int value="205874027" label="Cam_Sonix"/> + <int value="393793569" label="VZR_IPEVO"/> + <int value="457121794" label="808Camera9_Generalplus"/> + <int value="493617411" label="NexiGoN60FHD_2MUVC"/> +</enum> + +<enum name="PortraitModeError"> + <int value="0" label="No error"/> + <int value="1" label="Initialization error"/> + <int value="2" label="Configuration error"/> + <int value="3" label="Processing capture request error"/> + <int value="4" label="Processing capture result error"/> +</enum> + +<enum name="PowerSourceLocationMetric"> + <int value="0" label="Other"/> + <int value="1" + label="User has no choice since all ports are only on one side"/> + <int value="2" label="Left: first connection during a session"/> + <int value="3" label="Left: same side with previous connection"/> + <int value="4" label="Left: opposite side from previous connection"/> + <int value="5" label="Right: first connectoin during a session"/> + <int value="6" label="Right: same side with previous connection"/> + <int value="7" label="Right: opposite side with previous connection"/> +</enum> + +<enum name="PrintManagementLaunchSourceType"> + <int value="0" label="Launch Printer settings from empty state button"/> + <int value="1" label="Launch Printer settings from header button"/> +</enum> + +<enum name="PrivacyHubLearnMoreSensor"> + <int value="0" label="Microphone"/> + <int value="1" label="Camera"/> + <int value="2" label="Geolocation"/> +</enum> + +<enum name="PrivacyHubNavigationOrigin"> + <int value="0" label="System settings"/> + <int value="1" label="Notification"/> +</enum> + +<enum name="RgbKeyboardBacklightChangeType"> + <int value="0" label="StaticBackgroundColorChanged"/> + <int value="1" label="RainbowModeSelected"/> + <int value="2" label="StaticZoneColorChanged"/> +</enum> + +<enum name="RgbKeyboardCapabilityType"> + <int value="0" label="None"/> + <int value="1" label="IndividualKey"/> + <int value="2" label="FourZoneFortyLed"/> + <int value="3" label="FourZoneTwelveLed"/> + <int value="4" label="FourZoneFourLed"/> +</enum> + +<enum name="SamlInSessionPasswordChangeEvent"> + <summary> + Track how often we try to guide users through the in-session flow to change + their SAML password, and how often they complete the flow. + </summary> + <int value="0" label="In-session PW-change manager enabled and created."/> + <int value="1" label="User notified that password will soon expire."/> + <int value="2" label="User notified urgently: password will soon expire."/> + <int value="3" label="User notified urgently: password already expired."/> + <int value="4" label="User acknowledges and begins change password flow."/> + <int value="5" label="SAML password is changed during in-session flow."/> + <int value="6" label="Password scraping succeeds during in-session change."/> + <int value="7" label="Password scraping partial success - 1 password only."/> + <int value="8" label="Password scraping fails - no passwords scraped."/> + <int value="9" label="Cryptohome password changed using scraped passwords."/> + <int value="10" label="Cryptohome password changed using retyped passwords."/> + <int value="11" label="Cryptohome change failed: wrong password scraped."/> + <int value="12" label="Cryptohome change failed: wrong password retyped."/> + <int value="13" label="In-session change password flow complete."/> +</enum> + +<enum name="SamlInSessionPasswordSyncEvent"> + <summary> + Track how often we call password sync token API and records its result. + </summary> + <int value="0" label="Start of sync token validation polling in-session."/> + <int value="1" + label="Start of sync token validation polling on the login screen."/> + <int value="2" label="Successful sync token validation."/> + <int value="3" label="Failed sync token validation."/> + <int value="4" label="API error: missing access token."/> + <int value="5" label="API error: wrong server response code."/> + <int value="6" label="API error: incorrect serlialized response data."/> + <int value="7" label="API error: no sync token in Create response."/> + <int value="8" label="API error: no sync token in Get response."/> +</enum> + +<enum name="SecagentdBootmodeCros"> + <int value="0" label="Bootmode successfully retrieved"/> + <int value="1" label="Bootmode manager did not respond"/> + <int value="2" label="Bootmode service unavailable"/> + <int value="3" label="Failed to retrieve bootmode"/> +</enum> + +<enum name="SecagentdBootmodeUefi"> + <int value="0" label="Bootmode successfully retrieved"/> + <int value="1" label="Boot params file not found"/> + <int value="2" label="Failed to read boot params file"/> + <int value="3" label="Boot params file invalid size"/> +</enum> + +<enum name="SecagentdBpfAttachResult"> + <int value="0" label="BPF loaded and attached successfully"/> + <int value="1" label="BPF failed to Open"/> + <int value="2" label="BPF failed to Load"/> + <int value="3" label="BPF failed to Attach"/> + <int value="4" label="BPF failed Ring Buffer creation"/> +</enum> + +<enum name="SecagentdCache"> + <int value="0" label="Cache hit"/> + <int value="1" label="Cache miss"/> + <int value="2" label="Cache miss but filled from procfs"/> +</enum> + +<enum name="SecagentdPolicy"> + <int value="0" + label="Device XDR reporting policy was checked at startup (baseline)"/> + <int value="1" label="XDR reporting was enabled by Device policy"/> +</enum> + +<enum name="SecagentdProcessEvent"> + <int value="0" label="Process hierarchy filled"/> + <int value="1" label="Spawn process not found"/> + <int value="2" label="Process not found"/> + <int value="3" label="Parent process not found"/> + <int value="4" label="Parent process still alive"/> +</enum> + +<enum name="SecagentdSendMessageResult"> + <int value="0" label="Message successfully sent"/> + <int value="1" label="CANCELLED"/> + <int value="2" label="UNKNOWN"/> + <int value="3" label="INVALID_ARGUMENT"/> + <int value="4" label="DEADLINE_EXCEEDED"/> + <int value="5" label="NOT_FOUND"/> + <int value="6" label="ALREADY_EXISTS"/> + <int value="7" label="PERMISSION_DENIED"/> + <int value="8" label="RESOURCE_EXHAUSTED"/> + <int value="9" label="FAILED_PRECONDITION"/> + <int value="10" label="ABORTED"/> + <int value="11" label="OUT_OF_RANGE"/> + <int value="12" label="UNIMPLEMENTED"/> + <int value="13" label="INTERNAL"/> + <int value="14" label="UNAVAILABLE"/> + <int value="15" label="DATA_LOSS"/> + <int value="16" label="UNAUTHENTICATED"/> +</enum> + +<enum name="SecagentdTpm"> + <int value="0" label="TPM info successfully retrieved"/> + <int value="1" label="TPM manager did not respond"/> + <int value="2" label="TPM service unavailable"/> + <int value="3" label="Failed to retrieve TPM"/> +</enum> + +<enum name="SecurityAnomaly"> + <int value="0" + label="Writable+executable mount found in the init mount namespace + (deprecated)"/> + <int value="1" + label="Writable+executable mount found in the init mount namespace, on + or under /usr/local (this suggests a dev image)"/> + <int value="2" + label="Writable+executable mount found in the init mount namespace, not + on, nor under, /usr/local"/> + <int value="3" + label="Successful create_memfd syscall detected in the audit log file. + (Baseline for memfd execution attempt)."/> + <int value="4" + label="Memfd execution attempt detected in the audit log file."/> +</enum> + +<enum name="SimulateRightClickModifier"> + <int value="0" label="None"/> + <int value="1" label="Alt"/> + <int value="2" label="Search"/> +</enum> + +<enum name="SixPackKeyModifier"> + <int value="0" label="None"/> + <int value="1" label="Alt"/> + <int value="2" label="Search"/> +</enum> + +<enum name="WebApkInstallResultChromeOS"> + <int value="0" label="Success">Installed successfully.</int> + <int value="1" label="App invalid"> + Installation failed because the app was in an invalid state (e.g., it had no + suitable icon). + </int> + <int value="2" label="ARC unavailable"> + Installation failed because the ARC system was not available. + </int> + <int value="3" label="Update cancelled"> + Update was cancelled because the existing WebAPK was found to be up-to-date. + </int> + <int value="4" label="Update failed during GetWebApkInfo"> + Updating failed because there was an error while fetching information about + the existing WebAPK from ARC. + </int> + <int value="5" label="Network error"> + The network request to the WebAPK server failed with an error. + </int> + <int value="6" label="Network timeout"> + The network request to the WebAPK server timed out. + </int> + <int value="7" label="Google Play error"> + Installing the WebAPK through Google Play failed with an error. + </int> +</enum> + +<enum name="WrongConfigurationMetric"> + <int value="0" label="Thunderbolt peripheral - wrong cable"/> + <int value="1" label="USB4 peripheral - wrong cable"/> + <int value="2" label="DisplayPort peripheral - wrong cable"/> + <int value="3" label="Cable Limiting Speed"/> + <int value="4" label="None"/> +</enum> + +</enums> + +</histogram-configuration>
diff --git a/tools/metrics/histograms/metadata/gpu/histograms.xml b/tools/metrics/histograms/metadata/gpu/histograms.xml index 00b2d61..1f1ca319 100644 --- a/tools/metrics/histograms/metadata/gpu/histograms.xml +++ b/tools/metrics/histograms/metadata/gpu/histograms.xml
@@ -889,6 +889,17 @@ </summary> </histogram> +<histogram name="Gpu.Graphite.GraphiteImageProviderAccessHitInCache" + units="Boolean" expires_after="2024-06-01"> + <owner>blundell@chromium.org</owner> + <owner>sunnyps@chromium.org</owner> + <owner>graphics-dev@chromium.org</owner> + <summary> + For each request of an image from GraphiteImageProvider, records whether the + image was found in the cache or needed to be created. + </summary> +</histogram> + <histogram name="GPU.HardwareAccelerationModeEnabled" enum="BooleanEnabled" expires_after="2024-04-28"> <owner>zmo@chromium.org</owner>
diff --git a/tools/metrics/histograms/metadata/others/histograms.xml b/tools/metrics/histograms/metadata/others/histograms.xml index e736f11..ffcea29f 100644 --- a/tools/metrics/histograms/metadata/others/histograms.xml +++ b/tools/metrics/histograms/metadata/others/histograms.xml
@@ -8907,7 +8907,7 @@ </histogram> <histogram name="ShortcutsProvider.DatabaseSize" units="units" - expires_after="2018-08-30"> + expires_after="2024-03-17"> <owner>mpearson@chromium.org</owner> <summary> The number of entries in shortcuts backend's database when initialized,
diff --git a/tools/metrics/histograms/metadata/privacy/histograms.xml b/tools/metrics/histograms/metadata/privacy/histograms.xml index 76358be..25be2f8 100644 --- a/tools/metrics/histograms/metadata/privacy/histograms.xml +++ b/tools/metrics/histograms/metadata/privacy/histograms.xml
@@ -1159,7 +1159,11 @@ summary="IsAttributionReportingAllowed"/> <variant name="IsAttributionReportingEverAllowed" summary="IsAttributionReportingEverAllowed"/> - <variant name="IsFledgeAllowed" summary="IsFledgeAllowed"/> + <variant name="IsFledgeBuyAllowed" summary="IsFledgeBuyAllowed"/> + <variant name="IsFledgeJoinAllowed" summary="IsFledgeJoinAllowed"/> + <variant name="IsFledgeLeaveAllowed" summary="IsFledgeLeaveAllowed"/> + <variant name="IsFledgeSellAllowed" summary="IsFledgeSellAllowed"/> + <variant name="IsFledgeUpdateAllowed" summary="IsFledgeUpdateAllowed"/> <variant name="IsPrivacySandboxReportingDestinationAttested" summary="IsPrivacySandboxReportingDestinationAttested"/> <variant name="IsPrivateAggregationAllowed"
diff --git a/tools/metrics/histograms/metadata/web_rtc/enums.xml b/tools/metrics/histograms/metadata/web_rtc/enums.xml index 8bb86fa..45ff323 100644 --- a/tools/metrics/histograms/metadata/web_rtc/enums.xml +++ b/tools/metrics/histograms/metadata/web_rtc/enums.xml
@@ -542,6 +542,7 @@ <int value="9" label="GetContentSizeFailed"/> <int value="10" label="ResizeMappedTextureFailed"/> <int value="11" label="RecreateFramePoolFailed"/> + <int value="12" label="FramePoolEmpty"/> </enum> <enum name="WebRtcWgcCaptureSessionStartResult">
diff --git a/tools/metrics/structured/structured.xml b/tools/metrics/structured/structured.xml index 4539518..27fa1904 100644 --- a/tools/metrics/structured/structured.xml +++ b/tools/metrics/structured/structured.xml
@@ -663,6 +663,116 @@ </event> </project> +<project name="DevTools"> + <owner>dsv@chromium.org</owner> + <id>per-project</id> + <scope>device</scope> + <key-rotation>120</key-rotation> + <summary> + Interaction metrics for the Chrome DevTools — debugging tools and + capabilities offered by Chrome. + </summary> + + <event name="Impression"> + <summary> + Recorded whenever a new visual element is first shown to the user + </summary> + <metric name="VeId" type="int"> + <summary> + Visual Element ID + </summary> + </metric> + <metric name="VeType" type="int"> + <summary> + Visual Element type. + </summary> + </metric> + <metric name="VeParent" type="int"> + <summary> + ID of a parent of the visual element. + </summary> + </metric> + <metric name="VeContext" type="int"> + <summary> + Arbitrary contextual information for the visual element. + </summary> + </metric> + <metric name="TimeSinceLastAction" type="int"> + <summary> + Time in milliseconds since last DevTools event. + </summary> + </metric> + </event> + + <event name="Click"> + <summary> + Recorded whenever user clicks on a tracked visual element. + </summary> + <metric name="VeId" type="int"> + <summary> + Visual Element ID + </summary> + </metric> + <metric name="MouseButton" type="int"> + <summary> + An index of a mouse button as defined in JavaScript MouseEvent. + </summary> + </metric> + <metric name="Context" type="int"> + <summary> + Arbitrary contextual information for the event. + </summary> + </metric> + <metric name="TimeSinceLastAction" type="int"> + <summary> + Time in milliseconds since last DevTools event. + </summary> + </metric> + </event> + + <event name="Change"> + <summary> + Recorded whenever user changes a value of a tracked visual element. + </summary> + <metric name="VeId" type="int"> + <summary> + Visual Element ID + </summary> + </metric> + <metric name="Context" type="int"> + <summary> + Arbitrary contextual information for the event. + </summary> + </metric> + <metric name="TimeSinceLastAction" type="int"> + <summary> + Time in milliseconds since last DevTools event. + </summary> + </metric> + </event> + + <event name="KeyDown"> + <summary> + Recorded presses key on a tracked visual element. + </summary> + <metric name="VeId" type="int"> + <summary> + Visual Element ID + </summary> + </metric> + <metric name="Context" type="int"> + <summary> + Arbitrary contextual information for the event. + </summary> + </metric> + <metric name="TimeSinceLastAction" type="int"> + <summary> + Time in milliseconds since last DevTools event. + </summary> + </metric> + </event> +</project> + <project name="TestProjectOne"> <owner>tby@chromium.org</owner> <id>per-project</id>
diff --git a/tools/perf/core/perfetto_binary_roller/binary_deps.json b/tools/perf/core/perfetto_binary_roller/binary_deps.json index 939908337..081a1a0 100644 --- a/tools/perf/core/perfetto_binary_roller/binary_deps.json +++ b/tools/perf/core/perfetto_binary_roller/binary_deps.json
@@ -5,24 +5,24 @@ "full_remote_path": "perfetto-luci-artifacts/v38.0/linux-arm64/trace_processor_shell" }, "win": { - "hash": "6e198c7bb2c26624772896018bf0c8f6871fa45a", - "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/win/ae4381f9d1e715bf75dc6ad85797075eafd488c7/trace_processor_shell.exe" + "hash": "8978c203752d8d636c410e7647ae6211b4367e9b", + "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/win/b3c02f9c677ffb13be0a52066c0819aedd733de8/trace_processor_shell.exe" }, "linux_arm": { "hash": "bb52a6e014d9272dc4784b1678eee77075df1a86", "full_remote_path": "perfetto-luci-artifacts/v38.0/linux-arm/trace_processor_shell" }, "mac": { - "hash": "5dc95c887f07ae07946e522bc3ca64127f43c4a8", - "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/mac/ae4381f9d1e715bf75dc6ad85797075eafd488c7/trace_processor_shell" + "hash": "7c40ffd7cb36d23bc5888373a64ee3c829d71a30", + "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/mac/b3c02f9c677ffb13be0a52066c0819aedd733de8/trace_processor_shell" }, "mac_arm64": { "hash": "cc287491e9ff9fe2c4866e5574eaea04134895a0", "full_remote_path": "perfetto-luci-artifacts/v38.0/mac-arm64/trace_processor_shell" }, "linux": { - "hash": "573396aebc5006e8a3ea025f4b66f9dc2c6d722c", - "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/linux/49be1499c807031f067e43b5000cc167bb9de5c7/trace_processor_shell" + "hash": "4003bb3222bbf10a872e241aedae8ce05992db91", + "full_remote_path": "chromium-telemetry/perfetto_binaries/trace_processor_shell/linux/8ba96658b6e52e7d1f644973e6e89aeb8e5d1bda/trace_processor_shell" } }, "power_profile.sql": {
diff --git a/ui/android/BUILD.gn b/ui/android/BUILD.gn index 7301ee3..12b289e 100644 --- a/ui/android/BUILD.gn +++ b/ui/android/BUILD.gn
@@ -214,6 +214,7 @@ "java/res/layout/custom_toast_layout.xml", "java/res/layout/dropdown_item.xml", "java/res/layout/horizontal_divider.xml", + "java/res/layout/list_menu_item.xml", "java/res/layout/list_section_divider.xml", "java/res/values-ldrtl/dimens.xml", "java/res/values-ldrtl/values.xml", @@ -335,6 +336,13 @@ "java/src/org/chromium/ui/gl/SurfaceTextureListener.java", "java/src/org/chromium/ui/gl/SurfaceTexturePlatformWrapper.java", "java/src/org/chromium/ui/interpolators/Interpolators.java", + "java/src/org/chromium/ui/listmenu/BasicListMenu.java", + "java/src/org/chromium/ui/listmenu/ListMenu.java", + "java/src/org/chromium/ui/listmenu/ListMenuButton.java", + "java/src/org/chromium/ui/listmenu/ListMenuButtonDelegate.java", + "java/src/org/chromium/ui/listmenu/ListMenuItemAdapter.java", + "java/src/org/chromium/ui/listmenu/ListMenuItemProperties.java", + "java/src/org/chromium/ui/listmenu/ListMenuItemViewBinder.java", "java/src/org/chromium/ui/modaldialog/DialogDismissalCause.java", "java/src/org/chromium/ui/modaldialog/ModalDialogManager.java", "java/src/org/chromium/ui/modaldialog/ModalDialogManagerHolder.java", @@ -664,6 +672,7 @@ resources_package = "org.chromium.ui" sources = [ + "java/src/org/chromium/ui/listmenu/ListMenuButtonTest.java", "java/src/org/chromium/ui/resources/dynamics/HardwareDrawTest.java", "java/src/org/chromium/ui/widget/TextViewWithTightWrapTest.java", "javatests/src/org/chromium/ui/base/ClipboardAndroidTest.java", @@ -678,6 +687,7 @@ "//components/browser_ui/widget/android:java_resources", "//content/public/test/android:content_java_test_support", "//third_party/androidx:androidx_annotation_annotation_java", + "//third_party/androidx:androidx_test_core_java", "//third_party/androidx:androidx_test_runner_java", "//third_party/hamcrest:hamcrest_java", "//third_party/hamcrest:hamcrest_library_java",
diff --git a/components/browser_ui/widget/android/java/res/layout/list_menu_item.xml b/ui/android/java/res/layout/list_menu_item.xml similarity index 100% rename from components/browser_ui/widget/android/java/res/layout/list_menu_item.xml rename to ui/android/java/res/layout/list_menu_item.xml
diff --git a/ui/android/java/res/values/attrs.xml b/ui/android/java/res/values/attrs.xml index e3651b2e..14ac506 100644 --- a/ui/android/java/res/values/attrs.xml +++ b/ui/android/java/res/values/attrs.xml
@@ -54,4 +54,14 @@ valid reference to a layout. --> <attr name="layout" format="reference" /> </declare-styleable> + + <declare-styleable name="ListMenuButton"> + <attr name="menuMaxWidth" format="reference|dimension" /> + <attr name="menuVerticalOverlapAnchor" format="boolean" /> + <attr name="menuHorizontalOverlapAnchor" format="boolean" /> + <!-- Used to specify if a menu button is positioned at the start or at + the end of a layout so the correct menu popup anim file can be applied. + The default is set to true --> + <attr name="menuPositionedAtEnd" format="boolean" /> + </declare-styleable> </resources>
diff --git a/ui/android/java/res/values/dimens.xml b/ui/android/java/res/values/dimens.xml index 1270559..ff11c138 100644 --- a/ui/android/java/res/values/dimens.xml +++ b/ui/android/java/res/values/dimens.xml
@@ -96,4 +96,10 @@ <!-- Arbitrary shadow length for elevation levels --> <dimen name="default_shadow_length_elev_2">6dp</dimen> + + <!-- List menu & item dimensions --> + <dimen name="list_menu_width">180dp</dimen> + <dimen name="list_menu_item_icon_size">24dp</dimen> + <dimen name="list_menu_item_start_icon_end_margin">16dp</dimen> + <dimen name="default_list_row_padding">16dp</dimen> </resources>
diff --git a/ui/android/java/res/values/styles.xml b/ui/android/java/res/values/styles.xml index 7c563b6..024fb4d 100644 --- a/ui/android/java/res/values/styles.xml +++ b/ui/android/java/res/values/styles.xml
@@ -376,4 +376,23 @@ <item name="android:windowEnterAnimation">@anim/menu_enter_from_bottom_left</item> <item name="android:windowExitAnimation">@anim/menu_exit_from_bottom_left</item> </style> + + <!-- ListMenuButton --> + <style name="ListMenuItemStyle"> + <item name="android:paddingStart">@dimen/default_list_row_padding</item> + <item name="android:paddingEnd">@dimen/default_list_row_padding</item> + </style> + <style name="ListMenuItemIconStyle"> + <item name="android:layout_width">@dimen/list_menu_item_icon_size</item> + <item name="android:layout_height">@dimen/list_menu_item_icon_size</item> + </style> + <style name="ListMenuItemIconStyle.Start"> + <item name="android:layout_marginStart">0dp</item> + <item name="android:layout_marginEnd">@dimen/list_menu_item_start_icon_end_margin</item> + </style> + + <style name="EndIconMenuAnim" parent="AnchoredPopupAnimEndTop" /> + <style name="EndIconMenuAnimBottom" parent="AnchoredPopupAnimEndBottom" /> + <style name="StartIconMenuAnim" parent="AnchoredPopupAnimStartTop" /> + <style name="StartIconMenuAnimBottom" parent="AnchoredPopupAnimStartBottom" /> </resources>
diff --git a/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/listmenu/BasicListMenu.java b/ui/android/java/src/org/chromium/ui/listmenu/BasicListMenu.java similarity index 93% rename from components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/listmenu/BasicListMenu.java rename to ui/android/java/src/org/chromium/ui/listmenu/BasicListMenu.java index d37b6fd..f8b93f7 100644 --- a/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/listmenu/BasicListMenu.java +++ b/ui/android/java/src/org/chromium/ui/listmenu/BasicListMenu.java
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -package org.chromium.components.browser_ui.widget.listmenu; +package org.chromium.ui.listmenu; import android.content.Context; import android.content.res.ColorStateList; @@ -17,7 +17,7 @@ import androidx.core.content.ContextCompat; import androidx.core.view.ViewCompat; -import org.chromium.components.browser_ui.widget.R; +import org.chromium.ui.R; import org.chromium.ui.UiUtils; import org.chromium.ui.modelutil.LayoutViewBuilder; import org.chromium.ui.modelutil.MVCListAdapter.ListItem; @@ -44,6 +44,7 @@ /** * Helper function to build a ListItem of a divider. + * * @return ListItem Representing a divider. */ public static ListItem buildMenuDivider() { @@ -118,9 +119,10 @@ } private void registerListItemTypes() { - mAdapter.registerType(ListMenuItemType.MENU_ITEM, - new LayoutViewBuilder(R.layout.list_menu_item), - ListMenuItemViewBinder::binder); + mAdapter.registerType( + ListMenuItemType.MENU_ITEM, + new LayoutViewBuilder(R.layout.list_menu_item), + ListMenuItemViewBinder::binder); mAdapter.registerType( ListMenuItemType.DIVIDER, new LayoutViewBuilder(R.layout.list_section_divider),
diff --git a/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/listmenu/ListMenu.java b/ui/android/java/src/org/chromium/ui/listmenu/ListMenu.java similarity index 94% rename from components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/listmenu/ListMenu.java rename to ui/android/java/src/org/chromium/ui/listmenu/ListMenu.java index 53882f3..f57c9a191 100644 --- a/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/listmenu/ListMenu.java +++ b/ui/android/java/src/org/chromium/ui/listmenu/ListMenu.java
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -package org.chromium.components.browser_ui.widget.listmenu; +package org.chromium.ui.listmenu; import android.view.View;
diff --git a/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/listmenu/ListMenuButton.java b/ui/android/java/src/org/chromium/ui/listmenu/ListMenuButton.java similarity index 97% rename from components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/listmenu/ListMenuButton.java rename to ui/android/java/src/org/chromium/ui/listmenu/ListMenuButton.java index 4994789..8a854a43 100644 --- a/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/listmenu/ListMenuButton.java +++ b/ui/android/java/src/org/chromium/ui/listmenu/ListMenuButton.java
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -package org.chromium.components.browser_ui.widget.listmenu; +package org.chromium.ui.listmenu; import android.content.Context; import android.content.res.TypedArray; @@ -16,7 +16,7 @@ import android.view.ViewParent; import org.chromium.base.ObserverList; -import org.chromium.components.browser_ui.widget.R; +import org.chromium.ui.R; import org.chromium.ui.widget.AnchoredPopupWindow; import org.chromium.ui.widget.ChromeImageButton; @@ -261,7 +261,7 @@ } } - void setAttachedToWindowForTesting() { + public void setAttachedToWindowForTesting() { mIsAttachedToWindow = true; } }
diff --git a/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/listmenu/ListMenuButtonDelegate.java b/ui/android/java/src/org/chromium/ui/listmenu/ListMenuButtonDelegate.java similarity index 92% rename from components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/listmenu/ListMenuButtonDelegate.java rename to ui/android/java/src/org/chromium/ui/listmenu/ListMenuButtonDelegate.java index fc662fae..5f33a92f 100644 --- a/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/listmenu/ListMenuButtonDelegate.java +++ b/ui/android/java/src/org/chromium/ui/listmenu/ListMenuButtonDelegate.java
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -package org.chromium.components.browser_ui.widget.listmenu; +package org.chromium.ui.listmenu; import android.view.View;
diff --git a/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/listmenu/ListMenuButtonTest.java b/ui/android/java/src/org/chromium/ui/listmenu/ListMenuButtonTest.java similarity index 91% rename from components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/listmenu/ListMenuButtonTest.java rename to ui/android/java/src/org/chromium/ui/listmenu/ListMenuButtonTest.java index de2a9eb..094475f 100644 --- a/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/listmenu/ListMenuButtonTest.java +++ b/ui/android/java/src/org/chromium/ui/listmenu/ListMenuButtonTest.java
@@ -2,12 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -package org.chromium.components.browser_ui.widget.listmenu; +package org.chromium.ui.listmenu; import android.content.Context; import android.view.View; -import androidx.test.InstrumentationRegistry; +import androidx.test.core.app.ApplicationProvider; import androidx.test.filters.SmallTest; import org.junit.Assert; @@ -16,10 +16,10 @@ import org.junit.Test; import org.junit.runner.RunWith; +import org.chromium.ui.R; import org.chromium.base.test.BaseActivityTestRule; import org.chromium.base.test.BaseJUnit4ClassRunner; import org.chromium.base.test.util.Batch; -import org.chromium.components.browser_ui.widget.test.R; import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.ui.test.util.BlankUiTestActivity; @@ -35,7 +35,7 @@ @Before public void setUp() { - mContext = InstrumentationRegistry.getTargetContext(); + mContext = ApplicationProvider.getApplicationContext(); } @Test
diff --git a/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/listmenu/ListMenuItemAdapter.java b/ui/android/java/src/org/chromium/ui/listmenu/ListMenuItemAdapter.java similarity index 91% rename from components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/listmenu/ListMenuItemAdapter.java rename to ui/android/java/src/org/chromium/ui/listmenu/ListMenuItemAdapter.java index 04d24af..07f0ffd 100644 --- a/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/listmenu/ListMenuItemAdapter.java +++ b/ui/android/java/src/org/chromium/ui/listmenu/ListMenuItemAdapter.java
@@ -2,13 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -package org.chromium.components.browser_ui.widget.listmenu; +package org.chromium.ui.listmenu; import android.view.View; import android.view.ViewGroup; import android.widget.ListView; -import org.chromium.components.browser_ui.widget.listmenu.BasicListMenu.ListMenuItemType; +import org.chromium.ui.listmenu.BasicListMenu.ListMenuItemType; import org.chromium.ui.modelutil.ModelListAdapter; /**
diff --git a/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/listmenu/ListMenuItemProperties.java b/ui/android/java/src/org/chromium/ui/listmenu/ListMenuItemProperties.java similarity index 97% rename from components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/listmenu/ListMenuItemProperties.java rename to ui/android/java/src/org/chromium/ui/listmenu/ListMenuItemProperties.java index 758b5661..80c2830 100644 --- a/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/listmenu/ListMenuItemProperties.java +++ b/ui/android/java/src/org/chromium/ui/listmenu/ListMenuItemProperties.java
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -package org.chromium.components.browser_ui.widget.listmenu; +package org.chromium.ui.listmenu; import android.content.Intent; import android.graphics.drawable.Drawable;
diff --git a/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/listmenu/ListMenuItemViewBinder.java b/ui/android/java/src/org/chromium/ui/listmenu/ListMenuItemViewBinder.java similarity index 98% rename from components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/listmenu/ListMenuItemViewBinder.java rename to ui/android/java/src/org/chromium/ui/listmenu/ListMenuItemViewBinder.java index 6da2f21..f5c72f2 100644 --- a/components/browser_ui/widget/android/java/src/org/chromium/components/browser_ui/widget/listmenu/ListMenuItemViewBinder.java +++ b/ui/android/java/src/org/chromium/ui/listmenu/ListMenuItemViewBinder.java
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -package org.chromium.components.browser_ui.widget.listmenu; +package org.chromium.ui.listmenu; import android.graphics.drawable.Drawable; import android.text.TextUtils; @@ -17,7 +17,7 @@ import androidx.core.widget.ImageViewCompat; import org.chromium.base.ApiCompatibilityUtils; -import org.chromium.components.browser_ui.widget.R; +import org.chromium.ui.R; import org.chromium.ui.modelutil.PropertyKey; import org.chromium.ui.modelutil.PropertyModel; import org.chromium.ui.modelutil.PropertyModel.ReadableIntPropertyKey;
diff --git a/ui/android/java/src/org/chromium/ui/listmenu/OWNERS b/ui/android/java/src/org/chromium/ui/listmenu/OWNERS new file mode 100644 index 0000000..b887596 --- /dev/null +++ b/ui/android/java/src/org/chromium/ui/listmenu/OWNERS
@@ -0,0 +1,2 @@ +lazzzis@google.com +twellington@chromium.org
diff --git a/ui/android/java/strings/android_ui_strings.grd b/ui/android/java/strings/android_ui_strings.grd index 57c783e..b48e67be 100644 --- a/ui/android/java/strings/android_ui_strings.grd +++ b/ui/android/java/strings/android_ui_strings.grd
@@ -206,6 +206,14 @@ <message name="IDS_COPIED" desc="Notification telling the user that something has been copied to the clipboard."> Copied </message> + + <!-- Button Menu --> + <message name="IDS_ACCESSIBILITY_TOOLBAR_BTN_MENU" desc="Content description for the settings menu button."> + Customize and control Google Chrome + </message> + <message name="IDS_ACCESSIBILITY_LIST_MENU_BUTTON" desc="Content description for the button that shows option menu for a list item."> + <ph name="NAME_OF_LIST_ITEM">%1$s<ex>Movie Title</ex></ph> Options + </message> </messages> </release> </grit>
diff --git a/ui/android/java/strings/android_ui_strings_grd/IDS_ACCESSIBILITY_LIST_MENU_BUTTON.png.sha1 b/ui/android/java/strings/android_ui_strings_grd/IDS_ACCESSIBILITY_LIST_MENU_BUTTON.png.sha1 new file mode 100644 index 0000000..9d00dc4 --- /dev/null +++ b/ui/android/java/strings/android_ui_strings_grd/IDS_ACCESSIBILITY_LIST_MENU_BUTTON.png.sha1
@@ -0,0 +1 @@ +a9a9f7d6da1b234d4ad82b1ffda229a2002ca6dc \ No newline at end of file
diff --git a/components/browser_ui/strings/android/browser_ui_strings_grd/IDS_ACCESSIBILITY_TOOLBAR_BTN_MENU.png.sha1 b/ui/android/java/strings/android_ui_strings_grd/IDS_ACCESSIBILITY_TOOLBAR_BTN_MENU.png.sha1 similarity index 100% rename from components/browser_ui/strings/android/browser_ui_strings_grd/IDS_ACCESSIBILITY_TOOLBAR_BTN_MENU.png.sha1 rename to ui/android/java/strings/android_ui_strings_grd/IDS_ACCESSIBILITY_TOOLBAR_BTN_MENU.png.sha1
diff --git a/ui/android/junit/res/values/strings.xml b/ui/android/junit/res/values/strings.xml index e478fe1..f0a93b2 100644 --- a/ui/android/junit/res/values/strings.xml +++ b/ui/android/junit/res/values/strings.xml
@@ -1,4 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> <resources> <string name="toast_text">Hello Chrome</string> + <string name="test_title">Test Title</string> </resources>
diff --git a/ui/views/controls/menu/menu_controller_unittest.cc b/ui/views/controls/menu/menu_controller_unittest.cc index b2e0f4c..336fc1c5 100644 --- a/ui/views/controls/menu/menu_controller_unittest.cc +++ b/ui/views/controls/menu/menu_controller_unittest.cc
@@ -3189,4 +3189,13 @@ GetChildMenuOpenDirectionAtDepth(10)); } +TEST_F(MenuControllerTest, MenuHostHasCorrectZOrderLevel) { + ShowSubmenu(); + SubmenuView* const submenu = menu_item()->GetSubmenu(); + MenuHost* const host = menu_host_for_submenu(submenu); + + // Ensure that the menu host has the correct z order level. + EXPECT_EQ(ui::ZOrderLevel::kFloatingWindow, host->GetZOrderLevel()); +} + } // namespace views
diff --git a/ui/views/widget/native_widget_mac.mm b/ui/views/widget/native_widget_mac.mm index 8415cbe..68fa2b09 100644 --- a/ui/views/widget/native_widget_mac.mm +++ b/ui/views/widget/native_widget_mac.mm
@@ -235,7 +235,7 @@ if (auto* parent_widget = Widget::GetWidgetForNativeView(params.parent)) { // If our parent is z-ordered above us, then float a bit higher. params.z_order = - std::max(params.z_order.value_or(ui::ZOrderLevel::kNormal), + std::max(params.z_order.value_or(params.EffectiveZOrderLevel()), parent_widget->GetZOrderLevel()); } }
diff --git a/ui/views/widget/native_widget_mac_unittest.mm b/ui/views/widget/native_widget_mac_unittest.mm index 2a9c6e32..965a64b 100644 --- a/ui/views/widget/native_widget_mac_unittest.mm +++ b/ui/views/widget/native_widget_mac_unittest.mm
@@ -2455,6 +2455,35 @@ EXPECT_EQ(GetFocusManager(child_native_widget), child->GetFocusManager()); } +TEST_F(NativeWidgetMacTest, + CorrectZOrderForMenuTypeWhenParamsZOrderHasNoValue) { + NativeWidgetMacTestWindow* parent_window; + NativeWidgetMacTestWindow* child_window; + + Widget::InitParams init_params_parent = + CreateParams(Widget::InitParams::TYPE_WINDOW); + Widget* parent = + CreateWidgetWithTestWindow(std::move(init_params_parent), &parent_window); + + Widget::InitParams init_params_child = + CreateParams(Widget::InitParams::TYPE_MENU); + init_params_child.parent = parent->GetNativeView(); + Widget* child = + CreateWidgetWithTestWindow(std::move(init_params_child), &child_window); + + EXPECT_NE(nil, child_window.parentWindow); + EXPECT_EQ(parent_window, child_window.parentWindow); + + parent->Show(); + child->Show(); + + // Ensure that the child widget has kFloatingWindow z_order, when + // params.z_order is not specified for a widget of menu type. + EXPECT_EQ(ui::ZOrderLevel::kFloatingWindow, child->GetZOrderLevel()); + + parent->CloseNow(); +} + } // namespace views::test @implementation TestStopAnimationWaiter