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

Unified Diff: Source/devtools/front_end/utilities.js

Issue 213423010: DevTools: Migrate General tab settings to extensions (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Comments addressed Created 6 years, 9 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 | « Source/devtools/front_end/modules.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/utilities.js
diff --git a/Source/devtools/front_end/utilities.js b/Source/devtools/front_end/utilities.js
index b71989faf990a879692f2a0b55a2c18d92babcc4..34426db7e17b3dc59582bd21c2eeac79a67bf131 100644
--- a/Source/devtools/front_end/utilities.js
+++ b/Source/devtools/front_end/utilities.js
@@ -1391,6 +1391,43 @@ StringMap.prototype = {
/**
* @constructor
+ * @extends {StringMap.<Set.<!T>>}
+ * @template T
+ */
+var StringMultimap = function()
+{
+ StringMap.call(this);
+}
+
+StringMultimap.prototype = {
+ /**
+ * @param {string} key
+ * @param {T} value
+ */
+ put: function(key, value)
+ {
+ if (key === "__proto__") {
+ if (!this._hasProtoKey) {
+ ++this._size;
+ this._hasProtoKey = true;
+ /** @type {!Set.<T>} */
+ this._protoValue = new Set();
+ }
+ this._protoValue.add(value);
+ return;
+ }
+ if (!Object.prototype.hasOwnProperty.call(this._map, key)) {
+ ++this._size;
+ this._map[key] = new Set();
+ }
+ this._map[key].add(value);
+ },
+
+ __proto__: StringMap.prototype
+}
+
+/**
+ * @constructor
*/
var StringSet = function()
{
« no previous file with comments | « Source/devtools/front_end/modules.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698