| 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 | 5 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All |
| 6 rights reserved. | 6 rights reserved. |
| 7 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ | 7 Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/ |
| 8 | 8 |
| 9 This library is free software; you can redistribute it and/or | 9 This library is free software; you can redistribute it and/or |
| 10 modify it under the terms of the GNU Library General Public | 10 modify it under the terms of the GNU Library General Public |
| (...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 597 | 597 |
| 598 if (!params.IsSpeculativePreload()) { | 598 if (!params.IsSpeculativePreload()) { |
| 599 // Only log if it's not for speculative preload. | 599 // Only log if it's not for speculative preload. |
| 600 Context().RecordLoadingActivity(identifier, resource_request, | 600 Context().RecordLoadingActivity(identifier, resource_request, |
| 601 factory.GetType(), | 601 factory.GetType(), |
| 602 params.Options().initiator_info.name); | 602 params.Options().initiator_info.name); |
| 603 } | 603 } |
| 604 | 604 |
| 605 // An URL with the "cid" scheme can only be handled by an MHTML Archive. | 605 // An URL with the "cid" scheme can only be handled by an MHTML Archive. |
| 606 // Abort the request when there is none. | 606 // Abort the request when there is none. |
| 607 if (resource_request.Url().ProtocolIs(kContentIdScheme) && !archive_) { | 607 if (!archive_ && resource_request.Url().ProtocolIs(kContentIdScheme)) |
| 608 return nullptr; | 608 return nullptr; |
| 609 } | |
| 610 | 609 |
| 611 bool is_data_url = resource_request.Url().ProtocolIsData(); | 610 bool is_data_url = resource_request.Url().ProtocolIsData(); |
| 612 bool is_static_data = is_data_url || substitute_data.IsValid() || archive_; | 611 bool is_static_data = is_data_url || substitute_data.IsValid() || archive_; |
| 613 if (is_static_data) { | 612 if (is_static_data) { |
| 614 resource = ResourceForStaticData(params, factory, substitute_data); | 613 resource = ResourceForStaticData(params, factory, substitute_data); |
| 615 // Abort the request if the archive doesn't contain the resource, except in | 614 // Abort the request if the archive doesn't contain the resource, except in |
| 616 // the case of data URLs which might have resources such as fonts that need | 615 // the case of data URLs which might have resources such as fonts that need |
| 617 // to be decoded only on demand. These data URLs are allowed to be | 616 // to be decoded only on demand. These data URLs are allowed to be |
| 618 // processed using the normal ResourceFetcher machinery. | 617 // processed using the normal ResourceFetcher machinery. |
| 619 if (!resource && !is_data_url && archive_) | 618 if (!resource && !is_data_url && archive_) |
| (...skipping 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1638 visitor->Trace(context_); | 1637 visitor->Trace(context_); |
| 1639 visitor->Trace(archive_); | 1638 visitor->Trace(archive_); |
| 1640 visitor->Trace(loaders_); | 1639 visitor->Trace(loaders_); |
| 1641 visitor->Trace(non_blocking_loaders_); | 1640 visitor->Trace(non_blocking_loaders_); |
| 1642 visitor->Trace(document_resources_); | 1641 visitor->Trace(document_resources_); |
| 1643 visitor->Trace(preloads_); | 1642 visitor->Trace(preloads_); |
| 1644 visitor->Trace(resource_timing_info_map_); | 1643 visitor->Trace(resource_timing_info_map_); |
| 1645 } | 1644 } |
| 1646 | 1645 |
| 1647 } // namespace blink | 1646 } // namespace blink |
| OLD | NEW |