diff options
author | marja@chromium.org <marja@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-17 09:30:14 +0000 |
---|---|---|
committer | marja@chromium.org <marja@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-17 09:30:14 +0000 |
commit | e3ba9b981fc250741a2d5c4d7f0561309184a0f0 (patch) | |
tree | f1e3f6b948f768904157dcb3dd25ea4d684f0d7c /content/browser/dom_storage | |
parent | 29f090682db790799d64915f89c5cf03bcb35b0f (diff) | |
download | chromium_src-e3ba9b981fc250741a2d5c4d7f0561309184a0f0.zip chromium_src-e3ba9b981fc250741a2d5c4d7f0561309184a0f0.tar.gz chromium_src-e3ba9b981fc250741a2d5c4d7f0561309184a0f0.tar.bz2 |
DomStorageContext: separate directories for localStorage and sessionStorage.
This is needed to eventually store sessionStorage on disk.
BUG=104292
TEST=NONE
Review URL: http://codereview.chromium.org/9999021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132555 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/dom_storage')
-rw-r--r-- | content/browser/dom_storage/dom_storage_context_impl.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/content/browser/dom_storage/dom_storage_context_impl.cc b/content/browser/dom_storage/dom_storage_context_impl.cc index 8eb0b39..683e105 100644 --- a/content/browser/dom_storage/dom_storage_context_impl.cc +++ b/content/browser/dom_storage/dom_storage_context_impl.cc @@ -65,7 +65,8 @@ void GetAllStorageFilesHelper( std::vector<FilePath> paths; for (size_t i = 0; i < infos.size(); ++i) { paths.push_back( - OriginToFullFilePath(context->directory(), infos[i].origin)); + OriginToFullFilePath(context->localstorage_directory(), + infos[i].origin)); } reply_loop->PostTask( @@ -80,9 +81,12 @@ DOMStorageContextImpl::DOMStorageContextImpl( const FilePath& data_path, quota::SpecialStoragePolicy* special_storage_policy) { base::SequencedWorkerPool* worker_pool = BrowserThread::GetBlockingPool(); + // TODO(marja): Pass a nonempty session storage directory when session storage + // is backed on disk. context_ = new dom_storage::DomStorageContext( data_path.empty() ? data_path : data_path.AppendASCII(kLocalStorageDirectory), + FilePath(), // Empty session storage directory. special_storage_policy, new DomStorageWorkerPoolTaskRunner( worker_pool, @@ -107,7 +111,8 @@ void DOMStorageContextImpl::GetAllStorageFiles( FilePath DOMStorageContextImpl::GetFilePath(const string16& origin_id) const { DCHECK(context_); - return OriginToFullFilePath(context_->directory(), OriginIdToGURL(origin_id)); + return OriginToFullFilePath(context_->localstorage_directory(), + OriginIdToGURL(origin_id)); } void DOMStorageContextImpl::DeleteForOrigin(const string16& origin_id) { |