3 Copyright (c) 2014 The Chromium Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style license that can be
5 found in the LICENSE file.
7 <link rel="import" href="/tvcm.html">
11 tvcm.exportTo('tracing.importer', function() {
15 function SimpleLineReader(text) {
16 this.lines_ = text.split('\n');
19 this.savedLines_ = undefined;
22 SimpleLineReader.prototype = {
23 advanceToLineMatching: function(regex) {
24 for (; this.curLine_ < this.lines_.length; this.curLine_++) {
25 var line = this.lines_[this.curLine_];
26 if (this.savedLines_ !== undefined)
27 this.savedLines_.push(line);
38 beginSavingLines: function() {
39 this.savedLines_ = [];
42 endSavingLinesAndGetResult: function() {
43 var tmp = this.savedLines_;
44 this.savedLines_ = undefined;
50 SimpleLineReader: SimpleLineReader