Skip to content

Commit

Permalink
Upgrade from Chromium 131.0.6778.39 to Chromium 131.0.6778.69 (1.73.x…
Browse files Browse the repository at this point in the history
…). (#26515)

* Upgrade from Chromium 131.0.6778.39 to Chromium 131.0.6778.69

* Update pins list timestamp

* Recent tabs menu model has been updated.

The upstream code has been updated to only show history clusters menu
item when history clusters are enabled. We disable history clusters and
don't need to remove that menu item manually any more.

Chromium change:

https://source.chromium.org/chromium/chromium/src/+/088cf43bda717ed6db36ae23388f58b2cac5ac0c

commit 088cf43bda717ed6db36ae23388f58b2cac5ac0c
Author: Toni Barzic <[email protected]>
Date:   Fri Nov 8 16:53:49 2024 +0000

    [Merge to 131] Don't show history clusters menu item if history clusters is disabled.

    Prior to this CL, history clusters could be disabled but Chrome would
    continue to show the history clusters menu item.

    Bug: 374013418, 376751203

* Disables failing upstream unit tests.

---------

Co-authored-by: brave-builds <[email protected]>
  • Loading branch information
mkarolin and brave-builds authored Nov 13, 2024
1 parent 6d03dc8 commit 4c5decf
Show file tree
Hide file tree
Showing 14 changed files with 43 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,7 @@ constexpr char kBraveSyncedTabsUrl[] = "brave://history/syncedTabs";
BraveRecentTabsSubMenuModel::BraveRecentTabsSubMenuModel(
ui::AcceleratorProvider* accelerator_provider,
Browser* browser)
: RecentTabsSubMenuModel(accelerator_provider, browser) {
// We disable history clusters feature, so this command won't work.
std::optional<size_t> show_history_clusters_index =
GetIndexOfCommandId(IDC_SHOW_HISTORY_CLUSTERS_SIDE_PANEL);
CHECK(show_history_clusters_index);
RemoveItemAt(show_history_clusters_index.value());
}
: RecentTabsSubMenuModel(accelerator_provider, browser) {}

BraveRecentTabsSubMenuModel::~BraveRecentTabsSubMenuModel() {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

#include <string_view>

#include "base/containers/to_vector.h"
#include "base/strings/string_util.h"

// Disabling these tests because they refer to g_brave_browser_process which is
Expand Down Expand Up @@ -34,6 +35,12 @@
#define RecentlyClosedTabsAndWindowsFromLastSessionWithRefresh \
DISABLED_RecentlyClosedTabsAndWindowsFromLastSessionWithRefresh

// Disabling these tests because upstream code won't execute
// IDC_SHOW_HISTORY_CLUSTERS_SIDE_PANEL command when history clusters aren't
// enabled but the test doesn't check for it.
#define LogMenuMetricsForShowGroupedHistory \
DISABLED_LogMenuMetricsForShowGroupedHistory

#define BRAVE_RECENT_TABS_SUB_MENU_MODEL_TEST \
void VerifyModel(const RecentTabsSubMenuModel& model, \
base::span<const ModelData> data); \
Expand All @@ -47,6 +54,7 @@

#undef BRAVE_RECENT_TABS_SUB_MENU_MODEL_TEST

#undef LogMenuMetricsForShowGroupedHistory
#undef RecentlyClosedTabsAndWindowsFromLastSessionWithRefresh
#undef MaxTabsPerSessionAndRecency
#undef MaxSessionsAndRecency
Expand All @@ -58,18 +66,21 @@
// expectations
void RecentTabsSubMenuModelTest::VerifyModel(
const RecentTabsSubMenuModel& model,
base::span<const ModelData> data) {
std::vector<ModelData> v_data{data.begin(), data.end()};
base::span<const ModelData> input) {
// We have to copy it over as we can not modify the input.
auto data = base::ToVector(input);

// We replace the "Sign in to see tabs from other devices" menu command with
// the non-command string "No tabs from other devices" and need to adjust the
// data
auto& item_data = v_data.back();
auto& item_data = data.back();
if (item_data.type == ui::MenuModel::TYPE_COMMAND) {
item_data.enabled = false;
}

::VerifyModel(model, base::make_span(v_data.begin(), v_data.size()));
// The first two commands are History and History Clusters, but we disable
// History Clusters and upstream won't show it, so we should skip one command.
::VerifyModel(model, base::make_span(data).subspan(1));
}

void RecentTabsSubMenuModelTest::VerifyModel(const ui::MenuModel* model,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -561,9 +561,9 @@ bool ParseCertificatesFile(std::string_view certs_input,
Pinsets* pinsets,
base::Time* timestamp) {
constexpr std::string_view brave_certs = R"brave_certs(
# Last updated: Wed Nov 6 23:23:12 UTC 2024
# Last updated: Tue Nov 12 20:40:33 UTC 2024
PinsListTimestamp
1730935392
1731444033
# =====BEGIN BRAVE ROOTS ASC=====
#From https://www.amazontrust.com/repository/
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"projects": {
"chrome": {
"dir": "src",
"tag": "131.0.6778.39",
"tag": "131.0.6778.69",
"repository": {
"url": "https://github.com/brave/chromium"
}
Expand Down
6 changes: 3 additions & 3 deletions patches/chrome-browser-BUILD.gn.patch
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 634b9a15c670a891d0edb5cb983b27133258f71e..941345fc99e30e6ca86a5b00ec86f18ea5461641 100644
index 54279426733f7eeec00ee2ccf7c82771ae424c65..6cb0f560164665f7744986a2a425be4d30858632 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -2514,6 +2514,7 @@ static_library("browser") {
@@ -2517,6 +2517,7 @@ static_library("browser") {
"performance_monitor/metric_evaluator_helper_posix.h",
]
}
+ import("//brave/browser/sources.gni") sources += brave_chrome_browser_sources deps += brave_chrome_browser_deps public_deps += brave_chrome_browser_public_deps allow_circular_includes_from += brave_chrome_browser_allow_circular_includes_from

if (!is_chromeos_ash) {
sources += [
@@ -8601,6 +8602,7 @@ static_library("browser_public_dependencies") {
@@ -8604,6 +8605,7 @@ static_library("browser_public_dependencies") {
"//rlz:rlz_lib",
]
}
Expand Down
2 changes: 1 addition & 1 deletion patches/chrome-browser-about_flags.cc.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index c5b7d81d7731ef818878e568b9f8c8b277379082..2ff0fc7b34c69101855b8cf0b14aba0cb618c657 100644
index ad599311ac46db300ec62d8841b8c89e3d6fd1fa..eb3763b158c650165c5dfb4344666431c7f632a4 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -4234,6 +4234,7 @@ const FeatureEntry::FeatureVariation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/chrome/browser/ui/tabs/recent_tabs_sub_menu_model.cc b/chrome/browser/ui/tabs/recent_tabs_sub_menu_model.cc
index 159fdebfb81c3ff0f1b2714a700184ebd6f8db8c..738871b2d6457440fb7e95fa95ebcd55a737a118 100644
index dc1626195b0d06b6aed3d3c4ba0baa30842a9ccc..47f66ef97613abc74837ab6d2a32c75f6f59d682 100644
--- a/chrome/browser/ui/tabs/recent_tabs_sub_menu_model.cc
+++ b/chrome/browser/ui/tabs/recent_tabs_sub_menu_model.cc
@@ -457,6 +457,7 @@ void RecentTabsSubMenuModel::BuildTabsFromOtherDevices() {
@@ -463,6 +463,7 @@ void RecentTabsSubMenuModel::BuildTabsFromOtherDevices() {
DCHECK(!session->GetSessionName().empty());
std::unique_ptr<ui::SimpleMenuModel> device_menu_model =
CreateOtherDeviceSubMenu(session, tabs_in_session);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/chrome/browser/ui/tabs/recent_tabs_sub_menu_model_unittest.cc b/chrome/browser/ui/tabs/recent_tabs_sub_menu_model_unittest.cc
index d0ac4166816514cf713d129581135fb8871e63f8..939103710846a867166193b3017359cb66e00c3a 100644
index b082729482e20314e33ec3185af94ec03e5d914c..c33188f604aa57d4efe478cb3bacbd776fecf76f 100644
--- a/chrome/browser/ui/tabs/recent_tabs_sub_menu_model_unittest.cc
+++ b/chrome/browser/ui/tabs/recent_tabs_sub_menu_model_unittest.cc
@@ -165,6 +165,7 @@ class RecentTabsSubMenuModelTest : public BrowserWithTestWindowTest {
@@ -172,6 +172,7 @@ class RecentTabsSubMenuModelTest : public BrowserWithTestWindowTest {
helper->VerifyExport(session_sync_service_->GetOpenTabsUIDelegate());
}

Expand Down
2 changes: 1 addition & 1 deletion patches/chrome-test-BUILD.gn.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index fc8f3418dd4d025c868d695eb63f9adc8e041246..6335658afccb129a043f351f5d655d3236a15be9 100644
index f79688937c7c9a9ac81bbb4ab6259ee6b9a4e1ea..44bae7fa3af93db5698add7df2211c0d1535d369 100644
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -581,6 +581,7 @@ static_library("test_support") {
Expand Down
4 changes: 2 additions & 2 deletions patches/content-browser-BUILD.gn.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
index 2d5c5f20907719f50663911e21f8eedf016f251f..5776935435d0be1070fa351ea0b11122ad6967ce 100644
index 9fe4f5cf47fe860688b150290672ae5fc44170d9..484f7aa9af350aeb86c64686b50fe7c6bdc0862e 100644
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -3535,6 +3535,7 @@ source_set("browser") {
@@ -3533,6 +3533,7 @@ source_set("browser") {
"profiling_utils.cc",
]
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc
index 53bba48293111e74daba50dde617fb78f1bcc7ee..bbf7d08e363677ca0f0b5fd4d2f497afdc0b2adf 100644
index 6f46f45b415972d94320b7e364b5233a0bcc014f..dc56449c4edb48880f374fa9e84ec499c4be3b47 100644
--- a/content/browser/renderer_host/navigation_request.cc
+++ b/content/browser/renderer_host/navigation_request.cc
@@ -3467,6 +3467,7 @@ void NavigationRequest::OnRequestRedirected(
Expand Down
4 changes: 2 additions & 2 deletions patches/content-public-browser-BUILD.gn.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/content/public/browser/BUILD.gn b/content/public/browser/BUILD.gn
index a89d91b02ae014b5e60bbfa4204ae78d97665707..0ad3f72376be409c3b7999d7c04dc4f9ee3db02f 100644
index c463b31fcf18ebbade38061baaac1f69230287a7..ca31fec27714aeb80268a2e506435c49c2239a2c 100644
--- a/content/public/browser/BUILD.gn
+++ b/content/public/browser/BUILD.gn
@@ -740,6 +740,7 @@ source_set("browser_sources") {
@@ -742,6 +742,7 @@ source_set("browser_sources") {
if (is_chromeos_lacros) {
deps += [ "//chromeos/startup" ]
}
Expand Down
4 changes: 2 additions & 2 deletions patches/net-BUILD.gn.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/net/BUILD.gn b/net/BUILD.gn
index 9b3cfa47d48a2510b4694e2b96660f99f30af911..71e15fecc69fd9dd0c13eeeff38a7db18304e48a 100644
index a1d3a6dbf1eb623a22a6eb833bfcc770746e53c9..aad665d2e040630671d1837a017dc538629e3580 100644
--- a/net/BUILD.gn
+++ b/net/BUILD.gn
@@ -1164,6 +1164,7 @@ component("net") {
@@ -1166,6 +1166,7 @@ component("net") {
"reporting/reporting_uploader.h",
]
}
Expand Down
8 changes: 8 additions & 0 deletions test/filters/unit_tests.filter
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,14 @@
-SafetyHubHandlerTest.HandleGetSafetyHubEntryPointData_Subheader_OneModule
-SafetyHubHandlerTest.HandleGetSafetyHubEntryPointData_Subheader_TwoModulesWithPassword

# These tests fail because our feature override for kSidePanelJourneys doesn't
# seem to work correctly in these tests. Have not diagnosed the specific reason
# why. We also run these tests as part of brave_unit_tests where they seem to
# work correctly.
-RecentTabsSubMenuModelTest.NoTabs
-RecentTabsSubMenuModelTest.OtherDevices
-RecentTabsSubMenuModelTest.OtherDevicesDynamicUpdate

# Tests below this point have not been diagnosed or had issues created yet.
-AboutFlagsHistogramTest.*
-AboutFlagsTest.*
Expand Down

0 comments on commit 4c5decf

Please sign in to comment.