Commit 4e35daf8 authored by thakis@chromium.org's avatar thakis@chromium.org

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
parent 32be97ec
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment