Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(419)

Unified Diff: chrome/browser/ui/cocoa/html_dialog_window_controller.mm

Issue 8343043: Allow off the record dialogs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix build break on Mac Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/gtk/html_dialog_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/cocoa/html_dialog_window_controller.mm
diff --git a/chrome/browser/ui/cocoa/html_dialog_window_controller.mm b/chrome/browser/ui/cocoa/html_dialog_window_controller.mm
index 3c2bdcce4e584afba5eee1e4ef1904fb19945ba3..f4ac3af1507a6e1ed1ff2cae9719037ea7972ce4 100644
--- a/chrome/browser/ui/cocoa/html_dialog_window_controller.mm
+++ b/chrome/browser/ui/cocoa/html_dialog_window_controller.mm
@@ -78,8 +78,17 @@ namespace browser {
gfx::NativeWindow ShowHtmlDialog(gfx::NativeWindow parent, Profile* profile,
HtmlDialogUIDelegate* delegate) {
+ // It's not always safe to display an html dialog with an off the record
+ // profile. If the last browser with that profile is closed it will go
+ // away.
+ // On most platforms we insist on the dialog being modal if we're off the
+ // record to prevent that. That wont work on the Mac since we don't have
+ // modal dialogs.
+ // Fall back to the old (incorrect) behavior of grabbing the original
+ // profile.
// NOTE: Use the parent parameter once we implement modal dialogs.
- return [HtmlDialogWindowController showHtmlDialog:delegate profile:profile];
+ return [HtmlDialogWindowController showHtmlDialog:delegate
+ profile:profile->GetOriginalProfile()];
}
} // namespace html_dialog_window_controller
« no previous file with comments | « no previous file | chrome/browser/ui/gtk/html_dialog_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698