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

Unified Diff: chrome/browser/chromeos/login/default_images_view.cc

Issue 7015041: [cros] Update default avatars and guest icon (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Select the default picture. Added two more avatars. Created 9 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/login/default_images_view.cc
diff --git a/chrome/browser/chromeos/login/default_images_view.cc b/chrome/browser/chromeos/login/default_images_view.cc
index 8996d1038c48d51fa2475fb23a2f1384cdbfa417..3604f1d82d826fd777027d8d06c8966fb13bbc82 100644
--- a/chrome/browser/chromeos/login/default_images_view.cc
+++ b/chrome/browser/chromeos/login/default_images_view.cc
@@ -108,6 +108,12 @@ int DefaultImagesView::GetDefaultImageIndex() const {
return selected_image_index_ - 1;
}
+void DefaultImagesView::SetDefaultImageIndex(int image_index) {
+ selected_image_index_ = image_index + 1;
Nikita (slow) 2011/05/16 16:45:16 nit: Please comment that we're skipping camera ima
whywhat 2011/05/17 12:25:43 Done. I introduced a named constant and put a comm
+ if (delegate_)
+ delegate_->OnImageSelected(image_index % kDefaultImagesCount);
+}
+
void DefaultImagesView::ClearSelection() {
selected_image_index_ = -1;
}
@@ -141,9 +147,7 @@ void DefaultImagesView::ButtonPressed(views::Button* sender,
NOTREACHED() << "Got ButtonPressed event from a view with wrong id.";
return;
}
- selected_image_index_ = image_index + 1;
- if (delegate_)
- delegate_->OnImageSelected(image_index % kDefaultImagesCount);
+ SetDefaultImageIndex(image_index);
}
}
« no previous file with comments | « chrome/browser/chromeos/login/default_images_view.h ('k') | chrome/browser/chromeos/login/default_user_images.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698