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

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

Issue 1129293002: Fix the System Profile with extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: msw comments Created 5 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 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())

Powered by Google App Engine
This is Rietveld 408576698