diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-13 20:58:17 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-13 20:58:17 +0000 |
commit | 4e35daf812bc83685f3a06b8658ca9bb9e86da7d (patch) | |
tree | 8856bc8b561cf6dc59b9d20837095a3d696cfc32 /chrome/browser/rlz | |
parent | 32be97ec361a05665b1378cc474dad1a3719c281 (diff) | |
download | chromium_src-4e35daf812bc83685f3a06b8658ca9bb9e86da7d.zip chromium_src-4e35daf812bc83685f3a06b8658ca9bb9e86da7d.tar.gz chromium_src-4e35daf812bc83685f3a06b8658ca9bb9e86da7d.tar.bz2 |
rlz: Do not record omnibox events for non-branded builds
Pings weren't sent, so this information was only collected locally.
However, other parts of the RLZ code don't collect events for non-branded
builds at all, so don't do it here either.
BUG=141108,138158
Review URL: https://chromiumcodereview.appspot.com/10829302
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151345 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/rlz')
-rw-r--r-- | chrome/browser/rlz/rlz.cc | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/chrome/browser/rlz/rlz.cc b/chrome/browser/rlz/rlz.cc index c46fcf6..40ab46c 100644 --- a/chrome/browser/rlz/rlz.cc +++ b/chrome/browser/rlz/rlz.cc @@ -59,7 +59,7 @@ void RecordProductEvents(bool first_run, bool google_default_search, bool google_default_homepage, bool already_ran, bool omnibox_used, bool homepage_used) { // Record the installation of chrome. We call this all the time but the rlz - // lib should ingore all but the first one. + // lib should ignore all but the first one. rlz_lib::RecordProductEvent(rlz_lib::CHROME, RLZTracker::CHROME_OMNIBOX, rlz_lib::INSTALL); @@ -195,19 +195,22 @@ bool RLZTracker::Init(bool first_run, int delay, bool google_default_search, delay = (delay < kMinDelay) ? kMinDelay : delay; delay = (delay > kMaxDelay) ? kMaxDelay : delay; - // Register for notifications from the omnibox so that we can record when - // the user performs a first search. - registrar_.Add(this, chrome::NOTIFICATION_OMNIBOX_OPENED_URL, - content::NotificationService::AllSources()); - // If instant is enabled we'll start searching as soon as the user starts - // typing in the omnibox (which triggers INSTANT_CONTROLLER_UPDATED). - registrar_.Add(this, chrome::NOTIFICATION_INSTANT_CONTROLLER_UPDATED, - content::NotificationService::AllSources()); - - // Register for notifications from navigations, to see if the user has used - // the home page. - registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_PENDING, - content::NotificationService::AllSources()); + std::string brand; + if (google_util::GetBrand(&brand) && !IsBrandOrganic(brand)) { + // Register for notifications from the omnibox so that we can record when + // the user performs a first search. + registrar_.Add(this, chrome::NOTIFICATION_OMNIBOX_OPENED_URL, + content::NotificationService::AllSources()); + // If instant is enabled we'll start searching as soon as the user starts + // typing in the omnibox (which triggers INSTANT_CONTROLLER_UPDATED). + registrar_.Add(this, chrome::NOTIFICATION_INSTANT_CONTROLLER_UPDATED, + content::NotificationService::AllSources()); + + // Register for notifications from navigations, to see if the user has used + // the home page. + registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_PENDING, + content::NotificationService::AllSources()); + } rlz_lib::SetURLRequestContext(g_browser_process->system_request_context()); ScheduleDelayedInit(delay); |