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

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

Issue 2840103002: Add new API function: feedbackPrivate.readLogSource (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 the <code>chrome.feedbackPrivate</code> API to provide Chrome [OS] 5 // Use the <code>chrome.feedbackPrivate</code> API to provide Chrome [OS]
6 // feedback to the Google Feedback servers. 6 // feedback to the Google Feedback servers.
7 namespace feedbackPrivate { 7 namespace feedbackPrivate {
8 8
9 dictionary AttachedFile { 9 dictionary AttachedFile {
10 DOMString name; 10 DOMString name;
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 89
90 // User closed the window altogether. 90 // User closed the window altogether.
91 closed 91 closed
92 }; 92 };
93 93
94 callback GetUserEmailCallback = void(DOMString email); 94 callback GetUserEmailCallback = void(DOMString email);
95 callback GetSystemInformationCallback = 95 callback GetSystemInformationCallback =
96 void(SystemInformation[] systemInformation); 96 void(SystemInformation[] systemInformation);
97 callback SendFeedbackCallback = void(Status status); 97 callback SendFeedbackCallback = void(Status status);
98 callback GetStringsCallback = void(object result); 98 callback GetStringsCallback = void(object result);
99 callback ReadLinesFromFileCallback =
100 void (long numBytesRead, DOMString[] logLines);
99 101
100 interface Functions { 102 interface Functions {
101 // Returns the email of the currently active or logged in user. 103 // Returns the email of the currently active or logged in user.
102 static void getUserEmail(GetUserEmailCallback callback); 104 static void getUserEmail(GetUserEmailCallback callback);
103 105
104 // Returns the system information dictionary. 106 // Returns the system information dictionary.
105 static void getSystemInformation(GetSystemInformationCallback callback); 107 static void getSystemInformation(GetSystemInformationCallback callback);
106 108
107 // Sends a feedback report. 109 // Sends a feedback report.
108 static void sendFeedback(FeedbackInfo feedback, 110 static void sendFeedback(FeedbackInfo feedback,
109 SendFeedbackCallback callback); 111 SendFeedbackCallback callback);
110 112
111 // Gets localized translated strings for feedback. It returns the 113 // Gets localized translated strings for feedback. It returns the
112 // strings as a dictionary mapping from string identifier to the 114 // strings as a dictionary mapping from string identifier to the
113 // translated string to use in the feedback app UI. 115 // translated string to use in the feedback app UI.
114 static void getStrings(GetStringsCallback callback); 116 static void getStrings(GetStringsCallback callback);
115 117
116 // Logs whether the user accepted a prompt to try the Software Removal 118 // Logs whether the user accepted a prompt to try the Software Removal
117 // Tool. 119 // Tool.
118 static void logSrtPromptResult(SrtPromptResult result); 120 static void logSrtPromptResult(SrtPromptResult result);
121
122 // 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.
123 // |offsetBytes|, and reading up to |numBytesToRead| bytes. If the
124 // file is not allowed to be read, or is otherwise unreadable,
125 // returns an empty array. If |numBytesToRead| is 0, reads all the
126 // way to the end of file.
127 //
128 // In addition, can only return whole lines. Reading of only a part
129 // of a line is not allowed. Partial lines will not be returned.
130 static void readLinesFromFile(DOMString filename,
131 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.
132 long numBytesToRead,
133 ReadLinesFromFileCallback callback);
119 }; 134 };
120 135
121 interface Events { 136 interface Events {
122 // Fired when the a user requests the launch of the feedback UI. We're 137 // Fired when the a user requests the launch of the feedback UI. We're
123 // using an event for this versus using the override API since we want 138 // using an event for this versus using the override API since we want
124 // to be invoked, but not showing a UI, so the feedback extension can 139 // to be invoked, but not showing a UI, so the feedback extension can
125 // take a screenshot of the user's desktop. 140 // take a screenshot of the user's desktop.
126 static void onFeedbackRequested(FeedbackInfo feedback); 141 static void onFeedbackRequested(FeedbackInfo feedback);
127 }; 142 };
128 }; 143 };
OLDNEW
« 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