Changeset 220408 in webkit


Ignore:
Timestamp:
Aug 8, 2017 9:49:15 AM (7 years ago)
Author:
Adrian Perez de Castro
Message:

[WPE] Implement WebsiteDataStore::defaultApplicationCacheDirectory() and friends
https://bugs.webkit.org/show_bug.cgi?id=175322

Reviewed by Carlos Garcia Campos.

This makes WPE use the same implementation as the GTK+ port, with a preprocessor switch to choose the name of
the base directory inside the user XDG cache directory.

  • PlatformGTK.cmake: Add APIWebsiteDataStoreGLib.cpp to the build sources and remove APIWebsiteDataStoreGtk.cpp.
  • PlatformWPE.cmake: Add APIWebsiteDataStoreGLib.cpp to the built sources.
  • UIProcess/API/APIWebsiteDataStore.cpp: Remove now dead code.
  • UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp: Renamed from Source/WebKit/UIProcess/API/gtk/APIWebsiteDataStoreGtk.cpp.

(API::WebsiteDataStore::defaultApplicationCacheDirectory):
(API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory):
(API::WebsiteDataStore::defaultLocalStorageDirectory):
(API::WebsiteDataStore::defaultMediaKeysStorageDirectory):
(API::WebsiteDataStore::defaultWebSQLDatabaseDirectory):
(API::WebsiteDataStore::defaultResourceLoadStatisticsDirectory):

