Changeset 27004 in webkit


Ignore:
Timestamp:
Oct 24, 2007 4:02:02 PM (16 years ago)
Author:
beidson
Message:

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
Location:
trunk
Files:
2 added
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r27000 r27004  
     12007-10-24  Brady Eidson  <beidson@apple.com>
     2
     3        Reviewed by Anders
     4
     5        <rdar://5554130> DatabaseTracker.o has a global initializer
     6
     7        Since DatabaseTracker is a singleton, it makes much more sense to keep the database path as a member variable.
     8        Now constructing the shared DatabaseTracker no longer implicitly opens it - It is only opened when the databases
     9        path is set.
     10       
     11        * WebCore.vcproj/WebCore.vcproj: Copy WebCore/storage headers for WebKit build
     12       
     13        * storage/Database.cpp:
     14        (WebCore::Database::~Database): Remove bogus assertion
     15       
     16        * storage/DatabaseTracker.cpp:
     17        (WebCore::DatabaseTracker::DatabaseTracker): Does nothing now!  Move this code to openTrackerDatabase
     18        (WebCore::DatabaseTracker::setDatabasePath): Set the member variable, also closing/opening the database if needed
     19        (WebCore::DatabaseTracker::databasePath):
     20        (WebCore::DatabaseTracker::openTrackerDatabase): To open and validate the Databases db, moved from the c'tor
     21        (WebCore::DatabaseTracker::fullPathForDatabase): Return the member variable
     22        * storage/DatabaseTracker.h:
     23
    1242007-10-24  David Hyatt  <hyatt@apple.com>
    225
  • trunk/WebCore/WebCore.vcproj/WebCore.vcproj

    r26907 r27004  
    233233                        <Tool
    234234                                Name="VCPostBuildEventTool"
    235                                 CommandLine="mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\kjs&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\config.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\obj\WebCore\DerivedSources\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\icon\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\history\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\html\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\css\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y &quot;$(ProjectDir)..\platform\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\network\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\network\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\network\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y &quot;$(ProjectDir)..\platform\network\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y &quot;$(ProjectDir)..\platform\sql\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\cairo\cairo\src\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\bindings\js\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\bridge\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\bridge\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y &quot;$(ProjectDir)..\bridge\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\page\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\plugins\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\rendering\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\editing\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\dom\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\xml\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\ksvg2\css\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\ksvg2\events\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\ksvg2\misc\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\ksvg2\scripts\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\ksvg2\svg\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\bindings\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\kjs\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\kjs&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\pcre\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\icu\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu&quot;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\bin\WebKit.resources\inspector&quot;&#x0D;&#x0A;xcopy /y /d /s /exclude:xcopy.excludes &quot;$(ProjectDir)\..\page\inspector\*&quot; &quot;$(WebKitOutputDir)\bin\WebKit.resources\inspector&quot;&#x0D;&#x0A;"
     235                                CommandLine="mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\kjs&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode&quot;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu&quot;&#x0D;&#x0A;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\config.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(WebKitOutputDir)\obj\WebCore\DerivedSources\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\loader\icon\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\history\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\html\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\css\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\graphics\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y &quot;$(ProjectDir)..\platform\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\network\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\network\cf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\network\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y &quot;$(ProjectDir)..\platform\network\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y &quot;$(ProjectDir)..\platform\sql\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\platform\cairo\cairo\src\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\bindings\js\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\bridge\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\bridge\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y &quot;$(ProjectDir)..\bridge\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\page\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\plugins\win\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\rendering\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\editing\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\dom\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\xml\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\ksvg2\css\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\ksvg2\events\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\ksvg2\misc\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\ksvg2\scripts\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\ksvg2\svg\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)..\storage\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\bindings\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\bindings&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\kjs\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\kjs&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\pcre\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\pcre&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode&quot;&#x0D;&#x0A;xcopy /y /d &quot;$(ProjectDir)\..\ForwardingHeaders\wtf\unicode\icu\*.h&quot; &quot;$(WebKitOutputDir)\include\WebCore\ForwardingHeaders\wtf\unicode\icu&quot;&#x0D;&#x0A;&#x0D;&#x0A;mkdir 2&gt;NUL &quot;$(WebKitOutputDir)\bin\WebKit.resources\inspector&quot;&#x0D;&#x0A;xcopy /y /d /s /exclude:xcopy.excludes &quot;$(ProjectDir)\..\page\inspector\*&quot; &quot;$(WebKitOutputDir)\bin\WebKit.resources\inspector&quot;&#x0D;&#x0A;"
    236236                        />
    237237                </Configuration>
  • trunk/WebCore/storage/Database.cpp

    r26864 r27004  
    162162        guidToDatabaseMap().remove(m_guid);
    163163        delete hashSet;
    164         ASSERT(guidToVersionMap().contains(m_guid));
    165164        guidToVersionMap().remove(m_guid);
    166165    }
  • trunk/WebCore/storage/DatabaseTracker.cpp

    r26797 r27004  
    3636namespace WebCore {
    3737
    38 String DatabaseTracker::s_databasePath;
     38DatabaseTracker& DatabaseTracker::tracker()
     39{
     40    static DatabaseTracker tracker;
     41
     42    return tracker;
     43}
     44
     45DatabaseTracker::DatabaseTracker()
     46{
     47}
    3948
    4049void DatabaseTracker::setDatabasePath(const String& path)
    41 {
    42     s_databasePath = path;
     50{       
     51    m_databasePath = path;
     52    openTrackerDatabase();
    4353}
    4454
    4555const String& DatabaseTracker::databasePath()
    4656{
    47     return s_databasePath;
    48 }
    49 
    50 DatabaseTracker& DatabaseTracker::tracker()
    51 {
    52     static DatabaseTracker tracker;
    53 
    54     return tracker;
    55 }
    56 
    57 DatabaseTracker::DatabaseTracker()
    58 {
    59     String databasePath = DatabaseTracker::databasePath();
    60     makeAllDirectories(databasePath);
    61     databasePath = pathByAppendingComponent(databasePath, "Databases.db");
     57    return m_databasePath;
     58}
     59
     60void DatabaseTracker::openTrackerDatabase()
     61{
     62    ASSERT(!m_database.isOpen());
     63   
     64    makeAllDirectories(m_databasePath);
     65    String databasePath = pathByAppendingComponent(m_databasePath, "Databases.db");
    6266
    6367    if (!m_database.open(databasePath)) {
     
    7781    }
    7882}
    79 
     83   
    8084String DatabaseTracker::fullPathForDatabase(const String& origin, const String& name)
    8185{
    82     String databasePath = DatabaseTracker::databasePath();
    8386    SQLStatement statement(m_database, "SELECT path FROM Databases WHERE origin=? AND name=?;");
    8487
     
    9295
    9396    if (result == SQLResultRow)
    94         return pathByAppendingComponent(databasePath, statement.getColumnText16(0));
     97        return pathByAppendingComponent(m_databasePath, statement.getColumnText16(0));
    9598    if (result != SQLResultDone) {
    9699        LOG_ERROR("Failed to retrieve filename from Database Tracker for origin %s, name %s", origin.ascii().data(), name.ascii().data());
     
    116119    do {
    117120        ++seq;
    118         filename = pathByAppendingComponent(databasePath, String::format("%016llx.db", seq));
     121        filename = pathByAppendingComponent(m_databasePath, String::format("%016llx.db", seq));
    119122    } while (fileExists(filename));
    120123
  • trunk/WebCore/storage/DatabaseTracker.h

    r26787 r27004  
    4040class DatabaseTracker {
    4141public:
    42     static void setDatabasePath(const String&);
    43     static const String& databasePath();
     42    void setDatabasePath(const String&);
     43    const String& databasePath();
    4444
    4545    String fullPathForDatabase(const String& origin, const String& name);
     
    5656    DatabaseTracker();
    5757
     58    void openTrackerDatabase();
     59   
    5860    bool addDatabase(const String& origin, const String& name, const String& path);
    5961    void populateOrigins();
     
    6264    mutable OwnPtr<HashSet<String> > m_origins;
    6365
    64     static String s_databasePath;
     66    String m_databasePath;
    6567};
    6668
  • trunk/WebKit/ChangeLog

    r26918 r27004  
     12007-10-24  Brady Eidson  <beidson@apple.com>
     2
     3        Reviewed by Anders
     4
     5        <rdar://problem/5554130> DatabaseTracker.o has a global initializer
     6
     7        * Misc/WebDatabaseManager.mm:
     8        (WebKitSetWebDatabasesPathIfNecessary): Call the member function instead of a static one
     9
    1102007-10-23  Mark Rowe  <mrowe@apple.com>
    211
  • trunk/WebKit/Misc/WebDatabaseManager.mm

    r26787 r27004  
    9797        databasesDirectory = @"~/Library/WebKit/Databases";
    9898
    99     DatabaseTracker::setDatabasePath([databasesDirectory stringByStandardizingPath]);
     99    DatabaseTracker::tracker().setDatabasePath([databasesDirectory stringByStandardizingPath]);
    100100
    101101    pathSet = YES;
  • trunk/WebKit/win/ChangeLog

    r27003 r27004  
     12007-10-24  Brady Eidson  <beidson@apple.com>
     2
     3        Reviewed by Anders
     4
     5        Windows portion of <rdar://5554130>
     6       
     7        Slowly introduce Windows WebKit portion of the Database API that sets the
     8        on-disk location for databases
     9       
     10        * WebDatabaseManager.cpp: Added.
     11        (WebKitSetWebDatabasesPathIfNecessary):
     12        * WebDatabaseManager.h: Added.
     13       
     14        * WebKit.vcproj/WebKit.vcproj:
     15       
     16        * WebView.cpp:
     17        (WebView::initWithFrame): Call WebKitSetWebDatabasesPathIfNecessary()
     18
    1192007-10-24  Kevin McCullough  <kmccullough@apple.com>
    220
  • trunk/WebKit/win/WebKit.vcproj/WebKit.vcproj

    r26684 r27004  
    414414                        </File>
    415415                        <File
     416                                RelativePath="..\WebDatabaseManager.h"
     417                                >
     418                        </File>
     419                        <File
    416420                                RelativePath="..\WebDataSource.h"
    417421                                >
     
    627631                        <File
    628632                                RelativePath="..\WebContextMenuClient.cpp"
     633                                >
     634                        </File>
     635                        <File
     636                                RelativePath="..\WebDatabaseManager.cpp"
    629637                                >
    630638                        </File>
  • trunk/WebKit/win/WebView.cpp

    r26928 r27004  
    3131#include "DOMCoreClasses.h"
    3232#include "IWebNotification.h"
     33#include "WebDatabaseManager.h"
    3334#include "WebDebugProgram.h"
    3435#include "WebDocumentLoader.h"
     
    18151816    m_groupName = String(groupName, SysStringLen(groupName));
    18161817
     1818    WebKitSetWebDatabasesPathIfNecessary();
     1819
    18171820    m_page = new Page(new WebChromeClient(this), new WebContextMenuClient(this), new WebEditorClient(this), new WebDragClient(this), new WebInspectorClient(this));
    18181821    // FIXME: 4931464 - When we do cache pages on Windows this needs to be removed so the "should I cache this page?" check
Note: See TracChangeset for help on using the changeset viewer.