Index: components/metrics/metrics_service.cc |
diff --git a/components/metrics/metrics_service.cc b/components/metrics/metrics_service.cc |
index adb8f2cd7cc11b97bb05194a7fca46ca16a78976..07229914b254ea6d62f5fd3fb879790849ed4a29 100644 |
--- a/components/metrics/metrics_service.cc |
+++ b/components/metrics/metrics_service.cc |
@@ -1052,6 +1052,8 @@ void MetricsService::OnLogUploadComplete(int response_code) { |
ResponseCodeToStatus(response_code), |
NUM_RESPONSE_STATUSES); |
+ bool suppress_reschedule = false; |
+ |
bool upload_succeeded = response_code == 200; |
// Provide boolean for error recovery (allow us to ignore response_code). |
@@ -1085,6 +1087,7 @@ void MetricsService::OnLogUploadComplete(int response_code) { |
log_manager_.StageNextLogForUpload(); |
SendStagedLog(); |
state_ = SENDING_INITIAL_METRICS_LOG; |
+ suppress_reschedule = true; |
} |
break; |
@@ -1116,7 +1119,7 @@ void MetricsService::OnLogUploadComplete(int response_code) { |
// Don't notify the scheduler that the upload is finished if we've only sent |
// the initial stability log, but not yet the initial metrics log (treat the |
// two as a single unit of work as far as the scheduler is concerned). |
jwd
2014/12/11 20:39:54
Please update this comment.
Steven Holte
2014/12/11 20:46:54
Slightly tweaked the comment, but it's basically c
|
- if (state_ != SENDING_INITIAL_METRICS_LOG) { |
+ if (!suppress_reschedule) { |
scheduler_->UploadFinished(server_is_healthy, |
log_manager_.has_unsent_logs()); |
} |