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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 | 68 |
69 return file_type_info; | 69 return file_type_info; |
70 } | 70 } |
71 | 71 |
72 // Time histogram suffix for profile image download. | 72 // Time histogram suffix for profile image download. |
73 const char kProfileDownloadReason[] = "Preferences"; | 73 const char kProfileDownloadReason[] = "Preferences"; |
74 | 74 |
75 } // namespace | 75 } // namespace |
76 | 76 |
77 ChangePictureOptionsHandler::ChangePictureOptionsHandler() | 77 ChangePictureOptionsHandler::ChangePictureOptionsHandler() |
78 : previous_image_url_(content::kAboutBlankURL), | 78 : previous_image_url_(url::kAboutBlankURL), |
79 previous_image_index_(User::kInvalidImageIndex) { | 79 previous_image_index_(User::kInvalidImageIndex) { |
80 registrar_.Add(this, chrome::NOTIFICATION_PROFILE_IMAGE_UPDATED, | 80 registrar_.Add(this, chrome::NOTIFICATION_PROFILE_IMAGE_UPDATED, |
81 content::NotificationService::AllSources()); | 81 content::NotificationService::AllSources()); |
82 registrar_.Add(this, chrome::NOTIFICATION_PROFILE_IMAGE_UPDATE_FAILED, | 82 registrar_.Add(this, chrome::NOTIFICATION_PROFILE_IMAGE_UPDATE_FAILED, |
83 content::NotificationService::AllSources()); | 83 content::NotificationService::AllSources()); |
84 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_IMAGE_CHANGED, | 84 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_IMAGE_CHANGED, |
85 content::NotificationService::AllSources()); | 85 content::NotificationService::AllSources()); |
86 | 86 |
87 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); | 87 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); |
88 media::SoundsManager* manager = media::SoundsManager::Get(); | 88 media::SoundsManager* manager = media::SoundsManager::Get(); |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 User* ChangePictureOptionsHandler::GetUser() const { | 465 User* ChangePictureOptionsHandler::GetUser() const { |
466 Profile* profile = Profile::FromWebUI(web_ui()); | 466 Profile* profile = Profile::FromWebUI(web_ui()); |
467 User* user = UserManager::Get()->GetUserByProfile(profile); | 467 User* user = UserManager::Get()->GetUserByProfile(profile); |
468 if (!user) | 468 if (!user) |
469 return UserManager::Get()->GetActiveUser(); | 469 return UserManager::Get()->GetActiveUser(); |
470 return user; | 470 return user; |
471 } | 471 } |
472 | 472 |
473 } // namespace options | 473 } // namespace options |
474 } // namespace chromeos | 474 } // namespace chromeos |
OLD | NEW |