Index: chrome/browser/ui/browser.cc |
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc |
index c1556d9e1bb6c69324779bc9d7c71a1975e8835d..4cc40078287f2aec4d965bd501032f14e1e1981e 100644 |
--- a/chrome/browser/ui/browser.cc |
+++ b/chrome/browser/ui/browser.cc |
@@ -365,6 +365,11 @@ Browser::Browser(const CreateParams& params) |
CHECK(IncognitoModePrefs::CanOpenBrowser(profile_)); |
CHECK(!profile_->IsGuestSession() || profile_->IsOffTheRecord()) |
<< "Only off the record browser may be opened in guest mode"; |
+ DCHECK(!profile_->IsSystemProfile()) |
+ << "System profile should never have a real browser."; |
msw
2015/05/21 17:48:12
nit: "The system profile"
Mike Lerman
2015/05/21 19:24:33
Done.
|
+ // The SystemProfile should never open a real Browser. |
msw
2015/05/21 17:48:12
nit: remove this comment, in lieu of the printed w
Mike Lerman
2015/05/21 19:24:33
Done.
|
+ if (profile_->IsSystemProfile()) |
+ content::RecordAction(base::UserMetricsAction("BrowserForSystemProfile")); |
// TODO(jeremy): Move to initializer list once flag is removed. |
if (IsFastTabUnloadEnabled()) |