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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sources/UISourceCodeFrame.js

Issue 2546473005: [DevTools] Remove unnecessary checks for project types. (Closed)
Patch Set: fixed comment 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
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.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/sources/UISourceCodeFrame.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/UISourceCodeFrame.js b/third_party/WebKit/Source/devtools/front_end/sources/UISourceCodeFrame.js
index 96fda394c6147a6c926286efdedda7dac51f7b64..6da0f29cf87d00306b0008a524b12b59d9f0129f 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/UISourceCodeFrame.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/UISourceCodeFrame.js
@@ -154,14 +154,11 @@ Sources.UISourceCodeFrame = class extends SourceFrame.SourceFrame {
_canEditSource() {
if (Persistence.persistence.binding(this._uiSourceCode))
return true;
- var projectType = this._uiSourceCode.project().type();
- if (projectType === Workspace.projectTypes.Service || projectType === Workspace.projectTypes.Debugger ||
- projectType === Workspace.projectTypes.Formatter)
- return false;
- if (projectType === Workspace.projectTypes.Network &&
- this._uiSourceCode.contentType() === Common.resourceTypes.Document)
+ if (this._uiSourceCode.project().canSetFileContent())
+ return true;
+ if (this._uiSourceCode.isFromServiceProject())
return false;
- return true;
+ return this._uiSourceCode.contentType() !== Common.resourceTypes.Document;
}
_windowFocused(event) {
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698