Changeset 250349 in webkit


Ignore:
Timestamp:
Sep 25, 2019, 10:14:14 AM (6 years ago)
Author:
achristensen@apple.com
Message:

Replace _WKProcessPoolConfiguration.CTDataConnectionServiceType with _WKWebsiteDataStoreConfiguration.dataConnectionServiceType
https://bugs.webkit.org/show_bug.cgi?id=202174

Reviewed by Tim Horton.

_WKProcessPoolConfiguration.CTDataConnectionServiceType is used in one place and needs a replacement so we can
start a NetworkProcess without a WKProcessPool. Since this SPI only does something in the low-level networking code,
I verified that the new SPI sets the String the way the old one does, and the old one keeps working in the interim.

  • NetworkProcess/NetworkSessionCreationParameters.cpp:

(WebKit::NetworkSessionCreationParameters::encode const):
(WebKit::NetworkSessionCreationParameters::decode):

  • NetworkProcess/NetworkSessionCreationParameters.h:
  • NetworkProcess/cocoa/NetworkSessionCocoa.mm:

(WebKit::NetworkSessionCocoa::NetworkSessionCocoa):

  • UIProcess/API/Cocoa/WKWebsiteDataStore.mm:

(-[WKWebsiteDataStore _initWithConfiguration:]):

  • UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
  • UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h:
  • UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm:

(-[_WKWebsiteDataStoreConfiguration dataConnectionServiceType]):
(-[_WKWebsiteDataStoreConfiguration setDataConnectionServiceType:]):

  • UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:

(WebKit::WebsiteDataStore::parameters):

  • UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp:

(WebKit::WebsiteDataStoreConfiguration::copy):

  • UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h:

(WebKit::WebsiteDataStoreConfiguration::dataConnectionServiceType const):
(WebKit::WebsiteDataStoreConfiguration::setDataConnectionServiceType):

