| 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 cr.define('options', function() { | 5 cr.define('options', function() { |
| 6 var Page = cr.ui.pageManager.Page; | 6 var Page = cr.ui.pageManager.Page; |
| 7 var PageManager = cr.ui.pageManager.PageManager; | 7 var PageManager = cr.ui.pageManager.PageManager; |
| 8 | 8 |
| 9 /** | 9 /** |
| 10 * ClearBrowserDataOverlay class | 10 * ClearBrowserDataOverlay class |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 // browsing and download history should be cleared. Note that this is | 83 // browsing and download history should be cleared. Note that this is |
| 84 // different than just disabling them as a result of enterprise policies. | 84 // different than just disabling them as a result of enterprise policies. |
| 85 if (!loadTimeData.getBoolean('showDeleteBrowsingHistoryCheckboxes')) { | 85 if (!loadTimeData.getBoolean('showDeleteBrowsingHistoryCheckboxes')) { |
| 86 $('delete-browsing-history-container').hidden = true; | 86 $('delete-browsing-history-container').hidden = true; |
| 87 $('delete-download-history-container').hidden = true; | 87 $('delete-download-history-container').hidden = true; |
| 88 } | 88 } |
| 89 | 89 |
| 90 this.updateStateOfControls_(); | 90 this.updateStateOfControls_(); |
| 91 }, | 91 }, |
| 92 | 92 |
| 93 /** @override */ |
| 94 didShowPage: function() { |
| 95 chrome.send('openedClearBrowserData'); |
| 96 }, |
| 97 |
| 93 /** | 98 /** |
| 94 * Create a footer that explains that some content is not cleared by the | 99 * Create a footer that explains that some content is not cleared by the |
| 95 * clear browsing data dialog and warns that the deletion may be synced. | 100 * clear browsing data dialog and warns that the deletion may be synced. |
| 96 * @param {boolean} simple Whether to use a simple support string. | 101 * @param {boolean} simple Whether to use a simple support string. |
| 97 * @param {boolean} syncing Whether the user uses Sync. | 102 * @param {boolean} syncing Whether the user uses Sync. |
| 98 * @private | 103 * @private |
| 99 */ | 104 */ |
| 100 createFooter_: function(simple, syncing) { | 105 createFooter_: function(simple, syncing) { |
| 101 // The localized string is of the form "Saved [content settings] and | 106 // The localized string is of the form "Saved [content settings] and |
| 102 // {search engines} will not be cleared and may reflect your browsing | 107 // {search engines} will not be cleared and may reflect your browsing |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 var topmostVisiblePage = PageManager.getTopmostVisiblePage(); | 316 var topmostVisiblePage = PageManager.getTopmostVisiblePage(); |
| 312 if (topmostVisiblePage && topmostVisiblePage.name == 'clearBrowserData') | 317 if (topmostVisiblePage && topmostVisiblePage.name == 'clearBrowserData') |
| 313 PageManager.closeOverlay(); | 318 PageManager.closeOverlay(); |
| 314 }; | 319 }; |
| 315 | 320 |
| 316 // Export | 321 // Export |
| 317 return { | 322 return { |
| 318 ClearBrowserDataOverlay: ClearBrowserDataOverlay | 323 ClearBrowserDataOverlay: ClearBrowserDataOverlay |
| 319 }; | 324 }; |
| 320 }); | 325 }); |
| OLD | NEW |