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

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

Issue 1997453003: Fix "unused variable" warnings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move changes in and out to fix compile Created 4 years, 7 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 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"
11 #include "base/timer/elapsed_timer.h" 11 #include "base/timer/elapsed_timer.h"
12 #include "chrome/browser/password_manager/password_manager_infobar_delegate_andr oid.h" 12 #include "chrome/browser/password_manager/password_manager_infobar_delegate_andr oid.h"
13 #include "components/infobars/core/confirm_infobar_delegate.h" 13 #include "components/infobars/core/confirm_infobar_delegate.h"
14 #include "components/password_manager/core/browser/password_form_manager.h" 14 #include "components/password_manager/core/browser/password_form_manager.h"
15 #include "components/password_manager/core/browser/password_manager_metrics_util .h" 15 #include "components/password_manager/core/browser/password_manager_metrics_util .h"
16 #include "ui/gfx/range/range.h" 16 #include "ui/gfx/range/range.h"
17 17
18 namespace content { 18 namespace content {
19 class WebContents; 19 class WebContents;
20 } 20 }
21 21
22 namespace password_manager {
23 enum class CredentialSourceType;
24 }
25
26 // After a successful *new* login attempt, we take the PasswordFormManager in 22 // After a successful *new* login attempt, we take the PasswordFormManager in
27 // provisional_save_manager_ and move it to a SavePasswordInfoBarDelegate while 23 // provisional_save_manager_ and move it to a SavePasswordInfoBarDelegate while
28 // the user makes up their mind with the "save password" infobar. Note if the 24 // the user makes up their mind with the "save password" infobar. Note if the
29 // login is one we already know about, the end of the line is 25 // login is one we already know about, the end of the line is
30 // provisional_save_manager_ because we just update it on success and so such 26 // provisional_save_manager_ because we just update it on success and so such
31 // forms never end up in an infobar. 27 // forms never end up in an infobar.
32 class SavePasswordInfoBarDelegate : public PasswordManagerInfoBarDelegate { 28 class SavePasswordInfoBarDelegate : public PasswordManagerInfoBarDelegate {
33 public: 29 public:
34 // 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
35 // password infobar and delegate and adds the infobar to the InfoBarService 31 // password infobar and delegate and adds the infobar to the InfoBarService
(...skipping 26 matching lines...) Expand all
62 // and should update as per her decision. 58 // and should update as per her decision.
63 std::unique_ptr<password_manager::PasswordFormManager> form_to_save_; 59 std::unique_ptr<password_manager::PasswordFormManager> form_to_save_;
64 60
65 // Used to track the results we get from the info bar. 61 // Used to track the results we get from the info bar.
66 password_manager::metrics_util::UIDismissalReason infobar_response_; 62 password_manager::metrics_util::UIDismissalReason infobar_response_;
67 63
68 // Measures the "Save password?" prompt lifetime. Used to report an UMA 64 // Measures the "Save password?" prompt lifetime. Used to report an UMA
69 // signal. 65 // signal.
70 base::ElapsedTimer timer_; 66 base::ElapsedTimer timer_;
71 67
72 // Records source from where infobar was triggered.
73 // Infobar appearance (message, buttons) depends on value of this parameter.
74 password_manager::CredentialSourceType source_type_;
75
76 bool should_show_first_run_experience_; 68 bool should_show_first_run_experience_;
77 69
78 content::WebContents* web_contents_; 70 content::WebContents* web_contents_;
79 71
80 DISALLOW_COPY_AND_ASSIGN(SavePasswordInfoBarDelegate); 72 DISALLOW_COPY_AND_ASSIGN(SavePasswordInfoBarDelegate);
81 }; 73 };
82 74
83 // Creates the platform-specific SavePassword InfoBar. This function is defined 75 // Creates the platform-specific SavePassword InfoBar. This function is defined
84 // in platform-specific .cc (or .mm) files. 76 // in platform-specific .cc (or .mm) files.
85 std::unique_ptr<infobars::InfoBar> CreateSavePasswordInfoBar( 77 std::unique_ptr<infobars::InfoBar> CreateSavePasswordInfoBar(
86 std::unique_ptr<SavePasswordInfoBarDelegate> delegate); 78 std::unique_ptr<SavePasswordInfoBarDelegate> delegate);
87 79
88 #endif // CHROME_BROWSER_PASSWORD_MANAGER_SAVE_PASSWORD_INFOBAR_DELEGATE_ANDROI D_H_ 80 #endif // CHROME_BROWSER_PASSWORD_MANAGER_SAVE_PASSWORD_INFOBAR_DELEGATE_ANDROI D_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698