Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: chrome/common/extensions/api/log_private.idl

Issue 329853010: Additional methods for chrome.logPrivate API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 which can be collected
61 // through archive generated with dumpLogs() call.
62 file
63 };
64
49 interface Functions { 65 interface Functions {
50 // Get the existing logs from ChromeOS system. 66 // Get the existing logs from ChromeOS system.
51 static void getHistorical(Filter filter, GetHistoricalCallback callback); 67 static void getHistorical(Filter filter, GetHistoricalCallback callback);
52 static void startNetInternalsWatch(); 68 // Start capturing events of specific type.
53 static void stopNetInternalsWatch(); 69 static void startEventRecorder(EventType eventType,
70 EventSink sink,
71 CompletionCallback callback);
72 // Stop capturing events of specific type.
73 static void stopEventRecorder(EventType eventType, CompletionCallback callba ck);
74 // Dump all system and captured events into a .tar.gz file.
75 // The archive file will contain following top level directories:
76 // /var/log/
77 // ChromeOS system logs.
78 // /home/chronos/user/log/
79 // Session specific logs (chrome app logs).
80 // /home/chronos/user/log/apps/<app_id>
81 // Contains webapp specific logs including those collected with
82 // startEventRecorder(..., sink="file") call.
83 static void dumpLogs(DumpLogsCallback callback);
54 }; 84 };
55 85
56 interface Events { 86 interface Events {
57 static void onAddNetInternalsEntries(object[] entries); 87 // Receives events of type which is currently being captured.
88 static void onCapturedEvents(object[] entries);
58 }; 89 };
59 }; 90 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698