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

Side by Side Diff: ios/chrome/browser/passwords/credential_manager.h

Issue 1762603002: Switch components/password_manager code from IPC messages to Mojo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase only Created 4 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 IOS_CHROME_BROWSER_PASSWORDS_CREDENTIAL_MANAGER_H_ 5 #ifndef IOS_CHROME_BROWSER_PASSWORDS_CREDENTIAL_MANAGER_H_
6 #define IOS_CHROME_BROWSER_PASSWORDS_CREDENTIAL_MANAGER_H_ 6 #define IOS_CHROME_BROWSER_PASSWORDS_CREDENTIAL_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 void SignedIn(int request_id, 51 void SignedIn(int request_id,
52 const GURL& source_url, 52 const GURL& source_url,
53 const web::Credential& credential) override; 53 const web::Credential& credential) override;
54 void SignedOut(int request_id, const GURL& source_url) override; 54 void SignedOut(int request_id, const GURL& source_url) override;
55 void WebStateDestroyed() override; 55 void WebStateDestroyed() override;
56 56
57 // password_manager::CredentialManagerPendingRequestTaskDelegate: 57 // password_manager::CredentialManagerPendingRequestTaskDelegate:
58 bool IsZeroClickAllowed() const override; 58 bool IsZeroClickAllowed() const override;
59 GURL GetOrigin() const override; 59 GURL GetOrigin() const override;
60 void SendCredential( 60 void SendCredential(
61 int id, 61 const password_manager::SendCredentialCallback& send_callback,
62 const password_manager::CredentialInfo& credential) override; 62 const password_manager::CredentialInfo& credential) override;
63 void SendPasswordForm(int id, const autofill::PasswordForm* form) override; 63 void SendPasswordForm(
64 const password_manager::SendCredentialCallback& send_callback,
65 const autofill::PasswordForm* form) override;
64 password_manager::PasswordManagerClient* client() const override; 66 password_manager::PasswordManagerClient* client() const override;
65 autofill::PasswordForm GetSynthesizedFormForOrigin() const override; 67 autofill::PasswordForm GetSynthesizedFormForOrigin() const override;
66 68
67 // password_manager::CredentialManagerPendingRequireUserMediationTaskDelegate: 69 // password_manager::CredentialManagerPendingRequireUserMediationTaskDelegate:
68 password_manager::PasswordStore* GetPasswordStore() override; 70 password_manager::PasswordStore* GetPasswordStore() override;
69 void DoneRequiringUserMediation() override; 71 void DoneRequiringUserMediation() override;
70 72
71 // CredentialManagerPasswordFormManagerDelegate: 73 // CredentialManagerPasswordFormManagerDelegate:
72 void OnProvisionalSaveComplete() override; 74 void OnProvisionalSaveComplete() override;
73 75
74 private: 76 private:
75 // The errors that can cause a request to fail. 77 // The errors that can cause a request to fail.
76 enum ErrorType { 78 enum ErrorType {
77 // An existing request is outstanding. 79 // An existing request is outstanding.
78 ERROR_TYPE_PENDING_REQUEST = 0, 80 ERROR_TYPE_PENDING_REQUEST = 0,
79 81
80 // The password store isn't available. 82 // The password store isn't available.
81 ERROR_TYPE_PASSWORD_STORE_UNAVAILABLE, 83 ERROR_TYPE_PASSWORD_STORE_UNAVAILABLE,
82 84
83 // The page origin is untrusted. 85 // The page origin is untrusted.
84 ERROR_TYPE_SECURITY_ERROR_UNTRUSTED_ORIGIN, 86 ERROR_TYPE_SECURITY_ERROR_UNTRUSTED_ORIGIN,
85 }; 87 };
86 88
89 void SendCredentialByID(int request_id,
90 const password_manager::CredentialInfo& credential);
91
87 // Sends a message via |js_manager_| to resolve the JavaScript Promise 92 // Sends a message via |js_manager_| to resolve the JavaScript Promise
88 // associated with |request_id|. Invoked after a page-initiated credential 93 // associated with |request_id|. Invoked after a page-initiated credential
89 // event is acknowledged by the PasswordStore. 94 // event is acknowledged by the PasswordStore.
90 void ResolvePromise(int request_id); 95 void ResolvePromise(int request_id);
91 96
92 // Sends a message via |js_manager_| to reject the JavaScript Promise 97 // Sends a message via |js_manager_| to reject the JavaScript Promise
93 // associated with |request_id_| with the given |error_type|. Invoked after a 98 // associated with |request_id_| with the given |error_type|. Invoked after a
94 // page-initiated credential event, store, or retrieval fails. 99 // page-initiated credential event, store, or retrieval fails.
95 void RejectPromise(int request_id, ErrorType error_type); 100 void RejectPromise(int request_id, ErrorType error_type);
96 101
(...skipping 26 matching lines...) Expand all
123 // Whether zero-click sign-in is enabled. 128 // Whether zero-click sign-in is enabled.
124 BooleanPrefMember zero_click_sign_in_enabled_; 129 BooleanPrefMember zero_click_sign_in_enabled_;
125 130
126 // Weak pointer factory for asynchronously resolving requests. 131 // Weak pointer factory for asynchronously resolving requests.
127 base::WeakPtrFactory<CredentialManager> weak_factory_; 132 base::WeakPtrFactory<CredentialManager> weak_factory_;
128 133
129 DISALLOW_COPY_AND_ASSIGN(CredentialManager); 134 DISALLOW_COPY_AND_ASSIGN(CredentialManager);
130 }; 135 };
131 136
132 #endif // IOS_CHROME_BROWSER_PASSWORDS_CREDENTIAL_MANAGER_H_ 137 #endif // IOS_CHROME_BROWSER_PASSWORDS_CREDENTIAL_MANAGER_H_
OLDNEW
« no previous file with comments | « content/content_common_mojo_bindings.gyp ('k') | ios/chrome/browser/passwords/credential_manager.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698