Index: chrome/browser/ui/browser.cc |
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc |
index b0db2f10ed44c15240092c10419977f07e2316c1..0ca48d26da783636e7dbbf8eae2221af65fcfae6 100644 |
--- a/chrome/browser/ui/browser.cc |
+++ b/chrome/browser/ui/browser.cc |
@@ -345,6 +345,11 @@ Browser::Browser(const CreateParams& params) |
command_controller_(new chrome::BrowserCommandController( |
this, g_browser_process->profile_manager())), |
window_has_shown_(false) { |
+ // If this causes a crash then a window is being opened using a profile type |
+ // that is disallowed by policy. The crash prevents the disabled window type |
+ // from opening at all, but the path that triggered it should be fixed. |
+ CHECK(IncognitoModePrefs::CanOpenBrowser(profile_)); |
+ |
if (!app_name_.empty()) |
chrome::RegisterAppPrefs(app_name_, profile_); |
tab_strip_model_->AddObserver(this); |