Changeset 235127 in webkit
- Timestamp:
- Aug 21, 2018, 11:12:35 AM (6 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r235125 r235127 1 2018-08-21 Alex Christensen <achristensen@webkit.org> 2 3 Add _WKWebsiteDataStoreConfiguration. sourceApplicationBundleIdentifier and sourceApplicationSecondaryIdentifier 4 https://bugs.webkit.org/show_bug.cgi?id=188748 5 6 Reviewed by Ryosuke Niwa. 7 8 * NetworkProcess/NetworkSessionCreationParameters.h: 9 (WebKit::NetworkSessionCreationParameters::encode const): 10 (WebKit::NetworkSessionCreationParameters::decode): 11 * NetworkProcess/cocoa/NetworkSessionCocoa.h: 12 * NetworkProcess/cocoa/NetworkSessionCocoa.mm: 13 (WebKit::NetworkSessionCocoa::NetworkSessionCocoa): 14 * Shared/WebsiteDataStoreParameters.cpp: 15 (WebKit::WebsiteDataStoreParameters::privateSessionParameters): 16 * UIProcess/API/Cocoa/WKWebsiteDataStore.mm: 17 (-[WKWebsiteDataStore _initWithConfiguration:]): 18 * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h: 19 * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h: 20 * UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm: 21 (-[_WKWebsiteDataStoreConfiguration setSourceApplicationBundleIdentifier:]): 22 (-[_WKWebsiteDataStoreConfiguration sourceApplicationBundleIdentifier]): 23 (-[_WKWebsiteDataStoreConfiguration sourceApplicationSecondaryIdentifier]): 24 (-[_WKWebsiteDataStoreConfiguration setSourceApplicationSecondaryIdentifier:]): 25 * UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm: 26 (WebKit::WebsiteDataStore::parameters): 27 * UIProcess/WebsiteData/WebsiteDataStore.h: 28 1 29 2018-08-21 Per Arne Vollan <pvollan@apple.com> 2 30 -
trunk/Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.h
r231264 r235127 50 50 #if PLATFORM(COCOA) 51 51 RetainPtr<CFDictionaryRef> proxyConfiguration; 52 String sourceApplicationBundleIdentifier; 53 String sourceApplicationSecondaryIdentifier; 52 54 #endif 53 55 }; … … 60 62 #if PLATFORM(COCOA) 61 63 IPC::encode(encoder, proxyConfiguration.get()); 64 encoder << sourceApplicationBundleIdentifier; 65 encoder << sourceApplicationSecondaryIdentifier; 62 66 #endif 63 67 } … … 83 87 if (!IPC::decode(decoder, proxyConfiguration)) 84 88 return std::nullopt; 89 90 std::optional<String> sourceApplicationBundleIdentifier; 91 decoder >> sourceApplicationBundleIdentifier; 92 if (!sourceApplicationBundleIdentifier) 93 return std::nullopt; 94 95 std::optional<String> sourceApplicationSecondaryIdentifier; 96 decoder >> sourceApplicationSecondaryIdentifier; 97 if (!sourceApplicationSecondaryIdentifier) 98 return std::nullopt; 85 99 #endif 86 100 … … 91 105 #if PLATFORM(COCOA) 92 106 , WTFMove(proxyConfiguration) 107 , WTFMove(*sourceApplicationBundleIdentifier) 108 , WTFMove(*sourceApplicationSecondaryIdentifier) 93 109 #endif 94 110 }}; -
trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.h
r232201 r235127 83 83 String m_boundInterfaceIdentifier; 84 84 RetainPtr<CFDictionaryRef> m_proxyConfiguration; 85 86 String m_sourceApplicationBundleIdentifier; 87 String m_sourceApplicationSecondaryIdentifier; 85 88 }; 86 89 -
trunk/Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
r235101 r235127 681 681 682 682 auto& sourceApplicationBundleIdentifier = globalSourceApplicationBundleIdentifier(); 683 if (!sourceApplicationBundleIdentifier.isEmpty()) { 683 if (!m_sourceApplicationBundleIdentifier.isEmpty()) { 684 configuration._sourceApplicationBundleIdentifier = m_sourceApplicationBundleIdentifier; 685 configuration._sourceApplicationAuditTokenData = nil; 686 } else if (!sourceApplicationBundleIdentifier.isEmpty()) { 684 687 configuration._sourceApplicationBundleIdentifier = sourceApplicationBundleIdentifier; 685 688 configuration._sourceApplicationAuditTokenData = nil; … … 687 690 688 691 auto& sourceApplicationSecondaryIdentifier = globalSourceApplicationSecondaryIdentifier(); 689 if (!sourceApplicationSecondaryIdentifier.isEmpty()) 692 if (!m_sourceApplicationSecondaryIdentifier.isEmpty()) 693 configuration._sourceApplicationSecondaryIdentifier = m_sourceApplicationSecondaryIdentifier; 694 else if (!sourceApplicationSecondaryIdentifier.isEmpty()) 690 695 configuration._sourceApplicationSecondaryIdentifier = sourceApplicationSecondaryIdentifier; 691 696 -
trunk/Source/WebKit/Shared/WebsiteDataStoreParameters.cpp
r232863 r235127 73 73 return { { }, { }, { }, { sessionID, { }, AllowsCellularAccess::Yes 74 74 #if PLATFORM(COCOA) 75 , nullptr 75 , nullptr , { } , { } 76 76 #endif 77 77 }}; -
trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm
r235022 r235127 208 208 if (configuration._serviceWorkerRegistrationDirectory) 209 209 config.serviceWorkerRegistrationDirectory = configuration._serviceWorkerRegistrationDirectory.path; 210 if (configuration.sourceApplicationBundleIdentifier) 211 config.sourceApplicationBundleIdentifier = configuration.sourceApplicationBundleIdentifier; 212 if (configuration.sourceApplicationSecondaryIdentifier) 213 config.sourceApplicationSecondaryIdentifier = configuration.sourceApplicationSecondaryIdentifier; 210 214 211 215 API::Object::constructInWrapper<API::WebsiteDataStore>(self, config, PAL::SessionID::generatePersistentSessionID()); -
trunk/Source/WebKit/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h
r234965 r235127 55 55 @property (nonatomic, copy) NSArray<NSString *> *alwaysRevalidatedURLSchemes WK_API_AVAILABLE(macosx(10.12), ios(10.0)); 56 56 @property (nonatomic) BOOL diskCacheSpeculativeValidationEnabled WK_API_AVAILABLE(macosx(10.12), ios(10.0)); 57 @property (nonatomic, nullable, copy) NSString *sourceApplicationBundleIdentifier WK_API_ AVAILABLE(macosx(10.12.3), ios(10.3));58 @property (nonatomic, nullable, copy) NSString *sourceApplicationSecondaryIdentifier WK_API_ AVAILABLE(macosx(10.12.3), ios(10.3));57 @property (nonatomic, nullable, copy) NSString *sourceApplicationBundleIdentifier WK_API_DEPRECATED_WITH_REPLACEMENT("_WKWebsiteDataStoreConfiguration.sourceApplicationBundleIdentifier", macosx(10.12.3, WK_MAC_TBA), ios(10.3, WK_IOS_TBA)); 58 @property (nonatomic, nullable, copy) NSString *sourceApplicationSecondaryIdentifier WK_API_DEPRECATED_WITH_REPLACEMENT("_WKWebsiteDataStoreConfiguration.sourceApplicationSecondaryIdentifier", macosx(10.12.3, WK_MAC_TBA), ios(10.3, WK_IOS_TBA)); 59 59 @property (nonatomic) BOOL shouldCaptureAudioInUIProcess WK_API_AVAILABLE(macosx(10.13), ios(11.0)); 60 60 #if TARGET_OS_IPHONE -
trunk/Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.h
r230121 r235127 42 42 @property (nonatomic, copy, setter=_setCacheStorageDirectory:) NSURL *_cacheStorageDirectory WK_API_AVAILABLE(macosx(10.13.4), ios(11.3)); 43 43 @property (nonatomic, copy, setter=_setServiceWorkerRegistrationDirectory:) NSURL *_serviceWorkerRegistrationDirectory WK_API_AVAILABLE(macosx(10.13.4), ios(11.3)); 44 @property (nonatomic, nullable, copy) NSString *sourceApplicationBundleIdentifier WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA)); 45 @property (nonatomic, nullable, copy) NSString *sourceApplicationSecondaryIdentifier WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA)); 44 46 45 47 @end -
trunk/Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreConfiguration.mm
r228442 r235127 45 45 RetainPtr<NSURL> _cacheStorageDirectoryURL; 46 46 RetainPtr<NSURL> _serviceWorkerRegistrationDirectoryURL; 47 RetainPtr<NSString> _sourceApplicationBundleIdentifier; 48 RetainPtr<NSString> _sourceApplicationSecondaryIdentifier; 47 49 } 48 50 … … 127 129 } 128 130 131 - (void)setSourceApplicationBundleIdentifier:(NSString *)identifier 132 { 133 _sourceApplicationBundleIdentifier = identifier; 134 } 135 136 - (NSString *)sourceApplicationBundleIdentifier 137 { 138 return _sourceApplicationBundleIdentifier.get(); 139 } 140 141 - (NSString *)sourceApplicationSecondaryIdentifier 142 { 143 return _sourceApplicationSecondaryIdentifier.get(); 144 } 145 146 - (void)setSourceApplicationSecondaryIdentifier:(NSString *)identifier 147 { 148 _sourceApplicationSecondaryIdentifier = identifier; 149 } 150 129 151 @end 130 152 -
trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm
r232863 r235127 59 59 60 60 WebsiteDataStoreParameters parameters; 61 parameters.networkSessionParameters = { m_sessionID, m_boundInterfaceIdentifier, m_allowsCellularAccess, m_proxyConfiguration }; 61 parameters.networkSessionParameters = { 62 m_sessionID, 63 m_boundInterfaceIdentifier, 64 m_allowsCellularAccess, 65 m_proxyConfiguration, 66 m_configuration.sourceApplicationBundleIdentifier, 67 m_configuration.sourceApplicationSecondaryIdentifier, 68 }; 62 69 63 70 auto cookieFile = resolvedCookieStorageFile(); 64 71 65 #if PLATFORM(COCOA)66 72 if (m_uiProcessCookieStorageIdentifier.isEmpty()) { 67 73 auto utf8File = cookieFile.utf8(); … … 72 78 73 79 parameters.uiProcessCookieStorageIdentifier = m_uiProcessCookieStorageIdentifier; 74 #endif 80 parameters.networkSessionParameters.sourceApplicationBundleIdentifier = m_configuration.sourceApplicationBundleIdentifier; 81 parameters.networkSessionParameters.sourceApplicationSecondaryIdentifier = m_configuration.sourceApplicationSecondaryIdentifier; 75 82 76 83 parameters.pendingCookies = copyToVector(m_pendingCookies); -
trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h
r234440 r235127 94 94 String javaScriptConfigurationDirectory; 95 95 String cookieStorageFile; 96 String sourceApplicationBundleIdentifier; 97 String sourceApplicationSecondaryIdentifier; 96 98 97 99 explicit Configuration();
Note:
See TracChangeset
for help on using the changeset viewer.