OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 log_util = (function() { | 5 log_util = (function() { |
6 'use strict'; | 6 'use strict'; |
7 | 7 |
8 /** | 8 /** |
9 * Creates a new log dump. |events| is a list of all events, |polledData| is | 9 * Creates a new log dump. |events| is a list of all events, |polledData| is |
10 * an object containing the results of each poll, |tabData| is an object | 10 * an object containing the results of each poll, |tabData| is an object |
(...skipping 16 matching lines...) Expand all Loading... |
27 * |polledData| from each PollableDataHelper available on the source OS. | 27 * |polledData| from each PollableDataHelper available on the source OS. |
28 * |tabData| containing any tab-specific state that's not present in | 28 * |tabData| containing any tab-specific state that's not present in |
29 * |polledData|. | 29 * |polledData|. |
30 * | 30 * |
31 * |polledData| and |tabData| may be empty objects, or may be missing data for | 31 * |polledData| and |tabData| may be empty objects, or may be missing data for |
32 * tabs not present on the OS the log is from. | 32 * tabs not present on the OS the log is from. |
33 */ | 33 */ |
34 function createLogDump(userComments, constants, events, polledData, tabData, | 34 function createLogDump(userComments, constants, events, polledData, tabData, |
35 numericDate, privacyStripping) { | 35 numericDate, privacyStripping) { |
36 if (privacyStripping) | 36 if (privacyStripping) |
37 events = events.map(stripCookiesAndLoginInfo); | 37 events = events.map(stripPrivacyInfo); |
38 | 38 |
39 var logDump = { | 39 var logDump = { |
40 'userComments': userComments, | 40 'userComments': userComments, |
41 'constants': constants, | 41 'constants': constants, |
42 'events': events, | 42 'events': events, |
43 'polledData': polledData, | 43 'polledData': polledData, |
44 'tabData': tabData | 44 'tabData': tabData |
45 }; | 45 }; |
46 | 46 |
47 // Not technically client info, but it's used at the same point in the code. | 47 // Not technically client info, but it's used at the same point in the code. |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 return errorString + loadLogDump(parsedDump, fileName); | 298 return errorString + loadLogDump(parsedDump, fileName); |
299 } | 299 } |
300 | 300 |
301 // Exports. | 301 // Exports. |
302 return { | 302 return { |
303 createUpdatedLogDump: createUpdatedLogDump, | 303 createUpdatedLogDump: createUpdatedLogDump, |
304 createLogDumpAsync: createLogDumpAsync, | 304 createLogDumpAsync: createLogDumpAsync, |
305 loadLogFile: loadLogFile | 305 loadLogFile: loadLogFile |
306 }; | 306 }; |
307 })(); | 307 })(); |
OLD | NEW |