| 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 'use strict'; | 5 'use strict'; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * FileManager constructor. | 8 * FileManager constructor. |
| 9 * | 9 * |
| 10 * FileManager objects encapsulate the functionality of the file selector | 10 * FileManager objects encapsulate the functionality of the file selector |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 // Get the command line option. | 202 // Get the command line option. |
| 203 group.add(function(done) { | 203 group.add(function(done) { |
| 204 chrome.commandLinePrivate.hasSwitch( | 204 chrome.commandLinePrivate.hasSwitch( |
| 205 'file-manager-show-checkboxes', function(flag) { | 205 'file-manager-show-checkboxes', function(flag) { |
| 206 this.showCheckboxes_ = flag; | 206 this.showCheckboxes_ = flag; |
| 207 done(); | 207 done(); |
| 208 }.bind(this)); | 208 }.bind(this)); |
| 209 }.bind(this)); | 209 }.bind(this)); |
| 210 | 210 |
| 211 // TODO(yoshiki): Remove the flag when the feature is launched. | 211 // TODO(yoshiki): Remove the flag when the feature is launched. |
| 212 this.enableExperimentalWebstoreIntegration_ = false; | 212 this.enableExperimentalWebstoreIntegration_ = true; |
| 213 group.add(function(done) { | |
| 214 chrome.commandLinePrivate.hasSwitch( | |
| 215 'file-manager-enable-webstore-integration', function(flag) { | |
| 216 this.enableExperimentalWebstoreIntegration_ = flag; | |
| 217 done(); | |
| 218 }.bind(this)); | |
| 219 }.bind(this)); | |
| 220 | 213 |
| 221 group.run(callback); | 214 group.run(callback); |
| 222 }; | 215 }; |
| 223 | 216 |
| 224 /** | 217 /** |
| 225 * One time initialization for the file system and related things. | 218 * One time initialization for the file system and related things. |
| 226 * | 219 * |
| 227 * @param {function()} callback Completion callback. | 220 * @param {function()} callback Completion callback. |
| 228 * @private | 221 * @private |
| 229 */ | 222 */ |
| (...skipping 3396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3626 callback(this.preferences_); | 3619 callback(this.preferences_); |
| 3627 return; | 3620 return; |
| 3628 } | 3621 } |
| 3629 | 3622 |
| 3630 chrome.fileBrowserPrivate.getPreferences(function(prefs) { | 3623 chrome.fileBrowserPrivate.getPreferences(function(prefs) { |
| 3631 this.preferences_ = prefs; | 3624 this.preferences_ = prefs; |
| 3632 callback(prefs); | 3625 callback(prefs); |
| 3633 }.bind(this)); | 3626 }.bind(this)); |
| 3634 }; | 3627 }; |
| 3635 })(); | 3628 })(); |
| OLD | NEW |