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

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

Issue 8541002: [cros] Initial user image loading and repeated profile image loading fixes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Whitespace Created 9 years, 1 month 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_user_images.cc
diff --git a/chrome/browser/chromeos/login/default_user_images.cc b/chrome/browser/chromeos/login/default_user_images.cc
index 3757767222940a555dbf6224b6514f98ceb48337..a11fa39d9e33b9a00b5184202dd8ca457cb0ebc6 100644
--- a/chrome/browser/chromeos/login/default_user_images.cc
+++ b/chrome/browser/chromeos/login/default_user_images.cc
@@ -10,6 +10,8 @@
#include "base/string_util.h"
#include "base/stringprintf.h"
#include "grit/theme_resources.h"
+#include "third_party/skia/include/core/SkBitmap.h"
+#include "ui/base/resource/resource_bundle.h"
namespace chromeos {
@@ -93,6 +95,12 @@ bool IsDefaultImageUrl(const std::string url, int* image_id) {
return IsDefaultImageString(url, kDefaultUrlPrefix, image_id);
}
+const SkBitmap& GetDefaultImage(int index) {
+ DCHECK(index >= 0 && index < kDefaultImagesCount);
+ return *ResourceBundle::GetSharedInstance().
+ GetBitmapNamed(kDefaultImageResources[index]);
+}
+
// Resource IDs of default user images.
const int kDefaultImageResources[] = {
IDR_LOGIN_DEFAULT_USER,
« no previous file with comments | « chrome/browser/chromeos/login/default_user_images.h ('k') | chrome/browser/chromeos/login/profile_image_downloader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698