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

Unified Diff: components/safe_browsing_db/v4_store.h

Issue 2409793002: Add detailed UMA metrics for v4_store, broken down by storeid. (Closed)
Patch Set: Mark old histograms as obsolete instead of deleting them Created 4 years, 2 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
« no previous file with comments | « no previous file | components/safe_browsing_db/v4_store.cc » ('j') | components/safe_browsing_db/v4_store.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a2a89be440fbc1d185afb96838179dc31fdb80c6..3c6ea9d0d9b9fd2700dec7877efd609d7b1f7c48 100644
--- a/components/safe_browsing_db/v4_store.h
+++ b/components/safe_browsing_db/v4_store.h
@@ -313,31 +313,39 @@ class V4Store {
// Processes the FULL_UPDATE |response| from the server, and writes the
// merged V4Store to disk. If processing the |response| succeeds, it returns
- // APPLY_UPDATE_SUCCESS.
+ // APPLY_UPDATE_SUCCESS. The UMA metrics for all interesting sub-operations
+ // use the prefix |metric|.
// This method is only called when we receive a FULL_UPDATE from the server.
ApplyUpdateResult ProcessFullUpdateAndWriteToDisk(
+ const std::string& metric,
std::unique_ptr<ListUpdateResponse> response);
// Processes a FULL_UPDATE |response| and updates the V4Store. If processing
// the |response| succeeds, it returns APPLY_UPDATE_SUCCESS.
// This method is called when we receive a FULL_UPDATE from the server, and
- // when we read a store file from disk on startup.
+ // when we read a store file from disk on startup. The UMA metrics for all
+ // interesting sub-operations use the prefix |metric|.
ApplyUpdateResult ProcessFullUpdate(
+ const std::string& metric,
const std::unique_ptr<ListUpdateResponse>& response);
// Merges the hash prefixes in |hash_prefix_map_old| and |response|, updates
// the |hash_prefix_map_| and |state_| in the V4Store, and writes the merged
// store to disk. If processing succeeds, it returns APPLY_UPDATE_SUCCESS.
// This method is only called when we receive a PARTIAL_UPDATE from the
- // server.
+ // server. The UMA metrics for all interesting sub-operations use the prefix
+ // |metric|.
ApplyUpdateResult ProcessPartialUpdateAndWriteToDisk(
+ const std::string& metric,
const HashPrefixMap& hash_prefix_map_old,
std::unique_ptr<ListUpdateResponse> response);
// Merges the hash prefixes in |hash_prefix_map_old| and |response|, and
// updates the |hash_prefix_map_| and |state_| in the V4Store. If processing
- // succeeds, it returns APPLY_UPDATE_SUCCESS.
+ // succeeds, it returns APPLY_UPDATE_SUCCESS. The UMA metrics for all
+ // interesting sub-operations use the prefix |metric|.
ApplyUpdateResult ProcessUpdate(
+ const std::string& metric,
const HashPrefixMap& hash_prefix_map_old,
const std::unique_ptr<ListUpdateResponse>& response);
@@ -346,8 +354,10 @@ class V4Store {
StoreReadResult ReadFromDisk();
// Updates the |additions_map| with the additions received in the partial
- // update from the server.
+ // update from the server. The UMA metrics for all interesting sub-operations
+ // use the prefix |metric|.
ApplyUpdateResult UpdateHashPrefixMapFromAdditions(
+ const std::string& metric,
const ::google::protobuf::RepeatedPtrField<ThreatEntrySet>& additions,
HashPrefixMap* additions_map);
« no previous file with comments | « no previous file | components/safe_browsing_db/v4_store.cc » ('j') | components/safe_browsing_db/v4_store.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698