diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-26 22:29:17 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-26 22:29:17 +0000 |
commit | 81d9b72d22a4fc9c8569cffe49018b67b2fb7844 (patch) | |
tree | 42c661f18f0a96431269656f701bbb9d745946df /chrome/browser/browser_shutdown.cc | |
parent | c127ae44a93140bc63dd2a423f3571e651474bef (diff) | |
download | chromium_src-81d9b72d22a4fc9c8569cffe49018b67b2fb7844.zip chromium_src-81d9b72d22a4fc9c8569cffe49018b67b2fb7844.tar.gz chromium_src-81d9b72d22a4fc9c8569cffe49018b67b2fb7844.tar.bz2 |
rlz: Hook up on mac, switch to chrome's network stack on win.
This CL conceptually does several things (most of them just one line).
1. Roll RLZ 105:118
106: Fix "expression result unused" warning caused by VERIFY() use.
107: rlz: Add an implementation of PingServer() that uses chrome's net stack.
108: Implement RlzValueStoreMac.
109: Move GetMachineId() to its own file. No intended behavior change.
110: Implement GetSystemTimeAsInt64() on mac.
111: Minor cleanups.
112: Don't pay a static initializer for expected_assertion_ when it's not used.
113: Rename rlz_lib2.cc and win/lib/rlz_lib.cc to win/lib/rlz_lib_win.cc
114: mac: Implement GetMachineId().
115: mac: Implement the locking part of ScopedRlzValueStoreLock.
116: Tweaks to make the use of chrome's net stack forceable through gyp.
117: Push RLZ_NETWORK_IMPLEMENTATION_ define to dependent targets.
118: Use base::mac::ScopedNSAutorleasePool only on mac.
2. Change rlz.cpp to use the blocking pool instead of the file thread.
3. Enable on mac.
4. Switch to chrome's network stack on windows
5. Switch RlzSendFinancialPingFunction to be an AsyncExtensionFunction
that calls SendFinancialPing on a worker thread. This is required because
extension functions run with a MessageLoop, so the MessageLoop in
SendFinancialPing in rlz would trigger an assert (and making that inner
loop nestable seems like a very bad idea). This change also removes
one instance of ScopedAllowIO and fixes a TODO.
BUG=46579
TEST=
1.) Do an official chrome build
2.) Add gratuitous logging in rlz.cc and other places and check that by default:
* The channel is reported as "stable"
* The brand code is the empty string
* This brand code counts as organic install
* RLZ exits early.
3.) Create ~/Library/Google/Google\ Chrome\ Brand.plist and add e.g. the string "BRAND" for key KSBrandID, restart chrome.
* Brand code is now "BRAND" (this depends on Chrome's Info.plist not having a KSBrandID key, which has precedence. Currently our Chromes seem to never have this key.)
* A ping is scheduled, but nothing is sent.
* Use the omnibox a little, which causes product events to be recorded.
4.) Restart chrome yet again, wait a bit.
* Logging in "SendFinancialPing()" should print:
pinging http://clients1.google.com:80/tools/pso/ping?as=chrome&brand=BRAND&pid=&hl=en&events=C1F,C1S&rep=2&rlz=C1:1C1_____enUS476,C2:1C2_____enUS476&id=0926C138C2EA77A791CB450D322D0183E5A8079300000001B5
ping completed!
TBR=sky
Review URL: https://chromiumcodereview.appspot.com/9699054
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129028 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_shutdown.cc')
-rw-r--r-- | chrome/browser/browser_shutdown.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/browser/browser_shutdown.cc b/chrome/browser/browser_shutdown.cc index daffffb..5cd0114 100644 --- a/chrome/browser/browser_shutdown.cc +++ b/chrome/browser/browser_shutdown.cc @@ -42,6 +42,9 @@ #if defined(OS_WIN) #include "chrome/browser/browser_util_win.h" #include "chrome/browser/first_run/upgrade_util_win.h" +#endif + +#if defined(ENABLE_RLZ) #include "chrome/browser/rlz/rlz.h" #endif @@ -155,7 +158,7 @@ bool ShutdownPreThreadsStop() { prefs->CommitPendingWrite(); -#if defined(OS_WIN) && defined(GOOGLE_CHROME_BUILD) +#if defined(ENABLE_RLZ) // Cleanup any statics created by RLZ. Must be done before NotificationService // is destroyed. RLZTracker::CleanupRlz(); |