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

Unified Diff: chrome/browser/resources/net_internals/util.js

Issue 3416015: Adds Winsock service providers to log dumps... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 3 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 | « chrome/browser/resources/net_internals/serviceprovidersview.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/net_internals/util.js
===================================================================
--- chrome/browser/resources/net_internals/util.js (revision 59945)
+++ chrome/browser/resources/net_internals/util.js (working copy)
@@ -105,6 +105,18 @@
}
/**
+ * Looks up |key| in |map|, and returns the resulting entry, if there is one.
+ * Otherwise, returns |key|. Intended primarily for use with incomplete
+ * tables, and for reasonable behavior with system enumerations that may be
+ * extended in the future.
+ */
+function tryGetValueWithKey(map, key) {
+ if (key in map)
+ return map[key];
+ return key;
+}
+
+/**
* Builds a string by repeating |str| |count| times.
*/
function makeRepeatedString(str, count) {
« no previous file with comments | « chrome/browser/resources/net_internals/serviceprovidersview.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698