| Index: components/safe_browsing_db/v4_database.cc
|
| diff --git a/components/safe_browsing_db/v4_database.cc b/components/safe_browsing_db/v4_database.cc
|
| index 4b0a5c146cb11f73684e44c20b6f6715dd4c5e4a..62f37226975dd4564cdbbe1c1a14f4ba5c635b39 100644
|
| --- a/components/safe_browsing_db/v4_database.cc
|
| +++ b/components/safe_browsing_db/v4_database.cc
|
| @@ -18,6 +18,12 @@ using base::TimeTicks;
|
|
|
| namespace safe_browsing {
|
|
|
| +namespace {
|
| +
|
| +const char kV4DatabaseSizeMetric[] = "SafeBrowsing.V4Database.Size";
|
| +
|
| +} // namespace
|
| +
|
| // static
|
| V4StoreFactory* V4Database::factory_ = NULL;
|
|
|
| @@ -220,6 +226,17 @@ void V4Database::VerifyChecksumOnTaskRunner(
|
| FROM_HERE, base::Bind(db_ready_for_updates_callback, stores_to_reset));
|
| }
|
|
|
| +void V4Database::RecordFileSizeHistograms() {
|
| + int64_t db_size = 0;
|
| + for (const auto& store_map_iter : *store_map_) {
|
| + const int64_t size =
|
| + store_map_iter.second->RecordAndReturnFileSize(kV4DatabaseSizeMetric);
|
| + db_size += size;
|
| + }
|
| + const int64_t db_size_kilobytes = static_cast<int64_t>(db_size / 1024);
|
| + UMA_HISTOGRAM_COUNTS(kV4DatabaseSizeMetric, db_size_kilobytes);
|
| +}
|
| +
|
| ListInfo::ListInfo(const bool fetch_updates,
|
| const std::string& filename,
|
| const ListIdentifier& list_id,
|
|
|