[webkit-reviews] review requested: [Bug 27967] Decouple the code that deals with the main DB and quota management from the rest of the DB code : [Attachment 34296] patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Aug 7 11:08:50 PDT 2009
Dumitru Daniliuc <dumi at chromium.org> has asked for review:
Bug 27967: Decouple the code that deals with the main DB and quota management
from the rest of the DB code
https://bugs.webkit.org/show_bug.cgi?id=27967
Attachment 34296: patch
https://bugs.webkit.org/attachment.cgi?id=34296&action=review
------- Additional Comments from Dumitru Daniliuc <dumi at chromium.org>
(In reply to comment #2)
reverted all clean up changes. opened bug 28075 for that.
> > Index: WebCore/ChangeLog
> > ===================================================================
> > --- WebCore/ChangeLog (revision 46789)
> > +++ WebCore/ChangeLog (working copy)
> > @@ -1,3 +1,47 @@
> > +2009-08-04 Dumitru Daniliuc <dumi at chromium.org>
> > +
> > + Reviewed by NOBODY (OOPS!).
> > +
> > + Added a "listener" interface to SQLTransaction that allows us to
>
> You can just say a client to SQLTransaction. It's a common term here.
done.
> > >
> > </File>
> > <File
> > +
RelativePath="..\storage\SQLTransactionClient.h"
> > + >
> > + </File>
> > + <File
> > +
RelativePath="..\storage\SQLTransactionClientImpl.cpp"
> > + >
> > + </File>
> > + <File
> >
RelativePath="..\storage\SQLTransactionErrorCallback.h"
> > >
> > </File>
>
>
> You will need to make changes to all build systems that currently use
> SQLTransaction.
d'oh! added.
> > Index: WebCore/storage/Database.cpp
> > ===================================================================
> > --- WebCore/storage/Database.cpp (revision 46789)
> > +++ WebCore/storage/Database.cpp (working copy)
> > @@ -50,6 +50,7 @@
> > #include "SQLiteFileSystem.h"
> > #include "SQLiteStatement.h"
> > #include "SQLResultSet.h"
> > +#include "SQLTransactionClient.h"
> > #include <wtf/MainThread.h>
> > #endif
> >
> > @@ -136,6 +137,7 @@ Database::Database(Document* document, c
> > , m_deleted(false)
> > , m_stopped(false)
> > , m_opened(false)
> > + , m_transactionClient(new SQLTransactionClient())
>
> What's the point of a client if you don't pass it in as an argument?
where would you pass it as an argument? i was thinking that we would have one
default client. if somebody wants to monitor a transaction in more details
(s)he would add more hooks/code to the default client. and if other ports (like
Chromium) want a completely different functionality, they could just provide
their own implementation and not include the default SQLTransaction.cpp file in
their build. what are your thoughts on this?
> > Index: WebCore/storage/SQLTransactionClientImpl.cpp
> > ===================================================================
> > +namespace WebCore {
> > +
> > +void SQLTransactionClient::databaseChanged(Database* database) {
> > +
DatabaseTracker::tracker().scheduleNotifyDatabaseChanged(database->securityOrig
inCopy().get(), database->stringIdentifier());
>
> 4 spaces, brace on new line.
fixed.
> > +void SQLTransactionClient::databaseSizeChanged(Database* database) {
>
> brace on new line.
fixed.
> > +bool SQLTransactionClient::databaseExceedsQuota(Database* database) {
>
> brace on new line.
fixed.
More information about the webkit-reviews
mailing list