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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/workspace/FileSystemMapping.js

Issue 2422803002: DevTools: prefix node.js scripts's sourceURL with "file://" to make them a valid url (Closed)
Patch Set: WI.ParsedURL.platformPathToURL Created 4 years, 2 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 FileMappingRemoved: Symbol("FileMappingRemoved") 47 FileMappingRemoved: Symbol("FileMappingRemoved")
48 } 48 }
49 49
50 WebInspector.FileSystemMapping.prototype = { 50 WebInspector.FileSystemMapping.prototype = {
51 _loadFromSettings: function() 51 _loadFromSettings: function()
52 { 52 {
53 var savedMapping = this._fileSystemMappingSetting.get(); 53 var savedMapping = this._fileSystemMappingSetting.get();
54 this._fileSystemMappings = {}; 54 this._fileSystemMappings = {};
55 for (var fileSystemPath in savedMapping) { 55 for (var fileSystemPath in savedMapping) {
56 var savedFileSystemMappings = savedMapping[fileSystemPath]; 56 var savedFileSystemMappings = savedMapping[fileSystemPath];
57 fileSystemPath = WebInspector.IsolatedFileSystemManager.normalizePat h(fileSystemPath); 57 fileSystemPath = WebInspector.ParsedURL.platformPathToURL(fileSystem Path);
58 this._fileSystemMappings[fileSystemPath] = []; 58 this._fileSystemMappings[fileSystemPath] = [];
59 var fileSystemMappings = this._fileSystemMappings[fileSystemPath]; 59 var fileSystemMappings = this._fileSystemMappings[fileSystemPath];
60 60
61 for (var i = 0; i < savedFileSystemMappings.length; ++i) { 61 for (var i = 0; i < savedFileSystemMappings.length; ++i) {
62 var savedEntry = savedFileSystemMappings[i]; 62 var savedEntry = savedFileSystemMappings[i];
63 var entry = new WebInspector.FileSystemMapping.Entry(fileSystemP ath, savedEntry.urlPrefix, savedEntry.pathPrefix, true); 63 var entry = new WebInspector.FileSystemMapping.Entry(fileSystemP ath, savedEntry.urlPrefix, savedEntry.pathPrefix, true);
64 fileSystemMappings.push(entry); 64 fileSystemMappings.push(entry);
65 } 65 }
66 } 66 }
67 67
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 this.fileSystemPath = fileSystemPath; 342 this.fileSystemPath = fileSystemPath;
343 this.urlPrefix = urlPrefix; 343 this.urlPrefix = urlPrefix;
344 this.pathPrefix = pathPrefix; 344 this.pathPrefix = pathPrefix;
345 this.configurable = configurable; 345 this.configurable = configurable;
346 } 346 }
347 347
348 /** 348 /**
349 * @type {!WebInspector.FileSystemMapping} 349 * @type {!WebInspector.FileSystemMapping}
350 */ 350 */
351 WebInspector.fileSystemMapping; 351 WebInspector.fileSystemMapping;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698