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

Unified Diff: components/metrics/metrics_log.h

Issue 2910023003: Change the logic for discarding all non-histogram logs because of actions/omnibox events to truncat… (Closed)
Patch Set: today extension Created 3 years, 7 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/metrics/metrics_log.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/metrics/metrics_log.h
diff --git a/components/metrics/metrics_log.h b/components/metrics/metrics_log.h
index 4f28b43b3aea02211acebfaa0faad61d615a088e..441cfbc26a0e6709aed40e8a63c6d493868e8f07 100644
--- a/components/metrics/metrics_log.h
+++ b/components/metrics/metrics_log.h
@@ -31,6 +31,11 @@ struct ActiveGroupId;
namespace metrics {
+namespace internal {
+extern const int kOmniboxEventLimit;
+extern const int kUserActionEventLimit;
+}
+
class MetricsProvider;
class MetricsServiceClient;
@@ -128,6 +133,10 @@ class MetricsLog {
// None of the Record* methods can be called after this is called.
void CloseLog();
+ // Truncate some of the fields within the log that we want to restrict in
+ // size due to bandwidth concerns.
+ void TruncateEvents();
+
// Fills |encoded_log| with the serialized protobuf representation of the
// record. Must only be called after CloseLog() has been called.
void GetEncodedLog(std::string* encoded_log);
@@ -136,11 +145,6 @@ class MetricsLog {
return creation_time_;
}
- int num_events() const {
- return uma_proto_.omnibox_event_size() +
- uma_proto_.user_action_event_size();
- }
-
LogType log_type() const { return log_type_; }
protected:
« no previous file with comments | « no previous file | components/metrics/metrics_log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698