Changeset 80381 in webkit


Ignore:
Timestamp:
Mar 4, 2011 3:09:26 PM (13 years ago)
Author:
jberlin@webkit.org
Message:

WebKit2: Use CFNetwork Sessions API.
https://bugs.webkit.org/show_bug.cgi?id=55435.

Reviewed by Darin Adler.

Add in the CFURLSTORAGESESSIONS guards that I incorrectly left out because the code was
contained within guards that made USE(CFURLSTORAGESESSIONS) always be true.

Source/WebCore:

  • platform/network/cf/ResourceHandleCFNet.cpp:

(WebCore::makeFinalRequest):
(WebCore::ResourceHandle::willSendRequest):

  • platform/network/cf/ResourceRequestCFNet.cpp:
  • platform/network/mac/ResourceHandleMac.mm:

(WebCore::ResourceHandle::createNSURLConnection):
(WebCore::ResourceHandle::willSendRequest):

  • platform/network/mac/ResourceRequestMac.mm:

Source/WebKit2:

  • UIProcess/mac/WebContextMac.mm:

(WebKit::WebContext::platformInitializeWebProcess):

  • UIProcess/win/WebContextWin.cpp:

(WebKit::WebContext::platformInitializeWebProcess):

Location:
trunk/Source
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r80380 r80381  
     12011-03-04  Jessie Berlin  <jberlin@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        WebKit2: Use CFNetwork Sessions API.
     6        https://bugs.webkit.org/show_bug.cgi?id=55435.
     7
     8        Add in the CFURLSTORAGESESSIONS guards that I incorrectly left out because the code was
     9        contained within guards that made USE(CFURLSTORAGESESSIONS) always be true.
     10
     11        * platform/network/cf/ResourceHandleCFNet.cpp:
     12        (WebCore::makeFinalRequest):
     13        (WebCore::ResourceHandle::willSendRequest):
     14        * platform/network/cf/ResourceRequestCFNet.cpp:
     15        * platform/network/mac/ResourceHandleMac.mm:
     16        (WebCore::ResourceHandle::createNSURLConnection):
     17        (WebCore::ResourceHandle::willSendRequest):
     18        * platform/network/mac/ResourceRequestMac.mm:
     19
    1202011-03-04  Yuqiang Xian  <yuqiang.xian@intel.com>
    221
  • trunk/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp

    r80294 r80381  
    336336    CFMutableURLRequestRef newRequest = CFURLRequestCreateMutableCopy(kCFAllocatorDefault, request.cfURLRequest());
    337337
     338#if USE(CFURLSTORAGESESSIONS)
    338339    if (CFURLStorageSessionRef storageSession = ResourceHandle::privateBrowsingStorageSession())
    339340        wkSetRequestStorageSession(storageSession, newRequest);
     341#endif
    340342   
    341343    if (!shouldContentSniff)
     
    485487        request.clearHTTPAuthorization();
    486488
     489#if USE(CFURLSTORAGESESSIONS)
    487490    if (CFURLStorageSessionRef storageSession = privateBrowsingStorageSession())
    488491        request.setStorageSession(storageSession);
     492#endif
    489493
    490494    client()->willSendRequest(this, request, redirectResponse);
     
    723727}
    724728
     729#if USE(CFURLSTORAGESESSIONS)
     730
    725731RetainPtr<CFURLStorageSessionRef> ResourceHandle::createPrivateBrowsingStorageSession(CFStringRef identifier)
    726732{
     
    732738    return String(reinterpret_cast<CFStringRef>(CFBundleGetValueForInfoDictionaryKey(CFBundleGetMainBundle(), kCFBundleIdentifierKey)));
    733739}
     740
     741#endif
    734742
    735743void WebCoreSynchronousLoaderClient::willSendRequest(ResourceHandle* handle, ResourceRequest& request, const ResourceResponse& /*redirectResponse*/)
  • trunk/Source/WebCore/platform/network/cf/ResourceRequestCFNet.cpp

    r80294 r80381  
    196196}
    197197
     198#if USE(CFURLSTORAGESESSIONS)
     199
    198200void ResourceRequest::setStorageSession(CFURLStorageSessionRef storageSession)
    199201{
     
    202204    m_cfRequest.adoptCF(cfRequest);
    203205}
     206
     207#endif
    204208
    205209#endif // USE(CFNETWORK)
  • trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm

    r80294 r80381  
    240240#endif
    241241
     242#if USE(CFURLSTORAGESESSIONS)
    242243    if (CFURLStorageSessionRef storageSession = privateBrowsingStorageSession())
    243244        nsRequest = [wkCopyRequestWithStorageSession(storageSession, nsRequest) autorelease];
     245#endif
    244246
    245247    if (supportsSettingConnectionProperties) {
     
    556558        request.clearHTTPAuthorization();
    557559
     560#if USE(CFURLSTORAGESESSIONS)
    558561    if (CFURLStorageSessionRef storageSession = privateBrowsingStorageSession())
    559562        request.setStorageSession(storageSession);
     563#endif
    560564
    561565    client()->willSendRequest(this, request, redirectResponse);
     
    700704}
    701705
     706#if USE(CFURLSTORAGESESSIONS)
     707
    702708RetainPtr<CFURLStorageSessionRef> ResourceHandle::createPrivateBrowsingStorageSession(CFStringRef identifier)
    703709{
     
    709715    return String([[NSBundle mainBundle] bundleIdentifier]);
    710716}
     717
     718#endif
    711719
    712720} // namespace WebCore
  • trunk/Source/WebCore/platform/network/mac/ResourceRequestMac.mm

    r80294 r80381  
    175175}
    176176
     177#if USE(CFURLSTORAGESESSIONS)
     178
    177179void ResourceRequest::setStorageSession(CFURLStorageSessionRef storageSession)
    178180{
     
    180182}
    181183
     184#endif
     185
    182186} // namespace WebCore
    183187
  • trunk/Source/WebKit2/ChangeLog

    r80370 r80381  
     12011-03-04  Jessie Berlin  <jberlin@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        WebKit2: Use CFNetwork Sessions API.
     6        https://bugs.webkit.org/show_bug.cgi?id=55435.
     7
     8        Add in the CFURLSTORAGESESSIONS guards that I incorrectly left out because the code was
     9        contained within guards that made USE(CFURLSTORAGESESSIONS) always be true.
     10
     11        * UIProcess/mac/WebContextMac.mm:
     12        (WebKit::WebContext::platformInitializeWebProcess):
     13        * UIProcess/win/WebContextWin.cpp:
     14        (WebKit::WebContext::platformInitializeWebProcess):
     15
    1162011-03-04  Jessie Berlin  <jberlin@apple.com>
    217
  • trunk/Source/WebKit2/UIProcess/mac/WebContextMac.mm

    r80180 r80381  
    9595    parameters.uiProcessBundleResourcePath = fileSystemRepresentation([[NSBundle mainBundle] resourcePath]);
    9696
     97#if USE(CFURLSTORAGESESSIONS)
    9798    parameters.uiProcessBundleIdentifier = String([[NSBundle mainBundle] bundleIdentifier]);
     99#endif
    98100}
    99101
  • trunk/Source/WebKit2/UIProcess/win/WebContextWin.cpp

    r80180 r80381  
    7070        parameters.cfURLCachePath.remove(parameters.cfURLCachePath.length() - 1);
    7171
     72#if USE(CFURLSTORAGESESSIONS)
    7273    parameters.uiProcessBundleIdentifier = String(reinterpret_cast<CFStringRef>(CFBundleGetValueForInfoDictionaryKey(CFBundleGetMainBundle(), kCFBundleIdentifierKey)));
    73 #endif
     74#endif // USE(CFURLSTORAGESESSIONS)
     75
     76#endif // USE(CFNETWORK)
    7477}
    7578
Note: See TracChangeset for help on using the changeset viewer.