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

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: . 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') | no next file with comments »
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..c65c4538c712fa27c571203b3d752f41f6b4de7b 100644
--- a/content/browser/dom_storage/dom_storage_context_impl_new.cc
+++ b/content/browser/dom_storage/dom_storage_context_impl_new.cc
@@ -27,8 +27,6 @@ using webkit_database::DatabaseUtil;
namespace {
-const char kLocalStorageDirectory[] = "Local Storage";
-
// TODO(michaeln): Fix the content layer api, FilePaths and
// string16 origin_ids are just wrong. Then get rid of
// this conversion non-sense. Most of the includes are just
@@ -67,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->GetLocalStorageDirectory(),
+ infos[i].origin));
}
reply_loop->PostTask(
@@ -83,8 +82,7 @@ DOMStorageContextImpl::DOMStorageContextImpl(
quota::SpecialStoragePolicy* special_storage_policy) {
base::SequencedWorkerPool* worker_pool = BrowserThread::GetBlockingPool();
context_ = new dom_storage::DomStorageContext(
- data_path.empty() ?
- data_path : data_path.AppendASCII(kLocalStorageDirectory),
+ data_path,
michaeln 2012/04/11 20:35:53 Another option is to give the dom_storage class tw
marja 2012/04/12 14:58:11 Alright! Done.
special_storage_policy,
new DomStorageWorkerPoolTaskRunner(
worker_pool,
@@ -109,7 +107,8 @@ void DOMStorageContextImpl::GetAllStorageFiles(
FilePath DOMStorageContextImpl::GetFilePath(const string16& origin_id) const {
DCHECK(context_);
- return OriginToFullFilePath(context_->directory(), OriginIdToGURL(origin_id));
+ return OriginToFullFilePath(context_->GetLocalStorageDirectory(),
+ 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698