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

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

Issue 1156663005: scheduleArchiveLoad should return false if archived resource is not available. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 6 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 | « LayoutTests/mhtml/resource_not_in_archive-expected.html ('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 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after
1012 } 1012 }
1013 1013
1014 bool ResourceFetcher::scheduleArchiveLoad(Resource* resource, const ResourceRequ est& request) 1014 bool ResourceFetcher::scheduleArchiveLoad(Resource* resource, const ResourceRequ est& request)
1015 { 1015 {
1016 if (!m_archiveResourceCollection) 1016 if (!m_archiveResourceCollection)
1017 return false; 1017 return false;
1018 1018
1019 ArchiveResource* archiveResource = m_archiveResourceCollection->archiveResou rceForURL(request.url()); 1019 ArchiveResource* archiveResource = m_archiveResourceCollection->archiveResou rceForURL(request.url());
1020 if (!archiveResource) { 1020 if (!archiveResource) {
1021 resource->error(Resource::LoadError); 1021 resource->error(Resource::LoadError);
1022 return true; 1022 return false;
1023 } 1023 }
1024 1024
1025 resource->setLoading(true); 1025 resource->setLoading(true);
1026 resource->responseReceived(archiveResource->response(), nullptr); 1026 resource->responseReceived(archiveResource->response(), nullptr);
1027 SharedBuffer* data = archiveResource->data(); 1027 SharedBuffer* data = archiveResource->data();
1028 if (data) 1028 if (data)
1029 resource->appendData(data->data(), data->size()); 1029 resource->appendData(data->data(), data->size());
1030 resource->finish(); 1030 resource->finish();
1031 return true; 1031 return true;
1032 } 1032 }
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
1291 1291
1292 DEFINE_TRACE(ResourceFetcher) 1292 DEFINE_TRACE(ResourceFetcher)
1293 { 1293 {
1294 visitor->trace(m_context); 1294 visitor->trace(m_context);
1295 visitor->trace(m_archiveResourceCollection); 1295 visitor->trace(m_archiveResourceCollection);
1296 visitor->trace(m_loaders); 1296 visitor->trace(m_loaders);
1297 visitor->trace(m_nonBlockingLoaders); 1297 visitor->trace(m_nonBlockingLoaders);
1298 } 1298 }
1299 1299
1300 } 1300 }
OLDNEW
« no previous file with comments | « LayoutTests/mhtml/resource_not_in_archive-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698