[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

jochen at chromium.org jochen at chromium.org
Wed Dec 22 13:36:29 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit b929089a90ab8631489a0ad004a067ba1cdecc5c
Author: jochen at chromium.org <jochen at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Sep 21 11:15:37 2010 +0000

    2010-09-21  Jochen Eisinger  <jochen at chromium.org>
    
            Reviewed by Jeremy Orlow.
    
            Factor out the file name used for a given indexed database to a static method.
            https://bugs.webkit.org/show_bug.cgi?id=46090
    
            * storage/IDBFactoryBackendImpl.cpp:
            (WebCore::openSQLiteDatabase):
            (WebCore::IDBFactoryBackendImpl::databaseFileName):
            * storage/IDBFactoryBackendImpl.h:
    2010-09-21  Jochen Eisinger  <jochen at chromium.org>
    
            Reviewed by Jeremy Orlow.
    
            [chromium] expose the filename used for a given indexed DB
            https://bugs.webkit.org/show_bug.cgi?id=46090
    
            * WebKit.gyp:
            * public/WebIDBFactory.h:
            * src/WebIDBFactory.cpp:
            (WebKit::WebIDBFactory::databaseFileName):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67941 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 82af341..caccb9f 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2010-09-21  Jochen Eisinger  <jochen at chromium.org>
+
+        Reviewed by Jeremy Orlow.
+
+        Factor out the file name used for a given indexed database to a static method.
+        https://bugs.webkit.org/show_bug.cgi?id=46090
+
+        * storage/IDBFactoryBackendImpl.cpp:
+        (WebCore::openSQLiteDatabase):
+        (WebCore::IDBFactoryBackendImpl::databaseFileName):
+        * storage/IDBFactoryBackendImpl.h:
+
 2010-09-21  Dirk Schulze  <krit at webkit.org>
 
         SVG Filter cleanup
diff --git a/WebCore/storage/IDBFactoryBackendImpl.cpp b/WebCore/storage/IDBFactoryBackendImpl.cpp
index d819c92..b7ffdca 100644
--- a/WebCore/storage/IDBFactoryBackendImpl.cpp
+++ b/WebCore/storage/IDBFactoryBackendImpl.cpp
@@ -62,9 +62,7 @@ static PassOwnPtr<SQLiteDatabase> openSQLiteDatabase(SecurityOrigin* securityOri
             return 0;
         }
 
-        String databaseIdentifier = securityOrigin->databaseIdentifier();
-        String santizedName = encodeForFileName(name);
-        path = pathByAppendingComponent(pathBase, databaseIdentifier + "_" + santizedName + ".indexeddb");
+        path = pathByAppendingComponent(pathBase, IDBFactoryBackendImpl::databaseFileName(name, securityOrigin));
     }
 
     OwnPtr<SQLiteDatabase> sqliteDatabase = adoptPtr(new SQLiteDatabase());
@@ -148,6 +146,13 @@ void IDBFactoryBackendImpl::abortPendingTransactions(const Vector<int>& pendingI
         m_transactionCoordinator->abort(pendingIDs.at(i));
 }
 
+String IDBFactoryBackendImpl::databaseFileName(const String& name, SecurityOrigin* securityOrigin)
+{
+    String databaseIdentifier = securityOrigin->databaseIdentifier();
+    String santizedName = encodeForFileName(name);
+    return databaseIdentifier + "_" + santizedName + ".indexeddb";
+}
+
 } // namespace WebCore
 
 #endif // ENABLE(INDEXED_DATABASE)
diff --git a/WebCore/storage/IDBFactoryBackendImpl.h b/WebCore/storage/IDBFactoryBackendImpl.h
index f2e1af8..cb133de 100644
--- a/WebCore/storage/IDBFactoryBackendImpl.h
+++ b/WebCore/storage/IDBFactoryBackendImpl.h
@@ -52,6 +52,8 @@ public:
     virtual void open(const String& name, const String& description, PassRefPtr<IDBCallbacks>, PassRefPtr<SecurityOrigin>, Frame*, const String& dataDir);
     virtual void abortPendingTransactions(const Vector<int>& pendingIDs);
 
+    static String databaseFileName(const String& name, SecurityOrigin*);
+
 private:
     IDBFactoryBackendImpl();
 
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 56f2c5a..e376974 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,15 @@
+2010-09-21  Jochen Eisinger  <jochen at chromium.org>
+
+        Reviewed by Jeremy Orlow.
+
+        [chromium] expose the filename used for a given indexed DB
+        https://bugs.webkit.org/show_bug.cgi?id=46090
+
+        * WebKit.gyp:
+        * public/WebIDBFactory.h:
+        * src/WebIDBFactory.cpp:
+        (WebKit::WebIDBFactory::databaseFileName):
+
 2010-09-20  Philippe Normand  <pnormand at igalia.com>
 
         Reviewed by Eric Carlson.
diff --git a/WebKit/chromium/WebKit.gyp b/WebKit/chromium/WebKit.gyp
index 3523f21..4977300 100644
--- a/WebKit/chromium/WebKit.gyp
+++ b/WebKit/chromium/WebKit.gyp
@@ -447,6 +447,7 @@
                 'src/WebIDBDatabaseError.cpp',
                 'src/WebIDBDatabaseImpl.cpp',
                 'src/WebIDBDatabaseImpl.h',
+                'src/WebIDBFactory.cpp',
                 'src/WebIDBFactoryImpl.cpp',
                 'src/WebIDBFactoryImpl.h',
                 'src/WebIDBIndexImpl.cpp',
diff --git a/WebKit/chromium/public/WebIDBFactory.h b/WebKit/chromium/public/WebIDBFactory.h
index ab05b06..3c800bd 100755
--- a/WebKit/chromium/public/WebIDBFactory.h
+++ b/WebKit/chromium/public/WebIDBFactory.h
@@ -63,6 +63,9 @@ public:
     }
 
     virtual void abortPendingTransactions(const WebVector<int>& pendingIDs) { WEBKIT_ASSERT_NOT_REACHED(); }
+
+    // The file name that would be used for persisting a given indexed database on the file system.
+    WEBKIT_API static WebString databaseFileName(const WebString& name, const WebSecurityOrigin&);
 };
 
 } // namespace WebKit
diff --git a/WebKit/chromium/src/WebIDBFactory.cpp b/WebKit/chromium/src/WebIDBFactory.cpp
new file mode 100755
index 0000000..b186b68
--- /dev/null
+++ b/WebKit/chromium/src/WebIDBFactory.cpp
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ *     * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *     * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *     * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebIDBFactory.h"
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include "IDBFactoryBackendImpl.h"
+#include "SecurityOrigin.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+WebString WebIDBFactory::databaseFileName(const WebString& name, const WebSecurityOrigin& origin)
+{
+    RefPtr<SecurityOrigin> securityOrigin;
+    securityOrigin = origin;
+    return IDBFactoryBackendImpl::databaseFileName(name, securityOrigin.get());
+}
+
+}
+
+#endif // ENABLE(INDEXED_DATABASE)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list