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

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: adjust shouldBlockFetch call to current code Created 6 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/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 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
623 { 623 {
624 if (FetchRequest::DeferredByClient == request.defer()) 624 if (FetchRequest::DeferredByClient == request.defer())
625 return false; 625 return false;
626 if (policy != Use) 626 if (policy != Use)
627 return true; 627 return true;
628 if (resource->stillNeedsLoad()) 628 if (resource->stillNeedsLoad())
629 return true; 629 return true;
630 return request.options().synchronousPolicy == RequestSynchronously && resour ce->isLoading(); 630 return request.options().synchronousPolicy == RequestSynchronously && resour ce->isLoading();
631 } 631 }
632 632
633 void ResourceFetcher::maybeNotifyInsecureContent(const Resource* resource) const
634 {
635 // As a side effect browser will be notified.
636 MixedContentChecker::shouldBlockFetch(frame(),
637 resource->lastResourceRequest(),
638 resource->lastResourceRequest().url()) ;
639 }
640
633 void ResourceFetcher::requestLoadStarted(Resource* resource, const FetchRequest& request, ResourceLoadStartType type) 641 void ResourceFetcher::requestLoadStarted(Resource* resource, const FetchRequest& request, ResourceLoadStartType type)
634 { 642 {
635 if (type == ResourceLoadingFromCache) 643 if (type == ResourceLoadingFromCache)
636 notifyLoadedFromMemoryCache(resource); 644 notifyLoadedFromMemoryCache(resource);
637 645
638 if (request.resourceRequest().url().protocolIsData() || (m_documentLoader && m_documentLoader->substituteData().isValid())) 646 if (request.resourceRequest().url().protocolIsData() || (m_documentLoader && m_documentLoader->substituteData().isValid()))
639 return; 647 return;
640 648
641 if (type == ResourceLoadingFromCache && !resource->stillNeedsLoad() && !m_va lidatedURLs.contains(request.resourceRequest().url())) { 649 if (type == ResourceLoadingFromCache && !resource->stillNeedsLoad() && !m_va lidatedURLs.contains(request.resourceRequest().url())) {
642 // Resources loaded from memory cache should be reported the first time they're used. 650 // Resources loaded from memory cache should be reported the first time they're used.
(...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after
1508 1516
1509 void ResourceFetcher::trace(Visitor* visitor) 1517 void ResourceFetcher::trace(Visitor* visitor)
1510 { 1518 {
1511 visitor->trace(m_document); 1519 visitor->trace(m_document);
1512 visitor->trace(m_loaders); 1520 visitor->trace(m_loaders);
1513 visitor->trace(m_multipartLoaders); 1521 visitor->trace(m_multipartLoaders);
1514 ResourceLoaderHost::trace(visitor); 1522 ResourceLoaderHost::trace(visitor);
1515 } 1523 }
1516 1524
1517 } 1525 }
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