OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 * Scanner of the entries. | 6 * Scanner of the entries. |
7 * @constructor | 7 * @constructor |
8 */ | 8 */ |
9 function ContentScanner() { | 9 function ContentScanner() { |
10 this.cancelled_ = false; | 10 this.cancelled_ = false; |
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
494 */ | 494 */ |
495 FileListModel.prototype.splice = function(index, deleteCount, var_args) { | 495 FileListModel.prototype.splice = function(index, deleteCount, var_args) { |
496 for (var i = index; i < index + deleteCount; i++) { | 496 for (var i = index; i < index + deleteCount; i++) { |
497 if (i >= 0 && i < this.length) | 497 if (i >= 0 && i < this.length) |
498 this.onRemoveEntryFromList_(/** @type {!Entry} */ (this.item(i))); | 498 this.onRemoveEntryFromList_(/** @type {!Entry} */ (this.item(i))); |
499 } | 499 } |
500 for (var i = 2; i < arguments.length; i++) { | 500 for (var i = 2; i < arguments.length; i++) { |
501 this.onAddEntryToList_(arguments[i]); | 501 this.onAddEntryToList_(arguments[i]); |
502 } | 502 } |
503 | 503 |
504 cr.ui.ArrayDataModel.prototype.splice.apply(this, arguments); | 504 return cr.ui.ArrayDataModel.prototype.splice.apply(this, arguments); |
505 }; | 505 }; |
506 | 506 |
507 /** | 507 /** |
508 * @override | 508 * @override |
509 */ | 509 */ |
510 FileListModel.prototype.replaceItem = function(oldItem, newItem) { | 510 FileListModel.prototype.replaceItem = function(oldItem, newItem) { |
511 this.onRemoveEntryFromList_(oldItem); | 511 this.onRemoveEntryFromList_(oldItem); |
512 this.onAddEntryToList_(newItem); | 512 this.onAddEntryToList_(newItem); |
513 | 513 |
514 cr.ui.ArrayDataModel.prototype.replaceItem.apply(this, arguments); | 514 cr.ui.ArrayDataModel.prototype.replaceItem.apply(this, arguments); |
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1179 DirectoryContents.createForDriveMetadataSearch = function( | 1179 DirectoryContents.createForDriveMetadataSearch = function( |
1180 context, fakeDirectoryEntry, searchType) { | 1180 context, fakeDirectoryEntry, searchType) { |
1181 return new DirectoryContents( | 1181 return new DirectoryContents( |
1182 context, | 1182 context, |
1183 true, // Search | 1183 true, // Search |
1184 fakeDirectoryEntry, | 1184 fakeDirectoryEntry, |
1185 function() { | 1185 function() { |
1186 return new DriveMetadataSearchContentScanner(searchType); | 1186 return new DriveMetadataSearchContentScanner(searchType); |
1187 }); | 1187 }); |
1188 }; | 1188 }; |
OLD | NEW |