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

Side by Side Diff: chrome/browser/password_manager/save_password_infobar_delegate_android.h

Issue 2397743002: Ditch first run experience from Save Password Infobar (Closed)
Patch Set: get rid of unused web_contents_ Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_SAVE_PASSWORD_INFOBAR_DELEGATE_ANDROID_H _ 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_SAVE_PASSWORD_INFOBAR_DELEGATE_ANDROID_H _
6 #define CHROME_BROWSER_PASSWORD_MANAGER_SAVE_PASSWORD_INFOBAR_DELEGATE_ANDROID_H _ 6 #define CHROME_BROWSER_PASSWORD_MANAGER_SAVE_PASSWORD_INFOBAR_DELEGATE_ANDROID_H _
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 18 matching lines...) Expand all
29 public: 29 public:
30 // If we won't be showing the one-click signin infobar, creates a save 30 // If we won't be showing the one-click signin infobar, creates a save
31 // password infobar and delegate and adds the infobar to the InfoBarService 31 // password infobar and delegate and adds the infobar to the InfoBarService
32 // for |web_contents|. 32 // for |web_contents|.
33 static void Create( 33 static void Create(
34 content::WebContents* web_contents, 34 content::WebContents* web_contents,
35 std::unique_ptr<password_manager::PasswordFormManager> form_to_save); 35 std::unique_ptr<password_manager::PasswordFormManager> form_to_save);
36 36
37 ~SavePasswordInfoBarDelegate() override; 37 ~SavePasswordInfoBarDelegate() override;
38 38
39 base::string16 GetFirstRunExperienceMessage();
40
41 // ConfirmInfoBarDelegate: 39 // ConfirmInfoBarDelegate:
42 infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override; 40 infobars::InfoBarDelegate::InfoBarIdentifier GetIdentifier() const override;
43 void InfoBarDismissed() override; 41 void InfoBarDismissed() override;
44 base::string16 GetButtonLabel(InfoBarButton button) const override; 42 base::string16 GetButtonLabel(InfoBarButton button) const override;
45 bool Accept() override; 43 bool Accept() override;
46 bool Cancel() override; 44 bool Cancel() override;
47 45
48 protected: 46 protected:
49 // Makes a ctor available in tests. 47 // Makes a ctor available in tests.
50 SavePasswordInfoBarDelegate( 48 SavePasswordInfoBarDelegate(
51 content::WebContents* web_contents, 49 content::WebContents* web_contents,
52 std::unique_ptr<password_manager::PasswordFormManager> form_to_save, 50 std::unique_ptr<password_manager::PasswordFormManager> form_to_save,
53 bool is_smartlock_branding_enabled, 51 bool is_smartlock_branding_enabled);
54 bool should_show_first_run_experience);
55 52
56 private: 53 private:
57 // The PasswordFormManager managing the form we're asking the user about, 54 // The PasswordFormManager managing the form we're asking the user about,
58 // and should update as per her decision. 55 // and should update as per her decision.
59 std::unique_ptr<password_manager::PasswordFormManager> form_to_save_; 56 std::unique_ptr<password_manager::PasswordFormManager> form_to_save_;
60 57
61 // Used to track the results we get from the info bar. 58 // Used to track the results we get from the info bar.
62 password_manager::metrics_util::UIDismissalReason infobar_response_; 59 password_manager::metrics_util::UIDismissalReason infobar_response_;
63 60
64 // Measures the "Save password?" prompt lifetime. Used to report an UMA 61 // Measures the "Save password?" prompt lifetime. Used to report an UMA
65 // signal. 62 // signal.
66 base::ElapsedTimer timer_; 63 base::ElapsedTimer timer_;
67 64
68 bool should_show_first_run_experience_;
69
70 content::WebContents* web_contents_;
71
72 DISALLOW_COPY_AND_ASSIGN(SavePasswordInfoBarDelegate); 65 DISALLOW_COPY_AND_ASSIGN(SavePasswordInfoBarDelegate);
73 }; 66 };
74 67
75 // Creates the platform-specific SavePassword InfoBar. This function is defined 68 // Creates the platform-specific SavePassword InfoBar. This function is defined
76 // in platform-specific .cc (or .mm) files. 69 // in platform-specific .cc (or .mm) files.
77 std::unique_ptr<infobars::InfoBar> CreateSavePasswordInfoBar( 70 std::unique_ptr<infobars::InfoBar> CreateSavePasswordInfoBar(
78 std::unique_ptr<SavePasswordInfoBarDelegate> delegate); 71 std::unique_ptr<SavePasswordInfoBarDelegate> delegate);
79 72
80 #endif // CHROME_BROWSER_PASSWORD_MANAGER_SAVE_PASSWORD_INFOBAR_DELEGATE_ANDROI D_H_ 73 #endif // CHROME_BROWSER_PASSWORD_MANAGER_SAVE_PASSWORD_INFOBAR_DELEGATE_ANDROI D_H_
OLDNEW
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/password_manager/save_password_infobar_delegate_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698