summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_main.cc
diff options
context:
space:
mode:
authorrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-13 22:00:16 +0000
committerrvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-13 22:00:16 +0000
commit5ccaa41d72d5241e76bad7f16c3e0147d990584b (patch)
treec3d4ec81cc6ccb79f6aa0e923930f7781bcb4e90 /chrome/browser/browser_main.cc
parent2581e577597dd0f435ae1e6fe918df912bb98248 (diff)
downloadchromium_src-5ccaa41d72d5241e76bad7f16c3e0147d990584b.zip
chromium_src-5ccaa41d72d5241e76bad7f16c3e0147d990584b.tar.gz
chromium_src-5ccaa41d72d5241e76bad7f16c3e0147d990584b.tar.bz2
Use Chrome to transport Chrome OS metrics.
Chrome periodically reads the content of a well-know file, and parses it into name-value pairs, each representing a Chrome OS metrics event. The events are then logged using the normal UMA mechanism. The file is then truncated to zero size. Chrome uses flock() to synchronize accesses to the file. BUG=none TEST=compiled and run Linux and Chrome OS versions. Verified that uploaded Chrome OS events appear in about:histograms. Also external_metrics_unittest.cc tests the collection of metrics messages from the well-known file. patch written by semenzato_google.com original code review: http://codereview.chromium.org/378013 (plus http://codereview.chromium.org/346041) Review URL: http://codereview.chromium.org/394010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31952 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_main.cc')
-rw-r--r--chrome/browser/browser_main.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc
index dc82b1fd..81d8c7c 100644
--- a/chrome/browser/browser_main.cc
+++ b/chrome/browser/browser_main.cc
@@ -124,6 +124,7 @@
#if defined(OS_CHROMEOS)
#include "chrome/browser/chromeos/cros_library.h"
#include "chrome/browser/chromeos/external_cookie_handler.h"
+#include "chrome/browser/chromeos/external_metrics.h"
#endif
namespace {
@@ -870,6 +871,10 @@ int BrowserMain(const MainFunctionParams& parameters) {
// should display the entry in the context menu or not.
browser_process->CheckForInspectorFiles();
+#if defined(OS_CHROMEOS)
+ metrics->StartExternalMetrics(profile);
+#endif
+
int result_code = ResultCodes::NORMAL_EXIT;
if (parameters.ui_task) {
// We are in test mode. Run one task and enter the main message loop.