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

Unified Diff: content/browser/dom_storage/dom_storage_context_impl_new.cc

Issue 9999021: Don't hardcode the "Local Storage" directory name in DomStorageContext. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code review. Created 8 years, 8 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 | « no previous file | webkit/dom_storage/dom_storage_context.h » ('j') | webkit/dom_storage/dom_storage_context.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/dom_storage/dom_storage_context_impl_new.cc
diff --git a/content/browser/dom_storage/dom_storage_context_impl_new.cc b/content/browser/dom_storage/dom_storage_context_impl_new.cc
index cec4cdd958cef8e006c91ea261b2eed3850324e9..d11a1a887b28e4523025fb50c94c5eec9bd18ad8 100644
--- a/content/browser/dom_storage/dom_storage_context_impl_new.cc
+++ b/content/browser/dom_storage/dom_storage_context_impl_new.cc
@@ -67,7 +67,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(
@@ -82,9 +83,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,
@@ -109,7 +113,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) {
« no previous file with comments | « no previous file | webkit/dom_storage/dom_storage_context.h » ('j') | webkit/dom_storage/dom_storage_context.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698