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

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

Issue 1157273006: Fix the System Profile to not load extensions. It could otherwise be forced to by GPO. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2403
Patch Set: 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..d094a593eb45e10a260dd9213d72e12d4cd9a22d 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -365,6 +365,12 @@ 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())
+ << "The system profile should never have a real browser.";
+ // TODO(mlerman): After this hits stable channel, see if there are counts
+ // for this metric. If not, change the DCHECK above to a CHECK.
+ if (profile_->IsSystemProfile())
+ content::RecordAction(base::UserMetricsAction("BrowserForSystemProfile"));
// TODO(jeremy): Move to initializer list once flag is removed.
if (IsFastTabUnloadEnabled())
« no previous file with comments | « chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc ('k') | chrome/browser/ui/browser_command_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698