| OLD | NEW |
| 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/users/chrome_user_manager_impl.h" | 5 #include "chrome/browser/chromeos/login/users/chrome_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 "ash/multi_profile_uma.h" |
| (...skipping 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1041 if ((users + GetUsersAllowedForMultiProfile().size()) > 1) | 1041 if ((users + GetUsersAllowedForMultiProfile().size()) > 1) |
| 1042 ash::MultiProfileUMA::RecordUserCount(users); | 1042 ash::MultiProfileUMA::RecordUserCount(users); |
| 1043 } | 1043 } |
| 1044 | 1044 |
| 1045 base::debug::SetCrashKeyValue( | 1045 base::debug::SetCrashKeyValue( |
| 1046 crash_keys::kNumberOfUsers, | 1046 crash_keys::kNumberOfUsers, |
| 1047 base::StringPrintf("%" PRIuS, GetLoggedInUsers().size())); | 1047 base::StringPrintf("%" PRIuS, GetLoggedInUsers().size())); |
| 1048 } | 1048 } |
| 1049 | 1049 |
| 1050 void ChromeUserManagerImpl::UpdateUserTimeZoneRefresher(Profile* profile) { | 1050 void ChromeUserManagerImpl::UpdateUserTimeZoneRefresher(Profile* profile) { |
| 1051 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 1051 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 1052 chromeos::switches::kDisableTimeZoneTrackingOption)) { | 1052 chromeos::switches::kEnableTimeZoneTrackingOption)) { |
| 1053 return; | 1053 return; |
| 1054 } | 1054 } |
| 1055 | 1055 |
| 1056 user_manager::User* user = ProfileHelper::Get()->GetUserByProfile(profile); | 1056 user_manager::User* user = ProfileHelper::Get()->GetUserByProfile(profile); |
| 1057 if (user == NULL) | 1057 if (user == NULL) |
| 1058 return; | 1058 return; |
| 1059 | 1059 |
| 1060 // In Multi-Profile mode only primary user settings are in effect. | 1060 // In Multi-Profile mode only primary user settings are in effect. |
| 1061 if (user != user_manager::UserManager::Get()->GetPrimaryUser()) | 1061 if (user != user_manager::UserManager::Get()->GetPrimaryUser()) |
| 1062 return; | 1062 return; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 1074 | 1074 |
| 1075 if (profile->GetPrefs()->GetBoolean(prefs::kResolveTimezoneByGeolocation) && | 1075 if (profile->GetPrefs()->GetBoolean(prefs::kResolveTimezoneByGeolocation) && |
| 1076 !system::HasSystemTimezonePolicy()) { | 1076 !system::HasSystemTimezonePolicy()) { |
| 1077 g_browser_process->platform_part()->GetTimezoneResolver()->Start(); | 1077 g_browser_process->platform_part()->GetTimezoneResolver()->Start(); |
| 1078 } else { | 1078 } else { |
| 1079 g_browser_process->platform_part()->GetTimezoneResolver()->Stop(); | 1079 g_browser_process->platform_part()->GetTimezoneResolver()->Stop(); |
| 1080 } | 1080 } |
| 1081 } | 1081 } |
| 1082 | 1082 |
| 1083 } // namespace chromeos | 1083 } // namespace chromeos |
| OLD | NEW |