2021-04-11 21:48:07 +02:00
|
|
|
diff --git chrome/browser/profiles/profile_window.cc chrome/browser/profiles/profile_window.cc
|
2021-07-23 18:40:13 +02:00
|
|
|
index c00884e06f960..858fdb75529f8 100644
|
2021-04-11 21:48:07 +02:00
|
|
|
--- chrome/browser/profiles/profile_window.cc
|
|
|
|
+++ chrome/browser/profiles/profile_window.cc
|
2021-07-23 18:40:13 +02:00
|
|
|
@@ -272,7 +272,9 @@ void BubbleViewModeFromAvatarBubbleMode(BrowserWindow::AvatarBubbleMode mode,
|
2021-04-11 21:48:07 +02:00
|
|
|
*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
|
2021-07-23 18:40:13 +02:00
|
|
|
index 8a93e597977b0..4d0faa950a2af 100644
|
2021-04-11 21:48:07 +02:00
|
|
|
--- 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
|
2021-08-20 01:40:49 +02:00
|
|
|
index 5b5baee89fc2f..26dc4a9591bf9 100644
|
2021-04-11 21:48:07 +02:00
|
|
|
--- chrome/browser/ui/views/profiles/profile_menu_view_base.cc
|
|
|
|
+++ chrome/browser/ui/views/profiles/profile_menu_view_base.cc
|
2021-07-23 18:40:13 +02:00
|
|
|
@@ -511,7 +511,9 @@ void ProfileMenuViewBase::ShowBubble(profiles::BubbleViewMode view_mode,
|
2021-04-11 21:48:07 +02:00
|
|
|
|
2021-06-04 03:34:56 +02:00
|
|
|
ProfileMenuViewBase* bubble = nullptr;
|
2021-04-11 21:48:07 +02:00
|
|
|
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 {
|
|
|
|
DCHECK_EQ(profiles::BUBBLE_VIEW_MODE_PROFILE_CHOOSER, view_mode);
|