diff options
author | rahulk@google.com <rahulk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-07-30 23:47:37 +0000 |
---|---|---|
committer | rahulk@google.com <rahulk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-07-30 23:47:37 +0000 |
commit | 96354fc5a07b8a41b02989946fbfbcab491a97b6 (patch) | |
tree | ea20edc6afc77d8da45d2668fae3eda8ade0268a /chrome/browser/browser_main.cc | |
parent | 4d1dc54f98251317b8e37fa6d7f62c1710a0d775 (diff) | |
download | chromium_src-96354fc5a07b8a41b02989946fbfbcab491a97b6.zip chromium_src-96354fc5a07b8a41b02989946fbfbcab491a97b6.tar.gz chromium_src-96354fc5a07b8a41b02989946fbfbcab491a97b6.tar.bz2 |
At the first run use Omaha usagestats key to determine whether to collect user metrics.
BUG=1299579
TEST=With clean profile and no "first run" file, start Chrome and make sure that Under the Hood->Help make Chrome better... option is checked or unchecked depending on whether the value of HKEY_CURRENT_USER\Software\Google\Update\ClientState\{8A69D345-D564-463c-AFF1-A69D9E530F96}\usagestats key is 1 or 0.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_main.cc')
-rw-r--r-- | chrome/browser/browser_main.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc index 21ab3ad..317ebed 100644 --- a/chrome/browser/browser_main.cc +++ b/chrome/browser/browser_main.cc @@ -294,6 +294,7 @@ int BrowserMain(CommandLine &parsed_command_line, int show_command, // sources. This has to be done before uninstall code path and before prefs // are registered. local_state->RegisterStringPref(prefs::kApplicationLocale, L""); + local_state->RegisterBooleanPref(prefs::kMetricsReportingEnabled, false); // During first run we read the google update registry key to find what // language the user selected when downloading the installer. This @@ -302,6 +303,8 @@ int BrowserMain(CommandLine &parsed_command_line, int show_command, std::wstring install_lang; if (GoogleUpdateSettings::GetLanguage(&install_lang)) local_state->SetString(prefs::kApplicationLocale, install_lang); + if (GoogleUpdateSettings::GetCollectStatsConsent()) + local_state->SetBoolean(prefs::kMetricsReportingEnabled, true); } ResourceBundle::InitSharedInstance( |