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

Side by Side Diff: third_party/WebKit/Source/core/loader/FrameFetchContext.h

Issue 2284683002: PlzNavigate: support upgrade-insecure-navigation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 3 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 25 matching lines...) Expand all
36 #include "core/fetch/ResourceFetcher.h" 36 #include "core/fetch/ResourceFetcher.h"
37 #include "core/frame/csp/ContentSecurityPolicy.h" 37 #include "core/frame/csp/ContentSecurityPolicy.h"
38 #include "core/loader/LinkLoader.h" 38 #include "core/loader/LinkLoader.h"
39 #include "platform/heap/Handle.h" 39 #include "platform/heap/Handle.h"
40 #include "platform/network/ResourceRequest.h" 40 #include "platform/network/ResourceRequest.h"
41 41
42 namespace blink { 42 namespace blink {
43 43
44 class Document; 44 class Document;
45 class DocumentLoader; 45 class DocumentLoader;
46 class FrameLoader;
46 class LocalFrame; 47 class LocalFrame;
47 class ResourceError; 48 class ResourceError;
48 class ResourceLoader; 49 class ResourceLoader;
49 class ResourceResponse; 50 class ResourceResponse;
50 class ResourceRequest; 51 class ResourceRequest;
51 52
52 class CORE_EXPORT FrameFetchContext final : public FetchContext { 53 class CORE_EXPORT FrameFetchContext final : public FetchContext {
53 public: 54 public:
54 static ResourceFetcher* createContextAndFetcher(DocumentLoader* loader, Docu ment* document) 55 static ResourceFetcher* createContextAndFetcher(DocumentLoader* loader, Docu ment* document)
55 { 56 {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 int64_t serviceWorkerID() const override; 93 int64_t serviceWorkerID() const override;
93 94
94 bool isMainFrame() const override; 95 bool isMainFrame() const override;
95 bool defersLoading() const override; 96 bool defersLoading() const override;
96 bool isLoadComplete() const override; 97 bool isLoadComplete() const override;
97 bool pageDismissalEventBeingDispatched() const override; 98 bool pageDismissalEventBeingDispatched() const override;
98 bool updateTimingInfoForIFrameNavigation(ResourceTimingInfo*) override; 99 bool updateTimingInfoForIFrameNavigation(ResourceTimingInfo*) override;
99 void sendImagePing(const KURL&) override; 100 void sendImagePing(const KURL&) override;
100 void addConsoleMessage(const String&) const override; 101 void addConsoleMessage(const String&) const override;
101 SecurityOrigin* getSecurityOrigin() const override; 102 SecurityOrigin* getSecurityOrigin() const override;
103 static void upgradeInsecureRequest(ResourceRequest&, Document*, FrameLoader* );
102 void upgradeInsecureRequest(ResourceRequest&) override; 104 void upgradeInsecureRequest(ResourceRequest&) override;
103 void addClientHintsIfNecessary(FetchRequest&) override; 105 void addClientHintsIfNecessary(FetchRequest&) override;
104 void addCSPHeaderIfNecessary(Resource::Type, FetchRequest&) override; 106 void addCSPHeaderIfNecessary(Resource::Type, FetchRequest&) override;
105 void populateRequestData(ResourceRequest&) override; 107 void populateRequestData(ResourceRequest&) override;
106 108
107 MHTMLArchive* archive() const override; 109 MHTMLArchive* archive() const override;
108 110
109 ResourceLoadPriority modifyPriorityForExperiments(ResourceLoadPriority) over ride; 111 ResourceLoadPriority modifyPriorityForExperiments(ResourceLoadPriority) over ride;
110 112
111 void countClientHintsDPR() override; 113 void countClientHintsDPR() override;
112 void countClientHintsResourceWidth() override; 114 void countClientHintsResourceWidth() override;
113 void countClientHintsViewportWidth() override; 115 void countClientHintsViewportWidth() override;
114 116
115 WebTaskRunner* loadingTaskRunner() const override; 117 WebTaskRunner* loadingTaskRunner() const override;
116 118
117 DECLARE_VIRTUAL_TRACE(); 119 DECLARE_VIRTUAL_TRACE();
118 120
119 private: 121 private:
120 explicit FrameFetchContext(DocumentLoader*, Document*); 122 explicit FrameFetchContext(DocumentLoader*, Document*);
121 inline DocumentLoader* masterDocumentLoader() const; 123 inline DocumentLoader* masterDocumentLoader() const;
122 124
123 LocalFrame* frame() const; // Can be null 125 LocalFrame* frame() const; // Can be null
arthursonzogni 2016/08/29 08:37:22 Because in the definition, there is an "ASSERT(fra
124 void printAccessDeniedMessage(const KURL&) const; 126 void printAccessDeniedMessage(const KURL&) const;
125 ResourceRequestBlockedReason canRequestInternal(Resource::Type, const Resour ceRequest&, const KURL&, const ResourceLoaderOptions&, bool forPreload, FetchReq uest::OriginRestriction, ResourceRequest::RedirectStatus) const; 127 ResourceRequestBlockedReason canRequestInternal(Resource::Type, const Resour ceRequest&, const KURL&, const ResourceLoaderOptions&, bool forPreload, FetchReq uest::OriginRestriction, ResourceRequest::RedirectStatus) const;
126 128
127 void prepareRequest(ResourceRequest&); 129 void prepareRequest(ResourceRequest&);
128 130
129 void dispatchDidReceiveResponseInternal(unsigned long identifier, const Reso urceResponse&, WebURLRequest::FrameType, WebURLRequest::RequestContext, Resource *, LinkLoader::CanLoadResources); 131 void dispatchDidReceiveResponseInternal(unsigned long identifier, const Reso urceResponse&, WebURLRequest::FrameType, WebURLRequest::RequestContext, Resource *, LinkLoader::CanLoadResources);
130 132
131 // FIXME: Oilpan: Ideally this should just be a traced Member but that will 133 // FIXME: Oilpan: Ideally this should just be a traced Member but that will
132 // currently leak because ComputedStyle and its data are not on the heap. 134 // currently leak because ComputedStyle and its data are not on the heap.
133 // See crbug.com/383860 for details. 135 // See crbug.com/383860 for details.
134 WeakMember<Document> m_document; 136 WeakMember<Document> m_document;
135 Member<DocumentLoader> m_documentLoader; 137 Member<DocumentLoader> m_documentLoader;
136 }; 138 };
137 139
138 } // namespace blink 140 } // namespace blink
139 141
140 #endif 142 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698