OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
| 11 #include "chrome/browser/password_manager/login_database.h" |
11 #include "chrome/browser/password_manager/password_store.h" | 12 #include "chrome/browser/password_manager/password_store.h" |
12 | 13 |
13 class LoginDatabaseMac; | |
14 class MacKeychain; | 14 class MacKeychain; |
15 | 15 |
16 // Implements PasswordStore on top of the OS X Keychain, with an internal | 16 // Implements PasswordStore on top of the OS X Keychain, with an internal |
17 // database for extra metadata. For an overview of the interactions with the | 17 // database for extra metadata. For an overview of the interactions with the |
18 // Keychain, as well as the rationale for some of the behaviors, see the | 18 // Keychain, as well as the rationale for some of the behaviors, see the |
19 // Keychain integration design doc: | 19 // Keychain integration design doc: |
20 // http://dev.chromium.org/developers/design-documents/os-x-password-manager-key
chain-integration | 20 // http://dev.chromium.org/developers/design-documents/os-x-password-manager-key
chain-integration |
21 class PasswordStoreMac : public PasswordStore { | 21 class PasswordStoreMac : public PasswordStore { |
22 public: | 22 public: |
23 // Takes ownership of |keychain| and |login_db|, both of which must be | 23 // Takes ownership of |keychain| and |login_db|, both of which must be |
24 // non-NULL. | 24 // non-NULL. |
25 PasswordStoreMac(MacKeychain* keychain, LoginDatabaseMac* login_db); | 25 PasswordStoreMac(MacKeychain* keychain, LoginDatabase* login_db); |
26 | 26 |
27 private: | 27 private: |
28 virtual ~PasswordStoreMac(); | 28 virtual ~PasswordStoreMac(); |
29 | 29 |
30 void AddLoginImpl(const webkit_glue::PasswordForm& form); | 30 void AddLoginImpl(const webkit_glue::PasswordForm& form); |
31 void UpdateLoginImpl(const webkit_glue::PasswordForm& form); | 31 void UpdateLoginImpl(const webkit_glue::PasswordForm& form); |
32 void RemoveLoginImpl(const webkit_glue::PasswordForm& form); | 32 void RemoveLoginImpl(const webkit_glue::PasswordForm& form); |
33 void RemoveLoginsCreatedBetweenImpl(const base::Time& delete_begin, | 33 void RemoveLoginsCreatedBetweenImpl(const base::Time& delete_begin, |
34 const base::Time& delete_end); | 34 const base::Time& delete_end); |
35 void GetLoginsImpl(GetLoginsRequest* request, | 35 void GetLoginsImpl(GetLoginsRequest* request, |
(...skipping 18 matching lines...) Expand all Loading... |
54 | 54 |
55 // Removes the given forms from the database. | 55 // Removes the given forms from the database. |
56 void RemoveDatabaseForms( | 56 void RemoveDatabaseForms( |
57 const std::vector<webkit_glue::PasswordForm*>& forms); | 57 const std::vector<webkit_glue::PasswordForm*>& forms); |
58 | 58 |
59 // Removes the given forms from the Keychain. | 59 // Removes the given forms from the Keychain. |
60 void RemoveKeychainForms( | 60 void RemoveKeychainForms( |
61 const std::vector<webkit_glue::PasswordForm*>& forms); | 61 const std::vector<webkit_glue::PasswordForm*>& forms); |
62 | 62 |
63 scoped_ptr<MacKeychain> keychain_; | 63 scoped_ptr<MacKeychain> keychain_; |
64 scoped_ptr<LoginDatabaseMac> login_metadata_db_; | 64 scoped_ptr<LoginDatabase> login_metadata_db_; |
65 | 65 |
66 DISALLOW_COPY_AND_ASSIGN(PasswordStoreMac); | 66 DISALLOW_COPY_AND_ASSIGN(PasswordStoreMac); |
67 }; | 67 }; |
68 | 68 |
69 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_MAC_H_ | 69 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_MAC_H_ |
OLD | NEW |