Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove chrome-installer-util-util_constants.cc.patch #8063

Merged
merged 1 commit into from
Feb 25, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions chromium_src/chrome/installer/util/util_constants.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/* Copyright (c) 2021 The Brave Authors. All rights reserved.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "chrome/installer/util/util_constants.h"

#define kGoogleUpdateIsMachineEnvVar kGoogleUpdateIsMachineEnvVar_ChromiumImpl
#define kChromeExe kChromeExe_Unused

#include "../../../../../chrome/installer/util/util_constants.cc"

#undef kGoogleUpdateIsMachineEnvVar
#undef kChromeExe

namespace installer {

namespace env_vars {

#if defined(OFFICIAL_BUILD)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can safely delete this guard because we only support installer build for official release.
Using kGoogleUpdateIsMachineEnvVar_ChromiumImpl below doesn't have much meaning.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've talked to @simonhong offline to better understand this and we agreed on that removing that OFFICIAL_BUILD guard would make sense in that it's not actually used for the installer, but that would divert a bit from the conversion we're trying to do here, as that would slightly change the logic originally implemented in the patch we're removing, which is considering official and non-official builds.

Therefore, we agreed to keep this bit in this PR and then work separately on another PR not just to remove that guard from this override, but to also do it from other overrides and patches affecting //chrome/installer/** files in general, so that we can cleanup and simplify things further in a more consistent way.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New issue filed to track down that simplification effort: brave/brave-browser#14364

const char kGoogleUpdateIsMachineEnvVar[] = "BraveSoftwareUpdateIsMachine";
#else
const char kGoogleUpdateIsMachineEnvVar[] =
kGoogleUpdateIsMachineEnvVar_ChromiumImpl;
#endif

} // namespace env_vars

const wchar_t kChromeExe[] = L"brave.exe";

} // namespace installer
29 changes: 0 additions & 29 deletions patches/chrome-installer-util-util_constants.cc.patch

This file was deleted.