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

Side by Side Diff: chrome/browser/password_manager/password_store_mac.h

Issue 11000016: Move forms/ out of webkit/. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Response to review Created 8 years, 2 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_MAC_H_ 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_MAC_H_
6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_MAC_H_ 6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_MAC_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
(...skipping 26 matching lines...) Expand all
37 37
38 virtual void ShutdownOnUIThread() OVERRIDE; 38 virtual void ShutdownOnUIThread() OVERRIDE;
39 39
40 protected: 40 protected:
41 virtual ~PasswordStoreMac(); 41 virtual ~PasswordStoreMac();
42 42
43 virtual bool ScheduleTask(const base::Closure& task) OVERRIDE; 43 virtual bool ScheduleTask(const base::Closure& task) OVERRIDE;
44 44
45 private: 45 private:
46 virtual void ReportMetricsImpl() OVERRIDE; 46 virtual void ReportMetricsImpl() OVERRIDE;
47 virtual void AddLoginImpl(const webkit::forms::PasswordForm& form) OVERRIDE; 47 virtual void AddLoginImpl(const content::PasswordForm& form) OVERRIDE;
48 virtual void UpdateLoginImpl( 48 virtual void UpdateLoginImpl(
49 const webkit::forms::PasswordForm& form) OVERRIDE; 49 const content::PasswordForm& form) OVERRIDE;
50 virtual void RemoveLoginImpl( 50 virtual void RemoveLoginImpl(
51 const webkit::forms::PasswordForm& form) OVERRIDE; 51 const content::PasswordForm& form) OVERRIDE;
52 virtual void RemoveLoginsCreatedBetweenImpl( 52 virtual void RemoveLoginsCreatedBetweenImpl(
53 const base::Time& delete_begin, const base::Time& delete_end) OVERRIDE; 53 const base::Time& delete_begin, const base::Time& delete_end) OVERRIDE;
54 virtual void GetLoginsImpl(GetLoginsRequest* request, 54 virtual void GetLoginsImpl(GetLoginsRequest* request,
55 const webkit::forms::PasswordForm& form) OVERRIDE; 55 const content::PasswordForm& form) OVERRIDE;
56 virtual void GetAutofillableLoginsImpl(GetLoginsRequest* request) OVERRIDE; 56 virtual void GetAutofillableLoginsImpl(GetLoginsRequest* request) OVERRIDE;
57 virtual void GetBlacklistLoginsImpl(GetLoginsRequest* request) OVERRIDE; 57 virtual void GetBlacklistLoginsImpl(GetLoginsRequest* request) OVERRIDE;
58 virtual bool FillAutofillableLogins( 58 virtual bool FillAutofillableLogins(
59 std::vector<webkit::forms::PasswordForm*>* forms) OVERRIDE; 59 std::vector<content::PasswordForm*>* forms) OVERRIDE;
60 virtual bool FillBlacklistLogins( 60 virtual bool FillBlacklistLogins(
61 std::vector<webkit::forms::PasswordForm*>* forms) OVERRIDE; 61 std::vector<content::PasswordForm*>* forms) OVERRIDE;
62 62
63 // Adds the given form to the Keychain if it's something we want to store 63 // Adds the given form to the Keychain if it's something we want to store
64 // there (i.e., not a blacklist entry). Returns true if the operation 64 // there (i.e., not a blacklist entry). Returns true if the operation
65 // succeeded (either we added successfully, or we didn't need to). 65 // succeeded (either we added successfully, or we didn't need to).
66 bool AddToKeychainIfNecessary(const webkit::forms::PasswordForm& form); 66 bool AddToKeychainIfNecessary(const content::PasswordForm& form);
67 67
68 // Returns true if our database contains a form that exactly matches the given 68 // Returns true if our database contains a form that exactly matches the given
69 // keychain form. 69 // keychain form.
70 bool DatabaseHasFormMatchingKeychainForm( 70 bool DatabaseHasFormMatchingKeychainForm(
71 const webkit::forms::PasswordForm& form); 71 const content::PasswordForm& form);
72 72
73 // Returns all the Keychain entries that we own but no longer have 73 // Returns all the Keychain entries that we own but no longer have
74 // corresponding metadata for in our database. 74 // corresponding metadata for in our database.
75 // Caller is responsible for deleting the forms. 75 // Caller is responsible for deleting the forms.
76 std::vector<webkit::forms::PasswordForm*> GetUnusedKeychainForms(); 76 std::vector<content::PasswordForm*> GetUnusedKeychainForms();
77 77
78 // Removes the given forms from the database. 78 // Removes the given forms from the database.
79 void RemoveDatabaseForms( 79 void RemoveDatabaseForms(
80 const std::vector<webkit::forms::PasswordForm*>& forms); 80 const std::vector<content::PasswordForm*>& forms);
81 81
82 // Removes the given forms from the Keychain. 82 // Removes the given forms from the Keychain.
83 void RemoveKeychainForms( 83 void RemoveKeychainForms(
84 const std::vector<webkit::forms::PasswordForm*>& forms); 84 const std::vector<content::PasswordForm*>& forms);
85 85
86 // Allows the creation of |notification_service_| to be scheduled on the right 86 // Allows the creation of |notification_service_| to be scheduled on the right
87 // thread. 87 // thread.
88 void CreateNotificationService(); 88 void CreateNotificationService();
89 89
90 scoped_ptr<crypto::AppleKeychain> keychain_; 90 scoped_ptr<crypto::AppleKeychain> keychain_;
91 scoped_ptr<LoginDatabase> login_metadata_db_; 91 scoped_ptr<LoginDatabase> login_metadata_db_;
92 92
93 // Thread that the synchronous methods are run on. 93 // Thread that the synchronous methods are run on.
94 scoped_ptr<base::Thread> thread_; 94 scoped_ptr<base::Thread> thread_;
95 95
96 // Since we aren't running on a well-known thread but still want to send out 96 // Since we aren't running on a well-known thread but still want to send out
97 // notifications, we need to run our own service. 97 // notifications, we need to run our own service.
98 scoped_ptr<content::NotificationService> notification_service_; 98 scoped_ptr<content::NotificationService> notification_service_;
99 99
100 DISALLOW_COPY_AND_ASSIGN(PasswordStoreMac); 100 DISALLOW_COPY_AND_ASSIGN(PasswordStoreMac);
101 }; 101 };
102 102
103 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_MAC_H_ 103 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698