Chromium Code Reviews| Index: components/enhanced_bookmarks/bookmark_image_service.h |
| diff --git a/components/enhanced_bookmarks/bookmark_image_service.h b/components/enhanced_bookmarks/bookmark_image_service.h |
| index 5bf2637ca9e039da6c64a8ab58d06e408c887012..fcd60f9dc3a4d3be94816d9026a5d1a6b7e1be07 100644 |
| --- a/components/enhanced_bookmarks/bookmark_image_service.h |
| +++ b/components/enhanced_bookmarks/bookmark_image_service.h |
| @@ -80,8 +80,8 @@ class BookmarkImageService : public KeyedService, |
| // Returns true if the image for the page_url is currently being fetched. |
| bool IsPageUrlInProgress(const GURL& page_url); |
| - // Once an image has been retrieved, store the image and notify all the |
| - // consumers that were waiting on it. |
| + // Stores the image to local. If update_bookmarks is true, relates the |
|
lpromero
2015/02/04 13:54:51
s/local/local storage.
Ian Wen
2015/02/05 18:33:17
Done.
|
| + // corresponding bookmark to image_url. |
| void ProcessNewImage(const GURL& page_url, |
| bool update_bookmarks, |
| const gfx::Image& image, |
| @@ -109,11 +109,14 @@ class BookmarkImageService : public KeyedService, |
| EnhancedBookmarkModel* enhanced_bookmark_model_; |
| private: |
| - // Same as SalientImageForUrl(const GURL&, ImageCallback) but can |
| - // prevent the network request if fetch_from_bookmark is false. |
| - void SalientImageForUrl(const GURL& page_url, |
| - bool fetch_from_bookmark, |
| - ImageCallback stack_callback); |
| + // Retrieve the salient image associated with page_url from local storage. |
|
lpromero
2015/02/04 13:54:51
s/Retrieve/Retrieves
Ian Wen
2015/02/05 18:33:17
Done.
|
| + void SalientImageFromLocal(const GURL& page_url, ImageCallback callback); |
| + |
| + // If the salient image of the page_url has already been stored locally, this |
| + // method is identical to SalientImageFromLocal. Otherwise, it first downloads |
| + // the image (if any), stores it to local storage, then call |
| + // SalientImageFromLocal. |
| + void SalientImageFromWeb(const GURL& page_url, ImageCallback callback); |
| // Processes the requests that have been waiting on an image. |
| void ProcessRequests(const GURL& page_url, const ImageRecord& image); |