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

Unified Diff: components/password_manager/core/browser/login_database.h

Issue 1237403003: [Password manager IOS upsteaming] Upstreaming login database (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/password_manager.gypi ('k') | components/password_manager/core/browser/login_database.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « components/password_manager.gypi ('k') | components/password_manager/core/browser/login_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698