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

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

Issue 147923011: Remove unnecessary _profileTypesByIdMap map (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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: Source/devtools/front_end/ProfileLauncherView.js
diff --git a/Source/devtools/front_end/ProfileLauncherView.js b/Source/devtools/front_end/ProfileLauncherView.js
index 7f40ae5375b0421f3a663e22b0963fe1914c8356..824e8f18bf0932cf606c51f8fb701721af3f2bbe 100644
--- a/Source/devtools/front_end/ProfileLauncherView.js
+++ b/Source/devtools/front_end/ProfileLauncherView.js
@@ -152,6 +152,7 @@ WebInspector.MultiProfileLauncherView.prototype = {
var optionElement = document.createElement("input");
labelElement.insertBefore(optionElement, labelElement.firstChild);
this._typeIdToOptionElement[profileType.id] = optionElement;
+ optionElement._profileType = profileType;
optionElement.type = "radio";
optionElement.name = "profile-type";
optionElement.style.hidden = true;
@@ -169,9 +170,8 @@ WebInspector.MultiProfileLauncherView.prototype = {
if (!(typeName in this._typeIdToOptionElement))
typeName = Object.keys(this._typeIdToOptionElement)[0];
this._typeIdToOptionElement[typeName].checked = true;
- this.dispatchEventToListeners(
- WebInspector.MultiProfileLauncherView.EventTypes.ProfileTypeSelected,
- this._panel.getProfileType(typeName));
+ var type = this._typeIdToOptionElement[typeName]._profileType;
loislo 2014/01/29 09:08:55 looks like typeName shold be renamed to typeId
yurys 2014/01/29 09:15:13 Done.
+ this.dispatchEventToListeners(WebInspector.MultiProfileLauncherView.EventTypes.ProfileTypeSelected, type);
},
_controlButtonClicked: function()

Powered by Google App Engine
This is Rietveld 408576698