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); | 735 WallpaperManager::Get()->CacheUserWallpaper(email); |
Nikita (slow)
2012/08/03 18:09:39
I've just realized that this place doesn't seem li
bshe
2012/08/03 18:14:54
I see. Where do you think is the best place to sta
Nikita (slow)
2012/08/03 18:21:31
Correct. Now we have 2 ways how first user wallpap
| |
736 | 736 |
737 if (prefs_images) { | 737 if (prefs_images) { |
738 // Get account image path. | 738 // Get account image path. |
739 // TODO(avayvod): Reading image path as a string is here for | 739 // TODO(avayvod): Reading image path as a string is here for |
740 // backward compatibility. | 740 // backward compatibility. |
741 std::string image_path; | 741 std::string image_path; |
742 const base::DictionaryValue* image_properties; | 742 const base::DictionaryValue* image_properties; |
743 if (prefs_images->GetStringWithoutPathExpansion(email, &image_path)) { | 743 if (prefs_images->GetStringWithoutPathExpansion(email, &image_path)) { |
744 int image_id = User::kInvalidImageIndex; | 744 int image_id = User::kInvalidImageIndex; |
745 if (IsDefaultImagePath(image_path, &image_id)) { | 745 if (IsDefaultImagePath(image_path, &image_id)) { |
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1372 BrowserThread::PostTask( | 1372 BrowserThread::PostTask( |
1373 BrowserThread::FILE, | 1373 BrowserThread::FILE, |
1374 FROM_HERE, | 1374 FROM_HERE, |
1375 base::Bind(&UserManagerImpl::DeleteUserImage, | 1375 base::Bind(&UserManagerImpl::DeleteUserImage, |
1376 base::Unretained(this), | 1376 base::Unretained(this), |
1377 image_path)); | 1377 image_path)); |
1378 } | 1378 } |
1379 } | 1379 } |
1380 | 1380 |
1381 } // namespace chromeos | 1381 } // namespace chromeos |
OLD | NEW |