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

Unified Diff: chrome/browser/ui/views/html_dialog_view.cc

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
Index: chrome/browser/ui/views/html_dialog_view.cc
diff --git a/chrome/browser/ui/views/html_dialog_view.cc b/chrome/browser/ui/views/html_dialog_view.cc
index 116795d73965d413d07973ecbe64916382642fe0..5c21639bfa34a12c2528d2c5baabbd8862fce882 100644
--- a/chrome/browser/ui/views/html_dialog_view.cc
+++ b/chrome/browser/ui/views/html_dialog_view.cc
@@ -7,6 +7,7 @@
#include <vector>
#include "base/utf_string_conversions.h"
+#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser_dialogs.h"
#include "chrome/browser/ui/views/window.h"
#include "content/browser/tab_contents/tab_contents.h"
@@ -31,6 +32,10 @@ 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.
+ DCHECK(!profile->IsOffTheRecord() || delegate->IsDialogModal());
HtmlDialogView* html_view = new HtmlDialogView(profile, delegate);
browser::CreateViewsWindow(parent, html_view);
html_view->InitDialog();
« no previous file with comments | « chrome/browser/ui/gtk/html_dialog_gtk.cc ('k') | chrome/browser/ui/webui/html_dialog_tab_contents_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698