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

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: Sent For Review Created 3 years, 5 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 "components/password_manager/core/browser/password_manager_client.h" 9 #include "components/password_manager/core/browser/password_manager_client.h"
10 #include "components/password_manager/core/browser/password_manager_metrics_reco rder.h" 10 #include "components/password_manager/core/browser/password_manager_metrics_reco rder.h"
11 #include "components/password_manager/core/browser/stub_credentials_filter.h" 11 #include "components/password_manager/core/browser/stub_credentials_filter.h"
12 #include "components/password_manager/core/browser/stub_log_manager.h" 12 #include "components/password_manager/core/browser/stub_log_manager.h"
13 13
14 namespace password_manager { 14 namespace password_manager {
15 15
16 // Use this class as a base for mock or test clients to avoid stubbing 16 // Use this class as a base for mock or test clients to avoid stubbing
17 // uninteresting pure virtual methods. All the implemented methods are just 17 // uninteresting pure virtual methods. All the implemented methods are just
18 // trivial stubs. Do NOT use in production, only use in tests. 18 // trivial stubs. Do NOT use in production, only use in tests.
19 class StubPasswordManagerClient : public PasswordManagerClient { 19 class StubPasswordManagerClient : public PasswordManagerClient {
20 public: 20 public:
21 StubPasswordManagerClient(); 21 StubPasswordManagerClient();
22 ~StubPasswordManagerClient() override; 22 ~StubPasswordManagerClient() override;
23 23
24 // PasswordManagerClient: 24 // PasswordManagerClient:
25 bool PromptUserToSaveOrUpdatePassword( 25 bool PromptUserToSaveOrUpdatePassword(
26 std::unique_ptr<PasswordFormManager> form_to_save, 26 std::unique_ptr<PasswordFormManager> form_to_save,
27 bool update_password) override; 27 bool update_password) override;
28 void ShowManualFallback(std::unique_ptr<PasswordFormManager> form_to_save,
29 bool update_password) override;
30 void HideManualFallback() override;
28 bool PromptUserToChooseCredentials( 31 bool PromptUserToChooseCredentials(
29 std::vector<std::unique_ptr<autofill::PasswordForm>> local_forms, 32 std::vector<std::unique_ptr<autofill::PasswordForm>> local_forms,
30 const GURL& origin, 33 const GURL& origin,
31 const CredentialsCallback& callback) override; 34 const CredentialsCallback& callback) override;
32 void NotifyUserAutoSignin( 35 void NotifyUserAutoSignin(
33 std::vector<std::unique_ptr<autofill::PasswordForm>> local_forms, 36 std::vector<std::unique_ptr<autofill::PasswordForm>> local_forms,
34 const GURL& origin) override; 37 const GURL& origin) override;
35 void NotifyUserCouldBeAutoSignedIn( 38 void NotifyUserCouldBeAutoSignedIn(
36 std::unique_ptr<autofill::PasswordForm>) override; 39 std::unique_ptr<autofill::PasswordForm>) override;
37 void NotifySuccessfulLoginWithExistingPassword( 40 void NotifySuccessfulLoginWithExistingPassword(
(...skipping 23 matching lines...) Expand all
61 StubLogManager log_manager_; 64 StubLogManager log_manager_;
62 ukm::SourceId ukm_source_id_; 65 ukm::SourceId ukm_source_id_;
63 PasswordManagerMetricsRecorder metrics_recorder_; 66 PasswordManagerMetricsRecorder metrics_recorder_;
64 67
65 DISALLOW_COPY_AND_ASSIGN(StubPasswordManagerClient); 68 DISALLOW_COPY_AND_ASSIGN(StubPasswordManagerClient);
66 }; 69 };
67 70
68 } // namespace password_manager 71 } // namespace password_manager
69 72
70 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_STUB_PASSWORD_MANAGER_CLIENT _H_ 73 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_STUB_PASSWORD_MANAGER_CLIENT _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698