Changeset 213750 in webkit
- Timestamp:
- Mar 10, 2017 9:51:50 PM (7 years ago)
- Location:
- tags/Safari-604.1.10/Source/WebKit2
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
tags/Safari-604.1.10/Source/WebKit2/ChangeLog
r213721 r213750 1 2017-03-10 Jason Marcell <jmarcell@apple.com> 2 3 Merge r213747. rdar://problem/29599569 4 5 2017-03-10 Alex Christensen <achristensen@webkit.org> 6 7 Add SPI to set NSURLSessionConfiguration.allowsCellularAccess from _WKProcessPoolConfiguration 8 https://bugs.webkit.org/show_bug.cgi?id=169500 9 <rdar://problem/29599569> 10 11 Reviewed by Joseph Pecoraro. 12 13 * NetworkProcess/NetworkProcessCreationParameters.cpp: 14 (WebKit::NetworkProcessCreationParameters::encode): 15 (WebKit::NetworkProcessCreationParameters::decode): 16 * NetworkProcess/NetworkProcessCreationParameters.h: 17 * NetworkProcess/cocoa/NetworkProcessCocoa.mm: 18 (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa): 19 * NetworkProcess/cocoa/NetworkSessionCocoa.h: 20 * NetworkProcess/cocoa/NetworkSessionCocoa.mm: 21 (WebKit::globalAllowsCellularAccess): 22 (WebKit::NetworkSessionCocoa::setAllowsCellularAccess): 23 (WebKit::NetworkSessionCocoa::NetworkSessionCocoa): 24 * UIProcess/API/APIProcessPoolConfiguration.h: 25 * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h: 26 * UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm: 27 (-[_WKProcessPoolConfiguration allowsCellularAccess]): 28 (-[_WKProcessPoolConfiguration setAllowsCellularAccess:]): 29 1 30 2017-03-10 Jason Marcell <jmarcell@apple.com> 2 31 -
tags/Safari-604.1.10/Source/WebKit2/NetworkProcess/NetworkProcessCreationParameters.cpp
r212746 r213750 77 77 encoder << sourceApplicationBundleIdentifier; 78 78 encoder << sourceApplicationSecondaryIdentifier; 79 encoder << allowsCellularAccess; 79 80 #if PLATFORM(IOS) 80 81 encoder << ctDataConnectionServiceType; … … 164 165 if (!decoder.decode(result.sourceApplicationSecondaryIdentifier)) 165 166 return false; 167 if (!decoder.decode(result.allowsCellularAccess)) 168 return false; 166 169 #if PLATFORM(IOS) 167 170 if (!decoder.decode(result.ctDataConnectionServiceType)) -
tags/Safari-604.1.10/Source/WebKit2/NetworkProcess/NetworkProcessCreationParameters.h
r212746 r213750 85 85 String sourceApplicationBundleIdentifier; 86 86 String sourceApplicationSecondaryIdentifier; 87 bool allowsCellularAccess { true }; 87 88 #if PLATFORM(IOS) 88 89 String ctDataConnectionServiceType; -
tags/Safari-604.1.10/Source/WebKit2/NetworkProcess/cocoa/NetworkProcessCocoa.mm
r212746 r213750 88 88 NetworkSessionCocoa::setSourceApplicationBundleIdentifier(parameters.sourceApplicationBundleIdentifier); 89 89 NetworkSessionCocoa::setSourceApplicationSecondaryIdentifier(parameters.sourceApplicationSecondaryIdentifier); 90 NetworkSessionCocoa::setAllowsCellularAccess(parameters.allowsCellularAccess); 90 91 #if PLATFORM(IOS) 91 92 NetworkSessionCocoa::setCTDataConnectionServiceType(parameters.ctDataConnectionServiceType); -
tags/Safari-604.1.10/Source/WebKit2/NetworkProcess/cocoa/NetworkSessionCocoa.h
r213441 r213750 52 52 static void setSourceApplicationBundleIdentifier(const String&); 53 53 static void setSourceApplicationSecondaryIdentifier(const String&); 54 static void setAllowsCellularAccess(bool); 54 55 #if PLATFORM(IOS) 55 56 static void setCTDataConnectionServiceType(const String&); -
tags/Safari-604.1.10/Source/WebKit2/NetworkProcess/cocoa/NetworkSessionCocoa.mm
r213685 r213750 430 430 } 431 431 432 static bool& globalAllowsCellularAccess() 433 { 434 static bool allowsCellularAccess { true }; 435 return allowsCellularAccess; 436 } 437 432 438 static LegacyCustomProtocolManager*& globalLegacyCustomProtocolManager() 433 439 { … … 488 494 ASSERT(!sessionsCreated); 489 495 globalSourceApplicationSecondaryIdentifier() = identifier; 496 } 497 498 void NetworkSessionCocoa::setAllowsCellularAccess(bool value) 499 { 500 globalAllowsCellularAccess() = value; 490 501 } 491 502 … … 521 532 NSURLSessionConfiguration *configuration = configurationForSessionID(m_sessionID); 522 533 534 if (!globalAllowsCellularAccess()) 535 configuration.allowsCellularAccess = NO; 536 523 537 if (NetworkCache::singleton().isEnabled()) 524 538 configuration.URLCache = nil; -
tags/Safari-604.1.10/Source/WebKit2/UIProcess/API/APIProcessPoolConfiguration.h
r213690 r213750 112 112 void setSourceApplicationSecondaryIdentifier(const WTF::String& sourceApplicationSecondaryIdentifier) { m_sourceApplicationSecondaryIdentifier = sourceApplicationSecondaryIdentifier; } 113 113 114 bool allowsCellularAccess() const { return m_allowsCellularAccess; } 115 void setAllowsCellularAccess(bool allowsCellularAccess) { m_allowsCellularAccess = allowsCellularAccess; } 116 114 117 bool alwaysRunsAtBackgroundPriority() const { return m_alwaysRunsAtBackgroundPriority; } 115 118 void setAlwaysRunsAtBackgroundPriority(bool alwaysRunsAtBackgroundPriority) { m_alwaysRunsAtBackgroundPriority = alwaysRunsAtBackgroundPriority; } … … 146 149 WTF::String m_sourceApplicationBundleIdentifier; 147 150 WTF::String m_sourceApplicationSecondaryIdentifier; 151 bool m_allowsCellularAccess { true }; 148 152 bool m_alwaysRunsAtBackgroundPriority { false }; 149 153 #if PLATFORM(IOS) -
tags/Safari-604.1.10/Source/WebKit2/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h
r207346 r213750 48 48 @property (nonatomic, nullable, copy) NSString *sourceApplicationBundleIdentifier WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA)); 49 49 @property (nonatomic, nullable, copy) NSString *sourceApplicationSecondaryIdentifier WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA)); 50 @property (nonatomic) BOOL allowsCellularAccess WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA)); 50 51 #if TARGET_OS_IPHONE 51 52 @property (nonatomic, nullable, copy) NSString *CTDataConnectionServiceType WK_API_AVAILABLE(ios(WK_IOS_TBA)); -
tags/Safari-604.1.10/Source/WebKit2/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm
r207346 r213750 172 172 } 173 173 174 - (BOOL)allowsCellularAccess 175 { 176 return _processPoolConfiguration->allowsCellularAccess(); 177 } 178 179 - (void)setAllowsCellularAccess:(BOOL)allowsCellularAccess 180 { 181 _processPoolConfiguration->setAllowsCellularAccess(allowsCellularAccess); 182 } 183 174 184 #if PLATFORM(IOS) 175 185 - (NSString *)CTDataConnectionServiceType
Note: See TracChangeset
for help on using the changeset viewer.