Bug 108146

Summary: webdatabase: Change DatabaseManager interface to be static methods.
Product: WebKit Reporter: Mark Lam <mark.lam>
Component: WebCore Misc.Assignee: Mark Lam <mark.lam>
Status: ASSIGNED ---    
Severity: Normal CC: abarth, gyuyoung.kim, japhet, mark.lam, mifenton, rakuco, rwlbuis, sam, tonikitoo, webkit.review.bot, yong.li.webkit
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Description Flags
the patch. buildbot: commit-queue-

Description Mark Lam 2013-01-28 19:45:46 PST
The DatabaseManager is a singleton class.  Instead of DatabaseManager::manager().isAvailable(), we should be able to call DatabaseManager::isAvailable() instead.  The latter form is a little shorter and easier to read.  This patch does a small refactor to make this change.
Comment 1 Mark Lam 2013-01-28 20:05:51 PST
Created attachment 185139 [details]
the patch.

This patch is mostly cosmetic.  I basically moved the DatabaseManager implementation to an Internal class, and reimplemented DatabaseManager methods as static which forwards the call to the Internal instance.

This patch was rs= Sam Weinig.
Comment 2 Build Bot 2013-01-28 20:35:03 PST
Comment on attachment 185139 [details]
the patch.

Attachment 185139 [details] did not pass win-ews (win):
Output: http://queues.webkit.org/results/16163938
Comment 3 Mark Lam 2013-01-28 21:27:54 PST
This turned out to be harder than I originally thought.  The Windows port does not think that DatabaseManager's "friend"-ship extends to DatabaseManager::Internal.

Since, this effort is turning hairy (it was supposed to be a slam dunk), I'll postpone it.  The implementation of DatabaseManager will shift in the near future.  I might be able to make this change with minimal effort then.  I'll leave it be for now.