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

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: wychen's comments addressed Created 4 years, 5 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 7d16a774dd4360a4ce2015ed5296b466d386e969..54721862a299910ed6f2f8baf57b8d9593b24bec 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) {
+
wychen 2016/07/24 23:06:34 nit: extra line
double now = DomUtil.getTime();
+ String structuredData = parser.getStructuredData();
+ LogUtil.addTimingInfo(now, mTimingInfo, "parser.getStructuredData()");
wychen 2016/07/24 23:06:33 Maybe just "getStructuredData" for consistency.
+ 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