46 lines
2.4 KiB
Diff
46 lines
2.4 KiB
Diff
diff --git chrome/browser/profiles/profile_window.cc chrome/browser/profiles/profile_window.cc
|
|
index 58a47365168bb..f8910f44040c4 100644
|
|
--- chrome/browser/profiles/profile_window.cc
|
|
+++ chrome/browser/profiles/profile_window.cc
|
|
@@ -271,7 +271,9 @@ void BubbleViewModeFromAvatarBubbleMode(BrowserWindow::AvatarBubbleMode mode,
|
|
*bubble_view_mode = BUBBLE_VIEW_MODE_PROFILE_CHOOSER;
|
|
return;
|
|
case BrowserWindow::AVATAR_BUBBLE_MODE_DEFAULT:
|
|
- *bubble_view_mode = profile->IsIncognitoProfile()
|
|
+ *bubble_view_mode = profile->IsIncognitoProfile() ||
|
|
+ (profile->IsOffTheRecord() &&
|
|
+ profile->GetOTRProfileID().IsUniqueForCEF())
|
|
? profiles::BUBBLE_VIEW_MODE_INCOGNITO
|
|
: profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER;
|
|
}
|
|
diff --git chrome/browser/ui/views/profiles/incognito_menu_view.cc chrome/browser/ui/views/profiles/incognito_menu_view.cc
|
|
index aff0b0d4c57d0..7b2c37b6ed9e3 100644
|
|
--- chrome/browser/ui/views/profiles/incognito_menu_view.cc
|
|
+++ chrome/browser/ui/views/profiles/incognito_menu_view.cc
|
|
@@ -37,7 +37,9 @@
|
|
IncognitoMenuView::IncognitoMenuView(views::Button* anchor_button,
|
|
Browser* browser)
|
|
: ProfileMenuViewBase(anchor_button, browser) {
|
|
- DCHECK(browser->profile()->IsIncognitoProfile());
|
|
+ DCHECK(browser->profile()->IsIncognitoProfile() ||
|
|
+ (browser->profile()->IsOffTheRecord() &&
|
|
+ browser->profile()->GetOTRProfileID().IsUniqueForCEF()));
|
|
GetViewAccessibility().OverrideName(GetAccessibleWindowTitle());
|
|
|
|
chrome::RecordDialogCreation(
|
|
diff --git chrome/browser/ui/views/profiles/profile_menu_view_base.cc chrome/browser/ui/views/profiles/profile_menu_view_base.cc
|
|
index fab7ddd1a2f89..b389929034d1f 100644
|
|
--- chrome/browser/ui/views/profiles/profile_menu_view_base.cc
|
|
+++ chrome/browser/ui/views/profiles/profile_menu_view_base.cc
|
|
@@ -513,7 +513,9 @@ void ProfileMenuViewBase::ShowBubble(profiles::BubbleViewMode view_mode,
|
|
|
|
ProfileMenuViewBase* bubble = nullptr;
|
|
if (view_mode == profiles::BUBBLE_VIEW_MODE_INCOGNITO) {
|
|
- DCHECK(browser->profile()->IsIncognitoProfile());
|
|
+ DCHECK(browser->profile()->IsIncognitoProfile() ||
|
|
+ (browser->profile()->IsOffTheRecord() &&
|
|
+ browser->profile()->GetOTRProfileID().IsUniqueForCEF()));
|
|
bubble = new IncognitoMenuView(anchor_button, browser);
|
|
} else {
|
|
#if BUILDFLAG(IS_CHROMEOS_ASH)
|