diff options
-rw-r--r-- | chrome/browser/browser_main.cc | 2 | ||||
-rw-r--r-- | chrome/browser/browser_shutdown.cc | 2 | ||||
-rw-r--r-- | chrome/browser/extensions/extension_rlz_module.cc | 3 | ||||
-rw-r--r-- | chrome/browser/rlz/rlz.cc | 4 | ||||
-rw-r--r-- | chrome/browser/search_engines/template_url.cc | 2 | ||||
-rw-r--r-- | chrome/browser/search_engines/template_url_model.cc | 2 | ||||
-rw-r--r-- | chrome/browser/search_engines/template_url_unittest.cc | 4 |
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); |