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

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

Issue 2537233003: DevTools: [Persistence] sync working copies of UISourceCodes (Closed)
Patch Set: address comments 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/persistence/Persistence.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/SourcesView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/SourcesView.js b/third_party/WebKit/Source/devtools/front_end/sources/SourcesView.js
index 9aad4469aab00d2951779ab612ea9ac279797a04..030602f53d91557ec67d3c810f3d2016b71d33f6 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/SourcesView.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/SourcesView.js
@@ -70,8 +70,10 @@ Sources.SourcesView = class extends UI.VBox {
var unsavedSourceCodes = [];
var projects = Workspace.workspace.projectsForType(Workspace.projectTypes.FileSystem);
- for (var i = 0; i < projects.length; ++i)
- unsavedSourceCodes = unsavedSourceCodes.concat(projects[i].uiSourceCodes().filter(isUnsaved));
+ for (var i = 0; i < projects.length; ++i) {
+ unsavedSourceCodes =
+ unsavedSourceCodes.concat(projects[i].uiSourceCodes().filter(sourceCode => sourceCode.isDirty()));
+ }
if (!unsavedSourceCodes.length)
return;
@@ -80,17 +82,6 @@ Sources.SourcesView = class extends UI.VBox {
UI.viewManager.showView('sources');
for (var i = 0; i < unsavedSourceCodes.length; ++i)
Common.Revealer.reveal(unsavedSourceCodes[i]);
-
- /**
- * @param {!Workspace.UISourceCode} sourceCode
- * @return {boolean}
- */
- function isUnsaved(sourceCode) {
- var binding = Persistence.persistence.binding(sourceCode);
- if (binding)
- return binding.network.isDirty();
- return sourceCode.isDirty();
- }
}
if (!window.opener)
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/persistence/Persistence.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698