diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-25 23:24:45 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-25 23:24:45 +0000 |
commit | bfd15299e79b8809e05a9fb20dc8cc7dd839ca6e (patch) | |
tree | b20874e33c0b54d538d65c4744620bf155e77953 /chrome/browser/first_run/first_run.cc | |
parent | 3b33d16000bc6cd51d3934adb67ebeab4c546090 (diff) | |
download | chromium_src-bfd15299e79b8809e05a9fb20dc8cc7dd839ca6e.zip chromium_src-bfd15299e79b8809e05a9fb20dc8cc7dd839ca6e.tar.gz chromium_src-bfd15299e79b8809e05a9fb20dc8cc7dd839ca6e.tar.bz2 |
mac: Correctly set the default rlz ping delay, allow having a per-user master prefs file.
The code that sets the initial rlz ping delay to 90 wasn't called on mac. Call it.
On windows, master prefs are next to the chrome binary, so for user
chrome installs, the master prefs can be per user. On mac, that's currently
not supported, so allow
"~/Library/Application Support/Google/Chrome/Google Chrome Master Preferences"
in addition to the system master prefs path.
BUG=93421,125030
TEST=Do an official build, add a printf for
master_prefs_->ping_delay in chrome_browser_main.
Verify it prints 90. Put
{
"distribution" : {
"ping_delay": 40
}
}
in master prefs file, relaunch, verify it prints 40.
Review URL: https://chromiumcodereview.appspot.com/10226007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134009 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/first_run/first_run.cc')
-rw-r--r-- | chrome/browser/first_run/first_run.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/chrome/browser/first_run/first_run.cc b/chrome/browser/first_run/first_run.cc index 1793846..0387368 100644 --- a/chrome/browser/first_run/first_run.cc +++ b/chrome/browser/first_run/first_run.cc @@ -275,6 +275,16 @@ bool SkipFirstRunUI(installer::MasterPreferences* install_prefs) { &value) || !value); } +void SetRLZPref(first_run::MasterPrefs* out_prefs, + installer::MasterPreferences* install_prefs) { + if (!install_prefs->GetInt(installer::master_preferences::kDistroPingDelay, + &out_prefs->ping_delay)) { + // Default value in case master preferences is missing or corrupt, + // or ping_delay is missing. + out_prefs->ping_delay = 90; + } +} + // -- Platform-specific functions -- #if !defined(OS_LINUX) && !defined(OS_BSD) |