diff options
author | asvitkine@chromium.org <asvitkine@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-11 16:31:24 +0000 |
---|---|---|
committer | asvitkine@chromium.org <asvitkine@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-11 16:31:24 +0000 |
commit | 9706e1b7596203edee3e1f0aaff56e8493ff9f20 (patch) | |
tree | 0ea75e500862c1d5a09240ec43cd28aa7ab15c7e /components/metrics.gypi | |
parent | 92218694a696e560c7127e11690ca38e53213a4d (diff) | |
download | chromium_src-9706e1b7596203edee3e1f0aaff56e8493ff9f20.zip chromium_src-9706e1b7596203edee3e1f0aaff56e8493ff9f20.tar.gz chromium_src-9706e1b7596203edee3e1f0aaff56e8493ff9f20.tar.bz2 |
Make MetricsService save compressed logs to local state.
Previously, it would persist logs in uncompressed form.
This CL changes the code to compress logs before they're
saved. A new pair of prefs is introduced for storing
these logs, while reading from the old pref is still
maintained to not lose old logs.
Additionally, this makes the metrics log discard limit
(currently 50k) be checked against the compressed size
rather than the uncompressed size.
Simplifies the format used to store logs, now simply
storing the compressed log bytes and corresponding hash
for each log. The size and checksum fields are removed.
(Size was redundant while the checksum is not no longer
necessary now that we store the log hash.)
Deletes some tests that inspected the actual pref
values are removed, in favor of tests that check that
serializing and de-serializing works as expected.
Finally, also introduces GzipUncompress() that is
needed for tests that inspect log manager logs.
BUG=382076
TBR=agl@chromium.org
Review URL: https://codereview.chromium.org/318203004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276429 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components/metrics.gypi')
-rw-r--r-- | components/metrics.gypi | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/components/metrics.gypi b/components/metrics.gypi index 24fd27c..decc23f8 100644 --- a/components/metrics.gypi +++ b/components/metrics.gypi @@ -12,11 +12,13 @@ ], 'dependencies': [ '../base/base.gyp:base', + '../third_party/zlib/zlib.gyp:zlib', 'component_metrics_proto', 'variations', ], 'sources': [ - 'metrics/metrics_provider.h', + 'metrics/compression_utils.cc', + 'metrics/compression_utils.h', 'metrics/cloned_install_detector.cc', 'metrics/cloned_install_detector.h', 'metrics/machine_id_provider.h', @@ -32,6 +34,7 @@ 'metrics/metrics_log_manager.h', 'metrics/metrics_pref_names.cc', 'metrics/metrics_pref_names.h', + 'metrics/metrics_provider.h', 'metrics/metrics_reporting_scheduler.cc', 'metrics/metrics_reporting_scheduler.h', 'metrics/metrics_service.cc', @@ -67,12 +70,9 @@ ], 'dependencies': [ '../net/net.gyp:net', - '../third_party/zlib/zlib.gyp:zlib', 'metrics', ], 'sources': [ - 'metrics/net/compression_utils.cc', - 'metrics/net/compression_utils.h', 'metrics/net/net_metrics_log_uploader.cc', 'metrics/net/net_metrics_log_uploader.h', ], |