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/desktop_background/desktop_background_controller.h" | 9 #include "ash/desktop_background/desktop_background_controller.h" |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
724 int user_image_size = GetCurrentUserImageSize(); | 724 int user_image_size = GetCurrentUserImageSize(); |
725 | 725 |
726 if (prefs_users) { | 726 if (prefs_users) { |
727 for (ListValue::const_iterator it = prefs_users->begin(); | 727 for (ListValue::const_iterator it = prefs_users->begin(); |
728 it != prefs_users->end(); ++it) { | 728 it != prefs_users->end(); ++it) { |
729 std::string email; | 729 std::string email; |
730 if ((*it)->GetAsString(&email)) { | 730 if ((*it)->GetAsString(&email)) { |
731 User* user = CreateUser(email, /* is_ephemeral= */ false); | 731 User* user = CreateUser(email, /* is_ephemeral= */ false); |
732 users_.push_back(user); | 732 users_.push_back(user); |
733 | 733 |
734 WallpaperManager::Get()->CacheIfCustomWallpaper(email); | |
735 | |
736 if (prefs_images) { | 734 if (prefs_images) { |
737 // Get account image path. | 735 // Get account image path. |
738 // TODO(avayvod): Reading image path as a string is here for | 736 // TODO(avayvod): Reading image path as a string is here for |
739 // backward compatibility. | 737 // backward compatibility. |
740 std::string image_path; | 738 std::string image_path; |
741 const base::DictionaryValue* image_properties; | 739 const base::DictionaryValue* image_properties; |
742 if (prefs_images->GetStringWithoutPathExpansion(email, &image_path)) { | 740 if (prefs_images->GetStringWithoutPathExpansion(email, &image_path)) { |
743 int image_id = User::kInvalidImageIndex; | 741 int image_id = User::kInvalidImageIndex; |
744 if (IsDefaultImagePath(image_path, &image_id)) { | 742 if (IsDefaultImagePath(image_path, &image_id)) { |
745 user->SetImage(UserImage(GetDefaultImage(image_id)), image_id); | 743 user->SetImage(UserImage(GetDefaultImage(image_id)), image_id); |
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1372 BrowserThread::PostTask( | 1370 BrowserThread::PostTask( |
1373 BrowserThread::FILE, | 1371 BrowserThread::FILE, |
1374 FROM_HERE, | 1372 FROM_HERE, |
1375 base::Bind(&UserManagerImpl::DeleteUserImage, | 1373 base::Bind(&UserManagerImpl::DeleteUserImage, |
1376 base::Unretained(this), | 1374 base::Unretained(this), |
1377 image_path)); | 1375 image_path)); |
1378 } | 1376 } |
1379 } | 1377 } |
1380 | 1378 |
1381 } // namespace chromeos | 1379 } // namespace chromeos |
OLD | NEW |