diff options
author | cpu@google.com <cpu@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-23 01:04:50 +0000 |
---|---|---|
committer | cpu@google.com <cpu@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-23 01:04:50 +0000 |
commit | 9364b8df98868d254ee4bfe96775790831149035 (patch) | |
tree | 21ae3310dae5ef486b42b185e98368c81455b185 /chrome | |
parent | b8afeda43b66094543efe04ae727bf619c1f5cf3 (diff) | |
download | chromium_src-9364b8df98868d254ee4bfe96775790831149035.zip chromium_src-9364b8df98868d254ee4bfe96775790831149035.tar.gz chromium_src-9364b8df98868d254ee4bfe96775790831149035.tar.bz2 |
Load RLZ in 20 seconds instead of 100 seconds.
- And have a way to set the initial events even if chrome
was shut down before it was able to initialize and
thus we have an empty rlz.
Apparently a sizeable % of our users have an empty
rlz string and it looks like this can be the cause.
BUG= 1372961
Review URL: http://codereview.chromium.org/3200
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2467 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/rlz/rlz.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/chrome/browser/rlz/rlz.cc b/chrome/browser/rlz/rlz.cc index b319626..211e840 100644 --- a/chrome/browser/rlz/rlz.cc +++ b/chrome/browser/rlz/rlz.cc @@ -152,7 +152,11 @@ class DelayedInitTask : public Task { // For non-interactive tests we don't do the rest of the initialization. if (::GetEnvironmentVariableW(env_vars::kHeadless, NULL, 0)) return; - if (first_run_) { + + std::wstring omnibox_rlz; + RLZTracker::GetAccessPointRlz(RLZTracker::CHROME_OMNIBOX, &omnibox_rlz); + + if (first_run_ || omnibox_rlz.empty()) { // Record the installation of chrome. RLZTracker::RecordProductEvent(RLZTracker::CHROME, RLZTracker::CHROME_OMNIBOX, @@ -204,9 +208,9 @@ bool RLZTracker::InitRlz(int directory_key) { bool RLZTracker::InitRlzDelayed(int directory_key, bool first_run) { // Schedule the delayed init items. - const int kOneHundredSeconds = 100000; + const int kTwentySeconds = 20 * 1000; MessageLoop::current()->PostDelayedTask(FROM_HERE, - new DelayedInitTask(directory_key, first_run), kOneHundredSeconds); + new DelayedInitTask(directory_key, first_run), kTwentySeconds); return true; } |