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

Unified Diff: third_party/WebKit/Source/devtools/front_end/workspace/IsolatedFileSystem.js

Issue 2780903003: DevTools: [Workspaces] remove support for .devtools file (Closed)
Patch Set: rebaseline Created 3 years, 8 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
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/workspace/FileSystemMapping.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/workspace/IsolatedFileSystem.js
diff --git a/third_party/WebKit/Source/devtools/front_end/workspace/IsolatedFileSystem.js b/third_party/WebKit/Source/devtools/front_end/workspace/IsolatedFileSystem.js
index d14105826eff57da37305e40b191836d45eadf59..594f826a709c58bccc427d77ac81cb35aeb7b912 100644
--- a/third_party/WebKit/Source/devtools/front_end/workspace/IsolatedFileSystem.js
+++ b/third_party/WebKit/Source/devtools/front_end/workspace/IsolatedFileSystem.js
@@ -46,8 +46,6 @@ Workspace.IsolatedFileSystem = class {
this._excludedFoldersSetting = Common.settings.createLocalSetting('workspaceExcludedFolders', {});
/** @type {!Set<string>} */
this._excludedFolders = new Set(this._excludedFoldersSetting.get()[path] || []);
- /** @type {!Set<string>} */
- this._nonConfigurableExcludedFolders = new Set();
/** @type {!Set<string>} */
this._initialFilePaths = new Set();
@@ -69,27 +67,9 @@ Workspace.IsolatedFileSystem = class {
return Promise.resolve(/** @type {?Workspace.IsolatedFileSystem} */ (null));
var fileSystem = new Workspace.IsolatedFileSystem(manager, path, embedderPath, domFileSystem);
- var fileContentPromise = fileSystem.requestFileContentPromise('.devtools');
- return fileContentPromise.then(onConfigAvailable)
+ return fileSystem._initializeFilePaths()
.then(() => fileSystem)
.catchException(/** @type {?Workspace.IsolatedFileSystem} */ (null));
-
- /**
- * @param {?string} projectText
- * @return {!Promise}
- */
- function onConfigAvailable(projectText) {
- if (projectText) {
- try {
- var projectObject = JSON.parse(projectText);
- fileSystem._initializeProject(
- typeof projectObject === 'object' ? /** @type {!Object} */ (projectObject) : null);
- } catch (e) {
- Common.console.error('Invalid project file: ' + projectText);
- }
- }
- return fileSystem._initializeFilePaths();
- }
}
/**
@@ -156,29 +136,6 @@ Workspace.IsolatedFileSystem = class {
}
/**
- * @param {?Object} projectObject
- */
- _initializeProject(projectObject) {
- this._projectObject = projectObject;
-
- var projectExcludes = this.projectProperty('excludes');
- if (Array.isArray(projectExcludes)) {
- for (var folder of /** @type {!Array<*>} */ (projectExcludes)) {
- if (typeof folder === 'string')
- this._nonConfigurableExcludedFolders.add(folder);
- }
- }
- }
-
- /**
- * @param {string} key
- * @return {*}
- */
- projectProperty(key) {
- return this._projectObject ? this._projectObject[key] : null;
- }
-
- /**
* @return {!Promise}
*/
_initializeFilePaths() {
@@ -574,7 +531,7 @@ Workspace.IsolatedFileSystem = class {
* @return {boolean}
*/
_isFileExcluded(folderPath) {
- if (this._nonConfigurableExcludedFolders.has(folderPath) || this._excludedFolders.has(folderPath))
+ if (this._excludedFolders.has(folderPath))
return true;
var regex = this._manager.workspaceFolderExcludePatternSetting().asRegExp();
return !!(regex && regex.test(folderPath));
@@ -588,13 +545,6 @@ Workspace.IsolatedFileSystem = class {
}
/**
- * @return {!Set<string>}
- */
- nonConfigurableExcludedFolders() {
- return this._nonConfigurableExcludedFolders;
- }
-
- /**
* @param {string} query
* @param {!Common.Progress} progress
* @param {function(!Array.<string>)} callback
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/workspace/FileSystemMapping.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698