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

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

Issue 974903004: [Extensions] Update closure compiler developerPrivate extern with enums (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Typo fix 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
« no previous file with comments | « no previous file | third_party/closure_compiler/externs/developer_private.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/extensions/pack_extension_overlay.js
diff --git a/chrome/browser/resources/extensions/pack_extension_overlay.js b/chrome/browser/resources/extensions/pack_extension_overlay.js
index 8cb7725d026d04bac48c85a440f1c90607b272f0..03e6180a03d4400aa99369f9788a749edefdf954 100644
--- a/chrome/browser/resources/extensions/pack_extension_overlay.js
+++ b/chrome/browser/resources/extensions/pack_extension_overlay.js
@@ -55,8 +55,10 @@ cr.define('extensions', function() {
/**
* Utility function which asks the C++ to show a platform-specific file
* select dialog, and set the value property of |node| to the selected path.
- * @param {SelectType} selectType The type of selection to use.
- * @param {FileType} fileType The type of file to select.
+ * @param {chrome.developerPrivate.SelectType} selectType
+ * The type of selection to use.
+ * @param {chrome.developerPrivate.FileType} fileType
+ * The type of file to select.
* @param {HTMLInputElement} node The node to set the value of.
* @private
*/
@@ -75,8 +77,8 @@ cr.define('extensions', function() {
*/
handleBrowseExtensionDir_: function(e) {
this.showFileDialog_(
- 'FOLDER',
- 'LOAD',
+ chrome.developerPrivate.SelectType.FOLDER,
+ chrome.developerPrivate.FileType.LOAD,
/** @type {HTMLInputElement} */ ($('extension-root-dir')));
},
@@ -87,8 +89,8 @@ cr.define('extensions', function() {
*/
handleBrowsePrivateKey_: function(e) {
this.showFileDialog_(
- 'FILE',
- 'PEM',
+ chrome.developerPrivate.SelectType.FILE,
+ chrome.developerPrivate.FileType.PEM,
/** @type {HTMLInputElement} */ ($('extension-private-key')));
},
@@ -113,16 +115,14 @@ cr.define('extensions', function() {
extensions.ExtensionSettings.showOverlay(null);
};
- // TODO(devlin): Once we expose enums on extension APIs, we should use
- // those objects, instead of a string.
switch (response.status) {
- case 'SUCCESS':
+ case chrome.developerPrivate.PackStatus.SUCCESS:
alertTitle = loadTimeData.getString('packExtensionOverlay');
alertOk = loadTimeData.getString('ok');
alertOkCallback = closeAlert;
// No 'Cancel' option.
break;
- case 'WARNING':
+ case chrome.developerPrivate.PackStatus.WARNING:
alertTitle = loadTimeData.getString('packExtensionWarningTitle');
alertOk = loadTimeData.getString('packExtensionProceedAnyway');
alertCancel = loadTimeData.getString('cancel');
@@ -136,7 +136,7 @@ cr.define('extensions', function() {
}.bind(this);
alertCancelCallback = closeAlert;
break;
- case 'ERROR':
+ case chrome.developerPrivate.PackStatus.ERROR:
alertTitle = loadTimeData.getString('packExtensionErrorTitle');
alertOk = loadTimeData.getString('ok');
alertOkCallback = function() {
« no previous file with comments | « no previous file | third_party/closure_compiler/externs/developer_private.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698