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

Unified Diff: chrome/common/metrics/metrics_log_manager.h

Issue 10546044: [Metrics] Re-try failed protocol buffer uploads as well as failed XML uploads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revert DiscardStagedLog() visibility change Created 8 years, 6 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 | « chrome/browser/metrics/metrics_service.cc ('k') | chrome/common/metrics/metrics_log_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/metrics/metrics_log_manager.h
diff --git a/chrome/common/metrics/metrics_log_manager.h b/chrome/common/metrics/metrics_log_manager.h
index 982332225eb444e47a27f7117e0662f354ec5df4..5883ad2c6ca473ea81fd8b2708ca3cbcd8912bf3 100644
--- a/chrome/common/metrics/metrics_log_manager.h
+++ b/chrome/common/metrics/metrics_log_manager.h
@@ -70,9 +70,14 @@ class MetricsLogManager {
// Returns true if there is a protobuf log that needs to be uploaded.
// In the case that an XML upload needs to be re-issued due to a previous
- // failure, has_staged_log() will return true while this returns false.
+ // failure, has_staged_log() can return true while this returns false.
bool has_staged_log_proto() const;
+ // Returns true if there is an xml log that needs to be uploaded.
+ // In the case that a protobuf upload needs to be re-issued due to a previous
+ // failure, has_staged_log() can return true while this returns false.
+ bool has_staged_log_xml() const;
+
// The text of the staged log, in compressed XML or protobuf format. Empty if
// there is no staged log, or if compression of the staged log failed.
const SerializedLog& staged_log_text() const {
@@ -87,6 +92,11 @@ class MetricsLogManager {
// due to XML upload failures.
void DiscardStagedLogProto();
+ // Discards the XML data in the staged log.
+ // This is useful to prevent needlessly re-issuing successful XML uploads
+ // due to protobuf upload failures.
+ void DiscardStagedLogXml();
+
// Closes and discards |current_log|.
void DiscardCurrentLog();
« no previous file with comments | « chrome/browser/metrics/metrics_service.cc ('k') | chrome/common/metrics/metrics_log_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698