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

Side by Side Diff: content/browser/browser_context.cc

Issue 9963107: Persist sessionStorage on disk. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code review & fixes. Created 8 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/public/browser/browser_context.h" 5 #include "content/public/browser/browser_context.h"
6 6
7 #include "content/browser/appcache/chrome_appcache_service.h" 7 #include "content/browser/appcache/chrome_appcache_service.h"
8 #include "content/browser/dom_storage/dom_storage_context_impl.h" 8 #include "content/browser/dom_storage/dom_storage_context_impl.h"
9 #include "content/browser/download/download_file_manager.h" 9 #include "content/browser/download/download_file_manager.h"
10 #include "content/browser/download/download_manager_impl.h" 10 #include "content/browser/download/download_manager_impl.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 scoped_refptr<DatabaseTracker> db_tracker = new DatabaseTracker( 80 scoped_refptr<DatabaseTracker> db_tracker = new DatabaseTracker(
81 context->GetPath(), context->IsOffTheRecord(), 81 context->GetPath(), context->IsOffTheRecord(),
82 context->GetSpecialStoragePolicy(), quota_manager->proxy(), 82 context->GetSpecialStoragePolicy(), quota_manager->proxy(),
83 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)); 83 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE));
84 context->SetUserData(kDatabaseTrackerKeyName, 84 context->SetUserData(kDatabaseTrackerKeyName,
85 new UserDataAdapter<DatabaseTracker>(db_tracker)); 85 new UserDataAdapter<DatabaseTracker>(db_tracker));
86 86
87 FilePath path = context->IsOffTheRecord() ? FilePath() : context->GetPath(); 87 FilePath path = context->IsOffTheRecord() ? FilePath() : context->GetPath();
88 scoped_refptr<DOMStorageContextImpl> dom_storage_context = 88 scoped_refptr<DOMStorageContextImpl> dom_storage_context =
89 new DOMStorageContextImpl(path, context->GetSpecialStoragePolicy()); 89 new DOMStorageContextImpl(path, context->GetSpecialStoragePolicy(),
90 context->ShouldSaveSessionStorageOnDisk());
jam 2012/07/11 15:51:35 how about instead of adding a method to the Browse
jochen (gone - plz use gerrit) 2012/07/11 17:52:16 Cookies are a bad role model here: in contrast to
jam 2012/07/11 21:40:28 I see. It seems that this can be changed so that i
marja 2012/07/12 09:22:03 Done.
90 context->SetUserData( 91 context->SetUserData(
91 kDOMStorageContextKeyName, 92 kDOMStorageContextKeyName,
92 new UserDataAdapter<DOMStorageContextImpl>(dom_storage_context)); 93 new UserDataAdapter<DOMStorageContextImpl>(dom_storage_context));
93 94
94 scoped_refptr<IndexedDBContext> indexed_db_context = new IndexedDBContextImpl( 95 scoped_refptr<IndexedDBContext> indexed_db_context = new IndexedDBContextImpl(
95 path, context->GetSpecialStoragePolicy(), quota_manager->proxy(), 96 path, context->GetSpecialStoragePolicy(), quota_manager->proxy(),
96 BrowserThread::GetMessageLoopProxyForThread( 97 BrowserThread::GetMessageLoopProxyForThread(
97 BrowserThread::WEBKIT_DEPRECATED)); 98 BrowserThread::WEBKIT_DEPRECATED));
98 context->SetUserData( 99 context->SetUserData(
99 kIndexedDBContextKeyName, 100 kIndexedDBContextKeyName,
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 GetDatabaseTracker(this))); 262 GetDatabaseTracker(this)));
262 } 263 }
263 264
264 if (GetUserData(kDOMStorageContextKeyName)) 265 if (GetUserData(kDOMStorageContextKeyName))
265 GetDOMStorageContextImpl(this)->Shutdown(); 266 GetDOMStorageContextImpl(this)->Shutdown();
266 267
267 if (GetUserData(kDownloadManagerKeyName)) 268 if (GetUserData(kDownloadManagerKeyName))
268 GetDownloadManager(this)->Shutdown(); 269 GetDownloadManager(this)->Shutdown();
269 } 270 }
270 271
272 bool BrowserContext::ShouldSaveSessionStorageOnDisk() const {
273 return false;
274 }
275
271 } // namespace content 276 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698