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

Unified Diff: chrome/browser/safe_browsing/safe_browsing_database.h

Issue 815863002: Suffixed histograms for SB2.DatabaseKilobytes and SB2.PrefixSetKilobytes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@aV_threadSafeStoreManager
Patch Set: histograms fixes from CL#790703003 Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/safe_browsing/safe_browsing_database.h
diff --git a/chrome/browser/safe_browsing/safe_browsing_database.h b/chrome/browser/safe_browsing/safe_browsing_database.h
index 68dea690946034b3bed9172b659946cc9643bd95..6bdbdc7fae97f31213f3631e5b30af1467181796 100644
--- a/chrome/browser/safe_browsing/safe_browsing_database.h
+++ b/chrome/browser/safe_browsing/safe_browsing_database.h
@@ -500,7 +500,7 @@ class SafeBrowsingDatabaseNew : public SafeBrowsingDatabase {
// |write_failure_type| provides a caller-specific error code to be used on
// failure.
void WritePrefixSet(const base::FilePath& db_filename,
- const safe_browsing::PrefixSet* prefix_set,
+ PrefixSetId prefix_set_id,
FailureType write_failure_type);
// Loads the given full-length hashes to the given whitelist. If the number
@@ -530,10 +530,10 @@ class SafeBrowsingDatabaseNew : public SafeBrowsingDatabase {
safe_browsing_util::ListType list_id,
const SBChunkData& chunk);
- // Returns the size in bytes of the store after the update.
- int64 UpdateHashPrefixStore(const base::FilePath& store_filename,
- SafeBrowsingStore* store,
- FailureType failure_type);
+ // Updates the |store| and stores the result on disk under |store_filename|.
+ void UpdateHashPrefixStore(const base::FilePath& store_filename,
+ SafeBrowsingStore* store,
+ FailureType failure_type);
// Updates a PrefixStore store for URLs (|url_store|) which is backed on disk
// by a "|db_filename| Prefix Set" file. Specific failure types are provided
@@ -561,6 +561,10 @@ class SafeBrowsingDatabaseNew : public SafeBrowsingDatabase {
// synchronization are not problematic).
PrefixGetHashCache* GetUnsynchronizedPrefixGetHashCacheForTesting();
+ // Records a file size histogram for the database or PrefixSet backed by
+ // |filename|.
+ void RecordFileSizeHistogram(const base::FilePath& file_path);
+
base::ThreadChecker thread_checker_;
ThreadSafeStateManager state_manager_;
« no previous file with comments | « no previous file | chrome/browser/safe_browsing/safe_browsing_database.cc » ('j') | tools/metrics/histograms/histograms.xml » ('J')

Powered by Google App Engine
This is Rietveld 408576698