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

Unified Diff: remoting/webapp/base/js/base.js

Issue 1217643002: Added HostListApl implementation to connect to legacy directory and GCD. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gcd-e2e
Patch Set: changed LegacyHostListApi not to expect auth code with not client ID Created 5 years, 5 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: remoting/webapp/base/js/base.js
diff --git a/remoting/webapp/base/js/base.js b/remoting/webapp/base/js/base.js
index ac6713209e52b5263001041048cc60cac3e77139..6bc2f5eddd95c93c40bcc9167b02174e78c63591 100644
--- a/remoting/webapp/base/js/base.js
+++ b/remoting/webapp/base/js/base.js
@@ -227,6 +227,16 @@ base.isEmptyObject = function(object) {
};
/**
+ * @param {!Map<K,V>} map
+ * @return {!Set<K>} A set of the keys in |map|.
+ * @template K
+ * @template V
+ */
+base.keySet = function(map) {
kelvinp 2015/07/20 18:00:51 Why can't we call map.keys() directly? Is this tr
John Williams 2015/07/20 21:43:10 I need a Set (so I can test for membership), but M
+ return new Set(/** @type {!Iterable} */ (/** @type {*} */ (map.keys())));
+};
+
+/**
* @type {boolean|undefined}
* @private
*/

Powered by Google App Engine
This is Rietveld 408576698