| Index: chrome/common/extensions/api/log_private.idl
|
| diff --git a/chrome/common/extensions/api/log_private.idl b/chrome/common/extensions/api/log_private.idl
|
| index 454d18fbcda06c2c85442e49e1ae539e4e4ef81f..3b96acf5993afbaa24fc5e5d43e59a380e36aacd 100644
|
| --- a/chrome/common/extensions/api/log_private.idl
|
| +++ b/chrome/common/extensions/api/log_private.idl
|
| @@ -46,14 +46,45 @@ namespace logPrivate {
|
|
|
| callback GetHistoricalCallback = void (Result res);
|
|
|
| + callback DumpLogsCallback = void ([instanceOf=FileEntry] object logs);
|
| +
|
| + callback CompletionCallback = void ();
|
| +
|
| + // The type of the events to be recorded.
|
| + enum EventType { network };
|
| +
|
| + // The type of the event sink where captured events will be sent.
|
| + enum EventSink {
|
| + // Events will be sent to the webapp via onCapturedEvents.
|
| + capture,
|
| + // Events will be sent to a log file which can be collected
|
| + // through archive generated with dumpLogs() call.
|
| + file
|
| + };
|
| +
|
| interface Functions {
|
| // Get the existing logs from ChromeOS system.
|
| static void getHistorical(Filter filter, GetHistoricalCallback callback);
|
| - static void startNetInternalsWatch();
|
| - static void stopNetInternalsWatch();
|
| + // Start capturing events of specific type.
|
| + static void startEventRecorder(EventType eventType,
|
| + EventSink sink,
|
| + CompletionCallback callback);
|
| + // Stop capturing events of specific type.
|
| + static void stopEventRecorder(EventType eventType, CompletionCallback callback);
|
| + // Dump all system and captured events into a .tar.gz file.
|
| + // The archive file will contain following top level directories:
|
| + // /var/log/
|
| + // ChromeOS system logs.
|
| + // /home/chronos/user/log/
|
| + // Session specific logs (chrome app logs).
|
| + // /home/chronos/user/log/apps/<app_id>
|
| + // Contains webapp specific logs including those collected with
|
| + // startEventRecorder(..., sink="file") call.
|
| + static void dumpLogs(DumpLogsCallback callback);
|
| };
|
|
|
| interface Events {
|
| - static void onAddNetInternalsEntries(object[] entries);
|
| + // Receives events of type which is currently being captured.
|
| + static void onCapturedEvents(object[] entries);
|
| };
|
| };
|
|
|