OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 | 410 |
411 void UserImageManagerImpl::DownloadProfileImage(const std::string& reason) { | 411 void UserImageManagerImpl::DownloadProfileImage(const std::string& reason) { |
412 DownloadProfileData(reason, true); | 412 DownloadProfileData(reason, true); |
413 } | 413 } |
414 | 414 |
415 UserImageSyncObserver* UserImageManagerImpl::GetSyncObserver() const { | 415 UserImageSyncObserver* UserImageManagerImpl::GetSyncObserver() const { |
416 return user_image_sync_observer_.get(); | 416 return user_image_sync_observer_.get(); |
417 } | 417 } |
418 | 418 |
419 void UserImageManagerImpl::Shutdown() { | 419 void UserImageManagerImpl::Shutdown() { |
| 420 profile_image_downloader_.reset(); |
420 user_image_sync_observer_.reset(); | 421 user_image_sync_observer_.reset(); |
421 } | 422 } |
422 | 423 |
423 const gfx::ImageSkia& UserImageManagerImpl::DownloadedProfileImage() const { | 424 const gfx::ImageSkia& UserImageManagerImpl::DownloadedProfileImage() const { |
424 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 425 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
425 return downloaded_profile_image_; | 426 return downloaded_profile_image_; |
426 } | 427 } |
427 | 428 |
428 base::FilePath UserImageManagerImpl::GetImagePathForUser( | 429 base::FilePath UserImageManagerImpl::GetImagePathForUser( |
429 const std::string& username) { | 430 const std::string& username) { |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
793 if (prefs_images_update->GetDictionaryWithoutPathExpansion( | 794 if (prefs_images_update->GetDictionaryWithoutPathExpansion( |
794 username, &image_properties)) { | 795 username, &image_properties)) { |
795 std::string image_path; | 796 std::string image_path; |
796 image_properties->GetString(kImagePathNodeName, &image_path); | 797 image_properties->GetString(kImagePathNodeName, &image_path); |
797 prefs_images_update->RemoveWithoutPathExpansion(username, NULL); | 798 prefs_images_update->RemoveWithoutPathExpansion(username, NULL); |
798 DeleteImageFile(image_path); | 799 DeleteImageFile(image_path); |
799 } | 800 } |
800 } | 801 } |
801 | 802 |
802 } // namespace chromeos | 803 } // namespace chromeos |
OLD | NEW |