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

Unified Diff: chrome/browser/content_settings/tab_specific_content_settings.cc

Issue 22975006: Save password functionality added to the save password bubble (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minor changes Created 7 years, 4 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/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();
}

Powered by Google App Engine
This is Rietveld 408576698