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 96257e7eae4325d17d514639ba03a743f115a581..e01ffec1ede9889bee67c3db74252902d6dc4fca 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; |
@@ -109,11 +113,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. |