Location:
trunk/Source/WebKit
Files:
4 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r220404 r220408  
     12017-08-08  Adrian Perez de Castro  <aperez@igalia.com>
     2
     3        [WPE] Implement WebsiteDataStore::defaultApplicationCacheDirectory() and friends
     4        https://bugs.webkit.org/show_bug.cgi?id=175322
     5
     6        Reviewed by Carlos Garcia Campos.
     7
     8        This makes WPE use the same implementation as the GTK+ port, with a preprocessor switch to choose the name of
     9        the base directory inside the user XDG cache directory.
     10
     11        * PlatformGTK.cmake: Add APIWebsiteDataStoreGLib.cpp to the build sources and remove APIWebsiteDataStoreGtk.cpp.
     12        * PlatformWPE.cmake: Add APIWebsiteDataStoreGLib.cpp to the built sources.
     13        * UIProcess/API/APIWebsiteDataStore.cpp: Remove now dead code.
     14        * UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp: Renamed from Source/WebKit/UIProcess/API/gtk/APIWebsiteDataStoreGtk.cpp.
     15        (API::WebsiteDataStore::defaultApplicationCacheDirectory):
     16        (API::WebsiteDataStore::defaultIndexedDBDatabaseDirectory):
     17        (API::WebsiteDataStore::defaultLocalStorageDirectory):
     18        (API::WebsiteDataStore::defaultMediaKeysStorageDirectory):
     19        (API::WebsiteDataStore::defaultWebSQLDatabaseDirectory):
     20        (API::WebsiteDataStore::defaultResourceLoadStatisticsDirectory):
     21
    1222017-08-08  Ryan Haddad  <ryanhaddad@apple.com>
    223
  • trunk/Source/WebKit/PlatformGTK.cmake

    r220403 r220408  
    117117    UIProcess/API/C/gtk/WKView.cpp
    118118
     119    UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp
    119120    UIProcess/API/glib/IconDatabase.cpp
    120121    UIProcess/API/glib/WebKitApplicationInfo.cpp
     
    173174    UIProcess/API/glib/WebKitWindowProperties.cpp
    174175
    175     UIProcess/API/gtk/APIWebsiteDataStoreGtk.cpp
    176176    UIProcess/API/gtk/PageClientImpl.cpp
    177177    UIProcess/API/gtk/WebKitAuthenticationDialog.cpp
  • trunk/Source/WebKit/PlatformWPE.cmake

    r220387 r220408  
    132132    UIProcess/API/C/wpe/WKView.cpp
    133133
     134    UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp
    134135    UIProcess/API/glib/IconDatabase.cpp
    135136    UIProcess/API/glib/WebKitApplicationInfo.cpp
  • trunk/Source/WebKit/UIProcess/API/APIWebsiteDataStore.cpp

    r215941 r220408  
    8888}
    8989
    90 #if !PLATFORM(COCOA) && !PLATFORM(GTK)
    91 WebKit::WebsiteDataStore::Configuration WebsiteDataStore::defaultDataStoreConfiguration()
    92 {
    93     // FIXME: Fill everything in.
    94     WebKit::WebsiteDataStore::Configuration configuration;
    95 
    96     return configuration;
    97 }
    98 
    99 String WebsiteDataStore::websiteDataDirectoryFileSystemRepresentation(const String&)
    100 {
    101     // FIXME: Implement.
    102     return String();
    103 }
    104 
    105 String WebsiteDataStore::defaultLocalStorageDirectory()
    106 {
    107     // FIXME: Implement.
    108     return String();
    109 }
    110 
    111 String WebsiteDataStore::defaultWebSQLDatabaseDirectory()
    112 {
    113     // FIXME: Implement.
    114     return String();
    115 }
    116 
    117 String WebsiteDataStore::defaultNetworkCacheDirectory()
    118 {
    119     // FIXME: Implement.
    120     return String();
    121 }
    122 
    123 String WebsiteDataStore::defaultApplicationCacheDirectory()
    124 {
    125     // FIXME: Implement.
    126     return String();
    127 }
    128 
    129 String WebsiteDataStore::defaultMediaKeysStorageDirectory()
    130 {
    131     // FIXME: Implement.
    132     return String();
    133 }
    134 
    135 String WebsiteDataStore::defaultIndexedDBDatabaseDirectory()
    136 {
    137     // FIXME: Implement.
    138     return String();
    139 }
    140 
    141 String WebsiteDataStore::defaultResourceLoadStatisticsDirectory()
    142 {
    143     // FIXME: Implement.
    144     return String();
    145 }
    146 
    147 #endif
    148    
    14990#if !PLATFORM(COCOA)
    15091String WebsiteDataStore::defaultMediaCacheDirectory()
  • trunk/Source/WebKit/UIProcess/API/glib/APIWebsiteDataStoreGLib.cpp

    r220407 r220408  
    11/*
    2  * Copyright (C) 2015 Igalia S.L.
     2 * Copyright (C) 2015-2017 Igalia S.L.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    2929#include <WebCore/FileSystem.h>
    3030
     31#if PLATFORM(GTK)
     32#define BASE_DIRECTORY "webkitgtk"
     33#elif PLATFORM(WPE)
     34#define BASE_DIRECTORY "wpe"
     35#endif
     36
    3137namespace API {
    3238
    3339String WebsiteDataStore::defaultApplicationCacheDirectory()
    3440{
    35     return cacheDirectoryFileSystemRepresentation("webkitgtk" G_DIR_SEPARATOR_S "applications");
     41    return cacheDirectoryFileSystemRepresentation(BASE_DIRECTORY G_DIR_SEPARATOR_S "applications");
    3642}
    3743
     
    4551String WebsiteDataStore::defaultIndexedDBDatabaseDirectory()
    4652{
    47     return websiteDataDirectoryFileSystemRepresentation("webkitgtk" G_DIR_SEPARATOR_S "databases" G_DIR_SEPARATOR_S "indexeddb");
     53    return websiteDataDirectoryFileSystemRepresentation(BASE_DIRECTORY G_DIR_SEPARATOR_S "databases" G_DIR_SEPARATOR_S "indexeddb");
    4854}
    4955
    5056String WebsiteDataStore::defaultLocalStorageDirectory()
    5157{
    52     return websiteDataDirectoryFileSystemRepresentation("webkitgtk" G_DIR_SEPARATOR_S "localstorage");
     58    return websiteDataDirectoryFileSystemRepresentation(BASE_DIRECTORY G_DIR_SEPARATOR_S "localstorage");
    5359}
    5460
    5561String WebsiteDataStore::defaultMediaKeysStorageDirectory()
    5662{
    57     return websiteDataDirectoryFileSystemRepresentation("webkitgtk" G_DIR_SEPARATOR_S "mediakeys");
     63    return websiteDataDirectoryFileSystemRepresentation(BASE_DIRECTORY G_DIR_SEPARATOR_S "mediakeys");
    5864}
    5965
    6066String WebsiteDataStore::defaultWebSQLDatabaseDirectory()
    6167{
    62     return websiteDataDirectoryFileSystemRepresentation("webkitgtk" G_DIR_SEPARATOR_S "databases");
     68    return websiteDataDirectoryFileSystemRepresentation(BASE_DIRECTORY G_DIR_SEPARATOR_S "databases");
    6369}
    6470
    6571String WebsiteDataStore::defaultResourceLoadStatisticsDirectory()
    6672{
    67     return websiteDataDirectoryFileSystemRepresentation("webkitgtk" G_DIR_SEPARATOR_S "ResourceLoadStatistics");
     73    return websiteDataDirectoryFileSystemRepresentation(BASE_DIRECTORY G_DIR_SEPARATOR_S "ResourceLoadStatistics");
    6874}
    6975
Note: See TracChangeset for help on using the changeset viewer.