Index: chrome/browser/resources/tracing/timeline_model.js |
diff --git a/chrome/browser/resources/tracing/timeline_model.js b/chrome/browser/resources/tracing/timeline_model.js |
index f7883501666e648709754d18fcf6c76df0658699..68beb982521b186374f92d6ab6d973171b6fc536 100644 |
--- a/chrome/browser/resources/tracing/timeline_model.js |
+++ b/chrome/browser/resources/tracing/timeline_model.js |
@@ -502,7 +502,28 @@ cr.define('tracing', function() { |
*/ |
TimelineModel.registerImporter = function(importerConstructor) { |
importerConstructors.push(importerConstructor); |
- } |
+ }; |
+ |
+ function TimelineModelEmptyImporter(events) { |
+ }; |
+ |
+ TimelineModelEmptyImporter.canImport = function(eventData) { |
+ if (eventData instanceof Array && eventData.length == 0) |
+ return true; |
+ if (typeof(eventData) === 'string' || eventData instanceof String) { |
+ return eventData.length == 0; |
+ } |
+ return false; |
+ }; |
+ |
+ TimelineModelEmptyImporter.prototype = { |
+ __proto__: Object.prototype, |
+ |
+ importEvents : function() { |
+ } |
+ }; |
+ |
+ TimelineModel.registerImporter(TimelineModelEmptyImporter); |
TimelineModel.prototype = { |
__proto__: cr.EventTarget.prototype, |
@@ -787,4 +808,5 @@ cr.define('tracing', function() { |
TimelineCpu: TimelineCpu, |
TimelineModel: TimelineModel |
}; |
+ |
}); |