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

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

Issue 7590002: [cros] Added histograms for user image usage (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: No write to map for default images Created 9 years, 4 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_controller.h" 5 #include "chrome/browser/chromeos/login/user_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 unselected_label_view_->SetTooltipText(tooltip_text); 202 unselected_label_view_->SetTooltipText(tooltip_text);
203 } 203 }
204 204
205 gfx::Rect UserController::GetMainInputScreenBounds() const { 205 gfx::Rect UserController::GetMainInputScreenBounds() const {
206 return user_input_->GetMainInputScreenBounds(); 206 return user_input_->GetMainInputScreenBounds();
207 } 207 }
208 208
209 void UserController::OnUserImageChanged(UserManager::User* user) { 209 void UserController::OnUserImageChanged(UserManager::User* user) {
210 if (user_.email() != user->email()) 210 if (user_.email() != user->email())
211 return; 211 return;
212 user_.set_image(user->image()); 212 user_.SetImage(user->image(), user->default_image_index());
213 // Controller might exist without windows, 213 // Controller might exist without windows,
214 // i.e. if user pod doesn't fit on the screen. 214 // i.e. if user pod doesn't fit on the screen.
215 if (user_view_) 215 if (user_view_)
216 user_view_->SetImage(user_.image(), user_.image()); 216 user_view_->SetImage(user_.image(), user_.image());
217 } 217 }
218 218
219 void UserController::SelectUserRelative(int shift) { 219 void UserController::SelectUserRelative(int shift) {
220 delegate_->SelectUser(user_index() + shift); 220 delegate_->SelectUser(user_index() + shift);
221 } 221 }
222 222
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 std::wstring UserController::GetNameTooltip() const { 523 std::wstring UserController::GetNameTooltip() const {
524 if (is_new_user_) 524 if (is_new_user_)
525 return UTF16ToWide(l10n_util::GetStringUTF16(IDS_ADD_USER)); 525 return UTF16ToWide(l10n_util::GetStringUTF16(IDS_ADD_USER));
526 else if (is_guest_) 526 else if (is_guest_)
527 return UTF16ToWide(l10n_util::GetStringUTF16(IDS_GO_INCOGNITO_BUTTON)); 527 return UTF16ToWide(l10n_util::GetStringUTF16(IDS_GO_INCOGNITO_BUTTON));
528 else 528 else
529 return UTF8ToWide(user_.GetNameTooltip()); 529 return UTF8ToWide(user_.GetNameTooltip());
530 } 530 }
531 531
532 } // namespace chromeos 532 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/user_image_screen.cc » ('j') | chrome/browser/chromeos/login/user_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698