Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 876 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 887 memoryCache()->remove(resource.get()); | 887 memoryCache()->remove(resource.get()); |
| 888 } | 888 } |
| 889 m_preloads.clear(); | 889 m_preloads.clear(); |
| 890 } | 890 } |
| 891 | 891 |
| 892 ArchiveResource* ResourceFetcher::createArchive(Resource* resource) | 892 ArchiveResource* ResourceFetcher::createArchive(Resource* resource) |
| 893 { | 893 { |
| 894 // Only the top-frame can load MHTML. | 894 // Only the top-frame can load MHTML. |
| 895 if (!context().isMainFrame()) | 895 if (!context().isMainFrame()) |
| 896 return nullptr; | 896 return nullptr; |
| 897 m_archive = MHTMLArchive::create(resource->url(), resource->resourceBuffer() ); | 897 m_archive = MHTMLArchive::create(resource->url(), resource->resourceBuffer() .get()); |
|
haraken
2016/07/13 02:18:30
You don't need to fix it in this CL but here we sh
hajimehoshi
2016/07/13 07:36:22
Done.
| |
| 898 return m_archive ? m_archive->mainResource() : nullptr; | 898 return m_archive ? m_archive->mainResource() : nullptr; |
| 899 } | 899 } |
| 900 | 900 |
| 901 void ResourceFetcher::didFinishLoading(Resource* resource, double finishTime, in t64_t encodedDataLength, DidFinishLoadingReason finishReason) | 901 void ResourceFetcher::didFinishLoading(Resource* resource, double finishTime, in t64_t encodedDataLength, DidFinishLoadingReason finishReason) |
| 902 { | 902 { |
| 903 TRACE_EVENT_ASYNC_END0("blink.net", "Resource", resource->identifier()); | 903 TRACE_EVENT_ASYNC_END0("blink.net", "Resource", resource->identifier()); |
| 904 DCHECK(resource); | 904 DCHECK(resource); |
| 905 | 905 |
| 906 // When loading a multipart resource, make the loader non-block when | 906 // When loading a multipart resource, make the loader non-block when |
| 907 // finishing loading the first part. | 907 // finishing loading the first part. |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1261 visitor->trace(m_context); | 1261 visitor->trace(m_context); |
| 1262 visitor->trace(m_archive); | 1262 visitor->trace(m_archive); |
| 1263 visitor->trace(m_loaders); | 1263 visitor->trace(m_loaders); |
| 1264 visitor->trace(m_nonBlockingLoaders); | 1264 visitor->trace(m_nonBlockingLoaders); |
| 1265 visitor->trace(m_documentResources); | 1265 visitor->trace(m_documentResources); |
| 1266 visitor->trace(m_preloads); | 1266 visitor->trace(m_preloads); |
| 1267 visitor->trace(m_resourceTimingInfoMap); | 1267 visitor->trace(m_resourceTimingInfoMap); |
| 1268 } | 1268 } |
| 1269 | 1269 |
| 1270 } // namespace blink | 1270 } // namespace blink |
| OLD | NEW |