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

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

Issue 15670011: Prevent new Browser windows from violating the IncognitoModeAvailability policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix browser_tests Created 7 years, 7 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/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 9cb4c5f6de4e65f7ce389c837627dbb30e2ec867..863403fa1f6efe79cea96b14da70632d0b7d5558 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -345,6 +345,8 @@ Browser::Browser(const CreateParams& params)
command_controller_(new chrome::BrowserCommandController(
this, g_browser_process->profile_manager())),
window_has_shown_(false) {
+ CHECK(IncognitoModePrefs::CanOpenBrowser(profile_));
+
if (!app_name_.empty())
chrome::RegisterAppPrefs(app_name_, profile_);
tab_strip_model_->AddObserver(this);

Powered by Google App Engine
This is Rietveld 408576698