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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/persistence/Persistence.js

Issue 2384783003: DevTools: split Sources tree into Network and Filesystem trees. (Closed)
Patch Set: review comments addressed 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @constructor 6 * @constructor
7 * @extends {WebInspector.Object} 7 * @extends {WebInspector.Object}
8 * @param {!WebInspector.Workspace} workspace 8 * @param {!WebInspector.Workspace} workspace
9 * @param {!WebInspector.BreakpointManager} breakpointManager 9 * @param {!WebInspector.BreakpointManager} breakpointManager
10 * @param {!WebInspector.FileSystemMapping} fileSystemMapping 10 * @param {!WebInspector.FileSystemMapping} fileSystemMapping
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 /** 258 /**
259 * @param {!WebInspector.UISourceCode} uiSourceCode 259 * @param {!WebInspector.UISourceCode} uiSourceCode
260 * @return {?WebInspector.PersistenceBinding} 260 * @return {?WebInspector.PersistenceBinding}
261 */ 261 */
262 binding: function(uiSourceCode) 262 binding: function(uiSourceCode)
263 { 263 {
264 return uiSourceCode[WebInspector.Persistence._binding] || null; 264 return uiSourceCode[WebInspector.Persistence._binding] || null;
265 }, 265 },
266 266
267 /** 267 /**
268 * @param {!WebInspector.UISourceCode} uiSourceCode
269 * @return {?WebInspector.UISourceCode}
270 */
271 fileSystem: function(uiSourceCode)
272 {
273 var binding = this.binding(uiSourceCode);
274 return binding ? binding.fileSystem : null;
275 },
276
277 /**
268 * @param {string} filePath 278 * @param {string} filePath
269 */ 279 */
270 _addFilePathBindingPrefixes: function(filePath) 280 _addFilePathBindingPrefixes: function(filePath)
271 { 281 {
272 var relative = ""; 282 var relative = "";
273 for (var token of filePath.split("/")) { 283 for (var token of filePath.split("/")) {
274 relative += token + "/"; 284 relative += token + "/";
275 var count = this._filePathPrefixesToBindingCount.get(relative) || 0; 285 var count = this._filePathPrefixesToBindingCount.get(relative) || 0;
276 this._filePathPrefixesToBindingCount.set(relative, count + 1); 286 this._filePathPrefixesToBindingCount.set(relative, count + 1);
277 } 287 }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 * @param {!WebInspector.UISourceCode} fileSystem 328 * @param {!WebInspector.UISourceCode} fileSystem
319 */ 329 */
320 WebInspector.PersistenceBinding = function(network, fileSystem) 330 WebInspector.PersistenceBinding = function(network, fileSystem)
321 { 331 {
322 this.network = network; 332 this.network = network;
323 this.fileSystem = fileSystem; 333 this.fileSystem = fileSystem;
324 } 334 }
325 335
326 /** @type {!WebInspector.Persistence} */ 336 /** @type {!WebInspector.Persistence} */
327 WebInspector.persistence; 337 WebInspector.persistence;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698