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
|
2022-04-21 20:58:48 +02:00
|
|
|
index 4569d0afcb80a..5af2fb12f1d7a 100644
|
2022-03-22 17:21:34 +01:00
|
|
|
--- chrome/browser/ui/views/incognito_clear_browsing_data_dialog.cc
|
|
|
|
+++ chrome/browser/ui/views/incognito_clear_browsing_data_dialog.cc
|
2022-03-26 02:12:30 +01:00
|
|
|
@@ -30,6 +30,9 @@ IncognitoClearBrowsingDataDialog* g_incognito_cbd_dialog = nullptr;
|
2022-03-22 17:21:34 +01:00
|
|
|
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 =
|
2022-03-26 02:12:30 +01:00
|
|
|
@@ -72,7 +75,9 @@ IncognitoClearBrowsingDataDialog::IncognitoClearBrowsingDataDialog(
|
|
|
|
dialog_type_(type),
|
2022-03-22 17:21:34 +01:00
|
|
|
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-05-19 12:28:44 +02:00
|
|
|
index 34949452d4891..43aa445b5ac3f 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());
|
|
|
|
|
2022-05-19 12:28:44 +02:00
|
|
|
base::RecordAction(base::UserMetricsAction("IncognitoMenu_Show"));
|
2021-04-11 21:48:07 +02:00
|
|
|
diff --git chrome/browser/ui/views/profiles/profile_menu_view_base.cc chrome/browser/ui/views/profiles/profile_menu_view_base.cc
|
2022-06-17 15:28:55 +02:00
|
|
|
index 001e5831a0512..a0a6073c64ed8 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-06-17 15:28:55 +02:00
|
|
|
@@ -508,7 +508,9 @@ void ProfileMenuViewBase::ShowBubble(views::Button* anchor_button,
|
|
|
|
feature_engagement::kIPHProfileSwitchFeature);
|
2021-04-11 21:48:07 +02:00
|
|
|
|
2021-06-04 03:34:56 +02:00
|
|
|
ProfileMenuViewBase* bubble = nullptr;
|
2022-06-17 15:28:55 +02:00
|
|
|
- if (browser->profile()->IsIncognitoProfile()) {
|
|
|
|
+ if (browser->profile()->IsIncognitoProfile() ||
|
|
|
|
+ (browser->profile()->IsOffTheRecord() &&
|
|
|
|
+ browser->profile()->GetOTRProfileID().IsUniqueForCEF())) {
|
2021-04-11 21:48:07 +02:00
|
|
|
bubble = new IncognitoMenuView(anchor_button, browser);
|
|
|
|
} else {
|
2021-10-19 00:17:16 +02:00
|
|
|
#if BUILDFLAG(IS_CHROMEOS_ASH)
|