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 3973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3984 | 3984 |
3985 FileManager.prototype.showGDataWelcome_ = function(type) { | 3985 FileManager.prototype.showGDataWelcome_ = function(type) { |
3986 if (this.dialogContainer_.getAttribute('gdrive-welcome') != type) { | 3986 if (this.dialogContainer_.getAttribute('gdrive-welcome') != type) { |
3987 this.dialogContainer_.setAttribute('gdrive-welcome', type); | 3987 this.dialogContainer_.setAttribute('gdrive-welcome', type); |
3988 this.requestResize_(200); // Resize only after the animation is done. | 3988 this.requestResize_(200); // Resize only after the animation is done. |
3989 } | 3989 } |
3990 }; | 3990 }; |
3991 | 3991 |
3992 FileManager.prototype.createGDataWelcomeHandler_ = function() { | 3992 FileManager.prototype.createGDataWelcomeHandler_ = function() { |
3993 var board = str('CHROMEOS_RELEASE_BOARD'); | 3993 var board = str('CHROMEOS_RELEASE_BOARD'); |
3994 var new_welcome = board.match(/^(stumpy|lumpy)/i); | 3994 // It is 'canary' or 'beta' for the other channels. |
| 3995 var releaseChannel = str('BROWSER_VERSION_MODIFIER') == ''; |
| 3996 var new_welcome = board.match(/^(stumpy|lumpy)/i) && releaseChannel; |
3995 | 3997 |
3996 var WELCOME_HEADER_COUNTER_KEY = 'gdataWelcomeHeaderCounter'; | 3998 var WELCOME_HEADER_COUNTER_KEY = 'gdataWelcomeHeaderCounter'; |
3997 var WELCOME_HEADER_COUNTER_LIMIT = 5; | 3999 var WELCOME_HEADER_COUNTER_LIMIT = 5; |
3998 | 4000 |
3999 function getHeaderCounter() { | 4001 function getHeaderCounter() { |
4000 return parseInt(localStorage[WELCOME_HEADER_COUNTER_KEY] || '0'); | 4002 return parseInt(localStorage[WELCOME_HEADER_COUNTER_KEY] || '0'); |
4001 } | 4003 } |
4002 | 4004 |
4003 if (getHeaderCounter() >= WELCOME_HEADER_COUNTER_LIMIT) | 4005 if (getHeaderCounter() >= WELCOME_HEADER_COUNTER_LIMIT) |
4004 return null; | 4006 return null; |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4174 } | 4176 } |
4175 | 4177 |
4176 var defaultActionSeparator = | 4178 var defaultActionSeparator = |
4177 this.dialogDom_.querySelector('#default-action-separator'); | 4179 this.dialogDom_.querySelector('#default-action-separator'); |
4178 | 4180 |
4179 this.defaultActionMenuItem_.hidden = !taskItem; | 4181 this.defaultActionMenuItem_.hidden = !taskItem; |
4180 defaultActionSeparator.hidden = !taskItem; | 4182 defaultActionSeparator.hidden = !taskItem; |
4181 } | 4183 } |
4182 })(); | 4184 })(); |
4183 | 4185 |
OLD | NEW |