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

Unified Diff: chrome/browser/resources/extensions/extension_loader.js

Issue 979453002: [Extensions] Make chrome://extensions use developerPrivate for unpacked loading (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments Created 5 years, 10 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/browser/resources/extensions/extension_loader.js
diff --git a/chrome/browser/resources/extensions/extension_loader.js b/chrome/browser/resources/extensions/extension_loader.js
index e089c6f29f9c9ad5f58c58e7527825653bc2b482..95def83d8bccb227975f4d68eb0deae6ada1a824 100644
--- a/chrome/browser/resources/extensions/extension_loader.js
+++ b/chrome/browser/resources/extensions/extension_loader.js
@@ -186,11 +186,25 @@ cr.define('extensions', function() {
ExtensionLoader.prototype = {
/**
+ * Whether or not we are currently loading an unpacked extension.
+ * @private {boolean}
+ */
+ isLoading_: false,
+
+ /**
* Begin the sequence of loading an unpacked extension. If an error is
* encountered, this object will get notified via notifyFailed().
*/
loadUnpacked: function() {
- chrome.send('extensionLoaderLoadUnpacked');
+ if (this.isLoading_) // Only one running load at a time.
+ return;
+ this.isLoading_ = true;
+ chrome.developerPrivate.loadUnpacked({failQuietly: true}, function() {
+ // Check lastError to avoid the log, but don't do anything with it -
+ // error-handling is done on the C++ side.
+ var lastError = chrome.runtime.lastError;
+ this.isLoading_ = false;
+ }.bind(this));
},
/**
« no previous file with comments | « chrome/browser/extensions/unpacked_installer.cc ('k') | chrome/browser/ui/webui/extensions/extension_loader_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698