Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(422)

Side by Side Diff: chrome/browser/chromeos/login/user_image_manager_impl.cc

Issue 23790005: UserManager shutdown now also stops the profile image downloader. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Typo fixed. Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/chromeos/login/user_image_manager.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/user_image_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698