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

Unified Diff: third_party/WebKit/Source/devtools/front_end/bindings/FileSystemWorkspaceBinding.js

Issue 1564113003: DevTools: merge uisourcecode's url-alike members. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments addressed Created 4 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: third_party/WebKit/Source/devtools/front_end/bindings/FileSystemWorkspaceBinding.js
diff --git a/third_party/WebKit/Source/devtools/front_end/bindings/FileSystemWorkspaceBinding.js b/third_party/WebKit/Source/devtools/front_end/bindings/FileSystemWorkspaceBinding.js
index 3bad7dbe6f5408fe13d286647303276b72b2ff3b..d8359a6ee68c83df635602a87f2bd2bc2b705004 100644
--- a/third_party/WebKit/Source/devtools/front_end/bindings/FileSystemWorkspaceBinding.js
+++ b/third_party/WebKit/Source/devtools/front_end/bindings/FileSystemWorkspaceBinding.js
@@ -66,7 +66,7 @@ WebInspector.FileSystemWorkspaceBinding.projectId = function(fileSystemPath)
WebInspector.FileSystemWorkspaceBinding.relativePath = function(uiSourceCode)
{
var baseURL = /** @type {!WebInspector.FileSystemWorkspaceBinding.FileSystem}*/(uiSourceCode.project())._fileSystemBaseURL;
- return uiSourceCode.path().substring(baseURL.length).split("/");
+ return uiSourceCode.url().substring(baseURL.length).split("/");
}
/**
@@ -203,7 +203,7 @@ WebInspector.FileSystemWorkspaceBinding.FileSystem.prototype = {
*/
_filePathForUISourceCode: function(uiSourceCode)
{
- return uiSourceCode.path().substring(this._fileSystemPath.length);
+ return uiSourceCode.url().substring(this._fileSystemPath.length);
},
/**
@@ -271,7 +271,7 @@ WebInspector.FileSystemWorkspaceBinding.FileSystem.prototype = {
rename: function(uiSourceCode, newName, callback)
{
if (newName === uiSourceCode.name()) {
- callback(true, uiSourceCode.name(), uiSourceCode.originURL(), uiSourceCode.contentType());
+ callback(true, uiSourceCode.name(), uiSourceCode.url(), uiSourceCode.contentType());
return;
}
@@ -295,10 +295,10 @@ WebInspector.FileSystemWorkspaceBinding.FileSystem.prototype = {
filePath = parentPath + "/" + newName;
filePath = filePath.substr(1);
var extension = this._extensionForPath(newName);
- var newOriginURL = this._fileSystemBaseURL + filePath;
+ var newURL = this._fileSystemBaseURL + filePath;
var newContentType = WebInspector.FileSystemWorkspaceBinding._contentTypeForExtension(extension);
this.renameUISourceCode(uiSourceCode, newName);
- callback(true, newName, newOriginURL, newContentType);
+ callback(true, newName, newURL, newContentType);
}
},
@@ -408,11 +408,11 @@ WebInspector.FileSystemWorkspaceBinding.FileSystem.prototype = {
/**
* @override
- * @param {string} path
+ * @param {string} url
*/
- excludeFolder: function(path)
+ excludeFolder: function(url)
{
- var relativeFolder = path.substring(this._fileSystemBaseURL.length);
+ var relativeFolder = url.substring(this._fileSystemBaseURL.length);
if (!relativeFolder.startsWith("/"))
relativeFolder = "/" + relativeFolder;
if (!relativeFolder.endsWith("/"))
@@ -422,8 +422,8 @@ WebInspector.FileSystemWorkspaceBinding.FileSystem.prototype = {
var uiSourceCodes = this.uiSourceCodes().slice();
for (var i = 0; i < uiSourceCodes.length; ++i) {
var uiSourceCode = uiSourceCodes[i];
- if (uiSourceCode.path().startsWith(path))
- this.removeUISourceCode(uiSourceCode.path());
+ if (uiSourceCode.url().startsWith(url))
+ this.removeUISourceCode(uiSourceCode.url());
}
},
@@ -506,7 +506,7 @@ WebInspector.FileSystemWorkspaceBinding.FileSystem.prototype = {
*/
_fileChanged: function(path)
{
- var uiSourceCode = this.uiSourceCode(path);
+ var uiSourceCode = this.uiSourceCodeForURL(path);
if (!uiSourceCode) {
this._addFile(path);
return;

Powered by Google App Engine
This is Rietveld 408576698