2021-04-11 21:48:07 +02:00
|
|
|
diff --git chrome/browser/profiles/profile_window.cc chrome/browser/profiles/profile_window.cc
|
2022-01-25 21:26:51 +01:00
|
|
|
index 9e15e9ba100cd..d4388c060a18f 100644
|
2021-04-11 21:48:07 +02:00
|
|
|
--- chrome/browser/profiles/profile_window.cc
|
|
|
|
+++ chrome/browser/profiles/profile_window.cc
|
2022-01-25 21:26:51 +01:00
|
|
|
@@ -280,7 +280,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;
|
|
|
|
}
|
2022-03-22 17:21:34 +01:00
|
|
|
diff --git chrome/browser/ui/views/incognito_clear_browsing_data_dialog.cc chrome/browser/ui/views/incognito_clear_browsing_data_dialog.cc
|
|
|
|
index 142a9b12a734f..2055d03def80c 100644
|
|
|
|
--- chrome/browser/ui/views/incognito_clear_browsing_data_dialog.cc
|
|
|
|
+++ chrome/browser/ui/views/incognito_clear_browsing_data_dialog.cc
|
|
|
|
@@ -28,6 +28,9 @@ IncognitoClearBrowsingDataDialog* g_incognito_cbd_dialog = nullptr;
|
|
|
|
void IncognitoClearBrowsingDataDialog::Show(views::View* anchor_view,
|
|
|
|
Profile* incognito_profile,
|
|
|
|
Type type) {
|
|
|
|
+ // The full toolbar may not be visible.
|
|
|
|
+ if (!anchor_view)
|
|
|
|
+ return;
|
|
|
|
g_incognito_cbd_dialog = new IncognitoClearBrowsingDataDialog(
|
|
|
|
anchor_view, incognito_profile, type);
|
|
|
|
views::Widget* const widget =
|
|
|
|
@@ -69,7 +72,9 @@ IncognitoClearBrowsingDataDialog::IncognitoClearBrowsingDataDialog(
|
|
|
|
: BubbleDialogDelegateView(anchor_view, views::BubbleBorder::TOP_RIGHT),
|
|
|
|
incognito_profile_(incognito_profile) {
|
|
|
|
DCHECK(incognito_profile_);
|
|
|
|
- DCHECK(incognito_profile_->IsIncognitoProfile());
|
|
|
|
+ DCHECK(incognito_profile_->IsIncognitoProfile() ||
|
|
|
|
+ (incognito_profile_->IsOffTheRecord() &&
|
|
|
|
+ incognito_profile_->GetOTRProfileID().IsUniqueForCEF()));
|
|
|
|
SetButtons(ui::DIALOG_BUTTON_NONE);
|
|
|
|
SetShowCloseButton(true);
|
|
|
|
|
2021-04-11 21:48:07 +02:00
|
|
|
diff --git chrome/browser/ui/views/profiles/incognito_menu_view.cc chrome/browser/ui/views/profiles/incognito_menu_view.cc
|
2022-01-25 21:26:51 +01:00
|
|
|
index 98617c979713b..1fac2a76ce097 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
|
2021-12-16 23:35:54 +01:00
|
|
|
@@ -37,7 +37,9 @@
|
2021-04-11 21:48:07 +02:00
|
|
|
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
|
2022-02-21 23:23:40 +01:00
|
|
|
index 63d663a749c77..1c9376a64c623 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
|
2022-02-21 23:23:40 +01:00
|
|
|
@@ -512,7 +512,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 {
|
2021-10-19 00:17:16 +02:00
|
|
|
#if BUILDFLAG(IS_CHROMEOS_ASH)
|