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

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

Issue 2587533002: DevTools: consistently use relative name for filesystem resources. (Closed)
Patch Set: same Created 4 years 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/persistence/FileSystemWorkspaceBinding.js
diff --git a/third_party/WebKit/Source/devtools/front_end/persistence/FileSystemWorkspaceBinding.js b/third_party/WebKit/Source/devtools/front_end/persistence/FileSystemWorkspaceBinding.js
index 8091642bebe380935fc48ef7a856273015a9bb6b..9eec9776bc00fe82e095dac8054272856821c7aa 100644
--- a/third_party/WebKit/Source/devtools/front_end/persistence/FileSystemWorkspaceBinding.js
+++ b/third_party/WebKit/Source/devtools/front_end/persistence/FileSystemWorkspaceBinding.js
@@ -198,6 +198,7 @@ Persistence.FileSystemWorkspaceBinding.FileSystem = class extends Workspace.Proj
this._fileSystem = isolatedFileSystem;
this._fileSystemBaseURL = this._fileSystem.path() + '/';
+ this._fileSystemParentURL = this._fileSystemBaseURL.substr(0, fileSystemPath.lastIndexOf('/') + 1);
this._fileSystemWorkspaceBinding = fileSystemWorkspaceBinding;
this._fileSystemPath = fileSystemPath;
@@ -305,6 +306,17 @@ Persistence.FileSystemWorkspaceBinding.FileSystem = class extends Workspace.Proj
/**
* @override
+ * @param {!Workspace.UISourceCode} uiSourceCode
+ * @return {string}
+ */
+ fullDisplayName(uiSourceCode) {
+ var baseURL =
+ /** @type {!Persistence.FileSystemWorkspaceBinding.FileSystem}*/ (uiSourceCode.project())._fileSystemParentURL;
+ return uiSourceCode.url().substring(baseURL.length);
+ }
+
+ /**
+ * @override
* @return {boolean}
*/
canRename() {

Powered by Google App Engine
This is Rietveld 408576698