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

Unified Diff: third_party/WebKit/Source/devtools/front_end/bindings/NetworkMapping.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/bindings/NetworkMapping.js
diff --git a/third_party/WebKit/Source/devtools/front_end/bindings/NetworkMapping.js b/third_party/WebKit/Source/devtools/front_end/bindings/NetworkMapping.js
index 58752dba821cc0e6e2da5a8bfec16c49d7b0cafa..dff680f7a3152fd4729dca0a75cee956667a0fc7 100644
--- a/third_party/WebKit/Source/devtools/front_end/bindings/NetworkMapping.js
+++ b/third_party/WebKit/Source/devtools/front_end/bindings/NetworkMapping.js
@@ -77,17 +77,6 @@ WebInspector.NetworkMapping.prototype = {
},
/**
- * @param {!WebInspector.UISourceCode} uiSourceCode
- * @return {string}
- */
- networkURL: function(uiSourceCode)
- {
- if (uiSourceCode.project().type() === WebInspector.projectTypes.FileSystem)
- return "";
- return uiSourceCode.url();
- },
-
- /**
* @param {!WebInspector.Target} target
* @param {?WebInspector.ResourceTreeFrame} frame
* @param {string} url
@@ -157,10 +146,8 @@ WebInspector.NetworkMapping.prototype = {
*/
addMapping: function(networkUISourceCode, uiSourceCode)
{
- var url = this.networkURL(networkUISourceCode);
- var path = uiSourceCode.url();
var fileSystemPath = WebInspector.FileSystemWorkspaceBinding.fileSystemPath(uiSourceCode.project().id());
- this._fileSystemMapping.addMappingForResource(url, fileSystemPath, path);
+ this._fileSystemMapping.addMappingForResource(networkUISourceCode.url(), fileSystemPath, uiSourceCode.url());
},
/**
@@ -168,8 +155,7 @@ WebInspector.NetworkMapping.prototype = {
*/
removeMapping: function(uiSourceCode)
{
- var networkURL = this.networkURL(uiSourceCode);
- this._fileSystemMapping.removeMappingForURL(networkURL);
+ this._fileSystemMapping.removeMappingForURL(uiSourceCode.url());
},
/**
@@ -194,7 +180,7 @@ WebInspector.NetworkMapping.prototype = {
function listener(event)
{
var uiSourceCode = /** @type {!WebInspector.UISourceCode} */ (event.data);
- if (this.networkURL(uiSourceCode) === url) {
+ if (uiSourceCode.url() === url) {
WebInspector.Revealer.reveal(uiSourceCode.uiLocation(lineNumber, columnNumber));
this._workspace.removeEventListener(WebInspector.Workspace.Events.UISourceCodeAdded, listener, this);
}

Powered by Google App Engine
This is Rietveld 408576698