| 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 954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 965 } | 965 } |
| 966 | 966 |
| 967 void UserManagerImpl::GetLoggedInUserWallpaperProperties( | 967 void UserManagerImpl::GetLoggedInUserWallpaperProperties( |
| 968 User::WallpaperType* type, | 968 User::WallpaperType* type, |
| 969 int* index) { | 969 int* index) { |
| 970 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 970 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 971 | 971 |
| 972 if (!IsUserLoggedIn() || IsLoggedInAsStub()) { | 972 if (!IsUserLoggedIn() || IsLoggedInAsStub()) { |
| 973 *type = current_user_wallpaper_type_ = User::DEFAULT; | 973 *type = current_user_wallpaper_type_ = User::DEFAULT; |
| 974 *index = current_user_wallpaper_index_ = ash::GetInvalidWallpaperIndex(); | 974 *index = current_user_wallpaper_index_ = ash::GetInvalidWallpaperIndex(); |
| 975 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableNewOobe)) { |
| 976 bool show_users; |
| 977 CrosSettings::Get()->GetBoolean(kAccountsPrefShowUserNamesOnSignIn, |
| 978 &show_users); |
| 979 if (!show_users) |
| 980 *index = current_user_wallpaper_index_ = ash::GetSolidColorIndex(); |
| 981 } |
| 975 return; | 982 return; |
| 976 } | 983 } |
| 977 | 984 |
| 978 GetUserWallpaperProperties(GetLoggedInUser().email(), type, index); | 985 GetUserWallpaperProperties(GetLoggedInUser().email(), type, index); |
| 979 } | 986 } |
| 980 | 987 |
| 981 void UserManagerImpl::SaveLoggedInUserWallpaperProperties( | 988 void UserManagerImpl::SaveLoggedInUserWallpaperProperties( |
| 982 User::WallpaperType type, | 989 User::WallpaperType type, |
| 983 int index) { | 990 int index) { |
| 984 SaveUserWallpaperProperties(GetLoggedInUser().email(), type, index); | 991 SaveUserWallpaperProperties(GetLoggedInUser().email(), type, index); |
| (...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1461 BrowserThread::PostTask( | 1468 BrowserThread::PostTask( |
| 1462 BrowserThread::FILE, | 1469 BrowserThread::FILE, |
| 1463 FROM_HERE, | 1470 FROM_HERE, |
| 1464 base::Bind(&UserManagerImpl::DeleteUserImage, | 1471 base::Bind(&UserManagerImpl::DeleteUserImage, |
| 1465 base::Unretained(this), | 1472 base::Unretained(this), |
| 1466 image_path)); | 1473 image_path)); |
| 1467 } | 1474 } |
| 1468 } | 1475 } |
| 1469 | 1476 |
| 1470 } // namespace chromeos | 1477 } // namespace chromeos |
| OLD | NEW |