| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Change for readability |
| 6 |
| 5 #include "components/rappor/log_uploader.h" | 7 #include "components/rappor/log_uploader.h" |
| 6 | 8 |
| 7 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
| 8 #include "base/metrics/sparse_histogram.h" | 10 #include "base/metrics/sparse_histogram.h" |
| 9 #include "net/base/load_flags.h" | 11 #include "net/base/load_flags.h" |
| 10 #include "net/url_request/url_fetcher.h" | 12 #include "net/url_request/url_fetcher.h" |
| 11 | 13 |
| 12 namespace { | 14 namespace { |
| 13 | 15 |
| 14 // The delay, in seconds, between uploading when there are queued logs to send. | 16 // The delay, in seconds, between uploading when there are queued logs to send. |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 if (!server_is_healthy) | 142 if (!server_is_healthy) |
| 141 upload_interval_ = BackOffUploadInterval(upload_interval_); | 143 upload_interval_ = BackOffUploadInterval(upload_interval_); |
| 142 else | 144 else |
| 143 upload_interval_ = base::TimeDelta::FromSeconds(kUnsentLogsIntervalSeconds); | 145 upload_interval_ = base::TimeDelta::FromSeconds(kUnsentLogsIntervalSeconds); |
| 144 | 146 |
| 145 if (more_logs_remaining) | 147 if (more_logs_remaining) |
| 146 ScheduleNextUpload(upload_interval_); | 148 ScheduleNextUpload(upload_interval_); |
| 147 } | 149 } |
| 148 | 150 |
| 149 } // namespace rappor | 151 } // namespace rappor |
| OLD | NEW |