summaryrefslogtreecommitdiffstats
path: root/chrome/browser/rlz
diff options
context:
space:
mode:
authorrogerta@chromium.org <rogerta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-02 01:32:07 +0000
committerrogerta@chromium.org <rogerta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-02 01:32:07 +0000
commit95d9e253aeb47ef0004edc29c9a8c442106b9488 (patch)
tree435296a0a46b12bc5df4e80b11543ec3e1fc44a4 /chrome/browser/rlz
parent6eff501872ea78419884b9a2c1552679ebdde534 (diff)
downloadchromium_src-95d9e253aeb47ef0004edc29c9a8c442106b9488.zip
chromium_src-95d9e253aeb47ef0004edc29c9a8c442106b9488.tar.gz
chromium_src-95d9e253aeb47ef0004edc29c9a8c442106b9488.tar.bz2
When the user navigates to the home page, make sure to set the RLZ string
if needed. John: can you plase look at the content\... changes? Scott: can you plase look at the chrome\... changes? BUG=0 TEST=Install an official chrome build (not a chromium build) with a non organic brand code. During the install, make sure to choose google as the home page. When google is running, pressing the home page button should cause the request to include the RLZ http header. Pressed Alt-Home should do the samer thing. When starting chrome, the RLZ header should also be present since the startup page is the home page, and the home page is set to google. Navigating to the google.com manually by typing the URL or by clicking on a link should not cause the hrrp header to be added. Not choosing google as the home during install, or changing the home page to be something other than google should stop the http header from being added. This is true is even if the user subsequently set his home page to google again. Review URL: http://codereview.chromium.org/7791029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99283 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/rlz')
-rw-r--r--chrome/browser/rlz/rlz.cc3
-rw-r--r--chrome/browser/rlz/rlz.h5
-rw-r--r--chrome/browser/rlz/rlz_unittest.cc3
3 files changed, 3 insertions, 8 deletions
diff --git a/chrome/browser/rlz/rlz.cc b/chrome/browser/rlz/rlz.cc
index 1af7d7b..ea208a3 100644
--- a/chrome/browser/rlz/rlz.cc
+++ b/chrome/browser/rlz/rlz.cc
@@ -196,6 +196,7 @@ bool RLZTracker::Init(bool first_run, int delay, bool google_default_search,
NotificationService::AllSources());
ScheduleDelayedInit(delay);
+
return true;
}
@@ -295,7 +296,7 @@ void RLZTracker::Observe(int type,
case content::NOTIFICATION_NAV_ENTRY_PENDING: {
const NavigationEntry* entry = Details<NavigationEntry>(details).ptr();
if (entry != NULL &&
- ((entry->transition_type() & RLZ_PAGETRANSITION_HOME_PAGE) != 0)) {
+ ((entry->transition_type() & PageTransition::HOME_PAGE) != 0)) {
point = rlz_lib::CHROME_HOME_PAGE;
record_used = &homepage_used_;
call_record = true;
diff --git a/chrome/browser/rlz/rlz.h b/chrome/browser/rlz/rlz.h
index cbbec70..c335cbd 100644
--- a/chrome/browser/rlz/rlz.h
+++ b/chrome/browser/rlz/rlz.h
@@ -66,11 +66,6 @@ class RLZTracker : public NotificationObserver {
RLZTracker();
~RLZTracker();
- // This is a temporary constant used here until the home page change is
- // committed, which will happen before 2011-09-01. This constant will be
- // replaced with PageTransition::HOME_PAGE.
- static const int RLZ_PAGETRANSITION_HOME_PAGE = 0x02000000;
-
// Thread function entry point, see ScheduleFinancialPing(). Assumes argument
// is a pointer to an RLZTracker.
static void _cdecl PingNow(void* tracker);
diff --git a/chrome/browser/rlz/rlz_unittest.cc b/chrome/browser/rlz/rlz_unittest.cc
index 96816a4..3d1d860 100644
--- a/chrome/browser/rlz/rlz_unittest.cc
+++ b/chrome/browser/rlz/rlz_unittest.cc
@@ -80,7 +80,6 @@ class TestRLZTracker : public RLZTracker {
public:
using RLZTracker::DelayedInit;
using RLZTracker::Observe;
- using RLZTracker::RLZ_PAGETRANSITION_HOME_PAGE;
TestRLZTracker() : pingnow_called_(false), assume_io_thread_(false) {
set_tracker(this);
@@ -204,7 +203,7 @@ void RlzLibTest::SimulateOmniboxUsage() {
void RlzLibTest::SimulateHomepageUsage() {
NavigationEntry entry(NULL, 0, GURL(), GURL(), string16(),
- TestRLZTracker::RLZ_PAGETRANSITION_HOME_PAGE);
+ PageTransition::HOME_PAGE);
tracker_.Observe(content::NOTIFICATION_NAV_ENTRY_PENDING,
NotificationService::AllSources(),
Details<NavigationEntry>(&entry));