Bug 31440

Summary: Add Chromium's DatabaseTracker implementation to WebKit
Product: WebKit Reporter: Dumitru Daniliuc <dumi>
Component: New BugsAssignee: Dumitru Daniliuc <dumi>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, beidson, dglazkov, michaeln
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
patch
dumi: commit-queue-
patch
dglazkov: review+, dumi: commit-queue-
patch none

Description Dumitru Daniliuc 2009-11-12 14:44:22 PST
Add Chromium's DatabaseTracker implementation.
Comment 1 Dumitru Daniliuc 2009-11-12 14:57:38 PST
Created attachment 43103 [details]
patch

Somebody from Apple (Brady, Anders?) should REALLY take a look at the changes to DatabaseTracker.h. Chromium doesn't need a lot of things declared in DatabaseTracker.h, so I #ifdef'd them out.
Comment 2 Michael Nordman 2009-11-12 17:39:26 PST
I would prefer to maintain the symmetry between these two method names...


class QuotaTracker
    void getDatabaseSizeAndSpaceAvailableToOrigin(
        const String& originIdentifier, const String& databaseName,
        unsigned long long* databaseSize, unsigned long long* spaceAvailable);
    void updateDatabaseSizeAndSpaceAvailableToOrigin(
        const String& originIdentifier, const String& databaseName,
        unsigned long long databaseSize, unsigned long long spaceAvailable);


... otherwise lgtm
Comment 3 Dumitru Daniliuc 2009-11-12 22:13:14 PST
Created attachment 43133 [details]
patch

Addressed Michael's comment regarding naming inconsistency in QuotaTracker.{h|cpp}.
Comment 4 Dimitri Glazkov (Google) 2009-11-13 09:46:54 PST
Comment on attachment 43133 [details]
patch

I don't like how DatabaseTracker is so fragmented by the ifdefs. It's fine for now, but ideally this really needs to be abstracted by purpose and the lines of implementation drawn along that. Can you file a bug on this?
Comment 5 Dumitru Daniliuc 2009-11-13 11:43:22 PST
Created attachment 43175 [details]
patch

Commented out DatabaseTrackerChromium::removeOpenDatabase(). Its current implementation is causing some subtle problems when running layout tests in test_shell, and we don't even use this information yet anyway.
Comment 6 Dumitru Daniliuc 2009-11-13 11:47:21 PST
(In reply to comment #4)
> (From update of attachment 43133 [details])
> I don't like how DatabaseTracker is so fragmented by the ifdefs. It's fine for
> now, but ideally this really needs to be abstracted by purpose and the lines of
> implementation drawn along that. Can you file a bug on this?

Done. Filed bug 31482.
Comment 7 Dumitru Daniliuc 2009-11-13 12:25:42 PST
Landed as r50961.
Comment 8 Eric Seidel (no email) 2009-11-13 13:12:19 PST
Comment on attachment 43175 [details]
patch

clearing r=? since it looks like this was landed.