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

Unified Diff: chrome/browser/image_decoder.h

Issue 10892023: Force avatar and wallpaper decoding to use robust JPEG. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reordered. Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/login/user_image_loader.cc ('k') | chrome/browser/image_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/image_decoder.h
diff --git a/chrome/browser/image_decoder.h b/chrome/browser/image_decoder.h
index 69caa43abde465d66bae86d5146571f2e95cf8ca..24f4d89bad6070486eb3b985f6a22b52143744f3 100644
--- a/chrome/browser/image_decoder.h
+++ b/chrome/browser/image_decoder.h
@@ -33,8 +33,14 @@ class ImageDecoder : public content::UtilityProcessHostClient {
virtual ~Delegate() {}
};
+ enum ImageCodec {
+ DEFAULT_CODEC = 0, // Uses WebKit image decoding (via WebImage).
+ ROBUST_JPEG_CODEC, // Restrict decoding to robust jpeg codec.
+ };
+
ImageDecoder(Delegate* delegate,
- const std::string& image_data);
+ const std::string& image_data,
+ ImageCodec image_codec);
// Starts image decoding.
void Start();
@@ -61,6 +67,7 @@ class ImageDecoder : public content::UtilityProcessHostClient {
Delegate* delegate_;
std::vector<unsigned char> image_data_;
+ const ImageCodec image_codec_;
content::BrowserThread::ID target_thread_id_;
DISALLOW_COPY_AND_ASSIGN(ImageDecoder);
« no previous file with comments | « chrome/browser/chromeos/login/user_image_loader.cc ('k') | chrome/browser/image_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698