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 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 image_decoder_ = NULL; | 464 image_decoder_ = NULL; |
465 user_photo_ = gfx::ImageSkia::CreateFrom1xBitmap(decoded_image); | 465 user_photo_ = gfx::ImageSkia::CreateFrom1xBitmap(decoded_image); |
466 SetImageFromCamera(user_photo_); | 466 SetImageFromCamera(user_photo_); |
467 } | 467 } |
468 | 468 |
469 void ChangePictureOptionsHandler::OnDecodeImageFailed( | 469 void ChangePictureOptionsHandler::OnDecodeImageFailed( |
470 const ImageDecoder* decoder) { | 470 const ImageDecoder* decoder) { |
471 NOTREACHED() << "Failed to decode PNG image from WebUI"; | 471 NOTREACHED() << "Failed to decode PNG image from WebUI"; |
472 } | 472 } |
473 | 473 |
474 user_manager::User* ChangePictureOptionsHandler::GetUser() const { | 474 const user_manager::User* ChangePictureOptionsHandler::GetUser() const { |
475 Profile* profile = Profile::FromWebUI(web_ui()); | 475 Profile* profile = Profile::FromWebUI(web_ui()); |
476 user_manager::User* user = ProfileHelper::Get()->GetUserByProfile(profile); | 476 const user_manager::User* user = |
| 477 ProfileHelper::Get()->GetUserByProfile(profile); |
477 if (!user) | 478 if (!user) |
478 return user_manager::UserManager::Get()->GetActiveUser(); | 479 return user_manager::UserManager::Get()->GetActiveUser(); |
479 return user; | 480 return user; |
480 } | 481 } |
481 | 482 |
482 } // namespace options | 483 } // namespace options |
483 } // namespace chromeos | 484 } // namespace chromeos |
OLD | NEW |