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

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

Issue 145073003: Indicate which authentication flow was used in UserContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Speculative fix for telemetry. Created 6 years, 11 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
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 "base/bind.h" 10 #include "base/bind.h"
(...skipping 1812 matching lines...) Expand 10 before | Expand all | Expand 10 after
1823 const User* user = (*it); 1823 const User* user = (*it);
1824 if (user->email() == user_id) { 1824 if (user->email() == user_id) {
1825 user_already_logged_in = true; 1825 user_already_logged_in = true;
1826 break; 1826 break;
1827 } 1827 }
1828 } 1828 }
1829 DCHECK(!user_already_logged_in); 1829 DCHECK(!user_already_logged_in);
1830 1830
1831 if (!user_already_logged_in) { 1831 if (!user_already_logged_in) {
1832 // Will call OnProfilePrepared() once profile has been loaded. 1832 // Will call OnProfilePrepared() once profile has been loaded.
1833 LoginUtils::Get()->PrepareProfile(UserContext(user_id, 1833 LoginUtils::Get()->PrepareProfile(
1834 std::string(), // password 1834 UserContext(user_id,
1835 std::string(), // auth_code 1835 std::string(), // password
1836 user_id_hash, 1836 std::string(), // auth_code
1837 false), // using_oauth 1837 user_id_hash,
1838 std::string(), // display_email 1838 false, // using_oauth
1839 false, // has_cookies 1839 UserContext::AUTH_FLOW_OFFLINE),
1840 true, // has_active_session 1840 std::string(), // display_email
1841 this); 1841 false, // has_cookies
1842 true, // has_active_session
1843 this);
1842 } else { 1844 } else {
1843 RestorePendingUserSessions(); 1845 RestorePendingUserSessions();
1844 } 1846 }
1845 } 1847 }
1846 1848
1847 void UserManagerImpl::SendRegularUserLoginMetrics(const std::string& user_id) { 1849 void UserManagerImpl::SendRegularUserLoginMetrics(const std::string& user_id) {
1848 // If this isn't the first time Chrome was run after the system booted, 1850 // If this isn't the first time Chrome was run after the system booted,
1849 // assume that Chrome was restarted because a previous session ended. 1851 // assume that Chrome was restarted because a previous session ended.
1850 if (!CommandLine::ForCurrentProcess()->HasSwitch( 1852 if (!CommandLine::ForCurrentProcess()->HasSwitch(
1851 switches::kFirstExecAfterBoot)) { 1853 switches::kFirstExecAfterBoot)) {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
1888 if (User* user = FindUserAndModify(user_id)) 1890 if (User* user = FindUserAndModify(user_id))
1889 user->SetAccountLocale(resolved_locale); 1891 user->SetAccountLocale(resolved_locale);
1890 } 1892 }
1891 1893
1892 void UserManagerImpl::UpdateNumberOfUsers() { 1894 void UserManagerImpl::UpdateNumberOfUsers() {
1893 base::debug::SetCrashKeyValue(crash_keys::kNumberOfUsers, 1895 base::debug::SetCrashKeyValue(crash_keys::kNumberOfUsers,
1894 base::StringPrintf("%" PRIuS, GetLoggedInUsers().size())); 1896 base::StringPrintf("%" PRIuS, GetLoggedInUsers().size()));
1895 } 1897 }
1896 1898
1897 } // namespace chromeos 1899 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/user.cc ('k') | chrome/browser/resources/chromeos/login/login_common.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698