summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorrogerta@google.com <rogerta@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-13 16:09:39 +0000
committerrogerta@google.com <rogerta@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-13 16:09:39 +0000
commit58b6433d5199d559185f04a49496fb7acbc8df79 (patch)
treeb18c1a74f5011b16a8232c45c8abcae3b051cb7c /chrome/browser
parent19bcbfa963214916a9cd6958fac9487b48cbd071 (diff)
downloadchromium_src-58b6433d5199d559185f04a49496fb7acbc8df79.zip
chromium_src-58b6433d5199d559185f04a49496fb7acbc8df79.tar.gz
chromium_src-58b6433d5199d559185f04a49496fb7acbc8df79.tar.bz2
Fix for issue 51693, which was a regression from integrating the open source
version of RLZ into Chromium. Chromium should never send RLZ pings to Google, only Google Chrome should do so. Removing dependency from rlz chrome extenion api to RLZTracker since it is not required. BUG=51693 TEST=Install Chromium on a clean machine and make sure no pings are sent to http://client1.google.com/tools/pso/ping?... Review URL: http://codereview.chromium.org/3146007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56032 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/browser_main.cc2
-rw-r--r--chrome/browser/browser_shutdown.cc2
-rw-r--r--chrome/browser/extensions/extension_rlz_module.cc3
-rw-r--r--chrome/browser/rlz/rlz.cc4
-rw-r--r--chrome/browser/search_engines/template_url.cc2
-rw-r--r--chrome/browser/search_engines/template_url_model.cc2
-rw-r--r--chrome/browser/search_engines/template_url_unittest.cc4
7 files changed, 11 insertions, 8 deletions
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc
index fc6511b..eff0c33 100644
--- a/chrome/browser/browser_main.cc
+++ b/chrome/browser/browser_main.cc
@@ -1262,11 +1262,13 @@ int BrowserMain(const MainFunctionParams& parameters) {
#if defined(OS_WIN)
win_util::ScopedCOMInitializer com_initializer;
+#if defined(GOOGLE_CHROME_BUILD)
// Init the RLZ library. This just binds the dll and schedules a task on the
// file thread to be run sometime later. If this is the first run we record
// the installation event.
RLZTracker::InitRlzDelayed(is_first_run, master_prefs.ping_delay);
#endif
+#endif
// Configure the network module so it has access to resources.
net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider);
diff --git a/chrome/browser/browser_shutdown.cc b/chrome/browser/browser_shutdown.cc
index 48676ed..1b048e9 100644
--- a/chrome/browser/browser_shutdown.cc
+++ b/chrome/browser/browser_shutdown.cc
@@ -139,7 +139,7 @@ void Shutdown() {
prefs->SavePersistentPrefs();
-#if defined(OS_WIN)
+#if defined(OS_WIN) && defined(GOOGLE_CHROME_BUILD)
// Cleanup any statics created by RLZ. Must be done before NotificationService
// is destroyed.
RLZTracker::CleanupRlz();
diff --git a/chrome/browser/extensions/extension_rlz_module.cc b/chrome/browser/extensions/extension_rlz_module.cc
index 5519e2d..2ee0ff9 100644
--- a/chrome/browser/extensions/extension_rlz_module.cc
+++ b/chrome/browser/extensions/extension_rlz_module.cc
@@ -5,7 +5,6 @@
#include "chrome/browser/extensions/extension_rlz_module.h"
#include "base/scoped_ptr.h"
-#include "chrome/browser/rlz/rlz.h"
#include "chrome/common/extensions/extension.h"
#include "rlz/win/lib/lib_values.h"
@@ -86,7 +85,7 @@ bool RlzRecordProductEventFunction::RunImpl() {
rlz_lib::Event event_id;
EXTENSION_FUNCTION_VALIDATE(GetEventFromName(event_name, &event_id));
- return RLZTracker::RecordProductEvent(product, access_point, event_id);
+ return rlz_lib::RecordProductEvent(product, access_point, event_id);
}
bool RlzGetAccessPointRlzFunction::RunImpl() {
diff --git a/chrome/browser/rlz/rlz.cc b/chrome/browser/rlz/rlz.cc
index c8a5cbd..b57224e 100644
--- a/chrome/browser/rlz/rlz.cc
+++ b/chrome/browser/rlz/rlz.cc
@@ -165,8 +165,8 @@ class DelayedInitTask : public Task {
// For organic brandcodes do not use rlz at all. Empty brandcode usually
// means a chromium install. This is ok.
std::wstring brand;
- GoogleUpdateSettings::GetBrand(&brand);
- if (GoogleUpdateSettings::IsOrganic(brand))
+ if (!GoogleUpdateSettings::GetBrand(&brand) || brand.empty() ||
+ GoogleUpdateSettings::IsOrganic(brand))
return;
// Do the initial event recording if is the first run or if we have an
diff --git a/chrome/browser/search_engines/template_url.cc b/chrome/browser/search_engines/template_url.cc
index 8817267..29276a6 100644
--- a/chrome/browser/search_engines/template_url.cc
+++ b/chrome/browser/search_engines/template_url.cc
@@ -339,7 +339,7 @@ std::string TemplateURLRef::ReplaceSearchTerms(
// to happen so that we replace the RLZ template with the
// empty string. (If we don't handle this case, we hit a
// NOTREACHED below.)
-#if defined(OS_WIN)
+#if defined(OS_WIN) && defined(GOOGLE_CHROME_BUILD)
std::wstring rlz_string;
RLZTracker::GetAccessPointRlz(rlz_lib::CHROME_OMNIBOX, &rlz_string);
if (!rlz_string.empty()) {
diff --git a/chrome/browser/search_engines/template_url_model.cc b/chrome/browser/search_engines/template_url_model.cc
index 12c5726..d777225 100644
--- a/chrome/browser/search_engines/template_url_model.cc
+++ b/chrome/browser/search_engines/template_url_model.cc
@@ -502,7 +502,7 @@ void TemplateURLModel::SetDefaultSearchProvider(const TemplateURL* url) {
const TemplateURLRef* url_ref = url->url();
if (url_ref && url_ref->HasGoogleBaseURLs()) {
GoogleURLTracker::RequestServerCheck();
-#if defined(OS_WIN)
+#if defined(OS_WIN) && defined(GOOGLE_CHROME_BUILD)
RLZTracker::RecordProductEvent(rlz_lib::CHROME,
rlz_lib::CHROME_OMNIBOX,
rlz_lib::SET_TO_GOOGLE);
diff --git a/chrome/browser/search_engines/template_url_unittest.cc b/chrome/browser/search_engines/template_url_unittest.cc
index 16eafec..05087b8 100644
--- a/chrome/browser/search_engines/template_url_unittest.cc
+++ b/chrome/browser/search_engines/template_url_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2006-2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -328,7 +328,9 @@ TEST_F(TemplateURLTest, Suggestions) {
#if defined(OS_WIN)
TEST_F(TemplateURLTest, RLZ) {
std::wstring rlz_string;
+#if defined(GOOGLE_CHROME_BUILD)
RLZTracker::GetAccessPointRlz(rlz_lib::CHROME_OMNIBOX, &rlz_string);
+#endif
TemplateURL t_url;
TemplateURLRef ref("http://bar/?{google:RLZ}{searchTerms}", 1, 2);