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

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

Issue 2345033002: Log base::Features in Launch.FlagsAtStartup (Closed)
Patch Set: Update comment and add missing feature to histograms.xml 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
« no previous file with comments | « chrome/browser/about_flags_unittest.cc ('k') | components/flags_ui/flags_state.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 if (user_manager::UserManager::Get()->GetLoggedInUsers().size() > 1) 711 if (user_manager::UserManager::Get()->GetLoggedInUsers().size() > 1)
712 return false; 712 return false;
713 713
714 const base::CommandLine user_flags(CreatePerSessionCommandLine(profile)); 714 const base::CommandLine user_flags(CreatePerSessionCommandLine(profile));
715 std::set<base::CommandLine::StringType> command_line_difference; 715 std::set<base::CommandLine::StringType> command_line_difference;
716 if (!NeedRestartToApplyPerSessionFlags(user_flags, &command_line_difference)) 716 if (!NeedRestartToApplyPerSessionFlags(user_flags, &command_line_difference))
717 return false; 717 return false;
718 718
719 LogCustomSwitches(command_line_difference); 719 LogCustomSwitches(command_line_difference);
720 720
721 about_flags::ReportAboutFlagsHistogram("Login.CustomFlags", 721 about_flags::ReportAboutFlagsHistogram(
722 command_line_difference); 722 "Login.CustomFlags", command_line_difference, std::set<std::string>());
723 723
724 base::CommandLine::StringVector flags; 724 base::CommandLine::StringVector flags;
725 // argv[0] is the program name |base::CommandLine::NO_PROGRAM|. 725 // argv[0] is the program name |base::CommandLine::NO_PROGRAM|.
726 flags.assign(user_flags.argv().begin() + 1, user_flags.argv().end()); 726 flags.assign(user_flags.argv().begin() + 1, user_flags.argv().end());
727 LOG(WARNING) << "Restarting to apply per-session flags..."; 727 LOG(WARNING) << "Restarting to apply per-session flags...";
728 DBusThreadManager::Get()->GetSessionManagerClient()->SetFlagsForUser( 728 DBusThreadManager::Get()->GetSessionManagerClient()->SetFlagsForUser(
729 cryptohome::Identification( 729 cryptohome::Identification(
730 user_manager::UserManager::Get()->GetActiveUser()->GetAccountId()), 730 user_manager::UserManager::Get()->GetActiveUser()->GetAccountId()),
731 flags); 731 flags);
732 AttemptRestart(profile); 732 AttemptRestart(profile);
(...skipping 1160 matching lines...) Expand 10 before | Expand all | Expand 10 after
1893 ->browser_policy_connector_chromeos() 1893 ->browser_policy_connector_chromeos()
1894 ->IsEnterpriseManaged()) { 1894 ->IsEnterpriseManaged()) {
1895 return false; 1895 return false;
1896 } 1896 }
1897 1897
1898 // Do not show end of life notification if this is a guest session 1898 // Do not show end of life notification if this is a guest session
1899 return !profile->IsGuestSession(); 1899 return !profile->IsGuestSession();
1900 } 1900 }
1901 1901
1902 } // namespace chromeos 1902 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/about_flags_unittest.cc ('k') | components/flags_ui/flags_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698