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

Side by Side Diff: chrome/browser/chromeos/login/user_image_screen.cc

Issue 10537073: [cros] Fix broken profile image on Options/Change picture page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/user_manager_impl.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/chromeos/login/user_image_screen.h" 5 #include "chrome/browser/chromeos/login/user_image_screen.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/metrics/histogram.h" 8 #include "base/metrics/histogram.h"
9 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" 9 #include "chrome/browser/chromeos/accessibility/accessibility_util.h"
10 #include "chrome/browser/chromeos/login/default_user_images.h" 10 #include "chrome/browser/chromeos/login/default_user_images.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 bool is_screen_locked = *content::Details<bool>(details).ptr(); 161 bool is_screen_locked = *content::Details<bool>(details).ptr();
162 if (is_screen_locked) 162 if (is_screen_locked)
163 StopCamera(); 163 StopCamera();
164 else if (actor_ && actor_->IsCapturing()) 164 else if (actor_ && actor_->IsCapturing())
165 StartCamera(); 165 StartCamera();
166 break; 166 break;
167 } 167 }
168 case chrome::NOTIFICATION_PROFILE_IMAGE_UPDATED: { 168 case chrome::NOTIFICATION_PROFILE_IMAGE_UPDATED: {
169 // We've got a new profile image. 169 // We've got a new profile image.
170 if (actor_) { 170 if (actor_) {
171 gfx::ImageSkia profile_image( 171 actor_->AddProfileImage(
172 *content::Details<const SkBitmap>(details).ptr()); 172 *content::Details<const gfx::ImageSkia>(details).ptr());
173 actor_->AddProfileImage(profile_image);
174 } 173 }
175 break; 174 break;
176 } 175 }
177 case chrome::NOTIFICATION_PROFILE_IMAGE_UPDATE_FAILED: { 176 case chrome::NOTIFICATION_PROFILE_IMAGE_UPDATE_FAILED: {
178 // User has a default profile image or fetching profile image has failed. 177 // User has a default profile image or fetching profile image has failed.
179 if (actor_) 178 if (actor_)
180 actor_->OnProfileImageAbsent(); 179 actor_->OnProfileImageAbsent();
181 break; 180 break;
182 } 181 }
183 default: 182 default:
184 NOTREACHED(); 183 NOTREACHED();
185 } 184 }
186 } 185 }
187 186
188 } // namespace chromeos 187 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/user_manager_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698