Skip to content

Commit

Permalink
Fixed bookmark items are not shown from menu bar on macOS
Browse files Browse the repository at this point in the history
fix brave/brave-browser#25644

When private window is removed cached bookmarkMenuBridge is cleared.
As it's shared with non-OTR profile, it should be cleared when only
non-OTR profile is removed.
  • Loading branch information
simonhong committed May 2, 2023
1 parent 1923813 commit aa4a7b8
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions patches/chrome-browser-app_controller_mac.mm.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm
index 8463c92b822ddd3d8aca9795b4145c536346597e..8d4b45e3d0db698720c01ccacc4672ddb77d476e 100644
--- a/chrome/browser/app_controller_mac.mm
+++ b/chrome/browser/app_controller_mac.mm
@@ -1103,7 +1103,7 @@ class AppControllerNativeThemeObserver : public ui::NativeThemeObserver {
}

auto it = _profileBookmarkMenuBridgeMap.find(profilePath);
- if (it != _profileBookmarkMenuBridgeMap.end() &&
+ if (it != _profileBookmarkMenuBridgeMap.end() && !isOffTheRecord &&
(!base::FeatureList::IsEnabled(features::kDestroyProfileOnBrowserClose) ||
(it->second->GetProfile() && !isOffTheRecord))) {
// Clean up the dangling Profile* in |_profileBookmarkMenuBridgeMap|.

0 comments on commit aa4a7b8

Please sign in to comment.