| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <cstddef> | 9 #include <cstddef> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 #include "base/strings/stringprintf.h" | 25 #include "base/strings/stringprintf.h" |
| 26 #include "base/strings/utf_string_conversions.h" | 26 #include "base/strings/utf_string_conversions.h" |
| 27 #include "base/sys_info.h" | 27 #include "base/sys_info.h" |
| 28 #include "base/task_runner.h" | 28 #include "base/task_runner.h" |
| 29 #include "base/task_scheduler/post_task.h" | 29 #include "base/task_scheduler/post_task.h" |
| 30 #include "base/threading/thread_task_runner_handle.h" | 30 #include "base/threading/thread_task_runner_handle.h" |
| 31 #include "base/values.h" | 31 #include "base/values.h" |
| 32 #include "chrome/browser/browser_process.h" | 32 #include "chrome/browser/browser_process.h" |
| 33 #include "chrome/browser/chrome_notification_types.h" | 33 #include "chrome/browser/chrome_notification_types.h" |
| 34 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" | 34 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" |
| 35 #include "chrome/browser/chromeos/extensions/extension_tab_util_delegate_chromeo
s.h" |
| 35 #include "chrome/browser/chromeos/extensions/permissions_updater_delegate_chrome
os.h" | 36 #include "chrome/browser/chromeos/extensions/permissions_updater_delegate_chrome
os.h" |
| 36 #include "chrome/browser/chromeos/login/demo_mode/demo_app_launcher.h" | 37 #include "chrome/browser/chromeos/login/demo_mode/demo_app_launcher.h" |
| 37 #include "chrome/browser/chromeos/login/enterprise_user_session_metrics.h" | 38 #include "chrome/browser/chromeos/login/enterprise_user_session_metrics.h" |
| 38 #include "chrome/browser/chromeos/login/session/user_session_manager.h" | 39 #include "chrome/browser/chromeos/login/session/user_session_manager.h" |
| 39 #include "chrome/browser/chromeos/login/signin/auth_sync_observer.h" | 40 #include "chrome/browser/chromeos/login/signin/auth_sync_observer.h" |
| 40 #include "chrome/browser/chromeos/login/signin/auth_sync_observer_factory.h" | 41 #include "chrome/browser/chromeos/login/signin/auth_sync_observer_factory.h" |
| 41 #include "chrome/browser/chromeos/login/users/affiliation.h" | 42 #include "chrome/browser/chromeos/login/users/affiliation.h" |
| 42 #include "chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.h" | 43 #include "chrome/browser/chromeos/login/users/avatar/user_image_manager_impl.h" |
| 43 #include "chrome/browser/chromeos/login/users/chrome_user_manager_util.h" | 44 #include "chrome/browser/chromeos/login/users/chrome_user_manager_util.h" |
| 44 #include "chrome/browser/chromeos/login/users/default_user_image/default_user_im
ages.h" | 45 #include "chrome/browser/chromeos/login/users/default_user_image/default_user_im
ages.h" |
| 45 #include "chrome/browser/chromeos/login/users/multi_profile_user_controller.h" | 46 #include "chrome/browser/chromeos/login/users/multi_profile_user_controller.h" |
| 46 #include "chrome/browser/chromeos/login/users/supervised_user_manager_impl.h" | 47 #include "chrome/browser/chromeos/login/users/supervised_user_manager_impl.h" |
| 47 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" | 48 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" |
| 48 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 49 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
| 49 #include "chrome/browser/chromeos/profiles/multiprofiles_session_aborted_dialog.
h" | 50 #include "chrome/browser/chromeos/profiles/multiprofiles_session_aborted_dialog.
h" |
| 50 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 51 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 51 #include "chrome/browser/chromeos/session_length_limiter.h" | 52 #include "chrome/browser/chromeos/session_length_limiter.h" |
| 52 #include "chrome/browser/chromeos/settings/cros_settings.h" | 53 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 53 #include "chrome/browser/chromeos/system/timezone_resolver_manager.h" | 54 #include "chrome/browser/chromeos/system/timezone_resolver_manager.h" |
| 54 #include "chrome/browser/chromeos/system/timezone_util.h" | 55 #include "chrome/browser/chromeos/system/timezone_util.h" |
| 56 #include "chrome/browser/extensions/extension_tab_util.h" |
| 55 #include "chrome/browser/extensions/permissions_updater.h" | 57 #include "chrome/browser/extensions/permissions_updater.h" |
| 56 #include "chrome/browser/profiles/profile.h" | 58 #include "chrome/browser/profiles/profile.h" |
| 57 #include "chrome/browser/signin/easy_unlock_service.h" | 59 #include "chrome/browser/signin/easy_unlock_service.h" |
| 58 #include "chrome/browser/supervised_user/chromeos/manager_password_service_facto
ry.h" | 60 #include "chrome/browser/supervised_user/chromeos/manager_password_service_facto
ry.h" |
| 59 #include "chrome/browser/supervised_user/chromeos/supervised_user_password_servi
ce_factory.h" | 61 #include "chrome/browser/supervised_user/chromeos/supervised_user_password_servi
ce_factory.h" |
| 60 #include "chrome/common/chrome_constants.h" | 62 #include "chrome/common/chrome_constants.h" |
| 61 #include "chrome/common/chrome_switches.h" | 63 #include "chrome/common/chrome_switches.h" |
| 62 #include "chrome/common/crash_keys.h" | 64 #include "chrome/common/crash_keys.h" |
| 63 #include "chrome/common/pref_names.h" | 65 #include "chrome/common/pref_names.h" |
| 64 #include "chrome/grit/theme_resources.h" | 66 #include "chrome/grit/theme_resources.h" |
| (...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 835 GetUserImageManager(user->GetAccountId())->UserLoggedIn(false, true); | 837 GetUserImageManager(user->GetAccountId())->UserLoggedIn(false, true); |
| 836 WallpaperManager::Get()->EnsureLoggedInUserWallpaperLoaded(); | 838 WallpaperManager::Get()->EnsureLoggedInUserWallpaperLoaded(); |
| 837 | 839 |
| 838 // In Public Sessions set the PS delegate on PermissionsUpdater (used to | 840 // In Public Sessions set the PS delegate on PermissionsUpdater (used to |
| 839 // remove clipboard read permission from extensions in PS). This delegate will | 841 // remove clipboard read permission from extensions in PS). This delegate will |
| 840 // be active for the whole user-session and it will go away together with the | 842 // be active for the whole user-session and it will go away together with the |
| 841 // browser process during logout (the browser process is destroyed during | 843 // browser process during logout (the browser process is destroyed during |
| 842 // logout), ie. it's not freed and it leaks but that is fine. | 844 // logout), ie. it's not freed and it leaks but that is fine. |
| 843 extensions::PermissionsUpdater::SetPlatformDelegate( | 845 extensions::PermissionsUpdater::SetPlatformDelegate( |
| 844 new extensions::PermissionsUpdaterDelegateChromeOS); | 846 new extensions::PermissionsUpdaterDelegateChromeOS); |
| 847 |
| 848 // In Public Sessions set the PS delegate on ExtensionTabUtil (used to scrub |
| 849 // URL down to origin for security reasons). See comment above about |
| 850 // PermissionsUpdaterDelegateChromeOS for more info. |
| 851 extensions::ExtensionTabUtil::SetPlatformDelegate( |
| 852 new extensions::ExtensionTabUtilDelegateChromeOS); |
| 845 } | 853 } |
| 846 | 854 |
| 847 void ChromeUserManagerImpl::KioskAppLoggedIn(user_manager::User* user) { | 855 void ChromeUserManagerImpl::KioskAppLoggedIn(user_manager::User* user) { |
| 848 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 856 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
| 849 | 857 |
| 850 active_user_ = user; | 858 active_user_ = user; |
| 851 active_user_->SetStubImage( | 859 active_user_->SetStubImage( |
| 852 base::MakeUnique<user_manager::UserImage>( | 860 base::MakeUnique<user_manager::UserImage>( |
| 853 *ResourceBundle::GetSharedInstance().GetImageSkiaNamed( | 861 *ResourceBundle::GetSharedInstance().GetImageSkiaNamed( |
| 854 IDR_PROFILE_PICTURE_LOADING)), | 862 IDR_PROFILE_PICTURE_LOADING)), |
| (...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1373 break; | 1381 break; |
| 1374 default: | 1382 default: |
| 1375 NOTREACHED(); | 1383 NOTREACHED(); |
| 1376 break; | 1384 break; |
| 1377 } | 1385 } |
| 1378 | 1386 |
| 1379 return user; | 1387 return user; |
| 1380 } | 1388 } |
| 1381 | 1389 |
| 1382 } // namespace chromeos | 1390 } // namespace chromeos |
| OLD | NEW |