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

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

Issue 22447005: chromeos: Switch --first-boot to --first-exec-after-boot. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 1778 matching lines...) Expand 10 before | Expand all | Expand 10 after
1789 true, // has_active_session 1789 true, // has_active_session
1790 this); 1790 this);
1791 } else { 1791 } else {
1792 RestorePendingUserSessions(); 1792 RestorePendingUserSessions();
1793 } 1793 }
1794 } 1794 }
1795 1795
1796 void UserManagerImpl::SendRegularUserLoginMetrics(const std::string& email) { 1796 void UserManagerImpl::SendRegularUserLoginMetrics(const std::string& email) {
1797 // If this isn't the first time Chrome was run after the system booted, 1797 // If this isn't the first time Chrome was run after the system booted,
1798 // assume that Chrome was restarted because a previous session ended. 1798 // assume that Chrome was restarted because a previous session ended.
1799 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kFirstBoot)) { 1799 if (!CommandLine::ForCurrentProcess()->HasSwitch(
1800 switches::kFirstExecAfterBoot)) {
1800 const std::string last_email = 1801 const std::string last_email =
1801 g_browser_process->local_state()->GetString(kLastLoggedInRegularUser); 1802 g_browser_process->local_state()->GetString(kLastLoggedInRegularUser);
1802 const base::TimeDelta time_to_login = 1803 const base::TimeDelta time_to_login =
1803 base::TimeTicks::Now() - manager_creation_time_; 1804 base::TimeTicks::Now() - manager_creation_time_;
1804 if (!last_email.empty() && email != last_email && 1805 if (!last_email.empty() && email != last_email &&
1805 time_to_login.InSeconds() <= kLogoutToLoginDelayMaxSec) { 1806 time_to_login.InSeconds() <= kLogoutToLoginDelayMaxSec) {
1806 UMA_HISTOGRAM_CUSTOM_COUNTS("UserManager.LogoutToLoginDelay", 1807 UMA_HISTOGRAM_CUSTOM_COUNTS("UserManager.LogoutToLoginDelay",
1807 time_to_login.InSeconds(), 0, kLogoutToLoginDelayMaxSec, 50); 1808 time_to_login.InSeconds(), 0, kLogoutToLoginDelayMaxSec, 50);
1808 } 1809 }
1809 } 1810 }
1810 } 1811 }
1811 1812
1812 } // namespace chromeos 1813 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698