| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 function fileCreated(entry) | 209 function fileCreated(entry) |
| 210 { | 210 { |
| 211 callback(entry.fullPath.substr(1)); | 211 callback(entry.fullPath.substr(1)); |
| 212 } | 212 } |
| 213 | 213 |
| 214 /** | 214 /** |
| 215 * @this {WebInspector.IsolatedFileSystem} | 215 * @this {WebInspector.IsolatedFileSystem} |
| 216 */ | 216 */ |
| 217 function fileCreationError(error) | 217 function fileCreationError(error) |
| 218 { | 218 { |
| 219 if (error.name === 'InvalidModificationError') { | 219 if (error.name === "InvalidModificationError") { |
| 220 dirEntryLoaded.call(this, dirEntry); | 220 dirEntryLoaded.call(this, dirEntry); |
| 221 return; | 221 return; |
| 222 } | 222 } |
| 223 | 223 |
| 224 var errorMessage = WebInspector.IsolatedFileSystem.errorMessage(
error); | 224 var errorMessage = WebInspector.IsolatedFileSystem.errorMessage(
error); |
| 225 console.error(errorMessage + " when testing if file exists '" +
(this._path + "/" + path + "/" + nameCandidate) + "'"); | 225 console.error(errorMessage + " when testing if file exists '" +
(this._path + "/" + path + "/" + nameCandidate) + "'"); |
| 226 callback(null); | 226 callback(null); |
| 227 } | 227 } |
| 228 } | 228 } |
| 229 | 229 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 console.error("Can't read file: " + path + ": " + e); | 317 console.error("Can't read file: " + path + ": " + e); |
| 318 } | 318 } |
| 319 callback(string); | 319 callback(string); |
| 320 } | 320 } |
| 321 | 321 |
| 322 /** | 322 /** |
| 323 * @this {WebInspector.IsolatedFileSystem} | 323 * @this {WebInspector.IsolatedFileSystem} |
| 324 */ | 324 */ |
| 325 function errorHandler(error) | 325 function errorHandler(error) |
| 326 { | 326 { |
| 327 if (error.name === 'NotFoundError') { | 327 if (error.name === "NotFoundError") { |
| 328 callback(null); | 328 callback(null); |
| 329 return; | 329 return; |
| 330 } | 330 } |
| 331 | 331 |
| 332 var errorMessage = WebInspector.IsolatedFileSystem.errorMessage(erro
r); | 332 var errorMessage = WebInspector.IsolatedFileSystem.errorMessage(erro
r); |
| 333 console.error(errorMessage + " when getting content for file '" + (t
his._path + "/" + path) + "'"); | 333 console.error(errorMessage + " when getting content for file '" + (t
his._path + "/" + path) + "'"); |
| 334 callback(null); | 334 callback(null); |
| 335 } | 335 } |
| 336 }, | 336 }, |
| 337 | 337 |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 function newFileEntryLoaded(entry) | 431 function newFileEntryLoaded(entry) |
| 432 { | 432 { |
| 433 callback(false); | 433 callback(false); |
| 434 } | 434 } |
| 435 | 435 |
| 436 /** | 436 /** |
| 437 * @this {WebInspector.IsolatedFileSystem} | 437 * @this {WebInspector.IsolatedFileSystem} |
| 438 */ | 438 */ |
| 439 function newFileEntryLoadErrorHandler(error) | 439 function newFileEntryLoadErrorHandler(error) |
| 440 { | 440 { |
| 441 if (error.name !== 'NotFoundError') { | 441 if (error.name !== "NotFoundError") { |
| 442 callback(false); | 442 callback(false); |
| 443 return; | 443 return; |
| 444 } | 444 } |
| 445 fileEntry.moveTo(dirEntry, newName, fileRenamed, errorHandler.bind(t
his)); | 445 fileEntry.moveTo(dirEntry, newName, fileRenamed, errorHandler.bind(t
his)); |
| 446 } | 446 } |
| 447 | 447 |
| 448 /** | 448 /** |
| 449 * @param {!FileEntry} entry | 449 * @param {!FileEntry} entry |
| 450 */ | 450 */ |
| 451 function fileRenamed(entry) | 451 function fileRenamed(entry) |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 610 /** | 610 /** |
| 611 * @param {!WebInspector.Progress} progress | 611 * @param {!WebInspector.Progress} progress |
| 612 */ | 612 */ |
| 613 indexContent: function(progress) | 613 indexContent: function(progress) |
| 614 { | 614 { |
| 615 progress.setTotalWork(1); | 615 progress.setTotalWork(1); |
| 616 var requestId = this._manager.registerProgress(progress); | 616 var requestId = this._manager.registerProgress(progress); |
| 617 InspectorFrontendHost.indexPath(requestId, this._embedderPath); | 617 InspectorFrontendHost.indexPath(requestId, this._embedderPath); |
| 618 } | 618 } |
| 619 } | 619 } |
| OLD | NEW |