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 fe52a422dc39b24ef3471382e71ff501d177bdb8..03dfdb2cbde65dc261adc1ed612e57e4014745ac 100644 |
| --- a/chrome/common/extensions/api/feedback_private.idl |
| +++ b/chrome/common/extensions/api/feedback_private.idl |
| @@ -96,6 +96,8 @@ namespace feedbackPrivate { |
| void(SystemInformation[] systemInformation); |
| callback SendFeedbackCallback = void(Status status); |
| callback GetStringsCallback = void(object result); |
| + callback ReadLinesFromFileCallback = |
| + void (long numBytesRead, DOMString[] logLines); |
| interface Functions { |
| // Returns the email of the currently active or logged in user. |
| @@ -116,6 +118,19 @@ namespace feedbackPrivate { |
| // Logs whether the user accepted a prompt to try the Software Removal |
| // Tool. |
| static void logSrtPromptResult(SrtPromptResult result); |
| + |
| + // Reads from a log file |filename|, starting from byte offset |
|
rkc
2017/04/26 03:08:43
Instead of reading any arbitrary filename, can we
Simon Que
2017/04/26 14:08:19
That's a good idea. I was originally going to use
rkc
2017/04/26 16:17:17
This API will only ever work on Chrome OS. Apps on
Simon Que
2017/04/26 18:42:44
What about extensions? feedbackPrivate API is supp
rkc
2017/04/26 18:46:33
The 'rest' of this API will continue to work on ot
Simon Que
2017/04/26 19:46:39
Done.
|
| + // |offsetBytes|, and reading up to |numBytesToRead| bytes. If the |
| + // file is not allowed to be read, or is otherwise unreadable, |
| + // returns an empty array. If |numBytesToRead| is 0, reads all the |
| + // way to the end of file. |
| + // |
| + // In addition, can only return whole lines. Reading of only a part |
| + // of a line is not allowed. Partial lines will not be returned. |
| + static void readLinesFromFile(DOMString filename, |
| + long offsetBytes, |
|
rkc
2017/04/26 03:08:43
This is not quite a logging API anymore. Instead o
Simon Que
2017/04/26 14:08:19
I realized the following problem...
If there is a
rkc
2017/04/26 16:17:17
This will either be a private API or be only run i
Simon Que
2017/04/26 18:42:44
feedbackPrivate API is whitelisted for both the Ho
rkc
2017/04/26 18:46:33
Right, the feedback UI will not use this API. Ther
Simon Que
2017/04/26 19:46:39
Done.
|
| + long numBytesToRead, |
| + ReadLinesFromFileCallback callback); |
| }; |
| interface Events { |