| 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..c893dde82fff41d6d7cc8260a6b8acabde02099a 100644
|
| --- a/chrome/common/extensions/api/feedback_private.idl
|
| +++ b/chrome/common/extensions/api/feedback_private.idl
|
| @@ -91,11 +91,41 @@ namespace feedbackPrivate {
|
| closed
|
| };
|
|
|
| + // Allowed log sources on Chrome OS.
|
| + enum LogSource {
|
| + // /var/log/messages
|
| + messages,
|
| +
|
| + // /var/log/ui/ui.LATEST
|
| + ui_latest
|
| + };
|
| +
|
| + // 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
|
| + // incremental=true repeatedly. To subsequently close the file handle, pass
|
| + // 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);
|
|
|
| interface Functions {
|
| // Returns the email of the currently active or logged in user.
|
| @@ -116,6 +146,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.
|
| + // - 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:
|
| + // - 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 {
|
|
|