Index: components/password_manager/core/browser/login_database.h |
diff --git a/components/password_manager/core/browser/login_database.h b/components/password_manager/core/browser/login_database.h |
index 304fd969b0f53c88b8f904d54b54965c06b0a81f..b032d5392f10c47cb8f215342db0aac3096acf54 100644 |
--- a/components/password_manager/core/browser/login_database.h |
+++ b/components/password_manager/core/browser/login_database.h |
@@ -20,6 +20,10 @@ |
#include "sql/connection.h" |
#include "sql/meta_table.h" |
+#if defined(OS_IOS) |
+#include "base/gtest_prod_util.h" |
+#endif |
+ |
namespace password_manager { |
extern const int kCurrentVersionNumber; |
@@ -110,11 +114,24 @@ class LoginDatabase { |
// whether further use of this login database will succeed is unspecified. |
bool DeleteAndRecreateDatabaseFile(); |
+ // Returns the encrypted password value for the specified |form|. Returns an |
+ // empty string if the row for this |form| is not found. |
+ std::string GetEncryptedPassword(const autofill::PasswordForm& form) const; |
+ |
StatisticsTable& stats_table() { return stats_table_; } |
void set_clear_password_values(bool val) { clear_password_values_ = val; } |
private: |
+#if defined(OS_IOS) |
+ friend class LoginDatabaseIOSTest; |
+ FRIEND_TEST_ALL_PREFIXES(LoginDatabaseIOSTest, KeychainStorage); |
+ |
+ // On iOS, removes the keychain item that is used to store the |
+ // encrypted password for the supplied |form|. |
+ void DeleteEncryptedPassword(const autofill::PasswordForm& form); |
+#endif |
+ |
// Result values for encryption/decryption actions. |
enum EncryptionResult { |
// Success. |