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

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: Comment is fixed. 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/mock_user_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/browser/chromeos/login/wizard_screen.h" 17 #include "chrome/browser/chromeos/login/wizard_screen.h"
17 #include "chrome/common/chrome_notification_types.h" 18 #include "chrome/common/chrome_notification_types.h"
18 #include "content/public/browser/notification_service.h" 19 #include "content/public/browser/notification_service.h"
19 20
20 using chromeos::CrosLibrary; 21 using chromeos::CrosLibrary;
21 using chromeos::NetworkLibrary; 22 using chromeos::NetworkLibrary;
22 using chromeos::WizardController; 23 using chromeos::WizardController;
23 24
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
507 AutomationJSONReply( 508 AutomationJSONReply(
508 automation_, 509 automation_,
509 reply_message_.release()).SendError("User email is not set"); 510 reply_message_.release()).SendError("User email is not set");
510 } 511 }
511 delete this; 512 delete this;
512 return; 513 return;
513 } 514 }
514 515
515 // Set up an observer for UserManager (it will delete itself). 516 // Set up an observer for UserManager (it will delete itself).
516 user_manager->AddObserver(this); 517 user_manager->AddObserver(this);
517 user_manager->SaveUserImage(user.email(), photo); 518 user_manager->SaveUserImage(user.email(), chromeos::UserImage(photo));
518 } 519 }
519 520
520 void PhotoCaptureObserver::LocalStateChanged( 521 void PhotoCaptureObserver::LocalStateChanged(
521 chromeos::UserManager* user_manager) { 522 chromeos::UserManager* user_manager) {
522 user_manager->RemoveObserver(this); 523 user_manager->RemoveObserver(this);
523 if (automation_) { 524 if (automation_) {
524 AutomationJSONReply( 525 AutomationJSONReply(
525 automation_, reply_message_.release()).SendSuccess(NULL); 526 automation_, reply_message_.release()).SendSuccess(NULL);
526 } 527 }
527 delete this; 528 delete this;
528 } 529 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/mock_user_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698