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

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

Issue 180243025: Changing the UsersPerSession UMA metric to only count possible multi profile sessions and do this u… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/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 2012 matching lines...) Expand 10 before | Expand all | Expand 10 after
2032 } 2033 }
2033 2034
2034 void UserManagerImpl::DoUpdateAccountLocale( 2035 void UserManagerImpl::DoUpdateAccountLocale(
2035 const std::string& user_id, 2036 const std::string& user_id,
2036 const std::string& resolved_locale) { 2037 const std::string& resolved_locale) {
2037 if (User* user = FindUserAndModify(user_id)) 2038 if (User* user = FindUserAndModify(user_id))
2038 user->SetAccountLocale(resolved_locale); 2039 user->SetAccountLocale(resolved_locale);
2039 } 2040 }
2040 2041
2041 void UserManagerImpl::UpdateNumberOfUsers() { 2042 void UserManagerImpl::UpdateNumberOfUsers() {
2043 int users = GetLoggedInUsers().size();
Dmitry Polukhin 2014/03/07 04:39:10 Nit, I would make it size_t for consistency.
2044 if (users) {
2045 // Write the user number as UMA stat when a multi user session is possible.
2046 if ((users + GetUsersAdmittedForMultiProfile().size()) > 1)
2047 ash::MultiProfileUMA::RecordUserCount(users);
2048 }
2049
2042 base::debug::SetCrashKeyValue(crash_keys::kNumberOfUsers, 2050 base::debug::SetCrashKeyValue(crash_keys::kNumberOfUsers,
2043 base::StringPrintf("%" PRIuS, GetLoggedInUsers().size())); 2051 base::StringPrintf("%" PRIuS, GetLoggedInUsers().size()));
2044 } 2052 }
2045 2053
2046 } // namespace chromeos 2054 } // 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