Chromium Code Reviews| Index: components/safe_browsing_db/v4_store.h |
| diff --git a/components/safe_browsing_db/v4_store.h b/components/safe_browsing_db/v4_store.h |
| index 9775ee715d1e7e9cde346a12e6386a5d376d865c..32ee1f897233b1c2b79f2016cc9a86afd81962a3 100644 |
| --- a/components/safe_browsing_db/v4_store.h |
| +++ b/components/safe_browsing_db/v4_store.h |
| @@ -15,7 +15,7 @@ namespace safe_browsing { |
| class V4Store; |
| -typedef base::Callback<void(std::unique_ptr<V4Store>)> |
| +typedef base::Callback<void(std::unique_ptr<V4Store> new_store)> |
| UpdatedStoreReadyCallback; |
| // The sorted list of hash prefixes. |
| @@ -167,8 +167,12 @@ class V4Store { |
| const base::FilePath& store_path() const { return store_path_; } |
| void ApplyUpdate(std::unique_ptr<ListUpdateResponse> response, |
| - const scoped_refptr<base::SingleThreadTaskRunner>&, |
| - UpdatedStoreReadyCallback); |
| + const scoped_refptr<base::SingleThreadTaskRunner>& runner, |
| + UpdatedStoreReadyCallback callback); |
| + |
| + // Records (in kilobytes) and returns the size of the file on disk for this |
| + // store using |base_metric| as prefix and the filename as suffix. |
| + int RecordAndReturnFileSize(const std::string& base_metric); |
|
Scott Hess - ex-Googler
2016/10/21 23:36:45
This should be int64_t.
vakh (use Gerrit instead)
2016/10/24 19:39:32
Done.
|
| // If a hash prefix in this store matches |full_hash|, returns that hash |
| // prefix; otherwise returns an empty hash prefix. |
| @@ -374,12 +378,15 @@ class V4Store { |
| // Writes the hash_prefix_map_ to disk as a V4StoreFileFormat proto. |
| // |checksum| is used to set the |checksum| field in the final proto. |
| - StoreWriteResult WriteToDisk(const Checksum& checksum) const; |
| + StoreWriteResult WriteToDisk(const Checksum& checksum); |
| // The checksum value as read from the disk, until it is verified. Once |
| // verified, it is cleared. |
| std::string expected_checksum_; |
| + // The size of the file on disk for this store. |
| + int file_size_; |
|
Scott Hess - ex-Googler
2016/10/21 23:36:45
This should be int64_t.
vakh (use Gerrit instead)
2016/10/24 19:39:32
Done.
|
| + |
| // The state of the store as returned by the PVer4 server in the last applied |
| // update response. |
| std::string state_; |