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

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

Issue 2603913002: DevTools: [Persistence] start searching in JSON/MarkDown files (Closed)
Patch Set: add executable extensions Created 3 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
« no previous file with comments | « no previous file | 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/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 9eec9776bc00fe82e095dac8054272856821c7aa..e843dddd08fa9d2a995f0b7603a746224b48ab13 100644
--- a/third_party/WebKit/Source/devtools/front_end/persistence/FileSystemWorkspaceBinding.js
+++ b/third_party/WebKit/Source/devtools/front_end/persistence/FileSystemWorkspaceBinding.js
@@ -93,7 +93,8 @@ Persistence.FileSystemWorkspaceBinding = class {
return Common.resourceTypes.Image;
if (Persistence.FileSystemWorkspaceBinding._scriptExtensions.has(extension))
return Common.resourceTypes.Script;
- return Common.resourceTypes.Other;
+ return Persistence.FileSystemWorkspaceBinding._binaryExtensions.has(extension) ? Common.resourceTypes.Other :
+ Common.resourceTypes.Document;
}
/**
@@ -177,6 +178,17 @@ Persistence.FileSystemWorkspaceBinding._scriptExtensions = new Set([
Persistence.FileSystemWorkspaceBinding._imageExtensions = Workspace.IsolatedFileSystem.ImageExtensions;
+Persistence.FileSystemWorkspaceBinding._binaryExtensions = new Set([
+ // Executable extensions, roughly taken from https://en.wikipedia.org/wiki/Comparison_of_executable_file_formats
+ 'cmd', 'com', 'exe',
+ // Archive extensions, roughly taken from https://en.wikipedia.org/wiki/List_of_archive_formats
+ 'a', 'ar', 'iso', 'tar', 'bz2', 'gz', 'lz', 'lzma', 'z', '7z', 'apk', 'arc', 'cab', 'dmg', 'jar', 'pak', 'rar', 'zip',
+ // Audio file extensions, roughly taken from https://en.wikipedia.org/wiki/Audio_file_format#List_of_formats
+ '3gp', 'aac', 'aiff', 'flac', 'm4a', 'mmf', 'mp3', 'ogg', 'oga', 'raw', 'sln', 'wav', 'wma', 'webm',
+ // Video file extensions, roughly taken from https://en.wikipedia.org/wiki/Video_file_format
+ 'mkv', 'flv', 'vob', 'ogv', 'gif', 'gifv', 'avi', 'mov', 'qt', 'mp4', 'm4p', 'm4v', 'mpg', 'mpeg'
+]);
+
/**
* @implements {Workspace.Project}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698