Location:
trunk/Source/WebKit
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r250348 r250349  
     12019-09-25  Alex Christensen  <achristensen@webkit.org>
     2
     3        Replace _WKProcessPoolConfiguration.CTDataConnectionServiceType with _WKWebsiteDataStoreConfiguration.dataConnectionServiceType
     4        https://bugs.webkit.org/show_bug.cgi?id=202174
     5
     6        Reviewed by Tim Horton.
     7
     8        _WKProcessPoolConfiguration.CTDataConnectionServiceType is used in one place and needs a replacement so we can
     9        start a NetworkProcess without a WKProcessPool.  Since this SPI only does something in the low-level networking code,
     10        I verified that the new SPI sets the String the way the old one does, and the old one keeps working in the interim.
     11
     12        * NetworkProcess/NetworkSessionCreationParameters.cpp:
     13        (WebKit::NetworkSessionCreationParameters::encode const):
     14        (WebKit::NetworkSessionCreationParameters::decode):
     15        * NetworkProcess/NetworkSessionCreationParameters.h:
     16        * NetworkProcess/cocoa/NetworkSessionCocoa.mm:
     17        (WebKit::NetworkSessionCocoa::NetworkSessionCocoa):
     18        * UIProcess/API/Cocoa/WKWebsiteDataStore.mm:
     19        (-[WKWebsiteDataStore _initWithConfiguration:]):
     20        * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
     21        * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h:
     22        * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm:
     23        (-[_WKWebsiteDataStoreConfiguration dataConnectionServiceType]):
     24        (-[_WKWebsiteDataStoreConfiguration setDataConnectionServiceType:]):
     25        * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
     26        (WebKit::WebsiteDataStore::parameters):
     27        * UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp:
     28        (WebKit::WebsiteDataStoreConfiguration::copy):
     29        * UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h:
     30        (WebKit::WebsiteDataStoreConfiguration::dataConnectionServiceType const):
     31        (WebKit::WebsiteDataStoreConfiguration::setDataConnectionServiceType):
     32
    1332019-09-25  Commit Queue  <commit-queue@webkit.org>
    234
  • trunk/Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.cpp

    r250144 r250349  
    7575        , { }
    7676        , { }
     77        , { }
    7778    };
    7879}
     
    114115    encoder << deviceManagementRestrictionsEnabled;
    115116    encoder << allLoadsBlockedByDeviceManagementRestrictionsForTesting;
     117    encoder << dataConnectionServiceType;
    116118}
    117119
     
    258260        return WTF::nullopt;
    259261
     262    Optional<String> dataConnectionServiceType;
     263    decoder >> dataConnectionServiceType;
     264    if (!dataConnectionServiceType)
     265        return WTF::nullopt;
     266   
    260267    return {{
    261268        *sessionID
     
    292299        , WTFMove(*networkCacheDirectory)
    293300        , WTFMove(*networkCacheDirectoryExtensionHandle)
     301        , WTFMove(*dataConnectionServiceType),
    294302    }};
    295303}
  • trunk/Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.h

    r250144 r250349  
    9494    String networkCacheDirectory;
    9595    SandboxExtension::Handle networkCacheDirectoryExtensionHandle;
     96    String dataConnectionServiceType;
    9697};
    9798
  • trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm

    r250309 r250349  
    967967
    968968#if PLATFORM(IOS_FAMILY)
    969     auto& ctDataConnectionServiceType = globalCTDataConnectionServiceType();
     969    String ctDataConnectionServiceType = parameters.dataConnectionServiceType;
     970    if (ctDataConnectionServiceType.isEmpty())
     971        ctDataConnectionServiceType = globalCTDataConnectionServiceType();
    970972    if (!ctDataConnectionServiceType.isEmpty())
    971973        configuration._CTDataConnectionServiceType = ctDataConnectionServiceType;
  • trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm

    r250169 r250349  
    306306    config->setDeviceManagementRestrictionsEnabled(configuration.deviceManagementRestrictionsEnabled);
    307307    config->setAllLoadsBlockedByDeviceManagementRestrictionsForTesting(configuration.allLoadsBlockedByDeviceManagementRestrictionsForTesting);
     308    config->setDataConnectionServiceType(configuration.dataConnectionServiceType);
    308309
    309310    auto sessionID = configuration.isPersistent ? PAL::SessionID::generatePersistentSessionID() : PAL::SessionID::generateEphemeralSessionID();
  • trunk/Source/WebKit/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h

    r250093 r250349  
    5858@property (nonatomic) BOOL shouldCaptureAudioInUIProcess WK_API_AVAILABLE(macos(10.13), ios(11.0));
    5959#if TARGET_OS_IPHONE
    60 @property (nonatomic, nullable, copy) NSString *CTDataConnectionServiceType WK_API_AVAILABLE(ios(10.3));
     60@property (nonatomic, nullable, copy) NSString *CTDataConnectionServiceType WK_API_DEPRECATED_WITH_REPLACEMENT("_WKWebsiteDataStoreConfiguration.dataConnectionServiceType", ios(10.3, WK_IOS_TBA));
    6161@property (nonatomic) BOOL alwaysRunsAtBackgroundPriority WK_API_AVAILABLE(ios(10.3));
    6262@property (nonatomic) BOOL shouldTakeUIBackgroundAssertion WK_API_AVAILABLE(ios(11.0));
  • trunk/Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h

    r250150 r250349  
    4848@property (nonatomic) BOOL allowsCellularAccess WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
    4949@property (nonatomic, nullable, copy) NSDictionary *proxyConfiguration WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
     50@property (nonatomic, nullable, copy) NSString *dataConnectionServiceType WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
    5051
    5152// These properties only make sense for persistent data stores, and will throw
  • trunk/Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm

    r250150 r250349  
    328328}
    329329
     330- (NSString *)dataConnectionServiceType
     331{
     332    return _configuration->dataConnectionServiceType();
     333}
     334
     335- (void)setDataConnectionServiceType:(NSString *)type
     336{
     337    _configuration->setDataConnectionServiceType(type);
     338}
     339
    330340- (void)setProxyConfiguration:(NSDictionary *)configuration
    331341{
  • trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm

    r250169 r250349  
    143143        WTFMove(networkCacheDirectory),
    144144        WTFMove(networkCacheDirectoryExtensionHandle),
     145        m_configuration->dataConnectionServiceType(),
    145146    };
    146147    networkingHasBegun();
  • trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStoreConfiguration.cpp

    r250169 r250349  
    6565    copy->m_boundInterfaceIdentifier = this->m_boundInterfaceIdentifier;
    6666    copy->m_allowsCellularAccess = this->m_allowsCellularAccess;
     67    copy->m_dataConnectionServiceType = this->m_dataConnectionServiceType;
    6768#if PLATFORM(COCOA)
    6869    if (m_proxyConfiguration)
  • trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStoreConfiguration.h

    r250150 r250349  
    120120    void setAllLoadsBlockedByDeviceManagementRestrictionsForTesting(bool blocked) { m_allLoadsBlockedByDeviceManagementRestrictionsForTesting = blocked; }
    121121
     122    const String& dataConnectionServiceType() const { return m_dataConnectionServiceType; }
     123    void setDataConnectionServiceType(String&& type) { m_dataConnectionServiceType = WTFMove(type); }
     124   
    122125private:
    123126    bool m_isPersistent { false };
     
    144147    String m_sourceApplicationSecondaryIdentifier;
    145148    String m_boundInterfaceIdentifier;
     149    String m_dataConnectionServiceType;
    146150    URL m_httpProxy;
    147151    URL m_httpsProxy;
Note: See TracChangeset for help on using the changeset viewer.