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

Side by Side Diff: chrome/browser/automation/automation_provider_observers_chromeos.cc

Issue 10454044: Added support for animated/nonanimated user image. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Deleted useless inclusions. Created 8 years, 6 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/automation/automation_provider_observers.h" 5 #include "chrome/browser/automation/automation_provider_observers.h"
6 6
7 #include "base/values.h" 7 #include "base/values.h"
8 #include "chrome/browser/automation/automation_provider.h" 8 #include "chrome/browser/automation/automation_provider.h"
9 #include "chrome/browser/chromeos/cros/cros_library.h" 9 #include "chrome/browser/chromeos/cros/cros_library.h"
10 #include "chrome/browser/chromeos/login/authentication_notification_details.h" 10 #include "chrome/browser/chromeos/login/authentication_notification_details.h"
11 #include "chrome/browser/chromeos/login/enrollment/enterprise_enrollment_screen_ actor.h" 11 #include "chrome/browser/chromeos/login/enrollment/enterprise_enrollment_screen_ actor.h"
12 #include "chrome/browser/chromeos/login/existing_user_controller.h" 12 #include "chrome/browser/chromeos/login/existing_user_controller.h"
13 #include "chrome/browser/chromeos/login/screen_locker.h" 13 #include "chrome/browser/chromeos/login/screen_locker.h"
14 #include "chrome/browser/chromeos/login/user_image.h"
14 #include "chrome/browser/chromeos/login/user_manager.h" 15 #include "chrome/browser/chromeos/login/user_manager.h"
15 #include "chrome/browser/chromeos/login/wizard_controller.h" 16 #include "chrome/browser/chromeos/login/wizard_controller.h"
16 #include "chrome/common/chrome_notification_types.h" 17 #include "chrome/common/chrome_notification_types.h"
17 #include "content/public/browser/notification_service.h" 18 #include "content/public/browser/notification_service.h"
18 19
19 using chromeos::CrosLibrary; 20 using chromeos::CrosLibrary;
20 using chromeos::NetworkLibrary; 21 using chromeos::NetworkLibrary;
21 22
22 NetworkManagerInitObserver::NetworkManagerInitObserver( 23 NetworkManagerInitObserver::NetworkManagerInitObserver(
23 AutomationProvider* automation) 24 AutomationProvider* automation)
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 AutomationJSONReply( 444 AutomationJSONReply(
444 automation_, 445 automation_,
445 reply_message_.release()).SendError("User email is not set"); 446 reply_message_.release()).SendError("User email is not set");
446 } 447 }
447 delete this; 448 delete this;
448 return; 449 return;
449 } 450 }
450 451
451 // Set up an observer for UserManager (it will delete itself). 452 // Set up an observer for UserManager (it will delete itself).
452 user_manager->AddObserver(this); 453 user_manager->AddObserver(this);
453 user_manager->SaveUserImage(user.email(), photo); 454 user_manager->SaveUserImage(user.email(), chromeos::UserImage(photo));
454 } 455 }
455 456
456 void PhotoCaptureObserver::LocalStateChanged( 457 void PhotoCaptureObserver::LocalStateChanged(
457 chromeos::UserManager* user_manager) { 458 chromeos::UserManager* user_manager) {
458 user_manager->RemoveObserver(this); 459 user_manager->RemoveObserver(this);
459 if (automation_) { 460 if (automation_) {
460 AutomationJSONReply( 461 AutomationJSONReply(
461 automation_, reply_message_.release()).SendSuccess(NULL); 462 automation_, reply_message_.release()).SendSuccess(NULL);
462 } 463 }
463 delete this; 464 delete this;
464 } 465 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/user.h » ('j') | chrome/browser/chromeos/login/user_image.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698