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

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

Issue 2165653004: Don't wait for AppCache for link rel preloads (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Dont parse / do more initialization than necessary for media link preload headers Created 4 years, 5 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) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2011 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 23 matching lines...) Expand all
34 #include "core/dom/ViewportDescription.h" 34 #include "core/dom/ViewportDescription.h"
35 #include "core/dom/WeakIdentifierMap.h" 35 #include "core/dom/WeakIdentifierMap.h"
36 #include "core/fetch/ClientHintsPreferences.h" 36 #include "core/fetch/ClientHintsPreferences.h"
37 #include "core/fetch/RawResource.h" 37 #include "core/fetch/RawResource.h"
38 #include "core/fetch/ResourceLoaderOptions.h" 38 #include "core/fetch/ResourceLoaderOptions.h"
39 #include "core/fetch/SubstituteData.h" 39 #include "core/fetch/SubstituteData.h"
40 #include "core/frame/csp/ContentSecurityPolicy.h" 40 #include "core/frame/csp/ContentSecurityPolicy.h"
41 #include "core/loader/DocumentLoadTiming.h" 41 #include "core/loader/DocumentLoadTiming.h"
42 #include "core/loader/DocumentWriter.h" 42 #include "core/loader/DocumentWriter.h"
43 #include "core/loader/FrameLoaderTypes.h" 43 #include "core/loader/FrameLoaderTypes.h"
44 #include "core/loader/LinkLoader.h"
44 #include "core/loader/NavigationPolicy.h" 45 #include "core/loader/NavigationPolicy.h"
45 #include "platform/SharedBuffer.h" 46 #include "platform/SharedBuffer.h"
46 #include "platform/network/ResourceError.h" 47 #include "platform/network/ResourceError.h"
47 #include "platform/network/ResourceRequest.h" 48 #include "platform/network/ResourceRequest.h"
48 #include "platform/network/ResourceResponse.h" 49 #include "platform/network/ResourceResponse.h"
49 #include "public/platform/WebLoadingBehaviorFlag.h" 50 #include "public/platform/WebLoadingBehaviorFlag.h"
50 #include "wtf/HashSet.h" 51 #include "wtf/HashSet.h"
51 #include "wtf/RefPtr.h" 52 #include "wtf/RefPtr.h"
52 #include <memory> 53 #include <memory>
53 54
54 namespace blink { 55 namespace blink {
55 56
56 class ApplicationCacheHost; 57 class ApplicationCacheHost;
57 class ResourceFetcher; 58 class ResourceFetcher;
58 class DocumentInit; 59 class DocumentInit;
59 class LocalFrame; 60 class LocalFrame;
60 class FrameLoader; 61 class FrameLoader;
61 class ResourceLoader; 62 class ResourceLoader;
62 class WebDocumentSubresourceFilter; 63 class WebDocumentSubresourceFilter;
64 struct ViewportDescriptionWrapper;
63 65
64 class CORE_EXPORT DocumentLoader : public GarbageCollectedFinalized<DocumentLoad er>, private RawResourceClient { 66 class CORE_EXPORT DocumentLoader : public GarbageCollectedFinalized<DocumentLoad er>, private RawResourceClient {
65 public: 67 public:
66 static DocumentLoader* create(LocalFrame* frame, const ResourceRequest& requ est, const SubstituteData& data) 68 static DocumentLoader* create(LocalFrame* frame, const ResourceRequest& requ est, const SubstituteData& data)
67 { 69 {
68 return new DocumentLoader(frame, request, data); 70 return new DocumentLoader(frame, request, data);
69 } 71 }
70 ~DocumentLoader() override; 72 ~DocumentLoader() override;
71 73
72 LocalFrame* frame() const { return m_frame; } 74 LocalFrame* frame() const { return m_frame; }
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 } 141 }
140 142
141 bool wasScrolledByUser; 143 bool wasScrolledByUser;
142 bool didRestoreFromHistory; 144 bool didRestoreFromHistory;
143 }; 145 };
144 InitialScrollState& initialScrollState() { return m_initialScrollState; } 146 InitialScrollState& initialScrollState() { return m_initialScrollState; }
145 147
146 void setWasBlockedAfterXFrameOptionsOrCSP() { m_wasBlockedAfterXFrameOptions OrCSP = true; } 148 void setWasBlockedAfterXFrameOptionsOrCSP() { m_wasBlockedAfterXFrameOptions OrCSP = true; }
147 bool wasBlockedAfterXFrameOptionsOrCSP() { return m_wasBlockedAfterXFrameOpt ionsOrCSP; } 149 bool wasBlockedAfterXFrameOptionsOrCSP() { return m_wasBlockedAfterXFrameOpt ionsOrCSP; }
148 150
151 void dispatchLinkHeaderPreloads(ViewportDescriptionWrapper*, LinkLoader::Med iaPreloadPolicy);
152
149 Resource* startPreload(Resource::Type, FetchRequest&); 153 Resource* startPreload(Resource::Type, FetchRequest&);
150 154
151 DECLARE_VIRTUAL_TRACE(); 155 DECLARE_VIRTUAL_TRACE();
152 156
153 protected: 157 protected:
154 DocumentLoader(LocalFrame*, const ResourceRequest&, const SubstituteData&); 158 DocumentLoader(LocalFrame*, const ResourceRequest&, const SubstituteData&);
155 159
156 Vector<KURL> m_redirectChain; 160 Vector<KURL> m_redirectChain;
157 161
158 private: 162 private:
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 // Used to protect against reentrancy into dataReceived(). 241 // Used to protect against reentrancy into dataReceived().
238 bool m_inDataReceived; 242 bool m_inDataReceived;
239 RefPtr<SharedBuffer> m_dataBuffer; 243 RefPtr<SharedBuffer> m_dataBuffer;
240 }; 244 };
241 245
242 DECLARE_WEAK_IDENTIFIER_MAP(DocumentLoader); 246 DECLARE_WEAK_IDENTIFIER_MAP(DocumentLoader);
243 247
244 } // namespace blink 248 } // namespace blink
245 249
246 #endif // DocumentLoader_h 250 #endif // DocumentLoader_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698