| OLD | NEW |
| (Empty) |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 # Use of this source code is governed by a BSD-style license that can be | |
| 3 # found in the LICENSE file. | |
| 4 | |
| 5 from telemetry.timeline.timeline_data import TimelineData | |
| 6 | |
| 7 | |
| 8 class EmptyTimelineDataImporter(object): | |
| 9 """Imports empty TimlineData objects.""" | |
| 10 def __init__(self, model, timeline_data, import_priority=0): | |
| 11 pass | |
| 12 | |
| 13 @staticmethod | |
| 14 def CanImport(timeline_data): | |
| 15 if not isinstance(timeline_data, TimelineData): | |
| 16 return False | |
| 17 event_data = timeline_data.EventData() | |
| 18 if isinstance(event_data, list): | |
| 19 return len(event_data) == 0 | |
| 20 elif isinstance(event_data, basestring): | |
| 21 return len(event_data) == 0 | |
| 22 return False | |
| 23 | |
| 24 def ImportEvents(self): | |
| 25 pass | |
| 26 | |
| 27 def FinalizeImport(self): | |
| 28 pass | |
| OLD | NEW |