summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_main.cc
diff options
context:
space:
mode:
authorpetersont@google.com <petersont@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-19 20:36:59 +0000
committerpetersont@google.com <petersont@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-19 20:36:59 +0000
commit5495d83642a71982d0fb17de25568943fd536f8f (patch)
tree769f2a7a83f322bec67df422fa0a071e45797186 /chrome/browser/browser_main.cc
parent0f7126a5559f831af1285fe353b53fe59f6e5645 (diff)
downloadchromium_src-5495d83642a71982d0fb17de25568943fd536f8f.zip
chromium_src-5495d83642a71982d0fb17de25568943fd536f8f.tar.gz
chromium_src-5495d83642a71982d0fb17de25568943fd536f8f.tar.bz2
This is the same change as issue 1633 ( http://codereview.chromium.org/1633 ) together with the disabling of a test called MetricsServiceTest.CloseRenderersNormally which the change makes obsolete (see bug 2522.)
Review URL: http://codereview.chromium.org/2995 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2419 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_main.cc')
-rw-r--r--chrome/browser/browser_main.cc12
1 files changed, 9 insertions, 3 deletions
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc
index 15703a2..7023dfb 100644
--- a/chrome/browser/browser_main.cc
+++ b/chrome/browser/browser_main.cc
@@ -483,8 +483,14 @@ int BrowserMain(CommandLine &parsed_command_line, int show_command,
}
metrics = browser_process->metrics_service();
DCHECK(metrics);
- // Start user experience metrics recording, if enabled.
- metrics->SetRecording(local_state->GetBoolean(prefs::kMetricsIsRecording));
+ // If the user permits metrics reporting with the checkbox in the
+ // prefs, we turn on recording.
+ bool enabled = local_state->GetBoolean(prefs::kMetricsReportingEnabled);
+ enabled = true;
+
+ metrics->SetUserPermitsUpload(enabled);
+ if (enabled)
+ metrics->Start();
}
InstallJankometer(parsed_command_line);
@@ -505,7 +511,7 @@ int BrowserMain(CommandLine &parsed_command_line, int show_command,
}
if (metrics)
- metrics->SetRecording(false); // Force persistent save.
+ metrics->Stop();
// browser_shutdown takes care of deleting browser_process, so we need to
// release it.