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

Unified Diff: chrome/browser/chromeos/login/user_image.h

Issue 10830111: [cros] Encode user images when set from WebUI (regression fix). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes Created 8 years, 5 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
« no previous file with comments | « chrome/browser/chromeos/login/user.cc ('k') | chrome/browser/chromeos/login/user_image.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/user_image.h
diff --git a/chrome/browser/chromeos/login/user_image.h b/chrome/browser/chromeos/login/user_image.h
index 0afb26649330be96cc24b67cc66df17aeb05f691..b2a52f9f9cf7e9e76ef62f716354903f4748fec8 100644
--- a/chrome/browser/chromeos/login/user_image.h
+++ b/chrome/browser/chromeos/login/user_image.h
@@ -20,6 +20,10 @@ class UserImage {
// TODO(ivankr): replace with RefCountedMemory to prevent copying.
typedef std::vector<unsigned char> RawImage;
+ // Creates a new instance from a given still frame and tries to encode raw
+ // representation for it.
+ static UserImage CreateAndEncode(const gfx::ImageSkia& image);
darin (slow to review) 2012/08/02 22:15:30 maybe it would be helpful to invent factory style
+
// Create instance with an empty still frame and no raw data.
UserImage();
@@ -40,6 +44,9 @@ class UserImage {
bool has_raw_image() const { return has_raw_image_; }
const RawImage& raw_image() const { return raw_image_; }
+ // Discards the stored raw image, freeing used memory.
+ void DiscardRawImage();
+
// Optional raw representation of the animated image.
bool has_animated_image() const { return has_animated_image_; }
const RawImage& animated_image() const { return animated_image_; }
« no previous file with comments | « chrome/browser/chromeos/login/user.cc ('k') | chrome/browser/chromeos/login/user_image.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698