chore: add include guard patch

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4628373

h/t @jkleinsc
This commit is contained in:
Charles Kerr
2023-07-05 16:30:26 -05:00
committed by John Kleinschmidt
parent 4dab96702d
commit 3d45f58619
2 changed files with 34 additions and 0 deletions

View File

@@ -130,3 +130,4 @@ fix_crash_on_nativetheme_change_during_context_menu_close.patch
fix_select_the_first_menu_item_when_opened_via_keyboard.patch
fix_return_v8_value_from_localframe_requestexecutescript.patch
fix_harden_blink_scriptstate_maybefrom.patch
chore_add_buildflag_guard_around_new_include.patch

View File

@@ -0,0 +1,33 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Charles Kerr <charles@charleskerr.com>
Date: Wed, 5 Jul 2023 16:28:30 -0500
Subject: chore: add BUILDFLAG guard around new include
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4628373
This is an experimental commit; but if it's successful,
This patch should be upstreamed and then removed from electron's code.
diff --git a/chrome/browser/ui/views/frame/browser_view.h b/chrome/browser/ui/views/frame/browser_view.h
index e149a732b5d0652c87c7a9dd24119561ffa2401f..b86f1ed64c586ef6add9c2c0ab383dffdaf67439 100644
--- a/chrome/browser/ui/views/frame/browser_view.h
+++ b/chrome/browser/ui/views/frame/browser_view.h
@@ -43,7 +43,6 @@
#include "chrome/browser/ui/views/user_education/browser_feature_promo_controller.h"
#include "chrome/common/buildflags.h"
#include "components/infobars/core/infobar_container.h"
-#include "components/segmentation_platform/public/result.h"
#include "components/user_education/common/feature_promo_controller.h"
#include "components/user_education/common/feature_promo_handle.h"
#include "components/webapps/browser/banners/app_banner_manager.h"
@@ -62,6 +61,10 @@
#include "ui/views/widget/widget_observer.h"
#include "ui/views/window/client_view.h"
+#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
+#include "components/segmentation_platform/public/result.h"
+#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING)
+
#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "ui/compositor/throughput_tracker.h"
#endif