| 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" |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 UserManagerImpl::UserManagerImpl() | 285 UserManagerImpl::UserManagerImpl() |
| 286 : ALLOW_THIS_IN_INITIALIZER_LIST(image_loader_(new UserImageLoader)), | 286 : ALLOW_THIS_IN_INITIALIZER_LIST(image_loader_(new UserImageLoader)), |
| 287 logged_in_user_(NULL), | 287 logged_in_user_(NULL), |
| 288 is_current_user_owner_(false), | 288 is_current_user_owner_(false), |
| 289 is_current_user_new_(false), | 289 is_current_user_new_(false), |
| 290 is_current_user_ephemeral_(false), | 290 is_current_user_ephemeral_(false), |
| 291 ephemeral_users_enabled_(false), | 291 ephemeral_users_enabled_(false), |
| 292 observed_sync_service_(NULL), | 292 observed_sync_service_(NULL), |
| 293 last_image_set_async_(false), | 293 last_image_set_async_(false), |
| 294 downloaded_profile_image_data_url_(chrome::kAboutBlankURL) { | 294 downloaded_profile_image_data_url_(chrome::kAboutBlankURL) { |
| 295 // Use stub as the logged-in user for test paths without login. | 295 // If we're not running on ChromeOS, and are not showing the login manager |
| 296 if (!base::chromeos::IsRunningOnChromeOS()) | 296 // or attempting a command line login? Then login the stub user. |
| 297 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 298 if (!base::chromeos::IsRunningOnChromeOS() && |
| 299 !command_line->HasSwitch(switches::kLoginManager) && |
| 300 !command_line->HasSwitch(switches::kLoginPassword)) { |
| 297 StubUserLoggedIn(); | 301 StubUserLoggedIn(); |
| 302 } |
| 303 |
| 298 registrar_.Add(this, chrome::NOTIFICATION_OWNER_KEY_FETCH_ATTEMPT_SUCCEEDED, | 304 registrar_.Add(this, chrome::NOTIFICATION_OWNER_KEY_FETCH_ATTEMPT_SUCCEEDED, |
| 299 content::NotificationService::AllSources()); | 305 content::NotificationService::AllSources()); |
| 300 registrar_.Add(this, chrome::NOTIFICATION_PROFILE_ADDED, | 306 registrar_.Add(this, chrome::NOTIFICATION_PROFILE_ADDED, |
| 301 content::NotificationService::AllSources()); | 307 content::NotificationService::AllSources()); |
| 302 RetrieveTrustedDevicePolicies(); | 308 RetrieveTrustedDevicePolicies(); |
| 303 } | 309 } |
| 304 | 310 |
| 305 UserManagerImpl::~UserManagerImpl() { | 311 UserManagerImpl::~UserManagerImpl() { |
| 306 // Can't use STLDeleteElements because of the private destructor of User. | 312 // Can't use STLDeleteElements because of the private destructor of User. |
| 307 for (size_t i = 0; i < users_.size();++i) | 313 for (size_t i = 0; i < users_.size();++i) |
| (...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1212 BrowserThread::PostTask( | 1218 BrowserThread::PostTask( |
| 1213 BrowserThread::FILE, | 1219 BrowserThread::FILE, |
| 1214 FROM_HERE, | 1220 FROM_HERE, |
| 1215 base::Bind(&UserManagerImpl::DeleteUserImage, | 1221 base::Bind(&UserManagerImpl::DeleteUserImage, |
| 1216 base::Unretained(this), | 1222 base::Unretained(this), |
| 1217 image_path)); | 1223 image_path)); |
| 1218 } | 1224 } |
| 1219 } | 1225 } |
| 1220 | 1226 |
| 1221 } // namespace chromeos | 1227 } // namespace chromeos |
| OLD | NEW |