summaryrefslogtreecommitdiffstats
path: root/webkit/dom_storage/dom_storage_area.cc
diff options
context:
space:
mode:
authormichaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-20 01:16:59 +0000
committermichaeln@google.com <michaeln@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-20 01:16:59 +0000
commit735e20c7177f5ec034d8198b4c7549362b241f54 (patch)
tree845880a62234eda061e3e32c3eddccbe861afcc5 /webkit/dom_storage/dom_storage_area.cc
parent4a3e2715c9d3801e315714422b30f4cb62cea295 (diff)
downloadchromium_src-735e20c7177f5ec034d8198b4c7549362b241f54.zip
chromium_src-735e20c7177f5ec034d8198b4c7549362b241f54.tar.gz
chromium_src-735e20c7177f5ec034d8198b4c7549362b241f54.tar.bz2
Revert 127575 - Revert 127573 - DOMStorageContextImpl that's implemented in terms of the new dom_storage classes. Also compile out existing tests that no longer apply when ENABLE_NEW_DOM_STORAGE_BACKEND is defined.
And add the missing #include to fix the compile error. BUG=106763 Review URL: https://chromiumcodereview.appspot.com/9695013 TBR=michaeln@google.com Review URL: https://chromiumcodereview.appspot.com/9726022 TBR=dgrogan@chromium.org Review URL: https://chromiumcodereview.appspot.com/9726023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127604 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/dom_storage/dom_storage_area.cc')
-rw-r--r--webkit/dom_storage/dom_storage_area.cc21
1 files changed, 14 insertions, 7 deletions
diff --git a/webkit/dom_storage/dom_storage_area.cc b/webkit/dom_storage/dom_storage_area.cc
index 79de209..41325f7 100644
--- a/webkit/dom_storage/dom_storage_area.cc
+++ b/webkit/dom_storage/dom_storage_area.cc
@@ -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 @@ void DomStorageArea::CommitChanges() {
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