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

Side by Side Diff: components/enhanced_bookmarks/image_store.h

Issue 305963004: Add GetStoreSize() to ImageStore to know the actual db size. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: size += bitmap.getSize(); Created 6 years, 6 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 unified diff | Download patch
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « components/enhanced_bookmarks/DEPS ('k') | components/enhanced_bookmarks/image_store_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698