Index: chrome/browser/ui/browser.cc |
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc |
index 3b134e72b6f2d12a2fb3ce4af06dda0da61ac1bd..a73d1572f84a2660de711c434ab940d7cae37a62 100644 |
--- a/chrome/browser/ui/browser.cc |
+++ b/chrome/browser/ui/browser.cc |
@@ -68,6 +68,7 @@ |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/browser/profiles/profile_destroyer.h" |
#include "chrome/browser/profiles/profile_metrics.h" |
+#include "chrome/browser/profiles/profile_statistics.h" |
#include "chrome/browser/profiles/profiles_state.h" |
#include "chrome/browser/repost_form_warning_controller.h" |
#include "chrome/browser/search/search.h" |
@@ -514,8 +515,8 @@ Browser::~Browser() { |
if (tab_restore_service) |
tab_restore_service->BrowserClosed(live_tab_context()); |
-#if !defined(OS_MACOSX) |
if (!chrome::GetTotalBrowserCountForProfile(profile_)) { |
+#if !defined(OS_MACOSX) |
// We're the last browser window with this profile. We need to nuke the |
// TabRestoreService, which will start the shutdown of the |
// NavigationControllers and allow for proper shutdown. If we don't do this |
@@ -526,9 +527,12 @@ Browser::~Browser() { |
// the last browser has closed. The Mac equivalent is in its app |
// controller. |
TabRestoreServiceFactory::ResetForProfile(profile_); |
- } |
#endif |
+ // Store statistics into ProfileInfoCache |
Mike Lerman
2015/11/03 20:50:42
nit: amend a period. Although this comment isn't n
lwchkg
2015/11/04 00:11:07
Acknowledged.
|
+ profiles::StoreProfileStatisticsToCache(profile_); |
Mike Lerman
2015/11/03 20:50:42
There's a better place for this hook. Put this in
lwchkg
2015/11/04 00:11:07
Sounds good! Will check tonight.
|
+ } |
+ |
profile_pref_registrar_.RemoveAll(); |
encoding_auto_detect_.Destroy(); |