Bug 108146 - webdatabase: Change DatabaseManager interface to be static methods.
Summary: webdatabase: Change DatabaseManager interface to be static methods.
Status: ASSIGNED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-28 19:45 PST by Mark Lam
Modified: 2013-01-28 21:27 PST (History)
11 users (show)

See Also:


Attachments
the patch. (96.59 KB, patch)
2013-01-28 20:05 PST, Mark Lam
buildbot: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.