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

Unified Diff: java/org/chromium/distiller/ContentExtractor.java

Issue 1705123002: Add support for Schema.org/Recipe Base URL: https://github.com/chromium/dom-distiller.git@master
Patch Set: activate only for English pages Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | java/org/chromium/distiller/DomUtil.java » ('j') | java/org/chromium/distiller/DomUtil.java » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: java/org/chromium/distiller/ContentExtractor.java
diff --git a/java/org/chromium/distiller/ContentExtractor.java b/java/org/chromium/distiller/ContentExtractor.java
index 4a8f8bd8dbee9acff98fbbc9084f7f5d8b4626fe..792dd35f4726b745e3e31e8843681933663c4b49 100644
--- a/java/org/chromium/distiller/ContentExtractor.java
+++ b/java/org/chromium/distiller/ContentExtractor.java
@@ -86,7 +86,14 @@ public class ContentExtractor {
}
public String extractContent(boolean textOnly) {
+
double now = DomUtil.getTime();
+ String structuredData = parser.getStructuredData();
+ LogUtil.addTimingInfo(now, mTimingInfo, "parser.getStructuredData()");
+ if (!structuredData.isEmpty()) {
+ return structuredData;
+ }
+ now = DomUtil.getTime();
WebDocumentInfo documentInfo = createWebDocumentInfoFromPage();
mTimingInfo.setDocumentConstructionTime(DomUtil.getTime() - now);
« no previous file with comments | « no previous file | java/org/chromium/distiller/DomUtil.java » ('j') | java/org/chromium/distiller/DomUtil.java » ('J')

Powered by Google App Engine
This is Rietveld 408576698