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

Unified Diff: chrome/common/metrics_helpers.h

Issue 2936005: Compress and checksum pending logs that are going to be persisted. ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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/common/metrics_helpers.h
===================================================================
--- chrome/common/metrics_helpers.h (revision 52082)
+++ chrome/common/metrics_helpers.h (working copy)
@@ -184,14 +184,15 @@
// Check to see if there is a log that needs to be, or is being, transmitted.
bool pending_log() const {
- return pending_log_ || !pending_log_text_.empty();
+ return pending_log_ || !compressed_log_.empty();
}
- // Compress the report log in input using bzip2, store the result in output.
+ // Compress the report log in |input| using bzip2, store the result in
+ // |output|.
bool Bzip2Compress(const std::string& input, std::string* output);
- // Discard pending_log_, and clear pending_log_text_. Called after processing
- // of this log is complete.
+ // Discard |pending_log_|, and clear |compressed_log_|. Called after
+ // processing of this log is complete.
void DiscardPendingLog();
// Record complete list of histograms into the current log.
@@ -204,10 +205,10 @@
// A log that we are currently transmiting, or about to try to transmit.
MetricsLogBase* pending_log_;
- // An alternate form of pending_log_. We persistently save this text version
+ // An alternate form of |pending_log_|. We persistently save this version
// into prefs if we can't transmit it. As a result, sometimes all we have is
- // the text version (recalled from a previous session).
- std::string pending_log_text_;
+ // the compressed text version.
+ std::string compressed_log_;
// The log that we are still appending to.
MetricsLogBase* current_log_;
@@ -221,4 +222,3 @@
};
#endif // CHROME_COMMON_METRICS_HELPERS_H_
-

Powered by Google App Engine
This is Rietveld 408576698