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

Unified Diff: chrome/browser/password_manager/save_password_infobar_delegate.h

Issue 1313363004: [Password Manager] Extract some methods of SavePasswordInfobarDelegate to separate class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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: chrome/browser/password_manager/save_password_infobar_delegate.h
diff --git a/chrome/browser/password_manager/save_password_infobar_delegate.h b/chrome/browser/password_manager/save_password_infobar_delegate.h
index 167420ecf1fc466b208341524fb255d976122926..4dcf7fad1d9d48693d43da58fcb1d4f29b86001c 100644
--- a/chrome/browser/password_manager/save_password_infobar_delegate.h
+++ b/chrome/browser/password_manager/save_password_infobar_delegate.h
@@ -8,6 +8,7 @@
#include "base/basictypes.h"
#include "base/memory/scoped_ptr.h"
#include "base/timer/elapsed_timer.h"
+#include "chrome/browser/password_manager/password_manager_infobar_delegate.h"
#include "components/infobars/core/confirm_infobar_delegate.h"
#include "components/password_manager/core/browser/password_form_manager.h"
#include "components/password_manager/core/browser/password_manager_metrics_util.h"
@@ -27,7 +28,7 @@ enum class CredentialSourceType;
// login is one we already know about, the end of the line is
// provisional_save_manager_ because we just update it on success and so such
// forms never end up in an infobar.
-class SavePasswordInfoBarDelegate : public ConfirmInfoBarDelegate {
+class SavePasswordInfoBarDelegate : public PasswordManagerInfoBarDelegate {
public:
// If we won't be showing the one-click signin infobar, creates a save
// password infobar and delegate and adds the infobar to the InfoBarService
@@ -43,19 +44,11 @@ class SavePasswordInfoBarDelegate : public ConfirmInfoBarDelegate {
~SavePasswordInfoBarDelegate() override;
- const gfx::Range& message_link_range() const { return message_link_range_; }
-
base::string16 GetFirstRunExperienceMessage();
// ConfirmInfoBarDelegate:
- Type GetInfoBarType() const override;
- InfoBarAutomationType GetInfoBarAutomationType() const override;
- int GetIconId() const override;
- bool ShouldExpire(const NavigationDetails& details) const override;
void InfoBarDismissed() override;
- base::string16 GetMessageText() const override;
base::string16 GetButtonLabel(InfoBarButton button) const override;
- bool LinkClicked(WindowOpenDisposition disposition) override;
bool Accept() override;
bool Cancel() override;
@@ -89,13 +82,6 @@ class SavePasswordInfoBarDelegate : public ConfirmInfoBarDelegate {
// Infobar appearance (message, buttons) depends on value of this parameter.
password_manager::CredentialSourceType source_type_;
- // Infobar message: branded as a part of Google Smart Lock for signed users.
- base::string16 message_;
-
- // If set, describes the location of the link to the help center article for
- // Smart Lock.
- gfx::Range message_link_range_;
-
bool should_show_first_run_experience_;
content::WebContents* web_contents_;

Powered by Google App Engine
This is Rietveld 408576698