Chromium Code Reviews| Index: chrome/browser/content_settings/tab_specific_content_settings.cc |
| diff --git a/chrome/browser/content_settings/tab_specific_content_settings.cc b/chrome/browser/content_settings/tab_specific_content_settings.cc |
| index 1a19e37bb5f67d4fde067013f28154661b8a6372..58e6010f694ecd23f69ed5182f52acb8752e9dc8 100644 |
| --- a/chrome/browser/content_settings/tab_specific_content_settings.cc |
| +++ b/chrome/browser/content_settings/tab_specific_content_settings.cc |
| @@ -99,6 +99,19 @@ TabSpecificContentSettings::~TabSpecificContentSettings() { |
| SiteDataObserver, observer_list_, ContentSettingsDestroyed()); |
| } |
| +bool TabSpecificContentSettings::Accept() { |
|
Garrett Casto
2013/08/27 00:52:24
Seems like these names should be a little more des
npentrel
2013/08/27 16:35:11
Done.
|
| + DCHECK(form_to_save_.get()); |
| + form_to_save_->SavePassword(); |
| + return true; |
| +} |
| + |
| +bool TabSpecificContentSettings::Cancel() { |
| + DCHECK(form_to_save_.get()); |
| + form_to_save_->DeleteSavedPassword(); |
|
Garrett Casto
2013/08/27 00:52:24
There should be no need to call this before blackl
npentrel
2013/08/27 16:35:11
Done.
|
| + form_to_save_->PermanentlyBlacklist(); |
| + return true; |
| +} |
| + |
| TabSpecificContentSettings* TabSpecificContentSettings::Get( |
| int render_process_id, int render_view_id) { |
| DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| @@ -463,9 +476,9 @@ void TabSpecificContentSettings::OnGeolocationPermissionSet( |
| content::NotificationService::NoDetails()); |
| } |
| -// TODO(npentrel): Save the password when user accepts the prompt |
| void TabSpecificContentSettings::OnPasswordSubmitted( |
| PasswordFormManager* form_to_save) { |
| + form_to_save_.reset(form_to_save); |
| OnContentAllowed(CONTENT_SETTINGS_TYPE_SAVE_PASSWORD); |
| NotifySiteDataObservers(); |
| } |