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

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

Issue 8037034: Merge 95580 - Invoke CachedResourceLoader::canRequest for all URLs in a redirect chain (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/835/
Patch Set: Created 9 years, 2 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 memoryCache()->revalidationFailed(resource); 129 memoryCache()->revalidationFailed(resource);
130 resource->error(CachedResource::LoadError); 130 resource->error(CachedResource::LoadError);
131 return PassOwnPtr<CachedResourceRequest>(nullptr); 131 return PassOwnPtr<CachedResourceRequest>(nullptr);
132 } 132 }
133 request->m_loader = loader; 133 request->m_loader = loader;
134 return request.release(); 134 return request.release();
135 } 135 }
136 136
137 void CachedResourceRequest::willSendRequest(SubresourceLoader* loader, ResourceR equest& req, const ResourceResponse&) 137 void CachedResourceRequest::willSendRequest(SubresourceLoader* loader, ResourceR equest& req, const ResourceResponse&)
138 { 138 {
139 if (!m_cachedResourceLoader->checkInsecureContent(m_resource->type(), req.ur l())) { 139 if (!m_cachedResourceLoader->canRequest(m_resource->type(), req.url())) {
140 loader->cancel(); 140 loader->cancel();
141 return; 141 return;
142 } 142 }
143 m_resource->setRequestedFromNetworkingLayer(); 143 m_resource->setRequestedFromNetworkingLayer();
144 } 144 }
145 145
146 void CachedResourceRequest::didFinishLoading(SubresourceLoader* loader, double) 146 void CachedResourceRequest::didFinishLoading(SubresourceLoader* loader, double)
147 { 147 {
148 if (m_finishing) 148 if (m_finishing)
149 return; 149 return;
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 m_resource->setSerializedCachedMetadata(data, size); 278 m_resource->setSerializedCachedMetadata(data, size);
279 } 279 }
280 280
281 void CachedResourceRequest::end() 281 void CachedResourceRequest::end()
282 { 282 {
283 m_cachedResourceLoader->loadDone(); 283 m_cachedResourceLoader->loadDone();
284 m_resource->stopLoading(); 284 m_resource->stopLoading();
285 } 285 }
286 286
287 } //namespace WebCore 287 } //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