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

Unified Diff: webkit/dom_storage/dom_storage_area.cc

Issue 9695013: DOMStorageContextImpl that's implemented in terms of the new dom_storage classes. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 9 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 | « webkit/dom_storage/dom_storage_area.h ('k') | 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: webkit/dom_storage/dom_storage_area.cc
===================================================================
--- webkit/dom_storage/dom_storage_area.cc (revision 127221)
+++ webkit/dom_storage/dom_storage_area.cc (working copy)
@@ -16,6 +16,20 @@
namespace dom_storage {
+// static
+const FilePath::CharType DomStorageArea::kDatabaseFileExtension[] =
+ FILE_PATH_LITERAL(".localstorage");
+
+// static
+FilePath DomStorageArea::DatabaseFileNameFromOrigin(const GURL& origin) {
+ std::string filename = fileapi::GetOriginIdentifierFromURL(origin);
+ // There is no FilePath.AppendExtension() method, so start with just the
+ // extension as the filename, and then InsertBeforeExtension the desired
+ // name.
+ return FilePath().Append(kDatabaseFileExtension).
+ InsertBeforeExtensionASCII(filename);
+}
+
DomStorageArea::DomStorageArea(
int64 namespace_id, const GURL& origin,
const FilePath& directory, DomStorageTaskRunner* task_runner)
@@ -164,11 +178,4 @@
commit_in_flight_ = false;
}
-// static
-FilePath DomStorageArea::DatabaseFileNameFromOrigin(const GURL& origin) {
- std::string filename = fileapi::GetOriginIdentifierFromURL(origin)
- + ".localstorage";
- return FilePath().AppendASCII(filename);
-}
-
} // namespace dom_storage
« no previous file with comments | « webkit/dom_storage/dom_storage_area.h ('k') | webkit/dom_storage/dom_storage_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698