Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Side by Side Diff: third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp

Issue 2235543002: Keep track of how many documents had a resource intercepted by foreign fetch. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | third_party/WebKit/Source/platform/exported/WebURLResponse.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698