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

Side by Side Diff: chrome/browser/chromeos/login/session/user_session_manager.cc

Issue 2257533005: Change logging of about:flags from actions to a histogram. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo in header. Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/login/session/user_session_manager.h" 5 #include "chrome/browser/chromeos/login/session/user_session_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 if (user_manager::UserManager::Get()->GetLoggedInUsers().size() > 1) 713 if (user_manager::UserManager::Get()->GetLoggedInUsers().size() > 1)
714 return false; 714 return false;
715 715
716 const base::CommandLine user_flags(CreatePerSessionCommandLine(profile)); 716 const base::CommandLine user_flags(CreatePerSessionCommandLine(profile));
717 std::set<base::CommandLine::StringType> command_line_difference; 717 std::set<base::CommandLine::StringType> command_line_difference;
718 if (!NeedRestartToApplyPerSessionFlags(user_flags, &command_line_difference)) 718 if (!NeedRestartToApplyPerSessionFlags(user_flags, &command_line_difference))
719 return false; 719 return false;
720 720
721 LogCustomSwitches(command_line_difference); 721 LogCustomSwitches(command_line_difference);
722 722
723 about_flags::ReportCustomFlags("Login.CustomFlags", command_line_difference); 723 about_flags::ReportAboutFlagsHistogram("Login.CustomFlags",
724 command_line_difference);
724 725
725 base::CommandLine::StringVector flags; 726 base::CommandLine::StringVector flags;
726 // argv[0] is the program name |base::CommandLine::NO_PROGRAM|. 727 // argv[0] is the program name |base::CommandLine::NO_PROGRAM|.
727 flags.assign(user_flags.argv().begin() + 1, user_flags.argv().end()); 728 flags.assign(user_flags.argv().begin() + 1, user_flags.argv().end());
728 LOG(WARNING) << "Restarting to apply per-session flags..."; 729 LOG(WARNING) << "Restarting to apply per-session flags...";
729 DBusThreadManager::Get()->GetSessionManagerClient()->SetFlagsForUser( 730 DBusThreadManager::Get()->GetSessionManagerClient()->SetFlagsForUser(
730 cryptohome::Identification( 731 cryptohome::Identification(
731 user_manager::UserManager::Get()->GetActiveUser()->GetAccountId()), 732 user_manager::UserManager::Get()->GetActiveUser()->GetAccountId()),
732 flags); 733 flags);
733 AttemptRestart(profile); 734 AttemptRestart(profile);
(...skipping 1160 matching lines...) Expand 10 before | Expand all | Expand 10 after
1894 ->browser_policy_connector_chromeos() 1895 ->browser_policy_connector_chromeos()
1895 ->IsEnterpriseManaged()) { 1896 ->IsEnterpriseManaged()) {
1896 return false; 1897 return false;
1897 } 1898 }
1898 1899
1899 // Do not show end of life notification if this is a guest session 1900 // Do not show end of life notification if this is a guest session
1900 return !profile->IsGuestSession(); 1901 return !profile->IsGuestSession();
1901 } 1902 }
1902 1903
1903 } // namespace chromeos 1904 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698