Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6448)

Unified Diff: chrome/browser/ui/browser.cc

Issue 9751015: ~Browser: Don't create TabRestoreService on exit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/sessions/session_service_factory.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 85df3df8965653a6d7d874baaca79ab1a2fbb375..55d9e2d5aed02ee5f4db3eb0c6cdf496194bbd6a 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -444,6 +444,16 @@ Browser::~Browser() {
BrowserList::RemoveBrowser(this);
+ SessionService* session_service =
+ SessionServiceFactory::GetForProfile(profile_);
+ if (session_service)
+ session_service->WindowClosed(session_id_);
+
+ TabRestoreService* tab_restore_service =
+ TabRestoreServiceFactory::GetForProfile(profile());
+ if (tab_restore_service)
+ tab_restore_service->BrowserClosed(tab_restore_service_delegate());
+
#if !defined(OS_MACOSX)
if (!BrowserList::HasBrowserWithProfile(profile_)) {
// We're the last browser window with this profile. We need to nuke the
@@ -459,16 +469,6 @@ Browser::~Browser() {
}
#endif
- SessionService* session_service =
- SessionServiceFactory::GetForProfile(profile_);
- if (session_service)
- session_service->WindowClosed(session_id_);
-
- TabRestoreService* tab_restore_service =
- TabRestoreServiceFactory::GetForProfile(profile());
- if (tab_restore_service)
- tab_restore_service->BrowserClosed(tab_restore_service_delegate());
-
profile_pref_registrar_.RemoveAll();
local_pref_registrar_.RemoveAll();
« no previous file with comments | « chrome/browser/sessions/session_service_factory.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698