Index: chrome/browser/rlz/rlz.cc |
diff --git a/chrome/browser/rlz/rlz.cc b/chrome/browser/rlz/rlz.cc |
index 7005e32d47c199b57d171818dd68c6e9a37feff3..20901fc36925438dd8fb344d2bfb98eccfa7a24e 100644 |
--- a/chrome/browser/rlz/rlz.cc |
+++ b/chrome/browser/rlz/rlz.cc |
@@ -51,6 +51,11 @@ static bool ClearReferral() { |
} // namespace GoogleUpdateSettings |
#endif |
+// There is no corresponding header for content/browser/browser_main_runner.cc |
+// to export this global but it is used in other places as well (also defined |
+// as "extern"). |
+extern bool g_exited_main_message_loop; |
jam
2012/12/03 15:46:05
this is wrong. internal variables of content shoul
|
+ |
using content::BrowserThread; |
using content::NavigationEntry; |
@@ -129,6 +134,11 @@ void RecordProductEvents(bool first_run, |
bool SendFinancialPing(const std::string& brand, |
const string16& lang, |
const string16& referral) { |
+ // It's possible for the user to close Chrome just before the time that this |
+ // ping is due to go out. Detect that condition and abort. |
+ if (g_exited_main_message_loop) |
+ return false; |
Glenn Wilson
2012/11/27 01:17:49
is SendFinancialPing the right depth for this? Sh
|
+ |
rlz_lib::AccessPoint points[] = {RLZTracker::CHROME_OMNIBOX, |
RLZTracker::CHROME_HOME_PAGE, |
rlz_lib::NO_ACCESS_POINT}; |