Changeset 194124 in webkit


Ignore:
Timestamp:
Dec 15, 2015 4:52:55 PM (8 years ago)
Author:
andersca@apple.com
Message:

Call DatabaseManager directly from WKBundle.cpp
https://bugs.webkit.org/show_bug.cgi?id=152317

Reviewed by Tim Horton.

This is in preparation for getting rid of some old database manager code.

  • WebProcess/InjectedBundle/API/c/WKBundle.cpp:

(WKBundleClearAllDatabases):
(WKBundleSetDatabaseQuota):

  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::clearAllDatabases): Deleted.
(WebKit::InjectedBundle::setDatabaseQuota): Deleted.

  • WebProcess/InjectedBundle/InjectedBundle.h:
Location:
trunk/Source/WebKit2
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r194108 r194124  
     12015-12-15  Anders Carlsson  <andersca@apple.com>
     2
     3        Call DatabaseManager directly from WKBundle.cpp
     4        https://bugs.webkit.org/show_bug.cgi?id=152317
     5
     6        Reviewed by Tim Horton.
     7
     8        This is in preparation for getting rid of some old database manager code.
     9
     10        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
     11        (WKBundleClearAllDatabases):
     12        (WKBundleSetDatabaseQuota):
     13        * WebProcess/InjectedBundle/InjectedBundle.cpp:
     14        (WebKit::InjectedBundle::clearAllDatabases): Deleted.
     15        (WebKit::InjectedBundle::setDatabaseQuota): Deleted.
     16        * WebProcess/InjectedBundle/InjectedBundle.h:
     17
    1182015-12-15  Daniel Bates  <dabates@apple.com>
    219
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp

    r191047 r194124  
    3838#include "WebPage.h"
    3939#include "WebPageGroupProxy.h"
    40 
     40#include <WebCore/DatabaseManager.h>
     41
     42using namespace WebCore;
    4143using namespace WebKit;
    4244
     
    199201}
    200202
    201 void WKBundleClearAllDatabases(WKBundleRef bundleRef)
    202 {
    203     toImpl(bundleRef)->clearAllDatabases();
     203void WKBundleClearAllDatabases(WKBundleRef)
     204{
     205    DatabaseManager::singleton().deleteAllDatabases();
    204206}
    205207
    206208void WKBundleSetDatabaseQuota(WKBundleRef bundleRef, uint64_t quota)
    207209{
    208     toImpl(bundleRef)->setDatabaseQuota(quota);
     210    // Historically, we've used the following (somewhat non-sensical) string
     211    // for the databaseIdentifier of local files.
     212    DatabaseManager::singleton().setQuota(SecurityOrigin::createFromDatabaseIdentifier("file__0").ptr(), quota);
    209213}
    210214
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp

    r192995 r194124  
    343343}
    344344
    345 void InjectedBundle::clearAllDatabases()
    346 {
    347     WebProcess::singleton().supplement<WebDatabaseManager>()->deleteAllDatabases();
    348 }
    349 
    350 void InjectedBundle::setDatabaseQuota(uint64_t quota)
    351 {
    352     // Historically, we've used the following (somewhat non-sensical) string
    353     // for the databaseIdentifier of local files.
    354     WebProcess::singleton().supplement<WebDatabaseManager>()->setQuotaForOrigin("file__0", quota);
    355 }
    356 
    357345int InjectedBundle::numberOfPages(WebFrame* frame, double pageWidthInPixels, double pageHeightInPixels)
    358346{
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h

    r192093 r194124  
    134134    void removeAllUserContent(WebPageGroupProxy*);
    135135
    136     // Local storage API
    137     void clearAllDatabases();
    138     void setDatabaseQuota(uint64_t);
    139 
    140136    // Garbage collection API
    141137    void garbageCollectJavaScriptObjects();
Note: See TracChangeset for help on using the changeset viewer.