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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js

Issue 2376583002: DevTools: remove WI.NetworkMapping.networkURL (Closed)
Patch Set: do not blackbox fs uiSourceCodes Created 4 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
Index: third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js b/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js
index c02ea12216eda0fd8c6b6d96b84fa775492dacdb..d66dee7c3c7f815989075cb06d5490684d501479 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js
@@ -791,11 +791,11 @@ WebInspector.SourcesPanel.prototype = {
{
WebInspector.NavigatorView.appendAddFolderItem(contextMenu);
if (uiSourceCode.project().type() === WebInspector.projectTypes.FileSystem) {
- var hasMappings = !!this._networkMapping.networkURL(uiSourceCode);
- if (!hasMappings)
+ var binding = WebInspector.persistence.binding(uiSourceCode);
+ if (!binding)
contextMenu.appendItem(WebInspector.UIString.capitalize("Map to ^network ^resource\u2026"), this.mapFileSystemToNetwork.bind(this, uiSourceCode));
else
- contextMenu.appendItem(WebInspector.UIString.capitalize("Remove ^network ^mapping"), this._removeNetworkMapping.bind(this, uiSourceCode));
+ contextMenu.appendItem(WebInspector.UIString.capitalize("Remove ^network ^mapping"), this._removeNetworkMapping.bind(this, binding.network));
}
/**
@@ -809,8 +809,7 @@ WebInspector.SourcesPanel.prototype = {
if (uiSourceCode.project().type() === WebInspector.projectTypes.Network || uiSourceCode.project().type() === WebInspector.projectTypes.ContentScripts) {
if (!this._workspace.projects().filter(filterProject).length)
return;
- var networkURL = this._networkMapping.networkURL(uiSourceCode);
- if (this._networkMapping.uiSourceCodeForURLForAnyTarget(networkURL) === uiSourceCode)
+ if (this._networkMapping.uiSourceCodeForURLForAnyTarget(uiSourceCode.url()) === uiSourceCode)
contextMenu.appendItem(WebInspector.UIString.capitalize("Map to ^file ^system ^resource\u2026"), this.mapNetworkToFileSystem.bind(this, uiSourceCode));
}
},

Powered by Google App Engine
This is Rietveld 408576698