OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 'use strict'; | |
6 | |
7 /** | 5 /** |
8 * Object representing an image item (a photo). | 6 * Object representing an image item (a photo). |
9 * | 7 * |
10 * @param {FileEntry} entry Image entry. | 8 * @param {FileEntry} entry Image entry. |
11 * @param {EntryLocation} locationInfo Entry location information. | 9 * @param {EntryLocation} locationInfo Entry location information. |
12 * @param {Object} metadata Metadata for the entry. | 10 * @param {Object} metadata Metadata for the entry. |
13 * @param {MetadataCache} metadataCache Metadata cache instance. | 11 * @param {MetadataCache} metadataCache Metadata cache instance. |
14 * @param {boolean} original Whether the entry is original or edited. | 12 * @param {boolean} original Whether the entry is original or edited. |
15 * @constructor | 13 * @constructor |
16 */ | 14 */ |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 return Promise.reject(str('GALLERY_FILE_EXISTS')); | 347 return Promise.reject(str('GALLERY_FILE_EXISTS')); |
350 }, function() { | 348 }, function() { |
351 return new Promise( | 349 return new Promise( |
352 this.entry_.moveTo.bind(this.entry_, parentDirectory, newFileName)); | 350 this.entry_.moveTo.bind(this.entry_, parentDirectory, newFileName)); |
353 }.bind(this)); | 351 }.bind(this)); |
354 }.bind(this)); | 352 }.bind(this)); |
355 }.bind(this)).then(function(entry) { | 353 }.bind(this)).then(function(entry) { |
356 this.entry_ = entry; | 354 this.entry_ = entry; |
357 }.bind(this)); | 355 }.bind(this)); |
358 }; | 356 }; |
OLD | NEW |