OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. |
3 * Copyright (C) 2013, Intel Corporation | 3 * Copyright (C) 2013, Intel Corporation |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
648 { | 648 { |
649 ASSERT(m_client); | 649 ASSERT(m_client); |
650 | 650 |
651 if (!m_actualRequest.isNull()) { | 651 if (!m_actualRequest.isNull()) { |
652 reportResponseReceived(identifier, response); | 652 reportResponseReceived(identifier, response); |
653 handlePreflightResponse(response); | 653 handlePreflightResponse(response); |
654 return; | 654 return; |
655 } | 655 } |
656 | 656 |
657 if (response.wasFetchedViaServiceWorker()) { | 657 if (response.wasFetchedViaServiceWorker()) { |
| 658 if (response.wasFetchedViaForeignFetch()) |
| 659 UseCounter::count(m_document, UseCounter::ForeignFetchInterception); |
658 if (response.wasFallbackRequiredByServiceWorker()) { | 660 if (response.wasFallbackRequiredByServiceWorker()) { |
659 // At this point we must have m_fallbackRequestForServiceWorker. | 661 // At this point we must have m_fallbackRequestForServiceWorker. |
660 // (For SharedWorker the request won't be CORS or CORS-with-prefligh
t, | 662 // (For SharedWorker the request won't be CORS or CORS-with-prefligh
t, |
661 // therefore fallback-to-network is handled in the browser process | 663 // therefore fallback-to-network is handled in the browser process |
662 // when the ServiceWorker does not call respondWith().) | 664 // when the ServiceWorker does not call respondWith().) |
663 ASSERT(!m_fallbackRequestForServiceWorker.isNull()); | 665 ASSERT(!m_fallbackRequestForServiceWorker.isNull()); |
664 reportResponseReceived(identifier, response); | 666 reportResponseReceived(identifier, response); |
665 loadFallbackRequestForServiceWorker(); | 667 loadFallbackRequestForServiceWorker(); |
666 return; | 668 return; |
667 } | 669 } |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
971 | 973 |
972 DEFINE_TRACE(DocumentThreadableLoader) | 974 DEFINE_TRACE(DocumentThreadableLoader) |
973 { | 975 { |
974 visitor->trace(m_resource); | 976 visitor->trace(m_resource); |
975 visitor->trace(m_document); | 977 visitor->trace(m_document); |
976 ThreadableLoader::trace(visitor); | 978 ThreadableLoader::trace(visitor); |
977 RawResourceClient::trace(visitor); | 979 RawResourceClient::trace(visitor); |
978 } | 980 } |
979 | 981 |
980 } // namespace blink | 982 } // namespace blink |
OLD | NEW |