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

Side by Side Diff: Source/core/fetch/ResourceFetcher.cpp

Issue 439223005: Resources restored from CSS cache should be able to trigger InsecureContent messages (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 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/core/fetch/ResourceFetcher.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) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ 6 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/
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 1173 matching lines...) Expand 10 before | Expand all | Expand 10 after
1184 StringVector resourcesToDelete; 1184 StringVector resourcesToDelete;
1185 1185
1186 for (DocumentResourceMap::iterator it = m_documentResources.begin(); it != m _documentResources.end(); ++it) { 1186 for (DocumentResourceMap::iterator it = m_documentResources.begin(); it != m _documentResources.end(); ++it) {
1187 if (it->value->hasOneHandle()) 1187 if (it->value->hasOneHandle())
1188 resourcesToDelete.append(it->key); 1188 resourcesToDelete.append(it->key);
1189 } 1189 }
1190 1190
1191 m_documentResources.removeAll(resourcesToDelete); 1191 m_documentResources.removeAll(resourcesToDelete);
1192 } 1192 }
1193 1193
1194 void ResourceFetcher::maybeNotifyInsecureContent(const Resource* resource) const
Mike West 2014/08/19 13:34:13 1. Why break this one-line call out into a separat
1195 {
1196 // As a side effect browser will be notified.
1197 checkInsecureContent(resource->type(), resource->lastResourceRequest().url() , resource->options().mixedContentBlockingTreatment);
1198 }
1199
1194 void ResourceFetcher::notifyLoadedFromMemoryCache(Resource* resource) 1200 void ResourceFetcher::notifyLoadedFromMemoryCache(Resource* resource)
1195 { 1201 {
1202 maybeNotifyInsecureContent(resource);
1196 if (!frame() || !frame()->page() || resource->status() != Resource::Cached | | m_validatedURLs.contains(resource->url())) 1203 if (!frame() || !frame()->page() || resource->status() != Resource::Cached | | m_validatedURLs.contains(resource->url()))
1197 return; 1204 return;
1198 1205
1199 ResourceRequest request(resource->url()); 1206 ResourceRequest request(resource->url());
1200 unsigned long identifier = createUniqueIdentifier(); 1207 unsigned long identifier = createUniqueIdentifier();
1201 context().dispatchDidLoadResourceFromMemoryCache(request, resource->response ()); 1208 context().dispatchDidLoadResourceFromMemoryCache(request, resource->response ());
1202 // FIXME: If willSendRequest changes the request, we don't respect it. 1209 // FIXME: If willSendRequest changes the request, we don't respect it.
1203 willSendRequest(identifier, request, ResourceResponse(), resource->options() .initiatorInfo); 1210 willSendRequest(identifier, request, ResourceResponse(), resource->options() .initiatorInfo);
1204 InspectorInstrumentation::markResourceAsCached(frame()->page(), identifier); 1211 InspectorInstrumentation::markResourceAsCached(frame()->page(), identifier);
1205 context().sendRemainingDelegateMessages(m_documentLoader, identifier, resour ce->response(), resource->encodedSize()); 1212 context().sendRemainingDelegateMessages(m_documentLoader, identifier, resour ce->response(), resource->encodedSize());
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
1539 1546
1540 void ResourceFetcher::trace(Visitor* visitor) 1547 void ResourceFetcher::trace(Visitor* visitor)
1541 { 1548 {
1542 visitor->trace(m_document); 1549 visitor->trace(m_document);
1543 visitor->trace(m_loaders); 1550 visitor->trace(m_loaders);
1544 visitor->trace(m_multipartLoaders); 1551 visitor->trace(m_multipartLoaders);
1545 ResourceLoaderHost::trace(visitor); 1552 ResourceLoaderHost::trace(visitor);
1546 } 1553 }
1547 1554
1548 } 1555 }
OLDNEW
« no previous file with comments | « Source/core/fetch/ResourceFetcher.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698