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 03:36:47 +0000
committerrogerta@chromium.org <rogerta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-02 03:36:47 +0000
commit6c6b02dcf61fa8d344a3b1768b5e9610c17468c1 (patch)
tree1d62f8bc14264eace0e5bf489edb3634142d7df4 /chrome/browser/rlz
parent2bf646e71e7f103b1e761a68284462849cba7bcb (diff)
downloadchromium_src-6c6b02dcf61fa8d344a3b1768b5e9610c17468c1.zip
chromium_src-6c6b02dcf61fa8d344a3b1768b5e9610c17468c1.tar.gz
chromium_src-6c6b02dcf61fa8d344a3b1768b5e9610c17468c1.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. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=99283 Review URL: http://codereview.chromium.org/7791029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99309 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));