Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Side by Side Diff: chrome/browser/resources/options/clear_browser_data_overlay.js

Issue 1404793007: Restart the browsing data counters when the CBD dialog is opened. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added a comment about parameters. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/webui/options/clear_browser_data_handler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/options/clear_browser_data_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698