OLD | NEW |
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 // Setting the src of an img to an empty string can crash the browser, so we | 5 // Setting the src of an img to an empty string can crash the browser, so we |
6 // use an empty 1x1 gif instead. | 6 // use an empty 1x1 gif instead. |
7 const EMPTY_IMAGE_URI = 'data:image/gif;base64,' | 7 const EMPTY_IMAGE_URI = 'data:image/gif;base64,' |
8 + 'R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw%3D%3D'; | 8 + 'R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw%3D%3D'; |
9 | 9 |
10 var g_slideshow_data = null; | 10 var g_slideshow_data = null; |
(...skipping 1256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1267 foundRemovable = true; | 1267 foundRemovable = true; |
1268 } else { // Done enumerating, and we know the answer. | 1268 } else { // Done enumerating, and we know the answer. |
1269 this.changeDirectory(foundRemovable ? '/' : DOWNLOADS_DIRECTORY, | 1269 this.changeDirectory(foundRemovable ? '/' : DOWNLOADS_DIRECTORY, |
1270 CD_NO_HISTORY); | 1270 CD_NO_HISTORY); |
1271 } | 1271 } |
1272 }.bind(this)); | 1272 }.bind(this)); |
1273 }; | 1273 }; |
1274 | 1274 |
1275 FileManager.prototype.setupPath_ = function(path) { | 1275 FileManager.prototype.setupPath_ = function(path) { |
1276 // Split the dirname from the basename. | 1276 // Split the dirname from the basename. |
1277 var ary = path.match(/^(.*?)(?:\/([^\/]+))?$/); | 1277 var ary = path.match(/^(?:(.*)\/)?([^\/]*)$/); |
1278 if (!ary) { | 1278 if (!ary) { |
1279 console.warn('Unable to split default path: ' + path); | 1279 console.warn('Unable to split default path: ' + path); |
1280 self.changeDirectory('/', CD_NO_HISTORY); | 1280 self.changeDirectory('/', CD_NO_HISTORY); |
1281 return; | 1281 return; |
1282 } | 1282 } |
1283 | 1283 |
1284 var baseName = ary[1]; | 1284 var baseName = ary[1]; |
1285 var leafName = ary[2]; | 1285 var leafName = ary[2]; |
1286 | 1286 |
1287 var self = this; | 1287 var self = this; |
(...skipping 2294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3582 | 3582 |
3583 if (msg) { | 3583 if (msg) { |
3584 console.log('no no no'); | 3584 console.log('no no no'); |
3585 this.alert.show(msg, onAccept); | 3585 this.alert.show(msg, onAccept); |
3586 return false; | 3586 return false; |
3587 } | 3587 } |
3588 | 3588 |
3589 return true; | 3589 return true; |
3590 }; | 3590 }; |
3591 })(); | 3591 })(); |
OLD | NEW |