Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(358)

Unified Diff: chrome/browser/rlz/rlz.cc

Issue 10829302: rlz: Do not record omnibox events for non-branded builds (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/rlz/rlz.cc
diff --git a/chrome/browser/rlz/rlz.cc b/chrome/browser/rlz/rlz.cc
index c46fcf6c341af79268147b35b45ea120202f9571..40ab46ce949321702df237c5a27b316052e66195 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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698