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

Side by Side Diff: Source/WebCore/loader/cache/CachedResourceRequest.cpp

Issue 8002026: Merge 95580 - Invoke CachedResourceLoader::canRequest for all URLs in a redirect chain (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/874/
Patch Set: Created 9 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
« no previous file with comments | « Source/WebCore/loader/cache/CachedResourceLoader.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) 2006 Samuel Weinig (sam.weinig@gmail.com) 5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
6 Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 memoryCache()->revalidationFailed(resource); 132 memoryCache()->revalidationFailed(resource);
133 resource->error(CachedResource::LoadError); 133 resource->error(CachedResource::LoadError);
134 return PassOwnPtr<CachedResourceRequest>(nullptr); 134 return PassOwnPtr<CachedResourceRequest>(nullptr);
135 } 135 }
136 request->m_loader = loader; 136 request->m_loader = loader;
137 return request.release(); 137 return request.release();
138 } 138 }
139 139
140 void CachedResourceRequest::willSendRequest(SubresourceLoader* loader, ResourceR equest& req, const ResourceResponse&) 140 void CachedResourceRequest::willSendRequest(SubresourceLoader* loader, ResourceR equest& req, const ResourceResponse&)
141 { 141 {
142 if (!m_cachedResourceLoader->checkInsecureContent(m_resource->type(), req.ur l())) { 142 if (!m_cachedResourceLoader->canRequest(m_resource->type(), req.url())) {
143 loader->cancel(); 143 loader->cancel();
144 return; 144 return;
145 } 145 }
146 m_resource->setRequestedFromNetworkingLayer(); 146 m_resource->setRequestedFromNetworkingLayer();
147 } 147 }
148 148
149 void CachedResourceRequest::didFinishLoading(SubresourceLoader* loader, double) 149 void CachedResourceRequest::didFinishLoading(SubresourceLoader* loader, double)
150 { 150 {
151 if (m_finishing) 151 if (m_finishing)
152 return; 152 return;
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 m_resource->setSerializedCachedMetadata(data, size); 281 m_resource->setSerializedCachedMetadata(data, size);
282 } 282 }
283 283
284 void CachedResourceRequest::end() 284 void CachedResourceRequest::end()
285 { 285 {
286 m_cachedResourceLoader->loadDone(); 286 m_cachedResourceLoader->loadDone();
287 m_resource->stopLoading(); 287 m_resource->stopLoading();
288 } 288 }
289 289
290 } //namespace WebCore 290 } //namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/loader/cache/CachedResourceLoader.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698