| 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 * FileManager constructor. | 6 * FileManager constructor. |
| 7 * | 7 * |
| 8 * FileManager objects encapsulate the functionality of the file selector | 8 * FileManager objects encapsulate the functionality of the file selector |
| 9 * dialogs, as well as the full screen file manager application (though the | 9 * dialogs, as well as the full screen file manager application (though the |
| 10 * latter is not yet implemented). | 10 * latter is not yet implemented). |
| (...skipping 2802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2813 if (self.isGDataEnabled()) | 2813 if (self.isGDataEnabled()) |
| 2814 self.setupGDataWelcome_(); | 2814 self.setupGDataWelcome_(); |
| 2815 else | 2815 else |
| 2816 self.cleanupGDataWelcome_(); | 2816 self.cleanupGDataWelcome_(); |
| 2817 | 2817 |
| 2818 if (gdata.cellularDisabled) | 2818 if (gdata.cellularDisabled) |
| 2819 self.syncButton.setAttribute('checked', ''); | 2819 self.syncButton.setAttribute('checked', ''); |
| 2820 else | 2820 else |
| 2821 self.syncButton.removeAttribute('checked'); | 2821 self.syncButton.removeAttribute('checked'); |
| 2822 | 2822 |
| 2823 if (self.hostedButton.hasAttribute('checked') != |
| 2824 gdata.hostedFilesDisabled && self.isOnGData()) { |
| 2825 self.directoryModel_.rescan(); |
| 2826 } |
| 2827 |
| 2823 if (!gdata.hostedFilesDisabled) | 2828 if (!gdata.hostedFilesDisabled) |
| 2824 self.hostedButton.setAttribute('checked', ''); | 2829 self.hostedButton.setAttribute('checked', ''); |
| 2825 else | 2830 else |
| 2826 self.hostedButton.removeAttribute('checked'); | 2831 self.hostedButton.removeAttribute('checked'); |
| 2827 | 2832 |
| 2828 if (network.online) { | 2833 if (network.online) { |
| 2829 if (gdata.cellularDisabled && network.type == 'cellular') | 2834 if (gdata.cellularDisabled && network.type == 'cellular') |
| 2830 self.dialogContainer_.setAttribute('connection', 'metered'); | 2835 self.dialogContainer_.setAttribute('connection', 'metered'); |
| 2831 else | 2836 else |
| 2832 self.dialogContainer_.removeAttribute('connection'); | 2837 self.dialogContainer_.removeAttribute('connection'); |
| (...skipping 1749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4582 function closeBanner() { | 4587 function closeBanner() { |
| 4583 self.cleanupGDataWelcome_(); | 4588 self.cleanupGDataWelcome_(); |
| 4584 // Stop showing the welcome banner. | 4589 // Stop showing the welcome banner. |
| 4585 localStorage[WELCOME_HEADER_COUNTER_KEY] = WELCOME_HEADER_COUNTER_LIMIT; | 4590 localStorage[WELCOME_HEADER_COUNTER_KEY] = WELCOME_HEADER_COUNTER_LIMIT; |
| 4586 } | 4591 } |
| 4587 | 4592 |
| 4588 return maybeShowBanner; | 4593 return maybeShowBanner; |
| 4589 }; | 4594 }; |
| 4590 })(); | 4595 })(); |
| 4591 | 4596 |
| OLD | NEW |