summaryrefslogtreecommitdiffstats
path: root/o3d/statsreport/uploader_aggregation-win32.cc
diff options
context:
space:
mode:
authorrlp@google.com <rlp@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-09 23:13:54 +0000
committerrlp@google.com <rlp@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-09 23:13:54 +0000
commita656dfedee36ea7fdff377604d665d484a549243 (patch)
tree50e79ec9fdbdf38ae535984cfab845e7271cfd4f /o3d/statsreport/uploader_aggregation-win32.cc
parentba625918f43f292ef3fbc5563770be7bbfd1f233 (diff)
downloadchromium_src-a656dfedee36ea7fdff377604d665d484a549243.zip
chromium_src-a656dfedee36ea7fdff377604d665d484a549243.tar.gz
chromium_src-a656dfedee36ea7fdff377604d665d484a549243.tar.bz2
Updating the installer to check for OpenGL stats. Requires saving those stats and uploading with others which required a modification of the stats uploading code to actually save old stats--which it should do anyways.
Review URL: http://codereview.chromium.org/295043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31502 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/statsreport/uploader_aggregation-win32.cc')
-rw-r--r--o3d/statsreport/uploader_aggregation-win32.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/o3d/statsreport/uploader_aggregation-win32.cc b/o3d/statsreport/uploader_aggregation-win32.cc
index d2f438e..d128c77 100644
--- a/o3d/statsreport/uploader_aggregation-win32.cc
+++ b/o3d/statsreport/uploader_aggregation-win32.cc
@@ -88,10 +88,12 @@ void ResetPersistentMetrics(CRegKey *key) {
// were uploaded
bool AggregateAndReportMetrics(const char* extra_url_arguments,
const char* user_agent,
- bool force_report) {
+ bool force_report,
+ bool save_old_metrics) {
StatsUploader stats_uploader;
return TestableAggregateAndReportMetrics(extra_url_arguments, user_agent,
- force_report, &stats_uploader);
+ force_report, save_old_metrics,
+ &stats_uploader);
}
// Returns:
// true if metrics were uploaded successfully, false otherwise
@@ -100,6 +102,7 @@ bool AggregateAndReportMetrics(const char* extra_url_arguments,
bool TestableAggregateAndReportMetrics(const char* extra_url_arguments,
const char* user_agent,
bool force_report,
+ bool save_old_metrics,
StatsUploader* stats_uploader) {
CString key_name;
key_name.Format(kStatsKeyFormatString, PRODUCT_NAME_STRING_WIDE);
@@ -127,7 +130,7 @@ bool TestableAggregateAndReportMetrics(const char* extra_url_arguments,
last_transmission_time > now) {
DLOG(WARNING) << "Hinky or missing last transmission time, wiping stats";
- ResetPersistentMetrics(&key);
+ if (!save_old_metrics) ResetPersistentMetrics(&key);
err = key.SetValue(kLastTransmissionTimeValueName, REG_DWORD,
&now, sizeof(now));