| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 cr.define('options', function() { | 5 cr.define('options', function() { |
| 6 | 6 |
| 7 var OptionsPage = options.OptionsPage; | 7 var OptionsPage = options.OptionsPage; |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * ClearBrowserData class | 10 * ClearBrowserData class |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 // Inherit ClearBrowserDataOverlay from OptionsPage. | 25 // Inherit ClearBrowserDataOverlay from OptionsPage. |
| 26 __proto__: OptionsPage.prototype, | 26 __proto__: OptionsPage.prototype, |
| 27 | 27 |
| 28 /** | 28 /** |
| 29 * Initialize the page. | 29 * Initialize the page. |
| 30 */ | 30 */ |
| 31 initializePage: function() { | 31 initializePage: function() { |
| 32 // Call base class implementation to starts preference initialization. | 32 // Call base class implementation to starts preference initialization. |
| 33 OptionsPage.prototype.initializePage.call(this); | 33 OptionsPage.prototype.initializePage.call(this); |
| 34 | 34 |
| 35 // Setup option values for the time period select control. | |
| 36 $('clearBrowsingDataTimePeriod').initializeValues( | |
| 37 templateData.clearBrowsingDataTimeList); | |
| 38 | |
| 39 var f = this.updateCommitButtonState_.bind(this); | 35 var f = this.updateCommitButtonState_.bind(this); |
| 40 var types = ['browser.clear_data.browsing_history', | 36 var types = ['browser.clear_data.browsing_history', |
| 41 'browser.clear_data.download_history', | 37 'browser.clear_data.download_history', |
| 42 'browser.clear_data.cache', | 38 'browser.clear_data.cache', |
| 43 'browser.clear_data.cookies', | 39 'browser.clear_data.cookies', |
| 44 'browser.clear_data.passwords', | 40 'browser.clear_data.passwords', |
| 45 'browser.clear_data.form_data']; | 41 'browser.clear_data.form_data']; |
| 46 types.forEach(function(type) { | 42 types.forEach(function(type) { |
| 47 Preferences.getInstance().addEventListener(type, f); | 43 Preferences.getInstance().addEventListener(type, f); |
| 48 }); | 44 }); |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 this.setClearingState(false); | 110 this.setClearingState(false); |
| 115 } | 111 } |
| 116 | 112 |
| 117 // Export | 113 // Export |
| 118 return { | 114 return { |
| 119 ClearBrowserDataOverlay: ClearBrowserDataOverlay | 115 ClearBrowserDataOverlay: ClearBrowserDataOverlay |
| 120 }; | 116 }; |
| 121 | 117 |
| 122 }); | 118 }); |
| 123 | 119 |
| OLD | NEW |