Changeset 211946 in webkit


Ignore:
Timestamp:
Feb 9, 2017 3:09:28 AM (7 years ago)
Author:
Antti Koivisto
Message:

Remove most cases of #if ENABLE(CACHE_PARTITIONING)
https://bugs.webkit.org/show_bug.cgi?id=167990

Reviewed by Sam Weinig.

Source/WebCore:

We'll just return empty string for the partition if partitioning is not enabled.

  • html/DOMURL.cpp:

(WebCore::DOMURL::revokeObjectURL):

  • inspector/InspectorPageAgent.cpp:

(WebCore::InspectorPageAgent::cachedResource):

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::loadURL):

  • loader/archive/cf/LegacyWebArchive.cpp:

(WebCore::LegacyWebArchive::create):

  • loader/cache/CachedResource.h:

(WebCore::CachedResource::url):
(WebCore::CachedResource::cachePartition):

  • loader/cache/CachedResourceLoader.cpp:

(WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
(WebCore::CachedResourceLoader::requestResource):

  • loader/cache/CachedResourceRequest.cpp:

(WebCore::CachedResourceRequest::setDomainForCachePartition):

  • loader/cache/CachedResourceRequest.h:
  • loader/cache/MemoryCache.cpp:

(WebCore::MemoryCache::add):
(WebCore::MemoryCache::revalidationSucceeded):
(WebCore::MemoryCache::resourceForRequestImpl):
(WebCore::MemoryCache::addImageToCache):
(WebCore::MemoryCache::removeImageFromCache):
(WebCore::MemoryCache::remove):
(WebCore::MemoryCache::removeResourcesWithOrigin):
(WebCore::MemoryCache::removeResourcesWithOrigins):
(WebCore::MemoryCache::getOriginsWithCache):
(WebCore::MemoryCache::originsWithCache):

  • loader/cache/MemoryCache.h:
  • page/SecurityOrigin.cpp:

(WebCore::SecurityOrigin::domainForCachePartition):

  • page/SecurityOrigin.h:
  • platform/SchemeRegistry.cpp:

(WebCore::cachePartitioningSchemes):
(WebCore::SchemeRegistry::shouldPartitionCacheForURLScheme):

  • platform/SchemeRegistry.h:
  • platform/ios/WebCoreSystemInterfaceIOS.mm:
  • platform/mac/WebCoreSystemInterface.h:
  • platform/mac/WebCoreSystemInterface.mm:
  • platform/network/ResourceRequestBase.cpp:

(WebCore::ResourceRequestBase::setAsIsolatedCopy):
(WebCore::ResourceRequestBase::setCachePartition):
(WebCore::ResourceRequestBase::partitionName):

  • platform/network/ResourceRequestBase.h:

(WebCore::ResourceRequestBase::cachePartition):
(WebCore::ResourceRequestBase::setDomainForCachePartition):

  • platform/network/cf/ResourceRequest.h:

(WebCore::ResourceRequest::cachePartition): Deleted.
(WebCore::ResourceRequest::setCachePartition): Deleted.
(WebCore::ResourceRequest::setDomainForCachePartition): Deleted.

  • platform/network/cf/ResourceRequestCFNet.cpp:

(WebCore::ResourceRequest::doUpdatePlatformRequest):
(WebCore::ResourceRequest::doUpdateResourceRequest):
(WebCore::ResourceRequest::partitionName): Deleted.
(WebCore::ResourceRequest::doPlatformSetAsIsolatedCopy): Deleted.

  • platform/network/cf/ResourceResponse.h:
  • platform/network/cocoa/ResourceRequestCocoa.mm:

(WebCore::ResourceRequest::doUpdateResourceRequest):
(WebCore::ResourceRequest::doUpdatePlatformRequest):

  • testing/Internals.cpp:

(WebCore::Internals::isLoadingFromMemoryCache):

Source/WebKit/mac:

  • Misc/WebCache.mm:

(+[WebCache addImageToCache:forURL:forFrame:]):
(+[WebCache removeImageFromCacheForURL:forFrame:]):

  • WebCoreSupport/WebSystemInterface.mm:

(InitWebCoreSystemInterface):

Source/WebKit2:

  • NetworkProcess/NetworkResourceLoader.cpp:

(WebKit::NetworkResourceLoader::didRetrieveCacheEntry):

  • NetworkProcess/cache/NetworkCache.cpp:

(WebKit::NetworkCache::Cache::makeCacheKey):

  • NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:

(WebKit::NetworkCache::constructRevalidationRequest):

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::ArgumentCoder<ResourceRequest>::encode):
(IPC::ArgumentCoder<ResourceRequest>::decode):

  • Shared/WebProcessCreationParameters.cpp:

(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):

  • Shared/WebProcessCreationParameters.h:
  • UIProcess/API/C/WKContext.cpp:

(WKContextRegisterURLSchemeAsCachePartitioned):

  • UIProcess/WebProcessPool.cpp:

(WebKit::m_hiddenPageThrottlingTimer):
(WebKit::WebProcessPool::createNewWebProcess):
(WebKit::WebProcessPool::registerURLSchemeAsCachePartitioned):

  • UIProcess/WebProcessPool.h:
  • WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:

(InitWebCoreSystemInterface):

  • WebProcess/WebProcess.cpp:

(WebKit::WebProcess::initializeWebProcess):
(WebKit::WebProcess::registerURLSchemeAsCachePartitioned):

  • WebProcess/WebProcess.h:
  • WebProcess/WebProcess.messages.in:
