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

Unified Diff: components/ukm/ukm_service.cc

Issue 2735153003: Fix UKM crash. Add TODO for fixing this properly. (Closed)
Patch Set: Created 3 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ukm/ukm_service.cc
diff --git a/components/ukm/ukm_service.cc b/components/ukm/ukm_service.cc
index c672167d72cb3ef1ccf55b2077df764efa18b701..a43f426f346986148a9a15738dfc4f7c2a885207 100644
--- a/components/ukm/ukm_service.cc
+++ b/components/ukm/ukm_service.cc
@@ -408,7 +408,10 @@ void UkmService::OnLogUploadComplete(int response_code) {
}
if (upload_succeeded || discard_log) {
- persisted_logs_.DiscardStagedLog();
+ // TODO(holte): The if below is a temporary fix for a crash bug. We should
+ // revisit the logic and update it with a more correct fix. crbug.com/698819
+ if (persisted_logs_.has_staged_log())
+ persisted_logs_.DiscardStagedLog();
// Store the updated list to disk now that the removed log is uploaded.
persisted_logs_.PersistUnsentLogs();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698