diff options
author | cpu@google.com <cpu@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-26 02:44:08 +0000 |
---|---|---|
committer | cpu@google.com <cpu@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-26 02:44:08 +0000 |
commit | 0a85712d195c1a3ad55a75d8321fe22c593bf35f (patch) | |
tree | 1c0fa132fe8a2e511046cb633ad3a8472682b42e | |
parent | e341910054c9a11f5027a052a0c174fbde9102b2 (diff) | |
download | chromium_src-0a85712d195c1a3ad55a75d8321fe22c593bf35f.zip chromium_src-0a85712d195c1a3ad55a75d8321fe22c593bf35f.tar.gz chromium_src-0a85712d195c1a3ad55a75d8321fe22c593bf35f.tar.bz2 |
Add client parameter to the RLZ ping
- Does nothing on regular chrome or chromium installs
- up to google_update to put data in 'client'
BUG=1503035
Review URL: http://codereview.chromium.org/12657
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6030 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/rlz/rlz.cc | 9 | ||||
-rw-r--r-- | chrome/installer/util/google_update_constants.cc | 1 | ||||
-rw-r--r-- | chrome/installer/util/google_update_constants.h | 1 | ||||
-rw-r--r-- | chrome/installer/util/google_update_settings.cc | 3 | ||||
-rw-r--r-- | chrome/installer/util/google_update_settings.h | 4 |
5 files changed, 15 insertions, 3 deletions
diff --git a/chrome/browser/rlz/rlz.cc b/chrome/browser/rlz/rlz.cc index b13af4f..ed63189 100644 --- a/chrome/browser/rlz/rlz.cc +++ b/chrome/browser/rlz/rlz.cc @@ -108,13 +108,13 @@ bool LoadRLZLibrary(int directory_key) { } bool SendFinancialPing(const wchar_t* brand, const wchar_t* lang, - bool exclude_id) { + const wchar_t* client, bool exclude_id) { RLZTracker::AccessPoint points[] = {RLZTracker::CHROME_OMNIBOX, RLZTracker::CHROME_HOME_PAGE, RLZTracker::NO_ACCESS_POINT}; if (!send_ping) return false; - return send_ping(RLZTracker::CHROME, points, L"chrome", brand, NULL, lang, + return send_ping(RLZTracker::CHROME, points, L"chrome", brand, client, lang, exclude_id, NULL); } @@ -180,7 +180,10 @@ class DailyPingTask : public Task { lang = L"en"; std::wstring brand; GoogleUpdateSettings::GetBrand(&brand); - if (SendFinancialPing(brand.c_str(), lang.c_str(), is_organic(brand))) + std::wstring client; + GoogleUpdateSettings::GetClient(&client); + if (SendFinancialPing(brand.c_str(), lang.c_str(), client.c_str(), + is_organic(brand))) access_values_state = ACCESS_VALUES_STALE; } diff --git a/chrome/installer/util/google_update_constants.cc b/chrome/installer/util/google_update_constants.cc index 08ccefc..860229a 100644 --- a/chrome/installer/util/google_update_constants.cc +++ b/chrome/installer/util/google_update_constants.cc @@ -23,6 +23,7 @@ const wchar_t kRegRenameCmdField[] = L"cmd"; const wchar_t kRegRLZBrandField[] = L"brand"; const wchar_t kRegUsageStatsField[] = L"usagestats"; const wchar_t kRegVersionField[] = L"pv"; +const wchar_t kRegClientField[] = L"client"; const wchar_t kEnvProductVersionKey[] = L"CHROME_VERSION"; } // namespace installer diff --git a/chrome/installer/util/google_update_constants.h b/chrome/installer/util/google_update_constants.h index 1277f01..bd225a8 100644 --- a/chrome/installer/util/google_update_constants.h +++ b/chrome/installer/util/google_update_constants.h @@ -28,6 +28,7 @@ extern const wchar_t kRegRenameCmdField[]; extern const wchar_t kRegRLZBrandField[]; extern const wchar_t kRegUsageStatsField[]; extern const wchar_t kRegVersionField[]; +extern const wchar_t kRegClientField[]; extern const wchar_t kEnvProductVersionKey[]; } // namespace google_update diff --git a/chrome/installer/util/google_update_settings.cc b/chrome/installer/util/google_update_settings.cc index 394c017..57b20cb 100644 --- a/chrome/installer/util/google_update_settings.cc +++ b/chrome/installer/util/google_update_settings.cc @@ -59,3 +59,6 @@ bool GoogleUpdateSettings::GetBrand(std::wstring* brand) { return ReadGoogleUpdateStrKey(google_update::kRegRLZBrandField, brand); } +bool GoogleUpdateSettings::GetClient(std::wstring* client) { + return ReadGoogleUpdateStrKey(google_update::kRegClientField, client); +} diff --git a/chrome/installer/util/google_update_settings.h b/chrome/installer/util/google_update_settings.h index e41c9c6..caa75b1 100644 --- a/chrome/installer/util/google_update_settings.h +++ b/chrome/installer/util/google_update_settings.h @@ -36,6 +36,10 @@ class GoogleUpdateSettings { // assigned to a partner. Returns false if the information is not available. static bool GetBrand(std::wstring* brand); + // Returns in 'client' the RLZ client id available for some distribution + // partners. This value does not exist for most chrome or chromium installs. + static bool GetClient(std::wstring* client); + private: DISALLOW_IMPLICIT_CONSTRUCTORS(GoogleUpdateSettings); }; |