Location:
trunk/Source
Files:
51 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r211945 r211946  
     12017-02-09  Antti Koivisto  <antti@apple.com>
     2
     3        Remove most cases of #if ENABLE(CACHE_PARTITIONING)
     4        https://bugs.webkit.org/show_bug.cgi?id=167990
     5
     6        Reviewed by Sam Weinig.
     7
     8        We'll just return empty string for the partition if partitioning is not enabled.
     9
     10        * html/DOMURL.cpp:
     11        (WebCore::DOMURL::revokeObjectURL):
     12        * inspector/InspectorPageAgent.cpp:
     13        (WebCore::InspectorPageAgent::cachedResource):
     14        * loader/FrameLoader.cpp:
     15        (WebCore::FrameLoader::loadURL):
     16        * loader/archive/cf/LegacyWebArchive.cpp:
     17        (WebCore::LegacyWebArchive::create):
     18        * loader/cache/CachedResource.h:
     19        (WebCore::CachedResource::url):
     20        (WebCore::CachedResource::cachePartition):
     21        * loader/cache/CachedResourceLoader.cpp:
     22        (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
     23        (WebCore::CachedResourceLoader::requestResource):
     24        * loader/cache/CachedResourceRequest.cpp:
     25        (WebCore::CachedResourceRequest::setDomainForCachePartition):
     26        * loader/cache/CachedResourceRequest.h:
     27        * loader/cache/MemoryCache.cpp:
     28        (WebCore::MemoryCache::add):
     29        (WebCore::MemoryCache::revalidationSucceeded):
     30        (WebCore::MemoryCache::resourceForRequestImpl):
     31        (WebCore::MemoryCache::addImageToCache):
     32        (WebCore::MemoryCache::removeImageFromCache):
     33        (WebCore::MemoryCache::remove):
     34        (WebCore::MemoryCache::removeResourcesWithOrigin):
     35        (WebCore::MemoryCache::removeResourcesWithOrigins):
     36        (WebCore::MemoryCache::getOriginsWithCache):
     37        (WebCore::MemoryCache::originsWithCache):
     38        * loader/cache/MemoryCache.h:
     39        * page/SecurityOrigin.cpp:
     40        (WebCore::SecurityOrigin::domainForCachePartition):
     41        * page/SecurityOrigin.h:
     42        * platform/SchemeRegistry.cpp:
     43        (WebCore::cachePartitioningSchemes):
     44        (WebCore::SchemeRegistry::shouldPartitionCacheForURLScheme):
     45        * platform/SchemeRegistry.h:
     46        * platform/ios/WebCoreSystemInterfaceIOS.mm:
     47        * platform/mac/WebCoreSystemInterface.h:
     48        * platform/mac/WebCoreSystemInterface.mm:
     49        * platform/network/ResourceRequestBase.cpp:
     50        (WebCore::ResourceRequestBase::setAsIsolatedCopy):
     51        (WebCore::ResourceRequestBase::setCachePartition):
     52        (WebCore::ResourceRequestBase::partitionName):
     53        * platform/network/ResourceRequestBase.h:
     54        (WebCore::ResourceRequestBase::cachePartition):
     55        (WebCore::ResourceRequestBase::setDomainForCachePartition):
     56        * platform/network/cf/ResourceRequest.h:
     57        (WebCore::ResourceRequest::cachePartition): Deleted.
     58        (WebCore::ResourceRequest::setCachePartition): Deleted.
     59        (WebCore::ResourceRequest::setDomainForCachePartition): Deleted.
     60        * platform/network/cf/ResourceRequestCFNet.cpp:
     61        (WebCore::ResourceRequest::doUpdatePlatformRequest):
     62        (WebCore::ResourceRequest::doUpdateResourceRequest):
     63        (WebCore::ResourceRequest::partitionName): Deleted.
     64        (WebCore::ResourceRequest::doPlatformSetAsIsolatedCopy): Deleted.
     65        * platform/network/cf/ResourceResponse.h:
     66        * platform/network/cocoa/ResourceRequestCocoa.mm:
     67        (WebCore::ResourceRequest::doUpdateResourceRequest):
     68        (WebCore::ResourceRequest::doUpdatePlatformRequest):
     69        * testing/Internals.cpp:
     70        (WebCore::Internals::isLoadingFromMemoryCache):
     71
    1722017-02-09  Ryosuke Niwa  <rniwa@webkit.org>
    273
  • trunk/Source/WebCore/Modules/websockets/WebSocketChannel.cpp

    r211751 r211946  
    125125        Page* page = frame->page();
    126126        SessionID sessionID = page ? page->sessionID() : SessionID::defaultSessionID();
    127 #if ENABLE(CACHE_PARTITIONING)
    128127        String partition = m_document->topDocument().securityOrigin().domainForCachePartition();
    129 #else
    130         String partition = emptyString();
    131 #endif
    132128        m_handle = m_socketProvider->createSocketStreamHandle(m_handshake->url(), *this, sessionID, partition);
    133129    }
  • trunk/Source/WebCore/html/DOMURL.cpp

    r210923 r211946  
    121121    URL url(URL(), urlString);
    122122    ResourceRequest request(url);
    123 #if ENABLE(CACHE_PARTITIONING)
    124123    request.setDomainForCachePartition(scriptExecutionContext.topOrigin().domainForCachePartition());
    125 #endif
     124
    126125    MemoryCache::removeRequestFromSessionCaches(scriptExecutionContext, request);
    127126
  • trunk/Source/WebCore/inspector/InspectorPageAgent.cpp

    r210923 r211946  
    261261    if (!cachedResource) {
    262262        ResourceRequest request(url);
    263 #if ENABLE(CACHE_PARTITIONING)
    264263        request.setDomainForCachePartition(frame->document()->topOrigin().domainForCachePartition());
    265 #endif
    266264        cachedResource = MemoryCache::singleton().resourceForRequest(request, frame->page()->sessionID());
    267265    }
  • trunk/Source/WebCore/loader/FrameLoader.cpp

    r211870 r211946  
    12021202        addHTTPOriginIfNeeded(request, referrerOrigin->toString());
    12031203    }
    1204 #if ENABLE(CACHE_PARTITIONING)
    12051204    if (&m_frame.tree().top() != &m_frame)
    12061205        request.setDomainForCachePartition(m_frame.tree().top().document()->securityOrigin().domainForCachePartition());
    1207 #endif
     1206
    12081207    addExtraFieldsToRequest(request, newLoadType, true);
    12091208    if (newLoadType == FrameLoadType::Reload || newLoadType == FrameLoadType::ReloadFromOrigin)
  • trunk/Source/WebCore/loader/archive/cf/LegacyWebArchive.cpp

    r210923 r211946  
    515515
    516516                ResourceRequest request(subresourceURL);
    517 #if ENABLE(CACHE_PARTITIONING)
    518517                request.setDomainForCachePartition(frame.document()->topOrigin().domainForCachePartition());
    519 #endif
     518
    520519                if (auto* cachedResource = MemoryCache::singleton().resourceForRequest(request, frame.page()->sessionID())) {
    521520                    if (auto resource = ArchiveResource::create(cachedResource->resourceBuffer(), subresourceURL, cachedResource->response())) {
  • trunk/Source/WebCore/loader/cache/CachedResource.h

    r211649 r211946  
    115115    ResourceRequest& resourceRequest() { return m_resourceRequest; }
    116116    const URL& url() const { return m_resourceRequest.url();}
    117 #if ENABLE(CACHE_PARTITIONING)
    118117    const String& cachePartition() const { return m_resourceRequest.cachePartition(); }
    119 #endif
    120118    SessionID sessionID() const { return m_sessionID; }
    121119    Type type() const { return m_type; }
  • trunk/Source/WebCore/loader/cache/CachedResourceLoader.cpp

    r211673 r211946  
    218218CachedResourceHandle<CachedCSSStyleSheet> CachedResourceLoader::requestUserCSSStyleSheet(CachedResourceRequest&& request)
    219219{
    220 #if ENABLE(CACHE_PARTITIONING)
    221220    ASSERT(document());
    222221    request.setDomainForCachePartition(*document());
    223 #endif
    224222
    225223    auto& memoryCache = MemoryCache::singleton();
     
    734732    // See if we can use an existing resource from the cache.
    735733    CachedResourceHandle<CachedResource> resource;
    736 #if ENABLE(CACHE_PARTITIONING)
    737734    if (document())
    738735        request.setDomainForCachePartition(*document());
    739 #endif
    740736
    741737    if (request.allowsCaching())
  • trunk/Source/WebCore/loader/cache/CachedResourceRequest.cpp

    r210923 r211946  
    130130}
    131131
    132 #if ENABLE(CACHE_PARTITIONING)
    133132void CachedResourceRequest::setDomainForCachePartition(Document& document)
    134133{
    135134    m_resourceRequest.setDomainForCachePartition(document.topOrigin().domainForCachePartition());
    136135}
    137 #endif
    138136
    139137static inline String acceptHeaderValueFromType(CachedResource::Type type)
  • trunk/Source/WebCore/loader/cache/CachedResourceRequest.h

    r211649 r211946  
    7676    void applyBlockedStatus(const ContentExtensions::BlockedStatus&);
    7777#endif
    78 #if ENABLE(CACHE_PARTITIONING)
    7978    void setDomainForCachePartition(Document&);
    80 #endif
    8179    bool isLinkPreload() const { return m_isLinkPreload; }
    8280    void setIsLinkPreload() { m_isLinkPreload = true; }
  • trunk/Source/WebCore/loader/cache/MemoryCache.cpp

    r208841 r211946  
    116116    ASSERT(WTF::isMainThread());
    117117
    118 #if ENABLE(CACHE_PARTITIONING)
    119118    auto key = std::make_pair(resource.url(), resource.cachePartition());
    120 #else
    121     auto& key = resource.url();
    122 #endif
     119
    123120    ensureSessionResourceMap(resource.sessionID()).set(key, &resource);
    124121    resource.setInCache(true);
     
    145142
    146143    auto& resources = ensureSessionResourceMap(resource.sessionID());
    147 #if ENABLE(CACHE_PARTITIONING)
    148144    auto key = std::make_pair(resource.url(), resource.cachePartition());
    149 #else
    150     auto& key = resource.url();
    151 #endif
     145
    152146    ASSERT(!resources.get(key));
    153147    resources.set(key, &resource);
     
    190184    URL url = removeFragmentIdentifierIfNeeded(request.url());
    191185
    192 #if ENABLE(CACHE_PARTITIONING)
    193186    auto key = std::make_pair(url, request.cachePartition());
    194 #else
    195     auto& key = url;
    196 #endif
    197187    return resources.get(key);
    198188}
     
    233223    cachedImage->addClient(dummyCachedImageClient());
    234224    cachedImage->setDecodedSize(bitmapImage->decodedSize());
    235 #if ENABLE(CACHE_PARTITIONING)
    236225    cachedImage->resourceRequest().setDomainForCachePartition(domainForCachePartition);
    237 #endif
     226
    238227    return add(*cachedImage.release());
    239228}
     
    245234        return;
    246235
    247 #if ENABLE(CACHE_PARTITIONING)
    248236    auto key = std::make_pair(url, ResourceRequest::partitionName(domainForCachePartition));
    249 #else
    250     UNUSED_PARAM(domainForCachePartition);
    251     auto& key = url;
    252 #endif
     237
    253238    CachedResource* resource = resources->get(key);
    254239    if (!resource)
     
    440425    // who needed a fresh copy for a reload. See <http://bugs.webkit.org/show_bug.cgi?id=12479#c6>.
    441426    if (auto* resources = sessionResourceMap(resource.sessionID())) {
    442 #if ENABLE(CACHE_PARTITIONING)
    443427        auto key = std::make_pair(resource.url(), resource.cachePartition());
    444 #else
    445         auto& key = resource.url();
    446 #endif
     428
    447429        if (resource.inCache()) {
    448430            // Remove resource from the resource map.
     
    528510void MemoryCache::removeResourcesWithOrigin(SecurityOrigin& origin)
    529511{
    530 #if ENABLE(CACHE_PARTITIONING)
    531512    String originPartition = ResourceRequest::partitionName(origin.host());
    532 #endif
    533513
    534514    Vector<CachedResource*> resourcesWithOrigin;
     
    536516        for (auto& keyValue : *resources) {
    537517            auto& resource = *keyValue.value;
    538 #if ENABLE(CACHE_PARTITIONING)
    539518            auto& partitionName = keyValue.key.second;
    540519            if (partitionName == originPartition) {
     
    542521                continue;
    543522            }
    544 #endif
    545523            RefPtr<SecurityOrigin> resourceOrigin = SecurityOrigin::create(resource.url());
    546524            if (resourceOrigin->equal(&origin))
     
    559537        return;
    560538
    561 #if ENABLE(CACHE_PARTITIONING)
    562539    HashSet<String> originPartitions;
    563540
    564541    for (auto& origin : origins)
    565542        originPartitions.add(ResourceRequest::partitionName(origin->host()));
    566 #endif
    567543
    568544    Vector<CachedResource*> resourcesToRemove;
    569545    for (auto& keyValuePair : *resourceMap) {
    570546        auto& resource = *keyValuePair.value;
    571 
    572 #if ENABLE(CACHE_PARTITIONING)
    573547        auto& partitionName = keyValuePair.key.second;
    574548        if (originPartitions.contains(partitionName)) {
     
    576550            continue;
    577551        }
    578 #endif
    579 
    580552        if (origins.contains(SecurityOrigin::create(resource.url()).ptr()))
    581553            resourcesToRemove.append(&resource);
     
    588560void MemoryCache::getOriginsWithCache(SecurityOriginSet& origins)
    589561{
    590 #if ENABLE(CACHE_PARTITIONING)
    591     static NeverDestroyed<String> httpString("http");
    592 #endif
    593562    for (auto& resources : m_sessionResources.values()) {
    594563        for (auto& keyValue : *resources) {
    595564            auto& resource = *keyValue.value;
    596 #if ENABLE(CACHE_PARTITIONING)
    597565            auto& partitionName = keyValue.key.second;
    598566            if (!partitionName.isEmpty())
    599                 origins.add(SecurityOrigin::create(httpString, partitionName, 0));
     567                origins.add(SecurityOrigin::create(ASCIILiteral("http"), partitionName, 0));
    600568            else
    601 #endif
    602             origins.add(SecurityOrigin::create(resource.url()));
     569                origins.add(SecurityOrigin::create(resource.url()));
    603570        }
    604571    }
     
    613580        for (auto& keyValue : *it->value) {
    614581            auto& resource = *keyValue.value;
    615 #if ENABLE(CACHE_PARTITIONING)
    616582            auto& partitionName = keyValue.key.second;
    617583            if (!partitionName.isEmpty())
    618584                origins.add(SecurityOrigin::create("http", partitionName, 0));
    619585            else
    620 #endif
    621             origins.add(SecurityOrigin::create(resource.url()));
     586                origins.add(SecurityOrigin::create(resource.url()));
    622587        }
    623588    }
  • trunk/Source/WebCore/loader/cache/MemoryCache.h

    r208646 r211946  
    169169
    170170private:
    171 #if ENABLE(CACHE_PARTITIONING)
    172171    typedef HashMap<std::pair<URL, String /* partitionName */>, CachedResource*> CachedResourceMap;
    173 #else
    174     typedef HashMap<URL, CachedResource*> CachedResourceMap;
    175 #endif
    176172    typedef ListHashSet<CachedResource*> LRUList;
    177173
  • trunk/Source/WebCore/page/SecurityOrigin.cpp

    r211763 r211946  
    396396}
    397397
    398 #if ENABLE(CACHE_PARTITIONING)
    399398String SecurityOrigin::domainForCachePartition() const
    400399{
     
    410409    return emptyString();
    411410}
    412 #endif
    413411
    414412void SecurityOrigin::enforceFilePathSeparation()
  • trunk/Source/WebCore/page/SecurityOrigin.h

    r210923 r211946  
    139139    bool needsStorageAccessFromFileURLsQuirk() const { return m_needsStorageAccessFromFileURLsQuirk; }
    140140
    141 #if ENABLE(CACHE_PARTITIONING)
    142141    WEBCORE_EXPORT String domainForCachePartition() const;
    143 #endif
    144142
    145143    bool canAccessDatabase(const SecurityOrigin& topOrigin) const { return canAccessStorage(&topOrigin); };
  • trunk/Source/WebCore/platform/SchemeRegistry.cpp

    r211758 r211946  
    168168}
    169169
    170 #if ENABLE(CACHE_PARTITIONING)
    171170static URLSchemesMap& cachePartitioningSchemes()
    172171{
     
    174173    return schemes;
    175174}
    176 #endif
    177175
    178176static URLSchemesMap& alwaysRevalidatedSchemes()
     
    344342}
    345343
    346 #if ENABLE(CACHE_PARTITIONING)
    347344void SchemeRegistry::registerURLSchemeAsCachePartitioned(const String& scheme)
    348345{
     
    356353    return cachePartitioningSchemes().contains(scheme);
    357354}
    358 #endif
    359355
    360356bool SchemeRegistry::isUserExtensionScheme(const String& scheme)
  • trunk/Source/WebCore/platform/SchemeRegistry.h

    r211758 r211946  
    9595    static bool shouldAlwaysRevalidateURLScheme(const String&);
    9696
    97 #if ENABLE(CACHE_PARTITIONING)
    9897    // Schemes whose requests should be partitioned in the cache
    9998    WEBCORE_EXPORT static void registerURLSchemeAsCachePartitioned(const String& scheme);
    10099    static bool shouldPartitionCacheForURLScheme(const String& scheme);
    101 #endif
    102100
    103101    static bool isUserExtensionScheme(const String& scheme);
  • trunk/Source/WebCore/platform/ios/WebCoreSystemInterfaceIOS.mm

    r202279 r211946  
    6767#endif
    6868
    69 #if ENABLE(CACHE_PARTITIONING)
    7069WEBCORE_EXPORT CFStringRef (*wkCachePartitionKey)(void);
    71 #endif
    7270
    7371WEBCORE_EXPORT int (*wkExernalDeviceTypeForPlayer)(AVPlayer *);
  • trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.h

    r207585 r211946  
    236236#endif
    237237
    238 #if ENABLE(CACHE_PARTITIONING)
    239238extern CFStringRef (*wkCachePartitionKey)(void);
    240 #endif
    241239
    242240typedef enum {
  • trunk/Source/WebCore/platform/mac/WebCoreSystemInterface.mm

    r204568 r211946  
    114114#endif
    115115
    116 #if ENABLE(CACHE_PARTITIONING)
    117116CFStringRef (*wkCachePartitionKey)(void);
    118 #endif
    119117
    120118int (*wkExernalDeviceTypeForPlayer)(AVPlayer *);
  • trunk/Source/WebCore/platform/network/ResourceHandleInternal.h

    r211751 r211946  
    8080        , m_firstRequest(request)
    8181        , m_lastHTTPMethod(request.httpMethod())
    82 #if ENABLE(CACHE_PARTITIONING)
    8382        , m_partition(request.cachePartition())
    84 #else
    85         , m_partition(emptyString())
    86 #endif
    8783        , m_defersLoading(defersLoading)
    8884        , m_shouldContentSniff(shouldContentSniff)
  • trunk/Source/WebCore/platform/network/ResourceRequestBase.cpp

    r209776 r211946  
    2828
    2929#include "HTTPHeaderNames.h"
     30#include "PublicSuffix.h"
    3031#include "ResourceRequest.h"
    3132#include <wtf/PointerComparison.h>
     
    6768    setRequester(other.requester());
    6869    setInitiatorIdentifier(other.initiatorIdentifier().isolatedCopy());
     70    setCachePartition(other.cachePartition());
    6971
    7072    updateResourceRequest();
     
    8789        setHTTPBody(other.m_httpBody->isolatedCopy());
    8890    setAllowCookies(other.m_allowCookies);
    89 
    90     const_cast<ResourceRequest&>(asResourceRequest()).doPlatformSetAsIsolatedCopy(other);
    9191}
    9292
     
    641641#endif
    642642
    643 }
     643void ResourceRequestBase::setCachePartition(const String& cachePartition)
     644{
     645#if ENABLE(CACHE_PARTITIONING)
     646    ASSERT(!cachePartition.isNull());
     647    ASSERT(cachePartition == partitionName(cachePartition));
     648    m_cachePartition = cachePartition;
     649#else
     650    UNUSED_PARAM(cachePartition);
     651#endif
     652}
     653
     654String ResourceRequestBase::partitionName(const String& domain)
     655{
     656#if ENABLE(PUBLIC_SUFFIX_LIST)
     657    if (domain.isNull())
     658        return emptyString();
     659    String highLevel = topPrivatelyControlledDomain(domain);
     660    if (highLevel.isNull())
     661        return emptyString();
     662    return highLevel;
     663#else
     664#if ENABLE(CACHE_PARTITIONING)
     665#error Cache partitioning requires PUBLIC_SUFFIX_LIST
     666#endif
     667    return emptyString();
     668#endif
     669}
     670
     671}
  • trunk/Source/WebCore/platform/network/ResourceRequestBase.h

    r209629 r211946  
    137137    WEBCORE_EXPORT void setPriority(ResourceLoadPriority);
    138138
     139    WEBCORE_EXPORT static String partitionName(const String& domain);
     140    const String& cachePartition() const { return m_cachePartition; }
     141    WEBCORE_EXPORT void setCachePartition(const String&);
     142    void setDomainForCachePartition(const String& domain) { setCachePartition(partitionName(domain)); }
     143
    139144    WEBCORE_EXPORT bool isConditional() const;
    140145    WEBCORE_EXPORT void makeUnconditional();
     
    238243    Requester m_requester { Requester::Unspecified };
    239244    String m_initiatorIdentifier;
     245    String m_cachePartition { emptyString() };
    240246
    241247private:
  • trunk/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp

    r211753 r211946  
    138138    }
    139139
    140 #if ENABLE(CACHE_PARTITIONING)
    141140    String partition = firstRequest().cachePartition();
    142 #else
    143     String partition = emptyString();
    144 #endif
    145141
    146142    // <rdar://problem/7174050> - For URLs that match the paths of those previously challenged for HTTP Basic authentication,
     
    307303    request.removeCredentials();
    308304
    309 #if ENABLE(CACHE_PARTITIONING)
    310305    String partition = firstRequest().cachePartition();
    311 #else
    312     String partition = emptyString();
    313 #endif
    314306
    315307    if (!protocolHostAndPortAreEqual(request.url(), redirectResponse.url())) {
     
    396388        return false;
    397389
    398 #if ENABLE(CACHE_PARTITIONING)
    399390    String partition = firstRequest().cachePartition();
    400 #else
    401     String partition = emptyString();
    402 #endif
    403391
    404392    if (!d->m_user.isNull() && !d->m_pass.isNull()) {
     
    491479            urlToStore = challenge.failureResponse().url();
    492480
    493 #if ENABLE(CACHE_PARTITIONING)
    494         String partition = firstRequest().cachePartition();
    495 #else
    496         String partition = emptyString();
    497 #endif
    498 
    499         d->m_context->storageSession().credentialStorage().set(partition, webCredential, challenge.protectionSpace(), urlToStore);
     481        d->m_context->storageSession().credentialStorage().set(firstRequest().cachePartition(), webCredential, challenge.protectionSpace(), urlToStore);
    500482
    501483        if (d->m_connection) {
  • trunk/Source/WebCore/platform/network/cf/ResourceRequest.h

    r207585 r211946  
    9595#endif
    9696
    97 #if ENABLE(CACHE_PARTITIONING)
    98     WEBCORE_EXPORT static String partitionName(const String& domain);
    99     const String& cachePartition() const { return m_cachePartition.isNull() ? emptyString() : m_cachePartition; }
    100     void setCachePartition(const String& cachePartition)
    101     {
    102         ASSERT(cachePartition == partitionName(cachePartition));
    103         m_cachePartition = cachePartition;
    104     }
    105     void setDomainForCachePartition(const String& domain) { m_cachePartition = partitionName(domain); }
    106 #endif
    107 
    10897#if PLATFORM(COCOA) || USE(CFURLCONNECTION)
    10998    WEBCORE_EXPORT CFURLRequestRef cfURLRequest(HTTPBodyUpdatePolicy) const;
     
    132121    RetainPtr<NSURLRequest> m_nsRequest;
    133122#endif
    134 #if ENABLE(CACHE_PARTITIONING)
    135     String m_cachePartition;
    136 #endif
    137123
    138124    static bool s_httpPipeliningEnabled;
  • trunk/Source/WebCore/platform/network/cf/ResourceRequestCFNet.cpp

    r210236 r211946  
    362362}
    363363
    364 #if ENABLE(CACHE_PARTITIONING)
    365 String ResourceRequest::partitionName(const String& domain)
    366 {
    367     if (domain.isNull())
    368         return emptyString();
    369 #if ENABLE(PUBLIC_SUFFIX_LIST)
    370     String highLevel = topPrivatelyControlledDomain(domain);
    371     if (highLevel.isNull())
    372         return emptyString();
    373     return highLevel;
    374 #else
    375     return domain;
    376 #endif
    377 }
    378 #endif
    379 
    380 void ResourceRequest::doPlatformSetAsIsolatedCopy(const ResourceRequest& other)
    381 {
    382 #if ENABLE(CACHE_PARTITIONING)
    383     m_cachePartition = other.m_cachePartition.isolatedCopy();
    384 #else
    385     UNUSED_PARAM(other);
    386 #endif
    387 }
    388 
    389 
    390364// FIXME: It is confusing that this function both sets connection count and determines maximum request count at network layer. This can and should be done separately.
    391365unsigned initializeMaximumHTTPConnectionCountPerHost()
  • trunk/Source/WebCore/platform/network/cf/ResourceResponse.h

    r207585 r211946  
    104104    CertificateInfo platformCertificateInfo() const;
    105105
    106     void doPlatformSetAsIsolatedCopy(const ResourceResponse&) const;
    107 
    108106#if PLATFORM(COCOA)
    109107    void initNSURLResponse() const;
  • trunk/Source/WebCore/platform/network/cocoa/ResourceRequestCocoa.mm

    r210890 r211946  
    149149    }
    150150
    151 #if ENABLE(CACHE_PARTITIONING)
    152151    if (m_nsRequest) {
    153152        NSString* cachePartition = [NSURLProtocol propertyForKey:(NSString *)wkCachePartitionKey() inRequest:m_nsRequest.get()];
     
    155154            m_cachePartition = cachePartition;
    156155    }
    157 #endif
    158156}
    159157
     
    219217    [nsRequest setContentDispositionEncodingFallbackArray:encodingFallbacks];
    220218
    221 #if ENABLE(CACHE_PARTITIONING)
    222219    String partition = cachePartition();
    223220    if (!partition.isNull() && !partition.isEmpty()) {
     
    225222        [NSURLProtocol setProperty:partitionValue forKey:(NSString *)wkCachePartitionKey() inRequest:nsRequest];
    226223    }
    227 #endif
    228224
    229225#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200)
  • trunk/Source/WebCore/platform/network/curl/ResourceHandleCurl.cpp

    r211753 r211946  
    180180void ResourceHandle::didReceiveAuthenticationChallenge(const AuthenticationChallenge& challenge)
    181181{
    182 #if ENABLE(CACHE_PARTITIONING)
    183182    String partition = firstRequest().cachePartition();
    184 #else
    185     String partition = emptyString();
    186 #endif
    187183
    188184    if (!d->m_user.isNull() && !d->m_pass.isNull()) {
     
    242238    }
    243239
    244 #if ENABLE(CACHE_PARTITIONING)
    245240    String partition = firstRequest().cachePartition();
    246 #else
    247     String partition = emptyString();
    248 #endif
    249241
    250242    if (shouldUseCredentialStorage()) {
  • trunk/Source/WebCore/platform/network/curl/ResourceHandleManager.cpp

    r211753 r211946  
    10421042    ResourceHandleInternal* d = handle->getInternal();
    10431043
    1044 #if ENABLE(CACHE_PARTITIONING)
    10451044    String partition = handle->firstRequest().cachePartition();
    1046 #else
    1047     String partition = emptyString();
    1048 #endif
    10491045
    10501046    if (handle->shouldUseCredentialStorage()) {
  • trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm

    r211895 r211946  
    152152            // <rdar://problem/7174050> - For URLs that match the paths of those previously challenged for HTTP Basic authentication,
    153153            // try and reuse the credential preemptively, as allowed by RFC 2617.
    154 #if ENABLE(CACHE_PARTITIONING)
    155             String partition = firstRequest().cachePartition();
    156 #else
    157             String partition = emptyString();
    158 #endif
    159             d->m_initialCredential = d->m_context->storageSession().credentialStorage().get(partition, firstRequest().url());
     154            d->m_initialCredential = d->m_context->storageSession().credentialStorage().get(firstRequest().cachePartition(), firstRequest().url());
    160155        } else {
    161156            // If there is already a protection space known for the URL, update stored credentials before sending a request.
  • trunk/Source/WebCore/platform/network/soup/ResourceHandleSoup.cpp

    r211754 r211946  
    202202    ResourceHandleInternal* d = handle->getInternal();
    203203
    204 #if ENABLE(CACHE_PARTITIONING)
    205     String partition = firstRequest().cachePartition();
    206 #else
    207     String partition = emptyString();
    208 #endif
     204    String partition = request.cachePartition();
    209205
    210206    if (handle->shouldUseCredentialStorage()) {
     
    830826    ASSERT(d->m_currentWebChallenge.isNull());
    831827
    832 #if ENABLE(CACHE_PARTITIONING)
    833828    String partition = firstRequest().cachePartition();
    834 #else
    835     String partition = emptyString();
    836 #endif
    837829
    838830    // FIXME: Per the specification, the user shouldn't be asked for credentials if there were incorrect ones provided explicitly.
     
    900892    }
    901893
    902 #if ENABLE(CACHE_PARTITIONING)
    903894    String partition = firstRequest().cachePartition();
    904 #else
    905     String partition = emptyString();
    906 #endif
    907895
    908896    if (shouldUseCredentialStorage()) {
  • trunk/Source/WebCore/testing/Internals.cpp

    r211910 r211946  
    564564
    565565    ResourceRequest request(contextDocument()->completeURL(url));
    566 #if ENABLE(CACHE_PARTITIONING)
    567566    request.setDomainForCachePartition(contextDocument()->topOrigin().domainForCachePartition());
    568 #endif
     567   
    569568    CachedResource* resource = MemoryCache::singleton().resourceForRequest(request, contextDocument()->page()->sessionID());
    570569    return resource && resource->status() == CachedResource::Cached;
  • trunk/Source/WebKit/mac/ChangeLog

    r211931 r211946  
     12017-02-09  Antti Koivisto  <antti@apple.com>
     2
     3        Remove most cases of #if ENABLE(CACHE_PARTITIONING)
     4        https://bugs.webkit.org/show_bug.cgi?id=167990
     5
     6        Reviewed by Sam Weinig.
     7
     8        * Misc/WebCache.mm:
     9        (+[WebCache addImageToCache:forURL:forFrame:]):
     10        (+[WebCache removeImageFromCacheForURL:forFrame:]):
     11        * WebCoreSupport/WebSystemInterface.mm:
     12        (InitWebCoreSystemInterface):
     13
    1142017-02-07  Alexey Proskuryakov  <ap@apple.com>
    215
  • trunk/Source/WebKit/mac/Misc/WebCache.mm

    r210923 r211946  
    3535#import <WebCore/CredentialStorage.h>
    3636#import <WebCore/CrossOriginPreflightResultCache.h>
     37#import <WebCore/Document.h>
    3738#import <WebCore/MemoryCache.h>
    3839#import <runtime/InitializeThreading.h>
     
    4950#endif
    5051
    51 #if ENABLE(CACHE_PARTITIONING)
    52 #import <WebCore/Document.h>
    53 #endif
    54 
    5552@implementation WebCache
    5653
     
    169166        return false;
    170167    WebCore::SecurityOrigin* topOrigin = nullptr;
    171 #if ENABLE(CACHE_PARTITIONING)
    172168    if (frame)
    173169        topOrigin = &core(frame)->document()->topOrigin();
    174 #endif
    175170    return WebCore::MemoryCache::singleton().addImageToCache(RetainPtr<CGImageRef>(image), url, topOrigin ? topOrigin->domainForCachePartition() : emptyString());
    176171}
     
    186181        return;
    187182    WebCore::SecurityOrigin* topOrigin = nullptr;
    188 #if ENABLE(CACHE_PARTITIONING)
    189183    if (frame)
    190184        topOrigin = &core(frame)->document()->topOrigin();
    191 #endif
    192185    WebCore::MemoryCache::singleton().removeImageFromCache(url, topOrigin ? topOrigin->domainForCachePartition() : emptyString());
    193186}
  • trunk/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm

    r204568 r211946  
    125125#endif
    126126
    127 #if ENABLE(CACHE_PARTITIONING)
    128127    INIT(CachePartitionKey);
    129 #endif
    130128
    131129    INIT(ExernalDeviceTypeForPlayer);
  • trunk/Source/WebKit2/ChangeLog

    r211929 r211946  
     12017-02-09  Antti Koivisto  <antti@apple.com>
     2
     3        Remove most cases of #if ENABLE(CACHE_PARTITIONING)
     4        https://bugs.webkit.org/show_bug.cgi?id=167990
     5
     6        Reviewed by Sam Weinig.
     7
     8        * NetworkProcess/NetworkResourceLoader.cpp:
     9        (WebKit::NetworkResourceLoader::didRetrieveCacheEntry):
     10        * NetworkProcess/cache/NetworkCache.cpp:
     11        (WebKit::NetworkCache::Cache::makeCacheKey):
     12        * NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp:
     13        (WebKit::NetworkCache::constructRevalidationRequest):
     14        * Shared/WebCoreArgumentCoders.cpp:
     15        (IPC::ArgumentCoder<ResourceRequest>::encode):
     16        (IPC::ArgumentCoder<ResourceRequest>::decode):
     17        * Shared/WebProcessCreationParameters.cpp:
     18        (WebKit::WebProcessCreationParameters::encode):
     19        (WebKit::WebProcessCreationParameters::decode):
     20        * Shared/WebProcessCreationParameters.h:
     21        * UIProcess/API/C/WKContext.cpp:
     22        (WKContextRegisterURLSchemeAsCachePartitioned):
     23        * UIProcess/WebProcessPool.cpp:
     24        (WebKit::m_hiddenPageThrottlingTimer):
     25        (WebKit::WebProcessPool::createNewWebProcess):
     26        (WebKit::WebProcessPool::registerURLSchemeAsCachePartitioned):
     27        * UIProcess/WebProcessPool.h:
     28        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
     29        (InitWebCoreSystemInterface):
     30        * WebProcess/WebProcess.cpp:
     31        (WebKit::WebProcess::initializeWebProcess):
     32        (WebKit::WebProcess::registerURLSchemeAsCachePartitioned):
     33        * WebProcess/WebProcess.h:
     34        * WebProcess/WebProcess.messages.in:
     35
    1362017-02-08  Simon Fraser  <simon.fraser@apple.com>
    237
  • trunk/Source/WebKit2/NetworkProcess/NetworkDataTask.cpp

    r211751 r211946  
    6464    , m_session(session)
    6565    , m_client(&client)
    66 #if ENABLE(CACHE_PARTITIONING)
    6766    , m_partition(requestWithCredentials.cachePartition())
    68 #else
    69     , m_partition(emptyString())
    70 #endif
    7167    , m_storedCredentials(storedCredentials)
    7268    , m_lastHTTPMethod(requestWithCredentials.httpMethod())
  • trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp

    r211894 r211946  
    573573
    574574    if (entry->sourceStorageRecord().bodyHash && !m_parameters.derivedCachedDataTypesToRetrieve.isEmpty()) {
    575 #if ENABLE(CACHE_PARTITIONING)
    576         String partition = originalRequest().cachePartition();
    577 #else
    578         String partition;
    579 #endif
    580575        auto bodyHash = *entry->sourceStorageRecord().bodyHash;
    581576        auto* entryPtr = entry.release();
     
    583578
    584579        for (auto& type : m_parameters.derivedCachedDataTypesToRetrieve) {
    585             NetworkCache::DataKey key { partition, type, bodyHash };
     580            NetworkCache::DataKey key { originalRequest().cachePartition(), type, bodyHash };
    586581            NetworkCache::singleton().retrieveData(key, [loader = makeRef(*this), entryPtr, type, retrieveCount] (const uint8_t* data, size_t size) mutable {
    587582                loader->m_retrievedDerivedDataCount++;
  • trunk/Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp

    r211894 r211946  
    117117Key Cache::makeCacheKey(const WebCore::ResourceRequest& request)
    118118{
    119 #if ENABLE(CACHE_PARTITIONING)
    120     String partition = request.cachePartition();
    121 #else
    122     String partition;
    123 #endif
    124 
    125119    // FIXME: This implements minimal Range header disk cache support. We don't parse
    126120    // ranges so only the same exact range request will be served from the cache.
    127121    String range = request.httpHeaderField(WebCore::HTTPHeaderName::Range);
    128     return { partition, resourceType(), range, request.url().string(), m_storage->salt() };
     122    return { request.cachePartition(), resourceType(), range, request.url().string(), m_storage->salt() };
    129123}
    130124
  • trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheSpeculativeLoadManager.cpp

    r211894 r211946  
    9090    revalidationRequest.setHTTPHeaderFields(subResourceInfo.requestHeaders());
    9191    revalidationRequest.setFirstPartyForCookies(subResourceInfo.firstPartyForCookies());
    92 #if ENABLE(CACHE_PARTITIONING)
    9392    if (!key.partition().isEmpty())
    9493        revalidationRequest.setCachePartition(key.partition());
    95 #endif
    9694    ASSERT_WITH_MESSAGE(key.range().isEmpty(), "range is not supported");
    97 
     95   
    9896    revalidationRequest.makeUnconditional();
    9997    if (entry) {
  • trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp

    r211403 r211946  
    980980void ArgumentCoder<ResourceRequest>::encode(Encoder& encoder, const ResourceRequest& resourceRequest)
    981981{
    982 #if ENABLE(CACHE_PARTITIONING)
    983982    encoder << resourceRequest.cachePartition();
    984 #endif
    985 
    986983    encoder << resourceRequest.hiddenFromInspector();
    987984
     
    997994bool ArgumentCoder<ResourceRequest>::decode(Decoder& decoder, ResourceRequest& resourceRequest)
    998995{
    999 #if ENABLE(CACHE_PARTITIONING)
    1000996    String cachePartition;
    1001997    if (!decoder.decode(cachePartition))
    1002998        return false;
    1003999    resourceRequest.setCachePartition(cachePartition);
    1004 #endif
    10051000
    10061001    bool isHiddenFromInspector;
  • trunk/Source/WebKit2/Shared/WebProcessCreationParameters.cpp

    r211470 r211946  
    9292    encoder << urlSchemesRegisteredAsCORSEnabled;
    9393    encoder << urlSchemesRegisteredAsAlwaysRevalidated;
    94 #if ENABLE(CACHE_PARTITIONING)
    9594    encoder << urlSchemesRegisteredAsCachePartitioned;
    96 #endif
    9795    encoder.encodeEnum(cacheModel);
    9896    encoder << shouldAlwaysUseComplexTextCodePath;
     
    222220    if (!decoder.decode(parameters.urlSchemesRegisteredAsAlwaysRevalidated))
    223221        return false;
    224 #if ENABLE(CACHE_PARTITIONING)
    225222    if (!decoder.decode(parameters.urlSchemesRegisteredAsCachePartitioned))
    226223        return false;
    227 #endif
    228224    if (!decoder.decodeEnum(parameters.cacheModel))
    229225        return false;
  • trunk/Source/WebKit2/Shared/WebProcessCreationParameters.h

    r211470 r211946  
    101101    Vector<String> urlSchemesRegisteredAsCORSEnabled;
    102102    Vector<String> urlSchemesRegisteredAsAlwaysRevalidated;
    103 #if ENABLE(CACHE_PARTITIONING)
    104103    Vector<String> urlSchemesRegisteredAsCachePartitioned;
    105 #endif
    106104
    107105    CacheModel cacheModel;
  • trunk/Source/WebKit2/UIProcess/API/C/WKContext.cpp

    r209840 r211946  
    380380void WKContextRegisterURLSchemeAsCachePartitioned(WKContextRef contextRef, WKStringRef urlScheme)
    381381{
    382 #if ENABLE(CACHE_PARTITIONING)
    383382    toImpl(contextRef)->registerURLSchemeAsCachePartitioned(toImpl(urlScheme)->string());
    384 #else
    385     UNUSED_PARAM(contextRef);
    386     UNUSED_PARAM(urlScheme);
    387 #endif
    388383}
    389384
  • trunk/Source/WebKit2/UIProcess/WebProcessPool.cpp

    r211470 r211946  
    188188        m_schemesToRegisterAsAlwaysRevalidated.add(scheme);
    189189
    190 #if ENABLE(CACHE_PARTITIONING)
    191190    for (const auto& urlScheme : m_configuration->cachePartitionedURLSchemes())
    192191        m_schemesToRegisterAsCachePartitioned.add(urlScheme);
    193 #endif
    194192
    195193    platformInitialize();
     
    597595    copyToVector(m_schemesToRegisterAsCORSEnabled, parameters.urlSchemesRegisteredAsCORSEnabled);
    598596    copyToVector(m_schemesToRegisterAsAlwaysRevalidated, parameters.urlSchemesRegisteredAsAlwaysRevalidated);
    599 #if ENABLE(CACHE_PARTITIONING)
    600597    copyToVector(m_schemesToRegisterAsCachePartitioned, parameters.urlSchemesRegisteredAsCachePartitioned);
    601 #endif
    602598
    603599    parameters.shouldAlwaysUseComplexTextCodePath = m_alwaysUsesComplexTextCodePath;
     
    10051001}
    10061002
    1007 #if ENABLE(CACHE_PARTITIONING)
    10081003void WebProcessPool::registerURLSchemeAsCachePartitioned(const String& urlScheme)
    10091004{
     
    10111006    sendToAllProcesses(Messages::WebProcess::RegisterURLSchemeAsCachePartitioned(urlScheme));
    10121007}
    1013 #endif
    10141008
    10151009void WebProcessPool::setCacheModel(CacheModel cacheModel)
  • trunk/Source/WebKit2/UIProcess/WebProcessPool.h

    r210936 r211946  
    211211    void registerURLSchemeAsDisplayIsolated(const String&);
    212212    void registerURLSchemeAsCORSEnabled(const String&);
    213 #if ENABLE(CACHE_PARTITIONING)
    214213    void registerURLSchemeAsCachePartitioned(const String&);
    215 #endif
    216214
    217215    VisitedLinkStore& visitedLinkStore() { return m_visitedLinkStore.get(); }
     
    500498    HashSet<String> m_schemesToRegisterAsCORSEnabled;
    501499    HashSet<String> m_schemesToRegisterAsAlwaysRevalidated;
    502 #if ENABLE(CACHE_PARTITIONING)
    503500    HashSet<String> m_schemesToRegisterAsCachePartitioned;
    504 #endif
    505501
    506502    bool m_alwaysUsesComplexTextCodePath;
  • trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp

    r211751 r211946  
    15901590bool PluginView::getAuthenticationInfo(const ProtectionSpace& protectionSpace, String& username, String& password)
    15911591{
    1592 #if ENABLE(CACHE_PARTITIONING)
    15931592    String partitionName = m_pluginElement->contentDocument()->topDocument().securityOrigin().domainForCachePartition();
    1594 #else
    1595     String partitionName = emptyString();
    1596 #endif
    15971593    Credential credential = CredentialStorage::defaultCredentialStorage().get(partitionName, protectionSpace);
    15981594    if (credential.isEmpty())
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebSystemInterface.mm

    r204568 r211946  
    112112#endif
    113113
    114 #if ENABLE(CACHE_PARTITIONING)
    115114        INIT(CachePartitionKey);
    116 #endif
    117115
    118116        INIT(ExernalDeviceTypeForPlayer);
  • trunk/Source/WebKit2/WebProcess/WebProcess.cpp

    r211747 r211946  
    338338        registerURLSchemeAsAlwaysRevalidated(scheme);
    339339
    340 #if ENABLE(CACHE_PARTITIONING)
    341340    for (auto& scheme : parameters.urlSchemesRegisteredAsCachePartitioned)
    342341        registerURLSchemeAsCachePartitioned(scheme);
    343 #endif
    344342
    345343    setDefaultRequestTimeoutInterval(parameters.defaultRequestTimeoutInterval);
     
    463461}
    464462
    465 #if ENABLE(CACHE_PARTITIONING)
    466463void WebProcess::registerURLSchemeAsCachePartitioned(const String& urlScheme) const
    467464{
    468465    SchemeRegistry::registerURLSchemeAsCachePartitioned(urlScheme);
    469466}
    470 #endif
    471467
    472468void WebProcess::setDefaultRequestTimeoutInterval(double timeoutInterval)
  • trunk/Source/WebKit2/WebProcess/WebProcess.h

    r211747 r211946  
    258258    void registerURLSchemeAsCORSEnabled(const String&) const;
    259259    void registerURLSchemeAsAlwaysRevalidated(const String&) const;
    260 #if ENABLE(CACHE_PARTITIONING)
    261260    void registerURLSchemeAsCachePartitioned(const String&) const;
    262 #endif
    263261    void setDefaultRequestTimeoutInterval(double);
    264262    void setAlwaysUsesComplexTextCodePath(bool);
  • trunk/Source/WebKit2/WebProcess/WebProcess.messages.in

    r210921 r211946  
    3737    RegisterURLSchemeAsDisplayIsolated(String scheme)
    3838    RegisterURLSchemeAsCORSEnabled(String scheme)
    39 #if ENABLE(CACHE_PARTITIONING)
    4039    RegisterURLSchemeAsCachePartitioned(String scheme)
    41 #endif
    4240    SetDefaultRequestTimeoutInterval(double timeoutInterval)
    4341    SetAlwaysUsesComplexTextCodePath(bool alwaysUseComplexText)
Note: See TracChangeset for help on using the changeset viewer.