WebCore:
authorbeidson <beidson@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 Oct 2007 23:02:02 +0000 (23:02 +0000)
committerbeidson <beidson@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 Oct 2007 23:02:02 +0000 (23:02 +0000)
commit5d45cb7490b5b196a7532f2f1cbde173eb26fa79
tree1e3e2e6e038ef252ac7a22a2bb2aada0fc0bccc9
parent3f1a02e05fac0b8945870fec2d4dcdc6ee98ff6a
WebCore:
        Reviewed by Anders

        <rdar://5554130> DatabaseTracker.o has a global initializer

        Since DatabaseTracker is a singleton, it makes much more sense to keep the database path as a member variable.
        Now constructing the shared DatabaseTracker no longer implicitly opens it - It is only opened when the databases
        path is set.

        * WebCore.vcproj/WebCore.vcproj: Copy WebCore/storage headers for WebKit build

        * storage/Database.cpp:
        (WebCore::Database::~Database): Remove bogus assertion

        * storage/DatabaseTracker.cpp:
        (WebCore::DatabaseTracker::DatabaseTracker): Does nothing now!  Move this code to openTrackerDatabase
        (WebCore::DatabaseTracker::setDatabasePath): Set the member variable, also closing/opening the database if needed
        (WebCore::DatabaseTracker::databasePath):
        (WebCore::DatabaseTracker::openTrackerDatabase): To open and validate the Databases db, moved from the c'tor
        (WebCore::DatabaseTracker::fullPathForDatabase): Return the member variable
        * storage/DatabaseTracker.h:

WebKit/win:
        Reviewed by Anders

        Windows portion of <rdar://5554130>

        Slowly introduce Windows WebKit portion of the Database API that sets the
        on-disk location for databases

        * WebDatabaseManager.cpp: Added.
        (WebKitSetWebDatabasesPathIfNecessary):
        * WebDatabaseManager.h: Added.

        * WebKit.vcproj/WebKit.vcproj:

        * WebView.cpp:
        (WebView::initWithFrame): Call WebKitSetWebDatabasesPathIfNecessary()

WebKit:
        Reviewed by Anders

        <rdar://problem/5554130> DatabaseTracker.o has a global initializer

        * Misc/WebDatabaseManager.mm:
        (WebKitSetWebDatabasesPathIfNecessary): Call the member function instead of a static one

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@27004 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
WebCore/ChangeLog
WebCore/WebCore.vcproj/WebCore.vcproj
WebCore/storage/Database.cpp
WebCore/storage/DatabaseTracker.cpp
WebCore/storage/DatabaseTracker.h
WebKit/ChangeLog
WebKit/Misc/WebDatabaseManager.mm
WebKit/win/ChangeLog
WebKit/win/WebDatabaseManager.cpp [new file with mode: 0644]
WebKit/win/WebDatabaseManager.h [new file with mode: 0644]
WebKit/win/WebKit.vcproj/WebKit.vcproj
WebKit/win/WebView.cpp