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

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

Issue 2767173002: [MD Extensions] Respond with a load error when loading unpacked fails (Closed)
Patch Set: . Created 3 years, 9 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
Index: chrome/common/extensions/api/developer_private.idl
diff --git a/chrome/common/extensions/api/developer_private.idl b/chrome/common/extensions/api/developer_private.idl
index 6c9aa4327bd110cbf024d27575487d6019ec121c..ec70407223de57b647cd5e09575973539f312a58 100644
--- a/chrome/common/extensions/api/developer_private.idl
+++ b/chrome/common/extensions/api/developer_private.idl
@@ -303,6 +303,10 @@ namespace developerPrivate {
// If false, an alert dialog will show in the event of a reload error.
// Defaults to false.
boolean? failQuietly;
+
+ // If true, populates a LoadError for the response rather than setting
+ // lastError.
+ boolean? populateError;
};
enum PackStatus {
@@ -360,6 +364,30 @@ namespace developerPrivate {
ExtensionInfo? extensionInfo;
};
+ dictionary ErrorFileSource {
+ // The region before the "highlight" portion.
+ // If the region which threw the error was not found, the full contents of
+ // the file will be in the "beforeHighlight" section.
+ DOMString beforeHighlight;
+
+ // The region of the code which threw the error, and should be highlighted.
+ DOMString highlight;
+
+ // The region after the "highlight" portion.
+ DOMString afterHighlight;
+ };
+
+ dictionary LoadError {
+ // The error that occurred when trying to load the extension.
+ DOMString error;
+
+ // The path to the extension.
+ DOMString path;
+
+ // The file source for the error, if it could be retrieved.
+ ErrorFileSource? source;
+ };
+
dictionary RequestFileSourceProperties {
// The ID of the extension owning the file.
DOMString extensionId;
@@ -444,6 +472,7 @@ namespace developerPrivate {
callback VoidCallback = void();
callback RequestFileSourceCallback =
void (RequestFileSourceResponse response);
+ callback LoadErrorCallback = void (optional LoadError error);
interface Functions {
// Runs auto update for extensions and apps immediately.
@@ -503,7 +532,7 @@ namespace developerPrivate {
// Loads a user-selected unpacked item.
// |options| : Additional configuration parameters.
static void loadUnpacked(optional LoadUnpackedOptions options,
- optional VoidCallback callback);
+ optional LoadErrorCallback callback);
// Loads an extension / app.
// |directory| : The directory to load the extension from.

Powered by Google App Engine
This is Rietveld 408576698