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

Unified Diff: third_party/WebKit/Source/devtools/front_end/bindings/NetworkMapping.js

Issue 2295693003: DevTools: cleanup WI.NetworkMapping nits (Closed)
Patch Set: Created 4 years, 4 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 | third_party/WebKit/Source/devtools/front_end/settings/SettingsScreen.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/bindings/NetworkMapping.js
diff --git a/third_party/WebKit/Source/devtools/front_end/bindings/NetworkMapping.js b/third_party/WebKit/Source/devtools/front_end/bindings/NetworkMapping.js
index 22182e1b208d82c96531067d83ca05e4a544ddd4..6aa4d3eec2f244c1cd4051488980b66caff8daca 100644
--- a/third_party/WebKit/Source/devtools/front_end/bindings/NetworkMapping.js
+++ b/third_party/WebKit/Source/devtools/front_end/bindings/NetworkMapping.js
@@ -19,10 +19,8 @@ WebInspector.NetworkMapping = function(targetManager, workspace, fileSystemWorks
// For now, following block is here primarily for testing since in the real life, network manager is created early enough to capture those events.
var fileSystemManager = fileSystemWorkspaceBinding.fileSystemManager();
- for (var path of fileSystemManager.fileSystemPaths()) {
- var fileSystem = fileSystemManager.fileSystem(path);
- this._fileSystemAdded(new WebInspector.Event(fileSystemManager, WebInspector.IsolatedFileSystemManager.Events.FileSystemAdded, fileSystem));
- }
+ for (var fileSystem of fileSystemManager.fileSystems())
+ this._addMappingsForFilesystem(fileSystem);
dgozman 2016/08/31 00:08:35 You don't issue fileSystemMappingChanged here anym
lushnikov 2016/08/31 00:19:30 it is an event listener
if (fileSystemManager.fileSystemsLoaded())
this._fileSystemsLoaded();
@@ -41,8 +39,17 @@ WebInspector.NetworkMapping.prototype = {
*/
_fileSystemAdded: function(event)
{
- this._addingFileSystem = true;
var fileSystem = /** @type {!WebInspector.IsolatedFileSystem} */ (event.data);
+ this._addMappingsForFilesystem(fileSystem);
+ this._fileSystemMappingChanged();
+ },
+
+ /**
+ * @param {!WebInspector.IsolatedFileSystem} fileSystem
+ */
+ _addMappingsForFilesystem: function(fileSystem)
+ {
+ this._addingFileSystem = true;
this._fileSystemMapping.addFileSystem(fileSystem.path());
var mappings = fileSystem.projectProperty("mappings");
@@ -57,7 +64,6 @@ WebInspector.NetworkMapping.prototype = {
this._fileSystemMapping.addNonConfigurableFileMapping(fileSystem.path(), url, folder);
}
this._addingFileSystem = false;
- this._fileSystemMappingChanged();
},
/**
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/settings/SettingsScreen.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698