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

Unified Diff: chrome/browser/resources/plugins.js

Issue 2470063003: Move importModules function to util.js (Closed)
Patch Set: Add suppress Created 4 years, 1 month 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/plugins.js
diff --git a/chrome/browser/resources/plugins.js b/chrome/browser/resources/plugins.js
index 8c8bccee1d4a7317a22b4bd2166834a164154582..f7f2e2658820e16e03122ee57bcde569bbd2ff15 100644
--- a/chrome/browser/resources/plugins.js
+++ b/chrome/browser/resources/plugins.js
@@ -261,19 +261,6 @@ function isPluginPolicyClickToPlay(plugin) {
return plugin.policy_click_to_play == true;
}
-/**
- * Helper to convert callback-based define() API to a promise-based API.
- * @param {!Array<string>} moduleNames
- * @return {!Promise}
- */
-function importModules(moduleNames) {
- return new Promise(function(resolve, reject) {
- define(moduleNames, function(var_args) {
- resolve(Array.prototype.slice.call(arguments, 0));
- });
- });
-}
-
// NOTE: Need to keep a global reference to the |pageImpl| such that it is not
// garbage collected, which causes the pipe to close and future calls from C++
// to JS to get dropped. This also allows tests to make direct calls on it.
« no previous file with comments | « chrome/browser/resources/omnibox/omnibox.js ('k') | chrome/browser/resources/usb_internals/usb_internals.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698