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, ...@@ -59,7 +59,7 @@ void RecordProductEvents(bool first_run, bool google_default_search,
bool google_default_homepage, bool already_ran, bool google_default_homepage, bool already_ran,
bool omnibox_used, bool homepage_used) { bool omnibox_used, bool homepage_used) {
// Record the installation of chrome. We call this all the time but the rlz // 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, rlz_lib::RecordProductEvent(rlz_lib::CHROME,
RLZTracker::CHROME_OMNIBOX, RLZTracker::CHROME_OMNIBOX,
rlz_lib::INSTALL); rlz_lib::INSTALL);
...@@ -195,6 +195,8 @@ bool RLZTracker::Init(bool first_run, int delay, bool google_default_search, ...@@ -195,6 +195,8 @@ bool RLZTracker::Init(bool first_run, int delay, bool google_default_search,
delay = (delay < kMinDelay) ? kMinDelay : delay; delay = (delay < kMinDelay) ? kMinDelay : delay;
delay = (delay > kMaxDelay) ? kMaxDelay : delay; delay = (delay > kMaxDelay) ? kMaxDelay : delay;
std::string brand;
if (google_util::GetBrand(&brand) && !IsBrandOrganic(brand)) {
// Register for notifications from the omnibox so that we can record when // Register for notifications from the omnibox so that we can record when
// the user performs a first search. // the user performs a first search.
registrar_.Add(this, chrome::NOTIFICATION_OMNIBOX_OPENED_URL, registrar_.Add(this, chrome::NOTIFICATION_OMNIBOX_OPENED_URL,
...@@ -208,6 +210,7 @@ bool RLZTracker::Init(bool first_run, int delay, bool google_default_search, ...@@ -208,6 +210,7 @@ bool RLZTracker::Init(bool first_run, int delay, bool google_default_search,
// the home page. // the home page.
registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_PENDING, registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_PENDING,
content::NotificationService::AllSources()); content::NotificationService::AllSources());
}
rlz_lib::SetURLRequestContext(g_browser_process->system_request_context()); rlz_lib::SetURLRequestContext(g_browser_process->system_request_context());
ScheduleDelayedInit(delay); 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