Index: content/browser/browser_context.cc |
diff --git a/content/browser/browser_context.cc b/content/browser/browser_context.cc |
index 522ccd108edc29658a73f380f2713a33e3b10a37..09e53ac8eeb85fd01e212e0d0a47bf8fef11b0c0 100644 |
--- a/content/browser/browser_context.cc |
+++ b/content/browser/browser_context.cc |
@@ -82,7 +82,8 @@ void CreateQuotaManagerAndClients(BrowserContext* context) { |
FilePath path = context->IsOffTheRecord() ? FilePath() : context->GetPath(); |
scoped_refptr<DOMStorageContextImpl> dom_storage_context = |
- new DOMStorageContextImpl(path, context->GetSpecialStoragePolicy()); |
+ new DOMStorageContextImpl(path, context->GetSpecialStoragePolicy(), |
+ context->save_session_storage_on_disk()); |
michaeln
2012/07/10 19:04:13
All of the other methods in the content::BrowsingC
marja
2012/07/11 12:41:31
Added virtual ShouldSaveSessionStorageOnDisk which
|
context->SetUserData( |
kDOMStorageContextKeyName, |
new UserDataAdapter<DOMStorageContextImpl>(dom_storage_context)); |
@@ -246,6 +247,10 @@ void BrowserContext::PurgeMemory(BrowserContext* browser_context) { |
GetDOMStorageContextImpl(browser_context)->PurgeMemory(); |
} |
+BrowserContext::BrowserContext() |
+ : save_session_storage_on_disk_(false) { |
+} |
+ |
BrowserContext::~BrowserContext() { |
// These message loop checks are just to avoid leaks in unittests. |
if (GetUserData(kDatabaseTrackerKeyName) && |
@@ -263,4 +268,10 @@ BrowserContext::~BrowserContext() { |
GetDownloadManager(this)->Shutdown(); |
} |
+void BrowserContext::SetSaveSessionStorageOnDisk( |
+ bool save_session_storage_on_disk) { |
+ DCHECK(!GetUserData(kQuotaManagerKeyName)); |
+ save_session_storage_on_disk_ = save_session_storage_on_disk; |
+} |
+ |
} // namespace content |