Changeset 239683 in webkit
- Timestamp:
- Jan 7, 2019, 10:36:22 AM (6 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r239680 r239683 1 2019-01-07 Alex Christensen <achristensen@webkit.org> 2 3 Move identifierBase from SessionTracker to NetworkProcess/WebProcess 4 https://bugs.webkit.org/show_bug.cgi?id=193201 5 6 Reviewed by Tim Horton. 7 8 No change in behavior. This just reduces process-global state. 9 10 * NetworkProcess/NetworkProcess.h: 11 (WebKit::NetworkProcess::uiProcessBundleIdentifier const): 12 * NetworkProcess/cocoa/NetworkProcessCocoa.mm: 13 (WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa): 14 * NetworkProcess/mac/RemoteNetworkingContext.mm: 15 (WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession): 16 * Shared/SessionTracker.cpp: 17 (WebKit::identifierBase): Deleted. 18 (WebKit::SessionTracker::getIdentifierBase): Deleted. 19 (WebKit::SessionTracker::setIdentifierBase): Deleted. 20 * Shared/SessionTracker.h: 21 * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm: 22 (WebKit::WebFrameNetworkingContext::ensureWebsiteDataStoreSession): 23 (WebKit::WebFrameNetworkingContext::sourceApplicationIdentifier const): 24 * WebProcess/WebProcess.h: 25 (WebKit::WebProcess::uiProcessBundleIdentifier const): 26 * WebProcess/cocoa/WebProcessCocoa.mm: 27 (WebKit::WebProcess::platformInitializeWebProcess): 28 1 29 2019-01-07 Alex Christensen <achristensen@webkit.org> 2 30 -
trunk/Source/WebKit/NetworkProcess/NetworkProcess.h
r239680 r239683 210 210 #endif 211 211 212 const String& uiProcessBundleIdentifier() const { return m_uiProcessBundleIdentifier; } 213 212 214 private: 213 215 NetworkProcess(); … … 352 354 bool m_diskCacheIsDisabledForTesting; 353 355 bool m_canHandleHTTPSServerTrustEvaluation; 356 String m_uiProcessBundleIdentifier; 354 357 355 358 RefPtr<NetworkCache::Cache> m_cache; -
trunk/Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm
r239680 r239683 87 87 _CFNetworkSetATSContext(parameters.networkATSContext.get()); 88 88 89 SessionTracker::setIdentifierBase(parameters.uiProcessBundleIdentifier);89 m_uiProcessBundleIdentifier = parameters.uiProcessBundleIdentifier; 90 90 91 91 #if PLATFORM(IOS_FAMILY) -
trunk/Source/WebKit/NetworkProcess/mac/RemoteNetworkingContext.mm
r239680 r239683 49 49 return; 50 50 51 String base ;52 if ( SessionTracker::getIdentifierBase().isNull())51 String base = networkProcess.uiProcessBundleIdentifier(); 52 if (base.isNull()) 53 53 base = [[NSBundle mainBundle] bundleIdentifier]; 54 else55 base = SessionTracker::getIdentifierBase();56 54 57 55 if (!sessionID.isEphemeral()) -
trunk/Source/WebKit/Shared/SessionTracker.cpp
r239124 r239683 35 35 using namespace WebCore; 36 36 37 static String& identifierBase()38 {39 ASSERT(RunLoop::isMain());40 41 static NeverDestroyed<String> base;42 return base;43 }44 45 const String& SessionTracker::getIdentifierBase()46 {47 return identifierBase();48 }49 50 void SessionTracker::setIdentifierBase(const String& identifier)51 {52 ASSERT(RunLoop::isMain());53 54 identifierBase() = identifier;55 }56 57 37 static HashMap<PAL::SessionID, RefPtr<NetworkSession>>& staticSessionMap() 58 38 { -
trunk/Source/WebKit/Shared/SessionTracker.h
r227364 r239683 43 43 WTF_MAKE_NONCOPYABLE(SessionTracker); 44 44 public: 45 static const String& getIdentifierBase();46 static void setIdentifierBase(const String&);47 48 45 static void setSession(PAL::SessionID, Ref<NetworkSession>&&); 49 46 static NetworkSession* networkSession(PAL::SessionID); -
trunk/Source/WebKit/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm
r235205 r239683 51 51 return; 52 52 53 String base ;54 if ( SessionTracker::getIdentifierBase().isNull())53 String base = WebProcess::singleton().uiProcessBundleIdentifier(); 54 if (base.isNull()) 55 55 base = [[NSBundle mainBundle] bundleIdentifier]; 56 else57 base = SessionTracker::getIdentifierBase();58 56 59 57 NetworkStorageSession::ensureSession(sessionID, base + '.' + String::number(sessionID.sessionID())); … … 79 77 String WebFrameNetworkingContext::sourceApplicationIdentifier() const 80 78 { 81 return SessionTracker::getIdentifierBase();79 return WebProcess::singleton().uiProcessBundleIdentifier(); 82 80 } 83 81 -
trunk/Source/WebKit/WebProcess/WebProcess.h
r239671 r239683 192 192 #endif 193 193 194 const String& uiProcessBundleIdentifier() const { return m_uiProcessBundleIdentifier; } 195 194 196 void updateActivePages(); 195 197 void getActivePagesOriginsForTesting(CompletionHandler<void(Vector<String>&&)>&&); … … 433 435 TextCheckerState m_textCheckerState; 434 436 437 String m_uiProcessBundleIdentifier; 435 438 RefPtr<NetworkProcessConnection> m_networkProcessConnection; 436 439 WebLoaderStrategy& m_webLoaderStrategy; -
trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
r239572 r239683 135 135 WebCore::setApplicationSDKVersion(parameters.uiProcessSDKVersion); 136 136 137 SessionTracker::setIdentifierBase(parameters.uiProcessBundleIdentifier);137 m_uiProcessBundleIdentifier = parameters.uiProcessBundleIdentifier; 138 138 139 139 #if ENABLE(SANDBOX_EXTENSIONS)
Note:
See TracChangeset
for help on using the changeset viewer.