| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef COMPONENTS_ENHANCED_BOOKMARKS_IMAGE_STORE_H_ | 5 #ifndef COMPONENTS_ENHANCED_BOOKMARKS_IMAGE_STORE_H_ |
| 6 #define COMPONENTS_ENHANCED_BOOKMARKS_IMAGE_STORE_H_ | 6 #define COMPONENTS_ENHANCED_BOOKMARKS_IMAGE_STORE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 | 45 |
| 46 // Populates |urls| with all the urls that have an image in the store. | 46 // Populates |urls| with all the urls that have an image in the store. |
| 47 virtual void GetAllPageUrls(std::set<GURL>* urls) = 0; | 47 virtual void GetAllPageUrls(std::set<GURL>* urls) = 0; |
| 48 | 48 |
| 49 // Removes all images. | 49 // Removes all images. |
| 50 virtual void ClearAll() = 0; | 50 virtual void ClearAll() = 0; |
| 51 | 51 |
| 52 // Moves an image from one url to another. | 52 // Moves an image from one url to another. |
| 53 void ChangeImageURL(const GURL& from, const GURL& to); | 53 void ChangeImageURL(const GURL& from, const GURL& to); |
| 54 | 54 |
| 55 // Returns the saved images storage size in bytes. If the storage doesn't |
| 56 // exist yet or failed to read, returns -1. |
| 57 virtual int64 GetStoreSizeInBytes() = 0; |
| 58 |
| 55 protected: | 59 protected: |
| 56 base::SequenceChecker sequence_checker_; | 60 base::SequenceChecker sequence_checker_; |
| 57 | 61 |
| 58 private: | 62 private: |
| 59 DISALLOW_COPY_AND_ASSIGN(ImageStore); | 63 DISALLOW_COPY_AND_ASSIGN(ImageStore); |
| 60 }; | 64 }; |
| 61 | 65 |
| 62 #endif // COMPONENTS_ENHANCED_BOOKMARKS_IMAGE_STORE_H_ | 66 #endif // COMPONENTS_ENHANCED_BOOKMARKS_IMAGE_STORE_H_ |
| OLD | NEW |