| 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/ui/webui/options/chromeos/change_picture_options_handle
     r.h" | 5 #include "chrome/browser/ui/webui/options/chromeos/change_picture_options_handle
     r.h" | 
| 6 | 6 | 
| 7 #include "ash/audio/sounds.h" | 7 #include "ash/audio/sounds.h" | 
| 8 #include "base/bind.h" | 8 #include "base/bind.h" | 
| 9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" | 
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" | 
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 70 | 70 | 
| 71   return file_type_info; | 71   return file_type_info; | 
| 72 } | 72 } | 
| 73 | 73 | 
| 74 // Time histogram suffix for profile image download. | 74 // Time histogram suffix for profile image download. | 
| 75 const char kProfileDownloadReason[] = "Preferences"; | 75 const char kProfileDownloadReason[] = "Preferences"; | 
| 76 | 76 | 
| 77 }  // namespace | 77 }  // namespace | 
| 78 | 78 | 
| 79 ChangePictureOptionsHandler::ChangePictureOptionsHandler() | 79 ChangePictureOptionsHandler::ChangePictureOptionsHandler() | 
| 80     : ImageRequest( | 80     : previous_image_url_(url::kAboutBlankURL), | 
| 81           BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI)), |  | 
| 82       previous_image_url_(url::kAboutBlankURL), |  | 
| 83       previous_image_index_(user_manager::User::USER_IMAGE_INVALID) { | 81       previous_image_index_(user_manager::User::USER_IMAGE_INVALID) { | 
| 84   registrar_.Add(this, chrome::NOTIFICATION_PROFILE_IMAGE_UPDATED, | 82   registrar_.Add(this, chrome::NOTIFICATION_PROFILE_IMAGE_UPDATED, | 
| 85       content::NotificationService::AllSources()); | 83       content::NotificationService::AllSources()); | 
| 86   registrar_.Add(this, chrome::NOTIFICATION_PROFILE_IMAGE_UPDATE_FAILED, | 84   registrar_.Add(this, chrome::NOTIFICATION_PROFILE_IMAGE_UPDATE_FAILED, | 
| 87       content::NotificationService::AllSources()); | 85       content::NotificationService::AllSources()); | 
| 88   registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_IMAGE_CHANGED, | 86   registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_IMAGE_CHANGED, | 
| 89       content::NotificationService::AllSources()); | 87       content::NotificationService::AllSources()); | 
| 90 | 88 | 
| 91   ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); | 89   ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); | 
| 92   media::SoundsManager* manager = media::SoundsManager::Get(); | 90   media::SoundsManager* manager = media::SoundsManager::Get(); | 
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 465   Profile* profile = Profile::FromWebUI(web_ui()); | 463   Profile* profile = Profile::FromWebUI(web_ui()); | 
| 466   const user_manager::User* user = | 464   const user_manager::User* user = | 
| 467       ProfileHelper::Get()->GetUserByProfile(profile); | 465       ProfileHelper::Get()->GetUserByProfile(profile); | 
| 468   if (!user) | 466   if (!user) | 
| 469     return user_manager::UserManager::Get()->GetActiveUser(); | 467     return user_manager::UserManager::Get()->GetActiveUser(); | 
| 470   return user; | 468   return user; | 
| 471 } | 469 } | 
| 472 | 470 | 
| 473 }  // namespace options | 471 }  // namespace options | 
| 474 }  // namespace chromeos | 472 }  // namespace chromeos | 
| OLD | NEW | 
|---|