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

Unified Diff: components/metrics/metrics_service.cc

Issue 290103005: Remove the provisional store and just store the staged log when writing to (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« no previous file with comments | « components/metrics/metrics_log_manager_unittest.cc ('k') | components/metrics/persisted_logs.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/metrics/metrics_service.cc
diff --git a/components/metrics/metrics_service.cc b/components/metrics/metrics_service.cc
index 925421fea799a8078234565b91068f9c81b28937..aa76bf45a9d977b642ee12b9cd6a783ee2a0205f 100644
--- a/components/metrics/metrics_service.cc
+++ b/components/metrics/metrics_service.cc
@@ -773,16 +773,6 @@ void MetricsService::PushPendingLogsToPersistentStorage() {
if (state_ < SENDING_INITIAL_STABILITY_LOG)
return; // We didn't and still don't have time to get plugin list etc.
- if (log_manager_.has_staged_log()) {
- // We may race here, and send second copy of the log later.
- metrics::PersistedLogs::StoreType store_type;
- if (log_upload_in_progress_)
- store_type = metrics::PersistedLogs::PROVISIONAL_STORE;
- else
- store_type = metrics::PersistedLogs::NORMAL_STORE;
- log_manager_.StoreStagedLogAsUnsent(store_type);
- }
- DCHECK(!log_manager_.has_staged_log());
CloseCurrentLog();
log_manager_.PersistUnsentLogs();
@@ -1035,10 +1025,6 @@ void MetricsService::OnLogUploadComplete(int response_code) {
ResponseCodeToStatus(response_code),
NUM_RESPONSE_STATUSES);
- // If the upload was provisionally stored, drop it now that the upload is
- // known to have gone through.
- log_manager_.DiscardLastProvisionalStore();
-
bool upload_succeeded = response_code == 200;
// Provide boolean for error recovery (allow us to ignore response_code).
« no previous file with comments | « components/metrics/metrics_log_manager_unittest.cc ('k') | components/metrics/persisted_logs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698