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

Unified Diff: chrome/browser/resources/options/reset_profile_settings_overlay.js

Issue 16980002: Reset profile: unpin all pinned tabs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clean up all the checkboxes Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/options/reset_profile_settings_overlay.js
diff --git a/chrome/browser/resources/options/reset_profile_settings_overlay.js b/chrome/browser/resources/options/reset_profile_settings_overlay.js
index 2abda1665f1f15efeef8a709cdd26b2a91bd1a22..5cd675f5718e915f5473b59d5c9250fadcd672e5 100644
--- a/chrome/browser/resources/options/reset_profile_settings_overlay.js
+++ b/chrome/browser/resources/options/reset_profile_settings_overlay.js
@@ -29,22 +29,6 @@ cr.define('options', function() {
initializePage: function() {
OptionsPage.prototype.initializePage.call(this);
- var f = this.updateCommitButtonState_.bind(this);
- var types = ['browser.reset_profile_settings.default_search_engine',
- 'browser.reset_profile_settings.homepage',
- 'browser.reset_profile_settings.content_settings',
- 'browser.reset_profile_settings.cookies_and_site_data',
- 'browser.reset_profile_settings.extensions'];
- types.forEach(function(type) {
- Preferences.getInstance().addEventListener(type, f);
- });
-
- var checkboxes = document.querySelectorAll(
- '#reset-profile-settings-content-area input[type=checkbox]');
- for (var i = 0; i < checkboxes.length; i++)
- checkboxes[i].onclick = f;
- this.updateCommitButtonState_();
-
$('reset-profile-settings-dismiss').onclick = function(event) {
ResetProfileSettingsOverlay.dismiss();
};
@@ -53,14 +37,6 @@ cr.define('options', function() {
chrome.send('performResetProfileSettings');
};
},
-
- // Sets the enabled state of the commit button.
- updateCommitButtonState_: function() {
- var sel =
- '#reset-profile-settings-content-area input[type=checkbox]:checked';
- $('reset-profile-settings-commit').disabled =
- !document.querySelector(sel);
- },
};
/**
@@ -68,20 +44,10 @@ cr.define('options', function() {
* @param {boolean} state If true, UI elements are disabled.
*/
ResetProfileSettingsOverlay.setResettingState = function(state) {
- $('reset-default-search-engine-checkbox').disabled = state;
- $('reset-homepage-checkbox').disabled = state;
- $('reset-content-settings-checkbox').disabled = state;
- $('reset-cookies-and-site-data-checkbox').disabled = state;
- $('reset-extensions-checkbox').disabled = state;
- $('reset-extensions-handling').disabled = state;
$('reset-profile-settings-throbber').style.visibility =
state ? 'visible' : 'hidden';
$('reset-profile-settings-dismiss').disabled = state;
-
- if (state)
- $('reset-profile-settings-commit').disabled = true;
- else
- ResetProfileSettingsOverlay.getInstance().updateCommitButtonState_();
+ $('reset-profile-settings-commit').disabled = state;
};
/**
« no previous file with comments | « chrome/browser/resources/options/reset_profile_settings_overlay.html ('k') | chrome/browser/ui/browser_ui_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698