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

Side by Side Diff: chrome/browser/chromeos/login/user_manager_impl.cc

Issue 208813002: Merge 255865 "Changing the UsersPerSession UMA metric to count r..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1847/src/
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « ash/multi_profile_uma.cc ('k') | chrome/browser/lifetime/application_lifetime.cc » ('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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/user_manager_impl.h" 5 #include "chrome/browser/chromeos/login/user_manager_impl.h"
6 6
7 #include <cstddef> 7 #include <cstddef>
8 #include <set> 8 #include <set>
9 9
10 #include "ash/multi_profile_uma.h"
10 #include "base/bind.h" 11 #include "base/bind.h"
11 #include "base/bind_helpers.h" 12 #include "base/bind_helpers.h"
12 #include "base/command_line.h" 13 #include "base/command_line.h"
13 #include "base/compiler_specific.h" 14 #include "base/compiler_specific.h"
14 #include "base/files/file_path.h" 15 #include "base/files/file_path.h"
15 #include "base/format_macros.h" 16 #include "base/format_macros.h"
16 #include "base/logging.h" 17 #include "base/logging.h"
17 #include "base/metrics/histogram.h" 18 #include "base/metrics/histogram.h"
18 #include "base/prefs/pref_registry_simple.h" 19 #include "base/prefs/pref_registry_simple.h"
19 #include "base/prefs/pref_service.h" 20 #include "base/prefs/pref_service.h"
(...skipping 2015 matching lines...) Expand 10 before | Expand all | Expand 10 after
2035 } 2036 }
2036 2037
2037 void UserManagerImpl::DoUpdateAccountLocale( 2038 void UserManagerImpl::DoUpdateAccountLocale(
2038 const std::string& user_id, 2039 const std::string& user_id,
2039 const std::string& resolved_locale) { 2040 const std::string& resolved_locale) {
2040 if (User* user = FindUserAndModify(user_id)) 2041 if (User* user = FindUserAndModify(user_id))
2041 user->SetAccountLocale(resolved_locale); 2042 user->SetAccountLocale(resolved_locale);
2042 } 2043 }
2043 2044
2044 void UserManagerImpl::UpdateNumberOfUsers() { 2045 void UserManagerImpl::UpdateNumberOfUsers() {
2046 size_t users = GetLoggedInUsers().size();
2047 if (users) {
2048 // Write the user number as UMA stat when a multi user session is possible.
2049 if ((users + GetUsersAdmittedForMultiProfile().size()) > 1)
2050 ash::MultiProfileUMA::RecordUserCount(users);
2051 }
2052
2045 base::debug::SetCrashKeyValue(crash_keys::kNumberOfUsers, 2053 base::debug::SetCrashKeyValue(crash_keys::kNumberOfUsers,
2046 base::StringPrintf("%" PRIuS, GetLoggedInUsers().size())); 2054 base::StringPrintf("%" PRIuS, GetLoggedInUsers().size()));
2047 } 2055 }
2048 2056
2049 } // namespace chromeos 2057 } // namespace chromeos
OLDNEW
« no previous file with comments | « ash/multi_profile_uma.cc ('k') | chrome/browser/lifetime/application_lifetime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698