| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 642 // | 642 // |
| 643 // 1. Are for subresources (including nested frames). | 643 // 1. Are for subresources (including nested frames). |
| 644 // 2. Are form submissions. | 644 // 2. Are form submissions. |
| 645 // 3. Whose hosts are contained in the document's InsecureNavigationSet. | 645 // 3. Whose hosts are contained in the document's InsecureNavigationSet. |
| 646 const ResourceRequest& request = fetchRequest.resourceRequest(); | 646 const ResourceRequest& request = fetchRequest.resourceRequest(); |
| 647 if (request.frameType() == WebURLRequest::FrameTypeNone | 647 if (request.frameType() == WebURLRequest::FrameTypeNone |
| 648 || request.frameType() == WebURLRequest::FrameTypeNested | 648 || request.frameType() == WebURLRequest::FrameTypeNested |
| 649 || request.requestContext() == WebURLRequest::RequestContextForm | 649 || request.requestContext() == WebURLRequest::RequestContextForm |
| 650 || (!url.host().isNull() && m_document->insecureNavigationsToUpgrade
()->contains(url.host().impl()->hash()))) | 650 || (!url.host().isNull() && m_document->insecureNavigationsToUpgrade
()->contains(url.host().impl()->hash()))) |
| 651 { | 651 { |
| 652 UseCounter::count(m_document, UseCounter::UpgradeInsecureRequestsUpg
radedRequest); |
| 652 url.setProtocol("https"); | 653 url.setProtocol("https"); |
| 653 if (url.port() == 80) | 654 if (url.port() == 80) |
| 654 url.setPort(443); | 655 url.setPort(443); |
| 655 fetchRequest.mutableResourceRequest().setURL(url); | 656 fetchRequest.mutableResourceRequest().setURL(url); |
| 656 } | 657 } |
| 657 } | 658 } |
| 658 } | 659 } |
| 659 | 660 |
| 660 void FrameFetchContext::addClientHintsIfNecessary(FetchRequest& fetchRequest) | 661 void FrameFetchContext::addClientHintsIfNecessary(FetchRequest& fetchRequest) |
| 661 { | 662 { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 680 fetchRequest.mutableResourceRequest().addHTTPHeaderField("CSP", "active"
); | 681 fetchRequest.mutableResourceRequest().addHTTPHeaderField("CSP", "active"
); |
| 681 } | 682 } |
| 682 | 683 |
| 683 DEFINE_TRACE(FrameFetchContext) | 684 DEFINE_TRACE(FrameFetchContext) |
| 684 { | 685 { |
| 685 visitor->trace(m_document); | 686 visitor->trace(m_document); |
| 686 FetchContext::trace(visitor); | 687 FetchContext::trace(visitor); |
| 687 } | 688 } |
| 688 | 689 |
| 689 } // namespace blink | 690 } // namespace blink |
| OLD | NEW |