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

Side by Side Diff: chrome/browser/resources/file_manager/js/exif_reader.js

Issue 6895008: Merge 82577 - FileManager: assorted fixes* Switch webkitRequestFileSystem/webkitResolveLocalFileS... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/742/src/
Patch Set: Created 9 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/resources/file_manager/js/file_manager.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 var exif = { 5 var exif = {
6 verbose: false, 6 verbose: false,
7 7
8 messageHandlers: { 8 messageHandlers: {
9 "init": function() { 9 "init": function() {
10 this.log('thumbnailer initialized'); 10 this.log('thumbnailer initialized');
(...skipping 20 matching lines...) Expand all
31 self.vlog('Error processing: ' + fileURL + ': step: ' + 31 self.vlog('Error processing: ' + fileURL + ': step: ' +
32 steps[currentStep].name + ": " + err); 32 steps[currentStep].name + ": " + err);
33 33
34 postMessage({verb: 'give-exif-error', 34 postMessage({verb: 'give-exif-error',
35 arguments: [fileURL, steps[currentStep].name, err]}); 35 arguments: [fileURL, steps[currentStep].name, err]});
36 } 36 }
37 37
38 var steps = 38 var steps =
39 [ // Step one, turn the url into an entry. 39 [ // Step one, turn the url into an entry.
40 function getEntry() { 40 function getEntry() {
41 resolveLocalFileSystemURL(fileURL, 41 webkitResolveLocalFileSystemURL(fileURL,
42 function(entry) { nextStep(entry) }, 42 function(entry) { nextStep(entry) },
43 onError); 43 onError);
44 }, 44 },
45 45
46 // Step two, turn the entry into a file. 46 // Step two, turn the entry into a file.
47 function getFile(entry) { 47 function getFile(entry) {
48 entry.file(function(file) { nextStep(file) }, onError); 48 entry.file(function(file) { nextStep(file) }, onError);
49 }, 49 },
50 50
51 // Step three, read the file header into a byte array. 51 // Step three, read the file header into a byte array.
52 function readHeader(file) { 52 function readHeader(file) {
53 var reader = new FileReader(file.webkitSlice(0, 1024)); 53 var reader = new FileReader(file.webkitSlice(0, 1024));
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 skip: function(count) { 329 skip: function(count) {
330 this.pos_ += count; 330 this.pos_ += count;
331 }, 331 },
332 332
333 tell: function() { 333 tell: function() {
334 return this.pos_; 334 return this.pos_;
335 } 335 }
336 }; 336 };
337 337
338 var onmessage = exif.onMessage.bind(exif); 338 var onmessage = exif.onMessage.bind(exif);
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/file_manager/js/file_manager.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698