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

Unified Diff: trunk/src/chrome/browser/ui/content_settings/content_setting_bubble_model.cc

Issue 24024006: Revert 221424 "Save password functionality added to the save pas..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 3 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: trunk/src/chrome/browser/ui/content_settings/content_setting_bubble_model.cc
===================================================================
--- trunk/src/chrome/browser/ui/content_settings/content_setting_bubble_model.cc (revision 221694)
+++ trunk/src/chrome/browser/ui/content_settings/content_setting_bubble_model.cc (working copy)
@@ -10,6 +10,7 @@
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/content_settings/content_settings_utils.h"
#include "chrome/browser/content_settings/cookie_settings.h"
+#include "chrome/browser/content_settings/tab_specific_content_settings.h"
#include "chrome/browser/custom_handlers/protocol_handler_registry.h"
#include "chrome/browser/custom_handlers/protocol_handler_registry_factory.h"
#include "chrome/browser/favicon/favicon_tab_helper.h"
@@ -163,8 +164,6 @@
{CONTENT_SETTINGS_TYPE_PPAPI_BROKER, IDS_PPAPI_BROKER_BUBBLE_MANAGE_LINK},
{CONTENT_SETTINGS_TYPE_AUTOMATIC_DOWNLOADS, IDS_BLOCKED_DOWNLOADS_LINK},
{CONTENT_SETTINGS_TYPE_MIDI_SYSEX, IDS_MIDI_SYSEX_BUBBLE_MANAGE_LINK},
- {CONTENT_SETTINGS_TYPE_SAVE_PASSWORD,
- IDS_OPTIONS_PASSWORDS_MANAGE_PASSWORDS},
};
set_manage_link(l10n_util::GetStringUTF8(
GetIdForContentType(kLinkIDs, arraysize(kLinkIDs), content_type())));
@@ -574,11 +573,24 @@
}
// The model for the save password bubble.
-SavePasswordBubbleModel::SavePasswordBubbleModel(Delegate* delegate,
- WebContents* web_contents,
+class SavePasswordBubbleModel : public ContentSettingBubbleModel {
+ public:
+ SavePasswordBubbleModel(WebContents* web_contents, Profile* profile);
+ virtual ~SavePasswordBubbleModel() {}
+
+ private:
+ // Sets the title of the bubble.
+ void SetTitle();
+
+ TabSpecificContentSettings::PasswordSavingState state_;
+
+ DISALLOW_COPY_AND_ASSIGN(SavePasswordBubbleModel);
+};
+
+SavePasswordBubbleModel::SavePasswordBubbleModel(WebContents* web_contents,
Profile* profile)
- : ContentSettingTitleAndLinkModel(delegate, web_contents, profile,
- CONTENT_SETTINGS_TYPE_SAVE_PASSWORD),
+ : ContentSettingBubbleModel(web_contents, profile,
+ CONTENT_SETTINGS_TYPE_SAVE_PASSWORD),
state_(TabSpecificContentSettings::NO_PASSWORD_TO_BE_SAVED) {
DCHECK(profile);
TabSpecificContentSettings* content_settings =
@@ -598,18 +610,6 @@
set_title(l10n_util::GetStringUTF8(title_id));
}
-void SavePasswordBubbleModel::OnCancelClicked() {
- TabSpecificContentSettings* content_settings =
- TabSpecificContentSettings::FromWebContents(web_contents());
- content_settings->PasswordFormBlacklisted();
-}
-
-void SavePasswordBubbleModel::OnSaveClicked() {
- TabSpecificContentSettings* content_settings =
- TabSpecificContentSettings::FromWebContents(web_contents());
- content_settings->PasswordAccepted();
-}
-
// The model of the content settings bubble for media settings.
class ContentSettingMediaStreamBubbleModel
: public ContentSettingTitleAndLinkModel {
@@ -1277,7 +1277,7 @@
Profile* profile,
ContentSettingsType content_type) {
if (content_type == CONTENT_SETTINGS_TYPE_SAVE_PASSWORD) {
- return new SavePasswordBubbleModel(delegate, web_contents, profile);
+ return new SavePasswordBubbleModel(web_contents, profile);
}
if (content_type == CONTENT_SETTINGS_TYPE_COOKIES) {
return new ContentSettingCookiesBubbleModel(delegate, web_contents, profile,

Powered by Google App Engine
This is Rietveld 408576698