summaryrefslogtreecommitdiffstats
path: root/o3d/plugin/win
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/plugin/win
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/plugin/win')
-rw-r--r--o3d/plugin/win/logger_main.cc2
-rw-r--r--o3d/plugin/win/main_win.cc2
-rw-r--r--o3d/plugin/win/plugin_logging-win32.cc14
-rw-r--r--o3d/plugin/win/plugin_metrics-win32.cc6
4 files changed, 17 insertions, 7 deletions
diff --git a/o3d/plugin/win/logger_main.cc b/o3d/plugin/win/logger_main.cc
index 4ff94a9..d41ca09 100644
--- a/o3d/plugin/win/logger_main.cc
+++ b/o3d/plugin/win/logger_main.cc
@@ -48,7 +48,7 @@ int main(int argc, wchar_t **argv) {
HRESULT hr = CoInitialize(NULL);
o3d::PluginLogging g_logger;
stats_report::g_global_metrics.Initialize();
- if (!g_logger.ProcessMetrics(false, true)) {
+ if (!g_logger.ProcessMetrics(false, true, false)) {
printf("Error with stats logging.'n");
exit(1);
}
diff --git a/o3d/plugin/win/main_win.cc b/o3d/plugin/win/main_win.cc
index 30f461a..785e771 100644
--- a/o3d/plugin/win/main_win.cc
+++ b/o3d/plugin/win/main_win.cc
@@ -756,7 +756,7 @@ NPError OSCALL NP_Shutdown(void) {
if (g_logger) {
// Do a last sweep to aggregate metrics before we shut down
- g_logger->ProcessMetrics(true, false);
+ g_logger->ProcessMetrics(true, false, false);
delete g_logger;
g_logger = NULL;
g_logging_initialized = false;
diff --git a/o3d/plugin/win/plugin_logging-win32.cc b/o3d/plugin/win/plugin_logging-win32.cc
index 64cf314..c27e2dc 100644
--- a/o3d/plugin/win/plugin_logging-win32.cc
+++ b/o3d/plugin/win/plugin_logging-win32.cc
@@ -75,7 +75,7 @@ bool PluginLogging::UpdateLogging() {
timer_->Start();
// We are not exiting just yet so pass false for that argument.
// We don't have to force stats reporting, so pass false for forcing, too.
- return ProcessMetrics(false, false);
+ return ProcessMetrics(false, false, false);
}
static uint64 ToSeconds(FILETIME time) {
@@ -106,7 +106,8 @@ void PluginLogging::RecordProcessTimes() {
}
bool PluginLogging::ProcessMetrics(const bool exiting,
- const bool force_report) {
+ const bool force_report,
+ const bool save_old_metrics) {
DLOG(INFO) << "ProcessMetrics()";
// Grab incremental process times. This has to be done each time
// around the loop since time passes between iterations.
@@ -152,7 +153,8 @@ bool PluginLogging::ProcessMetrics(const bool exiting,
std::string user_agent8 = std::string(kUserAgent) +
PRODUCT_VERSION_STRING;
DoAggregateAndReportMetrics(client_id_argument,
- user_agent8.c_str(), force_report);
+ user_agent8.c_str(), force_report,
+ save_old_metrics);
}
::ReleaseMutex(mutex);
@@ -168,12 +170,14 @@ void PluginLogging::DoAggregateMetrics() {
bool PluginLogging::DoAggregateAndReportMetrics(
const char* extra_url_arguments,
const char* user_agent,
- const bool force_report) {
+ const bool force_report,
+ const bool save_old_metrics) {
DLOG(INFO) << "DoAggregateAndReportMetrics()";
// This eturns true if metrics were uploaded.
return stats_report::AggregateAndReportMetrics(extra_url_arguments,
user_agent,
- force_report);
+ force_report,
+ save_old_metrics);
}
// This method is used for testing.
diff --git a/o3d/plugin/win/plugin_metrics-win32.cc b/o3d/plugin/win/plugin_metrics-win32.cc
index f183595..4e3b05a 100644
--- a/o3d/plugin/win/plugin_metrics-win32.cc
+++ b/o3d/plugin/win/plugin_metrics-win32.cc
@@ -75,6 +75,12 @@ DEFINE_METRIC_count(out_of_memory_total);
DEFINE_METRIC_count(bluescreens_total);
+// OpenGL Caps - insert more here
+DEFINE_METRIC_integer(gl_major_version);
+DEFINE_METRIC_integer(gl_minor_version);
+DEFINE_METRIC_integer(gl_hlsl_major_version);
+DEFINE_METRIC_integer(gl_hlsl_minor_version);
+
// D3D Caps
DEFINE_METRIC_integer(d3d_devcaps);
DEFINE_METRIC_integer(d3d_misccaps);