diff options
author | lpromero <lpromero@chromium.org> | 2015-01-23 12:17:36 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-23 20:18:40 +0000 |
commit | a110f52e83cebd2b6f0ed37c34abeac8bfcb1b72 (patch) | |
tree | b0054fe1a2bbb25a9532fb7a1b9a1decb5b62a6d /components/enhanced_bookmarks/persistent_image_store.h | |
parent | 921392d21263c05b374d94ae3da3120094cd6a65 (diff) | |
download | chromium_src-a110f52e83cebd2b6f0ed37c34abeac8bfcb1b72.zip chromium_src-a110f52e83cebd2b6f0ed37c34abeac8bfcb1b72.tar.gz chromium_src-a110f52e83cebd2b6f0ed37c34abeac8bfcb1b72.tar.bz2 |
★ Record the image dominant color in the image database.
This CL adds a column in the bookmarks images database.
It contains the dominant color extracted from the image.
Since this computation can be lengthy, it is done in the background, when the
image is stored in the database.
For old databases, a migration path is provided and the dominant color is
computed and stored upon querying the image for the first time.
BUG=448443
Review URL: https://codereview.chromium.org/875463003
Cr-Commit-Position: refs/heads/master@{#312916}
Diffstat (limited to 'components/enhanced_bookmarks/persistent_image_store.h')
-rw-r--r-- | components/enhanced_bookmarks/persistent_image_store.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/components/enhanced_bookmarks/persistent_image_store.h b/components/enhanced_bookmarks/persistent_image_store.h index bc715a5..5a0c41d 100644 --- a/components/enhanced_bookmarks/persistent_image_store.h +++ b/components/enhanced_bookmarks/persistent_image_store.h @@ -10,6 +10,7 @@ #include "base/files/file_path.h" #include "sql/connection.h" #include "sql/init_status.h" +#include "sql/meta_table.h" // The PersistentImageStore is an implementation of ImageStore that persists its // data on disk. @@ -19,10 +20,9 @@ class PersistentImageStore : public ImageStore { explicit PersistentImageStore(const base::FilePath& path); bool HasKey(const GURL& page_url) override; void Insert(const GURL& page_url, - const GURL& image_url, - const gfx::Image& image) override; + const enhanced_bookmarks::ImageRecord& image) override; void Erase(const GURL& page_url) override; - std::pair<gfx::Image, GURL> Get(const GURL& page_url) override; + enhanced_bookmarks::ImageRecord Get(const GURL& page_url) override; gfx::Size GetSize(const GURL& page_url) override; void GetAllPageUrls(std::set<GURL>* urls) override; void ClearAll() override; @@ -36,6 +36,7 @@ class PersistentImageStore : public ImageStore { const base::FilePath path_; sql::Connection db_; + sql::MetaTable meta_table_; DISALLOW_COPY_AND_ASSIGN(PersistentImageStore); }; |