| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 1332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1343 }, | 1343 }, |
| 1344 | 1344 |
| 1345 _saveToFile: function() | 1345 _saveToFile: function() |
| 1346 { | 1346 { |
| 1347 var records = ['[' + JSON.stringify(window.navigator.appVersion)]; | 1347 var records = ['[' + JSON.stringify(window.navigator.appVersion)]; |
| 1348 for (var i = 0; i < this._records.length; ++i) | 1348 for (var i = 0; i < this._records.length; ++i) |
| 1349 records.push(JSON.stringify(this._records[i])); | 1349 records.push(JSON.stringify(this._records[i])); |
| 1350 records[records.length - 1] = records[records.length - 1] + "]"; | 1350 records[records.length - 1] = records[records.length - 1] + "]"; |
| 1351 | 1351 |
| 1352 var now= new Date(); | 1352 var now= new Date(); |
| 1353 InspectorFrontendHost.saveAs("TimelineRawData-" + now.toRFC3339() + ".js
on", records.join(",\n")); | 1353 var suggestedFileName = "TimelineRawData-" + now.toISO8601Compact() + ".
json"; |
| 1354 InspectorFrontendHost.saveAs(suggestedFileName, records.join(",\n")); |
| 1354 }, | 1355 }, |
| 1355 | 1356 |
| 1356 _reset: function() | 1357 _reset: function() |
| 1357 { | 1358 { |
| 1358 this._records = []; | 1359 this._records = []; |
| 1359 } | 1360 } |
| 1360 } | 1361 } |
| OLD | NEW |