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

Unified Diff: Source/devtools/front_end/workspace/Workspace.js

Issue 698053003: DevTools: do not show "there are unsaved changes" dialog for network resources (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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: Source/devtools/front_end/workspace/Workspace.js
diff --git a/Source/devtools/front_end/workspace/Workspace.js b/Source/devtools/front_end/workspace/Workspace.js
index a41d1453582de0879b966ee42baa5011b487ce3e..8f84634b788492c5f692a908fb197547691e10bf 100644
--- a/Source/devtools/front_end/workspace/Workspace.js
+++ b/Source/devtools/front_end/workspace/Workspace.js
@@ -600,11 +600,21 @@ WebInspector.Workspace.prototype = {
*/
unsavedSourceCodes: function()
{
+ /**
+ * @param {!WebInspector.UISourceCode} sourceCode
+ * @return {boolean}
+ */
function filterUnsaved(sourceCode)
{
return sourceCode.isDirty();
}
- return this.uiSourceCodes().filter(filterUnsaved);
+
+ var unsavedSourceCodes = [];
+ var projects = this.projectsForType(WebInspector.projectTypes.FileSystem);
+ for (var i = 0; i < projects.length; ++i)
+ unsavedSourceCodes = unsavedSourceCodes.concat(projects[i].uiSourceCodes().filter(filterUnsaved));
+
+ return unsavedSourceCodes;
},
/**
« 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