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 | 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 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 637 if (result == kBlock) | 637 if (result == kBlock) |
| 638 return ResourceForBlockedRequest(params, factory, blocked_reason); | 638 return ResourceForBlockedRequest(params, factory, blocked_reason); |
| 639 | 639 |
| 640 if (!params.IsSpeculativePreload()) { | 640 if (!params.IsSpeculativePreload()) { |
| 641 // Only log if it's not for speculative preload. | 641 // Only log if it's not for speculative preload. |
| 642 Context().RecordLoadingActivity(identifier, resource_request, | 642 Context().RecordLoadingActivity(identifier, resource_request, |
| 643 factory.GetType(), | 643 factory.GetType(), |
| 644 params.Options().initiator_info.name); | 644 params.Options().initiator_info.name); |
| 645 } | 645 } |
| 646 | 646 |
| 647 // An URL with the "cid" scheme can only be handled by an MHTML Archive. | 647 // A main resource request with the "cid" scheme can only be handled by an |
| 648 // Abort the request when there is none. | 648 // MHTML Archive. Abort the request when there is none. |
| 649 if (!archive_ && resource_request.Url().ProtocolIs(kContentIdScheme)) | 649 // Please note that there is some embedder of WebView that are using |
|
clamy
2017/07/07 16:14:22
nit: s/Please note/Note:
nit: s/is some embedder/a
arthursonzogni
2017/07/10 09:03:32
Done.
| |
| 650 // Content-ID URLs for sub-resources, even without any MHTMLArchive. | |
| 651 // Please see https://crbug.com/739658. | |
| 652 if (!archive_ && factory.GetType() == Resource::kMainResource && | |
|
clamy
2017/07/07 16:14:22
nit: this if now needs braces.
arthursonzogni
2017/07/10 09:03:32
Done.
| |
| 653 resource_request.Url().ProtocolIs(kContentIdScheme)) | |
| 650 return nullptr; | 654 return nullptr; |
| 651 | 655 |
| 652 bool is_data_url = resource_request.Url().ProtocolIsData(); | 656 bool is_data_url = resource_request.Url().ProtocolIsData(); |
| 653 bool is_static_data = is_data_url || substitute_data.IsValid() || archive_; | 657 bool is_static_data = is_data_url || substitute_data.IsValid() || archive_; |
| 654 if (is_static_data) { | 658 if (is_static_data) { |
| 655 resource = ResourceForStaticData(params, factory, substitute_data); | 659 resource = ResourceForStaticData(params, factory, substitute_data); |
| 656 // Abort the request if the archive doesn't contain the resource, except in | 660 // Abort the request if the archive doesn't contain the resource, except in |
| 657 // the case of data URLs which might have resources such as fonts that need | 661 // the case of data URLs which might have resources such as fonts that need |
| 658 // to be decoded only on demand. These data URLs are allowed to be | 662 // to be decoded only on demand. These data URLs are allowed to be |
| 659 // processed using the normal ResourceFetcher machinery. | 663 // processed using the normal ResourceFetcher machinery. |
| (...skipping 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1671 visitor->Trace(archive_); | 1675 visitor->Trace(archive_); |
| 1672 visitor->Trace(loaders_); | 1676 visitor->Trace(loaders_); |
| 1673 visitor->Trace(non_blocking_loaders_); | 1677 visitor->Trace(non_blocking_loaders_); |
| 1674 visitor->Trace(document_resources_); | 1678 visitor->Trace(document_resources_); |
| 1675 visitor->Trace(preloads_); | 1679 visitor->Trace(preloads_); |
| 1676 visitor->Trace(matched_preloads_); | 1680 visitor->Trace(matched_preloads_); |
| 1677 visitor->Trace(resource_timing_info_map_); | 1681 visitor->Trace(resource_timing_info_map_); |
| 1678 } | 1682 } |
| 1679 | 1683 |
| 1680 } // namespace blink | 1684 } // namespace blink |
| OLD | NEW |