summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views
diff options
context:
space:
mode:
authormhm@chromium.org <mhm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-09 05:55:19 +0000
committermhm@chromium.org <mhm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-09 05:55:19 +0000
commit9c0b3e3a30ab2246a9385b978e86003d4fc8ceb9 (patch)
tree28d91c66d9ae2bc71c106b0c77cecbb9e319062d /chrome/browser/views
parent9e8bb30aea6eaf682887c8cfe33439f851945ee3 (diff)
downloadchromium_src-9c0b3e3a30ab2246a9385b978e86003d4fc8ceb9.zip
chromium_src-9c0b3e3a30ab2246a9385b978e86003d4fc8ceb9.tar.gz
chromium_src-9c0b3e3a30ab2246a9385b978e86003d4fc8ceb9.tar.bz2
Implement different radio groups for Options > Personal Stuff
Passwords and Form autofill share the same group, they need to be treated separately. It did not work correctly, when "password" radio option was chosen,two of "form autofill" radio option both change to blank(not selected). This patch will properly create different radio groups for passwords and autofill. BUG=13222 (http://crbug.com/13222) TEST=Radio buttons now function propertly TBR=ben Review URL: http://codereview.chromium.org/119347 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17932 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views')
-rw-r--r--chrome/browser/views/options/content_page_view.cc15
-rw-r--r--chrome/browser/views/options/content_page_view.h2
2 files changed, 9 insertions, 8 deletions
diff --git a/chrome/browser/views/options/content_page_view.cc b/chrome/browser/views/options/content_page_view.cc
index c1de969..ed038bb 100644
--- a/chrome/browser/views/options/content_page_view.cc
+++ b/chrome/browser/views/options/content_page_view.cc
@@ -27,8 +27,8 @@
namespace {
-const int kPopupBlockingRadioGroup = 1;
-const int kPasswordSavingRadioGroup = 2;
+const int kPasswordSavingRadioGroup = 1;
+const int kFormAutofillRadioGroup = 2;
} // namespace
ContentPageView::ContentPageView(Profile* profile)
@@ -75,7 +75,7 @@ void ContentPageView::ButtonPressed(views::Button* sender) {
UserMetricsRecordAction(L"Options_FormAutofill_Disable",
profile()->GetPrefs());
}
- form_autofill_.SetValue(enabled);
+ ask_to_save_form_autofill_.SetValue(enabled);
} else if (sender == passwords_exceptions_button_) {
UserMetricsRecordAction(L"Options_ShowPasswordsExceptions", NULL);
PasswordsExceptionsWindowView::Show(profile());
@@ -133,7 +133,8 @@ void ContentPageView::InitControlLayout() {
// Init member prefs so we can update the controls if prefs change.
ask_to_save_passwords_.Init(prefs::kPasswordManagerEnabled,
profile()->GetPrefs(), this);
- form_autofill_.Init(prefs::kFormAutofillEnabled, profile()->GetPrefs(), this);
+ ask_to_save_form_autofill_.Init(prefs::kFormAutofillEnabled,
+ profile()->GetPrefs(), this);
}
void ContentPageView::NotifyPrefChanged(const std::wstring* pref_name) {
@@ -145,7 +146,7 @@ void ContentPageView::NotifyPrefChanged(const std::wstring* pref_name) {
}
}
if (!pref_name || *pref_name == prefs::kFormAutofillEnabled) {
- if (form_autofill_.GetValue()) {
+ if (ask_to_save_form_autofill_.GetValue()) {
form_autofill_asktosave_radio_->SetChecked(true);
} else {
form_autofill_neversave_radio_->SetChecked(true);
@@ -215,12 +216,12 @@ void ContentPageView::InitPasswordSavingGroup() {
void ContentPageView::InitFormAutofillGroup() {
form_autofill_asktosave_radio_ = new views::RadioButton(
l10n_util::GetString(IDS_OPTIONS_AUTOFILL_SAVE),
- kPasswordSavingRadioGroup);
+ kFormAutofillRadioGroup);
form_autofill_asktosave_radio_->set_listener(this);
form_autofill_asktosave_radio_->SetMultiLine(true);
form_autofill_neversave_radio_ = new views::RadioButton(
l10n_util::GetString(IDS_OPTIONS_AUTOFILL_NEVERSAVE),
- kPasswordSavingRadioGroup);
+ kFormAutofillRadioGroup);
form_autofill_neversave_radio_->set_listener(this);
form_autofill_neversave_radio_->SetMultiLine(true);
diff --git a/chrome/browser/views/options/content_page_view.h b/chrome/browser/views/options/content_page_view.h
index e0cabd5..c429407 100644
--- a/chrome/browser/views/options/content_page_view.h
+++ b/chrome/browser/views/options/content_page_view.h
@@ -73,7 +73,7 @@ class ContentPageView : public OptionsPageView,
views::NativeButton* clear_data_button_;
BooleanPrefMember ask_to_save_passwords_;
- BooleanPrefMember form_autofill_;
+ BooleanPrefMember ask_to_save_form_autofill_;
DISALLOW_COPY_AND_ASSIGN(ContentPageView);
};