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

Side by Side Diff: third_party/WebKit/Source/core/loader/resource/LinkFetchResource.cpp

Issue 2855163002: Avoid sending mixed-content requests for ImageSet contexts (Closed)
Patch Set: Better check and a test Created 3 years, 7 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/loader/resource/LinkFetchResource.h" 5 #include "core/loader/resource/LinkFetchResource.h"
6 6
7 #include "platform/loader/fetch/FetchParameters.h" 7 #include "platform/loader/fetch/FetchParameters.h"
8 #include "platform/loader/fetch/ResourceFetcher.h" 8 #include "platform/loader/fetch/ResourceFetcher.h"
9 9
10 namespace blink { 10 namespace blink {
11 11
12 Resource* LinkFetchResource::Fetch(Resource::Type type, 12 Resource* LinkFetchResource::Fetch(Resource::Type type,
13 FetchParameters& params, 13 FetchParameters& params,
14 ResourceFetcher* fetcher) { 14 ResourceFetcher* fetcher) {
15 DCHECK_EQ(type, kLinkPrefetch); 15 DCHECK_EQ(type, kLinkPrefetch);
16 DCHECK_EQ(params.GetResourceRequest().GetFrameType(), 16 DCHECK_EQ(params.GetResourceRequest().GetFrameType(),
17 WebURLRequest::kFrameTypeNone); 17 WebURLRequest::kFrameTypeNone);
18 params.SetRequestContext(fetcher->DetermineRequestContext(type)); 18 params.SetRequestContext(fetcher->DetermineRequestContext(
19 type, ResourceFetcher::kImageNotImageSet));
19 return fetcher->RequestResource(params, LinkResourceFactory(type)); 20 return fetcher->RequestResource(params, LinkResourceFactory(type));
20 } 21 }
21 22
22 LinkFetchResource::LinkFetchResource(const ResourceRequest& request, 23 LinkFetchResource::LinkFetchResource(const ResourceRequest& request,
23 Type type, 24 Type type,
24 const ResourceLoaderOptions& options) 25 const ResourceLoaderOptions& options)
25 : Resource(request, type, options) {} 26 : Resource(request, type, options) {}
26 27
27 LinkFetchResource::~LinkFetchResource() {} 28 LinkFetchResource::~LinkFetchResource() {}
28 29
29 } // namespace blink 30 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698