summaryrefslogtreecommitdiffstats
path: root/chrome/browser/rlz
diff options
context:
space:
mode:
authorgwilson@google.com <gwilson@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-01 22:46:35 +0000
committergwilson@google.com <gwilson@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-01 22:46:35 +0000
commitf725b310bb25592962ab03a6d7eae646794bc55b (patch)
treefbdac1105d43a3d67ca159ef35bb3b236ef41ebf /chrome/browser/rlz
parentb098824eec611578330c4df3756dab9c48f33686 (diff)
downloadchromium_src-f725b310bb25592962ab03a6d7eae646794bc55b.zip
chromium_src-f725b310bb25592962ab03a6d7eae646794bc55b.tar.gz
chromium_src-f725b310bb25592962ab03a6d7eae646794bc55b.tar.bz2
Chrome-side change to call new RLZ API.
R=cpu BUG=none TEST=RLZ pings should go out at most twice, and not have a time delay between Review URL: http://codereview.chromium.org/1577006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43399 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/rlz')
-rw-r--r--chrome/browser/rlz/rlz.cc36
-rw-r--r--chrome/browser/rlz/rlz.h4
2 files changed, 21 insertions, 19 deletions
diff --git a/chrome/browser/rlz/rlz.cc b/chrome/browser/rlz/rlz.cc
index 1518fd4..e2c2a3c 100644
--- a/chrome/browser/rlz/rlz.cc
+++ b/chrome/browser/rlz/rlz.cc
@@ -61,20 +61,21 @@ typedef bool (*GetAccessPointRlzFn)(RLZTracker::AccessPoint point,
typedef bool (*ClearAllProductEventsFn)(RLZTracker::Product product,
void* reserved);
-typedef bool (*SendFinancialPingFn)(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);
+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;
-SendFinancialPingFn send_ping = NULL;
+SendFinancialPingNoDelayFn send_ping_no_delay = NULL;
template <typename FuncT>
FuncT WireExport(HMODULE module, const char* export_name) {
@@ -106,9 +107,11 @@ bool LoadRLZLibrary(int directory_key) {
WireExport<GetAccessPointRlzFn>(rlz_dll, "GetAccessPointRlz");
clear_all_events =
WireExport<ClearAllProductEventsFn>(rlz_dll, "ClearAllProductEvents");
- send_ping =
- WireExport<SendFinancialPingFn>(rlz_dll, "SendFinancialPing");
- return (record_event && get_access_point && clear_all_events && send_ping);
+ send_ping_no_delay =
+ WireExport<SendFinancialPingNoDelayFn>(rlz_dll,
+ "SendFinancialPingNoDelay");
+ return (record_event && get_access_point && clear_all_events &&
+ send_ping_no_delay);
}
return false;
}
@@ -118,10 +121,10 @@ bool SendFinancialPing(const wchar_t* brand, const wchar_t* lang,
RLZTracker::AccessPoint points[] = {RLZTracker::CHROME_OMNIBOX,
RLZTracker::CHROME_HOME_PAGE,
RLZTracker::NO_ACCESS_POINT};
- if (!send_ping)
+ if (!send_ping_no_delay)
return false;
- return send_ping(RLZTracker::CHROME, points, L"chrome", brand, referral, lang,
- exclude_id, NULL);
+ return send_ping_no_delay(RLZTracker::CHROME, points, L"chrome", brand,
+ referral, lang, exclude_id, NULL);
}
// This class leverages the AutocompleteEditModel notification to know when
@@ -190,8 +193,7 @@ class DailyPingTask : public Task {
}
private:
- // Causes a ping to the server using WinInet. There is logic inside RLZ dll
- // that throttles it to a maximum of one ping per day.
+ // Causes a ping to the server using WinInet.
static void _cdecl PingNow(void*) {
std::wstring lang;
GoogleUpdateSettings::GetLanguage(&lang);
diff --git a/chrome/browser/rlz/rlz.h b/chrome/browser/rlz/rlz.h
index c98f40d..94a43d9 100644
--- a/chrome/browser/rlz/rlz.h
+++ b/chrome/browser/rlz/rlz.h
@@ -11,7 +11,7 @@
// 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 once per day. The sent data does
+// 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.
@@ -72,7 +72,7 @@ class RLZTracker {
// 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 daily ping and registers some events
+ // by |delay| seconds) that performs the ping and registers some events
// when 'first-run' is true.
//
// If the chrome brand is organic (no partners) then the RLZ library is not