| Index: third_party/WebKit/Source/devtools/front_end/persistence/FileSystemMapping.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/workspace/FileSystemMapping.js b/third_party/WebKit/Source/devtools/front_end/persistence/FileSystemMapping.js
|
| similarity index 92%
|
| rename from third_party/WebKit/Source/devtools/front_end/workspace/FileSystemMapping.js
|
| rename to third_party/WebKit/Source/devtools/front_end/persistence/FileSystemMapping.js
|
| index e2224779f4c573445f176d7a8f1c48ca571d5b48..0235e36430262ae712a9b634c71c381c51e08cbe 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/workspace/FileSystemMapping.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/persistence/FileSystemMapping.js
|
| @@ -31,14 +31,14 @@
|
| /**
|
| * @unrestricted
|
| */
|
| -Workspace.FileSystemMapping = class extends Common.Object {
|
| +Persistence.FileSystemMapping = class extends Common.Object {
|
| /**
|
| * @param {!Workspace.IsolatedFileSystemManager} fileSystemManager
|
| */
|
| constructor(fileSystemManager) {
|
| super();
|
| this._fileSystemMappingSetting = Common.settings.createLocalSetting('fileSystemMapping', {});
|
| - /** @type {!Object.<string, !Array.<!Workspace.FileSystemMapping.Entry>>} */
|
| + /** @type {!Object.<string, !Array.<!Persistence.FileSystemMapping.Entry>>} */
|
| this._fileSystemMappings = {};
|
| this._loadFromSettings();
|
|
|
| @@ -106,7 +106,7 @@ Workspace.FileSystemMapping = class extends Common.Object {
|
| for (var i = 0; i < savedFileSystemMappings.length; ++i) {
|
| var savedEntry = savedFileSystemMappings[i];
|
| var entry =
|
| - new Workspace.FileSystemMapping.Entry(fileSystemPath, savedEntry.urlPrefix, savedEntry.pathPrefix, true);
|
| + new Persistence.FileSystemMapping.Entry(fileSystemPath, savedEntry.urlPrefix, savedEntry.pathPrefix, true);
|
| fileSystemMappings.push(entry);
|
| }
|
| }
|
| @@ -200,10 +200,10 @@ Workspace.FileSystemMapping = class extends Common.Object {
|
| * @param {boolean} configurable
|
| */
|
| _innerAddFileMapping(fileSystemPath, urlPrefix, pathPrefix, configurable) {
|
| - var entry = new Workspace.FileSystemMapping.Entry(fileSystemPath, urlPrefix, pathPrefix, configurable);
|
| + var entry = new Persistence.FileSystemMapping.Entry(fileSystemPath, urlPrefix, pathPrefix, configurable);
|
| this._fileSystemMappings[fileSystemPath].push(entry);
|
| this._rebuildIndexes();
|
| - this.dispatchEventToListeners(Workspace.FileSystemMapping.Events.FileMappingAdded, entry);
|
| + this.dispatchEventToListeners(Persistence.FileSystemMapping.Events.FileMappingAdded, entry);
|
| }
|
|
|
| /**
|
| @@ -218,12 +218,12 @@ Workspace.FileSystemMapping = class extends Common.Object {
|
| this._fileSystemMappings[fileSystemPath].remove(entry);
|
| this._rebuildIndexes();
|
| this._saveToSettings();
|
| - this.dispatchEventToListeners(Workspace.FileSystemMapping.Events.FileMappingRemoved, entry);
|
| + this.dispatchEventToListeners(Persistence.FileSystemMapping.Events.FileMappingRemoved, entry);
|
| }
|
|
|
| /**
|
| * @param {string} url
|
| - * @return {?Workspace.FileSystemMapping.Entry}
|
| + * @return {?Persistence.FileSystemMapping.Entry}
|
| */
|
| _mappingEntryForURL(url) {
|
| for (var i = this._urlPrefixes.length - 1; i >= 0; --i) {
|
| @@ -237,7 +237,7 @@ Workspace.FileSystemMapping = class extends Common.Object {
|
| /**
|
| * @param {string} fileSystemPath
|
| * @param {string} filePath
|
| - * @return {?Workspace.FileSystemMapping.Entry}
|
| + * @return {?Persistence.FileSystemMapping.Entry}
|
| */
|
| _mappingEntryForPath(fileSystemPath, filePath) {
|
| var entries = this._fileSystemMappings[fileSystemPath];
|
| @@ -261,7 +261,7 @@ Workspace.FileSystemMapping = class extends Common.Object {
|
| /**
|
| * @param {string} fileSystemPath
|
| * @param {string} pathPrefix
|
| - * @return {?Workspace.FileSystemMapping.Entry}
|
| + * @return {?Persistence.FileSystemMapping.Entry}
|
| */
|
| _configurableMappingEntryForPathPrefix(fileSystemPath, pathPrefix) {
|
| var entries = this._fileSystemMappings[fileSystemPath];
|
| @@ -274,7 +274,7 @@ Workspace.FileSystemMapping = class extends Common.Object {
|
|
|
| /**
|
| * @param {string} fileSystemPath
|
| - * @return {!Array.<!Workspace.FileSystemMapping.Entry>}
|
| + * @return {!Array.<!Persistence.FileSystemMapping.Entry>}
|
| */
|
| mappingEntries(fileSystemPath) {
|
| return this._fileSystemMappings[fileSystemPath].slice();
|
| @@ -361,7 +361,7 @@ Workspace.FileSystemMapping = class extends Common.Object {
|
| };
|
|
|
| /** @enum {symbol} */
|
| -Workspace.FileSystemMapping.Events = {
|
| +Persistence.FileSystemMapping.Events = {
|
| FileMappingAdded: Symbol('FileMappingAdded'),
|
| FileMappingRemoved: Symbol('FileMappingRemoved')
|
| };
|
| @@ -369,7 +369,7 @@ Workspace.FileSystemMapping.Events = {
|
| /**
|
| * @unrestricted
|
| */
|
| -Workspace.FileSystemMapping.Entry = class {
|
| +Persistence.FileSystemMapping.Entry = class {
|
| /**
|
| * @param {string} fileSystemPath
|
| * @param {string} urlPrefix
|
| @@ -385,6 +385,6 @@ Workspace.FileSystemMapping.Entry = class {
|
| };
|
|
|
| /**
|
| - * @type {!Workspace.FileSystemMapping}
|
| + * @type {!Persistence.FileSystemMapping}
|
| */
|
| Workspace.fileSystemMapping;
|
|
|