Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Side by Side Diff: third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp

Issue 2389753002: doc.write blocking intervention warning header (Closed)
Patch Set: Feedback incorporated Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de)
3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org)
4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org)
5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ 6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/
7 7
8 This library is free software; you can redistribute it and/or 8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Library General Public 9 modify it under the terms of the GNU Library General Public
10 License as published by the Free Software Foundation; either 10 License as published by the Free Software Foundation; either
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 617
618 void ResourceFetcher::determineRequestContext(ResourceRequest& request, 618 void ResourceFetcher::determineRequestContext(ResourceRequest& request,
619 Resource::Type type) { 619 Resource::Type type) {
620 determineRequestContext(request, type, context().isMainFrame()); 620 determineRequestContext(request, type, context().isMainFrame());
621 } 621 }
622 622
623 void ResourceFetcher::initializeResourceRequest( 623 void ResourceFetcher::initializeResourceRequest(
624 ResourceRequest& request, 624 ResourceRequest& request,
625 Resource::Type type, 625 Resource::Type type,
626 FetchRequest::DeferOption defer) { 626 FetchRequest::DeferOption defer) {
627 if (request.getCachePolicy() == WebCachePolicy::UseProtocolCachePolicy) 627 if (request.getCachePolicy() == WebCachePolicy::UseProtocolCachePolicy) {
628 request.setCachePolicy( 628 request.setCachePolicy(
629 context().resourceRequestCachePolicy(request, type, defer)); 629 context().resourceRequestCachePolicy(request, type, defer));
630 }
630 if (request.requestContext() == WebURLRequest::RequestContextUnspecified) 631 if (request.requestContext() == WebURLRequest::RequestContextUnspecified)
631 determineRequestContext(request, type); 632 determineRequestContext(request, type);
632 if (type == Resource::LinkPrefetch) 633 if (type == Resource::LinkPrefetch)
633 request.setHTTPHeaderField(HTTPNames::Purpose, "prefetch"); 634 request.setHTTPHeaderField(HTTPNames::Purpose, "prefetch");
634 635
635 context().addAdditionalRequestHeaders( 636 context().addAdditionalRequestHeaders(
636 request, 637 request,
637 (type == Resource::MainResource) ? FetchMainResource : FetchSubresource); 638 (type == Resource::MainResource) ? FetchMainResource : FetchSubresource);
638 } 639 }
639 640
(...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after
1556 visitor->trace(m_context); 1557 visitor->trace(m_context);
1557 visitor->trace(m_archive); 1558 visitor->trace(m_archive);
1558 visitor->trace(m_loaders); 1559 visitor->trace(m_loaders);
1559 visitor->trace(m_nonBlockingLoaders); 1560 visitor->trace(m_nonBlockingLoaders);
1560 visitor->trace(m_documentResources); 1561 visitor->trace(m_documentResources);
1561 visitor->trace(m_preloads); 1562 visitor->trace(m_preloads);
1562 visitor->trace(m_resourceTimingInfoMap); 1563 visitor->trace(m_resourceTimingInfoMap);
1563 } 1564 }
1564 1565
1565 } // namespace blink 1566 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/fetch/FetchContext.cpp ('k') | third_party/WebKit/Source/core/loader/FrameFetchContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698