Files
cromite/build/patches/00WIN-Fix-windows-build.patch
T

200 lines
8.2 KiB
Diff

From: Your Name <you@example.com>
Date: Thu, 13 Oct 2022 10:34:52 +0000
Subject: WIN Fix windows build
---
.../browser_process_platform_part_win.cc | 3 ++
chrome/browser/devtools/devtools_window.cc | 1 +
chrome/browser/ui/profile_picker.cc | 2 +-
.../browser/ui/startup/first_run_service.cc | 14 +++-----
chrome/browser/updater/BUILD.gn | 9 -----
.../browser/updater/browser_updater_client.cc | 33 +------------------
6 files changed, 10 insertions(+), 52 deletions(-)
diff --git a/chrome/browser/browser_process_platform_part_win.cc b/chrome/browser/browser_process_platform_part_win.cc
--- a/chrome/browser/browser_process_platform_part_win.cc
+++ b/chrome/browser/browser_process_platform_part_win.cc
@@ -5,12 +5,15 @@
#include "chrome/browser/browser_process_platform_part_win.h"
#include "chrome/browser/active_use_util.h"
+#include "chrome/install_static/buildflags.h"
BrowserProcessPlatformPart::BrowserProcessPlatformPart() = default;
BrowserProcessPlatformPart::~BrowserProcessPlatformPart() = default;
void BrowserProcessPlatformPart::PlatformSpecificCommandLineProcessing(
const base::CommandLine& command_line) {
+#if BUILDFLAG(USE_GOOGLE_UPDATE_INTEGRATION)
if (!did_run_updater_ && ShouldRecordActiveUse(command_line))
did_run_updater_.emplace();
+#endif
}
diff --git a/chrome/browser/devtools/devtools_window.cc b/chrome/browser/devtools/devtools_window.cc
--- a/chrome/browser/devtools/devtools_window.cc
+++ b/chrome/browser/devtools/devtools_window.cc
@@ -80,6 +80,7 @@
#include "ui/events/keycodes/dom/keycode_converter.h"
#include "ui/events/keycodes/keyboard_code_conversion.h"
#include "ui/events/keycodes/keyboard_codes.h"
+#include "net/cert/x509_certificate.h"
// This should be after all other #includes.
#if defined(_WINDOWS_) // Detect whether windows.h was included.
diff --git a/chrome/browser/ui/profile_picker.cc b/chrome/browser/ui/profile_picker.cc
--- a/chrome/browser/ui/profile_picker.cc
+++ b/chrome/browser/ui/profile_picker.cc
@@ -102,7 +102,7 @@ ProfilePicker::Params ProfilePicker::Params::ForFirstRun(
#endif
Params params(
-#if BUILDFLAG(ENABLE_DICE_SUPPORT)
+#if (true) // BUILDFLAG(ENABLE_DICE_SUPPORT)
EntryPoint::kFirstRun,
#elif BUILDFLAG(IS_CHROMEOS_LACROS)
EntryPoint::kLacrosPrimaryProfileFirstRun,
diff --git a/chrome/browser/ui/startup/first_run_service.cc b/chrome/browser/ui/startup/first_run_service.cc
--- a/chrome/browser/ui/startup/first_run_service.cc
+++ b/chrome/browser/ui/startup/first_run_service.cc
@@ -47,6 +47,7 @@
namespace {
bool IsFirstRunEligibleProfile(Profile* profile) {
+ if ((true)) return false;
if (profile->IsOffTheRecord()) {
return false;
}
@@ -74,6 +75,7 @@ bool IsFirstRunEligibleProfile(Profile* profile) {
}
bool IsFirstRunEligibleProcess() {
+ if ((true)) return false;
#if !BUILDFLAG(IS_CHROMEOS_LACROS)
// On Lacros we want to run the FRE beyond the strict first run as defined by
// `IsChromeFirstRun()` for a few reasons:
@@ -164,9 +166,6 @@ enum class FinishedReason {
};
void SetFirstRunFinished(FinishedReason reason) {
- PrefService* local_state = g_browser_process->local_state();
- local_state->SetBoolean(prefs::kFirstRunFinished, true);
-
#if BUILDFLAG(IS_CHROMEOS_LACROS)
absl::optional<ProfileMetrics::ProfileSignedInFlowOutcome> outcome;
switch (reason) {
@@ -193,9 +192,7 @@ void SetFirstRunFinished(FinishedReason reason) {
// with it, or if for some other reason (e.g. policy or some other browser
// state) we determine that we should not show it.
bool IsFirstRunMarkedFinishedInPrefs() {
- // Can be null in unit tests.
- const PrefService* const local_state = g_browser_process->local_state();
- return local_state && local_state->GetBoolean(prefs::kFirstRunFinished);
+ return true;
}
// Processes the outcome from the FRE and resumes the user's interrupted task.
@@ -234,8 +231,6 @@ void OnFirstRunHasExited(ResumeTaskCallback original_intent_callback,
// static
void FirstRunService::RegisterLocalStatePrefs(PrefRegistrySimple* registry) {
- registry->RegisterBooleanPref(prefs::kFirstRunFinished, false);
- registry->RegisterStringPref(prefs::kFirstRunStudyGroup, "");
}
#if BUILDFLAG(ENABLE_DICE_SUPPORT)
@@ -318,7 +313,6 @@ void FirstRunService::TryMarkFirstRunAlreadyFinished(
return;
}
- auto* identity_manager = IdentityManagerFactory::GetForProfile(profile_);
bool has_set_up_profile =
#if BUILDFLAG(IS_CHROMEOS_LACROS)
// Indicates that the profile was likely migrated from pre-Lacros Ash.
@@ -328,7 +322,7 @@ void FirstRunService::TryMarkFirstRunAlreadyFinished(
// the profile already has an account (e.g. the sentinel file was deleted
// or `--force-first-run` was passed), this ensures we still skip it and
// avoid having to handle too strange states later.
- identity_manager->HasPrimaryAccount(signin::ConsentLevel::kSignin);
+ false;
#endif
if (has_set_up_profile) {
SetFirstRunFinished(FinishedReason::kProfileAlreadySetUp);
diff --git a/chrome/browser/updater/BUILD.gn b/chrome/browser/updater/BUILD.gn
--- a/chrome/browser/updater/BUILD.gn
+++ b/chrome/browser/updater/BUILD.gn
@@ -22,15 +22,6 @@ source_set("browser_updater_client") {
"//components/version_info",
]
- if (is_win) {
- sources += [ "browser_updater_client_win.cc" ]
-
- deps += [
- "//chrome/browser/google",
- "//chrome/install_static:install_static_util",
- ]
- }
-
if (is_mac) {
sources += [
"browser_updater_client_mac.mm",
diff --git a/chrome/browser/updater/browser_updater_client.cc b/chrome/browser/updater/browser_updater_client.cc
--- a/chrome/browser/updater/browser_updater_client.cc
+++ b/chrome/browser/updater/browser_updater_client.cc
@@ -29,19 +29,6 @@ BrowserUpdaterClient::~BrowserUpdaterClient() = default;
void BrowserUpdaterClient::Register(base::OnceClosure complete) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
- base::ThreadPool::PostTaskAndReplyWithResult(
- FROM_HERE, {base::MayBlock()},
- base::BindOnce(&BrowserUpdaterClient::GetRegistrationRequest, this),
- base::BindOnce(
- [](base::OnceCallback<void(int)> callback,
- scoped_refptr<updater::UpdateService> update_service,
- const updater::RegistrationRequest& request) {
- update_service->RegisterApp(request, std::move(callback));
- },
- base::BindPostTaskToCurrentDefault(
- base::BindOnce(&BrowserUpdaterClient::RegistrationCompleted, this,
- std::move(complete))),
- update_service_));
}
void BrowserUpdaterClient::RegistrationCompleted(base::OnceClosure complete,
@@ -72,19 +59,6 @@ void BrowserUpdaterClient::GetUpdaterVersionCompleted(
void BrowserUpdaterClient::CheckForUpdate(
updater::UpdateService::StateChangeCallback version_updater_callback) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-
- updater::UpdateService::UpdateState update_state;
- update_state.state =
- updater::UpdateService::UpdateState::State::kCheckingForUpdates;
- version_updater_callback.Run(update_state);
- update_service_->Update(
- GetAppId(), {}, updater::UpdateService::Priority::kForeground,
- updater::UpdateService::PolicySameVersionUpdate::kNotAllowed,
- /*do_update_check_only=*/false,
- base::BindPostTaskToCurrentDefault(version_updater_callback),
- base::BindPostTaskToCurrentDefault(
- base::BindOnce(&BrowserUpdaterClient::UpdateCompleted, this,
- version_updater_callback)));
}
void BrowserUpdaterClient::UpdateCompleted(
@@ -130,12 +104,7 @@ void BrowserUpdaterClient::IsBrowserRegisteredCompleted(
base::OnceCallback<void(bool)> callback,
const std::vector<updater::UpdateService::AppState>& apps) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
- const std::string app_id = GetAppId();
- std::move(callback).Run(
- std::find_if(apps.begin(), apps.end(),
- [&](const updater::UpdateService::AppState& app) {
- return app.app_id == app_id;
- }) != apps.end());
+ std::move(callback).Run(true);
}
scoped_refptr<BrowserUpdaterClient> BrowserUpdaterClient::Create(
--
2.25.1