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

Unified Diff: chrome/browser/enhanced_bookmarks/android/bookmark_image_service_android.h

Issue 916783003: Restrict salient image size before storing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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/enhanced_bookmarks/android/bookmark_image_service_android.h
diff --git a/chrome/browser/enhanced_bookmarks/android/bookmark_image_service_android.h b/chrome/browser/enhanced_bookmarks/android/bookmark_image_service_android.h
index 680e8dc36cdfea838362ab0b04744f5e7a1b45c1..728c98af72619ee7af5f44239da5f7baf16b1881 100644
--- a/chrome/browser/enhanced_bookmarks/android/bookmark_image_service_android.h
+++ b/chrome/browser/enhanced_bookmarks/android/bookmark_image_service_android.h
@@ -22,7 +22,11 @@ namespace enhanced_bookmarks {
class BookmarkImageServiceAndroid : public BookmarkImageService {
public:
- explicit BookmarkImageServiceAndroid(content::BrowserContext* browserContext);
+ explicit BookmarkImageServiceAndroid(
+ content::BrowserContext* browserContext,
+ scoped_refptr<base::SequencedWorkerPool> pool);
+
+ ~BookmarkImageServiceAndroid() override;
void RetrieveSalientImage(const GURL& page_url,
const GURL& image_url,
@@ -48,9 +52,14 @@ class BookmarkImageServiceAndroid : public BookmarkImageService {
bool update_bookmark,
const base::Value* result);
+ // Resizes the image, if it is larger than device display.
+ gfx::Image ResizeImage(gfx::Image image);
+
content::BrowserContext* browser_context_;
// The script injected in a page to extract image urls.
base::string16 script_;
+ scoped_refptr<base::SequencedWorkerPool> pool_;
+ scoped_ptr<gfx::Size> max_size_;
Kibeom Kim (inactive) 2015/02/12 23:24:15 looks like this doesn't have to be scoped_ptr? (Al
Kibeom Kim (inactive) 2015/02/13 05:08:53 ping?
class BitmapFetcherHandler : private chrome::BitmapFetcherDelegate {
public:

Powered by Google App Engine
This is Rietveld 408576698