2022-08-23 03:37:40 +02:00
|
|
|
diff --git chrome/browser/ui/bookmarks/bookmark_stats.cc chrome/browser/ui/bookmarks/bookmark_stats.cc
|
2023-06-26 12:13:38 +02:00
|
|
|
index 7ae18c5a960b0..d48ba838efe6f 100644
|
2022-08-23 03:37:40 +02:00
|
|
|
--- chrome/browser/ui/bookmarks/bookmark_stats.cc
|
|
|
|
+++ chrome/browser/ui/bookmarks/bookmark_stats.cc
|
|
|
|
@@ -21,7 +21,9 @@ bool IsBookmarkBarLocation(BookmarkLaunchLocation location) {
|
|
|
|
|
|
|
|
auto GetMetricProfile(const Profile* profile) {
|
|
|
|
DCHECK(profile);
|
|
|
|
- DCHECK(profile->IsRegularProfile() || profile->IsIncognitoProfile());
|
|
|
|
+ DCHECK(profile->IsRegularProfile() || profile->IsIncognitoProfile() ||
|
|
|
|
+ (profile->IsOffTheRecord() &&
|
|
|
|
+ profile->GetOTRProfileID().IsUniqueForCEF()));
|
|
|
|
return profile->IsRegularProfile()
|
|
|
|
? profile_metrics::BrowserProfileType::kRegular
|
|
|
|
: profile_metrics::BrowserProfileType::kIncognito;
|
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
|
2024-01-26 03:12:43 +01:00
|
|
|
index 826fa20afbb56..f08891c4aaa0d 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
|
2023-10-19 20:08:48 +02:00
|
|
|
@@ -31,7 +31,9 @@ IncognitoClearBrowsingDataDialog::IncognitoClearBrowsingDataDialog(
|
2022-03-26 02:12:30 +01:00
|
|
|
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);
|
|
|
|
|
2022-08-23 03:37:40 +02:00
|
|
|
diff --git chrome/browser/ui/views/incognito_clear_browsing_data_dialog_coordinator.cc chrome/browser/ui/views/incognito_clear_browsing_data_dialog_coordinator.cc
|
2022-09-26 21:30:45 +02:00
|
|
|
index caa20ec03434a..2a3ca921445c1 100644
|
2022-08-23 03:37:40 +02:00
|
|
|
--- chrome/browser/ui/views/incognito_clear_browsing_data_dialog_coordinator.cc
|
|
|
|
+++ chrome/browser/ui/views/incognito_clear_browsing_data_dialog_coordinator.cc
|
|
|
|
@@ -26,6 +26,10 @@ void IncognitoClearBrowsingDataDialogCoordinator::Show(
|
|
|
|
->toolbar_button_provider()
|
|
|
|
->GetAvatarToolbarButton();
|
|
|
|
|
|
|
|
+ // The full toolbar may not be visible.
|
|
|
|
+ if (!avatar_toolbar_button)
|
|
|
|
+ return;
|
|
|
|
+
|
|
|
|
auto bubble = std::make_unique<IncognitoClearBrowsingDataDialog>(
|
|
|
|
avatar_toolbar_button, GetBrowser().profile(), type);
|
|
|
|
DCHECK_EQ(nullptr, bubble_tracker_.view());
|
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
|
2024-03-19 22:11:42 +01:00
|
|
|
index 791ab794c8750..ca9e0851e2689 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
|
2023-02-27 19:52:38 +01:00
|
|
|
@@ -36,7 +36,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()));
|
2024-03-19 22:11:42 +01:00
|
|
|
GetViewAccessibility().SetName(GetAccessibleWindowTitle(),
|
|
|
|
ax::mojom::NameFrom::kAttribute);
|
2021-04-11 21:48:07 +02:00
|
|
|
|
2022-08-23 03:37:40 +02:00
|
|
|
diff --git chrome/browser/ui/views/profiles/profile_menu_coordinator.cc chrome/browser/ui/views/profiles/profile_menu_coordinator.cc
|
2024-08-26 14:44:25 +02:00
|
|
|
index ce7e02f549ab3..338af80de71d6 100644
|
2022-08-23 03:37:40 +02:00
|
|
|
--- chrome/browser/ui/views/profiles/profile_menu_coordinator.cc
|
|
|
|
+++ chrome/browser/ui/views/profiles/profile_menu_coordinator.cc
|
2023-12-06 21:16:15 +01:00
|
|
|
@@ -56,7 +56,9 @@ void ProfileMenuCoordinator::Show(bool is_source_accelerator) {
|
2023-09-15 21:51:43 +02:00
|
|
|
is_incognito &= !browser.profile()->IsGuestSession();
|
|
|
|
#endif
|
2021-04-11 21:48:07 +02:00
|
|
|
|
2023-09-15 21:51:43 +02:00
|
|
|
- if (is_incognito) {
|
|
|
|
+ if (is_incognito ||
|
2022-08-23 03:37:40 +02:00
|
|
|
+ (browser.profile()->IsOffTheRecord() &&
|
|
|
|
+ browser.profile()->GetOTRProfileID().IsUniqueForCEF())) {
|
|
|
|
bubble =
|
|
|
|
std::make_unique<IncognitoMenuView>(avatar_toolbar_button, &browser);
|
2021-04-11 21:48:07 +02:00
|
|
|
} else {
|