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

Unified Diff: chrome/browser/ui/webui/settings/chromeos/change_picture_handler.cc

Issue 2480203002: ui: Cleanup class/struct forward declarations (Closed)
Patch Set: Sync CL to position 430550 Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/settings/chromeos/change_picture_handler.cc
diff --git a/chrome/browser/ui/webui/settings/chromeos/change_picture_handler.cc b/chrome/browser/ui/webui/settings/chromeos/change_picture_handler.cc
index f83a8b2a6e546a2f56d090642e279be67872d2f2..f9b74b654da29c97bc358f79124e4760b836fa67 100644
--- a/chrome/browser/ui/webui/settings/chromeos/change_picture_handler.cc
+++ b/chrome/browser/ui/webui/settings/chromeos/change_picture_handler.cc
@@ -122,10 +122,14 @@ void ChangePictureHandler::OnJavascriptAllowed() {
content::NotificationService::AllSources());
registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_IMAGE_CHANGED,
content::NotificationService::AllSources());
+
+ camera_observer_.Add(CameraPresenceNotifier::GetInstance());
}
void ChangePictureHandler::OnJavascriptDisallowed() {
registrar_.RemoveAll();
+
+ camera_observer_.Remove(CameraPresenceNotifier::GetInstance());
}
void ChangePictureHandler::SendDefaultImages() {
@@ -204,10 +208,6 @@ void ChangePictureHandler::HandlePageInitialized(const base::ListValue* args) {
AllowJavascript();
- CameraPresenceNotifier* camera = CameraPresenceNotifier::GetInstance();
- if (!camera_observer_.IsObserving(camera))
- camera_observer_.Add(camera);
-
SendDefaultImages();
SendSelectedImage();
UpdateProfileImage();
« no previous file with comments | « chrome/browser/ui/webui/options/browser_options_handler.cc ('k') | chrome/browser/ui/webui/settings/md_settings_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698