Chromium Code Reviews| OLD | NEW |
|---|---|
| 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" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/memory/scoped_vector.h" | 12 #include "base/memory/scoped_vector.h" |
| 13 #include "base/threading/thread.h" | 13 #include "base/threading/thread.h" |
| 14 #include "components/password_manager/core/browser/login_database.h" | 14 #include "components/password_manager/core/browser/login_database.h" |
| 15 #include "components/password_manager/core/browser/password_store.h" | 15 #include "components/password_manager/core/browser/password_store.h" |
| 16 | 16 |
| 17 namespace crypto { | 17 namespace crypto { |
| 18 class AppleKeychain; | 18 class AppleKeychain; |
| 19 } | 19 } |
| 20 | 20 |
| 21 namespace password_manager { | 21 namespace password_manager { |
| 22 class LoginDatabase; | 22 class LoginDatabase; |
| 23 } | 23 } |
| 24 | 24 |
| 25 namespace url { | |
| 26 class Origin; | |
|
vasilii
2015/11/18 16:27:42
It's already present in PasswordStore.
Timo Reimann
2015/11/18 23:42:14
Removed.
| |
| 27 } | |
| 28 | |
| 25 // TODO(vasilii): Deprecate this class. The class should be used by | 29 // TODO(vasilii): Deprecate this class. The class should be used by |
| 26 // PasswordStoreProxyMac wrapper. | 30 // PasswordStoreProxyMac wrapper. |
| 27 // Implements PasswordStore on top of the OS X Keychain, with an internal | 31 // Implements PasswordStore on top of the OS X Keychain, with an internal |
| 28 // database for extra metadata. For an overview of the interactions with the | 32 // database for extra metadata. For an overview of the interactions with the |
| 29 // Keychain, as well as the rationale for some of the behaviors, see the | 33 // Keychain, as well as the rationale for some of the behaviors, see the |
| 30 // Keychain integration design doc: | 34 // Keychain integration design doc: |
| 31 // http://dev.chromium.org/developers/design-documents/os-x-password-manager-key chain-integration | 35 // http://dev.chromium.org/developers/design-documents/os-x-password-manager-key chain-integration |
| 32 class PasswordStoreMac : public password_manager::PasswordStore { | 36 class PasswordStoreMac : public password_manager::PasswordStore { |
| 33 public: | 37 public: |
| 34 enum MigrationResult { | 38 enum MigrationResult { |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 70 private: | 74 private: |
| 71 bool Init(const syncer::SyncableService::StartSyncFlare& flare) override; | 75 bool Init(const syncer::SyncableService::StartSyncFlare& flare) override; |
| 72 void ReportMetricsImpl(const std::string& sync_username, | 76 void ReportMetricsImpl(const std::string& sync_username, |
| 73 bool custom_passphrase_sync_enabled) override; | 77 bool custom_passphrase_sync_enabled) override; |
| 74 password_manager::PasswordStoreChangeList AddLoginImpl( | 78 password_manager::PasswordStoreChangeList AddLoginImpl( |
| 75 const autofill::PasswordForm& form) override; | 79 const autofill::PasswordForm& form) override; |
| 76 password_manager::PasswordStoreChangeList UpdateLoginImpl( | 80 password_manager::PasswordStoreChangeList UpdateLoginImpl( |
| 77 const autofill::PasswordForm& form) override; | 81 const autofill::PasswordForm& form) override; |
| 78 password_manager::PasswordStoreChangeList RemoveLoginImpl( | 82 password_manager::PasswordStoreChangeList RemoveLoginImpl( |
| 79 const autofill::PasswordForm& form) override; | 83 const autofill::PasswordForm& form) override; |
| 84 password_manager::PasswordStoreChangeList RemoveLoginsByOriginAndTimeImpl( | |
| 85 const url::Origin& origin, | |
| 86 base::Time delete_begin, | |
| 87 base::Time delete_end) override; | |
| 80 password_manager::PasswordStoreChangeList RemoveLoginsCreatedBetweenImpl( | 88 password_manager::PasswordStoreChangeList RemoveLoginsCreatedBetweenImpl( |
| 81 base::Time delete_begin, | 89 base::Time delete_begin, |
| 82 base::Time delete_end) override; | 90 base::Time delete_end) override; |
| 83 password_manager::PasswordStoreChangeList RemoveLoginsSyncedBetweenImpl( | 91 password_manager::PasswordStoreChangeList RemoveLoginsSyncedBetweenImpl( |
| 84 base::Time delete_begin, | 92 base::Time delete_begin, |
| 85 base::Time delete_end) override; | 93 base::Time delete_end) override; |
| 86 ScopedVector<autofill::PasswordForm> FillMatchingLogins( | 94 ScopedVector<autofill::PasswordForm> FillMatchingLogins( |
| 87 const autofill::PasswordForm& form, | 95 const autofill::PasswordForm& form, |
| 88 AuthorizationPromptPolicy prompt_policy) override; | 96 AuthorizationPromptPolicy prompt_policy) override; |
| 89 bool FillAutofillableLogins( | 97 bool FillAutofillableLogins( |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 123 scoped_ptr<crypto::AppleKeychain> keychain_; | 131 scoped_ptr<crypto::AppleKeychain> keychain_; |
| 124 | 132 |
| 125 // The login metadata SQL database. The caller is resonsible for initializing | 133 // The login metadata SQL database. The caller is resonsible for initializing |
| 126 // it. | 134 // it. |
| 127 password_manager::LoginDatabase* login_metadata_db_; | 135 password_manager::LoginDatabase* login_metadata_db_; |
| 128 | 136 |
| 129 DISALLOW_COPY_AND_ASSIGN(PasswordStoreMac); | 137 DISALLOW_COPY_AND_ASSIGN(PasswordStoreMac); |
| 130 }; | 138 }; |
| 131 | 139 |
| 132 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_MAC_H_ | 140 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_STORE_MAC_H_ |
| OLD | NEW |