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

Side by Side Diff: chrome/browser/chromeos/login/users/chrome_user_manager_impl.cc

Issue 899113002: Manual revert of Timezone auto update option should be available by default. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698