OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 // Use chrome.logPrivate API to retrieve log information from multiple | 5 // Use chrome.logPrivate API to retrieve log information from multiple |
6 // resources in a consistent format. | 6 // resources in a consistent format. |
7 namespace logPrivate { | 7 namespace logPrivate { |
8 | 8 |
9 // A filter class that filters log entries by different fields | 9 // A filter class that filters log entries by different fields |
10 dictionary Filter { | 10 dictionary Filter { |
(...skipping 28 matching lines...) Expand all Loading... | |
39 // The class that is returned to callback function. | 39 // The class that is returned to callback function. |
40 dictionary Result { | 40 dictionary Result { |
41 // The filter specified to filter log result. | 41 // The filter specified to filter log result. |
42 Filter filter; | 42 Filter filter; |
43 // Log entries returned based on the filter. | 43 // Log entries returned based on the filter. |
44 LogEntry[] data; | 44 LogEntry[] data; |
45 }; | 45 }; |
46 | 46 |
47 callback GetHistoricalCallback = void (Result res); | 47 callback GetHistoricalCallback = void (Result res); |
48 | 48 |
49 callback DumpLogsCallback = void ([instanceOf=FileEntry] object logs); | |
50 | |
51 callback CompletionCallback = void (); | |
52 | |
53 // The type of the events to be recorded. | |
54 enum EventType { network }; | |
55 | |
56 // The type of the event sink where captured events will be sent. | |
57 enum EventSink { | |
58 // Events will be sent to the webapp via onCapturedEvents. | |
59 capture, | |
60 // Events will be sent to a log file. | |
not at google - send to devlin
2014/07/18 22:45:09
mention that they are written when dumpLogs is cal
zel
2014/07/22 01:26:35
Done.
zel
2014/07/22 01:26:35
Done.
| |
61 file | |
62 }; | |
63 | |
49 interface Functions { | 64 interface Functions { |
50 // Get the existing logs from ChromeOS system. | 65 // Get the existing logs from ChromeOS system. |
51 static void getHistorical(Filter filter, GetHistoricalCallback callback); | 66 static void getHistorical(Filter filter, GetHistoricalCallback callback); |
52 static void startNetInternalsWatch(); | 67 // Start capturing events of specific type. |
53 static void stopNetInternalsWatch(); | 68 static void startEventRecorder(EventType eventType, EventSink sink, Completi onCallback callback); |
69 // Stop capturing events of specific type. | |
70 static void stopEventRecorder(EventType eventType, CompletionCallback callba ck); | |
not at google - send to devlin
2014/07/18 22:45:09
keep these to < 80 chars.
zel
2014/07/22 01:26:35
Done.
| |
71 // Dump all system and captured events into a .tar.gz file. | |
72 static void dumpLogs(DumpLogsCallback callback); | |
not at google - send to devlin
2014/07/18 22:45:09
mention the structure of the tar
zel
2014/07/22 01:26:35
Done.
| |
54 }; | 73 }; |
55 | 74 |
56 interface Events { | 75 interface Events { |
57 static void onAddNetInternalsEntries(object[] entries); | 76 // Receives events of type which is currently being captured. |
77 static void onCapturedEvents(object[] entries); | |
58 }; | 78 }; |
59 }; | 79 }; |
OLD | NEW |