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 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
725 int user_image_size = GetCurrentUserImageSize(); | 725 int user_image_size = GetCurrentUserImageSize(); |
726 | 726 |
727 if (prefs_users) { | 727 if (prefs_users) { |
728 for (ListValue::const_iterator it = prefs_users->begin(); | 728 for (ListValue::const_iterator it = prefs_users->begin(); |
729 it != prefs_users->end(); ++it) { | 729 it != prefs_users->end(); ++it) { |
730 std::string email; | 730 std::string email; |
731 if ((*it)->GetAsString(&email)) { | 731 if ((*it)->GetAsString(&email)) { |
732 User* user = CreateUser(email, /* is_ephemeral= */ false); | 732 User* user = CreateUser(email, /* is_ephemeral= */ false); |
733 users_.push_back(user); | 733 users_.push_back(user); |
734 | 734 |
735 WallpaperManager::Get()->CacheIfCustomWallpaper(email); | |
736 | |
737 if (prefs_images) { | 735 if (prefs_images) { |
738 // Get account image path. | 736 // Get account image path. |
739 // TODO(avayvod): Reading image path as a string is here for | 737 // TODO(avayvod): Reading image path as a string is here for |
740 // backward compatibility. | 738 // backward compatibility. |
741 std::string image_path; | 739 std::string image_path; |
742 const base::DictionaryValue* image_properties; | 740 const base::DictionaryValue* image_properties; |
743 if (prefs_images->GetStringWithoutPathExpansion(email, &image_path)) { | 741 if (prefs_images->GetStringWithoutPathExpansion(email, &image_path)) { |
744 int image_id = User::kInvalidImageIndex; | 742 int image_id = User::kInvalidImageIndex; |
745 if (IsDefaultImagePath(image_path, &image_id)) { | 743 if (IsDefaultImagePath(image_path, &image_id)) { |
746 user->SetImage(UserImage(GetDefaultImage(image_id)), image_id); | 744 user->SetImage(UserImage(GetDefaultImage(image_id)), image_id); |
(...skipping 625 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 |