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 fdf3e35b68e7b70cf55a2e62aa871e80007315de..956b4253737bd8099436160718dabd4dba062749 100644 |
--- a/chrome/browser/password_manager/save_password_infobar_delegate.h |
+++ b/chrome/browser/password_manager/save_password_infobar_delegate.h |
@@ -6,11 +6,9 @@ |
#define CHROME_BROWSER_PASSWORD_MANAGER_SAVE_PASSWORD_INFOBAR_DELEGATE_H_ |
#include "base/basictypes.h" |
-#include "base/compiler_specific.h" |
#include "base/memory/scoped_ptr.h" |
#include "base/timer/elapsed_timer.h" |
#include "components/infobars/core/confirm_infobar_delegate.h" |
-#include "components/infobars/core/infobar_delegate.h" |
#include "components/password_manager/core/browser/password_form_manager.h" |
#include "components/password_manager/core/browser/password_manager_metrics_util.h" |
@@ -18,6 +16,10 @@ namespace content { |
class WebContents; |
} |
+namespace password_manager { |
+enum class CredentialSourceType; |
+} |
+ |
// After a successful *new* login attempt, we take the PasswordFormManager in |
// provisional_save_manager_ and move it to a SavePasswordInfoBarDelegate while |
// the user makes up their mind with the "save password" infobar. Note if the |
@@ -35,14 +37,19 @@ class SavePasswordInfoBarDelegate : public ConfirmInfoBarDelegate { |
static void Create( |
content::WebContents* web_contents, |
scoped_ptr<password_manager::PasswordFormManager> form_to_save, |
- const std::string& uma_histogram_suffix); |
+ const std::string& uma_histogram_suffix, |
+ password_manager::CredentialSourceType source_type); |
+ |
+ ~SavePasswordInfoBarDelegate() override; |
- private: |
SavePasswordInfoBarDelegate( |
Bernhard Bauer
2015/03/02 10:28:09
Does this constructor need to be public now?
melandory
2015/03/03 11:55:46
Nope.
Done.
|
scoped_ptr<password_manager::PasswordFormManager> form_to_save, |
- const std::string& uma_histogram_suffix); |
+ const std::string& uma_histogram_suffix, |
+ password_manager::CredentialSourceType source_type); |
- ~SavePasswordInfoBarDelegate() override; |
+ // If infobar was tiggered by Credential management API, then on Android |
Bernhard Bauer
2015/03/02 10:28:09
Nit: "triggered" (Tigger is something else [http:/
melandory
2015/03/03 11:55:46
Done.
|
+ // it should display "More" button. |
+ bool ShouldShowMoreButton(); |
// ConfirmInfoBarDelegate: |
Type GetInfoBarType() const override; |
@@ -55,6 +62,7 @@ class SavePasswordInfoBarDelegate : public ConfirmInfoBarDelegate { |
bool Accept() override; |
bool Cancel() override; |
+ private: |
// The PasswordFormManager managing the form we're asking the user about, |
// and should update as per her decision. |
scoped_ptr<password_manager::PasswordFormManager> form_to_save_; |
@@ -70,6 +78,10 @@ class SavePasswordInfoBarDelegate : public ConfirmInfoBarDelegate { |
// form is on a monitored domain. Otherwise, an empty string. |
const std::string uma_histogram_suffix_; |
+ // Determines source from where infobar was triggered. |
Mike West
2015/03/02 11:54:27
Nit: This doesn't "determine", it "records" or som
melandory
2015/03/03 11:55:46
Done.
|
+ // Infobar appearance (title, buttons) depends on value of this parameter. |
+ password_manager::CredentialSourceType source_type_; |
+ |
DISALLOW_COPY_AND_ASSIGN(SavePasswordInfoBarDelegate); |
}; |