| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "ash/desktop_background/desktop_background_controller.h" | 10 #include "ash/desktop_background/desktop_background_controller.h" |
| 11 #include "ash/desktop_background/desktop_background_resources.h" | 11 #include "ash/desktop_background/desktop_background_resources.h" |
| 12 #include "base/bind.h" | 12 #include "base/bind.h" |
| 13 #include "base/chromeos/chromeos_version.h" |
| 13 #include "base/command_line.h" | 14 #include "base/command_line.h" |
| 14 #include "base/compiler_specific.h" | 15 #include "base/compiler_specific.h" |
| 15 #include "base/file_path.h" | 16 #include "base/file_path.h" |
| 16 #include "base/file_util.h" | 17 #include "base/file_util.h" |
| 17 #include "base/logging.h" | 18 #include "base/logging.h" |
| 18 #include "base/memory/weak_ptr.h" | 19 #include "base/memory/weak_ptr.h" |
| 19 #include "base/metrics/histogram.h" | 20 #include "base/metrics/histogram.h" |
| 20 #include "base/path_service.h" | 21 #include "base/path_service.h" |
| 21 #include "base/rand_util.h" | 22 #include "base/rand_util.h" |
| 22 #include "base/string_util.h" | 23 #include "base/string_util.h" |
| 23 #include "base/stringprintf.h" | 24 #include "base/stringprintf.h" |
| 24 #include "base/time.h" | 25 #include "base/time.h" |
| 25 #include "base/utf_string_conversions.h" | 26 #include "base/utf_string_conversions.h" |
| 26 #include "base/values.h" | 27 #include "base/values.h" |
| 27 #include "chrome/browser/browser_process.h" | 28 #include "chrome/browser/browser_process.h" |
| 28 #include "chrome/browser/chromeos/cros/cert_library.h" | 29 #include "chrome/browser/chromeos/cros/cert_library.h" |
| 29 #include "chrome/browser/chromeos/cros/cros_library.h" | 30 #include "chrome/browser/chromeos/cros/cros_library.h" |
| 30 #include "chrome/browser/chromeos/cros_settings.h" | 31 #include "chrome/browser/chromeos/cros_settings.h" |
| 31 #include "chrome/browser/chromeos/cryptohome/async_method_caller.h" | 32 #include "chrome/browser/chromeos/cryptohome/async_method_caller.h" |
| 32 #include "chrome/browser/chromeos/dbus/cryptohome_client.h" | 33 #include "chrome/browser/chromeos/dbus/cryptohome_client.h" |
| 33 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" | 34 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" |
| 34 #include "chrome/browser/chromeos/input_method/input_method_manager.h" | 35 #include "chrome/browser/chromeos/input_method/input_method_manager.h" |
| 35 #include "chrome/browser/chromeos/login/default_user_images.h" | 36 #include "chrome/browser/chromeos/login/default_user_images.h" |
| 36 #include "chrome/browser/chromeos/login/helper.h" | 37 #include "chrome/browser/chromeos/login/helper.h" |
| 37 #include "chrome/browser/chromeos/login/login_display.h" | 38 #include "chrome/browser/chromeos/login/login_display.h" |
| 38 #include "chrome/browser/chromeos/login/ownership_service.h" | 39 #include "chrome/browser/chromeos/login/ownership_service.h" |
| 39 #include "chrome/browser/chromeos/login/remove_user_delegate.h" | 40 #include "chrome/browser/chromeos/login/remove_user_delegate.h" |
| 40 #include "chrome/browser/chromeos/system/runtime_environment.h" | |
| 41 #include "chrome/browser/policy/browser_policy_connector.h" | 41 #include "chrome/browser/policy/browser_policy_connector.h" |
| 42 #include "chrome/browser/prefs/pref_service.h" | 42 #include "chrome/browser/prefs/pref_service.h" |
| 43 #include "chrome/browser/prefs/scoped_user_pref_update.h" | 43 #include "chrome/browser/prefs/scoped_user_pref_update.h" |
| 44 #include "chrome/browser/profiles/profile_downloader.h" | 44 #include "chrome/browser/profiles/profile_downloader.h" |
| 45 #include "chrome/browser/profiles/profile_manager.h" | 45 #include "chrome/browser/profiles/profile_manager.h" |
| 46 #include "chrome/browser/sync/profile_sync_service.h" | 46 #include "chrome/browser/sync/profile_sync_service.h" |
| 47 #include "chrome/browser/sync/profile_sync_service_factory.h" | 47 #include "chrome/browser/sync/profile_sync_service_factory.h" |
| 48 #include "chrome/browser/ui/webui/web_ui_util.h" | 48 #include "chrome/browser/ui/webui/web_ui_util.h" |
| 49 #include "chrome/common/chrome_notification_types.h" | 49 #include "chrome/common/chrome_notification_types.h" |
| 50 #include "chrome/common/chrome_paths.h" | 50 #include "chrome/common/chrome_paths.h" |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 logged_in_user_(NULL), | 294 logged_in_user_(NULL), |
| 295 is_current_user_owner_(false), | 295 is_current_user_owner_(false), |
| 296 is_current_user_new_(false), | 296 is_current_user_new_(false), |
| 297 is_current_user_ephemeral_(false), | 297 is_current_user_ephemeral_(false), |
| 298 is_user_logged_in_(false), | 298 is_user_logged_in_(false), |
| 299 ephemeral_users_enabled_(false), | 299 ephemeral_users_enabled_(false), |
| 300 observed_sync_service_(NULL), | 300 observed_sync_service_(NULL), |
| 301 last_image_set_async_(false), | 301 last_image_set_async_(false), |
| 302 downloaded_profile_image_data_url_(chrome::kAboutBlankURL) { | 302 downloaded_profile_image_data_url_(chrome::kAboutBlankURL) { |
| 303 // Use stub as the logged-in user for test paths without login. | 303 // Use stub as the logged-in user for test paths without login. |
| 304 if (!system::runtime_environment::IsRunningOnChromeOS()) | 304 if (!base::chromeos::IsRunningOnChromeOS()) |
| 305 StubUserLoggedIn(); | 305 StubUserLoggedIn(); |
| 306 registrar_.Add(this, chrome::NOTIFICATION_OWNER_KEY_FETCH_ATTEMPT_SUCCEEDED, | 306 registrar_.Add(this, chrome::NOTIFICATION_OWNER_KEY_FETCH_ATTEMPT_SUCCEEDED, |
| 307 content::NotificationService::AllSources()); | 307 content::NotificationService::AllSources()); |
| 308 registrar_.Add(this, chrome::NOTIFICATION_PROFILE_ADDED, | 308 registrar_.Add(this, chrome::NOTIFICATION_PROFILE_ADDED, |
| 309 content::NotificationService::AllSources()); | 309 content::NotificationService::AllSources()); |
| 310 RetrieveTrustedDevicePolicies(); | 310 RetrieveTrustedDevicePolicies(); |
| 311 } | 311 } |
| 312 | 312 |
| 313 UserManagerImpl::~UserManagerImpl() { | 313 UserManagerImpl::~UserManagerImpl() { |
| 314 } | 314 } |
| (...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1211 BrowserThread::PostTask( | 1211 BrowserThread::PostTask( |
| 1212 BrowserThread::FILE, | 1212 BrowserThread::FILE, |
| 1213 FROM_HERE, | 1213 FROM_HERE, |
| 1214 base::Bind(&UserManagerImpl::DeleteUserImage, | 1214 base::Bind(&UserManagerImpl::DeleteUserImage, |
| 1215 base::Unretained(this), | 1215 base::Unretained(this), |
| 1216 image_path)); | 1216 image_path)); |
| 1217 } | 1217 } |
| 1218 } | 1218 } |
| 1219 | 1219 |
| 1220 } // namespace chromeos | 1220 } // namespace chromeos |
| OLD | NEW |