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

Side by Side Diff: components/password_manager/core/browser/stub_password_manager_client.h

Issue 2915763003: [Password Manager] Show omnibox icon and anchored prompt once user start typing password (Closed)
Patch Set: Rebase Created 3 years, 4 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 COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_STUB_PASSWORD_MANAGER_CLIENT_H_ 5 #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_STUB_PASSWORD_MANAGER_CLIENT_H_
6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_STUB_PASSWORD_MANAGER_CLIENT_H_ 6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_STUB_PASSWORD_MANAGER_CLIENT_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/optional.h" 9 #include "base/optional.h"
10 #include "components/password_manager/core/browser/password_manager_client.h" 10 #include "components/password_manager/core/browser/password_manager_client.h"
11 #include "components/password_manager/core/browser/password_manager_metrics_reco rder.h" 11 #include "components/password_manager/core/browser/password_manager_metrics_reco rder.h"
12 #include "components/password_manager/core/browser/stub_credentials_filter.h" 12 #include "components/password_manager/core/browser/stub_credentials_filter.h"
13 #include "components/password_manager/core/browser/stub_log_manager.h" 13 #include "components/password_manager/core/browser/stub_log_manager.h"
14 14
15 namespace password_manager { 15 namespace password_manager {
16 16
17 // Use this class as a base for mock or test clients to avoid stubbing 17 // Use this class as a base for mock or test clients to avoid stubbing
18 // uninteresting pure virtual methods. All the implemented methods are just 18 // uninteresting pure virtual methods. All the implemented methods are just
19 // trivial stubs. Do NOT use in production, only use in tests. 19 // trivial stubs. Do NOT use in production, only use in tests.
20 class StubPasswordManagerClient : public PasswordManagerClient { 20 class StubPasswordManagerClient : public PasswordManagerClient {
21 public: 21 public:
22 StubPasswordManagerClient(); 22 StubPasswordManagerClient();
23 ~StubPasswordManagerClient() override; 23 ~StubPasswordManagerClient() override;
24 24
25 // PasswordManagerClient: 25 // PasswordManagerClient:
26 bool PromptUserToSaveOrUpdatePassword( 26 bool PromptUserToSaveOrUpdatePassword(
27 std::unique_ptr<PasswordFormManager> form_to_save, 27 std::unique_ptr<PasswordFormManager> form_to_save,
28 bool update_password) override; 28 bool update_password) override;
29 void ShowManualFallbackForSaving(
30 std::unique_ptr<PasswordFormManager> form_to_save,
31 bool has_generated_password,
32 bool update_password) override;
33 void HideManualFallbackForSaving() override;
29 bool PromptUserToChooseCredentials( 34 bool PromptUserToChooseCredentials(
30 std::vector<std::unique_ptr<autofill::PasswordForm>> local_forms, 35 std::vector<std::unique_ptr<autofill::PasswordForm>> local_forms,
31 const GURL& origin, 36 const GURL& origin,
32 const CredentialsCallback& callback) override; 37 const CredentialsCallback& callback) override;
33 void NotifyUserAutoSignin( 38 void NotifyUserAutoSignin(
34 std::vector<std::unique_ptr<autofill::PasswordForm>> local_forms, 39 std::vector<std::unique_ptr<autofill::PasswordForm>> local_forms,
35 const GURL& origin) override; 40 const GURL& origin) override;
36 void NotifyUserCouldBeAutoSignedIn( 41 void NotifyUserCouldBeAutoSignedIn(
37 std::unique_ptr<autofill::PasswordForm>) override; 42 std::unique_ptr<autofill::PasswordForm>) override;
38 void NotifySuccessfulLoginWithExistingPassword( 43 void NotifySuccessfulLoginWithExistingPassword(
(...skipping 24 matching lines...) Expand all
63 StubLogManager log_manager_; 68 StubLogManager log_manager_;
64 ukm::SourceId ukm_source_id_; 69 ukm::SourceId ukm_source_id_;
65 base::Optional<PasswordManagerMetricsRecorder> metrics_recorder_; 70 base::Optional<PasswordManagerMetricsRecorder> metrics_recorder_;
66 71
67 DISALLOW_COPY_AND_ASSIGN(StubPasswordManagerClient); 72 DISALLOW_COPY_AND_ASSIGN(StubPasswordManagerClient);
68 }; 73 };
69 74
70 } // namespace password_manager 75 } // namespace password_manager
71 76
72 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_STUB_PASSWORD_MANAGER_CLIENT _H_ 77 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_STUB_PASSWORD_MANAGER_CLIENT _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698