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

Side by Side Diff: third_party/WebKit/Source/platform/loader/fetch/ResourceLoader.h

Issue 2527353002: Phase II Step 3: Reload LoFi/placeholder images via new ImageResource
Patch Set: Use startLoad() again to avoid re-applying modifications to ResourceRequest on reload Created 3 years, 9 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) 2005, 2006, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2006, 2011 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 void didDownloadData(int, int) override; 101 void didDownloadData(int, int) override;
102 void didFinishLoading(double finishTime, 102 void didFinishLoading(double finishTime,
103 int64_t encodedDataLength, 103 int64_t encodedDataLength,
104 int64_t encodedBodyLength) override; 104 int64_t encodedBodyLength) override;
105 void didFail(const WebURLError&, 105 void didFail(const WebURLError&,
106 int64_t encodedDataLength, 106 int64_t encodedDataLength,
107 int64_t encodedBodyLength) override; 107 int64_t encodedBodyLength) override;
108 void handleError(const ResourceError&); 108 void handleError(const ResourceError&);
109 109
110 void didFinishLoadingFirstPartInMultipart(); 110 void didFinishLoadingFirstPartInMultipart();
111 void reloadIfLoFiOrPlaceholderImage(Resource*);
111 112
112 private: 113 private:
113 // Assumes ResourceFetcher and Resource are non-null. 114 // Assumes ResourceFetcher and Resource are non-null.
114 ResourceLoader(ResourceFetcher*, Resource*); 115 ResourceLoader(ResourceFetcher*, Resource*);
115 116
116 // This method is currently only used for service worker fallback request and 117 // This method is currently only used for service worker fallback request and
117 // cache-aware loading, other users should be careful not to break 118 // cache-aware loading, other users should be careful not to break
118 // ResourceLoader state. 119 // ResourceLoader state.
119 void restart(const ResourceRequest&); 120 void restart(const ResourceRequest&);
120 121
121 FetchContext& context() const; 122 FetchContext& context() const;
122 ResourceRequestBlockedReason canAccessResponse(Resource*, 123 ResourceRequestBlockedReason canAccessResponse(Resource*,
123 const ResourceResponse&) const; 124 const ResourceResponse&) const;
124 125
125 void cancelForRedirectAccessCheckError(const KURL&, 126 void cancelForRedirectAccessCheckError(const KURL&,
126 ResourceRequestBlockedReason); 127 ResourceRequestBlockedReason);
127 void requestSynchronously(const ResourceRequest&); 128 void requestSynchronously(const ResourceRequest&);
128 void dispose(); 129 void dispose();
129 130
130 std::unique_ptr<WebURLLoader> m_loader; 131 std::unique_ptr<WebURLLoader> m_loader;
131 Member<ResourceFetcher> m_fetcher; 132 Member<ResourceFetcher> m_fetcher;
132 Member<Resource> m_resource; 133 Member<Resource> m_resource;
133 bool m_isCacheAwareLoadingActivated; 134 bool m_isCacheAwareLoadingActivated;
134 }; 135 };
135 136
136 } // namespace blink 137 } // namespace blink
137 138
138 #endif 139 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698