387 lines
17 KiB
Diff
387 lines
17 KiB
Diff
From: Your Name <you@example.com>
|
|
Date: Wed, 6 Sep 2023 17:55:01 +0000
|
|
Subject: Fix chromium build bugs
|
|
|
|
---
|
|
android_webview/system_webview_bundle.gni | 4 ++++
|
|
build/config/android/rules.gni | 1 +
|
|
.../chromium/chrome/browser/tab/TabImpl.java | 2 +-
|
|
chrome/browser/download/download_ui_model.cc | 2 ++
|
|
.../api/autofill_private/autofill_util.cc | 2 ++
|
|
chrome/browser/extensions/extension_util.cc | 2 ++
|
|
chrome/browser/safe_browsing/BUILD.gn | 1 +
|
|
.../safe_browsing/user_interaction_observer.cc | 17 -----------------
|
|
...ction_consented_debugging_infobar_delegate.h | 2 +-
|
|
chrome/browser/ui/views/tabs/tab.cc | 2 +-
|
|
.../browser/ui/views/tabs/tab_group_header.cc | 2 +-
|
|
.../app_management_page_handler.cc | 2 ++
|
|
chrome/browser/usb/chrome_usb_delegate.cc | 2 ++
|
|
.../autofill/core/browser/form_structure.cc | 2 ++
|
|
.../core/browser/ui/suggestion_selection.cc | 12 +-----------
|
|
.../core/browser/webdata/autofill_table.cc | 12 ++++++------
|
|
.../omnibox/browser/omnibox_field_trial.cc | 4 ++--
|
|
.../phishing_image_embedder.cc | 14 +++-----------
|
|
content/browser/browser_interface_binders.cc | 1 +
|
|
crypto/BUILD.gn | 1 +
|
|
net/BUILD.gn | 1 +
|
|
third_party/libevent/BUILD.gn | 2 ++
|
|
22 files changed, 39 insertions(+), 51 deletions(-)
|
|
|
|
diff --git a/android_webview/system_webview_bundle.gni b/android_webview/system_webview_bundle.gni
|
|
--- a/android_webview/system_webview_bundle.gni
|
|
+++ b/android_webview/system_webview_bundle.gni
|
|
@@ -84,6 +84,10 @@ template("system_webview_bundle") {
|
|
custom_assertion_handler = crash_reporting_assertion_handler
|
|
}
|
|
}
|
|
+ } else {
|
|
+ not_needed(["_base_target_name", "_base_target_gen_dir",
|
|
+ "_base_module_build_config", "_rebased_base_module_build_config",
|
|
+ "_base_module_version_code"])
|
|
}
|
|
|
|
android_app_bundle(target_name) {
|
|
diff --git a/build/config/android/rules.gni b/build/config/android/rules.gni
|
|
--- a/build/config/android/rules.gni
|
|
+++ b/build/config/android/rules.gni
|
|
@@ -4993,6 +4993,7 @@ if (enable_java_templates && is_android) {
|
|
_module_build_config = _module.build_config
|
|
_module_build_config_target = _module.build_config_target
|
|
_module_target_name = get_label_info(_module_target, "name")
|
|
+ not_needed(["_module_target_name"])
|
|
|
|
if (!_proguard_enabled) {
|
|
_dex_target = "${_module_target_name}__final_dex"
|
|
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.java
|
|
--- a/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.java
|
|
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/TabImpl.java
|
|
@@ -377,7 +377,7 @@ public class TabImpl implements Tab {
|
|
}
|
|
|
|
@Override
|
|
- @CalledByNative
|
|
+ // @CalledByNative
|
|
public int getId() {
|
|
return mId;
|
|
}
|
|
diff --git a/chrome/browser/download/download_ui_model.cc b/chrome/browser/download/download_ui_model.cc
|
|
--- a/chrome/browser/download/download_ui_model.cc
|
|
+++ b/chrome/browser/download/download_ui_model.cc
|
|
@@ -176,6 +176,7 @@ bool ShouldShowWarningForNoSafeBrowsing(Profile* profile) {
|
|
#endif
|
|
}
|
|
|
|
+#if !BUILDFLAG(IS_ANDROID)
|
|
bool CanUserTurnOnSafeBrowsing(Profile* profile) {
|
|
#if BUILDFLAG(FULL_SAFE_BROWSING)
|
|
return !safe_browsing::IsSafeBrowsingPolicyManaged(*profile->GetPrefs());
|
|
@@ -183,6 +184,7 @@ bool CanUserTurnOnSafeBrowsing(Profile* profile) {
|
|
return false;
|
|
#endif
|
|
}
|
|
+#endif
|
|
|
|
} // namespace
|
|
|
|
diff --git a/chrome/browser/extensions/api/autofill_private/autofill_util.cc b/chrome/browser/extensions/api/autofill_private/autofill_util.cc
|
|
--- a/chrome/browser/extensions/api/autofill_private/autofill_util.cc
|
|
+++ b/chrome/browser/extensions/api/autofill_private/autofill_util.cc
|
|
@@ -42,6 +42,7 @@ namespace {
|
|
// Get the multi-valued element for |type| and return it as a |vector|.
|
|
// TODO(khorimoto): remove this function since multi-valued types are
|
|
// deprecated.
|
|
+#if BUILDFLAG(IS_ANDROID)
|
|
std::vector<std::string> GetList(const autofill::AutofillProfile& profile,
|
|
autofill::ServerFieldType type) {
|
|
std::vector<std::string> list;
|
|
@@ -65,6 +66,7 @@ std::vector<std::string> GetList(const autofill::AutofillProfile& profile,
|
|
|
|
return list;
|
|
}
|
|
+#endif
|
|
|
|
// Gets the string corresponding to |type| from |profile|.
|
|
std::string GetStringFromProfile(const autofill::AutofillProfile& profile,
|
|
diff --git a/chrome/browser/extensions/extension_util.cc b/chrome/browser/extensions/extension_util.cc
|
|
--- a/chrome/browser/extensions/extension_util.cc
|
|
+++ b/chrome/browser/extensions/extension_util.cc
|
|
@@ -71,6 +71,7 @@ std::string ReloadExtensionIfEnabled(const std::string& extension_id,
|
|
return ReloadExtension(extension_id, context);
|
|
}
|
|
|
|
+#if BUILDFLAG(IS_CHROMEOS_ASH)
|
|
// Returns true if the extension ID is found in the InstallForceList policy. Is
|
|
// checked by HasIsolatedStorage() when the extension is not found in the
|
|
// registry.
|
|
@@ -91,6 +92,7 @@ bool IsForceInstalledExtension(const ExtensionId& extension_id,
|
|
}
|
|
return false;
|
|
}
|
|
+#endif
|
|
|
|
// Returns true if the profile is a sign-in profile and the extension is policy
|
|
// installed. `is_policy_installed` can be passed to the method if its value is
|
|
diff --git a/chrome/browser/safe_browsing/BUILD.gn b/chrome/browser/safe_browsing/BUILD.gn
|
|
--- a/chrome/browser/safe_browsing/BUILD.gn
|
|
+++ b/chrome/browser/safe_browsing/BUILD.gn
|
|
@@ -210,6 +210,7 @@ static_library("safe_browsing") {
|
|
"//components/version_info",
|
|
"//content/public/browser",
|
|
"//services/preferences/public/mojom:mojom",
|
|
+ "//third_party/flatbuffers:flatbuffers",
|
|
]
|
|
if (safe_browsing_mode == 1) {
|
|
# "Safe Browsing Full" files in addition to the "basic" ones to use for
|
|
diff --git a/chrome/browser/safe_browsing/user_interaction_observer.cc b/chrome/browser/safe_browsing/user_interaction_observer.cc
|
|
--- a/chrome/browser/safe_browsing/user_interaction_observer.cc
|
|
+++ b/chrome/browser/safe_browsing/user_interaction_observer.cc
|
|
@@ -36,23 +36,6 @@ WEB_CONTENTS_USER_DATA_KEY_IMPL(SafeBrowsingUserInteractionObserver);
|
|
|
|
namespace {
|
|
|
|
-bool IsUrlElisionDisabled(Profile* profile,
|
|
- const char* suspicious_site_reporter_extension_id) {
|
|
- if (profile &&
|
|
- profile->GetPrefs()->GetBoolean(omnibox::kPreventUrlElisionsInOmnibox)) {
|
|
- return true;
|
|
- }
|
|
-#if BUILDFLAG(ENABLE_EXTENSIONS)
|
|
- DCHECK(suspicious_site_reporter_extension_id);
|
|
- if (profile && extensions::ExtensionRegistry::Get(profile)
|
|
- ->enabled_extensions()
|
|
- .Contains(suspicious_site_reporter_extension_id)) {
|
|
- return true;
|
|
- }
|
|
-#endif
|
|
- return false;
|
|
-}
|
|
-
|
|
} // namespace
|
|
|
|
// static
|
|
diff --git a/chrome/browser/ui/startup/bidding_and_auction_consented_debugging_infobar_delegate.h b/chrome/browser/ui/startup/bidding_and_auction_consented_debugging_infobar_delegate.h
|
|
--- a/chrome/browser/ui/startup/bidding_and_auction_consented_debugging_infobar_delegate.h
|
|
+++ b/chrome/browser/ui/startup/bidding_and_auction_consented_debugging_infobar_delegate.h
|
|
@@ -12,7 +12,7 @@
|
|
|
|
namespace content {
|
|
class WebContents;
|
|
-};
|
|
+}
|
|
|
|
// An infobar for Chrome for Testing, which displays a message saying that this
|
|
// flavor of chrome is unsupported and does not auto-update.
|
|
diff --git a/chrome/browser/ui/views/tabs/tab.cc b/chrome/browser/ui/views/tabs/tab.cc
|
|
--- a/chrome/browser/ui/views/tabs/tab.cc
|
|
+++ b/chrome/browser/ui/views/tabs/tab.cc
|
|
@@ -524,7 +524,7 @@ bool Tab::OnMousePressed(const ui::MouseEvent& event) {
|
|
}
|
|
|
|
bool Tab::OnMouseDragged(const ui::MouseEvent& event) {
|
|
- controller_->ContinueDrag(this, event);
|
|
+ (void)controller_->ContinueDrag(this, event);
|
|
return true;
|
|
}
|
|
|
|
diff --git a/chrome/browser/ui/views/tabs/tab_group_header.cc b/chrome/browser/ui/views/tabs/tab_group_header.cc
|
|
--- a/chrome/browser/ui/views/tabs/tab_group_header.cc
|
|
+++ b/chrome/browser/ui/views/tabs/tab_group_header.cc
|
|
@@ -207,7 +207,7 @@ bool TabGroupHeader::OnMousePressed(const ui::MouseEvent& event) {
|
|
}
|
|
|
|
bool TabGroupHeader::OnMouseDragged(const ui::MouseEvent& event) {
|
|
- tab_slot_controller_->ContinueDrag(this, event);
|
|
+ (void)tab_slot_controller_->ContinueDrag(this, event);
|
|
return true;
|
|
}
|
|
|
|
diff --git a/chrome/browser/ui/webui/app_management/app_management_page_handler.cc b/chrome/browser/ui/webui/app_management/app_management_page_handler.cc
|
|
--- a/chrome/browser/ui/webui/app_management/app_management_page_handler.cc
|
|
+++ b/chrome/browser/ui/webui/app_management/app_management_page_handler.cc
|
|
@@ -134,6 +134,7 @@ bool CanShowDefaultAppAssociationsUi() {
|
|
#endif
|
|
}
|
|
|
|
+#if BUILDFLAG(IS_CHROMEOS)
|
|
// Returns a list of intent filters that support http/https given an app ID.
|
|
apps::IntentFilters GetSupportedLinkIntentFilters(Profile* profile,
|
|
const std::string& app_id) {
|
|
@@ -167,6 +168,7 @@ std::vector<std::string> GetSupportedLinks(Profile* profile,
|
|
return std::vector<std::string>(supported_links.begin(),
|
|
supported_links.end());
|
|
}
|
|
+#endif
|
|
|
|
#if !BUILDFLAG(IS_CHROMEOS)
|
|
std::vector<std::string> GetSupportedLinksForPWAs(
|
|
diff --git a/chrome/browser/usb/chrome_usb_delegate.cc b/chrome/browser/usb/chrome_usb_delegate.cc
|
|
--- a/chrome/browser/usb/chrome_usb_delegate.cc
|
|
+++ b/chrome/browser/usb/chrome_usb_delegate.cc
|
|
@@ -46,6 +46,7 @@ UsbChooserContext* GetChooserContext(content::BrowserContext* browser_context) {
|
|
return profile ? UsbChooserContextFactory::GetForProfile(profile) : nullptr;
|
|
}
|
|
|
|
+#if !BUILDFLAG(IS_ANDROID)
|
|
UsbConnectionTracker* GetConnectionTracker(
|
|
content::BrowserContext* browser_context,
|
|
bool create) {
|
|
@@ -55,6 +56,7 @@ UsbConnectionTracker* GetConnectionTracker(
|
|
return profile ? UsbConnectionTrackerFactory::GetForProfile(profile, create)
|
|
: nullptr;
|
|
}
|
|
+#endif
|
|
|
|
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
|
// These extensions can claim the smart card USB class and automatically gain
|
|
diff --git a/components/autofill/core/browser/form_structure.cc b/components/autofill/core/browser/form_structure.cc
|
|
--- a/components/autofill/core/browser/form_structure.cc
|
|
+++ b/components/autofill/core/browser/form_structure.cc
|
|
@@ -219,6 +219,7 @@ void EncodeRandomizedValue(const RandomizedEncoder& encoder,
|
|
// In that case, use the server prediction instead. In the special case that
|
|
// the last specified manual override is a pass through, copy all server
|
|
// predictions.
|
|
+#if !BUILDFLAG(IS_ANDROID)
|
|
std::deque<FieldSuggestion> MergeManualAndServerOverrides(
|
|
std::deque<FieldSuggestion> manual_overrides,
|
|
std::deque<FieldSuggestion> server_overrides) {
|
|
@@ -244,6 +245,7 @@ std::deque<FieldSuggestion> MergeManualAndServerOverrides(
|
|
|
|
return result;
|
|
}
|
|
+#endif
|
|
|
|
void PopulateRandomizedFormMetadata(const RandomizedEncoder& encoder,
|
|
const FormStructure& form,
|
|
diff --git a/components/autofill/core/browser/ui/suggestion_selection.cc b/components/autofill/core/browser/ui/suggestion_selection.cc
|
|
--- a/components/autofill/core/browser/ui/suggestion_selection.cc
|
|
+++ b/components/autofill/core/browser/ui/suggestion_selection.cc
|
|
@@ -101,17 +101,7 @@ Suggestion GetFillFullNameSuggestion(Suggestion::BackendId backend_id) {
|
|
// whole form.
|
|
// TODO(crbug.com/1459990): Use this once the new popup with submenus
|
|
// implementation is complete.
|
|
-Suggestion GetFillEverythingFromAddressProfileSuggestion(
|
|
- Suggestion::BackendId backend_id) {
|
|
- Suggestion suggestion(l10n_util::GetStringUTF16(
|
|
- IDS_AUTOFILL_FILL_EVERYTHING_FROM_ADDRESS_PROFILE_POPUP_OPTION_SELECTED));
|
|
- suggestion.popup_item_id = PopupItemId::kFillEverythingFromAddressProfile;
|
|
- suggestion.icon = "magicIcon";
|
|
- suggestion.payload = backend_id;
|
|
- suggestion.acceptance_a11y_announcement = l10n_util::GetStringUTF16(
|
|
- IDS_AUTOFILL_A11Y_ANNOUNCE_FILL_EVERYTHING_FROM_ADDRESS_PROFILE_POPUP_OPTION_SELECTED);
|
|
- return suggestion;
|
|
-}
|
|
+// (UAZO) removed due error: unused function
|
|
// Append new suggestions to `suggestions` based on the `ServerFieldType` list
|
|
// provided. Suggestions are not added if their info is not found in the
|
|
// provided `profile`. Returns true if any suggestion was added.
|
|
diff --git a/components/autofill/core/browser/webdata/autofill_table.cc b/components/autofill/core/browser/webdata/autofill_table.cc
|
|
--- a/components/autofill/core/browser/webdata/autofill_table.cc
|
|
+++ b/components/autofill/core/browser/webdata/autofill_table.cc
|
|
@@ -413,12 +413,12 @@ void InsertBuilder(sql::Database* db,
|
|
}
|
|
|
|
// Renames the table `from` into `to` and returns true if successful.
|
|
-bool RenameTable(sql::Database* db,
|
|
- std::string_view from,
|
|
- std::string_view to) {
|
|
- return db->Execute(
|
|
- base::StrCat({"ALTER TABLE ", from, " RENAME TO ", to}).c_str());
|
|
-}
|
|
+// bool RenameTable(sql::Database* db,
|
|
+// std::string_view from,
|
|
+// std::string_view to) {
|
|
+// return db->Execute(
|
|
+// base::StrCat({"ALTER TABLE ", from, " RENAME TO ", to}).c_str());
|
|
+// }
|
|
|
|
// Wrapper around `sql::Database::DoesColumnExist()`, because that function
|
|
// only accepts const char* parameters.
|
|
diff --git a/components/omnibox/browser/omnibox_field_trial.cc b/components/omnibox/browser/omnibox_field_trial.cc
|
|
--- a/components/omnibox/browser/omnibox_field_trial.cc
|
|
+++ b/components/omnibox/browser/omnibox_field_trial.cc
|
|
@@ -1079,11 +1079,11 @@ MLConfig::MLConfig(const MLConfig&) = default;
|
|
|
|
ScopedMLConfigForTesting::ScopedMLConfigForTesting()
|
|
: original_config_(std::make_unique<MLConfig>(GetMLConfig())) {
|
|
- GetMLConfigInternal() = {};
|
|
+ //GetMLConfigInternal() = {};
|
|
}
|
|
|
|
ScopedMLConfigForTesting::~ScopedMLConfigForTesting() {
|
|
- GetMLConfigInternal() = *original_config_;
|
|
+ //GetMLConfigInternal() = *original_config_;
|
|
}
|
|
|
|
MLConfig& ScopedMLConfigForTesting::GetMLConfig() {
|
|
diff --git a/components/safe_browsing/content/renderer/phishing_classifier/phishing_image_embedder.cc b/components/safe_browsing/content/renderer/phishing_classifier/phishing_image_embedder.cc
|
|
--- a/components/safe_browsing/content/renderer/phishing_classifier/phishing_image_embedder.cc
|
|
+++ b/components/safe_browsing/content/renderer/phishing_classifier/phishing_image_embedder.cc
|
|
@@ -52,17 +52,9 @@ void PhishingImageEmbedder::BeginImageEmbedding(DoneCallback done_callback) {
|
|
}
|
|
|
|
void PhishingImageEmbedder::OnPlaybackDone(std::unique_ptr<SkBitmap> bitmap) {
|
|
- if (bitmap) {
|
|
- bitmap_ = std::move(bitmap);
|
|
- ScorerStorage::GetInstance()
|
|
- ->GetScorer()
|
|
- ->ApplyVisualTfLiteModelImageEmbedding(
|
|
- *bitmap_,
|
|
- base::BindOnce(&PhishingImageEmbedder::OnImageEmbeddingDone,
|
|
- weak_factory_.GetWeakPtr()));
|
|
- } else {
|
|
- RunFailureCallback();
|
|
- }
|
|
+ // (UAZO) removed due error:
|
|
+ // no member named 'ApplyVisualTfLiteModelImageEmbedding' in 'safe_browsing::Scorer'
|
|
+ RunFailureCallback();
|
|
}
|
|
|
|
void PhishingImageEmbedder::CancelPendingImageEmbedding() {
|
|
diff --git a/content/browser/browser_interface_binders.cc b/content/browser/browser_interface_binders.cc
|
|
--- a/content/browser/browser_interface_binders.cc
|
|
+++ b/content/browser/browser_interface_binders.cc
|
|
@@ -350,6 +350,7 @@ void BindDateTimeChooserForFrame(
|
|
void BindTextSuggestionHostForFrame(
|
|
RenderFrameHost* host,
|
|
mojo::PendingReceiver<blink::mojom::TextSuggestionHost> receiver) {
|
|
+ if ((true)) return;
|
|
auto* view = static_cast<RenderWidgetHostViewAndroid*>(host->GetView());
|
|
if (!view || !view->text_suggestion_host())
|
|
return;
|
|
diff --git a/crypto/BUILD.gn b/crypto/BUILD.gn
|
|
--- a/crypto/BUILD.gn
|
|
+++ b/crypto/BUILD.gn
|
|
@@ -14,6 +14,7 @@ buildflag_header("buildflags") {
|
|
}
|
|
|
|
component("crypto") {
|
|
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
|
|
output_name = "crcrypto" # Avoid colliding with OpenSSL's libcrypto.
|
|
sources = [
|
|
"aead.cc",
|
|
diff --git a/net/BUILD.gn b/net/BUILD.gn
|
|
--- a/net/BUILD.gn
|
|
+++ b/net/BUILD.gn
|
|
@@ -1657,6 +1657,7 @@ component("net") {
|
|
configs -= [ "//build/config/compiler:default_optimization" ]
|
|
configs += [ "//build/config/compiler:optimize_max" ]
|
|
}
|
|
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
|
|
}
|
|
|
|
# net_export.h has its own build target so that code (eg
|
|
diff --git a/third_party/libevent/BUILD.gn b/third_party/libevent/BUILD.gn
|
|
--- a/third_party/libevent/BUILD.gn
|
|
+++ b/third_party/libevent/BUILD.gn
|
|
@@ -69,6 +69,8 @@ static_library("libevent") {
|
|
configs += [ "//build/config/compiler:optimize_max" ]
|
|
}
|
|
|
|
+ configs -= [ "//build/config/clang:find_bad_constructs" ]
|
|
+
|
|
configs -= [ "//build/config/compiler:chromium_code" ]
|
|
configs += [ "//build/config/compiler:no_chromium_code" ]
|
|
}
|
|
--
|
|
2.25.1
|