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

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

Issue 2900693002: [Password Manager] Convert |pending_login_managers_| to an array of scoped_refptr (Closed)
Patch Set: Rebase Created 3 years, 6 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_IOS_CHROME_PASSWORD_MANAGER_CLIENT_H_ 5 #ifndef IOS_CHROME_BROWSER_PASSWORDS_IOS_CHROME_PASSWORD_MANAGER_CLIENT_H_
6 #define IOS_CHROME_BROWSER_PASSWORDS_IOS_CHROME_PASSWORD_MANAGER_CLIENT_H_ 6 #define IOS_CHROME_BROWSER_PASSWORDS_IOS_CHROME_PASSWORD_MANAGER_CLIENT_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #import "components/password_manager/core/browser/password_manager_client.h" 9 #import "components/password_manager/core/browser/password_manager_client.h"
10 #include "components/password_manager/sync/browser/sync_credentials_filter.h" 10 #include "components/password_manager/sync/browser/sync_credentials_filter.h"
11 #include "components/prefs/pref_member.h" 11 #include "components/prefs/pref_member.h"
12 12
13 namespace ios { 13 namespace ios {
14 class ChromeBrowserState; 14 class ChromeBrowserState;
15 } 15 }
16 16
17 namespace password_manager { 17 namespace password_manager {
18 class PasswordFormManager; 18 class PasswordFormManager;
19 } 19 }
20 20
21 @protocol PasswordManagerClientDelegate 21 @protocol PasswordManagerClientDelegate
22 22
23 // Shows UI to prompt the user to save the password. 23 // Shows UI to prompt the user to save the password.
24 - (void)showSavePasswordInfoBar: 24 - (void)showSavePasswordInfoBar:
25 (std::unique_ptr<password_manager::PasswordFormManager>)formToSave; 25 (scoped_refptr<password_manager::PasswordFormManager>)formToSave;
26 26
27 // Shows UI to prompt the user to update the password. 27 // Shows UI to prompt the user to update the password.
28 - (void)showUpdatePasswordInfoBar: 28 - (void)showUpdatePasswordInfoBar:
29 (std::unique_ptr<password_manager::PasswordFormManager>)formToUpdate; 29 (scoped_refptr<password_manager::PasswordFormManager>)formToUpdate;
30 30
31 @property(readonly, nonatomic) ios::ChromeBrowserState* browserState; 31 @property(readonly, nonatomic) ios::ChromeBrowserState* browserState;
32 32
33 @property(readonly, nonatomic) const GURL& lastCommittedURL; 33 @property(readonly, nonatomic) const GURL& lastCommittedURL;
34 34
35 @end 35 @end
36 36
37 // An iOS implementation of password_manager::PasswordManagerClient. 37 // An iOS implementation of password_manager::PasswordManagerClient.
38 class IOSChromePasswordManagerClient 38 class IOSChromePasswordManagerClient
39 : public password_manager::PasswordManagerClient { 39 : public password_manager::PasswordManagerClient {
40 public: 40 public:
41 explicit IOSChromePasswordManagerClient( 41 explicit IOSChromePasswordManagerClient(
42 id<PasswordManagerClientDelegate> delegate); 42 id<PasswordManagerClientDelegate> delegate);
43 43
44 ~IOSChromePasswordManagerClient() override; 44 ~IOSChromePasswordManagerClient() override;
45 45
46 // password_manager::PasswordManagerClient implementation. 46 // password_manager::PasswordManagerClient implementation.
47 password_manager::PasswordSyncState GetPasswordSyncState() const override; 47 password_manager::PasswordSyncState GetPasswordSyncState() const override;
48 bool PromptUserToSaveOrUpdatePassword( 48 bool PromptUserToSaveOrUpdatePassword(
49 std::unique_ptr<password_manager::PasswordFormManager> form_to_save, 49 scoped_refptr<password_manager::PasswordFormManager> form_to_save,
50 bool update_password) override; 50 bool update_password) override;
51 bool PromptUserToChooseCredentials( 51 bool PromptUserToChooseCredentials(
52 std::vector<std::unique_ptr<autofill::PasswordForm>> local_forms, 52 std::vector<std::unique_ptr<autofill::PasswordForm>> local_forms,
53 const GURL& origin, 53 const GURL& origin,
54 const CredentialsCallback& callback) override; 54 const CredentialsCallback& callback) override;
55 void AutomaticPasswordSave( 55 void AutomaticPasswordSave(
56 std::unique_ptr<password_manager::PasswordFormManager> saved_form_manager) 56 scoped_refptr<password_manager::PasswordFormManager> saved_form_manager)
57 override; 57 override;
58 bool IsIncognito() const override; 58 bool IsIncognito() const override;
59 PrefService* GetPrefs() override; 59 PrefService* GetPrefs() override;
60 password_manager::PasswordStore* GetPasswordStore() const override; 60 password_manager::PasswordStore* GetPasswordStore() const override;
61 void NotifyUserAutoSignin( 61 void NotifyUserAutoSignin(
62 std::vector<std::unique_ptr<autofill::PasswordForm>> local_forms, 62 std::vector<std::unique_ptr<autofill::PasswordForm>> local_forms,
63 const GURL& origin) override; 63 const GURL& origin) override;
64 void NotifyUserCouldBeAutoSignedIn( 64 void NotifyUserCouldBeAutoSignedIn(
65 std::unique_ptr<autofill::PasswordForm> form) override; 65 std::unique_ptr<autofill::PasswordForm> form) override;
66 void NotifySuccessfulLoginWithExistingPassword( 66 void NotifySuccessfulLoginWithExistingPassword(
(...skipping 11 matching lines...) Expand all
78 // The preference associated with 78 // The preference associated with
79 // password_manager::prefs::kPasswordManagerSavingEnabled. 79 // password_manager::prefs::kPasswordManagerSavingEnabled.
80 BooleanPrefMember saving_passwords_enabled_; 80 BooleanPrefMember saving_passwords_enabled_;
81 81
82 const password_manager::SyncCredentialsFilter credentials_filter_; 82 const password_manager::SyncCredentialsFilter credentials_filter_;
83 83
84 DISALLOW_COPY_AND_ASSIGN(IOSChromePasswordManagerClient); 84 DISALLOW_COPY_AND_ASSIGN(IOSChromePasswordManagerClient);
85 }; 85 };
86 86
87 #endif // IOS_CHROME_BROWSER_PASSWORDS_IOS_CHROME_PASSWORD_MANAGER_CLIENT_H_ 87 #endif // IOS_CHROME_BROWSER_PASSWORDS_IOS_CHROME_PASSWORD_MANAGER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698