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 11 matching lines...) Expand all Loading... | |
22 #include "base/strings/stringprintf.h" | 22 #include "base/strings/stringprintf.h" |
23 #include "base/strings/utf_string_conversions.h" | 23 #include "base/strings/utf_string_conversions.h" |
24 #include "base/thread_task_runner_handle.h" | 24 #include "base/thread_task_runner_handle.h" |
25 #include "base/values.h" | 25 #include "base/values.h" |
26 #include "chrome/browser/browser_process.h" | 26 #include "chrome/browser/browser_process.h" |
27 #include "chrome/browser/chrome_notification_types.h" | 27 #include "chrome/browser/chrome_notification_types.h" |
28 #include "chrome/browser/chromeos/login/demo_mode/demo_app_launcher.h" | 28 #include "chrome/browser/chromeos/login/demo_mode/demo_app_launcher.h" |
29 #include "chrome/browser/chromeos/login/session/user_session_manager.h" | 29 #include "chrome/browser/chromeos/login/session/user_session_manager.h" |
30 #include "chrome/browser/chromeos/login/signin/auth_sync_observer.h" | 30 #include "chrome/browser/chromeos/login/signin/auth_sync_observer.h" |
31 #include "chrome/browser/chromeos/login/signin/auth_sync_observer_factory.h" | 31 #include "chrome/browser/chromeos/login/signin/auth_sync_observer_factory.h" |
32 #include "chrome/browser/chromeos/login/users/affiliation.h" | |
32 #include "chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.h" | 33 #include "chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.h" |
33 #include "chrome/browser/chromeos/login/users/multi_profile_user_controller.h" | 34 #include "chrome/browser/chromeos/login/users/multi_profile_user_controller.h" |
34 #include "chrome/browser/chromeos/login/users/supervised_user_manager_impl.h" | 35 #include "chrome/browser/chromeos/login/users/supervised_user_manager_impl.h" |
35 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" | 36 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" |
36 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 37 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
37 #include "chrome/browser/chromeos/policy/device_local_account.h" | 38 #include "chrome/browser/chromeos/policy/device_local_account.h" |
38 #include "chrome/browser/chromeos/profiles/multiprofiles_session_aborted_dialog. h" | 39 #include "chrome/browser/chromeos/profiles/multiprofiles_session_aborted_dialog. h" |
39 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 40 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
40 #include "chrome/browser/chromeos/session_length_limiter.h" | 41 #include "chrome/browser/chromeos/session_length_limiter.h" |
41 #include "chrome/browser/chromeos/settings/cros_settings.h" | 42 #include "chrome/browser/chromeos/settings/cros_settings.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
87 } | 88 } |
88 | 89 |
89 } // namespace | 90 } // namespace |
90 | 91 |
91 // static | 92 // static |
92 void ChromeUserManagerImpl::RegisterPrefs(PrefRegistrySimple* registry) { | 93 void ChromeUserManagerImpl::RegisterPrefs(PrefRegistrySimple* registry) { |
93 ChromeUserManager::RegisterPrefs(registry); | 94 ChromeUserManager::RegisterPrefs(registry); |
94 | 95 |
95 registry->RegisterListPref(kPublicAccounts); | 96 registry->RegisterListPref(kPublicAccounts); |
96 registry->RegisterStringPref(kPublicAccountPendingDataRemoval, std::string()); | 97 registry->RegisterStringPref(kPublicAccountPendingDataRemoval, std::string()); |
98 | |
97 SupervisedUserManager::RegisterPrefs(registry); | 99 SupervisedUserManager::RegisterPrefs(registry); |
98 SessionLengthLimiter::RegisterPrefs(registry); | 100 SessionLengthLimiter::RegisterPrefs(registry); |
99 BootstrapManager::RegisterPrefs(registry); | 101 BootstrapManager::RegisterPrefs(registry); |
100 } | 102 } |
101 | 103 |
102 // static | 104 // static |
103 scoped_ptr<ChromeUserManager> ChromeUserManagerImpl::CreateChromeUserManager() { | 105 scoped_ptr<ChromeUserManager> ChromeUserManagerImpl::CreateChromeUserManager() { |
104 return scoped_ptr<ChromeUserManager>(new ChromeUserManagerImpl()); | 106 return scoped_ptr<ChromeUserManager>(new ChromeUserManagerImpl()); |
105 } | 107 } |
106 | 108 |
(...skipping 1007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1114 } | 1116 } |
1115 | 1117 |
1116 if (profile->GetPrefs()->GetBoolean(prefs::kResolveTimezoneByGeolocation) && | 1118 if (profile->GetPrefs()->GetBoolean(prefs::kResolveTimezoneByGeolocation) && |
1117 !system::HasSystemTimezonePolicy()) { | 1119 !system::HasSystemTimezonePolicy()) { |
1118 g_browser_process->platform_part()->GetTimezoneResolver()->Start(); | 1120 g_browser_process->platform_part()->GetTimezoneResolver()->Start(); |
1119 } else { | 1121 } else { |
1120 g_browser_process->platform_part()->GetTimezoneResolver()->Stop(); | 1122 g_browser_process->platform_part()->GetTimezoneResolver()->Stop(); |
1121 } | 1123 } |
1122 } | 1124 } |
1123 | 1125 |
1126 void ChromeUserManagerImpl::SetUserAffiliation( | |
1127 const std::string& user_id, | |
1128 const std::set<std::string>& user_affiliation_ids) { | |
1129 LOG(ERROR) << "SetUserAffiliation is not implemented yet. Called for user: " | |
Mattias Nissler (ping if slow)
2015/07/30 12:10:57
remove LOG lines
peletskyi
2015/07/30 14:10:57
Done.
| |
1130 << user_id; | |
1131 user_manager::User* user = FindUserAndModify(user_id); | |
1132 if (user) { | |
1133 policy::BrowserPolicyConnectorChromeOS const* const connector = | |
1134 g_browser_process->platform_part()->browser_policy_connector_chromeos(); | |
1135 LOG(ERROR) << "Affiliation to set: " | |
Mattias Nissler (ping if slow)
2015/07/30 12:10:57
You should actually set the affiliation here by ca
peletskyi
2015/07/30 14:10:57
Done.
| |
1136 << chromeos::IsUserAffiliated( | |
1137 user_affiliation_ids, | |
1138 connector->GetDeviceAffiliationIDs(), user_id, | |
1139 connector->GetEnterpriseDomain()); | |
1140 } | |
1141 } | |
1142 | |
1124 } // namespace chromeos | 1143 } // namespace chromeos |
OLD | NEW |