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

Unified Diff: components/suggestions/image_manager.h

Issue 634273002: Revert of [Suggestions] Create ImageEncoder, to abstract away image encode/decode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « components/suggestions/image_encoder.h ('k') | components/suggestions/image_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/suggestions/image_manager.h
diff --git a/components/suggestions/image_manager.h b/components/suggestions/image_manager.h
index 76f8a94b3cdc7fc3bbdbebc2a0ccc84b0e576b68..02ec268144850bf0bbf9d9f622d0ee951bcdaf1f 100644
--- a/components/suggestions/image_manager.h
+++ b/components/suggestions/image_manager.h
@@ -28,7 +28,6 @@
namespace suggestions {
class ImageData;
-class ImageEncoder;
class ImageFetcher;
class SuggestionsProfile;
@@ -38,10 +37,7 @@
public:
typedef std::vector<ImageData> ImageDataVector;
- // This class takes ownership of |image_fetcher|, |image_encoder| and
- // |database|.
ImageManager(scoped_ptr<ImageFetcher> image_fetcher,
- scoped_ptr<ImageEncoder> image_encoder,
scoped_ptr<leveldb_proto::ProtoDatabase<ImageData> > database,
const base::FilePath& database_dir);
virtual ~ImageManager();
@@ -123,6 +119,11 @@
void ServePendingCacheRequests();
+ // From SkBitmap to the vector of JPEG-encoded bytes, |dst|. Visible only for
+ // testing.
+ static bool EncodeImage(const SkBitmap& bitmap,
+ std::vector<unsigned char>* dest);
+
// Map from URL to image URL. Should be kept up to date when a new
// SuggestionsProfile is available.
std::map<GURL, GURL> image_url_map_;
@@ -135,8 +136,6 @@
ImageMap image_map_;
scoped_ptr<ImageFetcher> image_fetcher_;
-
- scoped_ptr<ImageEncoder> image_encoder_;
scoped_ptr<leveldb_proto::ProtoDatabase<ImageData> > database_;
« no previous file with comments | « components/suggestions/image_encoder.h ('k') | components/suggestions/image_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698