Chromium Code Reviews| Index: chrome/common/extensions/api/feedback_private.idl |
| diff --git a/chrome/common/extensions/api/feedback_private.idl b/chrome/common/extensions/api/feedback_private.idl |
| index 1ec44df4fd974260580f4c8873808ea3f1db93f8..b70888063210755fd7c4448334c7d2878ea49a10 100644 |
| --- a/chrome/common/extensions/api/feedback_private.idl |
| +++ b/chrome/common/extensions/api/feedback_private.idl |
| @@ -95,11 +95,41 @@ namespace feedbackPrivate { |
| closed |
| }; |
| + // Allowed log sources on Chrome OS. |
| + enum LogSource { |
| + // /var/log/messages |
|
tbarzic
2017/06/01 19:23:46
Chrome OS system messages.
Simon Que
2017/06/01 21:49:10
Done.
|
| + messages, |
| + |
| + // /var/log/ui/ui.LATEST |
|
tbarzic
2017/06/01 19:23:46
Latest Chrome OS UI logs.
Simon Que
2017/06/01 21:49:10
Done.
|
| + ui_latest |
|
tbarzic
2017/06/01 19:23:47
uiLatest
or latestUi
Simon Que
2017/06/01 21:49:10
Done.
|
| + }; |
| + |
| + // Input parameters for a readLogSource() call. |
| + dictionary ReadLogSourceParams { |
| + // The log source from which to read. |
| + LogSource source; |
| + |
| + // For file-based log sources, read from source without closing the file |
| + // handle. The next time readLogSource() is called, the file read will |
| + // continue where it left off. readLogSource() can be called with |
|
tbarzic
2017/06/01 19:23:47
s/readLogSource()/$(ref:readLogSource)/
Simon Que
2017/06/01 21:49:10
Done.
|
| + // incremental=true repeatedly. To subsequently close the file handle, pass |
|
tbarzic
2017/06/01 19:23:47
<code>incremental = true</code>
Simon Que
2017/06/01 21:49:10
Done.
|
| + // in incremental=false. |
| + boolean incremental; |
| + |
| + // To read from an existing file handle, set this to a valid readerId value |
| + // that was returned from a previous readLogSource() call. The file handle |
| + // must previously have been created for the same |source|. If no readerId |
| + // is provided, readLogSource will attempt to open a new log source reader |
| + // handle. |
| + long? readerId; |
| + }; |
| + |
| callback GetUserEmailCallback = void(DOMString email); |
| callback GetSystemInformationCallback = |
| void(SystemInformation[] systemInformation); |
| callback SendFeedbackCallback = void(Status status); |
| callback GetStringsCallback = void(object result); |
| + callback ReadLogSourceCallback = void (long readerId, DOMString[] logLines); |
|
tbarzic
2017/06/01 19:23:46
I'd consider returning result as object
{
option
Simon Que
2017/06/01 21:49:10
How do I define the object format in the IDL, if a
tbarzic
2017/06/01 21:57:23
Same as for ReadLogSourceParams
Simon Que
2017/06/02 22:54:32
Done.
|
| interface Functions { |
| // Returns the email of the currently active or logged in user. |
| @@ -120,6 +150,24 @@ namespace feedbackPrivate { |
| // Logs whether the user accepted a prompt to try the Software Removal |
| // Tool. |
| static void logSrtPromptResult(SrtPromptResult result); |
| + |
| + // Reads from a log source indicated by |source|. |
| + // |
| + // If |incremental| is false: |
| + // - Returns the entire contents of the log file. |
|
tbarzic
2017/06/01 19:23:47
put lists in <ul></ul>
(so docs render better, y
Simon Que
2017/06/01 21:49:10
Done.
|
| + // - Returns |readerId| value of 0 to callback. |
| + // If |incremental| is true, and no |readerId| is provided: |
| + // - Returns the entire contents of the log file. |
| + // - Starts tracking the file read handle, which is returned as a nonzero |
| + // |readerId| value in the callback. |
| + // - If can't create a new file handle, returns |readerId| value of 0 in the |
| + // callback. |
| + // If |incremental| is true, and a valid non-zero |readerId| is provided: |
|
tbarzic
2017/06/01 19:23:47
<code></code> where you use ||
Simon Que
2017/06/01 21:49:10
Done.
|
| + // - Returns new lines written to the file since the last time this function |
| + // was called for the same file and readerId. |
| + // - Returns the same |readerId| value to the callback. |
| + static void readLogSource(ReadLogSourceParams params, |
| + ReadLogSourceCallback callback); |
| }; |
| interface Events { |