summaryrefslogtreecommitdiffstats
path: root/chrome_frame/chrome_frame_automation.cc
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-11 02:23:44 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-11 02:23:44 +0000
commit897b2627d88109e5280e20b6658d702b43468617 (patch)
tree76271ef33d000294ba9ce7b6d2b6e1aec94da610 /chrome_frame/chrome_frame_automation.cc
parent943d8120c51e2ed0146d85a15298d7fa30f316e0 (diff)
downloadchromium_src-897b2627d88109e5280e20b6658d702b43468617.zip
chromium_src-897b2627d88109e5280e20b6658d702b43468617.tar.gz
chromium_src-897b2627d88109e5280e20b6658d702b43468617.tar.bz2
Add support for uploading UMA metrics data from ChromeFrame. Added support for tracking chrome frame crash metrics via
2 new counters which track successful navigations and crashes. These counters are persisted in the registry under HKCU\Software\Google\ChromeFrameMetrics. Any other histogram data like AutomationServer launch time, IE versions etc are simply dropped if IE is shutdown before they are sent out. The metrics data is uploaded on similar lines as Chrome. Bug=46057 Review URL: http://codereview.chromium.org/2714003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49493 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_frame_automation.cc')
-rw-r--r--chrome_frame/chrome_frame_automation.cc17
1 files changed, 14 insertions, 3 deletions
diff --git a/chrome_frame/chrome_frame_automation.cc b/chrome_frame/chrome_frame_automation.cc
index ee1ed5e..9deaeb5 100644
--- a/chrome_frame/chrome_frame_automation.cc
+++ b/chrome_frame/chrome_frame_automation.cc
@@ -24,6 +24,7 @@
#include "chrome/test/automation/tab_proxy.h"
#include "chrome_frame/chrome_launcher_utils.h"
#include "chrome_frame/custom_sync_call_context.h"
+#include "chrome_frame/crash_metrics.h"
#include "chrome_frame/utils.h"
#ifdef NDEBUG
@@ -250,9 +251,13 @@ void ProxyFactory::GetAutomationServer(
entry->thread->message_loop()->PostTask(FROM_HERE, NewRunnableMethod(this,
&ProxyFactory::CreateProxy, entry, params, delegate));
- entry->thread->message_loop()->PostDelayedTask(FROM_HERE,
- NewRunnableMethod(this, &ProxyFactory::SendUMAData, entry),
- uma_send_interval_);
+ // IE uses the chrome frame provided UMA data uploading scheme. NPAPI
+ // continues to use Chrome to upload UMA data.
+ if (!CrashMetricsReporter::GetInstance()->active()) {
+ entry->thread->message_loop()->PostDelayedTask(FROM_HERE,
+ NewRunnableMethod(this, &ProxyFactory::SendUMAData, entry),
+ uma_send_interval_);
+ }
}
void ProxyFactory::CreateProxy(ProxyFactory::ProxyCacheEntry* entry,
@@ -420,6 +425,12 @@ void ProxyFactory::ReleaseProxy(ProxyCacheEntry* entry,
Singleton<ProxyFactory> g_proxy_factory;
void ProxyFactory::SendUMAData(ProxyCacheEntry* proxy_entry) {
+ // IE uses the chrome frame provided UMA data uploading scheme. NPAPI
+ // continues to use Chrome to upload UMA data.
+ if (CrashMetricsReporter::GetInstance()->active()) {
+ return;
+ }
+
if (!proxy_entry) {
NOTREACHED() << __FUNCTION__ << " Invalid proxy entry";
return;