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

Unified Diff: tracing/tracing/extras/importer/android/event_log_importer.html

Issue 1432973005: Prevent EventLogImporter from matching its own file in vulcanized traces (Closed) Base URL: git@github.com:catapult-project/catapult.git@master
Patch Set: Created 5 years, 1 month 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/extras/importer/android/event_log_importer.html
diff --git a/tracing/tracing/extras/importer/android/event_log_importer.html b/tracing/tracing/extras/importer/android/event_log_importer.html
index 2c06113243280f69b940ac53bf42bce6afc9a43f..a80852ab1407d8a55858ade20b06f885fbb0d1b4 100644
--- a/tracing/tracing/extras/importer/android/event_log_importer.html
+++ b/tracing/tracing/extras/importer/android/event_log_importer.html
@@ -93,6 +93,10 @@ tr.exportTo('tr.e.importer.android', function() {
if (!(typeof(events) === 'string' || events instanceof String))
return false;
+ // Prevent the importer from matching this file in vulcanized traces.
+ if (/^<!DOCTYPE html>/.test(events))
+ return false;
+
return eventLogActivityRE.test(events);
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698