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

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

Issue 256003003: Enable Automatic Passwords Saving (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_CLIENT_H_ 5 #ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_CLIENT_H_
6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_CLIENT_H_ 6 #define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_CLIENT_H_
7 7
8 #include "base/metrics/field_trial.h" 8 #include "base/metrics/field_trial.h"
9 #include "components/autofill/core/common/password_form.h" 9 #include "components/autofill/core/common/password_form.h"
10 #include "components/autofill/core/common/password_form_fill_data.h" 10 #include "components/autofill/core/common/password_form_fill_data.h"
11 11
12 class PrefService; 12 class PrefService;
13 13
14 namespace password_manager { 14 namespace password_manager {
15 15
16 class PasswordFormManager; 16 class PasswordFormManager;
17 class PasswordManagerDriver; 17 class PasswordManagerDriver;
18 class PasswordStore; 18 class PasswordStore;
19 class PasswordManagerLogger; 19 class PasswordManagerLogger;
20 20
21 // An abstraction of operations that depend on the embedders (e.g. Chrome) 21 // An abstraction of operations that depend on the embedders (e.g. Chrome)
22 // environment. 22 // environment.
23 class PasswordManagerClient { 23 class PasswordManagerClient {
24 public: 24 public:
25 PasswordManagerClient() {} 25 PasswordManagerClient() {}
26 virtual ~PasswordManagerClient() {} 26 virtual ~PasswordManagerClient() {}
27 27
28 // For automated testing, the save password prompt should sometimes not be
29 // shown, and password immediately saved instead. That can be enforced by
30 // a command-line flag. If auto-saving is enforced, this method returns true.
31 // The default return value is false.
32 virtual bool IsAutomaticPasswordSavingEnabled() const;
33
28 // Informs the embedder of a password form that can be saved if the user 34 // Informs the embedder of a password form that can be saved if the user
29 // allows it. The embedder is not required to prompt the user if it decides 35 // allows it. The embedder is not required to prompt the user if it decides
30 // that this form doesn't need to be saved. 36 // that this form doesn't need to be saved.
31 virtual void PromptUserToSavePassword(PasswordFormManager* form_to_save) = 0; 37 virtual void PromptUserToSavePassword(PasswordFormManager* form_to_save) = 0;
32 38
33 // Called when a password is autofilled. Default implementation is a no-op. 39 // Called when a password is autofilled. Default implementation is a no-op.
34 virtual void PasswordWasAutofilled( 40 virtual void PasswordWasAutofilled(
35 const autofill::PasswordFormMap& best_matches) const {} 41 const autofill::PasswordFormMap& best_matches) const {}
36 42
37 // Called when password autofill is blocked by the blacklist. Default 43 // Called when password autofill is blocked by the blacklist. Default
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 // displayed, and false otherwise. 77 // displayed, and false otherwise.
72 virtual bool IsLoggingActive() const; 78 virtual bool IsLoggingActive() const;
73 79
74 private: 80 private:
75 DISALLOW_COPY_AND_ASSIGN(PasswordManagerClient); 81 DISALLOW_COPY_AND_ASSIGN(PasswordManagerClient);
76 }; 82 };
77 83
78 } // namespace password_manager 84 } // namespace password_manager
79 85
80 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_CLIENT_H_ 86 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_MANAGER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698