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

Side by Side Diff: third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp

Issue 2262183002: [NoStatePrefetch] Do not send responses to renderer in prefetch mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prefetchProto
Patch Set: remove WebDocument api Created 4 years, 3 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
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. 2 * Copyright (C) 2010 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after
816 ASSERT(!shouldUseThreading()); 816 ASSERT(!shouldUseThreading());
817 817
818 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("blink.debug"), "HTMLDocumentParser:: append", "size", inputSource.length()); 818 TRACE_EVENT1(TRACE_DISABLED_BY_DEFAULT("blink.debug"), "HTMLDocumentParser:: append", "size", inputSource.length());
819 const SegmentedString source(inputSource); 819 const SegmentedString source(inputSource);
820 820
821 if (document()->isPrefetchOnly()) { 821 if (document()->isPrefetchOnly()) {
822 if (!m_preloadScanner) 822 if (!m_preloadScanner)
823 m_preloadScanner = createPreloadScanner(); 823 m_preloadScanner = createPreloadScanner();
824 824
825 m_preloadScanner->appendToEnd(source); 825 m_preloadScanner->appendToEnd(source);
826 // TODO(droger): Set the LOAD_PREFETCH flags on the requests.
827 m_preloadScanner->scanAndPreload(m_preloader.get(), document()->validBas eElementURL(), nullptr); 826 m_preloadScanner->scanAndPreload(m_preloader.get(), document()->validBas eElementURL(), nullptr);
828 827
829 // Return after the preload scanner, do not actually parse the document. 828 // Return after the preload scanner, do not actually parse the document.
830 return; 829 return;
831 } 830 }
832 831
833 if (m_preloadScanner) { 832 if (m_preloadScanner) {
834 if (m_input.current().isEmpty() && !isWaitingForScripts()) { 833 if (m_input.current().isEmpty() && !isWaitingForScripts()) {
835 // We have parsed until the end of the current input and so are now moving ahead of the preload scanner. 834 // We have parsed until the end of the current input and so are now moving ahead of the preload scanner.
836 // Clear the scanner so we know to scan starting from the current in put point if we block again. 835 // Clear the scanner so we know to scan starting from the current in put point if we block again.
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
1213 (*WTF::bind(function, std::forward<Ps>(parameters)...))(); 1212 (*WTF::bind(function, std::forward<Ps>(parameters)...))();
1214 return; 1213 return;
1215 case Asynchronous: 1214 case Asynchronous:
1216 m_loadingTaskRunner->postTask(BLINK_FROM_HERE, WTF::bind(function, std:: forward<Ps>(parameters)...)); 1215 m_loadingTaskRunner->postTask(BLINK_FROM_HERE, WTF::bind(function, std:: forward<Ps>(parameters)...));
1217 return; 1216 return;
1218 } 1217 }
1219 NOTREACHED(); 1218 NOTREACHED();
1220 } 1219 }
1221 1220
1222 } // namespace blink 1221 } // namespace blink
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698