| OLD | NEW |
| 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 * @unrestricted | 5 * @unrestricted |
| 6 */ | 6 */ |
| 7 Persistence.Persistence = class extends Common.Object { | 7 Persistence.Persistence = class extends Common.Object { |
| 8 /** | 8 /** |
| 9 * @param {!Workspace.Workspace} workspace | 9 * @param {!Workspace.Workspace} workspace |
| 10 * @param {!Bindings.BreakpointManager} breakpointManager | 10 * @param {!Bindings.BreakpointManager} breakpointManager |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 */ | 36 */ |
| 37 _setMappingForTest(mappingFactory) { | 37 _setMappingForTest(mappingFactory) { |
| 38 this._mapping.dispose(); | 38 this._mapping.dispose(); |
| 39 this._mapping = mappingFactory(this._validateBinding.bind(this), this._onBin
dingRemoved.bind(this)); | 39 this._mapping = mappingFactory(this._validateBinding.bind(this), this._onBin
dingRemoved.bind(this)); |
| 40 } | 40 } |
| 41 | 41 |
| 42 /** | 42 /** |
| 43 * @param {!Persistence.PersistenceBinding} binding | 43 * @param {!Persistence.PersistenceBinding} binding |
| 44 */ | 44 */ |
| 45 _validateBinding(binding) { | 45 _validateBinding(binding) { |
| 46 if (!Runtime.experiments.isEnabled('persistenceValidation') || binding.netwo
rk.contentType().isFromSourceMap() || | 46 if (!Runtime.experiments.isEnabled('persistence2') || binding.network.conten
tType().isFromSourceMap() || |
| 47 !binding.fileSystem.contentType().isTextType()) { | 47 !binding.fileSystem.contentType().isTextType()) { |
| 48 this._establishBinding(binding); | 48 this._establishBinding(binding); |
| 49 return; | 49 return; |
| 50 } | 50 } |
| 51 | 51 |
| 52 Promise.all([binding.network.requestContent(), binding.fileSystem.requestCon
tent()]).then(onContents.bind(this)); | 52 Promise.all([binding.network.requestContent(), binding.fileSystem.requestCon
tent()]).then(onContents.bind(this)); |
| 53 | 53 |
| 54 /** | 54 /** |
| 55 * @this {Persistence.Persistence} | 55 * @this {Persistence.Persistence} |
| 56 */ | 56 */ |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 385 constructor(network, fileSystem, exactMatch) { | 385 constructor(network, fileSystem, exactMatch) { |
| 386 this.network = network; | 386 this.network = network; |
| 387 this.fileSystem = fileSystem; | 387 this.fileSystem = fileSystem; |
| 388 this.exactMatch = exactMatch; | 388 this.exactMatch = exactMatch; |
| 389 this._removed = false; | 389 this._removed = false; |
| 390 } | 390 } |
| 391 }; | 391 }; |
| 392 | 392 |
| 393 /** @type {!Persistence.Persistence} */ | 393 /** @type {!Persistence.Persistence} */ |
| 394 Persistence.persistence; | 394 Persistence.persistence; |
| OLD | NEW |