summaryrefslogtreecommitdiffstats
path: root/chrome_frame
diff options
context:
space:
mode:
authorziadh@chromium.org <ziadh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-19 08:00:42 +0000
committerziadh@chromium.org <ziadh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-19 08:00:42 +0000
commit46f89e149da3971fcf52b778de939256fae4249a (patch)
tree24a85f97832b082072dd54035a89de4ca9cc86cf /chrome_frame
parenta110dd1ff6a3b8507ee164ababea537df52642cb (diff)
downloadchromium_src-46f89e149da3971fcf52b778de939256fae4249a.zip
chromium_src-46f89e149da3971fcf52b778de939256fae4249a.tar.gz
chromium_src-46f89e149da3971fcf52b778de939256fae4249a.tar.bz2
Compress and checksum pending logs that are going to be persisted. Persisted logs now have the following format:
[list_size, log1, log2, ..., log_n, checksum]. where each log is bzipped before being written. Upon reading the logs from disk, we verify the data and register whether we faced corruptions or not. r=jar Review URL: http://codereview.chromium.org/2936005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52885 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r--chrome_frame/metrics_service.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/chrome_frame/metrics_service.cc b/chrome_frame/metrics_service.cc
index 81fc9ef..a21e48a 100644
--- a/chrome_frame/metrics_service.cc
+++ b/chrome_frame/metrics_service.cc
@@ -437,21 +437,20 @@ bool MetricsService::UploadData() {
return false;
}
- pending_log_text_ = PrepareLogSubmissionString();
- DCHECK(!pending_log_text_.empty());
+ std::string pending_log_text = PrepareLogSubmissionString();
+ DCHECK(!pending_log_text.empty());
// Allow security conscious users to see all metrics logs that we send.
- LOG(INFO) << "METRICS LOG: " << pending_log_text_;
+ LOG(INFO) << "METRICS LOG: " << pending_log_text;
bool ret = true;
- std::string compressed_log;
- if (!Bzip2Compress(pending_log_text_, &compressed_log)) {
+ if (!Bzip2Compress(pending_log_text, &compressed_log_)) {
NOTREACHED() << "Failed to compress log for transmission.";
ret = false;
} else {
HRESULT hr = ChromeFrameMetricsDataUploader::UploadDataHelper(
- compressed_log);
+ compressed_log_);
DCHECK(SUCCEEDED(hr));
}
DiscardPendingLog();