Index: chrome/browser/ui/startup/startup_browser_creator_impl.cc |
diff --git a/chrome/browser/ui/startup/startup_browser_creator_impl.cc b/chrome/browser/ui/startup/startup_browser_creator_impl.cc |
index a6a09e89bc733940ecffef1f92fa44c9dd3dce59..b148c24a7c5687cbee10a07f8d85e8690779008c 100644 |
--- a/chrome/browser/ui/startup/startup_browser_creator_impl.cc |
+++ b/chrome/browser/ui/startup/startup_browser_creator_impl.cc |
@@ -72,6 +72,7 @@ |
#include "chrome/common/url_constants.h" |
#include "chrome/installer/util/browser_distribution.h" |
#include "content/public/browser/child_process_security_policy.h" |
+#include "content/public/browser/dom_storage_context.h" |
#include "content/public/browser/notification_observer.h" |
#include "content/public/browser/notification_registrar.h" |
#include "content/public/browser/web_contents.h" |
@@ -619,6 +620,17 @@ bool StartupBrowserCreatorImpl::ProcessStartupURLs( |
return false; |
AddInfoBarsIfNecessary(browser, chrome::startup::IS_PROCESS_STARTUP); |
+ |
+ // Session restore may occur if the startup preference is "last" or if the |
+ // crash infobar is displayed. Otherwise, it's safe for the DOM storage system |
+ // to start deleting leftover data. |
+ if (pref.type != SessionStartupPref::LAST && |
+ !HasPendingUncleanExit(profile_)) { |
+ content::DOMStorageContext* dom_storage_context = |
Peter Kasting
2012/07/16 17:41:02
Nit: Could also inline into next line and break af
marja
2012/08/06 11:53:33
Done.
|
+ content::BrowserContext::GetDOMStorageContext(profile_); |
+ dom_storage_context->StartScavengingUnusedSessionStorage(); |
+ } |
+ |
return true; |
} |