[cr136] Removed patch at CurrentChannelLogoResourceId
There is still a presubmit warning similar to the one at upstream:
Banned functions were used.
chromium_src/chrome/browser/ui/webui/current_channel_logo.cc:15:
Code gated by OFFICIAL_BUILD is effectively untested. This is typically wrong. One valid use case is low-level code that handles subtleties related to high-levels of optimizations that come with OFFICIAL_BUILD.
Related Chromium commit:
https://source.chromium.org/chromium/chromium/src/+/c134a4989fe915c47d32b83336db1e03750e4943
extensions: Show chrome logo on chrome://extensions on desktop android
I ignored the following warning, because I just extracted the existing
piece of code as a helper function.
** Presubmit Warnings: 1 **
Banned functions were used.
chrome/browser/ui/webui/current_channel_logo.cc:15:
Code gated by GOOGLE_CHROME_BRANDING is effectively untested. This is typically wrong. Valid use cases are glue for private modules shipped alongside Chrome, and installation-related logic.
Bug: 406136774
Fixed: 406136774
Test: Manually confirm the logo is shown on chrome://extensions both on
light mode and dark mode on desktop android
Change-Id: I1a0b8b0af46c25f605a2e5047a0bc54212fffa3f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6399693
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
/* Copyright (c) 2025 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 https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#define CurrentChannelLogoResourceId CurrentChannelLogoResourceId_Unused
|
||||
#include "src/chrome/browser/ui/webui/current_channel_logo.cc"
|
||||
#undef CurrentChannelLogoResourceId
|
||||
|
||||
namespace webui {
|
||||
|
||||
int CurrentChannelLogoResourceId() {
|
||||
#if !BUILDFLAG(IS_ANDROID)
|
||||
switch (chrome::GetChannel()) {
|
||||
#if defined(OFFICIAL_BUILD)
|
||||
case version_info::Channel::CANARY:
|
||||
return IDR_PRODUCT_LOGO_32_CANARY;
|
||||
case version_info::Channel::DEV:
|
||||
return IDR_PRODUCT_LOGO_32_DEV;
|
||||
case version_info::Channel::BETA:
|
||||
return IDR_PRODUCT_LOGO_32_BETA;
|
||||
case version_info::Channel::STABLE:
|
||||
return IDR_PRODUCT_LOGO_32;
|
||||
#else
|
||||
case version_info::Channel::CANARY:
|
||||
case version_info::Channel::DEV:
|
||||
case version_info::Channel::BETA:
|
||||
case version_info::Channel::STABLE:
|
||||
NOTREACHED();
|
||||
#endif
|
||||
case version_info::Channel::UNKNOWN:
|
||||
return IDR_PRODUCT_LOGO_32_DEVELOPMENT;
|
||||
}
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
return -1;
|
||||
}
|
||||
|
||||
} // namespace webui
|
||||
@@ -1,24 +0,0 @@
|
||||
diff --git a/chrome/browser/ui/webui/current_channel_logo.cc b/chrome/browser/ui/webui/current_channel_logo.cc
|
||||
index d9fca84f38db06f615a57b93ee10c00c5fe8eb56..322f6e3252f2341da6f9310be442dc374fab18ba 100644
|
||||
--- a/chrome/browser/ui/webui/current_channel_logo.cc
|
||||
+++ b/chrome/browser/ui/webui/current_channel_logo.cc
|
||||
@@ -12,7 +12,7 @@ namespace webui {
|
||||
|
||||
int CurrentChannelLogoResourceId() {
|
||||
switch (chrome::GetChannel()) {
|
||||
-#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
||||
+#if BUILDFLAG(GOOGLE_CHROME_BRANDING) || defined(OFFICIAL_BUILD)
|
||||
case version_info::Channel::CANARY:
|
||||
return IDR_PRODUCT_LOGO_32_CANARY;
|
||||
case version_info::Channel::DEV:
|
||||
@@ -29,7 +29,10 @@ int CurrentChannelLogoResourceId() {
|
||||
NOTREACHED();
|
||||
#endif
|
||||
case version_info::Channel::UNKNOWN:
|
||||
+ return IDR_PRODUCT_LOGO_32_DEVELOPMENT;
|
||||
+#if 0
|
||||
return IDR_PRODUCT_LOGO_32;
|
||||
+#endif
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
Reference in New Issue
Block a user