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

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: Created 4 years, 10 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..f21e5a4da9c8ef588d35d07321afc5b7bc8773b4 100644
--- a/java/org/chromium/distiller/ContentExtractor.java
+++ b/java/org/chromium/distiller/ContentExtractor.java
@@ -86,6 +86,12 @@ public class ContentExtractor {
}
public String extractContent(boolean textOnly) {
+
+ String structuredData = parser.getStructuredData();
wychen 2016/03/14 22:58:42 Might make sense to measure the time spent in this
+ if (!structuredData.isEmpty()) {
+ return structuredData;
+ }
+
double 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