| 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_image_manager_impl.h" |    5 #include "chrome/browser/chromeos/login/user_image_manager_impl.h" | 
|    6  |    6  | 
|    7 #include "base/bind.h" |    7 #include "base/bind.h" | 
|    8 #include "base/file_path.h" |    8 #include "base/file_path.h" | 
|    9 #include "base/file_util.h" |    9 #include "base/file_util.h" | 
|   10 #include "base/logging.h" |   10 #include "base/logging.h" | 
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  162   } |  162   } | 
|  163 } |  163 } | 
|  164  |  164  | 
|  165 }  // namespace |  165 }  // namespace | 
|  166  |  166  | 
|  167 // static |  167 // static | 
|  168 int UserImageManagerImpl::user_image_migration_delay_sec = |  168 int UserImageManagerImpl::user_image_migration_delay_sec = | 
|  169     kUserImageMigrationDelaySec; |  169     kUserImageMigrationDelaySec; | 
|  170  |  170  | 
|  171 // static |  171 // static | 
|  172 void UserImageManager::RegisterPrefs(PrefService* local_state) { |  172 void UserImageManager::RegisterPrefs(PrefServiceSimple* local_state) { | 
|  173   local_state->RegisterDictionaryPref(kUserImages, |  173   local_state->RegisterDictionaryPref(kUserImages); | 
|  174                                       PrefService::UNSYNCABLE_PREF); |  174   local_state->RegisterDictionaryPref(kUserImageProperties); | 
|  175   local_state->RegisterDictionaryPref(kUserImageProperties, |  | 
|  176                                       PrefService::UNSYNCABLE_PREF); |  | 
|  177 } |  175 } | 
|  178  |  176  | 
|  179 UserImageManagerImpl::UserImageManagerImpl() |  177 UserImageManagerImpl::UserImageManagerImpl() | 
|  180     : image_loader_(new UserImageLoader(ImageDecoder::ROBUST_JPEG_CODEC)), |  178     : image_loader_(new UserImageLoader(ImageDecoder::ROBUST_JPEG_CODEC)), | 
|  181       unsafe_image_loader_(new UserImageLoader(ImageDecoder::DEFAULT_CODEC)), |  179       unsafe_image_loader_(new UserImageLoader(ImageDecoder::DEFAULT_CODEC)), | 
|  182       last_image_set_async_(false), |  180       last_image_set_async_(false), | 
|  183       downloaded_profile_image_data_url_(chrome::kAboutBlankURL), |  181       downloaded_profile_image_data_url_(chrome::kAboutBlankURL), | 
|  184       downloading_profile_image_(false), |  182       downloading_profile_image_(false), | 
|  185       migrate_current_user_on_load_(false) { |  183       migrate_current_user_on_load_(false) { | 
|  186 } |  184 } | 
| (...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  736   if (prefs_images_update->GetDictionaryWithoutPathExpansion( |  734   if (prefs_images_update->GetDictionaryWithoutPathExpansion( | 
|  737           username, &image_properties)) { |  735           username, &image_properties)) { | 
|  738     std::string image_path; |  736     std::string image_path; | 
|  739     image_properties->GetString(kImagePathNodeName, &image_path); |  737     image_properties->GetString(kImagePathNodeName, &image_path); | 
|  740     prefs_images_update->RemoveWithoutPathExpansion(username, NULL); |  738     prefs_images_update->RemoveWithoutPathExpansion(username, NULL); | 
|  741     DeleteImageFile(image_path); |  739     DeleteImageFile(image_path); | 
|  742   } |  740   } | 
|  743 } |  741 } | 
|  744  |  742  | 
|  745 }  // namespace chromeos |  743 }  // namespace chromeos | 
| OLD | NEW |