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

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

Issue 115733007: Fix non-otr profile's file manager being launched in guest mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years 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 20867fdf82c237fa16b613884f8a6eb7fa164514..4820e24d65471fc2bd2ee23218c5dc481e0c2821 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -355,6 +355,8 @@ Browser::Browser(const CreateParams& params)
// 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_));
+ CHECK(!profile_->IsGuestSession() || profile_->IsOffTheRecord())
+ << "Only off the record browser may be opened in guest mode";
// TODO(jeremy): Move to initializer list once flag is removed.
if (IsFastTabUnloadEnabled())

Powered by Google App Engine
This is Rietveld 408576698