diff options
author | rogerta@google.com <rogerta@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-10 15:25:46 +0000 |
---|---|---|
committer | rogerta@google.com <rogerta@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-10 15:25:46 +0000 |
commit | 1c26217d647d823c1ce3355bc619e0ef7a68822b (patch) | |
tree | c2b9d8e34b8543ecaa5a6f3f6e4ead23d6b2ca34 | |
parent | bcc528ed85d5fa3b4f327d2875d14de7c4506bd8 (diff) | |
download | chromium_src-1c26217d647d823c1ce3355bc619e0ef7a68822b.zip chromium_src-1c26217d647d823c1ce3355bc619e0ef7a68822b.tar.gz chromium_src-1c26217d647d823c1ce3355bc619e0ef7a68822b.tar.bz2 |
Link with RLZ library from open source repo.
In order to pass the check dependency step in the build, I added rlz to
the include_rules in DEPS. However, I am not sure this is the best solution.
TEST=Make sure that the RLZ pings from chrome are the sameas they were with
the old RLZ dll
BUG=none
Review URL: http://codereview.chromium.org/2755002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49399 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | DEPS | 4 | ||||
-rw-r--r-- | build/all.gyp | 2 | ||||
-rw-r--r-- | chrome/browser/browser_main.cc | 3 | ||||
-rw-r--r-- | chrome/browser/rlz/rlz.cc | 171 | ||||
-rw-r--r-- | chrome/browser/rlz/rlz.h | 76 | ||||
-rw-r--r-- | chrome/browser/rlz/rlz_unittest.cc | 20 | ||||
-rw-r--r-- | chrome/browser/search_engines/template_url.cc | 2 | ||||
-rw-r--r-- | chrome/browser/search_engines/template_url_model.cc | 6 | ||||
-rw-r--r-- | chrome/browser/search_engines/template_url_unittest.cc | 3 | ||||
-rw-r--r-- | chrome/chrome.gyp | 2 | ||||
-rwxr-xr-x | chrome/chrome_browser.gypi | 1 |
11 files changed, 85 insertions, 205 deletions
@@ -200,6 +200,9 @@ deps_os = { "src/third_party/mingw-w64/mingw/bin": ("http://nativeclient.googlecode.com/svn/trunk/src/third_party/mingw-w64/mingw/bin@" + Var("nacl_revision")), + + "src/rlz": + "http://rlz.googlecode.com/svn/trunk@4", }, "mac": { "src/chrome/tools/test/reference_build/chrome_mac": @@ -251,6 +254,7 @@ include_rules = [ "+base", "+build", "+ipc", + "+rlz", # For now, we allow ICU to be included by specifying "unicode/...", although # this should probably change. diff --git a/build/all.gyp b/build/all.gyp index 6a4a7e7..d63aee7 100644 --- a/build/all.gyp +++ b/build/all.gyp @@ -103,7 +103,7 @@ '../chrome_frame/chrome_frame.gyp:*', '../courgette/courgette.gyp:*', '../gears/gears.gyp:*', - # '../rlz/rlz.gyp:*', // temporary, back with open source rlz + '../rlz/rlz.gyp:*', '../sandbox/sandbox.gyp:*', '../third_party/bsdiff/bsdiff.gyp:*', '../third_party/bspatch/bspatch.gyp:*', diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc index 4df35b4..c801f98 100644 --- a/chrome/browser/browser_main.cc +++ b/chrome/browser/browser_main.cc @@ -1199,8 +1199,7 @@ int BrowserMain(const MainFunctionParams& parameters) { // 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(base::DIR_MODULE, is_first_run, - master_prefs.ping_delay); + RLZTracker::InitRlzDelayed(is_first_run, master_prefs.ping_delay); #endif // Configure the network module so it has access to resources. diff --git a/chrome/browser/rlz/rlz.cc b/chrome/browser/rlz/rlz.cc index 6f4dafa..8a6b925 100644 --- a/chrome/browser/rlz/rlz.cc +++ b/chrome/browser/rlz/rlz.cc @@ -34,10 +34,6 @@ namespace { // The maximum length of an access points RLZ in wide chars. const DWORD kMaxRlzLength = 64; -// The RLZ is a DLL that might not be present in the system. We load it -// as needed but never unload it. -volatile HMODULE rlz_dll = NULL; - enum { ACCESS_VALUES_STALE, // Possibly new values available. ACCESS_VALUES_FRESH // The cached values are current. @@ -47,83 +43,18 @@ enum { // decide if we need to refresh the some cached strings. volatile int access_values_state = ACCESS_VALUES_STALE; -extern "C" { -typedef bool (*RecordProductEventFn)(RLZTracker::Product product, - RLZTracker::AccessPoint point, - RLZTracker::Event event_id, - void* reserved); - -typedef bool (*GetAccessPointRlzFn)(RLZTracker::AccessPoint point, - wchar_t* rlz, - DWORD rlz_size, - void* reserved); - -typedef bool (*ClearAllProductEventsFn)(RLZTracker::Product product, - void* reserved); - -typedef bool (*SendFinancialPingNoDelayFn)(RLZTracker::Product product, - RLZTracker::AccessPoint* access_points, - const WCHAR* product_signature, - const WCHAR* product_brand, - const WCHAR* product_id, - const WCHAR* product_lang, - bool exclude_id, - void* reserved); -} // extern "C". - -RecordProductEventFn record_event = NULL; -GetAccessPointRlzFn get_access_point = NULL; -ClearAllProductEventsFn clear_all_events = NULL; -SendFinancialPingNoDelayFn send_ping_no_delay = NULL; - -template <typename FuncT> -FuncT WireExport(HMODULE module, const char* export_name) { - if (!module) - return NULL; - void* entry_point = ::GetProcAddress(module, export_name); - return reinterpret_cast<FuncT>(entry_point); -} - -HMODULE LoadRLZLibraryInternal(int directory_key) { - FilePath rlz_path; - if (!PathService::Get(directory_key, &rlz_path)) - return NULL; - rlz_path = rlz_path.AppendASCII("rlz.dll"); - return ::LoadLibraryW(rlz_path.value().c_str()); -} - -bool LoadRLZLibrary(int directory_key) { - rlz_dll = LoadRLZLibraryInternal(directory_key); - if (!rlz_dll) { - // As a last resort we can try the EXE directory. - if (directory_key != base::DIR_EXE) - rlz_dll = LoadRLZLibraryInternal(base::DIR_EXE); - } - if (rlz_dll) { - record_event = - WireExport<RecordProductEventFn>(rlz_dll, "RecordProductEvent"); - get_access_point = - WireExport<GetAccessPointRlzFn>(rlz_dll, "GetAccessPointRlz"); - clear_all_events = - WireExport<ClearAllProductEventsFn>(rlz_dll, "ClearAllProductEvents"); - send_ping_no_delay = - WireExport<SendFinancialPingNoDelayFn>(rlz_dll, - "SendFinancialPingNoDelay"); - return (record_event && get_access_point && clear_all_events && - send_ping_no_delay); - } - return false; -} - -bool SendFinancialPing(const wchar_t* brand, const wchar_t* lang, - const wchar_t* referral, bool exclude_id) { - RLZTracker::AccessPoint points[] = {RLZTracker::CHROME_OMNIBOX, - RLZTracker::CHROME_HOME_PAGE, - RLZTracker::NO_ACCESS_POINT}; - if (!send_ping_no_delay) - return false; - return send_ping_no_delay(RLZTracker::CHROME, points, L"chrome", brand, - referral, lang, exclude_id, NULL); +bool SendFinancialPing(const std::wstring& brand, const std::wstring& lang, + const std::wstring& referral, bool exclude_id) { + rlz_lib::AccessPoint points[] = {rlz_lib::CHROME_OMNIBOX, + rlz_lib::CHROME_HOME_PAGE, + rlz_lib::NO_ACCESS_POINT}; + std::string brand_ascii(WideToASCII(brand)); + std::string lang_ascii(WideToASCII(lang)); + std::string referral_ascii(WideToASCII(referral)); + + return rlz_lib::SendFinancialPing(rlz_lib::CHROME, points, "chrome", + brand_ascii.c_str(), referral_ascii.c_str(), + lang_ascii.c_str(), exclude_id, NULL, true); } // This class leverages the AutocompleteEditModel notification to know when @@ -143,9 +74,9 @@ class OmniBoxUsageObserver : public NotificationObserver { const NotificationDetails& details) { // Try to record event now, else set the flag to try later when we // attempt the ping. - if (!RLZTracker::RecordProductEvent(RLZTracker::CHROME, - RLZTracker::CHROME_OMNIBOX, - RLZTracker::FIRST_SEARCH)) + if (!RLZTracker::RecordProductEvent(rlz_lib::CHROME, + rlz_lib::CHROME_OMNIBOX, + rlz_lib::FIRST_SEARCH)) omnibox_used_ = true; delete this; } @@ -202,8 +133,7 @@ class DailyPingTask : public Task { GoogleUpdateSettings::GetBrand(&brand); std::wstring referral; GoogleUpdateSettings::GetReferral(&referral); - if (SendFinancialPing(brand.c_str(), lang.c_str(), referral.c_str(), - is_organic(brand))) { + if (SendFinancialPing(brand, lang, referral, is_organic(brand))) { access_values_state = ACCESS_VALUES_STALE; GoogleUpdateSettings::ClearReferral(); } @@ -219,8 +149,8 @@ class DailyPingTask : public Task { // This task needs to run on the UI thread. class DelayedInitTask : public Task { public: - explicit DelayedInitTask(int directory_key, bool first_run) - : directory_key_(directory_key), first_run_(first_run) { + explicit DelayedInitTask(bool first_run) + : first_run_(first_run) { } virtual ~DelayedInitTask() { } @@ -238,34 +168,32 @@ class DelayedInitTask : public Task { if (is_strict_organic(brand)) return; - if (!LoadRLZLibrary(directory_key_)) - return; // Do the initial event recording if is the first run or if we have an // empty rlz which means we haven't got a chance to do it. std::wstring omnibox_rlz; - RLZTracker::GetAccessPointRlz(RLZTracker::CHROME_OMNIBOX, &omnibox_rlz); + RLZTracker::GetAccessPointRlz(rlz_lib::CHROME_OMNIBOX, &omnibox_rlz); if (first_run_ || omnibox_rlz.empty()) { // Record the installation of chrome. - RLZTracker::RecordProductEvent(RLZTracker::CHROME, - RLZTracker::CHROME_OMNIBOX, - RLZTracker::INSTALL); - RLZTracker::RecordProductEvent(RLZTracker::CHROME, - RLZTracker::CHROME_HOME_PAGE, - RLZTracker::INSTALL); + RLZTracker::RecordProductEvent(rlz_lib::CHROME, + rlz_lib::CHROME_OMNIBOX, + rlz_lib::INSTALL); + RLZTracker::RecordProductEvent(rlz_lib::CHROME, + rlz_lib::CHROME_HOME_PAGE, + rlz_lib::INSTALL); // Record if google is the initial search provider. if (IsGoogleDefaultSearch()) { - RLZTracker::RecordProductEvent(RLZTracker::CHROME, - RLZTracker::CHROME_OMNIBOX, - RLZTracker::SET_TO_GOOGLE); + RLZTracker::RecordProductEvent(rlz_lib::CHROME, + rlz_lib::CHROME_OMNIBOX, + rlz_lib::SET_TO_GOOGLE); } } // Record first user interaction with the omnibox. We call this all the // time but the rlz lib should ingore all but the first one. if (OmniBoxUsageObserver::used()) { - RLZTracker::RecordProductEvent(RLZTracker::CHROME, - RLZTracker::CHROME_OMNIBOX, - RLZTracker::FIRST_SEARCH); + RLZTracker::RecordProductEvent(rlz_lib::CHROME, + rlz_lib::CHROME_OMNIBOX, + rlz_lib::FIRST_SEARCH); } // Schedule the daily RLZ ping. base::Thread* thread = g_browser_process->file_thread(); @@ -312,18 +240,13 @@ class DelayedInitTask : public Task { return false; } - int directory_key_; bool first_run_; DISALLOW_IMPLICIT_CONSTRUCTORS(DelayedInitTask); }; } // namespace -bool RLZTracker::InitRlz(int directory_key) { - return LoadRLZLibrary(directory_key); -} - -bool RLZTracker::InitRlzDelayed(int directory_key, bool first_run, int delay) { +bool RLZTracker::InitRlzDelayed(bool first_run, int delay) { // Maximum and minimum delay we would allow to be set through master // preferences. Somewhat arbitrary, may need to be adjusted in future. const int kMaxDelay = 200 * 1000; @@ -338,40 +261,40 @@ bool RLZTracker::InitRlzDelayed(int directory_key, bool first_run, int delay) { // Schedule the delayed init items. MessageLoop::current()->PostDelayedTask(FROM_HERE, - new DelayedInitTask(directory_key, first_run), delay); + new DelayedInitTask(first_run), delay); return true; } -bool RLZTracker::RecordProductEvent(Product product, AccessPoint point, - Event event) { - return (record_event) ? record_event(product, point, event, NULL) : false; +bool RLZTracker::RecordProductEvent(rlz_lib::Product product, + rlz_lib::AccessPoint point, + rlz_lib::Event event_id) { + return rlz_lib::RecordProductEvent(product, point, event_id); } -bool RLZTracker::ClearAllProductEvents(Product product) { - return (clear_all_events) ? clear_all_events(product, NULL) : false; +bool RLZTracker::ClearAllProductEvents(rlz_lib::Product product) { + return rlz_lib::ClearAllProductEvents(product); } // We implement caching of the answer of get_access_point() if the request // is for CHROME_OMNIBOX. If we had a successful ping, then we update the // cached value. -bool RLZTracker::GetAccessPointRlz(AccessPoint point, std::wstring* rlz) { +bool RLZTracker::GetAccessPointRlz(rlz_lib::AccessPoint point, + std::wstring* rlz) { static std::wstring cached_ommibox_rlz; - if (!get_access_point) - return false; - if ((CHROME_OMNIBOX == point) && + if ((rlz_lib::CHROME_OMNIBOX == point) && (access_values_state == ACCESS_VALUES_FRESH)) { *rlz = cached_ommibox_rlz; return true; } - wchar_t str_rlz[kMaxRlzLength]; - if (!get_access_point(point, str_rlz, kMaxRlzLength, NULL)) + char str_rlz[kMaxRlzLength + 1]; + if (!rlz_lib::GetAccessPointRlz(point, str_rlz, rlz_lib::kMaxRlzLength, NULL)) return false; - if (CHROME_OMNIBOX == point) { + *rlz = ASCIIToWide(std::string(str_rlz)); + if (rlz_lib::CHROME_OMNIBOX == point) { access_values_state = ACCESS_VALUES_FRESH; - cached_ommibox_rlz.assign(str_rlz); + cached_ommibox_rlz.assign(*rlz); } - *rlz = str_rlz; return true; } diff --git a/chrome/browser/rlz/rlz.h b/chrome/browser/rlz/rlz.h index 94a43d9..8085f4d 100644 --- a/chrome/browser/rlz/rlz.h +++ b/chrome/browser/rlz/rlz.h @@ -1,75 +1,32 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 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. #ifndef CHROME_BROWSER_RLZ_RLZ_H_ #define CHROME_BROWSER_RLZ_RLZ_H_ +#include "build/build_config.h" + +#if defined(OS_WIN) + #include <string> #include "base/basictypes.h" +#include "rlz/win/lib/rlz_lib.h" // RLZ is a library which is used to measure distribution scenarios. // Its job is to record certain lifetime events in the registry and to send // them encoded as a compact string at most twice. The sent data does // not contain information that can be used to identify a user or to infer -// browsing habits. The API in this file is a wrapper to rlz.dll which can be -// removed of the system with no adverse effects on chrome. +// browsing habits. The API in this file is a wrapper around the open source +// RLZ library which can be found at http://code.google.com/p/rlz. +// // For partner or bundled installs, the RLZ might send more information -// according to the terms disclosed in the EULA. In the Chromium build the -// rlz.dll is not present so all the functionality becomes no-ops. +// according to the terms disclosed in the EULA. class RLZTracker { public: - // An Access Point offers a way to search using Google. Other products - // have specific entries here so do not remove the reserved access points. - enum AccessPoint { - NO_ACCESS_POINT = 0, - RESERVED_ACCESS_POINT_01, - RESERVED_ACCESS_POINT_02, - RESERVED_ACCESS_POINT_03, - RESERVED_ACCESS_POINT_04, - RESERVED_ACCESS_POINT_05, - RESERVED_ACCESS_POINT_06, - RESERVED_ACCESS_POINT_07, - RESERVED_ACCESS_POINT_08, - CHROME_OMNIBOX, - CHROME_HOME_PAGE, - LAST_ACCESS_POINT - }; - - // A product is an entity which wants to gets credit for setting an access - // point. Currently only the browser itself is supported but installed apps - // could have their own entry here. - enum Product { - RESERVED_PRODUCT_01 = 1, - RESERVED_PRODUCT_02, - RESERVED_PRODUCT_03, - RESERVED_PRODUCT_04, - CHROME, - LAST_PRODUCT - }; - - // Life cycle events. Some of them are applicable to all access points. - enum Event { - INVALID_EVENT = 0, - INSTALL = 1, - SET_TO_GOOGLE, - FIRST_SEARCH, - REPORT_RLS, - LAST_EVENT - }; - - // Initializes the RLZ library services. 'directory_key' indicates the base - // directory the RLZ dll would be found. For example base::DIR_CURRENT. - // If the RLZ dll is not found in this directory the code falls back to try - // to load it from base::DIR_EXE. - // Returns false if the dll could not be loaded and initialized. - // - // This function is intended ONLY for testing. - static bool InitRlz(int directory_key); - // Like InitRlz() this function initializes the RLZ library services for use // in chrome. Besides binding the dll, it schedules a delayed task (delayed // by |delay| seconds) that performs the ping and registers some events @@ -77,22 +34,23 @@ class RLZTracker { // // If the chrome brand is organic (no partners) then the RLZ library is not // loaded or initialized and the pings don't ocurr. - static bool InitRlzDelayed(int directory_key, bool first_run, int delay); + static bool InitRlzDelayed(bool first_run, int delay); // Records an RLZ event. Some events can be access point independent. // Returns false it the event could not be recorded. Requires write access // to the HKCU registry hive on windows. - static bool RecordProductEvent(Product product, AccessPoint point, - Event event_id); + static bool RecordProductEvent(rlz_lib::Product product, + rlz_lib::AccessPoint point, + rlz_lib::Event event_id); // Get the RLZ value of the access point. // Returns false if the rlz string could not be obtained. In some cases // an empty string can be returned which is not an error. - static bool GetAccessPointRlz(AccessPoint point, std::wstring* rlz); + static bool GetAccessPointRlz(rlz_lib::AccessPoint point, std::wstring* rlz); // Clear all events reported by this product. In Chrome this will be called // when it is un-installed. - static bool ClearAllProductEvents(Product product); + static bool ClearAllProductEvents(rlz_lib::Product product); // Invoked during shutdown to clean up any state created by RLZTracker. static void CleanupRlz(); @@ -101,4 +59,6 @@ class RLZTracker { DISALLOW_IMPLICIT_CONSTRUCTORS(RLZTracker); }; +#endif // defined(OS_WIN) + #endif // CHROME_BROWSER_RLZ_RLZ_H_ diff --git a/chrome/browser/rlz/rlz_unittest.cc b/chrome/browser/rlz/rlz_unittest.cc index 8ab87bd..8680de6 100644 --- a/chrome/browser/rlz/rlz_unittest.cc +++ b/chrome/browser/rlz/rlz_unittest.cc @@ -25,12 +25,9 @@ const wchar_t kKeyName[] = L"Software\\Google\\Common\\Rlz\\Events\\C"; } // namespace TEST(RlzLibTest, RecordProductEvent) { - if (!RLZTracker::InitRlz(base::DIR_EXE)) - return; - DWORD recorded_value = 0; - EXPECT_TRUE(RLZTracker::RecordProductEvent(RLZTracker::CHROME, - RLZTracker::CHROME_OMNIBOX, RLZTracker::FIRST_SEARCH)); + EXPECT_TRUE(RLZTracker::RecordProductEvent(rlz_lib::CHROME, + rlz_lib::CHROME_OMNIBOX, rlz_lib::FIRST_SEARCH)); const wchar_t kEvent1[] = L"C1F"; RegKey key1; EXPECT_TRUE(key1.Open(HKEY_CURRENT_USER, kKeyName, KEY_READ)); @@ -38,8 +35,8 @@ TEST(RlzLibTest, RecordProductEvent) { EXPECT_EQ(1, recorded_value); EXPECT_TRUE(CleanValue(kKeyName, kEvent1)); - EXPECT_TRUE(RLZTracker::RecordProductEvent(RLZTracker::CHROME, - RLZTracker::CHROME_HOME_PAGE, RLZTracker::SET_TO_GOOGLE)); + EXPECT_TRUE(RLZTracker::RecordProductEvent(rlz_lib::CHROME, + rlz_lib::CHROME_HOME_PAGE, rlz_lib::SET_TO_GOOGLE)); const wchar_t kEvent2[] = L"C2S"; RegKey key2; EXPECT_TRUE(key2.Open(HKEY_CURRENT_USER, kKeyName, KEY_READ)); @@ -50,18 +47,15 @@ TEST(RlzLibTest, RecordProductEvent) { } TEST(RlzLibTest, CleanProductEvents) { - if (!RLZTracker::InitRlz(base::DIR_EXE)) - return; - DWORD recorded_value = 0; - EXPECT_TRUE(RLZTracker::RecordProductEvent(RLZTracker::CHROME, - RLZTracker::CHROME_OMNIBOX, RLZTracker::FIRST_SEARCH)); + EXPECT_TRUE(RLZTracker::RecordProductEvent(rlz_lib::CHROME, + rlz_lib::CHROME_OMNIBOX, rlz_lib::FIRST_SEARCH)); const wchar_t kEvent1[] = L"C1F"; RegKey key1; EXPECT_TRUE(key1.Open(HKEY_CURRENT_USER, kKeyName, KEY_READ)); EXPECT_TRUE(key1.ReadValueDW(kEvent1, &recorded_value)); EXPECT_EQ(1, recorded_value); - EXPECT_TRUE(RLZTracker::ClearAllProductEvents(RLZTracker::CHROME)); + EXPECT_TRUE(RLZTracker::ClearAllProductEvents(rlz_lib::CHROME)); EXPECT_FALSE(CleanValue(kKeyName, kEvent1)); } diff --git a/chrome/browser/search_engines/template_url.cc b/chrome/browser/search_engines/template_url.cc index f069a8e..becc4fd 100644 --- a/chrome/browser/search_engines/template_url.cc +++ b/chrome/browser/search_engines/template_url.cc @@ -341,7 +341,7 @@ std::wstring TemplateURLRef::ReplaceSearchTerms( // NOTREACHED below.) #if defined(OS_WIN) std::wstring rlz_string; - RLZTracker::GetAccessPointRlz(RLZTracker::CHROME_OMNIBOX, &rlz_string); + RLZTracker::GetAccessPointRlz(rlz_lib::CHROME_OMNIBOX, &rlz_string); if (!rlz_string.empty()) { rlz_string = L"rlz=" + rlz_string + L"&"; url.insert(i->index, rlz_string); diff --git a/chrome/browser/search_engines/template_url_model.cc b/chrome/browser/search_engines/template_url_model.cc index c30a3f9..e12d891 100644 --- a/chrome/browser/search_engines/template_url_model.cc +++ b/chrome/browser/search_engines/template_url_model.cc @@ -502,9 +502,9 @@ void TemplateURLModel::SetDefaultSearchProvider(const TemplateURL* url) { if (url_ref && url_ref->HasGoogleBaseURLs()) { GoogleURLTracker::RequestServerCheck(); #if defined(OS_WIN) - RLZTracker::RecordProductEvent(RLZTracker::CHROME, - RLZTracker::CHROME_OMNIBOX, - RLZTracker::SET_TO_GOOGLE); + RLZTracker::RecordProductEvent(rlz_lib::CHROME, + rlz_lib::CHROME_OMNIBOX, + rlz_lib::SET_TO_GOOGLE); #endif } } diff --git a/chrome/browser/search_engines/template_url_unittest.cc b/chrome/browser/search_engines/template_url_unittest.cc index 5f9bfff..9f3c248 100644 --- a/chrome/browser/search_engines/template_url_unittest.cc +++ b/chrome/browser/search_engines/template_url_unittest.cc @@ -327,9 +327,8 @@ TEST_F(TemplateURLTest, Suggestions) { #if defined(OS_WIN) TEST_F(TemplateURLTest, RLZ) { - RLZTracker::InitRlz(base::DIR_EXE); std::wstring rlz_string; - RLZTracker::GetAccessPointRlz(RLZTracker::CHROME_OMNIBOX, &rlz_string); + RLZTracker::GetAccessPointRlz(rlz_lib::CHROME_OMNIBOX, &rlz_string); TemplateURL t_url; TemplateURLRef ref(L"http://bar/?{google:RLZ}{searchTerms}", 1, 2); diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp index 119aec9..267966f 100644 --- a/chrome/chrome.gyp +++ b/chrome/chrome.gyp @@ -1425,7 +1425,7 @@ '../breakpad/breakpad.gyp:*', '../courgette/courgette.gyp:*', '../gears/gears.gyp:*', - # '../rlz/rlz.gyp:*', // temporary, back with open source rlz + '../rlz/rlz.gyp:*', '../sandbox/sandbox.gyp:*', '../tools/memory_watcher/memory_watcher.gyp:*', '../v8/tools/gyp/v8.gyp:v8_shell', diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi index 2c415d1..35b82ca 100755 --- a/chrome/chrome_browser.gypi +++ b/chrome/chrome_browser.gypi @@ -2914,6 +2914,7 @@ '../google_update/google_update.gyp:google_update', '../third_party/iaccessible2/iaccessible2.gyp:iaccessible2', '../views/views.gyp:views', + '../rlz/rlz.gyp:rlz_lib', '<(allocator_target)', ], 'export_dependent_settings': [ |