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

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: and a few fewer unnecessary checks 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..fd723e258ba7be62dc454384007af95753925770 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -365,6 +365,10 @@ 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());
msw 2015/05/21 04:34:43 nit: maybe use CHECK instead of DCHECK? Then elimi
Mike Lerman 2015/05/21 15:27:31 I'm glad you brought this up. We talked about this
msw 2015/05/21 17:48:12 Hmm, that sounds ok, I hope we find some way forwa
Mike Lerman 2015/05/21 19:24:33 I hope so - knowing how many users there are will
+ // The SystemProfile should never open a real Browser.
msw 2015/05/21 04:34:43 nit: maybe print this comment as a warning with th
Mike Lerman 2015/05/21 15:27:31 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