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

Issue 26646003: MetricsService: Send a hash of the UMA log in a header. (Closed)

Created:
7 years, 2 months ago by Alexei Svitkine (slow)
Modified:
7 years, 2 months ago
Reviewers:
Ilya Sherman
CC:
chromium-reviews, Ilya Sherman, jar (doing other things), asvitkine+watch_chromium.org
Visibility:
Public.

Description

MetricsService: Send a hash of the UMA log in a header. Add a new X-Chrome-UMA-Log-SHA1 header that is transmitted along with each UMA log upload. The header contains the SHA1 (as hex) of the payload prior to compression. The hash is computed at the time that the log is closed, rather than just before being transmitted - to minimize the chance of hashing an already corrupted log. Does not store the hash with logs when they are persisted temporarily to local state for later upload, since log are already hashed when stored (and discarded on load if the hash does not match). The SHA1 hash is re-computed when logs are loaded from local state. BUG=308066 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=229594

Patch Set 1 : #

Total comments: 13

Patch Set 2 : #

Total comments: 6

Patch Set 3 : #

Total comments: 2

Patch Set 4 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+239 lines, -103 lines) Patch
M chrome/browser/metrics/metrics_log_serializer.h View 1 2 3 3 chunks +14 lines, -9 lines 0 comments Download
M chrome/browser/metrics/metrics_log_serializer.cc View 1 2 3 8 chunks +20 lines, -13 lines 0 comments Download
M chrome/browser/metrics/metrics_log_serializer_unittest.cc View 1 2 3 9 chunks +48 lines, -38 lines 0 comments Download
M chrome/browser/metrics/metrics_service.cc View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/common/metrics/metrics_log_manager.h View 1 2 3 5 chunks +49 lines, -13 lines 0 comments Download
M chrome/common/metrics/metrics_log_manager.cc View 1 2 3 9 chunks +47 lines, -18 lines 0 comments Download
M chrome/common/metrics/metrics_log_manager_unittest.cc View 1 2 3 5 chunks +56 lines, -12 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
Alexei Svitkine (slow)
Hey Ilya, please take a look. I'll send out CL for the server-side later today.
7 years, 2 months ago (2013-10-16 15:45:14 UTC) #1
Ilya Sherman
https://codereview.chromium.org/26646003/diff/27001/chrome/browser/metrics/metrics_log_serializer.cc File chrome/browser/metrics/metrics_log_serializer.cc (right): https://codereview.chromium.org/26646003/diff/27001/chrome/browser/metrics/metrics_log_serializer.cc#newcode139 chrome/browser/metrics/metrics_log_serializer.cc:139: std::vector<MetricsLogManager::SerializedLog>::const_iterator it; nit: Please keep this scoped within the ...
7 years, 2 months ago (2013-10-16 18:26:14 UTC) #2
Alexei Svitkine (slow)
Comments addressed. I've also updated the tests. https://codereview.chromium.org/26646003/diff/27001/chrome/browser/metrics/metrics_log_serializer.cc File chrome/browser/metrics/metrics_log_serializer.cc (right): https://codereview.chromium.org/26646003/diff/27001/chrome/browser/metrics/metrics_log_serializer.cc#newcode139 chrome/browser/metrics/metrics_log_serializer.cc:139: std::vector<MetricsLogManager::SerializedLog>::const_iterator it; ...
7 years, 2 months ago (2013-10-16 19:31:46 UTC) #3
Ilya Sherman
Thanks. Could you also add test coverage to ensure that the hash is being set ...
7 years, 2 months ago (2013-10-17 01:29:03 UTC) #4
Alexei Svitkine (slow)
Added a test for SerializedLog. https://codereview.chromium.org/26646003/diff/52001/chrome/common/metrics/metrics_log_manager.h File chrome/common/metrics/metrics_log_manager.h (right): https://codereview.chromium.org/26646003/diff/52001/chrome/common/metrics/metrics_log_manager.h#newcode42 chrome/common/metrics/metrics_log_manager.h:42: void SetLogText(const std::string& log_text); ...
7 years, 2 months ago (2013-10-17 19:47:26 UTC) #5
Ilya Sherman
Thanks! LGTM with a final two suggestions: https://codereview.chromium.org/26646003/diff/52001/chrome/common/metrics/metrics_log_manager.h File chrome/common/metrics/metrics_log_manager.h (right): https://codereview.chromium.org/26646003/diff/52001/chrome/common/metrics/metrics_log_manager.h#newcode42 chrome/common/metrics/metrics_log_manager.h:42: void SetLogText(const ...
7 years, 2 months ago (2013-10-17 22:06:25 UTC) #6
Alexei Svitkine (slow)
https://codereview.chromium.org/26646003/diff/52001/chrome/common/metrics/metrics_log_manager.h File chrome/common/metrics/metrics_log_manager.h (right): https://codereview.chromium.org/26646003/diff/52001/chrome/common/metrics/metrics_log_manager.h#newcode42 chrome/common/metrics/metrics_log_manager.h:42: void SetLogText(const std::string& log_text); On 2013/10/17 22:06:25, Ilya Sherman ...
7 years, 2 months ago (2013-10-18 18:51:06 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/asvitkine@chromium.org/26646003/91001
7 years, 2 months ago (2013-10-18 19:00:24 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/asvitkine@chromium.org/26646003/91001
7 years, 2 months ago (2013-10-18 21:13:30 UTC) #9
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=211012
7 years, 2 months ago (2013-10-19 04:37:21 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/asvitkine@chromium.org/26646003/91001
7 years, 2 months ago (2013-10-19 15:25:34 UTC) #11
commit-bot: I haz the power
7 years, 2 months ago (2013-10-19 17:53:08 UTC) #12
Message was sent while issue was closed.
Change committed as 229594

Powered by Google App Engine
This is Rietveld 408576698