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

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

Issue 1045173003: Fix blacklisting for desktop infobars. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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_H_ 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_SAVE_PASSWORD_INFOBAR_DELEGATE_H_
6 #define CHROME_BROWSER_PASSWORD_MANAGER_SAVE_PASSWORD_INFOBAR_DELEGATE_H_ 6 #define CHROME_BROWSER_PASSWORD_MANAGER_SAVE_PASSWORD_INFOBAR_DELEGATE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/timer/elapsed_timer.h" 10 #include "base/timer/elapsed_timer.h"
(...skipping 22 matching lines...) Expand all
33 // for |web_contents|. |uma_histogram_suffix| is empty, or one of the 33 // for |web_contents|. |uma_histogram_suffix| is empty, or one of the
34 // "group_X" suffixes used in the histogram names for infobar usage reporting; 34 // "group_X" suffixes used in the histogram names for infobar usage reporting;
35 // if empty, the usage is not reported, otherwise the suffix is used to choose 35 // if empty, the usage is not reported, otherwise the suffix is used to choose
36 // the right histogram. 36 // the right histogram.
37 static void Create( 37 static void Create(
38 content::WebContents* web_contents, 38 content::WebContents* web_contents,
39 scoped_ptr<password_manager::PasswordFormManager> form_to_save, 39 scoped_ptr<password_manager::PasswordFormManager> form_to_save,
40 const std::string& uma_histogram_suffix, 40 const std::string& uma_histogram_suffix,
41 password_manager::CredentialSourceType source_type); 41 password_manager::CredentialSourceType source_type);
42 42
43 #if defined(UNIT_TEST)
vabr (Chromium) 2015/04/02 13:32:16 As an alternative -- what about making the SavePas
melandory 2015/04/02 15:49:17 I'll add TODO.
44 static scoped_ptr<ConfirmInfoBarDelegate> Create(
45 scoped_ptr<password_manager::PasswordFormManager> form_to_save,
46 const std::string& uma_histogram_suffix,
vabr (Chromium) 2015/04/02 13:32:16 I don't think you need this argument, just hard-co
melandory 2015/04/02 15:49:17 Done.
47 password_manager::CredentialSourceType source_type) {
48 return scoped_ptr<ConfirmInfoBarDelegate>(new SavePasswordInfoBarDelegate(
49 form_to_save.Pass(), uma_histogram_suffix, source_type));
50 }
51 #endif
52
43 ~SavePasswordInfoBarDelegate() override; 53 ~SavePasswordInfoBarDelegate() override;
44 54
45 // If the infobar was triggered by the Credential management API, then on 55 // If the infobar was triggered by the Credential management API, then on
46 // Android it should display the "More" button. 56 // Android it should display the "More" button.
47 bool ShouldShowMoreButton(); 57 bool ShouldShowMoreButton();
48 58
49 // ConfirmInfoBarDelegate: 59 // ConfirmInfoBarDelegate:
50 Type GetInfoBarType() const override; 60 Type GetInfoBarType() const override;
51 InfoBarAutomationType GetInfoBarAutomationType() const override; 61 InfoBarAutomationType GetInfoBarAutomationType() const override;
52 int GetIconID() const override; 62 int GetIconID() const override;
(...skipping 26 matching lines...) Expand all
79 const std::string uma_histogram_suffix_; 89 const std::string uma_histogram_suffix_;
80 90
81 // Records source from where infobar was triggered. 91 // Records source from where infobar was triggered.
82 // Infobar appearance (title, buttons) depends on value of this parameter. 92 // Infobar appearance (title, buttons) depends on value of this parameter.
83 password_manager::CredentialSourceType source_type_; 93 password_manager::CredentialSourceType source_type_;
84 94
85 DISALLOW_COPY_AND_ASSIGN(SavePasswordInfoBarDelegate); 95 DISALLOW_COPY_AND_ASSIGN(SavePasswordInfoBarDelegate);
86 }; 96 };
87 97
88 #endif // CHROME_BROWSER_PASSWORD_MANAGER_SAVE_PASSWORD_INFOBAR_DELEGATE_H_ 98 #endif // CHROME_BROWSER_PASSWORD_MANAGER_SAVE_PASSWORD_INFOBAR_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698