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

Unified Diff: chrome/browser/chromeos/login/login_utils.cc

Issue 344883002: Collect UMA statistics on which chrome://flags lead to chrome restart on ChromeOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update after review. Created 6 years, 4 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/chromeos/login/login_utils.cc
diff --git a/chrome/browser/chromeos/login/login_utils.cc b/chrome/browser/chromeos/login/login_utils.cc
index fafe4398fe5abc26626f9aadd4c18c42f612460f..29babc58a7ee30736a069e0bfa4795777ee2c112 100644
--- a/chrome/browser/chromeos/login/login_utils.cc
+++ b/chrome/browser/chromeos/login/login_utils.cc
@@ -216,16 +216,25 @@ void LoginUtilsImpl::DoBrowserLaunchOnLocaleLoadedImpl(
about_flags::PrefServiceFlagsStorage flags_storage_(profile->GetPrefs());
about_flags::ConvertFlagsToSwitches(&flags_storage_, &user_flags,
about_flags::kAddSentinels);
+
+ std::set<CommandLine::StringType> command_line_difference;
+
// Only restart if needed and if not going into managed mode.
// Don't restart browser if it is not first profile in session.
if (UserManager::Get()->GetLoggedInUsers().size() == 1 &&
!UserManager::Get()->IsLoggedInAsLocallyManagedUser() &&
!about_flags::AreSwitchesIdenticalToCurrentCommandLine(
- user_flags, *CommandLine::ForCurrentProcess())) {
+ user_flags,
+ *CommandLine::ForCurrentProcess(),
+ &command_line_difference)) {
CommandLine::StringVector flags;
// argv[0] is the program name |CommandLine::NO_PROGRAM|.
flags.assign(user_flags.argv().begin() + 1, user_flags.argv().end());
VLOG(1) << "Restarting to apply per-session flags...";
+
+ about_flags::ReportCustomFlags("Login.CustomFlags",
+ command_line_difference);
+
DBusThreadManager::Get()->GetSessionManagerClient()->SetFlagsForUser(
UserManager::Get()->GetActiveUser()->email(), flags);
AttemptRestart(profile);

Powered by Google App Engine
This is Rietveld 408576698