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

Unified Diff: chrome/common/extensions/api/feedback_private.idl

Issue 2840103002: Add new API function: feedbackPrivate.readLogSource (Closed)
Patch Set: Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698