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

Unified Diff: webkit/dom_storage/dom_storage_context.h

Issue 9999021: Don't hardcode the "Local Storage" directory name in DomStorageContext. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased better. 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 | « content/browser/dom_storage/dom_storage_context_impl.cc ('k') | webkit/dom_storage/dom_storage_context.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/dom_storage/dom_storage_context.h
diff --git a/webkit/dom_storage/dom_storage_context.h b/webkit/dom_storage/dom_storage_context.h
index 1370913d748fdc1d5f281d6c1051cfb4134c3f91..3bcc6ca4a091e442be88d1be127e6665e8489056 100644
--- a/webkit/dom_storage/dom_storage_context.h
+++ b/webkit/dom_storage/dom_storage_context.h
@@ -88,10 +88,22 @@ class DomStorageContext
virtual ~EventObserver() {}
};
- DomStorageContext(const FilePath& directory, // empty for incognito profiles
- quota::SpecialStoragePolicy* special_storage_policy,
- DomStorageTaskRunner* task_runner);
- const FilePath& directory() const { return directory_; }
+ DomStorageContext(
+ const FilePath& localstorage_directory, // empty for incognito profiles
+ const FilePath& sessionstorage_directory, // empty for incognito profiles
+ quota::SpecialStoragePolicy* special_storage_policy,
+ DomStorageTaskRunner* task_runner);
+
+ // Returns the directory path for localStorage, or an empty directory, if
+ // there is no backing on disk.
+ const FilePath& localstorage_directory() { return localstorage_directory_; }
+
+ // Returns the directory path for sessionStorage, or an empty directory, if
+ // there is no backing on disk.
+ const FilePath& sessionstorage_directory() {
+ return sessionstorage_directory_;
+ }
+
DomStorageTaskRunner* task_runner() const { return task_runner_; }
DomStorageNamespace* GetStorageNamespace(int64 namespace_id);
@@ -161,7 +173,12 @@ class DomStorageContext
StorageNamespaceMap namespaces_;
// Where localstorage data is stored, maybe empty for the incognito use case.
- FilePath directory_;
+ FilePath localstorage_directory_;
+
+ // Where sessionstorage data is stored, maybe empty for the incognito use
+ // case. Always empty until the file-backed session storage feature is
+ // implemented.
+ FilePath sessionstorage_directory_;
// Used to schedule sequenced background tasks.
scoped_refptr<DomStorageTaskRunner> task_runner_;
« no previous file with comments | « content/browser/dom_storage/dom_storage_context_impl.cc ('k') | webkit/dom_storage/dom_storage_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698